From 4d02d3905c374933c5a6ec4cfbc7f99767ec54e6 Mon Sep 17 00:00:00 2001 From: osyrisrblx Date: Fri, 27 Sep 2024 07:17:00 +0000 Subject: [PATCH] deploy: 7fe6473d76f876246456ae0320520a462d66a59a --- rbxts-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rbxts-worker.js b/rbxts-worker.js index 9bd4f78..400ca39 100644 --- a/rbxts-worker.js +++ b/rbxts-worker.js @@ -9,4 +9,4 @@ const ${"_superIndex"} = (function (geti, seti) { const cache = Object.create(null); return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); - })(name => super[name], (name, value) => super[name] = value);`};function kD(e,t){return QE(e)&&qD(e.expression)&&0!=(8192&Yd(e.expression))&&e.expression.escapedText===t}function TD(e){return 9===e.kind}function CD(e){return 10===e.kind}function wD(e){return 11===e.kind}function DD(e){return 12===e.kind}function ED(e){return 14===e.kind}function PD(e){return 15===e.kind}function ND(e){return 16===e.kind}function FD(e){return 17===e.kind}function AD(e){return 18===e.kind}function ID(e){return 26===e.kind}function OD(e){return 28===e.kind}function MD(e){return 40===e.kind}function LD(e){return 41===e.kind}function jD(e){return 42===e.kind}function RD(e){return 54===e.kind}function BD(e){return 58===e.kind}function JD(e){return 59===e.kind}function zD(e){return 29===e.kind}function $D(e){return 39===e.kind}function qD(e){return 80===e.kind}function VD(e){return 81===e.kind}function UD(e){return 95===e.kind}function KD(e){return 90===e.kind}function WD(e){return 134===e.kind}function HD(e){return 131===e.kind}function GD(e){return 135===e.kind}function XD(e){return 148===e.kind}function QD(e){return 126===e.kind}function YD(e){return 128===e.kind}function ZD(e){return 164===e.kind}function eE(e){return 129===e.kind}function tE(e){return 108===e.kind}function nE(e){return 102===e.kind}function rE(e){return 84===e.kind}function iE(e){return 166===e.kind}function oE(e){return 167===e.kind}function aE(e){return 168===e.kind}function sE(e){return 169===e.kind}function cE(e){return 170===e.kind}function lE(e){return 171===e.kind}function uE(e){return 172===e.kind}function _E(e){return 173===e.kind}function dE(e){return 174===e.kind}function pE(e){return 175===e.kind}function fE(e){return 176===e.kind}function mE(e){return 177===e.kind}function gE(e){return 178===e.kind}function hE(e){return 179===e.kind}function yE(e){return 180===e.kind}function vE(e){return 181===e.kind}function bE(e){return 182===e.kind}function xE(e){return 183===e.kind}function SE(e){return 184===e.kind}function kE(e){return 185===e.kind}function TE(e){return 186===e.kind}function CE(e){return 187===e.kind}function wE(e){return 188===e.kind}function DE(e){return 189===e.kind}function EE(e){return 202===e.kind}function PE(e){return 190===e.kind}function NE(e){return 191===e.kind}function FE(e){return 192===e.kind}function AE(e){return 193===e.kind}function IE(e){return 194===e.kind}function OE(e){return 195===e.kind}function ME(e){return 196===e.kind}function LE(e){return 197===e.kind}function jE(e){return 198===e.kind}function RE(e){return 199===e.kind}function BE(e){return 200===e.kind}function JE(e){return 201===e.kind}function zE(e){return 205===e.kind}function $E(e){return 204===e.kind}function qE(e){return 203===e.kind}function VE(e){return 206===e.kind}function UE(e){return 207===e.kind}function KE(e){return 208===e.kind}function WE(e){return 209===e.kind}function HE(e){return 210===e.kind}function GE(e){return 211===e.kind}function XE(e){return 212===e.kind}function QE(e){return 213===e.kind}function YE(e){return 214===e.kind}function ZE(e){return 215===e.kind}function eP(e){return 216===e.kind}function tP(e){return 217===e.kind}function nP(e){return 218===e.kind}function rP(e){return 219===e.kind}function iP(e){return 220===e.kind}function oP(e){return 221===e.kind}function aP(e){return 222===e.kind}function sP(e){return 223===e.kind}function cP(e){return 224===e.kind}function lP(e){return 225===e.kind}function uP(e){return 226===e.kind}function _P(e){return 227===e.kind}function dP(e){return 228===e.kind}function pP(e){return 229===e.kind}function fP(e){return 230===e.kind}function mP(e){return 231===e.kind}function gP(e){return 232===e.kind}function hP(e){return 233===e.kind}function yP(e){return 234===e.kind}function vP(e){return 238===e.kind}function bP(e){return 235===e.kind}function xP(e){return 236===e.kind}function SP(e){return 237===e.kind}function kP(e){return 354===e.kind}function TP(e){return 355===e.kind}function CP(e){return 239===e.kind}function wP(e){return 240===e.kind}function DP(e){return 241===e.kind}function EP(e){return 243===e.kind}function PP(e){return 242===e.kind}function NP(e){return 244===e.kind}function FP(e){return 245===e.kind}function AP(e){return 246===e.kind}function IP(e){return 247===e.kind}function OP(e){return 248===e.kind}function MP(e){return 249===e.kind}function LP(e){return 250===e.kind}function jP(e){return 251===e.kind}function RP(e){return 252===e.kind}function BP(e){return 253===e.kind}function JP(e){return 254===e.kind}function zP(e){return 255===e.kind}function $P(e){return 256===e.kind}function qP(e){return 257===e.kind}function VP(e){return 258===e.kind}function UP(e){return 259===e.kind}function KP(e){return 260===e.kind}function WP(e){return 261===e.kind}function HP(e){return 262===e.kind}function GP(e){return 263===e.kind}function XP(e){return 264===e.kind}function QP(e){return 265===e.kind}function YP(e){return 266===e.kind}function ZP(e){return 267===e.kind}function eN(e){return 268===e.kind}function tN(e){return 269===e.kind}function nN(e){return 270===e.kind}function rN(e){return 271===e.kind}function iN(e){return 272===e.kind}function oN(e){return 273===e.kind}function aN(e){return 302===e.kind}function sN(e){return 300===e.kind}function cN(e){return 301===e.kind}function lN(e){return 300===e.kind}function uN(e){return 301===e.kind}function _N(e){return 274===e.kind}function dN(e){return 280===e.kind}function pN(e){return 275===e.kind}function fN(e){return 276===e.kind}function mN(e){return 277===e.kind}function gN(e){return 278===e.kind}function hN(e){return 279===e.kind}function yN(e){return 281===e.kind}function vN(e){return 282===e.kind}function bN(e){return 353===e.kind}function xN(e){return 356===e.kind}function SN(e){return 283===e.kind}function kN(e){return 284===e.kind}function TN(e){return 285===e.kind}function CN(e){return 286===e.kind}function wN(e){return 287===e.kind}function DN(e){return 288===e.kind}function EN(e){return 289===e.kind}function PN(e){return 290===e.kind}function NN(e){return 291===e.kind}function FN(e){return 292===e.kind}function AN(e){return 293===e.kind}function IN(e){return 294===e.kind}function ON(e){return 295===e.kind}function MN(e){return 296===e.kind}function LN(e){return 297===e.kind}function jN(e){return 298===e.kind}function RN(e){return 299===e.kind}function BN(e){return 303===e.kind}function JN(e){return 304===e.kind}function zN(e){return 305===e.kind}function $N(e){return 306===e.kind}function qN(e){return 307===e.kind}function VN(e){return 308===e.kind}function UN(e){return 309===e.kind}function KN(e){return 310===e.kind}function WN(e){return 311===e.kind}function HN(e){return 324===e.kind}function GN(e){return 325===e.kind}function XN(e){return 326===e.kind}function QN(e){return 312===e.kind}function YN(e){return 313===e.kind}function ZN(e){return 314===e.kind}function eF(e){return 315===e.kind}function tF(e){return 316===e.kind}function nF(e){return 317===e.kind}function rF(e){return 318===e.kind}function iF(e){return 319===e.kind}function oF(e){return 320===e.kind}function aF(e){return 322===e.kind}function sF(e){return 323===e.kind}function cF(e){return 328===e.kind}function lF(e){return 330===e.kind}function uF(e){return 332===e.kind}function _F(e){return 338===e.kind}function dF(e){return 333===e.kind}function pF(e){return 334===e.kind}function fF(e){return 335===e.kind}function mF(e){return 336===e.kind}function gF(e){return 337===e.kind}function hF(e){return 339===e.kind}function yF(e){return 331===e.kind}function vF(e){return 347===e.kind}function bF(e){return 340===e.kind}function xF(e){return 341===e.kind}function SF(e){return 342===e.kind}function kF(e){return 343===e.kind}function TF(e){return 344===e.kind}function CF(e){return 345===e.kind}function wF(e){return 346===e.kind}function DF(e){return 327===e.kind}function EF(e){return 348===e.kind}function PF(e){return 329===e.kind}function NF(e){return 350===e.kind}function FF(e){return 349===e.kind}function AF(e){return 351===e.kind}function IF(e){return 352===e.kind}var OF,MF,LF,jF,RF,BF,JF=new WeakMap;function zF(e){return Ol(e.kind)?JF.get(e):u}function $F(e,t){return JF.set(e,t),t}function qF(e){JF.delete(e)}function VF(e){return e.createExportDeclaration(void 0,!1,e.createNamedExports([]),void 0)}function UF(e,t,n,r){if(oE(n))return sI(e.createElementAccessExpression(t,n.expression),r);{const r=sI(hl(n)?e.createPropertyAccessExpression(t,n):e.createElementAccessExpression(t,n),n);return ow(r,128),r}}function KF(e,t){const n=_I.createIdentifier(e||"React");return OT(n,hc(t)),n}function WF(e,t,n){if(iE(t)){const r=WF(e,t.left,n),i=e.createIdentifier(bc(t.right));return i.escapedText=t.right.escapedText,e.createPropertyAccessExpression(r,i)}return KF(bc(t),n)}function HF(e,t,n,r){return t?WF(e,t,r):e.createPropertyAccessExpression(KF(n,r),"createElement")}function GF(e,t,n,r,i,o){const a=[n];if(r&&a.push(r),i&&i.length>0)if(r||a.push(e.createNull()),i.length>1)for(const e of i)hA(e),a.push(e);else a.push(i[0]);return sI(e.createCallExpression(t,void 0,a),o)}function XF(e,t,n,r,i,o,a){const s=function(e,t,n,r){return t?WF(e,t,r):e.createPropertyAccessExpression(KF(n,r),"Fragment")}(e,n,r,o),c=[s,e.createNull()];if(i&&i.length>0)if(i.length>1)for(const e of i)hA(e),c.push(e);else c.push(i[0]);return sI(e.createCallExpression(HF(e,t,r,o),void 0,c),a)}function QF(e,t,n){if(WP(t)){const r=Te(t.declarations),i=e.updateVariableDeclaration(r,r.name,void 0,void 0,n);return sI(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}{const r=sI(e.createAssignment(t,n),t);return sI(e.createExpressionStatement(r),t)}}function YF(e,t,n){return DP(t)?e.updateBlock(t,sI(e.createNodeArray([n,...t.statements]),t.statements)):e.createBlock(e.createNodeArray([t,n]),!0)}function ZF(e,t){if(iE(t)){const n=ZF(e,t.left),r=OT(sI(e.cloneNode(t.right),t.right),t.right.parent);return sI(e.createPropertyAccessExpression(n,r),t)}return OT(sI(e.cloneNode(t),t),t.parent)}function eA(e,t){return qD(t)?e.createStringLiteralFromNode(t):oE(t)?OT(sI(e.cloneNode(t.expression),t.expression),t.expression.parent):OT(sI(e.cloneNode(t),t),t.parent)}function tA(e,t,n,r){switch(n.name&&VD(n.name)&&xn.failBadSyntaxKind(n.name,"Private identifiers are not allowed in object literals."),n.kind){case 177:case 178:return function(e,t,n,r,i){const{firstAccessor:o,getAccessor:a,setAccessor:s}=Sv(t,n);if(n===o)return sI(e.createObjectDefinePropertyCall(r,eA(e,n.name),e.createPropertyDescriptor({enumerable:e.createFalse(),configurable:!0,get:a&&sI(ew(e.createFunctionExpression(Ac(a),void 0,void 0,void 0,a.parameters,void 0,a.body),a),a),set:s&&sI(ew(e.createFunctionExpression(Ac(s),void 0,void 0,void 0,s.parameters,void 0,s.body),s),s)},!i)),o)}(e,t.properties,n,r,!!t.multiLine);case 303:return function(e,t,n){return ew(sI(e.createAssignment(UF(e,n,t.name,t.name),t.initializer),t),t)}(e,n,r);case 304:return function(e,t,n){return ew(sI(e.createAssignment(UF(e,n,t.name,t.name),e.cloneNode(t.name)),t),t)}(e,n,r);case 174:return function(e,t,n){return ew(sI(e.createAssignment(UF(e,n,t.name,t.name),ew(sI(e.createFunctionExpression(Ac(t),t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t)}(e,n,r)}}function nA(e,t,n,r,i){const o=t.operator;xn.assert(46===o||47===o,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");const a=e.createTempVariable(r);sI(n=e.createAssignment(a,n),t.operand);let s=cP(t)?e.createPrefixUnaryExpression(o,a):e.createPostfixUnaryExpression(a,o);return sI(s,t),i&&(s=e.createAssignment(i,s),sI(s,t)),sI(n=e.createComma(n,s),t),lP(t)&&sI(n=e.createComma(n,a),t),n}function rA(e){return 0!=(65536&Yd(e))}function iA(e){return 0!=(32768&Yd(e))}function oA(e){return 0!=(16384&Yd(e))}function aA(e){return wD(e.expression)&&"use strict"===e.expression.text}function sA(e){for(const t of e){if(!pf(t))break;if(aA(t))return t}}function cA(e){const t=Se(e);return void 0!==t&&pf(t)&&aA(t)}function lA(e){return 226===e.kind&&28===e.operatorToken.kind}function uA(e){return lA(e)||TP(e)}function _A(e){return tP(e)&&Mm(e)&&!!ol(e)}function dA(e){const t=al(e);return xn.assertIsDefined(t),t}function pA(e,t=15){switch(e.kind){case 217:return!(16&t&&_A(e))&&0!=(1&t);case 216:case 234:case 233:case 238:return 0!=(2&t);case 235:return 0!=(4&t);case 354:return 0!=(8&t)}return!1}function fA(e,t=15){for(;pA(e,t);)e=e.expression;return e}function mA(e,t=15){let n=e.parent;for(;pA(n,t);)n=n.parent,xn.assert(n);return n}function gA(e){return fA(e,6)}function hA(e){return pw(e,!0)}function yA(e){const t=fc(e,qN),n=t&&t.emitNode;return n&&n.externalHelpersModuleName}function vA(e){const t=fc(e,qN),n=t&&t.emitNode;return!(!n||!n.externalHelpersModuleName&&!n.externalHelpers)}function bA(e,t,n,r,i,o,a){if(r.importHelpers&&hp(n,r)){let s;const c=DS(r);if(c>=5&&c<=99||99===n.impliedNodeFormat){const r=Ew(n);if(r){const i=[];for(const e of r)if(!e.scoped){const t=e.importName;t&&fe(i,t)}Q(i)&&(i.sort(Mt),s=e.createNamedImports(O(i,(r=>Pd(n,r)?e.createImportSpecifier(!1,void 0,e.createIdentifier(r)):e.createImportSpecifier(!1,e.createIdentifier(r),t.getUnscopedHelperName(r))))),tw(fc(n,qN)).externalHelpers=!0)}}else{const t=xA(e,n,r,i,o||a);t&&(s=e.createNamespaceImport(t))}if(s){const t=e.createImportDeclaration(void 0,e.createImportClause(!1,void 0,s),e.createStringLiteral(G_),void 0);return sw(t,2),t}}}function xA(e,t,n,r,i){if(n.importHelpers&&hp(t,n)){const o=yA(t);if(o)return o;const a=DS(n);let s=(r||FS(n)&&i)&&4!==a&&(a<5||1===t.impliedNodeFormat);if(!s){const e=Ew(t);if(e)for(const t of e)if(!t.scoped){s=!0;break}}if(s){const n=tw(fc(t,qN));return n.externalHelpersModuleName||(n.externalHelpersModuleName=e.createUniqueName(G_))}}}function SA(e,t,n){const r=wg(t);if(r&&!Dg(t)&&!Wd(t)){const t=r.name;return Xl(t)?t:e.createIdentifier(Kd(n,t)||bc(t))}return 272===t.kind&&t.importClause||278===t.kind&&t.moduleSpecifier?e.getGeneratedNameForNode(t):void 0}function kA(e,t,n,r,i,o){const a=Cg(t);if(a&&wD(a))return function(e,t,n,r,i){return TA(n,r.getExternalModuleFileFromDeclaration(e),t,i)}(t,r,e,i,o)||function(e,t,n){const r=n.renamedDependencies&&n.renamedDependencies.get(t.text);return r?e.createStringLiteral(r):void 0}(e,a,n)||e.cloneNode(a)}function TA(e,t,n,r){if(t)return t.moduleName?e.createStringLiteral(t.moduleName):!t.isDeclarationFile&&r.outFile?e.createStringLiteral(Qy(n,t.fileName)):void 0}function CA(e){if(Fu(e))return e.initializer;if(BN(e)){const t=e.initializer;return mb(t,!0)?t.right:void 0}return JN(e)?e.objectAssignmentInitializer:mb(e,!0)?e.right:fP(e)?CA(e.expression):void 0}function wA(e){if(Fu(e))return e.name;if(!Cu(e))return mb(e,!0)?wA(e.left):fP(e)?wA(e.expression):e;switch(e.kind){case 303:return wA(e.initializer);case 304:return e.name;case 305:return wA(e.expression)}}function DA(e){switch(e.kind){case 169:case 208:return e.dotDotDotToken;case 230:case 305:return e}}function EA(e){const t=PA(e);return xn.assert(!!t||zN(e),"Invalid property name for binding element."),t}function PA(e){switch(e.kind){case 208:if(e.propertyName){const t=e.propertyName;return VD(t)?xn.failBadSyntaxKind(t):oE(t)&&NA(t.expression)?t.expression:t}break;case 303:if(e.name){const t=e.name;return VD(t)?xn.failBadSyntaxKind(t):oE(t)&&NA(t.expression)?t.expression:t}break;case 305:return e.name&&VD(e.name)?xn.failBadSyntaxKind(e.name):e.name}const t=wA(e);if(t&&au(t))return t}function NA(e){const t=e.kind;return 11===t||9===t}function FA(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function AA(e){if(e){let t=e;for(;;){if(qD(t)||!t.body)return qD(t)?t:t.name;t=t.body}}}function IA(e){const t=e.kind;return 176===t||178===t}function OA(e){const t=e.kind;return 176===t||177===t||178===t}function MA(e){const t=e.kind;return 303===t||304===t||262===t||176===t||181===t||175===t||282===t||243===t||264===t||265===t||266===t||267===t||271===t||272===t||270===t||278===t||277===t}function LA(e){const t=e.kind;return 175===t||303===t||304===t||282===t||270===t}function jA(e){return BD(e)||RD(e)}function RA(e){return qD(e)||LE(e)}function BA(e){return XD(e)||MD(e)||LD(e)}function JA(e){return BD(e)||MD(e)||LD(e)}function zA(e){return qD(e)||wD(e)}function $A(e){const t=e.kind;return 106===t||112===t||97===t||Bl(e)||cP(e)}function qA(e){return function(e){return 48===e||49===e||50===e}(e)||function(e){return function(e){return 40===e||41===e}(e)||function(e){return function(e){return 43===e}(e)||function(e){return 42===e||44===e||45===e}(e)}(e)}(e)}function VA(e){return function(e){return 56===e||57===e}(e)||function(e){return function(e){return 51===e||52===e||53===e}(e)||function(e){return function(e){return 35===e||37===e||36===e||38===e}(e)||function(e){return function(e){return 30===e||33===e||32===e||34===e||104===e||103===e}(e)||qA(e)}(e)}(e)}(e)}function UA(e){return function(e){return 61===e||VA(e)||db(e)}(t=e.kind)||28===t;var t}function KA(e,t,n,r,i,o){const a=new class{constructor(e,t,n,r,i,o){this.onEnter=e,this.onLeft=t,this.onOperator=n,this.onRight=r,this.onExit=i,this.foldState=o}}(e,t,n,r,i,o);return function(e,t){const n={value:void 0},r=[OF.enter],i=[e],o=[void 0];let s=0;for(;r[s]!==OF.done;)s=r[s](a,s,r,i,o,n,t);return xn.assertEqual(s,0),n.value}}function WA(e){return 95===e||90===e}function HA(e){return WA(e.kind)}function GA(e){const t=e.kind;return tu(t)&&!WA(t)}function XA(e,t){if(void 0!==t)return 0===t.length?t:sI(e.createNodeArray([],t.hasTrailingComma),t)}function QA(e){var t;const n=e.emitNode.autoGenerate;if(4&n.flags){const r=n.id;let i=e,o=i.original;for(;o;){i=o;const e=null==(t=i.emitNode)?void 0:t.autoGenerate;if(hl(i)&&(void 0===e||4&e.flags&&e.id!==r))break;o=i.original}return i}return e}function YA(e,t){return"object"==typeof e?ZA(!1,e.prefix,e.node,e.suffix,t):"string"==typeof e?e.length>0&&35===e.charCodeAt(0)?e.slice(1):e:""}function ZA(e,t,n,r,i){return t=YA(t,i),r=YA(r,i),`${e?"#":""}${t}${n=function(e,t){return"string"==typeof e?e:function(e,t){return Ql(e)?t(e).slice(1):Xl(e)?t(e):VD(e)?e.escapedText.slice(1):bc(e)}(e,xn.checkDefined(t))}(n,i)}${r}`}function eI(e,t,n,r){return e.updatePropertyDeclaration(t,n,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage"),void 0,void 0,r)}function tI(e,t,n,r,i=e.createThis()){return e.createGetAccessorDeclaration(n,r,[],void 0,e.createBlock([e.createReturnStatement(e.createPropertyAccessExpression(i,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")))]))}function nI(e,t,n,r,i=e.createThis()){return e.createSetAccessorDeclaration(n,r,[e.createParameterDeclaration(void 0,void 0,"value")],e.createBlock([e.createExpressionStatement(e.createAssignment(e.createPropertyAccessExpression(i,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")),e.createIdentifier("value")))]))}function rI(e){let t=e.expression;for(;;)if(t=fA(t),TP(t))t=De(t.elements);else{if(!lA(t)){if(mb(t,!0)&&Xl(t.left))return t;break}t=t.right}}function iI(e,t){if(function(e){return tP(e)&&ly(e)&&!e.emitNode}(e))iI(e.expression,t);else if(lA(e))iI(e.left,t),iI(e.right,t);else if(TP(e))for(const n of e.elements)iI(n,t);else t.push(e)}function oI(e){const t=[];return iI(e,t),t}function aI(e){if(65536&e.transformFlags)return!0;if(128&e.transformFlags)for(const t of FA(e)){const e=wA(t);if(e&&Pu(e)){if(65536&e.transformFlags)return!0;if(128&e.transformFlags&&aI(e))return!0}}return!1}function sI(e,t){return t?FT(e,t.pos,t.end):e}function cI(e){const t=e.kind;return 168===t||169===t||171===t||172===t||173===t||174===t||176===t||177===t||178===t||181===t||185===t||218===t||219===t||231===t||243===t||262===t||263===t||264===t||265===t||266===t||267===t||271===t||272===t||277===t||278===t}function lI(e){const t=e.kind;return 169===t||172===t||174===t||177===t||178===t||231===t||263===t}(e=>{function t(e,n,r,i,o,a,c){const l=n>0?o[n-1]:void 0;return xn.assertEqual(r[n],t),o[n]=e.onEnter(i[n],l,c),r[n]=s(e,t),n}function n(e,t,r,i,o,a,u){xn.assertEqual(r[t],n),xn.assertIsDefined(e.onLeft),r[t]=s(e,n);const _=e.onLeft(i[t].left,o[t],i[t]);return _?(l(t,i,_),c(t,r,i,o,_)):t}function r(e,t,n,i,o,a,c){return xn.assertEqual(n[t],r),xn.assertIsDefined(e.onOperator),n[t]=s(e,r),e.onOperator(i[t].operatorToken,o[t],i[t]),t}function i(e,t,n,r,o,a,u){xn.assertEqual(n[t],i),xn.assertIsDefined(e.onRight),n[t]=s(e,i);const _=e.onRight(r[t].right,o[t],r[t]);return _?(l(t,r,_),c(t,n,r,o,_)):t}function o(e,t,n,r,i,a,c){xn.assertEqual(n[t],o),n[t]=s(e,o);const l=e.onExit(r[t],i[t]);if(t>0){if(t--,e.foldState){const r=n[t]===o?"right":"left";i[t]=e.foldState(i[t],l,r)}}else a.value=l;return t}function a(e,t,n,r,i,o,s){return xn.assertEqual(n[t],a),t}function s(e,s){switch(s){case t:if(e.onLeft)return n;case n:if(e.onOperator)return r;case r:if(e.onRight)return i;case i:return o;case o:case a:return a;default:xn.fail("Invalid state")}}function c(e,n,r,i,o){return n[++e]=t,r[e]=o,i[e]=void 0,e}function l(e,t,n){if(xn.shouldAssert(2))for(;e>=0;)xn.assert(t[e]!==n,"Circular traversal detected."),e--}e.enter=t,e.left=n,e.operator=r,e.right=i,e.exit=o,e.done=a,e.nextState=s})(OF||(OF={}));var uI={createBaseSourceFileNode:e=>new(BF||(BF=Hx.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(jF||(jF=Hx.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(RF||(RF=Hx.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(LF||(LF=Hx.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(MF||(MF=Hx.getNodeConstructor()))(e,-1,-1)},_I=JC(1,uI);function dI(e,t){return t&&e(t)}function pI(e,t,n){if(n){if(t)return t(n);for(const t of n){const n=e(t);if(n)return n}}}function fI(e,t){return 42===e.charCodeAt(t+1)&&42===e.charCodeAt(t+2)&&47!==e.charCodeAt(t+3)}function mI(e){return f(e.statements,gI)||function(e){return 8388608&e.flags?hI(e):void 0}(e)}function gI(e){return cI(e)&&function(e,t){return Q(e.modifiers,(e=>95===e.kind))}(e)||rN(e)&&SN(e.moduleReference)||iN(e)||mN(e)||gN(e)?e:void 0}function hI(e){return function(e){return xP(e)&&102===e.keywordToken&&"meta"===e.name.escapedText}(e)?e:LI(e,hI)}var yI,vI={166:function(e,t,n){return dI(t,e.left)||dI(t,e.right)},168:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.constraint)||dI(t,e.default)||dI(t,e.expression)},304:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.exclamationToken)||dI(t,e.equalsToken)||dI(t,e.objectAssignmentInitializer)},305:function(e,t,n){return dI(t,e.expression)},169:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.dotDotDotToken)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.type)||dI(t,e.initializer)},172:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.exclamationToken)||dI(t,e.type)||dI(t,e.initializer)},171:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.type)||dI(t,e.initializer)},303:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.exclamationToken)||dI(t,e.initializer)},260:function(e,t,n){return dI(t,e.name)||dI(t,e.exclamationToken)||dI(t,e.type)||dI(t,e.initializer)},208:function(e,t,n){return dI(t,e.dotDotDotToken)||dI(t,e.propertyName)||dI(t,e.name)||dI(t,e.initializer)},181:function(e,t,n){return pI(t,n,e.modifiers)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)},185:function(e,t,n){return pI(t,n,e.modifiers)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)},184:function(e,t,n){return pI(t,n,e.modifiers)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)},179:bI,180:bI,174:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.asteriskToken)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.exclamationToken)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},173:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)},176:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},177:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},178:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},262:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.asteriskToken)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},218:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.asteriskToken)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},219:function(e,t,n){return pI(t,n,e.modifiers)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.equalsGreaterThanToken)||dI(t,e.body)},175:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.body)},183:function(e,t,n){return dI(t,e.typeName)||pI(t,n,e.typeArguments)},182:function(e,t,n){return dI(t,e.assertsModifier)||dI(t,e.parameterName)||dI(t,e.type)},186:function(e,t,n){return dI(t,e.exprName)||pI(t,n,e.typeArguments)},187:function(e,t,n){return pI(t,n,e.members)},188:function(e,t,n){return dI(t,e.elementType)},189:function(e,t,n){return pI(t,n,e.elements)},192:xI,193:xI,194:function(e,t,n){return dI(t,e.checkType)||dI(t,e.extendsType)||dI(t,e.trueType)||dI(t,e.falseType)},195:function(e,t,n){return dI(t,e.typeParameter)},205:function(e,t,n){return dI(t,e.argument)||dI(t,e.attributes)||dI(t,e.qualifier)||pI(t,n,e.typeArguments)},302:function(e,t,n){return dI(t,e.assertClause)},196:SI,198:SI,199:function(e,t,n){return dI(t,e.objectType)||dI(t,e.indexType)},200:function(e,t,n){return dI(t,e.readonlyToken)||dI(t,e.typeParameter)||dI(t,e.nameType)||dI(t,e.questionToken)||dI(t,e.type)||pI(t,n,e.members)},201:function(e,t,n){return dI(t,e.literal)},202:function(e,t,n){return dI(t,e.dotDotDotToken)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.type)},206:kI,207:kI,209:function(e,t,n){return pI(t,n,e.elements)},210:function(e,t,n){return pI(t,n,e.properties)},211:function(e,t,n){return dI(t,e.expression)||dI(t,e.questionDotToken)||dI(t,e.name)},212:function(e,t,n){return dI(t,e.expression)||dI(t,e.questionDotToken)||dI(t,e.argumentExpression)},213:TI,214:TI,215:function(e,t,n){return dI(t,e.tag)||dI(t,e.questionDotToken)||pI(t,n,e.typeArguments)||dI(t,e.template)},216:function(e,t,n){return dI(t,e.type)||dI(t,e.expression)},217:function(e,t,n){return dI(t,e.expression)},220:function(e,t,n){return dI(t,e.expression)},221:function(e,t,n){return dI(t,e.expression)},222:function(e,t,n){return dI(t,e.expression)},224:function(e,t,n){return dI(t,e.operand)},229:function(e,t,n){return dI(t,e.asteriskToken)||dI(t,e.expression)},223:function(e,t,n){return dI(t,e.expression)},225:function(e,t,n){return dI(t,e.operand)},226:function(e,t,n){return dI(t,e.left)||dI(t,e.operatorToken)||dI(t,e.right)},234:function(e,t,n){return dI(t,e.expression)||dI(t,e.type)},235:function(e,t,n){return dI(t,e.expression)},238:function(e,t,n){return dI(t,e.expression)||dI(t,e.type)},236:function(e,t,n){return dI(t,e.name)},227:function(e,t,n){return dI(t,e.condition)||dI(t,e.questionToken)||dI(t,e.whenTrue)||dI(t,e.colonToken)||dI(t,e.whenFalse)},230:function(e,t,n){return dI(t,e.expression)},241:CI,268:CI,307:function(e,t,n){return pI(t,n,e.statements)||dI(t,e.endOfFileToken)},243:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.declarationList)},261:function(e,t,n){return pI(t,n,e.declarations)},244:function(e,t,n){return dI(t,e.expression)},245:function(e,t,n){return dI(t,e.expression)||dI(t,e.thenStatement)||dI(t,e.elseStatement)},246:function(e,t,n){return dI(t,e.statement)||dI(t,e.expression)},247:function(e,t,n){return dI(t,e.expression)||dI(t,e.statement)},248:function(e,t,n){return dI(t,e.initializer)||dI(t,e.condition)||dI(t,e.incrementor)||dI(t,e.statement)},249:function(e,t,n){return dI(t,e.initializer)||dI(t,e.expression)||dI(t,e.statement)},250:function(e,t,n){return dI(t,e.awaitModifier)||dI(t,e.initializer)||dI(t,e.expression)||dI(t,e.statement)},251:wI,252:wI,253:function(e,t,n){return dI(t,e.expression)},254:function(e,t,n){return dI(t,e.expression)||dI(t,e.statement)},255:function(e,t,n){return dI(t,e.expression)||dI(t,e.caseBlock)},269:function(e,t,n){return pI(t,n,e.clauses)},296:function(e,t,n){return dI(t,e.expression)||pI(t,n,e.statements)},297:function(e,t,n){return pI(t,n,e.statements)},256:function(e,t,n){return dI(t,e.label)||dI(t,e.statement)},257:function(e,t,n){return dI(t,e.expression)},258:function(e,t,n){return dI(t,e.tryBlock)||dI(t,e.catchClause)||dI(t,e.finallyBlock)},299:function(e,t,n){return dI(t,e.variableDeclaration)||dI(t,e.block)},170:function(e,t,n){return dI(t,e.expression)},263:DI,231:DI,264:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.heritageClauses)||pI(t,n,e.members)},265:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||dI(t,e.type)},266:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.members)},306:function(e,t,n){return dI(t,e.name)||dI(t,e.initializer)},267:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.body)},271:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.moduleReference)},272:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.importClause)||dI(t,e.moduleSpecifier)||dI(t,e.attributes)},273:function(e,t,n){return dI(t,e.name)||dI(t,e.namedBindings)},300:function(e,t,n){return pI(t,n,e.elements)},301:function(e,t,n){return dI(t,e.name)||dI(t,e.value)},270:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)},274:function(e,t,n){return dI(t,e.name)},280:function(e,t,n){return dI(t,e.name)},275:EI,279:EI,278:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.exportClause)||dI(t,e.moduleSpecifier)||dI(t,e.attributes)},276:PI,281:PI,277:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.expression)},228:function(e,t,n){return dI(t,e.head)||pI(t,n,e.templateSpans)},239:function(e,t,n){return dI(t,e.expression)||dI(t,e.literal)},203:function(e,t,n){return dI(t,e.head)||pI(t,n,e.templateSpans)},204:function(e,t,n){return dI(t,e.type)||dI(t,e.literal)},167:function(e,t,n){return dI(t,e.expression)},298:function(e,t,n){return pI(t,n,e.types)},233:function(e,t,n){return dI(t,e.expression)||pI(t,n,e.typeArguments)},283:function(e,t,n){return dI(t,e.expression)},282:function(e,t,n){return pI(t,n,e.modifiers)},355:function(e,t,n){return pI(t,n,e.elements)},284:function(e,t,n){return dI(t,e.openingElement)||pI(t,n,e.children)||dI(t,e.closingElement)},288:function(e,t,n){return dI(t,e.openingFragment)||pI(t,n,e.children)||dI(t,e.closingFragment)},285:NI,286:NI,292:function(e,t,n){return pI(t,n,e.properties)},291:function(e,t,n){return dI(t,e.name)||dI(t,e.initializer)},293:function(e,t,n){return dI(t,e.expression)},294:function(e,t,n){return dI(t,e.dotDotDotToken)||dI(t,e.expression)},287:function(e,t,n){return dI(t,e.tagName)},295:function(e,t,n){return dI(t,e.namespace)||dI(t,e.name)},190:FI,191:FI,309:FI,315:FI,314:FI,316:FI,318:FI,317:function(e,t,n){return pI(t,n,e.parameters)||dI(t,e.type)},320:function(e,t,n){return("string"==typeof e.comment?void 0:pI(t,n,e.comment))||pI(t,n,e.tags)},347:function(e,t,n){return dI(t,e.tagName)||dI(t,e.name)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},310:function(e,t,n){return dI(t,e.name)},311:function(e,t,n){return dI(t,e.left)||dI(t,e.right)},341:AI,348:AI,330:function(e,t,n){return dI(t,e.tagName)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},329:function(e,t,n){return dI(t,e.tagName)||dI(t,e.class)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},328:function(e,t,n){return dI(t,e.tagName)||dI(t,e.class)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},345:function(e,t,n){return dI(t,e.tagName)||dI(t,e.constraint)||pI(t,n,e.typeParameters)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},346:function(e,t,n){return dI(t,e.tagName)||(e.typeExpression&&309===e.typeExpression.kind?dI(t,e.typeExpression)||dI(t,e.fullName)||("string"==typeof e.comment?void 0:pI(t,n,e.comment)):dI(t,e.fullName)||dI(t,e.typeExpression)||("string"==typeof e.comment?void 0:pI(t,n,e.comment)))},338:function(e,t,n){return dI(t,e.tagName)||dI(t,e.fullName)||dI(t,e.typeExpression)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},342:II,344:II,343:II,340:II,350:II,349:II,339:II,323:function(e,t,n){return f(e.typeParameters,t)||f(e.parameters,t)||dI(t,e.type)},324:OI,325:OI,326:OI,322:function(e,t,n){return f(e.jsDocPropertyTags,t)},327:MI,332:MI,333:MI,334:MI,335:MI,336:MI,331:MI,337:MI,351:function(e,t,n){return dI(t,e.tagName)||dI(t,e.importClause)||dI(t,e.moduleSpecifier)||dI(t,e.attributes)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},354:function(e,t,n){return dI(t,e.expression)}};function bI(e,t,n){return pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)}function xI(e,t,n){return pI(t,n,e.types)}function SI(e,t,n){return dI(t,e.type)}function kI(e,t,n){return pI(t,n,e.elements)}function TI(e,t,n){return dI(t,e.expression)||dI(t,e.questionDotToken)||pI(t,n,e.typeArguments)||pI(t,n,e.arguments)}function CI(e,t,n){return pI(t,n,e.statements)}function wI(e,t,n){return dI(t,e.label)}function DI(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.heritageClauses)||pI(t,n,e.members)}function EI(e,t,n){return pI(t,n,e.elements)}function PI(e,t,n){return dI(t,e.propertyName)||dI(t,e.name)}function NI(e,t,n){return dI(t,e.tagName)||pI(t,n,e.typeArguments)||dI(t,e.attributes)}function FI(e,t,n){return dI(t,e.type)}function AI(e,t,n){return dI(t,e.tagName)||(e.isNameFirst?dI(t,e.name)||dI(t,e.typeExpression):dI(t,e.typeExpression)||dI(t,e.name))||("string"==typeof e.comment?void 0:pI(t,n,e.comment))}function II(e,t,n){return dI(t,e.tagName)||dI(t,e.typeExpression)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))}function OI(e,t,n){return dI(t,e.name)}function MI(e,t,n){return dI(t,e.tagName)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))}function LI(e,t,n){if(void 0===e||e.kind<=165)return;const r=vI[e.kind];return void 0===r?void 0:r(e,t,n)}function jI(e,t,n){const r=RI(e),i=[];for(;i.length=0;--t)r.push(e[t]),i.push(o)}else{const n=t(e,o);if(n){if("skip"===n)continue;return n}if(e.kind>=166)for(const t of RI(e))r.push(t),i.push(e)}}}function RI(e){const t=[];return LI(e,n,n),t;function n(e){t.unshift(e)}}function BI(e){e.externalModuleIndicator=mI(e)}function JI(e,t,n,r=!1,i){var o,a,s,c;let l;null==(o=or)||o.push(or.Phase.Parse,"createSourceFile",{path:e},!0),pr("beforeParse"),null==(a=tr)||a.logStartParseSourceFile(e);const{languageVersion:u,setExternalModuleIndicator:_,impliedNodeFormat:d,jsDocParsingMode:p}="object"==typeof n?n:{languageVersion:n};if(100===u)l=yI.parseSourceFile(e,t,u,void 0,r,6,_t,p);else{const n=void 0===d?_:e=>(e.impliedNodeFormat=d,(_||BI)(e));l=yI.parseSourceFile(e,t,u,void 0,r,i,n,p)}return null==(s=tr)||s.logStopParseSourceFile(),pr("afterParse"),fr("Parse","beforeParse","afterParse"),null==(c=or)||c.pop(),l}function zI(e,t){return yI.parseIsolatedEntityName(e,t)}function $I(e,t){return yI.parseJsonText(e,t)}function qI(e){return void 0!==e.externalModuleIndicator}function VI(e,t,n,r=!1){const i=WI.updateSourceFile(e,t,n,r);return i.flags|=12582912&e.flags,i}function UI(e,t,n){const r=yI.JSDocParser.parseIsolatedJSDocComment(e,t,n);return r&&r.jsDoc&&yI.fixupParentReferences(r.jsDoc),r}function KI(e,t,n){return yI.JSDocParser.parseJSDocTypeExpressionForTests(e,t,n)}(e=>{var t,n,r,i,o,a=Cs(99,!0);function s(e){return b++,e}var c,l,d,p,f,m,g,h,y,v,b,x,S,k,C,w,D=JC(11,{createBaseSourceFileNode:e=>s(new o(e,0,0)),createBaseIdentifierNode:e=>s(new r(e,0,0)),createBasePrivateIdentifierNode:e=>s(new i(e,0,0)),createBaseTokenNode:e=>s(new n(e,0,0)),createBaseNode:e=>s(new t(e,0,0))}),{createNodeArray:E,createNumericLiteral:P,createStringLiteral:N,createLiteralLikeNode:F,createIdentifier:A,createPrivateIdentifier:I,createToken:O,createArrayLiteralExpression:M,createObjectLiteralExpression:L,createPropertyAccessExpression:j,createPropertyAccessChain:R,createElementAccessExpression:B,createElementAccessChain:J,createCallExpression:z,createCallChain:$,createNewExpression:V,createParenthesizedExpression:U,createBlock:K,createVariableStatement:W,createExpressionStatement:H,createIfStatement:G,createWhileStatement:X,createForStatement:Y,createForOfStatement:ee,createVariableDeclaration:te,createVariableDeclarationList:ne}=D,re=!0,ie=!1;function oe(e,t,n=2,r,i=!1){ae(e,t,n,r,6,0),l=w,Ve();const o=Be();let a,s;if(1===ze())a=bt([],o,o),s=gt();else{let e;for(;1!==ze();){let t;switch(ze()){case 23:t=ri();break;case 112:case 97:case 106:t=gt();break;case 41:t=et((()=>9===Ve()&&59!==Ve()))?Ar():oi();break;case 9:case 11:if(et((()=>59!==Ve()))){t=pn();break}default:t=oi()}e&&ot(e)?e.push(t):e?e=[e,t]:(e=t,1!==ze()&&Oe(va.Unexpected_token))}const t=ot(e)?xt(M(e),o):xn.checkDefined(e),n=H(t);xt(n,o),a=bt([n],o),s=ft(1,va.Unexpected_token)}const c=de(e,2,6,!1,a,s,l,_t);i&&_e(c),c.nodeCount=b,c.identifierCount=S,c.identifiers=x,c.parseDiagnostics=oS(g,c),h&&(c.jsDocDiagnostics=oS(h,c));const u=c;return se(),u}function ae(e,s,u,_,h,v){switch(t=Hx.getNodeConstructor(),n=Hx.getTokenConstructor(),r=Hx.getIdentifierConstructor(),i=Hx.getPrivateIdentifierConstructor(),o=Hx.getSourceFileConstructor(),c=Xo(e),d=s,p=u,y=_,f=h,m=bS(h),g=[],k=0,x=new Map,S=0,b=0,l=0,re=!0,f){case 1:case 2:w=524288;break;case 6:w=134742016;break;default:w=0}ie=!1,a.setText(d),a.setOnError(Re),a.setScriptTarget(p),a.setLanguageVariant(m),a.setScriptKind(f),a.setJSDocParsingMode(v)}function se(){a.clearCommentDirectives(),a.setText(""),a.setOnError(void 0),a.setScriptKind(0),a.setJSDocParsingMode(0),d=void 0,p=void 0,y=void 0,f=void 0,m=void 0,l=0,g=void 0,h=void 0,k=0,x=void 0,C=void 0,re=!0}e.parseSourceFile=function(e,t,n,r,i=!1,o,s,p=0){var f;if(6===(o=Ek(e,o))){const o=oe(e,t,n,r,i);return TM(o,null==(f=o.statements[0])?void 0:f.expression,o.parseDiagnostics,!1,void 0),o.referencedFiles=u,o.typeReferenceDirectives=u,o.libReferenceDirectives=u,o.amdDependencies=u,o.hasNoDefaultLib=!1,o.pragmas=_,o}ae(e,t,n,r,o,p);const m=function(e,t,n,r,i){const o=QI(c);o&&(w|=33554432),l=w,Ve();const s=Gt(0,Ci);xn.assert(1===ze());const u=Je(),_=le(gt(),u),p=de(c,e,n,o,s,_,l,r);return ZI(p,d),eO(p,(function(e,t,n){g.push(nS(c,d,e,t,n))})),p.commentDirectives=a.getCommentDirectives(),p.nodeCount=b,p.identifierCount=S,p.identifiers=x,p.parseDiagnostics=oS(g,p),p.jsDocParsingMode=i,h&&(p.jsDocDiagnostics=oS(h,p)),t&&_e(p),p}(n,i,o,s||BI,p);return se(),m},e.parseIsolatedEntityName=function(e,t){ae("",e,t,void 0,1,0),Ve();const n=on(!0),r=1===ze()&&!g.length;return se(),r?n:void 0},e.parseJsonText=oe;let ce=!1;function le(e,t){if(!t)return e;xn.assert(!e.jsDoc);const n=q(vf(e,d),(t=>Do.parseJSDocComment(e,t.pos,t.end-t.pos)));return n.length&&(e.jsDoc=n),ce&&(ce=!1,e.flags|=536870912),e}function _e(e){LT(e,!0)}function de(e,t,n,r,i,o,s,c){let l=D.createSourceFile(i,o,s);if(AT(l,0,d.length),u(l),!r&&qI(l)&&67108864&l.transformFlags){const e=l;l=function(e){const t=y,n=WI.createSyntaxCursor(e);y={currentNode:function(e){const t=n.currentNode(e);return re&&t&&c(t)&&XI(t),t}};const r=[],i=g;g=[];let o=0,s=l(e.statements,0);for(;-1!==s;){const t=e.statements[o],n=e.statements[s];pe(r,e.statements,o,s),o=u(e.statements,s);const c=T(i,(e=>e.start>=t.pos)),_=c>=0?T(i,(e=>e.start>=n.pos),c):-1;c>=0&&pe(g,i,c,_>=0?_:void 0),Ze((()=>{const t=w;for(w|=65536,a.resetTokenState(n.pos),Ve();1!==ze();){const t=a.getTokenFullStart(),n=Xt(0,Ci);if(r.push(n),t===a.getTokenFullStart()&&Ve(),o>=0){const t=e.statements[o];if(n.end===t.pos)break;n.end>t.pos&&(o=u(e.statements,o+1))}}w=t}),2),s=o>=0?l(e.statements,o):-1}if(o>=0){const t=e.statements[o];pe(r,e.statements,o);const n=T(i,(e=>e.start>=t.pos));n>=0&&pe(g,i,n)}return y=t,D.updateSourceFile(e,sI(E(r),e.statements));function c(e){return!(65536&e.flags||!(67108864&e.transformFlags))}function l(e,t){for(let n=t;n118}function rt(){return 80===ze()||(127!==ze()||!Pe())&&(135!==ze()||!Ie())&&ze()>118}function it(e,t,n=!0){return ze()===e?(n&&Ve(),!0):(t?Oe(t):Oe(va._0_expected,Ra(e)),!1)}e.fixupParentReferences=_e;const at=Object.keys(Sa).filter((e=>e.length>2));function st(e){if(ZE(e))return void Le(as(d,e.template.pos),e.template.end,va.Module_declaration_names_may_only_use_or_quoted_strings);const t=qD(e)?bc(e):void 0;if(!t||!Ts(t,p))return void Oe(va._0_expected,Ra(27));const n=as(d,e.pos);switch(t){case"const":case"let":case"var":return void Le(n,e.end,va.Variable_declaration_not_allowed_at_this_location);case"declare":return;case"interface":return void ct(va.Interface_name_cannot_be_0,va.Interface_must_be_given_a_name,19);case"is":return void Le(n,a.getTokenStart(),va.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);case"module":case"namespace":return void ct(va.Namespace_name_cannot_be_0,va.Namespace_must_be_given_a_name,19);case"type":return void ct(va.Type_alias_name_cannot_be_0,va.Type_alias_must_be_given_a_name,64)}const r=Ut(t,at,mt)??function(e){for(const t of at)if(e.length>t.length+2&&an(e,t))return`${t} ${e.slice(t.length)}`}(t);r?Le(n,e.end,va.Unknown_keyword_or_identifier_Did_you_mean_0,r):0!==ze()&&Le(n,e.end,va.Unexpected_keyword_or_identifier)}function ct(e,t,n){ze()===n?Oe(t):Oe(e,a.getTokenValue())}function lt(e){return ze()===e?(Ue(),!0):(xn.assert(Fh(e)),Oe(va._0_expected,Ra(e)),!1)}function ut(e,t,n,r){if(ze()===t)return void Ve();const i=Oe(va._0_expected,Ra(t));n&&i&&fT(i,nS(c,d,r,1,va.The_parser_expected_to_find_a_1_to_match_the_0_token_here,Ra(e),Ra(t)))}function dt(e){return ze()===e&&(Ve(),!0)}function pt(e){if(ze()===e)return gt()}function ft(e,t,n){return pt(e)||St(e,!1,t||va._0_expected,n||Ra(e))}function gt(){const e=Be(),t=ze();return Ve(),xt(O(t),e)}function ht(){return 27===ze()||20===ze()||1===ze()||a.hasPrecedingLineBreak()}function yt(){return!!ht()&&(27===ze()&&Ve(),!0)}function vt(){return yt()||it(27)}function bt(e,t,n,r){const i=E(e,r);return FT(i,t,n??a.getTokenFullStart()),i}function xt(e,t,n){return FT(e,t,n??a.getTokenFullStart()),w&&(e.flags|=w),ie&&(ie=!1,e.flags|=262144),e}function St(e,t,n,...r){t?Me(a.getTokenFullStart(),0,n,...r):n&&Oe(n,...r);const i=Be();return xt(80===e?A("",void 0):zl(e)?D.createTemplateLiteralLikeNode(e,"","",void 0):9===e?P("",void 0):11===e?N("",void 0):282===e?D.createMissingDeclaration():O(e),i)}function kt(e){let t=x.get(e);return void 0===t&&x.set(e,t=e),t}function Tt(e,t,n){if(e){S++;const e=Be(),t=ze(),n=kt(a.getTokenValue()),r=a.hasExtendedUnicodeEscape();return $e(),xt(A(n,t,r),e)}if(81===ze())return Oe(n||va.Private_identifiers_are_not_allowed_outside_class_bodies),Tt(!0);if(0===ze()&&a.tryScan((()=>80===a.reScanInvalidIdentifier())))return Tt(!0);S++;const r=1===ze(),i=a.isReservedWord(),o=a.getTokenText(),s=i?va.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:va.Identifier_expected;return St(80,r,t||s,o)}function Ct(e){return Tt(nt(),void 0,e)}function wt(e,t){return Tt(rt(),e,t)}function Dt(e){return Tt(ba(ze()),e)}function Et(){return(a.hasUnicodeEscape()||a.hasExtendedUnicodeEscape())&&Oe(va.Unicode_escape_sequence_cannot_appear_here),Tt(ba(ze()))}function Pt(){return ba(ze())||11===ze()||9===ze()}function Nt(){return function(e){if(11===ze()||9===ze()){const e=pn();return e.text=kt(e.text),e}return e&&23===ze()?function(){const e=Be();it(23);const t=xe(yr);return it(24),xt(D.createComputedPropertyName(t),e)}():81===ze()?Ft():Dt()}(!0)}function Ft(){const e=Be(),t=I(kt(a.getTokenValue()));return Ve(),xt(t,e)}function At(e){return ze()===e&&tt(Ot)}function It(){return Ve(),!a.hasPrecedingLineBreak()&&jt()}function Ot(){switch(ze()){case 87:return 94===Ve();case 95:return Ve(),90===ze()?et(Rt):156===ze()?et(Lt):Mt();case 90:return Rt();case 126:case 139:case 153:return Ve(),jt();default:return It()}}function Mt(){return 60===ze()||42!==ze()&&130!==ze()&&19!==ze()&&jt()}function Lt(){return Ve(),Mt()}function jt(){return 23===ze()||19===ze()||42===ze()||26===ze()||Pt()}function Rt(){return Ve(),86===ze()||100===ze()||120===ze()||60===ze()||128===ze()&&et(pi)||134===ze()&&et(fi)}function Bt(e,t){if(Qt(e))return!0;switch(e){case 0:case 1:case 3:return!(27===ze()&&t)&&yi();case 2:return 84===ze()||90===ze();case 4:return et(jn);case 5:return et(Ki)||27===ze()&&!t;case 6:return 23===ze()||Pt();case 12:switch(ze()){case 23:case 42:case 26:case 25:return!0;default:return Pt()}case 18:return Pt();case 9:return 23===ze()||26===ze()||Pt();case 24:return ba(ze())||11===ze();case 7:return 19===ze()?et(Jt):t?rt()&&!Vt():gr()&&!Vt();case 8:return Oi();case 10:return 28===ze()||26===ze()||Oi();case 19:return 103===ze()||87===ze()||rt();case 15:switch(ze()){case 28:case 25:return!0}case 11:return 26===ze()||hr();case 16:return wn(!1);case 17:return wn(!0);case 20:case 21:return 28===ze()||tr();case 22:return oo();case 23:return(161!==ze()||!et(Pi))&&ba(ze());case 13:return ba(ze())||19===ze();case 14:case 25:return!0;case 26:return xn.fail("ParsingContext.Count used as a context");default:xn.assertNever(e,"Non-exhaustive case in 'isListElement'.")}}function Jt(){if(xn.assert(19===ze()),20===Ve()){const e=Ve();return 28===e||19===e||96===e||119===e}return!0}function zt(){return Ve(),rt()}function $t(){return Ve(),ba(ze())}function qt(){return Ve(),xa(ze())}function Vt(){return(119===ze()||96===ze())&&et(Kt)}function Kt(){return Ve(),hr()}function Wt(){return Ve(),tr()}function Ht(e){if(1===ze())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return 20===ze();case 3:return 20===ze()||84===ze()||90===ze();case 7:return 19===ze()||96===ze()||119===ze();case 8:return!!ht()||!!Dr(ze())||39===ze();case 19:return 32===ze()||21===ze()||19===ze()||96===ze()||119===ze();case 11:return 22===ze()||27===ze();case 15:case 21:case 10:return 24===ze();case 17:case 16:case 18:return 22===ze()||24===ze();case 20:return 28!==ze();case 22:return 19===ze()||20===ze();case 13:return 32===ze()||44===ze();case 14:return 30===ze()&&et(po);default:return!1}}function Gt(e,t){const n=k;k|=1<=0)}function tn(e){return 6===e?va.An_enum_member_name_must_be_followed_by_a_or:void 0}function nn(){const e=bt([],Be());return e.isMissingList=!0,e}function rn(e,t,n,r){if(it(n)){const n=en(e,t);return it(r),n}return nn()}function on(e,t){const n=Be();let r=e?Dt(t):wt(t);for(;dt(25)&&30!==ze();)r=xt(D.createQualifiedName(r,cn(e,!1,!0)),n);return r}function sn(e,t){return xt(D.createQualifiedName(e,t),e.pos)}function cn(e,t,n){if(a.hasPrecedingLineBreak()&&ba(ze())&&et(di))return St(80,!0,va.Identifier_expected);if(81===ze()){const e=Ft();return t?e:St(80,!0,va.Identifier_expected)}return e?n?Dt():Et():wt()}function ln(e){const t=Be();return xt(D.createTemplateExpression(fn(e),function(e){const t=Be(),n=[];let r;do{r=dn(e),n.push(r)}while(17===r.literal.kind);return bt(n,t)}(e)),t)}function un(){const e=Be();return xt(D.createTemplateLiteralTypeSpan(fr(),_n(!1)),e)}function _n(e){return 20===ze()?(He(e),function(){const e=mn(ze());return xn.assert(17===e.kind||18===e.kind,"Template fragment has wrong token kind"),e}()):ft(18,va._0_expected,Ra(20))}function dn(e){const t=Be();return xt(D.createTemplateSpan(xe(yr),_n(e)),t)}function pn(){return mn(ze())}function fn(e){!e&&26656&a.getTokenFlags()&&He(!1);const t=mn(ze());return xn.assert(16===t.kind,"Template head has wrong token kind"),t}function mn(e){const t=Be(),n=zl(e)?D.createTemplateLiteralLikeNode(e,a.getTokenValue(),function(e){const t=15===e||18===e,n=a.getTokenText();return n.substring(1,n.length-(a.isUnterminated()?0:t?1:2))}(e),7176&a.getTokenFlags()):9===e?P(a.getTokenValue(),a.getNumericLiteralFlags()):11===e?N(a.getTokenValue(),void 0,a.hasExtendedUnicodeEscape()):Rl(e)?F(e,a.getTokenValue()):xn.fail();return a.hasExtendedUnicodeEscape()&&(n.hasExtendedUnicodeEscape=!0),a.isUnterminated()&&(n.isUnterminated=!0),Ve(),xt(n,t)}function gn(){return on(!0,va.Type_expected)}function hn(){if(!a.hasPrecedingLineBreak()&&30===Ge())return rn(20,fr,30,32)}function yn(){const e=Be();return xt(D.createTypeReferenceNode(gn(),hn()),e)}function vn(e){switch(e.kind){case 183:return Nd(e.typeName);case 184:case 185:{const{parameters:t,type:n}=e;return!!t.isMissingList||vn(n)}case 196:return vn(e.type);default:return!1}}function bn(){const e=Be();return Ve(),xt(D.createThisTypeNode(),e)}function Sn(){const e=Be();let t;return 110!==ze()&&105!==ze()||(t=Dt(),it(59)),xt(D.createParameterDeclaration(void 0,void 0,t,void 0,kn(),void 0),e)}function kn(){a.setSkipJsDocLeadingAsterisks(!0);const e=Be();if(dt(144)){const t=D.createJSDocNamepathType(void 0);e:for(;;)switch(ze()){case 20:case 1:case 28:case 5:break e;default:Ue()}return a.setSkipJsDocLeadingAsterisks(!1),xt(t,e)}const t=dt(26);let n=dr();return a.setSkipJsDocLeadingAsterisks(!1),t&&(n=xt(D.createJSDocVariadicType(n),e)),64===ze()?(Ve(),xt(D.createJSDocOptionalType(n),e)):n}function Tn(){const e=Be(),t=Xi(!1,!0),n=wt();let r,i;dt(96)&&(tr()||!hr()?r=fr():i=Ir());const o=dt(64)?fr():void 0,a=D.createTypeParameterDeclaration(t,n,r,o);return a.expression=i,xt(a,e)}function Cn(){if(30===ze())return rn(19,Tn,30,32)}function wn(e){return 26===ze()||Oi()||tu(ze())||60===ze()||tr(!e)}function Dn(e){return En(e)}function En(e,t=!0){const n=Be(),r=Je(),i=e?Ce((()=>Xi(!0))):De((()=>Xi(!0)));if(110===ze()){const e=D.createParameterDeclaration(i,void 0,Tt(!0),void 0,mr(),void 0),t=Se(i);return t&&je(t,va.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),le(xt(e,n),r)}const o=re;re=!1;const a=pt(26);if(!t&&!nt()&&23!==ze()&&19!==ze())return;const s=le(xt(D.createParameterDeclaration(i,a,function(e){const t=Mi(va.Private_identifiers_cannot_be_used_as_parameters);return 0===pd(t)&&!Q(e)&&tu(ze())&&Ve(),t}(i),pt(58),mr(),vr()),n),r);return re=o,s}function Pn(e,t){if(function(e,t){return 39===e?(it(e),!0):!!dt(59)||!(!t||39!==ze())&&(Oe(va._0_expected,Ra(59)),Ve(),!0)}(e,t))return ke(dr)}function Nn(e,t){const n=Pe(),r=Ie();ge(!!(1&e)),ye(!!(2&e));const i=32&e?en(17,Sn):en(16,(()=>t?Dn(r):En(r,!1)));return ge(n),ye(r),i}function Fn(e){if(!it(21))return nn();const t=Nn(e,!0);return it(22),t}function An(){dt(28)||vt()}function In(e){const t=Be(),n=Je();180===e&&it(105);const r=Cn(),i=Fn(4),o=Pn(59,!0);return An(),le(xt(179===e?D.createCallSignature(r,i,o):D.createConstructSignature(r,i,o),t),n)}function On(){return 23===ze()&&et(Mn)}function Mn(){if(Ve(),26===ze()||24===ze())return!0;if(tu(ze())){if(Ve(),rt())return!0}else{if(!rt())return!1;Ve()}return 59===ze()||28===ze()||58===ze()&&(Ve(),59===ze()||28===ze()||24===ze())}function Ln(e,t,n){const r=rn(16,(()=>Dn(!1)),23,24),i=mr();return An(),le(xt(D.createIndexSignature(n,r,i),e),t)}function jn(){if(21===ze()||30===ze()||139===ze()||153===ze())return!0;let e=!1;for(;tu(ze());)e=!0,Ve();return 23===ze()||(Pt()&&(e=!0,Ve()),!!e&&(21===ze()||30===ze()||58===ze()||59===ze()||28===ze()||ht()))}function Rn(){if(21===ze()||30===ze())return In(179);if(105===ze()&&et(Bn))return In(180);const e=Be(),t=Je(),n=Xi(!1);return At(139)?Ui(e,t,n,177,4):At(153)?Ui(e,t,n,178,4):On()?Ln(e,t,n):function(e,t,n){const r=Nt(),i=pt(58);let o;if(21===ze()||30===ze()){const e=Cn(),t=Fn(4),a=Pn(59,!0);o=D.createMethodSignature(n,r,i,e,t,a)}else{const e=mr();o=D.createPropertySignature(n,r,i,e),64===ze()&&(o.initializer=vr())}return An(),le(xt(o,e),t)}(e,t,n)}function Bn(){return Ve(),21===ze()||30===ze()}function Jn(){return 25===Ve()}function zn(){switch(Ve()){case 21:case 30:case 25:return!0}return!1}function $n(){let e;return it(19)?(e=Gt(4,Rn),it(20)):e=nn(),e}function qn(){return Ve(),40===ze()||41===ze()?148===Ve():(148===ze()&&Ve(),23===ze()&&zt()&&103===Ve())}function Vn(){const e=Be();if(dt(26))return xt(D.createRestTypeNode(fr()),e);const t=fr();if(ZN(t)&&t.pos===t.type.pos){const e=D.createOptionalTypeNode(t.type);return sI(e,t),e.flags=t.flags,e}return t}function Un(){return 59===Ve()||58===ze()&&59===Ve()}function Kn(){return 26===ze()?ba(Ve())&&Un():ba(ze())&&Un()}function Wn(){if(et(Kn)){const e=Be(),t=Je(),n=pt(26),r=Dt(),i=pt(58);it(59);const o=Vn();return le(xt(D.createNamedTupleMember(n,r,i,o),e),t)}return Vn()}function Hn(){const e=Be(),t=Je(),n=function(){let e;if(128===ze()){const t=Be();Ve(),e=bt([xt(O(128),t)],t)}return e}(),r=dt(105);xn.assert(!n||r,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");const i=Cn(),o=Fn(4),a=Pn(39,!1);return le(xt(r?D.createConstructorTypeNode(n,i,o,a):D.createFunctionTypeNode(i,o,a),e),t)}function Gn(){const e=gt();return 25===ze()?void 0:e}function Xn(e){const t=Be();e&&Ve();let n=112===ze()||97===ze()||106===ze()?gt():mn(ze());return e&&(n=xt(D.createPrefixUnaryExpression(41,n),t)),xt(D.createLiteralTypeNode(n),t)}function Qn(){return Ve(),102===ze()}function Yn(){l|=4194304;const e=Be(),t=dt(114);it(102),it(21);const n=fr();let r;if(dt(28)){const e=a.getTokenStart();it(19);const t=ze();if(118===t||132===t?Ve():Oe(va._0_expected,Ra(118)),it(59),r=ho(t,!0),!it(20)){const t=we(g);t&&t.code===va._0_expected.code&&fT(t,nS(c,d,e,1,va.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}it(22);const i=dt(25)?gn():void 0,o=hn();return xt(D.createImportTypeNode(n,r,i,o,t),e)}function Zn(){return Ve(),9===ze()||10===ze()}function er(){switch(ze()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return tt(Gn)||yn();case 67:a.reScanAsteriskEqualsToken();case 42:return function(){const e=Be();return Ve(),xt(D.createJSDocAllType(),e)}();case 61:a.reScanQuestionToken();case 58:return function(){const e=Be();return Ve(),28===ze()||20===ze()||22===ze()||32===ze()||64===ze()||52===ze()?xt(D.createJSDocUnknownType(),e):xt(D.createJSDocNullableType(fr(),!1),e)}();case 100:return function(){const e=Be(),t=Je();if(tt(uo)){const n=Fn(36),r=Pn(59,!1);return le(xt(D.createJSDocFunctionType(n,r),e),t)}return xt(D.createTypeReferenceNode(Dt(),void 0),e)}();case 54:return function(){const e=Be();return Ve(),xt(D.createJSDocNonNullableType(er(),!1),e)}();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return Xn();case 41:return et(Zn)?Xn(!0):yn();case 116:return gt();case 110:{const t=bn();return 142!==ze()||a.hasPrecedingLineBreak()?t:(e=t,Ve(),xt(D.createTypePredicateNode(void 0,e,fr()),e.pos))}case 114:return et(Qn)?Yn():function(){const e=Be();it(114);const t=on(!0),n=a.hasPrecedingLineBreak()?void 0:io();return xt(D.createTypeQueryNode(t,n),e)}();case 19:return et(qn)?function(){const e=Be();let t;it(19),148!==ze()&&40!==ze()&&41!==ze()||(t=gt(),148!==t.kind&&it(148)),it(23);const n=function(){const e=Be(),t=Dt();it(103);const n=fr();return xt(D.createTypeParameterDeclaration(void 0,t,n,void 0),e)}(),r=dt(130)?fr():void 0;let i;it(24),58!==ze()&&40!==ze()&&41!==ze()||(i=gt(),58!==i.kind&&it(58));const o=mr();vt();const a=Gt(4,Rn);return it(20),xt(D.createMappedTypeNode(t,n,r,i,o,a),e)}():function(){const e=Be();return xt(D.createTypeLiteralNode($n()),e)}();case 23:return function(){const e=Be();return xt(D.createTupleTypeNode(rn(21,Wn,23,24)),e)}();case 21:return function(){const e=Be();it(21);const t=fr();return it(22),xt(D.createParenthesizedType(t),e)}();case 102:return Yn();case 131:return et(di)?function(){const e=Be(),t=ft(131),n=110===ze()?bn():wt(),r=dt(142)?fr():void 0;return xt(D.createTypePredicateNode(t,n,r),e)}():yn();case 16:return function(){const e=Be();return xt(D.createTemplateLiteralType(fn(!1),function(){const e=Be(),t=[];let n;do{n=un(),t.push(n)}while(17===n.literal.kind);return bt(t,e)}()),e)}();default:return yn()}var e}function tr(e){switch(ze()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!e;case 41:return!e&&et(Zn);case 21:return!e&&et(nr);default:return rt()}}function nr(){return Ve(),22===ze()||wn(!1)||tr()}function rr(){const e=Be();let t=er();for(;!a.hasPrecedingLineBreak();)switch(ze()){case 54:Ve(),t=xt(D.createJSDocNonNullableType(t,!0),e);break;case 58:if(et(Wt))return t;Ve(),t=xt(D.createJSDocNullableType(t,!0),e);break;case 23:if(it(23),tr()){const n=fr();it(24),t=xt(D.createIndexedAccessTypeNode(t,n),e)}else it(24),t=xt(D.createArrayTypeNode(t),e);break;default:return t}return t}function ir(){if(dt(96)){const e=Te(fr);if(Fe()||58!==ze())return e}}function or(){const e=ze();switch(e){case 143:case 158:case 148:return function(e){const t=Be();return it(e),xt(D.createTypeOperatorNode(e,or()),t)}(e);case 140:return function(){const e=Be();return it(140),xt(D.createInferTypeNode(function(){const e=Be(),t=wt(),n=tt(ir);return xt(D.createTypeParameterDeclaration(void 0,t,n),e)}()),e)}()}return ke(rr)}function ar(e){if(ur()){const t=Hn();let n;return n=SE(t)?e?va.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:va.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:e?va.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:va.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,je(t,n),t}}function sr(e,t,n){const r=Be(),i=52===e,o=dt(e);let a=o&&ar(i)||t();if(ze()===e||o){const o=[a];for(;dt(e);)o.push(ar(i)||t());a=xt(n(bt(o,r)),r)}return a}function cr(){return sr(51,or,D.createIntersectionTypeNode)}function lr(){return Ve(),105===ze()}function ur(){return 30===ze()||!(21!==ze()||!et(_r))||105===ze()||128===ze()&&et(lr)}function _r(){if(Ve(),22===ze()||26===ze())return!0;if(function(){if(tu(ze())&&Xi(!1),rt()||110===ze())return Ve(),!0;if(23===ze()||19===ze()){const e=g.length;return Mi(),e===g.length}return!1}()){if(59===ze()||28===ze()||58===ze()||64===ze())return!0;if(22===ze()&&(Ve(),39===ze()))return!0}return!1}function dr(){const e=Be(),t=rt()&&tt(pr),n=fr();return t?xt(D.createTypePredicateNode(void 0,t,n),e):n}function pr(){const e=wt();if(142===ze()&&!a.hasPrecedingLineBreak())return Ve(),e}function fr(){if(81920&w)return ve(81920,fr);if(ur())return Hn();const e=Be(),t=sr(52,cr,D.createUnionTypeNode);if(!Fe()&&!a.hasPrecedingLineBreak()&&dt(96)){const n=Te(fr);it(58);const r=ke(fr);it(59);const i=ke(fr);return xt(D.createConditionalTypeNode(t,n,r,i),e)}return t}function mr(){return dt(59)?fr():void 0}function gr(){switch(ze()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return et(zn);default:return rt()}}function hr(){if(gr())return!0;switch(ze()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return!!Pr()||rt()}}function yr(){const e=Ae();e&&he(!1);const t=Be();let n,r=br(!0);for(;n=pt(28);)r=Nr(r,n,br(!0),t);return e&&he(!0),r}function vr(){return dt(64)?br(!0):void 0}function br(e){if(127===ze()&&(Pe()||et(mi)))return function(){const e=Be();return Ve(),a.hasPrecedingLineBreak()||42!==ze()&&!hr()?xt(D.createYieldExpression(void 0,void 0),e):xt(D.createYieldExpression(pt(42),br(!0)),e)}();const t=function(e){const t=21===ze()||30===ze()||134===ze()?et(Sr):39===ze()?1:0;if(0!==t)return 1===t?Tr(!0,!0):tt((()=>function(e){const t=a.getTokenStart();if(null==C?void 0:C.has(t))return;const n=Tr(!1,e);return n||(C||(C=new Set)).add(t),n}(e)))}(e)||function(e){if(134===ze()&&1===et(kr)){const t=Be(),n=Je(),r=Qi();return xr(t,wr(0),e,n,r)}}(e);if(t)return t;const n=Be(),r=Je(),i=wr(0);return 80===i.kind&&39===ze()?xr(n,i,e,r,void 0):Vu(i)&&db(We())?Nr(i,gt(),br(e),n):function(e,t,n){const r=pt(58);if(!r)return e;let i;return xt(D.createConditionalExpression(e,r,ve(40960,(()=>br(!1))),i=ft(59),Fd(i)?br(n):St(80,!1,va._0_expected,Ra(59))),t)}(i,n,e)}function xr(e,t,n,r,i){xn.assert(39===ze(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>");const o=D.createParameterDeclaration(void 0,void 0,t,void 0,void 0,void 0);xt(o,t.pos);const a=bt([o],o.pos,o.end),s=ft(39),c=Cr(!!i,n);return le(xt(D.createArrowFunction(i,void 0,a,void 0,s,c),e),r)}function Sr(){if(134===ze()){if(Ve(),a.hasPrecedingLineBreak())return 0;if(21!==ze()&&30!==ze())return 0}const e=ze(),t=Ve();if(21===e){if(22===t)switch(Ve()){case 39:case 59:case 19:return 1;default:return 0}if(23===t||19===t)return 2;if(26===t)return 1;if(tu(t)&&134!==t&&et(zt))return 130===Ve()?0:1;if(!rt()&&110!==t)return 0;switch(Ve()){case 59:return 1;case 58:return Ve(),59===ze()||28===ze()||64===ze()||22===ze()?1:0;case 28:case 64:case 22:return 2}return 0}return xn.assert(30===e),rt()||87===ze()?1===m?et((()=>{dt(87);const e=Ve();if(96===e)switch(Ve()){case 64:case 32:case 44:return!1;default:return!0}else if(28===e||64===e)return!0;return!1}))?1:0:2:0}function kr(){if(134===ze()){if(Ve(),a.hasPrecedingLineBreak()||39===ze())return 0;const e=wr(0);if(!a.hasPrecedingLineBreak()&&80===e.kind&&39===ze())return 1}return 0}function Tr(e,t){const n=Be(),r=Je(),i=Qi(),o=Q(i,WD)?2:0,a=Cn();let s;if(it(21)){if(e)s=Nn(o,e);else{const t=Nn(o,e);if(!t)return;s=t}if(!it(22)&&!e)return}else{if(!e)return;s=nn()}const c=59===ze(),l=Pn(59,!1);if(l&&!e&&vn(l))return;let u=l;for(;196===(null==u?void 0:u.kind);)u=u.type;const _=u&&nF(u);if(!e&&39!==ze()&&(_||19!==ze()))return;const d=ze(),p=ft(39),f=39===d||19===d?Cr(Q(i,WD),t):wt();return t||!c||59===ze()?le(xt(D.createArrowFunction(i,a,s,l,p,f),n),r):void 0}function Cr(e,t){if(19===ze())return li(e?2:0);if(27!==ze()&&100!==ze()&&86!==ze()&&yi()&&(19===ze()||100===ze()||86===ze()||60===ze()||!hr()))return li(16|(e?2:0));const n=re;re=!1;const r=e?Ce((()=>br(t))):De((()=>br(t)));return re=n,r}function wr(e){const t=Be();return Er(e,Ir(),t)}function Dr(e){return 103===e||165===e}function Er(e,t,n){for(;;){We();const o=yy(ze());if(!(43===ze()?o>=e:o>e))break;if(103===ze()&&Ne())break;if(130===ze()||152===ze()){if(a.hasPrecedingLineBreak())break;{const e=ze();Ve(),t=152===e?(r=t,i=fr(),xt(D.createSatisfiesExpression(r,i),r.pos)):Fr(t,fr())}}else t=Nr(t,gt(),wr(o),n)}var r,i;return t}function Pr(){return(!Ne()||103!==ze())&&yy(ze())>0}function Nr(e,t,n,r){return xt(D.createBinaryExpression(e,t,n),r)}function Fr(e,t){return xt(D.createAsExpression(e,t),e.pos)}function Ar(){const e=Be();return xt(D.createPrefixUnaryExpression(ze(),qe(Or)),e)}function Ir(){if(function(){switch(ze()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(1!==m)return!1;default:return!0}}()){const e=Be(),t=Mr();return 43===ze()?Er(yy(ze()),t,e):t}const e=ze(),t=Or();if(43===ze()){const n=as(d,t.pos),{end:r}=t;216===t.kind?Le(n,r,va.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(xn.assert(Fh(e)),Le(n,r,va.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,Ra(e)))}return t}function Or(){switch(ze()){case 40:case 41:case 55:case 54:return Ar();case 91:return function(){const e=Be();return xt(D.createDeleteExpression(qe(Or)),e)}();case 114:return function(){const e=Be();return xt(D.createTypeOfExpression(qe(Or)),e)}();case 116:return function(){const e=Be();return xt(D.createVoidExpression(qe(Or)),e)}();case 30:return 1===m?Rr(!0,void 0,void 0,!0):function(){xn.assert(1!==m,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");const e=Be();it(30);const t=fr();it(32);const n=Or();return xt(D.createTypeAssertion(t,n),e)}();case 135:if(135===ze()&&(Ie()||et(mi)))return function(){const e=Be();return xt(D.createAwaitExpression(qe(Or)),e)}();default:return Mr()}}function Mr(){if(46===ze()||47===ze()){const e=Be();return xt(D.createPrefixUnaryExpression(ze(),qe(Lr)),e)}if(1===m&&30===ze()&&et(qt))return Rr(!0);const e=Lr();if(xn.assert(Vu(e)),(46===ze()||47===ze())&&!a.hasPrecedingLineBreak()){const t=ze();return Ve(),xt(D.createPostfixUnaryExpression(e,t),e.pos)}return e}function Lr(){const e=Be();let t;return 102===ze()?et(Bn)?(l|=4194304,t=gt()):et(Jn)?(Ve(),Ve(),t=xt(D.createMetaProperty(102,Dt()),e),l|=8388608):t=jr():t=108===ze()?function(){const e=Be();let t=gt();if(30===ze()){const e=Be(),n=tt(Zr);void 0!==n&&(Le(e,Be(),va.super_may_not_use_type_arguments),Gr()||(t=D.createExpressionWithTypeArguments(t,n)))}return 21===ze()||25===ze()||23===ze()?t:(ft(25,va.super_must_be_followed_by_an_argument_list_or_member_access),xt(j(t,cn(!0,!0,!0)),e))}():jr(),Qr(e,t)}function jr(){return Hr(Be(),ei(),!0)}function Rr(e,t,n,r=!1){const i=Be(),o=function(e){const t=Be();if(it(30),32===ze())return Ye(),xt(D.createJsxOpeningFragment(),t);const n=zr(),r=0==(524288&w)?io():void 0,i=function(){const e=Be();return xt(D.createJsxAttributes(Gt(13,qr)),e)}();let o;return 32===ze()?(Ye(),o=D.createJsxOpeningElement(n,r,i)):(it(44),it(32,void 0,!1)&&(e?Ve():Ye()),o=D.createJsxSelfClosingElement(n,r,i)),xt(o,t)}(e);let a;if(286===o.kind){let t,r=Jr(o);const s=r[r.length-1];if(284===(null==s?void 0:s.kind)&&!sO(s.openingElement.tagName,s.closingElement.tagName)&&sO(o.tagName,s.closingElement.tagName)){const e=s.children.end,n=xt(D.createJsxElement(s.openingElement,s.children,xt(D.createJsxClosingElement(xt(A(""),e,e)),e,e)),s.openingElement.pos,e);r=bt([...r.slice(0,r.length-1),n],r.pos,e),t=s.closingElement}else t=function(e,t){const n=Be();it(31);const r=zr();return it(32,void 0,!1)&&(t||!sO(e.tagName,r)?Ve():Ye()),xt(D.createJsxClosingElement(r),n)}(o,e),sO(o.tagName,t.tagName)||(n&&CN(n)&&sO(t.tagName,n.tagName)?je(o.tagName,va.JSX_element_0_has_no_corresponding_closing_tag,Hd(d,o.tagName)):je(t.tagName,va.Expected_corresponding_JSX_closing_tag_for_0,Hd(d,o.tagName)));a=xt(D.createJsxElement(o,r,t),i)}else 289===o.kind?a=xt(D.createJsxFragment(o,Jr(o),function(e){const t=Be();return it(31),it(32,va.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(e?Ve():Ye()),xt(D.createJsxJsxClosingFragment(),t)}(e)),i):(xn.assert(285===o.kind),a=o);if(!r&&e&&30===ze()){const e=void 0===t?a.pos:t,n=tt((()=>Rr(!0,e)));if(n){const t=St(28,!1);return AT(t,n.pos,0),Le(as(d,e),n.end,va.JSX_expressions_must_have_one_parent_element),xt(D.createBinaryExpression(a,t,n),i)}}return a}function Br(e,t){switch(t){case 1:if(EN(e))je(e,va.JSX_fragment_has_no_corresponding_closing_tag);else{const t=e.tagName;Le(Math.min(as(d,t.pos),t.end),t.end,va.JSX_element_0_has_no_corresponding_closing_tag,Hd(d,e.tagName))}return;case 31:case 7:return;case 12:case 13:return function(){const e=Be(),t=D.createJsxText(a.getTokenValue(),13===v);return v=a.scanJsxToken(),xt(t,e)}();case 19:return $r(!1);case 30:return Rr(!1,void 0,e);default:return xn.assertNever(t)}}function Jr(e){const t=[],n=Be(),r=k;for(k|=16384;;){const n=Br(e,v=a.reScanJsxToken());if(!n)break;if(t.push(n),CN(e)&&284===(null==n?void 0:n.kind)&&!sO(n.openingElement.tagName,n.closingElement.tagName)&&sO(e.tagName,n.closingElement.tagName))break}return k=r,bt(t,n)}function zr(){const e=Be(),t=function(){const e=Be();Qe();const t=110===ze(),n=Et();return dt(59)?(Qe(),xt(D.createJsxNamespacedName(n,Et()),e)):t?xt(D.createToken(110),e):n}();if(ON(t))return t;let n=t;for(;dt(25);)n=xt(j(n,cn(!0,!1,!1)),e);return n}function $r(e){const t=Be();if(!it(19))return;let n,r;return 20!==ze()&&(e||(n=pt(26)),r=yr()),e?it(20):it(20,void 0,!1)&&Ye(),xt(D.createJsxExpression(n,r),t)}function qr(){if(19===ze())return function(){const e=Be();it(19),it(26);const t=yr();return it(20),xt(D.createJsxSpreadAttribute(t),e)}();const e=Be();return xt(D.createJsxAttribute(function(){const e=Be();Qe();const t=Et();return dt(59)?(Qe(),xt(D.createJsxNamespacedName(t,Et()),e)):t}(),function(){if(64===ze()){if(11===(v=a.scanJsxAttributeValue()))return pn();if(19===ze())return $r(!0);if(30===ze())return Rr(!0);Oe(va.or_JSX_element_expected)}}()),e)}function Vr(){return Ve(),ba(ze())||23===ze()||Gr()}function Ur(e){if(64&e.flags)return!0;if(bP(e)){let t=e.expression;for(;bP(t)&&!(64&t.flags);)t=t.expression;if(64&t.flags){for(;bP(e);)e.flags|=64,e=e.expression;return!0}}return!1}function Kr(e,t,n){const r=cn(!0,!0,!0),i=n||Ur(t),o=i?R(t,n,r):j(t,r);return i&&VD(o.name)&&je(o.name,va.An_optional_chain_cannot_contain_private_identifiers),hP(t)&&t.typeArguments&&Le(t.typeArguments.pos-1,as(d,t.typeArguments.end)+1,va.An_instantiation_expression_cannot_be_followed_by_a_property_access),xt(o,e)}function Wr(e,t,n){let r;if(24===ze())r=St(80,!0,va.An_element_access_expression_should_take_an_argument);else{const e=xe(yr);$h(e)&&(e.text=kt(e.text)),r=e}return it(24),xt(n||Ur(t)?J(t,n,r):B(t,r),e)}function Hr(e,t,n){for(;;){let r,i=!1;if(n&&29===ze()&&et(Vr)?(r=ft(29),i=ba(ze())):i=dt(25),i)t=Kr(e,t,r);else if(!r&&Ae()||!dt(23)){if(!Gr()){if(!r){if(54===ze()&&!a.hasPrecedingLineBreak()){Ve(),t=xt(D.createNonNullExpression(t),e);continue}const n=tt(Zr);if(n){t=xt(D.createExpressionWithTypeArguments(t,n),e);continue}}return t}t=r||233!==t.kind?Xr(e,t,r,void 0):Xr(e,t.expression,r,t.typeArguments)}else t=Wr(e,t,r)}}function Gr(){return 15===ze()||16===ze()}function Xr(e,t,n,r){const i=D.createTaggedTemplateExpression(t,r,15===ze()?(He(!0),pn()):ln(!0));return(n||64&t.flags)&&(i.flags|=64),i.questionDotToken=n,xt(i,e)}function Qr(e,t){for(;;){let n;t=Hr(e,t,!0);const r=pt(29);if(r&&(n=tt(Zr),Gr()))t=Xr(e,t,r,n);else{if(!n&&21!==ze()){if(r){const n=St(80,!1,va.Identifier_expected);t=xt(R(t,r,n),e)}break}{r||233!==t.kind||(n=t.typeArguments,t=t.expression);const i=Yr();t=xt(r||Ur(t)?$(t,r,n,i):z(t,n,i),e)}}}return t}function Yr(){it(21);const e=en(11,ni);return it(22),e}function Zr(){if(0!=(524288&w))return;if(30!==Ge())return;Ve();const e=en(20,fr);return 32===We()?(Ve(),e&&function(){switch(ze()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return a.hasPrecedingLineBreak()||Pr()||!hr()}()?e:void 0):void 0}function ei(){switch(ze()){case 15:26656&a.getTokenFlags()&&He(!1);case 9:case 10:case 11:return pn();case 110:case 108:case 106:case 112:case 97:return gt();case 21:return function(){const e=Be(),t=Je();it(21);const n=xe(yr);return it(22),le(xt(U(n),e),t)}();case 23:return ri();case 19:return oi();case 134:if(!et(fi))break;return ai();case 60:return function(){const e=Be(),t=Je(),n=Xi(!0);if(86===ze())return eo(e,t,n,231);const r=St(282,!0,va.Expression_expected);return PT(r,e),r.modifiers=n,r}();case 86:return eo(Be(),Je(),void 0,231);case 100:return ai();case 105:return function(){const e=Be();if(it(105),dt(25)){const t=Dt();return xt(D.createMetaProperty(105,t),e)}let t,n=Hr(Be(),ei(),!1);233===n.kind&&(t=n.typeArguments,n=n.expression),29===ze()&&Oe(va.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,Hd(d,n));const r=21===ze()?Yr():void 0;return xt(V(n,t,r),e)}();case 44:case 69:if(14===(v=a.reScanSlashToken()))return pn();break;case 16:return ln(!1);case 81:return Ft()}return wt(va.Expression_expected)}function ti(){return 26===ze()?function(){const e=Be();it(26);const t=br(!0);return xt(D.createSpreadElement(t),e)}():28===ze()?xt(D.createOmittedExpression(),Be()):br(!0)}function ni(){return ve(40960,ti)}function ri(){const e=Be(),t=a.getTokenStart(),n=it(23),r=a.hasPrecedingLineBreak(),i=en(15,ti);return ut(23,24,n,t),xt(M(i,r),e)}function ii(){const e=Be(),t=Je();if(pt(26)){const n=br(!0);return le(xt(D.createSpreadAssignment(n),e),t)}const n=Xi(!0);if(At(139))return Ui(e,t,n,177,0);if(At(153))return Ui(e,t,n,178,0);const r=pt(42),i=rt(),o=Nt(),a=pt(58),s=pt(54);if(r||21===ze()||30===ze())return $i(e,t,n,r,o,a,s);let c;if(i&&59!==ze()){const e=pt(64),t=e?xe((()=>br(!0))):void 0;c=D.createShorthandPropertyAssignment(o,t),c.equalsToken=e}else{it(59);const e=xe((()=>br(!0)));c=D.createPropertyAssignment(o,e)}return c.modifiers=n,c.questionToken=a,c.exclamationToken=s,le(xt(c,e),t)}function oi(){const e=Be(),t=a.getTokenStart(),n=it(19),r=a.hasPrecedingLineBreak(),i=en(12,ii,!0);return ut(19,20,n,t),xt(L(i,r),e)}function ai(){const e=Ae();he(!1);const t=Be(),n=Je(),r=Xi(!1);it(100);const i=pt(42),o=i?1:0,a=Q(r,WD)?2:0,s=o&&a?be(81920,si):o?be(16384,si):a?Ce(si):si();const c=Cn(),l=Fn(o|a),u=Pn(59,!1),_=li(o|a);return he(e),le(xt(D.createFunctionExpression(r,i,s,c,l,u,_),t),n)}function si(){return nt()?Ct():void 0}function ci(e,t){const n=Be(),r=Je(),i=a.getTokenStart(),o=it(19,t);if(o||e){const e=a.hasPrecedingLineBreak(),t=Gt(1,Ci);ut(19,20,o,i);const s=le(xt(K(t,e),n),r);return 64===ze()&&(Oe(va.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),Ve()),s}{const e=nn();return le(xt(K(e,void 0),n),r)}}function li(e,t){const n=Pe();ge(!!(1&e));const r=Ie();ye(!!(2&e));const i=re;re=!1;const o=Ae();o&&he(!1);const a=ci(!!(16&e),t);return o&&he(!0),re=i,ge(n),ye(r),a}function ui(e){const t=Be(),n=Je();it(252===e?83:88);const r=ht()?void 0:wt();return vt(),le(xt(252===e?D.createBreakStatement(r):D.createContinueStatement(r),t),n)}function _i(){return 84===ze()?function(){const e=Be(),t=Je();it(84);const n=xe(yr);it(59);const r=Gt(3,Ci);return le(xt(D.createCaseClause(n,r),e),t)}():function(){const e=Be();it(90),it(59);const t=Gt(3,Ci);return xt(D.createDefaultClause(t),e)}()}function di(){return Ve(),ba(ze())&&!a.hasPrecedingLineBreak()}function pi(){return Ve(),86===ze()&&!a.hasPrecedingLineBreak()}function fi(){return Ve(),100===ze()&&!a.hasPrecedingLineBreak()}function mi(){return Ve(),(ba(ze())||9===ze()||10===ze()||11===ze())&&!a.hasPrecedingLineBreak()}function gi(){for(;;)switch(ze()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Si();case 135:return Ti();case 120:case 156:return Ve(),!a.hasPrecedingLineBreak()&&rt();case 144:case 145:return Ve(),!a.hasPrecedingLineBreak()&&(rt()||11===ze());case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:const e=ze();if(Ve(),a.hasPrecedingLineBreak())return!1;if(138===e&&156===ze())return!0;continue;case 162:return Ve(),19===ze()||80===ze()||95===ze();case 102:return Ve(),11===ze()||42===ze()||19===ze()||ba(ze());case 95:let t=Ve();if(156===t&&(t=et(Ve)),64===t||42===t||19===t||90===t||130===t||60===t)return!0;continue;case 126:Ve();continue;default:return!1}}function hi(){return et(gi)}function yi(){switch(ze()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 102:return hi()||et(zn);case 87:case 95:return hi();case 129:case 125:case 123:case 124:case 126:case 148:return hi()||!et(di);default:return hr()}}function vi(){return Ve(),nt()||19===ze()||23===ze()}function bi(){return xi(!0)}function xi(e){return Ve(),(!e||165!==ze())&&(nt()||19===ze())&&!a.hasPrecedingLineBreak()}function Si(){return et(xi)}function ki(e){return 160===Ve()&&xi(e)}function Ti(){return et(ki)}function Ci(){switch(ze()){case 27:return function(){const e=Be(),t=Je();return it(27),le(xt(D.createEmptyStatement(),e),t)}();case 19:return ci(!1);case 115:return Ji(Be(),Je(),void 0);case 121:if(et(vi))return Ji(Be(),Je(),void 0);break;case 135:if(Ti())return Ji(Be(),Je(),void 0);break;case 160:if(Si())return Ji(Be(),Je(),void 0);break;case 100:return zi(Be(),Je(),void 0);case 86:return Zi(Be(),Je(),void 0);case 101:return function(){const e=Be(),t=Je();it(101);const n=a.getTokenStart(),r=it(21),i=xe(yr);ut(21,22,r,n);const o=Ci(),s=dt(93)?Ci():void 0;return le(xt(G(i,o,s),e),t)}();case 92:return function(){const e=Be(),t=Je();it(92);const n=Ci();it(117);const r=a.getTokenStart(),i=it(21),o=xe(yr);return ut(21,22,i,r),dt(27),le(xt(D.createDoStatement(n,o),e),t)}();case 117:return function(){const e=Be(),t=Je();it(117);const n=a.getTokenStart(),r=it(21),i=xe(yr);ut(21,22,r,n);const o=Ci();return le(xt(X(i,o),e),t)}();case 99:return function(){const e=Be(),t=Je();it(99);const n=pt(135);let r,i;if(it(21),27!==ze()&&(r=115===ze()||121===ze()||87===ze()||160===ze()&&et(bi)||135===ze()&&et(ki)?Ri(!0):be(8192,yr)),n?it(165):dt(165)){const e=xe((()=>br(!0)));it(22),i=ee(n,r,e,Ci())}else if(dt(103)){const e=xe(yr);it(22),i=D.createForInStatement(r,e,Ci())}else{it(27);const e=27!==ze()&&22!==ze()?xe(yr):void 0;it(27);const t=22!==ze()?xe(yr):void 0;it(22),i=Y(r,e,t,Ci())}return le(xt(i,e),t)}();case 88:return ui(251);case 83:return ui(252);case 107:return function(){const e=Be(),t=Je();it(107);const n=ht()?void 0:xe(yr);return vt(),le(xt(D.createReturnStatement(n),e),t)}();case 118:return function(){const e=Be(),t=Je();it(118);const n=a.getTokenStart(),r=it(21),i=xe(yr);ut(21,22,r,n);const o=be(67108864,Ci);return le(xt(D.createWithStatement(i,o),e),t)}();case 109:return function(){const e=Be(),t=Je();it(109),it(21);const n=xe(yr);it(22);const r=function(){const e=Be();it(19);const t=Gt(2,_i);return it(20),xt(D.createCaseBlock(t),e)}();return le(xt(D.createSwitchStatement(n,r),e),t)}();case 111:return function(){const e=Be(),t=Je();it(111);let n=a.hasPrecedingLineBreak()?void 0:xe(yr);return void 0===n&&(S++,n=xt(A(""),Be())),yt()||st(n),le(xt(D.createThrowStatement(n),e),t)}();case 113:case 85:case 98:return function(){const e=Be(),t=Je();it(113);const n=ci(!1),r=85===ze()?function(){const e=Be();let t;it(85),dt(21)?(t=ji(),it(22)):t=void 0;const n=ci(!1);return xt(D.createCatchClause(t,n),e)}():void 0;let i;return r&&98!==ze()||(it(98,va.catch_or_finally_expected),i=ci(!1)),le(xt(D.createTryStatement(n,r,i),e),t)}();case 89:return function(){const e=Be(),t=Je();return it(89),vt(),le(xt(D.createDebuggerStatement(),e),t)}();case 60:return Di();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(hi())return Di()}return function(){const e=Be();let t,n=Je();const r=21===ze(),i=xe(yr);return qD(i)&&dt(59)?t=D.createLabeledStatement(i,Ci()):(yt()||st(i),t=H(i),r&&(n=!1)),le(xt(t,e),n)}()}function wi(e){return 138===e.kind}function Di(){const e=Be(),t=Je(),n=Xi(!0);if(Q(n,wi)){const r=function(e){return be(33554432,(()=>{const t=Qt(k,e);if(t)return Yt(t)}))}(e);if(r)return r;for(const e of n)e.flags|=33554432;return be(33554432,(()=>Ei(e,t,n)))}return Ei(e,t,n)}function Ei(e,t,n){switch(ze()){case 115:case 121:case 87:case 160:case 135:return Ji(e,t,n);case 100:return zi(e,t,n);case 86:return Zi(e,t,n);case 120:return function(e,t,n){it(120);const r=wt(),i=Cn(),o=to(),a=$n();return le(xt(D.createInterfaceDeclaration(n,r,i,o,a),e),t)}(e,t,n);case 156:return function(e,t,n){it(156),a.hasPrecedingLineBreak()&&Oe(va.Line_break_not_permitted_here);const r=wt(),i=Cn();it(64);const o=141===ze()&&tt(Gn)||fr();return vt(),le(xt(D.createTypeAliasDeclaration(n,r,i,o),e),t)}(e,t,n);case 94:return function(e,t,n){it(94);const r=wt();let i;return it(19)?(i=ve(81920,(()=>en(6,ao))),it(20)):i=nn(),le(xt(D.createEnumDeclaration(n,r,i),e),t)}(e,t,n);case 162:case 144:case 145:return function(e,t,n){let r=0;if(162===ze())return lo(e,t,n);if(dt(145))r|=32;else if(it(144),11===ze())return lo(e,t,n);return co(e,t,n,r)}(e,t,n);case 102:return function(e,t,n){it(102);const r=a.getTokenFullStart();let i;rt()&&(i=wt());let o=!1;if("type"===(null==i?void 0:i.escapedText)&&(161!==ze()||rt()&&et(Ni))&&(rt()||42===ze()||19===ze())&&(o=!0,i=rt()?wt():void 0),i&&28!==ze()&&161!==ze())return function(e,t,n,r,i){it(64);const o=149===ze()&&et(uo)?function(){const e=Be();it(149),it(21);const t=yo();return it(22),xt(D.createExternalModuleReference(t),e)}():on(!1);vt();return le(xt(D.createImportEqualsDeclaration(n,i,r,o),e),t)}(e,t,n,i,o);const s=fo(i,r,o),c=yo(),l=mo();return vt(),le(xt(D.createImportDeclaration(n,s,c,l),e),t)}(e,t,n);case 95:switch(Ve(),ze()){case 90:case 64:return function(e,t,n){const r=Ie();let i;ye(!0),dt(64)?i=!0:it(90);const o=br(!0);return vt(),ye(r),le(xt(D.createExportAssignment(n,i,o),e),t)}(e,t,n);case 130:return function(e,t,n){it(130),it(145);const r=wt();vt();const i=D.createNamespaceExportDeclaration(r);return i.modifiers=n,le(xt(i,e),t)}(e,t,n);default:return function(e,t,n){const r=Ie();let i,o,s;ye(!0);const c=dt(156),l=Be();dt(42)?(dt(130)&&(i=function(e){return xt(D.createNamespaceExport(Dt()),e)}(l)),it(161),o=yo()):(i=vo(279),(161===ze()||11===ze()&&!a.hasPrecedingLineBreak())&&(it(161),o=yo()));const u=ze();return!o||118!==u&&132!==u||a.hasPrecedingLineBreak()||(s=ho(u)),vt(),ye(r),le(xt(D.createExportDeclaration(n,c,i,o,s),e),t)}(e,t,n)}default:if(n){const t=St(282,!0,va.Declaration_expected);return PT(t,e),t.modifiers=n,t}return}}function Pi(){return 11===Ve()}function Ni(){return Ve(),161===ze()||64===ze()}function Fi(e,t){if(19!==ze()){if(4&e)return void An();if(ht())return void vt()}return li(e,t)}function Ai(){const e=Be();if(28===ze())return xt(D.createOmittedExpression(),e);const t=pt(26),n=Mi(),r=vr();return xt(D.createBindingElement(t,void 0,n,r),e)}function Ii(){const e=Be(),t=pt(26),n=nt();let r,i=Nt();n&&59!==ze()?(r=i,i=void 0):(it(59),r=Mi());const o=vr();return xt(D.createBindingElement(t,i,r,o),e)}function Oi(){return 19===ze()||23===ze()||81===ze()||nt()}function Mi(e){return 23===ze()?function(){const e=Be();it(23);const t=xe((()=>en(10,Ai)));return it(24),xt(D.createArrayBindingPattern(t),e)}():19===ze()?function(){const e=Be();it(19);const t=xe((()=>en(9,Ii)));return it(20),xt(D.createObjectBindingPattern(t),e)}():Ct(e)}function Li(){return ji(!0)}function ji(e){const t=Be(),n=Je(),r=Mi(va.Private_identifiers_are_not_allowed_in_variable_declarations);let i;e&&80===r.kind&&54===ze()&&!a.hasPrecedingLineBreak()&&(i=gt());const o=mr(),s=Dr(ze())?void 0:vr();return le(xt(te(r,i,o,s),t),n)}function Ri(e){const t=Be();let n,r=0;switch(ze()){case 115:break;case 121:r|=1;break;case 87:r|=2;break;case 160:r|=4;break;case 135:xn.assert(Ti()),r|=6,Ve();break;default:xn.fail()}if(Ve(),165===ze()&&et(Bi))n=nn();else{const t=Ne();me(e),n=en(8,e?ji:Li),me(t)}return xt(ne(n,r),t)}function Bi(){return zt()&&22===Ve()}function Ji(e,t,n){const r=Ri(!1);return vt(),le(xt(W(n,r),e),t)}function zi(e,t,n){const r=Ie(),i=ib(n);it(100);const o=pt(42),a=2048&i?si():Ct(),s=o?1:0,c=1024&i?2:0,l=Cn();32&i&&ye(!0);const u=Fn(s|c),_=Pn(59,!1),d=Fi(s|c,va.or_expected);return ye(r),le(xt(D.createFunctionDeclaration(n,o,a,l,u,_,d),e),t)}function $i(e,t,n,r,i,o,a,s){const c=r?1:0,l=Q(n,WD)?2:0,u=Cn(),_=Fn(c|l),d=Pn(59,!1),p=Fi(c|l,s),f=D.createMethodDeclaration(n,r,i,o,u,_,d,p);return f.exclamationToken=a,le(xt(f,e),t)}function qi(e,t,n,r,i){const o=i||a.hasPrecedingLineBreak()?void 0:pt(54),s=mr(),c=ve(90112,vr);return function(e,t,n){if(60!==ze()||a.hasPrecedingLineBreak())return 21===ze()?(Oe(va.Cannot_start_a_function_call_in_a_type_annotation),void Ve()):void(!t||ht()?yt()||(n?Oe(va._0_expected,Ra(27)):st(e)):n?Oe(va._0_expected,Ra(27)):Oe(va.Expected_for_property_initializer));Oe(va.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations)}(r,s,c),le(xt(D.createPropertyDeclaration(n,r,i||o,s,c),e),t)}function Vi(e,t,n){const r=pt(42),i=Nt(),o=pt(58);return r||21===ze()||30===ze()?$i(e,t,n,r,i,o,void 0,va.or_expected):qi(e,t,n,i,o)}function Ui(e,t,n,r,i){const o=Nt(),a=Cn(),s=Fn(0),c=Pn(59,!1),l=Fi(i),u=177===r?D.createGetAccessorDeclaration(n,o,s,c,l):D.createSetAccessorDeclaration(n,o,s,l);return u.typeParameters=a,gE(u)&&(u.type=c),le(xt(u,e),t)}function Ki(){let e;if(60===ze())return!0;for(;tu(ze());){if(e=ze(),ru(e))return!0;Ve()}if(42===ze())return!0;if(Pt()&&(e=ze(),Ve()),23===ze())return!0;if(void 0!==e){if(!Ph(e)||153===e||139===e)return!0;switch(ze()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return ht()}}return!1}function Wi(){if(Ie()&&135===ze()){const e=Be(),t=wt(va.Expression_expected);return Ve(),Qr(e,Hr(e,t,!0))}return Lr()}function Hi(){const e=Be();if(!dt(60))return;const t=be(32768,Wi);return xt(D.createDecorator(t),e)}function Gi(e,t,n){const r=Be(),i=ze();if(87===ze()&&t){if(!tt(It))return}else{if(n&&126===ze()&&et(_o))return;if(e&&126===ze())return;if(!tu(ze())||!tt(Ot))return}return xt(O(i),r)}function Xi(e,t,n){const r=Be();let i,o,a,s=!1,c=!1,l=!1;if(e&&60===ze())for(;o=Hi();)i=ue(i,o);for(;a=Gi(s,t,n);)126===a.kind&&(s=!0),i=ue(i,a),c=!0;if(c&&e&&60===ze())for(;o=Hi();)i=ue(i,o),l=!0;if(l)for(;a=Gi(s,t,n);)126===a.kind&&(s=!0),i=ue(i,a);return i&&bt(i,r)}function Qi(){let e;if(134===ze()){const t=Be();Ve(),e=bt([xt(O(134),t)],t)}return e}function Yi(){const e=Be(),t=Je();if(27===ze())return Ve(),le(xt(D.createSemicolonClassElement(),e),t);const n=Xi(!0,!0,!0);if(126===ze()&&et(_o))return function(e,t,n){ft(126);const r=function(){const e=Pe(),t=Ie();ge(!1),ye(!0);const n=ci(!1);return ge(e),ye(t),n}(),i=le(xt(D.createClassStaticBlockDeclaration(r),e),t);return i.modifiers=n,i}(e,t,n);if(At(139))return Ui(e,t,n,177,0);if(At(153))return Ui(e,t,n,178,0);if(137===ze()||11===ze()){const r=function(e,t,n){return tt((()=>{if(137===ze()?it(137):11===ze()&&21===et(Ve)?tt((()=>{const e=pn();return"constructor"===e.text?e:void 0})):void 0){const r=Cn(),i=Fn(0),o=Pn(59,!1),a=Fi(0,va.or_expected),s=D.createConstructorDeclaration(n,i,a);return s.typeParameters=r,s.type=o,le(xt(s,e),t)}}))}(e,t,n);if(r)return r}if(On())return Ln(e,t,n);if(ba(ze())||11===ze()||9===ze()||42===ze()||23===ze()){if(Q(n,wi)){for(const e of n)e.flags|=33554432;return be(33554432,(()=>Vi(e,t,n)))}return Vi(e,t,n)}if(n){const r=St(80,!0,va.Declaration_expected);return qi(e,t,n,r,void 0)}return xn.fail("Should not have attempted to parse class member declaration.")}function Zi(e,t,n){return eo(e,t,n,263)}function eo(e,t,n,r){const i=Ie();it(86);const o=!nt()||119===ze()&&et($t)?void 0:Tt(nt()),a=Cn();Q(n,UD)&&ye(!0);const s=to();let c;return it(19)?(c=Gt(5,Yi),it(20)):c=nn(),ye(i),le(xt(263===r?D.createClassDeclaration(n,o,a,s,c):D.createClassExpression(n,o,a,s,c),e),t)}function to(){if(oo())return Gt(22,no)}function no(){const e=Be(),t=ze();xn.assert(96===t||119===t),Ve();const n=en(7,ro);return xt(D.createHeritageClause(t,n),e)}function ro(){const e=Be(),t=Lr();if(233===t.kind)return t;const n=io();return xt(D.createExpressionWithTypeArguments(t,n),e)}function io(){return 30===ze()?rn(20,fr,30,32):void 0}function oo(){return 96===ze()||119===ze()}function ao(){const e=Be(),t=Je(),n=Nt(),r=xe(vr);return le(xt(D.createEnumMember(n,r),e),t)}function so(){const e=Be();let t;return it(19)?(t=Gt(1,Ci),it(20)):t=nn(),xt(D.createModuleBlock(t),e)}function co(e,t,n,r){const i=32&r,o=8&r?Dt():wt(),a=dt(25)?co(Be(),!1,void 0,8|i):so();return le(xt(D.createModuleDeclaration(n,o,a,r),e),t)}function lo(e,t,n){let r,i,o=0;return 162===ze()?(r=wt(),o|=2048):(r=pn(),r.text=kt(r.text)),19===ze()?i=so():vt(),le(xt(D.createModuleDeclaration(n,r,i,o),e),t)}function uo(){return 21===Ve()}function _o(){return 19===Ve()}function po(){return 44===Ve()}function fo(e,t,n,r=!1){let i;return(e||42===ze()||19===ze())&&(i=function(e,t,n,r){let i;return e&&!dt(28)||(r&&a.setSkipJsDocLeadingAsterisks(!0),i=42===ze()?function(){const e=Be();it(42),it(130);const t=wt();return xt(D.createNamespaceImport(t),e)}():vo(275),r&&a.setSkipJsDocLeadingAsterisks(!1)),xt(D.createImportClause(n,e,i),t)}(e,t,n,r),it(161)),i}function mo(){const e=ze();if((118===e||132===e)&&!a.hasPrecedingLineBreak())return ho(e)}function go(){const e=Be(),t=ba(ze())?Dt():mn(11);it(59);const n=br(!0);return xt(D.createImportAttribute(t,n),e)}function ho(e,t){const n=Be();t||it(e);const r=a.getTokenStart();if(it(19)){const t=a.hasPrecedingLineBreak(),i=en(24,go,!0);if(!it(20)){const e=we(g);e&&e.code===va._0_expected.code&&fT(e,nS(c,d,r,1,va.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return xt(D.createImportAttributes(i,t,e),n)}{const t=bt([],Be(),void 0,!1);return xt(D.createImportAttributes(t,!1,e),n)}}function yo(){if(11===ze()){const e=pn();return e.text=kt(e.text),e}return yr()}function vo(e){const t=Be();return xt(275===e?D.createNamedImports(rn(23,xo,19,20)):D.createNamedExports(rn(23,bo,19,20)),t)}function bo(){const e=Je();return le(So(281),e)}function xo(){return So(276)}function So(e){const t=Be();let n,r=Ph(ze())&&!rt(),i=a.getTokenStart(),o=a.getTokenEnd(),s=!1,c=!0,l=Dt();if("type"===l.escapedText)if(130===ze()){const e=Dt();if(130===ze()){const t=Dt();ba(ze())?(s=!0,n=e,l=u(),c=!1):(n=l,l=t,c=!1)}else ba(ze())?(n=l,c=!1,l=u()):(s=!0,l=e)}else ba(ze())&&(s=!0,l=u());return c&&130===ze()&&(n=l,it(130),l=u()),276===e&&r&&Le(i,o,va.Identifier_expected),xt(276===e?D.createImportSpecifier(s,n,l):D.createExportSpecifier(s,n,l),t);function u(){return r=Ph(ze())&&!rt(),i=a.getTokenStart(),o=a.getTokenEnd(),Dt()}}let ko;var To;let Co;var wo;let Do;(To=ko||(ko={}))[To.SourceElements=0]="SourceElements",To[To.BlockStatements=1]="BlockStatements",To[To.SwitchClauses=2]="SwitchClauses",To[To.SwitchClauseStatements=3]="SwitchClauseStatements",To[To.TypeMembers=4]="TypeMembers",To[To.ClassMembers=5]="ClassMembers",To[To.EnumMembers=6]="EnumMembers",To[To.HeritageClauseElement=7]="HeritageClauseElement",To[To.VariableDeclarations=8]="VariableDeclarations",To[To.ObjectBindingElements=9]="ObjectBindingElements",To[To.ArrayBindingElements=10]="ArrayBindingElements",To[To.ArgumentExpressions=11]="ArgumentExpressions",To[To.ObjectLiteralMembers=12]="ObjectLiteralMembers",To[To.JsxAttributes=13]="JsxAttributes",To[To.JsxChildren=14]="JsxChildren",To[To.ArrayLiteralMembers=15]="ArrayLiteralMembers",To[To.Parameters=16]="Parameters",To[To.JSDocParameters=17]="JSDocParameters",To[To.RestProperties=18]="RestProperties",To[To.TypeParameters=19]="TypeParameters",To[To.TypeArguments=20]="TypeArguments",To[To.TupleElementTypes=21]="TupleElementTypes",To[To.HeritageClauses=22]="HeritageClauses",To[To.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",To[To.ImportAttributes=24]="ImportAttributes",To[To.JSDocComment=25]="JSDocComment",To[To.Count=26]="Count",(wo=Co||(Co={}))[wo.False=0]="False",wo[wo.True=1]="True",wo[wo.Unknown=2]="Unknown",(e=>{function t(e){const t=Be(),n=(e?dt:it)(19),r=be(16777216,kn);e&&!n||lt(20);const i=D.createJSDocTypeExpression(r);return _e(i),xt(i,t)}function n(){const e=Be(),t=dt(19),n=Be();let r=on(!1);for(;81===ze();)Xe(),Ue(),r=xt(D.createJSDocMemberName(r,wt()),n);t&<(20);const i=D.createJSDocNameReference(r);return _e(i),xt(i,e)}let r;var i;let o;var s;function l(e=0,r){const i=d,o=void 0===r?i.length:e+r;if(r=o-e,xn.assert(e>=0),xn.assert(e<=o),xn.assert(o<=i.length),!fI(i,e))return;let s,l,u,_,p,f=[];const m=[],g=k;k|=1<<25;const h=a.scanRange(e+3,r-5,(function(){let t,n=1,r=e-(i.lastIndexOf("\n",e)+1)+4;function c(e){t||(t=r),f.push(e),r+=e.length}for(Ue();Y(5););Y(4)&&(n=0,r=0);e:for(;;){switch(ze()){case 60:v(f),p||(p=Be()),(d=C(r))&&(s?s.push(d):(s=[d],l=d.pos),u=d.end),n=0,t=void 0;break;case 4:f.push(a.getTokenText()),n=0,r=0;break;case 42:const i=a.getTokenText();1===n?(n=2,c(i)):(xn.assert(0===n),n=1,r+=i.length);break;case 5:xn.assert(2!==n,"whitespace shouldn't come from the scanner while saving top-level comment text");const o=a.getTokenText();void 0!==t&&r+o.length>t&&f.push(o.slice(t-r)),r+=o.length;break;case 1:break e;case 82:n=2,c(a.getTokenValue());break;case 19:n=2;const g=a.getTokenFullStart(),h=P(a.getTokenEnd()-1);if(h){_||y(f),m.push(xt(D.createJSDocText(f.join("")),_??e,g)),m.push(h),f=[],_=a.getTokenEnd();break}default:n=2,c(a.getTokenText())}2===n?Ke(!1):Ue()}var d;const g=f.join("").trimEnd();m.length&&g.length&&m.push(xt(D.createJSDocText(g),_??e,p)),m.length&&s&&xn.assertIsDefined(p,"having parsed tags implies that the end of the comment span should be set");const h=s&&bt(s,l,u);return xt(D.createJSDocComment(m.length?bt(m,e,p):g.length?g:void 0,h),e,o)}));return k=g,h;function y(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function v(e){for(;e.length;){const t=e[e.length-1].trimEnd();if(""!==t){if(t.lengthK(n))))&&345!==t.kind;)if(s=!0,344===t.kind){if(r){const e=Oe(va.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);e&&fT(e,nS(c,d,0,0,va.The_tag_was_first_specified_here));break}r=t}else o=ue(o,t);if(s){const t=i&&188===i.type.kind,n=D.createJSDocTypeLiteral(o,t);i=r&&r.typeExpression&&!L(r.typeExpression.type)?r.typeExpression:xt(n,e),a=i.end}}return a=a||void 0!==s?Be():(o??i??t).end,s||(s=w(e,a,n,r)),xt(D.createJSDocTypedefTag(t,i,o,s),e,a)}(r,i,e,o);break;case"callback":l=function(e,t,n,r){const i=q();x();let o=E(n);const a=V(e,n);o||(o=w(e,Be(),n,r));const s=void 0!==o?Be():a.end;return xt(D.createJSDocCallbackTag(t,a,i,o),e,s)}(r,i,e,o);break;case"overload":l=function(e,t,n,r){x();let i=E(n);const o=V(e,n);i||(i=w(e,Be(),n,r));const a=void 0!==i?Be():o.end;return xt(D.createJSDocOverloadTag(t,o,i),e,a)}(r,i,e,o);break;case"satisfies":l=function(e,n,r,i){const o=t(!1),a=void 0!==r&&void 0!==i?w(e,Be(),r,i):void 0;return xt(D.createJSDocSatisfiesTag(n,o,a),e)}(r,i,e,o);break;case"see":l=function(e,t,r,i){const o=23===ze()||et((()=>60===Ue()&&ba(Ue())&&F(a.getTokenValue())))?void 0:n(),s=void 0!==r&&void 0!==i?w(e,Be(),r,i):void 0;return xt(D.createJSDocSeeTag(t,o,s),e)}(r,i,e,o);break;case"exception":case"throws":l=function(e,t,n,r){const i=I(),o=w(e,Be(),n,r);return xt(D.createJSDocThrowsTag(t,i,o),e)}(r,i,e,o);break;case"import":l=function(e,t,n,r){const i=a.getTokenFullStart();let o;rt()&&(o=wt());const s=fo(o,i,!0,!0),c=yo(),l=mo(),u=void 0!==n&&void 0!==r?w(e,Be(),n,r):void 0;return xt(D.createJSDocImportTag(t,s,c,l,u),e)}(r,i,e,o);break;default:l=function(e,t,n,r){return xt(D.createJSDocUnknownTag(t,w(e,Be(),n,r)),e)}(r,i,e,o)}return l}function w(e,t,n,r){return r||(n+=t-e),E(n,r.slice(n))}function E(e,t){const n=Be();let r=[];const i=[];let o,s,c=0;function l(t){s||(s=e),r.push(t),e+=t.length}void 0!==t&&(""!==t&&l(t),c=1);let u=ze();e:for(;;){switch(u){case 4:c=0,r.push(a.getTokenText()),e=0;break;case 60:a.resetTokenState(a.getTokenEnd()-1);break e;case 1:break e;case 5:xn.assert(2!==c&&3!==c,"whitespace shouldn't come from the scanner while saving comment text");const t=a.getTokenText();void 0!==s&&e+t.length>s&&(r.push(t.slice(s-e)),c=2),e+=t.length;break;case 19:c=2;const u=a.getTokenFullStart(),_=P(a.getTokenEnd()-1);_?(i.push(xt(D.createJSDocText(r.join("")),o??n,u)),i.push(_),r=[],o=a.getTokenEnd()):l(a.getTokenText());break;case 62:c=3===c?2:3,l(a.getTokenText());break;case 82:3!==c&&(c=2),l(a.getTokenValue());break;case 42:if(0===c){c=1,e+=1;break}default:3!==c&&(c=2),l(a.getTokenText())}u=2===c||3===c?Ke(3===c):Ue()}y(r);const _=r.join("").trimEnd();return i.length?(_.length&&i.push(xt(D.createJSDocText(_),o??n)),bt(i,n,a.getTokenEnd())):_.length?_:void 0}function P(e){const t=tt(N);if(!t)return;Ue(),x();const n=function(){if(ba(ze())){const e=Be();let t=Dt();for(;dt(25);)t=xt(D.createQualifiedName(t,81===ze()?St(80,!1):Dt()),e);for(;81===ze();)Xe(),Ue(),t=xt(D.createJSDocMemberName(t,wt()),e);return t}}(),r=[];for(;20!==ze()&&4!==ze()&&1!==ze();)r.push(a.getTokenText()),Ue();return xt(("link"===t?D.createJSDocLink:"linkcode"===t?D.createJSDocLinkCode:D.createJSDocLinkPlain)(n,r.join("")),e,a.getTokenEnd())}function N(){if(T(),19===ze()&&60===Ue()&&ba(Ue())){const e=a.getTokenValue();if(F(e))return e}}function F(e){return"link"===e||"linkcode"===e||"linkplain"===e}function I(){return T(),19===ze()?t():void 0}function M(){const e=Y(23);e&&x();const t=Y(62),n=function(){let e=ee();for(dt(23)&&it(24);dt(25);){const t=ee();dt(23)&&it(24),e=sn(e,t)}return e}();return t&&(function(e){if(ze()===e)return function(){const e=Be(),t=ze();return Ue(),xt(O(t),e)}()}(62)||(xn.assert(Fh(62)),St(62,!1,va._0_expected,Ra(62)))),e&&(x(),pt(64)&&yr(),it(24)),{name:n,isBracketed:e}}function L(e){switch(e.kind){case 151:return!0;case 188:return L(e.elementType);default:return xE(e)&&qD(e.typeName)&&"Object"===e.typeName.escapedText&&!e.typeArguments}}function R(e,t,n,r){let i=I(),o=!i;T();const{name:a,isBracketed:s}=M(),c=T();o&&!et(N)&&(i=I());const l=w(e,Be(),r,c),u=function(e,t,n,r){if(e&&L(e.type)){const i=Be();let o,a;for(;o=tt((()=>W(n,r,t)));)341===o.kind||348===o.kind?a=ue(a,o):345===o.kind&&je(o.tagName,va.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(a){const t=xt(D.createJSDocTypeLiteral(a,188===e.type.kind),i);return xt(D.createJSDocTypeExpression(t),i)}}}(i,a,n,r);return u&&(i=u,o=!0),xt(1===n?D.createJSDocPropertyTag(t,a,s,i,o,l):D.createJSDocParameterTag(t,a,s,i,o,l),e)}function B(e,n,r,i){Q(s,TF)&&Le(n.pos,a.getTokenStart(),va._0_tag_already_specified,vc(n.escapedText));const o=t(!0),c=void 0!==r&&void 0!==i?w(e,Be(),r,i):void 0;return xt(D.createJSDocTypeTag(n,o,c),e)}function J(){const e=dt(19),t=Be(),n=function(){const e=Be();let t=ee();for(;dt(25);){const n=ee();t=xt(j(t,n),e)}return t}();a.setSkipJsDocLeadingAsterisks(!0);const r=io();a.setSkipJsDocLeadingAsterisks(!1);const i=xt(D.createExpressionWithTypeArguments(n,r),t);return e&&it(20),i}function z(e,t,n,r,i){return xt(t(n,w(e,Be(),r,i)),e)}function $(e,n,r,i){const o=t(!0);return x(),xt(D.createJSDocThisTag(n,o,w(e,Be(),r,i)),e)}function q(e){const t=a.getTokenStart();if(!ba(ze()))return;const n=ee();if(dt(25)){const r=q(!0);return xt(D.createModuleDeclaration(void 0,n,r,e?8:void 0),t)}return e&&(n.flags|=4096),n}function V(e,t){const n=function(e){const t=Be();let n,r;for(;n=tt((()=>W(4,e)));){if(345===n.kind){je(n.tagName,va.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}r=ue(r,n)}return bt(r||[],t)}(t),r=tt((()=>{if(Y(60)){const e=C(t);if(e&&342===e.kind)return e}}));return xt(D.createJSDocSignature(void 0,n,r),e)}function U(e,t){for(;!qD(e)||!qD(t);){if(qD(e)||qD(t)||e.right.escapedText!==t.right.escapedText)return!1;e=e.left,t=t.left}return e.escapedText===t.escapedText}function K(e){return W(1,e)}function W(e,t,n){let r=!0,i=!1;for(;;)switch(Ue()){case 60:if(r){const r=H(e,t);return!(r&&(341===r.kind||348===r.kind)&&n&&(qD(r.name)||!U(n,r.name.left)))&&r}i=!1;break;case 4:r=!0,i=!1;break;case 42:i&&(r=!1),i=!0;break;case 80:r=!1;break;case 1:return!1}}function H(e,t){xn.assert(60===ze());const n=a.getTokenFullStart();Ue();const r=ee(),i=T();let o;switch(r.escapedText){case"type":return 1===e&&B(n,r);case"prop":case"property":o=1;break;case"arg":case"argument":case"param":o=6;break;case"template":return X(n,r,t,i);case"this":return $(n,r,t,i);default:return!1}return!!(e&o)&&R(n,r,e,t)}function G(){const e=Be(),t=Y(23);t&&x();const n=Xi(!1,!0),r=ee(va.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);let i;if(t&&(x(),it(64),i=be(16777216,kn),it(24)),!Nd(r))return xt(D.createTypeParameterDeclaration(n,r,void 0,i),e)}function X(e,n,r,i){const o=19===ze()?t():void 0,a=function(){const e=Be(),t=[];do{x();const e=G();void 0!==e&&t.push(e),T()}while(Y(28));return bt(t,e)}();return xt(D.createJSDocTemplateTag(n,o,a,w(e,Be(),r,i)),e)}function Y(e){return ze()===e&&(Ue(),!0)}function ee(e){if(!ba(ze()))return St(80,!e,e||va.Identifier_expected);S++;const t=a.getTokenStart(),n=a.getTokenEnd(),r=ze(),i=kt(a.getTokenValue()),o=xt(A(i,r),t,n);return Ue(),o}}e.parseJSDocTypeExpressionForTests=function(e,n,r){ae("file.js",e,99,void 0,1,0),a.setText(e,n,r),v=a.scan();const i=t(),o=de("file.js",99,1,!1,[],O(1),0,_t),s=oS(g,o);return h&&(o.jsDocDiagnostics=oS(h,o)),se(),i?{jsDocTypeExpression:i,diagnostics:s}:void 0},e.parseJSDocTypeExpression=t,e.parseJSDocNameReference=n,e.parseIsolatedJSDocComment=function(e,t,n){ae("",e,99,void 0,1,0);const r=be(16777216,(()=>l(t,n))),i=oS(g,{languageVariant:0,text:e});return se(),r?{jsDoc:r,diagnostics:i}:void 0},e.parseJSDocComment=function(e,t,n){const r=v,i=g.length,o=ie,a=be(16777216,(()=>l(t,n)));return OT(a,e),524288&w&&(h||(h=[]),pe(h,g,i)),v=r,g.length=i,ie=o,a},(i=r||(r={}))[i.BeginningOfLine=0]="BeginningOfLine",i[i.SawAsterisk=1]="SawAsterisk",i[i.SavingComments=2]="SavingComments",i[i.SavingBackticks=3]="SavingBackticks",(s=o||(o={}))[s.Property=1]="Property",s[s.Parameter=2]="Parameter",s[s.CallbackParameter=4]="CallbackParameter"})(Do=e.JSDocParser||(e.JSDocParser={}))})(yI||(yI={}));var WI,HI=new WeakSet,GI=new WeakSet;function XI(e){GI.add(e)}function QI(e){return void 0!==YI(e)}function YI(e){const t=zo(e,Rk,!1);if(t)return t;if(Ao(e,".ts")){const t=Bo(e).lastIndexOf(".d.");if(t>=0)return e.substring(t)}}function ZI(e,t){const n=[];for(const e of vs(t,0)||u)oO(n,e,t.substring(e.pos,e.end));e.pragmas=new Map;for(const t of n)if(e.pragmas.has(t.name)){const n=e.pragmas.get(t.name);n instanceof Array?n.push(t.args):e.pragmas.set(t.name,[n,t.args])}else e.pragmas.set(t.name,t.args)}function eO(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach(((n,r)=>{switch(r){case"reference":{const r=e.referencedFiles,i=e.typeReferenceDirectives,o=e.libReferenceDirectives;f(at(n),(n=>{const{types:a,lib:s,path:c,"resolution-mode":l,preserve:u}=n.arguments,_="true"===u||void 0;if("true"===n.arguments["no-default-lib"])e.hasNoDefaultLib=!0;else if(a){const e=function(e,t,n,r){if(e)return"import"===e?99:"require"===e?1:void r(t,n-t,va.resolution_mode_should_be_either_require_or_import)}(l,a.pos,a.end,t);i.push({pos:a.pos,end:a.end,fileName:a.value,...e?{resolutionMode:e}:{},..._?{preserve:_}:{}})}else s?o.push({pos:s.pos,end:s.end,fileName:s.value,..._?{preserve:_}:{}}):c?r.push({pos:c.pos,end:c.end,fileName:c.value,..._?{preserve:_}:{}}):t(n.range.pos,n.range.end-n.range.pos,va.Invalid_reference_directive_syntax)}));break}case"amd-dependency":e.amdDependencies=O(at(n),(e=>({name:e.arguments.name,path:e.arguments.path})));break;case"amd-module":if(n instanceof Array)for(const r of n)e.moduleName&&t(r.range.pos,r.range.end-r.range.pos,va.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=r.arguments.name;else e.moduleName=n.arguments.name;break;case"ts-nocheck":case"ts-check":f(at(n),(t=>{(!e.checkJsDirective||t.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:"ts-check"===r,end:t.range.end,pos:t.range.pos})}));break;case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:xn.fail("Unhandled pragma kind")}}))}(e=>{function t(e,t,r,o,a,s){return void(t?l(e):c(e));function c(e){let t="";if(s&&n(e)&&(t=o.substring(e.pos,e.end)),qF(e),FT(e,e.pos+r,e.end+r),s&&n(e)&&xn.assert(t===a.substring(e.pos,e.end)),LI(e,c,l),O_(e))for(const t of e.jsDoc)c(t);i(e,s)}function l(e){FT(e,e.pos+r,e.end+r);for(const t of e)c(t)}}function n(e){switch(e.kind){case 11:case 9:case 80:return!0}return!1}function r(e,t,n,r,i){xn.assert(e.end>=t,"Adjusting an element that was entirely before the change range"),xn.assert(e.pos<=n,"Adjusting an element that was entirely after the change range"),xn.assert(e.pos<=e.end);const o=Math.min(e.pos,r),a=e.end>=n?e.end+i:Math.min(e.end,r);if(xn.assert(o<=a),e.parent){const t=e.parent;xn.assertGreaterThanOrEqual(o,t.pos),xn.assertLessThanOrEqual(a,t.end)}FT(e,o,a)}function i(e,t){if(t){let t=e.pos;const n=e=>{xn.assert(e.pos>=t),t=e.end};if(O_(e))for(const t of e.jsDoc)n(t);LI(e,n),xn.assert(t<=e.end)}}function o(e,t){let n,r=e;if(LI(e,(function e(i){if(!Nd(i))return i.pos<=t?(i.pos>=r.pos&&(r=i),tt),!0)})),n){const e=function(e){for(;;){const t=Nx(e);if(!t)return e;e=t}}(n);e.pos>r.pos&&(r=e)}return r}function a(e,t,n,r){const i=e.text;if(n&&(xn.assert(i.length-n.span.length+n.newLength===t.length),r||xn.shouldAssert(3))){const e=i.substr(0,n.span.start),r=t.substr(0,n.span.start);xn.assert(e===r);const o=i.substring(js(n.span),i.length),a=t.substring(js(Qs(n)),t.length);xn.assert(o===a)}}function s(e){let t=e.statements,n=0;xn.assert(n(o!==i&&(r&&r.end===o&&n=e.pos&&i=e.pos&&i0&&t<=1;t++){const t=o(e,n);xn.assert(t.pos<=n);const r=t.pos;n=Math.max(0,r-1)}return Zs(Xs(n,js(t.span)),t.newLength+(t.span.start-n))}(e,c);a(e,n,d,l),xn.assert(d.span.start<=c.span.start),xn.assert(js(d.span)===js(c.span)),xn.assert(js(Qs(d))===js(Qs(c)));const p=Qs(d).length-d.span.length;!function(e,n,o,a,s,c,l,u){return void _(e);function _(e){if(xn.assert(e.pos<=e.end),e.pos>o)return void t(e,!1,s,c,l,u);const p=e.end;if(p>=n){if(XI(e),qF(e),r(e,n,o,a,s),LI(e,_,d),O_(e))for(const t of e.jsDoc)_(t);i(e,u)}else xn.assert(po)return void t(e,!0,s,c,l,u);const i=e.end;if(i>=n){XI(e),r(e,n,o,a,s);for(const t of e)_(t)}else xn.assert(ir){u();const t={range:{pos:e.pos+i,end:e.end+i},type:l};c=ue(c,t),s&&xn.assert(o.substring(e.pos,e.end)===a.substring(t.range.pos,t.range.end))}}return u(),c;function u(){l||(l=!0,c?t&&c.push(...t):c=t)}}(e.commentDirectives,f.commentDirectives,d.span.start,js(d.span),p,u,n,l),f.impliedNodeFormat=e.impliedNodeFormat,f},e.createSyntaxCursor=s,(l=c||(c={}))[l.Value=-1]="Value"})(WI||(WI={}));var tO=new Map;function nO(e){if(tO.has(e))return tO.get(e);const t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return tO.set(e,t),t}var rO=/^\/\/\/\s*<(\S+)\s.*?\/>/im,iO=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im;function oO(e,t,n){const r=2===t.kind&&rO.exec(n);if(r){const i=r[1].toLowerCase(),o=Ki[i];if(!(o&&1&o.kind))return;if(o.args){const r={};for(const e of o.args){const i=nO(e.name).exec(n);if(!i&&!e.optional)return;if(i){const n=i[2]||i[3];if(e.captureSpan){const o=t.pos+i.index+i[1].length+1;r[e.name]={value:n,pos:o,end:o+n.length}}else r[e.name]=n}}e.push({name:i,args:{arguments:r,range:t}})}else e.push({name:i,args:{arguments:{},range:t}});return}const i=2===t.kind&&iO.exec(n);if(i)return aO(e,t,2,i);if(3===t.kind){const r=/@(\S+)(\s+.*)?$/gim;let i;for(;i=r.exec(n);)aO(e,t,4,i)}}function aO(e,t,n,r){if(!r)return;const i=r[1].toLowerCase(),o=Ki[i];if(!(o&&o.kind&n))return;const a=function(e,t){if(!t)return{};if(!e.args)return{};const n=t.trim().split(/\s+/),r={};for(let t=0;t[""+t,e]))),dO=[["es5","lib.es5.d.ts"],["es6","lib.es2015.d.ts"],["es2015","lib.es2015.d.ts"],["es7","lib.es2016.d.ts"],["es2016","lib.es2016.d.ts"],["es2017","lib.es2017.d.ts"],["es2018","lib.es2018.d.ts"],["es2019","lib.es2019.d.ts"],["es2020","lib.es2020.d.ts"],["es2021","lib.es2021.d.ts"],["es2022","lib.es2022.d.ts"],["es2023","lib.es2023.d.ts"],["esnext","lib.esnext.d.ts"],["dom","lib.dom.d.ts"],["dom.iterable","lib.dom.iterable.d.ts"],["dom.asynciterable","lib.dom.asynciterable.d.ts"],["webworker","lib.webworker.d.ts"],["webworker.importscripts","lib.webworker.importscripts.d.ts"],["webworker.iterable","lib.webworker.iterable.d.ts"],["webworker.asynciterable","lib.webworker.asynciterable.d.ts"],["scripthost","lib.scripthost.d.ts"],["es2015.core","lib.es2015.core.d.ts"],["es2015.collection","lib.es2015.collection.d.ts"],["es2015.generator","lib.es2015.generator.d.ts"],["es2015.iterable","lib.es2015.iterable.d.ts"],["es2015.promise","lib.es2015.promise.d.ts"],["es2015.proxy","lib.es2015.proxy.d.ts"],["es2015.reflect","lib.es2015.reflect.d.ts"],["es2015.symbol","lib.es2015.symbol.d.ts"],["es2015.symbol.wellknown","lib.es2015.symbol.wellknown.d.ts"],["es2016.array.include","lib.es2016.array.include.d.ts"],["es2016.intl","lib.es2016.intl.d.ts"],["es2017.date","lib.es2017.date.d.ts"],["es2017.object","lib.es2017.object.d.ts"],["es2017.sharedmemory","lib.es2017.sharedmemory.d.ts"],["es2017.string","lib.es2017.string.d.ts"],["es2017.intl","lib.es2017.intl.d.ts"],["es2017.typedarrays","lib.es2017.typedarrays.d.ts"],["es2018.asyncgenerator","lib.es2018.asyncgenerator.d.ts"],["es2018.asynciterable","lib.es2018.asynciterable.d.ts"],["es2018.intl","lib.es2018.intl.d.ts"],["es2018.promise","lib.es2018.promise.d.ts"],["es2018.regexp","lib.es2018.regexp.d.ts"],["es2019.array","lib.es2019.array.d.ts"],["es2019.object","lib.es2019.object.d.ts"],["es2019.string","lib.es2019.string.d.ts"],["es2019.symbol","lib.es2019.symbol.d.ts"],["es2019.intl","lib.es2019.intl.d.ts"],["es2020.bigint","lib.es2020.bigint.d.ts"],["es2020.date","lib.es2020.date.d.ts"],["es2020.promise","lib.es2020.promise.d.ts"],["es2020.sharedmemory","lib.es2020.sharedmemory.d.ts"],["es2020.string","lib.es2020.string.d.ts"],["es2020.symbol.wellknown","lib.es2020.symbol.wellknown.d.ts"],["es2020.intl","lib.es2020.intl.d.ts"],["es2020.number","lib.es2020.number.d.ts"],["es2021.promise","lib.es2021.promise.d.ts"],["es2021.string","lib.es2021.string.d.ts"],["es2021.weakref","lib.es2021.weakref.d.ts"],["es2021.intl","lib.es2021.intl.d.ts"],["es2022.array","lib.es2022.array.d.ts"],["es2022.error","lib.es2022.error.d.ts"],["es2022.intl","lib.es2022.intl.d.ts"],["es2022.object","lib.es2022.object.d.ts"],["es2022.sharedmemory","lib.es2022.sharedmemory.d.ts"],["es2022.string","lib.es2022.string.d.ts"],["es2022.regexp","lib.es2022.regexp.d.ts"],["es2023.array","lib.es2023.array.d.ts"],["es2023.collection","lib.es2023.collection.d.ts"],["es2023.intl","lib.es2023.intl.d.ts"],["esnext.array","lib.es2023.array.d.ts"],["esnext.collection","lib.esnext.collection.d.ts"],["esnext.symbol","lib.es2019.symbol.d.ts"],["esnext.asynciterable","lib.es2018.asynciterable.d.ts"],["esnext.intl","lib.esnext.intl.d.ts"],["esnext.disposable","lib.esnext.disposable.d.ts"],["esnext.bigint","lib.es2020.bigint.d.ts"],["esnext.string","lib.es2022.string.d.ts"],["esnext.promise","lib.esnext.promise.d.ts"],["esnext.weakref","lib.es2021.weakref.d.ts"],["esnext.decorators","lib.esnext.decorators.d.ts"],["esnext.object","lib.esnext.object.d.ts"],["esnext.array","lib.esnext.array.d.ts"],["esnext.regexp","lib.esnext.regexp.d.ts"],["esnext.string","lib.esnext.string.d.ts"],["decorators","lib.decorators.d.ts"],["decorators.legacy","lib.decorators.legacy.d.ts"]],pO=dO.map((e=>e[0])),fO=new Map(dO),mO=[{name:"watchFile",type:new Map(Object.entries({fixedpollinginterval:0,prioritypollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3,usefsevents:4,usefseventsonparentdirectory:5})),category:va.Watch_and_Build_Modes,description:va.Specify_how_the_TypeScript_watch_mode_works,defaultValueDescription:4},{name:"watchDirectory",type:new Map(Object.entries({usefsevents:0,fixedpollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3})),category:va.Watch_and_Build_Modes,description:va.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,defaultValueDescription:0},{name:"fallbackPolling",type:new Map(Object.entries({fixedinterval:0,priorityinterval:1,dynamicpriority:2,fixedchunksize:3})),category:va.Watch_and_Build_Modes,description:va.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,defaultValueDescription:1},{name:"synchronousWatchDirectory",type:"boolean",category:va.Watch_and_Build_Modes,description:va.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,defaultValueDescription:!1},{name:"excludeDirectories",type:"list",element:{name:"excludeDirectory",type:"string",isFilePath:!0,extraValidation:DL},allowConfigDirTemplateSubstitution:!0,category:va.Watch_and_Build_Modes,description:va.Remove_a_list_of_directories_from_the_watch_process},{name:"excludeFiles",type:"list",element:{name:"excludeFile",type:"string",isFilePath:!0,extraValidation:DL},allowConfigDirTemplateSubstitution:!0,category:va.Watch_and_Build_Modes,description:va.Remove_a_list_of_files_from_the_watch_mode_s_processing}],gO=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:va.Command_line_Options,description:va.Print_this_message,defaultValueDescription:!1},{name:"help",shortName:"?",type:"boolean",isCommandLineOnly:!0,category:va.Command_line_Options,defaultValueDescription:!1},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:va.Command_line_Options,description:va.Watch_input_files,defaultValueDescription:!1},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:va.Output_Formatting,description:va.Disable_wiping_the_console_in_watch_mode,defaultValueDescription:!1},{name:"listFiles",type:"boolean",category:va.Compiler_Diagnostics,description:va.Print_all_of_the_files_read_during_the_compilation,defaultValueDescription:!1},{name:"explainFiles",type:"boolean",category:va.Compiler_Diagnostics,description:va.Print_files_read_during_the_compilation_including_why_it_was_included,defaultValueDescription:!1},{name:"listEmittedFiles",type:"boolean",category:va.Compiler_Diagnostics,description:va.Print_the_names_of_emitted_files_after_a_compilation,defaultValueDescription:!1},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:va.Output_Formatting,description:va.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,defaultValueDescription:!0},{name:"traceResolution",type:"boolean",category:va.Compiler_Diagnostics,description:va.Log_paths_used_during_the_moduleResolution_process,defaultValueDescription:!1},{name:"diagnostics",type:"boolean",category:va.Compiler_Diagnostics,description:va.Output_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"extendedDiagnostics",type:"boolean",category:va.Compiler_Diagnostics,description:va.Output_more_detailed_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:va.FILE_OR_DIRECTORY,category:va.Compiler_Diagnostics,description:va.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,defaultValueDescription:"profile.cpuprofile"},{name:"generateTrace",type:"string",isFilePath:!0,isCommandLineOnly:!0,paramType:va.DIRECTORY,category:va.Compiler_Diagnostics,description:va.Generates_an_event_trace_and_a_list_of_types},{name:"incremental",shortName:"i",type:"boolean",category:va.Projects,description:va.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,transpileOptionValue:void 0,defaultValueDescription:va.false_unless_composite_is_set},{name:"declaration",shortName:"d",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,transpileOptionValue:void 0,description:va.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,defaultValueDescription:va.false_unless_composite_is_set},{name:"declarationMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,transpileOptionValue:void 0,defaultValueDescription:!1,description:va.Create_sourcemaps_for_d_ts_files},{name:"emitDeclarationOnly",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,description:va.Only_output_d_ts_files_and_not_JavaScript_files,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"sourceMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,defaultValueDescription:!1,description:va.Create_source_map_files_for_emitted_JavaScript_files},{name:"inlineSourceMap",type:"boolean",affectsBuildInfo:!0,category:va.Emit,description:va.Include_sourcemap_files_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"assumeChangesOnlyAffectDirectDependencies",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:va.Watch_and_Build_Modes,description:va.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,defaultValueDescription:!1},{name:"locale",type:"string",category:va.Command_line_Options,isCommandLineOnly:!0,description:va.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,defaultValueDescription:va.Platform_specific}],hO={name:"target",shortName:"t",type:new Map(Object.entries({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,es2021:8,es2022:9,es2023:10,esnext:99})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,deprecatedKeys:new Set(["es3"]),paramType:va.VERSION,showInSimplifiedHelpView:!0,category:va.Language_and_Environment,description:va.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,defaultValueDescription:1},yO={name:"module",shortName:"m",type:new Map(Object.entries({none:0,commonjs:1,amd:2,system:4,umd:3,es6:5,es2015:5,es2020:6,es2022:7,esnext:99,node16:100,nodenext:199,preserve:200})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,paramType:va.KIND,showInSimplifiedHelpView:!0,category:va.Modules,description:va.Specify_what_module_code_is_generated,defaultValueDescription:void 0},vO=[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:va.Command_line_Options,description:va.Show_all_compiler_options,defaultValueDescription:!1},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:va.Command_line_Options,description:va.Print_the_compiler_s_version,defaultValueDescription:!1},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:va.Command_line_Options,description:va.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,defaultValueDescription:!1},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:va.Command_line_Options,paramType:va.FILE_OR_DIRECTORY,description:va.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:va.Command_line_Options,description:va.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,defaultValueDescription:!1},{name:"showConfig",type:"boolean",showInSimplifiedHelpView:!0,category:va.Command_line_Options,isCommandLineOnly:!0,description:va.Print_the_final_configuration_instead_of_building,defaultValueDescription:!1},{name:"listFilesOnly",type:"boolean",category:va.Command_line_Options,isCommandLineOnly:!0,description:va.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,defaultValueDescription:!1},hO,yO,{name:"lib",type:"list",element:{name:"lib",type:fO,defaultValueDescription:void 0},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:va.Language_and_Environment,description:va.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",allowJsFlag:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.JavaScript_Support,description:va.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,defaultValueDescription:!1},{name:"checkJs",type:"boolean",affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.JavaScript_Support,description:va.Enable_error_reporting_in_type_checked_JavaScript_files,defaultValueDescription:!1},{name:"jsx",type:uO,affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,paramType:va.KIND,showInSimplifiedHelpView:!0,category:va.Language_and_Environment,description:va.Specify_what_JSX_code_is_generated,defaultValueDescription:void 0},{name:"outFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:va.FILE,showInSimplifiedHelpView:!0,category:va.Emit,description:va.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:va.DIRECTORY,showInSimplifiedHelpView:!0,category:va.Emit,description:va.Specify_an_output_folder_for_all_emitted_files},{name:"rootDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:va.LOCATION,category:va.Modules,description:va.Specify_the_root_folder_within_your_source_files,defaultValueDescription:va.Computed_from_the_list_of_input_files},{name:"composite",type:"boolean",affectsBuildInfo:!0,isTSConfigOnly:!0,category:va.Projects,transpileOptionValue:void 0,defaultValueDescription:!1,description:va.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,isFilePath:!0,paramType:va.FILE,category:va.Projects,transpileOptionValue:void 0,defaultValueDescription:".tsbuildinfo",description:va.Specify_the_path_to_tsbuildinfo_incremental_compilation_file},{name:"removeComments",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,defaultValueDescription:!1,description:va.Disable_emitting_comments},{name:"noCheck",type:"boolean",showInSimplifiedHelpView:!1,category:va.Compiler_Diagnostics,description:va.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,transpileOptionValue:!0,defaultValueDescription:!1,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,extraValidation:()=>[va.Unknown_compiler_option_0,"noCheck"]},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:va.Emit,description:va.Disable_emitting_files_from_a_compilation,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"importHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,defaultValueDescription:!1},{name:"importsNotUsedAsValues",type:new Map(Object.entries({remove:0,preserve:1,error:2})),affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,defaultValueDescription:0},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,defaultValueDescription:!1},{name:"isolatedModules",type:"boolean",category:va.Interop_Constraints,description:va.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,transpileOptionValue:!0,defaultValueDescription:!1},{name:"verbatimModuleSyntax",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Interop_Constraints,description:va.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,defaultValueDescription:!1},{name:"isolatedDeclarations",type:"boolean",category:va.Interop_Constraints,description:va.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files,defaultValueDescription:!1,affectsBuildInfo:!0,affectsSemanticDiagnostics:!0},{name:"strict",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Type_Checking,description:va.Enable_all_strict_type_checking_options,defaultValueDescription:!1},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,defaultValueDescription:va.false_unless_strict_is_set},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.When_type_checking_take_into_account_null_and_undefined,defaultValueDescription:va.false_unless_strict_is_set},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,defaultValueDescription:va.false_unless_strict_is_set},{name:"strictBindCallApply",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,defaultValueDescription:va.false_unless_strict_is_set},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,defaultValueDescription:va.false_unless_strict_is_set},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Enable_error_reporting_when_this_is_given_the_type_any,defaultValueDescription:va.false_unless_strict_is_set},{name:"useUnknownInCatchVariables",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Default_catch_clause_variables_as_unknown_instead_of_any,defaultValueDescription:va.false_unless_strict_is_set},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Ensure_use_strict_is_always_emitted,defaultValueDescription:va.false_unless_strict_is_set},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Enable_error_reporting_when_local_variables_aren_t_read,defaultValueDescription:!1},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Raise_an_error_when_a_function_parameter_isn_t_read,defaultValueDescription:!1},{name:"exactOptionalPropertyTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Interpret_optional_property_types_as_written_rather_than_adding_undefined,defaultValueDescription:!1},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,defaultValueDescription:!1},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,defaultValueDescription:!1},{name:"noUncheckedIndexedAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Add_undefined_to_a_type_when_accessed_using_an_index,defaultValueDescription:!1},{name:"noImplicitOverride",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,defaultValueDescription:!1},{name:"noPropertyAccessFromIndexSignature",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!1,category:va.Type_Checking,description:va.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,defaultValueDescription:!1},{name:"moduleResolution",type:new Map(Object.entries({node10:2,node:2,classic:1,node16:3,nodenext:99,bundler:100})),deprecatedKeys:new Set(["node"]),affectsSourceFile:!0,affectsModuleResolution:!0,paramType:va.STRATEGY,category:va.Modules,description:va.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,defaultValueDescription:va.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:va.Modules,description:va.Specify_the_base_directory_to_resolve_non_relative_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,isTSConfigOnly:!0,category:va.Modules,description:va.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:va.Modules,description:va.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules,transpileOptionValue:void 0,defaultValueDescription:va.Computed_from_the_list_of_input_files},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:va.Modules,description:va.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types},{name:"types",type:"list",element:{name:"types",type:"string"},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:va.Modules,description:va.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Interop_Constraints,description:va.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,defaultValueDescription:va.module_system_or_esModuleInterop},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Interop_Constraints,description:va.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,defaultValueDescription:!1},{name:"preserveSymlinks",type:"boolean",category:va.Interop_Constraints,description:va.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,defaultValueDescription:!1},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Modules,description:va.Allow_accessing_UMD_globals_from_modules,defaultValueDescription:!1},{name:"moduleSuffixes",type:"list",element:{name:"suffix",type:"string"},listPreserveFalsyValues:!0,affectsModuleResolution:!0,category:va.Modules,description:va.List_of_file_name_suffixes_to_search_when_resolving_a_module},{name:"allowImportingTsExtensions",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Modules,description:va.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,defaultValueDescription:!1,transpileOptionValue:void 0},{name:"resolvePackageJsonExports",type:"boolean",affectsModuleResolution:!0,category:va.Modules,description:va.Use_the_package_json_exports_field_when_resolving_package_imports,defaultValueDescription:va.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"resolvePackageJsonImports",type:"boolean",affectsModuleResolution:!0,category:va.Modules,description:va.Use_the_package_json_imports_field_when_resolving_imports,defaultValueDescription:va.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"customConditions",type:"list",element:{name:"condition",type:"string"},affectsModuleResolution:!0,category:va.Modules,description:va.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports},{name:"sourceRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:va.LOCATION,category:va.Emit,description:va.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code},{name:"mapRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:va.LOCATION,category:va.Emit,description:va.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSources",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"experimentalDecorators",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Language_and_Environment,description:va.Enable_experimental_support_for_legacy_experimental_decorators,defaultValueDescription:!1},{name:"emitDecoratorMetadata",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:va.Language_and_Environment,description:va.Emit_design_type_metadata_for_decorated_declarations_in_source_files,defaultValueDescription:!1},{name:"jsxFactory",type:"string",category:va.Language_and_Environment,description:va.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h,defaultValueDescription:"`React.createElement`"},{name:"jsxFragmentFactory",type:"string",category:va.Language_and_Environment,description:va.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,defaultValueDescription:"React.Fragment"},{name:"jsxImportSource",type:"string",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,category:va.Language_and_Environment,description:va.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,defaultValueDescription:"react"},{name:"resolveJsonModule",type:"boolean",affectsModuleResolution:!0,category:va.Modules,description:va.Enable_importing_json_files,defaultValueDescription:!1},{name:"allowArbitraryExtensions",type:"boolean",affectsProgramStructure:!0,category:va.Modules,description:va.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,defaultValueDescription:!1},{name:"out",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!1,category:va.Backwards_Compatibility,paramType:va.FILE,transpileOptionValue:void 0,description:va.Deprecated_setting_Use_outFile_instead},{name:"reactNamespace",type:"string",affectsEmit:!0,affectsBuildInfo:!0,category:va.Language_and_Environment,description:va.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,defaultValueDescription:"`React`"},{name:"skipDefaultLibCheck",type:"boolean",affectsBuildInfo:!0,category:va.Completeness,description:va.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,defaultValueDescription:!1},{name:"charset",type:"string",category:va.Backwards_Compatibility,description:va.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files,defaultValueDescription:"utf8"},{name:"emitBOM",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,defaultValueDescription:!1},{name:"newLine",type:new Map(Object.entries({crlf:0,lf:1})),affectsEmit:!0,affectsBuildInfo:!0,paramType:va.NEWLINE,category:va.Emit,description:va.Set_the_newline_character_for_emitting_files,defaultValueDescription:"lf"},{name:"noErrorTruncation",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Output_Formatting,description:va.Disable_truncating_types_in_error_messages,defaultValueDescription:!1},{name:"noLib",type:"boolean",category:va.Language_and_Environment,affectsProgramStructure:!0,description:va.Disable_including_any_library_files_including_the_default_lib_d_ts,transpileOptionValue:!0,defaultValueDescription:!1},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:va.Modules,description:va.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project,transpileOptionValue:!0,defaultValueDescription:!1},{name:"stripInternal",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,defaultValueDescription:!1},{name:"disableSizeLimit",type:"boolean",affectsProgramStructure:!0,category:va.Editor_Support,description:va.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,defaultValueDescription:!1},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",isTSConfigOnly:!0,category:va.Projects,description:va.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,defaultValueDescription:!1},{name:"disableSolutionSearching",type:"boolean",isTSConfigOnly:!0,category:va.Projects,description:va.Opt_a_project_out_of_multi_project_reference_checking_when_editing,defaultValueDescription:!1},{name:"disableReferencedProjectLoad",type:"boolean",isTSConfigOnly:!0,category:va.Projects,description:va.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,defaultValueDescription:!1},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,defaultValueDescription:!1},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,defaultValueDescription:!1},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,transpileOptionValue:void 0,description:va.Disable_emitting_files_if_any_type_checking_errors_are_reported,defaultValueDescription:!1},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Disable_erasing_const_enum_declarations_in_generated_code,defaultValueDescription:!1},{name:"declarationDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:va.DIRECTORY,category:va.Emit,transpileOptionValue:void 0,description:va.Specify_the_output_directory_for_generated_declaration_files},{name:"skipLibCheck",type:"boolean",affectsBuildInfo:!0,category:va.Completeness,description:va.Skip_type_checking_all_d_ts_files,defaultValueDescription:!1},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Disable_error_reporting_for_unused_labels,defaultValueDescription:void 0},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Disable_error_reporting_for_unreachable_code,defaultValueDescription:void 0},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,defaultValueDescription:!1},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,defaultValueDescription:!1},{name:"forceConsistentCasingInFileNames",type:"boolean",affectsModuleResolution:!0,category:va.Interop_Constraints,description:va.Ensure_that_casing_is_correct_in_imports,defaultValueDescription:!0},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:va.JavaScript_Support,description:va.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,defaultValueDescription:0},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Disable_strict_checking_of_generic_signatures_in_function_types,defaultValueDescription:!1},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:va.Language_and_Environment,description:va.Emit_ECMAScript_standard_compliant_class_fields,defaultValueDescription:va.true_for_ES2022_and_above_including_ESNext},{name:"preserveValueImports",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,defaultValueDescription:!1},{name:"keyofStringsOnly",type:"boolean",category:va.Backwards_Compatibility,description:va.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,defaultValueDescription:!1},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:va.Specify_a_list_of_language_service_plugins_to_include,category:va.Editor_Support},{name:"moduleDetection",type:new Map(Object.entries({auto:2,legacy:1,force:3})),affectsSourceFile:!0,affectsModuleResolution:!0,description:va.Control_what_method_is_used_to_detect_module_format_JS_files,category:va.Language_and_Environment,defaultValueDescription:va.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules},{name:"ignoreDeprecations",type:"string",defaultValueDescription:void 0}],bO=[...gO,...vO],xO=bO.filter((e=>!!e.affectsSemanticDiagnostics)),SO=bO.filter((e=>!!e.affectsEmit)),kO=bO.filter((e=>!!e.affectsDeclarationPath)),TO=bO.filter((e=>!!e.affectsModuleResolution)),CO=bO.filter((e=>!!e.affectsSourceFile||!!e.affectsBindDiagnostics)),wO=bO.filter((e=>!!e.affectsProgramStructure)),DO=bO.filter((e=>Le(e,"transpileOptionValue"))),EO=bO.filter((e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath)),PO=mO.filter((e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath)),NO=bO.filter((function(e){return!st(e.type)})),FO=[{name:"verbose",shortName:"v",category:va.Command_line_Options,description:va.Enable_verbose_logging,type:"boolean",defaultValueDescription:!1},{name:"dry",shortName:"d",category:va.Command_line_Options,description:va.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean",defaultValueDescription:!1},{name:"force",shortName:"f",category:va.Command_line_Options,description:va.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean",defaultValueDescription:!1},{name:"clean",category:va.Command_line_Options,description:va.Delete_the_outputs_of_all_projects,type:"boolean",defaultValueDescription:!1}],AO=[...gO,...FO],IO=[{name:"enable",type:"boolean",defaultValueDescription:!1},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},{name:"disableFilenameBasedTypeAcquisition",type:"boolean",defaultValueDescription:!1}];function OO(e){const t=new Map,n=new Map;return f(e,(e=>{t.set(e.name.toLowerCase(),e),e.shortName&&n.set(e.shortName,e.name)})),{optionsNameMap:t,shortOptionNames:n}}function MO(){return cO||(cO=OO(bO))}var LO={diagnostic:va.Compiler_option_0_may_only_be_used_with_build,getOptionsNameMap:QO},jO={module:1,target:3,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0,skipLibCheck:!0};function RO(e){return BO(e,cS)}function BO(e,t){const n=$e(e.type.keys()),r=(e.deprecatedKeys?n.filter((t=>!e.deprecatedKeys.has(t))):n).map((e=>`'${e}'`)).join(", ");return t(va.Argument_for_0_option_must_be_Colon_1,`--${e.name}`,r)}function JO(e,t,n){return gL(e,(t??"").trim(),n)}function zO(e,t="",n){if(an(t=t.trim(),"-"))return;if("listOrElement"===e.type&&!t.includes(","))return mL(e,t,n);if(""===t)return[];const r=t.split(",");switch(e.element.type){case"number":return q(r,(t=>mL(e.element,parseInt(t),n)));case"string":return q(r,(t=>mL(e.element,t||"",n)));case"boolean":case"object":return xn.fail(`List of ${e.element.type} is not yet supported.`);default:return q(r,(t=>JO(e.element,t,n)))}}function $O(e){return e.name}function qO(e,t,n,r,i){var o;if(null==(o=t.alternateMode)?void 0:o.getOptionsNameMap().optionsNameMap.has(e.toLowerCase()))return pL(i,r,t.alternateMode.diagnostic,e);const a=Ut(e,t.optionDeclarations,$O);return a?pL(i,r,t.unknownDidYouMeanDiagnostic,n||e,a.name):pL(i,r,t.unknownOptionDiagnostic,n||e)}function VO(e,t,n){const r={};let i;const o=[],a=[];return s(t),{options:r,watchOptions:i,fileNames:o,errors:a};function s(t){let n=0;for(;nvo.readFile(e)));if(!st(t))return void a.push(t);const r=[];let i=0;for(;;){for(;i=t.length)break;const n=i;if(34===t.charCodeAt(n)){for(i++;i32;)i++;r.push(t.substring(n,i))}}s(r)}}function UO(e,t,n,r,i,o){if(r.isTSConfigOnly){const n=e[t];"null"===n?(i[r.name]=void 0,t++):"boolean"===r.type?"false"===n?(i[r.name]=mL(r,!1,o),t++):("true"===n&&t++,o.push(cS(va.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line,r.name))):(o.push(cS(va.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line,r.name)),n&&!an(n,"-")&&t++)}else if(e[t]||"boolean"===r.type||o.push(cS(n.optionTypeMismatchDiagnostic,r.name,CM(r))),"null"!==e[t])switch(r.type){case"number":i[r.name]=mL(r,parseInt(e[t]),o),t++;break;case"boolean":const n=e[t];i[r.name]=mL(r,"false"!==n,o),"false"!==n&&"true"!==n||t++;break;case"string":i[r.name]=mL(r,e[t]||"",o),t++;break;case"list":const a=zO(r,e[t],o);i[r.name]=a||[],a&&t++;break;case"listOrElement":xn.fail("listOrElement not supported here");break;default:i[r.name]=JO(r,e[t],o),t++}else i[r.name]=void 0,t++;return t}var KO,WO={alternateMode:LO,getOptionsNameMap:MO,optionDeclarations:bO,unknownOptionDiagnostic:va.Unknown_compiler_option_0,unknownDidYouMeanDiagnostic:va.Unknown_compiler_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:va.Compiler_option_0_expects_an_argument};function HO(e,t){return VO(WO,e,t)}function GO(e,t){return XO(MO,e,t)}function XO(e,t,n=!1){t=t.toLowerCase();const{optionsNameMap:r,shortOptionNames:i}=e();if(n){const e=i.get(t);void 0!==e&&(t=e)}return r.get(t)}function QO(){return KO||(KO=OO(AO))}var YO={alternateMode:{diagnostic:va.Compiler_option_0_may_not_be_used_with_build,getOptionsNameMap:MO},getOptionsNameMap:QO,optionDeclarations:AO,unknownOptionDiagnostic:va.Unknown_build_option_0,unknownDidYouMeanDiagnostic:va.Unknown_build_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:va.Build_option_0_requires_a_value_of_type_1};function ZO(e){const{options:t,watchOptions:n,fileNames:r,errors:i}=VO(YO,e),o=t;return 0===r.length&&r.push("."),o.clean&&o.force&&i.push(cS(va.Options_0_and_1_cannot_be_combined,"clean","force")),o.clean&&o.verbose&&i.push(cS(va.Options_0_and_1_cannot_be_combined,"clean","verbose")),o.clean&&o.watch&&i.push(cS(va.Options_0_and_1_cannot_be_combined,"clean","watch")),o.watch&&o.dry&&i.push(cS(va.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:o,watchOptions:n,projects:r,errors:i}}function eM(e,...t){return ut(cS(e,...t).messageText,st)}function tM(e,t,n,r,i,o){const a=oM(e,(e=>n.readFile(e)));if(!st(a))return void n.onUnRecoverableConfigFileDiagnostic(a);const s=$I(e,a),c=n.getCurrentDirectory();return s.path=Yo(e,c,tn(n.useCaseSensitiveFileNames)),s.resolvedPath=s.path,s.originalFileName=s.fileName,JM(s,n,Go(Ro(e),c),t,Go(e,c),void 0,o,r,i)}function nM(e,t){const n=oM(e,t);return st(n)?rM(e,n):{config:{},error:n}}function rM(e,t){const n=$I(e,t);return{config:SM(n,n.parseDiagnostics,void 0),error:n.parseDiagnostics.length?n.parseDiagnostics[0]:void 0}}function iM(e,t){const n=oM(e,t);return st(n)?$I(e,n):{fileName:e,parseDiagnostics:[n]}}function oM(e,t){let n;try{n=t(e)}catch(t){return cS(va.Cannot_read_file_0_Colon_1,e,t.message)}return void 0===n?cS(va.Cannot_read_file_0,e):n}function aM(e){return Ue(e,$O)}var sM,cM={optionDeclarations:IO,unknownOptionDiagnostic:va.Unknown_type_acquisition_option_0,unknownDidYouMeanDiagnostic:va.Unknown_type_acquisition_option_0_Did_you_mean_1};function lM(){return sM||(sM=OO(mO))}var uM,_M,dM,pM={getOptionsNameMap:lM,optionDeclarations:mO,unknownOptionDiagnostic:va.Unknown_watch_option_0,unknownDidYouMeanDiagnostic:va.Unknown_watch_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:va.Watch_option_0_requires_a_value_of_type_1};function fM(){return uM||(uM=aM(bO))}function mM(){return _M||(_M=aM(mO))}function gM(){return dM||(dM=aM(IO))}var hM,yM={name:"extends",type:"listOrElement",element:{name:"extends",type:"string"},category:va.File_Management,disallowNullOrUndefined:!0},vM={name:"compilerOptions",type:"object",elementOptions:fM(),extraKeyDiagnostics:WO},bM={name:"watchOptions",type:"object",elementOptions:mM(),extraKeyDiagnostics:pM},xM={name:"typeAcquisition",type:"object",elementOptions:gM(),extraKeyDiagnostics:cM};function SM(e,t,n){var r;const i=null==(r=e.statements[0])?void 0:r.expression;if(i&&210!==i.kind){if(t.push(Jp(e,i,va.The_root_value_of_a_0_file_must_be_an_object,"jsconfig.json"===Bo(e.fileName)?"jsconfig.json":"tsconfig.json")),WE(i)){const r=S(i.elements,HE);if(r)return TM(e,r,t,!0,n)}return{}}return TM(e,i,t,!0,n)}function kM(e,t){var n;return TM(e,null==(n=e.statements[0])?void 0:n.expression,t,!0,void 0)}function TM(e,t,n,r,i){return t?function t(a,s){switch(a.kind){case 112:return!0;case 97:return!1;case 106:return null;case 11:return o(a)||n.push(Jp(e,a,va.String_literal_with_double_quotes_expected)),a.text;case 9:return Number(a.text);case 224:if(41!==a.operator||9!==a.operand.kind)break;return-Number(a.operand.text);case 210:return function(a,s){var c;const l=r?{}:void 0;for(const u of a.properties){if(303!==u.kind){n.push(Jp(e,u,va.Property_assignment_expected));continue}u.questionToken&&n.push(Jp(e,u.questionToken,va.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),o(u.name)||n.push(Jp(e,u.name,va.String_literal_with_double_quotes_expected));const a=Op(u.name)?void 0:Lp(u.name),_=a&&vc(a),d=_?null==(c=null==s?void 0:s.elementOptions)?void 0:c.get(_):void 0,p=t(u.initializer,d);void 0!==_&&(r&&(l[_]=p),null==i||i.onPropertySet(_,p,u,s,d))}return l}(a,s);case 209:return function(e,n){if(r)return F(e.map((e=>t(e,n))),(e=>void 0!==e));e.forEach((e=>t(e,n)))}(a.elements,s&&s.element)}s?n.push(Jp(e,a,va.Compiler_option_0_requires_a_value_of_type_1,s.name,CM(s))):n.push(Jp(e,a,va.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal))}(t,null==i?void 0:i.rootOptions):r?{}:void 0;function o(t){return wD(t)&&Wm(t,e)}}function CM(e){return"listOrElement"===e.type?`${CM(e.element)} or Array`:"list"===e.type?"Array":st(e.type)?e.type:"string"}function wM(e,t){return!!e&&($M(t)?!e.disallowNullOrUndefined:"list"===e.type?ot(t):"listOrElement"===e.type?ot(t)||wM(e.element,t):typeof t===(st(e.type)?e.type:"string"))}function DM(e,t,n){var r,i,o;const a=tn(n.useCaseSensitiveFileNames),s=O(F(e.fileNames,(null==(i=null==(r=e.options.configFile)?void 0:r.configFileSpecs)?void 0:i.validatedIncludeSpecs)?function(e,t,n,r){if(!t)return pt;const i=kk(e,n,t,r.useCaseSensitiveFileNames,r.getCurrentDirectory()),o=i.excludePattern&&Tk(i.excludePattern,r.useCaseSensitiveFileNames),a=i.includeFilePattern&&Tk(i.includeFilePattern,r.useCaseSensitiveFileNames);return a?o?e=>!(a.test(e)&&!o.test(e)):e=>!a.test(e):o?e=>o.test(e):pt}(t,e.options.configFile.configFileSpecs.validatedIncludeSpecs,e.options.configFile.configFileSpecs.validatedExcludeSpecs,n):pt),(e=>fa(Go(t,n.getCurrentDirectory()),Go(e,n.getCurrentDirectory()),a))),c={configFilePath:Go(t,n.getCurrentDirectory()),useCaseSensitiveFileNames:n.useCaseSensitiveFileNames},l=AM(e.options,c),u=e.watchOptions&&IM(e.watchOptions,lM()),_={compilerOptions:{...EM(l),showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0},watchOptions:u&&EM(u),references:O(e.projectReferences,(e=>({...e,path:e.originalPath?e.originalPath:"",originalPath:void 0}))),files:p(s)?s:void 0,...(null==(o=e.options.configFile)?void 0:o.configFileSpecs)?{include:PM(e.options.configFile.configFileSpecs.validatedIncludeSpecs),exclude:e.options.configFile.configFileSpecs.validatedExcludeSpecs}:{},compileOnSave:!!e.compileOnSave||void 0},d=new Set(l.keys()),f={};for(const t in CS)!d.has(t)&&Q(CS[t].dependencies,(e=>d.has(e)))&&CS[t].computeValue(e.options)!==CS[t].computeValue({})&&(f[t]=CS[t].computeValue(e.options));return qe(_.compilerOptions,EM(AM(f,c))),_}function EM(e){return{...$e(e.entries()).reduce(((e,t)=>({...e,[t[0]]:t[1]})),{})}}function PM(e){if(p(e)){if(1!==p(e))return e;if(e[0]!==VM)return e}}function NM(e){switch(e.type){case"string":case"number":case"boolean":case"object":return;case"list":case"listOrElement":return NM(e.element);default:return e.type}}function FM(e,t){return ld(t,((t,n)=>{if(t===e)return n}))}function AM(e,t){return IM(e,MO(),t)}function IM(e,{optionsNameMap:t},n){const r=new Map,i=n&&tn(n.useCaseSensitiveFileNames);for(const o in e)if(Le(e,o)){if(t.has(o)&&(t.get(o).category===va.Command_line_Options||t.get(o).category===va.Output_Formatting))continue;const a=e[o],s=t.get(o.toLowerCase());if(s){xn.assert("listOrElement"!==s.type);const e=NM(s);e?"list"===s.type?r.set(o,a.map((t=>FM(t,e)))):r.set(o,FM(a,e)):n&&s.isFilePath?r.set(o,fa(n.configFilePath,Go(a,Ro(n.configFilePath)),i)):n&&"list"===s.type&&s.element.isFilePath?r.set(o,a.map((e=>fa(n.configFilePath,Go(e,Ro(n.configFilePath)),i)))):r.set(o,a)}}return r}function OM(e,t){const n=MM(e);return function(){const e=[],r=(2,Array(3).join(" "));return vO.forEach((t=>{if(!n.has(t.name))return;const i=n.get(t.name),o=ML(t);i!==o?e.push(`${r}${t.name}: ${i}`):Le(jO,t.name)&&e.push(`${r}${t.name}: ${o}`)})),e.join(t)+t}()}function MM(e){return AM(Qe(e,jO))}function LM(e,t,n){const r=MM(e);return function(){const e=new Map;e.set(va.Projects,[]),e.set(va.Language_and_Environment,[]),e.set(va.Modules,[]),e.set(va.JavaScript_Support,[]),e.set(va.Emit,[]),e.set(va.Interop_Constraints,[]),e.set(va.Type_Checking,[]),e.set(va.Completeness,[]);for(const t of bO)if(o(t)){let n=e.get(t.category);n||e.set(t.category,n=[]),n.push(t)}let a=0,s=0;const c=[];e.forEach(((e,t)=>{0!==c.length&&c.push({value:""}),c.push({value:`/* ${tS(t)} */`});for(const t of e){let e;e=r.has(t.name)?`"${t.name}": ${JSON.stringify(r.get(t.name))}${(s+=1)===r.size?"":","}`:`// "${t.name}": ${JSON.stringify(ML(t))},`,c.push({value:e,description:`/* ${t.description&&tS(t.description)||t.name} */`}),a=Math.max(e.length,a)}}));const l=i(2),u=[];u.push("{"),u.push(`${l}"compilerOptions": {`),u.push(`${l}${l}/* ${tS(va.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`),u.push("");for(const e of c){const{value:t,description:n=""}=e;u.push(t&&`${l}${l}${t}${n&&i(a-t.length+2)+n}`)}if(t.length){u.push(`${l}},`),u.push(`${l}"files": [`);for(let e=0;e"object"==typeof e),"object"),n=h(y("files"));if(n){const r="no-prop"===e||ot(e)&&0===e.length,i=Le(d,"extends");if(0===n.length&&r&&!i)if(t){const e=a||"tsconfig.json",n=va.The_files_list_in_config_file_0_is_empty,r=Xf(t,"files",(e=>e.initializer)),i=pL(t,r,n,e);u.push(i)}else b(va.The_files_list_in_config_file_0_is_empty,a||"tsconfig.json")}let r=h(y("include"));const i=y("exclude");let o,s,c,l,_=!1,f=h(i);if("no-prop"===i){const e=p.outDir,t=p.declarationDir;(e||t)&&(f=F([e,t],(e=>!!e)))}void 0===n&&void 0===r&&(r=[VM],_=!0),r&&(o=wL(r,u,!0,t,"include"),c=QM(o,m)||o),f&&(s=wL(f,u,!1,t,"exclude"),l=QM(s,m)||s);const g=F(n,st);return{filesSpecs:n,includeSpecs:r,excludeSpecs:f,validatedFilesSpec:QM(g,m)||g,validatedIncludeSpecs:c,validatedExcludeSpecs:l,validatedFilesSpecBeforeSubstitution:g,validatedIncludeSpecsBeforeSubstitution:o,validatedExcludeSpecsBeforeSubstitution:s,pathPatterns:void 0,isDefaultIncludeSpec:_}}();return t&&(t.configFileSpecs=g),zM(p,t),{options:p,watchOptions:f,fileNames:function(e){const t=xL(g,e,p,n,c);return eL(t,tL(d),s)&&u.push(ZM(g,a)),t}(m),projectReferences:function(e){let t;const n=v("references",(e=>"object"==typeof e),"object");if(ot(n))for(const r of n)"string"!=typeof r.path?b(va.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(t||(t=[])).push({path:Go(r.path,e),originalPath:r.path,prepend:r.prepend,circular:r.circular});return t}(m),typeAcquisition:_.typeAcquisition||uL(),raw:d,errors:u,wildcardDirectories:EL(g,m,n.useCaseSensitiveFileNames),compileOnSave:!!d.compileOnSave};function h(e){return ot(e)?e:void 0}function y(e){return v(e,st,"string")}function v(e,n,r){if(Le(d,e)&&!$M(d[e])){if(ot(d[e])){const i=d[e];return t||x(i,n)||u.push(cS(va.Compiler_option_0_requires_a_value_of_type_1,e,r)),i}return b(va.Compiler_option_0_requires_a_value_of_type_1,e,"Array"),"not-array"}return"no-prop"}function b(e,...n){t||u.push(cS(e,...n))}}function KM(e,t){return WM(e,PO,t)}function WM(e,t,n){if(!e)return e;let r;for(const r of t)if(void 0!==e[r.name]){const t=e[r.name];switch(r.type){case"string":xn.assert(r.isFilePath),GM(t)&&i(r,XM(t,n));break;case"list":xn.assert(r.element.isFilePath);const e=QM(t,n);e&&i(r,e);break;case"object":xn.assert("paths"===r.name);const o=YM(t,n);o&&i(r,o);break;default:xn.fail("option type not supported")}}return r||e;function i(t,n){(r??(r=qe({},e)))[t.name]=n}}var HM="${configDir}";function GM(e){return st(e)&&an(e,HM,!0)}function XM(e,t){return Go(e.replace(HM,"./"),t)}function QM(e,t){if(!e)return e;let n;return e.forEach(((r,i)=>{GM(r)&&((n??(n=e.slice()))[i]=XM(r,t))})),n}function YM(e,t){let n;return Re(e).forEach((r=>{if(!ot(e[r]))return;const i=QM(e[r],t);i&&((n??(n=qe({},e)))[r]=i)})),n}function ZM({includeSpecs:e,excludeSpecs:t},n){return cS(va.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,n||"tsconfig.json",JSON.stringify(e||[]),JSON.stringify(t||[]))}function eL(e,t,n){return 0===e.length&&t&&(!n||0===n.length)}function tL(e){return!Le(e,"files")&&!Le(e,"references")}function nL(e,t,n,r,i){const o=r.length;return eL(e,i)?r.push(ZM(n,t)):A(r,(e=>!function(e){return e.code===va.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}(e))),o!==r.length}function rL(e,t,n,r,i,o,a,s){var c;const l=Go(i||"",r=Vo(r));if(o.includes(l))return a.push(cS(va.Circularity_detected_while_resolving_configuration_Colon_0,[...o,l].join(" -> "))),{raw:e||kM(t,a)};const u=e?function(e,t,n,r,i){Le(e,"excludes")&&i.push(cS(va.Unknown_option_excludes_Did_you_mean_exclude));const o=lL(e.compilerOptions,n,i,r),a=_L(e.typeAcquisition,n,i,r),s=function(e,t,n){return dL(mM(),e,t,void 0,pM,n)}(e.watchOptions,n,i);e.compileOnSave=function(e,t,n){if(!Le(e,lO.name))return!1;const r=fL(lO,e.compileOnSave,t,n);return"boolean"==typeof r&&r}(e,n,i);return{raw:e,options:o,watchOptions:s,typeAcquisition:a,extendedConfigPath:e.extends||""===e.extends?iL(e.extends,t,n,r,i):void 0}}(e,n,r,i,a):function(e,t,n,r,i){const o=cL(r);let a,s,c,l;const u=(void 0===hM&&(hM={name:void 0,type:"object",elementOptions:aM([vM,bM,xM,yM,{name:"references",type:"list",element:{name:"references",type:"object"},category:va.Projects},{name:"files",type:"list",element:{name:"files",type:"string"},category:va.File_Management},{name:"include",type:"list",element:{name:"include",type:"string"},category:va.File_Management,defaultValueDescription:va.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk},{name:"exclude",type:"list",element:{name:"exclude",type:"string"},category:va.File_Management,defaultValueDescription:va.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified},lO])}),hM),_=SM(e,i,{rootOptions:u,onPropertySet:function(_,d,p,f,m){if(m&&m!==yM&&(d=fL(m,d,n,i,p,p.initializer,e)),null==f?void 0:f.name)if(m){let e;f===vM?e=o:f===bM?e=s??(s={}):f===xM?e=a??(a=uL(r)):xn.fail("Unknown option"),e[m.name]=d}else _&&(null==f?void 0:f.extraKeyDiagnostics)&&(f.elementOptions?i.push(qO(_,f.extraKeyDiagnostics,void 0,p.name,e)):i.push(Jp(e,p.name,f.extraKeyDiagnostics.unknownOptionDiagnostic,_)));else f===u&&(m===yM?c=iL(d,t,n,r,i,p,p.initializer,e):m||("excludes"===_&&i.push(Jp(e,p.name,va.Unknown_option_excludes_Did_you_mean_exclude)),S(vO,(e=>e.name===_))&&(l=ue(l,p.name))))}});return a||(a=uL(r)),l&&_&&void 0===_.compilerOptions&&i.push(Jp(e,l[0],va._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file,Lp(l[0]))),{raw:_,options:o,watchOptions:s,typeAcquisition:a,extendedConfigPath:c}}(t,n,r,i,a);if((null==(c=u.options)?void 0:c.paths)&&(u.options.pathsBasePath=r),u.extendedConfigPath){o=o.concat([l]);const e={options:{}};st(u.extendedConfigPath)?_(e,u.extendedConfigPath):u.extendedConfigPath.forEach((t=>_(e,t))),e.include&&(u.raw.include=e.include),e.exclude&&(u.raw.exclude=e.exclude),e.files&&(u.raw.files=e.files),void 0===u.raw.compileOnSave&&e.compileOnSave&&(u.raw.compileOnSave=e.compileOnSave),t&&e.extendedSourceFiles&&(t.extendedSourceFiles=$e(e.extendedSourceFiles.keys())),u.options=qe(e.options,u.options),u.watchOptions=u.watchOptions&&e.watchOptions?qe(e.watchOptions,u.watchOptions):u.watchOptions||e.watchOptions}return u;function _(e,i){const c=function(e,t,n,r,i,o,a){const s=n.useCaseSensitiveFileNames?t:yt(t);let c,l,u;if(o&&(c=o.get(s))?({extendedResult:l,extendedConfig:u}=c):(l=iM(t,(e=>n.readFile(e))),l.parseDiagnostics.length||(u=rL(void 0,l,n,Ro(t),Bo(t),r,i,o)),o&&o.set(s,{extendedResult:l,extendedConfig:u})),e&&((a.extendedSourceFiles??(a.extendedSourceFiles=new Set)).add(l.fileName),l.extendedSourceFiles))for(const e of l.extendedSourceFiles)a.extendedSourceFiles.add(e);if(!l.parseDiagnostics.length)return u;i.push(...l.parseDiagnostics)}(t,i,n,o,a,s,e);if(c&&c.options){const t=c.raw;let o;const a=a=>{u.raw[a]||t[a]&&(e[a]=O(t[a],(e=>GM(e)||wo(e)?e:Ko(o||(o=pa(Ro(i),r,tn(n.useCaseSensitiveFileNames))),e))))};a("include"),a("exclude"),a("files"),void 0!==t.compileOnSave&&(e.compileOnSave=t.compileOnSave),qe(e.options,c.options),e.watchOptions=e.watchOptions&&c.watchOptions?qe({},e.watchOptions,c.watchOptions):e.watchOptions||c.watchOptions}}}function iL(e,t,n,r,i,o,a,s){let c;const l=r?qM(r,n):n;if(st(e))c=oL(e,t,l,i,a,s);else if(ot(e)){c=[];for(let r=0;rpL(i,r,e,...t))))}function hL(e,t,n,r,i,o,a){return F(O(t,((t,s)=>fL(e.element,t,n,r,i,null==o?void 0:o.elements[s],a))),(t=>!!e.listPreserveFalsyValues||!!t))}var yL,vL=/(^|\/)\*\*\/?$/,bL=/^[^*?]*(?=\/[^/]*[*?])/;function xL(e,t,n,r,i=u){t=Xo(t);const o=tn(r.useCaseSensitiveFileNames),a=new Map,s=new Map,c=new Map,{validatedFilesSpec:l,validatedIncludeSpecs:_,validatedExcludeSpecs:d}=e,p=zk(n,i),f=$k(n,p);if(l)for(const e of l){const n=Go(e,t);a.set(o(n),n)}let m;if(_&&_.length>0)for(const e of r.readDirectory(t,j(f),d,_,void 0)){if(Ao(e,".json")){if(!m){const e=O(yk(_.filter((e=>Wt(e,".json"))),t,"files"),(e=>`^${e}$`));m=e?e.map((e=>Tk(e,r.useCaseSensitiveFileNames))):u}if(-1!==T(m,(t=>t.test(e)))){const t=o(e);a.has(t)||c.has(t)||c.set(t,e)}continue}if(FL(e,a,s,p,o))continue;AL(e,s,p,o);const n=o(e);a.has(n)||s.has(n)||s.set(n,e)}const g=$e(a.values()),h=$e(s.values());return g.concat(h,$e(c.values()))}function SL(e,t,n,r,i){const{validatedFilesSpec:o,validatedIncludeSpecs:a,validatedExcludeSpecs:s}=t;if(!p(a)||!p(s))return!1;n=Xo(n);const c=tn(r);if(o)for(const t of o)if(c(Go(t,n))===e)return!1;return CL(e,s,r,i,n)}function kL(e){const t=an(e,"**/")?0:e.indexOf("/**/");return-1!==t&&(Wt(e,"/..")?e.length:e.lastIndexOf("/../"))>t}function TL(e,t,n,r){return CL(e,F(t,(e=>!kL(e))),n,r)}function CL(e,t,n,r,i){const o=hk(t,Ko(Xo(r),i),"exclude"),a=o&&Tk(o,n);return!!a&&(!!a.test(e)||!Fo(e)&&a.test(ea(e)))}function wL(e,t,n,r,i){return e.filter((e=>{if(!st(e))return!1;const o=DL(e,n);return void 0!==o&&t.push(function(e,t){const n=Gf(r,i,t);return pL(r,n,e,t)}(...o)),void 0===o}))}function DL(e,t){return xn.assert("string"==typeof e),t&&vL.test(e)?[va.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]:kL(e)?[va.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]:void 0}function EL({validatedIncludeSpecs:e,validatedExcludeSpecs:t},n,r){const i=hk(t,n,"exclude"),o=i&&new RegExp(i,r?"":"i"),a={},s=new Map;if(void 0!==e){const t=[];for(const i of e){const e=Xo(Ko(n,i));if(o&&o.test(e))continue;const c=NL(e,r);if(c){const{key:e,path:n,flags:r}=c,i=s.get(e),o=void 0!==i?a[i]:void 0;(void 0===o||oIo(e,t)?t:void 0));if(!o)return!1;for(const r of o){if(Ao(e,r)&&(".ts"!==r||!Ao(e,".d.ts")))return!1;const o=i(tT(e,r));if(t.has(o)||n.has(o)){if(".d.ts"===r&&(Ao(e,".js")||Ao(e,".jsx")))continue;return!0}}return!1}function AL(e,t,n,r){const i=f(n,(t=>Io(e,t)?t:void 0));if(i)for(let n=i.length-1;n>=0;n--){const o=i[n];if(Ao(e,o))return;const a=r(tT(e,o));t.delete(a)}}function IL(e){const t={};for(const n in e)if(Le(e,n)){const r=GO(n);void 0!==r&&(t[n]=OL(e[n],r))}return t}function OL(e,t){if(void 0===e)return e;switch(t.type){case"object":case"string":return"";case"number":return"number"==typeof e?e:"";case"boolean":return"boolean"==typeof e?e:"";case"listOrElement":if(!ot(e))return OL(e,t.element);case"list":const n=t.element;return ot(e)?q(e,(e=>OL(e,n))):"";default:return ld(t.type,((t,n)=>{if(t===e)return n}))}}function ML(e){switch(e.type){case"number":return 1;case"boolean":return!0;case"string":const t=e.defaultValueDescription;return e.isFilePath?`./${t&&"string"==typeof t?t:""}`:"";case"list":return[];case"listOrElement":return ML(e.element);case"object":return{};default:const n=ke(e.type.keys());return void 0!==n?n:xn.fail("Expected 'option.type' to have entries.")}}function LL(e,t,...n){e.trace(sS(t,...n))}function jL(e,t){return!!e.traceResolution&&void 0!==t.trace}function RL(e,t,n){let r;if(t&&e){const i=e.contents.packageJsonContent;"string"==typeof i.name&&"string"==typeof i.version&&(r={name:i.name,subModuleName:t.path.slice(e.packageDirectory.length+xo.length),version:i.version,peerDependencies:Xj(e,n)})}return t&&{path:t.path,extension:t.ext,packageId:r,resolvedUsingTsExtension:t.resolvedUsingTsExtension}}function BL(e){return RL(void 0,e,void 0)}function JL(e){if(e)return xn.assert(void 0===e.packageId),{path:e.path,ext:e.extension,resolvedUsingTsExtension:e.resolvedUsingTsExtension}}function zL(e){const t=[];return 1&e&&t.push("TypeScript"),2&e&&t.push("JavaScript"),4&e&&t.push("Declaration"),8&e&&t.push("JSON"),t.join(", ")}function $L(e){if(e)return xn.assert(oT(e.extension)),{fileName:e.path,packageId:e.packageId}}function qL(e,t,n,r,i,o,a,s,c){if(!a.resultFromCache&&!a.compilerOptions.preserveSymlinks&&t&&n&&!t.originalPath&&!Os(e)){const{resolvedFileName:e,originalPath:n}=ZL(t.path,a.host,a.traceEnabled);n&&(t={...t,path:e,originalPath:n})}return VL(t,n,r,i,o,a.resultFromCache,s,c)}function VL(e,t,n,r,i,o,a,s){return o?(null==a?void 0:a.isReadonly)?{...o,failedLookupLocations:WL(o.failedLookupLocations,n),affectingLocations:WL(o.affectingLocations,r),resolutionDiagnostics:WL(o.resolutionDiagnostics,i)}:(o.failedLookupLocations=KL(o.failedLookupLocations,n),o.affectingLocations=KL(o.affectingLocations,r),o.resolutionDiagnostics=KL(o.resolutionDiagnostics,i),o):{resolvedModule:e&&{resolvedFileName:e.path,originalPath:!0===e.originalPath?void 0:e.originalPath,extension:e.extension,isExternalLibraryImport:t,packageId:e.packageId,resolvedUsingTsExtension:!!e.resolvedUsingTsExtension},failedLookupLocations:UL(n),affectingLocations:UL(r),resolutionDiagnostics:UL(i),alternateResult:s}}function UL(e){return e.length?e:void 0}function KL(e,t){return(null==t?void 0:t.length)?(null==e?void 0:e.length)?(e.push(...t),e):t:e}function WL(e,t){return(null==e?void 0:e.length)?t.length?[...e,...t]:e.slice():UL(t)}function HL(e,t,n,r){if(!Le(e,t))return void(r.traceEnabled&&LL(r.host,va.package_json_does_not_have_a_0_field,t));const i=e[t];if(typeof i===n&&null!==i)return i;r.traceEnabled&&LL(r.host,va.Expected_type_of_0_field_in_package_json_to_be_1_got_2,t,n,null===i?"null":typeof i)}function GL(e,t,n,r){const i=HL(e,t,"string",r);if(void 0===i)return;if(!i)return void(r.traceEnabled&&LL(r.host,va.package_json_had_a_falsy_0_field,t));const o=Xo(Ko(n,i));return r.traceEnabled&&LL(r.host,va.package_json_has_0_field_1_that_references_2,t,i,o),o}function XL(e){yL||(yL=new Nn(c));for(const t in e){if(!Le(e,t))continue;const n=An.tryParse(t);if(void 0!==n&&n.test(yL))return{version:t,paths:e[t]}}}function QL(e,t){if(e.typeRoots)return e.typeRoots;let n;return e.configFilePath?n=Ro(e.configFilePath):t.getCurrentDirectory&&(n=t.getCurrentDirectory()),void 0!==n?function(e){let t;return ga(Xo(e),(e=>{const n=Ko(e,YL);(t??(t=[])).push(n)})),t}(n):void 0}var YL=Ko("node_modules","@types");function ZL(e,t,n){const r=Fj(e,t,n),i=function(e,t,n){return 0===ca(e,t,!("function"==typeof n.useCaseSensitiveFileNames?n.useCaseSensitiveFileNames():n.useCaseSensitiveFileNames))}(e,r,t);return{resolvedFileName:i?e:r,originalPath:i?void 0:e}}function ej(e,t,n){return Ko(e,Wt(e,"/node_modules/@types")||Wt(e,"/node_modules/@types/")?pR(t,n):t)}function tj(e,t,n,r,i,o,a){xn.assert("string"==typeof e,"Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");const s=jL(n,r);i&&(n=i.commandLine.options);const c=t?Ro(t):void 0;let l=c?null==o?void 0:o.getFromDirectoryCache(e,a,c,i):void 0;if(l||!c||Os(e)||(l=null==o?void 0:o.getFromNonRelativeNameCache(e,a,c,i)),l)return s&&(LL(r,va.Resolving_type_reference_directive_0_containing_file_1,e,t),i&&LL(r,va.Using_compiler_options_of_project_reference_redirect_0,i.sourceFile.fileName),LL(r,va.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1,e,c),S(l)),l;const u=QL(n,r);s&&(void 0===t?void 0===u?LL(r,va.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set,e):LL(r,va.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1,e,u):void 0===u?LL(r,va.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set,e,t):LL(r,va.Resolving_type_reference_directive_0_containing_file_1_root_directory_2,e,t,u),i&&LL(r,va.Using_compiler_options_of_project_reference_redirect_0,i.sourceFile.fileName));const _=[],d=[];let p=nj(n);void 0!==a&&(p|=30);const f=ES(n);99===a&&3<=f&&f<=99&&(p|=32);const m=8&p?rj(n,a):[],h=[],y={compilerOptions:n,host:r,traceEnabled:s,failedLookupLocations:_,affectingLocations:d,packageJsonInfoCache:o,features:p,conditions:m,requestContainingDirectory:c,reportDiagnostic:e=>{h.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let v,b=function(){if(u&&u.length)return s&&LL(r,va.Resolving_with_primary_search_path_0,u.join(", ")),g(u,(t=>{const i=ej(t,e,y),o=zb(t,r);if(!o&&s&&LL(r,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,t),n.typeRoots){const e=Rj(4,i,!o,y);if(e){const t=Mj(e.path);return $L(RL(t?Qj(t,!1,y):void 0,e,y))}}return $L(Vj(4,i,!o,y))}));s&&LL(r,va.Root_directory_cannot_be_determined_skipping_primary_search_paths)}(),x=!0;if(b||(b=function(){const i=t&&Ro(t);if(void 0!==i){let o;if(n.typeRoots&&Wt(t,rV))s&&LL(r,va.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder);else if(s&&LL(r,va.Looking_up_in_node_modules_folder_initial_location_0,i),Os(e)){const{path:t}=Nj(i,e);o=Aj(4,t,!1,y,!0)}else{const t=sR(4,e,i,y,void 0,void 0);o=t&&t.value}return $L(o)}s&&LL(r,va.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder)}(),x=!1),b){const{fileName:e,packageId:t}=b;let i,o=e;n.preserveSymlinks||({resolvedFileName:o,originalPath:i}=ZL(e,r,s)),v={primary:x,resolvedFileName:o,originalPath:i,packageId:t,isExternalLibraryImport:Oj(e)}}return l={resolvedTypeReferenceDirective:v,failedLookupLocations:UL(_),affectingLocations:UL(d),resolutionDiagnostics:UL(h)},c&&o&&!o.isReadonly&&(o.getOrCreateCacheForDirectory(c,i).set(e,a,l),Os(e)||o.getOrCreateCacheForNonRelativeName(e,a,i).set(c,l)),s&&S(l),l;function S(t){var n;(null==(n=t.resolvedTypeReferenceDirective)?void 0:n.resolvedFileName)?t.resolvedTypeReferenceDirective.packageId?LL(r,va.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3,e,t.resolvedTypeReferenceDirective.resolvedFileName,yd(t.resolvedTypeReferenceDirective.packageId),t.resolvedTypeReferenceDirective.primary):LL(r,va.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2,e,t.resolvedTypeReferenceDirective.resolvedFileName,t.resolvedTypeReferenceDirective.primary):LL(r,va.Type_reference_directive_0_was_not_resolved,e)}}function nj(e){let t=0;switch(ES(e)){case 3:case 99:case 100:t=30}return e.resolvePackageJsonExports?t|=8:!1===e.resolvePackageJsonExports&&(t&=-9),e.resolvePackageJsonImports?t|=2:!1===e.resolvePackageJsonImports&&(t&=-3),t}function rj(e,t){const n=ES(e);if(void 0===t)if(100===n)t=99;else if(2===n)return[];const r=99===t?["import"]:["require"];return e.noDtsResolution||r.push("types"),100!==n&&r.push("node"),Z(r,e.customConditions)}function ij(e,t,n,r,i){const o=Wj(null==i?void 0:i.getPackageJsonInfoCache(),r,n);return ga(t,(t=>{if("node_modules"!==Bo(t)){const n=Ko(t,"node_modules");return Qj(Ko(n,e),!1,o)}}))}function oj(e,t){if(e.types)return e.types;const n=[];if(t.directoryExists&&t.getDirectories){const r=QL(e,t);if(r)for(const e of r)if(t.directoryExists(e))for(const r of t.getDirectories(e)){const i=Xo(r),o=Ko(e,i,"package.json");if(!t.fileExists(o)||null!==Bb(o,t).typings){const e=Bo(i);46!==e.charCodeAt(0)&&n.push(e)}}}return n}function aj(e){return!!(null==e?void 0:e.contents)}function sj(e){return!!e&&!e.contents}function cj(e){var t;if(null===e||"object"!=typeof e)return""+e;if(ot(e))return`[${null==(t=e.map((e=>cj(e))))?void 0:t.join(",")}]`;let n="{";for(const t in e)Le(e,t)&&(n+=`${t}: ${cj(e[t])}`);return n+"}"}function lj(e,t){return t.map((t=>cj(ZS(e,t)))).join("|")+`|${e.pathsBasePath}`}function uj(e,t){const n=new Map,r=new Map;let i=new Map;return e&&n.set(e,i),{getMapOfCacheRedirects:function(e){return e?o(e.commandLine.options,!1):i},getOrCreateMapOfCacheRedirects:function(e){return e?o(e.commandLine.options,!0):i},update:function(t){e!==t&&(e?i=o(t,!0):n.set(t,i),e=t)},clear:function(){const o=e&&t.get(e);i.clear(),n.clear(),t.clear(),r.clear(),e&&(o&&t.set(e,o),n.set(e,i))},getOwnMap:()=>i};function o(t,o){let s=n.get(t);if(s)return s;const c=a(t);if(s=r.get(c),!s){if(e){const t=a(e);t===c?s=i:r.has(t)||r.set(t,i)}o&&(s??(s=new Map)),s&&r.set(c,s)}return s&&n.set(t,s),s}function a(e){let n=t.get(e);return n||t.set(e,n=lj(e,TO)),n}}function _j(e,t,n,r){const i=e.getOrCreateMapOfCacheRedirects(t);let o=i.get(n);return o||(o=r(),i.set(n,o)),o}function dj(e,t){return void 0===t?e:`${t}|${e}`}function pj(){const e=new Map,t=new Map,n={get:(t,n)=>e.get(r(t,n)),set:(t,i,o)=>(e.set(r(t,i),o),n),delete:(t,i)=>(e.delete(r(t,i)),n),has:(t,n)=>e.has(r(t,n)),forEach:n=>e.forEach(((e,r)=>{const[i,o]=t.get(r);return n(e,i,o)})),size:()=>e.size};return n;function r(e,n){const r=dj(e,n);return t.set(r,[e,n]),r}}function fj(e){return e.resolvedModule&&(e.resolvedModule.originalPath||e.resolvedModule.resolvedFileName)}function mj(e){return e.resolvedTypeReferenceDirective&&(e.resolvedTypeReferenceDirective.originalPath||e.resolvedTypeReferenceDirective.resolvedFileName)}function gj(e,t,n,r,i,o){o??(o=new Map);const a=function(e,t,n,r){const i=uj(n,r);return{getFromDirectoryCache:function(n,r,o,a){var s,c;const l=Yo(o,e,t);return null==(c=null==(s=i.getMapOfCacheRedirects(a))?void 0:s.get(l))?void 0:c.get(n,r)},getOrCreateCacheForDirectory:function(n,r){const o=Yo(n,e,t);return _j(i,r,o,(()=>pj()))},clear:function(){i.clear()},update:function(e){i.update(e)},directoryToModuleNameMap:i}}(e,t,n,o),s=function(e,t,n,r,i){const o=uj(n,i);return{getFromNonRelativeNameCache:function(e,t,n,r){var i,a;return xn.assert(!Os(e)),null==(a=null==(i=o.getMapOfCacheRedirects(r))?void 0:i.get(dj(e,t)))?void 0:a.get(n)},getOrCreateCacheForNonRelativeName:function(e,t,n){return xn.assert(!Os(e)),_j(o,n,dj(e,t),a)},clear:function(){o.clear()},update:function(e){o.update(e)}};function a(){const n=new Map;return{get:function(r){return n.get(Yo(r,e,t))},set:function(i,o){const a=Yo(i,e,t);if(n.has(a))return;n.set(a,o);const s=r(o),c=s&&function(n,r){const i=Yo(Ro(r),e,t);let o=0;const a=Math.min(n.length,i.length);for(;or,clearAllExceptPackageJsonInfoCache:c,optionsToRedirectsKey:o};function c(){a.clear(),s.clear()}}function hj(e,t,n,r,i){const o=gj(e,t,n,r,fj,i);return o.getOrCreateCacheForModuleName=(e,t,n)=>o.getOrCreateCacheForNonRelativeName(e,t,n),o}function yj(e,t,n,r,i){return gj(e,t,n,r,mj,i)}function vj(e){return{moduleResolution:2,traceResolution:e.traceResolution}}function bj(e,t,n,r,i){return Sj(e,t,vj(n),r,i)}function xj(e,t,n,r){const i=Ro(t);return n.getFromDirectoryCache(e,r,i,void 0)}function Sj(e,t,n,r,i,o,a){var s,c,l;const u=jL(n,r);o&&(n=o.commandLine.options),u&&(LL(r,va.Resolving_module_0_from_1,e,t),o&&LL(r,va.Using_compiler_options_of_project_reference_redirect_0,o.sourceFile.fileName));const _=Ro(t);let d=null==i?void 0:i.getFromDirectoryCache(e,a,_,o);if(d)u&&LL(r,va.Resolution_for_module_0_was_found_in_cache_from_location_1,e,_);else{let p=n.moduleResolution;switch(void 0===p?(p=ES(n),u&&LL(r,va.Module_resolution_kind_is_not_specified_using_0,bi[p])):u&&LL(r,va.Explicitly_specified_module_resolution_kind_Colon_0,bi[p]),null==(s=tr)||s.logStartResolveModule(e),p){case 3:case 99:d=function(e,t,n,r,i,o,a){return function(e,t,n,r,i,o,a,s,c){const l=Ro(n),u=99===s?32:0;let _=r.noDtsResolution?3:7;return MS(r)&&(_|=8),Pj(e|u,t,l,r,i,o,_,!1,a,c)}(30,e,t,n,r,i,o,a)}(e,t,n,r,i,o,a);break;case 2:d=Dj(e,t,n,r,i,o,a?rj(n,a):void 0);break;case 1:d=vR(e,t,n,r,i,o);break;case 100:d=wj(e,t,n,r,i,o,a?rj(n,a):void 0);break;default:return xn.fail(`Unexpected moduleResolution: ${p}`)}d&&d.resolvedModule&&(null==(c=tr)||c.logInfoEvent(`Module "${e}" resolved to "${d.resolvedModule.resolvedFileName}"`)),null==(l=tr)||l.logStopResolveModule(d&&d.resolvedModule?""+d.resolvedModule.resolvedFileName:"null"),i&&!i.isReadonly&&(i.getOrCreateCacheForDirectory(_,o).set(e,a,d),Os(e)||i.getOrCreateCacheForNonRelativeName(e,a,o).set(_,d))}return u&&(d.resolvedModule?d.resolvedModule.packageId?LL(r,va.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2,e,d.resolvedModule.resolvedFileName,yd(d.resolvedModule.packageId)):LL(r,va.Module_name_0_was_successfully_resolved_to_1,e,d.resolvedModule.resolvedFileName):LL(r,va.Module_name_0_was_not_resolved,e)),d}function kj(e,t,n,r,i){const o=function(e,t,n,r){var i;const{baseUrl:o,paths:a,configFile:s}=r.compilerOptions;if(a&&!Po(t))return r.traceEnabled&&(o&&LL(r.host,va.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,o,t),LL(r.host,va.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0,t)),_R(e,t,rv(r.compilerOptions,r.host),a,(null==s?void 0:s.configFileSpecs)?(i=s.configFileSpecs).pathPatterns||(i.pathPatterns=rT(a)):void 0,n,!1,r)}(e,t,r,i);return o?o.value:Os(t)?function(e,t,n,r,i){if(!i.compilerOptions.rootDirs)return;i.traceEnabled&&LL(i.host,va.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,t);const o=Xo(Ko(n,t));let a,s;for(const e of i.compilerOptions.rootDirs){let t=Xo(e);Wt(t,xo)||(t+=xo);const n=an(o,t)&&(void 0===s||s.length(e[e.None=0]="None",e[e.Imports=2]="Imports",e[e.SelfName=4]="SelfName",e[e.Exports=8]="Exports",e[e.ExportsPatternTrailers=16]="ExportsPatternTrailers",e[e.AllFeatures=30]="AllFeatures",e[e.Node16Default=30]="Node16Default",e[e.NodeNextDefault=30]="NodeNextDefault",e[e.BundlerDefault=30]="BundlerDefault",e[e.EsmMode=32]="EsmMode",e))(Cj||{});function wj(e,t,n,r,i,o,a){const s=Ro(t);let c=n.noDtsResolution?3:7;return MS(n)&&(c|=8),Pj(nj(n),e,s,n,r,i,c,!1,o,a)}function Dj(e,t,n,r,i,o,a,s){let c;return s?c=8:n.noDtsResolution?(c=3,MS(n)&&(c|=8)):c=MS(n)?15:7,Pj(a?30:0,e,Ro(t),n,r,i,c,!!s,o,a)}function Ej(e,t,n){return Pj(30,e,Ro(t),{moduleResolution:99},n,void 0,8,!0,void 0,void 0)}function Pj(e,t,n,r,i,o,a,s,c,l){var _,d,f,m,g;const h=jL(r,i),y=[],v=[],b=ES(r);l??(l=rj(r,100===b||2===b?void 0:32&e?99:1));const S=[],k={compilerOptions:r,host:i,traceEnabled:h,failedLookupLocations:y,affectingLocations:v,packageJsonInfoCache:o,features:e,conditions:l??u,requestContainingDirectory:n,reportDiagnostic:e=>{S.push(e)},isConfigLookup:s,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let T,C;if(h&&KS(b)&&LL(i,va.Resolving_in_0_mode_with_conditions_1,32&e?"ESM":"CJS",k.conditions.map((e=>`'${e}'`)).join(", ")),2===b){const e=5&a,t=-6&a;T=e&&w(e,k)||t&&w(t,k)||void 0}else T=w(a,k);if(k.resolvedPackageDirectory&&!s&&!Os(t)){const t=(null==T?void 0:T.value)&&5&a&&!Zj(5,T.value.resolved.extension);if((null==(_=null==T?void 0:T.value)?void 0:_.isExternalLibraryImport)&&t&&8&e&&(null==l?void 0:l.includes("import"))){TR(k,va.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);const e=w(5&a,{...k,features:-9&k.features,reportDiagnostic:_t});(null==(d=null==e?void 0:e.value)?void 0:d.isExternalLibraryImport)&&(C=e.value.resolved.path)}else if((!(null==T?void 0:T.value)||t)&&2===b){TR(k,va.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);const e={...k.compilerOptions,moduleResolution:100},t=w(5&a,{...k,compilerOptions:e,features:30,conditions:rj(e),reportDiagnostic:_t});(null==(f=null==t?void 0:t.value)?void 0:f.isExternalLibraryImport)&&(C=t.value.resolved.path)}}return qL(t,null==(m=null==T?void 0:T.value)?void 0:m.resolved,null==(g=null==T?void 0:T.value)?void 0:g.isExternalLibraryImport,y,v,S,k,o,C);function w(r,a){const s=kj(r,t,n,((e,t,n,r)=>Aj(e,t,n,r,!0)),a);if(s)return kR({resolved:s,isExternalLibraryImport:Oj(s.path)});if(Os(t)){const{path:e,parts:i}=Nj(n,t),o=Aj(r,e,!1,a,!0);return o&&kR({resolved:o,isExternalLibraryImport:D(i,"node_modules")})}{let s;if(2&e&&an(t,"#")&&(s=function(e,t,n,r,i,o){var a,s;if("#"===t||an(t,"#/"))return r.traceEnabled&&LL(r.host,va.Invalid_import_specifier_0_has_no_possible_resolutions,t),kR(void 0);const c=Go(Ko(n,"dummy"),null==(s=(a=r.host).getCurrentDirectory)?void 0:s.call(a)),l=Hj(c,r);if(!l)return r.traceEnabled&&LL(r.host,va.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve,c),kR(void 0);if(!l.contents.packageJsonContent.imports)return r.traceEnabled&&LL(r.host,va.package_json_scope_0_has_no_imports_defined,l.packageDirectory),kR(void 0);const u=iR(e,r,i,o,t,l.contents.packageJsonContent.imports,l,!0);return u||(r.traceEnabled&&LL(r.host,va.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1,t,l.packageDirectory),kR(void 0))}(r,t,n,a,o,c)),!s&&4&e&&(s=function(e,t,n,r,i,o){var a,s;const c=Hj(Go(Ko(n,"dummy"),null==(s=(a=r.host).getCurrentDirectory)?void 0:s.call(a)),r);if(!c||!c.contents.packageJsonContent.exports)return;if("string"!=typeof c.contents.packageJsonContent.name)return;const l=$o(t),u=$o(c.contents.packageJsonContent.name);if(!x(u,((e,t)=>l[t]===e)))return;const _=l.slice(u.length),d=p(_)?`.${xo}${_.join(xo)}`:".";if(JS(r.compilerOptions)&&!Oj(n))return nR(c,e,d,r,i,o);const f=-6&e;return nR(c,5&e,d,r,i,o)||nR(c,f,d,r,i,o)}(r,t,n,a,o,c)),!s){if(t.includes(":"))return void(h&&LL(i,va.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1,t,zL(r)));h&&LL(i,va.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1,t,zL(r)),s=sR(r,t,n,a,o,c)}return 4&r&&(s??(s=bR(t,a))),s&&{value:s.value&&{resolved:s.value,isExternalLibraryImport:!0}}}}}function Nj(e,t){const n=Ko(e,t),r=$o(n),i=we(r);return{path:"."===i||".."===i?ea(Xo(n)):Xo(n),parts:r}}function Fj(e,t,n){if(!t.realpath)return e;const r=Xo(t.realpath(e));return n&&LL(t,va.Resolving_real_path_for_0_result_1,e,r),r}function Aj(e,t,n,r,i){if(r.traceEnabled&&LL(r.host,va.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1,t,zL(e)),!Oo(t)){if(!n){const e=Ro(t);zb(e,r.host)||(r.traceEnabled&&LL(r.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,e),n=!0)}const o=Rj(e,t,n,r);if(o){const e=i?Mj(o.path):void 0;return RL(e?Qj(e,!1,r):void 0,o,r)}}if(n||zb(t,r.host)||(r.traceEnabled&&LL(r.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,t),n=!0),!(32&r.features))return Vj(e,t,n,r,i)}var Ij="/node_modules/";function Oj(e){return e.includes(Ij)}function Mj(e,t){const n=Xo(e),r=n.lastIndexOf(Ij);if(-1===r)return;const i=r+Ij.length;let o=Lj(n,i,t);return 64===n.charCodeAt(i)&&(o=Lj(n,o,t)),n.slice(0,o)}function Lj(e,t,n){const r=e.indexOf(xo,t+1);return-1===r?n?e.length:t:r}function jj(e,t,n,r){return BL(Rj(e,t,n,r))}function Rj(e,t,n,r){const i=Bj(e,t,n,r);if(i)return i;if(!(32&r.features)){const i=zj(t,e,"",n,r);if(i)return i}}function Bj(e,t,n,r){if(!Bo(t).includes("."))return;let i=Yk(t);i===t&&(i=t.substring(0,t.lastIndexOf(".")));const o=t.substring(i.length);return r.traceEnabled&&LL(r.host,va.File_name_0_has_a_1_extension_stripping_it,t,o),zj(i,e,o,n,r)}function Jj(e,t,n,r){return 1&e&&Io(t,Bk)||4&e&&Io(t,Rk)?void 0!==$j(t,n,r)?{path:t,ext:Ib(t),resolvedUsingTsExtension:void 0}:void 0:r.isConfigLookup&&8===e&&Ao(t,".json")?void 0!==$j(t,n,r)?{path:t,ext:".json",resolvedUsingTsExtension:void 0}:void 0:Bj(e,t,n,r)}function zj(e,t,n,r,i){if(!r){const t=Ro(e);t&&(r=!zb(t,i.host))}switch(n){case".mjs":case".mts":case".d.mts":return 1&t&&o(".mts",".mts"===n||".d.mts"===n)||4&t&&o(".d.mts",".mts"===n||".d.mts"===n)||2&t&&o(".mjs")||void 0;case".cjs":case".cts":case".d.cts":return 1&t&&o(".cts",".cts"===n||".d.cts"===n)||4&t&&o(".d.cts",".cts"===n||".d.cts"===n)||2&t&&o(".cjs")||void 0;case".json":return 4&t&&o(".d.json.ts")||8&t&&o(".json")||void 0;case".tsx":case".jsx":return 1&t&&(o(".tsx",".tsx"===n)||o(".ts",".tsx"===n))||4&t&&o(".d.ts",".tsx"===n)||2&t&&(o(".jsx")||o(".js"))||void 0;case".ts":case".d.ts":case".js":case"":return 1&t&&(o(".ts",".ts"===n||".d.ts"===n)||o(".tsx",".ts"===n||".d.ts"===n))||4&t&&o(".d.ts",".ts"===n||".d.ts"===n)||2&t&&(o(".js")||o(".jsx"))||i.isConfigLookup&&o(".json")||void 0;default:return 4&t&&!QI(e+n)&&o(`.d${n}.ts`)||void 0}function o(t,n){const o=$j(e+t,r,i);return void 0===o?void 0:{path:o,ext:t,resolvedUsingTsExtension:!i.candidateIsFromPackageJsonField&&n}}}function $j(e,t,n){var r;if(!(null==(r=n.compilerOptions.moduleSuffixes)?void 0:r.length))return qj(e,t,n);const i=lT(e)??"",o=i?eT(e,i):e;return f(n.compilerOptions.moduleSuffixes,(e=>qj(o+e+i,t,n)))}function qj(e,t,n){var r;if(!t){if(n.host.fileExists(e))return n.traceEnabled&&LL(n.host,va.File_0_exists_use_it_as_a_name_resolution_result,e),e;n.traceEnabled&&LL(n.host,va.File_0_does_not_exist,e)}null==(r=n.failedLookupLocations)||r.push(e)}function Vj(e,t,n,r,i=!0){const o=i?Qj(t,n,r):void 0;return RL(o,Yj(e,t,n,r,o&&o.contents.packageJsonContent,o&&Gj(o,r)),r)}function Uj(e,t,n,r,i){if(!i&&void 0!==e.contents.resolvedEntrypoints)return e.contents.resolvedEntrypoints;let o;const a=5|(i?2:0),s=nj(t),c=Wj(null==r?void 0:r.getPackageJsonInfoCache(),n,t);c.conditions=rj(t),c.requestContainingDirectory=e.packageDirectory;const l=Yj(a,e.packageDirectory,!1,c,e.contents.packageJsonContent,Gj(e,c));if(o=ue(o,null==l?void 0:l.path),8&s&&e.contents.packageJsonContent.exports){const r=ne([rj(t,99),rj(t,1)],se);for(const t of r){const r={...c,failedLookupLocations:[],conditions:t,host:n},i=Kj(e,e.contents.packageJsonContent.exports,r,a);if(i)for(const e of i)o=me(o,e.path)}}return e.contents.resolvedEntrypoints=o||!1}function Kj(e,t,n,r){let i;if(ot(t))for(const e of t)o(e);else if("object"==typeof t&&null!==t&&tR(t))for(const e in t)o(t[e]);else o(t);return i;function o(t){var a,s;if("string"==typeof t&&an(t,"./"))if(t.includes("*")&&n.host.readDirectory){if(t.indexOf("*")!==t.lastIndexOf("*"))return!1;n.host.readDirectory(e.packageDirectory,function(e){const t=[];return 1&e&&t.push(...Bk),2&e&&t.push(...Mk),4&e&&t.push(...Rk),8&e&&t.push(".json"),t}(r),void 0,[ra(bC(t,"**/*"),".*")]).forEach((e=>{i=me(i,{path:e,ext:zo(e),resolvedUsingTsExtension:void 0})}))}else{const o=$o(t).slice(2);if(o.includes("..")||o.includes(".")||o.includes("node_modules"))return!1;const c=Go(Ko(e.packageDirectory,t),null==(s=(a=n.host).getCurrentDirectory)?void 0:s.call(a)),l=Jj(r,c,!1,n);if(l)return i=me(i,l,((e,t)=>e.path===t.path)),!0}else if(Array.isArray(t)){for(const e of t)if(o(e))return!0}else if("object"==typeof t&&null!==t)return f(Re(t),(e=>{if("default"===e||D(n.conditions,e)||aR(n.conditions,e))return o(t[e]),!0}))}}function Wj(e,t,n){return{host:t,compilerOptions:n,traceEnabled:jL(n,t),failedLookupLocations:void 0,affectingLocations:void 0,packageJsonInfoCache:e,features:0,conditions:u,requestContainingDirectory:void 0,reportDiagnostic:_t,isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1}}function Hj(e,t){const n=$o(e);for(n.pop();n.length>0;){const e=Qj(qo(n),!1,t);if(e)return e;n.pop()}}function Gj(e,t){return void 0===e.contents.versionPaths&&(e.contents.versionPaths=function(e,t){const n=function(e,t){const n=HL(e,"typesVersions","object",t);if(void 0!==n)return t.traceEnabled&&LL(t.host,va.package_json_has_a_typesVersions_field_with_version_specific_path_mappings),n}(e,t);if(void 0===n)return;if(t.traceEnabled)for(const e in n)Le(n,e)&&!An.tryParse(e)&&LL(t.host,va.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,e);const r=XL(n);if(!r)return void(t.traceEnabled&&LL(t.host,va.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0,s));const{version:i,paths:o}=r;if("object"==typeof o)return r;t.traceEnabled&&LL(t.host,va.Expected_type_of_0_field_in_package_json_to_be_1_got_2,`typesVersions['${i}']`,"object",typeof o)}(e.contents.packageJsonContent,t)||!1),e.contents.versionPaths||void 0}function Xj(e,t){return void 0===e.contents.peerDependencies&&(e.contents.peerDependencies=function(e,t){const n=HL(e.contents.packageJsonContent,"peerDependencies","object",t);if(void 0===n)return;t.traceEnabled&&LL(t.host,va.package_json_has_a_peerDependencies_field);const r=Fj(e.packageDirectory,t.host,t.traceEnabled),i=r.substring(0,r.lastIndexOf("node_modules")+"node_modules".length)+xo;let o="";for(const e in n)if(Le(n,e)){const n=Qj(i+e,!1,t);if(n){const r=n.contents.packageJsonContent.version;o+=`+${e}@${r}`,t.traceEnabled&&LL(t.host,va.Found_peerDependency_0_with_1_version,e,r)}else t.traceEnabled&&LL(t.host,va.Failed_to_find_peerDependency_0,e)}return o}(e,t)||!1),e.contents.peerDependencies||void 0}function Qj(e,t,n){var r,i,o,a,s,c;const{host:l,traceEnabled:u}=n,_=Ko(e,"package.json");if(t)return void(null==(r=n.failedLookupLocations)||r.push(_));const d=null==(i=n.packageJsonInfoCache)?void 0:i.getPackageJsonInfo(_);if(void 0!==d)return aj(d)?(u&&LL(l,va.File_0_exists_according_to_earlier_cached_lookups,_),null==(o=n.affectingLocations)||o.push(_),d.packageDirectory===e?d:{packageDirectory:e,contents:d.contents}):(d.directoryExists&&u&&LL(l,va.File_0_does_not_exist_according_to_earlier_cached_lookups,_),void(null==(a=n.failedLookupLocations)||a.push(_)));const p=zb(e,l);if(p&&l.fileExists(_)){const t=Bb(_,l);u&&LL(l,va.Found_package_json_at_0,_);const r={packageDirectory:e,contents:{packageJsonContent:t,versionPaths:void 0,resolvedEntrypoints:void 0,peerDependencies:void 0}};return n.packageJsonInfoCache&&!n.packageJsonInfoCache.isReadonly&&n.packageJsonInfoCache.setPackageJsonInfo(_,r),null==(s=n.affectingLocations)||s.push(_),r}p&&u&&LL(l,va.File_0_does_not_exist,_),n.packageJsonInfoCache&&!n.packageJsonInfoCache.isReadonly&&n.packageJsonInfoCache.setPackageJsonInfo(_,{packageDirectory:e,directoryExists:p}),null==(c=n.failedLookupLocations)||c.push(_)}function Yj(e,t,n,r,i,o){let a;i&&(a=r.isConfigLookup?function(e,t,n){return GL(e,"tsconfig",t,n)}(i,t,r):4&e&&function(e,t,n){return GL(e,"typings",t,n)||GL(e,"types",t,n)}(i,t,r)||7&e&&function(e,t,n){return GL(e,"main",t,n)}(i,t,r)||void 0);const s=(e,t,n,r)=>{const o=Jj(e,t,n,r);if(o)return BL(o);const a=4===e?5:e,s=r.features,c=r.candidateIsFromPackageJsonField;r.candidateIsFromPackageJsonField=!0,"module"!==(null==i?void 0:i.type)&&(r.features&=-33);const l=Aj(a,t,n,r,!1);return r.features=s,r.candidateIsFromPackageJsonField=c,l},l=a?!zb(Ro(a),r.host):void 0,u=n||!zb(t,r.host),_=Ko(t,r.isConfigLookup?"tsconfig":"index");if(o&&(!a||la(t,a))){const n=da(t,a||_,!1);r.traceEnabled&&LL(r.host,va.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,o.version,c,n);const i=_R(e,n,t,o.paths,void 0,s,l||u,r);if(i)return JL(i.value)}return a&&JL(s(e,a,l,r))||(32&r.features?void 0:Rj(e,_,u,r))}function Zj(e,t){return 2&e&&(".js"===t||".jsx"===t||".mjs"===t||".cjs"===t)||1&e&&(".ts"===t||".tsx"===t||".mts"===t||".cts"===t)||4&e&&(".d.ts"===t||".d.mts"===t||".d.cts"===t)||8&e&&".json"===t||!1}function eR(e){let t=e.indexOf(xo);return"@"===e[0]&&(t=e.indexOf(xo,t+1)),-1===t?{packageName:e,rest:""}:{packageName:e.slice(0,t),rest:e.slice(t+1)}}function tR(e){return x(Re(e),(e=>an(e,".")))}function nR(e,t,n,r,i,o){if(e.contents.packageJsonContent.exports){if("."===n){let a;if("string"==typeof e.contents.packageJsonContent.exports||Array.isArray(e.contents.packageJsonContent.exports)||"object"==typeof e.contents.packageJsonContent.exports&&!Q(Re(e.contents.packageJsonContent.exports),(e=>an(e,".")))?a=e.contents.packageJsonContent.exports:Le(e.contents.packageJsonContent.exports,".")&&(a=e.contents.packageJsonContent.exports["."]),a)return oR(t,r,i,o,n,e,!1)(a,"",!1,".")}else if(tR(e.contents.packageJsonContent.exports)){if("object"!=typeof e.contents.packageJsonContent.exports)return r.traceEnabled&&LL(r.host,va.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,n,e.packageDirectory),kR(void 0);const a=iR(t,r,i,o,n,e.contents.packageJsonContent.exports,e,!1);if(a)return a}return r.traceEnabled&&LL(r.host,va.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,n,e.packageDirectory),kR(void 0)}}function rR(e,t){const n=e.indexOf("*"),r=t.indexOf("*"),i=-1===n?e.length:n+1,o=-1===r?t.length:r+1;return i>o?-1:o>i||-1===n?1:-1===r||e.length>t.length?-1:t.length>e.length?1:0}function iR(e,t,n,r,i,o,a,s){const c=oR(e,t,n,r,i,a,s);if(!Wt(i,xo)&&!i.includes("*")&&Le(o,i))return c(o[i],"",!1,i);const l=he(F(Re(o),(e=>function(e){const t=e.indexOf("*");return-1!==t&&t===e.lastIndexOf("*")}(e)||Wt(e,"/"))),rR);for(const e of l){if(16&t.features&&u(e,i)){const t=o[e],n=e.indexOf("*");return c(t,i.substring(e.substring(0,n).length,i.length-(e.length-1-n)),!0,e)}if(Wt(e,"*")&&an(i,e.substring(0,e.length-1)))return c(o[e],i.substring(e.length-1),!0,e);if(an(i,e))return c(o[e],i.substring(e.length),!1,e)}function u(e,t){if(Wt(e,"*"))return!1;const n=e.indexOf("*");return-1!==n&&an(t,e.substring(0,n))&&Wt(t,e.substring(n+1))}}function oR(e,t,n,r,i,o,a){return function s(c,l,u,_){if("string"==typeof c){if(!u&&l.length>0&&!Wt(c,"/"))return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);if(!an(c,"./")){if(a&&!an(c,"../")&&!an(c,"/")&&!wo(c)){const i=u?c.replace(/\*/g,l):c+l;TR(t,va.Using_0_subpath_1_with_target_2,"imports",_,i),TR(t,va.Resolving_module_0_from_1,i,o.packageDirectory+"/");const a=Pj(t.features,i,o.packageDirectory+"/",t.compilerOptions,t.host,n,e,!1,r,t.conditions);return kR(a.resolvedModule?{path:a.resolvedModule.resolvedFileName,extension:a.resolvedModule.extension,packageId:a.resolvedModule.packageId,originalPath:a.resolvedModule.originalPath,resolvedUsingTsExtension:a.resolvedModule.resolvedUsingTsExtension}:void 0)}return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0)}const s=(Po(c)?$o(c).slice(1):$o(c)).slice(1);if(s.includes("..")||s.includes(".")||s.includes("node_modules"))return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);const p=Ko(o.packageDirectory,c),m=$o(l);if(m.includes("..")||m.includes(".")||m.includes("node_modules"))return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);t.traceEnabled&&LL(t.host,va.Using_0_subpath_1_with_target_2,a?"imports":"exports",_,u?c.replace(/\*/g,l):c+l);const g=d(u?p.replace(/\*/g,l):p+l),h=function(n,r,i,a){var s,c,l,u;if(!t.isConfigLookup&&(t.compilerOptions.declarationDir||t.compilerOptions.outDir)&&!n.includes("/node_modules/")&&(!t.compilerOptions.configFile||la(o.packageDirectory,d(t.compilerOptions.configFile.fileName),!CR(t)))){const p=Wy({useCaseSensitiveFileNames:()=>CR(t)}),f=[];if(t.compilerOptions.rootDir||t.compilerOptions.composite&&t.compilerOptions.configFilePath){const e=d($$(t.compilerOptions,(()=>[]),(null==(c=(s=t.host).getCurrentDirectory)?void 0:c.call(s))||"",p));f.push(e)}else if(t.requestContainingDirectory){const e=d(Ko(t.requestContainingDirectory,"index.ts")),n=d($$(t.compilerOptions,(()=>[e,d(i)]),(null==(u=(l=t.host).getCurrentDirectory)?void 0:u.call(l))||"",p));f.push(n);let r=ea(n);for(;r&&r.length>1;){const e=$o(r);e.pop();const t=qo(e);f.unshift(t),r=ea(t)}}f.length>1&&t.reportDiagnostic(cS(a?va.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:va.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate,""===r?".":r,i));for(const r of f){const i=_(r);for(const a of i)if(la(a,n,!CR(t))){const i=Ko(r,n.slice(a.length+1)),s=[".mjs",".cjs",".js",".json",".d.mts",".d.cts",".d.ts"];for(const n of s)if(Ao(i,n)){const r=nv(i);for(const a of r){if(!Zj(e,a))continue;const r=na(i,a,n,!CR(t));if(t.host.fileExists(r))return kR(RL(o,Jj(e,r,!1,t),t))}}}}}return;function _(e){var n,r;const i=t.compilerOptions.configFile?(null==(r=(n=t.host).getCurrentDirectory)?void 0:r.call(n))||"":e,o=[];return t.compilerOptions.declarationDir&&o.push(d(f(i,t.compilerOptions.declarationDir))),t.compilerOptions.outDir&&t.compilerOptions.outDir!==t.compilerOptions.declarationDir&&o.push(d(f(i,t.compilerOptions.outDir))),o}}(g,l,Ko(o.packageDirectory,"package.json"),a);return h||kR(RL(o,Jj(e,g,!1,t),t))}if("object"==typeof c&&null!==c){if(!Array.isArray(c)){TR(t,va.Entering_conditional_exports);for(const e of Re(c))if("default"===e||t.conditions.includes(e)||aR(t.conditions,e)){TR(t,va.Matched_0_condition_1,a?"imports":"exports",e);const n=s(c[e],l,u,_);if(n)return TR(t,va.Resolved_under_condition_0,e),TR(t,va.Exiting_conditional_exports),n;TR(t,va.Failed_to_resolve_under_condition_0,e)}else TR(t,va.Saw_non_matching_condition_0,e);return void TR(t,va.Exiting_conditional_exports)}if(!p(c))return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);for(const e of c){const t=s(e,l,u,_);if(t)return t}}else if(null===c)return t.traceEnabled&&LL(t.host,va.package_json_scope_0_explicitly_maps_specifier_1_to_null,o.packageDirectory,i),kR(void 0);return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);function d(e){var n,r;return void 0===e?e:Go(e,null==(r=(n=t.host).getCurrentDirectory)?void 0:r.call(n))}function f(e,t){return ea(Ko(e,t))}}}function aR(e,t){if(!e.includes("types"))return!1;if(!an(t,"types@"))return!1;const n=An.tryParse(t.substring("types@".length));return!!n&&n.test(c)}function sR(e,t,n,r,i,o){return cR(e,t,n,r,!1,i,o)}function cR(e,t,n,r,i,o,a){const s=0===r.features?void 0:32&r.features?99:1,c=5&e,l=-6&e;if(c){TR(r,va.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0,zL(c));const e=u(c);if(e)return e}if(l&&!i)return TR(r,va.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0,zL(l)),u(l);function u(e){return ga(Vo(n),(n=>{if("node_modules"!==Bo(n)){return yR(o,t,s,n,a,r)||kR(lR(e,t,n,r,i,o,a))}}))}}function lR(e,t,n,r,i,o,a){const s=Ko(n,"node_modules"),c=zb(s,r.host);if(!c&&r.traceEnabled&&LL(r.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,s),!i){const n=uR(e,t,s,c,r,o,a);if(n)return n}if(4&e){const e=Ko(s,"@types");let n=c;return c&&!zb(e,r.host)&&(r.traceEnabled&&LL(r.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,e),n=!1),uR(4,pR(t,r),e,n,r,o,a)}}function uR(e,t,n,r,i,o,a){var s,l;const _=Xo(Ko(n,t)),{packageName:d,rest:p}=eR(t),f=Ko(n,d);let m,g=Qj(_,!r,i);if(""!==p&&g&&(!(8&i.features)||!Le((null==(s=m=Qj(f,!r,i))?void 0:s.contents.packageJsonContent)??u,"exports"))){const t=Rj(e,_,!r,i);if(t)return BL(t);const n=Yj(e,_,!r,i,g.contents.packageJsonContent,Gj(g,i));return RL(g,n,i)}const h=(e,t,n,r)=>{let i=(p||!(32&r.features))&&Rj(e,t,n,r)||Yj(e,t,n,r,g&&g.contents.packageJsonContent,g&&Gj(g,r));return!i&&g&&(void 0===g.contents.packageJsonContent.exports||null===g.contents.packageJsonContent.exports)&&32&r.features&&(i=Rj(e,Ko(t,"index.js"),n,r)),RL(g,i,r)};if(""!==p&&(g=m??Qj(f,!r,i)),g&&(i.resolvedPackageDirectory=!0),g&&g.contents.packageJsonContent.exports&&8&i.features)return null==(l=nR(g,e,Ko(".",p),i,o,a))?void 0:l.value;const y=""!==p&&g?Gj(g,i):void 0;if(y){i.traceEnabled&&LL(i.host,va.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,y.version,c,p);const t=r&&zb(f,i.host),n=_R(e,p,f,y.paths,void 0,h,!t,i);if(n)return n.value}return h(e,_,!r,i)}function _R(e,t,n,r,i,o,a,s){i||(i=rT(r));const c=dT(i,t);if(c){const i=st(c)?void 0:rn(c,t),l=st(c)?c:nn(c);return s.traceEnabled&&LL(s.host,va.Module_name_0_matched_pattern_1,t,l),{value:f(r[l],(t=>{const r=i?bC(t,i):t,c=Xo(Ko(n,r));s.traceEnabled&&LL(s.host,va.Trying_substitution_0_candidate_module_location_Colon_1,t,r);const l=lT(t);if(void 0!==l){const e=$j(c,a,s);if(void 0!==e)return BL({path:e,ext:l,resolvedUsingTsExtension:void 0})}return o(e,c,a||!zb(Ro(c),s.host),s)}))}}}var dR="__";function pR(e,t){const n=mR(e);return t.traceEnabled&&n!==e&&LL(t.host,va.Scoped_package_detected_looking_in_0,n),n}function fR(e){return`@types/${mR(e)}`}function mR(e){if(an(e,"@")){const t=e.replace(xo,dR);if(t!==e)return t.slice(1)}return e}function gR(e){const t=sn(e,"@types/");return t!==e?hR(t):e}function hR(e){return e.includes(dR)?"@"+e.replace(dR,xo):e}function yR(e,t,n,r,i,o){const a=e&&e.getFromNonRelativeNameCache(t,n,r,i);if(a)return o.traceEnabled&&LL(o.host,va.Resolution_for_module_0_was_found_in_cache_from_location_1,t,r),o.resultFromCache=a,{value:a.resolvedModule&&{path:a.resolvedModule.resolvedFileName,originalPath:a.resolvedModule.originalPath||!0,extension:a.resolvedModule.extension,packageId:a.resolvedModule.packageId,resolvedUsingTsExtension:a.resolvedModule.resolvedUsingTsExtension}}}function vR(e,t,n,r,i,o){const a=jL(n,r),s=[],c=[],l=Ro(t),u=[],_={compilerOptions:n,host:r,traceEnabled:a,failedLookupLocations:s,affectingLocations:c,packageJsonInfoCache:i,features:0,conditions:[],requestContainingDirectory:l,reportDiagnostic:e=>{u.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},d=p(5)||p(2|(n.resolveJsonModule?8:0));return qL(e,d&&d.value,(null==d?void 0:d.value)&&Oj(d.value.path),s,c,u,_,i);function p(t){const n=kj(t,e,l,jj,_);if(n)return{value:n};if(Os(e)){const n=Xo(Ko(l,e));return kR(jj(t,n,!1,_))}{const n=ga(l,(n=>{const r=yR(i,e,void 0,n,o,_);if(r)return r;const a=Xo(Ko(n,e));return kR(jj(t,a,!1,_))}));if(n)return n;if(5&t){let n=function(e,t,n){return cR(4,e,t,n,!0,void 0,void 0)}(e,l,_);return 4&t&&(n??(n=bR(e,_))),n}}}}function bR(e,t){if(t.compilerOptions.typeRoots)for(const n of t.compilerOptions.typeRoots){const r=ej(n,e,t),i=zb(n,t.host);!i&&t.traceEnabled&&LL(t.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,n);const o=Rj(4,r,!i,t);if(o){const e=Mj(o.path);return kR(RL(e?Qj(e,!1,t):void 0,o,t))}const a=Vj(4,r,!i,t);if(a)return kR(a)}}function xR(e,t){return!!e.allowImportingTsExtensions||t&&QI(t)}function SR(e,t,n,r,i,o){const a=jL(n,r);a&&LL(r,va.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,t,e,i);const s=[],c=[],l=[],u={compilerOptions:n,host:r,traceEnabled:a,failedLookupLocations:s,affectingLocations:c,packageJsonInfoCache:o,features:0,conditions:[],requestContainingDirectory:void 0,reportDiagnostic:e=>{l.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};return VL(lR(4,e,i,u,!1,void 0,void 0),!0,s,c,l,u.resultFromCache,void 0)}function kR(e){return void 0!==e?{value:e}:void 0}function TR(e,t,...n){e.traceEnabled&&LL(e.host,t,...n)}function CR(e){return!e.host.useCaseSensitiveFileNames||("boolean"==typeof e.host.useCaseSensitiveFileNames?e.host.useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames())}var wR=(e=>(e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly",e))(wR||{});function DR(e,t){return e.body&&!e.body.parent&&(OT(e.body,e),LT(e.body,!1)),e.body?ER(e.body,t):1}function ER(e,t=new Map){const n=IB(e);if(t.has(n))return t.get(n)||0;t.set(n,void 0);const r=function(e,t){switch(e.kind){case 264:case 265:return 0;case 266:if(tf(e))return 2;break;case 272:case 271:if(!Bv(e,32))return 0;break;case 278:const n=e;if(!n.moduleSpecifier&&n.exportClause&&279===n.exportClause.kind){let e=0;for(const r of n.exportClause.elements){const n=PR(r,t);if(n>e&&(e=n),1===e)return e}return e}break;case 268:{let n=0;return LI(e,(e=>{const r=ER(e,t);switch(r){case 0:return;case 2:return void(n=2);case 1:return n=1,!0;default:xn.assertNever(r)}})),n}case 267:return DR(e,t);case 80:if(4096&e.flags)return 0}return 1}(e,t);return t.set(n,r),r}function PR(e,t){const n=e.propertyName||e.name;let r=e.parent;for(;r;){if(DP(r)||eN(r)||qN(r)){const e=r.statements;let i;for(const o of e)if(Cc(o,n)){o.parent||(OT(o,r),LT(o,!1));const e=ER(o,t);if((void 0===i||e>i)&&(i=e),1===i)return i;271===o.kind&&(i=1)}if(void 0!==i)return i}r=r.parent}return 1}var NR=(e=>(e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethodOrAccessor=128]="IsObjectLiteralOrClassExpressionMethodOrAccessor",e))(NR||{});function FR(e,t,n){return xn.attachFlowNodeDebugInfo({flags:e,id:0,node:t,antecedent:n})}var AR=OR();function IR(e,t){var n,r;pr("beforeBind"),null==(n=tr)||n.logStartBindFile(""+e.fileName),AR(e,t),null==(r=tr)||r.logStopBindFile(),pr("afterBind"),fr("Bind","beforeBind","afterBind")}function OR(){var e,t,n,r,i,o,a,s,c,l,u,_,d,m,g,h,y,v,b,S,k,T,C,w,E,P,N=!1,F=0,A=FR(1,void 0,void 0),I=FR(1,void 0,void 0),O=function(){return KA((function(e,t){if(t){t.stackIndex++,OT(e,r);const n=w;$e(e);const i=r;r=e,t.skip=!1,t.inStrictModeStack[t.stackIndex]=n,t.parentStack[t.stackIndex]=i}else t={stackIndex:0,skip:!1,inStrictModeStack:[void 0],parentStack:[void 0]};const n=e.operatorToken.kind;if(ub(n)||cb(n)){if(de(e)){const t=ee(),n=_,r=T;T=!1,Se(e,t,t),_=T?le(t):n,T||(T=r)}else Se(e,h,y);t.skip=!0}return t}),(function(t,n,r){if(!n.skip){const n=e(t);return 28===r.operatorToken.kind&&ve(t),n}}),(function(e,t,n){t.skip||Re(e)}),(function(t,n,r){if(!n.skip){const n=e(t);return 28===r.operatorToken.kind&&ve(t),n}}),(function(e,t){if(!t.skip){const t=e.operatorToken.kind;db(t)&&!eh(e)&&(xe(e.left),64===t&&212===e.left.kind)&&X(e.left.expression)&&(_=se(256,_,e))}const n=t.inStrictModeStack[t.stackIndex],i=t.parentStack[t.stackIndex];void 0!==n&&(w=n),void 0!==i&&(r=i),t.skip=!1,t.stackIndex--}),void 0);function e(e){if(e&&uP(e)&&!hb(e))return e;Re(e)}}();return function(p,f){var b,x;e=p,n=wS(t=f),w=function(e,t){return!(!WS(t,"alwaysStrict")||e.isDeclarationFile)||!!e.externalModuleIndicator}(e,f),P=new Set,F=0,E=Hx.getSymbolConstructor(),xn.attachFlowNodeDebugInfo(A),xn.attachFlowNodeDebugInfo(I),e.locals||(null==(b=or)||b.push(or.Phase.Bind,"bindSourceFile",{path:e.path},!0),Re(e),null==(x=or)||x.pop(),e.symbolCount=F,e.classifiableNames=P,function(){if(!c)return;const t=i,n=s,o=a,l=r,u=_;for(const t of c){const n=t.parent.parent;i=Pp(n)||e,a=Np(n)||e,_=FR(2,void 0,void 0),r=t,Re(t.typeExpression);const o=Pc(t);if((bF(t)||!t.fullName)&&o&&Sb(o.parent)){const n=et(o.parent);if(n){Ye(e.symbol,o.parent,n,!!mc(o,(e=>GE(e)&&"prototype"===e.name.escapedText)),!1);const r=i;switch(gg(o.parent)){case 1:case 2:i=Zp(e)?e:void 0;break;case 4:i=o.parent.expression;break;case 3:i=o.parent.expression.name;break;case 5:i=LR(e,o.parent.expression)?e:GE(o.parent.expression)?o.parent.expression.name:o.parent.expression;break;case 0:return xn.fail("Shouldn't have detected typedef or enum on non-assignment declaration")}i&&z(t,524288,788968),i=r}}else bF(t)||!t.fullName||80===t.fullName.kind?(r=t.parent,Ie(t,524288,788968)):Re(t.fullName)}i=t,s=n,a=o,r=l,_=u}(),function(){if(void 0===u)return;const t=i,n=s,o=a,c=r,l=_;for(const t of u){const n=Wg(t),o=n?Pp(n):void 0,s=n?Np(n):void 0;i=o||e,a=s||e,_=FR(2,void 0,void 0),r=t,Re(t.importClause)}i=t,s=n,a=o,r=c,_=l}()),e=void 0,t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,c=void 0,u=void 0,l=!1,_=void 0,d=void 0,m=void 0,g=void 0,h=void 0,y=void 0,v=void 0,S=void 0,k=!1,T=!1,N=!1,C=0};function M(t,n,...r){return Jp(Sd(t)||e,t,n,...r)}function L(e,t){return F++,new E(e,t)}function j(e,t,n){e.flags|=n,t.symbol=e,e.declarations=me(e.declarations,t),1955&n&&!e.exports&&(e.exports=ed()),6240&n&&!e.members&&(e.members=ed()),e.constEnumOnlyModule&&304&e.flags&&(e.constEnumOnlyModule=!1),111551&n&&bg(e,t)}function R(e){if(277===e.kind)return e.isExportEquals?"export=":"default";const t=Pc(e);if(t){if(sp(e)){const n=Hh(t);return pp(e)?"__global":`"${n}"`}if(167===t.kind){const e=t.expression;if($h(e))return yc(e.text);if(qh(e))return Ra(e.operator)+e.operand.text;xn.fail("Only computed properties with literal names have declaration names")}if(VD(t)){const n=Zf(e);if(!n)return;return Qh(n.symbol,t.escapedText)}return ON(t)?dC(t):Wh(t)?Gh(t):void 0}switch(e.kind){case 176:return"__constructor";case 184:case 179:case 323:return"__call";case 185:case 180:return"__new";case 181:return"__index";case 278:return"__export";case 307:return"export=";case 226:if(2===ag(e))return"export=";xn.fail("Unknown binary declaration kind");break;case 317:return Ng(e)?"__new":"__call";case 169:return xn.assert(317===e.parent.kind,"Impossible parameter parent kind",(()=>`parent is: ${xn.formatSyntaxKind(e.parent.kind)}, expected JSDocFunctionType`)),"arg"+e.parent.parameters.indexOf(e)}}function B(e){return Dc(e)?Ap(e.name):vc(xn.checkDefined(R(e)))}function J(t,n,r,i,o,a,s){xn.assert(s||!Vh(r));const c=Bv(r,2048)||yN(r)&&"default"===r.name.escapedText,l=s?"__computed":c&&n?"default":R(r);let u;if(void 0===l)u=L(0,"__missing");else if(u=t.get(l),2885600&i&&P.add(l),u){if(a&&!u.isReplaceableByMethod)return u;if(u.flags&o)if(u.isReplaceableByMethod)t.set(l,u=L(0,l));else if(!(3&i&&67108864&u.flags)){Dc(r)&&OT(r.name,r);let t=2&u.flags?va.Cannot_redeclare_block_scoped_variable_0:va.Duplicate_identifier_0,n=!0;(384&u.flags||384&i)&&(t=va.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations,n=!1);let o=!1;p(u.declarations)&&(c||u.declarations&&u.declarations.length&&277===r.kind&&!r.isExportEquals)&&(t=va.A_module_cannot_have_multiple_default_exports,n=!1,o=!0);const a=[];QP(r)&&Nd(r.type)&&Bv(r,32)&&2887656&u.flags&&a.push(M(r,va.Did_you_mean_0,`export type { ${vc(r.name.escapedText)} }`));const s=Pc(r)||r;f(u.declarations,((r,i)=>{const c=Pc(r)||r,l=n?M(c,t,B(r)):M(c,t);e.bindDiagnostics.push(o?fT(l,M(s,0===i?va.Another_export_default_is_here:va.and_here)):l),o&&a.push(M(c,va.The_first_export_default_is_here))}));const _=n?M(s,t,B(r)):M(s,t);e.bindDiagnostics.push(fT(_,...a)),u=L(0,l)}}else t.set(l,u=L(0,l)),a&&(u.isReplaceableByMethod=!0);return j(u,r,i),u.parent?xn.assert(u.parent===n,"Existing symbol parent should match new one"):u.parent=n,u}function z(e,t,n){const r=!!(32&cc(e))||function(e){if(e.parent&&ZP(e)&&(e=e.parent),!Fg(e))return!1;if(!bF(e)&&e.fullName)return!0;const t=Pc(e);return!!(t&&(Sb(t.parent)&&et(t.parent)||h_(t.parent)&&32&cc(t.parent)))}(e);if(2097152&t)return 281===e.kind||271===e.kind&&r?J(i.symbol.exports,i.symbol,e,t,n):(xn.assertNode(i,f_),J(i.locals,void 0,e,t,n));if(Fg(e)&&xn.assert(Mm(e)),!sp(e)&&(r||128&i.flags)){if(!f_(i)||!i.locals||Bv(e,2048)&&!R(e))return J(i.symbol.exports,i.symbol,e,t,n);const r=111551&t?1048576:0,o=J(i.locals,void 0,e,r,n);return o.exportSymbol=J(i.symbol.exports,i.symbol,e,t,n),e.localSymbol=o,o}return xn.assertNode(i,f_),J(i.locals,void 0,e,t,n)}function $(e){q(e,(e=>262===e.kind?Re(e):void 0)),q(e,(e=>262!==e.kind?Re(e):void 0))}function q(e,t=Re){void 0!==e&&f(e,t)}function V(e){LI(e,Re,q)}function U(e){const n=N;if(N=!1,function(e){if(!(1&_.flags))return!1;if(_===A){const n=v_(e)&&242!==e.kind||263===e.kind||267===e.kind&&function(e){const n=DR(e);return 1===n||2===n&&jS(t)}(e);if(n&&(_=I,!t.allowUnreachableCode)){const n=VS(t)&&!(33554432&e.flags)&&(!EP(e)||!!(7&uc(e.declarationList))||e.declarationList.declarations.some((e=>!!e.initializer)));!function(e,t){if(b_(e)&&MR(e)&&DP(e.parent)){const{statements:n}=e.parent,r=pT(n,e);Y(r,MR,((e,n)=>t(r[e],r[n-1])))}else t(e,e)}(e,((e,t)=>je(n,e,t,va.Unreachable_code_detected)))}}return!0}(e))return V(e),Be(e),void(N=n);switch(e.kind>=243&&e.kind<=259&&(!t.allowUnreachableCode||253===e.kind)&&(e.flowNode=_),e.kind){case 247:!function(e){const t=he(e,te()),n=ee(),r=ee();ie(t,_),_=t,fe(e.expression,n,r),_=le(n),ge(e.statement,r,t),ie(t,_),_=le(r)}(e);break;case 246:!function(e){const t=te(),n=he(e,ee()),r=ee();ie(t,_),_=t,ge(e.statement,r,n),ie(n,_),_=le(n),fe(e.expression,t,r),_=le(r)}(e);break;case 248:!function(e){const t=he(e,te()),n=ee(),r=ee();Re(e.initializer),ie(t,_),_=t,fe(e.condition,n,r),_=le(n),ge(e.statement,r,t),Re(e.incrementor),ie(t,_),_=le(r)}(e);break;case 249:case 250:!function(e){const t=he(e,te()),n=ee();Re(e.expression),ie(t,_),_=t,250===e.kind&&Re(e.awaitModifier),ie(n,_),Re(e.initializer),261!==e.initializer.kind&&xe(e.initializer),ge(e.statement,n,t),ie(t,_),_=le(n)}(e);break;case 245:!function(e){const t=ee(),n=ee(),r=ee();fe(e.expression,t,n),_=le(t),Re(e.thenStatement),ie(r,_),_=le(n),Re(e.elseStatement),ie(r,_),_=le(r)}(e);break;case 253:case 257:!function(e){Re(e.expression),253===e.kind&&(k=!0,g&&ie(g,_)),_=A,T=!0}(e);break;case 252:case 251:!function(e){if(Re(e.label),e.label){const t=function(e){for(let t=S;t;t=t.next)if(t.name===e)return t}(e.label.escapedText);t&&(t.referenced=!0,ye(e,t.breakTarget,t.continueTarget))}else ye(e,d,m)}(e);break;case 258:!function(e){const t=g,n=v,r=ee(),i=ee();let o=ee();if(e.finallyBlock&&(g=i),ie(o,_),v=o,Re(e.tryBlock),ie(r,_),e.catchClause&&(_=le(o),o=ee(),ie(o,_),v=o,Re(e.catchClause),ie(r,_)),g=t,v=n,e.finallyBlock){const t=ee();t.antecedent=Z(Z(r.antecedent,o.antecedent),i.antecedent),_=t,Re(e.finallyBlock),1&_.flags?_=A:(g&&i.antecedent&&ie(g,ne(t,i.antecedent,_)),v&&o.antecedent&&ie(v,ne(t,o.antecedent,_)),_=r.antecedent?ne(t,r.antecedent,_):A)}else _=le(r)}(e);break;case 255:!function(e){const t=ee();Re(e.expression);const n=d,r=b;d=t,b=_,Re(e.caseBlock),ie(t,_);const i=f(e.caseBlock.clauses,(e=>297===e.kind));e.possiblyExhaustive=!i&&!t.antecedent,i||ie(t,ae(b,e,0,0)),d=n,b=r,_=le(t)}(e);break;case 269:!function(e){const n=e.clauses,r=112===e.parent.expression.kind||K(e.parent.expression);let i=A;for(let o=0;ogN(e)||mN(e)))}(e)?e.flags|=128:e.flags&=-129}function Fe(e){const t=DR(e),n=0!==t;return Pe(e,n?512:1024,n?110735:0),t}function Ae(e,t,n){const r=L(t,n);return 106508&t&&(r.parent=i.symbol),j(r,e,t),r}function Ie(e,t,n){switch(a.kind){case 267:z(e,t,n);break;case 307:if(Zp(i)){z(e,t,n);break}default:xn.assertNode(a,f_),a.locals||(a.locals=ed(),Ee(a)),J(a.locals,void 0,e,t,n)}}function Oe(t,n){if(n&&80===n.kind){const i=n;if(qD(r=i)&&("eval"===r.escapedText||"arguments"===r.escapedText)){const r=Qp(e,n);e.bindDiagnostics.push(aS(e,r.start,r.length,function(t){return Zf(t)?va.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:e.externalModuleIndicator?va.Invalid_use_of_0_Modules_are_automatically_in_strict_mode:va.Invalid_use_of_0_in_strict_mode}(t),bc(i)))}}var r}function Me(e){!w||33554432&e.flags||Oe(e,e.name)}function Le(t,n,...r){const i=Gp(e,t.pos);e.bindDiagnostics.push(aS(e,i.start,i.length,n,...r))}function je(t,n,r,i){!function(t,n,r){const i=aS(e,n.pos,n.end-n.pos,r);t?e.bindDiagnostics.push(i):e.bindSuggestionDiagnostics=ue(e.bindSuggestionDiagnostics,{...i,category:2})}(t,{pos:Vd(n,e),end:r.end},i)}function Re(t){if(!t)return;OT(t,r),or&&(t.tracingPath=e.path);const n=w;if($e(t),t.kind>165){const e=r;r=t;const n=jR(t);0===n?U(t):function(e,t){const n=i,r=o,s=a;if(1&t?(219!==e.kind&&(o=i),i=a=e,32&t&&(i.locals=ed(),Ee(i))):2&t&&(a=e,32&t&&(a.locals=void 0)),4&t){const n=_,r=d,i=m,o=g,a=v,s=S,c=k,l=16&t&&!Bv(e,1024)&&!e.asteriskToken&&!!cm(e)||175===e.kind;l||(_=FR(2,void 0,void 0),144&t&&(_.node=e)),g=l||176===e.kind||Mm(e)&&(262===e.kind||218===e.kind)?ee():void 0,v=void 0,d=void 0,m=void 0,S=void 0,k=!1,U(e),e.flags&=-5633,!(1&_.flags)&&8&t&&Fd(e.body)&&(e.flags|=512,k&&(e.flags|=1024),e.endFlowNode=_),307===e.kind&&(e.flags|=C,e.endFlowNode=_),g&&(ie(g,_),_=le(g),(176===e.kind||175===e.kind||Mm(e)&&(262===e.kind||218===e.kind))&&(e.returnFlowNode=_)),l||(_=n),d=r,m=i,g=o,v=a,S=s,k=c}else 64&t?(l=!1,U(e),xn.assertNotNode(e,qD),e.flags=l?256|e.flags:-257&e.flags):U(e);i=n,o=r,a=s}(t,n),r=e}else{const e=r;1===t.kind&&(r=t),Be(t),r=e}w=n}function Be(e){if(O_(e))if(Mm(e))for(const t of e.jsDoc)Re(t);else for(const t of e.jsDoc)OT(t,e),LT(t,!1)}function Je(e){if(!w)for(const t of e){if(!pf(t))return;if(ze(t))return void(w=!0)}}function ze(t){const n=Kd(e,t.expression);return'"use strict"'===n||"'use strict'"===n}function $e(o){switch(o.kind){case 80:if(4096&o.flags){let e=o.parent;for(;e&&!Fg(e);)e=e.parent;Ie(e,524288,788968);break}case 110:return _&&(Xu(o)||304===r.kind)&&(o.flowNode=_),function(t){if(!(e.parseDiagnostics.length||33554432&t.flags||16777216&t.flags||mh(t))){const n=xc(t);if(void 0===n)return;w&&n>=119&&n<=127?e.bindDiagnostics.push(M(t,function(t){return Zf(t)?va.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:e.externalModuleIndicator?va.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:va.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(t),Ap(t))):135===n?qI(e)&&om(t)?e.bindDiagnostics.push(M(t,va.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,Ap(t))):65536&t.flags&&e.bindDiagnostics.push(M(t,va.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,Ap(t))):127===n&&16384&t.flags&&e.bindDiagnostics.push(M(t,va.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,Ap(t)))}}(o);case 166:_&&wm(o)&&(o.flowNode=_);break;case 236:case 108:o.flowNode=_;break;case 81:return function(t){"#constructor"===t.escapedText&&(e.parseDiagnostics.length||e.bindDiagnostics.push(M(t,va.constructor_is_a_reserved_word,Ap(t))))}(o);case 211:case 212:const s=o;_&&W(s)&&(s.flowNode=_),vg(s)&&function(e){110===e.expression.kind?We(e):ug(e)&&307===e.parent.parent.kind&&(Tb(e.expression)?Xe(e,e.parent):Qe(e))}(s),Mm(s)&&e.commonJsModuleIndicator&&og(s)&&!RR(a,"module")&&J(e.locals,void 0,s.expression,134217729,111550);break;case 226:switch(ag(o)){case 1:Ue(o);break;case 2:!function(t){if(!Ve(t))return;const n=ng(t.right);if(Nb(n)||i===e&&LR(e,n))return;if(HE(n)&&x(n.properties,JN))return void f(n.properties,Ke);const r=vh(t)?2097152:1049092;bg(J(e.symbol.exports,e.symbol,t,67108864|r,0),t)}(o);break;case 3:Xe(o.left,o);break;case 6:!function(e){OT(e.left,e),OT(e.right,e),tt(e.left.expression,e.left,!1,!0)}(o);break;case 4:We(o);break;case 5:const t=o.left.expression;if(Mm(o)&&qD(t)){const e=RR(a,t.escapedText);if(dm(null==e?void 0:e.valueDeclaration)){We(o);break}}!function(t){var n;const r=nt(t.left.expression,a)||nt(t.left.expression,i);if(!Mm(t)&&!xg(r))return;const o=jx(t.left);qD(o)&&2097152&(null==(n=RR(i,o.escapedText))?void 0:n.flags)||(OT(t.left,t),OT(t.right,t),qD(t.left.expression)&&i===e&&LR(e,t.left.expression)?Ue(t):Vh(t)?(Ae(t,67108868,"__computed"),Ge(t,Ye(r,t.left.expression,et(t.left),!1,!1))):Qe(ut(t.left,dg)))}(o);break;case 0:break;default:xn.fail("Unknown binary expression special property assignment kind")}return function(e){w&&Vu(e.left)&&db(e.operatorToken.kind)&&Oe(e,e.left)}(o);case 299:return function(e){w&&e.variableDeclaration&&Oe(e,e.variableDeclaration.name)}(o);case 220:return function(t){if(w&&80===t.expression.kind){const n=Qp(e,t.expression);e.bindDiagnostics.push(aS(e,n.start,n.length,va.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}(o);case 225:return function(e){w&&Oe(e,e.operand)}(o);case 224:return function(e){w&&(46!==e.operator&&47!==e.operator||Oe(e,e.operand))}(o);case 254:return function(e){w&&Le(e,va.with_statements_are_not_allowed_in_strict_mode)}(o);case 256:return function(e){w&&wS(t)>=2&&(y_(e.statement)||EP(e.statement))&&Le(e.label,va.A_label_is_not_allowed_here)}(o);case 197:return void(l=!0);case 182:break;case 168:return function(e){if(CF(e.parent)){const t=qg(e.parent);t?(xn.assertNode(t,f_),t.locals??(t.locals=ed()),J(t.locals,void 0,e,262144,526824)):Pe(e,262144,526824)}else if(195===e.parent.kind){const t=function(e){const t=mc(e,(e=>e.parent&&IE(e.parent)&&e.parent.extendsType===e));return t&&t.parent}(e.parent);t?(xn.assertNode(t,f_),t.locals??(t.locals=ed()),J(t.locals,void 0,e,262144,526824)):Ae(e,262144,R(e))}else Pe(e,262144,526824)}(o);case 169:return ot(o);case 260:return it(o);case 208:return o.flowNode=_,it(o);case 172:case 171:return function(e){const t=yu(e),n=t?13247:0;return at(e,(t?98304:4)|(e.questionToken?16777216:0),n)}(o);case 303:case 304:return at(o,4,0);case 306:return at(o,8,900095);case 179:case 180:case 181:return Pe(o,131072,0);case 174:case 173:return at(o,8192|(o.questionToken?16777216:0),$f(o)?0:103359);case 262:return function(t){e.isDeclarationFile||33554432&t.flags||zh(t)&&(C|=4096),Me(t),w?(function(t){if(n<2&&307!==a.kind&&267!==a.kind&&!lu(a)){const n=Qp(e,t);e.bindDiagnostics.push(aS(e,n.start,n.length,function(t){return Zf(t)?va.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:e.externalModuleIndicator?va.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:va.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5}(t)))}}(t),Ie(t,16,110991)):Pe(t,16,110991)}(o);case 176:return Pe(o,16384,0);case 177:return at(o,32768,46015);case 178:return at(o,65536,78783);case 184:case 317:case 323:case 185:return function(e){const t=L(131072,R(e));j(t,e,131072);const n=L(2048,"__type");j(n,e,2048),n.members=ed(),n.members.set(t.escapedName,t)}(o);case 187:case 322:case 200:return function(e){return Ae(e,2048,"__type")}(o);case 332:return function(e){V(e);const t=Ug(e);t&&174!==t.kind&&j(t.symbol,t,32)}(o);case 210:return function(e){return Ae(e,4096,"__object")}(o);case 218:case 219:return function(t){e.isDeclarationFile||33554432&t.flags||zh(t)&&(C|=4096),_&&(t.flowNode=_),Me(t);return Ae(t,16,t.name?t.name.escapedText:"__function")}(o);case 213:switch(ag(o)){case 7:return function(e){let t=nt(e.arguments[0]);const n=307===e.parent.parent.kind;t=Ye(t,e.arguments[0],n,!1,!1),Ze(e,t,!1)}(o);case 8:return function(e){if(!Ve(e))return;const t=rt(e.arguments[0],void 0,((e,t)=>(t&&j(t,e,67110400),t)));if(t){const n=1048580;J(t.exports,t,e,n,0)}}(o);case 9:return function(e){const t=nt(e.arguments[0].expression);t&&t.valueDeclaration&&j(t,t.valueDeclaration,32),Ze(e,t,!0)}(o);case 0:break;default:return xn.fail("Unknown call expression assignment declaration kind")}Mm(o)&&function(t){!e.commonJsModuleIndicator&&Jm(t,!1)&&Ve(t)}(o);break;case 231:case 263:return w=!0,function(t){263===t.kind?Ie(t,32,899503):(Ae(t,32,t.name?t.name.escapedText:"__class"),t.name&&P.add(t.name.escapedText));const{symbol:n}=t,r=L(4194308,"prototype"),i=n.exports.get(r.escapedName);i&&(t.name&&OT(t.name,t),e.bindDiagnostics.push(M(i.declarations[0],va.Duplicate_identifier_0,Sc(r)))),n.exports.set(r.escapedName,r),r.parent=n}(o);case 264:return Ie(o,64,788872);case 265:return Ie(o,524288,788968);case 266:return function(e){return tf(e)?Ie(e,128,899967):Ie(e,256,899327)}(o);case 267:return function(t){if(Ne(t),sp(t))if(Bv(t,32)&&Le(t,va.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),mp(t))Fe(t);else{let n;if(11===t.name.kind){const{text:e}=t.name;n=nT(e),void 0===n&&Le(t.name,va.Pattern_0_can_have_at_most_one_Asterisk_character,e)}const r=Pe(t,512,110735);e.patternAmbientModules=ue(e.patternAmbientModules,n&&!st(n)?{pattern:n,symbol:r}:void 0)}else{const e=Fe(t);if(0!==e){const{symbol:n}=t;n.constEnumOnlyModule=!(304&n.flags)&&2===e&&!1!==n.constEnumOnlyModule}}}(o);case 292:return function(e){return Ae(e,4096,"__jsxAttributes")}(o);case 291:return function(e,t,n){return Pe(e,4,0)}(o);case 271:case 274:case 276:case 281:return Pe(o,2097152,2097152);case 270:return function(t){Q(t.modifiers)&&e.bindDiagnostics.push(M(t,va.Modifiers_cannot_appear_here));const n=qN(t.parent)?qI(t.parent)?t.parent.isDeclarationFile?void 0:va.Global_module_exports_may_only_appear_in_declaration_files:va.Global_module_exports_may_only_appear_in_module_files:va.Global_module_exports_may_only_appear_at_top_level;n?e.bindDiagnostics.push(M(t,n)):(e.symbol.globalExports=e.symbol.globalExports||ed(),J(e.symbol.globalExports,e.symbol,t,2097152,2097152))}(o);case 273:return function(e){e.name&&Pe(e,2097152,2097152)}(o);case 278:return function(e){i.symbol&&i.symbol.exports?e.exportClause?dN(e.exportClause)&&(OT(e.exportClause,e),J(i.symbol.exports,i.symbol,e.exportClause,2097152,2097152)):J(i.symbol.exports,i.symbol,e,8388608,0):Ae(e,8388608,R(e))}(o);case 277:return function(e){if(i.symbol&&i.symbol.exports){const t=vh(e)?2097152:4,n=J(i.symbol.exports,i.symbol,e,t,-1);e.isExportEquals&&bg(n,e)}else Ae(e,111551,R(e))}(o);case 307:return Je(o.statements),function(){if(Ne(e),qI(e))qe();else if(ef(e)){qe();const t=e.symbol;J(e.symbol.exports,e.symbol,e,4,-1),e.symbol=t}}();case 241:if(!lu(o.parent))return;case 268:return Je(o.statements);case 341:if(323===o.parent.kind)return ot(o);if(322!==o.parent.kind)break;case 348:const d=o;return Pe(d,d.isBracketed||d.typeExpression&&316===d.typeExpression.type.kind?16777220:4,0);case 346:case 338:case 340:return(c||(c=[])).push(o);case 339:return Re(o.typeExpression);case 351:return(u||(u=[])).push(o)}}function qe(){Ae(e,512,`"${Yk(e.fileName)}"`)}function Ve(t){return!(e.externalModuleIndicator&&!0!==e.externalModuleIndicator||(e.commonJsModuleIndicator||(e.commonJsModuleIndicator=t,e.externalModuleIndicator||qe()),0))}function Ue(e){if(!Ve(e))return;const t=rt(e.left.expression,void 0,((e,t)=>(t&&j(t,e,67110400),t)));if(t){const n=yh(e.right)&&(rg(e.left.expression)||og(e.left.expression))?2097152:1048580;OT(e.left,e),J(t.exports,t,e.left,n,0)}}function Ke(t){J(e.symbol.exports,e.symbol,t,69206016,0)}function We(e){if(xn.assert(Mm(e)),uP(e)&&GE(e.left)&&VD(e.left.name)||GE(e)&&VD(e.name))return;const t=rm(e,!1,!1);switch(t.kind){case 262:case 218:let n=t.symbol;if(uP(t.parent)&&64===t.parent.operatorToken.kind){const e=t.parent.left;ug(e)&&Tb(e.expression)&&(n=nt(e.expression.expression,o))}n&&n.valueDeclaration&&(n.members=n.members||ed(),Vh(e)?He(e,n,n.members):J(n.members,n,e,67108868,0),j(n,n.valueDeclaration,32));break;case 176:case 172:case 174:case 177:case 178:case 175:const r=t.parent,i=Jv(t)?r.symbol.exports:r.symbol.members;Vh(e)?He(e,r.symbol,i):J(i,r.symbol,e,67108868,0,!0);break;case 307:if(Vh(e))break;t.commonJsModuleIndicator?J(t.symbol.exports,t.symbol,e,1048580,0):Pe(e,1,111550);break;case 267:break;default:xn.failBadSyntaxKind(t)}}function He(e,t,n){J(n,t,e,4,0,!0,!0),Ge(e,t)}function Ge(e,t){t&&(t.assignmentDeclarationMembers||(t.assignmentDeclarationMembers=new Map)).set(IB(e),e)}function Xe(e,t){const n=e.expression,r=n.expression;OT(r,n),OT(n,e),OT(e,t),tt(r,e,!0,!0)}function Qe(e){xn.assert(!qD(e)),OT(e.expression,e),tt(e.expression,e,!1,!1)}function Ye(t,n,r,i,o){if(2097152&(null==t?void 0:t.flags))return t;if(r&&!i){const r=67110400,i=110735;t=rt(n,t,((t,n,o)=>n?(j(n,t,r),n):J(o?o.exports:e.jsGlobalAugmentations||(e.jsGlobalAugmentations=ed()),o,t,r,i)))}return o&&t&&t.valueDeclaration&&j(t,t.valueDeclaration,32),t}function Ze(e,t,n){if(!t||!function(e){if(1072&e.flags)return!0;const t=e.valueDeclaration;if(t&&QE(t))return!!Qm(t);let n=t?KP(t)?t.initializer:uP(t)?t.right:GE(t)&&uP(t.parent)?t.parent.right:void 0:void 0;if(n=n&&ng(n),n){const e=Tb(KP(t)?t.name:uP(t)?t.left:t);return!!Ym(!uP(n)||57!==n.operatorToken.kind&&61!==n.operatorToken.kind?n:n.right,e)}return!1}(t))return;const r=n?t.members||(t.members=ed()):t.exports||(t.exports=ed());let i=0,o=0;uu(Qm(e))?(i=8192,o=103359):QE(e)&&sg(e)&&(Q(e.arguments[2].properties,(e=>{const t=Pc(e);return!!t&&qD(t)&&"set"===bc(t)}))&&(i|=65540,o|=78783),Q(e.arguments[2].properties,(e=>{const t=Pc(e);return!!t&&qD(t)&&"get"===bc(t)}))&&(i|=32772,o|=46015)),0===i&&(i=4,o=0),J(r,t,e,67108864|i,-67108865&o)}function et(e){return uP(e.parent)?307===function(e){for(;uP(e.parent);)e=e.parent;return e.parent}(e.parent).parent.kind:307===e.parent.parent.kind}function tt(e,t,n,r){let o=nt(e,a)||nt(e,i);const s=et(t);o=Ye(o,t.expression,s,n,r),Ze(t,o,n)}function nt(e,t=i){if(qD(e))return RR(t,e.escapedText);{const t=nt(e.expression);return t&&t.exports&&t.exports.get(mg(e))}}function rt(t,n,r){if(LR(e,t))return e.symbol;if(qD(t))return r(t,nt(t),n);{const e=rt(t.expression,n,r),i=pg(t);return VD(i)&&xn.fail("unexpected PrivateIdentifier"),r(i,e&&e.exports&&e.exports.get(mg(t)),e)}}function it(e){if(w&&Oe(e,e.name),!Eu(e.name)){const t=260===e.kind?e:e.parent.parent;!Mm(e)||!$m(t)||ol(e)||32&cc(e)?op(e)?Ie(e,2,111551):ay(e)?Pe(e,1,111551):Pe(e,1,111550):Pe(e,2097152,2097152)}}function ot(e){if((341!==e.kind||323===i.kind)&&(!w||33554432&e.flags||Oe(e,e.name),Eu(e.name)?Ae(e,1,"__"+e.parent.parameters.indexOf(e)):Pe(e,1,111551),rc(e,e.parent))){const t=e.parent.parent;J(t.symbol.members,t.symbol,e,4|(e.questionToken?16777216:0),0)}}function at(t,n,r){return e.isDeclarationFile||33554432&t.flags||!zh(t)||(C|=4096),_&&qf(t)&&(t.flowNode=_),Vh(t)?Ae(t,n,"__computed"):Pe(t,n,r)}}function MR(e){return!(HP(e)||function(e){switch(e.kind){case 264:case 265:return!0;case 267:return 1!==DR(e);case 266:return Bv(e,4096);default:return!1}}(e)||YP(e)||EP(e)&&!(7&uc(e))&&e.declarationList.declarations.some((e=>!e.initializer)))}function LR(e,t){let n=0;const r=rt();for(r.enqueue(t);!r.isEmpty()&&n<100;){if(n++,rg(t=r.dequeue())||og(t))return!0;if(qD(t)){const n=RR(e,t.escapedText);if(n&&n.valueDeclaration&&KP(n.valueDeclaration)&&n.valueDeclaration.initializer){const e=n.valueDeclaration.initializer;r.enqueue(e),mb(e,!0)&&(r.enqueue(e.left),r.enqueue(e.right))}}}return!1}function jR(e){switch(e.kind){case 231:case 263:case 266:case 210:case 187:case 322:case 292:return 1;case 264:return 65;case 267:case 265:case 200:case 181:return 33;case 307:return 37;case 177:case 178:case 174:if(qf(e))return 173;case 176:case 262:case 173:case 179:case 323:case 317:case 184:case 180:case 185:case 175:return 45;case 218:case 219:return 61;case 268:return 4;case 172:return e.initializer?4:0;case 299:case 248:case 249:case 250:case 269:return 34;case 241:return cu(e.parent)||pE(e.parent)?0:34}return 0}function RR(e,t){var n,r,i,o;const a=null==(r=null==(n=lt(e,f_))?void 0:n.locals)?void 0:r.get(t);return a?a.exportSymbol??a:qN(e)&&e.jsGlobalAugmentations&&e.jsGlobalAugmentations.has(t)?e.jsGlobalAugmentations.get(t):p_(e)?null==(o=null==(i=e.symbol)?void 0:i.exports)?void 0:o.get(t):void 0}function BR(e,t,n,r,i,o,a,s,c,l){return function(u=(()=>!0)){const _=[],d=[];return{walkType:e=>{try{return p(e),{visitedTypes:Je(_),visitedSymbols:Je(d)}}finally{I(_),I(d)}},walkSymbol:e=>{try{return h(e),{visitedTypes:Je(_),visitedSymbols:Je(d)}}finally{I(_),I(d)}}};function p(e){if(e&&!_[e.id]&&(_[e.id]=e,!h(e.symbol))){if(524288&e.flags){const n=e,i=n.objectFlags;4&i&&function(e){p(e.target),f(l(e),p)}(e),32&i&&function(e){p(e.typeParameter),p(e.constraintType),p(e.templateType),p(e.modifiersType)}(e),3&i&&(g(t=e),f(t.typeParameters,p),f(r(t),p),p(t.thisType)),24&i&&g(n)}var t;262144&e.flags&&function(e){p(s(e))}(e),3145728&e.flags&&function(e){f(e.types,p)}(e),4194304&e.flags&&function(e){p(e.type)}(e),8388608&e.flags&&function(e){p(e.objectType),p(e.indexType),p(e.constraint)}(e)}}function m(r){const i=t(r);i&&p(i.type),f(r.typeParameters,p);for(const e of r.parameters)h(e);p(e(r)),p(n(r))}function g(e){const t=i(e);for(const e of t.indexInfos)p(e.keyType),p(e.type);for(const e of t.callSignatures)m(e);for(const e of t.constructSignatures)m(e);for(const e of t.properties)h(e)}function h(e){if(!e)return!1;const t=OB(e);return!d[t]&&(d[t]=e,!u(e)||(p(o(e)),e.exports&&e.exports.forEach(h),f(e.declarations,(e=>{if(e.type&&186===e.type.kind){const t=e.type;h(a(c(t.exprName)))}})),!1))}}}var JR={};o(JR,{RelativePreference:()=>zR,countPathComponents:()=>eB,forEachFileNameOfModule:()=>rB,getLocalModuleSpecifierBetweenFileNames:()=>QR,getModuleSpecifier:()=>VR,getModuleSpecifierPreferences:()=>$R,getModuleSpecifiers:()=>GR,getModuleSpecifiersWithCacheInfo:()=>XR,getNodeModulesPackageName:()=>UR,tryGetJSExtensionForFile:()=>fB,tryGetModuleSpecifiersFromCache:()=>WR,tryGetRealFileNameForNonJsDeclarationFileName:()=>dB,updateModuleSpecifier:()=>qR});var zR=(e=>(e[e.Relative=0]="Relative",e[e.NonRelative=1]="NonRelative",e[e.Shortest=2]="Shortest",e[e.ExternalNonRelative=3]="ExternalNonRelative",e))(zR||{});function $R({importModuleSpecifierPreference:e,importModuleSpecifierEnding:t},n,r,i){const o=a();return{relativePreference:void 0!==i?Os(i)?0:1:"relative"===e?0:"non-relative"===e?1:"project-relative"===e?3:2,getAllowedEndingsInPreferredOrder:e=>{const t=e!==r.impliedNodeFormat?a(e):o;if(99===(e??r.impliedNodeFormat))return xR(n,r.fileName)?[3,2]:[2];if(1===ES(n))return 2===t?[2,1]:[1,2];const i=xR(n,r.fileName);switch(t){case 2:return i?[2,3,0,1]:[2,0,1];case 3:return[3,0,2,1];case 1:return i?[1,0,3,2]:[1,0,2];case 0:return i?[0,1,3,2]:[0,1,2];default:xn.assertNever(t)}}};function a(e){if(void 0!==i){if(qk(i))return 2;if(Wt(i,"/index"))return 1}return Wk(t,e??r.impliedNodeFormat,n,Am(r)?r:void 0)}}function qR(e,t,n,r,i,o,a={}){const s=KR(e,t,n,r,i,$R({},e,t,o),{},a);if(s!==o)return s}function VR(e,t,n,r,i,o={}){return KR(e,t,n,r,i,$R({},e,t),{},o)}function UR(e,t,n,r,i,o={}){const a=YR(t.fileName,r);return g(iB(a,n,r,i,e,o),(n=>lB(n,a,t,r,e,i,!0,o.overrideImportMode)))}function KR(e,t,n,r,i,o,a,s={}){const c=YR(n,i);return g(iB(c,r,i,a,e,s),(n=>lB(n,c,t,i,e,a,void 0,s.overrideImportMode)))||ZR(r,c,e,i,s.overrideImportMode||t.impliedNodeFormat,o)}function WR(e,t,n,r,i={}){const o=HR(e,t,n,r,i);return o[1]&&{kind:o[0],moduleSpecifiers:o[1],computedWithoutCache:!1}}function HR(e,t,n,r,i={}){var o;const a=kd(e);if(!a)return u;const s=null==(o=n.getModuleSpecifierCache)?void 0:o.call(n),c=null==s?void 0:s.get(t.path,a.path,r,i);return[null==c?void 0:c.kind,null==c?void 0:c.moduleSpecifiers,a,null==c?void 0:c.modulePaths,s]}function GR(e,t,n,r,i,o,a={}){return XR(e,t,n,r,i,o,a,!1).moduleSpecifiers}function XR(e,t,n,r,i,o,a={},s){let c=!1;const l=function(e,t){var n;const r=null==(n=e.declarations)?void 0:n.find((e=>lp(e)&&(!fp(e)||!Os(Hh(e.name)))));if(r)return r.name.text;const i=q(e.declarations,(e=>{var n,r,i,o;if(!ZP(e))return;const a=function(e){for(;8&e.flags;)e=e.parent;return e}(e);if(!((null==(n=null==a?void 0:a.parent)?void 0:n.parent)&&eN(a.parent)&&sp(a.parent.parent)&&qN(a.parent.parent.parent)))return;const s=null==(o=null==(i=null==(r=a.parent.parent.symbol.exports)?void 0:r.get("export="))?void 0:i.valueDeclaration)?void 0:o.expression;if(!s)return;const c=t.getSymbolAtLocation(s);if(c&&(2097152&(null==c?void 0:c.flags)?t.getAliasedSymbol(c):c)===e.symbol)return a.parent.parent}))[0];return i?i.name.text:void 0}(e,t);if(l)return{kind:"ambient",moduleSpecifiers:[l],computedWithoutCache:c};let[_,d,p,m,g]=HR(e,r,i,o,a);if(d)return{kind:_,moduleSpecifiers:d,computedWithoutCache:c};if(!p)return{kind:void 0,moduleSpecifiers:u,computedWithoutCache:c};c=!0,m||(m=aB(YR(r.fileName,i),p.originalFileName,i,n,a));const h=function(e,t,n,r,i,o={},a){const s=YR(n.fileName,r),c=$R(i,t,n),l=Am(n)&&f(e,(e=>f(r.getFileIncludeReasons().get(Yo(e.path,r.getCurrentDirectory(),s.getCanonicalFileName)),(e=>{if(3!==e.kind||e.file!==n.path)return;if(n.impliedNodeFormat&&n.impliedNodeFormat!==$q(n,e.index,t))return;const r=TV(n,e.index).text;return 1===c.relativePreference&&Po(r)?void 0:r}))));if(l)return{kind:void 0,moduleSpecifiers:[l],computedWithoutCache:!0};const u=Q(e,(e=>e.isInNodeModules));let _,d,p,m;for(const l of e){const e=l.isInNodeModules?lB(l,s,n,r,t,i,void 0,o.overrideImportMode):void 0;if(_=ue(_,e),e&&l.isRedirect)return{kind:"node_modules",moduleSpecifiers:_,computedWithoutCache:!0};if(!e){const e=ZR(l.path,s,t,r,o.overrideImportMode||n.impliedNodeFormat,c,l.isRedirect);if(!e)continue;l.isRedirect?p=ue(p,e):No(e)?Oj(e)?m=ue(m,e):d=ue(d,e):(a||!u||l.isInNodeModules)&&(m=ue(m,e))}}return(null==d?void 0:d.length)?{kind:"paths",moduleSpecifiers:d,computedWithoutCache:!0}:(null==p?void 0:p.length)?{kind:"redirect",moduleSpecifiers:p,computedWithoutCache:!0}:(null==_?void 0:_.length)?{kind:"node_modules",moduleSpecifiers:_,computedWithoutCache:!0}:{kind:"relative",moduleSpecifiers:xn.checkDefined(m),computedWithoutCache:!0}}(m,n,r,i,o,a,s);return null==g||g.set(r.path,p.path,o,a,h.kind,m,h.moduleSpecifiers),h}function QR(e,t,n,r,i={}){return ZR(t,YR(e.fileName,r),n,r,i.overrideImportMode??e.impliedNodeFormat,$R({},n,e))}function YR(e,t){e=Go(e,t.getCurrentDirectory());const n=tn(!t.useCaseSensitiveFileNames||t.useCaseSensitiveFileNames()),r=Ro(e);return{getCanonicalFileName:n,importingSourceFileName:e,sourceDirectory:r,canonicalSourceDirectory:n(r)}}function ZR(e,t,n,r,i,{getAllowedEndingsInPreferredOrder:o,relativePreference:a},s){const{baseUrl:c,paths:l,rootDirs:u}=n;if(s&&!l)return;const{sourceDirectory:_,canonicalSourceDirectory:d,getCanonicalFileName:p}=t,m=o(i),g=u&&function(e,t,n,r,i,o){const a=uB(t,e,r);if(void 0===a)return;const s=At(R(uB(n,e,r),(e=>O(a,(t=>ta(da(e,t,r)))))),Xk);return s?_B(s,i,o):void 0}(u,e,_,p,m,n)||_B(ta(da(_,e,p)),m,n);if(!c&&!l&&!OS(n)||0===a)return s?void 0:g;const h=mB(e,Go(rv(n,r)||c,r.getCurrentDirectory()),p);if(!h)return s?void 0:g;const y=s?void 0:function(e,t,n,r,i){var o,a,s;if(!r.readFile||!OS(n))return;const c=nB(r,t);if(!c)return;const l=Ko(c,"package.json"),u=null==(a=null==(o=r.getPackageJsonInfoCache)?void 0:o.call(r))?void 0:a.getPackageJsonInfo(l);if(sj(u)||!r.fileExists(l))return;const _=(null==u?void 0:u.contents.packageJsonContent)||Jb(r.readFile(l)),d=null==_?void 0:_.imports;if(!d)return;const p=rj(n,i);return null==(s=f(Re(d),(t=>{if(!an(t,"#")||"#"===t||an(t,"#/"))return;const i=Wt(t,"/")?1:t.includes("*")?2:0;return cB(n,r,e,c,t,d[t],p,i,!0)})))?void 0:s.moduleFileToTry}(e,_,n,r,i),v=s||void 0===y?l&&sB(h,l,m,r,n):void 0;if(s)return v;const b=y??(void 0===v&&void 0!==c?_B(h,m,n):v);if(!b)return g;if(1===a&&!Po(b))return b;if(3===a&&!Po(b)){const i=n.configFilePath?Yo(Ro(n.configFilePath),r.getCurrentDirectory(),t.getCanonicalFileName):t.getCanonicalFileName(r.getCurrentDirectory()),o=Yo(e,i,p),a=an(d,i),s=an(o,i);return a&&!s||!a&&s?b:(x=nB(r,Ro(o)),S=nB(r,_),k=!Ky(r),x===S||void 0!==x&&void 0!==S&&0===ca(x,S,k)?g:b)}var x,S,k;return gB(b)||eB(g)e.fileExists(Ko(t,"package.json"))?t:void 0))}function rB(e,t,n,r,i){var o;const a=Wy(n),s=n.getCurrentDirectory(),c=n.isSourceOfProjectReferenceRedirect(t)?n.getProjectReferenceRedirect(t):void 0,l=Yo(t,s,a),_=n.redirectTargetsMap.get(l)||u,d=[...c?[c]:u,t,..._].map((e=>Go(e,s)));let p=!x(d,JT);if(!r){const e=f(d,(e=>!(p&&JT(e))&&i(e,c===e)));if(e)return e}const m=null==(o=n.getSymlinkCache)?void 0:o.call(n).getSymlinkedDirectoriesByRealpath(),g=Go(t,s);return m&&ga(Ro(g),(t=>{const n=m.get(ea(Yo(t,s,a)));if(n)return!ua(e,t,a)&&f(d,(e=>{if(!ua(e,t,a))return;const r=da(t,e,a);for(const t of n){const n=Wo(t,r),o=i(n,e===c);if(p=!0,o)return o}}))}))||(r?f(d,(e=>p&&JT(e)?void 0:i(e,e===c))):void 0)}function iB(e,t,n,r,i,o={}){var a;const s=Yo(e.importingSourceFileName,n.getCurrentDirectory(),Wy(n)),c=Yo(t,n.getCurrentDirectory(),Wy(n)),l=null==(a=n.getModuleSpecifierCache)?void 0:a.call(n);if(l){const e=l.get(s,c,r,o);if(null==e?void 0:e.modulePaths)return e.modulePaths}const u=aB(e,t,n,i,o);return l&&l.setModulePaths(s,c,r,o,u),u}var oB=["dependencies","peerDependencies","optionalDependencies"];function aB(e,t,n,r,i){var o,a;const s=null==(o=n.getModuleResolutionCache)?void 0:o.call(n),c=null==(a=n.getSymlinkCache)?void 0:a.call(n);if(s&&c&&n.readFile&&!Oj(e.importingSourceFileName)){xn.type(n);const t=Wj(s.getPackageJsonInfoCache(),n,{}),o=Hj(e.importingSourceFileName,t);if(o){const e=function(e){let t;for(const n of oB){const r=e[n];r&&"object"==typeof r&&(t=Z(t,Re(r)))}return t}(o.contents.packageJsonContent);for(const t of e||u){const e=Sj(t,Ko(o.packageDirectory,"package.json"),r,n,s,void 0,i.overrideImportMode);c.setSymlinksFromResolution(e.resolvedModule)}}}const l=new Map;let _=!1;rB(e.importingSourceFileName,t,n,!0,((t,n)=>{const r=Oj(t);l.set(t,{path:e.getCanonicalFileName(t),isRedirect:n,isInNodeModules:r}),_=_||r}));const d=[];for(let t=e.canonicalSourceDirectory;0!==l.size;){const e=ea(t);let n;l.forEach((({path:t,isRedirect:r,isInNodeModules:i},o)=>{an(t,e)&&((n||(n=[])).push({path:o,isRedirect:r,isInNodeModules:i}),l.delete(o))})),n&&(n.length>1&&n.sort(tB),d.push(...n));const r=Ro(t);if(r===t)break;t=r}if(l.size){const e=$e(l.entries(),(([e,{isRedirect:t,isInNodeModules:n}])=>({path:e,isRedirect:t,isInNodeModules:n})));e.length>1&&e.sort(tB),d.push(...e)}return d}function sB(e,t,n,r,i){for(const r in t)for(const a of t[r]){const t=Xo(a),s=t.indexOf("*"),c=n.map((t=>({ending:t,value:_B(e,[t],i)})));if(lT(t)&&c.push({ending:void 0,value:e}),-1!==s){const e=t.substring(0,s),n=t.substring(s+1);for(const{ending:t,value:i}of c)if(i.length>=e.length+n.length&&an(i,e)&&Wt(i,n)&&o({ending:t,value:i})){const t=i.substring(e.length,i.length-n.length);if(!Po(t))return bC(r,t)}}else if(Q(c,(e=>0!==e.ending&&t===e.value))||Q(c,(e=>0===e.ending&&t===e.value&&o(e))))return r}function o({ending:t,value:n}){return 0!==t||n===_B(e,[t],i,r)}}function cB(e,t,n,r,i,o,a,s,c){if("string"==typeof o){const a=!Ky(t),l=()=>t.getCommonSourceDirectory(),u=c&&R$(n,e,a,l),_=c&&L$(n,e,a,l),d=Go(Ko(r,o),void 0),p=Vk(n)?Yk(n)+fB(n,e):void 0;switch(s){case 0:if(p&&0===ca(p,d,a)||0===ca(n,d,a)||u&&0===ca(u,d,a)||_&&0===ca(_,d,a))return{moduleFileToTry:i};break;case 1:if(p&&la(d,p,a)){const e=da(d,p,!1);return{moduleFileToTry:Go(Ko(Ko(i,o),e),void 0)}}if(la(d,n,a)){const e=da(d,n,!1);return{moduleFileToTry:Go(Ko(Ko(i,o),e),void 0)}}if(u&&la(d,u,a)){const e=da(d,u,!1);return{moduleFileToTry:Ko(i,e)}}if(_&&la(d,_,a)){const e=da(d,_,!1);return{moduleFileToTry:Ko(i,e)}}break;case 2:const e=d.indexOf("*"),t=d.slice(0,e),r=d.slice(e+1);if(p&&an(p,t,a)&&Wt(p,r,a)){const e=p.slice(t.length,p.length-r.length);return{moduleFileToTry:bC(i,e)}}if(an(n,t,a)&&Wt(n,r,a)){const e=n.slice(t.length,n.length-r.length);return{moduleFileToTry:bC(i,e)}}if(u&&an(u,t,a)&&Wt(u,r,a)){const e=u.slice(t.length,u.length-r.length);return{moduleFileToTry:bC(i,e)}}if(_&&an(_,t,a)&&Wt(_,r,a)){const e=_.slice(t.length,_.length-r.length);return{moduleFileToTry:bC(i,e)}}}}else{if(Array.isArray(o))return f(o,(o=>cB(e,t,n,r,i,o,a,s,c)));if("object"==typeof o&&null!==o)for(const l of Re(o))if("default"===l||a.indexOf(l)>=0||aR(a,l)){const u=o[l],_=cB(e,t,n,r,i,u,a,s,c);if(_)return _}}}function lB({path:e,isRedirect:t},{getCanonicalFileName:n,canonicalSourceDirectory:r},i,o,a,s,c,l){if(!o.fileExists||!o.readFile)return;const u=XT(e);if(!u)return;const _=$R(s,a,i).getAllowedEndingsInPreferredOrder();let d=e,p=!1;if(!c){let t,n=u.packageRootIndex;for(;;){const{moduleFileToTry:r,packageRootPath:i,blockedByExports:s,verbatimFromExports:c}=v(n);if(1!==ES(a)){if(s)return;if(c)return r}if(i){d=i,p=!0;break}if(t||(t=r),n=e.indexOf(xo,n+1),-1===n){d=_B(t,_,a,o);break}}}if(t&&!p)return;const m=o.getGlobalTypingsCacheLocation&&o.getGlobalTypingsCacheLocation(),g=n(d.substring(0,u.topLevelNodeModulesIndex));if(!(an(r,g)||m&&an(n(m),g)))return;const h=d.substring(u.topLevelPackageNameIndex+1),y=gR(h);return 1===ES(a)&&y===h?void 0:y;function v(t){var r,s;const c=e.substring(0,t),d=Ko(c,"package.json");let p=e,m=!1;const g=null==(s=null==(r=o.getPackageJsonInfoCache)?void 0:r.call(o))?void 0:s.getPackageJsonInfo(d);if(aj(g)||void 0===g&&o.fileExists(d)){const t=(null==g?void 0:g.contents.packageJsonContent)||Jb(o.readFile(d)),r=l||i.impliedNodeFormat;if(IS(a)){const n=gR(c.substring(u.topLevelPackageNameIndex+1)),i=rj(a,r),s=(null==t?void 0:t.exports)?function(e,t,n,r,i,o,a){return"object"==typeof o&&null!==o&&!Array.isArray(o)&&tR(o)?f(Re(o),(s=>{const c=Go(Ko(i,s),void 0),l=Wt(s,"/")?1:s.includes("*")?2:0;return cB(e,t,n,r,c,o[s],a,l,!1)})):cB(e,t,n,r,i,o,a,0,!1)}(a,o,e,c,n,t.exports,i):void 0;if(s)return{...s,verbatimFromExports:!0};if(null==t?void 0:t.exports)return{moduleFileToTry:e,blockedByExports:!0}}const s=(null==t?void 0:t.typesVersions)?XL(t.typesVersions):void 0;if(s){const t=sB(e.slice(c.length+1),s.paths,_,o,a);void 0===t?m=!0:p=Ko(c,t)}const h=(null==t?void 0:t.typings)||(null==t?void 0:t.types)||(null==t?void 0:t.main)||"index.js";if(st(h)&&(!m||!dT(rT(s.paths),h))){const e=Yo(h,c,n),r=n(p);if(Yk(e)===Yk(r))return{packageRootPath:c,moduleFileToTry:p};if("module"!==(null==t?void 0:t.type)&&!Io(r,Jk)&&an(r,e)&&Ro(r)===Zo(e)&&"index"===Yk(Bo(r)))return{packageRootPath:c,moduleFileToTry:p}}}else{const e=n(p.substring(u.packageRootIndex+1));if("index.d.ts"===e||"index.js"===e||"index.ts"===e||"index.tsx"===e)return{moduleFileToTry:p,packageRootPath:c}}return{moduleFileToTry:p}}}function uB(e,t,n){return q(t,(t=>{const r=mB(e,t,n);return void 0!==r&&gB(r)?void 0:r}))}function _B(e,t,n,r){if(Io(e,[".json",".mjs",".cjs"]))return e;const i=Yk(e);if(e===i)return e;const o=t.indexOf(2),a=t.indexOf(3);if(Io(e,[".mts",".cts"])&&-1!==a&&a0===e||1===e));return-1!==r&&r(e[e.None=0]="None",e[e.TypeofEQString=1]="TypeofEQString",e[e.TypeofEQNumber=2]="TypeofEQNumber",e[e.TypeofEQBigInt=4]="TypeofEQBigInt",e[e.TypeofEQBoolean=8]="TypeofEQBoolean",e[e.TypeofEQSymbol=16]="TypeofEQSymbol",e[e.TypeofEQObject=32]="TypeofEQObject",e[e.TypeofEQFunction=64]="TypeofEQFunction",e[e.TypeofEQHostObject=128]="TypeofEQHostObject",e[e.TypeofNEString=256]="TypeofNEString",e[e.TypeofNENumber=512]="TypeofNENumber",e[e.TypeofNEBigInt=1024]="TypeofNEBigInt",e[e.TypeofNEBoolean=2048]="TypeofNEBoolean",e[e.TypeofNESymbol=4096]="TypeofNESymbol",e[e.TypeofNEObject=8192]="TypeofNEObject",e[e.TypeofNEFunction=16384]="TypeofNEFunction",e[e.TypeofNEHostObject=32768]="TypeofNEHostObject",e[e.EQUndefined=65536]="EQUndefined",e[e.EQNull=131072]="EQNull",e[e.EQUndefinedOrNull=262144]="EQUndefinedOrNull",e[e.NEUndefined=524288]="NEUndefined",e[e.NENull=1048576]="NENull",e[e.NEUndefinedOrNull=2097152]="NEUndefinedOrNull",e[e.Truthy=4194304]="Truthy",e[e.Falsy=8388608]="Falsy",e[e.IsUndefined=16777216]="IsUndefined",e[e.IsNull=33554432]="IsNull",e[e.IsUndefinedOrNull=50331648]="IsUndefinedOrNull",e[e.All=134217727]="All",e[e.BaseStringStrictFacts=3735041]="BaseStringStrictFacts",e[e.BaseStringFacts=12582401]="BaseStringFacts",e[e.StringStrictFacts=16317953]="StringStrictFacts",e[e.StringFacts=16776705]="StringFacts",e[e.EmptyStringStrictFacts=12123649]="EmptyStringStrictFacts",e[e.EmptyStringFacts=12582401]="EmptyStringFacts",e[e.NonEmptyStringStrictFacts=7929345]="NonEmptyStringStrictFacts",e[e.NonEmptyStringFacts=16776705]="NonEmptyStringFacts",e[e.BaseNumberStrictFacts=3734786]="BaseNumberStrictFacts",e[e.BaseNumberFacts=12582146]="BaseNumberFacts",e[e.NumberStrictFacts=16317698]="NumberStrictFacts",e[e.NumberFacts=16776450]="NumberFacts",e[e.ZeroNumberStrictFacts=12123394]="ZeroNumberStrictFacts",e[e.ZeroNumberFacts=12582146]="ZeroNumberFacts",e[e.NonZeroNumberStrictFacts=7929090]="NonZeroNumberStrictFacts",e[e.NonZeroNumberFacts=16776450]="NonZeroNumberFacts",e[e.BaseBigIntStrictFacts=3734276]="BaseBigIntStrictFacts",e[e.BaseBigIntFacts=12581636]="BaseBigIntFacts",e[e.BigIntStrictFacts=16317188]="BigIntStrictFacts",e[e.BigIntFacts=16775940]="BigIntFacts",e[e.ZeroBigIntStrictFacts=12122884]="ZeroBigIntStrictFacts",e[e.ZeroBigIntFacts=12581636]="ZeroBigIntFacts",e[e.NonZeroBigIntStrictFacts=7928580]="NonZeroBigIntStrictFacts",e[e.NonZeroBigIntFacts=16775940]="NonZeroBigIntFacts",e[e.BaseBooleanStrictFacts=3733256]="BaseBooleanStrictFacts",e[e.BaseBooleanFacts=12580616]="BaseBooleanFacts",e[e.BooleanStrictFacts=16316168]="BooleanStrictFacts",e[e.BooleanFacts=16774920]="BooleanFacts",e[e.FalseStrictFacts=12121864]="FalseStrictFacts",e[e.FalseFacts=12580616]="FalseFacts",e[e.TrueStrictFacts=7927560]="TrueStrictFacts",e[e.TrueFacts=16774920]="TrueFacts",e[e.SymbolStrictFacts=7925520]="SymbolStrictFacts",e[e.SymbolFacts=16772880]="SymbolFacts",e[e.ObjectStrictFacts=7888800]="ObjectStrictFacts",e[e.ObjectFacts=16736160]="ObjectFacts",e[e.FunctionStrictFacts=7880640]="FunctionStrictFacts",e[e.FunctionFacts=16728e3]="FunctionFacts",e[e.VoidFacts=9830144]="VoidFacts",e[e.UndefinedFacts=26607360]="UndefinedFacts",e[e.NullFacts=42917664]="NullFacts",e[e.EmptyObjectStrictFacts=83427327]="EmptyObjectStrictFacts",e[e.EmptyObjectFacts=83886079]="EmptyObjectFacts",e[e.UnknownFacts=83886079]="UnknownFacts",e[e.AllTypeofNE=556800]="AllTypeofNE",e[e.OrFactsMask=8256]="OrFactsMask",e[e.AndFactsMask=134209471]="AndFactsMask",e))(CB||{}),wB=new Map(Object.entries({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384})),DB=(e=>(e[e.Normal=0]="Normal",e[e.Contextual=1]="Contextual",e[e.Inferential=2]="Inferential",e[e.SkipContextSensitive=4]="SkipContextSensitive",e[e.SkipGenericFunctions=8]="SkipGenericFunctions",e[e.IsForSignatureHelp=16]="IsForSignatureHelp",e[e.RestBindingElement=32]="RestBindingElement",e[e.TypeOnly=64]="TypeOnly",e))(DB||{}),EB=(e=>(e[e.None=0]="None",e[e.BivariantCallback=1]="BivariantCallback",e[e.StrictCallback=2]="StrictCallback",e[e.IgnoreReturnTypes=4]="IgnoreReturnTypes",e[e.StrictArity=8]="StrictArity",e[e.StrictTopSignature=16]="StrictTopSignature",e[e.Callback=3]="Callback",e))(EB||{}),PB=un(jB,(function(e){return!hu(e)})),NB=new Map(Object.entries({Uppercase:0,Lowercase:1,Capitalize:2,Uncapitalize:3,NoInfer:4})),FB=class{};function AB(){this.flags=0}function IB(e){return e.id||(e.id=SB,SB++),e.id}function OB(e){return e.id||(e.id=xB,xB++),e.id}function MB(e,t){const n=DR(e);return 1===n||t&&2===n}function LB(e){var t,n,r,i,o=[],a=e=>{o.push(e)},s=Hx.getSymbolConstructor(),c=Hx.getTypeConstructor(),l=Hx.getSignatureConstructor(),_=0,d=0,m=0,h=0,y=0,v=0,b=!1,w=ed(),P=[1],A=e.getCompilerOptions(),M=wS(A),B=DS(A),J=!!A.experimentalDecorators,z=zS(A),$=GS(A),V=AS(A),U=WS(A,"strictNullChecks"),H=WS(A,"strictFunctionTypes"),G=WS(A,"strictBindCallApply"),X=WS(A,"strictPropertyInitialization"),Y=WS(A,"noImplicitAny"),ee=WS(A,"noImplicitThis"),re=WS(A,"useUnknownInCatchVariables"),ie=A.exactOptionalPropertyTypes,oe=function(){const e=KA((function(e,t,r){return t?(t.stackIndex++,t.skip=!1,n(t,void 0),i(t,void 0)):t={checkMode:r,skip:!1,stackIndex:0,typeStack:[void 0,void 0]},Mm(e)&&Qm(e)?(t.skip=!0,i(t,KM(e.right,r)),t):(function(e){const{left:t,operatorToken:n,right:r}=e;61===n.kind&&(!uP(t)||57!==t.operatorToken.kind&&56!==t.operatorToken.kind||pJ(t,va._0_and_1_operations_cannot_be_mixed_without_parentheses,Ra(t.operatorToken.kind),Ra(n.kind)),!uP(r)||57!==r.operatorToken.kind&&56!==r.operatorToken.kind||pJ(r,va._0_and_1_operations_cannot_be_mixed_without_parentheses,Ra(r.operatorToken.kind),Ra(n.kind)))}(e),64!==e.operatorToken.kind||210!==e.left.kind&&209!==e.left.kind||(t.skip=!0,i(t,vM(e.left,KM(e.right,r),r,110===e.right.kind))),t)}),(function(e,n,r){if(!n.skip)return t(n,e)}),(function(e,t,o){if(!t.skip){const a=r(t);xn.assertIsDefined(a),n(t,a),i(t,void 0);const s=e.kind;if(ub(s)){let e=o.parent;for(;217===e.kind||_b(e);)e=e.parent;(56===s||FP(e))&&lj(o.left,a,FP(e)?e.thenStatement:void 0),uj(a,o.left)}}}),(function(e,n,r){if(!n.skip)return t(n,e)}),(function(e,t){let o;if(t.skip)o=r(t);else{const n=function(e){return e.typeStack[e.stackIndex]}(t);xn.assertIsDefined(n);const i=r(t);xn.assertIsDefined(i),o=SM(e.left,e.operatorToken,e.right,n,i,t.checkMode,e)}return t.skip=!1,n(t,void 0),i(t,void 0),t.stackIndex--,o}),(function(e,t,n){return i(e,t),e}));return(t,n)=>{const r=e(t,n);return xn.assertIsDefined(r),r};function t(e,t){if(uP(t))return t;i(e,KM(t,e.checkMode))}function n(e,t){e.typeStack[e.stackIndex]=t}function r(e){return e.typeStack[e.stackIndex+1]}function i(e,t){e.typeStack[e.stackIndex+1]=t}}(),ae={getReferencedExportContainer:function(e,t){var n;const r=hc(e,qD);if(r){let e=pB(r,function(e){return d_(e.parent)&&e===e.parent.name}(r));if(e){if(1048576&e.flags){const n=ts(e.exportSymbol);if(!t&&944&n.flags&&!(3&n.flags))return;e=n}const i=is(e);if(i){if(512&i.flags&&307===(null==(n=i.valueDeclaration)?void 0:n.kind)){const e=i.valueDeclaration;return e!==Sd(r)?void 0:e}return mc(r.parent,(e=>d_(e)&&ns(e)===i))}}}},getReferencedImportDeclaration:function(e){const t=Jw(e);if(t)return t;const n=hc(e,qD);if(n){const e=function(e){const t=Wo(e).resolvedSymbol;return t&&t!==ht?t:je(e,e.escapedText,3257279,void 0,!0,void 0)}(n);if(wa(e,111551)&&!Aa(e,111551))return sa(e)}},getReferencedDeclarationWithCollidingName:function(e){if(!Xl(e)){const t=hc(e,qD);if(t){const e=pB(t);if(e&&HR(e))return e.valueDeclaration}}},isDeclarationWithCollidingName:function(e){const t=hc(e,h_);if(t){const e=ns(t);if(e)return HR(e)}return!1},isValueAliasDeclaration:e=>{const t=hc(e);return!t||!Ie||XR(t)},hasGlobalName:function(e){return de.has(yc(e))},isReferencedAliasDeclaration:(e,t)=>{const n=hc(e);return!n||!Ie||ZR(n,t)},hasNodeCheckFlag:(e,t)=>{const n=hc(e);return!!n&&oB(n,t)},isTopLevelValueImportEqualsWithEntityName:function(e){const t=hc(e,rN);return!(void 0===t||307!==t.parent.kind||!Fm(t))&&(QR(ns(t))&&t.moduleReference&&!Nd(t.moduleReference))},isDeclarationVisible:sc,isImplementationOfOverload:tB,requiresAddingImplicitUndefined:nB,isExpandoFunctionDeclaration:rB,getPropertiesOfContainerFunction:function(e){const t=hc(e,HP);if(!t)return u;const n=ns(t);return n&&Rd($l(n))||u},createTypeOfDeclaration:function(e,t,n,r){const i=hc(e,Of);if(!i)return YC.createToken(133);const o=ns(i),a=!o||133120&o.flags?Dt:dT($l(o));return se.serializeTypeForDeclaration(i,a,o,t,1024|n,r)},createReturnTypeOfSignatureDeclaration:function(e,t,n,r){const i=hc(e,cu);return i?se.serializeReturnTypeForSignature(Cf(i),t,1024|n,r):YC.createToken(133)},createTypeOfExpression:function(e,t,n,r){const i=hc(e,Xu);if(!i)return YC.createToken(133);const o=RC(qR(i));return se.expressionOrTypeToTypeNode(i,o,void 0,t,1024|n,r)},createLiteralConstValue:function(e,t){return function(e,t,n){const r=1056&e.flags?se.symbolToExpression(e.symbol,111551,t,void 0,n):e===Kt?YC.createTrue():e===qt&&YC.createFalse();if(r)return r;const i=e.value;return"object"==typeof i?YC.createBigIntLiteral(i):"string"==typeof i?YC.createStringLiteral(i):i<0?YC.createPrefixUnaryExpression(41,YC.createNumericLiteral(-i)):YC.createNumericLiteral(i)}($l(ns(e)),e,t)},isSymbolAccessible:Is,isEntityNameVisible:Vs,getConstantValue:e=>{const t=hc(e,sB);return t?cB(t):void 0},getEnumMemberValue:e=>{const t=hc(e,$N);return t?aB(t):void 0},collectLinkedAliases:lc,markLinkedReferences:e=>{const t=hc(e);return t&&eP(t,0)},getReferencedValueDeclaration:function(e){if(!Xl(e)){const t=hc(e,qD);if(t){const e=pB(t);if(e)return _s(e).valueDeclaration}}},getReferencedValueDeclarations:function(e){if(!Xl(e)){const t=hc(e,qD);if(t){const e=pB(t);if(e)return F(_s(e).declarations,(e=>{switch(e.kind){case 260:case 169:case 208:case 172:case 303:case 304:case 306:case 210:case 262:case 218:case 219:case 263:case 231:case 266:case 174:case 177:case 178:case 267:return!0}return!1}))}}},getTypeReferenceSerializationKind:function(e,t){var n;const r=hc(e,ou);if(!r)return 0;if(t&&!(t=hc(t)))return 0;let i=!1;if(iE(r)){const e=Ma(bb(r),111551,!0,!0,t);i=!!(null==(n=null==e?void 0:e.declarations)?void 0:n.every(Wl))}const o=Ma(r,111551,!0,!0,t),a=o&&2097152&o.flags?Ea(o):o;i||(i=!(!o||!Aa(o,111551)));const s=Ma(r,788968,!0,!0,t),c=s&&2097152&s.flags?Ea(s):s;if(o||i||(i=!(!s||!Aa(s,788968))),a&&a===c){const e=py(!1);if(e&&a===e)return 9;const t=$l(a);if(t&&su(t))return i?10:1}if(!c)return i?11:0;const l=ju(c);return Nc(l)?i?11:0:3&l.flags?11:dM(l,245760)?2:dM(l,528)?6:dM(l,296)?3:dM(l,2112)?4:dM(l,402653316)?5:PT(l)?7:dM(l,12288)?8:lB(l)?10:qk(l)?7:11},isOptionalParameter:xf,isArgumentsLocalBinding:function(e){if(Xl(e))return!1;const t=hc(e,qD);if(!t)return!1;const n=t.parent;return!!n&&(!((GE(n)||BN(n))&&n.name===t)&&pB(t)===Ee)},getExternalModuleFileFromDeclaration:e=>{const t=hc(e,Dp);return t&&yB(t)},isLiteralConstDeclaration:function(e){return!!(nf(e)||KP(e)&&SJ(e))&&cx($l(ns(e)))},isLateBound:e=>{const t=hc(e,h_),n=t&&ns(t);return!!(n&&4096&px(n))},getJsxFactoryEntity:fB,getJsxFragmentFactoryEntity:mB,isBindingCapturedByNode:(e,t)=>{const n=hc(e),r=hc(t);return!!n&&!!r&&(KP(r)||KE(r))&&function(e,t){const n=Wo(e);return!!n&&D(n.capturedBlockScopeBindings,ns(t))}(n,r)},getDeclarationStatementsForSourceFile:(e,t,n)=>{const r=hc(e);xn.assert(r&&307===r.kind,"Non-sourcefile node passed into getDeclarationsForSourceFile");const i=ns(e);return i?($a(i),i.exports?se.symbolTableToDeclarationStatements(i.exports,e,t,n):[]):e.locals?se.symbolTableToDeclarationStatements(e.locals,e,t,n):[]},isImportRequiredByAugmentation:function(e){const t=Sd(e);if(!t.symbol)return!1;const n=yB(e);if(!n)return!1;if(n===t)return!1;const r=Qa(t.symbol);for(const e of $e(r.values()))if(e.mergeId){const t=ts(e);if(t.declarations)for(const e of t.declarations)if(Sd(e)===n)return!0}return!1}},se=function(){return{typeToTypeNode:(e,t,n,r)=>c(t,n,r,(t=>_(e,t))),typePredicateToTypePredicateNode:(e,t,n,r)=>c(t,n,r,(t=>P(e,t))),expressionOrTypeToTypeNode:(e,t,n,r,i,a)=>c(r,i,a,(r=>o(r,e,t,n))),serializeTypeForDeclaration:(e,t,n,r,i,o)=>c(r,i,o,(r=>de(r,e,t,n))),serializeReturnTypeForSignature:(e,t,n,r)=>c(t,n,r,(t=>pe(t,e))),indexInfoToIndexSignatureDeclaration:(e,t,n,r)=>c(t,n,r,(t=>b(e,t,void 0))),signatureToSignatureDeclaration:(e,t,n,r,i)=>c(n,r,i,(n=>k(e,t,n))),symbolToEntityName:(e,t,n,r,i)=>c(n,r,i,(n=>ne(e,n,t,!1))),symbolToExpression:(e,t,n,r,i)=>c(n,r,i,(n=>re(e,n,t))),symbolToTypeParameterDeclarations:(e,t,n,r)=>c(t,n,r,(t=>U(e,t))),symbolToParameterDeclaration:(e,t,n,r)=>c(t,n,r,(t=>j(e,t))),typeParameterToDeclaration:(e,t,n,r)=>c(t,n,r,(t=>E(e,t))),symbolTableToDeclarationStatements:(e,t,i,o)=>c(t,i,o,(t=>function(e,t){var i;const o=oe(YC.createPropertyDeclaration,174,!0),a=oe(((e,t,n,r)=>YC.createPropertySignature(e,t,n,r)),173,!1),c=t.enclosingDeclaration;let l=[];const d=new Set,m=[],h=t;t={...h,usedSymbolNames:new Set(h.usedSymbolNames),remappedSymbolNames:new Map,remappedSymbolReferences:new Map(null==(i=h.remappedSymbolReferences)?void 0:i.entries()),tracker:void 0};const y={...h.tracker.inner,trackSymbol:(e,n,r)=>{var i,o;if(null==(i=t.remappedSymbolNames)?void 0:i.has(OB(e)))return!1;if(0===Is(e,n,r,!1).accessibility){const n=$(e,t,r);if(!(4&e.flags)){const e=n[0],t=Sd(h.enclosingDeclaration);Q(e.declarations,(e=>Sd(e)===t))&&J(e)}}else if(null==(o=h.tracker.inner)?void 0:o.trackSymbol)return h.tracker.inner.trackSymbol(e,n,r);return!1}};t.tracker=new $B(t,y,h.tracker.moduleResolverHost),ld(e,((e,t)=>{he(e,vc(t))}));let v=!t.bundled;const C=e.get("export=");return C&&e.size>1&&2098688&C.flags&&(e=ed()).set("export=",C),A(e),w=function(e){const t=T(e,(e=>gN(e)&&!e.moduleSpecifier&&!e.attributes&&!!e.exportClause&&hN(e.exportClause)));if(t>=0){const n=e[t],r=q(n.exportClause.elements,(t=>{if(!t.propertyName){const n=F(te(e),(n=>Cc(e[n],t.name)));if(p(n)&&x(n,(t=>ZT(e[t])))){for(const t of n)e[t]=P(e[t]);return}}return t}));p(r)?e[t]=YC.updateExportDeclaration(n,n.modifiers,n.isTypeOnly,YC.updateNamedExports(n.exportClause,r),n.moduleSpecifier,n.attributes):Yt(e,t)}return e}(w=function(e){const t=F(e,(e=>gN(e)&&!e.moduleSpecifier&&!!e.exportClause&&hN(e.exportClause)));p(t)>1&&(e=[...F(e,(e=>!gN(e)||!!e.moduleSpecifier||!e.exportClause)),YC.createExportDeclaration(void 0,!1,YC.createNamedExports(R(t,(e=>ut(e.exportClause,hN).elements))),void 0)]);const n=F(e,(e=>gN(e)&&!!e.moduleSpecifier&&!!e.exportClause&&hN(e.exportClause)));if(p(n)>1){const t=He(n,(e=>wD(e.moduleSpecifier)?">"+e.moduleSpecifier.text:">"));if(t.length!==n.length)for(const n of t)n.length>1&&(e=[...F(e,(e=>!n.includes(e))),YC.createExportDeclaration(void 0,!1,YC.createNamedExports(R(n,(e=>ut(e.exportClause,hN).elements))),n[0].moduleSpecifier)])}return e}(w=function(e){const t=S(e,mN),n=T(e,ZP);let r=-1!==n?e[n]:void 0;if(r&&t&&t.isExportEquals&&qD(t.expression)&&qD(r.name)&&bc(r.name)===bc(t.expression)&&r.body&&eN(r.body)){const i=F(e,(e=>!!(32&Qv(e)))),o=r.name;let a=r.body;if(p(i)&&(r=YC.updateModuleDeclaration(r,r.modifiers,r.name,a=YC.updateModuleBlock(a,YC.createNodeArray([...r.body.statements,YC.createExportDeclaration(void 0,!1,YC.createNamedExports(O(R(i,(e=>{return EP(t=e)?F(O(t.declarationList.declarations,Pc),D):F([Pc(t)],D);var t})),(e=>YC.createExportSpecifier(!1,void 0,e)))),void 0)]))),e=[...e.slice(0,n),r,...e.slice(n+1)]),!S(e,(e=>e!==r&&Cc(e,o)))){l=[];const n=!Q(a.statements,(e=>Bv(e,32)||mN(e)||gN(e)));f(a.statements,(e=>{z(e,n?32:0)})),e=[...F(e,(e=>e!==r&&e!==t)),...l]}}return e}(w=l))),c&&(qN(c)&&Zp(c)||ZP(c))&&(!Q(w,r_)||!t_(w)&&Q(w,n_))&&w.push(VF(YC)),w;var w;function D(e){return!!e&&80===e.kind}function P(e){const t=-129&(32|Qv(e));return YC.replaceModifiers(e,t)}function N(e){const t=-33&Qv(e);return YC.replaceModifiers(e,t)}function A(e,t,n){t||m.push(new Map),e.forEach((e=>{L(e,!1,!!n)})),t||(m[m.length-1].forEach((e=>{L(e,!0,!!n)})),m.pop())}function L(e,n,r){Rd($l(e));const i=ts(e);if(!d.has(OB(i))&&(d.add(OB(i)),!n||p(e.declarations)&&Q(e.declarations,(e=>!!mc(e,(e=>e===c)))))){const i=se(t);j(e,n,r),i()}}function j(e,i,c,l=e.escapedName){var d,m,g,h,y,v;const b=vc(l),k="default"===l;if(i&&!(131072&t.flags)&&Mh(b)&&!k)return void(t.encounteredError=!0);let T=k&&!!(-113&e.flags||16&e.flags&&p(Rd($l(e))))&&!(2097152&e.flags),C=!T&&!i&&Mh(b)&&!k;(T||C)&&(i=!0);const w=(i?0:32)|(k&&!T?2048:0),D=1536&e.flags&&7&e.flags&&"export="!==l,P=D&&ie($l(e),e);if((8208&e.flags||P)&&K($l(e),e,he(e,b),w),524288&e.flags&&function(e,n,r){var i;const o=Fu(e),a=O(Uo(e).typeParameters,(e=>E(e,t))),c=null==(i=e.declarations)?void 0:i.find(Fg),l=fl(c?c.comment||c.parent.comment:void 0),u=t.flags;t.flags|=8388608;const d=t.enclosingDeclaration;t.enclosingDeclaration=c;const p=c&&c.typeExpression&&UN(c.typeExpression)&&s(t,c.typeExpression.type,o,void 0)||_(o,t);z(hw(YC.createTypeAliasDeclaration(void 0,he(e,n),a,p),l?[{kind:3,text:"*\n * "+l.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}]:[]),r),t.flags=u,t.enclosingDeclaration=d}(e,b,w),98311&e.flags&&"export="!==l&&!(4194304&e.flags)&&!(32&e.flags)&&!(8192&e.flags)&&!P)if(c)ee(e)&&(C=!1,T=!1);else{const n=$l(e),o=he(e,b);if(n.symbol&&n.symbol!==e&&16&n.symbol.flags&&Q(n.symbol.declarations,UT)&&((null==(d=n.symbol.members)?void 0:d.size)||(null==(m=n.symbol.exports)?void 0:m.size)))t.remappedSymbolReferences||(t.remappedSymbolReferences=new Map),t.remappedSymbolReferences.set(OB(n.symbol),e),j(n.symbol,i,c,l),t.remappedSymbolReferences.delete(OB(n.symbol));else if(16&e.flags||!ie(n,e)){const a=2&e.flags?wE(e)?2:1:(null==(g=e.parent)?void 0:g.valueDeclaration)&&qN(null==(h=e.parent)?void 0:h.valueDeclaration)?2:void 0,s=!T&&4&e.flags?me(o,e):o;let c=e.declarations&&S(e.declarations,(e=>KP(e)));c&&WP(c.parent)&&1===c.parent.declarations.length&&(c=c.parent.parent);const l=null==(y=e.declarations)?void 0:y.find(GE);if(l&&uP(l.parent)&&qD(l.parent.right)&&(null==(v=n.symbol)?void 0:v.valueDeclaration)&&qN(n.symbol.valueDeclaration)){const e=o===l.parent.right.escapedText?void 0:l.parent.right;z(YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,e,o)])),0),t.tracker.trackSymbol(n.symbol,t.enclosingDeclaration,111551)}else z(r(t,YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(s,void 0,de(t,void 0,n,e))],a)),c),s!==o?-33&w:w),s===o||i||(z(YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,s,o)])),0),C=!1,T=!1)}else K(n,e,o,w)}if(384&e.flags&&function(e,t,n){z(YC.createEnumDeclaration(YC.createModifiersFromModifierFlags(mM(e)?4096:0),he(e,t),O(F(Rd($l(e)),(e=>!!(8&e.flags))),(e=>{const t=e.declarations&&e.declarations[0]&&$N(e.declarations[0])?cB(e.declarations[0]):void 0;return YC.createEnumMember(vc(e.escapedName),void 0===t?void 0:"string"==typeof t?YC.createStringLiteral(t):YC.createNumericLiteral(t))}))),n)}(e,b,w),32&e.flags&&(4&e.flags&&e.valueDeclaration&&uP(e.valueDeclaration.parent)&&mP(e.valueDeclaration.parent.right)?Y(e,he(e,b),w):function(e,i,a){var c,l;const d=null==(c=e.declarations)?void 0:c.find(gu),m=t.enclosingDeclaration;t.enclosingDeclaration=d||m;const g=O(nu(e),(e=>E(e,t))),h=y_(Nu(e)),y=ku(h),v=d&&Th(d),b=v&&function(e){const r=q(e,(e=>{const r=t.enclosingDeclaration;t.enclosingDeclaration=e;let i=e.expression;if(vb(i)){if(qD(i)&&""===bc(i))return o(void 0);let e;if(({introducesError:e,node:i}=fe(i,t)),e)return o(void 0)}return o(YC.createExpressionWithTypeArguments(i,O(e.typeArguments,(e=>s(t,e,n(t,e))||_(n(t,e),t)))));function o(e){return t.enclosingDeclaration=r,e}}));if(r.length===e.length)return r}(v)||q(function(e){let t=u;if(e.symbol.declarations)for(const n of e.symbol.declarations){const e=Th(n);if(e)for(const n of e){const e=Sx(n);Nc(e)||(t===u?t=[e]:t.push(e))}}return t}(h),pe),x=$l(e),S=!!(null==(l=x.symbol)?void 0:l.valueDeclaration)&&gu(x.symbol.valueDeclaration),k=S?xu(x):St,T=[...p(y)?[YC.createHeritageClause(96,O(y,(e=>function(e,n,r){const i=_e(e,111551);if(i)return i;const o=me(`${r}_base`);return z(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(o,void 0,_(n,t))],2)),0),YC.createExpressionWithTypeArguments(YC.createIdentifier(o),void 0)}(e,k,i))))]:[],...p(b)?[YC.createHeritageClause(119,b)]:[]],C=function(e,t,n){if(!p(t))return n;const r=new Map;f(n,(e=>{r.set(e.escapedName,e)}));for(const n of t){const t=Rd(y_(n,e.thisType));for(const e of t){const t=r.get(e.escapedName);t&&e.parent===t.parent&&r.delete(e.escapedName)}}return $e(r.values())}(h,y,Rd(h)),w=F(C,(e=>{const t=e.valueDeclaration;return!(!t||Dc(t)&&VD(t.name))})),D=Q(C,(e=>{const t=e.valueDeclaration;return!!t&&Dc(t)&&VD(t.name)}))?[YC.createPropertyDeclaration(void 0,YC.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:u,P=R(w,(e=>o(e,!1,y[0]))),N=R(F(Rd(x),(e=>!(4194304&e.flags||"prototype"===e.escapedName||X(e)))),(e=>o(e,!0,k))),A=!S&&e.valueDeclaration&&Mm(e.valueDeclaration)&&!Q(Vp(x,1))?[YC.createConstructorDeclaration(YC.createModifiersFromModifierFlags(2),[],void 0)]:ce(1,x,k,176),I=ue(h,y[0]);t.enclosingDeclaration=m,z(r(t,YC.createClassDeclaration(void 0,i,g,T,[...I,...N,...A,...P,...D]),e.declarations&&F(e.declarations,(e=>GP(e)||mP(e)))[0]),a)}(e,he(e,b),w)),(1536&e.flags&&(!D||function(e){return x(U(e),(e=>!(111551&Pa(Da(e)))))}(e))||P)&&function(e,n,r){const i=We(U(e),(t=>t.parent&&t.parent===e?"real":"merged")),o=i.get("real")||u,a=i.get("merged")||u;p(o)&&G(o,he(e,n),r,!!(67108880&e.flags));if(p(a)){const r=Sd(t.enclosingDeclaration),i=he(e,n),o=YC.createModuleBlock([YC.createExportDeclaration(void 0,!1,YC.createNamedExports(q(F(a,(e=>"export="!==e.escapedName)),(n=>{var i,o;const a=vc(n.escapedName),s=he(n,a),c=n.declarations&&sa(n);if(r&&(c?r!==Sd(c):!Q(n.declarations,(e=>Sd(e)===r))))return void(null==(o=null==(i=t.tracker)?void 0:i.reportNonlocalAugmentation)||o.call(i,r,e,n));const l=c&&Ca(c,!0);J(l||n);const u=l?he(l,vc(l.escapedName)):s;return YC.createExportSpecifier(!1,a===u?void 0:u,a)}))))]);z(YC.createModuleDeclaration(void 0,YC.createIdentifier(i),o,32),0)}}(e,b,w),64&e.flags&&!(32&e.flags)&&function(e,n,r){const i=Nu(e),o=O(nu(e),(e=>E(e,t))),s=ku(i),c=p(s)?cv(s):void 0,l=R(Rd(i),(e=>function(e,t){return a(e,!1,t)}(e,c))),u=ce(0,i,c,179),_=ce(1,i,c,180),d=ue(i,c),f=p(s)?[YC.createHeritageClause(96,q(s,(e=>_e(e,111551))))]:void 0;z(YC.createInterfaceDeclaration(void 0,he(e,n),o,f,[...d,..._,...u,...l]),r)}(e,b,w),2097152&e.flags&&Y(e,he(e,b),w),4&e.flags&&"export="===e.escapedName&&ee(e),8388608&e.flags&&e.declarations)for(const n of e.declarations){const e=ja(n,n.moduleSpecifier);e&&z(YC.createExportDeclaration(void 0,n.isTypeOnly,void 0,YC.createStringLiteral(H(e,t))),0)}T?z(YC.createExportAssignment(void 0,!1,YC.createIdentifier(he(e,b))),0):C&&z(YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,he(e,b),b)])),0)}function J(e){if(Q(e.declarations,ay))return;xn.assertIsDefined(m[m.length-1]),me(vc(e.escapedName),e);const t=!!(2097152&e.flags)&&!Q(e.declarations,(e=>!!mc(e,gN)||dN(e)||rN(e)&&!SN(e.moduleReference)));m[t?0:m.length-1].set(OB(e),e)}function z(e,n){if(cI(e)){let r=0;const i=t.enclosingDeclaration&&(Fg(t.enclosingDeclaration)?Sd(t.enclosingDeclaration):t.enclosingDeclaration);32&n&&i&&(function(e){return qN(e)&&(Zp(e)||ef(e))||sp(e)&&!pp(e)}(i)||ZP(i))&&ZT(e)&&(r|=32),!v||32&r||i&&33554432&i.flags||!(YP(e)||EP(e)||HP(e)||GP(e)||ZP(e))||(r|=128),2048&n&&(GP(e)||XP(e)||HP(e))&&(r|=2048),r&&(e=YC.replaceModifiers(e,r|Qv(e)))}l.push(e)}function U(e){let t=$e(Ga(e).values());const n=ts(e);if(n!==e){const e=new Set(t);for(const t of Ga(n).values())111551&Pa(Da(t))||e.add(t);t=$e(e)}return F(t,(e=>X(e)&&Ts(e.escapedName,99)))}function K(e,n,i,o){const a=Vp(e,0);for(const e of a){const n=k(e,262,t,{name:YC.createIdentifier(i)});z(r(t,n,W(e)),o)}1536&n.flags&&n.exports&&n.exports.size||G(F(Rd(e),X),i,o,!0)}function W(e){if(e.declaration&&e.declaration.parent){if(uP(e.declaration.parent)&&5===ag(e.declaration.parent))return e.declaration.parent;if(KP(e.declaration.parent)&&e.declaration.parent.parent)return e.declaration.parent.parent}return e.declaration}function G(e,n,r,i){if(p(e)){const o=We(e,(e=>!p(e.declarations)||Q(e.declarations,(e=>Sd(e)===Sd(t.enclosingDeclaration)))?"local":"remote")).get("local")||u;let a=_I.createModuleDeclaration(void 0,YC.createIdentifier(n),YC.createModuleBlock([]),32);OT(a,c),a.locals=ed(e),a.symbol=e[0].parent;const s=l;l=[];const _=v;v=!1;const d={...t,enclosingDeclaration:a},f=t;t=d,A(ed(o),i,!0),t=f,v=_;const m=l;l=s;const g=O(m,(e=>mN(e)&&!e.isExportEquals&&qD(e.expression)?YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,e.expression,YC.createIdentifier("default"))])):e)),h=x(g,(e=>Bv(e,32)))?O(g,N):g;a=YC.updateModuleDeclaration(a,a.modifiers,a.name,YC.createModuleBlock(h)),z(a,r)}}function X(e){return!!(2887656&e.flags)||!(4194304&e.flags||"prototype"===e.escapedName||e.valueDeclaration&&Jv(e.valueDeclaration)&&gu(e.valueDeclaration.parent))}function Y(e,n,r){var i,o,a,s,c,l;const u=sa(e);if(!u)return xn.fail();const _=ts(Ca(u,!0));if(!_)return;let d=_p(_)&&g(e.declarations,(e=>{if(fN(e)||yN(e))return bc(e.propertyName||e.name);if(uP(e)||mN(e)){const t=mN(e)?e.expression:e.right;if(GE(t))return bc(t.name)}if(la(e)){const t=Pc(e);if(t&&qD(t))return bc(t)}}))||vc(_.escapedName);"export="===d&&V&&(d="default");const p=he(_,d);switch(J(_),u.kind){case 208:if(260===(null==(o=null==(i=u.parent)?void 0:i.parent)?void 0:o.kind)){const e=H(_.parent||_,t),{propertyName:r}=u;z(YC.createImportDeclaration(void 0,YC.createImportClause(!1,void 0,YC.createNamedImports([YC.createImportSpecifier(!1,r&&qD(r)?YC.createIdentifier(bc(r)):void 0,YC.createIdentifier(n))])),YC.createStringLiteral(e),void 0),0);break}xn.failBadSyntaxKind((null==(a=u.parent)?void 0:a.parent)||u,"Unhandled binding element grandparent kind in declaration serialization");break;case 304:226===(null==(c=null==(s=u.parent)?void 0:s.parent)?void 0:c.kind)&&Z(vc(e.escapedName),p);break;case 260:if(GE(u.initializer)){const e=u.initializer,i=YC.createUniqueName(n),o=H(_.parent||_,t);z(YC.createImportEqualsDeclaration(void 0,!1,i,YC.createExternalModuleReference(YC.createStringLiteral(o))),0),z(YC.createImportEqualsDeclaration(void 0,!1,YC.createIdentifier(n),YC.createQualifiedName(i,e.name)),r);break}case 271:if("export="===_.escapedName&&Q(_.declarations,(e=>qN(e)&&ef(e)))){ee(e);break}const f=!(512&_.flags||KP(u));z(YC.createImportEqualsDeclaration(void 0,!1,YC.createIdentifier(n),f?ne(_,t,-1,!1):YC.createExternalModuleReference(YC.createStringLiteral(H(_,t)))),f?r:0);break;case 270:z(YC.createNamespaceExportDeclaration(bc(u.name)),0);break;case 273:{const e=H(_.parent||_,t),r=t.bundled?YC.createStringLiteral(e):u.parent.moduleSpecifier,i=iN(u.parent)?u.parent.attributes:void 0,o=AF(u.parent);z(YC.createImportDeclaration(void 0,YC.createImportClause(o,YC.createIdentifier(n),void 0),r,i),0);break}case 274:{const e=H(_.parent||_,t),r=t.bundled?YC.createStringLiteral(e):u.parent.parent.moduleSpecifier,i=AF(u.parent.parent);z(YC.createImportDeclaration(void 0,YC.createImportClause(i,void 0,YC.createNamespaceImport(YC.createIdentifier(n))),r,u.parent.attributes),0);break}case 280:z(YC.createExportDeclaration(void 0,!1,YC.createNamespaceExport(YC.createIdentifier(n)),YC.createStringLiteral(H(_,t))),0);break;case 276:{const e=H(_.parent||_,t),r=t.bundled?YC.createStringLiteral(e):u.parent.parent.parent.moduleSpecifier,i=AF(u.parent.parent.parent);z(YC.createImportDeclaration(void 0,YC.createImportClause(i,void 0,YC.createNamedImports([YC.createImportSpecifier(!1,n!==d?YC.createIdentifier(d):void 0,YC.createIdentifier(n))])),r,u.parent.parent.parent.attributes),0);break}case 281:const m=u.parent.parent.moduleSpecifier;m&&"default"===(null==(l=u.propertyName)?void 0:l.escapedText)&&(d="default"),Z(vc(e.escapedName),m?d:p,m&&$_(m)?YC.createStringLiteral(m.text):void 0);break;case 277:ee(e);break;case 226:case 211:case 212:"default"===e.escapedName||"export="===e.escapedName?ee(e):Z(n,p);break;default:return xn.failBadSyntaxKind(u,"Unhandled alias declaration kind in symbol serializer!")}}function Z(e,t,n){z(YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,e!==t?t:void 0,e)]),n),0)}function ee(e){var n;if(4194304&e.flags)return!1;const r=vc(e.escapedName),i="export="===r,o=i||"default"===r,a=e.declarations&&sa(e),s=a&&Ca(a,!0);if(s&&p(s.declarations)&&Q(s.declarations,(e=>Sd(e)===Sd(c)))){const n=a&&(mN(a)||uP(a)?bh(a):xh(a)),u=n&&vb(n)?function(e){switch(e.kind){case 80:return e;case 166:do{e=e.left}while(80!==e.kind);return e;case 211:do{if(og(e.expression)&&!VD(e.name))return e.name;e=e.expression}while(80!==e.kind);return e}}(n):void 0,_=u&&Ma(u,-1,!0,!0,c);(_||s)&&J(_||s);const d=t.tracker.disableTrackSymbol;if(t.tracker.disableTrackSymbol=!0,o)l.push(YC.createExportAssignment(void 0,i,re(s,t,-1)));else if(u===n&&u)Z(r,bc(u));else if(n&&mP(n))Z(r,he(s,Sc(s)));else{const n=me(r,e);z(YC.createImportEqualsDeclaration(void 0,!1,YC.createIdentifier(n),ne(s,t,-1,!1)),0),Z(r,n)}return t.tracker.disableTrackSymbol=d,!0}{const a=me(r,e),c=RC($l(ts(e)));if(ie(c,e))K(c,e,a,o?0:32);else{const i=267!==(null==(n=t.enclosingDeclaration)?void 0:n.kind)||98304&e.flags&&!(65536&e.flags)?2:1;z(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(a,void 0,de(t,void 0,c,e))],i)),s&&4&s.flags&&"export="===s.escapedName?128:r===a?32:0)}return o?(l.push(YC.createExportAssignment(void 0,i,YC.createIdentifier(a))),!0):r!==a&&(Z(r,a),!0)}}function ie(e,n){var r;const i=Sd(t.enclosingDeclaration);return 48&wx(e)&&!Q(null==(r=e.symbol)?void 0:r.declarations,wu)&&!p(cf(e))&&!Ys(e)&&!(!p(F(Rd(e),X))&&!p(Vp(e,0)))&&!p(Vp(e,1))&&!le(n,c)&&!(e.symbol&&Q(e.symbol.declarations,(e=>Sd(e)!==i)))&&!Q(Rd(e),(e=>s_(e.escapedName)))&&!Q(Rd(e),(e=>Q(e.declarations,(e=>Sd(e)!==i))))&&x(Rd(e),(e=>!(!Ts(Sc(e),M)||98304&e.flags&&ql(e)!==zl(e))))}function oe(e,n,i){return function(o,a,s){var c,l,u,_,d;const p=fx(o),m=!!(2&p);if(a&&2887656&o.flags)return[];if(4194304&o.flags||"constructor"===o.escapedName||s&&Jp(s,o.escapedName)&&oM(Jp(s,o.escapedName))===oM(o)&&(16777216&o.flags)==(16777216&Jp(s,o.escapedName).flags)&&gS($l(o),Tc(s,o.escapedName)))return[];const g=-1025&p|(a?256:0),h=ae(o,t),y=null==(c=o.declarations)?void 0:c.find(_n(uE,hu,KP,lE,uP,GE));if(98304&o.flags&&i){const e=[];if(65536&o.flags){const n=o.declarations&&f(o.declarations,(e=>178===e.kind?e:QE(e)&&sg(e)?f(e.arguments[2].properties,(e=>{const t=Pc(e);if(t&&qD(t)&&"set"===bc(t))return e})):void 0));xn.assert(!!n);const i=uu(n)?Cf(n).parameters[0]:void 0;e.push(r(t,YC.createSetAccessorDeclaration(YC.createModifiersFromModifierFlags(g),h,[YC.createParameterDeclaration(void 0,void 0,i?B(i,I(i),t):"value",void 0,m?void 0:de(t,void 0,zl(o),o))],void 0),(null==(l=o.declarations)?void 0:l.find(A_))||y))}if(32768&o.flags){const n=2&p;e.push(r(t,YC.createGetAccessorDeclaration(YC.createModifiersFromModifierFlags(g),h,[],n?void 0:de(t,void 0,$l(o),o),void 0),(null==(u=o.declarations)?void 0:u.find(I_))||y))}return e}if(98311&o.flags)return r(t,e(YC.createModifiersFromModifierFlags((oM(o)?8:0)|g),h,16777216&o.flags?YC.createToken(58):void 0,m?void 0:de(t,void 0,zl(o),o),void 0),(null==(_=o.declarations)?void 0:_.find(_n(uE,KP)))||y);if(8208&o.flags){const i=Vp($l(o),0);if(2&g)return r(t,e(YC.createModifiersFromModifierFlags((oM(o)?8:0)|g),h,16777216&o.flags?YC.createToken(58):void 0,void 0,void 0),(null==(d=o.declarations)?void 0:d.find(uu))||i[0]&&i[0].declaration||o.declarations&&o.declarations[0]);const a=[];for(const e of i){const i=k(e,n,t,{name:h,questionToken:16777216&o.flags?YC.createToken(58):void 0,modifiers:g?YC.createModifiersFromModifierFlags(g):void 0}),s=e.declaration&&yg(e.declaration.parent)?e.declaration.parent:e.declaration;a.push(r(t,i,s))}return a}return xn.fail(`Unhandled class member kind! ${o.__debugFlags||o.flags}`)}}function ce(e,n,i,o){const a=Vp(n,e);if(1===e){if(!i&&x(a,(e=>0===p(e.parameters))))return[];if(i){const e=Vp(i,1);if(!p(e)&&x(a,(e=>0===p(e.parameters))))return[];if(e.length===a.length){let t=!1;for(let n=0;n_(e,t))),i=re(e.target.symbol,t,788968)):e.symbol&&Fs(e.symbol,c,n)&&(i=re(e.symbol,t,788968)),i)return YC.createExpressionWithTypeArguments(i,r)}function pe(e){return _e(e,788968)||(e.symbol?YC.createExpressionWithTypeArguments(re(e.symbol,t,788968),void 0):void 0)}function me(e,n){var r,i;const o=n?OB(n):void 0;if(o&&t.remappedSymbolNames.has(o))return t.remappedSymbolNames.get(o);n&&(e=ge(n,e));let a=0;const s=e;for(;null==(r=t.usedSymbolNames)?void 0:r.has(e);)a++,e=`${s}_${a}`;return null==(i=t.usedSymbolNames)||i.add(e),o&&t.remappedSymbolNames.set(o,e),e}function ge(e,n){if("default"===n||"__class"===n||"__function"===n){const r=t.flags;t.flags|=16777216;const i=oc(e,t);t.flags=r,n=i.length>0&&Km(i.charCodeAt(0))?By(i):i}return"default"===n?n="_default":"export="===n&&(n="_exports"),Ts(n,M)&&!Mh(n)?n:"_"+n.replace(/[^a-zA-Z0-9]/g,"_")}function he(e,n){const r=OB(e);return t.remappedSymbolNames.has(r)?t.remappedSymbolNames.get(r):(n=ge(e,n),t.remappedSymbolNames.set(r,n),n)}}(e,t))),symbolToNode:(e,t,n,r,i)=>c(n,r,i,(n=>function(e,t,n){if(1073741824&t.flags){if(e.valueDeclaration){const t=Pc(e.valueDeclaration);if(t&&oE(t))return t}const r=Uo(e).nameType;if(r&&9216&r.flags)return t.enclosingDeclaration=r.symbol.valueDeclaration,YC.createComputedPropertyName(re(r.symbol,t,n))}return re(e,t,n)}(e,n,t)))};function n(e,t,n){const r=function(e){return Sx(e)}(t);if(!e.mapper)return r;const i=eS(r,e.mapper);return n&&i!==r?void 0:i}function r(e,t,n){return ly(t)&&16&t.flags&&e.enclosingFile&&e.enclosingFile===Sd(fc(t))||(t=YC.cloneNode(t)),t===n?t:n?e.enclosingFile&&e.enclosingFile===Sd(fc(n))?sI(ew(t,n),n):ew(t,n):t}function o(e,t,n,r){const i=e.flags;!t||-2147483648&e.flags||ce.serializeTypeOfExpression(t,e,r),e.flags|=-2147483648;const o=function(e,t,n,r){if(t){const i=Qu(t)?t.type:_A(t)?dA(t):void 0;if(i&&!Dl(i)){const o=a(e,i,n,t.parent,r);if(o)return o}}return r&&(n=XT(n)),_(n,e)}(e,t,n,r);return e.flags=i,o}function a(e,t,r,i,o){const a=r;o&&(r=XT(r));const c=s(e,t,r,i);if(c)return o&&!bD(n(e,t),(e=>!!(32768&e.flags)))?YC.createUnionTypeNode([c,YC.createKeywordTypeNode(157)]):c;if(o&&a!==r){const n=s(e,t,a,i);if(n)return YC.createUnionTypeNode([n,YC.createKeywordTypeNode(157)])}}function s(e,t,r,i=e.enclosingDeclaration,o=n(e,t,!0)){if(o&&function(e,t,n){return n===t||!!(e&&(sE(e)||lE(e)||uE(e))&&e.questionToken)&&Zw(t,524288)===n}(i,r,o)&&_e(t,r)){const n=he(e,t);if(n)return n}}function c(t,n,r,i){const o=(null==r?void 0:r.trackSymbol)?r.moduleResolverHost:134217728&n?function(e){return{getCommonSourceDirectory:e.getCommonSourceDirectory?()=>e.getCommonSourceDirectory():()=>"",getCurrentDirectory:()=>e.getCurrentDirectory(),getSymlinkCache:Ze(e,e.getSymlinkCache),getPackageJsonInfoCache:()=>{var t;return null==(t=e.getPackageJsonInfoCache)?void 0:t.call(e)},useCaseSensitiveFileNames:Ze(e,e.useCaseSensitiveFileNames),redirectTargetsMap:e.redirectTargetsMap,getProjectReferenceRedirect:t=>e.getProjectReferenceRedirect(t),isSourceOfProjectReferenceRedirect:t=>e.isSourceOfProjectReferenceRedirect(t),fileExists:t=>e.fileExists(t),getFileIncludeReasons:()=>e.getFileIncludeReasons(),readFile:e.readFile?t=>e.readFile(t):void 0}}(e):void 0,a={enclosingDeclaration:t,enclosingFile:t&&Sd(t),flags:n||0,tracker:void 0,encounteredError:!1,reportedDiagnostic:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0,trackedSymbols:void 0,bundled:!!A.outFile&&!!t&&Zp(Sd(t)),truncating:!1,usedSymbolNames:void 0,remappedSymbolNames:void 0,remappedSymbolReferences:void 0,reverseMappedStack:void 0,mustCreateTypeParameterSymbolList:!0,typeParameterSymbolList:void 0,mustCreateTypeParametersNamesLookups:!0,typeParameterNames:void 0,typeParameterNamesByText:void 0,typeParameterNamesByTextNextNameCount:void 0,mapper:void 0};a.tracker=new $B(a,r,o);const s=i(a);return a.truncating&&1&a.flags&&a.tracker.reportTruncationError(),a.encounteredError?void 0:s}function l(e){return e.truncating?e.truncating:e.truncating=e.approximateLength>(1&e.flags?Q_:X_)}function _(e,o){const a=o.flags,c=function(e,o){var a,c;t&&t.throwIfCancellationRequested&&t.throwIfCancellationRequested();const m=8388608&o.flags;if(o.flags&=-8388609,!e)return 262144&o.flags?(o.approximateLength+=3,YC.createKeywordTypeNode(133)):void(o.encounteredError=!0);if(536870912&o.flags||(e=Sp(e)),1&e.flags)return e.aliasSymbol?YC.createTypeReferenceNode(G(e.aliasSymbol),v(e.aliasTypeArguments,o)):e===Et?yw(YC.createKeywordTypeNode(133),3,"unresolved"):(o.approximateLength+=3,YC.createKeywordTypeNode(e===Ft?141:133));if(2&e.flags)return YC.createKeywordTypeNode(159);if(4&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(154);if(8&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(150);if(64&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(163);if(16&e.flags&&!e.aliasSymbol)return o.approximateLength+=7,YC.createKeywordTypeNode(136);if(1056&e.flags){if(8&e.symbol.flags){const t=is(e.symbol),n=X(t,o,788968);if(ju(t)===e)return n;const r=Sc(e.symbol);return Ts(r,1)?A(n,YC.createTypeReferenceNode(r,void 0)):zE(n)?(n.isTypeOf=!0,YC.createIndexedAccessTypeNode(n,YC.createLiteralTypeNode(YC.createStringLiteral(r)))):xE(n)?YC.createIndexedAccessTypeNode(YC.createTypeQueryNode(n.typeName),YC.createLiteralTypeNode(YC.createStringLiteral(r))):xn.fail("Unhandled type node kind returned from `symbolToTypeNode`.")}return X(e.symbol,o,788968)}if(128&e.flags)return o.approximateLength+=e.value.length+2,YC.createLiteralTypeNode(iw(YC.createStringLiteral(e.value,!!(268435456&o.flags)),16777216));if(256&e.flags){const t=e.value;return o.approximateLength+=(""+t).length,YC.createLiteralTypeNode(t<0?YC.createPrefixUnaryExpression(41,YC.createNumericLiteral(-t)):YC.createNumericLiteral(t))}if(2048&e.flags)return o.approximateLength+=ST(e.value).length+1,YC.createLiteralTypeNode(YC.createBigIntLiteral(e.value));if(512&e.flags)return o.approximateLength+=e.intrinsicName.length,YC.createLiteralTypeNode("true"===e.intrinsicName?YC.createTrue():YC.createFalse());if(8192&e.flags){if(!(1048576&o.flags)){if(Ns(e.symbol,o.enclosingDeclaration))return o.approximateLength+=6,X(e.symbol,o,111551);o.tracker.reportInaccessibleUniqueSymbolError&&o.tracker.reportInaccessibleUniqueSymbolError()}return o.approximateLength+=13,YC.createTypeOperatorNode(158,YC.createKeywordTypeNode(155))}if(16384&e.flags)return o.approximateLength+=4,YC.createKeywordTypeNode(116);if(32768&e.flags)return o.approximateLength+=9,YC.createKeywordTypeNode(157);if(65536&e.flags)return o.approximateLength+=4,YC.createLiteralTypeNode(YC.createNull());if(131072&e.flags)return o.approximateLength+=5,YC.createKeywordTypeNode(146);if(4096&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(155);if(67108864&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(151);if(GT(e))return 4194304&o.flags&&(o.encounteredError||32768&o.flags||(o.encounteredError=!0),null==(c=(a=o.tracker).reportInaccessibleThisError)||c.call(a)),o.approximateLength+=4,YC.createThisTypeNode();if(!m&&e.aliasSymbol&&(16384&o.flags||0===Ms(e.aliasSymbol,o.enclosingDeclaration,788968,!1,!0).accessibility)){const t=v(e.aliasTypeArguments,o);return!vs(e.aliasSymbol.escapedName)||32&e.aliasSymbol.flags?1===p(t)&&e.aliasSymbol===Xn.symbol?YC.createArrayTypeNode(t[0]):X(e.aliasSymbol,o,788968,t):YC.createTypeReferenceNode(YC.createIdentifier(""),t)}const g=wx(e);if(4&g)return xn.assert(!!(524288&e.flags)),e.node?C(e,P):P(e);if(262144&e.flags||3&g){if(262144&e.flags&&D(o.inferTypeParameters,e)){let t;o.approximateLength+=Sc(e.symbol).length+6;const n=Jd(e);if(n){const r=lg(e,!0);r&&gS(n,r)||(o.approximateLength+=9,t=n&&_(n,o))}return YC.createInferTypeNode(w(e,o,t))}if(4&o.flags&&262144&e.flags){const t=ee(e,o);return o.approximateLength+=bc(t).length,YC.createTypeReferenceNode(YC.createIdentifier(bc(t)),void 0)}if(e.symbol)return X(e.symbol,o,788968);const t=(e===Jn||e===zn)&&i&&i.symbol?(e===zn?"sub-":"super-")+Sc(i.symbol):"?";return YC.createTypeReferenceNode(YC.createIdentifier(t),void 0)}if(1048576&e.flags&&e.origin&&(e=e.origin),3145728&e.flags){const t=1048576&e.flags?function(e){const t=[];let n=0;for(let r=0;r0?1048576&e.flags?YC.createUnionTypeNode(n):YC.createIntersectionTypeNode(n):void(o.encounteredError||262144&o.flags||(o.encounteredError=!0))}if(48&g)return xn.assert(!!(524288&e.flags)),T(e);if(4194304&e.flags){const t=e.type;o.approximateLength+=6;const n=_(t,o);return YC.createTypeOperatorNode(143,n)}if(134217728&e.flags){const t=e.texts,n=e.types,r=YC.createTemplateHead(t[0]),i=YC.createNodeArray(O(n,((e,r)=>YC.createTemplateLiteralTypeSpan(_(e,o),(rfunction(e){const t=_(e.checkType,o);if(o.approximateLength+=15,4&o.flags&&e.root.isDistributive&&!(262144&e.checkType.flags)){const r=ys(No(262144,"T")),i=ee(r,o),a=YC.createTypeReferenceNode(i);o.approximateLength+=37;const s=$x(e.root.checkType,r,e.mapper),c=o.inferTypeParameters;o.inferTypeParameters=e.root.inferTypeParameters;const l=_(eS(e.root.extendsType,s),o);o.inferTypeParameters=c;const u=y(eS(n(o,e.root.node.trueType),s)),d=y(eS(n(o,e.root.node.falseType),s));return YC.createConditionalTypeNode(t,YC.createInferTypeNode(YC.createTypeParameterDeclaration(void 0,YC.cloneNode(a.typeName))),YC.createConditionalTypeNode(YC.createTypeReferenceNode(YC.cloneNode(i)),_(e.checkType,o),YC.createConditionalTypeNode(a,l,u,d),YC.createKeywordTypeNode(146)),YC.createKeywordTypeNode(146))}const r=o.inferTypeParameters;o.inferTypeParameters=e.root.inferTypeParameters;const i=_(e.extendsType,o);o.inferTypeParameters=r;const a=y(Vb(e)),s=y(Ub(e));return YC.createConditionalTypeNode(t,i,a,s)}(e)));if(33554432&e.flags){const t=_(e.baseType,o),n=ph(e)&&Bh("NoInfer",!1);return n?X(n,o,788968,[t]):t}return xn.fail("Should be unreachable.");function y(e){var t,n,r;return 1048576&e.flags?(null==(t=o.visitedTypes)?void 0:t.has(qy(e)))?(131072&o.flags||(o.encounteredError=!0,null==(r=null==(n=o.tracker)?void 0:n.reportCyclicStructureError)||r.call(n)),d(o)):C(e,(e=>_(e,o))):_(e,o)}function x(e){return!!Gx(e)}function S(e){return!!e.target&&x(e.target)&&!x(e)}function T(e){var t,n;const r=e.id,i=e.symbol;if(i){if(8388608&wx(e)){const n=e.node;if(TE(n)){const t=s(o,n,e);if(t)return t}return(null==(t=o.visitedTypes)?void 0:t.has(r))?d(o):C(e,E)}const a=Ys(e)?788968:111551;if(rO(i.valueDeclaration))return X(i,o,a);if(32&i.flags&&!Ol(i)&&(!(i.valueDeclaration&&gu(i.valueDeclaration)&&2048&o.flags)||GP(i.valueDeclaration)&&0===Is(i,o.enclosingDeclaration,a,!1).accessibility)||896&i.flags||function(){var e;const t=!!(8192&i.flags)&&Q(i.declarations,(e=>Jv(e))),n=!!(16&i.flags)&&(i.parent||f(i.declarations,(e=>307===e.parent.kind||268===e.parent.kind)));if(t||n)return(!!(4096&o.flags)||(null==(e=o.visitedTypes)?void 0:e.has(r)))&&(!(8&o.flags)||Ns(i,o.enclosingDeclaration))}())return X(i,o,a);if(null==(n=o.visitedTypes)?void 0:n.has(r)){const t=function(e){if(e.symbol&&2048&e.symbol.flags&&e.symbol.declarations){const t=oh(e.symbol.declarations[0].parent);if(QP(t))return ns(t)}}(e);return t?X(t,o,788968):d(o)}return C(e,E)}return E(e)}function C(e,t){var n,i,a;const s=e.id,c=16&wx(e)&&e.symbol&&32&e.symbol.flags,l=4&wx(e)&&e.node?"N"+IB(e.node):16777216&e.flags?"N"+IB(e.root.node):e.symbol?(c?"+":"")+OB(e.symbol):void 0;o.visitedTypes||(o.visitedTypes=new Set),l&&!o.symbolDepth&&(o.symbolDepth=new Map);const u=o.enclosingDeclaration&&Wo(o.enclosingDeclaration),_=`${qy(e)}|${o.flags}`;u&&(u.serializedTypes||(u.serializedTypes=new Map));const p=null==(n=null==u?void 0:u.serializedTypes)?void 0:n.get(_);if(p)return null==(i=p.trackedSymbols)||i.forEach((([e,t,n])=>o.tracker.trackSymbol(e,t,n))),p.truncating&&(o.truncating=!0),o.approximateLength+=p.addedLength,function e(t){return ly(t)||hc(t)!==t?r(o,YC.cloneNode(ZB(t,e,void 0,v,e)),t):t}(p.node);let f;if(l){if(f=o.symbolDepth.get(l)||0,f>10)return d(o);o.symbolDepth.set(l,f+1)}o.visitedTypes.add(s);const m=o.trackedSymbols;o.trackedSymbols=void 0;const g=o.approximateLength,h=t(e),y=o.approximateLength-g;return o.reportedDiagnostic||o.encounteredError||null==(a=null==u?void 0:u.serializedTypes)||a.set(_,{node:h,truncating:o.truncating,addedLength:y,trackedSymbols:o.trackedSymbols}),o.visitedTypes.delete(s),l&&o.symbolDepth.set(l,f),o.trackedSymbols=m,h;function v(e,t,n,r,i){return e&&0===e.length?sI(YC.createNodeArray(void 0,e.hasTrailingComma),e):VB(e,t,n,r,i)}}function E(e){if(Ad(e)||e.containsError)return function(e){var t;xn.assert(!!(524288&e.flags));const r=e.declaration.readonlyToken?YC.createToken(e.declaration.readonlyToken.kind):void 0,i=e.declaration.questionToken?YC.createToken(e.declaration.questionToken.kind):void 0;let a,s;const c=!bd(e)&&!(2&wd(e).flags)&&4&o.flags&&!(262144&md(e).flags&&4194304&(null==(t=Jd(md(e)))?void 0:t.flags));if(bd(e)){if(S(e)&&4&o.flags){const e=ee(ys(No(262144,"T")),o);s=YC.createTypeReferenceNode(e)}a=YC.createTypeOperatorNode(143,s||_(wd(e),o))}else if(c){const e=ee(ys(No(262144,"T")),o);s=YC.createTypeReferenceNode(e),a=s}else a=_(md(e),o);const l=w(fd(e),o,a),u=e.declaration.nameType?_(hd(e),o):void 0,d=_(bC(yd(e),!!(4&Dd(e))),o),p=YC.createMappedTypeNode(r,l,u,i,d,void 0);o.approximateLength+=10;const f=iw(p,1);if(S(e)&&4&o.flags){const t=eS(Jd(n(o,e.declaration.typeParameter.constraint.type))||At,e.mapper);return YC.createConditionalTypeNode(_(wd(e),o),YC.createInferTypeNode(YC.createTypeParameterDeclaration(void 0,YC.cloneNode(s.typeName),2&t.flags?void 0:_(t,o))),f,YC.createKeywordTypeNode(146))}return c?YC.createConditionalTypeNode(_(md(e),o),YC.createInferTypeNode(YC.createTypeParameterDeclaration(void 0,YC.cloneNode(s.typeName),YC.createTypeOperatorNode(143,_(wd(e),o)))),f,YC.createKeywordTypeNode(146)):f}(e);const t=Od(e);if(!t.properties.length&&!t.indexInfos.length){if(!t.callSignatures.length&&!t.constructSignatures.length)return o.approximateLength+=2,iw(YC.createTypeLiteralNode(void 0),1);if(1===t.callSignatures.length&&!t.constructSignatures.length)return k(t.callSignatures[0],184,o);if(1===t.constructSignatures.length&&!t.callSignatures.length)return k(t.constructSignatures[0],185,o)}const r=F(t.constructSignatures,(e=>!!(4&e.flags)));if(Q(r)){const e=O(r,(e=>Om(e)));return t.callSignatures.length+(t.constructSignatures.length-r.length)+t.indexInfos.length+(2048&o.flags?N(t.properties,(e=>!(4194304&e.flags))):p(t.properties))&&e.push(function(e){if(0===e.constructSignatures.length)return e;if(e.objectTypeWithoutAbstractConstructSignatures)return e.objectTypeWithoutAbstractConstructSignatures;const t=F(e.constructSignatures,(e=>!(4&e.flags)));if(e.constructSignatures===t)return e;const n=ks(e.symbol,e.members,e.callSignatures,Q(t)?t:u,e.indexInfos);return e.objectTypeWithoutAbstractConstructSignatures=n,n.objectTypeWithoutAbstractConstructSignatures=n,n}(t)),_(cv(e),o)}const i=o.flags;o.flags|=4194304;const a=function(e){if(l(o))return[YC.createPropertySignature(void 0,"...",void 0,void 0)];const t=[];for(const n of e.callSignatures)t.push(k(n,179,o));for(const n of e.constructSignatures)4&n.flags||t.push(k(n,180,o));for(const n of e.indexInfos)t.push(b(n,o,1024&e.objectFlags?d(o):void 0));const n=e.properties;if(!n)return t;let r=0;for(const e of n){if(r++,2048&o.flags){if(4194304&e.flags)continue;6&fx(e)&&o.tracker.reportPrivateInBaseOfClassExpression&&o.tracker.reportPrivateInBaseOfClassExpression(vc(e.escapedName))}if(l(o)&&r+20){const n=(e.target.typeParameters||u).length;i=v(t.slice(a,n),o)}const s=o.flags;o.flags|=16;const c=X(e.symbol,o,788968,i);return o.flags=s,r?A(r,c):c}}if(t=L(t,((t,n)=>bC(t,!!(2&e.target.elementFlags[n])))),t.length>0){const n=Og(e),r=v(t.slice(0,n),o);if(r){const{labeledElementDeclarations:t}=e.target;for(let n=0;n!(32768&e.flags))),0);for(const r of e){const e=k(r,173,t,{name:s,questionToken:c});n.push(p(e))}if(e.length||!c)return}let l;m(e,t)?l=d(t):(i&&(t.reverseMappedStack||(t.reverseMappedStack=[]),t.reverseMappedStack.push(e)),l=o?de(t,void 0,o,e):YC.createKeywordTypeNode(133),i&&t.reverseMappedStack.pop());const u=oM(e)?[YC.createToken(148)]:void 0;u&&(t.approximateLength+=9);const _=YC.createPropertySignature(u,s,c,l);function p(n){var r;const i=null==(r=e.declarations)?void 0:r.find((e=>348===e.kind));if(i){const e=fl(i.comment);e&&hw(n,[{kind:3,text:"*\n * "+e.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}])}else e.valueDeclaration&&y(t,n,e.valueDeclaration);return n}n.push(p(_))}function y(e,t,n){return e.enclosingFile&&e.enclosingFile===Sd(n)?mw(t,n):t}function v(e,t,n){if(Q(e)){if(l(t)){if(!n)return[YC.createTypeReferenceNode("...",void 0)];if(e.length>2)return[_(e[0],t),YC.createTypeReferenceNode(`... ${e.length-2} more ...`,void 0),_(e[e.length-1],t)]}const r=64&t.flags?void 0:et(),i=[];let o=0;for(const n of e){if(o++,l(t)&&o+2{if(!ET(e,(([e],[t])=>function(e,t){return e===t||!!e.symbol&&e.symbol===t.symbol||!!e.aliasSymbol&&e.aliasSymbol===t.aliasSymbol}(e,t))))for(const[n,r]of e)i[r]=_(n,t)})),t.flags=e}return i}}function b(e,t,n){const r=Ip(e)||"x",i=_(e.keyType,t),o=YC.createParameterDeclaration(void 0,void 0,r,void 0,i,void 0);return n||(n=_(e.type||St,t)),e.type||2097152&t.flags||(t.encounteredError=!0),t.approximateLength+=r.length+4,YC.createIndexSignature(e.isReadonly?[YC.createToken(148)]:void 0,[o],n)}function k(e,t,r,i){var o;let a,s;const c=w_(e,!0)[0],l=C(r,e.declaration,c,e.typeParameters,e.parameters,e.mapper);r.approximateLength+=3,32&r.flags&&e.target&&e.mapper&&e.target.typeParameters?s=e.target.typeParameters.map((t=>_(eS(t,e.mapper),r))):a=e.typeParameters&&e.typeParameters.map((e=>E(e,r)));const u=r.flags;r.flags&=-257;const d=(Q(c,(e=>e!==c[c.length-1]&&!!(32768&px(e))))?e.parameters:c).map((e=>j(e,r,176===t))),p=33554432&r.flags?void 0:function(e,t){if(e.thisParameter)return j(e.thisParameter,t);if(e.declaration&&Mm(e.declaration)){const r=tl(e.declaration);if(r&&r.typeExpression)return YC.createParameterDeclaration(void 0,void 0,"this",void 0,_(n(t,r.typeExpression),t))}}(e,r);p&&d.unshift(p),r.flags=u;const f=pe(r,e);let m=null==i?void 0:i.modifiers;if(185===t&&4&e.flags){const e=ib(m);m=YC.createModifiersFromModifierFlags(64|e)}const g=179===t?YC.createCallSignature(a,d,f):180===t?YC.createConstructSignature(a,d,f):173===t?YC.createMethodSignature(m,(null==i?void 0:i.name)??YC.createIdentifier(""),null==i?void 0:i.questionToken,a,d,f):174===t?YC.createMethodDeclaration(m,void 0,(null==i?void 0:i.name)??YC.createIdentifier(""),void 0,a,d,f,void 0):176===t?YC.createConstructorDeclaration(m,d,void 0):177===t?YC.createGetAccessorDeclaration(m,(null==i?void 0:i.name)??YC.createIdentifier(""),d,f,void 0):178===t?YC.createSetAccessorDeclaration(m,(null==i?void 0:i.name)??YC.createIdentifier(""),d,void 0):181===t?YC.createIndexSignature(m,d,f):317===t?YC.createJSDocFunctionType(d,f):184===t?YC.createFunctionTypeNode(a,d,f??YC.createTypeReferenceNode(YC.createIdentifier(""))):185===t?YC.createConstructorTypeNode(m,a,d,f??YC.createTypeReferenceNode(YC.createIdentifier(""))):262===t?YC.createFunctionDeclaration(m,void 0,(null==i?void 0:i.name)?ut(i.name,qD):YC.createIdentifier(""),a,d,f,void 0):218===t?YC.createFunctionExpression(m,void 0,(null==i?void 0:i.name)?ut(i.name,qD):YC.createIdentifier(""),a,d,f,YC.createBlock([])):219===t?YC.createArrowFunction(m,a,d,f,void 0,YC.createBlock([])):xn.assertNever(t);return s&&(g.typeArguments=YC.createNodeArray(s)),323===(null==(o=e.declaration)?void 0:o.kind)&&339===e.declaration.parent.kind&&yw(g,3,Gd(e.declaration.parent.parent,!0).slice(2,-2).split(/\r\n|\n|\r/).map((e=>e.replace(/^\s+/," "))).join("\n"),!0),null==l||l(),g}function C(e,t,n,r,i,o){const a=se(e);let s,c;const l=e.enclosingDeclaration,_=e.mapper;if(o&&(e.mapper=o),e.enclosingDeclaration&&t){let t=function(t,n){let r;xn.assert(e.enclosingDeclaration),Wo(e.enclosingDeclaration).fakeScopeForSignatureDeclaration===t?r=e.enclosingDeclaration:e.enclosingDeclaration.parent&&Wo(e.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration===t&&(r=e.enclosingDeclaration.parent),xn.assertOptionalNode(r,DP);const i=(null==r?void 0:r.locals)??ed();let o,a;if(n(((e,t)=>{if(r){const t=i.get(e);t?a=ue(a,{name:e,oldSymbol:t}):o=ue(o,e)}i.set(e,t)})),r)return function(){f(o,(e=>i.delete(e))),f(a,(e=>i.set(e.name,e.oldSymbol)))};{const n=YC.createBlock(u);Wo(n).fakeScopeForSignatureDeclaration=t,n.locals=i,OT(n,e.enclosingDeclaration),e.enclosingDeclaration=n}};s=Q(n)?t("params",(e=>{if(n)for(let t=0;tsE(t)&&Eu(t.name)?(function t(n){f(n.elements,(n=>{switch(n.kind){case 232:return;case 208:return function(n){if(Eu(n.name))return t(n.name);const r=ns(n);e(r.escapedName,r)}(n);default:return xn.assertNever(n)}}))}(t.name),!0):void 0))||e(r.escapedName,r)}})):void 0,4&e.flags&&Q(r)&&(c=t("typeParams",(t=>{for(const n of r??u)t(ee(n,e).escapedText,n.symbol)})))}return()=>{null==s||s(),null==c||c(),a(),e.enclosingDeclaration=l,e.mapper=_}}function w(e,t,n){const r=t.flags;t.flags&=-513;const i=YC.createModifiersFromModifierFlags(Dk(e)),o=ee(e,t),a=np(e),s=a&&_(a,t);return t.flags=r,YC.createTypeParameterDeclaration(i,o,n,s)}function E(e,t,n=Jd(e)){const r=n&&function(e,t,n){return t&&s(n,t,e)||_(e,n)}(n,cg(e),t);return w(e,t,r)}function P(e,t){const n=2===e.kind||3===e.kind?YC.createToken(131):void 0,r=1===e.kind||3===e.kind?iw(YC.createIdentifier(e.parameterName),16777216):YC.createThisTypeNode(),i=e.type&&_(e.type,t);return YC.createTypePredicateNode(n,r,i)}function I(e){return Y_(e,169)||(td(e)?void 0:Y_(e,341))}function j(e,t,n){const r=I(e),i=de(t,r,$l(e),e),o=!(8192&t.flags)&&n&&r&&cI(r)?O(Ac(r),YC.cloneNode):void 0,a=r&&U_(r)||32768&px(e)?YC.createToken(26):void 0,s=B(e,r,t),c=r&&xf(r)||16384&px(e)?YC.createToken(58):void 0,l=YC.createParameterDeclaration(o,a,s,c,i,void 0);return t.approximateLength+=Sc(e).length+3,l}function B(e,t,n){return t&&t.name?80===t.name.kind?iw(YC.cloneNode(t.name),16777216):166===t.name.kind?iw(YC.cloneNode(t.name.right),16777216):function e(t){n.tracker.canTrackSymbol&&oE(t)&&a_(t)&&J(t.expression,n.enclosingDeclaration,n);let r=ZB(t,e,void 0,void 0,e);return KE(r)&&(r=YC.updateBindingElement(r,r.dotDotDotToken,r.propertyName,r.name,void 0)),ly(r)||(r=YC.cloneNode(r)),iw(r,16777217)}(t.name):Sc(e)}function J(e,t,n){if(!n.tracker.canTrackSymbol)return;const r=bb(e),i=je(r,r.escapedText,1160127,void 0,!0);i&&n.tracker.trackSymbol(i,t,111551)}function z(e,t,n,r){return t.tracker.trackSymbol(e,t.enclosingDeclaration,n),$(e,t,n,r)}function $(e,t,n,r){let i;return 262144&e.flags||!(t.enclosingDeclaration||64&t.flags)||134217728&t.flags?i=[e]:(i=xn.checkDefined(function e(n,i,o){let a,s=Es(n,t.enclosingDeclaration,i,!!(128&t.flags));if(!s||Ps(s[0],t.enclosingDeclaration,1===s.length?i:Ds(i))){const r=ss(s?s[0]:n,t.enclosingDeclaration,i);if(p(r)){a=r.map((e=>Q(e.declarations,zs)?H(e,t):void 0));const o=r.map(((e,t)=>t));o.sort((function(e,t){const n=a[e],r=a[t];if(n&&r){const e=Po(r);return Po(n)===e?eB(n)-eB(r):e?-1:1}return 0}));const c=o.map((e=>r[e]));for(const t of c){const r=e(t,Ds(i),!1);if(r){if(t.exports&&t.exports.get("export=")&&us(t.exports.get("export="),n)){s=r;break}s=r.concat(s||[ls(t,n)||n]);break}}}}if(s)return s;if(o||!(6144&n.flags)){if(!o&&!r&&f(n.declarations,zs))return;return[n]}}(e,n,!0)),xn.assert(i&&i.length>0)),i}function U(e,t){let n;return 524384&Zj(e).flags&&(n=YC.createNodeArray(O(nu(e),(e=>E(e,t))))),n}function K(e,t,n){var r;xn.assert(e&&0<=t&&tAx(e,o.links.mapper))),n)}else a=U(i,n)}return a}function W(e){return RE(e.objectType)?W(e.objectType):e}function H(e,t,n){let r=Y_(e,307);if(!r){const t=g(e.declarations,(t=>cs(t,e)));t&&(r=Y_(t,307))}if(r&&void 0!==r.moduleName)return r.moduleName;if(!r&&vB.test(e.escapedName))return e.escapedName.substring(1,e.escapedName.length-1);if(!t.enclosingFile||!t.tracker.moduleResolverHost)return vB.test(e.escapedName)?e.escapedName.substring(1,e.escapedName.length-1):Sd(gp(e)).fileName;const i=t.enclosingFile,o=n||(null==i?void 0:i.impliedNodeFormat),a=dj(i.path,o),s=Uo(e);let c=s.specifierCache&&s.specifierCache.get(a);if(!c){const r=!!A.outFile,{moduleResolverHost:l}=t.tracker,u=r?{...A,baseUrl:l.getCommonSourceDirectory()}:A;c=Te(GR(e,Be,u,i,l,{importModuleSpecifierPreference:r?"non-relative":"project-relative",importModuleSpecifierEnding:r?"minimal":99===o?"js":void 0},{overrideImportMode:n})),s.specifierCache??(s.specifierCache=new Map),s.specifierCache.set(a,c)}return c}function G(e){const t=YC.createIdentifier(vc(e.escapedName));return e.parent?YC.createQualifiedName(G(e.parent),t):t}function X(e,t,n,r){const i=z(e,t,n,!(16384&t.flags)),o=111551===n;if(Q(i[0].declarations,zs)){const e=i.length>1?s(i,i.length-1,1):void 0,n=r||K(i,0,t),a=Sd(fc(t.enclosingDeclaration)),c=kd(i[0]);let l,u;if(3!==ES(A)&&99!==ES(A)||99===(null==c?void 0:c.impliedNodeFormat)&&c.impliedNodeFormat!==(null==a?void 0:a.impliedNodeFormat)&&(l=H(i[0],t,99),u=YC.createImportAttributes(YC.createNodeArray([YC.createImportAttribute(YC.createStringLiteral("resolution-mode"),YC.createStringLiteral("import"))]))),l||(l=H(i[0],t)),!(67108864&t.flags)&&1!==ES(A)&&l.includes("/node_modules/")){const e=l;if(3===ES(A)||99===ES(A)){const n=99===(null==a?void 0:a.impliedNodeFormat)?1:99;l=H(i[0],t,n),l.includes("/node_modules/")?l=e:u=YC.createImportAttributes(YC.createNodeArray([YC.createImportAttribute(YC.createStringLiteral("resolution-mode"),YC.createStringLiteral(99===n?"import":"require"))]))}u||(t.encounteredError=!0,t.tracker.reportLikelyUnsafeImportRequiredError&&t.tracker.reportLikelyUnsafeImportRequiredError(e))}const _=YC.createLiteralTypeNode(YC.createStringLiteral(l));if(t.approximateLength+=l.length+10,!e||ou(e))return e&&Mw(qD(e)?e:e.right,void 0),YC.createImportTypeNode(_,u,e,n,o);{const t=W(e),r=t.objectType.typeName;return YC.createIndexedAccessTypeNode(YC.createImportTypeNode(_,u,r,n,o),t.indexType)}}const a=s(i,i.length-1,0);if(RE(a))return a;if(o)return YC.createTypeQueryNode(a);{const e=qD(a)?a:a.right,t=Lw(e);return Mw(e,void 0),YC.createTypeReferenceNode(a,t)}function s(e,n,i){const o=n===e.length-1?r:K(e,n,t),a=e[n],c=e[n-1];let l;if(0===n?(t.flags|=16777216,l=oc(a,t),t.approximateLength+=(l?l.length:0)+1,t.flags^=16777216):c&&Ga(c)&&ld(Ga(c),((e,t)=>{if(us(e,a)&&!s_(t)&&"export="!==t)return l=vc(t),!0})),void 0===l){const r=g(a.declarations,Pc);if(r&&oE(r)&&ou(r.expression)){const t=s(e,n-1,i);return ou(t)?YC.createIndexedAccessTypeNode(YC.createParenthesizedType(YC.createTypeQueryNode(t)),YC.createTypeQueryNode(r.expression)):t}l=oc(a,t)}if(t.approximateLength+=l.length+1,!(16&t.flags)&&c&&m_(c)&&m_(c).get(a.escapedName)&&us(m_(c).get(a.escapedName),a)){const t=s(e,n-1,i);return RE(t)?YC.createIndexedAccessTypeNode(t,YC.createLiteralTypeNode(YC.createStringLiteral(l))):YC.createIndexedAccessTypeNode(YC.createTypeReferenceNode(t,o),YC.createLiteralTypeNode(YC.createStringLiteral(l)))}const u=iw(YC.createIdentifier(l),16777216);if(o&&Mw(u,YC.createNodeArray(o)),u.symbol=a,n>i){const t=s(e,n-1,i);return ou(t)?YC.createQualifiedName(t,u):xn.fail("Impossible construct - an export of an indexed access cannot be reachable")}return u}}function Y(e,t,n){const r=je(t.enclosingDeclaration,e,788968,void 0,!1);return!!(r&&262144&r.flags)&&r!==n.symbol}function ee(e,t){var n,i,o,a;if(4&t.flags&&t.typeParameterNames){const n=t.typeParameterNames.get(qy(e));if(n)return n}let s=ne(e.symbol,t,788968,!0);if(!(80&s.kind))return YC.createIdentifier("(Missing type parameter)");const c=null==(i=null==(n=e.symbol)?void 0:n.declarations)?void 0:i[0];if(c&&aE(c)&&(s=r(t,s,c.name)),4&t.flags){const n=s.escapedText;let r=(null==(o=t.typeParameterNamesByTextNextNameCount)?void 0:o.get(n))||0,i=n;for(;(null==(a=t.typeParameterNamesByText)?void 0:a.has(i))||Y(i,t,e);)r++,i=`${n}_${r}`;if(i!==n){const e=Lw(s);s=YC.createIdentifier(i),Mw(s,e)}t.mustCreateTypeParametersNamesLookups&&(t.mustCreateTypeParametersNamesLookups=!1,t.typeParameterNames=new Map(t.typeParameterNames),t.typeParameterNamesByTextNextNameCount=new Map(t.typeParameterNamesByTextNextNameCount),t.typeParameterNamesByText=new Set(t.typeParameterNamesByText)),t.typeParameterNamesByTextNextNameCount.set(n,r),t.typeParameterNames.set(qy(e),s),t.typeParameterNamesByText.add(i)}return s}function ne(e,t,n,r){const i=z(e,t,n);return!r||1===i.length||t.encounteredError||65536&t.flags||(t.encounteredError=!0),function e(n,r){const i=K(n,r,t),o=n[r];0===r&&(t.flags|=16777216);const a=oc(o,t);0===r&&(t.flags^=16777216);const s=iw(YC.createIdentifier(a),16777216);return i&&Mw(s,YC.createNodeArray(i)),s.symbol=o,r>0?YC.createQualifiedName(e(n,r-1),s):s}(i,i.length-1)}function re(e,t,n){const r=z(e,t,n);return function e(n,r){const i=K(n,r,t),o=n[r];0===r&&(t.flags|=16777216);let a=oc(o,t);0===r&&(t.flags^=16777216);let s=a.charCodeAt(0);if(Km(s)&&Q(o.declarations,zs))return YC.createStringLiteral(H(o,t));if(0===r||tC(a,M)){const t=iw(YC.createIdentifier(a),16777216);return i&&Mw(t,YC.createNodeArray(i)),t.symbol=o,r>0?YC.createPropertyAccessExpression(e(n,r-1),t):t}{let t;if(91===s&&(a=a.substring(1,a.length-1),s=a.charCodeAt(0)),!Km(s)||8&o.flags?""+ +a===a&&(t=YC.createNumericLiteral(+a)):t=YC.createStringLiteral(By(a).replace(/\\./g,(e=>e.substring(1))),39===s),!t){const e=iw(YC.createIdentifier(a),16777216);i&&Mw(e,YC.createNodeArray(i)),e.symbol=o,t=e}return YC.createElementAccessExpression(e(n,r-1),t)}}(r,r.length-1)}function ie(e){const t=Pc(e);return!!t&&(oE(t)?!!(402653316&KM(t.expression).flags):XE(t)?!!(402653316&KM(t.argumentExpression).flags):wD(t))}function oe(e){const t=Pc(e);return!!(t&&wD(t)&&(t.singleQuote||!ly(t)&&an(Gd(t,!1),"'")))}function ae(e,t){const n=!!p(e.declarations)&&x(e.declarations,ie),r=!!p(e.declarations)&&x(e.declarations,oe),i=!!(8192&e.flags),o=function(e,t,n,r,i){const o=Uo(e).nameType;if(o){if(384&o.flags){const e=""+o.value;return Ts(e,wS(A))||!r&&WT(e)?WT(e)&&an(e,"-")?YC.createComputedPropertyName(YC.createPrefixUnaryExpression(41,YC.createNumericLiteral(-e))):HT(e,wS(A),n,r,i):YC.createStringLiteral(e,!!n)}if(8192&o.flags)return YC.createComputedPropertyName(re(o.symbol,t,111551))}}(e,t,r,n,i);return o||HT(vc(e.escapedName),wS(A),r,n,i)}function se(e){const t=e.mustCreateTypeParameterSymbolList,n=e.mustCreateTypeParametersNamesLookups;e.mustCreateTypeParameterSymbolList=!0,e.mustCreateTypeParametersNamesLookups=!0;const r=e.typeParameterNames,i=e.typeParameterNamesByText,o=e.typeParameterNamesByTextNextNameCount,a=e.typeParameterSymbolList;return()=>{e.typeParameterNames=r,e.typeParameterNamesByText=i,e.typeParameterNamesByTextNextNameCount=o,e.typeParameterSymbolList=a,e.mustCreateTypeParameterSymbolList=t,e.mustCreateTypeParametersNamesLookups=n}}function le(e,t){return e.declarations&&S(e.declarations,(e=>!(!gB(e)||t&&!mc(e,(e=>e===t)))))}function _e(e,t){if(!(4&wx(t)))return!0;if(!xE(e))return!0;Ih(e);const n=Wo(e).resolvedSymbol,r=n&&ju(n);return!r||r!==t.target||p(e.typeArguments)>=kf(t.target.typeParameters)}function de(e,t,n,r){var i;const s=t&&(sE(t)||xF(t))&&nB(t),c=e.enclosingDeclaration,l=e.flags;if(!t||!PC(t)||-2147483648&e.flags||ce.serializeTypeOfDeclaration(t,e),e.flags|=-2147483648,c&&(!Nc(n)||1&e.flags)){const i=t&&gB(t)?t:le(r);if(i&&!uu(i)&&!mE(i)){const t=gB(i),r=!bE(t)&&a(e,t,n,i,s);if(r)return e.flags=l,r}}8192&n.flags&&n.symbol===r&&(!e.enclosingDeclaration||Q(r.declarations,(t=>Sd(t)===Sd(e.enclosingDeclaration))))&&(e.flags|=1048576);const u=t??r.valueDeclaration??(null==(i=r.declarations)?void 0:i[0]),_=u&&function(e){return cu(e)||mN(e)||If(e)}(u)?_B(u):void 0,d=o(e,_,n,s);return e.flags=l,d}function pe(e,t){const r=256&e.flags,i=e.flags;let a;r&&(e.flags&=-257);const s=Gf(t);return!s||r&&Ec(s)?r||(a=YC.createKeywordTypeNode(133)):(!t.declaration||-2147483648&e.flags||ce.serializeReturnTypeForSignature(t.declaration,e),e.flags|=-2147483648,a=function(e,t){const r=Wf(t),i=Gf(t);if(e.enclosingDeclaration&&(!Nc(i)||1&e.flags)&&t.declaration&&!ly(t.declaration)){const r=t.declaration&&function(e){const t=Cv(e);if(t)return t;if(177===e.kind){const t=uB(e).setAccessor;if(t){const e=fv(t);if(e)return kv(e)}}}(t.declaration);if(r&&n(e,r)===i){const t=he(e,r);if(t)return t}}if(r)return P(r,e);return o(e,t.declaration&&_B(t.declaration),i)}(e,t)),e.flags=i,a}function fe(e,t){let n=!1;const i=bb(e);if(Mm(e)&&(rg(i)||og(i.parent)||iE(i.parent)&&ig(i.parent.left)&&rg(i.parent.right)))return n=!0,{introducesError:n,node:e};const o=qs(e);let a;if(yv(i))return a=ns(rm(i,!1,!1)),0!==Is(a,i,o,!1).accessibility&&(n=!0,t.tracker.reportInaccessibleThisError()),{introducesError:n,node:s(e)};if(a=Ma(i,o,!0,!0),t.enclosingDeclaration&&!(a&&262144&a.flags)){a=_s(a);const r=Ma(i,o,!0,!0,t.enclosingDeclaration);if(r===ht||void 0===r&&void 0!==a||r&&a&&!us(_s(r),a))return r!==ht&&t.tracker.reportInferenceFallback(e),n=!0,{introducesError:n,node:e,sym:a}}return a?(1&a.flags&&a.valueDeclaration&&(ay(a.valueDeclaration)||xF(a.valueDeclaration))||(262144&a.flags||dh(e)||0===Is(a,t.enclosingDeclaration,o,!1).accessibility?t.tracker.trackSymbol(a,t.enclosingDeclaration,o):(t.tracker.reportInferenceFallback(e),n=!0)),{introducesError:n,node:s(e)}):{introducesError:n,node:e};function s(e){if(e===i){const n=ju(a),i=262144&a.flags?ee(n,t):YC.cloneNode(e);return i.symbol=a,r(t,iw(i,16777216),e)}const n=ZB(e,(e=>s(e)),void 0);return n!==e&&r(t,n,e),n}}function me(e,t,n,r){const i=n?111551:788968,o=Ma(t,i,!0);if(!o)return;const a=2097152&o.flags?Ea(o):o;return 0===Is(o,e.enclosingDeclaration,i,!1).accessibility?X(a,e,i,r):void 0}function ge(e,t){if(Mm(t)&&df(t)){Hb(t);const e=Wo(t).resolvedSymbol;return!e||!!((t.isTypeOf||788968&e.flags)&&p(t.typeArguments)>=kf(nu(e)))}if(LE(t))return void 0===e.mapper||!!n(e,t,!0);if(xE(t)){if(Dl(t))return!1;const n=Ih(t),r=Wo(t).resolvedSymbol;if(!r)return!1;if(262144&r.flags){const t=ju(r);if(e.mapper&&Ax(t,e.mapper)!==t)return!1}if(Rm(t))return _e(t,n)&&!Ah(t)&&788968&r.flags}if(jE(t)&&158===t.operator&&155===t.type.kind){const n=e.enclosingDeclaration&&function(e){for(;Wo(e).fakeScopeForSignatureDeclaration;)e=e.parent;return e}(e.enclosingDeclaration);return!!mc(t,(e=>e===n))}return!0}function he(e,i){t&&t.throwIfCancellationRequested&&t.throwIfCancellationRequested();let o=!1;const{finalizeBoundary:a,startRecoveryScope:s}=function(){let t,n;const r=e.tracker,i=e.trackedSymbols;e.trackedSymbols=void 0;const a=e.encounteredError;return e.tracker=new $B(e,{...r.inner,reportCyclicStructureError(){s((()=>r.reportCyclicStructureError()))},reportInaccessibleThisError(){s((()=>r.reportInaccessibleThisError()))},reportInaccessibleUniqueSymbolError(){s((()=>r.reportInaccessibleUniqueSymbolError()))},reportLikelyUnsafeImportRequiredError(e){s((()=>r.reportLikelyUnsafeImportRequiredError(e)))},reportNonSerializableProperty(e){s((()=>r.reportNonSerializableProperty(e)))},trackSymbol:(e,n,r)=>((t??(t=[])).push([e,n,r]),!1),moduleResolverHost:e.tracker.moduleResolverHost},e.tracker.moduleResolverHost),{startRecoveryScope:function(){const e=(null==t?void 0:t.length)??0,r=(null==n?void 0:n.length)??0;return()=>{o=!1,t&&(t.length=e),n&&(n.length=r)}},finalizeBoundary:function(){return e.tracker=r,e.trackedSymbols=i,e.encounteredError=a,null==n||n.forEach((e=>e())),!o&&(null==t||t.forEach((([t,n,r])=>e.tracker.trackSymbol(t,n,r))),!0)}};function s(e){o=!0,(n??(n=[])).push(e)}}(),c=qB(i,l,wu);if(a())return e.approximateLength+=i.end-i.pos,c;function l(t){if(o)return t;const i=s(),a=function(e){return cu(e)||sF(e)||BE(e)}(t)?u(t):void 0,c=function(t){if(UN(t))return qB(t.type,l,wu);if(QN(t)||319===t.kind)return YC.createKeywordTypeNode(133);if(YN(t))return YC.createKeywordTypeNode(159);if(ZN(t))return YC.createUnionTypeNode([qB(t.type,l,wu),YC.createLiteralTypeNode(YC.createNull())]);if(tF(t))return YC.createUnionTypeNode([qB(t.type,l,wu),YC.createKeywordTypeNode(157)]);if(eF(t))return qB(t.type,l);if(rF(t))return YC.createArrayTypeNode(qB(t.type,l,wu));if(aF(t))return YC.createTypeLiteralNode(O(t.jsDocPropertyTags,(r=>{const i=qB(qD(r.name)?r.name:r.name.right,l,qD),o=Tc(n(e,t),i.escapedText),a=o&&r.typeExpression&&n(e,r.typeExpression.type)!==o?_(o,e):void 0;return YC.createPropertySignature(void 0,i,r.isBracketed||r.typeExpression&&tF(r.typeExpression.type)?YC.createToken(58):void 0,a||r.typeExpression&&qB(r.typeExpression.type,l,wu)||YC.createKeywordTypeNode(133))})));if(xE(t)&&qD(t.typeName)&&""===t.typeName.escapedText)return ew(YC.createKeywordTypeNode(133),t);if((hP(t)||xE(t))&&Bm(t))return YC.createTypeLiteralNode([YC.createIndexSignature(void 0,[YC.createParameterDeclaration(void 0,void 0,"x",void 0,qB(t.typeArguments[0],l,wu))],qB(t.typeArguments[1],l,wu))]);if(nF(t)){if(Ng(t)){let n;return YC.createConstructorTypeNode(void 0,VB(t.typeParameters,l,aE),q(t.parameters,((t,i)=>t.name&&qD(t.name)&&"new"===t.name.escapedText?void(n=t.type):YC.createParameterDeclaration(void 0,s(t),r(e,YC.createIdentifier(c(t,i)),t),YC.cloneNode(t.questionToken),qB(t.type,l,wu),void 0))),qB(n||t.type,l,wu)||YC.createKeywordTypeNode(133))}return YC.createFunctionTypeNode(VB(t.typeParameters,l,aE),O(t.parameters,((t,n)=>YC.createParameterDeclaration(void 0,s(t),r(e,YC.createIdentifier(c(t,n)),t),YC.cloneNode(t.questionToken),qB(t.type,l,wu),void 0))),qB(t.type,l,wu)||YC.createKeywordTypeNode(133))}if(LE(t))return ge(e,t)||(o=!0),t;if(aE(t))return YC.updateTypeParameterDeclaration(t,VB(t.modifiers,l,iu),r(e,ee(ju(ns(t)),e),t),qB(t.constraint,l,wu),qB(t.default,l,wu));if(RE(t)){return f(t)||(o=!0,t)}if(xE(t)){return h(t)||(o=!0,t)}if(df(t)){const i=Wo(t).resolvedSymbol;return!Rm(t)||!i||(t.isTypeOf||788968&i.flags)&&p(t.typeArguments)>=kf(nu(i))?YC.updateImportTypeNode(t,YC.updateLiteralTypeNode(t.argument,function(n,r){if(e.bundled||e.enclosingFile!==Sd(r)){let i=r.text;const o=Wo(t).resolvedSymbol,a=n.isTypeOf?111551:788968,s=o&&0===Is(o,e.enclosingDeclaration,a,!1).accessibility&&z(o,e,a,!0)[0];if(s&&nd(s))i=H(s,e);else{const t=yB(n);t&&(i=H(t.symbol,e))}if(i.includes("/node_modules/")&&(e.encounteredError=!0,e.tracker.reportLikelyUnsafeImportRequiredError&&e.tracker.reportLikelyUnsafeImportRequiredError(i)),i!==r.text)return ew(YC.createStringLiteral(i),r)}return qB(r,l,wD)}(t,t.argument.literal)),qB(t.attributes,l,lN),qB(t.qualifier,l,ou),VB(t.typeArguments,l,wu),t.isTypeOf):r(e,_(n(e,t),e),t)}if(!Dc(t)||167!==t.name.kind||a_(t.name)||1&e.flags&&Vh(t)&&vb(t.name.expression)&&1&IF(t.name).flags){if(cu(t)&&!t.type||uE(t)&&!t.type&&!t.initializer||lE(t)&&!t.type&&!t.initializer||sE(t)&&!t.type&&!t.initializer){let n=i(t,l);return n===t&&(n=r(e,YC.cloneNode(t),t)),n.type=YC.createKeywordTypeNode(133),sE(t)&&(n.modifiers=void 0),n}if(TE(t)){return g(t)||(o=!0,t)}if(oE(t)&&vb(t.expression)){const{node:n,introducesError:r}=fe(t.expression,e);if(r){const n=_(RC(qR(t.expression)),e);let r;if(JE(n))r=n.literal;else{const i=oR(t.expression),o="string"==typeof i.value?YC.createStringLiteral(i.value,void 0):"number"==typeof i.value?YC.createNumericLiteral(i.value,0):void 0;if(!o)return zE(n)&&J(t.expression,e.enclosingDeclaration,e),t;r=o}return 11===r.kind&&Ts(r.text,wS(A))?YC.createIdentifier(r.text):9!==r.kind||r.text.startsWith("-")?YC.updateComputedPropertyName(t,r):r}return YC.updateComputedPropertyName(t,n)}if(bE(t)){let n;if(qD(t.parameterName)){const{node:r,introducesError:i}=fe(t.parameterName,e);o=o||i,n=r}else n=YC.cloneNode(t.parameterName);return YC.updateTypePredicateNode(t,YC.cloneNode(t.assertsModifier),n,qB(t.type,l,wu))}if(DE(t)||CE(t)||BE(t)){const n=i(t,l),o=r(e,n===t?YC.cloneNode(t):n,t);return iw(o,Yd(o)|(1024&e.flags&&CE(t)?0:1)),o}if(wD(t)&&268435456&e.flags&&!t.singleQuote){const e=YC.cloneNode(t);return e.singleQuote=!0,e}if(IE(t)){const e=qB(t.checkType,l,wu),n=u(t),r=qB(t.extendsType,l,wu),i=qB(t.trueType,l,wu);n();const o=qB(t.falseType,l,wu);return YC.updateConditionalTypeNode(t,e,r,i,o)}if(jE(t))if(158===t.operator&&155===t.type.kind){if(!ge(e,t))return o=!0,t}else if(143===t.operator){return m(t)||(o=!0,t)}return i(t,l)}function i(t,n){return ZB(t,n,void 0,e.enclosingFile&&e.enclosingFile===Sd(t)?void 0:a)}function a(e,t,n,r,i){let o=VB(e,t,n,r,i);return o&&(-1===o.pos&&-1===o.end||(o===e&&(o=YC.createNodeArray(e,e.hasTrailingComma)),FT(o,-1,-1))),o}function s(e){return e.dotDotDotToken||(e.type&&rF(e.type)?YC.createToken(26):void 0)}function c(e,t){return e.name&&qD(e.name)&&"this"===e.name.escapedText?"this":s(e)?"args":`arg${t}`}}(t);return null==a||a(),o?wu(t)&&!bE(t)?(i(),function(e,t){return _(n(e,t),e)}(e,t)):t:c?r(e,c,t):void 0}function u(t){return C(e,t,function(e){return cu(e)||sF(e)?Cf(e).parameters:void 0}(t),function(e){return cu(e)||sF(e)?Cf(e).typeParameters:IE(e)?Kb(e):[Lu(ns(e.typeParameter))]}(t))}function d(e){const t=ch(e);switch(t.kind){case 183:return h(t);case 186:return g(t);case 199:return f(t);case 198:const e=t;if(143===e.operator)return m(e)}return qB(e,l,wu)}function f(e){const t=d(e.objectType);if(void 0!==t)return YC.updateIndexedAccessTypeNode(e,t,qB(e.indexType,l,wu))}function m(e){xn.assertEqual(e.operator,143);const t=d(e.type);if(void 0!==t)return YC.updateTypeOperatorNode(e,t)}function g(t){const{introducesError:n,node:i}=fe(t.exprName,e);if(!n)return YC.updateTypeQueryNode(t,i,VB(t.typeArguments,l,wu));const o=me(e,t.exprName,!0);return o?r(e,o,t.exprName):void 0}function h(t){if(ge(e,t)){const{introducesError:n,node:i}=fe(t.typeName,e),o=VB(t.typeArguments,l,wu);if(!n){const n=YC.updateTypeReferenceNode(t,i,o);return r(e,n,t)}{const n=me(e,t.typeName,!1,o);if(n)return r(e,n,t.typeName)}}}}}(),ce=pH(A,{isEntityNameVisible:Vs,isExpandoFunctionDeclaration:rB,getAllAccessorDeclarations:uB,requiresAddingImplicitUndefined:nB,isUndefinedIdentifierExpression:e=>(xn.assert(Tm(e)),JR(e)===ge)}),_e=kC({evaluateElementAccessExpression:function(e,t){const n=e.expression;if(vb(n)&&$_(e.argumentExpression)){const r=Ma(n,111551,!0);if(r&&384&r.flags){const n=yc(e.argumentExpression.text),i=r.exports.get(n);if(i)return xn.assert(Sd(i.valueDeclaration)===Sd(r.valueDeclaration)),t?aR(e,i,t):aB(i.valueDeclaration)}}return SC(void 0)},evaluateEntityNameExpression:oR}),de=ed(),ge=No(4,"undefined");ge.declarations=[];var he=No(1536,"globalThis",8);he.exports=de,he.declarations=[],de.set(he.escapedName,he);var ye,ve,xe,Ee=No(4,"arguments"),Pe=No(4,"require"),Ne=A.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules",Ie=!A.verbatimModuleSyntax,Me=0,Le=0,je=wC({compilerOptions:A,requireSymbol:Pe,argumentsSymbol:Ee,globals:de,getSymbolOfDeclaration:ns,error:xo,getRequiresScopeChangeCache:Qo,setRequiresScopeChangeCache:Yo,lookup:Ho,onPropertyWithInvalidInitializer:function(e,t,n,r){return!$&&(e&&!r&&ta(e,t,t)||xo(e,e&&n.type&&Js(n.type,e.pos)?va.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:va.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,Ap(n.name),ea(t)),!0)},onFailedToResolveSymbol:function(e,t,n,r){const i=st(t)?t:t.escapedText;a((()=>{if(!e||!(324===e.parent.kind||ta(e,i,t)||na(e)||function(e,t,n){const r=1920|(Mm(e)?111551:0);if(n===r){const n=Da(je(e,t,788968&~r,void 0,!1)),i=e.parent;if(n){if(iE(i)){xn.assert(i.left===e,"Should only be resolving left side of qualified name as a namespace");const r=i.right.escapedText;if(Jp(ju(n),r))return xo(i,va.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,vc(t),vc(r)),!0}return xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,vc(t)),!0}}return!1}(e,i,n)||function(e,t){return!(!ia(t)||281!==e.parent.kind)&&(xo(e,va.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,t),!0)}(e,i)||function(e,t,n){if(111127&n){if(Da(je(e,t,1024,void 0,!1)))return xo(e,va.Cannot_use_namespace_0_as_a_value,vc(t)),!0}else if(788544&n&&Da(je(e,t,1536,void 0,!1)))return xo(e,va.Cannot_use_namespace_0_as_a_type,vc(t)),!0;return!1}(e,i,n)||function(e,t,n){if(111551&n){if(ia(t)){const n=e.parent.parent;if(n&&n.parent&&jN(n)){const r=n.token,i=n.parent.kind;264===i&&96===r?xo(e,va.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types,vc(t)):263===i&&96===r?xo(e,va.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values,vc(t)):263===i&&119===r&&xo(e,va.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types,vc(t))}else xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,vc(t));return!0}const n=Da(je(e,t,788544,void 0,!1)),r=n&&Pa(n);if(n&&void 0!==r&&!(111551&r)){const r=vc(t);return function(e){switch(e){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}(t)?xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later,r):function(e,t){const n=mc(e.parent,(e=>!oE(e)&&!lE(e)&&(CE(e)||"quit")));if(n&&1===n.members.length){const e=ju(t);return!!(1048576&e.flags)&&pM(e,384,!0)}return!1}(e,n)?xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0,r,"K"===r?"P":"K"):xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,r),!0}}return!1}(e,i,n)||function(e,t,n){if(788584&n){const n=Da(je(e,t,111127,void 0,!1));if(n&&!(1920&n.flags))return xo(e,va._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,vc(t)),!0}return!1}(e,i,n))){let o,a;if(t&&(a=function(e){const t=ea(e),n=ep().get(t);return n&&Ce(n.keys())}(t),a&&xo(e,r,ea(t),a)),!a&&Li<10&&(o=WA(e,i,n),(null==o?void 0:o.valueDeclaration)&&sp(o.valueDeclaration)&&pp(o.valueDeclaration)&&(o=void 0),o)){const i=Us(o),a=OA(e,o,!1),s=1920===n||t&&"string"!=typeof t&&ly(t)?va.Cannot_find_namespace_0_Did_you_mean_1:a?va.Could_not_find_name_0_Did_you_mean_1:va.Cannot_find_name_0_Did_you_mean_1,c=bo(e,s,ea(t),i);c.canonicalHead=Hp(r,ea(t)),So(!a,c),o.valueDeclaration&&fT(c,Rp(o.valueDeclaration,va._0_is_declared_here,i))}o||a||!t||xo(e,r,ea(t)),Li++}}))},onSuccessfullyResolvedSymbol:function(e,t,n,r,i,o){a((()=>{var a;const s=t.escapedName,c=r&&qN(r)&&Zp(r);if(e&&(2&n||(32&n||384&n)&&111551==(111551&n))){const n=_s(t);(2&n.flags||32&n.flags||384&n.flags)&&function(e,t){var n;if(xn.assert(!!(2&e.flags||32&e.flags||384&e.flags)),67108881&e.flags&&32&e.flags)return;const r=null==(n=e.declarations)?void 0:n.find((e=>op(e)||gu(e)||266===e.kind));if(void 0===r)return xn.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(33554432&r.flags||Xo(r,t))){let n;const i=Ap(Pc(r));2&e.flags?n=xo(t,va.Block_scoped_variable_0_used_before_its_declaration,i):32&e.flags?n=xo(t,va.Class_0_used_before_its_declaration,i):256&e.flags?n=xo(t,va.Enum_0_used_before_its_declaration,i):(xn.assert(!!(128&e.flags)),NS(A)&&(n=xo(t,va.Enum_0_used_before_its_declaration,i))),n&&fT(n,Rp(r,va._0_is_declared_here,i))}}(n,e)}if(c&&111551==(111551&n)&&!(16777216&e.flags)){const n=ts(t);p(n.declarations)&&x(n.declarations,(e=>nN(e)||qN(e)&&!!e.symbol.globalExports))&&ko(!A.allowUmdGlobalAccess,e,va._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,vc(s))}if(i&&!o&&111551==(111551&n)){const r=ts(g_(t)),o=sy(i);r===ns(i)?xo(e,va.Parameter_0_cannot_reference_itself,Ap(i.name)):r.valueDeclaration&&r.valueDeclaration.pos>i.pos&&o.parent.locals&&Ho(o.parent.locals,r.escapedName,n)===r&&xo(e,va.Parameter_0_cannot_reference_identifier_1_declared_after_it,Ap(i.name),Ap(e))}if(e&&111551&n&&2097152&t.flags&&!(111551&t.flags)&&!wT(e)){const n=Aa(t,111551);if(n){const t=281===n.kind||278===n.kind||280===n.kind?va._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:va._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type,r=vc(s);Zo(xo(e,t,r),n,r)}}if(A.isolatedModules&&t&&c&&111551==(111551&n)){const e=Ho(de,s,n)===t&&qN(r)&&r.locals&&Ho(r.locals,s,-111552);if(e){const t=null==(a=e.declarations)?void 0:a.find((e=>276===e.kind||273===e.kind||274===e.kind||271===e.kind));t&&!Ul(t)&&xo(t,va.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,vc(s))}}}))}}),Re=wC({compilerOptions:A,requireSymbol:Pe,argumentsSymbol:Ee,globals:de,getSymbolOfDeclaration:ns,error:xo,getRequiresScopeChangeCache:Qo,setRequiresScopeChangeCache:Yo,lookup:function(e,t,n){const r=Ho(e,t,n);if(r)return r;let i;if(e===de){i=q(["string","number","boolean","object","bigint","symbol"],(t=>e.has(t.charAt(0).toUpperCase()+t.slice(1))?No(524288,t):void 0)).concat($e(e.values()))}else i=$e(e.values());return GA(vc(t),i,n)}});const Be={getNodeCount:()=>Oe(e.getSourceFiles(),((e,t)=>e+t.nodeCount),0),getIdentifierCount:()=>Oe(e.getSourceFiles(),((e,t)=>e+t.identifierCount),0),getSymbolCount:()=>Oe(e.getSourceFiles(),((e,t)=>e+t.symbolCount),d),getTypeCount:()=>_,getInstantiationCount:()=>m,getRelationCacheSizes:()=>({assignable:co.size,identity:uo.size,subtype:ao.size,strictSubtype:so.size}),isUndefinedSymbol:e=>e===ge,isArgumentsSymbol:e=>e===Ee,isUnknownSymbol:e=>e===ht,getMergedSymbol:ts,symbolIsValue:ds,getDiagnostics:wR,getGlobalDiagnostics:function(){return ER(),ro.getGlobalDiagnostics()},getRecursionIdentity:Rk,getUnmatchedProperties:sw,getTypeOfSymbolAtLocation:(e,t)=>{const n=hc(t);return n?function(e,t){if(e=_s(e),(80===t.kind||81===t.kind)&&(Cb(t)&&(t=t.parent),Tm(t)&&(!eh(t)||yx(t)))){const n=_C(yx(t)&&211===t.kind?wA(t,void 0,!0):qM(t));if(_s(Wo(t).resolvedSymbol)===e)return n}return dh(t)&&A_(t.parent)&&Pl(t.parent)?Il(t.parent.symbol):wb(t)&&yx(t.parent)?zl(e):ql(e)}(e,n):Dt},getTypeOfSymbol:$l,getSymbolsOfParameterPropertyDeclaration:(e,t)=>{const n=hc(e,sE);return void 0===n?xn.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):(xn.assert(rc(n,n.parent)),function(e,t){const n=e.parent,r=e.parent.parent,i=Ho(n.locals,t,111551),o=Ho(m_(r.symbol),t,111551);return i&&o?[i,o]:xn.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(n,yc(t)))},getDeclaredTypeOfSymbol:ju,getPropertiesOfType:Rd,getPropertyOfType:(e,t)=>Jp(e,yc(t)),getPrivateIdentifierPropertyOfType:(e,t,n)=>{const r=hc(n);if(!r)return;const i=PA(yc(t),r);return i?FA(e,i):void 0},getTypeOfPropertyOfType:(e,t)=>Tc(e,yc(t)),getIndexInfoOfType:(e,t)=>_f(e,0===t?Jt:zt),getIndexInfosOfType:cf,getIndexInfosOfIndexSymbol:Wm,getSignaturesOfType:Vp,getIndexTypeOfType:(e,t)=>pf(e,0===t?Jt:zt),getIndexType:e=>Av(e),getBaseTypes:ku,getBaseTypeOfLiteralType:cT,getWidenedType:RC,getWidenedLiteralType:dT,getTypeFromTypeNode:e=>{const t=hc(e,wu);return t?Sx(t):Dt},getParameterType:DO,getParameterIdentifierInfoAtPosition:function(e,t){var n;if(317===(null==(n=e.declaration)?void 0:n.kind))return;const r=e.parameters.length-(JB(e)?1:0);if(tSL(e),getReturnTypeOfSignature:Gf,isNullableType:vA,getNullableType:KT,getNonNullableType:QT,getNonOptionalType:_C,getTypeArguments:Ig,typeToTypeNode:se.typeToTypeNode,indexInfoToIndexSignatureDeclaration:se.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:se.signatureToSignatureDeclaration,symbolToEntityName:se.symbolToEntityName,symbolToExpression:se.symbolToExpression,symbolToNode:se.symbolToNode,symbolToTypeParameterDeclarations:se.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:se.symbolToParameterDeclaration,typeParameterToDeclaration:se.typeParameterToDeclaration,getSymbolsInScope:(e,t)=>{const n=hc(e);return n?function(e,t){if(67108864&e.flags)return[];const n=ed();let r=!1;return function(){for(;e;){switch(f_(e)&&e.locals&&!Yp(e)&&o(e.locals,t),e.kind){case 307:if(!qI(e))break;case 267:a(ns(e).exports,2623475&t);break;case 266:o(ns(e).exports,8&t);break;case 231:e.name&&i(e.symbol,t);case 263:case 264:r||o(m_(ns(e)),788968&t);break;case 218:e.name&&i(e.symbol,t)}Bf(e)&&i(Ee,t),r=Jv(e),e=e.parent}o(de,t)}(),n.delete("this"),yf(n);function i(e,t){if(gx(e)&t){const t=e.escapedName;n.has(t)||n.set(t,e)}}function o(e,t){t&&e.forEach((e=>{i(e,t)}))}function a(e,t){t&&e.forEach((e=>{Y_(e,281)||Y_(e,280)||"default"===e.escapedName||i(e,t)}))}}(n,t):[]},getSymbolAtLocation:e=>{const t=hc(e);return t?JR(t,!0):void 0},getIndexInfosAtLocation:e=>{const t=hc(e);return t?function(e){if(qD(e)&&GE(e.parent)&&e.parent.name===e){const t=Tv(e),n=qM(e.parent.expression);return R(1048576&n.flags?n.types:[n],(e=>F(cf(e),(e=>af(t,e.keyType)))))}}(t):void 0},getShorthandAssignmentValueSymbol:e=>{const t=hc(e);return t?function(e){if(e&&304===e.kind)return Ma(e.name,2208703)}(t):void 0},getExportSpecifierLocalTargetSymbol:e=>{const t=hc(e,yN);return t?function(e){return yN(e)?e.parent.parent.moduleSpecifier?ba(e.parent.parent,e):Ma(e.propertyName||e.name,2998271):Ma(e,2998271)}(t):void 0},getExportSymbolOfSymbol:e=>ts(e.exportSymbol||e),getTypeAtLocation:e=>{const t=hc(e);return t?zR(t):Dt},getTypeOfAssignmentPattern:e=>{const t=hc(e,Pu);return t&&$R(t)||Dt},getPropertySymbolOfDestructuringAssignment:e=>{const t=hc(e,qD);return t?function(e){const t=$R(ut(e.parent.parent,Pu));return t&&Jp(t,e.escapedText)}(t):void 0},signatureToString:(e,t,n,r)=>Ks(e,hc(t),n,r),typeToString:(e,t,n)=>Ws(e,hc(t),n),symbolToString:(e,t,n,r)=>Us(e,hc(t),n,r),typePredicateToString:(e,t,n)=>Zs(e,hc(t),n),writeSignature:(e,t,n,r,i)=>Ks(e,hc(t),n,r,i),writeType:(e,t,n,r)=>Ws(e,hc(t),n,r),writeSymbol:(e,t,n,r,i)=>Us(e,hc(t),n,r,i),writeTypePredicate:(e,t,n,r)=>Zs(e,hc(t),n,r),getAugmentedPropertiesOfType:KR,getRootSymbols:function e(t){const n=function(e){if(6&px(e))return q(Uo(e).containingType.types,(t=>Jp(t,e.escapedName)));if(33554432&e.flags){const{links:{leftSpread:t,rightSpread:n,syntheticOrigin:r}}=e;return t?[t,n]:r?[r]:fn(function(e){let t,n=e;for(;n=Uo(n).target;)t=n;return t}(e))}}(t);return n?R(n,e):[t]},getSymbolOfExpando:oO,getContextualType:(e,t)=>{const n=hc(e,Xu);if(n)return 4&t?qe(n,(()=>dF(n,t))):dF(n,t)},getContextualTypeForObjectLiteralElement:e=>{const t=hc(e,Cu);return t?HN(t,void 0):void 0},getContextualTypeForArgumentAtIndex:(e,t)=>{const n=hc(e,zu);return n&&PN(n,t)},getContextualTypeForJsxAttribute:e=>{const t=hc(e,C_);return t&&XN(t,void 0)},isContextSensitive:lS,getTypeOfPropertyOfContextualType:LN,getFullyQualifiedName:Oa,getResolvedSignature:(e,t,n)=>Ve(e,t,n,0),getCandidateSignaturesForStringLiteralCompletions:function(e,t){const n=new Set,r=[];qe(t,(()=>Ve(e,r,void 0,0)));for(const e of r)n.add(e);r.length=0,Je(t,(()=>Ve(e,r,void 0,0)));for(const e of r)n.add(e);return $e(n)},getResolvedSignatureForSignatureHelp:(e,t,n)=>Je(e,(()=>Ve(e,t,n,16))),getExpandedParameters:w_,hasEffectiveRestParameter:IO,containsArgumentsReference:Ef,getConstantValue:e=>{const t=hc(e,sB);return t?cB(t):void 0},isValidPropertyAccess:(e,t)=>{const n=hc(e,Ru);return!!n&&function(e,t){switch(e.kind){case 211:return ZA(e,108===e.expression.kind,t,RC(KM(e.expression)));case 166:return ZA(e,!1,t,RC(KM(e.left)));case 205:return ZA(e,!1,t,Sx(e))}}(n,yc(t))},isValidPropertyAccessForCompletions:(e,t,n)=>{const r=hc(e,GE);return!!r&&YA(r,t,n)},getSignatureFromDeclaration:e=>{const t=hc(e,cu);return t?Cf(t):void 0},isImplementationOfOverload:e=>{const t=hc(e,cu);return t?tB(t):void 0},getImmediateAliasedSymbol:jF,getAliasedSymbol:Ea,getEmitResolver:function(e,t,n){return n||wR(e,t),ae},requiresAddingImplicitUndefined:nB,getExportsOfModule:Ka,getExportsAndPropertiesOfModule:function(e){const t=Ka(e),n=$a(e);if(n!==e){const e=$l(n);Ha(e)&&pe(t,Rd(e))}return t},forEachExportAndPropertyOfModule:function(e,t){Qa(e).forEach(((e,n)=>{vs(n)||t(e,n)}));const n=$a(e);if(n!==e){const e=$l(n);Ha(e)&&function(e,n){3670016&(e=yp(e)).flags&&Od(e).members.forEach(((e,n)=>{xs(e,n)&&((e,n)=>{t(e,n)})(e,n)}))}(e)}},getSymbolWalker:BR((function(e){return lm(e)||St}),Wf,Gf,ku,Od,$l,Nw,Jd,bb,Ig),getAmbientModules:function(){return qn||(qn=[],de.forEach(((e,t)=>{vB.test(t)&&qn.push(e)}))),qn},getJsxIntrinsicTagNamesAt:function(e){const t=UF(hB.IntrinsicElements,e);return t?Rd(t):u},isOptionalParameter:e=>{const t=hc(e,sE);return!!t&&xf(t)},tryGetMemberInModuleExports:(e,t)=>Wa(yc(e),t),tryGetMemberInModuleExportsAndProperties:(e,t)=>function(e,t){const n=Wa(e,t);if(n)return n;const r=$a(t);if(r===t)return;const i=$l(r);return Ha(i)?Jp(i,e):void 0}(yc(e),t),tryFindAmbientModule:e=>vf(e,!0),tryFindAmbientModuleWithoutAugmentations:e=>vf(e,!1),getApparentType:mp,getUnionType:ev,isTypeAssignableTo:SS,createAnonymousType:ks,createSignature:x_,createSymbol:No,createIndexInfo:Vm,getAnyType:()=>St,getStringType:()=>Jt,getStringLiteralType:lx,getNumberType:()=>zt,getNumberLiteralType:ux,getBigIntType:()=>$t,createPromiseType:UO,createArrayType:Ty,getElementTypeOfArrayType:Wk,getBooleanType:()=>Xt,getFalseType:e=>e?qt:Vt,getTrueType:e=>e?Kt:Ht,getVoidType:()=>Zt,getUndefinedType:()=>It,getNullType:()=>Rt,getESSymbolType:()=>Qt,getNeverType:()=>en,getOptionalType:()=>jt,getPromiseType:()=>_y(!1),getPromiseLikeType:()=>dy(!1),getAsyncIterableType:()=>{const e=fy(!1);if(e!==An)return e},isSymbolAccessible:Is,isArrayType:qk,isTupleType:PT,isArrayLikeType:Hk,isEmptyAnonymousObjectType:ok,isTypeInvalidDueToUnionDiscriminant:function(e,t){return t.properties.some((t=>{const n=t.name&&(ON(t.name)?lx(uC(t.name)):Tv(t.name)),r=n&&mC(n)?gC(n):void 0,i=void 0===r?void 0:Tc(e,r);return!!i&&sT(i)&&!SS(zR(t),i)}))},getExactOptionalProperties:function(e){return Rd(e).filter((e=>DC($l(e))))},getAllPossiblePropertiesOfTypes:function(e){const t=ev(e);if(!(1048576&t.flags))return KR(t);const n=ed();for(const r of e)for(const{escapedName:e}of KR(r))if(!n.has(e)){const r=vp(t,e);r&&n.set(e,r)}return $e(n.values())},getSuggestedSymbolForNonexistentProperty:qA,getSuggestedSymbolForNonexistentJSXAttribute:VA,getSuggestedSymbolForNonexistentSymbol:(e,t,n)=>WA(e,yc(t),n),getSuggestedSymbolForNonexistentModule:HA,getSuggestedSymbolForNonexistentClassMember:$A,getBaseConstraintOfType:Wd,getDefaultFromTypeParameter:e=>e&&262144&e.flags?np(e):void 0,resolveName:(e,t,n,r)=>je(t,yc(e),n,void 0,!1,r),getJsxNamespace:e=>vc(go(e)),getJsxFragmentFactory:e=>{const t=mB(e);return t&&vc(bb(t).escapedText)},getAccessibleSymbolChain:Es,getTypePredicateOfSignature:Wf,resolveExternalModuleName:e=>{const t=hc(e,Xu);return t&&ja(t,t,!0)},resolveExternalModuleSymbol:$a,tryGetThisTypeAt:(e,t,n)=>{const r=hc(e);return r&&UP(r,t,n)},getTypeArgumentConstraint:e=>{const t=hc(e,wu);return t&&function(e){const t=lt(e.parent,B_);if(!t)return;const n=sL(t);if(!n)return;const r=Jd(n[t.typeArguments.indexOf(e)]);return r&&eS(r,Fx(n,oL(t,n)))}(t)},getSuggestionDiagnostics:(n,r)=>{const i=hc(n,qN)||xn.fail("Could not determine parsed source file.");if(yT(i,A,e))return u;let o;try{return t=r,PR(i),xn.assert(!!(1&Wo(i).flags)),o=pe(o,io.getDiagnostics(i.fileName)),LL(CR(i),((e,t,n)=>{xd(e)||TR(t,!!(33554432&e.flags))||(o||(o=[])).push({...n,category:2})})),o||u}finally{t=void 0}},runWithCancellationToken:(e,n)=>{try{return t=e,n(Be)}finally{t=void 0}},getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:nu,isDeclarationVisible:sc,isPropertyAccessible:eI,getTypeOnlyAliasDeclaration:Aa,getMemberOverrideModifierStatus:function(e,t,n){if(!t.name)return 0;const r=ns(e),i=ju(r),o=y_(i),a=$l(r),s=Sh(e)&&ku(i),c=(null==s?void 0:s.length)?y_(Te(s),i.thisType):void 0;return Qj(e,a,xu(i),c,i,o,t.parent?$v(t):Bv(t,16),qv(t),Jv(t),!1,Sc(n))},isTypeParameterPossiblyReferenced:Wx,typeHasCallOrConstructSignatures:WR,getSymbolFlags:Pa};function Je(e,t){if(e=mc(e,Ju)){const n=[],r=[];for(;e;){const t=Wo(e);if(n.push([t,t.resolvedSignature]),t.resolvedSignature=void 0,UT(e)){const t=Uo(ns(e)),n=t.type;r.push([t,n]),t.type=void 0}e=mc(e.parent,Ju)}const i=t();for(const[e,t]of n)e.resolvedSignature=t;for(const[e,t]of r)e.type=t;return i}return t()}function qe(e,t){const n=mc(e,zu);if(n){let t=e;do{Wo(t).skipDirectInference=!0,t=t.parent}while(t&&t!==n)}b=!0;const r=Je(e,t);if(b=!1,n){let t=e;do{Wo(t).skipDirectInference=void 0,t=t.parent}while(t&&t!==n)}return r}function Ve(e,t,n,r){const i=hc(e,zu);ye=n;const o=i?nO(i,t,r):void 0;return ye=void 0,o}var Ue=new Map,Ke=new Map,Ge=new Map,Xe=new Map,Qe=new Map,Ye=new Map,tt=new Map,nt=new Map,rt=new Map,it=new Map,at=new Map,ct=new Map,_t=new Map,dt=new Map,pt=new Map,ft=[],mt=new Map,gt=new Set,ht=No(4,"unknown"),yt=No(0,"__resolving__"),vt=new Map,bt=new Map,xt=new Set,St=gs(1,"any"),kt=gs(1,"any",262144,"auto"),Tt=gs(1,"any",void 0,"wildcard"),Ct=gs(1,"any",void 0,"blocked string"),Dt=gs(1,"error"),Et=gs(1,"unresolved"),Pt=gs(1,"any",65536,"non-inferrable"),Ft=gs(1,"intrinsic"),At=gs(2,"unknown"),It=gs(32768,"undefined"),Ot=U?It:gs(32768,"undefined",65536,"widening"),Mt=gs(32768,"undefined",void 0,"missing"),Lt=ie?Mt:It,jt=gs(32768,"undefined",void 0,"optional"),Rt=gs(65536,"null"),Bt=U?Rt:gs(65536,"null",65536,"widening"),Jt=gs(4,"string"),zt=gs(8,"number"),$t=gs(64,"bigint"),qt=gs(512,"false",void 0,"fresh"),Vt=gs(512,"false"),Kt=gs(512,"true",void 0,"fresh"),Ht=gs(512,"true");Kt.regularType=Ht,Kt.freshType=Kt,Ht.regularType=Ht,Ht.freshType=Kt,qt.regularType=Vt,qt.freshType=qt,Vt.regularType=Vt,Vt.freshType=qt;var Gt,Xt=ev([Vt,Ht]),Qt=gs(4096,"symbol"),Zt=gs(16384,"void"),en=gs(131072,"never"),tn=gs(131072,"never",262144,"silent"),nn=gs(131072,"never",void 0,"implicit"),rn=gs(131072,"never",void 0,"unreachable"),cn=gs(67108864,"object"),ln=ev([Jt,zt]),pn=ev([Jt,zt,Qt]),mn=ev([zt,$t]),hn=ev([Jt,zt,Xt,$t,Rt,It]),yn=Ov(["",""],[zt]),vn=Lx((e=>{return 262144&e.flags?!(t=e).constraint&&!cg(t)||t.constraint===On?t:t.restrictiveInstantiation||(t.restrictiveInstantiation=ys(t.symbol),t.restrictiveInstantiation.constraint=On,t.restrictiveInstantiation):e;var t}),(()=>"(restrictive mapper)")),bn=Lx((e=>262144&e.flags?Tt:e),(()=>"(permissive mapper)")),Sn=gs(131072,"never",void 0,"unique literal"),kn=Lx((e=>262144&e.flags?Sn:e),(()=>"(unique literal mapper)")),Tn=Lx((e=>(!Gt||e!==jn&&e!==Rn&&e!==Bn||Gt(!0),e)),(()=>"(unmeasurable reporter)")),Cn=Lx((e=>(!Gt||e!==jn&&e!==Rn&&e!==Bn||Gt(!1),e)),(()=>"(unreliable reporter)")),wn=ks(void 0,w,u,u,u),Dn=ks(void 0,w,u,u,u);Dn.objectFlags|=2048;var En=No(2048,"__type");En.members=ed();var Pn=ks(En,w,u,u,u),Nn=ks(void 0,w,u,u,u),Fn=U?ev([It,Rt,Nn]):At,An=ks(void 0,w,u,u,u);An.instantiations=new Map;var In=ks(void 0,w,u,u,u);In.objectFlags|=262144;var On=ks(void 0,w,u,u,u),Mn=ks(void 0,w,u,u,u),Ln=ks(void 0,w,u,u,u),jn=ys(),Rn=ys();Rn.constraint=jn;var Bn=ys(),Jn=ys(),zn=ys();zn.constraint=Jn;var $n,qn,Vn,Un,Kn,Wn,Hn,Gn,Xn,Qn,Yn,Zn,er,tr,nr,rr,ir,ar,sr,cr,lr,ur,_r,dr,mr,gr,hr,yr,vr,br,xr,Sr,kr,Tr,Cr,wr,Dr,Er,Pr,Nr,Fr,Ar,Ir,Or,Mr,Lr,jr,Rr,Br,Jr,zr,$r,qr,Vr,Ur,Kr,Wr,Hr,Gr,Xr,Qr,Yr,Zr,ei=Sf(1,"<>",0,St),ti=x_(void 0,void 0,void 0,u,St,void 0,0,0),ni=x_(void 0,void 0,void 0,u,Dt,void 0,0,0),ri=x_(void 0,void 0,void 0,u,St,void 0,0,0),ii=x_(void 0,void 0,void 0,u,tn,void 0,0,0),oi=Vm(zt,Jt,!0),ai=new Map,si={get yieldType(){return xn.fail("Not supported")},get returnType(){return xn.fail("Not supported")},get nextType(){return xn.fail("Not supported")}},ci=hj(St,St,St),li=hj(St,St,At),ui=hj(en,St,It),_i={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:function(e){return Cr||(Cr=Xh("AsyncIterator",3,e))||An},getGlobalIterableType:fy,getGlobalIterableIteratorType:function(e){return wr||(wr=Xh("AsyncIterableIterator",1,e))||An},getGlobalGeneratorType:function(e){return Dr||(Dr=Xh("AsyncGenerator",3,e))||An},resolveIterationType:(e,t)=>SL(e,t,va.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),mustHaveANextMethodDiagnostic:va.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:va.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:va.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},di={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:function(e){return vr||(vr=Xh("Iterator",3,e))||An},getGlobalIterableType:my,getGlobalIterableIteratorType:function(e){return br||(br=Xh("IterableIterator",1,e))||An},getGlobalGeneratorType:function(e){return xr||(xr=Xh("Generator",3,e))||An},resolveIterationType:(e,t)=>e,mustHaveANextMethodDiagnostic:va.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:va.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:va.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},pi=new Map,fi=new Map,mi=0,gi=0,hi=0,yi=!1,vi=0,bi=[],xi=[],Si=[],ki=0,Ti=[],wi=[],Di=0,Ei=lx(""),Pi=ux(0),Ni=_x({negative:!1,base10Value:"0"}),Fi=[],Ai=[],Ii=[],Oi=0,Mi=!1,Li=0,ji=[],Ri=[],Bi=[],Ji=[],zi=[],$i=[],qi=[],Vi=[],Ui=[],Ki=[],Wi=[],Hi=[],Gi=[],Xi=[],Qi=[],Yi=[],Zi=[],eo=[],to=[],no=0,ro=by(),io=by(),oo=ev($e(wB.keys(),lx)),ao=new Map,so=new Map,co=new Map,lo=new Map,uo=new Map,_o=new Map,po=[[".mts",".mjs"],[".ts",".js"],[".cts",".cjs"],[".mjs",".mjs"],[".js",".js"],[".cjs",".cjs"],[".tsx",1===A.jsx?".jsx":".js"],[".jsx",".jsx"],[".json",".json"]];return function(){for(const t of e.getSourceFiles())IR(t,A);let t;$n=new Map;for(const n of e.getSourceFiles())if(!n.redirectInfo){if(!Zp(n)){const e=n.locals.get("globalThis");if(null==e?void 0:e.declarations)for(const t of e.declarations)ro.add(Rp(t,va.Declaration_name_conflicts_with_built_in_global_identifier_0,"globalThis"));qo(de,n.locals)}n.jsGlobalAugmentations&&qo(de,n.jsGlobalAugmentations),n.patternAmbientModules&&n.patternAmbientModules.length&&(Vn=Z(Vn,n.patternAmbientModules)),n.moduleAugmentations.length&&(t||(t=[])).push(n.moduleAugmentations),n.symbol&&n.symbol.globalExports&&n.symbol.globalExports.forEach(((e,t)=>{de.has(t)||de.set(t,e)}))}if(t)for(const e of t)for(const t of e)pp(t.parent)&&Vo(t);if(function(){const e=ge.escapedName,t=de.get(e);t?f(t.declarations,(t=>{YT(t)||ro.add(Rp(t,va.Declaration_name_conflicts_with_built_in_global_identifier_0,vc(e)))})):de.set(e,ge)}(),Uo(ge).type=Ot,Uo(Ee).type=Xh("IArguments",0,!0),Uo(ht).type=Dt,Uo(he).type=hs(16,he),Xn=Xh("Array",1,!0),Kn=Xh("Object",0,!0),Wn=Xh("Function",0,!0),Hn=G&&Xh("CallableFunction",0,!0)||Wn,Gn=G&&Xh("NewableFunction",0,!0)||Wn,Yn=Xh("String",0,!0),Zn=Xh("Number",0,!0),er=Xh("Boolean",0,!0),tr=Xh("RegExp",0,!0),rr=Ty(St),(ir=Ty(kt))===wn&&(ir=ks(void 0,w,u,u,u)),Qn=hy("ReadonlyArray",1)||Xn,ar=Qn?xy(Qn,[St]):rr,nr=hy("ThisType",1),t)for(const e of t)for(const t of e)pp(t.parent)||Vo(t);$n.forEach((({firstFile:e,secondFile:t,conflictingSymbols:n})=>{if(n.size<8)n.forEach((({isBlockScoped:e,firstFileLocations:t,secondFileLocations:n},r)=>{const i=e?va.Cannot_redeclare_block_scoped_variable_0:va.Duplicate_identifier_0;for(const e of t)$o(e,i,r,n);for(const e of n)$o(e,i,r,t)}));else{const r=$e(n.keys()).join(", ");ro.add(fT(Rp(e,va.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,r),Rp(t,va.Conflicts_are_in_this_file))),ro.add(fT(Rp(t,va.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,r),Rp(e,va.Conflicts_are_in_this_file)))}})),$n=void 0}(),Be;function fo(e){return e?pt.get(e):void 0}function mo(e,t){return e&&pt.set(e,t),t}function go(e){if(e){const t=Sd(e);if(t)if(EN(e)){if(t.localJsxFragmentNamespace)return t.localJsxFragmentNamespace;const n=t.pragmas.get("jsxfrag");if(n){const e=ot(n)?n[0]:n;if(t.localJsxFragmentFactory=zI(e.arguments.factory,M),qB(t.localJsxFragmentFactory,yo,ou),t.localJsxFragmentFactory)return t.localJsxFragmentNamespace=bb(t.localJsxFragmentFactory).escapedText}const r=mB(e);if(r)return t.localJsxFragmentFactory=r,t.localJsxFragmentNamespace=bb(r).escapedText}else{const e=ho(t);if(e)return t.localJsxNamespace=e}}return Yr||(Yr="React",A.jsxFactory?(qB(Zr=zI(A.jsxFactory,M),yo),Zr&&(Yr=bb(Zr).escapedText)):A.reactNamespace&&(Yr=yc(A.reactNamespace))),Zr||(Zr=YC.createQualifiedName(YC.createIdentifier(vc(Yr)),"createElement")),Yr}function ho(e){if(e.localJsxNamespace)return e.localJsxNamespace;const t=e.pragmas.get("jsx");if(t){const n=ot(t)?t[0]:t;if(e.localJsxFactory=zI(n.arguments.factory,M),qB(e.localJsxFactory,yo,ou),e.localJsxFactory)return e.localJsxNamespace=bb(e.localJsxFactory).escapedText}}function yo(e){return FT(e,-1,-1),ZB(e,yo,void 0)}function vo(e,t,n,...r){const i=xo(t,n,...r);return i.skippedOn=e,i}function bo(e,t,...n){return e?Rp(e,t,...n):cS(t,...n)}function xo(e,t,...n){const r=bo(e,t,...n);return ro.add(r),r}function So(e,t){e?ro.add(t):io.add({...t,category:2})}function ko(e,t,n,...r){if(t.pos<0||t.end<0){if(!e)return;const i=Sd(t);So(e,"message"in n?aS(i,0,0,n,...r):Up(i,n))}else So(e,"message"in n?Rp(t,n,...r):zp(Sd(t),t,n))}function To(e,t,n,...r){const i=xo(e,n,...r);return t&&fT(i,Rp(e,va.Did_you_forget_to_use_await)),i}function Co(e,t){const n=Array.isArray(e)?f(e,Yc):Yc(e);return n&&fT(t,Rp(n,va.The_declaration_was_marked_as_deprecated_here)),io.add(t),t}function wo(e){const t=is(e);return t&&p(e.declarations)>1?64&t.flags?Q(e.declarations,Do):x(e.declarations,Do):!!e.valueDeclaration&&Do(e.valueDeclaration)||p(e.declarations)&&x(e.declarations,Do)}function Do(e){return!!(536870912&xJ(e))}function Eo(e,t,n){return Co(t,Rp(e,va._0_is_deprecated,n))}function No(e,t,n){d++;const r=new s(33554432|e,t);return r.links=new FB,r.links.checkFlags=n||0,r}function Oo(e,t){const n=No(1,e);return n.links.type=t,n}function Mo(e,t){const n=No(4,e);return n.links.type=t,n}function Lo(e){let t=0;return 2&e&&(t|=111551),1&e&&(t|=111550),4&e&&(t|=0),8&e&&(t|=900095),16&e&&(t|=110991),32&e&&(t|=899503),64&e&&(t|=788872),256&e&&(t|=899327),128&e&&(t|=899967),512&e&&(t|=110735),8192&e&&(t|=103359),32768&e&&(t|=46015),65536&e&&(t|=78783),262144&e&&(t|=526824),524288&e&&(t|=788968),2097152&e&&(t|=2097152),t}function jo(e,t){t.mergeId||(t.mergeId=kB,kB++),ji[t.mergeId]=e}function Bo(e){const t=No(e.flags,e.escapedName);return t.declarations=e.declarations?e.declarations.slice():[],t.parent=e.parent,e.valueDeclaration&&(t.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(t.constEnumOnlyModule=!0),e.members&&(t.members=new Map(e.members)),e.exports&&(t.exports=new Map(e.exports)),jo(t,e),t}function Jo(e,t,n=!1){if(!(e.flags&Lo(t.flags))||67108864&(t.flags|e.flags)){if(t===e)return e;if(!(33554432&e.flags)){const n=Da(e);if(n===ht)return t;if(n.flags&Lo(t.flags)&&!(67108864&(t.flags|n.flags)))return r(e,t),t;e=Bo(n)}512&t.flags&&512&e.flags&&e.constEnumOnlyModule&&!t.constEnumOnlyModule&&(e.constEnumOnlyModule=!1),e.flags|=t.flags,t.valueDeclaration&&bg(e,t.valueDeclaration),pe(e.declarations,t.declarations),t.members&&(e.members||(e.members=ed()),qo(e.members,t.members,n)),t.exports&&(e.exports||(e.exports=ed()),qo(e.exports,t.exports,n)),n||jo(e,t)}else 1024&e.flags?e!==he&&xo(t.declarations&&Pc(t.declarations[0]),va.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,Us(e)):r(e,t);return e;function r(e,t){const n=!!(384&e.flags||384&t.flags),r=!!(2&e.flags||2&t.flags),o=n?va.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:r?va.Cannot_redeclare_block_scoped_variable_0:va.Duplicate_identifier_0,a=t.declarations&&Sd(t.declarations[0]),s=e.declarations&&Sd(e.declarations[0]),c=Td(a,A.checkJs),l=Td(s,A.checkJs),u=Us(t);if(a&&s&&$n&&!n&&a!==s){const n=-1===ca(a.path,s.path)?a:s,o=n===a?s:a,_=K($n,`${n.path}|${o.path}`,(()=>({firstFile:n,secondFile:o,conflictingSymbols:new Map}))),d=K(_.conflictingSymbols,u,(()=>({isBlockScoped:r,firstFileLocations:[],secondFileLocations:[]})));c||i(d.firstFileLocations,t),l||i(d.secondFileLocations,e)}else c||zo(t,o,u,e),l||zo(e,o,u,t)}function i(e,t){if(t.declarations)for(const n of t.declarations)fe(e,n)}}function zo(e,t,n,r){f(e.declarations,(e=>{$o(e,t,n,r.declarations)}))}function $o(e,t,n,r){const i=(Ym(e,!1)?eg(e):Pc(e))||e,o=function(e,t,...n){const r=e?Rp(e,t,...n):cS(t,...n);return ro.lookup(r)||(ro.add(r),r)}(i,t,n);for(const e of r||u){const t=(Ym(e,!1)?eg(e):Pc(e))||e;if(t===i)continue;o.relatedInformation=o.relatedInformation||[];const r=Rp(t,va._0_was_also_declared_here,n),a=Rp(t,va.and_here);p(o.relatedInformation)>=5||Q(o.relatedInformation,(e=>0===pS(e,a)||0===pS(e,r)))||fT(o,p(o.relatedInformation)?a:r)}}function qo(e,t,n=!1){t.forEach(((t,r)=>{const i=e.get(r);e.set(r,i?Jo(i,t,n):ts(t))}))}function Vo(e){var t,n,r;const i=e.parent;if((null==(t=i.symbol.declarations)?void 0:t[0])===i)if(pp(i))qo(de,i.symbol.exports);else{let t=Ba(e,e,33554432&e.parent.parent.flags?void 0:va.Invalid_module_name_in_augmentation_module_0_cannot_be_found,!0);if(!t)return;if(t=$a(t),1920&t.flags)if(Q(Vn,(e=>t===e.symbol))){const n=Jo(i.symbol,t,!0);Un||(Un=new Map),Un.set(e.text,n)}else{if((null==(n=t.exports)?void 0:n.get("__export"))&&(null==(r=i.symbol.exports)?void 0:r.size)){const e=__(t,"resolvedExports");for(const[n,r]of $e(i.symbol.exports.entries()))e.has(n)&&!t.exports.has(n)&&Jo(e.get(n),r)}Jo(t,i.symbol)}else xo(e,va.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,e.text)}else xn.assert(i.symbol.declarations.length>1)}function Uo(e){if(33554432&e.flags)return e.links;const t=OB(e);return Ri[t]??(Ri[t]=new FB)}function Wo(e){const t=IB(e);return Bi[t]||(Bi[t]=new AB)}function Ho(e,t,n){if(n){const r=ts(e.get(t));if(r){if(r.flags&n)return r;if(2097152&r.flags&&Pa(r)&n)return r}}}function Xo(t,n){const r=Sd(t),i=Sd(n),o=Np(t);if(r!==i){if(B&&(r.externalModuleIndicator||i.externalModuleIndicator)||!A.outFile||vv(n)||33554432&t.flags)return!0;if(a(n,t))return!0;const o=e.getSourceFiles();return o.indexOf(r)<=o.indexOf(i)}if(16777216&n.flags||vv(n)||Fw(n))return!0;if(t.pos<=n.pos&&(!uE(t)||!_m(n.parent)||t.initializer||t.exclamationToken)){if(208===t.kind){const e=Eh(n,208);return e?mc(e,KE)!==mc(t,KE)||t.pose===t?"quit":oE(e)?e.parent.parent===t:!J&&cE(e)&&(e.parent===t||dE(e.parent)&&e.parent.parent===t||yl(e.parent)&&e.parent.parent===t||uE(e.parent)&&e.parent.parent===t||sE(e.parent)&&e.parent.parent.parent===t)));return!e||!(J||!cE(e))&&!!mc(n,(t=>t===e?"quit":cu(t)&&!cm(t)))}return uE(t)?!s(t,n,!1):!rc(t,t.parent)||!($&&Zf(t)===Zf(n)&&a(n,t))}return!(!(281===n.parent.kind||277===n.parent.kind&&n.parent.isExportEquals)&&(277!==n.kind||!n.isExportEquals)&&(!a(n,t)||$&&Zf(t)&&(uE(t)||rc(t,t.parent))&&s(t,n,!0)));function a(e,t){return!!mc(e,(n=>{if(n===o)return"quit";if(cu(n))return!0;if(pE(n))return t.pos=r&&o.pos<=i){const n=YC.createPropertyAccessExpression(YC.createThis(),e);if(OT(n.expression,n),OT(n,o),n.flowNode=o.returnFlowNode,!ak(XD(n,t,XT(t))))return!0}return!1}(e,$l(ns(t)),F(t.parent.members,pE),t.parent.pos,n.pos))return!0}}else if(172!==t.kind||Jv(t)||Zf(e)!==Zf(t))return!0;return!1}))}function s(e,t,n){return!(t.end>e.end)&&void 0===mc(t,(t=>{if(t===e)return"quit";switch(t.kind){case 219:return!0;case 172:return!n||!(uE(e)&&t.parent===e.parent||rc(e,e.parent)&&t.parent===e.parent.parent)||"quit";case 241:switch(t.parent.kind){case 177:case 174:case 178:return!0;default:return!1}default:return!1}}))}}function Qo(e){return Wo(e).declarationRequiresScopeChange}function Yo(e,t){Wo(e).declarationRequiresScopeChange=t}function Zo(e,t,n){return t?fT(e,Rp(t,281===t.kind||278===t.kind||280===t.kind?va._0_was_exported_here:va._0_was_imported_here,n)):e}function ea(e){return st(e)?vc(e):Ap(e)}function ta(e,t,n){if(!qD(e)||e.escapedText!==t||NR(e)||vv(e))return!1;const r=rm(e,!1,!1);let i=r;for(;i;){if(gu(i.parent)){const o=ns(i.parent);if(!o)break;if(Jp($l(o),t))return xo(e,va.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,ea(n),Us(o)),!0;if(i===r&&!Jv(i)&&Jp(ju(o).thisType,t))return xo(e,va.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,ea(n)),!0}i=i.parent}return!1}function na(e){const t=ra(e);return!(!t||!Ma(t,64,!0)||(xo(e,va.Cannot_extend_an_interface_0_Did_you_mean_implements,Gd(t)),0))}function ra(e){switch(e.kind){case 80:case 211:return e.parent?ra(e.parent):void 0;case 233:if(vb(e.expression))return e.expression;default:return}}function ia(e){return"any"===e||"string"===e||"number"===e||"boolean"===e||"never"===e||"unknown"===e}function oa(e,t,n){return!!t&&!!mc(e,(e=>e===t||!!(e===n||cu(e)&&(!cm(e)||3&Jh(e)))&&"quit"))}function aa(e){switch(e.kind){case 271:return e;case 273:return e.parent;case 274:return e.parent.parent;case 276:return e.parent.parent.parent;default:return}}function sa(e){return e.declarations&&k(e.declarations,la)}function la(e){return 271===e.kind||270===e.kind||273===e.kind&&!!e.name||274===e.kind||280===e.kind||276===e.kind||281===e.kind||277===e.kind&&vh(e)||uP(e)&&2===ag(e)&&vh(e)||Ox(e)&&uP(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind&&ua(e.parent.right)||304===e.kind||303===e.kind&&ua(e.initializer)||260===e.kind&&$m(e)||208===e.kind&&$m(e.parent.parent)}function ua(e){return yh(e)||nP(e)&&rO(e)}function _a(e,t,n,r){const i=e.exports.get("export="),o=i?Jp($l(i),t,!0):e.exports.get(t),a=Da(o,r);return Na(n,o,a,!1),a}function da(e){return mN(e)&&!e.isExportEquals||Bv(e,2048)||yN(e)||dN(e)}function pa(t){return $_(t)?e.getModeForUsageLocation(Sd(t),t):void 0}function fa(e,t){return 99===e&&1===t}function ma(e){return 99===pa(e)&&Wt(e.text,".json")}function ga(e,t,n,r){const i=e&&pa(r);if(e&&void 0!==i&&100<=B&&B<=199){const t=fa(i,e.impliedNodeFormat);if(99===i||t)return t}if(!V)return!1;if(!e||e.isDeclarationFile){const e=_a(t,"default",void 0,!0);return!(e&&Q(e.declarations,da)||_a(t,yc("__esModule"),void 0,n))}return Im(e)?"object"!=typeof e.externalModuleIndicator&&!_a(t,yc("__esModule"),void 0,n):Ua(t)}function ha(e,t,n){var r;let i;i=_p(e)?e:_a(e,"default",t,n);const o=null==(r=e.declarations)?void 0:r.find(qN),a=ya(t);if(!a)return i;const s=ma(a),c=ga(o,e,n,a);if(i||c||s){if(c||s){const r=$a(e,n)||Da(e,n);return Na(t,e,r,!1),r}}else if(Ua(e)&&!V){const n=B>=5?"allowSyntheticDefaultImports":"esModuleInterop",r=e.exports.get("export=").valueDeclaration,i=xo(t.name,va.Module_0_can_only_be_default_imported_using_the_1_flag,Us(e),n);r&&fT(i,Rp(r,va.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,n))}else oN(t)?function(e,t){var n,r,i;if(null==(n=e.exports)?void 0:n.has(t.symbol.escapedName))xo(t.name,va.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,Us(e),Us(t.symbol));else{const n=xo(t.name,va.Module_0_has_no_default_export,Us(e)),o=null==(r=e.exports)?void 0:r.get("__export");if(o){const e=null==(i=o.declarations)?void 0:i.find((e=>{var t,n;return!!(gN(e)&&e.moduleSpecifier&&(null==(n=null==(t=ja(e,e.moduleSpecifier))?void 0:t.exports)?void 0:n.has("default")))}));e&&fT(n,Rp(e,va.export_Asterisk_does_not_re_export_a_default))}}}(e,t):xa(e,e,t,Vl(t)&&t.propertyName||t.name);return Na(t,i,void 0,!1),i}function ya(e){switch(e.kind){case 273:return e.parent.moduleSpecifier;case 271:return SN(e.moduleReference)?e.moduleReference.expression:void 0;case 274:case 281:return e.parent.parent.moduleSpecifier;case 276:return e.parent.parent.parent.moduleSpecifier;default:return xn.assertNever(e)}}function ba(e,t,n=!1){var r;const i=Nm(e)||e.moduleSpecifier,o=ja(e,i),a=!GE(t)&&t.propertyName||t.name;if(!qD(a))return;const s=qa(o,i,!1,"default"===a.escapedText&&V);if(s&&a.escapedText){if(_p(o))return o;let c;c=o&&o.exports&&o.exports.get("export=")?Jp($l(s),a.escapedText,!0):function(e,t){if(3&e.flags){const n=e.valueDeclaration.type;if(n)return Da(Jp(Sx(n),t))}}(s,a.escapedText),c=Da(c,n);let l=function(e,t,n,r){var i;if(1536&e.flags){const o=Ga(e).get(t.escapedText),a=Da(o,r);return Na(n,o,a,!1,null==(i=Uo(e).typeOnlyExportStarMap)?void 0:i.get(t.escapedText),t.escapedText),a}}(s,a,t,n);if(void 0===l&&"default"===a.escapedText){const e=null==(r=o.declarations)?void 0:r.find(qN);(ma(i)||ga(e,o,n,i))&&(l=$a(o,n)||Da(o,n))}const u=l&&c&&l!==c?function(e,t){if(e===ht&&t===ht)return ht;if(790504&e.flags)return e;const n=No(e.flags|t.flags,e.escapedName);return xn.assert(e.declarations||t.declarations),n.declarations=ne(Z(e.declarations,t.declarations),wt),n.parent=e.parent||t.parent,e.valueDeclaration&&(n.valueDeclaration=e.valueDeclaration),t.members&&(n.members=new Map(t.members)),e.exports&&(n.exports=new Map(e.exports)),n}(c,l):l||c;return u||xa(o,s,e,a),u}}function xa(e,t,n,r){var i;const o=Oa(e,n),a=Ap(r),s=HA(r,t);if(void 0!==s){const e=Us(s),t=xo(r,va._0_has_no_exported_member_named_1_Did_you_mean_2,o,a,e);s.valueDeclaration&&fT(t,Rp(s.valueDeclaration,va._0_is_declared_here,e))}else(null==(i=e.exports)?void 0:i.has("default"))?xo(r,va.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,o,a):function(e,t,n,r,i){var o,a;const s=null==(a=null==(o=lt(r.valueDeclaration,f_))?void 0:o.locals)?void 0:a.get(t.escapedText),c=r.exports;if(s){const r=null==c?void 0:c.get("export=");if(r)us(r,s)?function(e,t,n,r){B>=5?xo(t,FS(A)?va._0_can_only_be_imported_by_using_a_default_import:va._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n):Mm(e)?xo(t,FS(A)?va._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:va._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n):xo(t,FS(A)?va._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:va._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n,n,r)}(e,t,n,i):xo(t,va.Module_0_has_no_exported_member_1,i,n);else{const e=c?S(yf(c),(e=>!!us(e,s))):void 0,r=e?xo(t,va.Module_0_declares_1_locally_but_it_is_exported_as_2,i,n,Us(e)):xo(t,va.Module_0_declares_1_locally_but_it_is_not_exported,i,n);s.declarations&&fT(r,...O(s.declarations,((e,t)=>Rp(e,0===t?va._0_is_declared_here:va.and_here,n))))}}else xo(t,va.Module_0_has_no_exported_member_1,i,n)}(n,r,a,e,o)}function Sa(e){if(KP(e)&&e.initializer&&GE(e.initializer))return e.initializer}function ka(e,t,n){if("default"===bc(e.propertyName||e.name)){const t=ya(e),r=t&&ja(e,t);if(r)return ha(r,e,!!n)}const r=e.parent.parent.moduleSpecifier?ba(e.parent.parent,e,n):Ma(e.propertyName||e.name,t,!1,n);return Na(e,void 0,r,!1),r}function Ta(e,t){if(mP(e))return DM(e).symbol;if(!ou(e)&&!vb(e))return;return Ma(e,901119,!0,t)||(DM(e),Wo(e).resolvedSymbol)}function Ca(e,t=!1){switch(e.kind){case 271:case 260:return function(e,t){const n=Sa(e);if(n){const e=jx(n.expression).arguments[0];return qD(n.name)?Da(Jp(zf(e),n.name.escapedText)):void 0}if(KP(e)||283===e.moduleReference.kind){const t=ja(e,Nm(e)||Pm(e)),n=$a(t);return Na(e,t,n,!1),n}const r=Ia(e.moduleReference,t);return function(e,t){if(Na(e,void 0,t,!1)&&!e.isTypeOnly){const t=Aa(ns(e)),n=281===t.kind||278===t.kind,r=n?va.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:va.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type,i=n?va._0_was_exported_here:va._0_was_imported_here,o=278===t.kind?"*":vc(t.name.escapedText);fT(xo(e.moduleReference,r),Rp(t,i,o))}}(e,r),r}(e,t);case 273:return function(e,t){const n=ja(e,e.parent.moduleSpecifier);if(n)return ha(n,e,t)}(e,t);case 274:return function(e,t){const n=e.parent.parent.moduleSpecifier,r=ja(e,n),i=qa(r,n,t,!1);return Na(e,r,i,!1),i}(e,t);case 280:return function(e,t){const n=e.parent.moduleSpecifier,r=n&&ja(e,n),i=n&&qa(r,n,t,!1);return Na(e,r,i,!1),i}(e,t);case 276:case 208:return function(e,t){if(fN(e)&&"default"===bc(e.propertyName||e.name)){const n=ya(e),r=n&&ja(e,n);if(r)return ha(r,e,t)}const n=KE(e)?sy(e):e.parent.parent.parent,r=Sa(n),i=ba(n,r||e,t),o=e.propertyName||e.name;return r&&i&&qD(o)?Da(Jp($l(i),o.escapedText),t):(Na(e,void 0,i,!1),i)}(e,t);case 281:return ka(e,901119,t);case 277:case 226:return function(e,t){const n=Ta(mN(e)?e.expression:e.right,t);return Na(e,void 0,n,!1),n}(e,t);case 270:return function(e,t){if(p_(e.parent)){const n=$a(e.parent.symbol,t);return Na(e,void 0,n,!1),n}}(e,t);case 304:return Ma(e.name,901119,!0,t);case 303:return Ta(e.initializer,t);case 212:case 211:return function(e,t){if(uP(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind)return Ta(e.parent.right,t)}(e,t);default:return xn.fail()}}function wa(e,t=901119){return!(!e||2097152!=(e.flags&(2097152|t))&&!(2097152&e.flags&&67108864&e.flags))}function Da(e,t){return!t&&wa(e)?Ea(e):e}function Ea(e){xn.assert(0!=(2097152&e.flags),"Should only get Alias here.");const t=Uo(e);if(t.aliasTarget)t.aliasTarget===yt&&(t.aliasTarget=ht);else{t.aliasTarget=yt;const n=sa(e);if(!n)return xn.fail();const r=Ca(n);t.aliasTarget===yt?t.aliasTarget=r||ht:xo(n,va.Circular_definition_of_import_alias_0,Us(e))}return t.aliasTarget}function Pa(e,t,n){const r=t&&Aa(e),i=r&&gN(r),o=r&&(i?ja(r.moduleSpecifier,r.moduleSpecifier,!0):Ea(r.symbol)),a=i&&o?Qa(o):void 0;let s,c=n?0:e.flags;for(;2097152&e.flags;){const t=_s(Ea(e));if(!i&&t===o||(null==a?void 0:a.get(t.escapedName))===t)break;if(t===ht)return-1;if(t===e||(null==s?void 0:s.has(t)))break;2097152&t.flags&&(s?s.add(t):s=new Set([e,t])),c|=t.flags,e=t}return c}function Na(e,t,n,r,i,o){if(!e||GE(e))return!1;const a=ns(e);if(Wl(e))return Uo(a).typeOnlyDeclaration=e,!0;if(i){const e=Uo(a);return e.typeOnlyDeclaration=i,a.escapedName!==o&&(e.typeOnlyExportStarName=o),!0}const s=Uo(a);return Fa(s,t,r)||Fa(s,n,r)}function Fa(e,t,n){var r;if(t&&(void 0===e.typeOnlyDeclaration||n&&!1===e.typeOnlyDeclaration)){const n=(null==(r=t.exports)?void 0:r.get("export="))??t,i=n.declarations&&S(n.declarations,Wl);e.typeOnlyDeclaration=i??Uo(n).typeOnlyDeclaration??!1}return!!e.typeOnlyDeclaration}function Aa(e,t){var n;if(!(2097152&e.flags))return;const r=Uo(e);if(void 0===r.typeOnlyDeclaration){r.typeOnlyDeclaration=!1;const t=Da(e);Na(null==(n=e.declarations)?void 0:n[0],sa(e)&&jF(e),t,!0)}return void 0===t?r.typeOnlyDeclaration||void 0:r.typeOnlyDeclaration&&Pa(278===r.typeOnlyDeclaration.kind?Da(Qa(r.typeOnlyDeclaration.symbol.parent).get(r.typeOnlyExportStarName||e.escapedName)):Ea(r.typeOnlyDeclaration.symbol))&t?r.typeOnlyDeclaration:void 0}function Ia(e,t){return 80===e.kind&&Cb(e)&&(e=e.parent),80===e.kind||166===e.parent.kind?Ma(e,1920,!1,t):(xn.assert(271===e.parent.kind),Ma(e,901119,!1,t))}function Oa(e,t){return e.parent?Oa(e.parent,t)+"."+Us(e):Us(e,t,void 0,36)}function Ma(e,t,n,r,i){if(Nd(e))return;const o=1920|(Mm(e)?111551&t:0);let a;if(80===e.kind){const r=t===o||ly(e)?va.Cannot_find_namespace_0:Pw(bb(e)),s=Mm(e)&&!ly(e)?function(e,t){if(Nh(e.parent)){const n=function(e){if(mc(e,(e=>P_(e)||16777216&e.flags?Fg(e):"quit")))return;const t=Wg(e);if(t&&NP(t)&&yg(t.expression)){const e=ns(t.expression.left);if(e)return La(e)}if(t&&nP(t)&&yg(t.parent)&&NP(t.parent.parent)){const e=ns(t.parent.left);if(e)return La(e)}if(t&&($f(t)||BN(t))&&uP(t.parent.parent)&&6===ag(t.parent.parent)){const e=ns(t.parent.parent.left);if(e)return La(e)}const n=Kg(e);if(n&&cu(n)){const e=ns(n);return e&&e.valueDeclaration}}(e.parent);if(n)return je(n,e,t,void 0,!0)}}(e,t):void 0;if(a=ts(je(i||e,e,t,n||s?void 0:r,!0,!1)),!a)return ts(s)}else if(166===e.kind||211===e.kind){const r=166===e.kind?e.left:e.expression,s=166===e.kind?e.right:e.name;let c=Ma(r,o,n,!1,i);if(!c||Nd(s))return;if(c===ht)return c;if(c.valueDeclaration&&Mm(c.valueDeclaration)&&100!==ES(A)&&KP(c.valueDeclaration)&&c.valueDeclaration.initializer&&dO(c.valueDeclaration.initializer)){const e=c.valueDeclaration.initializer.arguments[0],t=ja(e,e);if(t){const e=$a(t);e&&(c=e)}}if(a=ts(Ho(Ga(c),s.escapedText,t)),!a&&2097152&c.flags&&(a=ts(Ho(Ga(Ea(c)),s.escapedText,t))),!a){if(!n){const n=Oa(c),r=Ap(s),i=HA(s,c);if(i)return void xo(s,va._0_has_no_exported_member_named_1_Did_you_mean_2,n,r,Us(i));const o=iE(e)&&function(e){for(;iE(e.parent);)e=e.parent;return e}(e),a=Kn&&788968&t&&o&&!oP(o.parent)&&function(e){let t=bb(e),n=je(t,t,111551,void 0,!0);if(n){for(;iE(t.parent);){if(n=Jp($l(n),t.parent.right.escapedText),!n)return;t=t.parent}return n}}(o);if(a)return void xo(o,va._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,jp(o));if(1920&t&&iE(e.parent)){const t=ts(Ho(Ga(c),s.escapedText,788968));if(t)return void xo(e.parent.right,va.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,Us(t),vc(e.parent.right.escapedText))}xo(s,va.Namespace_0_has_no_exported_member_1,n,r)}return}}else xn.assertNever(e,"Unknown entity name kind.");return!ly(e)&&ou(e)&&(2097152&a.flags||277===e.parent.kind)&&Na(hh(e),a,void 0,!0),a.flags&t||r?a:Ea(a)}function La(e){const t=e.parent.valueDeclaration;if(t)return(Hm(t)?Qm(t):j_(t)?Xm(t):void 0)||t}function ja(e,t,n){const r=1===ES(A)?va.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:va.Cannot_find_module_0_or_its_corresponding_type_declarations;return Ba(e,t,n?void 0:r)}function Ba(e,t,n,r=!1){return $_(t)?Ja(e,t.text,n,t,r):void 0}function Ja(t,n,r,i,o=!1){var a,s,c,l,u,_,d,p,f,m,g;an(n,"@types/")&&xo(i,va.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,sn(n,"@types/"),n);const h=vf(n,!0);if(h)return h;const y=Sd(t),v=$_(t)?t:(null==(a=ZP(t)?t:t.parent&&ZP(t.parent)&&t.parent.name===t?t.parent:void 0)?void 0:a.name)||(null==(s=df(t)?t:void 0)?void 0:s.argument.literal)||(Mm(t)&&AF(t)?t.moduleSpecifier:void 0)||(KP(t)&&t.initializer&&Jm(t.initializer,!0)?t.initializer.arguments[0]:void 0)||(null==(c=mc(t,uf))?void 0:c.arguments[0])||(null==(l=mc(t,iN))?void 0:l.moduleSpecifier)||(null==(u=mc(t,Em))?void 0:u.moduleReference.expression)||(null==(_=mc(t,gN))?void 0:_.moduleSpecifier),b=v&&$_(v)?e.getModeForUsageLocation(y,v):y.impliedNodeFormat,x=ES(A),S=null==(d=e.getResolvedModule(y,n,b))?void 0:d.resolvedModule,k=S&&SV(A,S,y),T=S&&(!k||k===va.Module_0_was_resolved_to_1_but_jsx_is_not_set)&&e.getSourceFile(S.resolvedFileName);if(T){if(k&&xo(i,k,n,S.resolvedFileName),S.resolvedUsingTsExtension&&QI(n)){const e=(null==(p=mc(t,iN))?void 0:p.importClause)||mc(t,_n(rN,gN));(e&&!e.isTypeOnly||mc(t,uf))&&xo(i,va.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead,function(e){const t=eT(n,e);if($S(B)||99===b){const r=QI(n)&&xR(A);return t+(".mts"===e||".d.mts"===e?r?".mts":".mjs":".cts"===e||".d.mts"===e?r?".cts":".cjs":r?".ts":".js")}return t}(xn.checkDefined(Ib(n))))}else if(S.resolvedUsingTsExtension&&!xR(A,y.fileName)){const e=(null==(f=mc(t,iN))?void 0:f.importClause)||mc(t,_n(rN,gN));if(!(null==e?void 0:e.isTypeOnly)&&!mc(t,zE)){const e=xn.checkDefined(Ib(n));xo(i,va.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled,e)}}if(T.symbol){if(S.isExternalLibraryImport&&!aT(S.extension)&&za(!1,i,y,b,S,n),3===x||99===x){const e=1===y.impliedNodeFormat&&!mc(t,uf)||!!mc(t,rN),r=mc(t,(e=>zE(e)||gN(e)||iN(e)||AF(e)));if(e&&99===T.impliedNodeFormat&&!yC(r))if(mc(t,rN))xo(i,va.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead,n);else{let e;const t=lT(y.fileName);if(".ts"===t||".js"===t||".tsx"===t||".jsx"===t){const n=y.packageJsonScope,r=".ts"===t?".mts":".js"===t?".mjs":void 0;e=n&&!n.contents.packageJsonContent.type?r?uS(void 0,va.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1,r,Ko(n.packageDirectory,"package.json")):uS(void 0,va.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0,Ko(n.packageDirectory,"package.json")):r?uS(void 0,va.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module,r):uS(void 0,va.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module)}ro.add(zp(Sd(i),i,uS(e,va.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead,n)))}}return ts(T.symbol)}r&&xo(i,va.File_0_is_not_a_module,T.fileName)}else{if(Vn){const e=on(Vn,(e=>e.pattern),n);if(e){const t=Un&&Un.get(n);return ts(t||e.symbol)}}if((!S||aT(S.extension)||void 0!==k)&&k!==va.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type){if(r){if(S){const t=e.getProjectReferenceRedirect(S.resolvedFileName);if(t)return void xo(i,va.Output_file_0_has_not_been_built_from_source_file_1,t,S.resolvedFileName)}if(k)xo(i,k,n,S.resolvedFileName);else{const t=Po(n)&&!Fo(n),o=3===x||99===x;if(!MS(A)&&Ao(n,".json")&&1!==x&&qS(A))xo(i,va.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,n);else if(99===b&&o&&t){const t=Go(n,Ro(y.path)),r=null==(m=po.find((([n,r])=>e.fileExists(t+n))))?void 0:m[1];r?xo(i,va.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0,n+r):xo(i,va.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path)}else(null==(g=e.getResolvedModule(y,n,b))?void 0:g.alternateResult)?ko(!0,i,uS(gd(y,e,n,b,n),r,n)):xo(i,r,n)}}return}o?xo(i,va.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented,n,S.resolvedFileName):za(Y&&!!r,i,y,b,S,n)}}function za(t,n,r,i,{packageId:o,resolvedFileName:a},s){let c;!Os(s)&&o&&(c=gd(r,e,s,i,o.name)),ko(t,n,uS(c,va.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,s,a))}function $a(e,t){if(null==e?void 0:e.exports){const n=function(e,t){if(!e||e===ht||e===t||1===t.exports.size||2097152&e.flags)return e;const n=Uo(e);if(n.cjsExportMerged)return n.cjsExportMerged;const r=33554432&e.flags?e:Bo(e);return r.flags=512|r.flags,void 0===r.exports&&(r.exports=ed()),t.exports.forEach(((e,t)=>{"export="!==t&&r.exports.set(t,r.exports.has(t)?Jo(r.exports.get(t),e):e)})),r===e&&(Uo(r).resolvedExports=void 0,Uo(r).resolvedMembers=void 0),Uo(r).cjsExportMerged=r,n.cjsExportMerged=r}(ts(Da(e.exports.get("export="),t)),ts(e));return ts(n)||e}}function qa(e,t,n,r){var i;const o=$a(e,n);if(!n&&o){if(!(r||1539&o.flags||Y_(o,307))){const e=B>=5?"allowSyntheticDefaultImports":"esModuleInterop";return xo(t,va.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,e),o}const n=t.parent;if(iN(n)&&wg(n)||uf(n)){const t=uf(n)?n.arguments[0]:n.moduleSpecifier,r=$l(o),a=uO(r,o,e,t);if(a)return Va(o,a,n);const s=null==(i=null==e?void 0:e.declarations)?void 0:i.find(qN),c=s&&fa(pa(t),s.impliedNodeFormat);if(FS(A)||c){let i=qp(r,0);if(i&&i.length||(i=qp(r,1)),i&&i.length||Jp(r,"default",!0)||c)return Va(o,3670016&r.flags?_O(r,o,e,t):lO(o,o.parent),n)}}}return o}function Va(e,t,n){const r=No(e.flags,e.escapedName);r.declarations=e.declarations?e.declarations.slice():[],r.parent=e.parent,r.links.target=e,r.links.originatingImport=n,e.valueDeclaration&&(r.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(r.constEnumOnlyModule=!0),e.members&&(r.members=new Map(e.members)),e.exports&&(r.exports=new Map(e.exports));const i=Od(t);return r.links.type=ks(r,i.members,u,u,i.indexInfos),r}function Ua(e){return void 0!==e.exports.get("export=")}function Ka(e){return yf(Qa(e))}function Wa(e,t){const n=Qa(t);if(n)return n.get(e)}function Ha(e){return!(402784252&e.flags||1&wx(e)||qk(e)||PT(e))}function Ga(e){return 6256&e.flags?__(e,"resolvedExports"):1536&e.flags?Qa(e):e.exports||w}function Qa(e){const t=Uo(e);if(!t.resolvedExports){const{exports:n,typeOnlyExportStarMap:r}=es(e);t.resolvedExports=n,t.typeOnlyExportStarMap=r}return t.resolvedExports}function Ya(e,t,n,r){t&&t.forEach(((t,i)=>{if("default"===i)return;const o=e.get(i);if(o){if(n&&r&&o&&Da(o)!==Da(t)){const e=n.get(i);e.exportsWithDuplicate?e.exportsWithDuplicate.push(r):e.exportsWithDuplicate=[r]}}else e.set(i,t),n&&r&&n.set(i,{specifierText:Gd(r.moduleSpecifier)})}))}function es(e){const t=[];let n;const r=new Set,i=function e(i,o,a){if(!a&&(null==i?void 0:i.exports)&&i.exports.forEach(((e,t)=>r.add(t))),!(i&&i.exports&&fe(t,i)))return;const s=new Map(i.exports),c=i.exports.get("__export");if(c){const t=ed(),n=new Map;if(c.declarations)for(const r of c.declarations){Ya(t,e(ja(r,r.moduleSpecifier),r,a||r.isTypeOnly),n,r)}n.forEach((({exportsWithDuplicate:e},t)=>{if("export="!==t&&e&&e.length&&!s.has(t))for(const r of e)ro.add(Rp(r,va.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,n.get(t).specifierText,vc(t)))})),Ya(s,t)}return(null==o?void 0:o.isTypeOnly)&&(n??(n=new Map),s.forEach(((e,t)=>n.set(t,o)))),s}(e=$a(e))||w;return n&&r.forEach((e=>n.delete(e))),{exports:i,typeOnlyExportStarMap:n}}function ts(e){let t;return e&&e.mergeId&&(t=ji[e.mergeId])?t:e}function ns(e){return ts(e.symbol&&g_(e.symbol))}function rs(e){return p_(e)?ns(e):void 0}function is(e){return ts(e.parent&&g_(e.parent))}function os(e){var t,n;return(219===(null==(t=e.valueDeclaration)?void 0:t.kind)||218===(null==(n=e.valueDeclaration)?void 0:n.kind))&&rs(e.valueDeclaration.parent)||e}function ss(t,n,r){const i=is(t);if(i&&!(262144&t.flags))return l(i);const o=q(t.declarations,(e=>{if(!sp(e)&&e.parent){if(zs(e.parent))return ns(e.parent);if(eN(e.parent)&&e.parent.parent&&$a(ns(e.parent.parent))===t)return ns(e.parent.parent)}if(mP(e)&&uP(e.parent)&&64===e.parent.operatorToken.kind&&Ox(e.parent.left)&&vb(e.parent.left.expression))return og(e.parent.left)||rg(e.parent.left.expression)?ns(Sd(e)):(DM(e.parent.left.expression),Wo(e.parent.left.expression).resolvedSymbol)}));if(!p(o))return;const a=q(o,(e=>ls(e,t)?e:void 0));let s=[],c=[];for(const e of a){const[t,...n]=l(e);s=ue(s,t),c=pe(c,n)}return Z(s,c);function l(i){const o=q(i.declarations,_),a=n&&function(t,n){const r=Sd(n),i=IB(r),o=Uo(t);let a;if(o.extendedContainersByFile&&(a=o.extendedContainersByFile.get(i)))return a;if(r&&r.imports){for(const e of r.imports){if(ly(e))continue;const r=ja(n,e,!0);r&&ls(r,t)&&(a=ue(a,r))}if(p(a))return(o.extendedContainersByFile||(o.extendedContainersByFile=new Map)).set(i,a),a}if(o.extendedContainers)return o.extendedContainers;const s=e.getSourceFiles();for(const e of s){if(!qI(e))continue;const n=ns(e);ls(n,t)&&(a=ue(a,n))}return o.extendedContainers=a||u}(t,n),s=function(e,t){const n=!!p(e.declarations)&&Te(e.declarations);if(111551&t&&n&&n.parent&&KP(n.parent)&&(HE(n)&&n===n.parent.initializer||CE(n)&&n===n.parent.type))return ns(n.parent)}(i,r);if(n&&i.flags&Ds(r)&&Es(i,n,1920,!1))return ue(Z(Z([i],o),a),s);const c=!(i.flags&Ds(r))&&788968&i.flags&&524288&ju(i).flags&&111551===r?ws(n,(e=>ld(e,(e=>{if(e.flags&Ds(r)&&$l(e)===ju(i))return e})))):void 0;let l=c?[c,...o,i]:[...o,i];return l=ue(l,s),l=pe(l,a),l}function _(e){return i&&cs(e,i)}}function cs(e,t){const n=Ls(e),r=n&&n.exports&&n.exports.get("export=");return r&&us(r,t)?n:void 0}function ls(e,t){if(e===is(t))return t;const n=e.exports&&e.exports.get("export=");if(n&&us(n,t))return e;const r=Ga(e),i=r.get(t.escapedName);return i&&us(i,t)?i:ld(r,(e=>{if(us(e,t))return e}))}function us(e,t){if(ts(Da(ts(e)))===ts(Da(ts(t))))return e}function _s(e){return ts(e&&0!=(1048576&e.flags)&&e.exportSymbol||e)}function ds(e,t){return!!(111551&e.flags||2097152&e.flags&&111551&Pa(e,!t))}function ps(e){var t;const n=new c(Be,e);return _++,n.id=_,null==(t=or)||t.recordType(n),n}function fs(e,t){const n=ps(e);return n.symbol=t,n}function ms(e){return new c(Be,e)}function gs(e,t,n=0,r){!function(e,t){const n=`${e},${t??""}`;xt.has(n)&&xn.fail(`Duplicate intrinsic type name ${e}${t?` (${t})`:""}; you may need to pass a name to createIntrinsicType.`),xt.add(n)}(t,r);const i=ps(e);return i.intrinsicName=t,i.debugIntrinsicName=r,i.objectFlags=52953088|n,i}function hs(e,t){const n=fs(524288,t);return n.objectFlags=e,n.members=void 0,n.properties=void 0,n.callSignatures=void 0,n.constructSignatures=void 0,n.indexInfos=void 0,n}function ys(e){return fs(262144,e)}function vs(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95!==e.charCodeAt(2)&&64!==e.charCodeAt(2)&&35!==e.charCodeAt(2)}function bs(e){let t;return e.forEach(((e,n)=>{xs(e,n)&&(t||(t=[])).push(e)})),t||u}function xs(e,t){return!vs(t)&&ds(e)}function Ss(e,t,n,r,i){const o=e;return o.members=t,o.properties=u,o.callSignatures=n,o.constructSignatures=r,o.indexInfos=i,t!==w&&(o.properties=bs(t)),o}function ks(e,t,n,r,i){return Ss(hs(16,e),t,n,r,i)}function ws(e,t){let n;for(let r=e;r;r=r.parent){if(f_(r)&&r.locals&&!Yp(r)&&(n=t(r.locals,void 0,!0,r)))return n;switch(r.kind){case 307:if(!Zp(r))break;case 267:const e=ns(r);if(n=t((null==e?void 0:e.exports)||w,void 0,!0,r))return n;break;case 263:case 231:case 264:let i;if((ns(r).members||w).forEach(((e,t)=>{788968&e.flags&&(i||(i=ed())).set(t,e)})),i&&(n=t(i,void 0,!1,r)))return n}}return t(de,void 0,!0)}function Ds(e){return 111551===e?111551:1920}function Es(e,t,n,r,i=new Map){if(!e||function(e){if(e.declarations&&e.declarations.length){for(const t of e.declarations)switch(t.kind){case 172:case 174:case 177:case 178:continue;default:return!1}return!0}return!1}(e))return;const o=Uo(e),a=o.accessibleChainCache||(o.accessibleChainCache=new Map),s=ws(t,((e,t,n,r)=>r)),c=`${r?0:1}|${s&&IB(s)}|${n}`;if(a.has(c))return a.get(c);const l=OB(e);let u=i.get(l);u||i.set(l,u=[]);const _=ws(t,d);return a.set(c,_),_;function d(n,i,o){if(!fe(u,n))return;const a=function(n,i,o){return f(n.get(e.escapedName),void 0,i)?[e]:ld(n,(n=>{if(2097152&n.flags&&"export="!==n.escapedName&&"default"!==n.escapedName&&!(Ex(n)&&t&&qI(Sd(t)))&&(!r||Q(n.declarations,Em))&&(!o||!Q(n.declarations,Dm))&&(i||!Y_(n,281))){const e=m(n,Ea(n),i);if(e)return e}if(n.escapedName===e.escapedName&&n.exportSymbol&&f(ts(n.exportSymbol),void 0,i))return[e]}))||(n===de?m(he,he,i):void 0)}(n,i,o);return u.pop(),a}function p(e,n){return!Ps(e,t,n)||!!Es(e.parent,t,Ds(n),r,i)}function f(t,r,i){return(e===(r||t)||ts(e)===ts(r||t))&&!Q(t.declarations,zs)&&(i||p(ts(t),n))}function m(e,t,r){if(f(e,t,r))return[e];const i=Ga(t),o=i&&d(i,!0);return o&&p(e,Ds(n))?[e].concat(o):void 0}}function Ps(e,t,n){let r=!1;return ws(t,(t=>{let i=ts(t.get(e.escapedName));if(!i)return!1;if(i===e)return!0;const o=2097152&i.flags&&!Y_(i,281);return i=o?Ea(i):i,!!((o?Pa(i):i.flags)&n)&&(r=!0,!0)})),r}function Ns(e,t){return 0===Ms(e,t,111551,!1,!0).accessibility}function Fs(e,t,n){return 0===Ms(e,t,n,!1,!1).accessibility}function As(e,t,n,r,i,o){if(!p(e))return;let a,s=!1;for(const c of e){const e=Es(c,t,r,!1);if(e){a=c;const t=$s(e[0],i);if(t)return t}if(o&&Q(c.declarations,zs)){if(i){s=!0;continue}return{accessibility:0}}const l=As(ss(c,t,r),t,n,n===c?Ds(r):r,i,o);if(l)return l}return s?{accessibility:0}:a?{accessibility:1,errorSymbolName:Us(n,t,r),errorModuleName:a!==n?Us(a,t,1920):void 0}:void 0}function Is(e,t,n,r){return Ms(e,t,n,r,!0)}function Ms(e,t,n,r,i){if(e&&t){const o=As([e],t,e,n,r,i);if(o)return o;const a=f(e.declarations,Ls);return a&&a!==Ls(t)?{accessibility:2,errorSymbolName:Us(e,t,n),errorModuleName:Us(a),errorNode:Mm(t)?t:void 0}:{accessibility:1,errorSymbolName:Us(e,t,n)}}return{accessibility:0}}function Ls(e){const t=mc(e,Rs);return t&&ns(t)}function Rs(e){return sp(e)||307===e.kind&&Zp(e)}function zs(e){return cp(e)||307===e.kind&&Zp(e)}function $s(e,t){let n;if(x(F(e.declarations,(e=>80!==e.kind)),(function(t){var n,i;if(!sc(t)){const o=aa(t);if(o&&!Bv(o,32)&&sc(o.parent))return r(t,o);if(KP(t)&&EP(t.parent.parent)&&!Bv(t.parent.parent,32)&&sc(t.parent.parent.parent))return r(t,t.parent.parent);if(wp(t)&&!Bv(t,32)&&sc(t.parent))return r(t,t);if(KE(t)){if(2097152&e.flags&&Mm(t)&&(null==(n=t.parent)?void 0:n.parent)&&KP(t.parent.parent)&&(null==(i=t.parent.parent.parent)?void 0:i.parent)&&EP(t.parent.parent.parent.parent)&&!Bv(t.parent.parent.parent.parent,32)&&t.parent.parent.parent.parent.parent&&sc(t.parent.parent.parent.parent.parent))return r(t,t.parent.parent.parent.parent);if(2&e.flags){const e=mc(t,EP);return!!Bv(e,32)||!!sc(e.parent)&&r(t,e)}}return!1}return!0})))return{accessibility:0,aliasesToMakeVisible:n};function r(e,r){return t&&(Wo(e).isVisible=!0,n=me(n,r)),!0}}function qs(e){let t;return t=186===e.parent.kind||233===e.parent.kind&&!wf(e.parent)||167===e.parent.kind||182===e.parent.kind&&e.parent.parameterName===e?1160127:166===e.kind||211===e.kind||271===e.parent.kind||166===e.parent.kind&&e.parent.left===e||211===e.parent.kind&&e.parent.expression===e||212===e.parent.kind&&e.parent.expression===e?1920:788968,t}function Vs(e,t,n=!0){const r=qs(e),i=bb(e),o=je(t,i.escapedText,r,void 0,!1);return o&&262144&o.flags&&788968&r||!o&&yv(i)&&0===Is(ns(rm(i,!1,!1)),i,r,!1).accessibility?{accessibility:0}:o?$s(o,n)||{accessibility:1,errorSymbolName:Gd(i),errorNode:i}:{accessibility:3,errorSymbolName:Gd(i),errorNode:i}}function Us(e,t,n,r=4,i){let o=70221824;2&r&&(o|=128),1&r&&(o|=512),8&r&&(o|=16384),32&r&&(o|=134217728),16&r&&(o|=1073741824);const a=4&r?se.symbolToNode:se.symbolToEntityName;return i?s(i).getText():dd(s);function s(r){const i=a(e,n,t,o),s=307===(null==t?void 0:t.kind)?tq():eq(),c=t&&Sd(t);return s.writeNode(4,i,c,r),r}}function Ks(e,t,n=0,r,i){return i?o(i).getText():dd(o);function o(i){let o;o=262144&n?1===r?185:184:1===r?180:179;const a=se.signatureToSignatureDeclaration(e,o,t,70222336|Qs(n)),s=nq(),c=t&&Sd(t);return s.writeNode(4,a,c,Uy(i)),i}}function Ws(e,t,n=1064960,r=Vy("")){const i=A.noErrorTruncation||1&n,o=se.typeToTypeNode(e,t,70221824|Qs(n)|(i?1:0));if(void 0===o)return xn.fail("should always get typenode");const a=e!==Et?eq():Z$(),s=t&&Sd(t);a.writeNode(4,o,s,r);const c=r.getText(),l=i?2*Q_:2*X_;return l&&c&&c.length>=l?c.substr(0,l-"...".length)+"...":c}function Hs(e,t){let n=Xs(e.symbol)?Ws(e,e.symbol.valueDeclaration):Ws(e),r=Xs(t.symbol)?Ws(t,t.symbol.valueDeclaration):Ws(t);return n===r&&(n=Gs(e),r=Gs(t)),[n,r]}function Gs(e){return Ws(e,void 0,64)}function Xs(e){return e&&!!e.valueDeclaration&&Xu(e.valueDeclaration)&&!lS(e.valueDeclaration)}function Qs(e=0){return 848330095&e}function Ys(e){return!!(e.symbol&&32&e.symbol.flags&&(e===Nu(e.symbol)||524288&e.flags&&16777216&wx(e)))}function Zs(e,t,n=16384,r){return r?i(r).getText():dd(i);function i(r){const i=70222336|Qs(n),o=se.typePredicateToTypePredicateNode(e,t,i),a=eq(),s=t&&Sd(t);return a.writeNode(4,o,s,r),r}}function ec(e){return 2===e?"private":4===e?"protected":"public"}function tc(e){return e&&e.parent&&268===e.parent.kind&&fp(e.parent.parent)}function nc(e){return 307===e.kind||sp(e)}function ic(e,t){const n=Uo(e).nameType;if(n){if(384&n.flags){const e=""+n.value;return Ts(e,wS(A))||WT(e)?WT(e)&&an(e,"-")?`[${e}]`:e:`"${Fy(e,34)}"`}if(8192&n.flags)return`[${oc(n.symbol,t)}]`}}function oc(e,t){var n;if((null==(n=null==t?void 0:t.remappedSymbolReferences)?void 0:n.has(OB(e)))&&(e=t.remappedSymbolReferences.get(OB(e))),t&&"default"===e.escapedName&&!(16384&t.flags)&&(!(16777216&t.flags)||!e.declarations||t.enclosingDeclaration&&mc(e.declarations[0],nc)!==mc(t.enclosingDeclaration,nc)))return"default";if(e.declarations&&e.declarations.length){let n=g(e.declarations,(e=>Pc(e)?e:void 0));const r=n&&Pc(n);if(n&&r){if(QE(n)&&sg(n))return Sc(e);if(oE(r)&&!(4096&px(e))){const n=Uo(e).nameType;if(n&&384&n.flags){const n=ic(e,t);if(void 0!==n)return n}}return Ap(r)}if(n||(n=e.declarations[0]),n.parent&&260===n.parent.kind)return Ap(n.parent.name);switch(n.kind){case 231:case 218:case 219:return!t||t.encounteredError||131072&t.flags||(t.encounteredError=!0),231===n.kind?"(Anonymous class)":"(Anonymous function)"}}const r=ic(e,t);return void 0!==r?r:Sc(e)}function sc(e){if(e){const t=Wo(e);return void 0===t.isVisible&&(t.isVisible=!!function(){switch(e.kind){case 338:case 346:case 340:return!!(e.parent&&e.parent.parent&&e.parent.parent.parent&&qN(e.parent.parent.parent));case 208:return sc(e.parent.parent);case 260:if(Eu(e.name)&&!e.name.elements.length)return!1;case 267:case 263:case 264:case 265:case 262:case 266:case 271:if(fp(e))return!0;const t=kc(e);return 32&bJ(e)||271!==e.kind&&307!==t.kind&&33554432&t.flags?sc(t):Yp(t);case 172:case 171:case 177:case 178:case 174:case 173:if(Rv(e,6))return!1;case 176:case 180:case 179:case 181:case 169:case 268:case 184:case 185:case 187:case 183:case 188:case 189:case 192:case 193:case 196:case 202:return sc(e.parent);case 273:case 274:case 276:return!1;case 168:case 307:case 270:return!0;default:return!1}}()),t.isVisible}return!1}function lc(e,t){let n,r,i;return e.parent&&277===e.parent.kind?n=je(e,e,2998271,void 0,!1):281===e.parent.kind&&(n=ka(e.parent,2998271)),n&&(i=new Set,i.add(OB(n)),function e(n){f(n,(n=>{const o=aa(n)||n;if(t?Wo(n).isVisible=!0:(r=r||[],fe(r,o)),Fm(n)){const t=bb(n.moduleReference),r=je(n,t.escapedText,901119,void 0,!1);r&&i&&W(i,OB(r))&&e(r.declarations)}}))}(n.declarations)),r}function _c(e,t){const n=dc(e,t);if(n>=0){const{length:e}=Fi;for(let t=n;t=Oi;n--){if(pc(Fi[n],Ii[n]))return-1;if(Fi[n]===e&&Ii[n]===t)return n}return-1}function pc(e,t){switch(t){case 0:return!!Uo(e).type;case 2:return!!Uo(e).declaredType;case 1:return!!e.resolvedBaseConstructorType;case 3:return!!e.resolvedReturnType;case 4:return!!e.immediateBaseConstraint;case 5:return!!e.resolvedTypeArguments;case 6:return!!e.baseTypesResolved;case 7:return!!Uo(e).writeType;case 8:return void 0!==Wo(e).parameterInitializerContainsUndefined}return xn.assertNever(t)}function gc(){return Fi.pop(),Ii.pop(),Ai.pop()}function kc(e){return mc(sy(e),(e=>{switch(e.kind){case 260:case 261:case 276:case 275:case 274:case 273:return!1;default:return!0}})).parent}function Tc(e,t){const n=Jp(e,t);return n?$l(n):void 0}function wc(e,t){var n;let r;return Tc(e,t)||(r=null==(n=gf(e,t))?void 0:n.type)&&Hc(r,!0,!0)}function Ec(e){return e&&0!=(1&e.flags)}function Nc(e){return e===Dt||!!(1&e.flags&&e.aliasSymbol)}function Ic(e,t){if(0!==t)return Gc(e,!1,t);const n=ns(e);return n&&Uo(n).type||Gc(e,!1,t)}function Mc(e,t,n){if(131072&(e=SD(e,(e=>!(98304&e.flags)))).flags)return wn;if(1048576&e.flags)return DD(e,(e=>Mc(e,t,n)));let r=ev(O(t,Tv));const i=[],o=[];for(const t of Rd(e)){const e=Ev(t,8576);SS(e,r)||6&fx(t)||!rx(t)?o.push(e):i.push(t)}if(pb(e)||gb(r)){if(o.length&&(r=ev([r,...o])),131072&r.flags)return e;const t=(Lr||(Lr=zh("Omit",2,!0)||ht),Lr===ht?void 0:Lr);return t?Bg(t,[e,r]):Dt}const a=ed();for(const e of i)a.set(e.escapedName,ix(e,!1));const s=ks(n,a,u,u,cf(e));return s.objectFlags|=4194304,s}function Lc(e){return!!(465829888&e.flags)&&_M(Wd(e)||At,32768)}function jc(e){return Zw(bD(e,Lc)?DD(e,(e=>465829888&e.flags?Hd(e):e)):e,524288)}function Rc(e,t){const n=Jc(e);return n?XD(n,t):t}function Jc(e){const t=function(e){const t=e.parent.parent;switch(t.kind){case 208:case 303:return Jc(t);case 209:return Jc(e.parent);case 260:return t.initializer;case 226:return t.right}}(e);if(t&&jg(t)&&t.flowNode){const n=zc(e);if(n){const r=sI(_I.createStringLiteral(n),e),i=Vu(t)?t:_I.createParenthesizedExpression(t),o=sI(_I.createElementAccessExpression(i,r),e);return OT(r,o),OT(o,e),i!==t&&OT(i,o),o.flowNode=t.flowNode,o}}}function zc(e){const t=e.parent;return 208===e.kind&&206===t.kind?qc(e.propertyName||e.name):303===e.kind||304===e.kind?qc(e.name):""+t.elements.indexOf(e)}function qc(e){const t=Tv(e);return 384&t.flags?""+t.value:void 0}function Vc(e){const t=e.dotDotDotToken?32:0,n=Ic(e.parent.parent,t);return n&&Uc(e,n,!1)}function Uc(e,t,n){if(Ec(t))return t;const r=e.parent;let i;if(U&&33554432&e.flags&&ay(e)?t=QT(t):U&&r.parent.initializer&&!Qw(_D(r.parent.initializer),65536)&&(t=Zw(t,524288)),206===r.kind)if(e.dotDotDotToken){if(2&(t=Sp(t)).flags||!RF(t))return xo(e,va.Rest_types_may_only_be_created_from_object_types),Dt;const n=[];for(const e of r.elements)e.dotDotDotToken||n.push(e.propertyName||e.name);i=Mc(t,n,e.symbol)}else{const n=e.propertyName||e.name;i=Rc(e,Mb(t,Tv(n),32,n))}else{const o=fj(65|(e.dotDotDotToken?0:128),t,It,r),a=r.elements.indexOf(e);if(e.dotDotDotToken){const e=DD(t,(e=>58982400&e.flags?Hd(e):e));i=xD(e,PT)?DD(e,(e=>Ly(e,a))):Ty(o)}else i=Hk(t)?Rc(e,jb(t,ux(a),32|(n||PF(e)?16:0),e.name)||Dt):o}return e.initializer?kv(ac(e))?U&&!Qw(PM(e,0),16777216)?jc(i):i:NM(e,ev([jc(i),PM(e,0)],2)):i}function Kc(e){const t=al(e);if(t)return Sx(t)}function Wc(e){const t=lh(e,!0);return 209===t.kind&&0===t.elements.length}function Hc(e,t=!1,n=!0){return U&&n?XT(e,t):e}function Gc(e,t,n){if(KP(e)&&249===e.parent.parent.kind){const t=Av(bA(KM(e.parent.parent.expression,n)));return 4456448&t.flags?Iv(t):Jt}if(KP(e)&&250===e.parent.parent.kind)return pj(e.parent.parent)||St;if(Eu(e.parent))return Vc(e);const r=uE(e)&&!Uv(e)||lE(e)||EF(e),i=t&&iC(e),o=El(e);if(ap(e))return o?Ec(o)||o===At?o:Dt:re?At:St;if(o)return Hc(o,r,i);if((Y||Mm(e))&&KP(e)&&!Eu(e.name)&&!(32&bJ(e))&&!(33554432&e.flags)){if(!(6&xJ(e))&&(!e.initializer||function(e){const t=lh(e,!0);return 106===t.kind||80===t.kind&&Nw(t)===ge}(e.initializer)))return kt;if(e.initializer&&Wc(e.initializer))return ir}if(sE(e)){if(!e.symbol)return;const t=e.parent;if(178===t.kind&&l_(t)){const n=Y_(ns(e.parent),177);if(n){const r=Cf(n),i=tJ(t);return i&&e===i?(xn.assert(!i.type),$l(r.thisParameter)):Gf(r)}}const n=function(e,t){const n=Df(e);if(!n)return;const r=e.parameters.indexOf(t);return t.dotDotDotToken?PO(n,r):DO(n,r)}(t,e);if(n)return n;const r="this"===e.symbol.escapedName?_N(t):pN(e);if(r)return Hc(r,!1,i)}if(j_(e)&&e.initializer){if(Mm(e)&&!sE(e)){const t=sl(e,ns(e),Xm(e));if(t)return t}return Hc(NM(e,PM(e,n)),r,i)}if(uE(e)&&(Y||Mm(e))){if(zv(e)){const t=F(e.parent.members,pE),n=t.length?function(e,t){const n=an(e.escapedName,"__#")?YC.createPrivateIdentifier(e.escapedName.split("@")[1]):vc(e.escapedName);for(const r of t){const t=YC.createPropertyAccessExpression(YC.createThis(),n);OT(t.expression,t),OT(t,r),t.flowNode=r.returnFlowNode;const i=rl(t,e);if(!Y||i!==kt&&i!==ir||xo(e.valueDeclaration,va.Member_0_implicitly_has_an_1_type,Us(e),Ws(i)),!xD(i,vA))return nj(i)}}(e.symbol,t):128&Qv(e)?Ik(e.symbol):void 0;return n&&Hc(n,!0,i)}{const t=CC(e.parent),n=t?nl(e.symbol,t):128&Qv(e)?Ik(e.symbol):void 0;return n&&Hc(n,!0,i)}}return NN(e)?Kt:Eu(e.name)?hl(e.name,!1,!0):void 0}function Xc(e){if(e.valueDeclaration&&uP(e.valueDeclaration)){const t=Uo(e);return void 0===t.isConstructorDeclaredProperty&&(t.isConstructorDeclaredProperty=!1,t.isConstructorDeclaredProperty=!!Zc(e)&&x(e.declarations,(t=>uP(t)&&IN(t)&&(212!==t.left.kind||$h(t.left.argumentExpression))&&!cl(void 0,t,e,t)))),t.isConstructorDeclaredProperty}return!1}function Qc(e){const t=e.valueDeclaration;return t&&uE(t)&&!kv(t)&&!t.initializer&&(Y||Mm(t))}function Zc(e){if(e.declarations)for(const t of e.declarations){const e=rm(t,!1,!1);if(e&&(176===e.kind||rO(e)))return e}}function nl(e,t){const n=an(e.escapedName,"__#")?YC.createPrivateIdentifier(e.escapedName.split("@")[1]):vc(e.escapedName),r=YC.createPropertyAccessExpression(YC.createThis(),n);OT(r.expression,r),OT(r,t),r.flowNode=t.returnFlowNode;const i=rl(r,e);return!Y||i!==kt&&i!==ir||xo(e.valueDeclaration,va.Member_0_implicitly_has_an_1_type,Us(e),Ws(i)),xD(i,vA)?void 0:nj(i)}function rl(e,t){const n=(null==t?void 0:t.valueDeclaration)&&(!Qc(t)||128&Qv(t.valueDeclaration))&&Ik(t)||It;return XD(e,kt,n)}function il(e,t){const n=Qm(e.valueDeclaration);if(n){const t=Mm(n)?ol(n):void 0;return t&&t.typeExpression?Sx(t.typeExpression):e.valueDeclaration&&sl(e.valueDeclaration,e,n)||dT(DM(n))}let r,i=!1,o=!1;if(Xc(e)&&(r=nl(e,Zc(e))),!r){let n;if(e.declarations){let a;for(const r of e.declarations){const s=uP(r)||QE(r)?r:Ox(r)?uP(r.parent)?r.parent:r:void 0;if(!s)continue;const c=Ox(s)?gg(s):ag(s);(4===c||uP(s)&&IN(s,c))&&(_l(s)?i=!0:o=!0),QE(s)||(a=cl(a,s,e,r)),a||(n||(n=[])).push(uP(s)||QE(s)?ul(e,t,s,c):en)}r=a}if(!r){if(!p(n))return Dt;let t=i&&e.declarations?function(e,t){return xn.assert(e.length===t.length),e.filter(((e,n)=>{const r=t[n],i=uP(r)?r:uP(r.parent)?r.parent:void 0;return i&&_l(i)}))}(n,e.declarations):void 0;if(o){const n=Ik(e);n&&((t||(t=[])).push(n),i=!0)}r=ev(Q(t,(e=>!!(-98305&e.flags)))?t:n)}}const a=RC(Hc(r,!1,o&&!i));return e.valueDeclaration&&Mm(e.valueDeclaration)&&SD(a,(e=>!!(-98305&e.flags)))===en?(zC(e.valueDeclaration,St),St):a}function sl(e,t,n){var r,i;if(!Mm(e)||!n||!HE(n)||n.properties.length)return;const o=ed();for(;uP(e)||GE(e);){const t=rs(e);(null==(r=null==t?void 0:t.exports)?void 0:r.size)&&qo(o,t.exports),e=uP(e)?e.parent:e.parent.parent}const a=rs(e);(null==(i=null==a?void 0:a.exports)?void 0:i.size)&&qo(o,a.exports);const s=ks(t,o,u,u,u);return s.objectFlags|=4096,s}function cl(e,t,n,r){var i;const o=kv(t.parent);if(o){const t=RC(Sx(o));if(!e)return t;Nc(e)||Nc(t)||gS(e,t)||ij(void 0,e,r,t)}if(null==(i=n.parent)?void 0:i.valueDeclaration){const e=os(n.parent);if(e.valueDeclaration){const t=kv(e.valueDeclaration);if(t){const e=Jp(Sx(t),n.escapedName);if(e)return ql(e)}}}return e}function ul(e,t,n,r){if(QE(n)){if(t)return $l(t);const e=DM(n.arguments[2]),r=Tc(e,"value");if(r)return r;const i=Tc(e,"get");if(i){const e=hI(i);if(e)return Gf(e)}const o=Tc(e,"set");if(o){const e=hI(o);if(e)return LO(e)}return St}if(function(e,t){return GE(e)&&110===e.expression.kind&&jI(t,(t=>Iw(e,t)))}(n.left,n.right))return St;const i=1===r&&(GE(n.left)||XE(n.left))&&(og(n.left.expression)||qD(n.left.expression)&&rg(n.left.expression)),o=t?$l(t):i?sx(DM(n.right)):dT(DM(n.right));if(524288&o.flags&&2===r&&"export="===e.escapedName){const n=Od(o),r=ed();_d(n.members,r);const i=r.size;t&&!t.exports&&(t.exports=ed()),(t||e).exports.forEach(((e,t)=>{var n;const i=r.get(t);if(!i||i===e||2097152&e.flags)r.set(t,e);else if(111551&e.flags&&111551&i.flags){if(e.valueDeclaration&&i.valueDeclaration&&Sd(e.valueDeclaration)!==Sd(i.valueDeclaration)){const t=vc(e.escapedName),r=(null==(n=lt(i.valueDeclaration,Dc))?void 0:n.name)||i.valueDeclaration;fT(xo(e.valueDeclaration,va.Duplicate_identifier_0,t),Rp(r,va._0_was_also_declared_here,t)),fT(xo(r,va.Duplicate_identifier_0,t),Rp(e.valueDeclaration,va._0_was_also_declared_here,t))}const o=No(e.flags|i.flags,t);o.links.type=ev([$l(e),$l(i)]),o.valueDeclaration=i.valueDeclaration,o.declarations=Z(i.declarations,e.declarations),r.set(t,o)}else r.set(t,Jo(e,i))}));const a=ks(i!==r.size?void 0:n.symbol,r,n.callSignatures,n.constructSignatures,n.indexInfos);if(i===r.size&&(o.aliasSymbol&&(a.aliasSymbol=o.aliasSymbol,a.aliasTypeArguments=o.aliasTypeArguments),4&wx(o))){a.aliasSymbol=o.symbol;const e=Ig(o);a.aliasTypeArguments=p(e)?e:void 0}return a.objectFlags|=xg([o])|20608&wx(o),a.symbol&&32&a.symbol.flags&&o===Nu(a.symbol)&&(a.objectFlags|=16777216),a}return Yk(o)?(zC(n,rr),rr):o}function _l(e){const t=rm(e,!1,!1);return 176===t.kind||262===t.kind||218===t.kind&&!yg(t.parent)}function pl(e,t,n){return e.initializer?Hc(NM(e,PM(e,n?0:1,Eu(e.name)?hl(e.name,!0,!1):At))):Eu(e.name)?hl(e.name,t,n):(n&&!wl(e)&&zC(e,St),t?Pt:St)}function hl(e,t=!1,n=!1){return 206===e.kind?function(e,t,n){const r=ed();let i,o=131200;f(e.elements,(e=>{const a=e.propertyName||e.name;if(e.dotDotDotToken)return void(i=Vm(Jt,St,!1));const s=Tv(a);if(!mC(s))return void(o|=512);const c=gC(s),l=No(4|(e.initializer?16777216:0),c);l.links.type=pl(e,t,n),l.links.bindingElement=e,r.set(l.escapedName,l)}));const a=ks(void 0,r,u,u,i?[i]:u);return a.objectFlags|=o,t&&(a.pattern=e,a.objectFlags|=131072),a}(e,t,n):function(e,t,n){const r=e.elements,i=we(r),o=i&&208===i.kind&&i.dotDotDotToken?i:void 0;if(0===r.length||1===r.length&&o)return M>=2?ky(St):rr;const a=O(r,(e=>gP(e)?St:pl(e,t,n))),s=C(r,(e=>!(e===o||gP(e)||PF(e))),r.length-1)+1;let c=Ay(a,O(r,((e,t)=>e===o?4:t>=s?2:1)));return t&&(c=Dg(c),c.pattern=e,c.objectFlags|=131072),c}(e,t,n)}function vl(e,t){return bl(Gc(e,!0,0),e,t)}function bl(e,t,n){return e?(4096&e.flags&&function(e){const t=rs(e),n=lr||(lr=Bh("SymbolConstructor",!1));return n&&t&&t===n}(t.parent)&&(e=mx(t)),n&&$C(t,e),8192&e.flags&&(KE(t)||!t.type)&&e.symbol!==ns(t)&&(e=Qt),RC(e)):(e=sE(t)&&t.dotDotDotToken?rr:St,n&&(wl(t)||zC(t,e)),e)}function wl(e){const t=sy(e);return _L(169===t.kind?t.parent:t)}function El(e){const t=kv(e);if(t)return Sx(t)}function Pl(e){if(e)switch(e.kind){case 177:return Cv(e);case 178:return Dv(e);case 172:return xn.assert(Uv(e)),kv(e)}}function Nl(e){const t=Pl(e);return t&&Sx(t)}function Fl(e){const t=Uo(e);if(!t.type){if(!_c(e,0))return Dt;const n=Y_(e,177),r=Y_(e,178),i=lt(Y_(e,172),yu);let o=n&&Mm(n)&&Kc(n)||Nl(n)||Nl(r)||Nl(i)||n&&n.body&&HO(n)||i&&i.initializer&&vl(i,!0);o||(r&&!_L(r)?ko(Y,r,va.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,Us(e)):n&&!_L(n)?ko(Y,n,va.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,Us(e)):i&&!_L(i)&&ko(Y,i,va.Member_0_implicitly_has_an_1_type,Us(e),"any"),o=St),gc()||(Pl(n)?xo(n,va._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Us(e)):Pl(r)||Pl(i)?xo(r,va._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Us(e)):n&&Y&&xo(n,va._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Us(e)),o=St),t.type??(t.type=o)}return t.type}function Il(e){const t=Uo(e);if(!t.writeType){if(!_c(e,7))return Dt;const n=Y_(e,178)??lt(Y_(e,172),yu);let r=Nl(n);gc()||(Pl(n)&&xo(n,va._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Us(e)),r=St),t.writeType??(t.writeType=r||Fl(e))}return t.writeType}function Ol(e){const t=xu(Nu(e));return 8650752&t.flags?t:2097152&t.flags?S(t.types,(e=>!!(8650752&e.flags))):void 0}function Ml(e){let t=Uo(e);const n=t;if(!t.type){const r=e.valueDeclaration&&oO(e.valueDeclaration,!1);if(r){const n=iO(e,r);n&&(e=n,t=n.links)}n.type=t.type=function(e){const t=e.valueDeclaration;if(1536&e.flags&&_p(e))return St;if(t&&(226===t.kind||Ox(t)&&226===t.parent.kind))return il(e);if(512&e.flags&&t&&qN(t)&&t.commonJsModuleIndicator){const t=$a(e);if(t!==e){if(!_c(e,0))return Dt;const n=ts(e.exports.get("export=")),r=il(n,n===t?void 0:t);return gc()?r:jl(e)}}const n=hs(16,e);if(32&e.flags){const t=Ol(e);return t?cv([n,t]):n}return U&&16777216&e.flags?XT(n,!0):n}(e)}return t.type}function Ll(e){const t=Uo(e);return t.type||(t.type=Mu(e))}function jl(e){const t=e.valueDeclaration;if(t){if(kv(t))return xo(e.valueDeclaration,va._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Us(e)),Dt;Y&&(169!==t.kind||t.initializer)&&xo(e.valueDeclaration,va._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,Us(e))}else if(2097152&e.flags){const t=sa(e);t&&xo(t,va.Circular_definition_of_import_alias_0,Us(e))}return St}function Rl(e){const t=Uo(e);return t.type||(xn.assertIsDefined(t.deferralParent),xn.assertIsDefined(t.deferralConstituents),t.type=1048576&t.deferralParent.flags?ev(t.deferralConstituents):cv(t.deferralConstituents)),t.type}function zl(e){const t=px(e);return 4&e.flags?2&t?65536&t?function(e){const t=Uo(e);return!t.writeType&&t.deferralWriteConstituents&&(xn.assertIsDefined(t.deferralParent),xn.assertIsDefined(t.deferralConstituents),t.writeType=1048576&t.deferralParent.flags?ev(t.deferralWriteConstituents):cv(t.deferralWriteConstituents)),t.writeType}(e)||Rl(e):e.links.writeType||e.links.type:bC($l(e),!!(16777216&e.flags)):98304&e.flags?1&t?function(e){const t=Uo(e);return t.writeType||(t.writeType=eS(zl(t.target),t.mapper))}(e):Il(e):$l(e)}function $l(e,t){const n=px(e);return 65536&n?Rl(e):1&n?function(e){const t=Uo(e);return t.type||(t.type=eS($l(t.target),t.mapper))}(e):262144&n?function(e){var t;if(!e.links.type){const n=e.links.mappedType;if(!_c(e,0))return n.containsError=!0,Dt;const i=eS(yd(n.target||n),qx(n.mapper,fd(n),e.links.keyType));let o=U&&16777216&e.flags&&!_M(i,49152)?XT(i,!0):524288&e.links.checkFlags?EC(i):i;gc()||(xo(r,va.Type_of_property_0_circularly_references_itself_in_mapped_type_1,Us(e),Ws(n)),o=Dt),(t=e.links).type??(t.type=o)}return e.links.type}(e):8192&n?function(e){const t=Uo(e);return t.type||(t.type=aw(e.links.propertyType,e.links.mappedType,e.links.constraintType)||At),t.type}(e):7&e.flags?function(e,t){const n=Uo(e);if(!n.type){const r=function(e,t){if(4194304&e.flags)return function(e){const t=ju(is(e));return t.typeParameters?Tg(t,O(t.typeParameters,(e=>St))):t}(e);if(e===Pe)return St;if(134217728&e.flags&&e.valueDeclaration){const t=ns(Sd(e.valueDeclaration)),n=No(t.flags,"exports");n.declarations=t.declarations?t.declarations.slice():[],n.parent=e,n.links.target=t,t.valueDeclaration&&(n.valueDeclaration=t.valueDeclaration),t.members&&(n.members=new Map(t.members)),t.exports&&(n.exports=new Map(t.exports));const r=ed();return r.set("exports",n),ks(e,r,u,u,u)}xn.assertIsDefined(e.valueDeclaration);const n=e.valueDeclaration;if(qN(n)&&ef(n))return n.statements.length?RC(dT(KM(n.statements[0].expression))):wn;if(hu(n))return Fl(e);if(!_c(e,0))return 512&e.flags&&!(67108864&e.flags)?Ml(e):KE(n)&&1===t?Dt:jl(e);let r;if(277===n.kind)r=bl(El(n)||DM(n.expression),n);else if(uP(n)||Mm(n)&&(QE(n)||(GE(n)||_g(n))&&uP(n.parent)))r=il(e);else if(GE(n)||XE(n)||qD(n)||$_(n)||TD(n)||GP(n)||HP(n)||dE(n)&&!$f(n)||_E(n)||qN(n)){if(9136&e.flags)return Ml(e);r=uP(n.parent)?il(e):El(n)||St}else if(BN(n))r=El(n)||OM(n);else if(NN(n))r=El(n)||zF(n);else if(JN(n))r=El(n)||IM(n.name,0);else if($f(n))r=El(n)||MM(n,0);else if(sE(n)||uE(n)||lE(n)||KP(n)||KE(n)||Al(n))r=vl(n,!0);else if(YP(n))r=Ml(e);else{if(!$N(n))return xn.fail("Unhandled declaration kind! "+xn.formatSyntaxKind(n.kind)+" for "+xn.formatSymbol(e));r=Ll(e)}return gc()?r:512&e.flags&&!(67108864&e.flags)?Ml(e):KE(n)&&1===t?r:jl(e)}(e,t);return n.type||function(e){let t=e.valueDeclaration;return!!t&&(KE(t)&&(t=ac(t)),!!sE(t)&&fS(t.parent))}(e)||t||(n.type=r),r}return n.type}(e,t):9136&e.flags?Ml(e):8&e.flags?Ll(e):98304&e.flags?Fl(e):2097152&e.flags?function(e){const t=Uo(e);if(!t.type){if(!_c(e,0))return Dt;const n=Ea(e),r=e.declarations&&Ca(sa(e),!0),i=g(null==r?void 0:r.declarations,(e=>mN(e)?El(e):void 0));if(t.type??(t.type=(null==r?void 0:r.declarations)&&hR(r.declarations)&&e.declarations.length?function(e){const t=Sd(e.declarations[0]),n=vc(e.escapedName),r=e.declarations.every((e=>Mm(e)&&Ox(e)&&og(e.expression))),i=r?YC.createPropertyAccessExpression(YC.createPropertyAccessExpression(YC.createIdentifier("module"),YC.createIdentifier("exports")),n):YC.createPropertyAccessExpression(YC.createIdentifier("exports"),n);return r&&OT(i.expression.expression,i.expression),OT(i.expression,i),OT(i,t),i.flowNode=t.endFlowNode,XD(i,kt,It)}(r):hR(e.declarations)?kt:i||(111551&Pa(n)?$l(n):Dt)),!gc())return jl(r??e),t.type??(t.type=Dt)}return t.type}(e):Dt}function ql(e){return bC($l(e),!!(16777216&e.flags))}function Kl(e,t){return void 0!==e&&void 0!==t&&0!=(4&wx(e))&&e.target===t}function Hl(e){return 4&wx(e)?e.target:e}function Gl(e,t){return function e(n){if(7&wx(n)){const r=Hl(n);return r===t||Q(ku(r),e)}return!!(2097152&n.flags)&&Q(n.types,e)}(e)}function Ql(e,t){for(const n of t)e=me(e,Lu(ns(n)));return e}function Yl(e,t){for(;;){if((e=e.parent)&&uP(e)){const t=ag(e);if(6===t||3===t){const t=ns(e.left);t&&t.parent&&!mc(t.parent.valueDeclaration,(t=>e===t))&&(e=t.parent.valueDeclaration)}}if(!e)return;switch(e.kind){case 263:case 231:case 264:case 179:case 180:case 173:case 184:case 185:case 317:case 262:case 174:case 218:case 219:case 265:case 345:case 346:case 340:case 338:case 200:case 194:{const n=Yl(e,t);if(200===e.kind)return ue(n,Lu(ns(e.typeParameter)));if(194===e.kind)return Z(n,Kb(e));const r=Ql(n,ml(e)),i=t&&(263===e.kind||231===e.kind||264===e.kind||rO(e))&&Nu(ns(e)).thisType;return i?ue(r,i):r}case 341:const n=$g(e);n&&(e=n.valueDeclaration);break;case 320:{const n=Yl(e,t);return e.tags?Ql(n,R(e.tags,(e=>CF(e)?e.typeParameters:void 0))):n}}}}function tu(e){var t;const n=32&e.flags||16&e.flags?e.valueDeclaration:null==(t=e.declarations)?void 0:t.find((e=>{if(264===e.kind)return!0;if(260!==e.kind)return!1;const t=e.initializer;return!!t&&(218===t.kind||219===t.kind)}));return xn.assert(!!n,"Class was missing valueDeclaration -OR- non-class had no interface declarations"),Yl(n)}function nu(e){if(!e.declarations)return;let t;for(const n of e.declarations)(264===n.kind||263===n.kind||231===n.kind||rO(n)||Ag(n))&&(t=Ql(t,ml(n)));return t}function ru(e){const t=Vp(e,1);if(1===t.length){const e=t[0];if(!e.typeParameters&&1===e.parameters.length&&JB(e)){const t=xO(e.parameters[0]);return Ec(t)||Wk(t)===St}}return!1}function su(e){if(Vp(e,1).length>0)return!0;if(8650752&e.flags){const t=Wd(e);return!!t&&ru(t)}return!1}function du(e){const t=Cx(e.symbol);return t&&Sh(t)}function pu(e,t,n){const r=p(t),i=Mm(n);return F(Vp(e,1),(e=>(i||r>=kf(e.typeParameters))&&r<=p(e.typeParameters)))}function bu(e,t,n){const r=pu(e,t,n),i=O(t,Sx);return L(r,(e=>Q(e.typeParameters)?hm(e,i,Mm(n)):e))}function xu(e){if(!e.resolvedBaseConstructorType){const t=Cx(e.symbol),n=t&&Sh(t),r=du(e);if(!r)return e.resolvedBaseConstructorType=It;if(!_c(e,1))return Dt;const i=KM(r.expression);if(n&&r!==n&&(xn.assert(!n.typeArguments),KM(n.expression)),2621440&i.flags&&Od(i),!gc())return xo(e.symbol.valueDeclaration,va._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,Us(e.symbol)),e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=Dt);if(!(1&i.flags||i===Bt||su(i))){const t=xo(r.expression,va.Type_0_is_not_a_constructor_function_type,Ws(i));if(262144&i.flags){const e=ug(i);let n=At;if(e){const t=Vp(e,1);t[0]&&(n=Gf(t[0]))}i.symbol.declarations&&fT(t,Rp(i.symbol.declarations[0],va.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,Us(i.symbol),Ws(n)))}return e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=Dt)}e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=i)}return e.resolvedBaseConstructorType}function Su(e,t){xo(e,va.Type_0_recursively_references_itself_as_a_base_type,Ws(t,void 0,2))}function ku(e){if(!e.baseTypesResolved){if(_c(e,6)&&(8&e.objectFlags?e.resolvedBaseTypes=[Tu(e)]:96&e.symbol.flags?(32&e.symbol.flags&&function(e){e.resolvedBaseTypes=H_;const t=mp(xu(e));if(!(2621441&t.flags))return e.resolvedBaseTypes=u;const n=du(e);let r;const i=t.symbol?ju(t.symbol):void 0;if(t.symbol&&32&t.symbol.flags&&function(e){const t=e.outerTypeParameters;if(t){const n=t.length-1,r=Ig(e);return t[n].symbol!==r[n].symbol}return!0}(i))r=Lg(n,t.symbol);else if(1&t.flags)r=t;else{const i=bu(t,n.typeArguments,n);if(!i.length)return xo(n.expression,va.No_base_constructor_has_the_specified_number_of_type_arguments),e.resolvedBaseTypes=u;r=Gf(i[0])}if(Nc(r))return e.resolvedBaseTypes=u;const o=Sp(r);if(!Du(o)){const t=uS(Mp(void 0,r),va.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,Ws(o));return ro.add(zp(Sd(n.expression),n.expression,t)),e.resolvedBaseTypes=u}if(e===o||Gl(o,e))return xo(e.symbol.valueDeclaration,va.Type_0_recursively_references_itself_as_a_base_type,Ws(e,void 0,2)),e.resolvedBaseTypes=u;e.resolvedBaseTypes===H_&&(e.members=void 0),e.resolvedBaseTypes=[o]}(e),64&e.symbol.flags&&function(e){if(e.resolvedBaseTypes=e.resolvedBaseTypes||u,e.symbol.declarations)for(const t of e.symbol.declarations)if(264===t.kind&&wh(t))for(const n of wh(t)){const r=Sp(Sx(n));Nc(r)||(Du(r)?e===r||Gl(r,e)?Su(t,e):e.resolvedBaseTypes===u?e.resolvedBaseTypes=[r]:e.resolvedBaseTypes.push(r):xo(n,va.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members))}}(e)):xn.fail("type must be class or interface"),!gc()&&e.symbol.declarations))for(const t of e.symbol.declarations)263!==t.kind&&264!==t.kind||Su(t,e);e.baseTypesResolved=!0}return e.resolvedBaseTypes}function Tu(e){return Ty(ev(L(e.typeParameters,((t,n)=>8&e.elementFlags[n]?Mb(t,zt):t))||u),e.readonly)}function Du(e){if(262144&e.flags){const t=Wd(e);if(t)return Du(t)}return!!(67633153&e.flags&&!Ad(e)||2097152&e.flags&&x(e.types,Du))}function Nu(e){let t=Uo(e);const n=t;if(!t.declaredType){const r=32&e.flags?1:2,i=iO(e,e.valueDeclaration&&function(e){var t;const n=e&&oO(e,!0),r=null==(t=null==n?void 0:n.exports)?void 0:t.get("prototype"),i=(null==r?void 0:r.valueDeclaration)&&function(e){if(!e.parent)return!1;let t=e.parent;for(;t&&211===t.kind;)t=t.parent;if(t&&uP(t)&&Tb(t.left)&&64===t.operatorToken.kind){const e=hg(t);return HE(e)&&e}}(r.valueDeclaration);return i?ns(i):void 0}(e.valueDeclaration));i&&(e=i,t=i.links);const o=n.declaredType=t.declaredType=hs(r,e),a=tu(e),s=nu(e);(a||s||1===r||!function(e){if(!e.declarations)return!0;for(const t of e.declarations)if(264===t.kind){if(256&t.flags)return!1;const e=wh(t);if(e)for(const t of e)if(vb(t.expression)){const e=Ma(t.expression,788968,!0);if(!e||!(64&e.flags)||Nu(e).thisType)return!1}}return!0}(e))&&(o.objectFlags|=4,o.typeParameters=Z(a,s),o.outerTypeParameters=a,o.localTypeParameters=s,o.instantiations=new Map,o.instantiations.set(fg(o.typeParameters),o),o.target=o,o.resolvedTypeArguments=o.typeParameters,o.thisType=ys(e),o.thisType.isThisType=!0,o.thisType.constraint=o)}return t.declaredType}function Fu(e){var t;const n=Uo(e);if(!n.declaredType){if(!_c(e,2))return Dt;const r=xn.checkDefined(null==(t=e.declarations)?void 0:t.find(Ag),"Type alias symbol with no valid declaration found"),i=Fg(r)?r.typeExpression:r.type;let o=i?Sx(i):Dt;if(gc()){const t=nu(e);t&&(n.typeParameters=t,n.instantiations=new Map,n.instantiations.set(fg(t),o))}else o=Dt,340===r.kind?xo(r.typeExpression.type,va.Type_alias_0_circularly_references_itself,Us(e)):xo(Dc(r)&&r.name||r,va.Type_alias_0_circularly_references_itself,Us(e));n.declaredType??(n.declaredType=o)}return n.declaredType}function Au(e){return 1056&e.flags&&8&e.symbol.flags?ju(is(e.symbol)):e}function Iu(e){const t=Uo(e);if(!t.declaredType){const n=[];if(e.declarations)for(const t of e.declarations)if(266===t.kind)for(const r of t.members)if(l_(r)){const t=ns(r),i=aB(r).value,o=ax(void 0!==i?dx(i,OB(e),t):Ou(t));Uo(t).declaredType=o,n.push(sx(o))}const r=n.length?ev(n,1,e,void 0):Ou(e);1048576&r.flags&&(r.flags|=1024,r.symbol=e),t.declaredType=r}return t.declaredType}function Ou(e){const t=fs(32,e),n=fs(32,e);return t.regularType=t,t.freshType=n,n.regularType=t,n.freshType=n,t}function Mu(e){const t=Uo(e);if(!t.declaredType){const n=Iu(is(e));t.declaredType||(t.declaredType=n)}return t.declaredType}function Lu(e){const t=Uo(e);return t.declaredType||(t.declaredType=ys(e))}function ju(e){return qu(e)||Dt}function qu(e){return 96&e.flags?Nu(e):524288&e.flags?Fu(e):262144&e.flags?Lu(e):384&e.flags?Iu(e):8&e.flags?Mu(e):2097152&e.flags?function(e){const t=Uo(e);return t.declaredType||(t.declaredType=ju(Ea(e)))}(e):void 0}function Uu(e){switch(e.kind){case 133:case 159:case 154:case 150:case 163:case 136:case 155:case 151:case 116:case 157:case 146:case 201:return!0;case 188:return Uu(e.elementType);case 183:return!e.typeArguments||e.typeArguments.every(Uu)}return!1}function Ku(e){const t=gl(e);return!t||Uu(t)}function Wu(e){const t=kv(e);return t?Uu(t):!L_(e)}function Hu(e){if(e.declarations&&1===e.declarations.length){const t=e.declarations[0];if(t)switch(t.kind){case 172:case 171:return Wu(t);case 174:case 173:case 176:case 177:case 178:return function(e){const t=Cv(e),n=ml(e);return(176===e.kind||!!t&&Uu(t))&&e.parameters.every(Wu)&&n.every(Ku)}(t)}}return!1}function Gu(e,t,n){const r=ed();for(const i of e)r.set(i.escapedName,n&&Hu(i)?i:Kx(i,t));return r}function Yu(e,t){for(const n of t){if(e_(n))continue;const t=e.get(n.escapedName);(!t||t.valueDeclaration&&uP(t.valueDeclaration)&&!Xc(t)&&!em(t.valueDeclaration))&&(e.set(n.escapedName,n),e.set(n.escapedName,n))}}function e_(e){return!!e.valueDeclaration&&Zl(e.valueDeclaration)&&Jv(e.valueDeclaration)}function o_(e){if(!e.declaredProperties){const t=e.symbol,n=m_(t);e.declaredProperties=bs(n),e.declaredCallSignatures=u,e.declaredConstructSignatures=u,e.declaredIndexInfos=u,e.declaredCallSignatures=Jf(n.get("__call")),e.declaredConstructSignatures=Jf(n.get("__new")),e.declaredIndexInfos=Um(t)}return e}function a_(e){if(!oE(e)&&!XE(e))return!1;const t=oE(e)?e.expression:e.argumentExpression;return vb(t)&&mC(oE(e)?IF(e):DM(t))}function s_(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&64===e.charCodeAt(2)}function c_(e){const t=Pc(e);return!!t&&a_(t)}function l_(e){return!Vh(e)||c_(e)}function u_(e,t,n,r){xn.assert(!!r.symbol,"The member is expected to have a symbol.");const i=Wo(r);if(!i.resolvedSymbol){i.resolvedSymbol=r.symbol;const o=uP(r)?r.left:r.name,a=XE(o)?DM(o.argumentExpression):IF(o);if(mC(a)){const s=gC(a),c=r.symbol.flags;let l=n.get(s);l||n.set(s,l=No(0,s,4096));const u=t&&t.get(s);if(!(32&e.flags)&&l.flags&Lo(c)){const e=u?Z(u.declarations,l.declarations):l.declarations,t=!(8192&a.flags)&&vc(s)||Ap(o);f(e,(e=>xo(Pc(e)||e,va.Property_0_was_also_declared_here,t))),xo(o||r,va.Duplicate_property_0,t),l=No(0,s,4096)}return l.links.nameType=a,function(e,t,n){xn.assert(!!(4096&px(e)),"Expected a late-bound symbol."),e.flags|=n,Uo(t.symbol).lateSymbol=e,e.declarations?t.symbol.isReplaceableByMethod||e.declarations.push(t):e.declarations=[t],111551&n&&(e.valueDeclaration&&e.valueDeclaration.kind===t.kind||(e.valueDeclaration=t))}(l,r,c),l.parent?xn.assert(l.parent===e,"Existing symbol parent should match new one"):l.parent=e,i.resolvedSymbol=l}}return i.resolvedSymbol}function __(e,t){const n=Uo(e);if(!n[t]){const r="resolvedExports"===t,i=r?1536&e.flags?es(e).exports:e.exports:e.members;n[t]=i||w;const o=ed();for(const t of e.declarations||u){const n=Af(t);if(n)for(const t of n)r===zv(t)&&c_(t)&&u_(e,i,o,t)}const a=os(e).assignmentDeclarationMembers;if(a){const t=$e(a.values());for(const n of t){const t=ag(n);r===!(3===t||uP(n)&&IN(n,t)||9===t||6===t)&&c_(n)&&u_(e,i,o,n)}}let s=function(e,t){if(!(null==e?void 0:e.size))return t;if(!(null==t?void 0:t.size))return e;const n=ed();return qo(n,e),qo(n,t),n}(i,o);if(33554432&e.flags&&n.cjsExportMerged&&e.declarations)for(const n of e.declarations){const e=Uo(n.symbol)[t];s?e&&e.forEach(((e,t)=>{const n=s.get(t);if(n){if(n===e)return;s.set(t,Jo(n,e))}else s.set(t,e)})):s=e}n[t]=s||w}return n[t]}function m_(e){return 6256&e.flags?__(e,"resolvedMembers"):e.members||w}function g_(e){if(106500&e.flags&&"__computed"===e.escapedName){const t=Uo(e);if(!t.lateSymbol&&Q(e.declarations,c_)){const t=ts(e.parent);Q(e.declarations,zv)?Ga(t):m_(t)}return t.lateSymbol||(t.lateSymbol=e)}return e}function y_(e,t,n){if(4&wx(e)){const n=e.target,r=Ig(e);return p(n.typeParameters)===p(r)?Tg(n,Z(r,[t||n.thisType])):e}if(2097152&e.flags){const r=L(e.types,(e=>y_(e,t,n)));return r!==e.types?cv(r):e}return n?mp(e):e}function v_(e,t,n,r){let i,o,a,s,c;be(n,r,0,n.length)?(o=t.symbol?m_(t.symbol):ed(t.declaredProperties),a=t.declaredCallSignatures,s=t.declaredConstructSignatures,c=t.declaredIndexInfos):(i=Fx(n,r),o=Gu(t.declaredProperties,i,1===n.length),a=Px(t.declaredCallSignatures,i),s=Px(t.declaredConstructSignatures,i),c=Nx(t.declaredIndexInfos,i));const l=ku(t);if(l.length){if(t.symbol&&o===m_(t.symbol)){const e=ed(t.declaredProperties),n=jm(t.symbol);n&&e.set("__index",n),o=e}Ss(e,o,a,s,c);const n=we(r);for(const e of l){const t=n?y_(eS(e,i),n):e;Yu(o,Rd(t)),a=Z(a,Vp(t,0)),s=Z(s,Vp(t,1));const r=t!==St?cf(t):[Vm(Jt,St,!1)];c=Z(c,F(r,(e=>!rf(c,e.keyType))))}}Ss(e,o,a,s,c)}function x_(e,t,n,r,i,o,a,s){const c=new l(Be,s);return c.declaration=e,c.typeParameters=t,c.parameters=r,c.thisParameter=n,c.resolvedReturnType=i,c.resolvedTypePredicate=o,c.minArgumentCount=a,c.resolvedMinArgumentCount=void 0,c.target=void 0,c.mapper=void 0,c.compositeSignatures=void 0,c.compositeKind=void 0,c}function S_(e){const t=x_(e.declaration,e.typeParameters,e.thisParameter,e.parameters,void 0,void 0,e.minArgumentCount,167&e.flags);return t.target=e.target,t.mapper=e.mapper,t.compositeSignatures=e.compositeSignatures,t.compositeKind=e.compositeKind,t}function k_(e,t){const n=S_(e);return n.compositeSignatures=t,n.compositeKind=1048576,n.target=void 0,n.mapper=void 0,n}function T_(e,t){if((24&e.flags)===t)return e;e.optionalCallSignatureCache||(e.optionalCallSignatureCache={});const n=8===t?"inner":"outer";return e.optionalCallSignatureCache[n]||(e.optionalCallSignatureCache[n]=function(e,t){xn.assert(8===t||16===t,"An optional call signature can either be for an inner call chain or an outer call chain, but not both.");const n=S_(e);return n.flags|=t,n}(e,t))}function w_(e,t){if(JB(e)){const r=e.parameters.length-1,i=e.parameters[r].escapedName,o=$l(e.parameters[r]);if(PT(o))return[n(o,r,i)];if(!t&&1048576&o.flags&&x(o.types,PT))return O(o.types,(e=>n(e,r,i)))}return[e.parameters];function n(t,n,r){const i=Ig(t),o=function(e,t){const n=new Map;return O(e.target.labeledElementDeclarations,((e,r)=>{const i=SO(e,r,t),o=n.get(i);return void 0===o?(n.set(i,1),i):(n.set(i,o+1),`${i}_${o}`)}))}(t,r),a=O(i,((r,i)=>{const a=o&&o[i]?o[i]:kO(e,n+i,t),s=t.target.elementFlags[i],c=No(1,a,12&s?32768:2&s?16384:0);return c.links.type=4&s?Ty(r):r,c}));return Z(e.parameters.slice(0,n),a)}}function E_(e,t,n,r,i){for(const o of e)if(Jk(o,t,n,r,i,n?vS:hS))return o}function N_(e,t,n){if(t.typeParameters){if(n>0)return;for(let n=1;n1&&(n=void 0===n?r:-1);for(const n of e[r])if(!t||!E_(t,n,!1,!1,!0)){const i=N_(e,n,r);if(i){let e=n;if(i.length>1){let t=n.thisParameter;const r=f(i,(e=>e.thisParameter));r&&(t=FC(r,cv(q(i,(e=>e.thisParameter&&$l(e.thisParameter)))))),e=k_(n,i),e.thisParameter=t}(t||(t=[])).push(e)}}}if(!p(t)&&-1!==n){const r=e[void 0!==n?n:0];let i=r.slice();for(const t of e)if(t!==r){const e=t[0];if(xn.assert(!!e,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),i=e.typeParameters&&Q(i,(t=>!!t.typeParameters&&!R_(e.typeParameters,t.typeParameters)))?void 0:O(i,(t=>J_(t,e))),!i)break}t=i}return t||u}function R_(e,t){if(p(e)!==p(t))return!1;if(!e||!t)return!0;const n=Fx(t,e);for(let r=0;r=i?e:t,a=o===e?t:e,s=o===e?r:i,c=IO(e)||IO(t),l=c&&!IO(o),u=new Array(s+(l?1:0));for(let _=0;_=AO(o)&&_>=AO(a),h=_>=r?void 0:kO(e,_),y=_>=i?void 0:kO(t,_),v=No(1|(g&&!m?16777216:0),(h===y?h:h?y?void 0:h:y)||`arg${_}`,m?32768:g?16384:0);v.links.type=m?Ty(f):f,u[_]=v}if(l){const e=No(1,"args",32768);e.links.type=Ty(DO(a,s)),a===t&&(e.links.type=eS(e.links.type,n)),u[s]=e}return u}(e,t,r),a=function(e,t,n){return e&&t?FC(e,cv([$l(e),eS($l(t),n)])):e||t}(e.thisParameter,t.thisParameter,r),s=x_(i,n,a,o,void 0,void 0,Math.max(e.minArgumentCount,t.minArgumentCount),167&(e.flags|t.flags));return s.compositeKind=1048576,s.compositeSignatures=Z(2097152!==e.compositeKind&&e.compositeSignatures||[e],[t]),r?s.mapper=2097152!==e.compositeKind&&e.mapper&&e.compositeSignatures?zx(e.mapper,r):r:2097152!==e.compositeKind&&e.mapper&&e.compositeSignatures&&(s.mapper=e.mapper),s}function z_(e){const t=cf(e[0]);if(t){const n=[];for(const r of t){const t=r.keyType;x(e,(e=>!!_f(e,t)))&&n.push(Vm(t,ev(O(e,(e=>pf(e,t)))),Q(e,(e=>_f(e,t).isReadonly))))}return n}return u}function K_(e,t){return e?t?cv([e,t]):e:t}function W_(e){const t=N(e,(e=>Vp(e,1).length>0)),n=O(e,ru);if(t>0&&t===N(n,(e=>e))){const e=n.indexOf(!0);n[e]=!1}return n}function rd(e,t,n,r){const i=[];for(let o=0;o!Jk(e,n,!1,!1,!1,hS)))||(e=ue(e,n));return e}function od(e,t,n){if(e)for(let r=0;r0===n||Pd(e)===t))?t:0}return 0}function Ad(e){if(32&wx(e)){const t=md(e);if(gb(t))return!0;const n=hd(e);if(n&&gb(eS(n,Mx(fd(e),t))))return!0}return!1}function Id(e){const t=hd(e);return t?SS(t,fd(e))?1:2:0}function Od(e){return e.members||(524288&e.flags?4&e.objectFlags?function(e){const t=o_(e.target),n=Z(t.typeParameters,[t.thisType]),r=Ig(e);v_(e,t,n,r.length===n.length?r:Z(r,[e]))}(e):3&e.objectFlags?function(e){v_(e,o_(e),u,u)}(e):1024&e.objectFlags?function(e){const t=_f(e.source,Jt),n=Dd(e.mappedType),r=!(1&n),i=4&n?0:16777216,o=t?[Vm(Jt,aw(t.type,e.mappedType,e.constraintType)||At,r&&t.isReadonly)]:u,a=ed(),s=function(e){const t=md(e.mappedType);if(!(1048576&t.flags||2097152&t.flags))return;const n=1048576&t.flags?t.origin:t;if(!(n&&2097152&n.flags))return;const r=cv(n.types.filter((t=>t!==e.constraintType)));return r!==en?r:void 0}(e);for(const t of Rd(e.source)){if(s&&!SS(Ev(t,8576),s))continue;const n=8192|(r&&oM(t)?8:0),o=No(4|t.flags&i,t.escapedName,n);if(o.declarations=t.declarations,o.links.nameType=Uo(t).nameType,o.links.propertyType=$l(t),8388608&e.constraintType.type.flags&&262144&e.constraintType.type.objectType.flags&&262144&e.constraintType.type.indexType.flags){const t=e.constraintType.type.objectType,n=ad(e.mappedType,e.constraintType.type,t);o.links.mappedType=n,o.links.constraintType=Av(t)}else o.links.mappedType=e.mappedType,o.links.constraintType=e.constraintType;a.set(t.escapedName,o)}Ss(e,a,u,u,o)}(e):16&e.objectFlags?function(e){if(e.target)return Ss(e,w,u,u,u),void Ss(e,Gu(Md(e.target),e.mapper,!1),Px(Vp(e.target,0),e.mapper),Px(Vp(e.target,1),e.mapper),Nx(cf(e.target),e.mapper));const t=ts(e.symbol);if(2048&t.flags){Ss(e,w,u,u,u);const n=m_(t),r=Jf(n.get("__call")),i=Jf(n.get("__new"));return void Ss(e,n,r,i,Um(t))}let n,r,i=Ga(t);if(t===he){const e=new Map;i.forEach((t=>{var n;418&t.flags||512&t.flags&&(null==(n=t.declarations)?void 0:n.length)&&x(t.declarations,sp)||e.set(t.escapedName,t)})),i=e}if(Ss(e,i,u,u,u),32&t.flags){const e=xu(Nu(t));11272192&e.flags?(i=ed(function(e){const t=bs(e),n=zm(e);return n?Z(t,[n]):t}(i)),Yu(i,Rd(e))):e===St&&(r=Vm(Jt,St,!1))}const o=zm(i);if(o?n=Wm(o):(r&&(n=ue(n,r)),384&t.flags&&(32&ju(t).flags||Q(e.properties,(e=>!!(296&$l(e).flags))))&&(n=ue(n,oi))),Ss(e,i,u,u,n||u),8208&t.flags&&(e.callSignatures=Jf(t)),32&t.flags){const n=Nu(t);let r=t.members?Jf(t.members.get("__constructor")):u;16&t.flags&&(r=pe(r.slice(),q(e.callSignatures,(e=>rO(e.declaration)?x_(e.declaration,e.typeParameters,e.thisParameter,e.parameters,n,void 0,e.minArgumentCount,167&e.flags):void 0)))),r.length||(r=function(e){const t=Vp(xu(e),1),n=Cx(e.symbol),r=!!n&&Bv(n,64);if(0===t.length)return[x_(void 0,e.localTypeParameters,void 0,u,e,void 0,0,r?4:0)];const i=du(e),o=Mm(i),a=Oh(i),s=p(a),c=[];for(const n of t){const t=kf(n.typeParameters),i=p(n.typeParameters);if(o||s>=t&&s<=i){const s=i?vm(n,Tf(a,n.typeParameters,t,o)):S_(n);s.typeParameters=e.localTypeParameters,s.resolvedReturnType=e,s.flags=r?4|s.flags:-5&s.flags,c.push(s)}}return c}(n)),e.constructSignatures=r}}(e):32&e.objectFlags?function(e){const t=ed();let n;Ss(e,w,u,u,u);const r=fd(e),i=md(e),o=e.target||e,a=hd(o),s=2!==Id(o),c=yd(o),l=mp(wd(e)),_=Dd(e);function d(i){vD(a?eS(a,qx(e.mapper,r,i)):i,(o=>function(i,o){if(mC(o)){const n=gC(o),r=t.get(n);if(r)r.links.nameType=ev([r.links.nameType,o]),r.links.keyType=ev([r.links.keyType,i]);else{const r=mC(i)?Jp(l,gC(i)):void 0,a=!!(4&_||!(8&_)&&r&&16777216&r.flags),c=!!(1&_||!(2&_)&&r&&oM(r)),u=U&&!a&&r&&16777216&r.flags,d=No(4|(a?16777216:0),n,262144|(r?cd(r):0)|(c?8:0)|(u?524288:0));d.links.mappedType=e,d.links.nameType=o,d.links.keyType=i,r&&(d.links.syntheticOrigin=r,d.declarations=s?r.declarations:void 0),t.set(n,d)}}else if(ng(o)||33&o.flags){const t=5&o.flags?Jt:40&o.flags?zt:o,a=eS(c,qx(e.mapper,r,i)),s=mf(l,o),u=Vm(t,a,!!(1&_||!(2&_)&&(null==s?void 0:s.isReadonly)));n=od(n,u,!0)}}(i,o)))}bd(e)?pd(l,8576,!1,d):vD(sd(i),d),Ss(e,t,u,u,n||u)}(e):xn.fail("Unhandled object type "+xn.formatObjectFlags(e.objectFlags)):1048576&e.flags?function(e){const t=F_(O(e.types,(e=>e===Wn?[ni]:Vp(e,0)))),n=F_(O(e.types,(e=>Vp(e,1)))),r=z_(e.types);Ss(e,w,t,n,r)}(e):2097152&e.flags?function(e){let t,n,r;const i=e.types,o=W_(i),a=N(o,(e=>e));for(let s=0;s0&&(e=O(e,(e=>{const t=S_(e);return t.resolvedReturnType=rd(Gf(e),i,o,s),t}))),n=id(n,e)}t=id(t,Vp(c,0)),r=Oe(cf(c),((e,t)=>od(e,t,!1)),r)}Ss(e,w,t||u,n||u,r||u)}(e):xn.fail("Unhandled type "+xn.formatTypeFlags(e.flags))),e}function Md(e){return 524288&e.flags?Od(e).properties:u}function Ld(e,t){if(524288&e.flags){const n=Od(e).members.get(t);if(n&&ds(n))return n}}function jd(e){if(!e.resolvedProperties){const t=ed();for(const n of e.types){for(const r of Rd(n))if(!t.has(r.escapedName)){const n=xp(e,r.escapedName,!!(2097152&e.flags));n&&t.set(r.escapedName,n)}if(1048576&e.flags&&0===cf(n).length)break}e.resolvedProperties=bs(t)}return e.resolvedProperties}function Rd(e){return 3145728&(e=yp(e)).flags?jd(e):Md(e)}function Bd(e){return 262144&e.flags?Jd(e):8388608&e.flags?function(e){return Xd(e)?function(e){if(up(e))return Ob(e.objectType,e.indexType);const t=$d(e.indexType);if(t&&t!==e.indexType){const n=jb(e.objectType,t,e.accessFlags);if(n)return n}const n=$d(e.objectType);return n&&n!==e.objectType?jb(n,e.indexType,e.accessFlags):void 0}(e):void 0}(e):16777216&e.flags?Kd(e):Wd(e)}function Jd(e){return Xd(e)?ug(e):void 0}function zd(e,t=0){var n;return t<5&&!(!e||!(262144&e.flags&&Q(null==(n=e.symbol)?void 0:n.declarations,(e=>Bv(e,4096)))||3145728&e.flags&&Q(e.types,(e=>zd(e,t)))||8388608&e.flags&&zd(e.objectType,t+1)||16777216&e.flags&&zd(Kd(e),t+1)||33554432&e.flags&&zd(e.baseType,t)||32&wx(e)&&function(e,t){const n=Gx(e);return!!n&&zd(n,t)}(e,t)||NT(e)&&T($y(e),((n,r)=>!!(8&e.target.elementFlags[r])&&zd(n,t)))>=0))}function $d(e){const t=Nb(e,!1);return t!==e?t:Bd(e)}function qd(e){if(!e.resolvedDefaultConstraint){const t=function(e){return e.resolvedInferredTrueType||(e.resolvedInferredTrueType=e.combinedMapper?eS(Sx(e.root.node.trueType),e.combinedMapper):Vb(e))}(e),n=Ub(e);e.resolvedDefaultConstraint=Ec(t)?n:Ec(n)?t:ev([t,n])}return e.resolvedDefaultConstraint}function Vd(e){if(void 0!==e.resolvedConstraintOfDistributive)return e.resolvedConstraintOfDistributive||void 0;if(e.root.isDistributive&&e.restrictiveInstantiation!==e){const t=Nb(e.checkType,!1),n=t===e.checkType?Bd(t):t;if(n&&n!==e.checkType){const t=Zx(e,$x(e.root.checkType,n,e.mapper),!0);if(!(131072&t.flags))return e.resolvedConstraintOfDistributive=t,t}}e.resolvedConstraintOfDistributive=!1}function Ud(e){return Vd(e)||qd(e)}function Kd(e){return Xd(e)?Ud(e):void 0}function Wd(e){if(464781312&e.flags||NT(e)){const t=Zd(e);return t!==On&&t!==Mn?t:void 0}return 4194304&e.flags?pn:void 0}function Hd(e){return Wd(e)||e}function Xd(e){return Zd(e)!==Mn}function Zd(e){if(e.resolvedBaseConstraint)return e.resolvedBaseConstraint;const t=[];return e.resolvedBaseConstraint=n(e);function n(e){if(!e.immediateBaseConstraint){if(!_c(e,4))return Mn;let n;const o=Rk(e);if((t.length<10||t.length<50&&!D(t,o))&&(t.push(o),n=function(e){if(262144&e.flags){const t=ug(e);return e.isThisType||!t?t:i(t)}if(3145728&e.flags){const t=e.types,n=[];let r=!1;for(const e of t){const t=i(e);t?(t!==e&&(r=!0),n.push(t)):r=!0}return r?1048576&e.flags&&n.length===t.length?ev(n):2097152&e.flags&&n.length?cv(n):void 0:e}if(4194304&e.flags)return pn;if(134217728&e.flags){const t=e.types,n=q(t,i);return n.length===t.length?Ov(e.texts,n):Jt}if(268435456&e.flags){const t=i(e.type);return t&&t!==e.type?Gv(e.symbol,t):Jt}if(8388608&e.flags){if(up(e))return i(Ob(e.objectType,e.indexType));const t=i(e.objectType),n=i(e.indexType),r=t&&n&&jb(t,n,e.accessFlags);return r&&i(r)}if(16777216&e.flags){const t=Ud(e);return t&&i(t)}return 33554432&e.flags?i(Ch(e)):NT(e)?Ay(O($y(e),((t,n)=>{const r=262144&t.flags&&8&e.target.elementFlags[n]&&i(t)||t;return r!==t&&xD(r,(e=>Uk(e)&&!NT(e)))?r:t})),e.target.elementFlags,e.target.readonly,e.target.labeledElementDeclarations):e}(Nb(e,!1)),t.pop()),!gc()){if(262144&e.flags){const t=cg(e);if(t){const n=xo(t,va.Type_parameter_0_has_a_circular_constraint,Ws(e));!r||_h(t,r)||_h(r,t)||fT(n,Rp(r,va.Circularity_originates_in_type_at_this_location))}}n=Mn}e.immediateBaseConstraint??(e.immediateBaseConstraint=n||On)}return e.immediateBaseConstraint}function i(e){const t=n(e);return t!==On&&t!==Mn?t:void 0}}function tp(e){if(e.default)e.default===Ln&&(e.default=Mn);else if(e.target){const t=tp(e.target);e.default=t?eS(t,e.mapper):On}else{e.default=Ln;const t=e.symbol&&f(e.symbol.declarations,(e=>aE(e)&&e.default)),n=t?Sx(t):On;e.default===Ln&&(e.default=n)}return e.default}function np(e){const t=tp(e);return t!==On&&t!==Mn?t:void 0}function rp(e){return!(!e.symbol||!f(e.symbol.declarations,(e=>aE(e)&&e.default)))}function ip(e){return e.resolvedApparentType||(e.resolvedApparentType=function(e){const t=e.target??e,n=Gx(t);if(n&&!t.declaration.nameType){const r=wd(e),i=Ad(r)?ip(r):Wd(r);if(i&&xD(i,(e=>Uk(e)||lp(e))))return eS(t,$x(n,i,e.mapper))}return e}(e))}function lp(e){return!!(2097152&e.flags)&&x(e.types,Uk)}function up(e){let t;return!(!(8388608&e.flags&&32&wx(t=e.objectType)&&!Ad(t)&&gb(e.indexType))||8&Dd(t)||t.declaration.nameType)}function mp(e){const t=465829888&e.flags?Wd(e)||At:e,n=wx(t);return 32&n?ip(t):4&n&&t!==e?y_(t,e):2097152&t.flags?function(e,t){if(e===t)return e.resolvedApparentType||(e.resolvedApparentType=y_(e,t,!0));const n=`I${qy(e)},${qy(t)}`;return fo(n)??mo(n,y_(e,t,!0))}(t,e):402653316&t.flags?Yn:296&t.flags?Zn:2112&t.flags?Rr||(Rr=Xh("BigInt",0,!1))||wn:528&t.flags?er:12288&t.flags?uy():67108864&t.flags?wn:4194304&t.flags?pn:2&t.flags&&!U?wn:t}function yp(e){return Sp(mp(Sp(e)))}function vp(e,t,n){var r,i,o;let a,s,c;const l=1048576&e.flags;let u,_=4,d=l?0:8,f=!1;for(const r of e.types){const e=mp(r);if(!(Nc(e)||131072&e.flags)){const r=Jp(e,t,n),i=r?fx(r):0;if(r){if(106500&r.flags&&(u??(u=l?0:16777216),l?u|=16777216&r.flags:u&=r.flags),a){if(r!==a)if((Zj(r)||r)===(Zj(a)||a)&&-1===Bk(a,r,((e,t)=>e===t?-1:0)))f=!!a.parent&&!!p(nu(a.parent));else{s||(s=new Map,s.set(OB(a),a));const e=OB(r);s.has(e)||s.set(e,r)}}else a=r;l&&oM(r)?d|=8:l||oM(r)||(d&=-9),d|=(6&i?0:256)|(4&i?512:0)|(2&i?1024:0)|(256&i?2048:0),lA(r)||(_=2)}else if(l){const n=!s_(t)&&gf(e,t);n?(d|=32|(n.isReadonly?8:0),c=ue(c,PT(e)?MT(e)||It:n.type)):!Tw(e)||2097152&wx(e)?d|=16:(d|=32,c=ue(c,It))}}}if(!a||l&&(s||48&d)&&1536&d&&(!s||!function(e){let t;for(const n of e){if(!n.declarations)return;if(t){if(t.forEach((e=>{D(n.declarations,e)||t.delete(e)})),0===t.size)return}else t=new Set(n.declarations)}return t}(s.values())))return;if(!(s||16&d||c)){if(f){const t=null==(r=lt(a,td))?void 0:r.links,n=FC(a,null==t?void 0:t.type);return n.parent=null==(o=null==(i=a.valueDeclaration)?void 0:i.symbol)?void 0:o.parent,n.links.containingType=e,n.links.mapper=null==t?void 0:t.mapper,n.links.writeType=zl(a),n}return a}const m=s?$e(s.values()):[a];let g,h,y;const v=[];let b,x,S=!1;for(const e of m){x?e.valueDeclaration&&e.valueDeclaration!==x&&(S=!0):x=e.valueDeclaration,g=pe(g,e.declarations);const t=$l(e);h||(h=t,y=Uo(e).nameType);const n=zl(e);(b||n!==t)&&(b=ue(b||v.slice(),n)),t!==h&&(d|=64),(sT(t)||sb(t))&&(d|=128),131072&t.flags&&t!==Sn&&(d|=131072),v.push(t)}pe(v,c);const k=No(4|(u??0),t,_|d);return k.links.containingType=e,!S&&x&&(k.valueDeclaration=x,x.symbol.parent&&(k.parent=x.symbol.parent)),k.declarations=g,k.links.nameType=y,v.length>2?(k.links.checkFlags|=65536,k.links.deferralParent=e,k.links.deferralConstituents=v,k.links.deferralWriteConstituents=b):(k.links.type=l?ev(v):cv(v),b&&(k.links.writeType=l?ev(b):cv(b))),k}function bp(e,t,n){var r,i,o;let a=n?null==(r=e.propertyCacheWithoutObjectFunctionPropertyAugment)?void 0:r.get(t):null==(i=e.propertyCache)?void 0:i.get(t);return!a&&(a=vp(e,t,n),a)&&((n?e.propertyCacheWithoutObjectFunctionPropertyAugment||(e.propertyCacheWithoutObjectFunctionPropertyAugment=ed()):e.propertyCache||(e.propertyCache=ed())).set(t,a),!n||48&px(a)||(null==(o=e.propertyCache)?void 0:o.get(t))||(e.propertyCache||(e.propertyCache=ed())).set(t,a)),a}function xp(e,t,n){const r=bp(e,t,n);return!r||16&px(r)?void 0:r}function Sp(e){return 1048576&e.flags&&16777216&e.objectFlags?e.resolvedReducedType||(e.resolvedReducedType=function(e){const t=L(e.types,Sp);if(t===e.types)return e;const n=ev(t);return 1048576&n.flags&&(n.resolvedReducedType=n),n}(e)):2097152&e.flags?(16777216&e.objectFlags||(e.objectFlags|=16777216|(Q(jd(e),kp)?33554432:0)),33554432&e.objectFlags?en:e):e}function kp(e){return Tp(e)||Cp(e)}function Tp(e){return!(16777216&e.flags||192!=(131264&px(e))||!(131072&$l(e).flags))}function Cp(e){return!e.valueDeclaration&&!!(1024&px(e))}function Ep(e){return!!(1048576&e.flags&&16777216&e.objectFlags&&Q(e.types,Ep)||2097152&e.flags&&function(e){const t=e.uniqueLiteralFilledInstantiation||(e.uniqueLiteralFilledInstantiation=eS(e,kn));return Sp(t)!==t}(e))}function Mp(e,t){if(2097152&t.flags&&33554432&wx(t)){const n=S(jd(t),Tp);if(n)return uS(e,va.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents,Ws(t,void 0,536870912),Us(n));const r=S(jd(t),Cp);if(r)return uS(e,va.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some,Ws(t,void 0,536870912),Us(r))}return e}function Jp(e,t,n,r){var i,o;if(524288&(e=yp(e)).flags){const a=Od(e),s=a.members.get(t);if(s&&!r&&512&(null==(i=e.symbol)?void 0:i.flags)&&(null==(o=Uo(e.symbol).typeOnlyExportStarMap)?void 0:o.has(t)))return;if(s&&ds(s,r))return s;if(n)return;const c=a===In?Wn:a.callSignatures.length?Hn:a.constructSignatures.length?Gn:void 0;if(c){const e=Ld(c,t);if(e)return e}return Ld(Kn,t)}if(2097152&e.flags){return xp(e,t,!0)||(n?void 0:xp(e,t,n))}if(1048576&e.flags)return xp(e,t,n)}function qp(e,t){if(3670016&e.flags){const n=Od(e);return 0===t?n.callSignatures:n.constructSignatures}return u}function Vp(e,t){const n=qp(yp(e),t);if(0===t&&!p(n)&&1048576&e.flags){if(e.arrayFallbackSignatures)return e.arrayFallbackSignatures;let r;if(xD(e,(e=>{var t,n;return!(!(null==(t=e.symbol)?void 0:t.parent)||(n=e.symbol.parent,!(n&&Xn.symbol&&Qn.symbol)||!us(n,Xn.symbol)&&!us(n,Qn.symbol))||(r?r!==e.symbol.escapedName:(r=e.symbol.escapedName,0)))}))){const n=Ty(DD(e,(e=>Ax((Wp(e.symbol.parent)?Qn:Xn).typeParameters[0],e.mapper))),bD(e,(e=>Wp(e.symbol.parent))));return e.arrayFallbackSignatures=Vp(Tc(n,r),t)}e.arrayFallbackSignatures=n}return n}function Wp(e){return!(!e||!Qn.symbol||!us(e,Qn.symbol))}function rf(e,t){return S(e,(e=>e.keyType===t))}function of(e,t){let n,r,i;for(const o of e)o.keyType===Jt?n=o:af(t,o.keyType)&&(r?(i||(i=[r])).push(o):r=o);return i?Vm(At,cv(O(i,(e=>e.type))),Oe(i,((e,t)=>e&&t.isReadonly),!0)):r||(n&&af(t,Jt)?n:void 0)}function af(e,t){return SS(e,t)||t===Jt&&SS(e,zt)||t===zt&&(e===yn||!!(128&e.flags)&&WT(e.value))}function sf(e){return 3670016&e.flags?Od(e).indexInfos:u}function cf(e){return sf(yp(e))}function _f(e,t){return rf(cf(e),t)}function pf(e,t){var n;return null==(n=_f(e,t))?void 0:n.type}function ff(e,t){return cf(e).filter((e=>af(t,e.keyType)))}function mf(e,t){return of(cf(e),t)}function gf(e,t){return mf(e,s_(t)?Qt:lx(vc(t)))}function hf(e){var t;let n;for(const t of ml(e))n=me(n,Lu(t.symbol));return(null==n?void 0:n.length)?n:HP(e)?null==(t=Df(e))?void 0:t.typeParameters:void 0}function yf(e){const t=[];return e.forEach(((e,n)=>{vs(n)||t.push(e)})),t}function vf(e,t){if(Os(e))return;const n=Ho(de,'"'+e+'"',512);return n&&t?ts(n):n}function bf(e){return Pg(e)||eC(e)||sE(e)&&rC(e)}function xf(e){if(bf(e))return!0;if(!sE(e))return!1;if(e.initializer){const t=Cf(e.parent),n=e.parent.parameters.indexOf(e);return xn.assert(n>=0),n>=AO(t,3)}const t=cm(e.parent);return!!t&&!e.type&&!e.dotDotDotToken&&e.parent.parameters.indexOf(e)>=FI(t).length}function Sf(e,t,n,r){return{kind:e,parameterName:t,parameterIndex:n,type:r}}function kf(e){let t=0;if(e)for(let n=0;n=n&&o<=i){const n=e?e.slice():[];for(let e=o;ec.arguments.length&&!_||(o=n.length)}if((177===e.kind||178===e.kind)&&l_(e)&&(!s||!r)){const t=177===e.kind?178:177,n=Y_(ns(e),t);n&&(r=function(e){const t=tJ(e);return t&&t.symbol}(n))}a&&a.typeExpression&&(r=FC(No(1,"this"),Sx(a.typeExpression)));const u=sF(e)?Kg(e):e,_=u&&fE(u)?Nu(ts(u.parent.symbol)):void 0,d=_?_.localTypeParameters:hf(e);(V_(e)||Mm(e)&&function(e,t){if(sF(e)||!Ef(e))return!1;const n=we(e.parameters),r=g(n?Oc(n):ll(e).filter(xF),(e=>e.typeExpression&&rF(e.typeExpression.type)?e.typeExpression.type:void 0)),i=No(3,"args",32768);return r?i.links.type=Ty(Sx(r.type)):(i.links.checkFlags|=65536,i.links.deferralParent=en,i.links.deferralConstituents=[rr],i.links.deferralWriteConstituents=[rr]),r&&t.pop(),t.push(i),!0}(e,n))&&(i|=1),(kE(e)&&Bv(e,64)||fE(e)&&Bv(e.parent,64))&&(i|=4),t.resolvedSignature=x_(e,d,r,n,void 0,void 0,o,i)}return t.resolvedSignature}function Df(e){if(!Mm(e)||!uu(e))return;const t=ol(e);return(null==t?void 0:t.typeExpression)&&hI(Sx(t.typeExpression))}function Ef(e){const t=Wo(e);return void 0===t.containsArgumentsReference&&(512&t.flags?t.containsArgumentsReference=!0:t.containsArgumentsReference=function e(t){if(!t)return!1;switch(t.kind){case 80:return t.escapedText===Ee.escapedName&&pB(t)===Ee;case 172:case 174:case 177:case 178:return 167===t.name.kind&&e(t.name);case 211:case 212:return e(t.expression);case 303:return e(t.initializer);default:return!cy(t)&&!wf(t)&&!!LI(t,e)}}(e.body)),t.containsArgumentsReference}function Jf(e){if(!e||!e.declarations)return u;const t=[];for(let n=0;n0&&r.body){const t=e.declarations[n-1];if(r.parent===t.parent&&r.kind===t.kind&&r.pos===t.end)continue}if(Mm(r)&&r.jsDoc){const e=Vg(r);if(p(e)){for(const n of e){const e=n.typeExpression;void 0!==e.type||fE(r)||zC(e,St),t.push(Cf(e))}continue}}t.push(!UT(r)&&!$f(r)&&Df(r)||Cf(r))}}return t}function zf(e){const t=ja(e,e);if(t){const e=$a(t);if(e)return $l(e)}return St}function Kf(e){if(e.thisParameter)return $l(e.thisParameter)}function Wf(e){if(!e.resolvedTypePredicate){if(e.target){const r=Wf(e.target);e.resolvedTypePredicate=r?(t=r,n=e.mapper,Sf(t.kind,t.parameterName,t.parameterIndex,eS(t.type,n))):ei}else if(e.compositeSignatures)e.resolvedTypePredicate=function(e,t){let n;const r=[];for(const i of e){const e=Wf(i);if(e){if(0!==e.kind&&1!==e.kind||n&&!nv(n,e))return;n=e,r.push(e.type)}else{const e=2097152!==t?Gf(i):void 0;if(e!==qt&&e!==Vt)return}}if(!n)return;const i=Hf(r,t);return Sf(n.kind,n.parameterName,n.parameterIndex,i)}(e.compositeSignatures,e.compositeKind)||ei;else{const t=e.declaration&&Cv(e.declaration);let n;if(!t){const t=Df(e.declaration);t&&e!==t&&(n=Wf(t))}if(t||n)e.resolvedTypePredicate=t&&bE(t)?function(e,t){const n=e.parameterName,r=e.type&&Sx(e.type);return 197===n.kind?Sf(e.assertsModifier?2:0,void 0,void 0,r):Sf(e.assertsModifier?3:1,n.escapedText,T(t.parameters,(e=>e.escapedName===n.escapedText)),r)}(t,e):n||ei;else if(e.declaration&&uu(e.declaration)&&(!e.resolvedReturnType||16&e.resolvedReturnType.flags)&&FO(e)>0){const{declaration:t}=e;e.resolvedTypePredicate=ei,e.resolvedTypePredicate=function(e){switch(e.kind){case 176:case 177:case 178:return}if(0!==Jh(e))return;let t;if(e.body&&241!==e.body.kind)t=e.body;else if(Pf(e.body,(e=>{if(t||!e.expression)return!0;t=e.expression}))||!t||ZO(e))return;return function(e,t){return 16&DM(t=lh(t,!0)).flags?f(e.parameters,((n,r)=>{const i=$l(n.symbol);if(!i||16&i.flags||!qD(n.name)||YD(n.symbol)||U_(n))return;const o=function(e,t,n,r){const i=t.flowNode||253===t.parent.kind&&t.parent.flowNode||FR(2,void 0,void 0),o=FR(32,t,i),a=XD(n.name,r,r,e,o);if(a===r)return;const s=FR(64,t,i);return 131072&XD(n.name,r,a,e,s).flags?a:void 0}(e,t,n,i);return o?Sf(1,vc(n.name.escapedText),r,o):void 0})):void 0}(e,t)}(t)||ei}else e.resolvedTypePredicate=ei}xn.assert(!!e.resolvedTypePredicate)}var t,n;return e.resolvedTypePredicate===ei?void 0:e.resolvedTypePredicate}function Hf(e,t,n){return 2097152!==t?ev(e,n):cv(e)}function Gf(e){if(!e.resolvedReturnType){if(!_c(e,3))return Dt;let t=e.target?eS(Gf(e.target),e.mapper):e.compositeSignatures?eS(Hf(O(e.compositeSignatures,Gf),e.compositeKind,2),e.mapper):Xf(e.declaration)||(Nd(e.declaration.body)?St:HO(e.declaration));if(8&e.flags?t=nC(t):16&e.flags&&(t=XT(t)),!gc()){if(e.declaration){const t=Cv(e.declaration);if(t)xo(t,va.Return_type_annotation_circularly_references_itself);else if(Y){const t=e.declaration,n=Pc(t);n?xo(n,va._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Ap(n)):xo(t,va.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}t=St}e.resolvedReturnType??(e.resolvedReturnType=t)}return e.resolvedReturnType}function Xf(e){if(176===e.kind)return Nu(ts(e.parent.symbol));const t=Cv(e);if(sF(e)){const n=Hg(e);if(n&&fE(n.parent)&&!t)return Nu(ts(n.parent.parent.symbol))}if(Ng(e))return Sx(e.parameters[0].type);if(t)return Sx(t);if(177===e.kind&&l_(e)){const t=Mm(e)&&Kc(e);if(t)return t;const n=Nl(Y_(ns(e),178));if(n)return n}return function(e){const t=Df(e);return t&&Gf(t)}(e)}function Yf(e){return e.compositeSignatures&&Q(e.compositeSignatures,Yf)||!e.resolvedReturnType&&dc(e,3)>=0}function lm(e){if(JB(e)){const t=$l(e.parameters[e.parameters.length-1]),n=PT(t)?MT(t):t;return n&&pf(n,zt)}}function hm(e,t,n,r){const i=ym(e,Tf(t,e.typeParameters,kf(e.typeParameters),n));if(r){const e=yI(Gf(i));if(e){const t=S_(e);t.typeParameters=r;const n=S_(i);return n.resolvedReturnType=Om(t),n}}return i}function ym(e,t){const n=e.instantiations||(e.instantiations=new Map),r=fg(t);let i=n.get(r);return i||n.set(r,i=vm(e,t)),i}function vm(e,t){return Ux(e,function(e,t){return Fx(e.typeParameters,t)}(e,t),!0)}function Sm(e){return e.typeParameters?e.erasedSignatureCache||(e.erasedSignatureCache=function(e){return Ux(e,Jx(e.typeParameters),!0)}(e)):e}function Am(e){const t=e.typeParameters;if(t){if(e.baseSignatureCache)return e.baseSignatureCache;const n=Jx(t),r=Fx(t,O(t,(e=>Jd(e)||At)));let i=O(t,(e=>eS(e,r)||At));for(let e=0;e{ng(e)&&!rf(t,e)&&t.push(Vm(e,n.type?Sx(n.type):St,Rv(n,8),n))}))}return t}return u}function ng(e){return!!(4108&e.flags)||sb(e)||!!(2097152&e.flags)&&!lb(e)&&Q(e.types,ng)}function cg(e){return q(F(e.symbol&&e.symbol.declarations,aE),gl)[0]}function lg(e,t){var n;let r;if(null==(n=e.symbol)?void 0:n.declarations)for(const n of e.symbol.declarations)if(195===n.parent.kind){const[i=n.parent,o]=sh(n.parent.parent);if(183!==o.kind||t){if(169===o.kind&&o.dotDotDotToken||191===o.kind||202===o.kind&&o.dotDotDotToken)r=ue(r,Ty(At));else if(204===o.kind)r=ue(r,Jt);else if(168===o.kind&&200===o.parent.kind)r=ue(r,pn);else if(200===o.kind&&o.type&&lh(o.type)===n.parent&&194===o.parent.kind&&o.parent.extendsType===o&&200===o.parent.checkType.kind&&o.parent.checkType.type){const e=o.parent.checkType;r=ue(r,eS(Sx(e.type),Mx(Lu(ns(e.typeParameter)),e.typeParameter.constraint?Sx(e.typeParameter.constraint):pn)))}}else{const t=o,n=sL(t);if(n){const o=t.typeArguments.indexOf(i);if(o()=>iL(t,n,r)))));o!==e&&(r=ue(r,o))}}}}}return r&&cv(r)}function ug(e){if(!e.constraint)if(e.target){const t=Jd(e.target);e.constraint=t?eS(t,e.mapper):On}else{const t=cg(e);if(t){let n=Sx(t);1&n.flags&&!Nc(n)&&(n=200===t.parent.parent.kind?pn:At),e.constraint=n}else e.constraint=lg(e)||On}return e.constraint===On?void 0:e.constraint}function pg(e){const t=Y_(e.symbol,168),n=CF(t.parent)?qg(t.parent):t.parent;return n&&rs(n)}function fg(e){let t="";if(e){const n=e.length;let r=0;for(;r1&&(t+=":"+o),r+=o}}return t}function vg(e,t){return e?`@${OB(e)}`+(t?`:${fg(t)}`:""):""}function xg(e,t){let n=0;for(const r of e)void 0!==t&&r.flags&t||(n|=wx(r));return 458752&n}function kg(e,t){return Q(t)&&e===An?At:Tg(e,t)}function Tg(e,t){const n=fg(t);let r=e.instantiations.get(n);return r||(r=hs(4,e.symbol),e.instantiations.set(n,r),r.objectFlags|=t?xg(t):0,r.target=e,r.resolvedTypeArguments=t),r}function Dg(e){const t=fs(e.flags,e.symbol);return t.objectFlags=e.objectFlags,t.target=e.target,t.resolvedTypeArguments=e.resolvedTypeArguments,t}function Eg(e,t,n,r,i){if(!r){const e=Yb(r=Qb(t));i=n?Dx(e,n):e}const o=hs(4,e.symbol);return o.target=e,o.node=t,o.mapper=n,o.aliasSymbol=r,o.aliasTypeArguments=i,o}function Ig(e){var t,n;if(!e.resolvedTypeArguments){if(!_c(e,5))return(null==(t=e.target.localTypeParameters)?void 0:t.map((()=>Dt)))||u;const i=e.node,o=i?183===i.kind?Z(e.target.outerTypeParameters,oL(i,e.target.localTypeParameters)):188===i.kind?[Sx(i.elementType)]:O(i.elements,Sx):u;gc()?e.resolvedTypeArguments??(e.resolvedTypeArguments=e.mapper?Dx(o,e.mapper):o):(e.resolvedTypeArguments??(e.resolvedTypeArguments=(null==(n=e.target.localTypeParameters)?void 0:n.map((()=>Dt)))||u),xo(e.node||r,e.target.symbol?va.Type_arguments_for_0_circularly_reference_themselves:va.Tuple_type_arguments_circularly_reference_themselves,e.target.symbol&&Us(e.target.symbol)))}return e.resolvedTypeArguments}function Og(e){return p(e.target.typeParameters)}function Lg(e,t){const n=ju(ts(t)),r=n.localTypeParameters;if(r){const t=p(e.typeArguments),i=kf(r),o=Mm(e);if((Y||!o)&&(tr.length)){const t=o&&hP(e)&&!cF(e.parent);if(xo(e,i===r.length?t?va.Expected_0_type_arguments_provide_these_with_an_extends_tag:va.Generic_type_0_requires_1_type_argument_s:t?va.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:va.Generic_type_0_requires_between_1_and_2_type_arguments,Ws(n,void 0,2),i,r.length),!o)return Dt}return 183===e.kind&&Ey(e,p(e.typeArguments)!==r.length)?Eg(n,e,void 0):Tg(n,Z(n.outerTypeParameters,Tf(Oh(e),r,i,o)))}return Fh(e,t)?n:Dt}function Bg(e,t,n,r){const i=ju(e);if(i===Ft){const n=NB.get(e.escapedName);if(void 0!==n&&t&&1===t.length)return 4===n?nh(t[0]):Gv(e,t[0])}const o=Uo(e),a=o.typeParameters,s=fg(t)+vg(n,r);let c=o.instantiations.get(s);return c||o.instantiations.set(s,c=tS(i,Fx(a,Tf(t,a,kf(a),Mm(e.valueDeclaration))),n,r)),c}function Jg(e){var t;const n=null==(t=e.declarations)?void 0:t.find(Ag);return!(!n||!Qf(n))}function zg(e){return e.parent?`${zg(e.parent)}.${e.escapedName}`:e.escapedName}function Xg(e){const t=(166===e.kind?e.right:211===e.kind?e.name:e).escapedText;if(t){const n=166===e.kind?Xg(e.left):211===e.kind?Xg(e.expression):void 0,r=n?`${zg(n)}.${t}`:t;let i=vt.get(r);return i||(vt.set(r,i=No(524288,t,1048576)),i.parent=n,i.links.declaredType=Et),i}return ht}function Qg(e,t,n){const r=function(e){switch(e.kind){case 183:return e.typeName;case 233:const t=e.expression;if(vb(t))return t}}(e);if(!r)return ht;const i=Ma(r,t,n);return i&&i!==ht?i:n?ht:Xg(r)}function Yg(e,t){if(t===ht)return Dt;if(96&(t=function(e){const t=e.valueDeclaration;if(!t||!Mm(t)||524288&e.flags||Ym(t,!1))return;const n=KP(t)?Xm(t):Qm(t);if(n){const t=rs(n);if(t)return iO(t,e)}}(t)||t).flags)return Lg(e,t);if(524288&t.flags)return function(e,t){if(1048576&px(t)){const n=Oh(e),r=vg(t,n);let i=bt.get(r);return i||(i=gs(1,"error",void 0,`alias ${r}`),i.aliasSymbol=t,i.aliasTypeArguments=n,bt.set(r,i)),i}const n=ju(t),r=Uo(t).typeParameters;if(r){const n=p(e.typeArguments),i=kf(r);if(nr.length)return xo(e,i===r.length?va.Generic_type_0_requires_1_type_argument_s:va.Generic_type_0_requires_between_1_and_2_type_arguments,Us(t),i,r.length),Dt;const o=Qb(e);let a,s=!o||!Jg(t)&&Jg(o)?void 0:o;if(s)a=Yb(s);else if(B_(e)){const t=Qg(e,2097152,!0);if(t&&t!==ht){const n=Ea(t);n&&524288&n.flags&&(s=n,a=Oh(e)||(r?[]:void 0))}}return Bg(t,Oh(e),s,a)}return Fh(e,t)?n:Dt}(e,t);const n=qu(t);if(n)return Fh(e,t)?sx(n):Dt;if(111551&t.flags&&Nh(e)){const n=function(e,t){const n=Wo(e);if(!n.resolvedJSDocType){const r=$l(t);let i=r;if(t.valueDeclaration){const n=205===e.kind&&e.qualifier;r.symbol&&r.symbol!==t&&n&&(i=Yg(e,r.symbol))}n.resolvedJSDocType=i}return n.resolvedJSDocType}(e,t);return n||(Qg(e,788968),$l(t))}return Dt}function nh(e){return ih(e)?gh(e,At):e}function ih(e){return!!(3145728&e.flags&&Q(e.types,ih)||33554432&e.flags&&!ph(e)&&ih(e.baseType)||524288&e.flags&&!ok(e)||432275456&e.flags&&!sb(e))}function ph(e){return!!(33554432&e.flags&&2&e.constraint.flags)}function mh(e,t){return 3&t.flags||t===e||1&e.flags?e:gh(e,t)}function gh(e,t){const n=`${qy(e)}>${qy(t)}`,r=ct.get(n);if(r)return r;const i=ps(33554432);return i.baseType=e,i.constraint=t,ct.set(n,i),i}function Ch(e){return ph(e)?e.baseType:cv([e.constraint,e.baseType])}function Dh(e){return 189===e.kind&&1===e.elements.length}function Ph(e,t,n){return Dh(t)&&Dh(n)?Ph(e,t.elements[0],n.elements[0]):Jb(Sx(t))===Jb(e)?Sx(n):void 0}function Nh(e){return!!(16777216&e.flags)&&(183===e.kind||205===e.kind)}function Fh(e,t){return!e.typeArguments||(xo(e,va.Type_0_is_not_generic,t?Us(t):e.typeName?Ap(e.typeName):bB),!1)}function Ah(e){if(qD(e.typeName)){const t=e.typeArguments;switch(e.typeName.escapedText){case"String":return Fh(e),Jt;case"Number":return Fh(e),zt;case"Boolean":return Fh(e),Xt;case"Void":return Fh(e),Zt;case"Undefined":return Fh(e),It;case"Null":return Fh(e),Rt;case"Function":case"function":return Fh(e),Wn;case"array":return t&&t.length||Y?void 0:rr;case"promise":return t&&t.length||Y?void 0:UO(St);case"Object":if(t&&2===t.length){if(Bm(e)){const e=Sx(t[0]),n=Sx(t[1]),r=e===Jt||e===zt?[Vm(e,n,!1)]:u;return ks(void 0,w,u,u,r)}return St}return Fh(e),Y?void 0:St}}}function Ih(e){const t=Wo(e);if(!t.resolvedType){if(Dl(e)&&Qu(e.parent))return t.resolvedSymbol=ht,t.resolvedType=DM(e.parent.expression);let n,r;const i=788968;Nh(e)&&(r=Ah(e),r||(n=Qg(e,i,!0),n===ht?n=Qg(e,111551|i):Qg(e,i),r=Yg(e,n))),r||(n=Qg(e,i),r=Yg(e,n)),t.resolvedSymbol=n,t.resolvedType=r}return t.resolvedType}function Oh(e){return O(e.typeArguments,Sx)}function Lh(e){const t=Wo(e);if(!t.resolvedType){const n=gO(e);t.resolvedType=sx(RC(n))}return t.resolvedType}function jh(e,t){function n(e){const t=e.declarations;if(t)for(const e of t)switch(e.kind){case 263:case 264:case 266:return e}}if(!e)return t?An:wn;const r=ju(e);return 524288&r.flags?p(r.typeParameters)!==t?(xo(n(e),va.Global_type_0_must_have_1_type_parameter_s,Sc(e),t),t?An:wn):r:(xo(n(e),va.Global_type_0_must_be_a_class_or_interface_type,Sc(e)),t?An:wn)}function Rh(e,t){return qh(e,111551,t?va.Cannot_find_global_value_0:void 0)}function Bh(e,t){return qh(e,788968,t?va.Cannot_find_global_type_0:void 0)}function zh(e,t,n){const r=qh(e,788968,n?va.Cannot_find_global_type_0:void 0);if(!r||(ju(r),p(Uo(r).typeParameters)===t))return r;xo(r.declarations&&S(r.declarations,QP),va.Global_type_0_must_have_1_type_parameter_s,Sc(r),t)}function qh(e,t,n){return je(void 0,e,t,n,!1,!1)}function Xh(e,t,n){const r=Bh(e,n);return r||n?jh(r,t):void 0}function Zh(){return Pr||(Pr=Xh("ImportMeta",0,!0)||wn)}function ey(){if(!Nr){const e=No(0,"ImportMetaExpression"),t=Zh(),n=No(4,"meta",8);n.parent=e,n.links.type=t;const r=ed([n]);e.members=r,Nr=ks(e,r,u,u,u)}return Nr}function ty(e){return Fr||(Fr=Xh("ImportCallOptions",0,e))||wn}function ny(e){return Ar||(Ar=Xh("ImportAttributes",0,e))||wn}function iy(e){return cr||(cr=Rh("Symbol",e))}function uy(){return ur||(ur=Xh("Symbol",0,!1))||wn}function _y(e){return dr||(dr=Xh("Promise",1,e))||An}function dy(e){return mr||(mr=Xh("PromiseLike",1,e))||An}function py(e){return gr||(gr=Rh("Promise",e))}function fy(e){return Tr||(Tr=Xh("AsyncIterable",1,e))||An}function my(e){return yr||(yr=Xh("Iterable",1,e))||An}function gy(e){return Ir||(Ir=Xh("Disposable",0,e))||wn}function hy(e,t=0){const n=qh(e,788968,void 0);return n&&jh(n,t)}function yy(e){return jr||(jr=zh("Awaited",1,e)||(e?ht:void 0)),jr===ht?void 0:jr}function xy(e,t){return e!==An?Tg(e,t):wn}function Sy(e){return xy(_r||(_r=Xh("TypedPropertyDescriptor",1,!0)||An),[e])}function ky(e){return xy(my(!0),[e])}function Ty(e,t){return xy(t?Qn:Xn,[e])}function Cy(e){switch(e.kind){case 190:return 2;case 191:return wy(e);case 202:return e.questionToken?2:e.dotDotDotToken?wy(e):1;default:return 1}}function wy(e){return xx(e.type)?4:8}function Dy(e){return EE(e)||sE(e)?e:void 0}function Ey(e,t){return!!Qb(e)||Py(e)&&(188===e.kind?Ny(e.elementType):189===e.kind?Q(e.elements,Ny):t||Q(e.typeArguments,Ny))}function Py(e){const t=e.parent;switch(t.kind){case 196:case 202:case 183:case 192:case 193:case 199:case 194:case 198:case 188:case 189:return Py(t);case 265:return!0}return!1}function Ny(e){switch(e.kind){case 183:return Nh(e)||!!(524288&Qg(e,788968).flags);case 186:return!0;case 198:return 158!==e.operator&&Ny(e.type);case 196:case 190:case 202:case 316:case 314:case 315:case 309:return Ny(e.type);case 191:return 188!==e.type.kind||Ny(e.type.elementType);case 192:case 193:return Q(e.types,Ny);case 199:return Ny(e.objectType)||Ny(e.indexType);case 194:return Ny(e.checkType)||Ny(e.extendsType)||Ny(e.trueType)||Ny(e.falseType)}return!1}function Ay(e,t,n=!1,r=[]){const i=Iy(t||O(e,(e=>1)),n,r);return i===An?wn:e.length?Oy(i,e):i}function Iy(e,t,n){if(1===e.length&&4&e[0])return t?Qn:Xn;const r=O(e,(e=>1&e?"#":2&e?"?":4&e?".":"*")).join()+(t?"R":"")+(Q(n,(e=>!!e))?","+O(n,(e=>e?IB(e):"_")).join(","):"");let i=Ue.get(r);return i||Ue.set(r,i=function(e,t,n){const r=e.length,i=N(e,(e=>!!(9&e)));let o;const a=[];let s=0;if(r){o=new Array(r);for(let i=0;i!!(8&e.elementFlags[n]&&1179648&t.flags)));if(n>=0)return uv(O(t,((t,n)=>8&e.elementFlags[n]?t:At)))?DD(t[n],(r=>My(e,Fe(t,n,r)))):Dt}const s=[],c=[],l=[];let u=-1,_=-1,d=-1;for(let c=0;c=1e4)return xo(r,wf(r)?va.Type_produces_a_tuple_type_that_is_too_large_to_represent:va.Expression_produces_a_tuple_type_that_is_too_large_to_represent),Dt;f(e,((e,t)=>{var n;return m(e,l.target.elementFlags[t],null==(n=l.target.labeledElementDeclarations)?void 0:n[t])}))}else m(Hk(l)&&pf(l,zt)||Dt,4,null==(o=e.labeledElementDeclarations)?void 0:o[c]);else m(l,u,null==(a=e.labeledElementDeclarations)?void 0:a[c])}for(let e=0;e=0&&_8&c[_+t]?Mb(e,zt):e))),s.splice(_+1,d-_),c.splice(_+1,d-_),l.splice(_+1,d-_));const p=Iy(c,e.readonly,l);return p===An?wn:c.length?Tg(p,s):p;function m(e,t,n){1&t&&(u=c.length),4&t&&_<0&&(_=c.length),6&t&&(d=c.length),s.push(2&t?Hc(e,!0):e),c.push(t),l.push(n)}}function Ly(e,t,n=0){const r=e.target,i=Og(e)-n;return t>r.fixedLength?function(e){const t=MT(e);return t&&Ty(t)}(e)||Ay(u):Ay(Ig(e).slice(t,i),r.elementFlags.slice(t,i),!1,r.labeledElementDeclarations&&r.labeledElementDeclarations.slice(t,i))}function jy(e){return ev(ue(ze(e.target.fixedLength,(e=>lx(""+e))),Av(e.target.readonly?Qn:Xn)))}function Ry(e,t){return e.elementFlags.length-C(e.elementFlags,(e=>!(e&t)))-1}function zy(e){return e.fixedLength+Ry(e,3)}function $y(e){const t=Ig(e),n=Og(e);return t.length===n?t:t.slice(0,n)}function qy(e){return e.id}function Ky(e,t){return Ae(e,t,qy,Nt)>=0}function Wy(e,t){const n=Ae(e,t,qy,Nt);return n<0&&(e.splice(~n,0,t),!0)}function Hy(e,t,n){const r=n.flags;if(!(131072&r))if(t|=473694207&r,465829888&r&&(t|=33554432),2097152&r&&67108864&wx(n)&&(t|=536870912),n===Tt&&(t|=8388608),Nc(n)&&(t|=1073741824),!U&&98304&r)65536&wx(n)||(t|=4194304);else{const t=e.length,r=t&&n.id>e[t-1].id?~t:Ae(e,n,qy,Nt);r<0&&e.splice(~r,0,n)}return t}function Gy(e,t,n){let r;for(const i of n)i!==r&&(t=1048576&i.flags?Gy(e,t|(Qy(i)?1048576:0),i.types):Hy(e,t,i),r=i);return t}function Xy(e,t){return 134217728&t.flags?vw(e,t):pw(e,t)}function Qy(e){return!!(1048576&e.flags&&(e.aliasSymbol||e.origin))}function Yy(e,t){for(const n of t)if(1048576&n.flags){const t=n.origin;n.aliasSymbol||t&&!(1048576&t.flags)?fe(e,n):t&&1048576&t.flags&&Yy(e,t.types)}}function Zy(e,t){const n=ms(e);return n.types=t,n}function ev(e,t=1,n,r,i){if(0===e.length)return en;if(1===e.length)return e[0];if(2===e.length&&!i&&(1048576&e[0].flags||1048576&e[1].flags)){const i=0===t?"N":2===t?"S":"L",o=e[0].id=2&&a[0]===It&&a[1]===Mt&&Yt(a,1),(402664352&s||16384&s&&32768&s)&&function(e,t,n){let r=e.length;for(;r>0;){r--;const i=e[r],o=i.flags;(402653312&o&&4&t||256&o&&8&t||2048&o&&64&t||8192&o&&4096&t||n&&32768&o&&16384&t||cx(i)&&Ky(e,i.regularType))&&Yt(e,r)}}(a,s,!!(2&t)),128&s&&402653184&s&&function(e){const t=F(e,sb);if(t.length){let n=e.length;for(;n>0;){n--;const r=e[n];128&r.flags&&Q(t,(e=>Xy(r,e)))&&Yt(e,n)}}}(a),536870912&s&&function(e){const t=[];for(const n of e)if(2097152&n.flags&&67108864&wx(n)){const e=8650752&n.types[0].flags?0:1;fe(t,n.types[e])}for(const n of t){const t=[];for(const r of e)if(2097152&r.flags&&67108864&wx(r)){const e=8650752&r.types[0].flags?0:1;r.types[e]===n&&Wy(t,r.types[1-e])}if(xD(Wd(n),(e=>Ky(t,e)))){let r=e.length;for(;r>0;){r--;const i=e[r];if(2097152&i.flags&&67108864&wx(i)){const o=8650752&i.types[0].flags?0:1;i.types[o]===n&&Ky(t,i.types[1-o])&&Yt(e,r)}}Wy(e,n)}}}(a),2===t&&(a=function(e,t){var n;if(e.length<2)return e;const i=fg(e),o=_t.get(i);if(o)return o;const a=t&&Q(e,(e=>!!(524288&e.flags)&&!Ad(e)&&rk(Od(e)))),s=e.length;let c=s,l=0;for(;c>0;){c--;const t=e[c];if(a||469499904&t.flags){if(262144&t.flags&&1048576&Hd(t).flags){uk(t,ev(O(e,(e=>e===t?en:e))),so)&&Yt(e,c);continue}const i=61603840&t.flags?S(Rd(t),(e=>iT($l(e)))):void 0,o=i&&sx($l(i));for(const a of e)if(t!==a){if(1e5===l&&l/(s-c)*s>1e6)return null==(n=or)||n.instant(or.Phase.CheckTypes,"removeSubtypes_DepthLimit",{typeIds:e.map((e=>e.id))}),void xo(r,va.Expression_produces_a_union_type_that_is_too_complex_to_represent);if(l++,i&&61603840&a.flags){const e=Tc(a,i.escapedName);if(e&&iT(e)&&sx(e)!==o)continue}if(uk(t,a,so)&&(!(1&wx(Hl(t)))||!(1&wx(Hl(a)))||kS(t,a))){Yt(e,c);break}}}}return _t.set(i,e),e}(a,!!(524288&s)),!a))return Dt;if(0===a.length)return 65536&s?4194304&s?Rt:Bt:32768&s?4194304&s?It:Ot:en}if(!o&&1048576&s){const t=[];Yy(t,e);const r=[];for(const e of a)Q(t,(t=>Ky(t.types,e)))||r.push(e);if(!n&&1===t.length&&0===r.length)return t[0];if(Oe(t,((e,t)=>e+t.types.length),0)+r.length===a.length){for(const e of t)Wy(r,e);o=Zy(1048576,r)}}return rv(a,(36323331&s?0:32768)|(2097152&s?16777216:0),n,i,o)}function nv(e,t){return e.kind===t.kind&&e.parameterIndex===t.parameterIndex}function rv(e,t,n,r,i){if(0===e.length)return en;if(1===e.length)return e[0];const o=(i?1048576&i.flags?`|${fg(i.types)}`:2097152&i.flags?`&${fg(i.types)}`:`#${i.type.id}|${fg(e)}`:fg(e))+vg(n,r);let a=Ke.get(o);return a||(a=ps(1048576),a.objectFlags=t|xg(e,98304),a.types=e,a.origin=i,a.aliasSymbol=n,a.aliasTypeArguments=r,2===e.length&&512&e[0].flags&&512&e[1].flags&&(a.flags|=16,a.intrinsicName="boolean"),Ke.set(o,a)),a}function iv(e,t,n){const r=n.flags;return 2097152&r?ov(e,t,n.types):(ok(n)?16777216&t||(t|=16777216,e.set(n.id.toString(),n)):(3&r?(n===Tt&&(t|=8388608),Nc(n)&&(t|=1073741824)):!U&&98304&r||(n===Mt&&(t|=262144,n=It),e.has(n.id.toString())||(109472&n.flags&&109472&t&&(t|=67108864),e.set(n.id.toString(),n))),t|=473694207&r),t)}function ov(e,t,n){for(const r of n)t=iv(e,t,sx(r));return t}function av(e,t){for(const n of e)if(!Ky(n.types,t)){const e=128&t.flags?Jt:288&t.flags?zt:2048&t.flags?$t:8192&t.flags?Qt:void 0;if(!e||!Ky(n.types,e))return!1}return!0}function sv(e,t){for(let n=0;n!(e.flags&t)))}function cv(e,t=0,n,r){const i=new Map,o=ov(i,0,e),a=$e(i.values());let s=0;if(131072&o)return D(a,tn)?tn:en;if(U&&98304&o&&84410368&o||67108864&o&&402783228&o||402653316&o&&67238776&o||296&o&&469891796&o||2112&o&&469889980&o||12288&o&&469879804&o||49152&o&&469842940&o)return en;if(402653184&o&&128&o&&function(e){let t=e.length;const n=F(e,(e=>!!(128&e.flags)));for(;t>0;){t--;const r=e[t];if(402653184&r.flags)for(const i of n){if(bS(i,r)){Yt(e,t);break}if(sb(r))return!0}}return!1}(a))return en;if(1&o)return 8388608&o?Tt:1073741824&o?Dt:St;if(!U&&98304&o)return 16777216&o?en:32768&o?It:Rt;if((4&o&&402653312&o||8&o&&256&o||64&o&&2048&o||4096&o&&8192&o||16384&o&&32768&o||16777216&o&&470302716&o)&&(1&t||function(e,t){let n=e.length;for(;n>0;){n--;const r=e[n];(4&r.flags&&402653312&t||8&r.flags&&256&t||64&r.flags&&2048&t||4096&r.flags&&8192&t||16384&r.flags&&32768&t||ok(r)&&470302716&t)&&Yt(e,n)}}(a,o)),262144&o&&(a[a.indexOf(It)]=Mt),0===a.length)return At;if(1===a.length)return a[0];if(2===a.length&&!(2&t)){const e=8650752&a[0].flags?0:1,t=a[e],n=a[1-e];if(8650752&t.flags&&(469893116&n.flags&&!cb(n)||16777216&o)){const e=Wd(t);if(e&&xD(e,(e=>!!(469893116&e.flags)||ok(e)))){if(xS(e,n))return t;if(!(1048576&e.flags&&bD(e,(e=>xS(e,n)))||xS(n,e)))return en;s=67108864}}}const c=fg(a)+(2&t?"*":vg(n,r));let l=Xe.get(c);if(!l){if(1048576&o)if(function(e){let t;const n=T(e,(e=>!!(32768&wx(e))));if(n<0)return!1;let r=n+1;for(;r!!(1048576&e.flags&&32768&e.types[0].flags)))){const e=Q(a,DC)?Mt:It;sv(a,32768),l=ev([cv(a,t),e],1,n,r)}else if(x(a,(e=>!!(1048576&e.flags&&(65536&e.types[0].flags||65536&e.types[1].flags)))))sv(a,65536),l=ev([cv(a,t),Rt],1,n,r);else if(a.length>=4){const e=Math.floor(a.length/2);l=cv([cv(a.slice(0,e),t),cv(a.slice(e),t)],t,n,r)}else{if(!uv(a))return Dt;const e=function(e,t){const n=lv(e),r=[];for(let i=0;i=0;t--)if(1048576&e[t].flags){const r=e[t].types,i=r.length;n[t]=r[o%i],o=Math.floor(o/i)}const a=cv(n,t);131072&a.flags||r.push(a)}return r}(a,t);l=ev(e,1,n,r,Q(e,(e=>!!(2097152&e.flags)))&&dv(e)>dv(a)?Zy(2097152,a):void 0)}else l=function(e,t,n,r){const i=ps(2097152);return i.objectFlags=t|xg(e,98304),i.types=e,i.aliasSymbol=n,i.aliasTypeArguments=r,i}(a,s,n,r);Xe.set(c,l)}return l}function lv(e){return Oe(e,((e,t)=>1048576&t.flags?e*t.types.length:131072&t.flags?0:e),1)}function uv(e){var t;const n=lv(e);return!(n>=1e5&&(null==(t=or)||t.instant(or.Phase.CheckTypes,"checkCrossProductUnion_DepthLimit",{typeIds:e.map((e=>e.id)),size:n}),xo(r,va.Expression_produces_a_union_type_that_is_too_complex_to_represent),1))}function _v(e){return 3145728&e.flags&&!e.aliasSymbol?1048576&e.flags&&e.origin?_v(e.origin):dv(e.types):1}function dv(e){return Oe(e,((e,t)=>e+_v(t)),0)}function mv(e,t){const n=ps(4194304);return n.type=e,n.indexFlags=t,n}function xv(e,t){return 1&t?e.resolvedStringIndexType||(e.resolvedStringIndexType=mv(e,1)):e.resolvedIndexType||(e.resolvedIndexType=mv(e,0))}function Sv(e,t){const n=fd(e),r=md(e),i=hd(e.target||e);if(!(i||2&t))return r;const o=[];if(gb(r)){if(bd(e))return xv(e,t);vD(r,s)}else bd(e)?pd(mp(wd(e)),8576,!!(1&t),s):vD(sd(r),s);const a=2&t?SD(ev(o),(e=>!(5&e.flags))):ev(o);return 1048576&a.flags&&1048576&r.flags&&fg(a.types)===fg(r.types)?r:a;function s(t){const r=i?eS(i,qx(e.mapper,n,t)):t;o.push(r===Jt?ln:r)}}function Tv(e){if(VD(e))return en;if(TD(e))return sx(KM(e));if(oE(e))return sx(IF(e));const t=Kh(e);return void 0!==t?lx(vc(t)):Xu(e)?sx(KM(e)):en}function Ev(e,t,n){if(n||!(6&fx(e))){let n=Uo(g_(e)).nameType;if(!n){const t=Pc(e.valueDeclaration);n="default"===e.escapedName?lx("default"):t&&Tv(t)||(Yh(e)?void 0:lx(Sc(e)))}if(n&&n.flags&t)return n}return en}function Pv(e,t){return!!(e.flags&t||2097152&e.flags&&Q(e.types,(e=>Pv(e,t))))}function Nv(e,t,n){const r=n&&(7&wx(e)||e.aliasSymbol)?function(e){const t=ms(4194304);return t.type=e,t}(e):void 0;return ev(Z(O(Rd(e),(e=>Ev(e,t))),O(cf(e),(e=>e!==oi&&Pv(e.keyType,t)?e.keyType===Jt&&8&t?ln:e.keyType:en))),1,void 0,void 0,r)}function Fv(e,t=0){return!!(58982400&e.flags||NT(e)||Ad(e)&&(!function(e){const t=fd(e);return function e(n){return!!(470810623&n.flags)||(16777216&n.flags?n.root.isDistributive&&n.checkType===t:137363456&n.flags?x(n.types,e):8388608&n.flags?e(n.objectType)&&e(n.indexType):33554432&n.flags?e(n.baseType)&&e(n.constraint):!!(268435456&n.flags)&&e(n.type))}(hd(e)||t)}(e)||2===Id(e))||1048576&e.flags&&!(4&t)&&Ep(e)||2097152&e.flags&&_M(e,465829888)&&Q(e.types,ok))}function Av(e,t=0){return ph(e=Sp(e))?nh(Av(e.baseType,t)):Fv(e,t)?xv(e,t):1048576&e.flags?cv(O(e.types,(e=>Av(e,t)))):2097152&e.flags?ev(O(e.types,(e=>Av(e,t)))):32&wx(e)?Sv(e,t):e===Tt?Tt:2&e.flags?en:131073&e.flags?pn:Nv(e,(2&t?128:402653316)|(1&t?0:12584),0===t)}function Iv(e){const t=(Mr||(Mr=zh("Extract",2,!0)||ht),Mr===ht?void 0:Mr);return t?Bg(t,[e,Jt]):Jt}function Ov(e,t){const n=T(t,(e=>!!(1179648&e.flags)));if(n>=0)return uv(t)?DD(t[n],(r=>Ov(e,Fe(t,n,r)))):Dt;if(D(t,Tt))return Tt;const r=[],i=[];let o=e[0];if(!function e(t,n){for(let a=0;a""===e))){if(x(r,(e=>!!(4&e.flags))))return Jt;if(1===r.length&&sb(r[0]))return r[0]}const a=`${fg(r)}|${O(i,(e=>e.length)).join(",")}|${i.join("")}`;let s=it.get(a);return s||it.set(a,s=function(e,t){const n=ps(134217728);return n.texts=e,n.types=t,n}(i,r)),s}function Mv(e){return 128&e.flags?e.value:256&e.flags?""+e.value:2048&e.flags?ST(e.value):98816&e.flags?e.intrinsicName:void 0}function Gv(e,t){return 1179648&t.flags?DD(t,(t=>Gv(e,t))):128&t.flags?lx(Xv(e,t.value)):134217728&t.flags?Ov(...function(e,t,n){switch(NB.get(e.escapedName)){case 0:return[t.map((e=>e.toUpperCase())),n.map((t=>Gv(e,t)))];case 1:return[t.map((e=>e.toLowerCase())),n.map((t=>Gv(e,t)))];case 2:return[""===t[0]?t:[t[0].charAt(0).toUpperCase()+t[0].slice(1),...t.slice(1)],""===t[0]?[Gv(e,n[0]),...n.slice(1)]:n];case 3:return[""===t[0]?t:[t[0].charAt(0).toLowerCase()+t[0].slice(1),...t.slice(1)],""===t[0]?[Gv(e,n[0]),...n.slice(1)]:n]}return[t,n]}(e,t.texts,t.types)):268435456&t.flags&&e===t.symbol?t:268435461&t.flags||gb(t)?Yv(e,t):ab(t)?Yv(e,Ov(["",""],[t])):t}function Xv(e,t){switch(NB.get(e.escapedName)){case 0:return t.toUpperCase();case 1:return t.toLowerCase();case 2:return t.charAt(0).toUpperCase()+t.slice(1);case 3:return t.charAt(0).toLowerCase()+t.slice(1)}return t}function Yv(e,t){const n=`${OB(e)},${qy(t)}`;let r=at.get(n);return r||at.set(n,r=function(e,t){const n=fs(268435456,e);return n.type=t,n}(e,t)),r}function Zv(e){if(Y)return!1;if(4096&wx(e))return!0;if(1048576&e.flags)return x(e.types,Zv);if(2097152&e.flags)return Q(e.types,Zv);if(465829888&e.flags){const t=Zd(e);return t!==e&&Zv(t)}return!1}function eb(e,t){return mC(e)?gC(e):t&&au(t)?Kh(t):void 0}function tb(e,t){if(8208&t.flags){const n=mc(e.parent,(e=>!Ox(e)))||e.parent;return zu(n)?$u(n)&&qD(e)&&Ww(n,e):x(t.declarations,(e=>!cu(e)||Do(e)))}return!0}function nb(e,t,n,r,i,o){const a=i&&212===i.kind?i:void 0,s=i&&VD(i)?void 0:eb(n,i);if(void 0!==s){if(256&o)return LN(t,s)||St;const e=Jp(t,s);if(e){if(64&o&&i&&e.declarations&&wo(e)&&tb(i,e)&&Eo((null==a?void 0:a.argumentExpression)??(RE(i)?i.indexType:i),e.declarations,s),a){if(XA(e,a,QA(a.expression,t.symbol)),aM(a,e,Zg(a)))return void xo(a.argumentExpression,va.Cannot_assign_to_0_because_it_is_a_read_only_property,Us(e));if(8&o&&(Wo(i).resolvedSymbol=e),AA(a,e))return kt}const n=4&o?zl(e):$l(e);return a&&1!==Zg(a)?XD(a,n):i&&RE(i)&&DC(n)?ev([n,It]):n}if(xD(t,PT)&&WT(s)){const e=+s;if(i&&xD(t,(e=>!e.target.hasRestElement))&&!(16&o)){const n=rb(i);if(PT(t)){if(e<0)return xo(n,va.A_tuple_type_cannot_be_indexed_with_a_negative_value),It;xo(n,va.Tuple_type_0_of_length_1_has_no_element_at_index_2,Ws(t),Og(t),vc(s))}else xo(n,va.Property_0_does_not_exist_on_type_1,vc(s),Ws(t))}if(e>=0)return c(_f(t,zt)),LT(t,e,1&o?Mt:void 0)}}if(!(98304&n.flags)&&dM(n,402665900)){if(131073&t.flags)return t;const l=mf(t,n)||_f(t,Jt);if(l)return 2&o&&l.keyType!==zt?void(a&&(4&o?xo(a,va.Type_0_is_generic_and_can_only_be_indexed_for_reading,Ws(e)):xo(a,va.Type_0_cannot_be_used_to_index_type_1,Ws(n),Ws(e)))):i&&l.keyType===Jt&&!dM(n,12)?(xo(rb(i),va.Type_0_cannot_be_used_as_an_index_type,Ws(n)),1&o?ev([l.type,Mt]):l.type):(c(l),1&o&&!(t.symbol&&384&t.symbol.flags&&n.symbol&&1024&n.flags&&is(n.symbol)===t.symbol)?ev([l.type,Mt]):l.type);if(131072&n.flags)return en;if(Zv(t))return St;if(a&&!fM(t)){if(Tw(t)){if(Y&&384&n.flags)return ro.add(Rp(a,va.Property_0_does_not_exist_on_type_1,n.value,Ws(t))),It;if(12&n.flags)return ev(ue(O(t.properties,(e=>$l(e))),It))}if(t.symbol===he&&void 0!==s&&he.exports.has(s)&&418&he.exports.get(s).flags)xo(a,va.Property_0_does_not_exist_on_type_1,vc(s),Ws(t));else if(Y&&!(128&o))if(void 0!==s&&zA(s,t)){const e=Ws(t);xo(a,va.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,s,e,e+"["+Gd(a.argumentExpression)+"]")}else if(pf(t,zt))xo(a.argumentExpression,va.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{let e;if(void 0!==s&&(e=UA(s,t)))void 0!==e&&xo(a.argumentExpression,va.Property_0_does_not_exist_on_type_1_Did_you_mean_2,s,Ws(t),e);else{const e=function(e,t,n){const r=eh(t)?"set":"get";if(!function(t){const r=Ld(e,t);if(r){const e=hI($l(r));return!!e&&AO(e)>=1&&SS(n,DO(e,0))}return!1}(r))return;let i=kb(t.expression);return void 0===i?i=r:i+="."+r,i}(t,a,n);if(void 0!==e)xo(a,va.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,Ws(t),e);else{let e;if(1024&n.flags)e=uS(void 0,va.Property_0_does_not_exist_on_type_1,"["+Ws(n)+"]",Ws(t));else if(8192&n.flags){const r=Oa(n.symbol,a);e=uS(void 0,va.Property_0_does_not_exist_on_type_1,"["+r+"]",Ws(t))}else 128&n.flags||256&n.flags?e=uS(void 0,va.Property_0_does_not_exist_on_type_1,n.value,Ws(t)):12&n.flags&&(e=uS(void 0,va.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,Ws(n),Ws(t)));e=uS(e,va.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,Ws(r),Ws(t)),ro.add(zp(Sd(a),a,e))}}}return}}if(Zv(t))return St;if(i){const e=rb(i);384&n.flags?xo(e,va.Property_0_does_not_exist_on_type_1,""+n.value,Ws(t)):12&n.flags?xo(e,va.Type_0_has_no_matching_index_signature_for_type_1,Ws(t),Ws(n)):xo(e,va.Type_0_cannot_be_used_as_an_index_type,Ws(n))}return Ec(n)?n:void 0;function c(e){e&&e.isReadonly&&a&&(eh(a)||uh(a))&&xo(a,va.Index_signature_in_type_0_only_permits_reading,Ws(t))}}function rb(e){return 212===e.kind?e.argumentExpression:199===e.kind?e.indexType:167===e.kind?e.expression:e}function ab(e){if(2097152&e.flags){let t=!1;for(const n of e.types)if(101248&n.flags||ab(n))t=!0;else if(!(524288&n.flags))return!1;return t}return!!(77&e.flags)||sb(e)}function sb(e){return!!(134217728&e.flags)&&x(e.types,ab)||!!(268435456&e.flags)&&ab(e.type)}function cb(e){return!!(402653184&e.flags)&&!sb(e)}function lb(e){return!!hb(e)}function pb(e){return!!(4194304&hb(e))}function gb(e){return!!(8388608&hb(e))}function hb(e){return 3145728&e.flags?(2097152&e.objectFlags||(e.objectFlags|=2097152|Oe(e.types,((e,t)=>e|hb(t)),0)),12582912&e.objectFlags):33554432&e.flags?(2097152&e.objectFlags||(e.objectFlags|=2097152|hb(e.baseType)|hb(e.constraint)),12582912&e.objectFlags):(58982400&e.flags||Ad(e)||NT(e)?4194304:0)|(63176704&e.flags||cb(e)?8388608:0)}function Nb(e,t){return 8388608&e.flags?function(e,t){const n=t?"simplifiedForWriting":"simplifiedForReading";if(e[n])return e[n]===Mn?e:e[n];e[n]=Mn;const r=Nb(e.objectType,t),i=Nb(e.indexType,t),o=function(e,t,n){if(1048576&t.flags){const r=O(t.types,(t=>Nb(Mb(e,t),n)));return n?cv(r):ev(r)}}(r,i,t);if(o)return e[n]=o;if(!(465829888&i.flags)){const o=Fb(r,i,t);if(o)return e[n]=o}if(NT(r)&&296&i.flags){const o=jT(r,8&i.flags?0:r.target.fixedLength,0,t);if(o)return e[n]=o}return Ad(r)&&2!==Id(r)?e[n]=DD(Ob(r,e.indexType),(e=>Nb(e,t))):e[n]=e}(e,t):16777216&e.flags?function(e,t){const n=e.checkType,r=e.extendsType,i=Vb(e),o=Ub(e);if(131072&o.flags&&Jb(i)===Jb(n)){if(1&n.flags||SS(iS(n),iS(r)))return Nb(i,t);if(Ab(n,r))return en}else if(131072&i.flags&&Jb(o)===Jb(n)){if(!(1&n.flags)&&SS(iS(n),iS(r)))return en;if(1&n.flags||Ab(n,r))return Nb(o,t)}return e}(e,t):e}function Fb(e,t,n){if(1048576&e.flags||2097152&e.flags&&!Fv(e)){const r=O(e.types,(e=>Nb(Mb(e,t),n)));return 2097152&e.flags||n?cv(r):ev(r)}}function Ab(e,t){return!!(131072&ev([K_(e,t),en]).flags)}function Ob(e,t){const n=Fx([fd(e)],[t]),r=zx(e.mapper,n),i=eS(yd(e.target||e),r),o=Ed(e)>0||(lb(e)?Pd(wd(e))>0:function(e,t){const n=Wd(t);return!!n&&Q(Rd(e),(e=>!!(16777216&e.flags)&&SS(Ev(e,8576),n)))}(e,t));return Hc(i,!0,o)}function Mb(e,t,n=0,r,i,o){return jb(e,t,n,r,i,o)||(r?Dt:At)}function Lb(e,t){return xD(e,(e=>{if(384&e.flags){const n=gC(e);if(WT(n)){const e=+n;return e>=0&&e0&&!Q(e.elements,(e=>PE(e)||NE(e)||EE(e)&&!(!e.questionToken&&!e.dotDotDotToken)))}function $b(e,t){return lb(e)||t&&PT(e)&&Q($y(e),lb)}function qb(e,t,n,i,o){let a,s,c=0;for(;;){if(1e3===c)return xo(r,va.Type_instantiation_is_excessively_deep_and_possibly_infinite),Dt;const u=eS(Jb(e.checkType),t),_=eS(e.extendsType,t);if(u===Dt||_===Dt)return Dt;if(u===Tt||_===Tt)return Tt;const d=ch(e.node.checkType),f=ch(e.node.extendsType),m=zb(d)&&zb(f)&&p(d.elements)===p(f.elements),g=$b(u,m);let h;if(e.inferTypeParameters){const n=UC(e.inferTypeParameters,void 0,0);t&&(n.nonFixingMapper=zx(n.nonFixingMapper,t)),g||xw(n.inferences,u,_,1536),h=t?zx(n.mapper,t):n.mapper}const y=h?eS(e.extendsType,h):_;if(!g&&!$b(y,m)){if(!(3&y.flags)&&(1&u.flags||!SS(rS(u),rS(y)))){(1&u.flags||n&&!(131072&y.flags)&&bD(rS(y),(e=>SS(e,rS(u)))))&&(s||(s=[])).push(eS(Sx(e.node.trueType),h||t));const r=Sx(e.node.falseType);if(16777216&r.flags){const n=r.root;if(n.node.parent===e.node&&(!n.isDistributive||n.checkType===e.checkType)){e=n;continue}if(l(r,t))continue}a=eS(r,t);break}if(3&y.flags||SS(iS(u),iS(y))){const n=Sx(e.node.trueType),r=h||t;if(l(n,r))continue;a=eS(n,r);break}}a=ps(16777216),a.root=e,a.checkType=eS(e.checkType,t),a.extendsType=eS(e.extendsType,t),a.mapper=t,a.combinedMapper=h,a.aliasSymbol=i||e.aliasSymbol,a.aliasTypeArguments=i?o:Dx(e.aliasTypeArguments,t);break}return s?ev(ue(s,a)):a;function l(n,r){if(16777216&n.flags&&r){const a=n.root;if(a.outerTypeParameters){const s=zx(n.mapper,r),l=O(a.outerTypeParameters,(e=>Ax(e,s))),u=Fx(a.outerTypeParameters,l),_=a.isDistributive?Ax(a.checkType,u):void 0;if(!(_&&_!==a.checkType&&1179648&_.flags))return e=a,t=u,i=void 0,o=void 0,a.aliasSymbol&&c++,!0}}return!1}}function Vb(e){return e.resolvedTrueType||(e.resolvedTrueType=eS(Sx(e.root.node.trueType),e.mapper))}function Ub(e){return e.resolvedFalseType||(e.resolvedFalseType=eS(Sx(e.root.node.falseType),e.mapper))}function Kb(e){let t;return e.locals&&e.locals.forEach((e=>{262144&e.flags&&(t=ue(t,ju(e)))})),t}function Wb(e){return qD(e)?[e]:ue(Wb(e.left),e.right)}function Hb(e){var t;const n=Wo(e);if(!n.resolvedType){if(!df(e))return xo(e.argument,va.String_literal_expected),n.resolvedSymbol=ht,n.resolvedType=Dt;const r=e.isTypeOf?111551:16777216&e.flags?900095:788968,i=ja(e,e.argument.literal);if(!i)return n.resolvedSymbol=ht,n.resolvedType=Dt;const o=!!(null==(t=i.exports)?void 0:t.get("export=")),a=$a(i,!1);if(Nd(e.qualifier))a.flags&r?n.resolvedType=Gb(e,n,a,r):(xo(e,111551===r?va.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:va.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0,e.argument.literal.text),n.resolvedSymbol=ht,n.resolvedType=Dt);else{const t=Wb(e.qualifier);let i,s=a;for(;i=t.shift();){const a=t.length?1920:r,c=ts(Da(s)),l=e.isTypeOf||Mm(e)&&o?Jp($l(c),i.escapedText,!1,!0):void 0,u=(e.isTypeOf?void 0:Ho(Ga(c),i.escapedText,a))??l;if(!u)return xo(i,va.Namespace_0_has_no_exported_member_1,Oa(s),Ap(i)),n.resolvedType=Dt;Wo(i).resolvedSymbol=u,Wo(i.parent).resolvedSymbol=u,s=u}n.resolvedType=Gb(e,n,s,r)}}return n.resolvedType}function Gb(e,t,n,r){const i=Da(n);return t.resolvedSymbol=i,111551===r?hO($l(n),e):Yg(e,i)}function Xb(e){const t=Wo(e);if(!t.resolvedType){const n=Qb(e);if(0!==m_(e.symbol).size||n){let r=hs(16,e.symbol);r.aliasSymbol=n,r.aliasTypeArguments=Yb(n),aF(e)&&e.isArrayType&&(r=Ty(r)),t.resolvedType=r}else t.resolvedType=Pn}return t.resolvedType}function Qb(e){let t=e.parent;for(;ME(t)||UN(t)||jE(t)&&148===t.operator;)t=t.parent;return Ag(t)?ns(t):void 0}function Yb(e){return e?nu(e):void 0}function Zb(e){return!!(524288&e.flags)&&!Ad(e)}function ex(e){return ik(e)||!!(474058748&e.flags)}function tx(e,t){if(!(1048576&e.flags))return e;if(x(e.types,ex))return S(e.types,ik)||wn;const n=S(e.types,(e=>!ex(e)));return n?S(e.types,(e=>e!==n&&!ex(e)))?e:function(e){const n=ed();for(const r of Rd(e))if(6&fx(r));else if(rx(r)){const e=65536&r.flags&&!(32768&r.flags),i=No(16777220,r.escapedName,cd(r)|(t?8:0));i.links.type=e?It:Hc($l(r),!0),i.declarations=r.declarations,i.links.nameType=Uo(r).nameType,i.links.syntheticOrigin=r,n.set(r.escapedName,i)}const r=ks(e.symbol,n,u,u,cf(e));return r.objectFlags|=131200,r}(n):e}function nx(e,t,n,r,i){if(1&e.flags||1&t.flags)return St;if(2&e.flags||2&t.flags)return At;if(131072&e.flags)return t;if(131072&t.flags)return e;if(1048576&(e=tx(e,i)).flags)return uv([e,t])?DD(e,(e=>nx(e,t,n,r,i))):Dt;if(1048576&(t=tx(t,i)).flags)return uv([e,t])?DD(t,(t=>nx(e,t,n,r,i))):Dt;if(473960444&t.flags)return e;if(pb(e)||pb(t)){if(ik(e))return t;if(2097152&e.flags){const o=e.types,a=o[o.length-1];if(Zb(a)&&Zb(t))return cv(Z(o.slice(0,o.length-1),[nx(a,t,n,r,i)]))}return cv([e,t])}const o=ed(),a=new Set,s=e===wn?cf(t):z_([e,t]);for(const e of Rd(t))6&fx(e)?a.add(e.escapedName):rx(e)&&o.set(e.escapedName,ix(e,i));for(const t of Rd(e))if(!a.has(t.escapedName)&&rx(t))if(o.has(t.escapedName)){const e=o.get(t.escapedName),n=$l(e);if(16777216&e.flags){const r=Z(t.declarations,e.declarations),i=No(4|16777216&t.flags,t.escapedName),a=$l(t),s=EC(a),c=EC(n);i.links.type=s===c?a:ev([a,c],2),i.links.leftSpread=t,i.links.rightSpread=e,i.declarations=r,i.links.nameType=Uo(t).nameType,o.set(t.escapedName,i)}}else o.set(t.escapedName,ix(t,i));const c=ks(n,o,u,u,L(s,(e=>function(e,t){return e.isReadonly!==t?Vm(e.keyType,e.type,t,e.declaration):e}(e,i))));return c.objectFlags|=2228352|r,c}function rx(e){var t;return!(Q(e.declarations,Zl)||106496&e.flags&&(null==(t=e.declarations)?void 0:t.some((e=>gu(e.parent)))))}function ix(e,t){const n=65536&e.flags&&!(32768&e.flags);if(!n&&t===oM(e))return e;const r=No(4|16777216&e.flags,e.escapedName,cd(e)|(t?8:0));return r.links.type=n?It:$l(e),r.declarations=e.declarations,r.links.nameType=Uo(e).nameType,r.links.syntheticOrigin=e,r}function ox(e,t,n,r){const i=fs(e,n);return i.value=t,i.regularType=r||i,i}function ax(e){if(2976&e.flags){if(!e.freshType){const t=ox(e.flags,e.value,e.symbol,e);t.freshType=t,e.freshType=t}return e.freshType}return e}function sx(e){return 2976&e.flags?e.regularType:1048576&e.flags?e.regularType||(e.regularType=DD(e,sx)):e}function cx(e){return!!(2976&e.flags)&&e.freshType===e}function lx(e){let t;return Qe.get(e)||(Qe.set(e,t=ox(128,e)),t)}function ux(e){let t;return Ye.get(e)||(Ye.set(e,t=ox(256,e)),t)}function _x(e){let t;const n=ST(e);return tt.get(n)||(tt.set(n,t=ox(2048,e)),t)}function dx(e,t,n){let r;const i=`${t}${"string"==typeof e?"@":"#"}${e}`,o=1024|("string"==typeof e?128:256);return nt.get(i)||(nt.set(i,r=ox(o,e,n)),r)}function mx(e){if(Mm(e)&&UN(e)){const t=Wg(e);t&&(e=Mg(t)||t)}if(Rf(e)){const t=jf(e)?rs(e.left):rs(e);if(t){const e=Uo(t);return e.uniqueESSymbolType||(e.uniqueESSymbolType=function(e){const t=fs(8192,e);return t.escapedName=`__@${t.symbol.escapedName}@${OB(t.symbol)}`,t}(t))}}return Qt}function vx(e){const t=Wo(e);return t.resolvedType||(t.resolvedType=function(e){const t=rm(e,!1,!1),n=t&&t.parent;if(n&&(gu(n)||264===n.kind)&&!Jv(t)&&(!fE(t)||_h(e,t.body)))return Nu(ns(n)).thisType;if(n&&HE(n)&&uP(n.parent)&&6===ag(n.parent))return Nu(rs(n.parent.left).parent).thisType;const r=16777216&e.flags?Ug(e):void 0;return r&&nP(r)&&uP(r.parent)&&3===ag(r.parent)?Nu(rs(r.parent.left).parent).thisType:rO(t)&&_h(e,t.body)?Nu(ns(t)).thisType:(xo(e,va.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),Dt)}(e)),t.resolvedType}function bx(e){return Sx(xx(e.type)||e.type)}function xx(e){switch(e.kind){case 196:return xx(e.type);case 189:if(1===e.elements.length&&(191===(e=e.elements[0]).kind||202===e.kind&&e.dotDotDotToken))return xx(e.type);break;case 188:return e.elementType}}function Sx(e){return function(e,t){let n,r=!0;for(;t&&!b_(t)&&320!==t.kind;){const i=t.parent;if(169===i.kind&&(r=!r),(r||8650752&e.flags)&&194===i.kind&&t===i.trueType){const t=Ph(e,i.checkType,i.extendsType);t&&(n=ue(n,t))}else if(262144&e.flags&&200===i.kind&&!i.nameType&&t===i.type){const t=Sx(i);if(fd(t)===Jb(e)){const e=Gx(t);if(e){const t=Jd(e);t&&xD(t,Uk)&&(n=ue(n,ev([zt,yn])))}}}t=i}return n?mh(e,cv(n)):e}(kx(e),e)}function kx(e){switch(e.kind){case 133:case 312:case 313:return St;case 159:return At;case 154:return Jt;case 150:return zt;case 163:return $t;case 136:return Xt;case 155:return Qt;case 116:return Zt;case 157:return It;case 106:return Rt;case 146:return en;case 151:return 524288&e.flags&&!Y?St:cn;case 141:return Ft;case 197:case 110:return vx(e);case 201:return function(e){if(106===e.literal.kind)return Rt;const t=Wo(e);return t.resolvedType||(t.resolvedType=sx(KM(e.literal))),t.resolvedType}(e);case 183:case 233:return Ih(e);case 182:return e.assertsModifier?Zt:Xt;case 186:return Lh(e);case 188:case 189:return function(e){const t=Wo(e);if(!t.resolvedType){const n=function(e){const t=function(e){return jE(e)&&148===e.operator}(e.parent);return xx(e)?t?Qn:Xn:Iy(O(e.elements,Cy),t,O(e.elements,Dy))}(e);if(n===An)t.resolvedType=wn;else if(189===e.kind&&Q(e.elements,(e=>!!(8&Cy(e))))||!Ey(e)){const r=188===e.kind?[Sx(e.elementType)]:O(e.elements,Sx);t.resolvedType=Oy(n,r)}else t.resolvedType=189===e.kind&&0===e.elements.length?n:Eg(n,e,void 0)}return t.resolvedType}(e);case 190:return function(e){return Hc(Sx(e.type),!0)}(e);case 192:return function(e){const t=Wo(e);if(!t.resolvedType){const n=Qb(e);t.resolvedType=ev(O(e.types,Sx),1,n,Yb(n))}return t.resolvedType}(e);case 193:return function(e){const t=Wo(e);if(!t.resolvedType){const n=Qb(e),r=O(e.types,Sx),i=2===r.length?r.indexOf(Pn):-1,o=i>=0?r[1-i]:At,a=!!(76&o.flags||134217728&o.flags&&sb(o));t.resolvedType=cv(r,a?1:0,n,Yb(n))}return t.resolvedType}(e);case 314:return function(e){const t=Sx(e.type);return U?KT(t,65536):t}(e);case 316:return Hc(Sx(e.type));case 202:return function(e){const t=Wo(e);return t.resolvedType||(t.resolvedType=e.dotDotDotToken?bx(e):Hc(Sx(e.type),!0,!!e.questionToken))}(e);case 196:case 315:case 309:return Sx(e.type);case 191:return bx(e);case 318:return function(e){const t=Sx(e.type),{parent:n}=e,r=e.parent.parent;if(UN(e.parent)&&xF(r)){const e=Ug(r),n=_F(r.parent.parent);if(e||n){const i=we(n?r.parent.parent.typeExpression.parameters:e.parameters),o=$g(r);if(!i||o&&i.symbol===o&&U_(i))return Ty(t)}}return sE(n)&&nF(n.parent)?Ty(t):Hc(t)}(e);case 184:case 185:case 187:case 322:case 317:case 323:return Xb(e);case 198:return function(e){const t=Wo(e);if(!t.resolvedType)switch(e.operator){case 143:t.resolvedType=Av(Sx(e.type));break;case 158:t.resolvedType=155===e.type.kind?mx(oh(e.parent)):Dt;break;case 148:t.resolvedType=Sx(e.type);break;default:xn.assertNever(e.operator)}return t.resolvedType}(e);case 199:return Rb(e);case 200:return Bb(e);case 194:return function(e){const t=Wo(e);if(!t.resolvedType){const n=Sx(e.checkType),r=Qb(e),i=Yb(r),o=Yl(e,!0),a=i?o:F(o,(t=>Wx(t,e))),s={node:e,checkType:n,extendsType:Sx(e.extendsType),isDistributive:!!(262144&n.flags),inferTypeParameters:Kb(e),outerTypeParameters:a,instantiations:void 0,aliasSymbol:r,aliasTypeArguments:i};t.resolvedType=qb(s,void 0,!1),a&&(s.instantiations=new Map,s.instantiations.set(fg(a),t.resolvedType))}return t.resolvedType}(e);case 195:return function(e){const t=Wo(e);return t.resolvedType||(t.resolvedType=Lu(ns(e.typeParameter))),t.resolvedType}(e);case 203:return function(e){const t=Wo(e);return t.resolvedType||(t.resolvedType=Ov([e.head.text,...O(e.templateSpans,(e=>e.literal.text))],O(e.templateSpans,(e=>Sx(e.type))))),t.resolvedType}(e);case 205:return Hb(e);case 80:case 166:case 211:const t=JR(e);return t?ju(t):Dt;default:return Dt}}function Tx(e,t,n){if(e&&e.length)for(let r=0;r_h(e,a)))||Q(t.typeArguments,n)}return!0;case 174:case 173:return!t.type&&!!t.body||Q(t.typeParameters,n)||Q(t.parameters,n)||!!t.type&&n(t.type)}return!!LI(t,n)}}function Gx(e){const t=md(e);if(4194304&t.flags){const e=Jb(t.type);if(262144&e.flags)return e}}function Xx(e,t){return!!(1&t)||!(2&t)&&e}function Qx(e,t,n,r){const i=qx(r,fd(e),t),o=eS(yd(e.target||e),i),a=Dd(e);return U&&4&a&&!_M(o,49152)?XT(o,!0):U&&8&a&&n?Zw(o,524288):o}function Yx(e,t,n,r){xn.assert(e.symbol,"anonymous type must have symbol to be instantiated");const i=hs(-1572865&e.objectFlags|64,e.symbol);if(32&e.objectFlags){i.declaration=e.declaration;const n=fd(e),r=Vx(n);i.typeParameter=r,t=zx(Mx(n,r),t),r.mapper=t}return 8388608&e.objectFlags&&(i.node=e.node),134217728&e.objectFlags&&(i.outerTypeParameters=e.outerTypeParameters),i.target=e,i.mapper=t,i.aliasSymbol=n||e.aliasSymbol,i.aliasTypeArguments=n?r:Dx(e.aliasTypeArguments,t),i.objectFlags|=i.aliasTypeArguments?xg(i.aliasTypeArguments):0,i}function Zx(e,t,n,r,i){const o=e.root;if(o.outerTypeParameters){const e=O(o.outerTypeParameters,(e=>Ax(e,t))),a=(n?"C":"")+fg(e)+vg(r,i);let s=o.instantiations.get(a);if(!s){const t=Fx(o.outerTypeParameters,e),c=o.checkType,l=o.isDistributive?Sp(Ax(c,t)):void 0;s=l&&c!==l&&1179648&l.flags?ED(l,(e=>qb(o,$x(c,e,t),n)),r,i):qb(o,t,n,r,i),o.instantiations.set(a,s)}return s}return e}function eS(e,t){return e&&t?tS(e,t,void 0,void 0):e}function tS(e,t,n,i){var o;if(!ZC(e))return e;if(100===y||h>=5e6)return null==(o=or)||o.instant(or.Phase.CheckTypes,"instantiateType_DepthLimit",{typeId:e.id,instantiationDepth:y,instantiationCount:h}),xo(r,va.Type_instantiation_is_excessively_deep_and_possibly_infinite),Dt;m++,h++,y++;const a=function(e,t,n,r){const i=e.flags;if(262144&i)return Ax(e,t);if(524288&i){const i=e.objectFlags;if(52&i){if(4&i&&!e.node){const n=e.resolvedTypeArguments,r=Dx(n,t);return r!==n?Oy(e.target,r):e}return 1024&i?function(e,t){const n=eS(e.mappedType,t);if(!(32&wx(n)))return e;const r=eS(e.constraintType,t);if(!(4194304&r.flags))return e;const i=rw(eS(e.source,t),n,r);return i||e}(e,t):function(e,t,n,r){const i=4&e.objectFlags||8388608&e.objectFlags?e.node:e.symbol.declarations[0],o=Wo(i),a=4&e.objectFlags?o.resolvedType:64&e.objectFlags?e.target:e;let s=134217728&e.objectFlags?e.outerTypeParameters:o.outerTypeParameters;if(!s){let t=Yl(i,!0);rO(i)&&(t=pe(t,hf(i))),s=t||u;const n=8388612&e.objectFlags?[i]:e.symbol.declarations;s=(8388612&a.objectFlags||8192&a.symbol.flags||2048&a.symbol.flags)&&!a.aliasTypeArguments?F(s,(e=>Q(n,(t=>Wx(e,t))))):s,o.outerTypeParameters=s}if(s.length){const i=zx(e.mapper,t),o=O(s,(e=>Ax(e,i))),c=n||e.aliasSymbol,l=n?r:Dx(e.aliasTypeArguments,t),u=(134217728&e.objectFlags?"S":"")+fg(o)+vg(c,l);a.instantiations||(a.instantiations=new Map,a.instantiations.set(fg(s)+vg(a.aliasSymbol,a.aliasTypeArguments),a));let _=a.instantiations.get(u);if(!_){if(134217728&e.objectFlags)return _=Yx(e,t),a.instantiations.set(u,_),_;const n=Fx(s,o);_=4&a.objectFlags?Eg(e.target,e.node,n,c,l):32&a.objectFlags?function(e,t,n,r){const i=Gx(e);if(i){const o=eS(i,t);if(i!==o)return ED(Sp(o),(function n(r){if(61603843&r.flags&&r!==Tt&&!Nc(r)){if(!e.declaration.nameType){let o;if(qk(r)||1&r.flags&&dc(i,4)<0&&(o=Jd(i))&&xD(o,Uk))return function(e,t,n){const r=Qx(t,zt,!0,n);return Nc(r)?Dt:Ty(r,Xx(Vk(e),Dd(t)))}(r,e,$x(i,r,t));if(PT(r))return function(e,t,n,r){const i=e.target.elementFlags,o=e.target.fixedLength,a=o?$x(n,e,r):r,s=O($y(e),((e,s)=>{const c=i[s];return s1&e?2:e)):8&c?O(i,(e=>2&e?1:e)):i,u=Xx(e.target.readonly,Dd(t));return D(s,Dt)?Dt:Ay(s,l,u,e.target.labeledElementDeclarations)}(r,e,i,t);if(lp(r))return cv(O(r.types,n))}return Yx(e,$x(i,r,t))}return r}),n,r)}return eS(md(e),t)===Tt?Tt:Yx(e,t,n,r)}(a,n,c,l):Yx(a,n,c,l),a.instantiations.set(u,_);const r=wx(_);if(3899393&_.flags&&!(524288&r)){const e=Q(o,ZC);524288&wx(_)||(_.objectFlags|=52&r?524288|(e?1048576:0):e?0:524288)}}return _}return e}(e,t,n,r)}return e}if(3145728&i){const o=1048576&e.flags?e.origin:void 0,a=o&&3145728&o.flags?o.types:e.types,s=Dx(a,t);if(s===a&&n===e.aliasSymbol)return e;const c=n||e.aliasSymbol,l=n?r:Dx(e.aliasTypeArguments,t);return 2097152&i||o&&2097152&o.flags?cv(s,0,c,l):ev(s,1,c,l)}if(4194304&i)return Av(eS(e.type,t));if(134217728&i)return Ov(e.texts,Dx(e.types,t));if(268435456&i)return Gv(e.symbol,eS(e.type,t));if(8388608&i){const i=n||e.aliasSymbol,o=n?r:Dx(e.aliasTypeArguments,t);return Mb(eS(e.objectType,t),eS(e.indexType,t),e.accessFlags,void 0,i,o)}if(16777216&i)return Zx(e,zx(e.mapper,t),!1,n,r);if(33554432&i){const n=eS(e.baseType,t);if(ph(e))return nh(n);const r=eS(e.constraint,t);return 8650752&n.flags&&lb(r)?mh(n,r):3&r.flags||SS(iS(n),iS(r))?n:8650752&n.flags?mh(n,r):cv([r,n])}return e}(e,t,n,i);return y--,a}function rS(e){return 402915327&e.flags?e:e.permissiveInstantiation||(e.permissiveInstantiation=eS(e,bn))}function iS(e){return 402915327&e.flags?e:(e.restrictiveInstantiation||(e.restrictiveInstantiation=eS(e,vn),e.restrictiveInstantiation.restrictiveInstantiation=e.restrictiveInstantiation),e.restrictiveInstantiation)}function oS(e,t){return Vm(e.keyType,eS(e.type,t),e.isReadonly,e.declaration)}function lS(e){switch(xn.assert(174!==e.kind||$f(e)),e.kind){case 218:case 219:case 174:case 262:return dS(e);case 210:return Q(e.properties,lS);case 209:return Q(e.elements,lS);case 227:return lS(e.whenTrue)||lS(e.whenFalse);case 226:return(57===e.operatorToken.kind||61===e.operatorToken.kind)&&(lS(e.left)||lS(e.right));case 303:return lS(e.initializer);case 217:return lS(e.expression);case 292:return Q(e.properties,lS)||CN(e.parent)&&Q(e.parent.parent.children,lS);case 291:{const{initializer:t}=e;return!!t&&lS(t)}case 294:{const{expression:t}=e;return!!t&&lS(t)}}return!1}function dS(e){return $T(e)||function(e){return!(e.typeParameters||Cv(e)||!e.body)&&(241!==e.body.kind?lS(e.body):!!Pf(e.body,(e=>!!e.expression&&lS(e.expression))))}(e)}function fS(e){return(UT(e)||$f(e))&&dS(e)}function mS(e){if(524288&e.flags){const t=Od(e);if(t.constructSignatures.length||t.callSignatures.length){const n=hs(16,e.symbol);return n.members=t.members,n.properties=t.properties,n.callSignatures=u,n.constructSignatures=u,n.indexInfos=u,n}}else if(2097152&e.flags)return cv(O(e.types,mS));return e}function gS(e,t){return uk(e,t,uo)}function hS(e,t){return uk(e,t,uo)?-1:0}function yS(e,t){return uk(e,t,co)?-1:0}function vS(e,t){return uk(e,t,ao)?-1:0}function bS(e,t){return uk(e,t,ao)}function xS(e,t){return uk(e,t,so)}function SS(e,t){return uk(e,t,co)}function kS(e,t){return 1048576&e.flags?x(e.types,(e=>kS(e,t))):1048576&t.flags?Q(t.types,(t=>kS(e,t))):2097152&e.flags?Q(e.types,(e=>kS(e,t))):58982400&e.flags?kS(Wd(e)||At,t):ok(t)?!!(67633152&e.flags):t===Kn?!!(67633152&e.flags)&&!ok(e):t===Wn?!!(524288&e.flags)&&Gw(e):Gl(e,Hl(t))||qk(t)&&!Vk(t)&&kS(e,Qn)}function TS(e,t){return uk(e,t,lo)}function CS(e,t){return TS(e,t)||TS(t,e)}function PS(e,t,n,r,i,o){return mk(e,t,co,n,r,i,o)}function IS(e,t,n,r,i,o){return OS(e,t,co,n,r,i,o,void 0)}function OS(e,t,n,r,i,o,a,s){return!!uk(e,t,n)||(!r||!BS(i,e,t,n,o,a,s))&&mk(e,t,n,r,o,a,s)}function RS(e){return!!(16777216&e.flags||2097152&e.flags&&Q(e.types,RS))}function BS(e,t,n,r,i,o,a){if(!e||RS(n))return!1;if(!mk(t,n,r,void 0)&&function(e,t,n,r,i,o,a){const s=Vp(t,0),c=Vp(t,1);for(const l of[c,s])if(Q(l,(e=>{const t=Gf(e);return!(131073&t.flags)&&mk(t,n,r,void 0)}))){const r=a||{};return PS(t,n,e,i,o,r),fT(r.errors[r.errors.length-1],Rp(e,l===c?va.Did_you_mean_to_use_new_with_this_expression:va.Did_you_mean_to_call_this_expression)),!0}return!1}(e,t,n,r,i,o,a))return!0;switch(e.kind){case 234:if(!TC(e))break;case 294:case 217:return BS(e.expression,t,n,r,i,o,a);case 226:switch(e.operatorToken.kind){case 64:case 28:return BS(e.right,t,n,r,i,o,a)}break;case 210:return function(e,t,n,r,i,o){return!(402915324&n.flags)&&US(function*(e){if(p(e.properties))for(const t of e.properties){if(zN(t))continue;const e=Ev(ns(t),8576);if(e&&!(131072&e.flags))switch(t.kind){case 178:case 177:case 174:case 304:yield{errorNode:t.name,innerExpression:void 0,nameType:e};break;case 303:yield{errorNode:t.name,innerExpression:t.initializer,nameType:e,errorMessage:Op(t.name)?va.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:void 0};break;default:xn.assertNever(t)}}}(e),t,n,r,i,o)}(e,t,n,r,o,a);case 209:return function(e,t,n,r,i,o){if(402915324&n.flags)return!1;if(Zk(t))return US(HS(e,n),t,n,r,i,o);fF(e,n,!1);const a=FF(e,1,!0);return mF(),!!Zk(a)&&US(HS(e,n),a,n,r,i,o)}(e,t,n,r,o,a);case 292:return function(e,t,n,r,i,o){let a,s=US(function*(e){if(p(e.properties))for(const t of e.properties)AN(t)||BF(uC(t.name))||(yield{errorNode:t.name,innerExpression:t.initializer,nameType:lx(uC(t.name))})}(e),t,n,r,i,o);if(CN(e.parent)&&kN(e.parent.parent)){const a=e.parent.parent,l=XF(HF(e)),u=void 0===l?"children":vc(l),_=lx(u),d=Mb(n,_),f=vy(a.children);if(!p(f))return s;const m=p(f)>1;let g,h;if(my(!1)!==An){const e=ky(St);g=SD(d,(t=>SS(t,e))),h=SD(d,(t=>!SS(t,e)))}else g=SD(d,tT),h=SD(d,(e=>!tT(e)));if(m){if(g!==en){const e=Ay($F(a,0)),t=function*(e,t){if(!p(e.children))return;let n=0;for(let r=0;r!tT(e))),c=s!==en?gj(13,0,s,void 0):void 0;let l=!1;for(let n=e.next();!n.done;n=e.next()){const{errorNode:e,innerExpression:s,nameType:u,errorMessage:_}=n.value;let d=c;const p=a!==en?JS(t,a,u):void 0;if(!p||8388608&p.flags||(d=c?ev([c,p]):p),!d)continue;let f=jb(t,u);if(!f)continue;const m=eb(u,void 0);if(!mk(f,d,r,void 0)&&(l=!0,!s||!BS(s,f,d,r,void 0,i,o))){const n=o||{},c=s?VS(s,f):f;if(ie&&yk(c,d)){const t=Rp(e,va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Ws(c),Ws(d));ro.add(t),n.errors=[t]}else{const o=!!(m&&16777216&(Jp(a,m)||ht).flags),s=!!(m&&16777216&(Jp(t,m)||ht).flags);d=bC(d,o),f=bC(f,o&&s),mk(c,d,r,e,_,i,n)&&c!==f&&mk(f,d,r,e,_,i,n)}}}return l}(t,e,g,r,i,o)||s}else if(!uk(Mb(t,_),d,r)){s=!0;const e=xo(a.openingElement.tagName,va.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,u,Ws(d));o&&o.skipLogging&&(o.errors||(o.errors=[])).push(e)}}else if(h!==en){const e=KS(f[0],_,c);e&&(s=US(function*(){yield e}(),t,n,r,i,o)||s)}else if(!uk(Mb(t,_),d,r)){s=!0;const e=xo(a.openingElement.tagName,va.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,u,Ws(d));o&&o.skipLogging&&(o.errors||(o.errors=[])).push(e)}}return s;function c(){if(!a){const t=Gd(e.parent.tagName),r=XF(HF(e)),i=void 0===r?"children":vc(r),o=Mb(n,lx(i)),s=va._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;a={...s,key:"!!ALREADY FORMATTED!!",message:sS(s,t,i,Ws(o))}}return a}}(e,t,n,r,o,a);case 219:return function(e,t,n,r,i,o){if(DP(e.body))return!1;if(Q(e.parameters,M_))return!1;const a=hI(t);if(!a)return!1;const s=Vp(n,0);if(!p(s))return!1;const c=e.body,l=Gf(a),u=ev(O(s,Gf));if(!mk(l,u,r,void 0)){const t=c&&BS(c,l,u,r,void 0,i,o);if(t)return t;const a=o||{};if(mk(l,u,r,c,void 0,i,a),a.errors)return n.symbol&&p(n.symbol.declarations)&&fT(a.errors[a.errors.length-1],Rp(n.symbol.declarations[0],va.The_expected_type_comes_from_the_return_type_of_this_signature)),0==(2&Jh(e))&&!Tc(l,"then")&&mk(UO(l),u,r,void 0)&&fT(a.errors[a.errors.length-1],Rp(e,va.Did_you_mean_to_mark_this_function_as_async)),!0}return!1}(e,t,n,r,o,a)}return!1}function JS(e,t,n){const r=jb(t,n);if(r)return r;if(1048576&t.flags){const r=vk(e,t);if(r)return jb(r,n)}}function VS(e,t){fF(e,t,!1);const n=IM(e,1);return mF(),n}function US(e,t,n,r,i,o){let a=!1;for(const s of e){const{errorNode:e,innerExpression:c,nameType:l,errorMessage:u}=s;let _=JS(t,n,l);if(!_||8388608&_.flags)continue;let d=jb(t,l);if(!d)continue;const f=eb(l,void 0);if(!mk(d,_,r,void 0)&&(a=!0,!c||!BS(c,d,_,r,void 0,i,o))){const a=o||{},s=c?VS(c,d):d;if(ie&&yk(s,_)){const t=Rp(e,va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Ws(s),Ws(_));ro.add(t),a.errors=[t]}else{const o=!!(f&&16777216&(Jp(n,f)||ht).flags),c=!!(f&&16777216&(Jp(t,f)||ht).flags);_=bC(_,o),d=bC(d,o&&c),mk(s,_,r,e,u,i,a)&&s!==d&&mk(d,_,r,e,u,i,a)}if(a.errors){const e=a.errors[a.errors.length-1],t=mC(l)?gC(l):void 0,r=void 0!==t?Jp(n,t):void 0;let i=!1;if(!r){const t=mf(n,l);t&&t.declaration&&!Sd(t.declaration).hasNoDefaultLib&&(i=!0,fT(e,Rp(t.declaration,va.The_expected_type_comes_from_this_index_signature)))}if(!i&&(r&&p(r.declarations)||n.symbol&&p(n.symbol.declarations))){const i=r&&p(r.declarations)?r.declarations[0]:n.symbol.declarations[0];Sd(i).hasNoDefaultLib||fT(e,Rp(i,va.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,!t||8192&l.flags?Ws(l):vc(t),Ws(n)))}}}}return a}function KS(e,t,n){switch(e.kind){case 294:return{errorNode:e,innerExpression:e.expression,nameType:t};case 12:if(e.containsOnlyTriviaWhiteSpaces)break;return{errorNode:e,innerExpression:void 0,nameType:t,errorMessage:n()};case 284:case 285:case 288:return{errorNode:e,innerExpression:e,nameType:t};default:return xn.assertNever(e,"Found invalid jsx child")}}function*HS(e,t){const n=p(e.elements);if(n)for(let r=0;rc:AO(e)>c))return!r||8&n||i(va.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1,AO(e),c),0;var l;e.typeParameters&&e.typeParameters!==t.typeParameters&&(e=bI(e,t=(l=t).typeParameters?l.canonicalSignatureCache||(l.canonicalSignatureCache=function(e){return hm(e,O(e.typeParameters,(e=>e.target&&!Jd(e.target)?e.target:e)),Mm(e.declaration))}(l)):l,void 0,a));const u=FO(e),_=MO(e),d=MO(t);(_||d)&&eS(_||d,s);const p=t.declaration?t.declaration.kind:0,f=!(3&n)&&H&&174!==p&&173!==p&&176!==p;let m=-1;const g=Kf(e);if(g&&g!==Zt){const e=Kf(t);if(e){const t=!f&&a(g,e,!1)||a(e,g,r);if(!t)return r&&i(va.The_this_types_of_each_signature_are_incompatible),0;m&=t}}const h=_||d?Math.min(u,c):Math.max(u,c),y=_||d?h-1:-1;for(let c=0;c=AO(e)&&c=3&&32768&t[0].flags&&65536&t[1].flags&&Q(t,ok)?67108864:0)}return!!(67108864&e.objectFlags)}return!1}(t))return!0}return!1}function uk(e,t,n){if(cx(e)&&(e=e.regularType),cx(t)&&(t=t.regularType),e===t)return!0;if(n!==uo){if(n===lo&&!(131072&t.flags)&&lk(t,e,n)||lk(e,t,n))return!0}else if(!(61865984&(e.flags|t.flags))){if(e.flags!==t.flags)return!1;if(67358815&e.flags)return!0}if(524288&e.flags&&524288&t.flags){const r=n.get(Nk(e,t,0,n,!1));if(void 0!==r)return!!(1&r)}return!!(469499904&e.flags||469499904&t.flags)&&mk(e,t,n,void 0)}function _k(e,t){return 2048&wx(e)&&BF(t.escapedName)}function dk(e,t){for(;;){const n=cx(e)?e.regularType:NT(e)?fk(e,t):4&wx(e)?e.node?Tg(e.target,Ig(e)):Xk(e)||e:3145728&e.flags?pk(e,t):33554432&e.flags?t?e.baseType:Ch(e):25165824&e.flags?Nb(e,t):e;if(n===e)return n;e=n}}function pk(e,t){const n=Sp(e);if(n!==e)return n;if(2097152&e.flags&&function(e){let t=!1,n=!1;for(const r of e.types)if(t||(t=!!(465829888&r.flags)),n||(n=!!(98304&r.flags)||ok(r)),t&&n)return!0;return!1}(e)){const n=L(e.types,(e=>dk(e,t)));if(n!==e.types)return cv(n)}return e}function fk(e,t){const n=$y(e),r=L(n,(e=>25165824&e.flags?Nb(e,t):e));return n!==r?My(e.target,r):e}function mk(e,t,n,i,o,a,s){var c;let l,_,d,f,m,g,h,y,v=0,b=0,x=0,S=0,k=!1,C=0,w=0,E=16e6-n.size>>3;xn.assert(n!==uo||!i,"no error reporting in identity checking");const P=q(e,t,3,!!i,o);if(y&&M(),k){const o=Nk(e,t,0,n,!1);n.set(o,6),null==(c=or)||c.instant(or.Phase.CheckTypes,"checkTypeRelatedTo_DepthLimit",{sourceId:e.id,targetId:t.id,depth:b,targetDepth:x});const a=E<=0?va.Excessive_complexity_comparing_types_0_and_1:va.Excessive_stack_depth_comparing_types_0_and_1,l=xo(i||r,a,Ws(e),Ws(t));s&&(s.errors||(s.errors=[])).push(l)}else if(l){if(a){const e=a();e&&(_S(e,l),l=e)}let r;if(o&&i&&!P&&e.symbol){const i=Uo(e.symbol);i.originatingImport&&!uf(i.originatingImport)&&mk($l(i.target),t,n,void 0)&&(r=ue(r,Rp(i.originatingImport,va.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead)))}const c=zp(Sd(i),i,l,r);_&&fT(c,..._),s&&(s.errors||(s.errors=[])).push(c),s&&s.skipLogging||ro.add(c)}return i&&s&&s.skipLogging&&0===P&&xn.assert(!!s.errors,"missed opportunity to interact with error."),0!==P;function N(e){l=e.errorInfo,h=e.lastSkippedInfo,y=e.incompatibleStack,C=e.overrideNextErrorInfo,w=e.skipParentCounter,_=e.relatedInfo}function F(){return{errorInfo:l,lastSkippedInfo:h,incompatibleStack:null==y?void 0:y.slice(),overrideNextErrorInfo:C,skipParentCounter:w,relatedInfo:null==_?void 0:_.slice()}}function I(e,...t){C++,h=void 0,(y||(y=[])).push([e,...t])}function M(){const e=y||[];y=void 0;const t=h;if(h=void 0,1===e.length)return j(...e[0]),void(t&&J(void 0,...t));let n="";const r=[];for(;e.length;){const[t,...i]=e.pop();switch(t.code){case va.Types_of_property_0_are_incompatible.code:{0===n.indexOf("new ")&&(n=`(${n})`);const e=""+i[0];n=0===n.length?`${e}`:Ts(e,wS(A))?`${n}.${e}`:"["===e[0]&&"]"===e[e.length-1]?`${n}${e}`:`${n}[${e}]`;break}case va.Call_signature_return_types_0_and_1_are_incompatible.code:case va.Construct_signature_return_types_0_and_1_are_incompatible.code:case va.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:case va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:if(0===n.length){let e=t;t.code===va.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?e=va.Call_signature_return_types_0_and_1_are_incompatible:t.code===va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code&&(e=va.Construct_signature_return_types_0_and_1_are_incompatible),r.unshift([e,i[0],i[1]])}else n=`${t.code===va.Construct_signature_return_types_0_and_1_are_incompatible.code||t.code===va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"new ":""}${n}(${t.code===va.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code||t.code===va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"":"..."})`;break;case va.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code:r.unshift([va.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,i[0],i[1]]);break;case va.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code:r.unshift([va.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,i[0],i[1],i[2]]);break;default:return xn.fail(`Unhandled Diagnostic: ${t.code}`)}}n?j(")"===n[n.length-1]?va.The_types_returned_by_0_are_incompatible_between_these_types:va.The_types_of_0_are_incompatible_between_these_types,n):r.shift();for(const[e,...t]of r){const n=e.elidedInCompatabilityPyramid;e.elidedInCompatabilityPyramid=!1,j(e,...t),e.elidedInCompatabilityPyramid=n}t&&J(void 0,...t)}function j(e,...t){xn.assert(!!i),y&&M(),e.elidedInCompatabilityPyramid||(0===w?l=uS(l,e,...t):w--)}function R(e,...t){j(e,...t),w++}function B(e){xn.assert(!!l),_?_.push(e):_=[e]}function J(e,t,r){y&&M();const[i,o]=Hs(t,r);let a=t,s=i;if(sT(t)&&!gk(r)&&(a=cT(t),xn.assert(!SS(a,r),"generalized source shouldn't be assignable"),s=Gs(a)),262144&(8388608&r.flags&&!(8388608&t.flags)?r.objectType.flags:r.flags)&&r!==Jn&&r!==zn){const e=Wd(r);let n;e&&(SS(a,e)||(n=SS(t,e)))?j(va._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,n?i:s,o,Ws(e)):(l=void 0,j(va._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1,o,s))}if(e)e===va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1&&ie&&hk(t,r).length&&(e=va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties);else if(n===lo)e=va.Type_0_is_not_comparable_to_type_1;else if(i===o)e=va.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;else if(ie&&hk(t,r).length)e=va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;else{if(128&t.flags&&1048576&r.flags){const e=function(e,t){const n=t.types.filter((e=>!!(128&e.flags)));return Ut(e.value,n,(e=>e.value))}(t,r);if(e)return void j(va.Type_0_is_not_assignable_to_type_1_Did_you_mean_2,s,o,Ws(e))}e=va.Type_0_is_not_assignable_to_type_1}j(e,s,o)}function z(e,t,n){return PT(e)?e.target.readonly&&Kk(t)?(n&&j(va.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Ws(e),Ws(t)),!1):Uk(t):Vk(e)&&Kk(t)?(n&&j(va.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Ws(e),Ws(t)),!1):!PT(t)||qk(e)}function $(e,t,n){return q(e,t,3,n)}function q(e,t,r=3,o=!1,a,s=0){if(e===t)return-1;if(524288&e.flags&&402784252&t.flags)return n===lo&&!(131072&t.flags)&&lk(t,e,n)||lk(e,t,n,o?j:void 0)?-1:(o&&V(e,t,e,t,a),0);const c=dk(e,!1);let l=dk(t,!0);if(c===l)return-1;if(n===uo)return c.flags!==l.flags?0:67358815&c.flags?-1:(K(c,l),te(c,l,!1,0,r));if(262144&c.flags&&Bd(c)===l)return-1;if(470302716&c.flags&&1048576&l.flags){const e=l.types,t=2===e.length&&98304&e[0].flags?e[1]:3===e.length&&98304&e[0].flags&&98304&e[1].flags?e[2]:void 0;if(t&&!(98304&t.flags)&&(l=dk(t,!0),c===l))return-1}if(n===lo&&!(131072&l.flags)&&lk(l,c,n)||lk(c,l,n,o?j:void 0))return-1;if(469499904&c.flags||469499904&l.flags){if(!(2&s)&&Tw(c)&&8192&wx(c)&&function(e,t,r){var o;if(!aA(t)||!Y&&4096&wx(t))return!1;const a=!!(2048&wx(e));if((n===co||n===lo)&&(yD(Kn,t)||!a&&ik(t)))return!1;let s,c=t;1048576&t.flags&&(c=yJ(e,t,q)||function(e){if(_M(e,67108864)){const t=SD(e,(e=>!(402784252&e.flags)));if(!(131072&t.flags))return t}return e}(t),s=1048576&c.flags?c.types:[c]);for(const t of Rd(e))if(H(t,e.symbol)&&!_k(e,t)){if(!oA(c,t.escapedName,a)){if(r){const n=SD(c,aA);if(!i)return xn.fail();if(FN(i)||D_(i)||D_(i.parent)){t.valueDeclaration&&NN(t.valueDeclaration)&&Sd(i)===Sd(t.valueDeclaration.name)&&(i=t.valueDeclaration.name);const e=Us(t),r=VA(e,n),o=r?Us(r):void 0;o?j(va.Property_0_does_not_exist_on_type_1_Did_you_mean_2,e,Ws(n),o):j(va.Property_0_does_not_exist_on_type_1,e,Ws(n))}else{const r=(null==(o=e.symbol)?void 0:o.declarations)&&Se(e.symbol.declarations);let a;if(t.valueDeclaration&&mc(t.valueDeclaration,(e=>e===r))&&Sd(r)===Sd(i)){const e=t.valueDeclaration;xn.assertNode(e,Cu);const r=e.name;i=r,qD(r)&&(a=UA(r,n))}void 0!==a?R(va.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,Us(t),Ws(n),a):R(va.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Us(t),Ws(n))}}return!0}if(s&&!q($l(t),W(s,t.escapedName),3,r))return r&&I(va.Types_of_property_0_are_incompatible,Us(t)),!0}return!1}(c,l,o))return o&&J(a,c,t.aliasSymbol?t:l),0;const u=(n!==lo||iT(c))&&!(2&s)&&405405692&c.flags&&c!==Kn&&2621440&l.flags&&xk(l)&&(Rd(c).length>0||WR(c)),_=!!(2048&wx(c));if(u&&!function(e,t,n){for(const r of Rd(e))if(oA(t,r.escapedName,n))return!0;return!1}(c,l,_)){if(o){const n=Ws(e.aliasSymbol?e:c),r=Ws(t.aliasSymbol?t:l),i=Vp(c,0),o=Vp(c,1);i.length>0&&q(Gf(i[0]),l,1,!1)||o.length>0&&q(Gf(o[0]),l,1,!1)?j(va.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,n,r):j(va.Type_0_has_no_properties_in_common_with_type_1,n,r)}return 0}K(c,l);const d=1048576&c.flags&&c.types.length<4&&!(1048576&l.flags)||1048576&l.flags&&l.types.length<4&&!(469499904&c.flags)?G(c,l,o,s):te(c,l,o,s,r);if(d)return d}return o&&V(e,t,c,l,a),0}function V(e,t,n,r,o){var a,s;const c=!!Xk(e),u=!!Xk(t);n=e.aliasSymbol||c?e:n,r=t.aliasSymbol||u?t:r;let _=C>0;if(_&&C--,524288&n.flags&&524288&r.flags){const e=l;z(n,r,!0),l!==e&&(_=!!l)}if(524288&n.flags&&402784252&r.flags)!function(e,t){const n=Xs(e.symbol)?Ws(e,e.symbol.valueDeclaration):Ws(e),r=Xs(t.symbol)?Ws(t,t.symbol.valueDeclaration):Ws(t);(Yn===e&&Jt===t||Zn===e&&zt===t||er===e&&Xt===t||uy()===e&&Qt===t)&&j(va._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,r,n)}(n,r);else if(n.symbol&&524288&n.flags&&Kn===n)j(va.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(2048&wx(n)&&2097152&r.flags){const e=r.types,t=UF(hB.IntrinsicAttributes,i),n=UF(hB.IntrinsicClassAttributes,i);if(!Nc(t)&&!Nc(n)&&(D(e,t)||D(e,n)))return}else l=Mp(l,t);if(!o&&_){const e=F();let t;return J(o,n,r),l&&l!==e.errorInfo&&(t={code:l.code,messageText:l.messageText}),N(e),t&&l&&(l.canonicalHead=t),void(h=[n,r])}if(J(o,n,r),262144&n.flags&&(null==(s=null==(a=n.symbol)?void 0:a.declarations)?void 0:s[0])&&!Bd(n)){const e=Vx(n);if(e.constraint=eS(r,Mx(n,e)),Xd(e)){const e=Ws(r,n.symbol.declarations[0]);B(Rp(n.symbol.declarations[0],va.This_type_parameter_might_need_an_extends_0_constraint,e))}}}function K(e,t){if(or&&3145728&e.flags&&3145728&t.flags){const n=e,r=t;if(n.objectFlags&r.objectFlags&32768)return;const o=n.types.length,a=r.types.length;o*a>1e6&&or.instant(or.Phase.CheckTypes,"traceUnionsOrIntersectionsTooLarge_DepthLimit",{sourceId:e.id,sourceSize:o,targetId:t.id,targetSize:a,pos:null==i?void 0:i.pos,end:null==i?void 0:i.end})}}function W(e,t){return ev(Oe(e,((e,n)=>{var r;const i=3145728&(n=mp(n)).flags?xp(n,t):Ld(n,t);return ue(e,i&&$l(i)||(null==(r=gf(n,t))?void 0:r.type)||It)}),void 0)||u)}function H(e,t){return e.valueDeclaration&&t.valueDeclaration&&e.valueDeclaration.parent===t.valueDeclaration}function G(e,t,r,i){if(1048576&e.flags){if(1048576&t.flags){const n=e.origin;if(n&&2097152&n.flags&&t.aliasSymbol&&D(n.types,t))return-1;const r=t.origin;if(r&&1048576&r.flags&&e.aliasSymbol&&D(r.types,e))return-1}return n===lo?ee(e,t,r&&!(402784252&e.flags),i):function(e,t,n,r){let i=-1;const o=e.types,a=function(e,t){return 1048576&e.flags&&1048576&t.flags&&!(32768&e.types[0].flags)&&32768&t.types[0].flags?PD(t,-32769):t}(e,t);for(let e=0;e=a.types.length&&o.length%a.types.length==0){const t=q(s,a.types[e%a.types.length],3,!1,void 0,r);if(t){i&=t;continue}}const c=q(s,t,1,n,void 0,r);if(!c)return 0;i&=c}return i}(e,t,r&&!(402784252&e.flags),i)}if(1048576&t.flags)return Z(AC(e),t,r&&!(402784252&e.flags)&&!(402784252&t.flags),i);if(2097152&t.flags)return function(e,t,n,r){let i=-1;const o=t.types;for(const t of o){const r=q(e,t,2,n,void 0,2);if(!r)return 0;i&=r}return i}(e,t,r);if(n===lo&&402784252&t.flags){const n=L(e.types,(e=>465829888&e.flags?Wd(e)||At:e));if(n!==e.types){if(131072&(e=cv(n)).flags)return 0;if(!(2097152&e.flags))return q(e,t,1,!1)||q(t,e,1,!1)}}return ee(e,t,!1,1)}function X(e,t){let n=-1;const r=e.types;for(const e of r){const r=Z(e,t,!1,0);if(!r)return 0;n&=r}return n}function Z(e,t,r,i){const o=t.types;if(1048576&t.flags){if(Ky(o,e))return-1;if(n!==lo&&32768&wx(t)&&!(1024&e.flags)&&(2688&e.flags||(n===ao||n===so)&&256&e.flags)){const t=e===e.regularType?e.freshType:e.regularType,n=128&e.flags?Jt:256&e.flags?zt:2048&e.flags?$t:void 0;return n&&Ky(o,n)||t&&Ky(o,t)?-1:0}const r=Uw(t,e);if(r){const t=q(e,r,2,!1,void 0,i);if(t)return t}}for(const t of o){const n=q(e,t,2,!1,void 0,i);if(n)return n}if(r){const n=vk(e,t,q);n&&q(e,n,2,!0,void 0,i)}return 0}function ee(e,t,n,r){const i=e.types;if(1048576&e.flags&&Ky(i,t))return-1;const o=i.length;for(let e=0;e(w|=e?16:8,T(e))),3===S?(null==(a=or)||a.instant(or.Phase.CheckTypes,"recursiveTypeRelatedTo_DepthLimit",{sourceId:e.id,sourceIdStack:m.map((e=>e.id)),targetId:t.id,targetIdStack:g.map((e=>e.id)),depth:b,targetDepth:x}),C=3):(null==(s=or)||s.push(or.Phase.CheckTypes,"structuredTypeRelatedTo",{sourceId:e.id,targetId:t.id}),C=function(e,t,r,i){const o=F();let a=function(e,t,r,i,o){let a,s,c=!1,_=e.flags;const d=t.flags;if(n===uo){if(3145728&_){let n=X(e,t);return n&&(n&=X(t,e)),n}if(4194304&_)return q(e.type,t.type,3,!1);if(8388608&_&&(a=q(e.objectType,t.objectType,3,!1))&&(a&=q(e.indexType,t.indexType,3,!1)))return a;if(16777216&_&&e.root.isDistributive===t.root.isDistributive&&(a=q(e.checkType,t.checkType,3,!1))&&(a&=q(e.extendsType,t.extendsType,3,!1))&&(a&=q(Vb(e),Vb(t),3,!1))&&(a&=q(Ub(e),Ub(t),3,!1)))return a;if(33554432&_&&(a=q(e.baseType,t.baseType,3,!1))&&(a&=q(e.constraint,t.constraint,3,!1)))return a;if(!(524288&_))return 0}else if(3145728&_||3145728&d){if(a=G(e,t,r,i))return a;if(!(465829888&_||524288&_&&1048576&d||2097152&_&&467402752&d))return 0}if(17301504&_&&e.aliasSymbol&&e.aliasTypeArguments&&e.aliasSymbol===t.aliasSymbol&&!wk(e)&&!wk(t)){const n=kk(e.aliasSymbol);if(n===u)return 1;const r=Uo(e.aliasSymbol).typeParameters,o=kf(r),a=y(Tf(e.aliasTypeArguments,r,o,Mm(e.aliasSymbol.valueDeclaration)),Tf(t.aliasTypeArguments,r,o,Mm(e.aliasSymbol.valueDeclaration)),n,i);if(void 0!==a)return a}if(AT(e)&&!e.target.readonly&&(a=q(Ig(e)[0],t,1))||AT(t)&&(t.target.readonly||Kk(Wd(e)||e))&&(a=q(e,Ig(t)[0],2)))return a;if(262144&d){if(32&wx(e)&&!e.declaration.nameType&&q(Av(t),md(e),3)&&!(4&Dd(e))){const n=yd(e),i=Mb(t,fd(e));if(a=q(n,i,3,r))return a}if(n===lo&&262144&_){let n=Jd(e);if(n)for(;n&&bD(n,(e=>!!(262144&e.flags)));){if(a=q(n,t,1,!1))return a;n=Jd(n)}return 0}}else if(4194304&d){const n=t.type;if(4194304&_&&(a=q(n,e.type,3,!1)))return a;if(PT(n)){if(a=q(e,jy(n),2,r))return a}else{const i=$d(n);if(i){if(-1===q(e,Av(i,4|t.indexFlags),2,r))return-1}else if(Ad(n)){const t=hd(n),i=md(n);let o;if(o=t&&bd(n)?ev([ne(t,n),t]):t||i,-1===q(e,o,2,r))return-1}}}else if(8388608&d){if(8388608&_){if((a=q(e.objectType,t.objectType,3,r))&&(a&=q(e.indexType,t.indexType,3,r)),a)return a;r&&(s=l)}if(n===co||n===lo){const n=t.objectType,c=t.indexType,u=Wd(n)||n,_=Wd(c)||c;if(!pb(u)&&!gb(_)){const t=jb(u,_,4|(u!==n?2:0));if(t){if(r&&s&&N(o),a=q(e,t,2,r,void 0,i))return a;r&&s&&l&&(l=h([s])<=h([l])?s:l)}}}r&&(s=void 0)}else if(Ad(t)&&n!==uo){const n=!!t.declaration.nameType,i=yd(t),c=Dd(t);if(!(8&c)){if(!n&&8388608&i.flags&&i.objectType===e&&i.indexType===fd(t))return-1;if(!Ad(e)){const i=n?hd(t):md(t),u=Av(e,2),_=4&c,d=_?K_(i,u):void 0;if(_?!(131072&d.flags):q(i,u,3)){const o=yd(t),s=fd(t),c=PD(o,-98305);if(!n&&8388608&c.flags&&c.indexType===s){if(a=q(e,c.objectType,2,r))return a}else{const t=Mb(e,n?d||i:d?cv([d,s]):s);if(a=q(t,o,3,r))return a}}s=l,N(o)}}}else if(16777216&d){if(Mk(t,g,x,10))return 3;const n=t;if(!(n.root.inferTypeParameters||(p=n.root,p.isDistributive&&(Wx(p.checkType,p.node.trueType)||Wx(p.checkType,p.node.falseType)))||16777216&e.flags&&e.root===n.root)){const t=!SS(rS(n.checkType),rS(n.extendsType)),r=!t&&SS(iS(n.checkType),iS(n.extendsType));if((a=t?-1:q(e,Vb(n),2,!1,void 0,i))&&(a&=r?-1:q(e,Ub(n),2,!1,void 0,i),a))return a}}else if(134217728&d){if(134217728&_){if(n===lo)return function(e,t){const n=e.texts[0],r=t.texts[0],i=e.texts[e.texts.length-1],o=t.texts[t.texts.length-1],a=Math.min(n.length,r.length),s=Math.min(i.length,o.length);return n.slice(0,a)!==r.slice(0,a)||i.slice(i.length-s)!==o.slice(o.length-s)}(e,t)?0:-1;eS(e,Tn)}if(vw(e,t))return-1}else if(268435456&t.flags&&!(268435456&e.flags)&&pw(e,t))return-1;var p,f;if(8650752&_){if(!(8388608&_&&8388608&d)){const n=Bd(e)||At;if(a=q(n,t,1,!1,void 0,i))return a;if(a=q(y_(n,e),t,1,r&&n!==At&&!(d&_&262144),void 0,i))return a;if(up(e)){const n=Bd(e.indexType);if(n&&(a=q(Mb(e.objectType,n),t,1,r)))return a}}}else if(4194304&_){const n=Fv(e.type,e.indexFlags)&&32&wx(e.type);if(a=q(pn,t,1,r&&!n))return a;if(n){const n=e.type,i=hd(n),o=i&&bd(n)?ne(i,n):i||md(n);if(a=q(o,t,1,r))return a}}else if(134217728&_&&!(524288&d)){if(!(134217728&d)){const n=Wd(e);if(n&&n!==e&&(a=q(n,t,1,r)))return a}}else if(268435456&_)if(268435456&d){if(e.symbol!==t.symbol)return 0;if(a=q(e.type,t.type,3,r))return a}else{const n=Wd(e);if(n&&(a=q(n,t,1,r)))return a}else if(16777216&_){if(Mk(e,m,b,10))return 3;if(16777216&d){const n=e.root.inferTypeParameters;let i,o=e.extendsType;if(n){const e=UC(n,void 0,0,$);xw(e.inferences,t.extendsType,o,1536),o=eS(o,e.mapper),i=e.mapper}if(gS(o,t.extendsType)&&(q(e.checkType,t.checkType,3)||q(t.checkType,e.checkType,3))&&((a=q(eS(Vb(e),i),Vb(t),3,r))&&(a&=q(Ub(e),Ub(t),3,r)),a))return a}const n=qd(e);if(n&&(a=q(n,t,1,r)))return a;const i=16777216&d||!Xd(e)?void 0:Vd(e);if(i&&(N(o),a=q(i,t,1,r)))return a}else{if(n!==ao&&n!==so&&32&wx(f=t)&&4&Dd(f)&&ik(e))return-1;if(Ad(t))return Ad(e)&&(a=function(e,t,r){if(n===lo||(n===uo?Dd(e)===Dd(t):Pd(e)<=Pd(t))){let n;if(n=q(md(t),eS(md(e),Pd(e)<0?Cn:Tn),3,r)){const i=Fx([fd(e)],[fd(t)]);if(eS(hd(e),i)===eS(hd(t),i))return n&q(eS(yd(e),i),yd(t),3,r)}}return 0}(e,t,r))?a:0;const p=!!(402784252&_);if(n!==uo)_=(e=mp(e)).flags;else if(Ad(e))return 0;if(4&wx(e)&&4&wx(t)&&e.target===t.target&&!PT(e)&&!wk(e)&&!wk(t)){if(Yk(e))return-1;const n=Sk(e.target);if(n===u)return 1;const r=y(Ig(e),Ig(t),n,i);if(void 0!==r)return r}else{if(Vk(t)?xD(e,Uk):qk(t)&&xD(e,(e=>PT(e)&&!e.target.readonly)))return n!==uo?q(pf(e,zt)||St,pf(t,zt)||St,3,r):0;if(NT(e)&&PT(t)&&!NT(t)){const n=Hd(e);if(n!==e)return q(n,t,1,r)}else if((n===ao||n===so)&&ik(t)&&8192&wx(t)&&!ik(e))return 0}if(2621440&_&&524288&d){const n=r&&l===o.errorInfo&&!p;if(a=ae(e,t,n,void 0,!1,i),a&&(a&=se(e,t,0,n,i),a&&(a&=se(e,t,1,n,i),a&&(a&=pe(e,t,p,n,i)))),c&&a)l=s||l||o.errorInfo;else if(a)return a}if(2621440&_&&1048576&d){const r=PD(t,36175872);if(1048576&r.flags){const t=function(e,t){var r;const i=$w(Rd(e),t);if(!i)return 0;let o=1;for(const n of i)if(o*=CD(ql(n)),o>25)return null==(r=or)||r.instant(or.Phase.CheckTypes,"typeRelatedToDiscriminatedType_DepthLimit",{sourceId:e.id,targetId:t.id,numCombinations:o}),0;const a=new Array(i.length),s=new Set;for(let e=0;er[o]),!1,0,U||n===lo))continue e}fe(l,a,wt),o=!0}if(!o)return 0}let u=-1;for(const t of l)if(u&=ae(e,t,!1,s,!1,0),u&&(u&=se(e,t,0,!1,0),u&&(u&=se(e,t,1,!1,0),!u||PT(e)&&PT(t)||(u&=pe(e,t,!1,!1,0)))),!u)return u;return u}(e,r);if(t)return t}}}return 0;function h(e){return e?Oe(e,((e,t)=>e+1+h(t.next)),0):0}function y(e,t,i,_){if(a=function(e=u,t=u,r=u,i,o){if(e.length!==t.length&&n===uo)return 0;const a=e.length<=t.length?e.length:t.length;let s=-1;for(let c=0;c!!(24&e))))return s=void 0,void N(o);const d=t&&function(e,t){for(let n=0;n0==(7&e)))))return 0;s=l,N(o)}}}(e,t,r,i,o);if(n!==uo){if(!a&&(2097152&e.flags||262144&e.flags&&1048576&t.flags)){const n=function(e,t){let n,r=!1;for(const i of e)if(465829888&i.flags){let e=Bd(i);for(;e&&21233664&e.flags;)e=Bd(e);e&&(n=ue(n,e),t&&(n=ue(n,i)))}else(469892092&i.flags||ok(i))&&(r=!0);if(n&&(t||r)){if(r)for(const t of e)(469892092&t.flags||ok(t))&&(n=ue(n,t));return dk(cv(n,2),!1)}}(2097152&e.flags?e.types:[e],!!(1048576&t.flags));n&&xD(n,(t=>t!==e))&&(a=q(n,t,1,!1,void 0,i))}a&&!(2&i)&&2097152&t.flags&&!pb(t)&&2621440&e.flags?(a&=ae(e,t,r,void 0,!1,0),a&&Tw(e)&&8192&wx(e)&&(a&=pe(e,t,!1,r,0))):a&&Zb(t)&&!Uk(t)&&2097152&e.flags&&3670016&mp(e).flags&&!Q(e.types,(e=>e===t||!!(262144&wx(e))))&&(a&=ae(e,t,r,void 0,!0,i))}return a&&N(o),a}(e,t,r,i),null==(c=or)||c.pop()),Gt&&(Gt=T),1&o&&b--,2&o&&x--,S=y,C?(-1===C||0===b&&0===x)&&D(-1===C||3===C):(n.set(_,2|(r?4:0)|w),E--,D(!1)),C;function D(e){for(let t=h;t{r.push(eS(e,qx(t.mapper,fd(t),n)))})),ev(r)}function re(e,t){if(!t||0===e.length)return e;let n;for(let r=0;r{return!!(4&fx(t))&&(n=e,r=Ak(t),!Fk(n,(e=>{const t=Ak(e);return!!t&&Gl(t,r)})));var n,r}))}(r,i))return a&&j(va.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,Us(i),Ws(Ak(r)||e),Ws(Ak(i)||t)),0}else if(4&l)return a&&j(va.Property_0_is_protected_in_type_1_but_public_in_type_2,Us(i),Ws(e),Ws(t)),0;if(n===so&&oM(r)&&!oM(i))return 0;const _=function(e,t,n,r,i){const o=U&&!!(48&px(t)),a=Hc(ql(t),!1,o);return q(n(e),a,3,r,void 0,i)}(r,i,o,a,s);return _?!c&&16777216&r.flags&&106500&i.flags&&!(16777216&i.flags)?(a&&j(va.Property_0_is_optional_in_type_1_but_required_in_type_2,Us(i),Ws(e),Ws(t)),0):_:(a&&I(va.Types_of_property_0_are_incompatible,Us(i)),0)}function ae(e,t,r,i,a,s){if(n===uo)return function(e,t,n){if(!(524288&e.flags&&524288&t.flags))return 0;const r=re(Md(e),n),i=re(Md(t),n);if(r.length!==i.length)return 0;let o=-1;for(const e of r){const n=Ld(t,e.escapedName);if(!n)return 0;const r=Bk(e,n,q);if(!r)return 0;o&=r}return o}(e,t,i);let c=-1;if(PT(t)){if(Uk(e)){if(!t.target.readonly&&(Vk(e)||PT(e)&&e.target.readonly))return 0;const n=Og(e),o=Og(t),a=PT(e)?4&e.target.combinedFlags:4,l=4&t.target.combinedFlags,u=PT(e)?e.target.minLength:0,_=t.target.minLength;if(!a&&n<_)return r&&j(va.Source_has_0_element_s_but_target_requires_1,n,_),0;if(!l&&o!(11&e)));return n>=0?n:e.elementFlags.length}(t.target),m=Ry(t.target,11),g=t.target.hasRestElement;let h=!!i;for(let a=0;a=f?o-1-Math.min(u,m):a,y=t.target.elementFlags[_];if(8&y&&!(8&l))return r&&j(va.Source_provides_no_match_for_variadic_element_at_position_0_in_target,_),0;if(8&l&&!(12&y))return r&&j(va.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target,a,_),0;if(1&y&&!(1&l))return r&&j(va.Source_provides_no_match_for_required_element_at_position_0_in_target,_),0;if(h&&((12&l||12&y)&&(h=!1),h&&(null==i?void 0:i.has(""+a))))continue;const v=bC(d[a],!!(l&y&2)),b=p[_],x=q(v,8&l&&4&y?Ty(b):bC(b,!!(2&y)),3,r,void 0,s);if(!x)return r&&(o>1||n>1)&&(g&&a>=f&&u>=m&&f!==n-m-1?I(va.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,f,n-m-1,_):I(va.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,a,_)),0;c&=x}return c}if(12&t.target.combinedFlags)return 0}const u=!(n!==ao&&n!==so||Tw(e)||Yk(e)||PT(e)),_=cw(e,t,u,!1);if(_)return r&&function(e,t){const n=qp(e,0),r=qp(e,1),i=Md(e);return!((n.length||r.length)&&!i.length)||!!(Vp(t,0).length&&n.length||Vp(t,1).length&&r.length)}(e,t)&&function(e,t,n,r){let i=!1;if(n.valueDeclaration&&Dc(n.valueDeclaration)&&VD(n.valueDeclaration.name)&&e.symbol&&32&e.symbol.flags){const r=n.valueDeclaration.name.escapedText,i=Qh(e.symbol,r);if(i&&Jp(e,i)){const n=YC.getDeclarationName(e.symbol.valueDeclaration),i=YC.getDeclarationName(t.symbol.valueDeclaration);return void j(va.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2,ea(r),ea(""===n.escapedText?bB:n),ea(""===i.escapedText?bB:i))}}const a=$e(sw(e,t,r,!1));if((!o||o.code!==va.Class_0_incorrectly_implements_interface_1.code&&o.code!==va.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code)&&(i=!0),1===a.length){const r=Us(n,void 0,0,20);j(va.Property_0_is_missing_in_type_1_but_required_in_type_2,r,...Hs(e,t)),p(n.declarations)&&B(Rp(n.declarations[0],va._0_is_declared_here,r)),i&&l&&C++}else z(e,t,!1)&&(a.length>5?j(va.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,Ws(e),Ws(t),O(a.slice(0,4),(e=>Us(e))).join(", "),a.length-4):j(va.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,Ws(e),Ws(t),O(a,(e=>Us(e))).join(", ")),i&&l&&C++)}(e,t,_,u),0;if(Tw(t))for(const n of re(Rd(e),i))if(!(Ld(t,n.escapedName)||32768&$l(n).flags))return r&&j(va.Property_0_does_not_exist_on_type_1,Us(n),Ws(t)),0;const d=Rd(t),f=PT(e)&&PT(t);for(const o of re(d,i)){const i=o.escapedName;if(!(4194304&o.flags)&&(!f||WT(i)||"length"===i)&&(!a||16777216&o.flags)){const a=Jp(e,i);if(a&&a!==o){const i=oe(e,t,a,o,ql,r,s,n===lo);if(!i)return 0;c&=i}}}return c}function se(e,t,r,i,o){var a,s;if(n===uo)return function(e,t,n){const r=Vp(e,n),i=Vp(t,n);if(r.length!==i.length)return 0;let o=-1;for(let e=0;eKs(e,void 0,262144,r);return j(va.Type_0_is_not_assignable_to_type_1,e(t),e(c)),j(va.Types_of_construct_signatures_are_incompatible),d}}else e:for(const t of _){const n=F();let a=i;for(const e of u){const r=_e(e,t,!0,a,o,p(e,t));if(r){d&=r,N(n);continue e}a=!1}return a&&j(va.Type_0_provides_no_match_for_the_signature_1,Ws(e),Ks(t,void 0,void 0,r)),0}return d}function ce(e,t){return 0===e.parameters.length&&0===t.parameters.length?(e,t)=>I(va.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Ws(e),Ws(t)):(e,t)=>I(va.Call_signature_return_types_0_and_1_are_incompatible,Ws(e),Ws(t))}function le(e,t){return 0===e.parameters.length&&0===t.parameters.length?(e,t)=>I(va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Ws(e),Ws(t)):(e,t)=>I(va.Construct_signature_return_types_0_and_1_are_incompatible,Ws(e),Ws(t))}function _e(e,t,r,i,o,a){const s=n===ao?16:n===so?24:0;return YS(r?Sm(e):e,r?Sm(t):t,s,i,j,a,(function(e,t,n){return q(e,t,3,n,void 0,o)}),Tn)}function de(e,t,n,r){const i=q(e.type,t.type,3,n,void 0,r);return!i&&n&&(e.keyType===t.keyType?j(va._0_index_signatures_are_incompatible,Ws(e.keyType)):j(va._0_and_1_index_signatures_are_incompatible,Ws(e.keyType),Ws(t.keyType))),i}function pe(e,t,r,i,o){if(n===uo)return function(e,t){const n=cf(e),r=cf(t);if(n.length!==r.length)return 0;for(const t of r){const n=_f(e,t.keyType);if(!n||!q(n.type,t.type,3)||n.isReadonly!==t.isReadonly)return 0}return-1}(e,t);const a=cf(t),s=Q(a,(e=>e.keyType===Jt));let c=-1;for(const t of a){const a=n!==so&&!r&&s&&1&t.type.flags?-1:Ad(e)&&s?q(yd(e),t.type,3,i):me(e,t,i,o);if(!a)return 0;c&=a}return c}function me(e,t,r,i){const o=mf(e,t.keyType);return o?de(o,t,r,i):1&i||!(n!==so||8192&wx(e))||!NC(e)?(r&&j(va.Index_signature_for_type_0_is_missing_in_type_1,Ws(t.keyType),Ws(e)),0):function(e,t,n,r){let i=-1;const o=t.keyType,a=2097152&e.flags?jd(e):Md(e);for(const s of a)if(!_k(e,s)&&af(Ev(s,8576),o)){const e=ql(s),a=q(ie||32768&e.flags||o===zt||!(16777216&s.flags)?e:Zw(e,524288),t.type,3,n,void 0,r);if(!a)return n&&j(va.Property_0_is_incompatible_with_index_signature,Us(s)),0;i&=a}for(const a of cf(e))if(af(a.keyType,o)){const e=de(a,t,n,r);if(!e)return 0;i&=e}return i}(e,t,r,i)}}function gk(e){if(16&e.flags)return!1;if(3145728&e.flags)return!!f(e.types,gk);if(465829888&e.flags){const t=Bd(e);if(t&&t!==e)return gk(t)}return iT(e)||!!(134217728&e.flags)||!!(268435456&e.flags)}function hk(e,t){return PT(e)&&PT(t)?u:Rd(t).filter((t=>yk(Tc(e,t.escapedName),$l(t))))}function yk(e,t){return!!e&&!!t&&_M(e,32768)&&!!DC(t)}function vk(e,t,n=yS){return yJ(e,t,n)||function(e,t){const n=wx(e);if(20&n&&1048576&t.flags)return S(t.types,(t=>{if(524288&t.flags){const r=n&wx(t);if(4&r)return e.target===t.target;if(16&r)return!!e.aliasSymbol&&e.aliasSymbol===t.aliasSymbol}return!1}))}(e,t)||function(e,t){if(128&wx(e)&&bD(t,Hk))return S(t.types,(e=>!Hk(e)))}(e,t)||function(e,t){let n=0;if(Vp(e,n).length>0||(n=1,Vp(e,n).length>0))return S(t.types,(e=>Vp(e,n).length>0))}(e,t)||function(e,t){let n;if(!(406978556&e.flags)){let r=0;for(const i of t.types)if(!(406978556&i.flags)){const t=cv([Av(e),Av(i)]);if(4194304&t.flags)return i;if(iT(t)||1048576&t.flags){const e=1048576&t.flags?N(t.types,iT):1;e>=r&&(n=i,r=e)}}}return n}(e,t)}function bk(e,t,n){const r=e.types,i=r.map((e=>402784252&e.flags?0:-1));for(const[e,o]of t){let t=!1;for(let a=0;ai[t])),0):e;return 131072&o.flags?e:o}function xk(e){if(524288&e.flags){const t=Od(e);return 0===t.callSignatures.length&&0===t.constructSignatures.length&&0===t.indexInfos.length&&t.properties.length>0&&x(t.properties,(e=>!!(16777216&e.flags)))}return 33554432&e.flags?xk(e.baseType):!!(2097152&e.flags)&&x(e.types,xk)}function Sk(e){return e===Xn||e===Qn||8&e.objectFlags?P:Tk(e.symbol,e.typeParameters)}function kk(e){return Tk(e,Uo(e).typeParameters)}function Tk(e,t=u){var n,r;const i=Uo(e);if(!i.variances){null==(n=or)||n.push(or.Phase.CheckTypes,"getVariancesWorker",{arity:t.length,id:qy(ju(e))});const o=Mi,a=Oi;Mi||(Mi=!0,Oi=Fi.length),i.variances=u;const s=[];for(const n of t){const t=Dk(n);let r=16384&t?8192&t?0:1:8192&t?2:void 0;if(void 0===r){let t=!1,i=!1;const o=Gt;Gt=e=>e?i=!0:t=!0;const a=Ck(e,n,jn),s=Ck(e,n,Rn);r=(SS(s,a)?1:0)|(SS(a,s)?2:0),3===r&&SS(Ck(e,n,Bn),a)&&(r=4),Gt=o,(t||i)&&(t&&(r|=8),i&&(r|=16))}s.push(r)}o||(Mi=!1,Oi=a),i.variances=s,null==(r=or)||r.pop({variances:s.map(xn.formatVariance)})}return i.variances}function Ck(e,t,n){const r=Mx(t,n),i=ju(e);if(Nc(i))return i;const o=524288&e.flags?Bg(e,Dx(Uo(e).typeParameters,r)):Tg(i,Dx(i.typeParameters,r));return gt.add(qy(o)),o}function wk(e){return gt.has(qy(e))}function Dk(e){var t;return 28672&Oe(null==(t=e.symbol)?void 0:t.declarations,((e,t)=>e|Qv(t)),0)}function Ek(e){return 262144&e.flags&&!Jd(e)}function Pk(e){return function(e){return!!(4&wx(e))&&!e.node}(e)&&Q(Ig(e),(e=>!!(262144&e.flags)||Pk(e)))}function Nk(e,t,n,r,i){if(r===uo&&e.id>t.id){const n=e;e=t,t=n}const o=n?":"+n:"";return Pk(e)&&Pk(t)?function(e,t,n,r){const i=[];let o="";const a=c(e,0),s=c(t,0);return`${o}${a},${s}${n}`;function c(e,t=0){let n=""+e.target.id;for(const a of Ig(e)){if(262144&a.flags){if(r||Ek(a)){let e=i.indexOf(a);e<0&&(e=i.length,i.push(a)),n+="="+e;continue}o="*"}else if(t<4&&Pk(a)){n+="<"+c(a,t+1)+">";continue}n+="-"+a.id}return n}}(e,t,o,i):`${e.id},${t.id}${o}`}function Fk(e,t){if(!(6&px(e)))return t(e);for(const n of e.links.containingType.types){const r=Jp(n,e.escapedName),i=r&&Fk(r,t);if(i)return i}}function Ak(e){return e.parent&&32&e.parent.flags?ju(is(e)):void 0}function Ik(e){const t=Ak(e),n=t&&ku(t)[0];return n&&Tc(n,e.escapedName)}function Ok(e,t,n){return Fk(t,(t=>!!(4&fx(t,n))&&!Gl(e,Ak(t))))?void 0:e}function Mk(e,t,n,r=3){if(n>=r){if(96==(96&wx(e))&&(e=Lk(e)),2097152&e.flags)return Q(e.types,(e=>Mk(e,t,n,r)));const i=Rk(e);let o=0,a=0;for(let e=0;e=a&&(o++,o>=r))return!0;a=n.id}}}return!1}function Lk(e){let t;for(;96==(96&wx(e))&&(t=wd(e))&&(t.symbol||2097152&t.flags&&Q(t.types,(e=>!!e.symbol)));)e=t;return e}function jk(e,t){return 96==(96&wx(e))&&(e=Lk(e)),2097152&e.flags?Q(e.types,(e=>jk(e,t))):Rk(e)===t}function Rk(e){if(524288&e.flags&&!Cw(e)){if(4&wx(e)&&e.node)return e.node;if(e.symbol&&!(16&wx(e)&&32&e.symbol.flags))return e.symbol;if(PT(e))return e.target}if(262144&e.flags)return e.symbol;if(8388608&e.flags){do{e=e.objectType}while(8388608&e.flags);return e}return 16777216&e.flags?e.root:e}function Bk(e,t,n){if(e===t)return-1;const r=6&fx(e);if(r!==(6&fx(t)))return 0;if(r){if(Zj(e)!==Zj(t))return 0}else if((16777216&e.flags)!=(16777216&t.flags))return 0;return oM(e)!==oM(t)?0:n($l(e),$l(t))}function Jk(e,t,n,r,i,o){if(e===t)return-1;if(!function(e,t,n){const r=FO(e),i=FO(t),o=AO(e),a=AO(t),s=IO(e),c=IO(t);return r===i&&o===a&&s===c||!!(n&&o<=a)}(e,t,n))return 0;if(p(e.typeParameters)!==p(t.typeParameters))return 0;if(t.typeParameters){const n=Fx(e.typeParameters,t.typeParameters);for(let r=0;re|(1048576&t.flags?zk(t.types):t.flags)),0)}function $k(e){if(1===e.length)return e[0];const t=U?L(e,(e=>SD(e,(e=>!(98304&e.flags))))):e,n=function(e){let t;for(const n of e)if(!(131072&n.flags)){const e=cT(n);if(t??(t=e),e===n||e!==t)return!1}return!0}(t)?ev(t):Oe(t,((e,t)=>bS(e,t)?t:e));return t===e?n:KT(n,98304&zk(e))}function qk(e){return!!(4&wx(e))&&(e.target===Xn||e.target===Qn)}function Vk(e){return!!(4&wx(e))&&e.target===Qn}function Uk(e){return qk(e)||PT(e)}function Kk(e){return qk(e)&&!Vk(e)||PT(e)&&!e.target.readonly}function Wk(e){return qk(e)?Ig(e)[0]:void 0}function Hk(e){return qk(e)||!(98304&e.flags)&&SS(e,ar)}function Gk(e){return Kk(e)||!(98305&e.flags)&&SS(e,rr)}function Xk(e){if(!(4&wx(e)&&3&wx(e.target)))return;if(33554432&wx(e))return 67108864&wx(e)?e.cachedEquivalentBaseType:void 0;e.objectFlags|=33554432;const t=e.target;if(1&wx(t)){const e=du(t);if(e&&80!==e.expression.kind&&211!==e.expression.kind)return}const n=ku(t);if(1!==n.length)return;if(m_(e.symbol).size)return;let r=p(t.typeParameters)?eS(n[0],Fx(t.typeParameters,Ig(e).slice(0,t.typeParameters.length))):n[0];return p(Ig(e))>p(t.typeParameters)&&(r=y_(r,De(Ig(e)))),e.objectFlags|=67108864,e.cachedEquivalentBaseType=r}function Qk(e){return U?e===nn:e===Ot}function Yk(e){const t=Wk(e);return!!t&&Qk(t)}function Zk(e){let t;return PT(e)||!!Jp(e,"0")||Hk(e)&&!!(t=Tc(e,"length"))&&xD(t,(e=>!!(256&e.flags)))}function tT(e){return Hk(e)||Zk(e)}function nT(e,t){return Tc(e,""+t)||(xD(e,PT)?LT(e,t,A.noUncheckedIndexedAccess?It:void 0):void 0)}function rT(e){return!(240544&e.flags)}function iT(e){return!!(109472&e.flags)}function oT(e){const t=Hd(e);return 2097152&t.flags?Q(t.types,iT):iT(t)}function sT(e){return!!(16&e.flags)||(1048576&e.flags?!!(1024&e.flags)||x(e.types,iT):iT(e))}function cT(e){return 1056&e.flags?Au(e):402653312&e.flags?Jt:256&e.flags?zt:2048&e.flags?$t:512&e.flags?Xt:1048576&e.flags?function(e){const t=`B${qy(e)}`;return fo(t)??mo(t,DD(e,cT))}(e):e}function _T(e){return 402653312&e.flags?Jt:288&e.flags?zt:2048&e.flags?$t:512&e.flags?Xt:1048576&e.flags?DD(e,_T):e}function dT(e){return 1056&e.flags&&cx(e)?Au(e):128&e.flags&&cx(e)?Jt:256&e.flags&&cx(e)?zt:2048&e.flags&&cx(e)?$t:512&e.flags&&cx(e)?Xt:1048576&e.flags?DD(e,dT):e}function pT(e){return 8192&e.flags?Qt:1048576&e.flags?DD(e,pT):e}function bT(e,t){return FM(e,t)||(e=pT(dT(e))),sx(e)}function kT(e,t,n,r){return e&&iT(e)&&(e=bT(e,t?jj(n,t,r):void 0)),e}function PT(e){return!!(4&wx(e)&&8&e.target.objectFlags)}function NT(e){return PT(e)&&!!(8&e.target.combinedFlags)}function AT(e){return NT(e)&&1===e.target.elementFlags.length}function MT(e){return jT(e,e.target.fixedLength)}function LT(e,t,n){return DD(e,(e=>{const r=e,i=MT(r);return i?n&&t>=zy(r.target)?ev([i,n]):i:It}))}function jT(e,t,n=0,r=!1,i=!1){const o=Og(e)-n;if(tQw(e,4194304)))}function zT(e){return 4&e.flags?Ei:8&e.flags?Pi:64&e.flags?Ni:e===Vt||e===qt||114691&e.flags||128&e.flags&&""===e.value||256&e.flags&&0===e.value||2048&e.flags&&RT(e)?e:en}function KT(e,t){const n=t&~e.flags&98304;return 0===n?e:ev(32768===n?[e,It]:65536===n?[e,Rt]:[e,It,Rt])}function XT(e,t=!1){xn.assert(U);const n=t?Lt:It;return e===n||1048576&e.flags&&e.types[0]===n?e:ev([e,n])}function QT(e){return U?eD(e,2097152):e}function nC(e){return U?ev([e,jt]):e}function _C(e){return U?kD(e,jt):e}function pC(e,t,n){return n?Cl(t)?XT(e):nC(e):e}function vC(e,t){return Tl(t)?QT(e):Sl(t)?_C(e):e}function bC(e,t){return ie&&t?kD(e,Mt):e}function DC(e){return e===Mt||!!(1048576&e.flags)&&e.types[0]===Mt}function EC(e){return ie?kD(e,Mt):Zw(e,524288)}function NC(e){const t=wx(e);return 2097152&e.flags?x(e.types,NC):!(!e.symbol||0==(7040&e.symbol.flags)||32&e.symbol.flags||WR(e))||!!(4194304&t)||!!(1024&t&&NC(e.source))}function FC(e,t){const n=No(e.flags,e.escapedName,8&px(e));n.declarations=e.declarations,n.parent=e.parent,n.links.type=t,n.links.target=e,e.valueDeclaration&&(n.valueDeclaration=e.valueDeclaration);const r=Uo(e).nameType;return r&&(n.links.nameType=r),n}function AC(e){if(!(Tw(e)&&8192&wx(e)))return e;const t=e.regularType;if(t)return t;const n=e,r=function(e,t){const n=ed();for(const r of Md(e)){const e=$l(r),i=t(e);n.set(r.escapedName,i===e?r:FC(r,i))}return n}(e,AC),i=ks(n.symbol,r,n.callSignatures,n.constructSignatures,n.indexInfos);return i.flags=n.flags,i.objectFlags|=-8193&n.objectFlags,e.regularType=i,i}function IC(e,t,n){return{parent:e,propertyName:t,siblings:n,resolvedProperties:void 0}}function OC(e){if(!e.siblings){const t=[];for(const n of OC(e.parent))if(Tw(n)){const r=Ld(n,e.propertyName);r&&vD($l(r),(e=>{t.push(e)}))}e.siblings=t}return e.siblings}function MC(e){if(!e.resolvedProperties){const t=new Map;for(const n of OC(e))if(Tw(n)&&!(2097152&wx(n)))for(const e of Rd(n))t.set(e.escapedName,e);e.resolvedProperties=$e(t.values())}return e.resolvedProperties}function LC(e,t){if(!(4&e.flags))return e;const n=$l(e),r=BC(n,t&&IC(t,e.escapedName,void 0));return r===n?e:FC(e,r)}function jC(e){const t=mt.get(e.escapedName);if(t)return t;const n=FC(e,Lt);return n.flags|=16777216,mt.set(e.escapedName,n),n}function RC(e){return BC(e,void 0)}function BC(e,t){if(196608&wx(e)){if(void 0===t&&e.widened)return e.widened;let n;if(98305&e.flags)n=St;else if(Tw(e))n=function(e,t){const n=ed();for(const r of Md(e))n.set(r.escapedName,LC(r,t));if(t)for(const e of MC(t))n.has(e.escapedName)||n.set(e.escapedName,jC(e));const r=ks(e.symbol,n,u,u,L(cf(e),(e=>Vm(e.keyType,RC(e.type),e.isReadonly))));return r.objectFlags|=266240&wx(e),r}(e,t);else if(1048576&e.flags){const r=t||IC(void 0,void 0,e.types),i=L(e.types,(e=>98304&e.flags?e:BC(e,r)));n=ev(i,Q(i,ik)?2:1)}else 2097152&e.flags?n=cv(L(e.types,RC)):Uk(e)&&(n=Tg(e.target,L(Ig(e),RC)));return n&&void 0===t&&(e.widened=n),n||e}return e}function JC(e){let t=!1;if(65536&wx(e)){if(1048576&e.flags)if(Q(e.types,ik))t=!0;else for(const n of e.types)JC(n)&&(t=!0);if(Uk(e))for(const n of Ig(e))JC(n)&&(t=!0);if(Tw(e))for(const n of Md(e)){const e=$l(n);65536&wx(e)&&(JC(e)||xo(n.valueDeclaration,va.Object_literal_s_property_0_implicitly_has_an_1_type,Us(n),Ws(RC(e))),t=!0)}}return t}function zC(e,t,n){const r=Ws(RC(t));if(Mm(e)&&!uT(Sd(e),A))return;let i;switch(e.kind){case 226:case 172:case 171:i=Y?va.Member_0_implicitly_has_an_1_type:va.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 169:const t=e;if(qD(t.name)){const n=xc(t.name);if((hE(t.parent)||_E(t.parent)||SE(t.parent))&&t.parent.parameters.includes(t)&&(je(t,t.name.escapedText,788968,void 0,!0)||n&&Ix(n))){const n="arg"+t.parent.parameters.indexOf(t),r=Ap(t.name)+(t.dotDotDotToken?"[]":"");return void ko(Y,e,va.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,n,r)}}i=e.dotDotDotToken?Y?va.Rest_parameter_0_implicitly_has_an_any_type:va.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:Y?va.Parameter_0_implicitly_has_an_1_type:va.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 208:if(i=va.Binding_element_0_implicitly_has_an_1_type,!Y)return;break;case 317:return void xo(e,va.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,r);case 323:return void(Y&&hF(e.parent)&&xo(e.parent.tagName,va.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation,r));case 262:case 174:case 173:case 177:case 178:case 218:case 219:if(Y&&!e.name)return void xo(e,3===n?va.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:va.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,r);i=Y?3===n?va._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:va._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:va._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 200:return void(Y&&xo(e,va.Mapped_object_type_implicitly_has_an_any_template_type));default:i=Y?va.Variable_0_implicitly_has_an_1_type:va.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}ko(Y,e,i,Ap(Pc(e)),r)}function $C(e,t,n){a((()=>{!(Y&&65536&wx(t))||n&&TF(e)||JC(t)||zC(e,t,n)}))}function qC(e,t,n){const r=FO(e),i=FO(t),o=OO(e),a=OO(t),s=a?i-1:i,c=o?s:Math.min(r,s),l=Kf(e);if(l){const e=Kf(t);e&&n(l,e)}for(let r=0;re.typeParameter)),O(e.inferences,((t,n)=>()=>(t.isFixed||(function(e){if(e.intraExpressionInferenceSites){for(const{node:t,type:n}of e.intraExpressionInferenceSites){const r=174===t.kind?VN(t,2):dF(t,2);r&&xw(e.inferences,n,r)}e.intraExpressionInferenceSites=void 0}}(e),WC(e.inferences),t.isFixed=!0),ww(e,n)))))}(i),i.nonFixingMapper=function(e){return Rx(O(e.inferences,(e=>e.typeParameter)),O(e.inferences,((t,n)=>()=>ww(e,n))))}(i),i}function WC(e){for(const t of e)t.isFixed||(t.inferredType=void 0)}function HC(e,t,n){(e.intraExpressionInferenceSites??(e.intraExpressionInferenceSites=[])).push({node:t,type:n})}function GC(e){return{typeParameter:e,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1,impliedArity:void 0}}function XC(e){return{typeParameter:e.typeParameter,candidates:e.candidates&&e.candidates.slice(),contraCandidates:e.contraCandidates&&e.contraCandidates.slice(),inferredType:e.inferredType,priority:e.priority,topLevel:e.topLevel,isFixed:e.isFixed,impliedArity:e.impliedArity}}function QC(e){return e&&e.mapper}function ZC(e){const t=wx(e);if(524288&t)return!!(1048576&t);const n=!!(465829888&e.flags||524288&e.flags&&!tw(e)&&(4&t&&(e.node||Q(Ig(e),ZC))||134217728&t&&p(e.outerTypeParameters)||16&t&&e.symbol&&14384&e.symbol.flags&&e.symbol.declarations||12583968&t)||3145728&e.flags&&!(1024&e.flags)&&!tw(e)&&Q(e.types,ZC));return 3899393&e.flags&&(e.objectFlags|=524288|(n?1048576:0)),n}function tw(e){if(e.aliasSymbol&&!e.aliasTypeArguments){const t=Y_(e.aliasSymbol,265);return!(!t||!mc(t.parent,(e=>307===e.kind||267!==e.kind&&"quit")))}return!1}function nw(e,t,n=0){return!!(e===t||3145728&e.flags&&Q(e.types,(e=>nw(e,t,n)))||n<3&&16777216&e.flags&&(nw(Vb(e),t,n+1)||nw(Ub(e),t,n+1)))}function rw(e,t,n){const r=e.id+","+t.id+","+n.id;if(pi.has(r))return pi.get(r);const i=function(e,t,n){if(!(_f(e,Jt)||0!==Rd(e).length&&ow(e)))return;if(qk(e)){const r=aw(Ig(e)[0],t,n);if(!r)return;return Ty(r,Vk(e))}if(PT(e)){const r=O($y(e),(e=>aw(e,t,n)));if(!x(r,(e=>!!e)))return;return Ay(r,4&Dd(t)?L(e.target.elementFlags,(e=>2&e?1:e)):e.target.elementFlags,e.target.readonly,e.target.labeledElementDeclarations)}const r=hs(1040,void 0);return r.source=e,r.mappedType=t,r.constraintType=n,r}(e,t,n);return pi.set(r,i),i}function ow(e){return!(262144&wx(e))||Tw(e)&&Q(Rd(e),(e=>ow($l(e))))||PT(e)&&Q($y(e),ow)}function aw(e,t,n){const r=e.id+","+t.id+","+n.id;if(pi.has(r))return pi.get(r)||At;eo.push(e),to.push(t);const i=no;let o;return Mk(e,eo,eo.length,2)&&(no|=1),Mk(t,to,to.length,2)&&(no|=2),3!==no&&(o=function(e,t,n){const r=Mb(n.type,fd(t)),i=yd(t),o=GC(r);return xw([o],e,i),lw(o)||At}(e,t,n)),eo.pop(),to.pop(),no=i,pi.set(r,o),o}function*sw(e,t,n,r){const i=Rd(t);for(const t of i)if(!e_(t)&&(n||!(16777216&t.flags||48&px(t)))){const n=Jp(e,t.escapedName);if(n){if(r){const e=$l(t);if(109472&e.flags){const r=$l(n);1&r.flags||sx(r)===sx(e)||(yield t)}}}else yield t}}function cw(e,t,n,r){return ke(sw(e,t,n,r))}function lw(e){return e.candidates?ev(e.candidates,2):e.contraCandidates?cv(e.contraCandidates):void 0}function uw(e){return!!Wo(e).skipDirectInference}function _w(e){return!(!e.symbol||!Q(e.symbol.declarations,uw))}function dw(e,t){if(""===e)return!1;const n=+e;return isFinite(n)&&(!t||""+n===e)}function pw(e,t){if(1&t.flags)return!0;if(134217732&t.flags)return SS(e,t);if(268435456&t.flags){const n=[];for(;268435456&t.flags;)n.unshift(t.symbol),t=t.type;return Oe(n,((e,t)=>Gv(t,e)),e)===e&&pw(e,t)}return!1}function fw(e,t){if(2097152&t.flags)return x(t.types,(t=>t===Pn||fw(e,t)));if(4&t.flags||SS(e,t))return!0;if(128&e.flags){const n=e.value;return!!(8&t.flags&&dw(n,!1)||64&t.flags&&CT(n,!1)||98816&t.flags&&n===t.intrinsicName||268435456&t.flags&&pw(lx(n),t)||134217728&t.flags&&vw(e,t))}if(134217728&e.flags){const n=e.texts;return 2===n.length&&""===n[0]&&""===n[1]&&SS(e.types[0],t)}return!1}function gw(e,t){return 128&e.flags?bw([e.value],u,t):134217728&e.flags?E(e.texts,t.texts)?O(e.types,((e,n)=>{return SS(Hd(e),Hd(t.types[n]))?e:402653317&(r=e).flags?r:Ov(["",""],[r]);var r})):bw(e.texts,e.types,t):void 0}function vw(e,t){const n=gw(e,t);return!!n&&x(n,((e,n)=>fw(e,t.types[n])))}function bw(e,t,n){const r=e.length-1,i=e[0],o=e[r],a=n.texts,s=a.length-1,c=a[0],l=a[s];if(0===r&&i.length0){let t=d,r=p;for(;r=f(t).indexOf(n,r),!(r>=0);){if(t++,t===e.length)return;r=0}m(t,r),p+=n.length}else if(p{if(!(128&e.flags))return;const n=yc(e.value),r=No(4,n);r.links.type=St,e.symbol&&(r.declarations=e.symbol.declarations,r.valueDeclaration=e.symbol.valueDeclaration),t.set(n,r)}));const n=4&e.flags?[Vm(Jt,wn,!1)]:u;return ks(void 0,t,u,u,n)}(t);!function(e,t,n){const i=r;r|=256,y(e,t),r=i}(e,a.type)}else if(8388608&t.flags&&8388608&a.flags)p(t.objectType,a.objectType),p(t.indexType,a.indexType);else if(268435456&t.flags&&268435456&a.flags)t.symbol===a.symbol&&p(t.type,a.type);else if(33554432&t.flags)p(t.baseType,a),f(Ch(t),a,4);else if(16777216&a.flags)m(t,a,C);else if(3145728&a.flags)k(t,a.types,a.flags);else if(1048576&t.flags){const e=t.types;for(const t of e)p(t,a)}else if(134217728&a.flags)!function(e,t){const n=gw(e,t),r=t.types;if(n||x(t.texts,(e=>0===e.length)))for(let e=0;ee|t.flags),0);if(!(4&r)){const n=t.value;296&r&&!dw(n,!0)&&(r&=-297),2112&r&&!CT(n,!0)&&(r&=-2113);const o=Oe(e,((e,i)=>i.flags&r?4&e.flags?e:4&i.flags?t:134217728&e.flags?e:134217728&i.flags&&vw(t,i)?t:268435456&e.flags?e:268435456&i.flags&&n===Xv(i.symbol,n)?t:128&e.flags?e:128&i.flags&&i.value===n?i:8&e.flags?e:8&i.flags?ux(+n):32&e.flags?e:32&i.flags?ux(+n):256&e.flags?e:256&i.flags&&i.value===+n?i:64&e.flags?e:64&i.flags?_x(TT(n)):2048&e.flags?e:2048&i.flags&&ST(i.value)===n?i:16&e.flags?e:16&i.flags?"true"===n?Kt:"false"===n?qt:Xt:512&e.flags?e:512&i.flags&&i.intrinsicName===n?i:32768&e.flags?e:32768&i.flags&&i.intrinsicName===n?i:65536&e.flags?e:65536&i.flags&&i.intrinsicName===n?i:e:e),en);if(!(131072&o.flags)){p(o,i);continue}}}}p(t,i)}}(t,a);else{if(Ad(t=Sp(t))&&Ad(a)&&m(t,a,w),!(512&r&&467927040&t.flags)){const e=mp(t);if(e!==t&&!(2621440&e.flags))return p(e,a);t=e}2621440&t.flags&&m(t,a,E)}else h(Ig(t),Ig(a),Sk(t.target))}}}function f(e,t,n){const i=r;r|=n,p(e,t),r=i}function m(e,t,n){const r=e.id+","+t.id,i=a&&a.get(r);if(void 0!==i)return void(_=Math.min(_,i));(a||(a=new Map)).set(r,-1);const o=_;_=2048;const l=d;(s??(s=[])).push(e),(c??(c=[])).push(t),Mk(e,s,s.length,2)&&(d|=1),Mk(t,c,c.length,2)&&(d|=2),3!==d?n(e,t):_=-1,c.pop(),s.pop(),d=l,a.set(r,_),_=Math.min(_,o)}function g(e,t,n){let r,i;for(const o of t)for(const t of e)n(t,o)&&(p(t,o),r=me(r,t),i=me(i,o));return[r?F(e,(e=>!D(r,e))):e,i?F(t,(e=>!D(i,e))):t]}function h(e,t,n){const r=e.length!!b(e)));if(!e||t&&e!==t)return;t=e}return t}(t);return void(n&&f(e,n,1))}if(1===i&&!s){const e=R(o,((e,t)=>a[t]?void 0:e));if(e.length)return void p(ev(e),n)}}else for(const n of t)b(n)?i++:p(e,n);if(2097152&n?1===i:i>0)for(const n of t)b(n)&&f(e,n,1)}function T(e,t,n){if(1048576&n.flags||2097152&n.flags){let r=!1;for(const i of n.types)r=T(e,t,i)||r;return r}if(4194304&n.flags){const r=b(n.type);if(r&&!r.isFixed&&!_w(e)){const i=rw(e,t,n);i&&f(i,r.typeParameter,262144&wx(e)?16:8)}return!0}if(262144&n.flags){f(Av(e,e.pattern?2:0),n,32);const r=Bd(n);return r&&T(e,t,r)||p(ev(Z(O(Rd(e),$l),O(cf(e),(e=>e!==oi?e.type:en)))),yd(t)),!0}return!1}function C(e,t){16777216&e.flags?(p(e.checkType,t.checkType),p(e.extendsType,t.extendsType),p(Vb(e),Vb(t)),p(Ub(e),Ub(t))):function(e,t,n,i){const o=r;r|=i,k(e,t,n),r=o}(e,[Vb(t),Ub(t)],t.flags,i?64:0)}function w(e,t){p(md(e),md(t)),p(yd(e),yd(t));const n=hd(e),r=hd(t);n&&r&&p(n,r)}function E(e,t){var n,r;if(4&wx(e)&&4&wx(t)&&(e.target===t.target||qk(e)&&qk(t)))h(Ig(e),Ig(t),Sk(e.target));else{if(Ad(e)&&Ad(t)&&w(e,t),32&wx(t)&&!t.declaration.nameType&&T(e,t,md(t)))return;if(!function(e,t){return PT(e)&&PT(t)?function(e,t){return!(8&t.target.combinedFlags)&&t.target.minLength>e.target.minLength||!t.target.hasRestElement&&(e.target.hasRestElement||t.target.fixedLength(12&e)==(12&o.target.elementFlags[t]))))){for(let t=0;t0){const e=Vp(t,n),o=e.length;for(let t=0;t1){const t=F(e,Cw);if(t.length){const n=ev(t,2);return Z(F(e,(e=>!Cw(e))),[n])}}return e}(e.candidates),r=function(e){const t=Jd(e);return!!t&&_M(16777216&t.flags?qd(t):t,406978556)}(e.typeParameter)||zd(e.typeParameter),i=!r&&e.topLevel&&(e.isFixed||!function(e,t){const n=Wf(e);return n?!!n.type&&nw(n.type,t):nw(Gf(e),t)}(t,e.typeParameter)),o=r?L(n,sx):i?L(n,dT):n;return RC(416&e.priority?ev(o,2):$k(o))}(n,e.signature):void 0,c=n.contraCandidates?function(e){return 416&e.priority?cv(e.contraCandidates):Oe(e.contraCandidates,((e,t)=>bS(t,e)?t:e))}(n):void 0;if(s||c){const t=s&&(!c||!(131072&s.flags)&&Q(n.contraCandidates,(e=>bS(s,e)))&&x(e.inferences,(e=>e!==n&&Jd(e.typeParameter)!==n.typeParameter||x(e.candidates,(e=>bS(e,s))))));o=t?s:c,a=t?c:s}else if(1&e.flags)o=tn;else{const a=np(n.typeParameter);a&&(o=eS(a,(r=function(e,t){const n=e.inferences.slice(t);return Fx(O(n,(e=>e.typeParameter)),O(n,(()=>At)))}(e,t),i=e.nonFixingMapper,r?Bx(5,r,i):i)))}}else o=lw(n);n.inferredType=o||Dw(!!(2&e.flags));const s=Jd(n.typeParameter);if(s){const t=eS(s,e.nonFixingMapper);o&&e.compareTypes(o,y_(t,o))||(n.inferredType=a&&e.compareTypes(a,y_(t,a))?a:t)}}var r,i;return n.inferredType}function Dw(e){return e?St:At}function Ew(e){const t=[];for(let n=0;nXP(e)||QP(e)||CE(e))))}function Aw(e,t,n,r){switch(e.kind){case 80:if(!bv(e)){const i=Nw(e);return i!==ht?`${r?IB(r):"-1"}|${qy(t)}|${qy(n)}|${OB(i)}`:void 0}case 110:return`0|${r?IB(r):"-1"}|${qy(t)}|${qy(n)}`;case 235:case 217:return Aw(e.expression,t,n,r);case 166:const i=Aw(e.left,t,n,r);return i&&`${i}.${e.right.escapedText}`;case 211:case 212:const o=Ow(e);if(void 0!==o){const i=Aw(e.expression,t,n,r);return i&&`${i}.${o}`}if(XE(e)&&qD(e.argumentExpression)){const i=Nw(e.argumentExpression);if(wE(i)||FE(i)&&!YD(i)){const o=Aw(e.expression,t,n,r);return o&&`${o}.@${OB(i)}`}}break;case 206:case 207:case 262:case 218:case 219:case 174:return`${IB(e)}#${qy(t)}`}}function Iw(e,t){switch(t.kind){case 217:case 235:return Iw(e,t.expression);case 226:return mb(t)&&Iw(e,t.left)||uP(t)&&28===t.operatorToken.kind&&Iw(e,t.right)}switch(e.kind){case 236:return 236===t.kind&&e.keywordToken===t.keywordToken&&e.name.escapedText===t.name.escapedText;case 80:case 81:return bv(e)?110===t.kind:80===t.kind&&Nw(e)===Nw(t)||(KP(t)||KE(t))&&_s(Nw(e))===ns(t);case 110:return 110===t.kind;case 108:return 108===t.kind;case 235:case 217:return Iw(e.expression,t);case 211:case 212:const n=Ow(e);if(void 0!==n){const r=Ox(t)?Ow(t):void 0;if(void 0!==r)return r===n&&Iw(e.expression,t.expression)}if(XE(e)&&XE(t)&&qD(e.argumentExpression)&&qD(t.argumentExpression)){const n=Nw(e.argumentExpression);if(n===Nw(t.argumentExpression)&&(wE(n)||FE(n)&&!YD(n)))return Iw(e.expression,t.expression)}break;case 166:return Ox(t)&&e.right.escapedText===Ow(t)&&Iw(e.left,t.expression);case 226:return uP(e)&&28===e.operatorToken.kind&&Iw(e.right,t)}return!1}function Ow(e){if(GE(e))return e.name.escapedText;if(XE(e))return $h((t=e).argumentExpression)?yc(t.argumentExpression.text):vb(t.argumentExpression)?function(e){const t=Ma(e,111551,!0);if(!t||!(wE(t)||8&t.flags))return;const n=t.valueDeclaration;if(void 0===n)return;const r=El(n);if(r){const e=jw(r);if(void 0!==e)return e}if(j_(n)&&Xo(n,e)){const e=Gm(n);if(e){const t=Eu(n.parent)?Vc(n):qM(e);return t&&jw(t)}if($N(n))return Lp(n.name)}}(t.argumentExpression):void 0;var t;if(KE(e)){const t=zc(e);return t?yc(t):void 0}return sE(e)?""+e.parent.parameters.indexOf(e):void 0}function jw(e){return 8192&e.flags?e.escapedName:384&e.flags?yc(""+e.value):void 0}function Rw(e,t){for(;Ox(e);)if(Iw(e=e.expression,t))return!0;return!1}function Bw(e,t){for(;Sl(e);)if(Iw(e=e.expression,t))return!0;return!1}function zw(e,t){if(e&&1048576&e.flags){const n=bp(e,t);if(n&&2&px(n))return void 0===n.links.isDiscriminantProperty&&(n.links.isDiscriminantProperty=192==(192&n.links.checkFlags)&&!lb($l(n))),!!n.links.isDiscriminantProperty}return!1}function $w(e,t){let n;for(const r of e)if(zw(t,r.escapedName)){if(n){n.push(r);continue}n=[r]}return n}function qw(e){const t=e.types;if(!(t.length<10||32768&wx(e)||N(t,(e=>!!(59506688&e.flags)))<10)){if(void 0===e.keyPropertyName){const n=f(t,(e=>59506688&e.flags?f(Rd(e),(e=>iT($l(e))?e.escapedName:void 0)):void 0)),r=n&&function(e,t){const n=new Map;let r=0;for(const i of e)if(61603840&i.flags){const e=Tc(i,t);if(e){if(!sT(e))return;let t=!1;vD(e,(e=>{const r=qy(sx(e)),o=n.get(r);o?o!==At&&(n.set(r,At),t=!0):n.set(r,i)})),t||r++}}return r>=10&&2*r>=e.length?n:void 0}(t,n);e.keyPropertyName=r?n:"",e.constituentMap=r}return e.keyPropertyName.length?e.keyPropertyName:void 0}}function Vw(e,t){var n;const r=null==(n=e.constituentMap)?void 0:n.get(qy(sx(t)));return r!==At?r:void 0}function Uw(e,t){const n=qw(e),r=n&&Tc(t,n);return r&&Vw(e,r)}function Kw(e,t){return Iw(e,t)||Rw(e,t)}function Ww(e,t){if(e.arguments)for(const n of e.arguments)if(Kw(t,n)||Bw(n,t))return!0;return!(211!==e.expression.kind||!Kw(t,e.expression.expression))}function Hw(e){return e.id<=0&&(e.id=TB,TB++),e.id}function Gw(e){const t=Od(e);return!!(t.callSignatures.length||t.constructSignatures.length||t.members.get("bind")&&bS(e,Wn))}function Xw(e,t){return Yw(e,t)&t}function Qw(e,t){return 0!==Xw(e,t)}function Yw(e,t){467927040&e.flags&&(e=Wd(e)||At);const n=e.flags;if(268435460&n)return U?16317953:16776705;if(134217856&n){const t=128&n&&""===e.value;return U?t?12123649:7929345:t?12582401:16776705}if(40&n)return U?16317698:16776450;if(256&n){const t=0===e.value;return U?t?12123394:7929090:t?12582146:16776450}if(64&n)return U?16317188:16775940;if(2048&n){const t=RT(e);return U?t?12122884:7928580:t?12581636:16775940}return 16&n?U?16316168:16774920:528&n?U?e===qt||e===Vt?12121864:7927560:e===qt||e===Vt?12580616:16774920:524288&n?0==(t&(U?83427327:83886079))?0:16&wx(e)&&ik(e)?U?83427327:83886079:Gw(e)?U?7880640:16728e3:U?7888800:16736160:16384&n?9830144:32768&n?26607360:65536&n?42917664:12288&n?U?7925520:16772880:67108864&n?U?7888800:16736160:131072&n?0:1048576&n?Oe(e.types,((e,n)=>e|Yw(n,t)),0):2097152&n?function(e,t){const n=_M(e,402784252);let r=0,i=134217727;for(const o of e.types)if(!(n&&524288&o.flags)){const e=Yw(o,t);r|=e,i&=e}return 8256&r|134209471&i}(e,t):83886079}function Zw(e,t){return SD(e,(e=>Qw(e,t)))}function eD(e,t){const n=nD(Zw(U&&2&e.flags?Fn:e,t));if(U)switch(t){case 524288:return tD(n,65536,131072,33554432,Rt);case 1048576:return tD(n,131072,65536,16777216,It);case 2097152:case 4194304:return DD(n,(e=>Qw(e,262144)?function(e){return sr||(sr=qh("NonNullable",524288,void 0)||ht),sr!==ht?Bg(sr,[e]):cv([e,wn])}(e):e))}return n}function tD(e,t,n,r,i){const o=Xw(e,50528256);if(!(o&t))return e;const a=ev([wn,i]);return DD(e,(e=>Qw(e,t)?cv([e,o&r||!Qw(e,n)?wn:a]):e))}function nD(e){return e===Fn?At:e}function rD(e,t){return t?ev([jc(e),qM(t)]):e}function iD(e,t){var n;const r=Tv(t);if(!mC(r))return Dt;const i=gC(r);return Tc(e,i)||aD(null==(n=gf(e,i))?void 0:n.type)||Dt}function oD(e,t){return xD(e,Zk)&&nT(e,t)||aD(fj(65,e,It,void 0))||Dt}function aD(e){return e&&A.noUncheckedIndexedAccess?ev([e,Mt]):e}function sD(e){return Ty(fj(65,e,It,void 0)||Dt)}function cD(e){return 226===e.parent.kind&&e.parent.left===e||250===e.parent.kind&&e.parent.initializer===e}function lD(e){return iD(uD(e.parent),e.name)}function uD(e){const{parent:t}=e;switch(t.kind){case 249:return Jt;case 250:return pj(t)||Dt;case 226:return function(e){return 209===e.parent.kind&&cD(e.parent)||303===e.parent.kind&&cD(e.parent.parent)?rD(uD(e),e.right):qM(e.right)}(t);case 220:return It;case 209:return function(e,t){return oD(uD(e),e.elements.indexOf(t))}(t,e);case 230:return function(e){return sD(uD(e.parent))}(t);case 303:return lD(t);case 304:return function(e){return rD(lD(e),e.objectAssignmentInitializer)}(t)}return Dt}function _D(e){return Wo(e).resolvedType||qM(e)}function dD(e){return 260===e.kind?function(e){return e.initializer?_D(e.initializer):249===e.parent.parent.kind?Jt:250===e.parent.parent.kind&&pj(e.parent.parent)||Dt}(e):function(e){const t=e.parent,n=dD(t.parent);return rD(206===t.kind?iD(n,e.propertyName||e.name):e.dotDotDotToken?sD(n):oD(n,t.elements.indexOf(e)),e.initializer)}(e)}function pD(e){switch(e.kind){case 217:return pD(e.expression);case 226:switch(e.operatorToken.kind){case 64:case 76:case 77:case 78:return pD(e.left);case 28:return pD(e.right)}}return e}function fD(e){const{parent:t}=e;return 217===t.kind||226===t.kind&&64===t.operatorToken.kind&&t.left===e||226===t.kind&&28===t.operatorToken.kind&&t.right===e?fD(t):e}function mD(e){return 296===e.kind?sx(qM(e.expression)):en}function gD(e){const t=Wo(e);if(!t.switchTypes){t.switchTypes=[];for(const n of e.caseBlock.clauses)t.switchTypes.push(mD(n))}return t.switchTypes}function hD(e){if(Q(e.caseBlock.clauses,(e=>296===e.kind&&!$_(e.expression))))return;const t=[];for(const n of e.caseBlock.clauses){const e=296===n.kind?n.expression.text:void 0;t.push(e&&!D(t,e)?e:void 0)}return t}function yD(e,t){return!!(e===t||131072&e.flags||1048576&t.flags&&function(e,t){if(1048576&e.flags){for(const n of e.types)if(!Ky(t.types,n))return!1;return!0}return!!(1056&e.flags&&Au(e)===t)||Ky(t.types,e)}(e,t))}function vD(e,t){return 1048576&e.flags?f(e.types,t):t(e)}function bD(e,t){return 1048576&e.flags?Q(e.types,t):t(e)}function xD(e,t){return 1048576&e.flags?x(e.types,t):t(e)}function SD(e,t){if(1048576&e.flags){const n=e.types,r=F(n,t);if(r===n)return e;const i=e.origin;let o;if(i&&1048576&i.flags){const e=i.types,a=F(e,(e=>!!(1048576&e.flags)||t(e)));if(e.length-a.length==n.length-r.length){if(1===a.length)return a[0];o=Zy(1048576,a)}}return rv(r,16809984&e.objectFlags,void 0,void 0,o)}return 131072&e.flags||t(e)?e:en}function kD(e,t){return SD(e,(e=>e!==t))}function CD(e){return 1048576&e.flags?e.types.length:1}function DD(e,t,n){if(131072&e.flags)return e;if(!(1048576&e.flags))return t(e);const r=e.origin,i=r&&1048576&r.flags?r.types:e.types;let o,a=!1;for(const e of i){const r=1048576&e.flags?DD(e,t,n):t(e);a||(a=e!==r),r&&(o?o.push(r):o=[r])}return a?o&&ev(o,n?0:1):e}function ED(e,t,n,r){return 1048576&e.flags&&n?ev(O(e.types,t),1,n,r):DD(e,t)}function PD(e,t){return SD(e,(e=>0!=(e.flags&t)))}function ND(e,t){return _M(e,134217804)&&_M(t,402655616)?DD(e,(e=>4&e.flags?PD(t,402653316):sb(e)&&!_M(t,402653188)?PD(t,128):8&e.flags?PD(t,264):64&e.flags?PD(t,2112):e)):e}function FD(e){return 0===e.flags}function AD(e){return 0===e.flags?e.type:e}function ID(e,t){return t?{flags:0,type:131072&e.flags?tn:e}:e}function OD(e){return ft[e.id]||(ft[e.id]=function(e){const t=hs(256);return t.elementType=e,t}(e))}function MD(e,t){const n=AC(cT(UM(t)));return yD(n,e.elementType)?e:OD(ev([e.elementType,n]))}function LD(e){return 256&wx(e)?(t=e).finalArrayType||(t.finalArrayType=131072&(n=t.elementType).flags?ir:Ty(1048576&n.flags?ev(n.types,2):n)):e;var t,n}function jD(e){return 256&wx(e)?e.elementType:en}function RD(e){const t=fD(e),n=t.parent,r=GE(n)&&("length"===n.name.escapedText||213===n.parent.kind&&qD(n.name)&&oy(n.name)),i=212===n.kind&&n.expression===t&&226===n.parent.kind&&64===n.parent.operatorToken.kind&&n.parent.left===n&&!eh(n.parent)&&dM(qM(n.argumentExpression),296);return r||i}function BD(e,t){if(8752&(e=Da(e)).flags)return $l(e);if(7&e.flags){if(262144&px(e)){const t=e.links.syntheticOrigin;if(t&&BD(t))return $l(e)}const r=e.valueDeclaration;if(r){if((KP(n=r)||uE(n)||lE(n)||sE(n))&&(kv(n)||Mm(n)&&L_(n)&&n.initializer&&UT(n.initializer)&&Cv(n.initializer)))return $l(e);if(KP(r)&&250===r.parent.parent.kind){const e=r.parent.parent,t=JD(e.expression,void 0);if(t)return fj(e.awaitModifier?15:13,t,It,void 0)}t&&fT(t,Rp(r,va._0_needs_an_explicit_type_annotation,Us(e)))}}var n}function JD(e,t){if(!(67108864&e.flags))switch(e.kind){case 80:return BD(_s(Nw(e)),t);case 110:return function(e){const t=rm(e,!1,!1);if(cu(t)){const e=Cf(t);if(e.thisParameter)return BD(e.thisParameter)}if(gu(t.parent)){const e=ns(t.parent);return Jv(t)?$l(e):ju(e).thisType}}(e);case 108:return tN(e);case 211:{const n=JD(e.expression,t);if(n){const r=e.name;let i;if(VD(r)){if(!n.symbol)return;i=Jp(n,Qh(n.symbol,r.escapedText))}else i=Jp(n,r.escapedText);return i&&BD(i,t)}return}case 217:return JD(e.expression,t)}}function zD(e){const t=Wo(e);let n=t.effectsSignature;if(void 0===n){let r;uP(e)?r=gM(yA(e.right)):244===e.parent.kind?r=JD(e.expression,void 0):108!==e.expression.kind&&(r=Sl(e)?TA(vC(KM(e.expression),e.expression),e.expression):yA(e.expression));const i=Vp(r&&mp(r)||At,0),o=1!==i.length||i[0].typeParameters?Q(i,$D)?nO(e):void 0:i[0];n=t.effectsSignature=o&&$D(o)?o:ni}return n===ni?void 0:n}function $D(e){return!!(Wf(e)||e.declaration&&131072&(Xf(e.declaration)||At).flags)}function UD(e){const t=WD(e,!1);return Gr=e,Xr=t,t}function KD(e){const t=lh(e,!0);return 97===t.kind||226===t.kind&&(56===t.operatorToken.kind&&(KD(t.left)||KD(t.right))||57===t.operatorToken.kind&&KD(t.left)&&KD(t.right))}function WD(e,t){for(;;){if(e===Gr)return Xr;const n=e.flags;if(4096&n){if(!t){const t=Hw(e),n=Ki[t];return void 0!==n?n:Ki[t]=WD(e,!0)}t=!1}if(368&n)e=e.antecedent;else if(512&n){const t=zD(e.node);if(t){const n=Wf(t);if(n&&3===n.kind&&!n.type){const t=e.node.arguments[n.parameterIndex];if(t&&KD(t))return!1}if(131072&Gf(t).flags)return!1}e=e.antecedent}else{if(4&n)return Q(e.antecedent,(e=>WD(e,!1)));if(8&n){const t=e.antecedent;if(void 0===t||0===t.length)return!1;e=t[0]}else{if(!(128&n)){if(1024&n){Gr=void 0;const t=e.node.target,n=t.antecedent;t.antecedent=e.node.antecedents;const r=WD(e.antecedent,!1);return t.antecedent=n,r}return!(1&n)}{const t=e.node;if(t.clauseStart===t.clauseEnd&&YO(t.switchStatement))return!1;e=e.antecedent}}}}}function HD(e,t){for(;;){const n=e.flags;if(4096&n){if(!t){const t=Hw(e),n=Wi[t];return void 0!==n?n:Wi[t]=HD(e,!0)}t=!1}if(496&n)e=e.antecedent;else if(512&n){if(108===e.node.expression.kind)return!0;e=e.antecedent}else{if(4&n)return x(e.antecedent,(e=>HD(e,!1)));if(!(8&n)){if(1024&n){const t=e.node.target,n=t.antecedent;t.antecedent=e.node.antecedents;const r=HD(e.antecedent,!1);return t.antecedent=n,r}return!!(1&n)}e=e.antecedent[0]}}}function GD(e){switch(e.kind){case 110:return!0;case 80:if(!bv(e)){const t=Nw(e);return wE(t)||FE(t)&&!YD(t)||!!t.valueDeclaration&&nP(t.valueDeclaration)}break;case 211:case 212:return GD(e.expression)&&oM(Wo(e).resolvedSymbol||ht);case 206:case 207:const t=sy(e.parent);return sE(t)||VT(t)?!eE(t):KP(t)&&SJ(t)}return!1}function XD(e,t,n=t,r,i=(t=>null==(t=lt(e,jg))?void 0:t.flowNode)()){let o,a=!1,s=0;if(yi)return Dt;if(!i)return t;vi++;const c=hi,l=AD(d(i));hi=c;const u=256&wx(l)&&RD(e)?ir:LD(l);return u===rn||e.parent&&235===e.parent.kind&&!(131072&u.flags)&&131072&Zw(u,2097152).flags?t:u;function _(){return a?o:(a=!0,o=Aw(e,t,n,r))}function d(i){var o;if(2e3===s)return null==(o=or)||o.instant(or.Phase.CheckTypes,"getTypeAtFlowNode_DepthLimit",{flowId:i.id}),yi=!0,function(e){const t=mc(e,fu),n=Sd(e),r=Gp(n,t.statements.pos);ro.add(aS(n,r.start,r.length,va.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis))}(e),Dt;let a;for(s++;;){const o=i.flags;if(4096&o){for(let e=c;efunction(e,t){if(!(1048576&e.flags))return SS(e,t);for(const n of e.types)if(SS(n,t))return!0;return!1}(t,e))),r=512&t.flags&&cx(t)?DD(n,ax):n;return SS(t,r)?r:e}(e,t))}(e,p(n)):e}if(Rw(e,r)){if(!UD(n))return rn;if(KP(r)&&(Mm(r)||SJ(r))){const e=Xm(r);if(e&&(218===e.kind||219===e.kind))return d(n.antecedent)}return t}if(KP(r)&&249===r.parent.parent.kind&&(Iw(e,r.parent.parent.expression)||Bw(r.parent.parent.expression,e)))return bA(LD(AD(d(n.antecedent))))}function m(e,t){const n=lh(t,!0);if(97===n.kind)return rn;if(226===n.kind){if(56===n.operatorToken.kind)return m(m(e,n.left),n.right);if(57===n.operatorToken.kind)return ev([m(e,n.left),m(e,n.right)])}return Y(e,n,!0)}function g(e){const t=zD(e.node);if(t){const n=Wf(t);if(n&&(2===n.kind||3===n.kind)){const t=d(e.antecedent),r=LD(AD(t)),i=n.type?Q(r,n,e.node,!0):3===n.kind&&n.parameterIndex>=0&&n.parameterIndex297===e.kind));if(n===r||o>=n&&oXw(e,t)===t))}return ev(O(i.slice(n,r),(t=>t?V(e,t):en)))}(i,t.node);else if(112===n.kind)i=function(e,{switchStatement:t,clauseStart:n,clauseEnd:r}){const i=T(t.caseBlock.clauses,(e=>297===e.kind)),o=n===r||i>=n&&i296===t.kind?Y(e,t.expression,!0):en)))}(i,t.node);else{U&&(Bw(n,e)?i=$(i,t.node,(e=>!(163840&e.flags))):221===n.kind&&Bw(n.expression,e)&&(i=$(i,t.node,(e=>!(131072&e.flags||128&e.flags&&"undefined"===e.value)))));const r=P(n,i);r&&(i=function(e,t,n){if(n.clauseStartVw(e,t)||At)));if(t!==At)return t}return N(e,t,(e=>q(e,n)))}(i,r,t.node))}return ID(i,FD(r))}function k(e){const r=[];let i,o=!1,a=!1;for(const s of e.antecedent){if(!i&&128&s.flags&&s.node.clauseStart===s.node.clauseEnd){i=s;continue}const e=d(s),c=AD(e);if(c===t&&t===n)return c;fe(r,c),yD(c,n)||(o=!0),FD(e)&&(a=!0)}if(i){const e=d(i),s=AD(e);if(!(131072&s.flags||D(r,s)||YO(i.node.switchStatement))){if(s===t&&t===n)return s;r.push(s),yD(s,n)||(o=!0),FD(e)&&(a=!0)}}return ID(w(r,o?2:1),a)}function C(e){const r=Hw(e),i=Ji[r]||(Ji[r]=new Map),o=_();if(!o)return t;const a=i.get(o);if(a)return a;for(let t=mi;t{const t=wc(e,r)||At;return!(131072&t.flags)&&!(131072&s.flags)&&CS(s,t)}))}function F(e,t,n,r,i){if((37===n||38===n)&&1048576&e.flags){const o=qw(e);if(o&&o===Ow(t)){const t=Vw(e,qM(r));if(t)return n===(i?37:38)?t:iT(Tc(t,o)||At)?kD(e,t):e}}return N(e,t,(e=>B(e,n,r,i)))}function A(t,n,r){if(Iw(e,n))return eD(t,r?4194304:8388608);U&&r&&Bw(n,e)&&(t=eD(t,2097152));const i=P(n,t);return i?N(t,i,(e=>Zw(e,r?4194304:8388608))):t}function I(e,t,n){const r=Jp(e,t);return r?!!(16777216&r.flags||48&px(r))||n:!!gf(e,t)||!n}function M(e,t,n,r,i){return Y(e,t,i=i!==(112===n.kind)!=(38!==r&&36!==r))}function j(t,n,r){switch(n.operatorToken.kind){case 64:case 76:case 77:case 78:return A(Y(t,n.right,r),n.left,r);case 35:case 36:case 37:case 38:const i=n.operatorToken.kind,o=pD(n.left),a=pD(n.right);if(221===o.kind&&$_(a))return J(t,o,i,a,r);if(221===a.kind&&$_(o))return J(t,a,i,o,r);if(Iw(e,o))return B(t,i,a,r);if(Iw(e,a))return B(t,i,o,r);U&&(Bw(o,e)?t=R(t,i,a,r):Bw(a,e)&&(t=R(t,i,o,r)));const s=P(o,t);if(s)return F(t,s,i,a,r);const c=P(a,t);if(c)return F(t,c,i,o,r);if(W(o))return H(t,i,a,r);if(W(a))return H(t,i,o,r);if(_u(a)&&!Ox(o))return M(t,o,a,i,r);if(_u(o)&&!Ox(a))return M(t,a,o,i,r);break;case 104:return function(t,n,r){const i=pD(n.left);if(!Iw(e,i))return r&&U&&Bw(i,e)?eD(t,2097152):t;const o=qM(n.right);if(!kS(o,Kn))return t;const a=zD(n),s=a&&Wf(a);if(s&&1===s.kind&&0===s.parameterIndex)return X(t,s.type,r,!0);if(!kS(o,Wn))return t;const c=DD(o,G);return(!Ec(t)||c!==Kn&&c!==Wn)&&(r||524288&c.flags&&!ok(c))?X(t,c,r,!0):t}(t,n,r);case 103:if(VD(n.left))return function(t,n,r){const i=pD(n.right);if(!Iw(e,i))return t;xn.assertNode(n.left,VD);const o=NA(n.left);if(void 0===o)return t;const a=o.parent;return X(t,zv(xn.checkDefined(o.valueDeclaration,"should always have a declaration"))?$l(a):ju(a),r,!0)}(t,n,r);const l=pD(n.right);if(DC(t)&&Ox(e)&&Iw(e.expression,l)){const i=qM(n.left);if(mC(i)&&Ow(e)===gC(i))return Zw(t,r?524288:65536)}if(Iw(e,l)){const e=qM(n.left);if(mC(e))return function(e,t,n){const r=gC(t);if(bD(e,(e=>I(e,r,!0))))return SD(e,(e=>I(e,r,n)));if(n){const n=(Jr||(Jr=zh("Record",2,!0)||ht),Jr===ht?void 0:Jr);if(n)return cv([e,Bg(n,[t,At])])}return e}(t,e,r)}break;case 28:return Y(t,n.right,r);case 56:return r?Y(Y(t,n.left,!0),n.right,!0):ev([Y(t,n.left,!1),Y(t,n.right,!1)]);case 57:return r?ev([Y(t,n.left,!0),Y(t,n.right,!0)]):Y(Y(t,n.left,!1),n.right,!1)}return t}function R(e,t,n,r){const i=35===t||37===t,o=35===t||36===t?98304:32768,a=qM(n);return i!==r&&xD(a,(e=>!!(e.flags&o)))||i===r&&xD(a,(e=>!(e.flags&(3|o))))?eD(e,2097152):e}function B(e,t,n,r){if(1&e.flags)return e;36!==t&&38!==t||(r=!r);const i=qM(n),o=35===t||36===t;if(98304&i.flags)return U?eD(e,o?r?262144:2097152:65536&i.flags?r?131072:1048576:r?65536:524288):e;if(r){if(!o&&(2&e.flags||bD(e,ok))){if(469893116&i.flags||ok(i))return i;if(524288&i.flags)return cn}return ND(SD(e,(e=>{return CS(e,i)||o&&(t=i,0!=(524&e.flags)&&0!=(28&t.flags));var t})),i)}return iT(i)?SD(e,(e=>!(oT(e)&&CS(e,i)))):e}function J(t,n,r,i,o){36!==r&&38!==r||(o=!o);const a=pD(n.expression);if(!Iw(e,a)){U&&Bw(a,e)&&o===("undefined"!==i.text)&&(t=eD(t,2097152));const n=P(a,t);return n?N(t,n,(e=>z(e,i,o))):t}return z(t,i,o)}function z(e,t,n){return n?V(e,t.text):eD(e,wB.get(t.text)||32768)}function $(e,{switchStatement:t,clauseStart:n,clauseEnd:r},i){return n!==r&&x(gD(t).slice(n,r),i)?Zw(e,2097152):e}function q(e,{switchStatement:t,clauseStart:n,clauseEnd:r}){const i=gD(t);if(!i.length)return e;const o=i.slice(n,r),a=n===r||D(o,en);if(2&e.flags&&!a){let t;for(let n=0;nCS(s,e))),s);if(!a)return c;const l=SD(e,(e=>!(oT(e)&&D(i,32768&e.flags?It:sx(function(e){return 2097152&e.flags&&S(e.types,iT)||e}(e))))));return 131072&c.flags?l:ev([c,l])}function V(e,t){switch(t){case"string":return K(e,Jt,1);case"number":return K(e,zt,2);case"bigint":return K(e,$t,4);case"boolean":return K(e,Xt,8);case"symbol":return K(e,Qt,16);case"object":return 1&e.flags?e:ev([K(e,cn,32),K(e,Rt,131072)]);case"function":return 1&e.flags?e:K(e,Wn,64);case"undefined":return K(e,It,65536)}return K(e,cn,128)}function K(e,t,n){return DD(e,(e=>uk(e,t,so)?Qw(e,n)?e:en:bS(t,e)?t:Qw(e,n)?cv([e,t]):en))}function W(t){return(GE(t)&&"constructor"===bc(t.name)||XE(t)&&$_(t.argumentExpression)&&"constructor"===t.argumentExpression.text)&&Iw(e,t.expression)}function H(e,t,n,r){if(r?35!==t&&37!==t:36!==t&&38!==t)return e;const i=qM(n);if(!lB(i)&&!su(i))return e;const o=Jp(i,"prototype");if(!o)return e;const a=$l(o),s=Ec(a)?void 0:a;return s&&s!==Kn&&s!==Wn?Ec(e)?s:SD(e,(e=>{return n=s,524288&(t=e).flags&&1&wx(t)||524288&n.flags&&1&wx(n)?t.symbol===n.symbol:bS(t,n);var t,n})):e}function G(e){const t=Tc(e,"prototype");if(t&&!Ec(t))return t;const n=Vp(e,1);return n.length?ev(O(n,(e=>Gf(Sm(e))))):wn}function X(e,t,n,r){const i=1048576&e.flags?`N${qy(e)},${qy(t)},${(n?1:0)|(r?2:0)}`:void 0;return fo(i)??mo(i,function(e,t,n,r){if(!n){if(e===t)return en;if(r)return SD(e,(e=>!kS(e,t)));const n=X(e,t,!0,!1);return SD(e,(e=>!yD(e,n)))}if(3&e.flags)return t;if(e===t)return t;const i=r?kS:bS,o=1048576&e.flags?qw(e):void 0,a=DD(t,(t=>{const n=o&&Tc(t,o),a=DD(n&&Vw(e,n)||e,r?e=>kS(e,t)?e:kS(t,e)?t:en:e=>xS(e,t)?e:xS(t,e)?t:bS(e,t)?e:bS(t,e)?t:en);return 131072&a.flags?DD(e,(e=>_M(e,465829888)&&i(t,Wd(e)||At)?cv([e,t]):en)):a}));return 131072&a.flags?bS(t,e)?t:SS(e,t)?e:SS(t,e)?t:cv([e,t]):a}(e,t,n,r))}function Q(t,n,r,i){if(n.type&&(!Ec(t)||n.type!==Kn&&n.type!==Wn)){const o=function(e,t){if(1===e.kind||3===e.kind)return t.arguments[e.parameterIndex];const n=lh(t.expression);return Ox(n)?lh(n.expression):void 0}(n,r);if(o){if(Iw(e,o))return X(t,n.type,i,!1);U&&Bw(o,e)&&(i&&!Qw(n.type,65536)||!i&&xD(n.type,vA))&&(t=eD(t,2097152));const r=P(o,t);if(r)return N(t,r,(e=>X(e,n.type,i,!1)))}}return t}function Y(t,n,r){if(Tl(n)||uP(n.parent)&&(61===n.parent.operatorToken.kind||78===n.parent.operatorToken.kind)&&n.parent.left===n)return function(t,n,r){if(Iw(e,n))return eD(t,r?2097152:262144);const i=P(n,t);return i?N(t,i,(e=>Zw(e,r?2097152:262144))):t}(t,n,r);switch(n.kind){case 80:if(!Iw(e,n)&&v<5){const i=Nw(n);if(wE(i)){const n=i.valueDeclaration;if(n&&KP(n)&&!n.type&&n.initializer&&GD(e)){v++;const e=Y(t,n.initializer,r);return v--,e}}}case 110:case 108:case 211:case 212:return A(t,n,r);case 213:return function(t,n,r){if(Ww(n,e)){const e=r||!xl(n)?zD(n):void 0,i=e&&Wf(e);if(i&&(0===i.kind||1===i.kind))return Q(t,i,n,r)}if(DC(t)&&Ox(e)&&GE(n.expression)){const i=n.expression;if(Iw(e.expression,pD(i.expression))&&qD(i.name)&&"hasOwnProperty"===i.name.escapedText&&1===n.arguments.length){const i=n.arguments[0];if($_(i)&&Ow(e)===yc(i.text))return Zw(t,r?524288:65536)}}return t}(t,n,r);case 217:case 235:return Y(t,n.expression,r);case 226:return j(t,n,r);case 224:if(54===n.operator)return Y(t,n.operand,!r)}return t}}function QD(e){return mc(e.parent,(e=>cu(e)&&!cm(e)||268===e.kind||307===e.kind||172===e.kind))}function YD(e){return!ZD(e,void 0)}function ZD(e,t){const n=mc(e.valueDeclaration,rE);if(!n)return!1;const r=Wo(n);return 131072&r.flags||(r.flags|=131072,mc(n.parent,(e=>rE(e)&&!!(131072&Wo(e).flags)))||vE(n)),!e.lastAssignmentPos||t&&e.lastAssignmentPos232!==e.kind&&tE(e.name)))}function rE(e){return uu(e)||qN(e)}function vE(e){switch(e.kind){case 80:if(eh(e)){const t=Nw(e);if(FE(t)&&t.lastAssignmentPos!==Number.MAX_VALUE){const n=mc(e,rE),r=mc(t.valueDeclaration,rE);t.lastAssignmentPos=n===r?function(e,t){let n=e.pos;for(;e&&e.pos>t.pos;){switch(e.kind){case 243:case 244:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 258:case 263:n=e.end}e=e.parent}return n}(e,t.valueDeclaration):Number.MAX_VALUE}}return;case 281:const t=e.parent.parent;if(!e.isTypeOnly&&!t.isTypeOnly&&!t.moduleSpecifier){const t=Ma(e.propertyName||e.name,111551,!0,!0);t&&FE(t)&&(t.lastAssignmentPos=Number.MAX_VALUE)}return;case 264:case 265:case 266:return}wu(e)||LI(e,vE)}function wE(e){return 3&e.flags&&0!=(6&cA(e))}function FE(e){const t=e.valueDeclaration&&sy(e.valueDeclaration);return!!t&&(sE(t)||KP(t)&&(RN(t.parent)||function(e){return!!(1&e.parent.flags)&&!(32&cc(e)||243===e.parent.parent.kind&&Yp(e.parent.parent.parent))}(t)))}function AE(e){return 2097152&e.flags?Q(e.types,AE):!!(465829888&e.flags&&1146880&Hd(e).flags)}function OE(e){return 2097152&e.flags?Q(e.types,OE):!(!(465829888&e.flags)||_M(Hd(e),98304))}function $E(e,t,n){ph(e)&&(e=e.baseType);const r=!(n&&2&n)&&bD(e,AE)&&(function(e,t){const n=t.parent;return 211===n.kind||166===n.kind||213===n.kind&&n.expression===t||214===n.kind&&n.expression===t||212===n.kind&&n.expression===t&&!(bD(e,OE)&&gb(qM(n.argumentExpression)))}(e,t)||function(e,t){const n=(qD(e)||GE(e)||XE(e))&&!((CN(e.parent)||TN(e.parent))&&e.parent.tagName===e)&&dF(e,t&&32&t?8:void 0);return n&&!lb(n)}(t,n));return r?DD(e,Hd):e}function qE(e){return!!mc(e,(e=>{const t=e.parent;return void 0===t?"quit":mN(t)?t.expression===e&&vb(e):!!yN(t)&&(t.name===e||t.propertyName===e)}))}function eP(e,t,n,r){if(Ie&&!(33554432&e.flags))switch(t){case 1:return iP(e);case 2:return aP(e,n,r);case 3:return lP(e);case 4:return _P(e);case 5:return dP(e);case 6:return pP(e);case 7:return yP(e);case 8:return SP(e);case 0:if(qD(e)&&(Tm(e)||JN(e.parent)||rN(e.parent)&&e.parent.moduleReference===e)&&RP(e)){if(Bu(e.parent)&&(GE(e.parent)?e.parent.expression:e.parent.left)!==e)return;return void iP(e)}if(Bu(e)){let t=e;for(;Bu(t);){if(wf(t))return;t=t.parent}return aP(e)}if(mN(e))return lP(e);if(D_(e)||EN(e))return _P(e);if(rN(e))return Fm(e)||lR(e)?pP(e):void 0;if(yN(e))return yP(e);if((uu(e)||_E(e))&&dP(e),!A.emitDecoratorMetadata)return;if(!(lI(e)&&Wv(e)&&e.modifiers&&gm(J,e,e.parent,e.parent.parent)))return;return SP(e);default:xn.assertNever(t,`Unhandled reference hint: ${t}`)}}function iP(e){const t=Nw(e);t&&t!==Ee&&t!==ht&&!bv(e)&&kP(t,e)}function aP(e,t,n){const r=GE(e)?e.expression:e.left;if(yv(r)||!qD(r))return;const i=Nw(r);if(!i||i===ht)return;if(NS(A)||jS(A)&&qE(e))return void kP(i,e);const o=n||DM(r);if(Ec(o)||o===tn)return void kP(i,e);let a=t;if(!a&&!n){const t=GE(e)?e.name:e.right,n=VD(t)&&PA(t.escapedText,t),r=mp(0!==Zg(e)||EA(e)?RC(o):o);a=VD(t)?n&&FA(r,n)||void 0:Jp(r,t.escapedText)}a&&(YR(a)||8&a.flags&&306===e.parent.kind)||kP(i,e)}function lP(e){if(qD(e.expression)){const t=e.expression,n=_s(Ma(t,-1,!0,!0,e));n&&kP(n,t)}}function _P(e){if(!WF(e)){const t=ro&&2===A.jsx?va.Cannot_find_name_0:void 0,n=go(e),r=D_(e)?e.tagName:e;let i;if(EN(e)&&"null"===n||(i=je(r,n,111551,t,!0)),i&&(i.isReferenced=-1,Ie&&2097152&i.flags&&!Aa(i)&&TP(i)),EN(e)){const n=ho(Sd(e));n&&je(r,n,111551,t,!0)}}}function dP(e){if(M<2&&2&Jh(e)){PP((t=Cv(e))&&fm(t),!1)}var t}function pP(e){Bv(e,32)&&wP(e)}function yP(e){if(e.parent.parent.moduleSpecifier||e.isTypeOnly||e.parent.parent.isTypeOnly);else{const t=e.propertyName||e.name,n=je(t,t.escapedText,2998271,void 0,!0);if(n&&(n===ge||n===he||n.declarations&&Yp(kc(n.declarations[0]))));else{const t=n&&(2097152&n.flags?Ea(n):n);(!t||111551&Pa(t))&&(wP(e),iP(e.propertyName||e.name))}}}function SP(e){if(A.emitDecoratorMetadata){const t=S(e.modifiers,cE);if(!t)return;switch(xB(t,16),e.kind){case 263:const t=pv(e);if(t)for(const e of t.parameters)AP(FL(e));break;case 177:case 178:const n=177===e.kind?178:177,r=Y_(ns(e),n);AP(Pl(e)||r&&Pl(r));break;case 174:for(const t of e.parameters)AP(FL(t));AP(Cv(e));break;case 172:AP(kv(e));break;case 169:AP(FL(e));const i=e.parent;for(const e of i.parameters)AP(FL(e));AP(Cv(i))}}}function kP(e,t){if(Ie&&wa(e,111551)&&!vv(t)){const n=Ea(e);1160127&Pa(e,!0)&&(NS(A)||jS(A)&&qE(t)||!YR(_s(n)))&&TP(e)}}function TP(e){xn.assert(Ie);const t=Uo(e);if(!t.referenced){t.referenced=!0;const n=sa(e);if(!n)return xn.fail();Fm(n)&&111551&Pa(Da(e))&&iP(bb(n.moduleReference))}}function wP(e){const t=ns(e),n=Ea(t);n&&(n===ht||111551&Pa(t,!0)&&!YR(n))&&TP(t)}function PP(e,t){if(!e)return;const n=bb(e),r=2097152|(80===e.kind?788968:1920),i=je(n,n.escapedText,r,void 0,!0);if(i&&2097152&i.flags)if(Ie&&ds(i)&&!YR(Ea(i))&&!Aa(i))TP(i);else if(t&&NS(A)&&DS(A)>=5&&!ds(i)&&!Q(i.declarations,Wl)){const t=xo(e,va.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled),r=S(i.declarations||u,la);r&&fT(t,Rp(r,va._0_was_imported_here,bc(n)))}}function AP(e){const t=PL(e);t&&ou(t)&&PP(t,!0)}function IP(e,t){if(bv(e))return;if(t===Ee){if(RA(e))return void xo(e,va.arguments_cannot_be_referenced_in_property_initializers);let t=Qf(e);if(t)for(M<2&&(219===t.kind?xo(e,va.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression):Bv(t,1024)&&xo(e,va.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method)),Wo(t).flags|=512;t&&rP(t);)t=Qf(t),t&&(Wo(t).flags|=512);return}const n=_s(t),r=_R(n,e);wo(r)&&tb(e,r)&&r.declarations&&Eo(e,r.declarations,e.escapedText);const i=n.valueDeclaration;if(i&&32&n.flags&&gu(i)&&i.name!==e){let t=rm(e,!1,!1);for(;307!==t.kind&&t.parent!==i;)t=rm(t,!1,!1);307!==t.kind&&(Wo(i).flags|=262144,Wo(t).flags|=262144,Wo(e).flags|=536870912)}!function(e,t){if(M>=2||0==(34&t.flags)||!t.valueDeclaration||qN(t.valueDeclaration)||299===t.valueDeclaration.parent.kind)return;const n=Np(t.valueDeclaration),r=function(e,t){return!!mc(e,(e=>e===t?"quit":cu(e)||e.parent&&uE(e.parent)&&!zv(e.parent)&&e.parent.initializer===e))}(e,n),i=BP(n);if(i){if(r){let r=!0;if(OP(n)){const i=Eh(t.valueDeclaration,261);if(i&&i.parent===n){const i=function(e,t){return mc(e,(e=>e===t?"quit":e===t.initializer||e===t.condition||e===t.incrementor||e===t.statement))}(e.parent,n);if(i){const e=Wo(i);e.flags|=8192,fe(e.capturedBlockScopeBindings||(e.capturedBlockScopeBindings=[]),t),i===n.initializer&&(r=!1)}}}r&&(Wo(i).flags|=4096)}if(OP(n)){const r=Eh(t.valueDeclaration,261);r&&r.parent===n&&function(e,t){let n=e;for(;217===n.parent.kind;)n=n.parent;let r=!1;if(eh(n))r=!0;else if(224===n.parent.kind||225===n.parent.kind){const e=n.parent;r=46===e.operator||47===e.operator}return!!r&&!!mc(n,(e=>e===t?"quit":e===t.statement))}(e,n)&&(Wo(t.valueDeclaration).flags|=65536)}Wo(t.valueDeclaration).flags|=32768}r&&(Wo(t.valueDeclaration).flags|=16384)}(e,t)}function jP(e,t){if(bv(e))return VP(e);const n=Nw(e);if(n===ht)return Dt;if(IP(e,n),n===Ee)return RA(e)?Dt:$l(n);RP(e)&&eP(e,1);const r=_s(n);let i=r.valueDeclaration,o=function(e,t,n){var r;const i=$l(e,n),o=e.valueDeclaration;if(o){if(KE(o)&&!o.initializer&&!o.dotDotDotToken&&o.parent.elements.length>=2){const e=o.parent.parent,n=sy(e);if(260===n.kind&&6&xJ(n)||169===n.kind){const r=Wo(e);if(!(4194304&r.flags)){r.flags|=4194304;const i=Ic(e,0),a=i&&DD(i,Hd);if(r.flags&=-4194305,a&&1048576&a.flags&&(169!==n.kind||!eE(n))){const e=XD(o.parent,a,a,void 0,t.flowNode);return 131072&e.flags?en:Uc(o,e,!0)}}}}if(sE(o)&&!o.type&&!o.initializer&&!o.dotDotDotToken){const e=o.parent;if(e.parameters.length>=2&&fS(e)){const n=DF(e);if(n&&1===n.parameters.length&&JB(n)){const i=yp(eS($l(n.parameters[0]),null==(r=yF(e))?void 0:r.nonFixingMapper));if(1048576&i.flags&&xD(i,PT)&&!Q(e.parameters,eE))return Mb(XD(e,i,i,void 0,t.flowNode),ux(e.parameters.indexOf(o)-(gv(e)?1:0)))}}}}return i}(r,e,t);const a=Zg(e);if(a){if(!(3&r.flags||Mm(e)&&512&r.flags))return xo(e,384&r.flags?va.Cannot_assign_to_0_because_it_is_an_enum:32&r.flags?va.Cannot_assign_to_0_because_it_is_a_class:1536&r.flags?va.Cannot_assign_to_0_because_it_is_a_namespace:16&r.flags?va.Cannot_assign_to_0_because_it_is_a_function:2097152&r.flags?va.Cannot_assign_to_0_because_it_is_an_import:va.Cannot_assign_to_0_because_it_is_not_a_variable,Us(n)),Dt;if(oM(r))return 3&r.flags?xo(e,va.Cannot_assign_to_0_because_it_is_a_constant,Us(n)):xo(e,va.Cannot_assign_to_0_because_it_is_a_read_only_property,Us(n)),Dt}const s=2097152&r.flags;if(3&r.flags){if(1===a)return th(e)?cT(o):o}else{if(!s)return o;i=sa(n)}if(!i)return o;o=$E(o,e,t);const c=169===sy(i).kind,l=QD(i);let u=QD(e);const _=u!==l,d=e.parent&&e.parent.parent&&zN(e.parent)&&cD(e.parent.parent),p=134217728&n.flags,f=o===kt||o===ir,m=f&&235===e.parent.kind;for(;u!==l&&(218===u.kind||219===u.kind||qf(u))&&(wE(r)&&o!==ir||FE(r)&&ZD(r,e));)u=QD(u);const g=c||s||_||d||p||function(e,t){if(KE(t)){const n=mc(e,KE);return n&&sy(n)===sy(t)}}(e,i)||o!==kt&&o!==ir&&(!U||0!=(16387&o.flags)||vv(e)||Fw(e)||281===e.parent.kind)||235===e.parent.kind||260===i.kind&&i.exclamationToken||33554432&i.flags,h=m?It:g?c?function(e,t){const n=U&&169===t.kind&&t.initializer&&Qw(e,16777216)&&!function(e){const t=Wo(e);if(void 0===t.parameterInitializerContainsUndefined){if(!_c(e,8))return jl(e.symbol),!0;const n=!!Qw(PM(e,0),16777216);if(!gc())return jl(e.symbol),!0;t.parameterInitializerContainsUndefined??(t.parameterInitializerContainsUndefined=n)}return t.parameterInitializerContainsUndefined}(t);return n?Zw(e,524288):e}(o,i):o:f?It:XT(o),y=m?QT(XD(e,o,h,u)):XD(e,o,h,u);if(RD(e)||o!==kt&&o!==ir){if(!g&&!ak(o)&&ak(y))return xo(e,va.Variable_0_is_used_before_being_assigned,Us(n)),o}else if(y===kt||y===ir)return Y&&(xo(Pc(i),va.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,Us(n),Ws(y)),xo(e,va.Variable_0_implicitly_has_an_1_type,Us(n),Ws(y))),nj(y);return a?cT(y):y}function RP(e){var t;const n=e.parent;if(n){if(GE(n)&&n.expression===e)return!1;if(yN(n)&&n.isTypeOnly)return!1;const r=null==(t=n.parent)?void 0:t.parent;if(r&&gN(r)&&r.isTypeOnly)return!1}return!0}function BP(e){return mc(e,(e=>!e||cy(e)?"quit":Zu(e,!1)))}function JP(e,t){Wo(e).flags|=2,172===t.kind||176===t.kind?Wo(t.parent).flags|=4:Wo(t).flags|=4}function zP(e){return lf(e)?e:cu(e)?void 0:LI(e,zP)}function $P(e){return xu(ju(ns(e)))===Bt}function qP(e,t,n){const r=t.parent;kh(r)&&!$P(r)&&jg(e)&&e.flowNode&&!HD(e.flowNode,!1)&&xo(e,n)}function VP(e){const t=vv(e);let n=rm(e,!0,!0),r=!1,i=!1;for(176===n.kind&&qP(e,n,va.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);219===n.kind&&(n=rm(n,!1,!i),r=!0),167===n.kind;)n=rm(n,!r,!1),i=!0;if(function(e,t){uE(t)&&zv(t)&&J&&t.initializer&&Js(t.initializer,e.pos)&&Wv(t.parent)&&xo(e,va.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class)}(e,n),i)xo(e,va.this_cannot_be_referenced_in_a_computed_property_name);else switch(n.kind){case 267:xo(e,va.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 266:xo(e,va.this_cannot_be_referenced_in_current_location)}!t&&r&&M<2&&JP(e,n);const o=UP(e,!0,n);if(ee){const t=$l(he);if(o===t&&r)xo(e,va.The_containing_arrow_function_captures_the_global_value_of_this);else if(!o){const r=xo(e,va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!qN(n)){const e=UP(n);e&&e!==t&&fT(r,Rp(n,va.An_outer_value_of_this_is_shadowed_by_this_container))}}}return o||St}function UP(e,t=!0,n=rm(e,!1,!1)){const r=Mm(e);if(cu(n)&&(!bN(e)||gv(n))){let t=Kf(Cf(n))||r&&function(e){const t=tl(e);if(t&&t.typeExpression)return Sx(t.typeExpression);const n=Df(e);return n?Kf(n):void 0}(n);if(!t){const e=function(e){return 218===e.kind&&uP(e.parent)&&3===ag(e.parent)?e.parent.left.expression.expression:174===e.kind&&210===e.parent.kind&&uP(e.parent.parent)&&6===ag(e.parent.parent)?e.parent.parent.left.expression:218===e.kind&&303===e.parent.kind&&210===e.parent.parent.kind&&uP(e.parent.parent.parent)&&6===ag(e.parent.parent.parent)?e.parent.parent.parent.left.expression:218===e.kind&&BN(e.parent)&&qD(e.parent.name)&&("value"===e.parent.name.escapedText||"get"===e.parent.name.escapedText||"set"===e.parent.name.escapedText)&&HE(e.parent.parent)&&QE(e.parent.parent.parent)&&e.parent.parent.parent.arguments[2]===e.parent.parent&&9===ag(e.parent.parent.parent)?e.parent.parent.parent.arguments[0].expression:dE(e)&&qD(e.name)&&("value"===e.name.escapedText||"get"===e.name.escapedText||"set"===e.name.escapedText)&&HE(e.parent)&&QE(e.parent.parent)&&e.parent.parent.arguments[2]===e.parent&&9===ag(e.parent.parent)?e.parent.parent.arguments[0].expression:void 0}(n);if(r&&e){const n=KM(e).symbol;n&&n.members&&16&n.flags&&(t=ju(n).thisType)}else rO(n)&&(t=ju(ts(n.symbol)).thisType);t||(t=_N(n))}if(t)return XD(e,t)}if(gu(n.parent)){const t=ns(n.parent);return XD(e,Jv(n)?$l(t):ju(t).thisType)}if(qN(n)){if(n.commonJsModuleIndicator){const e=ns(n);return e&&$l(e)}if(n.externalModuleIndicator)return It;if(t)return $l(he)}}function tN(e){const t=213===e.parent.kind&&e.parent.expression===e,n=sm(e,!0);let r=n,i=!1,o=!1;if(!t){for(;r&&219===r.kind;)Bv(r,1024)&&(o=!0),r=sm(r,!0),i=M<2;r&&Bv(r,1024)&&(o=!0)}let a=0;if(!r||(s=r,!(t?176===s.kind:(gu(s.parent)||210===s.parent.kind)&&(Jv(s)?174===s.kind||173===s.kind||177===s.kind||178===s.kind||172===s.kind||175===s.kind:174===s.kind||173===s.kind||177===s.kind||178===s.kind||172===s.kind||171===s.kind||176===s.kind)))){const n=mc(e,(e=>e===r?"quit":167===e.kind));return n&&167===n.kind?xo(e,va.super_cannot_be_referenced_in_a_computed_property_name):t?xo(e,va.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):r&&r.parent&&(gu(r.parent)||210===r.parent.kind)?xo(e,va.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):xo(e,va.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),Dt}var s;if(t||176!==n.kind||qP(e,r,va.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),Jv(r)||t?(a=32,!t&&M>=2&&M<=8&&(uE(r)||pE(r))&&Fp(e.parent,(e=>{qN(e)&&!Zp(e)||(Wo(e).flags|=2097152)}))):a=16,Wo(e).flags|=a,174===r.kind&&o&&(um(e.parent)&&eh(e.parent)?Wo(r).flags|=256:Wo(r).flags|=128),i&&JP(e.parent,r),210===r.parent.kind)return M<2?(xo(e,va.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),Dt):St;const c=r.parent;if(!kh(c))return xo(e,va.super_can_only_be_referenced_in_a_derived_class),Dt;if($P(c))return t?Dt:Bt;const l=ju(ns(c)),u=l&&ku(l)[0];return u?176===r.kind&&function(e,t){return!!mc(e,(e=>uu(e)?"quit":169===e.kind&&e.parent===t))}(e,r)?(xo(e,va.super_cannot_be_referenced_in_constructor_arguments),Dt):32===a?xu(l):y_(u,l.thisType):Dt}function aN(e){return 174!==e.kind&&177!==e.kind&&178!==e.kind||210!==e.parent.kind?218===e.kind&&303===e.parent.kind?e.parent.parent:void 0:e.parent}function sN(e){return 4&wx(e)&&e.target===nr?Ig(e)[0]:void 0}function cN(e){return DD(e,(e=>2097152&e.flags?f(e.types,sN):sN(e)))}function uN(e,t){let n=e,r=t;for(;r;){const e=cN(r);if(e)return e;if(303!==n.parent.kind)break;n=n.parent.parent,r=oF(n,void 0)}}function _N(e){if(219===e.kind)return;if(fS(e)){const t=DF(e);if(t){const e=t.thisParameter;if(e)return $l(e)}}const t=Mm(e);if(ee||t){const n=aN(e);if(n){const e=oF(n,void 0),t=uN(n,e);return t?eS(t,QC(yF(n))):RC(e?QT(e):DM(n))}const r=ah(e.parent);if(mb(r)){const e=r.left;if(Ox(e)){const{expression:n}=e;if(t&&qD(n)){const e=Sd(r);if(e.commonJsModuleIndicator&&Nw(n)===e.symbol)return}return RC(DM(n))}}}}function pN(e){const t=e.parent;if(!fS(t))return;const n=cm(t);if(n&&n.arguments){const r=FI(n),i=t.parameters.indexOf(e);if(e.dotDotDotToken)return TI(r,i,r.length,St,void 0,0);const o=Wo(n),a=o.resolvedSignature;o.resolvedSignature=ti;const s=i!!(58998787&e.flags)||QM(e,n,void 0))):2&n?SD(t,(e=>!!(58998787&e.flags)||!!mL(e))):t}const i=cm(e);return i?dF(i,t):void 0}function DN(e,t){const n=FI(e).indexOf(t);return-1===n?void 0:PN(e,n)}function PN(e,t){if(uf(e))return 0===t?Jt:1===t?ty(!1):St;const n=Wo(e).resolvedSignature===ri?ri:nO(e);if(D_(e)&&0===t)return vF(n,e);const r=n.parameters.length-1;return JB(n)&&t>=r?Mb($l(n.parameters[r]),ux(t-r),256):DO(n,t)}function IN(e,t=ag(e)){if(4===t)return!0;if(!Mm(e)||5!==t||!qD(e.left.expression))return!1;const n=e.left.expression.escapedText,r=je(e.left,n,111551,void 0,!0,!0);return dm(null==r?void 0:r.valueDeclaration)}function MN(e){if(!e.symbol)return qM(e.left);if(e.symbol.valueDeclaration){const t=kv(e.symbol.valueDeclaration);if(t){const e=Sx(t);if(e)return e}}const t=ut(e.left,Ox);if(!$f(rm(t.expression,!1,!1)))return;const n=VP(t.expression),r=mg(t);return void 0!==r&&LN(n,r)||void 0}function LN(e,t,n){return DD(e,(e=>{var r,i;if(Ad(e)&&!e.declaration.nameType){const r=md(e),i=Wd(r)||r,o=n||lx(vc(t));if(SS(o,i))return Ob(e,o)}else if(3670016&e.flags){const o=Jp(e,t);if(o)return 262144&px(i=o)&&!i.links.type&&dc(i,0)>=0?void 0:bC($l(o),!!(16777216&o.flags));if(PT(e)&&WT(t)&&+t>=0){const t=jT(e,e.target.fixedLength,0,!1,!0);if(t)return t}return null==(r=of(sf(e),n||lx(vc(t))))?void 0:r.type}}),!0)}function VN(e,t){if(xn.assert($f(e)),!(67108864&e.flags))return HN(e,t)}function HN(e,t){const n=e.parent,r=BN(e)&&vN(e,t);if(r)return r;const i=oF(n,t);if(i){if(l_(e)){const t=ns(e);return LN(i,t.escapedName,Uo(t).nameType)}if(Vh(e)){const t=Pc(e);if(t&&oE(t)){const e=KM(t.expression),n=mC(e)&&LN(i,gC(e));if(n)return n}}if(e.name){const t=Tv(e.name);return DD(i,(e=>{var n;return null==(n=of(sf(e),t))?void 0:n.type}),!0)}}}function GN(e,t,n,r,i){return e&&DD(e,(e=>{if(PT(e)){if((void 0===r||ti)?n-t:0,a=o>0&&e.target.hasRestElement?Ry(e.target,3):0;return o>0&&o<=a?Ig(e)[Og(e)-o]:jT(e,void 0===r?e.target.fixedLength:Math.min(e.target.fixedLength,r),void 0===n||void 0===i?a:Math.min(a,n-i),!1,!0)}return(!r||t32&wx(e)?e:mp(e)),!0);return 1048576&t.flags&&HE(e)?function(e,t){const n=`D${IB(e)},${qy(t)}`;return fo(n)??mo(n,function(e,t){const n=qw(e),r=n&&S(t.properties,(e=>e.symbol&&303===e.kind&&e.symbol.escapedName===n&&iF(e.initializer))),i=r&&UM(r.initializer);return i&&Vw(e,i)}(t,e)??bk(t,Z(O(F(e.properties,(e=>!!e.symbol&&(303===e.kind?iF(e.initializer)&&zw(t,e.symbol.escapedName):304===e.kind&&zw(t,e.symbol.escapedName)))),(e=>[()=>UM(303===e.kind?e.initializer:e.name),e.symbol.escapedName])),O(F(Rd(t),(n=>{var r;return!!(16777216&n.flags)&&!!(null==(r=null==e?void 0:e.symbol)?void 0:r.members)&&!e.symbol.members.has(n.escapedName)&&zw(t,n.escapedName)})),(e=>[()=>It,e.escapedName]))),SS))}(e,t):1048576&t.flags&&FN(e)?function(e,t){const n=`D${IB(e)},${qy(t)}`,r=fo(n);if(r)return r;const i=XF(HF(e));return mo(n,bk(t,Z(O(F(e.properties,(e=>!!e.symbol&&291===e.kind&&zw(t,e.symbol.escapedName)&&(!e.initializer||iF(e.initializer)))),(e=>[e.initializer?()=>UM(e.initializer):()=>Kt,e.symbol.escapedName])),O(F(Rd(t),(n=>{var r;if(!(16777216&n.flags&&(null==(r=null==e?void 0:e.symbol)?void 0:r.members)))return!1;const o=e.parent.parent;return(n.escapedName!==i||!kN(o)||!vy(o.children).length)&&!e.symbol.members.has(n.escapedName)&&zw(t,n.escapedName)})),(e=>[()=>It,e.escapedName]))),SS))}(e,t):t}}function lF(e,t,n){if(e&&_M(e,465829888)){const r=yF(t);if(r&&1&n&&Q(r.inferences,BM))return uF(e,r.nonFixingMapper);if(null==r?void 0:r.returnMapper){const t=uF(e,r.returnMapper);return 1048576&t.flags&&Ky(t.types,Vt)&&Ky(t.types,Ht)?SD(t,(e=>e!==Vt&&e!==Ht)):t}}return e}function uF(e,t){return 465829888&e.flags?eS(e,t):1048576&e.flags?ev(O(e.types,(e=>uF(e,t))),0):2097152&e.flags?cv(O(e.types,(e=>uF(e,t)))):e}function dF(e,t){var n;if(67108864&e.flags)return;const r=gF(e,!t);if(r>=0)return xi[r];const{parent:i}=e;switch(i.kind){case 260:case 169:case 172:case 171:case 208:return function(e,t){const n=e.parent;if(L_(n)&&e===n.initializer){const e=vN(n,t);if(e)return e;if(!(8&t)&&Eu(n.name)&&n.name.elements.length>0)return hl(n.name,!0,!1)}}(e,t);case 219:case 253:return function(e,t){const n=Qf(e);if(n){let e=wN(n,t);if(e){const t=Jh(n);if(1&t){const n=0!=(2&t);1048576&e.flags&&(e=SD(e,(e=>!!jj(1,e,n))));const r=jj(1,e,0!=(2&t));if(!r)return;e=r}if(2&t){const t=DD(e,kL);return t&&ev([t,KO(t)])}return e}}}(e,t);case 229:return function(e,t){const n=Qf(e);if(n){const r=Jh(n);let i=wN(n,t);if(i){const n=0!=(2&r);if(!e.asteriskToken&&1048576&i.flags&&(i=SD(i,(e=>!!jj(1,e,n)))),e.asteriskToken){const r=Rj(i,n),o=(null==r?void 0:r.yieldType)??tn,a=dF(e,t)??tn,s=(null==r?void 0:r.nextType)??At,c=GO(o,a,s,!1);return n?ev([c,GO(o,a,s,!0)]):c}return jj(0,i,n)}}}(i,t);case 223:return function(e,t){const n=dF(e,t);if(n){const e=kL(n);return e&&ev([e,KO(e)])}}(i,t);case 213:case 214:return DN(i,e);case 170:return function(e){const t=VO(e);return t?Om(t):void 0}(i);case 216:case 234:return Dl(i.type)?dF(i,t):Sx(i.type);case 226:return function(e,t){const n=e.parent,{left:r,operatorToken:i,right:o}=n;switch(i.kind){case 64:case 77:case 76:case 78:return e===o?function(e){var t,n;const r=ag(e);switch(r){case 0:case 4:const i=function(e){if(p_(e)&&e.symbol)return e.symbol;if(qD(e))return Nw(e);if(GE(e)){const t=qM(e.expression);return VD(e.name)?function(e,t){const n=PA(t.escapedText,t);return n&&FA(e,n)}(t,e.name):Jp(t,e.name.escapedText)}if(XE(e)){const t=DM(e.argumentExpression);if(!mC(t))return;return Jp(qM(e.expression),gC(t))}}(e.left),o=i&&i.valueDeclaration;if(o&&(uE(o)||lE(o))){const t=kv(o);return t&&eS(Sx(t),Uo(i).mapper)||(uE(o)?o.initializer&&qM(e.left):void 0)}return 0===r?qM(e.left):MN(e);case 5:if(IN(e,r))return MN(e);if(p_(e.left)&&e.left.symbol){const t=e.left.symbol.valueDeclaration;if(!t)return;const n=ut(e.left,Ox),r=kv(t);if(r)return Sx(r);if(qD(n.expression)){const e=n.expression,t=je(e,e.escapedText,111551,void 0,!0);if(t){const e=t.valueDeclaration&&kv(t.valueDeclaration);if(e){const t=mg(n);if(void 0!==t)return LN(Sx(e),t)}return}}return Mm(t)||t===e.left?void 0:qM(e.left)}return qM(e.left);case 1:case 6:case 3:case 2:let a;2!==r&&(a=p_(e.left)?null==(t=e.left.symbol)?void 0:t.valueDeclaration:void 0),a||(a=null==(n=e.symbol)?void 0:n.valueDeclaration);const s=a&&kv(a);return s?Sx(s):void 0;case 7:case 8:case 9:return xn.fail("Does not apply");default:return xn.assertNever(r)}}(n):void 0;case 57:case 61:const i=dF(n,t);return e===o&&(i&&i.pattern||!i&&!Zm(n))?qM(r):i;case 56:case 28:return e===o?dF(n,t):void 0;default:return}}(e,t);case 303:case 304:return HN(i,t);case 305:return dF(i.parent,t);case 209:{const r=i,o=oF(r,t),a=Qd(r.elements,e),s=(n=Wo(r)).spreadIndices??(n.spreadIndices=function(e){let t,n;for(let r=0;rHk(e)?Mb(e,ux(a)):e),!0))}(n,e,t):void 0}(i,t);case 291:case 293:return XN(i,t);case 286:case 285:return function(e,t){if(CN(e)&&4!==t){const n=gF(e.parent,!t);if(n>=0)return xi[n]}return PN(e,0)}(i,t);case 301:return function(e){return LN(ny(!1),xC(e))}(i)}}function pF(e){fF(e,dF(e,void 0),!0)}function fF(e,t,n){bi[ki]=e,xi[ki]=t,Si[ki]=n,ki++}function mF(){ki--}function gF(e,t){for(let n=ki-1;n>=0;n--)if(e===bi[n]&&(t||!Si[n]))return n;return-1}function yF(e){for(let t=Di-1;t>=0;t--)if(_h(e,Ti[t]))return wi[t]}function vF(e,t){return 0!==wI(t)?function(e,t){let n=jO(e,At);n=bF(t,HF(t),n);const r=UF(hB.IntrinsicAttributes,t);return Nc(r)||(n=K_(r,n)),n}(e,t):function(e,t){const n=HF(t),r=(i=n,GF(hB.ElementAttributesPropertyNameContainer,i));var i;let o=void 0===r?jO(e,At):""===r?Gf(e):function(e,t){if(e.compositeSignatures){const n=[];for(const r of e.compositeSignatures){const e=Gf(r);if(Ec(e))return e;const i=Tc(e,t);if(!i)return;n.push(i)}return cv(n)}const n=Gf(e);return Ec(n)?n:Tc(n,t)}(e,r);if(!o)return r&&p(t.attributes.properties)&&xo(t,va.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,vc(r)),At;if(o=bF(t,n,o),Ec(o))return o;{let n=o;const r=UF(hB.IntrinsicClassAttributes,t);if(!Nc(r)){const i=nu(r.symbol),o=Gf(e);let a;a=i?eS(r,Fx(i,Tf([o],i,kf(i),Mm(t)))):r,n=K_(a,n)}const i=UF(hB.IntrinsicAttributes,t);return Nc(i)||(n=K_(i,n)),n}}(e,t)}function bF(e,t,n){const r=(i=t)&&Ho(i.exports,hB.LibraryManagedAttributes,788968);var i;if(r){const t=function(e){if(JF(e.tagName))return Om(ZI(e,ZF(e)));const t=DM(e.tagName);if(128&t.flags){const n=YF(t,e);return n?Om(ZI(e,n)):Dt}return t}(e),i=rA(r,Mm(e),t,n);if(i)return i}return n}function SF(e,t){const n=F(Vp(e,0),(e=>!function(e,t){let n=0;for(;ne!==t&&e?R_(e.typeParameters,t.typeParameters)?function(e,t){const n=e.typeParameters||t.typeParameters;let r;e.typeParameters&&t.typeParameters&&(r=Fx(t.typeParameters,e.typeParameters));const i=e.declaration,o=function(e,t,n){const r=FO(e),i=FO(t),o=r>=i?e:t,a=o===e?t:e,s=o===e?r:i,c=IO(e)||IO(t),l=c&&!IO(o),u=new Array(s+(l?1:0));for(let _=0;_=AO(o)&&_>=AO(a),h=_>=r?void 0:kO(e,_),y=_>=i?void 0:kO(t,_),v=No(1|(g&&!m?16777216:0),(h===y?h:h?y?void 0:h:y)||`arg${_}`);v.links.type=m?Ty(f):f,u[_]=v}if(l){const e=No(1,"args");e.links.type=Ty(DO(a,s)),a===t&&(e.links.type=eS(e.links.type,n)),u[s]=e}return u}(e,t,r),a=function(e,t,n){return e&&t?FC(e,ev([$l(e),eS($l(t),n)])):e||t}(e.thisParameter,t.thisParameter,r),s=x_(i,n,a,o,void 0,void 0,Math.max(e.minArgumentCount,t.minArgumentCount),167&(e.flags|t.flags));return s.compositeKind=2097152,s.compositeSignatures=Z(2097152===e.compositeKind&&e.compositeSignatures||[e],[t]),r&&(s.mapper=2097152===e.compositeKind&&e.mapper&&e.compositeSignatures?zx(e.mapper,r):r),s}(e,t):void 0:e)):void 0);var r}function TF(e){return UT(e)||$f(e)?DF(e):void 0}function DF(e){xn.assert(174!==e.kind||$f(e));const t=Df(e);if(t)return t;const n=oF(e,1);if(!n)return;if(!(1048576&n.flags))return SF(n,e);let r;const i=n.types;for(const t of i){const n=SF(t,e);if(n)if(r){if(!Jk(r[0],n,!1,!0,!0,hS))return;r.push(n)}else r=[n]}return r?1===r.length?r[0]:k_(r[0],r):void 0}function PF(e){return 208===e.kind&&!!e.initializer||226===e.kind&&64===e.operatorToken.kind}function FF(e,t,n){const r=e.elements,i=r.length,o=[],a=[];pF(e);const s=eh(e),c=AM(e),l=oF(e,void 0),u=function(e){const t=ah(e.parent);return fP(t)&&$u(t.parent)}(e)||!!l&&bD(l,(e=>Zk(e)||Ad(e)&&!e.nameType&&!!Gx(e.target||e)));let _=!1;for(let c=0;c8&a[t]?jb(e,zt)||St:e)),2):U?nn:Ot,c))}function IF(e){const t=Wo(e.expression);if(!t.resolvedType){if((CE(e.parent.parent)||gu(e.parent.parent)||XP(e.parent.parent))&&uP(e.expression)&&103===e.expression.operatorToken.kind&&177!==e.parent.kind&&178!==e.parent.kind)return t.resolvedType=Dt;if(t.resolvedType=KM(e.expression),uE(e.parent)&&!zv(e.parent)&&mP(e.parent.parent)){const t=BP(Np(e.parent.parent));t&&(Wo(t).flags|=4096,Wo(e).flags|=32768,Wo(e.parent.parent).flags|=32768)}(98304&t.resolvedType.flags||!dM(t.resolvedType,402665900)&&!SS(t.resolvedType,pn))&&xo(e,va.A_computed_property_name_must_be_of_type_string_number_symbol_or_any)}return t.resolvedType}function OF(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return WT(e.escapedName)||n&&Dc(n)&&function(e){switch(e.kind){case 167:return function(e){return dM(IF(e),296)}(e);case 80:return WT(e.escapedText);case 9:case 11:return WT(e.text);default:return!1}}(n.name)}function MF(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return Yh(e)||n&&Dc(n)&&oE(n.name)&&dM(IF(n.name),4096)}function LF(e,t,n,r){const i=[];for(let e=t;e1&&n.declarations&&xo(n.declarations[0],va.The_global_type_JSX_0_may_not_have_more_than_one_property,vc(e))}}function XF(e){return GF(hB.ElementChildrenAttributeNameContainer,e)}function QF(e,t){if(4&e.flags)return[ti];if(128&e.flags){const n=YF(e,t);return n?[ZI(t,n)]:(xo(t,va.Property_0_does_not_exist_on_type_1,e.value,"JSX."+hB.IntrinsicElements),u)}const n=mp(e);let r=Vp(n,1);return 0===r.length&&(r=Vp(n,0)),0===r.length&&1048576&n.flags&&(r=F_(O(n.types,(e=>QF(e,t))))),r}function YF(e,t){const n=UF(hB.IntrinsicElements,t);if(!Nc(n)){const t=Jp(n,yc(e.value));if(t)return $l(t);return pf(n,Jt)||void 0}return St}function ZF(e){var t;xn.assert(JF(e.tagName));const n=Wo(e);if(!n.resolvedJsxElementAttributesType){const r=KF(e);if(1&n.jsxFlags)return n.resolvedJsxElementAttributesType=$l(r)||Dt;if(2&n.jsxFlags){const r=ON(e.tagName)?dC(e.tagName):e.tagName.escapedText;return n.resolvedJsxElementAttributesType=(null==(t=gf(UF(hB.IntrinsicElements,e),r))?void 0:t.type)||Dt}return n.resolvedJsxElementAttributesType=Dt}return n.resolvedJsxElementAttributesType}function eA(e){const t=UF(hB.ElementClass,e);if(!Nc(t))return t}function tA(e){return UF(hB.Element,e)}function nA(e){const t=tA(e);if(t)return ev([t,Rt])}function rA(e,t,...n){const r=ju(e);if(524288&e.flags){const i=Uo(e).typeParameters;if(p(i)>=n.length){const o=Tf(n,i,n.length,t);return 0===p(o)?r:Bg(e,o)}}if(p(r.typeParameters)>=n.length)return Tg(r,Tf(n,r.typeParameters,n.length,t))}function iA(e){const t=D_(e);var n;if(t&&function(e){(function(e){if(GE(e)&&ON(e.expression))return pJ(e.expression,va.JSX_property_access_expressions_cannot_include_JSX_namespace_names);ON(e)&&ek(A)&&!Jy(e.namespace.escapedText)&&pJ(e,va.React_components_cannot_include_JSX_namespace_names)})(e.tagName),KB(e,e.typeArguments);const t=new Map;for(const n of e.attributes.properties){if(293===n.kind)continue;const{name:e,initializer:r}=n,i=lC(e);if(t.get(i))return pJ(e,va.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);if(t.set(i,!0),r&&294===r.kind&&!r.expression)return pJ(r,va.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}(e),n=e,0===(A.jsx||0)&&xo(n,va.Cannot_use_JSX_unless_the_jsx_flag_is_provided),void 0===tA(n)&&Y&&xo(n,va.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist),eP(e,4),t){const t=e,n=nO(t);aO(n,e);const r=function(e){const t=HF(e);if(!t)return;const n=(r=t)&&Ho(r.exports,hB.ElementType,788968);var r;if(!n)return;const i=rA(n,Mm(e));return i&&!Nc(i)?i:void 0}(t);if(void 0!==r){const e=t.tagName;mk(JF(e)?lx(fC(e)):KM(e),r,co,e,va.Its_type_0_is_not_a_valid_JSX_element_type,(()=>{const t=Gd(e);return uS(void 0,va._0_cannot_be_used_as_a_JSX_component,t)}))}else!function(e,t,n){if(1===e){const e=nA(n);e&&mk(t,e,co,n.tagName,va.Its_return_type_0_is_not_a_valid_JSX_element,r)}else if(0===e){const e=eA(n);e&&mk(t,e,co,n.tagName,va.Its_instance_type_0_is_not_a_valid_JSX_element,r)}else{const e=nA(n),i=eA(n);if(!e||!i)return;mk(t,ev([e,i]),co,n.tagName,va.Its_element_type_0_is_not_a_valid_JSX_element,r)}function r(){const e=Gd(n.tagName);return uS(void 0,va._0_cannot_be_used_as_a_JSX_component,e)}}(wI(t),Gf(n),t)}}function oA(e,t,n){if(524288&e.flags&&(Ld(e,t)||gf(e,t)||s_(t)&&_f(e,Jt)||n&&BF(t)))return!0;if(33554432&e.flags)return oA(e.baseType,t,n);if(3145728&e.flags&&aA(e))for(const r of e.types)if(oA(r,t,n))return!0;return!1}function aA(e){return!!(524288&e.flags&&!(512&wx(e))||67108864&e.flags||33554432&e.flags&&aA(e.baseType)||1048576&e.flags&&Q(e.types,aA)||2097152&e.flags&&x(e.types,aA))}function cA(e){return e.valueDeclaration?xJ(e.valueDeclaration):0}function lA(e){if(8192&e.flags||4&px(e))return!0;if(Mm(e.valueDeclaration)){const t=e.valueDeclaration.parent;return t&&uP(t)&&3===ag(t)}}function pA(e,t,n,r,i,o=!0){return gA(e,t,n,r,i,o?166===e.kind?e.right:205===e.kind?e:208===e.kind&&e.propertyName?e.propertyName:e.name:void 0)}function gA(e,t,n,r,i,o){var a;const s=fx(i,n);if(t){if(M<2&&hA(i))return o&&xo(o,va.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(64&s)return o&&xo(o,va.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,Us(i),Ws(Ak(i))),!1;if(!(256&s)&&(null==(a=i.declarations)?void 0:a.some(vu)))return o&&xo(o,va.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super,Us(i)),!1}if(64&s&&hA(i)&&(_m(e)||pm(e)||VE(e.parent)&&dm(e.parent.parent))){const t=Cx(is(i));if(t&&mc(e,(e=>!!(fE(e)&&Fd(e.body)||uE(e))||!(!gu(e)&&!uu(e))&&"quit")))return o&&xo(o,va.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor,Us(i),Hh(t.name)),!1}if(!(6&s))return!0;if(2&s)return!!OR(e,Cx(is(i)))||(o&&xo(o,va.Property_0_is_private_and_only_accessible_within_class_1,Us(i),Ws(Ak(i))),!1);if(t)return!0;let c=AR(e,(e=>Ok(ju(ns(e)),i,n)));return!c&&(c=function(e){const t=function(e){const t=rm(e,!1,!1);return t&&cu(t)?gv(t):void 0}(e);let n=(null==t?void 0:t.type)&&Sx(t.type);if(n&&262144&n.flags&&(n=Jd(n)),n&&7&wx(n))return Hl(n)}(e),c=c&&Ok(c,i,n),256&s||!c)?(o&&xo(o,va.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,Us(i),Ws(Ak(i)||r)),!1):!!(256&s)||(262144&r.flags&&(r=r.isThisType?Jd(r):Wd(r)),!(!r||!Gl(r,c))||(o&&xo(o,va.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2,Us(i),Ws(c),Ws(r)),!1))}function hA(e){return!!Fk(e,(e=>!(8192&e.flags)))}function yA(e){return TA(KM(e),e)}function vA(e){return Qw(e,50331648)}function bA(e){return vA(e)?QT(e):e}function xA(e,t){const n=vb(e)?jp(e):void 0;if(106!==e.kind)if(void 0!==n&&n.length<100){if(qD(e)&&"undefined"===n)return void xo(e,va.The_value_0_cannot_be_used_here,"undefined");xo(e,16777216&t?33554432&t?va._0_is_possibly_null_or_undefined:va._0_is_possibly_undefined:va._0_is_possibly_null,n)}else xo(e,16777216&t?33554432&t?va.Object_is_possibly_null_or_undefined:va.Object_is_possibly_undefined:va.Object_is_possibly_null);else xo(e,va.The_value_0_cannot_be_used_here,"null")}function SA(e,t){xo(e,16777216&t?33554432&t?va.Cannot_invoke_an_object_which_is_possibly_null_or_undefined:va.Cannot_invoke_an_object_which_is_possibly_undefined:va.Cannot_invoke_an_object_which_is_possibly_null)}function kA(e,t,n){if(U&&2&e.flags){if(vb(t)){const e=jp(t);if(e.length<100)return xo(t,va._0_is_of_type_unknown,e),Dt}return xo(t,va.Object_is_of_type_unknown),Dt}const r=Xw(e,50331648);if(50331648&r){n(t,r);const i=QT(e);return 229376&i.flags?Dt:i}return e}function TA(e,t){return kA(e,t,xA)}function CA(e,t){const n=TA(e,t);if(16384&n.flags){if(vb(t)){const e=jp(t);if(qD(t)&&"undefined"===e)return xo(t,va.The_value_0_cannot_be_used_here,e),n;if(e.length<100)return xo(t,va._0_is_possibly_undefined,e),n}xo(t,va.Object_is_possibly_undefined)}return n}function wA(e,t,n){return 64&e.flags?function(e,t){const n=KM(e.expression),r=vC(n,e.expression);return pC(IA(e,e.expression,TA(r,e.expression),e.name,t),e,r!==n)}(e,t):IA(e,e.expression,yA(e.expression),e.name,t,n)}function DA(e,t){const n=wm(e)&&yv(e.left)?TA(VP(e.left),e.left):yA(e.left);return IA(e,e.left,n,e.right,t)}function EA(e){for(;217===e.parent.kind;)e=e.parent;return $u(e.parent)&&e.parent.expression===e}function PA(e,t){for(let n=nm(t);n;n=Zf(n)){const{symbol:t}=n,r=Qh(t,e),i=t.members&&t.members.get(r)||t.exports&&t.exports.get(r);if(i)return i}}function NA(e){if(!Tm(e))return;const t=Wo(e);return void 0===t.resolvedSymbol&&(t.resolvedSymbol=PA(e.escapedText,e)),t.resolvedSymbol}function FA(e,t){return Jp(e,t.escapedName)}function AA(e,t){return(Xc(t)||_m(e)&&Qc(t))&&rm(e,!0,!1)===Zc(t)}function IA(e,t,n,r,i,o){const a=Wo(t).resolvedSymbol,s=Zg(e),c=mp(0!==s||EA(e)?RC(n):n),l=Ec(c)||c===tn;let u,_;if(VD(r)){(M<9||M<99||!z)&&(0!==s&&xB(e,1048576),1!==s&&xB(e,524288));const t=PA(r.escapedText,r);if(s&&t&&t.valueDeclaration&&dE(t.valueDeclaration)&&pJ(r,va.Cannot_assign_to_private_method_0_Private_methods_are_not_writable,bc(r)),l){if(t)return Nc(c)?Dt:c;if(void 0===nm(r))return pJ(r,va.Private_identifiers_are_not_allowed_outside_class_bodies),St}if(u=t&&FA(n,t),void 0===u){if(function(e,t,n){let r;const i=Rd(e);i&&f(i,(e=>{const n=e.valueDeclaration;if(n&&Dc(n)&&VD(n.name)&&n.name.escapedText===t.escapedText)return r=e,!0}));const o=ea(t);if(r){const i=xn.checkDefined(r.valueDeclaration),a=xn.checkDefined(Zf(i));if(null==n?void 0:n.valueDeclaration){const r=n.valueDeclaration,s=Zf(r);if(xn.assert(!!s),mc(s,(e=>a===e)))return fT(xo(t,va.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling,o,Ws(e)),Rp(r,va.The_shadowing_declaration_of_0_is_defined_here,o),Rp(i,va.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here,o)),!0}return xo(t,va.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier,o,ea(a.name||bB)),!0}return!1}(n,r,t))return Dt;const e=nm(r);e&&Td(Sd(e),A.checkJs)&&pJ(r,va.Private_field_0_must_be_declared_in_an_enclosing_class,bc(r))}else 65536&u.flags&&!(32768&u.flags)&&1!==s&&xo(e,va.Private_accessor_was_defined_without_a_getter)}else{if(l)return qD(t)&&a&&eP(e,2,void 0,n),Nc(c)?Dt:c;u=Jp(c,r.escapedText,fM(c),166===e.kind)}if(eP(e,2,u,n),u){const n=_R(u,r);if(wo(n)&&tb(e,n)&&n.declarations&&Eo(r,n.declarations,r.escapedText),function(e,t,n){const{valueDeclaration:r}=e;if(!r||Sd(t).isDeclarationFile)return;let i;const o=bc(n);!RA(t)||function(e){return uE(e)&&!Uv(e)&&e.questionToken}(r)||Ox(t)&&Ox(t.expression)||Xo(r,n)||dE(r)&&256&bJ(r)||!z&&function(e){if(!(32&e.parent.flags))return!1;let t=$l(e.parent);for(;;){if(t=t.symbol&&BA(t),!t)return!1;const n=Jp(t,e.escapedName);if(n&&n.valueDeclaration)return!0}}(e)?263!==r.kind||183===t.parent.kind||33554432&r.flags||Xo(r,n)||(i=xo(n,va.Class_0_used_before_its_declaration,o)):i=xo(n,va.Property_0_is_used_before_its_initialization,o),i&&fT(i,Rp(r,va._0_is_declared_here,o))}(u,e,r),XA(u,e,QA(t,a)),Wo(e).resolvedSymbol=u,pA(e,108===t.kind,yx(e),c,u),aM(e,u,s))return xo(r,va.Cannot_assign_to_0_because_it_is_a_read_only_property,bc(r)),Dt;_=AA(e,u)?kt:o||hx(e)?zl(u):$l(u)}else{const t=VD(r)||0!==s&&pb(n)&&!GT(n)?void 0:gf(c,r.escapedText);if(!t||!t.type){const t=OA(e,n.symbol,!0);return!t&&Zv(n)?St:n.symbol===he?(he.exports.has(r.escapedText)&&418&he.exports.get(r.escapedText).flags?xo(r,va.Property_0_does_not_exist_on_type_1,vc(r.escapedText),Ws(n)):Y&&xo(r,va.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,Ws(n)),St):(r.escapedText&&!na(e)&&JA(r,GT(n)?c:n,t),Dt)}t.isReadonly&&(eh(e)||uh(e))&&xo(e,va.Index_signature_in_type_0_only_permits_reading,Ws(c)),_=t.type,A.noUncheckedIndexedAccess&&1!==Zg(e)&&(_=ev([_,Mt])),A.noPropertyAccessFromIndexSignature&&GE(e)&&xo(r,va.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0,vc(r.escapedText)),t.declaration&&Do(t.declaration)&&Eo(r,[t.declaration],r.escapedText)}return jA(e,u,_,r,i)}function OA(e,t,n){var r;const i=Sd(e);if(i&&void 0===A.checkJs&&void 0===i.checkJsDirective&&(1===i.scriptKind||2===i.scriptKind)){const o=f(null==t?void 0:t.declarations,Sd),a=!(null==t?void 0:t.valueDeclaration)||!gu(t.valueDeclaration)||(null==(r=t.valueDeclaration.heritageClauses)?void 0:r.length)||bm(!1,t.valueDeclaration);return!(i!==o&&o&&Yp(o)||n&&t&&32&t.flags&&a||e&&n&&GE(e)&&110===e.expression.kind&&a)}return!1}function jA(e,t,n,r,i){const o=Zg(e);if(1===o)return bC(n,!!(t&&16777216&t.flags));if(t&&!(98311&t.flags)&&!(8192&t.flags&&1048576&n.flags)&&!hR(t.declarations))return n;if(n===kt)return rl(e,t);n=$E(n,e,i);let a=!1;if(U&&X&&Ox(e)&&110===e.expression.kind){const n=t&&t.valueDeclaration;if(n&&tR(n)&&!Jv(n)){const t=QD(e);176!==t.kind||t.parent!==n.parent||33554432&n.flags||(a=!0)}}else U&&t&&t.valueDeclaration&&GE(t.valueDeclaration)&&gg(t.valueDeclaration)&&QD(e)===QD(t.valueDeclaration)&&(a=!0);const s=XD(e,n,a?XT(n):n);return a&&!ak(n)&&ak(s)?(xo(r,va.Property_0_is_used_before_being_assigned,Us(t)),n):o?cT(s):s}function RA(e){return!!mc(e,(e=>{switch(e.kind){case 172:return!0;case 303:case 174:case 177:case 178:case 305:case 167:case 239:case 294:case 291:case 292:case 293:case 286:case 233:case 298:return!1;case 219:case 244:return!(!DP(e.parent)||!pE(e.parent.parent))||"quit";default:return!Tm(e)&&"quit"}}))}function BA(e){const t=ku(e);if(0!==t.length)return cv(t)}function JA(e,t,n){let r,i;if(!VD(e)&&1048576&t.flags&&!(402784252&t.flags))for(const n of t.types)if(!Jp(n,e.escapedText)&&!gf(n,e.escapedText)){r=uS(r,va.Property_0_does_not_exist_on_type_1,Ap(e),Ws(n));break}if(zA(e.escapedText,t)){const n=Ap(e),i=Ws(t);r=uS(r,va.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,n,i,i+"."+n)}else{const o=gL(t);if(o&&Jp(o,e.escapedText))r=uS(r,va.Property_0_does_not_exist_on_type_1,Ap(e),Ws(t)),i=Rp(e,va.Did_you_forget_to_use_await);else{const o=Ap(e),a=Ws(t),s=function(e,t){const n=mp(t).symbol;if(!n)return;const r=Sc(n),i=ep().get(r);if(i)for(const[t,n]of i)if(D(n,e))return t}(o,t);if(void 0!==s)r=uS(r,va.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later,o,a,s);else{const s=qA(e,t);if(void 0!==s){const e=Sc(s);r=uS(r,n?va.Property_0_may_not_exist_on_type_1_Did_you_mean_2:va.Property_0_does_not_exist_on_type_1_Did_you_mean_2,o,a,e),i=s.valueDeclaration&&Rp(s.valueDeclaration,va._0_is_declared_here,e)}else{const e=function(e){return A.lib&&!A.lib.includes("dom")&&(n=e=>e.symbol&&/^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(vc(e.symbol.escapedName)),3145728&(t=e).flags?x(t.types,n):n(t))&&ik(e);var t,n}(t)?va.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:va.Property_0_does_not_exist_on_type_1;r=uS(Mp(r,t),e,o,a)}}}}const o=zp(Sd(e),e,r);i&&fT(o,i),So(!n||r.code!==va.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,o)}function zA(e,t){const n=t.symbol&&Jp($l(t.symbol),e);return void 0!==n&&!!n.valueDeclaration&&Jv(n.valueDeclaration)}function $A(e,t){return GA(e,Rd(t),106500)}function qA(e,t){let n=Rd(t);if("string"!=typeof e){const r=e.parent;GE(r)&&(n=F(n,(e=>YA(r,t,e)))),e=bc(e)}return GA(e,n,111551)}function VA(e,t){const n=st(e)?e:bc(e),r=Rd(t);return("for"===n?S(r,(e=>"htmlFor"===Sc(e))):"class"===n?S(r,(e=>"className"===Sc(e))):void 0)??GA(n,r,111551)}function UA(e,t){const n=qA(e,t);return n&&Sc(n)}function WA(e,t,n){return xn.assert(void 0!==t,"outername should always be defined"),Re(e,t,n,void 0,!1,!1)}function HA(e,t){return t.exports&&GA(bc(e),Ka(t),2623475)}function GA(e,t,n){return Ut(e,t,(function(e){const t=Sc(e);if(!an(t,'"')){if(e.flags&n)return t;if(2097152&e.flags){const r=function(e){if(Uo(e).aliasTarget!==yt)return Ea(e)}(e);if(r&&r.flags&n)return t}}}))}function XA(e,t,n){const r=e&&106500&e.flags&&e.valueDeclaration;if(!r)return;const i=Rv(r,2),o=e.valueDeclaration&&Dc(e.valueDeclaration)&&VD(e.valueDeclaration.name);if((i||o)&&(!t||!hx(t)||65536&e.flags)){if(n){const n=mc(t,uu);if(n&&n.symbol===e)return}(1&px(e)?Uo(e).target:e).isReferenced=-1}}function QA(e,t){return 110===e.kind||!!t&&vb(e)&&t===Nw(bb(e))}function YA(e,t,n){return eI(e,211===e.kind&&108===e.expression.kind,!1,t,n)}function ZA(e,t,n,r){if(Ec(r))return!0;const i=Jp(r,n);return!!i&&eI(e,t,!1,r,i)}function eI(e,t,n,r,i){if(Ec(r))return!0;if(i.valueDeclaration&&Zl(i.valueDeclaration)){const t=Zf(i.valueDeclaration);return!Sl(e)&&!!mc(e,(e=>e===t))}return gA(e,t,n,r,i)}function tI(e){const t=e.initializer;if(261===t.kind){const e=t.declarations[0];if(e&&!Eu(e.name))return ns(e)}else if(80===t.kind)return Nw(t)}function nI(e,t,n){const r=0!==Zg(e)||EA(e)?RC(t):t,i=e.argumentExpression,o=KM(i);if(Nc(r)||r===tn)return r;if(fM(r)&&!$_(i))return xo(i,va.A_const_enum_member_can_only_be_accessed_using_a_string_literal),Dt;const a=function(e){const t=lh(e);if(80===t.kind){const r=Nw(t);if(3&r.flags){let t=e,i=e.parent;for(;i;){if(249===i.kind&&t===i.statement&&tI(i)===r&&1===cf(n=qM(i.expression)).length&&_f(n,zt))return!0;t=i,i=i.parent}}}var n;return!1}(i)?zt:o,s=Zg(e);let c;0===s?c=32:(c=4|(pb(r)&&!GT(r)?2:0),2===s&&(c|=32));const l=jb(r,a,c,e)||Dt;return uL(jA(e,Wo(e).resolvedSymbol,l,i,n),e)}function rI(e){return $u(e)||ZE(e)||D_(e)}function iI(e){return rI(e)&&f(e.typeArguments,yR),215===e.kind?KM(e.template):D_(e)?KM(e.attributes):uP(e)?KM(e.left):$u(e)&&f(e.arguments,(e=>{KM(e)})),ti}function oI(e){return iI(e),ni}function aI(e){return!!e&&(230===e.kind||237===e.kind&&e.isSpread)}function uI(e){return T(e,aI)}function dI(e){return!!(16384&e.flags)}function pI(e){return!!(49155&e.flags)}function fI(e,t,n,r=!1){let i,o=!1,a=FO(n),s=AO(n);if(215===e.kind)if(i=t.length,228===e.template.kind){const t=De(e.template.templateSpans);o=Nd(t.literal)||!!t.literal.isUnterminated}else{const t=e.template;xn.assert(15===t.kind),o=!!t.isUnterminated}else if(170===e.kind)i=AI(e,n);else if(226===e.kind)i=1;else if(D_(e)){if(o=e.attributes.end===e.end,o)return!0;i=0===s?t.length:1,a=0===t.length?a:1,s=Math.min(s,1)}else{if(!e.arguments)return xn.assert(214===e.kind),0===AO(n);{i=r?t.length+1:t.length,o=e.arguments.end===e.end;const a=uI(t);if(a>=0)return a>=AO(n)&&(IO(n)||aa)return!1;if(o||i>=s)return!0;for(let t=i;t=r&&t.length<=n}function gI(e,t){let n;return!!(e.target&&(n=EO(e.target,t))&&lb(n))}function hI(e){return vI(e,0,!1)}function yI(e){return vI(e,0,!1)||vI(e,1,!1)}function vI(e,t,n){if(524288&e.flags){const r=Od(e);if(n||0===r.properties.length&&0===r.indexInfos.length){if(0===t&&1===r.callSignatures.length&&0===r.constructSignatures.length)return r.callSignatures[0];if(1===t&&1===r.constructSignatures.length&&0===r.callSignatures.length)return r.constructSignatures[0]}}}function bI(e,t,n,r){const i=UC(e.typeParameters,e,0,r),o=OO(t),a=n&&(o&&262144&o.flags?n.nonFixingMapper:n.mapper);return qC(a?Ux(t,a):t,e,((e,t)=>{xw(i.inferences,e,t)})),n||VC(t,e,((e,t)=>{xw(i.inferences,e,t,128)})),hm(e,Ew(i),Mm(t.declaration))}function xI(e){if(!e)return Zt;const t=KM(e);return Pb(e)?t:kl(e.parent)?QT(t):Sl(e.parent)?_C(t):t}function SI(e,t,n,r,i){if(D_(e))return function(e,t,n,r){const i=vF(t,e),o=wM(e.attributes,i,r,n);return xw(r.inferences,o,i),Ew(r)}(e,t,r,i);if(170!==e.kind&&226!==e.kind){const n=x(t.typeParameters,(e=>!!np(e))),r=dF(e,n?8:0);if(r){const o=Gf(t);if(ZC(o)){const a=yF(e);if(n||dF(e,8)===r){const e=QC(function(e,t=0){return e&&KC(O(e.inferences,XC),e.signature,e.flags|t,e.compareTypes)}(a,1)),t=eS(r,e),n=hI(t),s=n&&n.typeParameters?Om(ym(n,n.typeParameters)):t;xw(i.inferences,s,o,128)}const s=UC(t.typeParameters,t,i.flags),c=eS(r,a&&a.returnMapper);xw(s.inferences,c,o),i.returnMapper=Q(s.inferences,RM)?QC(function(e){const t=F(e.inferences,RM);return t.length?KC(O(t,XC),e.signature,e.flags,e.compareTypes):void 0}(s)):void 0}}}const o=MO(t),a=o?Math.min(FO(t)-1,n.length):n.length;if(o&&262144&o.flags){const e=S(i.inferences,(e=>e.typeParameter===o));e&&(e.impliedArity=T(n,aI,a)<0?n.length-a:void 0)}const s=Kf(t);if(s&&ZC(s)){const t=PI(e);xw(i.inferences,xI(t),s)}for(let e=0;e=n-1){const t=e[n-1];if(aI(t)){const e=237===t.kind?t.type:wM(t.expression,r,i,o);return Hk(e)?kI(e):Ty(fj(33,e,It,230===t.kind?t.expression:t),a)}}const s=[],c=[],l=[];for(let u=t;uuS(void 0,va.Type_0_does_not_satisfy_the_constraint_1):void 0,l=r||va.Type_0_does_not_satisfy_the_constraint_1;s||(s=Fx(o,a));const u=a[e];if(!PS(u,y_(eS(i,s),u),n?t[e]:void 0,l,c))return}}return a}function wI(e){if(JF(e.tagName))return 2;const t=mp(KM(e.tagName));return p(Vp(t,1))?0:p(Vp(t,0))?1:2}function DI(e){return vP(e=lh(e))?lh(e.expression):e}function EI(e,t,n,r,i,o,a,s){const c={errors:void 0,skipLogging:!0};if(D_(e))return function(e,t,n,r,i,o,a){const s=vF(t,e),c=wM(e.attributes,s,void 0,r),l=4&r?AC(c):c;return function(){var t;if(WF(e))return!0;const n=!CN(e)&&!TN(e)||JF(e.tagName)||ON(e.tagName)?void 0:KM(e.tagName);if(!n)return!0;const r=Vp(n,0);if(!p(r))return!0;const o=fB(e);if(!o)return!0;const s=Ma(o,111551,!0,!1,e);if(!s)return!0;const c=Vp($l(s),0);if(!p(c))return!0;let l=!1,u=0;for(const e of c){const t=Vp(DO(e,0),0);if(p(t))for(const e of t){if(l=!0,IO(e))return!0;const t=FO(e);t>u&&(u=t)}}if(!l)return!0;let _=1/0;for(const e of r){const t=AO(e);t<_&&(_=t)}if(_<=u)return!0;if(i){const n=Rp(e.tagName,va.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3,jp(e.tagName),_,jp(o),u),r=null==(t=JR(e.tagName))?void 0:t.valueDeclaration;r&&fT(n,Rp(r,va._0_is_declared_here,jp(e.tagName))),a&&a.skipLogging&&(a.errors||(a.errors=[])).push(n),a.skipLogging||ro.add(n)}return!1}()&&OS(l,s,n,i?e.tagName:void 0,e.attributes,void 0,o,a)}(e,n,r,i,o,a,c)?void 0:(xn.assert(!o||!!c.errors,"jsx should have errors when reporting errors"),c.errors||u);const l=Kf(n);if(l&&l!==Zt&&!(YE(e)||QE(e)&&um(e.expression))){const t=PI(e),n=xI(t),i=o?t||e:void 0,s=va.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1;if(!mk(n,l,r,i,s,a,c))return xn.assert(!o||!!c.errors,"this parameter should have errors when reporting errors"),c.errors||u}const _=va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1,d=MO(n),f=d?Math.min(FO(n)-1,t.length):t.length;for(let e=0;e{n.push(e.expression)})),n}if(170===e.kind)return function(e){const t=e.expression,n=VO(e);if(n){const e=[];for(const r of n.parameters){const n=$l(r);e.push(NI(t,n))}return e}return xn.fail()}(e);if(226===e.kind)return[e.left];if(D_(e))return e.attributes.properties.length>0||CN(e)&&e.parent.children.length>0?[e.attributes]:u;const t=e.arguments||u,n=uI(t);if(n>=0){const e=t.slice(0,n);for(let r=n;r{var o;const a=i.target.elementFlags[r],s=NI(n,4&a?Ty(t):t,!!(12&a),null==(o=i.target.labeledElementDeclarations)?void 0:o[r]);e.push(s)})):e.push(n)}return e}return t}function AI(e,t){return A.experimentalDecorators?function(e,t){switch(e.parent.kind){case 263:case 231:return 1;case 172:return Uv(e.parent)?3:2;case 174:case 177:case 178:return t.parameters.length<=2?2:3;case 169:return 3;default:return xn.fail()}}(e,t):Math.min(Math.max(FO(t),1),2)}function II(e){const t=Sd(e),{start:n,length:r}=Qp(t,GE(e.expression)?e.expression.name:e.expression);return{start:n,length:r,sourceFile:t}}function OI(e,t,...n){if(QE(e)){const{sourceFile:r,start:i,length:o}=II(e);return"message"in t?aS(r,i,o,t,...n):Up(r,t)}return"message"in t?Rp(e,t,...n):zp(Sd(e),e,t)}function MI(e,t,n,r){var i;const o=uI(n);if(o>-1)return Rp(n[o],va.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);let a,s=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;for(const e of t){const t=AO(e),r=FO(e);tl&&(l=t),n.length1&&(T=P(m,ao,h,w)),T||(T=P(m,co,h,w)),T)return T;if(T=function(e,t,n,r,i){return xn.assert(t.length>0),SR(e),r||1===t.length||t.some((e=>!!e.typeParameters))?function(e,t,n,r){const i=function(e,t){let n=-1,r=-1;for(let i=0;i=t)return i;a>r&&(r=a,n=i)}return n}(t,void 0===ye?n.length:ye),o=t[i],{typeParameters:a}=o;if(!a)return o;const s=rI(e)?e.typeArguments:void 0,c=s?vm(o,function(e,t,n){const r=e.map(zR);for(;r.length>t.length;)r.pop();for(;r.lengthe.thisParameter));let n;t.length&&(n=JI(t,t.map(xO)));const{min:r,max:i}=mT(e,BI),o=[];for(let t=0;tJB(e)?tEO(e,t)))))}const a=q(e,(e=>JB(e)?De(e.parameters):void 0));let s=128;if(0!==a.length){const t=Ty(ev(q(e,lm),2));o.push($I(a,t)),s|=1}return e.some(zB)&&(s|=2),x_(e[0].declaration,void 0,n,o,cv(e.map(Gf)),void 0,r,s)}(t)}(e,m,g,!!n,r),Wo(e).resolvedSignature=T,_)if(!o&&l&&(o=va.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method),y)if(1===y.length||y.length>3){const t=y[y.length-1];let n;y.length>3&&(n=uS(n,va.The_last_overload_gave_the_following_error),n=uS(n,va.No_overload_matches_this_call)),o&&(n=uS(n,o));const r=EI(e,g,t,co,0,!0,(()=>n),void 0);if(r)for(const e of r)t.declaration&&y.length>3&&fT(e,Rp(t.declaration,va.The_last_overload_is_declared_here)),E(t,e),ro.add(e);else xn.fail("No error for last overload signature")}else{const t=[];let n=0,r=Number.MAX_VALUE,i=0,a=0;for(const o of y){const s=EI(e,g,o,co,0,!0,(()=>uS(void 0,va.Overload_0_of_1_2_gave_the_following_error,a+1,m.length,Ks(o))),void 0);s?(s.length<=r&&(r=s.length,i=a),n=Math.max(n,s.length),t.push(s)):xn.fail("No error for 3 or fewer overload signatures"),a++}const s=n>1?t[i]:j(t);xn.assert(s.length>0,"No errors reported for 3 or fewer overload signatures");let c=uS(O(s,Kp),va.No_overload_matches_this_call);o&&(c=uS(c,o));const l=[...R(s,(e=>e.relatedInformation))];let u;if(x(s,(e=>e.start===s[0].start&&e.length===s[0].length&&e.file===s[0].file))){const{file:e,start:t,length:n}=s[0];u={file:e,start:t,length:n,code:c.code,category:c.category,messageText:c,relatedInformation:l}}else u=zp(Sd(e),$u(D=e)?GE(D.expression)?D.expression.name:D.expression:ZE(D)?GE(D.tag)?D.tag.name:D.tag:D_(D)?D.tagName:D,c,l);E(y[0],u),ro.add(u)}else if(v)ro.add(MI(e,[v],g,o));else if(k)CI(k,e.typeArguments,!0,o);else{const n=F(t,(e=>mI(e,d)));0===n.length?ro.add(function(e,t,n,r){const i=n.length;if(1===t.length){const o=t[0],a=kf(o.typeParameters),s=p(o.typeParameters);if(r){let t=uS(void 0,va.Expected_0_type_arguments_but_got_1,ai?a=Math.min(a,t):n1?S(s,(e=>uu(e)&&Fd(e.body))):void 0;if(c){const e=Cf(c),n=!e.typeParameters;P([e],co,n)&&fT(t,Rp(c,va.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible))}y=i,v=o,k=a}function P(t,n,r,i=!1){var o,a,s;if(y=void 0,v=void 0,k=void 0,r){const r=t[0];if(Q(d)||!fI(e,g,r,i))return;return EI(e,g,r,n,0,!1,void 0,void 0)?void(y=[r]):r}for(let r=0;re===t))&&(u=(s=u).typeParameters?s.implementationSignatureCache||(s.implementationSignatureCache=function(e){return e.typeParameters?Ux(e,Fx([],[])):e}(s)):s),Q(d)){if(n=CI(u,d,!1),!n){k=u;continue}}else l=UC(u.typeParameters,u,Mm(e)?2:0),n=Dx(SI(e,u,g,8|C,l),l.nonFixingMapper),C|=4&l.flags?8:0;if(c=hm(u,n,Mm(u.declaration),l&&l.inferredTypeParameters),MO(u)&&!fI(e,g,c,i)){v=c;continue}}else c=u;if(!EI(e,g,c,n,C,!1,void 0,l)){if(C){if(C=0,l&&(c=hm(u,Dx(SI(e,u,g,C,l),l.mapper),Mm(u.declaration),l.inferredTypeParameters),MO(u)&&!fI(e,g,c,i))){v=c;continue}if(EI(e,g,c,n,C,!1,void 0,l)){(y||(y=[])).push(c);continue}}return t[r]=c,c}(y||(y=[])).push(c)}}}}function BI(e){const t=e.parameters.length;return JB(e)?t-1:t}function JI(e,t){return $I(e,ev(t,2))}function $I(e,t){return FC(Te(e),t)}function VI(e){return!(!e.typeParameters||!lB(Gf(e)))}function UI(e,t,n,r){return Ec(e)||Ec(t)&&!!(262144&e.flags)||!n&&!r&&!(1048576&t.flags)&&!(131072&Sp(t).flags)&&SS(e,Wn)}function KI(e,t,n){let r=yA(e.expression);if(r===tn)return ii;if(r=mp(r),Nc(r))return oI(e);if(Ec(r))return e.typeArguments&&xo(e,va.Untyped_function_calls_may_not_accept_type_arguments),iI(e);const i=Vp(r,1);if(i.length){if(!function(e,t){if(!t||!t.declaration)return!0;const n=t.declaration,r=Hv(n,6);if(!r||176!==n.kind)return!0;const i=Cx(n.parent.symbol),o=ju(n.parent.symbol);if(!OR(e,i)){const t=Zf(e);if(t&&4&r){const e=zR(t);if(HI(n.parent.symbol,e))return!0}return 2&r&&xo(e,va.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,Ws(o)),4&r&&xo(e,va.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,Ws(o)),!1}return!0}(e,i[0]))return oI(e);if(WI(i,(e=>!!(4&e.flags))))return xo(e,va.Cannot_create_an_instance_of_an_abstract_class),oI(e);const o=r.symbol&&Cx(r.symbol);return o&&Bv(o,64)?(xo(e,va.Cannot_create_an_instance_of_an_abstract_class),oI(e)):RI(e,i,t,n,0)}const o=Vp(r,0);if(o.length){const r=RI(e,o,t,n,0);return Y||(r.declaration&&!rO(r.declaration)&&Gf(r)!==Zt&&xo(e,va.Only_a_void_function_can_be_called_with_the_new_keyword),Kf(r)===Zt&&xo(e,va.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),r}return XI(e.expression,r,1),oI(e)}function WI(e,t){return ot(e)?Q(e,(e=>WI(e,t))):1048576===e.compositeKind?Q(e.compositeSignatures,t):t(e)}function HI(e,t){const n=ku(t);if(!p(n))return!1;const r=n[0];if(2097152&r.flags){const t=W_(r.types);let n=0;for(const i of r.types){if(!t[n]&&3&wx(i)){if(i.symbol===e)return!0;if(HI(e,i))return!0}n++}return!1}return r.symbol===e||HI(e,r)}function GI(e,t,n){let r;const i=0===n,o=SL(t),a=o&&Vp(o,n).length>0;if(1048576&t.flags){const e=t.types;let o=!1;for(const a of e)if(0!==Vp(a,n).length){if(o=!0,r)break}else if(r||(r=uS(r,i?va.Type_0_has_no_call_signatures:va.Type_0_has_no_construct_signatures,Ws(a)),r=uS(r,i?va.Not_all_constituents_of_type_0_are_callable:va.Not_all_constituents_of_type_0_are_constructable,Ws(t))),o)break;o||(r=uS(void 0,i?va.No_constituent_of_type_0_is_callable:va.No_constituent_of_type_0_is_constructable,Ws(t))),r||(r=uS(r,i?va.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:va.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,Ws(t)))}else r=uS(r,i?va.Type_0_has_no_call_signatures:va.Type_0_has_no_construct_signatures,Ws(t));let s=i?va.This_expression_is_not_callable:va.This_expression_is_not_constructable;if(QE(e.parent)&&0===e.parent.arguments.length){const{resolvedSymbol:t}=Wo(e);t&&32768&t.flags&&(s=va.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without)}return{messageChain:uS(r,s),relatedMessage:a?va.Did_you_forget_to_use_await:void 0}}function XI(e,t,n,r){const{messageChain:i,relatedMessage:o}=GI(e,t,n),a=zp(Sd(e),e,i);if(o&&fT(a,Rp(e,o)),QE(e.parent)){const{start:t,length:n}=II(e.parent);a.start=t,a.length=n}ro.add(a),YI(t,n,r?fT(a,r):a)}function YI(e,t,n){if(!e.symbol)return;const r=Uo(e.symbol).originatingImport;if(r&&!uf(r)){const i=Vp($l(Uo(e.symbol).target),t);if(!i||!i.length)return;fT(n,Rp(r,va.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}function ZI(e,t){const n=HF(e),r=n&&Ga(n),i=r&&Ho(r,hB.Element,788968),o=i&&se.symbolToEntityName(i,788968,e),a=YC.createFunctionTypeNode(void 0,[YC.createParameterDeclaration(void 0,void 0,"props",void 0,se.typeToTypeNode(t,e))],o?YC.createTypeReferenceNode(o,void 0):YC.createKeywordTypeNode(133)),s=No(1,"props");return s.links.type=t,x_(a,void 0,void 0,[s],i?ju(i):Dt,void 0,1,0)}function eO(e,t,n){if(JF(e.tagName)){const t=ZF(e),n=ZI(e,t);return IS(wM(e.attributes,vF(n,e),void 0,0),t,e.tagName,e.attributes),p(e.typeArguments)&&(f(e.typeArguments,yR),ro.add(Bp(Sd(e),e.typeArguments,va.Expected_0_type_arguments_but_got_1,0,p(e.typeArguments)))),n}const r=KM(e.tagName),i=mp(r);if(Nc(i))return oI(e);const o=QF(r,e);return UI(r,i,o.length,0)?iI(e):0===o.length?(xo(e.tagName,va.JSX_element_type_0_does_not_have_any_construct_or_call_signatures,Gd(e.tagName)),oI(e)):RI(e,o,t,n,0)}function tO(e,t,n){switch(e.kind){case 213:return function(e,t,n){if(108===e.expression.kind){const r=tN(e.expression);if(Ec(r)){for(const t of e.arguments)KM(t);return ti}if(!Nc(r)){const i=Sh(Zf(e));if(i)return RI(e,bu(r,i.typeArguments,i),t,n,0)}return iI(e)}let r,i=KM(e.expression);if(xl(e)){const t=vC(i,e.expression);r=t===i?0:Cl(e)?16:8,i=t}else r=0;if(i=kA(i,e.expression,SA),i===tn)return ii;const o=mp(i);if(Nc(o))return oI(e);const a=Vp(o,0),s=Vp(o,1).length;if(UI(i,o,a.length,s))return!Nc(i)&&e.typeArguments&&xo(e,va.Untyped_function_calls_may_not_accept_type_arguments),iI(e);if(!a.length){if(s)xo(e,va.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Ws(i));else{let t;if(1===e.arguments.length){const n=Sd(e).text;Za(n.charCodeAt(as(n,e.expression.end,!0)-1))&&(t=Rp(e.expression,va.Are_you_missing_a_semicolon))}XI(e.expression,o,0,t)}return oI(e)}return 8&n&&!e.typeArguments&&a.some(VI)?(jM(e,n),ri):a.some((e=>Mm(e.declaration)&&!!$c(e.declaration)))?(xo(e,va.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Ws(i)),oI(e)):RI(e,a,t,n,r)}(e,t,n);case 214:return KI(e,t,n);case 215:return function(e,t,n){const r=KM(e.tag),i=mp(r);if(Nc(i))return oI(e);const o=Vp(i,0),a=Vp(i,1).length;if(UI(r,i,o.length,a))return iI(e);if(!o.length){if(WE(e.parent)){const t=Rp(e.tag,va.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked);return ro.add(t),oI(e)}return XI(e.tag,i,0),oI(e)}return RI(e,o,t,n,0)}(e,t,n);case 170:return function(e,t,n){const r=KM(e.expression),i=mp(r);if(Nc(i))return oI(e);const o=Vp(i,0),a=Vp(i,1).length;if(UI(r,i,o.length,a))return iI(e);if(s=e,(c=o).length&&x(c,(e=>0===e.minArgumentCount&&!JB(e)&&e.parameters.length!!e.typeParameters&&mI(e,n))),(e=>{const t=CI(e,n,!0);return t?hm(e,t,Mm(e.declaration)):e}))}}function yO(e,t,n){const r=KM(e,n),i=Sx(t);return Nc(i)?i:(IS(r,i,mc(t.parent,(e=>238===e.kind||350===e.kind)),e,va.Type_0_does_not_satisfy_the_expected_type_1),r)}function vO(e){switch(e.keywordToken){case 102:return ey();case 105:const t=bO(e);return Nc(t)?Dt:function(e){const t=No(0,"NewTargetExpression"),n=No(4,"target",8);n.parent=t,n.links.type=e;const r=ed([n]);return t.members=r,ks(t,r,u,u,u)}(t);default:xn.assertNever(e.keywordToken)}}function bO(e){const t=am(e);return t?176===t.kind?$l(ns(t.parent)):$l(ns(t)):(xo(e,va.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,"new.target"),Dt)}function xO(e){const t=e.valueDeclaration;return Hc($l(e),!1,!!t&&(L_(t)||iC(t)))}function SO(e,t,n="arg"){return e?(xn.assert(qD(e.name)),e.name.escapedText):`${n}_${t}`}function kO(e,t,n){const r=e.parameters.length-(JB(e)?1:0);if(t=r-1)return t===r-1?o:Ty(Mb(o,zt));const a=[],s=[],c=[];for(let n=t;n!(1&e))),i=r<0?n.target.fixedLength:r;i>0&&(t=e.parameters.length-1+i)}}if(void 0===t){if(!n&&32&e.flags)return 0;t=e.minArgumentCount}if(r)return t;for(let n=t-1;n>=0&&!(131072&SD(DO(e,n),dI).flags);n--)t=n;e.resolvedMinArgumentCount=t}return e.resolvedMinArgumentCount}function IO(e){if(JB(e)){const t=$l(e.parameters[e.parameters.length-1]);return!PT(t)||t.target.hasRestElement}return!1}function OO(e){if(JB(e)){const t=$l(e.parameters[e.parameters.length-1]);if(!PT(t))return Ec(t)?rr:t;if(t.target.hasRestElement)return Ly(t,t.target.fixedLength)}}function MO(e){const t=OO(e);return!t||qk(t)||Ec(t)?void 0:t}function LO(e){return jO(e,en)}function jO(e,t){return e.parameters.length>0?DO(e,0):t}function RO(e,t,n){const r=e.parameters.length-(JB(e)?1:0);for(let i=0;i=0);const i=fE(e.parent)?$l(ns(e.parent.parent)):VR(e.parent),o=fE(e.parent)?It:UR(e.parent),a=ux(r),s=Oo("target",i),c=Oo("propertyKey",o),l=Oo("parameterIndex",a);n.decoratorSignature=CL(void 0,void 0,[s,c,l],Zt);break}case 174:case 177:case 178:case 172:{const e=t;if(!gu(e.parent))break;const r=Oo("target",VR(e)),i=Oo("propertyKey",UR(e)),o=uE(e)?Zt:Sy(zR(e));if(!uE(t)||Uv(t)){const t=Oo("descriptor",Sy(zR(e)));n.decoratorSignature=CL(void 0,void 0,[r,i,t],ev([o,Zt]))}else n.decoratorSignature=CL(void 0,void 0,[r,i],ev([o,Zt]));break}}return n.decoratorSignature===ti?void 0:n.decoratorSignature}(e):qO(e)}function UO(e){const t=_y(!0);return t!==An?Tg(t,[e=kL(bL(e))||At]):At}function KO(e){const t=dy(!0);return t!==An?Tg(t,[e=kL(bL(e))||At]):At}function WO(e,t){const n=UO(t);return n===At?(xo(e,uf(e)?va.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:va.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option),Dt):(py(!0)||xo(e,uf(e)?va.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:va.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option),n)}function HO(e,t){if(!e.body)return Dt;const n=Jh(e),r=0!=(2&n),i=0!=(1&n);let o,a,s,c=Zt;if(241!==e.body.kind)o=DM(e.body,t&&-9&t),r&&(o=bL(hL(o,!1,e,va.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)));else if(i){const n=eM(e,t);n?n.length>0&&(o=ev(n,2)):c=en;const{yieldTypes:r,nextTypes:i}=function(e,t){const n=[],r=[],i=0!=(2&Jh(e));return Nf(e.body,(e=>{const o=e.expression?KM(e.expression,t):Ot;let a;if(fe(n,XO(e,o,St,i)),e.asteriskToken){const t=xj(o,i?19:17,e.expression);a=t&&t.nextType}else a=dF(e,void 0);a&&fe(r,a)})),{yieldTypes:n,nextTypes:r}}(e,t);a=Q(r)?ev(r,2):void 0,s=Q(i)?cv(i):void 0}else{const r=eM(e,t);if(!r)return 2&n?WO(e,en):en;if(0===r.length){const t=wN(e,void 0),r=t&&32768&(Bj(t,n)||Zt).flags?It:Zt;return 2&n?WO(e,r):r}o=ev(r,2)}if(o||a||s){if(a&&$C(e,a,3),o&&$C(e,o,1),s&&$C(e,s,2),o&&iT(o)||a&&iT(a)||s&&iT(s)){const t=TF(e),n=t?t===Cf(e)?i?void 0:o:lF(Gf(t),e,void 0):void 0;i?(a=kT(a,n,0,r),o=kT(o,n,1,r),s=kT(s,n,2,r)):o=function(e,t,n){return e&&iT(e)&&(e=bT(e,t?n?gL(t):t:void 0)),e}(o,n,r)}a&&(a=RC(a)),o&&(o=RC(o)),s&&(s=RC(s))}return i?GO(a||en,o||c,s||xN(2,e)||At,r):r?UO(o||c):o||c}function GO(e,t,n,r){const i=r?_i:di,o=i.getGlobalGeneratorType(!1);if(e=i.resolveIterationType(e,void 0)||At,t=i.resolveIterationType(t,void 0)||At,n=i.resolveIterationType(n,void 0)||At,o===An){const r=i.getGlobalIterableIteratorType(!1),o=r!==An?Cj(r,i):void 0,a=o?o.returnType:St,s=o?o.nextType:It;return SS(t,a)&&SS(s,n)?r!==An?xy(r,[e]):(i.getGlobalIterableIteratorType(!0),wn):(i.getGlobalGeneratorType(!0),wn)}return xy(o,[e,t,n])}function XO(e,t,n,r){const i=e.expression||e,o=e.asteriskToken?fj(r?19:17,t,n,i):t;return r?SL(o,i,e.asteriskToken?va.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:va.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):o}function QO(e,t,n){let r=0;for(let i=0;i=t?n[i]:void 0;r|=void 0!==o?wB.get(o)||32768:0}return r}function YO(e){const t=Wo(e);if(void 0===t.isExhaustive){t.isExhaustive=0;const n=function(e){if(221===e.expression.kind){const t=hD(e);if(!t)return!1;const n=Hd(DM(e.expression.expression)),r=QO(0,0,t);return 3&n.flags?556800==(556800&r):!bD(n,(e=>Xw(e,r)===r))}const t=DM(e.expression);if(!sT(t))return!1;const n=gD(e);return!(!n.length||Q(n,rT))&&(r=DD(t,sx),i=n,1048576&r.flags?!f(r.types,(e=>!D(i,e))):D(i,r));var r,i}(e);0===t.isExhaustive&&(t.isExhaustive=n)}else 0===t.isExhaustive&&(t.isExhaustive=!1);return t.isExhaustive}function ZO(e){return e.endFlowNode&&UD(e.endFlowNode)}function eM(e,t){const n=Jh(e),r=[];let i=ZO(e),o=!1;if(Pf(e.body,(a=>{let s=a.expression;if(s){if(s=lh(s,!0),2&n&&223===s.kind&&(s=lh(s.expression,!0)),213===s.kind&&80===s.expression.kind&&DM(s.expression).symbol===ts(e.symbol)&&(!UT(e.symbol.valueDeclaration)||GD(s.expression)))return void(o=!0);let i=DM(s,t&&-9&t);2&n&&(i=bL(hL(i,!1,e,va.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member))),131072&i.flags&&(o=!0),fe(r,i)}else i=!0})),0!==r.length||i||!o&&!function(e){switch(e.kind){case 218:case 219:return!0;case 174:return 210===e.parent.kind;default:return!1}}(e))return!(U&&r.length&&i)||rO(e)&&r.some((t=>t.symbol===e.symbol))||fe(r,It),r}function tM(e,t){a((function(){const n=Jh(e),r=t&&Bj(t,n);if(r&&(_M(r,16384)||32769&r.flags))return;if(173===e.kind||Nd(e.body)||241!==e.body.kind||!ZO(e))return;const i=1024&e.flags,o=Cv(e)||e;if(r&&131072&r.flags)xo(o,va.A_function_returning_never_cannot_have_a_reachable_end_point);else if(r&&!i)xo(o,va.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value);else if(r&&U&&!SS(It,r))xo(o,va.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(A.noImplicitReturns){if(!r){if(!i)return;const t=Gf(Cf(e));if(Jj(e,t))return}xo(o,va.Not_all_code_paths_return_a_value)}}))}function nM(e,t){if(xn.assert(174!==e.kind||$f(e)),SR(e),nP(e)&&tj(e,e.name),t&&4&t&&lS(e)){if(!Cv(e)&&!$T(e)){const n=DF(e);if(n&&ZC(Gf(n))){const n=Wo(e);if(n.contextFreeType)return n.contextFreeType;const r=HO(e,t),i=x_(void 0,void 0,void 0,u,r,void 0,0,64),o=ks(e.symbol,w,[i],u,u);return o.objectFlags|=262144,n.contextFreeType=o}}return In}return UB(e)||218!==e.kind||XB(e),function(e,t){const n=Wo(e);if(!(64&n.flags)){const r=DF(e);if(!(64&n.flags)){n.flags|=64;const i=Se(Vp($l(ns(e)),0));if(!i)return;if(lS(e))if(r){const n=yF(e);let o;if(t&&2&t){RO(i,r,n);const e=OO(r);e&&262144&e.flags&&(o=Ux(r,n.nonFixingMapper))}o||(o=n?Ux(r,n.mapper):r),function(e,t){if(t.typeParameters){if(e.typeParameters)return;e.typeParameters=t.typeParameters}if(t.thisParameter){const n=e.thisParameter;(!n||n.valueDeclaration&&!n.valueDeclaration.type)&&(n||(e.thisParameter=FC(t.thisParameter,void 0)),BO(e.thisParameter,$l(t.thisParameter)))}const n=e.parameters.length-(JB(e)?1:0);for(let r=0;re.parameters.length){const n=yF(e);t&&2&t&&RO(i,r,n)}if(r&&!Xf(e)&&!i.resolvedReturnType){const n=HO(e,t);i.resolvedReturnType||(i.resolvedReturnType=n)}XM(e)}}}(e,t),$l(ns(e))}function rM(e,t,n,r=!1){if(!SS(t,mn)){const i=r&&mL(t);return To(e,!!i&&SS(i,mn),n),!1}return!0}function iM(e){if(!QE(e))return!1;if(!sg(e))return!1;const t=DM(e.arguments[2]);if(Tc(t,"value")){const e=Jp(t,"writable"),n=e&&$l(e);if(!n||n===qt||n===Vt)return!0;if(e&&e.valueDeclaration&&BN(e.valueDeclaration)){const t=KM(e.valueDeclaration.initializer);if(t===qt||t===Vt)return!0}return!1}return!Jp(t,"set")}function oM(e){return!!(8&px(e)||4&e.flags&&8&fx(e)||3&e.flags&&6&cA(e)||98304&e.flags&&!(65536&e.flags)||8&e.flags||Q(e.declarations,iM))}function aM(e,t,n){var r,i;if(0===n)return!1;if(oM(t)){if(4&t.flags&&Ox(e)&&110===e.expression.kind){const n=Qf(e);if(!n||176!==n.kind&&!rO(n))return!0;if(t.valueDeclaration){const e=uP(t.valueDeclaration),o=n.parent===t.valueDeclaration.parent,a=n===t.valueDeclaration.parent,s=e&&(null==(r=t.parent)?void 0:r.valueDeclaration)===n.parent,c=e&&(null==(i=t.parent)?void 0:i.valueDeclaration)===n;return!(o||a||s||c)}}return!0}if(Ox(e)){const t=lh(e.expression);if(80===t.kind){const e=Wo(t).resolvedSymbol;if(2097152&e.flags){const t=sa(e);return!!t&&274===t.kind}}}return!1}function sM(e,t,n){const r=fA(e,7);return 80===r.kind||Ox(r)?!(64&r.flags&&(xo(e,n),1)):(xo(e,t),!1)}function cM(e){let t=!1;const n=tm(e);if(n&&pE(n))xo(e,sP(e)?va.await_expression_cannot_be_used_inside_a_class_static_block:va.await_using_statements_cannot_be_used_inside_a_class_static_block),t=!0;else if(!(65536&e.flags))if(om(e)){const n=Sd(e);if(!uJ(n)){let r;if(!hp(n,A)){r??(r=Gp(n,e.pos));const i=sP(e)?va.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:va.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module,o=aS(n,r.start,r.length,i);ro.add(o),t=!0}switch(B){case 100:case 199:if(1===n.impliedNodeFormat){r??(r=Gp(n,e.pos)),ro.add(aS(n,r.start,r.length,va.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)),t=!0;break}case 7:case 99:case 200:case 4:if(M>=4)break;default:r??(r=Gp(n,e.pos));const i=sP(e)?va.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:va.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;ro.add(aS(n,r.start,r.length,i)),t=!0}}}else{const r=Sd(e);if(!uJ(r)){const i=Gp(r,e.pos),o=sP(e)?va.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:va.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules,a=aS(r,i.start,i.length,o);n&&176!==n.kind&&0==(2&Jh(n))&&fT(a,Rp(n,va.Did_you_mean_to_mark_this_function_as_async)),ro.add(a),t=!0}}return sP(e)&&bN(e)&&(xo(e,va.await_expressions_cannot_be_used_in_a_parameter_initializer),t=!0),t}function lM(e){return _M(e,2112)?dM(e,3)||_M(e,296)?mn:$t:zt}function uM(e,t){if(_M(e,t))return!0;const n=Hd(e);return!!n&&_M(n,t)}function _M(e,t){if(e.flags&t)return!0;if(3145728&e.flags){const n=e.types;for(const e of n)if(_M(e,t))return!0}return!1}function dM(e,t,n){return!!(e.flags&t)||!(n&&114691&e.flags)&&(!!(296&t)&&SS(e,zt)||!!(2112&t)&&SS(e,$t)||!!(402653316&t)&&SS(e,Jt)||!!(528&t)&&SS(e,Xt)||!!(16384&t)&&SS(e,Zt)||!!(131072&t)&&SS(e,en)||!!(65536&t)&&SS(e,Rt)||!!(32768&t)&&SS(e,It)||!!(4096&t)&&SS(e,Qt)||!!(67108864&t)&&SS(e,cn))}function pM(e,t,n){return 1048576&e.flags?x(e.types,(e=>pM(e,t,n))):dM(e,t,n)}function fM(e){return!!(16&wx(e))&&!!e.symbol&&mM(e.symbol)}function mM(e){return 0!=(128&e.flags)}function gM(e){const t=Dj("hasInstance");if(pM(e,67108864)){const n=Jp(e,t);if(n){const e=$l(n);if(e&&0!==Vp(e,0).length)return e}}}function hM(e,t,n,r,i=!1){const o=e.properties,a=o[n];if(303===a.kind||304===a.kind){const e=a.name,n=Tv(e);if(mC(n)){const e=Jp(t,gC(n));e&&(XA(e,a,i),pA(a,!1,!0,t,e))}const r=Rc(a,Mb(t,n,32,e));return vM(304===a.kind?a:a.initializer,r)}if(305===a.kind){if(!(nLy(e,n))):Ty(r),i);xo(o.operatorToken,va.A_rest_element_cannot_have_an_initializer)}}}function vM(e,t,n,r){let i;if(304===e.kind){const r=e;r.objectAssignmentInitializer&&(U&&!Qw(KM(r.objectAssignmentInitializer),16777216)&&(t=Zw(t,524288)),function(e,t,n,r,i){const o=t.kind;if(64===o&&(210===e.kind||209===e.kind))return vM(e,KM(n,r),r,110===n.kind);let a;a=ub(o)?_j(e,r):KM(e,r);SM(e,t,n,a,KM(n,r),r,void 0)}(r.name,r.equalsToken,r.objectAssignmentInitializer,n)),i=e.name}else i=e;return 226===i.kind&&64===i.operatorToken.kind&&(oe(i,n),i=i.left,U&&(t=Zw(t,524288))),210===i.kind?function(e,t,n){const r=e.properties;if(U&&0===r.length)return TA(t,e);for(let i=0;idM(t,e)&&dM(n,e))),St}return 65===c&&p(h),h;case 30:case 32:case 33:case 34:return d(c)&&(r=_T(TA(r,e)),i=_T(TA(i,n)),f(((e,t)=>{if(Ec(e)||Ec(t))return!0;const n=SS(e,mn),r=SS(t,mn);return n&&r||!n&&!r&&CS(e,t)}))),Xt;case 35:case 36:case 37:case 38:if(!(o&&64&o)){if((Jl(e)||Jl(n))&&(!Mm(e)||37===c||38===c)){const e=35===c||37===c;xo(s,va.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value,e?"false":"true")}!function(e,t,n,r){const i=g(lh(n)),o=g(lh(r));if(i||o){const a=xo(e,va.This_condition_will_always_return_0,Ra(37===t||35===t?97:112));if(i&&o)return;const s=38===t||36===t?Ra(54):"",c=i?r:n,l=lh(c);fT(a,Rp(c,va.Did_you_mean_0,`${s}Number.isNaN(${vb(l)?jp(l):"..."})`))}}(s,c,e,n),f(((e,t)=>xM(e,t)||xM(t,e)))}return Xt;case 104:return function(e,t,n,r,i){if(n===tn||r===tn)return tn;!Ec(n)&&pM(n,402784252)&&xo(e,va.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),xn.assert(Eb(e.parent));const o=nO(e.parent,void 0,i);return o===ri?tn:(PS(Gf(o),Xt,t,va.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression),Xt)}(e,n,r,i,o);case 103:return function(e,t,n,r){return n===tn||r===tn?tn:(VD(e)?((M<9||M<99||!z)&&xB(e,2097152),!Wo(e).resolvedSymbol&&Zf(e)&&JA(e,r,OA(e,r.symbol,!0))):PS(TA(n,e),pn,e),PS(TA(r,t),cn,t)&&bD(r,(e=>e===Nn||!!(2097152&e.flags)&&ok(Hd(e))))&&xo(t,va.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator,Ws(r)),Xt)}(e,n,r,i);case 56:case 77:{const e=Qw(r,4194304)?ev([(u=U?r:cT(i),DD(u,zT)),i]):r;return 77===c&&p(i),e}case 57:case 76:{const e=Qw(r,8388608)?ev([QT(JT(r)),i],2):r;return 76===c&&p(i),e}case 61:case 78:{const e=Qw(r,262144)?ev([QT(r),i],2):r;return 78===c&&p(i),e}case 64:const y=uP(e.parent)?ag(e.parent):0;return function(e,t){if(2===e)for(const e of Md(t)){const t=$l(e);if(t.symbol&&32&t.symbol.flags){const t=e.escapedName,n=je(e.valueDeclaration,t,788968,void 0,!1);(null==n?void 0:n.declarations)&&n.declarations.some(wF)&&(zo(n,va.Duplicate_identifier_0,vc(t),e),zo(e,va.Duplicate_identifier_0,vc(t),n))}}}(y,i),function(t){var r;switch(t){case 2:return!0;case 1:case 5:case 6:case 3:case 4:const t=rs(e),i=Qm(n);return!!i&&HE(i)&&!!(null==(r=null==t?void 0:t.exports)?void 0:r.size);default:return!1}}(y)?(524288&i.flags&&(2===y||6===y||ik(i)||Gw(i)||1&wx(i))||p(i),r):(p(i),i);case 28:if(!A.allowUnreachableCode&&bM(e)&&!(217===(l=e.parent).parent.kind&&TD(l.left)&&"0"===l.left.text&&(QE(l.parent.parent)&&l.parent.parent.expression===l.parent||215===l.parent.parent.kind)&&(Ox(l.right)||qD(l.right)&&"eval"===l.right.escapedText))){const t=Sd(e),n=as(t.text,e.pos);t.parseDiagnostics.some((e=>e.code===va.JSX_expressions_must_have_one_parent_element.code&&Bs(e,n)))||xo(e,va.Left_side_of_comma_operator_is_unused_and_has_no_side_effects)}return i;default:return xn.fail()}var l,u;function _(e,t){return dM(e,2112)&&dM(t,2112)}function d(t){const o=uM(r,12288)?e:uM(i,12288)?n:void 0;return!o||(xo(o,va.The_0_operator_cannot_be_applied_to_type_symbol,Ra(t)),!1)}function p(i){db(c)&&a((function(){let o=r;if(LJ(t.kind)&&211===e.kind&&(o=wA(e,void 0,!0)),sM(e,va.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,va.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)){let t;if(ie&&GE(e)&&_M(i,32768)){const n=Tc(qM(e.expression),e.name.escapedText);yk(i,n)&&(t=va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target)}IS(i,o,e,n,t)}}))}function f(e){return!e(r,i)&&(m(e),!0)}function m(e){let n=!1;const o=s||t;if(e){const t=kL(r),o=kL(i);n=!(t===r&&o===i)&&!(!t||!o)&&e(t,o)}let a=r,c=i;!n&&e&&([a,c]=function(e,t,n){let r=e,i=t;const o=cT(e),a=cT(t);return n(o,a)||(r=o,i=a),[r,i]}(r,i,e));const[l,u]=Hs(a,c);(function(e,n,r,i){switch(t.kind){case 37:case 35:case 38:case 36:return To(e,n,va.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap,r,i);default:return}})(o,n,l,u)||To(o,n,va.Operator_0_cannot_be_applied_to_types_1_and_2,Ra(t.kind),l,u)}function g(e){if(qD(e)&&"NaN"===e.escapedText){const t=Br||(Br=Rh("NaN",!1));return!!t&&t===Nw(e)}return!1}}function kM(e){const t=e.parent;return tP(t)&&kM(t)||XE(t)&&t.argumentExpression===e}function TM(e){const t=[e.head.text],n=[];for(const r of e.templateSpans){const e=KM(r.expression);uM(e,12288)&&xo(r.expression,va.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String),t.push(r.literal.text),n.push(SS(e,hn)?e:Jt)}const r=215!==e.parent.kind&&_e(e).value;return r?ax(lx(r)):AM(e)||kM(e)||bD(dF(e,void 0)||At,CM)?Ov(t,n):Jt}function CM(e){return!!(134217856&e.flags||58982400&e.flags&&_M(Wd(e)||At,402653316))}function wM(e,t,n,r){const i=function(e){return FN(e)&&!TN(e.parent)?e.parent.parent:e}(e);fF(i,t,!1),function(e,t){Ti[Di]=e,wi[Di]=t,Di++}(i,n);const o=KM(e,1|r|(n?2:0));n&&n.intraExpressionInferenceSites&&(n.intraExpressionInferenceSites=void 0);const a=_M(o,2944)&&FM(o,lF(t,e,void 0))?sx(o):o;return Di--,mF(),a}function DM(e,t){if(t)return KM(e,t);const n=Wo(e);if(!n.resolvedType){const r=mi,i=Qr;mi=gi,Qr=void 0,n.resolvedType=KM(e,t),Qr=i,mi=r}return n.resolvedType}function EM(e){return 216===(e=lh(e,!0)).kind||234===e.kind||_A(e)}function PM(e,t,n){const r=Gm(e);if(Mm(e)){const n=cC(e);if(n)return yO(r,n,t)}const i=VM(r)||(n?wM(r,n,void 0,t||0):DM(r,t));return sE(e)&&207===e.name.kind&&PT(i)&&!i.target.hasRestElement&&Og(i)FM(e,t)));if(58982400&t.flags){const n=Wd(t)||At;return _M(n,4)&&_M(e,128)||_M(n,8)&&_M(e,256)||_M(n,64)&&_M(e,2048)||_M(n,4096)&&_M(e,8192)||FM(e,n)}return!!(406847616&t.flags&&_M(e,128)||256&t.flags&&_M(e,256)||2048&t.flags&&_M(e,2048)||512&t.flags&&_M(e,512)||8192&t.flags&&_M(e,8192))}return!1}function AM(e){const t=e.parent;return Qu(t)&&Dl(t.type)||_A(t)&&Dl(dA(t))||pO(e)&&zd(dF(e,0))||(tP(t)||WE(t)||fP(t))&&AM(t)||(BN(t)||JN(t)||CP(t))&&AM(t.parent)}function IM(e,t,n){const r=KM(e,t,n);return AM(e)||Lf(e)?sx(r):EM(e)?r:bT(r,lF(dF(e,void 0),e,void 0))}function OM(e,t){return 167===e.name.kind&&IF(e.name),IM(e.initializer,t)}function MM(e,t){return rJ(e),167===e.name.kind&&IF(e.name),LM(e,nM(e,t),t)}function LM(e,t,n){if(n&&10&n){const r=vI(t,0,!0),i=vI(t,1,!0),o=r||i;if(o&&o.typeParameters){const t=oF(e,2);if(t){const i=vI(QT(t),r?0:1,!1);if(i&&!i.typeParameters){if(8&n)return jM(e,n),In;const t=yF(e),r=t.signature&&Gf(t.signature),a=r&&yI(r);if(a&&!a.typeParameters&&!x(t.inferences,RM)){const e=function(e,t){const n=[];let r,i;for(const o of t){const t=o.symbol.escapedName;if(JM(e.inferredTypeParameters,t)||JM(n,t)){const a=ys(No(262144,zM(Z(e.inferredTypeParameters,n),t)));a.target=o,r=ue(r,o),i=ue(i,a),n.push(a)}else n.push(o)}if(i){const e=Fx(r,i);for(const t of i)t.mapper=e}return n}(t,o.typeParameters),n=ym(o,e),r=O(t.inferences,(e=>GC(e.typeParameter)));if(qC(n,i,((e,t)=>{xw(r,e,t,0,!0)})),Q(r,RM)&&(VC(n,i,((e,t)=>{xw(r,e,t)})),!function(e,t){for(let n=0;ne&&O(e.inferences,(e=>e.typeParameter)))).slice())}}}}return t}function jM(e,t){2&t&&(yF(e).flags|=4)}function RM(e){return!(!e.candidates&&!e.contraCandidates)}function BM(e){return!!(e.candidates||e.contraCandidates||rp(e.typeParameter))}function JM(e,t){return Q(e,(e=>e.symbol.escapedName===t))}function zM(e,t){let n=t.length;for(;n>1&&t.charCodeAt(n-1)>=48&&t.charCodeAt(n-1)<=57;)n--;const r=t.slice(0,n);for(let t=1;;t++){const n=r+t;if(!JM(e,n))return n}}function $M(e){const t=hI(e);if(t&&!t.typeParameters)return Gf(t)}function qM(e){const t=VM(e);if(t)return t;if(268435456&e.flags&&Qr){const t=Qr[IB(e)];if(t)return t}const n=vi,r=KM(e,64);return vi!==n&&((Qr||(Qr=[]))[IB(e)]=r,IT(e,268435456|e.flags)),r}function VM(e){let t=lh(e,!0);if(_A(t)){const e=dA(t);if(!Dl(e))return Sx(e)}if(t=lh(e),sP(t)){const e=VM(t.expression);return e?SL(e):void 0}return!QE(t)||108===t.expression.kind||Jm(t,!0)||cO(t)?Qu(t)&&!Dl(t.type)?Sx(t.type):Bl(e)||_u(e)?KM(e):void 0:xl(t)?function(e){const t=KM(e.expression),n=vC(t,e.expression),r=$M(t);return r&&pC(r,e,n!==t)}(t):$M(yA(t.expression))}function UM(e){const t=Wo(e);if(t.contextFreeType)return t.contextFreeType;fF(e,St,!1);const n=t.contextFreeType=KM(e,4);return mF(),n}function KM(i,o,s){var c,l;null==(c=or)||c.push(or.Phase.Check,"checkExpression",{kind:i.kind,pos:i.pos,end:i.end,path:i.tracingPath});const _=r;r=i,h=0;const d=function(e,r,i){const o=e.kind;if(t)switch(o){case 231:case 218:case 219:t.throwIfCancellationRequested()}switch(o){case 80:return jP(e,r);case 81:return function(e){!function(e){if(!Zf(e))return pJ(e,va.Private_identifiers_are_not_allowed_outside_class_bodies);if(!MP(e.parent)){if(!Tm(e))return pJ(e,va.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);const t=uP(e.parent)&&103===e.parent.operatorToken.kind;NA(e)||t||pJ(e,va.Cannot_find_name_0,bc(e))}}(e);const t=NA(e);return t&&XA(t,void 0,!1),St}(e);case 110:return VP(e);case 108:return tN(e);case 106:return Bt;case 15:case 11:return uw(e)?Ct:ax(lx(e.text));case 9:return gJ(e),ax(ux(+e.text));case 10:return function(e){if(!(JE(e.parent)||cP(e.parent)&&JE(e.parent.parent))&&M<7&&pJ(e,va.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020));}(e),ax(_x({negative:!1,base10Value:xT(e.text)}));case 112:return Kt;case 97:return qt;case 228:return TM(e);case 14:return function(e){const t=Wo(e);return 1&t.flags||(t.flags|=1,a((()=>function(e){const t=Sd(e);if(!uJ(t)&&!e.isUnterminated){let r;n??(n=Cs(99,!0)),n.setScriptTarget(t.languageVersion),n.setLanguageVariant(t.languageVariant),n.setOnError(((e,i,o)=>{const a=n.getTokenEnd();if(3===e.category&&r&&a===r.start&&i===r.length){const n=nS(t.fileName,t.text,a,i,e,o);fT(r,n)}else r&&a===r.start||(r=aS(t,a,i,e,o),ro.add(r))})),n.setText(t.text,e.pos,e.end-e.pos);try{return n.scan(),xn.assert(14===n.reScanSlashToken(!0),"Expected scanner to rescan RegularExpressionLiteral"),!!r}finally{n.setText(""),n.setOnError(void 0)}}return!1}(e)))),tr}(e);case 209:return FF(e,r,i);case 210:return function(e,t=0){var n;const r=eh(e);!function(e,t){const n=new Map;for(const r of e.properties){if(305===r.kind){if(t){const e=lh(r.expression);if(WE(e)||HE(e))return pJ(r.expression,va.A_rest_element_cannot_contain_a_binding_pattern)}continue}const e=r.name;if(167===e.kind&&GB(e),304===r.kind&&!t&&r.objectAssignmentInitializer&&pJ(r.equalsToken,va.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern),81===e.kind&&pJ(e,va.Private_identifiers_are_not_allowed_outside_class_bodies),cI(r)&&r.modifiers)for(const e of r.modifiers)!iu(e)||134===e.kind&&174===r.kind||pJ(e,va._0_modifier_cannot_be_used_here,Gd(e));else if(LA(r)&&r.modifiers)for(const e of r.modifiers)iu(e)&&pJ(e,va._0_modifier_cannot_be_used_here,Gd(e));let i;switch(r.kind){case 304:case 303:YB(r.exclamationToken,va.A_definite_assignment_assertion_is_not_permitted_in_this_context),QB(r.questionToken,va.An_object_member_cannot_be_declared_optional),9===e.kind&&gJ(e),i=4;break;case 174:i=8;break;case 177:i=1;break;case 178:i=2;break;default:xn.assertNever(r,"Unexpected syntax kind:"+r.kind)}if(!t){const t=vJ(e);if(void 0===t)continue;const r=n.get(t);if(r)if(8&i&&8&r)pJ(e,va.Duplicate_identifier_0,Gd(e));else if(4&i&&4&r)pJ(e,va.An_object_literal_cannot_have_multiple_properties_with_the_same_name,Gd(e));else{if(!(3&i&&3&r))return pJ(e,va.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);if(3===r||i===r)return pJ(e,va.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);n.set(t,i|r)}else n.set(t,i)}}}(e,r);const i=U?ed():void 0;let o=ed(),a=[],s=wn;pF(e);const c=oF(e,void 0),l=c&&c.pattern&&(206===c.pattern.kind||210===c.pattern.kind),_=AM(e),d=_?8:0,p=Mm(e)&&!Lm(e),f=p?el(e):void 0,m=!c&&p&&!f;let g=8192,h=!1,y=!1,v=!1,b=!1;for(const t of e.properties)t.name&&oE(t.name)&&IF(t.name);let x=0;for(const n of e.properties){let u=ns(n);const m=n.name&&167===n.name.kind?IF(n.name):void 0;if(303===n.kind||304===n.kind||$f(n)){let o=303===n.kind?OM(n,t):304===n.kind?IM(!r&&n.objectAssignmentInitializer?n.objectAssignmentInitializer:n.name,t):MM(n,t);if(p){const e=Kc(n);e?(PS(o,e,n),o=e):f&&f.typeExpression&&PS(o,Sx(f.typeExpression),n)}g|=458752&wx(o);const a=m&&mC(m)?m:void 0,s=a?No(4|u.flags,gC(a),4096|d):No(4|u.flags,u.escapedName,d);if(a&&(s.links.nameType=a),r)(303===n.kind&&PF(n.initializer)||304===n.kind&&n.objectAssignmentInitializer)&&(s.flags|=16777216);else if(l&&!(512&wx(c))){const e=Jp(c,u.escapedName);e?s.flags|=16777216&e.flags:_f(c,Jt)||xo(n.name,va.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Us(u),Ws(c))}if(s.declarations=u.declarations,s.parent=u.parent,u.valueDeclaration&&(s.valueDeclaration=u.valueDeclaration),s.links.type=o,s.links.target=u,u=s,null==i||i.set(s.escapedName,s),c&&2&t&&!(4&t)&&(303===n.kind||174===n.kind)&&lS(n)){const t=yF(e);xn.assert(t),HC(t,303===n.kind?n.initializer:n,o)}}else{if(305===n.kind){M<2&&xB(n,2),a.length>0&&(s=nx(s,S(),e.symbol,g,_),a=[],o=ed(),y=!1,v=!1,b=!1);const r=Sp(KM(n.expression,2&t));if(RF(r)){const t=tx(r,_);if(i&&qF(t,i,n),x=a.length,Nc(s))continue;s=nx(s,t,e.symbol,g,_)}else xo(n,va.Spread_types_may_only_be_created_from_object_types),s=Dt;continue}xn.assert(177===n.kind||178===n.kind),SR(n)}!m||8576&m.flags?o.set(u.escapedName,u):SS(m,pn)&&(SS(m,zt)?v=!0:SS(m,Qt)?b=!0:y=!0,r&&(h=!0)),a.push(u)}if(mF(),l){const t=mc(c.pattern.parent,(e=>260===e.kind||226===e.kind||169===e.kind));if(305!==mc(e,(e=>e===t||305===e.kind)).kind)for(const e of Rd(c))o.get(e.escapedName)||Jp(s,e.escapedName)||(16777216&e.flags||xo(e.valueDeclaration||(null==(n=lt(e,td))?void 0:n.links.bindingElement),va.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),o.set(e.escapedName,e),a.push(e))}return Nc(s)?Dt:s!==wn?(a.length>0&&(s=nx(s,S(),e.symbol,g,_),a=[],o=ed(),y=!1,v=!1),DD(s,(e=>e===wn?S():e))):S();function S(){const t=[];y&&t.push(LF(e,x,a,Jt)),v&&t.push(LF(e,x,a,zt)),b&&t.push(LF(e,x,a,Qt));const n=ks(e.symbol,o,u,u,t);return n.objectFlags|=131200|g,m&&(n.objectFlags|=4096),h&&(n.objectFlags|=512),r&&(n.pattern=e),n}}(e,r);case 211:return wA(e,r);case 166:return DA(e,r);case 212:return function(e,t){return 64&e.flags?function(e,t){const n=KM(e.expression),r=vC(n,e.expression);return pC(nI(e,TA(r,e.expression),t),e,r!==n)}(e,t):nI(e,yA(e.expression),t)}(e,r);case 213:if(102===e.expression.kind)return function(e){if(function(e){if(A.verbatimModuleSyntax&&1===B)return pJ(e,va.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(5===B)return pJ(e,va.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);if(e.typeArguments)return pJ(e,va.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);const t=e.arguments;if(99!==B&&199!==B&&100!==B&&(EB(t),t.length>1))return pJ(t[1],va.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);if(0===t.length||t.length>2)return pJ(e,va.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);const n=S(t,fP);n&&pJ(n,va.Argument_of_dynamic_import_cannot_be_spread_element)}(e),0===e.arguments.length)return WO(e,St);const t=e.arguments[0],n=DM(t),r=e.arguments.length>1?DM(e.arguments[1]):void 0;for(let t=2;tcM(e)));const t=KM(e.expression),n=hL(t,!0,e,va.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);return n!==t||Nc(n)||3&t.flags||So(!1,Rp(e,va.await_has_no_effect_on_the_type_of_this_expression)),n}(e);case 224:return function(e){const t=KM(e.operand);if(t===tn)return tn;switch(e.operand.kind){case 9:switch(e.operator){case 41:return ax(ux(-e.operand.text));case 40:return ax(ux(+e.operand.text))}break;case 10:if(41===e.operator)return ax(_x({negative:!0,base10Value:xT(e.operand.text)}))}switch(e.operator){case 40:case 41:case 55:return TA(t,e.operand),uM(t,12288)&&xo(e.operand,va.The_0_operator_cannot_be_applied_to_type_symbol,Ra(e.operator)),40===e.operator?(uM(t,2112)&&xo(e.operand,va.Operator_0_cannot_be_applied_to_type_1,Ra(e.operator),Ws(cT(t))),zt):lM(t);case 54:uj(t,e.operand);const n=Xw(t,12582912);return 4194304===n?qt:8388608===n?Kt:Xt;case 46:case 47:return rM(e.operand,TA(t,e.operand),va.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&sM(e.operand,va.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,va.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),lM(t)}return Dt}(e);case 225:return function(e){const t=KM(e.operand);return t===tn?tn:(rM(e.operand,TA(t,e.operand),va.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&sM(e.operand,va.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,va.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),lM(t))}(e);case 226:return oe(e,r);case 227:return function(e,t){const n=_j(e.condition,t);return lj(e.condition,n,e.whenTrue),ev([KM(e.whenTrue,t),KM(e.whenFalse,t)],2)}(e,r);case 230:return function(e,t){return M<2&&xB(e,A.downlevelIteration?1536:1024),fj(33,KM(e.expression,t),It,e.expression)}(e,r);case 232:return Ot;case 229:return function(e){a((function(){16384&e.flags||_J(e,va.A_yield_expression_is_only_allowed_in_a_generator_body),bN(e)&&xo(e,va.yield_expressions_cannot_be_used_in_a_parameter_initializer)}));const t=Qf(e);if(!t)return St;const n=Jh(t);if(!(1&n))return St;const r=0!=(2&n);e.asteriskToken&&(r&&M<5&&xB(e,26624),!r&&M<2&&A.downlevelIteration&&xB(e,256));let i=Xf(t);i&&1048576&i.flags&&(i=SD(i,(e=>QM(e,n,void 0))));const o=i&&Rj(i,r),s=o&&o.yieldType||St,c=o&&o.nextType||St,l=r?SL(c)||St:c,u=e.expression?KM(e.expression):Ot,_=XO(e,u,l,r);if(i&&_&&IS(_,s,e.expression||e,e.expression),e.asteriskToken)return gj(r?19:17,1,u,e.expression)||St;if(i)return jj(2,i,r)||St;let d=xN(2,t);return d||(d=St,a((()=>{if(Y&&!BT(e)){const t=dF(e,void 0);t&&!Ec(t)||xo(e,va.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation)}}))),d}(e);case 237:return function(e){return e.isSpread?Mb(e.type,zt):e.type}(e);case 294:return function(e,t){if(function(e){e.expression&&uA(e.expression)&&pJ(e.expression,va.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array)}(e),e.expression){const n=KM(e.expression,t);return e.dotDotDotToken&&n!==St&&!qk(n)&&xo(e,va.JSX_spread_child_must_be_an_array_type),n}return Dt}(e,r);case 284:case 285:return function(e,t){return SR(e),tA(e)||St}(e);case 288:return function(e){iA(e.openingFragment);const t=Sd(e);return!ek(A)||!A.jsxFactory&&!t.pragmas.has("jsx")||A.jsxFragmentFactory||t.pragmas.has("jsxfrag")||xo(e,A.jsxFactory?va.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:va.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments),$F(e),tA(e)||St}(e);case 292:return function(e,t){return function(e,t=0){const n=e.attributes,r=dF(n,0),i=U?ed():void 0;let o,a=ed(),s=Dn,c=!1,l=!1,_=2048;const d=XF(HF(e));for(const e of n.properties){const u=e.symbol;if(NN(e)){const o=zF(e,t);_|=458752&wx(o);const s=No(4|u.flags,u.escapedName);if(s.declarations=u.declarations,s.parent=u.parent,u.valueDeclaration&&(s.valueDeclaration=u.valueDeclaration),s.links.type=o,s.links.target=u,a.set(s.escapedName,s),null==i||i.set(s.escapedName,s),lC(e.name)===d&&(l=!0),r){const t=Jp(r,u.escapedName);t&&t.declarations&&wo(t)&&qD(e.name)&&Eo(e.name,t.declarations,e.name.escapedText)}if(r&&2&t&&!(4&t)&&lS(e)){const t=yF(n);xn.assert(t),HC(t,e.initializer.expression,o)}}else{xn.assert(293===e.kind),a.size>0&&(s=nx(s,f(),n.symbol,_,!1),a=ed());const r=Sp(KM(e.expression,2&t));Ec(r)&&(c=!0),RF(r)?(s=nx(s,r,n.symbol,_,!1),i&&qF(r,i,e)):(xo(e.expression,va.Spread_types_may_only_be_created_from_object_types),o=o?cv([o,r]):r)}}c||a.size>0&&(s=nx(s,f(),n.symbol,_,!1));const p=284===e.parent.kind?e.parent:void 0;if(p&&p.openingElement===e&&vy(p.children).length>0){const r=$F(p,t);if(!c&&d&&""!==d){l&&xo(n,va._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,vc(d));const t=oF(e.attributes,void 0),i=t&&LN(t,d),o=No(4,d);o.links.type=1===r.length?r[0]:i&&bD(i,Zk)?Ay(r):Ty(ev(r)),o.valueDeclaration=YC.createPropertySignature(void 0,vc(d),void 0,void 0),OT(o.valueDeclaration,n),o.valueDeclaration.symbol=o;const a=ed();a.set(d,o),s=nx(s,ks(n.symbol,a,u,u,u),n.symbol,_,!1)}}return c?St:o&&s!==Dn?cv([o,s]):o||(s===Dn?f():s);function f(){_|=8192;const e=ks(n.symbol,a,u,u,u);return e.objectFlags|=131200|_,e}}(e.parent,t)}(e,r);case 286:xn.fail("Shouldn't ever directly check a JsxOpeningElement")}return Dt}(i,o,s),p=LM(i,d,o);return fM(p)&&function(t,n){if(211===t.parent.kind&&t.parent.expression===t||212===t.parent.kind&&t.parent.expression===t||(80===t.kind||166===t.kind)&&MR(t)||186===t.parent.kind&&t.parent.exprName===t||281===t.parent.kind||xo(t,va.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query),NS(A)){xn.assert(!!(128&n.symbol.flags));const r=n.symbol.valueDeclaration,i=e.getRedirectReferenceForResolutionFromSourceOfProject(Sd(r).resolvedPath);!(33554432&r.flags)||wT(t)||i&&jS(i.commandLine.options)||xo(t,va.Cannot_access_ambient_const_enums_when_0_is_enabled,Ne)}}(i,p),r=_,null==(l=or)||l.pop(),p}function WM(e){CB(e),e.expression&&_J(e.expression,va.Type_expected),yR(e.constraint),yR(e.default);const t=Lu(ns(e));Wd(t),function(e){return tp(e)!==Mn}(t)||xo(e.default,va.Type_parameter_0_has_a_circular_default,Ws(t));const n=Jd(t),r=np(t);n&&r&&PS(r,y_(eS(n,Mx(t,r)),r),e.default,va.Type_0_does_not_satisfy_the_constraint_1),SR(e),a((()=>Vj(e.name,va.Type_parameter_name_cannot_be_0)))}function HM(e){CB(e),rj(e);const t=Qf(e);Bv(e,31)&&(176===t.kind&&Fd(t.body)||xo(e,va.A_parameter_property_is_only_allowed_in_a_constructor_implementation),176===t.kind&&qD(e.name)&&"constructor"===e.name.escapedText&&xo(e.name,va.constructor_cannot_be_used_as_a_parameter_property_name)),!e.initializer&&iC(e)&&Eu(e.name)&&t.body&&xo(e,va.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),e.name&&qD(e.name)&&("this"===e.name.escapedText||"new"===e.name.escapedText)&&(0!==t.parameters.indexOf(e)&&xo(e,va.A_0_parameter_must_be_the_first_parameter,e.name.escapedText),176!==t.kind&&180!==t.kind&&185!==t.kind||xo(e,va.A_constructor_cannot_have_a_this_parameter),219===t.kind&&xo(e,va.An_arrow_function_cannot_have_a_this_parameter),177!==t.kind&&178!==t.kind||xo(e,va.get_and_set_accessors_cannot_declare_this_parameters)),!e.dotDotDotToken||Eu(e.name)||SS(Sp($l(e.symbol)),ar)||xo(e,va.A_rest_parameter_must_be_of_an_array_type)}function GM(e,t,n){for(const r of e.elements){if(gP(r))continue;const e=r.name;if(80===e.kind&&e.escapedText===n)return xo(t,va.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,n),!0;if((207===e.kind||206===e.kind)&&GM(e,t,n))return!0}}function XM(e){181===e.kind?function(e){CB(e)||function(e){const t=e.parameters[0];if(1!==e.parameters.length)return pJ(t?t.name:e,va.An_index_signature_must_have_exactly_one_parameter);if(EB(e.parameters,va.An_index_signature_cannot_have_a_trailing_comma),t.dotDotDotToken)return pJ(t.dotDotDotToken,va.An_index_signature_cannot_have_a_rest_parameter);if(Lv(t))return pJ(t.name,va.An_index_signature_parameter_cannot_have_an_accessibility_modifier);if(t.questionToken)return pJ(t.questionToken,va.An_index_signature_parameter_cannot_have_a_question_mark);if(t.initializer)return pJ(t.name,va.An_index_signature_parameter_cannot_have_an_initializer);if(!t.type)return pJ(t.name,va.An_index_signature_parameter_must_have_a_type_annotation);const n=Sx(t.type);bD(n,(e=>!!(8576&e.flags)))||lb(n)?pJ(t.name,va.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead):xD(n,ng)?e.type||pJ(e,va.An_index_signature_must_have_a_type_annotation):pJ(t.name,va.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type)}(e)}(e):184!==e.kind&&262!==e.kind&&185!==e.kind&&179!==e.kind&&176!==e.kind&&180!==e.kind||UB(e);const t=Jh(e);4&t||(3==(3&t)&&M<5&&xB(e,6144),2==(3&t)&&M<4&&xB(e,64),0!=(3&t)&&M<2&&xB(e,128)),Uj(ml(e)),function(e){const t=F(ll(e),xF);if(!p(t))return;const n=Mm(e),r=new Set,i=new Set;if(f(e.parameters,(({name:e},t)=>{qD(e)&&r.add(e.escapedText),Eu(e)&&i.add(t)})),Ef(e)){const e=t.length-1,o=t[e];n&&o&&qD(o.name)&&o.typeExpression&&o.typeExpression.type&&!r.has(o.name.escapedText)&&!i.has(e)&&!qk(Sx(o.typeExpression.type))&&xo(o.name,va.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,bc(o.name))}else f(t,(({name:e,isNameFirst:t},o)=>{i.has(o)||qD(e)&&r.has(e.escapedText)||(iE(e)?n&&xo(e,va.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,jp(e),jp(e.left)):t||ko(n,e,va.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,bc(e)))}))}(e),f(e.parameters,HM),e.type&&yR(e.type),a((function(){!function(e){M>=2||!V_(e)||33554432&e.flags||Nd(e.body)||f(e.parameters,(e=>{e.name&&!Eu(e.name)&&e.name.escapedText===Ee.escapedName&&vo("noEmit",e,va.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)}))}(e);let t=Cv(e),n=t;if(Mm(e)){const r=ol(e);if(r&&r.typeExpression&&xE(r.typeExpression.type)){const e=hI(Sx(r.typeExpression));e&&e.declaration&&(t=Cv(e.declaration),n=r.typeExpression.type)}}if(Y&&!t)switch(e.kind){case 180:xo(e,va.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 179:xo(e,va.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(t&&n){const r=Jh(e);if(1==(5&r)){const e=Sx(t);e===Zt?xo(n,va.A_generator_cannot_have_a_void_type_annotation):QM(e,r,n)}else 2==(3&r)&&function(e,t,n){const r=Sx(t);if(M>=2){if(Nc(r))return;const e=_y(!0);if(e!==An&&!Kl(r,e))return void i(va.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0,t,n,Ws(kL(r)||Zt))}else{if(eP(e,5),Nc(r))return;const o=fm(t);if(void 0===o)return void i(va.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,Ws(r));const a=Ma(o,111551,!0),s=a?$l(a):Dt;if(Nc(s))return void(80===o.kind&&"Promise"===o.escapedText&&Hl(r)===_y(!1)?xo(n,va.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):i(va.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,jp(o)));const c=(!0,hr||(hr=Xh("PromiseConstructorLike",0,true))||wn);if(c===wn)return void i(va.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,jp(o));const l=va.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value;if(!PS(s,c,n,l,(()=>t===n?void 0:uS(void 0,va.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type))))return;const u=o&&bb(o),_=Ho(e.locals,u.escapedText,111551);if(_)return void xo(_.valueDeclaration,va.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,bc(u),jp(o))}function i(e,t,n,r){t===n?xo(n,e,r):fT(xo(n,va.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type),Rp(t,e,r))}hL(r,!1,e,va.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(e,t,n)}181!==e.kind&&317!==e.kind&&ML(e)}))}function QM(e,t,n){const r=jj(0,e,0!=(2&t))||St;return PS(GO(r,jj(1,e,0!=(2&t))||r,jj(2,e,0!=(2&t))||At,!!(2&t)),e,n)}function YM(e){const t=new Map;for(const n of e.members)if(171===n.kind){let e;const r=n.name;switch(r.kind){case 11:case 9:e=r.text;break;case 80:e=bc(r);break;default:continue}t.get(e)?(xo(Pc(n.symbol.valueDeclaration),va.Duplicate_identifier_0,e),xo(n.name,va.Duplicate_identifier_0,e)):t.set(e,!0)}}function ZM(e){if(264===e.kind){const t=ns(e);if(t.declarations&&t.declarations.length>0&&t.declarations[0]!==e)return}const t=jm(ns(e));if(null==t?void 0:t.declarations){const e=new Map;for(const n of t.declarations)1===n.parameters.length&&n.parameters[0].type&&vD(Sx(n.parameters[0].type),(t=>{const r=e.get(qy(t));r?r.declarations.push(n):e.set(qy(t),{type:t,declarations:[n]})}));e.forEach((e=>{if(e.declarations.length>1)for(const t of e.declarations)xo(t,va.Duplicate_index_signature_for_type_0,Ws(e.type))}))}}function eL(e){CB(e)||function(e){if(oE(e.name)&&uP(e.name.expression)&&103===e.name.expression.operatorToken.kind)return pJ(e.parent.members[0],va.A_mapped_type_may_not_declare_properties_or_methods);if(gu(e.parent)){if(wD(e.name)&&"constructor"===e.name.text)return pJ(e.name,va.Classes_may_not_have_a_field_named_constructor);if(nJ(e.name,va.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type))return!0;if(M<2&&VD(e.name))return pJ(e.name,va.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(M<2&&yu(e))return pJ(e.name,va.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(yu(e)&&QB(e.questionToken,va.An_accessor_property_cannot_be_declared_optional))return!0}else if(264===e.parent.kind){if(nJ(e.name,va.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(xn.assertNode(e,lE),e.initializer)return pJ(e.initializer,va.An_interface_property_cannot_have_an_initializer)}else if(CE(e.parent)){if(nJ(e.name,va.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(xn.assertNode(e,lE),e.initializer)return pJ(e.initializer,va.A_type_literal_property_cannot_have_an_initializer)}if(33554432&e.flags&&oJ(e),uE(e)&&e.exclamationToken&&(!gu(e.parent)||!e.type||e.initializer||33554432&e.flags||Jv(e)||qv(e))){const t=e.initializer?va.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:e.type?va.A_definite_assignment_assertion_is_not_permitted_in_this_context:va.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return pJ(e.exclamationToken,t)}}(e)||GB(e.name),rj(e),tL(e),Bv(e,64)&&172===e.kind&&e.initializer&&xo(e,va.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract,Ap(e.name))}function tL(e){if(VD(e.name)&&(M<9||M<99||!z)){for(let t=Np(e);t;t=Np(t))Wo(t).flags|=1048576;if(mP(e.parent)){const t=BP(e.parent);t&&(Wo(e.name).flags|=32768,Wo(t).flags|=4096)}}}function nL(e){return 108===e.kind||110===e.kind||!im(e)&&!!LI(e,nL)}function rL(e){qD(e.name)&&"constructor"===bc(e.name)&&gu(e.parent)&&xo(e.name,va.Class_constructor_may_not_be_an_accessor),a((function(){if(UB(e)||function(e){if(!(33554432&e.flags)&&187!==e.parent.kind&&264!==e.parent.kind){if(M<2&&VD(e.name))return pJ(e.name,va.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(void 0===e.body&&!Bv(e,64))return dJ(e,e.end-1,";".length,va._0_expected,"{")}if(e.body){if(Bv(e,64))return pJ(e,va.An_abstract_accessor_cannot_have_an_implementation);if(187===e.parent.kind||264===e.parent.kind)return pJ(e.body,va.An_implementation_cannot_be_declared_in_ambient_contexts)}if(e.typeParameters)return pJ(e.name,va.An_accessor_cannot_have_type_parameters);if(!function(e){return tJ(e)||e.parameters.length===(177===e.kind?0:1)}(e))return pJ(e.name,177===e.kind?va.A_get_accessor_cannot_have_parameters:va.A_set_accessor_must_have_exactly_one_parameter);if(178===e.kind){if(e.type)return pJ(e.name,va.A_set_accessor_cannot_have_a_return_type_annotation);const t=xn.checkDefined(fv(e),"Return value does not match parameter count assertion.");if(t.dotDotDotToken)return pJ(t.dotDotDotToken,va.A_set_accessor_cannot_have_rest_parameter);if(t.questionToken)return pJ(t.questionToken,va.A_set_accessor_cannot_have_an_optional_parameter);if(t.initializer)return pJ(e.name,va.A_set_accessor_parameter_cannot_have_an_initializer)}return!1}(e)||GB(e.name),AL(e),XM(e),177===e.kind&&!(33554432&e.flags)&&Fd(e.body)&&512&e.flags&&(1024&e.flags||xo(e.name,va.A_get_accessor_must_return_a_value)),167===e.name.kind&&IF(e.name),l_(e)){const t=ns(e),n=Y_(t,177),r=Y_(t,178);if(n&&r&&!(1&iB(n))){Wo(n).flags|=1;const e=Qv(n),t=Qv(r);(64&e)!=(64&t)&&(xo(n.name,va.Accessors_must_both_be_abstract_or_non_abstract),xo(r.name,va.Accessors_must_both_be_abstract_or_non_abstract)),(4&e&&!(6&t)||2&e&&!(2&t))&&(xo(n.name,va.A_get_accessor_must_be_at_least_as_accessible_as_the_setter),xo(r.name,va.A_get_accessor_must_be_at_least_as_accessible_as_the_setter))}}const t=Fl(ns(e));177===e.kind&&tM(e,t)})),yR(e.body),tL(e)}function iL(e,t,n){return e.typeArguments&&n{const t=sL(e);t&&aL(e,t)}));const t=Wo(e).resolvedSymbol;t&&Q(t.declarations,(e=>YT(e)&&!!(536870912&e.flags)))&&Eo(sO(e),t.declarations,t.escapedName)}}function uL(e,t){if(!(8388608&e.flags))return e;const n=e.objectType,r=e.indexType,i=Ad(n)&&2===Id(n)?Sv(n,0):Av(n,0),o=!!_f(n,zt);if(xD(r,(e=>SS(e,i)||o&&af(e,zt))))return 212===t.kind&&eh(t)&&32&wx(n)&&1&Dd(n)&&xo(t,va.Index_signature_in_type_0_only_permits_reading,Ws(n)),e;if(pb(n)){const e=eb(r,t);if(e){const r=vD(mp(n),(t=>Jp(t,e)));if(r&&6&fx(r))return xo(t,va.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter,vc(e)),Dt}}return xo(t,va.Type_0_cannot_be_used_to_index_type_1,Ws(r),Ws(n)),Dt}function _L(e){return(Rv(e,2)||Zl(e))&&!!(33554432&e.flags)}function dL(e,t){let n=bJ(e);if(264!==e.parent.kind&&263!==e.parent.kind&&231!==e.parent.kind&&33554432&e.flags){const t=Pp(e);!(t&&128&t.flags)||128&n||eN(e.parent)&&ZP(e.parent.parent)&&pp(e.parent.parent)||(n|=32),n|=128}return n&t}function pL(e){a((()=>function(e){function t(e,t){return void 0!==t&&t.parent===e[0].parent?t:e[0]}let n,r,i,o=0,a=230,s=!1,c=!0,l=!1;const u=e.declarations,_=0!=(16384&e.flags);function d(e){if(e.name&&Nd(e.name))return;let t=!1;const n=LI(e.parent,(n=>{if(t)return n;t=n===e}));if(n&&n.pos===e.end&&n.kind===e.kind){const t=n.name||n,r=n.name;if(e.name&&r&&(VD(e.name)&&VD(r)&&e.name.escapedText===r.escapedText||oE(e.name)&&oE(r)&&gS(IF(e.name),IF(r))||Wh(e.name)&&Wh(r)&&Gh(e.name)===Gh(r)))return void(174!==e.kind&&173!==e.kind||Jv(e)===Jv(n)||xo(t,Jv(e)?va.Function_overload_must_be_static:va.Function_overload_must_not_be_static));if(Fd(n.body))return void xo(t,va.Function_implementation_name_must_be_0,Ap(e.name))}const r=e.name||e;_?xo(r,va.Constructor_implementation_is_missing):Bv(e,64)?xo(r,va.All_declarations_of_an_abstract_method_must_be_consecutive):xo(r,va.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}let m=!1,g=!1,h=!1;const y=[];if(u)for(const e of u){const t=e,u=33554432&t.flags,f=t.parent&&(264===t.parent.kind||187===t.parent.kind)||u;if(f&&(i=void 0),263!==t.kind&&231!==t.kind||u||(h=!0),262===t.kind||174===t.kind||173===t.kind||176===t.kind){y.push(t);const e=dL(t,230);o|=e,a&=e,s=s||Pg(t),c=c&&Pg(t);const u=Fd(t.body);u&&n?_?g=!0:m=!0:(null==i?void 0:i.parent)===t.parent&&i.end!==t.pos&&d(i),u?n||(n=t):l=!0,i=t,f||(r=t)}Mm(e)&&cu(e)&&e.jsDoc&&(l=p(Vg(e))>0)}if(g&&f(y,(e=>{xo(e,va.Multiple_constructor_implementations_are_not_allowed)})),m&&f(y,(e=>{xo(Pc(e)||e,va.Duplicate_function_implementation)})),h&&!_&&16&e.flags&&u){const t=F(u,(e=>263===e.kind)).map((e=>Rp(e,va.Consider_adding_a_declare_modifier_to_this_class)));f(u,(n=>{const r=263===n.kind?va.Class_declaration_cannot_implement_overload_list_for_0:262===n.kind?va.Function_with_bodies_can_only_merge_with_classes_that_are_ambient:void 0;r&&fT(xo(Pc(n)||n,r,Sc(e)),...t)}))}if(!r||r.body||Bv(r,64)||r.questionToken||d(r),l&&(u&&(function(e,n,r,i,o){if(0!=(i^o)){const i=dL(t(e,n),r);f(e,(e=>{const t=dL(e,r)^i;32&t?xo(Pc(e),va.Overload_signatures_must_all_be_exported_or_non_exported):128&t?xo(Pc(e),va.Overload_signatures_must_all_be_ambient_or_non_ambient):6&t?xo(Pc(e)||e,va.Overload_signatures_must_all_be_public_private_or_protected):64&t&&xo(Pc(e),va.Overload_signatures_must_all_be_abstract_or_non_abstract)}))}}(u,n,230,o,a),function(e,n,r,i){if(r!==i){const r=Pg(t(e,n));f(e,(e=>{Pg(e)!==r&&xo(Pc(e),va.Overload_signatures_must_all_be_optional_or_required)}))}}(u,n,s,c)),n)){const t=Jf(e),r=Cf(n);for(const e of t)if(!ZS(r,e)){fT(xo(e.declaration&&sF(e.declaration)?e.declaration.parent.tagName:e.declaration,va.This_overload_signature_is_not_compatible_with_its_implementation_signature),Rp(n,va.The_implementation_signature_is_declared_here));break}}}(e)))}function fL(e){a((()=>function(e){let t=e.localSymbol;if(!t&&(t=ns(e),!t.exportSymbol))return;if(Y_(t,e.kind)!==e)return;let n=0,r=0,i=0;for(const e of t.declarations){const t=s(e),o=dL(e,2080);32&o?2048&o?i|=t:n|=t:r|=t}const o=n&r,a=i&(n|r);if(o||a)for(const e of t.declarations){const t=s(e),n=Pc(e);t&a?xo(n,va.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,Ap(n)):t&o&&xo(n,va.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,Ap(n))}function s(e){let t=e;switch(t.kind){case 264:case 265:case 346:case 338:case 340:return 2;case 267:return sp(t)||0!==DR(t)?5:4;case 263:case 266:case 306:return 3;case 307:return 7;case 277:case 226:const e=t,n=mN(e)?e.expression:e.right;if(!vb(n))return 1;t=n;case 271:case 274:case 273:let r=0;return f(Ea(ns(t)).declarations,(e=>{r|=s(e)})),r;case 260:case 208:case 262:case 276:case 80:return 1;case 173:case 171:return 2;default:return xn.failBadSyntaxKind(t)}}}(e)))}function mL(e,t,n,...r){const i=gL(e,t);return i&&SL(i,t,n,...r)}function gL(e,t,n){if(Ec(e))return;const r=e;if(r.promisedTypeOfPromise)return r.promisedTypeOfPromise;if(Kl(e,_y(!1)))return r.promisedTypeOfPromise=Ig(e)[0];if(pM(Hd(e),402915324))return;const i=Tc(e,"then");if(Ec(i))return;const o=i?Vp(i,0):u;if(0===o.length)return void(t&&xo(t,va.A_promise_must_have_a_then_method));let a,s;for(const t of o){const n=Kf(t);n&&n!==Zt&&!uk(e,n,ao)?a=n:s=ue(s,t)}if(!s)return xn.assertIsDefined(a),n&&(n.value=a),void(t&&xo(t,va.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Ws(e),Ws(a)));const c=Zw(ev(O(s,LO)),2097152);if(Ec(c))return;const l=Vp(c,0);if(0!==l.length)return r.promisedTypeOfPromise=ev(O(l,LO),2);t&&xo(t,va.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback)}function hL(e,t,n,r,...i){return(t?SL(e,n,r,...i):kL(e,n,r,...i))||Dt}function yL(e){if(pM(Hd(e),402915324))return!1;const t=Tc(e,"then");return!!t&&Vp(Zw(t,2097152),0).length>0}function vL(e){var t;if(16777216&e.flags){const n=yy(!1);return!!n&&e.aliasSymbol===n&&1===(null==(t=e.aliasTypeArguments)?void 0:t.length)}return!1}function bL(e){return 1048576&e.flags?DD(e,bL):vL(e)?e.aliasTypeArguments[0]:e}function xL(e){if(Ec(e)||vL(e))return!1;if(pb(e)){const t=Wd(e);if(t?3&t.flags||ik(t)||bD(t,yL):_M(e,8650752))return!0}return!1}function SL(e,t,n,...r){const i=kL(e,t,n,...r);return i&&function(e){return xL(e)?function(e){const t=yy(!0);if(t)return Bg(t,[bL(e)])}(e)??e:(xn.assert(vL(e)||void 0===gL(e),"type provided should not be a non-generic 'promise'-like."),e)}(i)}function kL(e,t,n,...r){if(Ec(e))return e;if(vL(e))return e;const i=e;if(i.awaitedTypeOfType)return i.awaitedTypeOfType;if(1048576&e.flags){if(Zi.lastIndexOf(e.id)>=0)return void(t&&xo(t,va.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));const o=t?e=>kL(e,t,n,...r):kL;Zi.push(e.id);const a=DD(e,o);return Zi.pop(),i.awaitedTypeOfType=a}if(xL(e))return i.awaitedTypeOfType=e;const o={value:void 0},a=gL(e,void 0,o);if(a){if(e.id===a.id||Zi.lastIndexOf(a.id)>=0)return void(t&&xo(t,va.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));Zi.push(e.id);const o=kL(a,t,n,...r);if(Zi.pop(),!o)return;return i.awaitedTypeOfType=o}if(!yL(e))return i.awaitedTypeOfType=e;if(t){let i;xn.assertIsDefined(n),o.value&&(i=uS(i,va.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Ws(e),Ws(o.value))),i=uS(i,n,...r),ro.add(zp(Sd(t),t,i))}}function TL(e){!function(e){if(!uJ(Sd(e))){let t=e.expression;if(tP(t))return!1;let n,r=!0;for(;;)if(hP(t)||bP(t))t=t.expression;else if(QE(t))r||(n=t),t.questionDotToken&&(n=t.questionDotToken),t=t.expression,r=!1;else{if(!GE(t)){qD(t)||(n=t);break}t.questionDotToken&&(n=t.questionDotToken),t=t.expression,r=!1}if(n)fT(xo(e.expression,va.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),Rp(n,va.Invalid_syntax_in_decorator))}}(e);const t=nO(e);aO(t,e);const n=Gf(t);if(1&n.flags)return;const r=VO(e);if(!(null==r?void 0:r.resolvedReturnType))return;let i;const o=r.resolvedReturnType;switch(e.parent.kind){case 263:case 231:i=va.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;case 172:if(!J){i=va.Decorator_function_return_type_0_is_not_assignable_to_type_1;break}case 169:i=va.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any;break;case 174:case 177:case 178:i=va.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;default:return xn.failBadSyntaxKind(e.parent)}PS(n,o,e.expression,i)}function CL(e,t,n,r,i,o=n.length,a=0){return x_(YC.createFunctionTypeNode(void 0,u,YC.createKeywordTypeNode(133)),e,t,n,r,i,o,a)}function wL(e,t,n,r,i,o,a){return Om(CL(e,t,n,r,i,o,a))}function DL(e){return wL(void 0,void 0,u,e)}function EL(e){return wL(void 0,void 0,[Oo("value",e)],Zt)}function PL(e){if(e)switch(e.kind){case 193:case 192:return NL(e.types);case 194:return NL([e.trueType,e.falseType]);case 196:case 202:return PL(e.type);case 183:return e.typeName}}function NL(e){let t;for(let n of e){for(;196===n.kind||202===n.kind;)n=n.type;if(146===n.kind)continue;if(!U&&(201===n.kind&&106===n.literal.kind||157===n.kind))continue;const e=PL(n);if(!e)return;if(t){if(!qD(t)||!qD(e)||t.escapedText!==e.escapedText)return}else t=e}return t}function FL(e){const t=kv(e);return U_(e)?Ff(t):t}function AL(e){if(!(lI(e)&&Wv(e)&&e.modifiers&&gm(J,e,e.parent,e.parent.parent)))return;const t=S(e.modifiers,cE);if(t){J?(xB(t,8),169===e.kind&&xB(t,32)):M<99&&(xB(t,8),GP(e)?e.name?Hj(e)&&xB(t,4194304):xB(t,4194304):mP(e)||(VD(e.name)&&(dE(e)||hu(e)||yu(e))&&xB(t,4194304),oE(e.name)&&xB(t,8388608))),eP(e,8);for(const t of e.modifiers)cE(t)&&TL(t)}}function IL(e){switch(e.kind){case 80:return e;case 211:return e.name;default:return}}function OL(e){var t;AL(e),XM(e);const n=Jh(e);if(e.name&&167===e.name.kind&&IF(e.name),l_(e)){const n=ns(e),r=e.localSymbol||n,i=null==(t=r.declarations)?void 0:t.find((t=>t.kind===e.kind&&!(524288&t.flags)));e===i&&pL(r),n.parent&&pL(n)}const r=173===e.kind?void 0:e.body;if(yR(r),tM(e,Xf(e)),a((function(){Cv(e)||(Nd(r)&&!_L(e)&&zC(e,St),1&n&&Fd(r)&&Gf(Cf(e)))})),Mm(e)){const t=ol(e);t&&t.typeExpression&&!SF(Sx(t.typeExpression),e)&&xo(t.typeExpression.type,va.The_type_of_a_function_declaration_must_match_the_function_s_signature)}}function ML(e){a((function(){const t=Sd(e);let n=fi.get(t.path);n||(n=[],fi.set(t.path,n)),n.push(e)}))}function LL(e,t){for(const n of e)switch(n.kind){case 263:case 231:BL(n,t),zL(n,t);break;case 307:case 267:case 241:case 269:case 248:case 249:case 250:KL(n,t);break;case 176:case 218:case 262:case 219:case 174:case 177:case 178:n.body&&KL(n,t),zL(n,t);break;case 173:case 179:case 180:case 184:case 185:case 265:case 264:zL(n,t);break;case 195:JL(n,t);break;default:xn.assertNever(n,"Node should not have been registered for unused identifiers check")}}function jL(e,t,n){n(e,0,Rp(Pc(e)||e,YT(e)?va._0_is_declared_but_never_used:va._0_is_declared_but_its_value_is_never_read,t))}function RL(e){return qD(e)&&95===bc(e).charCodeAt(0)}function BL(e,t){for(const n of e.members)switch(n.kind){case 174:case 172:case 177:case 178:if(178===n.kind&&32768&n.symbol.flags)break;const e=ns(n);e.isReferenced||!(Rv(n,2)||Dc(n)&&VD(n.name))||33554432&n.flags||t(n,0,Rp(n.name,va._0_is_declared_but_its_value_is_never_read,Us(e)));break;case 176:for(const e of n.parameters)!e.symbol.isReferenced&&Bv(e,2)&&t(e,0,Rp(e.name,va.Property_0_is_declared_but_its_value_is_never_read,Sc(e.symbol)));break;case 181:case 240:case 175:break;default:xn.fail("Unexpected class member")}}function JL(e,t){const{typeParameter:n}=e;$L(n)&&t(e,1,Rp(e,va._0_is_declared_but_its_value_is_never_read,bc(n.name)))}function zL(e,t){const n=ns(e).declarations;if(!n||De(n)!==e)return;const r=ml(e),i=new Set;for(const e of r){if(!$L(e))continue;const n=bc(e.name),{parent:r}=e;if(195!==r.kind&&r.typeParameters.every($L)){if(W(i,r)){const i=Sd(r),o=CF(r)?gT(r):hT(i,r.typeParameters),a=1===r.typeParameters.length?[va._0_is_declared_but_its_value_is_never_read,n]:[va.All_type_parameters_are_unused];t(e,1,aS(i,o.pos,o.end-o.pos,...a))}}else t(e,1,Rp(e,va._0_is_declared_but_its_value_is_never_read,n))}}function $L(e){return!(262144&ts(e.symbol).isReferenced||RL(e.name))}function qL(e,t,n,r){const i=String(r(t)),o=e.get(i);o?o[1].push(n):e.set(i,[t,[n]])}function VL(e){return lt(sy(e),sE)}function UL(e){return KE(e)?VE(e.parent)?!(!e.propertyName||!RL(e.name)):RL(e.name):sp(e)||(KP(e)&&i_(e.parent.parent)||HL(e))&&RL(e.name)}function KL(e,t){const n=new Map,r=new Map,i=new Map;e.locals.forEach((e=>{var o;if(!(262144&e.flags?!(3&e.flags)||3&e.isReferenced:e.isReferenced||e.exportSymbol)&&e.declarations)for(const a of e.declarations)if(!UL(a))if(HL(a))qL(n,273===(o=a).kind?o:274===o.kind?o.parent:o.parent.parent,a,IB);else if(KE(a)&&VE(a.parent))a!==De(a.parent.elements)&&De(a.parent.elements).dotDotDotToken||qL(r,a.parent,a,IB);else if(KP(a)){const e=7&xJ(a),t=Pc(a);(4===e||6===e)&&t&&RL(t)||qL(i,a.parent,a,IB)}else{const n=e.valueDeclaration&&VL(e.valueDeclaration),i=e.valueDeclaration&&Pc(e.valueDeclaration);n&&i?rc(n,n.parent)||hv(n)||RL(i)||(KE(a)&&UE(a.parent)?qL(r,a.parent,a,IB):t(n,1,Rp(i,va._0_is_declared_but_its_value_is_never_read,Sc(e)))):jL(a,Sc(e),t)}})),n.forEach((([e,n])=>{const r=e.parent;if((e.name?1:0)+(e.namedBindings?274===e.namedBindings.kind?1:e.namedBindings.elements.length:0)===n.length)t(r,0,1===n.length?Rp(r,va._0_is_declared_but_its_value_is_never_read,bc(Te(n).name)):Rp(r,va.All_imports_in_import_declaration_are_unused));else for(const e of n)jL(e,bc(e.name),t)})),r.forEach((([e,n])=>{const r=VL(e.parent)?1:0;if(e.elements.length===n.length)1===n.length&&260===e.parent.kind&&261===e.parent.parent.kind?qL(i,e.parent.parent,e.parent,IB):t(e,r,1===n.length?Rp(e,va._0_is_declared_but_its_value_is_never_read,WL(Te(n).name)):Rp(e,va.All_destructured_elements_are_unused));else for(const e of n)t(e,r,Rp(e,va._0_is_declared_but_its_value_is_never_read,WL(e.name)))})),i.forEach((([e,n])=>{if(e.declarations.length===n.length)t(e,0,1===n.length?Rp(Te(n).name,va._0_is_declared_but_its_value_is_never_read,WL(Te(n).name)):Rp(243===e.parent.kind?e.parent:e,va.All_variables_are_unused));else for(const e of n)t(e,0,Rp(e,va._0_is_declared_but_its_value_is_never_read,WL(e.name)))}))}function WL(e){switch(e.kind){case 80:return bc(e);case 207:case 206:return WL(ut(Te(e.elements),KE).name);default:return xn.assertNever(e)}}function HL(e){return 273===e.kind||276===e.kind||274===e.kind}function GL(e){if(241===e.kind&&mJ(e),fu(e)){const t=yi;f(e.statements,yR),yi=t}else f(e.statements,yR);e.locals&&ML(e)}function XL(e,t,n){if((null==t?void 0:t.escapedText)!==n)return!1;if(172===e.kind||171===e.kind||174===e.kind||173===e.kind||177===e.kind||178===e.kind||303===e.kind)return!1;if(33554432&e.flags)return!1;if((oN(e)||rN(e)||fN(e))&&Wl(e))return!1;const r=sy(e);return!sE(r)||!Nd(r.parent.body)}function QL(e){mc(e,(t=>!!(4&iB(t))&&(80!==e.kind?xo(Pc(e),va.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):xo(e,va.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),!0)))}function YL(e){mc(e,(t=>!!(8&iB(t))&&(80!==e.kind?xo(Pc(e),va.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference):xo(e,va.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference),!0)))}function ZL(e){1048576&iB(Np(e))&&(xn.assert(Dc(e)&&qD(e.name)&&"string"==typeof e.name.escapedText,"The target of a WeakMap/WeakSet collision check should be an identifier"),vo("noEmit",e,va.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel,e.name.escapedText))}function ej(e){let t=!1;if(mP(e)){for(const n of e.members)if(2097152&iB(n)){t=!0;break}}else if(nP(e))2097152&iB(e)&&(t=!0);else{const n=Np(e);n&&2097152&iB(n)&&(t=!0)}t&&(xn.assert(Dc(e)&&qD(e.name),"The target of a Reflect collision check should be an identifier"),vo("noEmit",e,va.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers,Ap(e.name),"Reflect"))}function tj(e,t){t&&(function(e,t){if(B>=5&&!(B>=100&&1===Sd(e).impliedNodeFormat))return;if(!t||!XL(e,t,"require")&&!XL(e,t,"exports"))return;if(ZP(e)&&1!==DR(e))return;const n=kc(e);307===n.kind&&Zp(n)&&vo("noEmit",t,va.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,Ap(t),Ap(t))}(e,t),function(e,t){if(!t||M>=4||!XL(e,t,"Promise"))return;if(ZP(e)&&1!==DR(e))return;const n=kc(e);307===n.kind&&Zp(n)&&4096&n.flags&&vo("noEmit",t,va.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,Ap(t),Ap(t))}(e,t),function(e,t){M<=8&&(XL(e,t,"WeakMap")||XL(e,t,"WeakSet"))&&Xi.push(e)}(e,t),function(e,t){t&&M>=2&&M<=8&&XL(e,t,"Reflect")&&Qi.push(e)}(e,t),gu(e)?(Vj(t,va.Class_name_cannot_be_0),33554432&e.flags||function(e){M>=1&&"Object"===e.escapedText&&(B<5||1===Sd(e).impliedNodeFormat)&&xo(e,va.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,Ci[B])}(t)):YP(e)&&Vj(t,va.Enum_name_cannot_be_0))}function nj(e){return e===kt?St:e===ir?rr:e}function rj(e){var t;if(AL(e),KE(e)||yR(e.type),!e.name)return;if(167===e.name.kind&&(IF(e.name),j_(e)&&e.initializer&&DM(e.initializer)),KE(e)){if(e.propertyName&&qD(e.name)&&ay(e)&&Nd(Qf(e).body))return void Yi.push(e);VE(e.parent)&&e.dotDotDotToken&&M<5&&xB(e,4),e.propertyName&&167===e.propertyName.kind&&IF(e.propertyName);const t=e.parent.parent,n=Ic(t,e.dotDotDotToken?32:0),r=e.propertyName||e.name;if(n&&!Eu(r)){const i=Tv(r);if(mC(i)){const r=Jp(n,gC(i));r&&(XA(r,void 0,!1),pA(e,!!t.initializer&&108===t.initializer.kind,!1,n,r))}}}if(Eu(e.name)&&(207===e.name.kind&&M<2&&A.downlevelIteration&&xB(e,512),f(e.name.elements,yR)),e.initializer&&ay(e)&&Nd(Qf(e).body))return void xo(e,va.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);if(Eu(e.name)){if(Fw(e))return;const t=j_(e)&&e.initializer&&249!==e.parent.parent.kind,n=!Q(e.name.elements,dn(gP));if(t||n){const r=vl(e);if(t){const t=DM(e.initializer);U&&n?CA(t,e):IS(t,vl(e),e,e.initializer)}n&&(UE(e.name)?fj(65,r,It,e):U&&CA(r,e))}return}const n=ns(e);if(2097152&n.flags&&($m(e)||qm(e)))return void uR(e);const r=nj($l(n));if(e===n.valueDeclaration){const i=j_(e)&&Gm(e);if(i&&!(Mm(e)&&HE(i)&&(0===i.properties.length||Tb(e.name))&&(null==(t=n.exports)?void 0:t.size)||249===e.parent.parent.kind)){const t=DM(i);IS(t,r,e,i,void 0);const n=7&xJ(e);if(6===n){const e=(!0,Or||(Or=Xh("AsyncDisposable",0,true))||wn),n=gy(!0);e!==wn&&n!==wn&&PS(t,ev([e,n,Rt,It]),i,va.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined)}else if(4===n){const e=gy(!0);e!==wn&&PS(t,ev([e,Rt,It]),i,va.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined)}}n.declarations&&n.declarations.length>1&&Q(n.declarations,(t=>t!==e&&If(t)&&!oj(t,e)))&&xo(e.name,va.All_declarations_of_0_must_have_identical_modifiers,Ap(e.name))}else{const t=nj(vl(e));Nc(r)||Nc(t)||gS(r,t)||67108864&n.flags||ij(n.valueDeclaration,r,e,t),j_(e)&&e.initializer&&IS(DM(e.initializer),t,e,e.initializer,void 0),n.valueDeclaration&&!oj(e,n.valueDeclaration)&&xo(e.name,va.All_declarations_of_0_must_have_identical_modifiers,Ap(e.name))}172!==e.kind&&171!==e.kind&&(fL(e),260!==e.kind&&208!==e.kind||function(e){if(0!=(7&xJ(e))||ay(e))return;const t=ns(e);if(1&t.flags){if(!qD(e.name))return xn.fail();const n=je(e,e.name.escapedText,3,void 0,!1);if(n&&n!==t&&2&n.flags&&7&cA(n)){const t=Eh(n.valueDeclaration,261),r=243===t.parent.kind&&t.parent.parent?t.parent.parent:void 0;if(!r||!(241===r.kind&&cu(r.parent)||268===r.kind||267===r.kind||307===r.kind)){const t=Us(n);xo(e,va.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,t,t)}}}}(e),tj(e,e.name))}function ij(e,t,n,r){const i=Pc(n),o=172===n.kind||171===n.kind?va.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:va.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,a=Ap(i),s=xo(i,o,a,Ws(t),Ws(r));e&&fT(s,Rp(e,va._0_was_also_declared_here,a))}function oj(e,t){return 169===e.kind&&260===t.kind||260===e.kind&&169===t.kind||Pg(e)===Pg(t)&&Hv(e,1358)===Hv(t,1358)}function aj(e){var t,n;null==(t=or)||t.push(or.Phase.Check,"checkVariableDeclaration",{kind:e.kind,pos:e.pos,end:e.end,path:e.tracingPath}),function(e){const t=xJ(e),n=7&t;if(Eu(e.name))switch(n){case 6:return pJ(e,va._0_declarations_may_not_have_binding_patterns,"await using");case 4:return pJ(e,va._0_declarations_may_not_have_binding_patterns,"using")}if(249!==e.parent.parent.kind&&250!==e.parent.parent.kind)if(33554432&t)oJ(e);else if(!e.initializer){if(Eu(e.name)&&!Eu(e.parent))return pJ(e,va.A_destructuring_declaration_must_have_an_initializer);switch(n){case 6:return pJ(e,va._0_declarations_must_be_initialized,"await using");case 4:return pJ(e,va._0_declarations_must_be_initialized,"using");case 2:return pJ(e,va._0_declarations_must_be_initialized,"const")}}if(e.exclamationToken&&(243!==e.parent.parent.kind||!e.type||e.initializer||33554432&t)){const t=e.initializer?va.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:e.type?va.A_definite_assignment_assertion_is_not_permitted_in_this_context:va.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return pJ(e.exclamationToken,t)}!(B<5||1===Sd(e).impliedNodeFormat)||4===B||33554432&e.parent.parent.flags||!Bv(e.parent.parent,32)||aJ(e.name),n&&sJ(e.name)}(e),rj(e),null==(n=or)||n.pop()}function sj(e){const t=7&uc(e);(4===t||6===t)&&M<99&&xB(e,16777216),f(e.declarations,yR)}function cj(e){CB(e)||cJ(e.declarationList)||function(e){if(!lJ(e.parent)){const t=7&xJ(e.declarationList);if(t){const n=1===t?"let":2===t?"const":4===t?"using":6===t?"await using":xn.fail("Unknown BlockScope flag");pJ(e,va._0_declarations_can_only_be_declared_inside_a_block,n)}}}(e),sj(e.declarationList)}function lj(e,t,n){function r(e,t){for(i(e=lh(e),t);uP(e)&&(57===e.operatorToken.kind||61===e.operatorToken.kind);)i(e=lh(e.left),t)}function i(e,n){const i=_b(e)?lh(e.right):e;if(og(i))return;if(_b(i))return void r(i,n);const o=i===e?t:_j(i);if(1024&o.flags&&GE(i)&&384&(Wo(i.expression).resolvedSymbol??ht).flags)return void xo(i,va.This_condition_will_always_return_0,o.value?"true":"false");const a=GE(i)&&EM(i.expression);if(!Qw(o,4194304)||a)return;const s=Vp(o,0),c=!!mL(o);if(0===s.length&&!c)return;const l=qD(i)?i:GE(i)?i.name:void 0,u=l&&JR(l);if(!u&&!c)return;const _=u&&uP(e.parent)&&function(e,t){for(;uP(e)&&56===e.operatorToken.kind;){if(LI(e.right,(function e(n){if(qD(n)){const e=JR(n);if(e&&e===t)return!0}return LI(n,e)})))return!0;e=e.parent}return!1}(e.parent,u)||u&&n&&function(e,t,n,r){return!!LI(t,(function t(i){if(qD(i)){const t=JR(i);if(t&&t===r){if(qD(e)||qD(n)&&uP(n.parent))return!0;let t=n.parent,r=i.parent;for(;t&&r;){if(qD(t)&&qD(r)||110===t.kind&&110===r.kind)return JR(t)===JR(r);if(GE(t)&&GE(r)){if(JR(t.name)!==JR(r.name))return!1;r=r.expression,t=t.expression}else{if(!QE(t)||!QE(r))return!1;r=r.expression,t=t.expression}}}}return LI(i,t)}))}(e,n,l,u);_||(c?To(i,!0,va.This_condition_will_always_return_true_since_this_0_is_always_defined,Gs(o)):xo(i,va.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead))}U&&r(e,n)}function uj(e,t){return 16384&e.flags&&xo(t,va.An_expression_of_type_void_cannot_be_tested_for_truthiness),e}function _j(e,t){return uj(KM(e,t),e)}function pj(e){return fj(e.awaitModifier?15:13,yA(e.expression),It,e.expression)}function fj(e,t,n,r){return Ec(t)?t:mj(e,t,n,r,!0)||St}function mj(e,t,n,r,i){const o=0!=(2&e);if(t===en)return void(r&&Pj(r,t,o));const a=M>=2,s=!a&&A.downlevelIteration,c=A.noUncheckedIndexedAccess&&!!(128&e);if(a||s||o){const o=xj(t,e,a?r:void 0);if(i&&o){const t=8&e?va.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:32&e?va.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:64&e?va.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:16&e?va.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;t&&PS(n,o.nextType,r,t)}if(o||a)return c?aD(o&&o.yieldType):o&&o.yieldType}let l=t,u=!1;if(4&e){if(1048576&l.flags){const e=t.types,n=F(e,(e=>!(402653316&e.flags)));n!==e&&(l=ev(n,2))}else 402653316&l.flags&&(l=en);if(u=l!==t,u&&131072&l.flags)return c?aD(Jt):Jt}if(!Hk(l)){if(r){const n=!!(4&e)&&!u,[i,o]=function(n,r){var i;return r?n?[va.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:[va.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:gj(e,0,t,void 0)?[va.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!1]:function(e){switch(e){case"Float32Array":case"Float64Array":case"Int16Array":case"Int32Array":case"Int8Array":case"NodeList":case"Uint16Array":case"Uint32Array":case"Uint8Array":case"Uint8ClampedArray":return!0}return!1}(null==(i=t.symbol)?void 0:i.escapedName)?[va.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!0]:n?[va.Type_0_is_not_an_array_type_or_a_string_type,!0]:[va.Type_0_is_not_an_array_type,!0]}(n,s);To(r,o&&!!mL(l),i,Ws(l))}return u?c?aD(Jt):Jt:void 0}const _=pf(l,zt);return u&&_?402653316&_.flags&&!A.noUncheckedIndexedAccess?Jt:ev(c?[_,Jt,It]:[_,Jt],2):128&e?aD(_):_}function gj(e,t,n,r){if(Ec(n))return;const i=xj(n,e,r);return i&&i[BB(t)]}function hj(e=en,t=en,n=At){if(67359327&e.flags&&180227&t.flags&&180227&n.flags){const r=fg([e,t,n]);let i=ai.get(r);return i||(i={yieldType:e,returnType:t,nextType:n},ai.set(r,i)),i}return{yieldType:e,returnType:t,nextType:n}}function yj(e){let t,n,r;for(const i of e)if(void 0!==i&&i!==si){if(i===ci)return ci;t=ue(t,i.yieldType),n=ue(n,i.returnType),r=ue(r,i.nextType)}return t||n||r?hj(t&&ev(t),n&&ev(n),r&&cv(r)):si}function vj(e,t){return e[t]}function bj(e,t,n){return e[t]=n}function xj(e,t,n){var r,i;if(Ec(e))return ci;if(!(1048576&e.flags)){const i=n?{errors:void 0}:void 0,o=kj(e,t,n,i);if(o===si){if(n){const r=Pj(n,e,!!(2&t));(null==i?void 0:i.errors)&&fT(r,...i.errors)}return}if(null==(r=null==i?void 0:i.errors)?void 0:r.length)for(const e of i.errors)ro.add(e);return o}const o=2&t?"iterationTypesOfAsyncIterable":"iterationTypesOfIterable",a=vj(e,o);if(a)return a===si?void 0:a;let s;for(const r of e.types){const a=n?{errors:void 0}:void 0,c=kj(r,t,n,a);if(c===si){if(n){const r=Pj(n,e,!!(2&t));(null==a?void 0:a.errors)&&fT(r,...a.errors)}return void bj(e,o,si)}if(null==(i=null==a?void 0:a.errors)?void 0:i.length)for(const e of a.errors)ro.add(e);s=ue(s,c)}const c=s?yj(s):si;return bj(e,o,c),c===si?void 0:c}function Sj(e,t){if(e===si)return si;if(e===ci)return ci;const{yieldType:n,returnType:r,nextType:i}=e;return t&&yy(!0),hj(SL(n,t)||St,SL(r,t)||St,i)}function kj(e,t,n,r){if(Ec(e))return ci;let i=!1;if(2&t){const r=Tj(e,_i)||wj(e,_i);if(r){if(r!==si||!n)return 8&t?Sj(r,n):r;i=!0}}if(1&t){let r=Tj(e,di)||wj(e,di);if(r)if(r===si&&n)i=!0;else{if(!(2&t))return r;if(r!==si)return r=Sj(r,n),i?r:bj(e,"iterationTypesOfAsyncIterable",r)}}if(2&t){const t=Ej(e,_i,n,r,i);if(t!==si)return t}if(1&t){let o=Ej(e,di,n,r,i);if(o!==si)return 2&t?(o=Sj(o,n),i?o:bj(e,"iterationTypesOfAsyncIterable",o)):o}return si}function Tj(e,t){return vj(e,t.iterableCacheKey)}function Cj(e,t){const n=Tj(e,t)||Ej(e,t,void 0,void 0,!1);return n===si?ui:n}function wj(e,t){let n;if(Kl(e,n=t.getGlobalIterableType(!1))||Kl(e,n=t.getGlobalIterableIteratorType(!1))){const[r]=Ig(e),{returnType:i,nextType:o}=Cj(n,t);return bj(e,t.iterableCacheKey,hj(t.resolveIterationType(r,void 0)||r,t.resolveIterationType(i,void 0)||i,o))}if(Kl(e,t.getGlobalGeneratorType(!1))){const[n,r,i]=Ig(e);return bj(e,t.iterableCacheKey,hj(t.resolveIterationType(n,void 0)||n,t.resolveIterationType(r,void 0)||r,i))}}function Dj(e){const t=iy(!1),n=t&&Tc($l(t),yc(e));return n&&mC(n)?gC(n):`__@${e}`}function Ej(e,t,n,r,i){const o=Jp(e,Dj(t.iteratorSymbolName)),a=!o||16777216&o.flags?void 0:$l(o);if(Ec(a))return i?ci:bj(e,t.iterableCacheKey,ci);const s=a?Vp(a,0):void 0;if(!Q(s))return i?si:bj(e,t.iterableCacheKey,si);const c=Nj(cv(O(s,Gf)),t,n,r,i)??si;return i?c:bj(e,t.iterableCacheKey,c)}function Pj(e,t,n){const r=n?va.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:va.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator;return To(e,!!mL(t)||!n&&LP(e.parent)&&e.parent.expression===e&&fy(!1)!==An&&SS(t,fy(!1)),r,Ws(t))}function Nj(e,t,n,r,i){if(Ec(e))return ci;let o=Fj(e,t)||function(e,t){const n=t.getGlobalIterableIteratorType(!1);if(Kl(e,n)){const[r]=Ig(e),i=Fj(n,t)||Lj(n,t,void 0,void 0,!1),{returnType:o,nextType:a}=i===si?ui:i;return bj(e,t.iteratorCacheKey,hj(r,o,a))}if(Kl(e,t.getGlobalIteratorType(!1))||Kl(e,t.getGlobalGeneratorType(!1))){const[n,r,i]=Ig(e);return bj(e,t.iteratorCacheKey,hj(n,r,i))}}(e,t);return o===si&&n&&(o=void 0,i=!0),o??(o=Lj(e,t,n,r,i)),o===si?void 0:o}function Fj(e,t){return vj(e,t.iteratorCacheKey)}function Aj(e,t){const n=Tc(e,"done")||qt;return SS(0===t?qt:Kt,n)}function Ij(e){return Aj(e,0)}function Oj(e){return Aj(e,1)}function Mj(e,t,n,r,i){var o,a,s,c;const l=Jp(e,n);if(!l&&"next"!==n)return;const _=!l||"next"===n&&16777216&l.flags?void 0:"next"===n?$l(l):Zw($l(l),2097152);if(Ec(_))return"next"===n?ci:li;const d=_?Vp(_,0):u;if(0===d.length){if(r){const e="next"===n?t.mustHaveANextMethodDiagnostic:t.mustBeAMethodDiagnostic;i?(i.errors??(i.errors=[]),i.errors.push(Rp(r,e,n))):xo(r,e,n)}return"next"===n?si:void 0}if((null==_?void 0:_.symbol)&&1===d.length){const e=t.getGlobalGeneratorType(!1),r=t.getGlobalIteratorType(!1),i=(null==(a=null==(o=e.symbol)?void 0:o.members)?void 0:a.get(n))===_.symbol,l=!i&&(null==(c=null==(s=r.symbol)?void 0:s.members)?void 0:c.get(n))===_.symbol;if(i||l){const t=i?e:r,{mapper:o}=_;return hj(Ax(t.typeParameters[0],o),Ax(t.typeParameters[1],o),"next"===n?Ax(t.typeParameters[2],o):void 0)}}let p,f,m,g,h;for(const e of d)"throw"!==n&&Q(e.parameters)&&(p=ue(p,DO(e,0))),f=ue(f,Gf(e));if("throw"!==n){const e=p?ev(p):At;"next"===n?g=e:"return"===n&&(m=ue(m,t.resolveIterationType(e,r)||St))}const y=f?cv(f):en,v=function(e){if(Ec(e))return ci;const t=vj(e,"iterationTypesOfIteratorResult");if(t)return t;if(Kl(e,Sr||(Sr=Xh("IteratorYieldResult",1,!1))||An))return bj(e,"iterationTypesOfIteratorResult",hj(Ig(e)[0],void 0,void 0));if(Kl(e,kr||(kr=Xh("IteratorReturnResult",1,!1))||An))return bj(e,"iterationTypesOfIteratorResult",hj(void 0,Ig(e)[0],void 0));const n=SD(e,Ij),r=n!==en?Tc(n,"value"):void 0,i=SD(e,Oj),o=i!==en?Tc(i,"value"):void 0;return bj(e,"iterationTypesOfIteratorResult",r||o?hj(r,o||Zt,void 0):si)}(t.resolveIterationType(y,r)||St);return v===si?(r&&(i?(i.errors??(i.errors=[]),i.errors.push(Rp(r,t.mustHaveAValueDiagnostic,n))):xo(r,t.mustHaveAValueDiagnostic,n)),h=St,m=ue(m,St)):(h=v.yieldType,m=ue(m,v.returnType)),hj(h,ev(m),g)}function Lj(e,t,n,r,i){const o=yj([Mj(e,t,"next",n,r),Mj(e,t,"return",n,r),Mj(e,t,"throw",n,r)]);return i?o:bj(e,t.iteratorCacheKey,o)}function jj(e,t,n){if(Ec(t))return;const r=Rj(t,n);return r&&r[BB(e)]}function Rj(e,t){if(Ec(e))return ci;const n=t?_i:di;return xj(e,t?2:1,void 0)||function(e,t,n,r){return Nj(e,t,void 0,void 0,!1)}(e,n)}function Bj(e,t){const n=!!(2&t);if(1&t){const t=jj(1,e,n);return t?n?kL(bL(t)):t:Dt}return n?kL(e)||Dt:e}function Jj(e,t){const n=Bj(t,Jh(e));return!(!n||!(_M(n,16384)||32769&n.flags))}function zj(e,t,n){const r=cf(e);if(0===r.length)return;for(const t of Md(e))n&&4194304&t.flags||$j(e,t,Ev(t,8576,!0),ql(t));const i=t.valueDeclaration;if(i&&gu(i))for(const t of i.members)if(!Jv(t)&&!l_(t)){const n=ns(t);$j(e,n,qM(t.name.expression),ql(n))}if(r.length>1)for(const t of r)qj(e,t)}function $j(e,t,n,r){const i=t.valueDeclaration,o=Pc(i);if(o&&VD(o))return;const a=ff(e,n),s=2&wx(e)?Y_(e.symbol,264):void 0,c=i&&226===i.kind||o&&167===o.kind?i:void 0,l=is(t)===e.symbol?i:void 0;for(const n of a){const i=n.declaration&&is(ns(n.declaration))===e.symbol?n.declaration:void 0,o=l||i||(s&&!Q(ku(e),(e=>!!Ld(e,t.escapedName)&&!!pf(e,n.keyType)))?s:void 0);if(o&&!SS(r,n.type)){const e=bo(o,va.Property_0_of_type_1_is_not_assignable_to_2_index_type_3,Us(t),Ws(r),Ws(n.keyType),Ws(n.type));c&&o!==c&&fT(e,Rp(c,va._0_is_declared_here,Us(t))),ro.add(e)}}}function qj(e,t){const n=t.declaration,r=ff(e,t.keyType),i=2&wx(e)?Y_(e.symbol,264):void 0,o=n&&is(ns(n))===e.symbol?n:void 0;for(const n of r){if(n===t)continue;const r=n.declaration&&is(ns(n.declaration))===e.symbol?n.declaration:void 0,a=o||r||(i&&!Q(ku(e),(e=>!!_f(e,t.keyType)&&!!pf(e,n.keyType)))?i:void 0);a&&!SS(t.type,n.type)&&xo(a,va._0_index_type_1_is_not_assignable_to_2_index_type_3,Ws(t.keyType),Ws(t.type),Ws(n.keyType),Ws(n.type))}}function Vj(e,t){switch(e.escapedText){case"any":case"unknown":case"never":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":case"undefined":xo(e,t,e.escapedText)}}function Uj(e){let t=!1;if(e)for(let t=0;t{var i,o,a;n.default?(t=!0,i=n.default,o=e,a=r,function e(t){if(183===t.kind){const e=Ih(t);if(262144&e.flags)for(let n=a;n263===e.kind||264===e.kind))}(e);if(!n||n.length<=1)return;if(!Wj(n,ju(e).localTypeParameters,ml)){const t=Us(e);for(const e of n)xo(e.name,va.All_declarations_of_0_must_have_identical_type_parameters,t)}}}function Wj(e,t,n){const r=p(t),i=kf(t);for(const o of e){const e=n(o),a=e.length;if(ar)return!1;for(let n=0;n1)return _J(r.types[1],va.Classes_can_only_extend_a_single_class);t=!0}else{if(xn.assert(119===r.token),n)return _J(r,va.implements_clause_already_seen);n=!0}WB(r)}})(e)||LB(e.typeParameters,t)}(e),AL(e),tj(e,e.name),Uj(ml(e)),fL(e);const t=ns(e),n=ju(t),r=y_(n),i=$l(t);Kj(t),pL(t),function(e){const t=new Map,n=new Map,r=new Map;for(const o of e.members)if(176===o.kind)for(const e of o.parameters)rc(e,o)&&!Eu(e.name)&&i(t,e.name,e.name.escapedText,3);else{const e=Jv(o),a=o.name;if(!a)continue;const s=VD(a),c=s&&e?16:0,l=s?r:e?n:t,u=a&&vJ(a);if(u)switch(o.kind){case 177:i(l,a,u,1|c);break;case 178:i(l,a,u,2|c);break;case 172:i(l,a,u,3|c);break;case 174:i(l,a,u,8|c)}}function i(e,t,n,r){const i=e.get(n);if(i)if((16&i)!=(16&r))xo(t,va.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name,Gd(t));else{const o=!!(8&i),a=!!(8&r);o||a?o!==a&&xo(t,va.Duplicate_identifier_0,Gd(t)):i&r&-17?xo(t,va.Duplicate_identifier_0,Gd(t)):e.set(n,i|r)}else e.set(n,r)}}(e),33554432&e.flags||function(e){for(const t of e.members){const n=t.name;if(Jv(t)&&n){const t=vJ(n);switch(t){case"name":case"length":case"caller":case"arguments":if(z)break;case"prototype":xo(n,va.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1,t,oc(ns(e)))}}}}(e);const o=Sh(e);if(o){f(o.typeArguments,yR),M<2&&xB(o.parent,1);const t=kh(e);t&&t!==o&&KM(t.expression);const s=ku(n);s.length&&a((()=>{const t=s[0],a=xu(n),c=mp(a);if(function(e,t){const n=Vp(e,1);if(n.length){const r=n[0].declaration;r&&Rv(r,2)&&(OR(t,Cx(e.symbol))||xo(t,va.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private,Oa(e.symbol)))}}(c,o),yR(o.expression),Q(o.typeArguments)){f(o.typeArguments,yR);for(const e of pu(c,o.typeArguments,o))if(!aL(o,e.typeParameters))break}const l=y_(t,n.thisType);PS(r,l,void 0)?PS(i,mS(c),e.name||e,va.Class_static_side_0_incorrectly_extends_base_class_static_side_1):Yj(e,r,l,va.Class_0_incorrectly_extends_base_class_1),8650752&a.flags&&(ru(i)?Vp(a,1).some((e=>4&e.flags))&&!Bv(e,64)&&xo(e.name||e,va.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract):xo(e.name||e,va.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any)),c.symbol&&32&c.symbol.flags||8650752&a.flags||f(bu(c,o.typeArguments,o),(e=>!rO(e.declaration)&&!gS(Gf(e),t)))&&xo(o.expression,va.Base_constructors_must_all_have_the_same_return_type),function(e,t){var n,r,i,o,a;const s=Rd(t),c=new Map;e:for(const l of s){const s=Zj(l);if(4194304&s.flags)continue;const u=Ld(e,s.escapedName);if(!u)continue;const _=Zj(u),d=fx(s);if(xn.assert(!!_,"derived should point to something, even if it is the base class' declaration."),_===s){const r=Cx(e.symbol);if(64&d&&(!r||!Bv(r,64))){for(const n of ku(e)){if(n===t)continue;const e=Ld(n,s.escapedName),r=e&&Zj(e);if(r&&r!==s)continue e}const i=Ws(t),o=Ws(e),a=Us(l),u=ue(null==(n=c.get(r))?void 0:n.missedProperties,a);c.set(r,{baseTypeName:i,typeName:o,missedProperties:u})}}else{const n=fx(_);if(2&d||2&n)continue;let c;const l=98308&s.flags,u=98308&_.flags;if(l&&u){if((6&px(s)?null==(r=s.declarations)?void 0:r.some((e=>eR(e,d))):null==(i=s.declarations)?void 0:i.every((e=>eR(e,d))))||262144&px(s)||_.valueDeclaration&&uP(_.valueDeclaration))continue;const c=4!==l&&4===u,p=4===l&&4!==u;if(c||p){const n=c?va._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:va._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;xo(Pc(_.valueDeclaration)||_.valueDeclaration,n,Us(s),Ws(t),Ws(e))}else if(z){const r=null==(o=_.declarations)?void 0:o.find((e=>172===e.kind&&!e.initializer));if(r&&!(33554432&_.flags)&&!(64&d)&&!(64&n)&&!(null==(a=_.declarations)?void 0:a.some((e=>!!(33554432&e.flags))))){const n=CC(Cx(e.symbol)),i=r.name;if(r.exclamationToken||!n||!qD(i)||!U||!nR(i,e,n)){const e=va.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration;xo(Pc(_.valueDeclaration)||_.valueDeclaration,e,Us(s),Ws(t))}}}continue}if(lA(s)){if(lA(_)||4&_.flags)continue;xn.assert(!!(98304&_.flags)),c=va.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor}else c=98304&s.flags?va.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:va.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;xo(Pc(_.valueDeclaration)||_.valueDeclaration,c,Ws(t),Us(s),Ws(e))}}for(const[e,t]of c)if(1===p(t.missedProperties))mP(e)?xo(e,va.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,Te(t.missedProperties),t.baseTypeName):xo(e,va.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,t.typeName,Te(t.missedProperties),t.baseTypeName);else if(p(t.missedProperties)>5){const n=O(t.missedProperties.slice(0,4),(e=>`'${e}'`)).join(", "),r=p(t.missedProperties)-4;mP(e)?xo(e,va.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more,t.baseTypeName,n,r):xo(e,va.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more,t.typeName,t.baseTypeName,n,r)}else{const n=O(t.missedProperties,(e=>`'${e}'`)).join(", ");mP(e)?xo(e,va.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1,t.baseTypeName,n):xo(e,va.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2,t.typeName,t.baseTypeName,n)}}(n,t)}))}!function(e,t,n,r){const i=Sh(e)&&ku(t),o=(null==i?void 0:i.length)?y_(Te(i),t.thisType):void 0,a=xu(t);for(const i of e.members)Vv(i)||(fE(i)&&f(i.parameters,(s=>{rc(s,i)&&Xj(e,r,a,o,t,n,s,!0)})),Xj(e,r,a,o,t,n,i,!1))}(e,n,r,i);const s=Th(e);if(s)for(const e of s)vb(e.expression)&&!Sl(e.expression)||xo(e.expression,va.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),cL(e),a(c(e));function c(t){return()=>{const i=Sp(Sx(t));if(!Nc(i))if(Du(i)){const t=i.symbol&&32&i.symbol.flags?va.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:va.Class_0_incorrectly_implements_interface_1,o=y_(i,n.thisType);PS(r,o,void 0)||Yj(e,r,o,t)}else xo(t,va.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members)}}a((()=>{zj(n,t),zj(i,t,!0),ZM(e),function(e){if(!U||!X||33554432&e.flags)return;const t=CC(e);for(const n of e.members)if(!(128&Qv(n))&&!Jv(n)&&tR(n)){const e=n.name;if(qD(e)||VD(e)||oE(e)){const r=$l(ns(n));3&r.flags||ak(r)||t&&nR(e,r,t)||xo(n.name,va.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor,Ap(e))}}}(e)}))}function Xj(e,t,n,r,i,o,a,s,c=!0){const l=a.name&&JR(a.name)||JR(a);return l?Qj(e,t,n,r,i,o,$v(a),qv(a),Jv(a),s,Sc(l),c?a:void 0):0}function Qj(e,t,n,r,i,o,a,s,c,l,u,_){const d=Mm(e),p=!!(33554432&e.flags);if(r&&(a||A.noImplicitOverride)){const e=yc(u),i=c?n:r,f=Jp(c?t:o,e),m=Jp(i,e),g=Ws(r);if(f&&!m&&a){if(_){const e=$A(u,i);e?xo(_,d?va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,g,Us(e)):xo(_,d?va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0,g)}return 2}if(f&&(null==m?void 0:m.declarations)&&A.noImplicitOverride&&!p){const e=Q(m.declarations,qv);if(a)return 0;if(!e)return _&&xo(_,l?d?va.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:va.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:d?va.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:va.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0,g),1;if(s&&e)return _&&xo(_,va.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0,g),1}}else if(a){if(_){const e=Ws(i);xo(_,d?va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:va.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class,e)}return 2}return 0}function Yj(e,t,n,r){let i=!1;for(const r of e.members){if(Jv(r))continue;const e=r.name&&JR(r.name)||JR(r);if(e){const o=Jp(t,e.escapedName),a=Jp(n,e.escapedName);if(o&&a){const s=()=>uS(void 0,va.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,Us(e),Ws(t),Ws(n));PS($l(o),$l(a),r.name||r,void 0,s)||(i=!0)}}}i||PS(t,n,e.name||e,r)}function Zj(e){return 1&px(e)?e.links.target:e}function eR(e,t){return 64&t&&(!uE(e)||!e.initializer)||XP(e.parent)}function tR(e){return 172===e.kind&&!qv(e)&&!e.exclamationToken&&!e.initializer}function nR(e,t,n){const r=oE(e)?YC.createElementAccessExpression(YC.createThis(),e.expression):YC.createPropertyAccessExpression(YC.createThis(),e);return OT(r.expression,r),OT(r,n),r.flowNode=n.returnFlowNode,!ak(XD(r,t,XT(t)))}function rR(e){const t=Wo(e);if(!(1024&t.flags)){t.flags|=1024;let n,r=0;for(const t of e.members){const e=iR(t,r,n);Wo(t).enumMemberValue=e,r="number"==typeof e.value?e.value+1:void 0,n=t}}}function iR(e,t,n){if(Op(e.name))xo(e.name,va.Computed_property_names_are_not_allowed_in_enums);else{const t=Lp(e.name);WT(t)&&!qT(t)&&xo(e.name,va.An_enum_member_cannot_have_a_numeric_name)}if(e.initializer)return function(e){const t=tf(e.parent),n=e.initializer,r=_e(n,e);return void 0!==r.value?t&&"number"==typeof r.value&&!isFinite(r.value)?xo(n,isNaN(r.value)?va.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:va.const_enum_member_initializer_was_evaluated_to_a_non_finite_value):NS(A)&&"string"==typeof r.value&&!r.isSyntacticallyString&&xo(n,va._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled,`${bc(e.parent.name)}.${Lp(e.name)}`):t?xo(n,va.const_enum_member_initializers_must_be_constant_expressions):33554432&e.parent.flags?xo(n,va.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):PS(KM(n),zt,n,va.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values),r}(e);if(33554432&e.parent.flags&&!tf(e.parent))return SC(void 0);if(void 0===t)return xo(e.name,va.Enum_member_must_have_initializer),SC(void 0);if(NS(A)&&(null==n?void 0:n.initializer)){const t=aB(n);("number"!=typeof t.value||t.resolvedOtherFiles)&&xo(e.name,va.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled)}return SC(t)}function oR(e,t){const n=Ma(e,111551,!0);if(!n)return SC(void 0);if(80===e.kind){const t=e;if(qT(t.escapedText)&&n===qh(t.escapedText,111551,void 0))return SC(+t.escapedText,!1)}if(8&n.flags)return t?aR(e,n,t):aB(n.valueDeclaration);if(wE(n)){const e=n.valueDeclaration;if(e&&KP(e)&&!e.type&&e.initializer&&(!t||e!==t&&Xo(e,t))){const n=_e(e.initializer,e);return t&&Sd(t)!==Sd(e)?SC(n.value,!1,!0,!0):SC(n.value,n.isSyntacticallyString,n.resolvedOtherFiles,!0)}}return SC(void 0)}function aR(e,t,n){const r=t.valueDeclaration;if(!r||r===n)return xo(e,va.Property_0_is_used_before_being_assigned,Us(t)),SC(void 0);if(!Xo(r,n))return xo(e,va.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums),SC(0);const i=aB(r);return n.parent!==r.parent?SC(i.value,i.isSyntacticallyString,i.resolvedOtherFiles,!0):i}function sR(e){VD(e.name)&&xo(e,va.An_enum_member_cannot_be_named_with_a_private_identifier),e.initializer&&KM(e.initializer)}function cR(e,t){switch(e.kind){case 243:for(const n of e.declarationList.declarations)cR(n,t);break;case 277:case 278:_J(e,va.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 271:case 272:_J(e,va.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 208:case 260:const n=e.name;if(Eu(n)){for(const e of n.elements)cR(e,t);break}case 263:case 266:case 262:case 264:case 267:case 265:if(t)return}}function lR(e){const t=Cg(e);if(!t||Nd(t))return!1;if(!wD(t))return xo(t,va.String_literal_expected),!1;const n=268===e.parent.kind&&sp(e.parent.parent);if(307!==e.parent.kind&&!n)return xo(t,278===e.kind?va.Export_declarations_are_not_permitted_in_a_namespace:va.Import_declarations_in_a_namespace_cannot_reference_a_module),!1;if(n&&Os(t.text)&&!tc(e))return xo(e,va.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),!1;if(!rN(e)&&e.attributes){const t=118===e.attributes.token?va.Import_attribute_values_must_be_string_literal_expressions:va.Import_assertion_values_must_be_string_literal_expressions;let n=!1;for(const r of e.attributes.elements)wD(r.value)||(n=!0,xo(r.value,t));return!n}return!0}function uR(e){var t,n,r,i;let o=ns(e);const a=Ea(o);if(a!==ht){if(o=ts(o.exportSymbol||o),Mm(e)&&!(111551&a.flags)&&!Wl(e)){const s=Vl(e)?e.propertyName||e.name:Dc(e)?e.name:e;if(xn.assert(280!==e.kind),281===e.kind){const i=xo(s,va.Types_cannot_appear_in_export_declarations_in_JavaScript_files),o=null==(n=null==(t=Sd(e).symbol)?void 0:t.exports)?void 0:n.get((e.propertyName||e.name).escapedText);if(o===a){const e=null==(r=o.declarations)?void 0:r.find(P_);e&&fT(i,Rp(e,va._0_is_automatically_exported_here,vc(o.escapedName)))}}else{xn.assert(260!==e.kind);const t=mc(e,_n(iN,rN)),n=(t&&(null==(i=Sg(t))?void 0:i.text))??"...",r=vc(qD(s)?s.escapedText:o.escapedName);xo(s,va._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation,r,`import("${n}").${r}`)}return}const s=Pa(a);if(s&((1160127&o.flags?111551:0)|(788968&o.flags?788968:0)|(1920&o.flags?1920:0))?xo(e,281===e.kind?va.Export_declaration_conflicts_with_exported_declaration_of_0:va.Import_declaration_conflicts_with_local_declaration_of_0,Us(o)):281!==e.kind&&A.isolatedModules&&!mc(e,Wl)&&1160127&o.flags&&xo(e,va.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,Us(o),Ne),NS(A)&&!Wl(e)&&!(33554432&e.flags)){const t=Aa(o),n=!(111551&s);if(n||t)switch(e.kind){case 273:case 276:case 271:if(A.verbatimModuleSyntax){xn.assertIsDefined(e.name,"An ImportClause with a symbol should have a name");const r=A.verbatimModuleSyntax&&Fm(e)?va.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:n?va._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:va._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled,i=bc(276===e.kind&&e.propertyName||e.name);Zo(xo(e,r,i),n?void 0:t,i)}n&&271===e.kind&&Rv(e,32)&&xo(e,va.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled,Ne);break;case 281:if(A.verbatimModuleSyntax||Sd(t)!==Sd(e)){const r=bc(e.propertyName||e.name);Zo(n?xo(e,va.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type,Ne):xo(e,va._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled,r,Ne),n?void 0:t,r);break}}!A.verbatimModuleSyntax||271===e.kind||Mm(e)||1!==B&&1!==Sd(e).impliedNodeFormat||xo(e,va.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}if(fN(e)){const t=_R(o,e);wo(t)&&t.declarations&&Eo(e,t.declarations,t.escapedName)}}}function _R(e,t){if(!(2097152&e.flags)||wo(e)||!sa(e))return e;const n=Ea(e);if(n===ht)return n;for(;2097152&e.flags;){const r=jF(e);if(!r)break;if(r===n)break;if(r.declarations&&p(r.declarations)){if(wo(r)){Eo(t,r.declarations,r.escapedName);break}if(e===n)break;e=r}}return n}function dR(e){tj(e,e.name),uR(e),276===e.kind&&"default"===bc(e.propertyName||e.name)&&FS(A)&&4!==B&&(B<5||1===Sd(e).impliedNodeFormat)&&xB(e,131072)}function pR(e){var t;const n=e.attributes;if(n){const r=ny(!0);r!==wn&&PS(function(e){const t=Wo(e);if(!t.resolvedType){const n=No(4096,"__importAttributes"),r=ed();f(e.elements,(e=>{const t=No(4,xC(e));t.parent=n,t.links.type=function(e){return sx(DM(e.value))}(e),t.links.target=t,r.set(t.escapedName,t)}));const i=ks(n,r,u,u,u);i.objectFlags|=262272,t.resolvedType=i}return t.resolvedType}(n),KT(r,32768),n);const i=qq(e),o=Kq(n,i?pJ:void 0),a=118===e.attributes.token;if(i&&o)return;if(99!==(199===B&&e.moduleSpecifier&&pa(e.moduleSpecifier))&&99!==B&&200!==B)return pJ(n,a?199===B?va.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:va.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:199===B?va.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:va.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve);if(AF(e)||(iN(e)?null==(t=e.importClause)?void 0:t.isTypeOnly:e.isTypeOnly))return pJ(n,a?va.Import_attributes_cannot_be_used_with_type_only_imports_or_exports:va.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);if(o)return pJ(n,va.resolution_mode_can_only_be_set_for_type_only_imports)}}function fR(e,t){const n=307===e.parent.kind||268===e.parent.kind||267===e.parent.kind;return n||_J(e,t),!n}function mR(e){if(uR(e),LS(A)&&lc(e.propertyName||e.name,!0),e.parent.parent.moduleSpecifier)FS(A)&&4!==B&&(B<5||1===Sd(e).impliedNodeFormat)&&"default"===bc(e.propertyName||e.name)&&xB(e,131072);else{const t=e.propertyName||e.name,n=je(t,t.escapedText,2998271,void 0,!0);n&&(n===ge||n===he||n.declarations&&Yp(kc(n.declarations[0])))?xo(t,va.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,bc(t)):eP(e,7)}}function gR(e){const t=ns(e),n=Uo(t);if(!n.exportsChecked){const e=t.exports.get("export=");if(e&&function(e){return ld(e.exports,((e,t)=>"export="!==t))}(t)){const t=sa(e)||e.valueDeclaration;!t||tc(t)||Mm(t)||xo(t,va.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}const r=Qa(t);r&&r.forEach((({declarations:e,flags:t},n)=>{if("__export"===n)return;if(1920&t)return;const r=N(e,un(PB,dn(XP)));if(!(524288&t&&r<=2)&&r>1&&!hR(e))for(const t of e)jB(t)&&ro.add(Rp(t,va.Cannot_redeclare_exported_variable_0,vc(n)))})),n.exportsChecked=!0}}function hR(e){return e&&e.length>1&&e.every((e=>Mm(e)&&Ox(e)&&(rg(e.expression)||og(e.expression))))}function yR(e){if(e){const n=r;r=e,h=0,function(e){Rg(e)&&f(e.jsDoc,(({comment:t,tags:n})=>{vR(t),f(n,(t=>{vR(t.comment),Mm(e)&&yR(t)}))}));const n=e.kind;if(t)switch(n){case 267:case 263:case 264:case 262:t.throwIfCancellationRequested()}switch(n>=243&&n<=259&&jg(e)&&e.flowNode&&!UD(e.flowNode)&&ko(!1===A.allowUnreachableCode,e,va.Unreachable_code_detected),n){case 168:return WM(e);case 169:return HM(e);case 172:return eL(e);case 171:return function(e){return VD(e.name)&&xo(e,va.Private_identifiers_are_not_allowed_outside_class_bodies),eL(e)}(e);case 185:case 184:case 179:case 180:case 181:return XM(e);case 174:case 173:return function(e){rJ(e)||GB(e.name),dE(e)&&e.asteriskToken&&qD(e.name)&&"constructor"===bc(e.name)&&xo(e.name,va.Class_constructor_may_not_be_a_generator),OL(e),Bv(e,64)&&174===e.kind&&e.body&&xo(e,va.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,Ap(e.name)),VD(e.name)&&!Zf(e)&&xo(e,va.Private_identifiers_are_not_allowed_outside_class_bodies),tL(e)}(e);case 175:return function(e){CB(e),LI(e,yR)}(e);case 176:return function(e){XM(e),function(e){const t=Mm(e)?wv(e):void 0,n=e.typeParameters||t&&Se(t);if(n){const t=n.pos===n.end?n.pos:as(Sd(e).text,n.pos);return dJ(e,t,n.end-t,va.Type_parameters_cannot_appear_on_a_constructor_declaration)}}(e)||function(e){const t=e.type||Cv(e);t&&pJ(t,va.Type_annotation_cannot_appear_on_a_constructor_declaration)}(e),yR(e.body);const t=ns(e),n=Y_(t,e.kind);function r(e){return!!Zl(e)||172===e.kind&&!Jv(e)&&!!e.initializer}e===n&&pL(t),Nd(e.body)||a((function(){const t=e.parent;if(kh(t)){JP(e.parent,t);const n=$P(t),i=zP(e.body);if(i){if(n&&xo(i,va.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null),!$&&(Q(e.parent.members,r)||Q(e.parameters,(e=>Bv(e,31)))))if(function(e,t){const n=ah(e.parent);return NP(n)&&n.parent===t}(i,e.body)){let t;for(const n of e.body.statements){if(NP(n)&&lf(fA(n.expression))){t=n;break}if(nL(n))break}void 0===t&&xo(e,va.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers)}else xo(i,va.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers)}else n||xo(e,va.Constructors_for_derived_classes_must_contain_a_super_call)}}))}(e);case 177:case 178:return rL(e);case 183:return cL(e);case 182:return function(e){const t=function(e){switch(e.parent.kind){case 219:case 179:case 262:case 218:case 184:case 174:case 173:const t=e.parent;if(e===t.type)return t}}(e);if(!t)return void xo(e,va.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);const n=Cf(t),r=Wf(n);if(!r)return;yR(e.type);const{parameterName:i}=e;if(0===r.kind||2===r.kind)vx(i);else if(r.parameterIndex>=0){if(JB(n)&&r.parameterIndex===n.parameters.length-1)xo(i,va.A_type_predicate_cannot_reference_a_rest_parameter);else if(r.type){const t=()=>uS(void 0,va.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);PS(r.type,$l(n.parameters[r.parameterIndex]),e.type,void 0,t)}}else if(i){let n=!1;for(const{name:e}of t.parameters)if(Eu(e)&&GM(e,i,r.parameterName)){n=!0;break}n||xo(e.parameterName,va.Cannot_find_parameter_0,r.parameterName)}}(e);case 186:return function(e){Lh(e)}(e);case 187:return function(e){f(e.members,yR),a((function(){const t=Xb(e);zj(t,t.symbol),ZM(e),YM(e)}))}(e);case 188:return function(e){yR(e.elementType)}(e);case 189:return function(e){let t=!1,n=!1;for(const r of e.elements){let e=Cy(r);if(8&e){const t=Sx(r.type);if(!Hk(t)){xo(r,va.A_rest_element_type_must_be_an_array_type);break}(qk(t)||PT(t)&&4&t.target.combinedFlags)&&(e|=4)}if(4&e){if(n){pJ(r,va.A_rest_element_cannot_follow_another_rest_element);break}n=!0}else if(2&e){if(n){pJ(r,va.An_optional_element_cannot_follow_a_rest_element);break}t=!0}else if(1&e&&t){pJ(r,va.A_required_element_cannot_follow_an_optional_element);break}}f(e.elements,yR),Sx(e)}(e);case 192:case 193:return function(e){f(e.types,yR),Sx(e)}(e);case 196:case 190:case 191:return yR(e.type);case 197:return function(e){vx(e)}(e);case 198:return function(e){!function(e){if(158===e.operator){if(155!==e.type.kind)return pJ(e.type,va._0_expected,Ra(155));let t=oh(e.parent);if(Mm(t)&&UN(t)){const e=Wg(t);e&&(t=Mg(e)||e)}switch(t.kind){case 260:const n=t;if(80!==n.name.kind)return pJ(e,va.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);if(!Mf(n))return pJ(e,va.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);if(!(2&n.parent.flags))return pJ(t.name,va.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);break;case 172:if(!Jv(t)||!Kv(t))return pJ(t.name,va.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);break;case 171:if(!Bv(t,8))return pJ(t.name,va.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);break;default:pJ(e,va.unique_symbol_types_are_not_allowed_here)}}else 148===e.operator&&188!==e.type.kind&&189!==e.type.kind&&_J(e,va.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types,Ra(155))}(e),yR(e.type)}(e);case 194:return function(e){LI(e,yR)}(e);case 195:return function(e){mc(e,(e=>e.parent&&194===e.parent.kind&&e.parent.extendsType===e))||pJ(e,va.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type),yR(e.typeParameter);const t=ns(e.typeParameter);if(t.declarations&&t.declarations.length>1){const e=Uo(t);if(!e.typeParametersChecked){e.typeParametersChecked=!0;const n=Lu(t),r=Z_(t,168);if(!Wj(r,[n],(e=>[e]))){const e=Us(t);for(const t of r)xo(t.name,va.All_declarations_of_0_must_have_identical_constraints,e)}}}ML(e)}(e);case 203:return function(e){for(const t of e.templateSpans)yR(t.type),PS(Sx(t.type),hn,t.type);Sx(e)}(e);case 205:return function(e){yR(e.argument),e.attributes&&Kq(e.attributes,pJ),lL(e)}(e);case 202:return function(e){e.dotDotDotToken&&e.questionToken&&pJ(e,va.A_tuple_member_cannot_be_both_optional_and_rest),190===e.type.kind&&pJ(e.type,va.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type),191===e.type.kind&&pJ(e.type,va.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type),yR(e.type),Sx(e)}(e);case 328:return function(e){const t=Kg(e);if(!t||!GP(t)&&!mP(t))return void xo(t,va.JSDoc_0_is_not_attached_to_a_class,bc(e.tagName));const n=ll(t).filter(cF);xn.assert(n.length>0),n.length>1&&xo(n[1],va.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);const r=IL(e.class.expression),i=kh(t);if(i){const t=IL(i.expression);t&&r.escapedText!==t.escapedText&&xo(r,va.JSDoc_0_1_does_not_match_the_extends_2_clause,bc(e.tagName),bc(r),bc(t))}}(e);case 329:return function(e){const t=Kg(e);t&&(GP(t)||mP(t))||xo(t,va.JSDoc_0_is_not_attached_to_a_class,bc(e.tagName))}(e);case 346:case 338:case 340:return function(e){e.typeExpression||xo(e.name,va.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),e.name&&Vj(e.name,va.Type_alias_name_cannot_be_0),yR(e.typeExpression),Uj(ml(e))}(e);case 345:return function(e){yR(e.constraint);for(const t of e.typeParameters)yR(t)}(e);case 344:return function(e){yR(e.typeExpression)}(e);case 324:case 325:case 326:return function(e){e.name&&RR(e.name,!0)}(e);case 341:case 348:return function(e){yR(e.typeExpression)}(e);case 317:!function(e){a((function(){e.type||Ng(e)||zC(e,St)})),XM(e)}(e);case 315:case 314:case 312:case 313:case 322:return bR(e),void LI(e,yR);case 318:return void function(e){bR(e),yR(e.type);const{parent:t}=e;if(sE(t)&&nF(t.parent))return void(De(t.parent.parameters)!==t&&xo(e,va.A_rest_parameter_must_be_last_in_a_parameter_list));UN(t)||xo(e,va.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const n=e.parent.parent;if(!xF(n))return void xo(e,va.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const r=$g(n);if(!r)return;const i=Ug(n);i&&De(i.parameters).symbol===r||xo(e,va.A_rest_parameter_must_be_last_in_a_parameter_list)}(e);case 309:return yR(e.type);case 333:case 335:case 334:return function(e){const t=Wg(e);t&&Zl(t)&&xo(e,va.An_accessibility_modifier_cannot_be_used_with_a_private_identifier)}(e);case 350:return function(e){yR(e.typeExpression);const t=Kg(e);if(t){const e=dl(t,NF);if(p(e)>1)for(let t=1;t{var i;297!==e.kind||n||(void 0===t?t=e:(pJ(e,va.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),n=!0)),296===e.kind&&a((i=e,()=>{const e=KM(i.expression);xM(r,e)||XS(e,r,i.expression,void 0)})),f(e.statements,yR),A.noFallthroughCasesInSwitch&&e.fallthroughFlowNode&&UD(e.fallthroughFlowNode)&&xo(e,va.Fallthrough_case_in_switch)})),e.caseBlock.locals&&ML(e.caseBlock)}(e);case 256:return function(e){mJ(e)||mc(e.parent,(t=>cu(t)?"quit":256===t.kind&&t.label.escapedText===e.label.escapedText&&(pJ(e.label,va.Duplicate_label_0,Gd(e.label)),!0))),yR(e.statement)}(e);case 257:return function(e){mJ(e)||qD(e.expression)&&!e.expression.escapedText&&function(e,t,...n){const r=Sd(e);if(!uJ(r)){const i=Gp(r,e.pos);ro.add(aS(r,js(i),0,t,...n))}}(e,va.Line_break_not_permitted_here),e.expression&&KM(e.expression)}(e);case 258:return function(e){mJ(e),GL(e.tryBlock);const t=e.catchClause;if(t){if(t.variableDeclaration){const e=t.variableDeclaration;rj(e);const n=kv(e);if(n){const e=Sx(n);!e||3&e.flags||_J(n,va.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified)}else if(e.initializer)_J(e.initializer,va.Catch_clause_variable_cannot_have_an_initializer);else{const e=t.block.locals;e&&ud(t.locals,(t=>{const n=e.get(t);(null==n?void 0:n.valueDeclaration)&&0!=(2&n.flags)&&pJ(n.valueDeclaration,va.Cannot_redeclare_identifier_0_in_catch_clause,vc(t))}))}}GL(t.block)}e.finallyBlock&&GL(e.finallyBlock)}(e);case 260:return aj(e);case 208:return function(e){return function(e){if(e.dotDotDotToken){const t=e.parent.elements;if(e!==De(t))return pJ(e,va.A_rest_element_must_be_last_in_a_destructuring_pattern);if(EB(t,va.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),e.propertyName)return pJ(e.name,va.A_rest_element_cannot_have_a_property_name)}e.dotDotDotToken&&e.initializer&&dJ(e,e.initializer.pos-1,1,va.A_rest_element_cannot_have_an_initializer)}(e),rj(e)}(e);case 263:return function(e){const t=S(e.modifiers,cE);J&&t&&Q(e.members,(e=>zv(e)&&Zl(e)))&&pJ(t,va.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator),e.name||Bv(e,2048)||_J(e,va.A_class_declaration_without_the_default_modifier_must_have_a_name),Gj(e),f(e.members,yR),ML(e)}(e);case 264:return function(e){CB(e)||function(e){let t=!1;if(e.heritageClauses)for(const n of e.heritageClauses){if(96!==n.token)return xn.assert(119===n.token),_J(n,va.Interface_declaration_cannot_have_implements_clause);if(t)return _J(n,va.extends_clause_already_seen);t=!0,WB(n)}}(e),Uj(e.typeParameters),a((()=>{Vj(e.name,va.Interface_name_cannot_be_0),fL(e);const t=ns(e);Kj(t);const n=Y_(t,264);if(e===n){const n=ju(t),r=y_(n);if(function(e,t){const n=ku(e);if(n.length<2)return!0;const r=new Map;f(o_(e).declaredProperties,(t=>{r.set(t.escapedName,{prop:t,containingType:e})}));let i=!0;for(const o of n){const n=Rd(y_(o,e.thisType));for(const a of n){const n=r.get(a.escapedName);if(n){if(n.containingType!==e&&0===Bk(n.prop,a,hS)){i=!1;const r=Ws(n.containingType),s=Ws(o);let c=uS(void 0,va.Named_property_0_of_types_1_and_2_are_not_identical,Us(a),r,s);c=uS(c,va.Interface_0_cannot_simultaneously_extend_types_1_and_2,Ws(e),r,s),ro.add(zp(Sd(t),t,c))}}else r.set(a.escapedName,{prop:a,containingType:o})}}return i}(n,e.name)){for(const t of ku(n))PS(r,y_(t,n.thisType),e.name,va.Interface_0_incorrectly_extends_interface_1);zj(n,t)}}YM(e)})),f(wh(e),(e=>{vb(e.expression)&&!Sl(e.expression)||xo(e.expression,va.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),cL(e)})),f(e.members,yR),a((()=>{ZM(e),ML(e)}))}(e);case 265:return function(e){CB(e),Vj(e.name,va.Type_alias_name_cannot_be_0),fL(e),Uj(e.typeParameters),141===e.type.kind?NB.has(e.name.escapedText)&&1===p(e.typeParameters)||xo(e.type,va.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types):(yR(e.type),ML(e))}(e);case 266:return function(e){a((()=>function(e){CB(e),tj(e,e.name),fL(e),e.members.forEach(sR),rR(e);const t=ns(e);if(e===Y_(t,e.kind)){if(t.declarations&&t.declarations.length>1){const n=tf(e);f(t.declarations,(e=>{YP(e)&&tf(e)!==n&&xo(Pc(e),va.Enum_declarations_must_all_be_const_or_non_const)}))}let n=!1;f(t.declarations,(e=>{if(266!==e.kind)return!1;const t=e;if(!t.members.length)return!1;const r=t.members[0];r.initializer||(n?xo(r.name,va.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):n=!0)}))}}(e)))}(e);case 267:return function(e){e.body&&(yR(e.body),pp(e)||ML(e)),a((function(){var t,n;const r=pp(e),i=33554432&e.flags;r&&!i&&xo(e.name,va.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);const o=sp(e),a=o?va.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:va.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;if(fR(e,a))return;CB(e)||i||11!==e.name.kind||pJ(e.name,va.Only_ambient_modules_can_use_quoted_names),qD(e.name)&&tj(e,e.name),fL(e);const s=ns(e);if(512&s.flags&&!i&&MB(e,jS(A))){if(NS(A)&&!Sd(e).externalModuleIndicator&&xo(e.name,va.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement,Ne),(null==(t=s.declarations)?void 0:t.length)>1){const t=function(e){const t=e.declarations;if(t)for(const e of t)if((263===e.kind||262===e.kind&&Fd(e.body))&&!(33554432&e.flags))return e}(s);t&&(Sd(e)!==Sd(t)?xo(e.name,va.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):e.pos95===e.kind));t&&xo(t,va.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}}if(o)if(fp(e)){if((r||33554432&ns(e).flags)&&e.body)for(const t of e.body.statements)cR(t,r)}else Yp(e.parent)?r?xo(e.name,va.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):Os(Hh(e.name))&&xo(e.name,va.Ambient_module_declaration_cannot_specify_relative_module_name):xo(e.name,r?va.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:va.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)}))}(e);case 272:return function(e){if(!fR(e,Mm(e)?va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!CB(e)&&e.modifiers&&_J(e,va.An_import_declaration_cannot_have_modifiers),lR(e)){const t=e.importClause;t&&!function(e){var t;return e.isTypeOnly&&e.name&&e.namedBindings?pJ(e,va.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both):!(!e.isTypeOnly||275!==(null==(t=e.namedBindings)?void 0:t.kind))&&hJ(e.namedBindings)}(t)&&(t.name&&dR(t),t.namedBindings)&&(274===t.namedBindings.kind?(dR(t.namedBindings),4!==B&&(B<5||1===Sd(e).impliedNodeFormat)&&FS(A)&&xB(e,65536)):ja(e,e.moduleSpecifier)&&f(t.namedBindings.elements,dR))}pR(e)}}(e);case 271:return function(e){if(!fR(e,Mm(e)?va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)&&(CB(e),Fm(e)||lR(e)))if(dR(e),eP(e,6),283!==e.moduleReference.kind){const t=Ea(ns(e));if(t!==ht){const n=Pa(t);if(111551&n){const t=bb(e.moduleReference);1920&Ma(t,112575).flags||xo(t,va.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,Ap(t))}788968&n&&Vj(e.name,va.Import_name_cannot_be_0)}e.isTypeOnly&&pJ(e,va.An_import_alias_cannot_use_import_type)}else!(B>=5&&200!==B&&void 0===Sd(e).impliedNodeFormat)||e.isTypeOnly||33554432&e.flags||pJ(e,va.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(e);case 278:return function(e){if(!fR(e,Mm(e)?va.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:va.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!CB(e)&&jv(e)&&_J(e,va.An_export_declaration_cannot_have_modifiers),function(e){var t;e.isTypeOnly&&279===(null==(t=e.exportClause)?void 0:t.kind)&&hJ(e.exportClause)}(e),!e.moduleSpecifier||lR(e))if(e.exportClause&&!dN(e.exportClause)){f(e.exportClause.elements,mR);const t=268===e.parent.kind&&sp(e.parent.parent),n=!t&&268===e.parent.kind&&!e.moduleSpecifier&&33554432&e.flags;307===e.parent.kind||t||n||xo(e,va.Export_declarations_are_not_permitted_in_a_namespace)}else{const t=ja(e,e.moduleSpecifier);t&&Ua(t)?xo(e.moduleSpecifier,va.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,Us(t)):e.exportClause&&uR(e.exportClause),4!==B&&(B<5||1===Sd(e).impliedNodeFormat)&&(e.exportClause?FS(A)&&xB(e,65536):xB(e,32768))}pR(e)}}(e);case 277:return function(e){if(fR(e,e.isExportEquals?va.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:va.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration))return;const t=307===e.parent.kind?e.parent:e.parent.parent;if(267===t.kind&&!sp(t))return void(e.isExportEquals?xo(e,va.An_export_assignment_cannot_be_used_in_a_namespace):xo(e,va.A_default_export_can_only_be_used_in_an_ECMAScript_style_module));!CB(e)&&Lv(e)&&_J(e,va.An_export_assignment_cannot_have_modifiers);const n=kv(e);n&&PS(DM(e.expression),Sx(n),e.expression);const r=!e.isExportEquals&&!(33554432&e.flags)&&A.verbatimModuleSyntax&&(1===B||1===Sd(e).impliedNodeFormat);if(80===e.expression.kind){const t=e.expression,n=_s(Ma(t,-1,!0,!0,e));if(n){eP(e,3);const i=Aa(n,111551);if(111551&Pa(n)?(DM(t),r||33554432&e.flags||!A.verbatimModuleSyntax||!i||xo(t,e.isExportEquals?va.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:va.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,bc(t))):r||33554432&e.flags||!A.verbatimModuleSyntax||xo(t,e.isExportEquals?va.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:va.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type,bc(t)),!r&&!(33554432&e.flags)&&NS(A)&&!(111551&n.flags)){const r=Pa(n,!1,!0);!(2097152&n.flags&&788968&r)||111551&r||i&&Sd(i)===Sd(e)?i&&Sd(i)!==Sd(e)&&Zo(xo(t,e.isExportEquals?va._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:va._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,bc(t),Ne),i,bc(t)):xo(t,e.isExportEquals?va._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:va._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,bc(t),Ne)}}else DM(t);LS(A)&&lc(t,!0)}else DM(e.expression);r&&xo(e,va.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled),gR(t),33554432&e.flags&&!vb(e.expression)&&pJ(e.expression,va.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),e.isExportEquals&&(B>=5&&200!==B&&(33554432&e.flags&&99===Sd(e).impliedNodeFormat||!(33554432&e.flags)&&1!==Sd(e).impliedNodeFormat)?pJ(e,va.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):4!==B||33554432&e.flags||pJ(e,va.Export_assignment_is_not_supported_when_module_flag_is_system))}(e);case 242:case 259:return void mJ(e);case 282:!function(e){AL(e)}(e)}}(e),r=n}}function vR(e){ot(e)&&f(e,(e=>{q_(e)&&yR(e)}))}function bR(e){if(!Mm(e))if(eF(e)||ZN(e)){const t=Ra(eF(e)?54:58),n=e.postfix?va._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:va._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1,r=Sx(e.type);pJ(e,n,t,Ws(ZN(e)&&r!==en&&r!==Zt?ev(ue([r,It],e.postfix?void 0:Rt)):r))}else pJ(e,va.JSDoc_types_can_only_be_used_inside_documentation_comments)}function SR(e){const t=Wo(Sd(e));1&t.flags?xn.assert(!t.deferredNodes,"A type-checked file should have no deferred nodes."):(t.deferredNodes||(t.deferredNodes=new Set),t.deferredNodes.add(e))}function kR(e){var t,n;null==(t=or)||t.push(or.Phase.Check,"checkDeferredNode",{kind:e.kind,pos:e.pos,end:e.end,path:e.tracingPath});const o=r;switch(r=e,h=0,e.kind){case 213:case 214:case 215:case 170:case 286:iI(e);break;case 218:case 219:case 174:case 173:!function(e){xn.assert(174!==e.kind||$f(e));const t=Jh(e),n=Xf(e);if(tM(e,n),e.body)if(Cv(e)||Gf(Cf(e)),241===e.body.kind)yR(e.body);else{const r=KM(e.body),i=n&&Bj(n,t);if(i){const n=DI(e.body);IS(2==(3&t)?hL(r,!1,n,va.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):r,i,n,n)}}}(e);break;case 177:case 178:rL(e);break;case 231:!function(e){f(e.members,yR),ML(e)}(e);break;case 168:!function(e){var t,n;if(XP(e.parent)||gu(e.parent)||QP(e.parent)){const r=Lu(ns(e)),o=24576&Dk(r);if(o){const a=ns(e.parent);if(!QP(e.parent)||52&wx(ju(a))){if(8192===o||16384===o){null==(t=or)||t.push(or.Phase.CheckTypes,"checkTypeParameterDeferred",{parent:qy(ju(a)),id:qy(r)});const s=Ck(a,r,16384===o?zn:Jn),c=Ck(a,r,16384===o?Jn:zn),l=r;i=r,PS(s,c,e,va.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation),i=l,null==(n=or)||n.pop()}}else xo(e,va.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types)}}}(e);break;case 285:!function(e){iA(e)}(e);break;case 284:!function(e){iA(e.openingElement),JF(e.closingElement.tagName)?KF(e.closingElement):KM(e.closingElement.tagName),$F(e)}(e);break;case 216:case 234:case 217:!function(e){const{type:t}=mO(e),n=tP(e)?t:e,r=Wo(e);xn.assertIsDefined(r.assertionExpressionType);const i=AC(cT(r.assertionExpressionType)),o=Sx(t);Nc(o)||a((()=>{const e=RC(i);TS(o,e)||XS(i,o,n,va.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first)}))}(e);break;case 222:KM(e.expression);break;case 226:Eb(e)&&iI(e)}r=o,null==(n=or)||n.pop()}function TR(e,t){if(t)return!1;switch(e){case 0:return!!A.noUnusedLocals;case 1:return!!A.noUnusedParameters;default:return xn.assertNever(e)}}function CR(e){return fi.get(e.path)||u}function wR(n,r){try{return t=r,function(t){if(t){ER();const e=ro.getGlobalDiagnostics(),n=e.length;PR(t);const r=ro.getDiagnostics(t.fileName),i=ro.getGlobalDiagnostics();return i!==e?Z(le(e,i,pS),r):0===n&&i.length>0?Z(i,r):r}return f(e.getSourceFiles(),PR),ro.getDiagnostics()}(n)}finally{t=void 0}}function ER(){for(const e of o)e();o=[]}function PR(t){ER();const n=a;var r,i,o;a=e=>e(),r=t,null==(i=or)||i.push(or.Phase.Check,"checkSourceFile",{path:r.path},!0),pr("beforeCheck"),function(t){const n=Wo(t);if(!(1&n.flags)){if(yT(t,A,e))return;!function(e){33554432&e.flags&&function(e){for(const t of e.statements)if((h_(t)||243===t.kind)&&fJ(t))return!0}(e)}(t),I(Hi),I(Gi),I(Xi),I(Qi),I(Yi),f(t.statements,yR),yR(t.endOfFileToken),function(e){const t=Wo(e);t.deferredNodes&&t.deferredNodes.forEach(kR),t.deferredNodes=void 0}(t),Zp(t)&&ML(t),a((()=>{t.isDeclarationFile||!A.noUnusedLocals&&!A.noUnusedParameters||LL(CR(t),((e,t,n)=>{!xd(e)&&TR(t,!!(33554432&e.flags))&&ro.add(n)})),t.isDeclarationFile||function(){var e;for(const t of Yi)if(!(null==(e=ns(t))?void 0:e.isReferenced)){const e=ac(t);xn.assert(ay(e),"Only parameter declaration should be checked here");const n=Rp(t.name,va._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation,Ap(t.name),Ap(t.propertyName));e.type||fT(n,aS(Sd(e),e.end,1,va.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here,Ap(t.propertyName))),ro.add(n)}}()})),Zp(t)&&gR(t),Hi.length&&(f(Hi,QL),I(Hi)),Gi.length&&(f(Gi,YL),I(Gi)),Xi.length&&(f(Xi,ZL),I(Xi)),Qi.length&&(f(Qi,ej),I(Qi)),n.flags|=1}}(r),pr("afterCheck"),fr("Check","beforeCheck","afterCheck"),null==(o=or)||o.pop(),a=n}function NR(e){for(;166===e.parent.kind;)e=e.parent;return 183===e.parent.kind}function AR(e,t){let n,r=Zf(e);for(;r&&!(n=t(r));)r=Zf(r);return n}function OR(e,t){return!!AR(e,(e=>e===t))}function MR(e){return void 0!==function(e){for(;166===e.parent.kind;)e=e.parent;return 271===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:277===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function LR(e){if(dh(e))return rs(e.parent);if(Mm(e)&&211===e.parent.kind&&e.parent===e.parent.parent.left&&!VD(e)&&!WN(e)&&!function(e){if(110===e.expression.kind){const t=rm(e,!1,!1);if(cu(t)){const e=aN(t);if(e){const t=uN(e,oF(e,void 0));return t&&!Ec(t)}}}}(e.parent)){const t=function(e){switch(ag(e.parent.parent)){case 1:case 3:return rs(e.parent);case 5:if(GE(e.parent)&&jx(e.parent)===e)return;case 4:case 2:return ns(e.parent.parent)}}(e);if(t)return t}if(277===e.parent.kind&&vb(e)){const t=Ma(e,2998271,!0);if(t&&t!==ht)return t}else if(ou(e)&&MR(e)){const t=Eh(e,271);return xn.assert(void 0!==t),Ia(e,!0)}if(ou(e)){const t=function(e){let t=e.parent;for(;iE(t);)e=t,t=t.parent;if(t&&205===t.kind&&t.qualifier===e)return t}(e);if(t){Sx(t);const n=Wo(e).resolvedSymbol;return n===ht?void 0:n}}for(;Db(e);)e=e.parent;if(function(e){for(;211===e.parent.kind;)e=e.parent;return 233===e.parent.kind}(e)){let t=0;233===e.parent.kind?(t=wf(e)?788968:111551,yb(e.parent)&&(t|=111551)):t=1920,t|=2097152;const n=vb(e)?Ma(e,t,!0):void 0;if(n)return n}if(341===e.parent.kind)return $g(e.parent);if(168===e.parent.kind&&345===e.parent.parent.kind){xn.assert(!Mm(e));const t=Gg(e.parent);return t&&t.symbol}if(Tm(e)){if(Nd(e))return;const t=mc(e,_n(q_,KN,WN)),n=t?901119:111551;if(80===e.kind){if(km(e)&&JF(e)){const t=KF(e.parent);return t===ht?void 0:t}const r=Ma(e,n,!0,!0,Ug(e));if(!r&&t){const t=mc(e,_n(gu,XP));if(t)return RR(e,!0,ns(t))}if(r&&t){const t=Wg(e);if(t&&$N(t)&&t===r.valueDeclaration)return Ma(e,n,!0,!0,Sd(t))||r}return r}if(VD(e))return NA(e);if(211===e.kind||166===e.kind){const n=Wo(e);return n.resolvedSymbol?n.resolvedSymbol:(211===e.kind?(wA(e,0),n.resolvedSymbol||(n.resolvedSymbol=jR(DM(e.expression),Tv(e.name)))):DA(e,0),!n.resolvedSymbol&&t&&iE(e)?RR(e):n.resolvedSymbol)}if(WN(e))return RR(e)}else if(NR(e)){const t=Ma(e,183===e.parent.kind?788968:1920,!1,!0);return t&&t!==ht?t:Xg(e)}return 182===e.parent.kind?Ma(e,1):void 0}function jR(e,t){const n=ff(e,t);if(n.length&&e.members){const t=zm(Od(e).members);if(n===cf(e))return t;if(t){const r=Uo(t),i=O(q(n,(e=>e.declaration)),IB).join(",");if(r.filteredIndexSymbolCache||(r.filteredIndexSymbolCache=new Map),r.filteredIndexSymbolCache.has(i))return r.filteredIndexSymbolCache.get(i);{const t=No(131072,"__index");return t.declarations=q(n,(e=>e.declaration)),t.parent=e.aliasSymbol?e.aliasSymbol:e.symbol?e.symbol:JR(t.declarations[0].parent),r.filteredIndexSymbolCache.set(i,t),t}}}}function RR(e,t,n){if(ou(e)){const r=901119;let i=Ma(e,r,t,!0,Ug(e));if(!i&&qD(e)&&n&&(i=ts(Ho(Ga(n),e.escapedText,r))),i)return i}const r=qD(e)?n:RR(e.left,t,n),i=qD(e)?e.escapedText:e.right.escapedText;if(r){const e=111551&r.flags&&Jp($l(r),"prototype");return Jp(e?$l(e):ju(r),i)}}function JR(e,t){if(qN(e))return qI(e)?ts(e.symbol):void 0;const{parent:n}=e,r=n.parent;if(!(67108864&e.flags)){if(RB(e)){const t=ns(n);return Vl(e.parent)&&e.parent.propertyName===e?jF(t):t}if(fh(e))return ns(n.parent);if(80===e.kind){if(MR(e))return LR(e);if(208===n.kind&&206===r.kind&&e===n.propertyName){const t=Jp(zR(r),e.escapedText);if(t)return t}else if(xP(n)&&n.name===e)return 105===n.keywordToken&&"target"===bc(e)?bO(n).symbol:102===n.keywordToken&&"meta"===bc(e)?ey().members.get("meta"):void 0}switch(e.kind){case 80:case 81:case 211:case 166:if(!bv(e))return LR(e);case 110:const i=rm(e,!1,!1);if(cu(i)){const e=Cf(i);if(e.thisParameter)return e.thisParameter}if(Cm(e))return KM(e).symbol;case 197:return vx(e).symbol;case 108:return KM(e).symbol;case 137:const o=e.parent;return o&&176===o.kind?o.parent.symbol:void 0;case 11:case 15:if(Em(e.parent.parent)&&Pm(e.parent.parent)===e||(272===e.parent.kind||278===e.parent.kind)&&e.parent.moduleSpecifier===e||Mm(e)&&AF(e.parent)&&e.parent.moduleSpecifier===e||Mm(e)&&Jm(e.parent,!1)||uf(e.parent)||JE(e.parent)&&df(e.parent.parent)&&e.parent.parent.argument===e.parent)return ja(e,e,t);if(QE(n)&&sg(n)&&n.arguments[1]===e)return ns(n);case 9:const a=XE(n)?n.argumentExpression===e?qM(n.expression):void 0:JE(n)&&RE(r)?Sx(r.objectType):void 0;return a&&Jp(a,yc(e.text));case 90:case 100:case 39:case 86:return rs(e.parent);case 205:return df(e)?JR(e.argument.literal,t):void 0;case 95:return mN(e.parent)?xn.checkDefined(e.parent.symbol):void 0;case 102:case 105:return xP(e.parent)?vO(e.parent).symbol:void 0;case 104:if(uP(e.parent)){const t=qM(e.parent.right),n=gM(t);return(null==n?void 0:n.symbol)??t.symbol}return;case 236:return KM(e).symbol;case 295:if(km(e)&&JF(e)){const t=KF(e.parent);return t===ht?void 0:t}default:return}}}function zR(e){if(qN(e)&&!qI(e))return Dt;if(67108864&e.flags)return Dt;const t=fb(e),n=t&&Nu(ns(t.class));if(wf(e)){const t=Sx(e);return n?y_(t,n.thisType):t}if(Tm(e))return qR(e);if(n&&!t.isImplements){const e=Se(ku(n));return e?y_(e,n.thisType):Dt}if(YT(e))return ju(ns(e));if(80===(r=e).kind&&YT(r.parent)&&Pc(r.parent)===r){const t=JR(e);return t?ju(t):Dt}var r;if(KE(e))return Gc(e,!0,0)||Dt;if(h_(e)){const t=ns(e);return t?$l(t):Dt}if(RB(e)){const t=JR(e);return t?$l(t):Dt}if(Eu(e))return Gc(e.parent,!0,0)||Dt;if(MR(e)){const t=JR(e);if(t){const e=ju(t);return Nc(e)?$l(t):e}}return xP(e.parent)&&e.parent.keywordToken===e.kind?vO(e.parent):lN(e)?ny(!1):Dt}function $R(e){if(xn.assert(210===e.kind||209===e.kind),250===e.parent.kind)return vM(e,pj(e.parent)||Dt);if(226===e.parent.kind)return vM(e,qM(e.parent.right)||Dt);if(303===e.parent.kind){const t=ut(e.parent.parent,HE);return hM(t,$R(t)||Dt,Qd(t.properties,e.parent))}const t=ut(e.parent,WE),n=$R(t)||Dt,r=fj(65,n,It,e.parent)||Dt;return yM(t,n,t.elements.indexOf(e),r)}function qR(e){return Cb(e)&&(e=e.parent),sx(qM(e))}function VR(e){const t=rs(e.parent);return Jv(e)?$l(t):ju(t)}function UR(e){const t=e.name;switch(t.kind){case 80:return lx(bc(t));case 9:case 11:return lx(t.text);case 167:const e=IF(t);return dM(e,12288)?e:Jt;default:return xn.fail("Unsupported property name.")}}function KR(e){const t=ed(Rd(e=mp(e))),n=Vp(e,0).length?Hn:Vp(e,1).length?Gn:void 0;return n&&f(Rd(n),(e=>{t.has(e.escapedName)||t.set(e.escapedName,e)})),bs(t)}function WR(e){return 0!==Vp(e,0).length||0!==Vp(e,1).length}function HR(e){if(418&e.flags&&e.valueDeclaration&&!qN(e.valueDeclaration)){const t=Uo(e);if(void 0===t.isDeclarationWithCollidingName){const n=Np(e.valueDeclaration);if(Cd(n)||function(e){return e.valueDeclaration&&KE(e.valueDeclaration)&&299===ac(e.valueDeclaration).parent.kind}(e))if(je(n.parent,e.escapedName,111551,void 0,!1))t.isDeclarationWithCollidingName=!0;else if(oB(e.valueDeclaration,16384)){const r=oB(e.valueDeclaration,32768),i=Zu(n,!1),o=241===n.kind&&Zu(n.parent,!1);t.isDeclarationWithCollidingName=!(dp(n)||r&&(i||o))}else t.isDeclarationWithCollidingName=!1}return t.isDeclarationWithCollidingName}return!1}function XR(e){switch(xn.assert(Ie),e.kind){case 271:return QR(ns(e));case 273:case 274:case 276:case 281:const t=ns(e);return!!t&&QR(t,!0);case 278:const n=e.exportClause;return!!n&&(dN(n)||Q(n.elements,XR));case 277:return!e.expression||80!==e.expression.kind||QR(ns(e),!0)}return!1}function QR(e,t){if(!e)return!1;const n=Sd(e.valueDeclaration);$a(n&&ns(n));const r=_s(Ea(e));return r===ht?!t||!Aa(e):!!(111551&Pa(e,t,!0))&&(jS(A)||!YR(r))}function YR(e){return mM(e)||!!e.constEnumOnlyModule}function ZR(e,t){if(xn.assert(Ie),la(e)){const t=ns(e),n=t&&Uo(t);if(null==n?void 0:n.referenced)return!0;const r=Uo(t).aliasTarget;if(r&&32&Qv(e)&&111551&Pa(r)&&(jS(A)||!YR(r)))return!0}return!!t&&!!LI(e,(e=>ZR(e,t)))}function tB(e){if(Fd(e.body)){if(I_(e)||A_(e))return!1;const t=Jf(ns(e));return t.length>1||1===t.length&&t[0].declaration!==e}return!1}function nB(e){return(function(e){return!(!U||xf(e)||xF(e)||!e.initializer||Bv(e,31))}(e)||function(e){return U&&xf(e)&&(xF(e)||!e.initializer)&&Bv(e,31)}(e))&&!function(e){const t=gB(e);return!!t&&ak(Sx(t))}(e)}function rB(e){const t=hc(e,(e=>HP(e)||KP(e)));if(!t)return!1;let n;if(KP(t)){if(t.type||!Mm(t)&&!SJ(t))return!1;const e=Xm(t);if(!e||!p_(e))return!1;n=ns(e)}else n=ns(t);return!!(n&&16&n.flags|3)&&!!ld(Ga(n),(e=>111551&e.flags&&hC(e.valueDeclaration)))}function iB(e){var t;const n=e.id||0;return n<0||n>=Bi.length?0:(null==(t=Bi[n])?void 0:t.flags)||0}function oB(e,t){return function(e,t){if((A.noCheck||!vT(Sd(e),A))&&!(Wo(e).calculatedFlags&t))switch(t){case 16:case 32:return i(e);case 128:case 256:case 2097152:return void n(e,r);case 512:case 8192:case 65536:case 262144:return function(e){n(e,o)}(e);case 536870912:return a(e);case 4096:case 32768:case 16384:return function(e){n(Np(dh(e)?e.parent:e),s)}(e);default:return xn.assertNever(t,`Unhandled node check flag calculation: ${xn.formatNodeCheckFlags(t)}`)}function n(e,t){const n=t(e,e.parent);if("skip"!==n)return n||jI(e,t)}function r(e){const n=Wo(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=2097536,i(e)}function i(e){Wo(e).calculatedFlags|=48,108===e.kind&&tN(e)}function o(e){const n=Wo(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=336384,a(e)}function a(e){if(Wo(e).calculatedFlags|=536920064,qD(e)&&Tm(e)&&(!GE(e.parent)||e.parent.name!==e)){const t=JR(e,!0);t&&t!==ht&&IP(e,t)}}function s(e){const n=Wo(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=53248,function(e){a(e),oE(e)&&IF(e),VD(e)&&mu(e.parent)&&tL(e.parent)}(e)}}(e,t),!!(iB(e)&t)}function aB(e){return rR(e.parent),Wo(e).enumMemberValue??SC(void 0)}function sB(e){switch(e.kind){case 306:case 211:case 212:return!0}return!1}function cB(e){if(306===e.kind)return aB(e).value;Wo(e).resolvedSymbol||DM(e);const t=Wo(e).resolvedSymbol||(vb(e)?Ma(e,111551,!0):void 0);if(t&&8&t.flags){const e=t.valueDeclaration;if(tf(e.parent))return aB(e).value}}function lB(e){return!!(524288&e.flags)&&Vp(e,0).length>0}function uB(e){const t=178===(e=hc(e,yl)).kind?177:178,n=Y_(ns(e),t);return{firstAccessor:n&&n.pos{if(t)return t=void 0,!0;t=e.expression})):t=n}return t}function pB(e,t){const n=Wo(e).resolvedSymbol;if(n)return n;let r=e;if(t){const t=e.parent;h_(t)&&e===t.name&&(r=kc(t))}return je(r,e.escapedText,3257279,void 0,!0)}function fB(e){return e?(go(e),Sd(e).localJsxFactory||Zr):Zr}function mB(e){if(e){const t=Sd(e);if(t){if(t.localJsxFragmentFactory)return t.localJsxFragmentFactory;const e=t.pragmas.get("jsxfrag"),n=ot(e)?e[0]:e;if(n)return t.localJsxFragmentFactory=zI(n.arguments.factory,M),t.localJsxFragmentFactory}}if(A.jsxFragmentFactory)return zI(A.jsxFragmentFactory,M)}function gB(e){const t=kv(e);if(t)return t;if(169===e.kind&&178===e.parent.kind){const t=uB(e.parent).getAccessor;if(t)return Cv(t)}}function yB(e){const t=267===e.kind?lt(e.name,wD):Cg(e),n=Ba(t,t,void 0);if(n)return Y_(n,307)}function xB(e,t){if(A.importHelpers){const n=Sd(e);if(hp(n,A)&&!(33554432&e.flags)){const r=function(e,t){const n=Wo(e);return n.externalHelpersModule||(n.externalHelpersModule=Ja(function(e){xn.assert(A.importHelpers,"Expected importHelpers to be enabled");const t=e.imports[0];return xn.assert(t&&ly(t)&&"tslib"===t.text,"Expected sourceFile.imports[0] to be the synthesized tslib import"),t}(e),G_,va.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,t)||ht),n.externalHelpersModule}(n,e);if(r!==ht){const n=Uo(r);if(n.requestedExternalEmitHelpers??(n.requestedExternalEmitHelpers=0),(n.requestedExternalEmitHelpers&t)!==t){const i=t&~n.requestedExternalEmitHelpers;for(let t=1;t<=16777216;t<<=1)if(i&t)for(const n of SB(t)){const i=Da(Ho(Qa(r),yc(n),111551));i?524288&t?Q(Jf(i),(e=>FO(e)>3))||xo(e,va.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,G_,n,4):1048576&t?Q(Jf(i),(e=>FO(e)>4))||xo(e,va.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,G_,n,5):1024&t&&(Q(Jf(i),(e=>FO(e)>2))||xo(e,va.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,G_,n,3)):xo(e,va.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,G_,n)}}n.requestedExternalEmitHelpers|=t}}}}function SB(e){switch(e){case 1:return["__extends"];case 2:return["__assign"];case 4:return["__rest"];case 8:return J?["__decorate"]:["__esDecorate","__runInitializers"];case 16:return["__metadata"];case 32:return["__param"];case 64:return["__awaiter"];case 128:return["__generator"];case 256:return["__values"];case 512:return["__read"];case 1024:return["__spreadArray"];case 2048:return["__await"];case 4096:return["__asyncGenerator"];case 8192:return["__asyncDelegator"];case 16384:return["__asyncValues"];case 32768:return["__exportStar"];case 65536:return["__importStar"];case 131072:return["__importDefault"];case 262144:return["__makeTemplateObject"];case 524288:return["__classPrivateFieldGet"];case 1048576:return["__classPrivateFieldSet"];case 2097152:return["__classPrivateFieldIn"];case 4194304:return["__setFunctionName"];case 8388608:return["__propKey"];case 16777216:return["__addDisposableResource","__disposeResources"];default:return xn.fail("Unrecognized helper")}}function CB(e){var t;const n=function(e){const t=function(e){return MA(e)?S(e.modifiers,cE):void 0}(e);return t&&_J(t,va.Decorators_are_not_valid_here)}(e)||function(e){if(!e.modifiers)return!1;const t=function(e){switch(e.kind){case 177:case 178:case 176:case 172:case 171:case 174:case 173:case 181:case 267:case 272:case 271:case 278:case 277:case 218:case 219:case 169:case 168:return;case 175:case 303:case 304:case 270:case 282:return S(e.modifiers,iu);default:if(268===e.parent.kind||307===e.parent.kind)return;switch(e.kind){case 262:return DB(e,134);case 263:case 185:return DB(e,128);case 231:case 264:case 265:return S(e.modifiers,iu);case 243:return 4&e.declarationList.flags?DB(e,135):S(e.modifiers,iu);case 266:return DB(e,87);default:xn.assertNever(e)}}}(e);return t&&_J(t,va.Modifiers_cannot_appear_here)}(e);if(void 0!==n)return n;if(sE(e)&&hv(e))return _J(e,va.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);const r=EP(e)?7&e.declarationList.flags:0;let i,o,a,s,c,l=0,u=!1,_=!1;for(const n of e.modifiers)if(cE(n)){if(!gm(J,e,e.parent,e.parent.parent))return 174!==e.kind||Fd(e.body)?_J(e,va.Decorators_are_not_valid_here):_J(e,va.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(J&&(177===e.kind||178===e.kind)){const t=uB(e);if(Wv(t.firstAccessor)&&e===t.secondAccessor)return _J(e,va.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}if(-34849&l)return pJ(n,va.Decorators_are_not_valid_here);if(_&&98303&l)return xn.assertIsDefined(c),!uJ(Sd(n))&&(fT(xo(n,va.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),Rp(c,va.Decorator_used_before_export_here)),!0);l|=32768,98303&l?32&l&&(u=!0):_=!0,c??(c=n)}else{if(148!==n.kind){if(171===e.kind||173===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_type_member,Ra(n.kind));if(181===e.kind&&(126!==n.kind||!gu(e.parent)))return pJ(n,va._0_modifier_cannot_appear_on_an_index_signature,Ra(n.kind))}if(103!==n.kind&&147!==n.kind&&87!==n.kind&&168===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_type_parameter,Ra(n.kind));switch(n.kind){case 87:{if(266!==e.kind&&168!==e.kind)return pJ(e,va.A_class_member_cannot_have_the_0_keyword,Ra(87));const t=CF(e.parent)&&Kg(e.parent)||e.parent;if(168===e.kind&&!(uu(t)||gu(t)||SE(t)||kE(t)||hE(t)||yE(t)||_E(t)))return pJ(n,va._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class,Ra(n.kind));break}case 164:if(16&l)return pJ(n,va._0_modifier_already_seen,"override");if(128&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"override","declare");if(8&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"override","readonly");if(512&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"override","accessor");if(1024&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"override","async");l|=16,s=n;break;case 125:case 124:case 123:const _=ec(ob(n.kind));if(7&l)return pJ(n,va.Accessibility_modifier_already_seen);if(16&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"override");if(256&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"static");if(512&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"accessor");if(8&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"readonly");if(1024&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"async");if(268===e.parent.kind||307===e.parent.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_module_or_namespace_element,_);if(64&l)return 123===n.kind?pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,_,"abstract"):pJ(n,va._0_modifier_must_precede_1_modifier,_,"abstract");if(Zl(e))return pJ(n,va.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);l|=ob(n.kind);break;case 126:if(256&l)return pJ(n,va._0_modifier_already_seen,"static");if(8&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"static","readonly");if(1024&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"static","async");if(512&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"static","accessor");if(268===e.parent.kind||307===e.parent.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_module_or_namespace_element,"static");if(169===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_parameter,"static");if(64&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(16&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"static","override");l|=256,i=n;break;case 129:if(512&l)return pJ(n,va._0_modifier_already_seen,"accessor");if(8&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"accessor","readonly");if(128&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"accessor","declare");if(172!==e.kind)return pJ(n,va.accessor_modifier_can_only_appear_on_a_property_declaration);l|=512;break;case 148:if(8&l)return pJ(n,va._0_modifier_already_seen,"readonly");if(172!==e.kind&&171!==e.kind&&181!==e.kind&&169!==e.kind)return pJ(n,va.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);if(512&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"readonly","accessor");l|=8;break;case 95:if(A.verbatimModuleSyntax&&!(33554432&e.flags)&&265!==e.kind&&264!==e.kind&&267!==e.kind&&307===e.parent.kind&&(1===B||1===Sd(e).impliedNodeFormat))return pJ(n,va.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(32&l)return pJ(n,va._0_modifier_already_seen,"export");if(128&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"export","declare");if(64&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"export","abstract");if(1024&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"export","async");if(gu(e.parent))return pJ(n,va._0_modifier_cannot_appear_on_class_elements_of_this_kind,"export");if(169===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_parameter,"export");if(4===r)return pJ(n,va._0_modifier_cannot_appear_on_a_using_declaration,"export");if(6===r)return pJ(n,va._0_modifier_cannot_appear_on_an_await_using_declaration,"export");l|=32;break;case 90:const d=307===e.parent.kind?e.parent:e.parent.parent;if(267===d.kind&&!sp(d))return pJ(n,va.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);if(4===r)return pJ(n,va._0_modifier_cannot_appear_on_a_using_declaration,"default");if(6===r)return pJ(n,va._0_modifier_cannot_appear_on_an_await_using_declaration,"default");if(!(32&l))return pJ(n,va._0_modifier_must_precede_1_modifier,"export","default");if(u)return pJ(c,va.Decorators_are_not_valid_here);l|=2048;break;case 138:if(128&l)return pJ(n,va._0_modifier_already_seen,"declare");if(1024&l)return pJ(n,va._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(16&l)return pJ(n,va._0_modifier_cannot_be_used_in_an_ambient_context,"override");if(gu(e.parent)&&!uE(e))return pJ(n,va._0_modifier_cannot_appear_on_class_elements_of_this_kind,"declare");if(169===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_parameter,"declare");if(4===r)return pJ(n,va._0_modifier_cannot_appear_on_a_using_declaration,"declare");if(6===r)return pJ(n,va._0_modifier_cannot_appear_on_an_await_using_declaration,"declare");if(33554432&e.parent.flags&&268===e.parent.kind)return pJ(n,va.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);if(Zl(e))return pJ(n,va._0_modifier_cannot_be_used_with_a_private_identifier,"declare");if(512&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"declare","accessor");l|=128,o=n;break;case 128:if(64&l)return pJ(n,va._0_modifier_already_seen,"abstract");if(263!==e.kind&&185!==e.kind){if(174!==e.kind&&172!==e.kind&&177!==e.kind&&178!==e.kind)return pJ(n,va.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);if(263!==e.parent.kind||!Bv(e.parent,64))return pJ(n,172===e.kind?va.Abstract_properties_can_only_appear_within_an_abstract_class:va.Abstract_methods_can_only_appear_within_an_abstract_class);if(256&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(2&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"private","abstract");if(1024&l&&a)return pJ(a,va._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");if(16&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"abstract","override");if(512&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"abstract","accessor")}if(Dc(e)&&81===e.name.kind)return pJ(n,va._0_modifier_cannot_be_used_with_a_private_identifier,"abstract");l|=64;break;case 134:if(1024&l)return pJ(n,va._0_modifier_already_seen,"async");if(128&l||33554432&e.parent.flags)return pJ(n,va._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(169===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_parameter,"async");if(64&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");l|=1024,a=n;break;case 103:case 147:{const r=103===n.kind?8192:16384,i=103===n.kind?"in":"out",o=CF(e.parent)&&(Kg(e.parent)||S(null==(t=Hg(e.parent))?void 0:t.tags,wF))||e.parent;if(168!==e.kind||o&&!(XP(o)||gu(o)||QP(o)||wF(o)))return pJ(n,va._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias,i);if(l&r)return pJ(n,va._0_modifier_already_seen,i);if(8192&r&&16384&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"in","out");l|=r;break}}}return 176===e.kind?256&l?pJ(i,va._0_modifier_cannot_appear_on_a_constructor_declaration,"static"):16&l?pJ(s,va._0_modifier_cannot_appear_on_a_constructor_declaration,"override"):!!(1024&l)&&pJ(a,va._0_modifier_cannot_appear_on_a_constructor_declaration,"async"):(272===e.kind||271===e.kind)&&128&l?pJ(o,va.A_0_modifier_cannot_be_used_with_an_import_declaration,"declare"):169===e.kind&&31&l&&Eu(e.name)?pJ(e,va.A_parameter_property_may_not_be_declared_using_a_binding_pattern):169===e.kind&&31&l&&e.dotDotDotToken?pJ(e,va.A_parameter_property_cannot_be_declared_using_a_rest_parameter):!!(1024&l)&&function(e,t){switch(e.kind){case 174:case 262:case 218:case 219:return!1}return pJ(t,va._0_modifier_cannot_be_used_here,"async")}(e,a)}function DB(e,t){const n=S(e.modifiers,iu);return n&&n.kind!==t?n:void 0}function EB(e,t=va.Trailing_comma_not_allowed){return!(!e||!e.hasTrailingComma)&&dJ(e[0],e.end-",".length,",".length,t)}function LB(e,t){if(e&&0===e.length){const n=e.pos-"<".length;return dJ(t,n,as(t.text,e.end)+">".length-n,va.Type_parameter_list_cannot_be_empty)}return!1}function UB(e){const t=Sd(e);return CB(e)||LB(e.typeParameters,t)||function(e){let t=!1;const n=e.length;for(let r=0;r1||e.typeParameters.hasTrailingComma||e.typeParameters[0].constraint)&&t&&Io(t.fileName,[".mts",".cts"])&&pJ(e.typeParameters[0],va.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);const{equalsGreaterThanToken:n}=e;return Xa(t,n.pos).line!==Xa(t,n.end).line&&pJ(n,va.Line_terminator_not_permitted_before_arrow)}(e,t)||uu(e)&&function(e){if(M>=3){const t=e.body&&DP(e.body)&&sA(e.body.statements);if(t){const n=F(e.parameters,(e=>!!e.initializer||Eu(e.name)||U_(e)));if(p(n)){f(n,(e=>{fT(xo(e,va.This_parameter_is_not_allowed_with_use_strict_directive),Rp(t,va.use_strict_directive_used_here))}));const e=n.map(((e,t)=>Rp(e,0===t?va.Non_simple_parameter_declared_here:va.and_here)));return fT(xo(t,va.use_strict_directive_cannot_be_used_with_non_simple_parameter_list),...e),!0}}}return!1}(e)}function KB(e,t){return EB(t)||function(e,t){if(t&&0===t.length){const n=Sd(e),r=t.pos-"<".length;return dJ(n,r,as(n.text,t.end)+">".length-r,va.Type_argument_list_cannot_be_empty)}return!1}(e,t)}function WB(e){const t=e.types;if(EB(t))return!0;if(t&&0===t.length){const n=Ra(e.token);return dJ(e,t.pos,0,va._0_list_cannot_be_empty,n)}return Q(t,HB)}function HB(e){return hP(e)&&nE(e.expression)&&e.typeArguments?pJ(e,va.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments):KB(e,e.typeArguments)}function GB(e){if(167!==e.kind)return!1;const t=e;return 226===t.expression.kind&&28===t.expression.operatorToken.kind&&pJ(t.expression,va.A_comma_expression_is_not_allowed_in_a_computed_property_name)}function XB(e){if(e.asteriskToken){if(xn.assert(262===e.kind||218===e.kind||174===e.kind),33554432&e.flags)return pJ(e.asteriskToken,va.Generators_are_not_allowed_in_an_ambient_context);if(!e.body)return pJ(e.asteriskToken,va.An_overload_signature_cannot_be_declared_as_a_generator)}}function QB(e,t){return!!e&&pJ(e,t)}function YB(e,t){return!!e&&pJ(e,t)}function eJ(e){if(mJ(e))return!0;if(250===e.kind&&e.awaitModifier&&!(65536&e.flags)){const t=Sd(e);if(om(e)){if(!uJ(t))switch(hp(t,A)||ro.add(Rp(e.awaitModifier,va.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)),B){case 100:case 199:if(1===t.impliedNodeFormat){ro.add(Rp(e.awaitModifier,va.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));break}case 7:case 99:case 4:if(M>=4)break;default:ro.add(Rp(e.awaitModifier,va.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher))}}else if(!uJ(t)){const t=Rp(e.awaitModifier,va.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules),n=Qf(e);return n&&176!==n.kind&&(xn.assert(0==(2&Jh(n)),"Enclosing function should never be an async function."),fT(t,Rp(n,va.Did_you_mean_to_mark_this_function_as_async))),ro.add(t),!0}}if(LP(e)&&!(65536&e.flags)&&qD(e.initializer)&&"async"===e.initializer.escapedText)return pJ(e.initializer,va.The_left_hand_side_of_a_for_of_statement_may_not_be_async),!1;if(261===e.initializer.kind){const t=e.initializer;if(!cJ(t)){const n=t.declarations;if(!n.length)return!1;if(n.length>1){const n=249===e.kind?va.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:va.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return _J(t.declarations[1],n)}const r=n[0];if(r.initializer){const t=249===e.kind?va.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:va.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return pJ(r.name,t)}if(r.type)return pJ(r,249===e.kind?va.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:va.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}return!1}function tJ(e){if(e.parameters.length===(177===e.kind?1:2))return gv(e)}function nJ(e,t){if(function(e){return Uh(e)&&!a_(e)}(e))return pJ(e,t)}function rJ(e){if(UB(e))return!0;if(174===e.kind){if(210===e.parent.kind){if(e.modifiers&&(1!==e.modifiers.length||134!==Te(e.modifiers).kind))return _J(e,va.Modifiers_cannot_appear_here);if(QB(e.questionToken,va.An_object_member_cannot_be_declared_optional))return!0;if(YB(e.exclamationToken,va.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(void 0===e.body)return dJ(e,e.end-1,";".length,va._0_expected,"{")}if(XB(e))return!0}if(gu(e.parent)){if(M<2&&VD(e.name))return pJ(e.name,va.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(33554432&e.flags)return nJ(e.name,va.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(174===e.kind&&!e.body)return nJ(e.name,va.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(264===e.parent.kind)return nJ(e.name,va.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(187===e.parent.kind)return nJ(e.name,va.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function iJ(e){return $h(e)||224===e.kind&&41===e.operator&&9===e.operand.kind}function oJ(e){const t=e.initializer;if(t){const r=!(iJ(t)||function(e){if((GE(e)||XE(e)&&iJ(e.argumentExpression))&&vb(e.expression))return!!(1056&DM(e).flags)}(t)||112===t.kind||97===t.kind||(n=t,10===n.kind||224===n.kind&&41===n.operator&&10===n.operand.kind));if(!(nf(e)||KP(e)&&SJ(e))||e.type)return pJ(t,va.Initializers_are_not_allowed_in_ambient_contexts);if(r)return pJ(t,va.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference)}var n}function aJ(e){if(80===e.kind){if("__esModule"===bc(e))return function(e,t,n,...r){return!uJ(Sd(t))&&(vo(e,t,n,...r),!0)}("noEmit",e,va.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else{const t=e.elements;for(const e of t)if(!gP(e))return aJ(e.name)}return!1}function sJ(e){if(80===e.kind){if("let"===e.escapedText)return pJ(e,va.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else{const t=e.elements;for(const e of t)gP(e)||sJ(e.name)}return!1}function cJ(e){const t=e.declarations;if(EB(e.declarations))return!0;if(!e.declarations.length)return dJ(e,t.pos,t.end-t.pos,va.Variable_declaration_list_cannot_be_empty);const n=7&e.flags;return 4!==n&&6!==n||!MP(e.parent)?6===n&&cM(e):pJ(e,4===n?va.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:va.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration)}function lJ(e){switch(e.kind){case 245:case 246:case 247:case 254:case 248:case 249:case 250:return!1;case 256:return lJ(e.parent)}return!0}function uJ(e){return e.parseDiagnostics.length>0}function _J(e,t,...n){const r=Sd(e);if(!uJ(r)){const i=Gp(r,e.pos);return ro.add(aS(r,i.start,i.length,t,...n)),!0}return!1}function dJ(e,t,n,r,...i){const o=Sd(e);return!uJ(o)&&(ro.add(aS(o,t,n,r,...i)),!0)}function pJ(e,t,...n){return!uJ(Sd(e))&&(ro.add(Rp(e,t,...n)),!0)}function fJ(e){return 264!==e.kind&&265!==e.kind&&272!==e.kind&&271!==e.kind&&278!==e.kind&&277!==e.kind&&270!==e.kind&&!Bv(e,2208)&&_J(e,va.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function mJ(e){if(33554432&e.flags){if(!Wo(e).hasReportedStatementInAmbientContext&&(cu(e.parent)||hu(e.parent)))return Wo(e).hasReportedStatementInAmbientContext=_J(e,va.An_implementation_cannot_be_declared_in_ambient_contexts);if(241===e.parent.kind||268===e.parent.kind||307===e.parent.kind){const t=Wo(e.parent);if(!t.hasReportedStatementInAmbientContext)return t.hasReportedStatementInAmbientContext=_J(e,va.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function gJ(e){const t=Gd(e).includes("."),n=16&e.numericLiteralFlags;t||n||+e.text<=2**53-1||So(!1,Rp(e,va.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}function hJ(e){return!!f(e.elements,(e=>{if(e.isTypeOnly)return _J(e,276===e.kind?va.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:va.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement)}))}function yJ(e,t,n){if(1048576&t.flags&&2621440&e.flags){const r=Uw(t,e);if(r)return r;const i=Rd(e);if(i){const e=$w(i,t);if(e){const r=bk(t,O(e,(e=>[()=>$l(e),e.escapedName])),n);if(r!==t)return r}}}}function vJ(e){return Kh(e)||(oE(e)?jw(qM(e.expression)):void 0)}function bJ(e){return xe===e?Le:(xe=e,Le=cc(e))}function xJ(e){return ve===e?Me:(ve=e,Me=uc(e))}function SJ(e){const t=7&xJ(e);return 2===t||4===t||6===t}}function jB(e){return 262!==e.kind&&174!==e.kind||!!e.body}function RB(e){switch(e.parent.kind){case 276:case 281:return qD(e);default:return dh(e)}}function BB(e){switch(e){case 0:return"yieldType";case 1:return"returnType";case 2:return"nextType"}}function JB(e){return!!(1&e.flags)}function zB(e){return!!(2&e.flags)}(yB=hB||(hB={})).JSX="JSX",yB.IntrinsicElements="IntrinsicElements",yB.ElementClass="ElementClass",yB.ElementAttributesPropertyNameContainer="ElementAttributesProperty",yB.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",yB.Element="Element",yB.ElementType="ElementType",yB.IntrinsicAttributes="IntrinsicAttributes",yB.IntrinsicClassAttributes="IntrinsicClassAttributes",yB.LibraryManagedAttributes="LibraryManagedAttributes";var $B=class e{constructor(t,n,r){var i;for(this.moduleResolverHost=void 0,this.inner=void 0,this.disableTrackSymbol=!1;n instanceof e;)n=n.inner;this.inner=n,this.moduleResolverHost=r,this.context=t,this.canTrackSymbol=!!(null==(i=this.inner)?void 0:i.trackSymbol)}trackSymbol(e,t,n){var r,i;if((null==(r=this.inner)?void 0:r.trackSymbol)&&!this.disableTrackSymbol){if(this.inner.trackSymbol(e,t,n))return this.onDiagnosticReported(),!0;262144&e.flags||((i=this.context).trackedSymbols??(i.trackedSymbols=[])).push([e,t,n])}return!1}reportInaccessibleThisError(){var e;(null==(e=this.inner)?void 0:e.reportInaccessibleThisError)&&(this.onDiagnosticReported(),this.inner.reportInaccessibleThisError())}reportPrivateInBaseOfClassExpression(e){var t;(null==(t=this.inner)?void 0:t.reportPrivateInBaseOfClassExpression)&&(this.onDiagnosticReported(),this.inner.reportPrivateInBaseOfClassExpression(e))}reportInaccessibleUniqueSymbolError(){var e;(null==(e=this.inner)?void 0:e.reportInaccessibleUniqueSymbolError)&&(this.onDiagnosticReported(),this.inner.reportInaccessibleUniqueSymbolError())}reportCyclicStructureError(){var e;(null==(e=this.inner)?void 0:e.reportCyclicStructureError)&&(this.onDiagnosticReported(),this.inner.reportCyclicStructureError())}reportLikelyUnsafeImportRequiredError(e){var t;(null==(t=this.inner)?void 0:t.reportLikelyUnsafeImportRequiredError)&&(this.onDiagnosticReported(),this.inner.reportLikelyUnsafeImportRequiredError(e))}reportTruncationError(){var e;(null==(e=this.inner)?void 0:e.reportTruncationError)&&(this.onDiagnosticReported(),this.inner.reportTruncationError())}reportNonlocalAugmentation(e,t,n){var r;(null==(r=this.inner)?void 0:r.reportNonlocalAugmentation)&&(this.onDiagnosticReported(),this.inner.reportNonlocalAugmentation(e,t,n))}reportNonSerializableProperty(e){var t;(null==(t=this.inner)?void 0:t.reportNonSerializableProperty)&&(this.onDiagnosticReported(),this.inner.reportNonSerializableProperty(e))}onDiagnosticReported(){this.context.reportedDiagnostic=!0}reportInferenceFallback(e){var t;(null==(t=this.inner)?void 0:t.reportInferenceFallback)&&this.inner.reportInferenceFallback(e)}};function qB(e,t,n,r){if(void 0===e)return e;const i=t(e);let o;return void 0!==i?(o=ot(i)?(r||tJ)(i):i,xn.assertNode(o,n),o):void 0}function VB(e,t,n,r,i){if(void 0===e)return e;const o=e.length;let a;(void 0===r||r<0)&&(r=0),(void 0===i||i>o-r)&&(i=o-r);let s=-1,c=-1;r>0||io-r)&&(i=o-r),KB(e,t,n,r,i)}function KB(e,t,n,r,i){let o;const a=e.length;(r>0||i=2&&(i=function(e,t){let n;for(let r=0;r{const o=rl,addSource:F,setSourceContent:A,addName:I,addMapping:O,appendSourceMap:function(e,t,n,r,i,o){xn.assert(e>=S,"generatedLine cannot backtrack"),xn.assert(t>=0,"generatedCharacter cannot be negative"),s();const a=[];let l;const u=_J(n.mappings);for(const s of u){if(o&&(s.generatedLine>o.line||s.generatedLine===o.line&&s.generatedCharacter>o.character))break;if(i&&(s.generatedLineJSON.stringify(R())};function F(t){s();const n=ma(r,t,e.getCurrentDirectory(),e.getCanonicalFileName,!0);let i=_.get(n);return void 0===i&&(i=u.length,u.push(n),l.push(t),_.set(n,i)),c(),i}function A(e,t){if(s(),null!==t){for(o||(o=[]);o.length=S,"generatedLine cannot backtrack"),xn.assert(t>=0,"generatedCharacter cannot be negative"),xn.assert(void 0===n||n>=0,"sourceIndex cannot be negative"),xn.assert(void 0===r||r>=0,"sourceLine cannot be negative"),xn.assert(void 0===i||i>=0,"sourceCharacter cannot be negative"),s(),(function(e,t){return!E||S!==e||k!==t}(e,t)||function(e,t,n){return void 0!==e&&void 0!==t&&void 0!==n&&T===e&&(C>t||C===t&&w>n)}(n,r,i))&&(L(),S=e,k=t,P=!1,N=!1,E=!0),void 0!==n&&void 0!==r&&void 0!==i&&(T=n,C=r,w=i,P=!0,void 0!==o&&(D=o,N=!0)),c()}function M(e){p.push(e),p.length>=1024&&j()}function L(){if(E&&(!x||m!==S||g!==k||h!==T||y!==C||v!==w||b!==D)){if(s(),m0&&(f+=String.fromCharCode.apply(void 0,p),p.length=0)}function R(){return L(),j(),{version:3,file:t,sourceRoot:n,sources:u,names:d,mappings:f,sourcesContent:o}}function B(e){e<0?e=1+(-e<<1):e<<=1;do{let n=31&e;(e>>=5)>0&&(n|=32),M((t=n)>=0&&t<26?65+t:t>=26&&t<52?97+t-26:t>=52&&t<62?48+t-52:62===t?43:63===t?47:xn.fail(`${t}: not a base64 value`))}while(e>0);var t}}var rJ=/\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,iJ=/^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,oJ=/^\s*(\/\/[@#] .*)?$/;function aJ(e,t){return{getLineCount:()=>t.length,getLineText:n=>e.substring(t[n],t[n+1])}}function sJ(e){for(let t=e.getLineCount()-1;t>=0;t--){const n=e.getLineText(t),r=iJ.exec(n);if(r)return r[1].trimEnd();if(!n.match(oJ))break}}function cJ(e){return"string"==typeof e||null===e}function lJ(e){return null!==e&&"object"==typeof e&&3===e.version&&"string"==typeof e.file&&"string"==typeof e.mappings&&ot(e.sources)&&x(e.sources,st)&&(void 0===e.sourceRoot||null===e.sourceRoot||"string"==typeof e.sourceRoot)&&(void 0===e.sourcesContent||null===e.sourcesContent||ot(e.sourcesContent)&&x(e.sourcesContent,cJ))&&(void 0===e.names||null===e.names||ot(e.names)&&x(e.names,st))}function uJ(e){try{const t=JSON.parse(e);if(lJ(t))return t}catch{}}function _J(e){let t,n=!1,r=0,i=0,o=0,a=0,s=0,c=0,l=0;return{get pos(){return r},get error(){return t},get state(){return u(!0,!0)},next(){for(;!n&&r=e.length)return d("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;const a=(o=e.charCodeAt(r))>=65&&o<=90?o-65:o>=97&&o<=122?o-97+26:o>=48&&o<=57?o-48+52:43===o?62:47===o?63:-1;if(-1===a)return d("Invalid character in VLQ"),-1;t=0!=(32&a),i|=(31&a)<>=1:(i>>=1,i=-i),i}}function dJ(e,t){return e===t||e.generatedLine===t.generatedLine&&e.generatedCharacter===t.generatedCharacter&&e.sourceIndex===t.sourceIndex&&e.sourceLine===t.sourceLine&&e.sourceCharacter===t.sourceCharacter&&e.nameIndex===t.nameIndex}function pJ(e){return void 0!==e.sourceIndex&&void 0!==e.sourceLine&&void 0!==e.sourceCharacter}function fJ(e){return void 0!==e.sourceIndex&&void 0!==e.sourcePosition}function mJ(e,t){return e.generatedPosition===t.generatedPosition&&e.sourceIndex===t.sourceIndex&&e.sourcePosition===t.sourcePosition}function gJ(e,t){return xn.assert(e.sourceIndex===t.sourceIndex),Nt(e.sourcePosition,t.sourcePosition)}function hJ(e,t){return Nt(e.generatedPosition,t.generatedPosition)}function yJ(e){return e.sourcePosition}function vJ(e){return e.generatedPosition}function bJ(e,t,n){const r=Ro(n),i=t.sourceRoot?Go(t.sourceRoot,r):r,o=Go(t.file,r),a=e.getSourceFileLike(o),s=t.sources.map((e=>Go(e,i))),c=new Map(s.map(((t,n)=>[e.getCanonicalFileName(t),n])));let l,_,d;return{getSourcePosition:function(e){const t=function(){if(void 0===_){const e=[];for(const t of f())e.push(t);_=oe(e,hJ,mJ)}return _}();if(!Q(t))return e;let n=Ie(t,e.pos,vJ,Nt);n<0&&(n=~n);const r=t[n];return void 0!==r&&fJ(r)?{fileName:s[r.sourceIndex],pos:r.sourcePosition}:e},getGeneratedPosition:function(t){const n=c.get(e.getCanonicalFileName(t.fileName));if(void 0===n)return t;const r=function(e){if(void 0===d){const e=[];for(const t of f()){if(!fJ(t))continue;let n=e[t.sourceIndex];n||(e[t.sourceIndex]=n=[]),n.push(t)}d=e.map((e=>oe(e,gJ,mJ)))}return d[e]}(n);if(!Q(r))return t;let i=Ie(r,t.pos,yJ,Nt);i<0&&(i=~i);const a=r[i];return void 0===a||a.sourceIndex!==n?t:{fileName:o,pos:a.generatedPosition}}};function p(n){const r=void 0!==a?Va(a,n.generatedLine,n.generatedCharacter,!0):-1;let i,o;if(pJ(n)){const r=e.getSourceFileLike(s[n.sourceIndex]);i=t.sources[n.sourceIndex],o=void 0!==r?Va(r,n.sourceLine,n.sourceCharacter,!0):-1}return{generatedPosition:r,source:i,sourceIndex:n.sourceIndex,sourcePosition:o,nameIndex:n.nameIndex}}function f(){if(void 0===l){const n=_J(t.mappings),r=$e(n,p);void 0!==n.error?(e.log&&e.log(`Encountered error while decoding sourcemap: ${n.error}`),l=u):l=r}return l}}var xJ={getSourcePosition:mt,getGeneratedPosition:mt};function SJ(e){return(e=fc(e))?IB(e):0}function kJ(e){return!!e&&!(!pN(e)&&!hN(e))&&Q(e.elements,TJ)}function TJ(e){return void 0!==e.propertyName?"default"===e.propertyName.escapedText:"default"===e.name.escapedText}function CJ(e,t){return function(n){return 307===n.kind?t(n):function(n){return e.factory.createBundle(O(n.sourceFiles,t))}(n)}}function wJ(e){return!!wg(e)}function DJ(e){if(wg(e))return!0;const t=e.importClause&&e.importClause.namedBindings;if(!t)return!1;if(!pN(t))return!1;let n=0;for(const e of t.elements)TJ(e)&&n++;return n>0&&n!==t.elements.length||!!(t.elements.length-n)&&Dg(e)}function EJ(e){return!DJ(e)&&(Dg(e)||!!e.importClause&&pN(e.importClause.namedBindings)&&kJ(e.importClause.namedBindings))}function PJ(e,t){const n=e.getEmitResolver(),r=e.getCompilerOptions(),i=[],o=new IJ,a=[],s=new Map,c=new Set;let l,u,_=!1,d=!1,p=!1,f=!1;for(const n of t.statements)switch(n.kind){case 272:i.push(n),!p&&DJ(n)&&(p=!0),!f&&EJ(n)&&(f=!0);break;case 271:283===n.moduleReference.kind&&i.push(n);break;case 278:if(n.moduleSpecifier)if(n.exportClause)if(i.push(n),hN(n.exportClause))g(n),f||(f=kJ(n.exportClause));else{const e=n.exportClause.name;s.get(bc(e))||(FJ(a,SJ(n),e),s.set(bc(e),!0),l=ue(l,e)),p=!0}else i.push(n),d=!0;else g(n);break;case 277:n.isExportEquals&&!u&&(u=n);break;case 243:if(Bv(n,32))for(const e of n.declarationList.declarations)l=NJ(e,s,l,a);break;case 262:Bv(n,32)&&h(n,void 0,Bv(n,2048));break;case 263:if(Bv(n,32))if(Bv(n,2048))_||(FJ(a,SJ(n),e.factory.getDeclarationName(n)),_=!0);else{const e=n.name;e&&!s.get(bc(e))&&(FJ(a,SJ(n),e),s.set(bc(e),!0),l=ue(l,e))}}const m=bA(e.factory,e.getEmitHelperFactory(),t,r,d,p,f);return m&&i.unshift(m),{externalImports:i,exportSpecifiers:o,exportEquals:u,hasExportStarsToExportValues:d,exportedBindings:a,exportedNames:l,exportedFunctions:c,externalHelpersImportDeclaration:m};function g(e){for(const t of ut(e.exportClause,hN).elements)if(!s.get(bc(t.name))){const r=t.propertyName||t.name;e.moduleSpecifier||o.add(r,t);const i=n.getReferencedImportDeclaration(r)||n.getReferencedValueDeclaration(r);if(i){if(262===i.kind){h(i,t.name,"default"===t.name.escapedText);continue}FJ(a,SJ(i),t.name)}s.set(bc(t.name),!0),l=ue(l,t.name)}}function h(t,n,r){c.add(t),r?_||(FJ(a,SJ(t),n??e.factory.getDeclarationName(t)),_=!0):(n??(n=t.name),s.get(bc(n))||(FJ(a,SJ(t),n),s.set(bc(n),!0)))}}function NJ(e,t,n,r){if(Eu(e.name))for(const i of e.name.elements)gP(i)||(n=NJ(i,t,n,r));else if(!Xl(e.name)){const i=bc(e.name);t.get(i)||(t.set(i,!0),n=ue(n,e.name),iA(e.name)&&FJ(r,SJ(e),e.name))}return n}function FJ(e,t,n){let r=e[t];return r?r.push(n):e[t]=r=[n],r}var AJ=class e{constructor(){this._map=new Map}get size(){return this._map.size}has(t){return this._map.has(e.toKey(t))}get(t){return this._map.get(e.toKey(t))}set(t,n){return this._map.set(e.toKey(t),n),this}delete(t){var n;return(null==(n=this._map)?void 0:n.delete(e.toKey(t)))??!1}clear(){this._map.clear()}values(){return this._map.values()}static toKey(t){if(Ql(t)||Xl(t)){const n=t.emitNode.autoGenerate;if(4==(7&n.flags)){const r=QA(t),i=hl(r)&&r!==t?e.toKey(r):`(generated@${IB(r)})`;return ZA(!1,n.prefix,i,n.suffix,e.toKey)}{const t=`(auto@${n.id})`;return ZA(!1,n.prefix,t,n.suffix,e.toKey)}}return VD(t)?bc(t).slice(1):bc(t)}},IJ=class extends AJ{add(e,t){let n=this.get(e);return n?n.push(t):this.set(e,n=[t]),n}remove(e,t){const n=this.get(e);n&&(en(n,t),n.length||this.delete(e))}};function OJ(e){return $_(e)||9===e.kind||Ph(e.kind)||qD(e)}function MJ(e){return!qD(e)&&OJ(e)}function LJ(e){return e>=65&&e<=79}function jJ(e){switch(e){case 65:return 40;case 66:return 41;case 67:return 42;case 68:return 43;case 69:return 44;case 70:return 45;case 71:return 48;case 72:return 49;case 73:return 50;case 74:return 51;case 75:return 52;case 79:return 53;case 76:return 57;case 77:return 56;case 78:return 61}}function RJ(e){if(!NP(e))return;const t=lh(e.expression);return lf(t)?t:void 0}function BJ(e,t,n){for(let r=t;rfunction(e,t,n){return uE(e)&&(!!e.initializer||!t)&&zv(e)===n}(e,t,n)))}function $J(e){return uE(t=e)&&zv(t)||pE(e);var t}function qJ(e){return F(e.members,$J)}function VJ(e){return 172===e.kind&&void 0!==e.initializer}function UJ(e){return!Jv(e)&&(bu(e)||yu(e))&&VD(e.name)}function KJ(e){let t;if(e){const n=e.parameters,r=n.length>0&&hv(n[0]),i=r?1:0,o=r?n.length-1:n.length;for(let e=0;eYJ(e.privateEnv,t)))}function tz(e){return!e.initializer&&qD(e.name)}function nz(e){return x(e,tz)}var rz=(e=>(e[e.All=0]="All",e[e.ObjectRest=1]="ObjectRest",e))(rz||{});function iz(e,t,n,r,i,o){let a,s,c=e;if(hb(e))for(a=e.right;Fb(e.left)||Nb(e.left);){if(!hb(a))return xn.checkDefined(qB(a,t,Xu));c=e=a,a=e.right}const l={context:n,level:r,downlevelIteration:!!n.getCompilerOptions().downlevelIteration,hoistTempVariables:!0,emitExpression:u,emitBindingOrAssignment:function(e,r,i,a){xn.assertNode(e,o?qD:Xu);const s=o?o(e,r,i):sI(n.factory.createAssignment(xn.checkDefined(qB(e,t,Xu)),r),i);s.original=a,u(s)},createArrayBindingOrAssignmentPattern:e=>function(e,t){return xn.assertEachNode(t,ju),e.createArrayLiteralExpression(O(t,e.converters.convertToArrayAssignmentElement))}(n.factory,e),createObjectBindingOrAssignmentPattern:e=>function(e,t){return xn.assertEachNode(t,Mu),e.createObjectLiteralExpression(O(t,e.converters.convertToObjectAssignmentElement))}(n.factory,e),createArrayBindingOrAssignmentElement:dz,visitor:t};if(a&&(a=qB(a,t,Xu),xn.assert(a),qD(a)&&oz(e,a.escapedText)||az(e)?a=_z(l,a,!1,c):i?a=_z(l,a,!0,c):ly(e)&&(c=a)),cz(l,e,a,c,hb(e)),a&&i){if(!Q(s))return a;s.push(a)}return n.factory.inlineExpressions(s)||n.factory.createOmittedExpression();function u(e){s=ue(s,e)}}function oz(e,t){const n=wA(e);return Iu(n)?function(e,t){const n=FA(e);for(const e of n)if(oz(e,t))return!0;return!1}(n,t):!!qD(n)&&n.escapedText===t}function az(e){const t=PA(e);if(t&&oE(t)&&!Bl(t.expression))return!0;const n=wA(e);return!!n&&Iu(n)&&!!f(FA(n),az)}function sz(e,t,n,r,i,o=!1,a){let s;const c=[],l=[],u={context:n,level:r,downlevelIteration:!!n.getCompilerOptions().downlevelIteration,hoistTempVariables:o,emitExpression:function(e){s=ue(s,e)},emitBindingOrAssignment:_,createArrayBindingOrAssignmentPattern:e=>function(e,t){return xn.assertEachNode(t,Nu),e.createArrayBindingPattern(t)}(n.factory,e),createObjectBindingOrAssignmentPattern:e=>function(e,t){return xn.assertEachNode(t,KE),e.createObjectBindingPattern(t)}(n.factory,e),createArrayBindingOrAssignmentElement:e=>function(e,t){return e.createBindingElement(void 0,void 0,t)}(n.factory,e),visitor:t};if(KP(e)){let t=CA(e);t&&(qD(t)&&oz(e,t.escapedText)||az(e))&&(t=_z(u,xn.checkDefined(qB(t,u.visitor,Xu)),!1,t),e=n.factory.updateVariableDeclaration(e,e.name,void 0,void 0,t))}if(cz(u,e,i,e,a),s){const e=n.factory.createTempVariable(void 0);if(o){const t=n.factory.inlineExpressions(s);s=void 0,_(e,t,void 0,void 0)}else{n.hoistVariableDeclaration(e);const t=De(c);t.pendingExpressions=ue(t.pendingExpressions,n.factory.createAssignment(e,t.value)),pe(t.pendingExpressions,s),t.value=e}}for(const{pendingExpressions:e,name:t,value:r,location:i,original:o}of c){const a=n.factory.createVariableDeclaration(t,void 0,void 0,e?n.factory.inlineExpressions(ue(e,r)):r);a.original=o,sI(a,i),l.push(a)}return l;function _(e,t,r,i){xn.assertNode(e,su),s&&(t=n.factory.inlineExpressions(ue(s,t)),s=void 0),c.push({pendingExpressions:s,name:e,value:t,location:r,original:i})}}function cz(e,t,n,r,i){const o=wA(t);if(!i){const i=qB(CA(t),e.visitor,Xu);i?n?(n=function(e,t,n,r){return t=_z(e,t,!0,r),e.context.factory.createConditionalExpression(e.context.factory.createTypeCheck(t,"undefined"),void 0,n,void 0,t)}(e,n,i,r),!MJ(i)&&Iu(o)&&(n=_z(e,n,!0,r))):n=i:n||(n=e.context.factory.createVoidZero())}Ou(o)?function(e,t,n,r,i){const o=FA(n),a=o.length;let s,c;1!==a&&(r=_z(e,r,!Fu(t)||0!==a,i));for(let t=0;t=1)||98304&l.transformFlags||98304&wA(l).transformFlags||oE(t)){s&&(e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(s),r,i,n),s=void 0);const o=uz(e,r,t);oE(t)&&(c=ue(c,o.argumentExpression)),cz(e,l,o,l)}else s=ue(s,qB(l,e.visitor,Au))}}s&&e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(s),r,i,n)}(e,t,o,n,r):Lu(o)?function(e,t,n,r,i){const o=FA(n),a=o.length;let s,c;e.level<1&&e.downlevelIteration?r=_z(e,sI(e.context.getEmitHelperFactory().createReadHelper(r,a>0&&DA(o[a-1])?void 0:a),i),!1,i):(1!==a&&(e.level<1||0===a)||x(o,gP))&&(r=_z(e,r,!Fu(t)||0!==a,i));for(let t=0;t=1)if(65536&n.transformFlags||e.hasTransformedPriorElement&&!lz(n)){e.hasTransformedPriorElement=!0;const t=e.context.factory.createTempVariable(void 0);e.hoistTempVariables&&e.context.hoistVariableDeclaration(t),c=ue(c,[t,n]),s=ue(s,e.createArrayBindingOrAssignmentElement(t))}else s=ue(s,n);else{if(gP(n))continue;if(DA(n)){if(t===a-1){const i=e.context.factory.createArraySliceCall(r,t);cz(e,n,i,n)}}else{const i=e.context.factory.createElementAccessExpression(r,t);cz(e,n,i,n)}}}if(s&&e.emitBindingOrAssignment(e.createArrayBindingOrAssignmentPattern(s),r,i,n),c)for(const[t,n]of c)cz(e,n,t,n)}(e,t,o,n,r):e.emitBindingOrAssignment(o,n,r,t)}function lz(e){const t=wA(e);if(!t||gP(t))return!0;const n=PA(e);if(n&&!Wh(n))return!1;const r=CA(e);return!(r&&!MJ(r))&&(Iu(t)?x(FA(t),lz):qD(t))}function uz(e,t,n){const{factory:r}=e.context;if(oE(n)){const r=_z(e,xn.checkDefined(qB(n.expression,e.visitor,Xu)),!1,n);return e.context.factory.createElementAccessExpression(t,r)}if($h(n)){const i=r.cloneNode(n);return e.context.factory.createElementAccessExpression(t,i)}{const r=e.context.factory.createIdentifier(bc(n));return e.context.factory.createPropertyAccessExpression(t,r)}}function _z(e,t,n,r){if(qD(t)&&n)return t;{const n=e.context.factory.createTempVariable(void 0);return e.hoistTempVariables?(e.context.hoistVariableDeclaration(n),e.emitExpression(sI(e.context.factory.createAssignment(n,t),r))):e.emitBindingOrAssignment(n,t,r,void 0),n}}function dz(e){return e}function pz(e,t,n=e.createThis()){const r=e.createAssignment(t,n),i=e.createExpressionStatement(r),o=e.createBlock([i],!1),a=e.createClassStaticBlockDeclaration(o);return tw(a).classThis=t,a}function fz(e){var t;if(!pE(e)||1!==e.body.statements.length)return!1;const n=e.body.statements[0];return NP(n)&&mb(n.expression,!0)&&qD(n.expression.left)&&(null==(t=e.emitNode)?void 0:t.classThis)===n.expression.left&&110===n.expression.right.kind}function mz(e){var t;return!!(null==(t=e.emitNode)?void 0:t.classThis)&&Q(e.members,fz)}function gz(e,t,n,r){if(mz(t))return t;const i=pz(e,n,r);t.name&&lw(i.body.statements[0],t.name);const o=e.createNodeArray([i,...t.members]);sI(o,t.members);const a=GP(t)?e.updateClassDeclaration(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,o):e.updateClassExpression(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,o);return tw(a).classThis=n,a}function hz(e,t,n){const r=fc(fA(n));return(GP(r)||HP(r))&&!r.name&&Bv(r,2048)?e.createStringLiteral("default"):e.createStringLiteralFromNode(t)}function yz(e,t,n){const{factory:r}=e;if(void 0!==n)return{assignedName:r.createStringLiteral(n),name:t};if(Wh(t)||VD(t))return{assignedName:r.createStringLiteralFromNode(t),name:t};if(Wh(t.expression)&&!qD(t.expression))return{assignedName:r.createStringLiteralFromNode(t.expression),name:t};const i=r.getGeneratedNameForNode(t);e.hoistVariableDeclaration(i);const o=e.getEmitHelperFactory().createPropKeyHelper(t.expression),a=r.createAssignment(i,o);return{assignedName:i,name:r.updateComputedPropertyName(t,a)}}function vz(e,t,n=e.factory.createThis()){const{factory:r}=e,i=e.getEmitHelperFactory().createSetFunctionNameHelper(n,t),o=r.createExpressionStatement(i),a=r.createBlock([o],!1),s=r.createClassStaticBlockDeclaration(a);return tw(s).assignedName=t,s}function bz(e){var t;if(!pE(e)||1!==e.body.statements.length)return!1;const n=e.body.statements[0];return NP(n)&&kD(n.expression,"___setFunctionName")&&n.expression.arguments.length>=2&&n.expression.arguments[1]===(null==(t=e.emitNode)?void 0:t.assignedName)}function xz(e){var t;return!!(null==(t=e.emitNode)?void 0:t.assignedName)&&Q(e.members,bz)}function Sz(e){return!!e.name||xz(e)}function kz(e,t,n,r){if(xz(t))return t;const{factory:i}=e,o=vz(e,n,r);t.name&&lw(o.body.statements[0],t.name);const a=T(t.members,fz)+1,s=t.members.slice(0,a),c=t.members.slice(a),l=i.createNodeArray([...s,o,...c]);return sI(l,t.members),tw(t=GP(t)?i.updateClassDeclaration(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,l):i.updateClassExpression(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,l)).assignedName=n,t}function Tz(e,t,n,r){if(r&&wD(n)&&Sm(n))return t;const{factory:i}=e,o=fA(t),a=mP(o)?ut(kz(e,o,n),mP):e.getEmitHelperFactory().createSetFunctionNameHelper(o,n);return i.restoreOuterExpressions(t,a)}function Cz(e,t,n,r){switch(t.kind){case 303:return function(e,t,n,r){const{factory:i}=e,{assignedName:o,name:a}=yz(e,t.name,r),s=Tz(e,t.initializer,o,n);return i.updatePropertyAssignment(t,a,s)}(e,t,n,r);case 304:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.name,t.objectAssignmentInitializer),a=Tz(e,t.objectAssignmentInitializer,o,n);return i.updateShorthandPropertyAssignment(t,t.name,a)}(e,t,n,r);case 260:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.name,t.initializer),a=Tz(e,t.initializer,o,n);return i.updateVariableDeclaration(t,t.name,t.exclamationToken,t.type,a)}(e,t,n,r);case 169:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.name,t.initializer),a=Tz(e,t.initializer,o,n);return i.updateParameterDeclaration(t,t.modifiers,t.dotDotDotToken,t.name,t.questionToken,t.type,a)}(e,t,n,r);case 208:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.name,t.initializer),a=Tz(e,t.initializer,o,n);return i.updateBindingElement(t,t.dotDotDotToken,t.propertyName,t.name,a)}(e,t,n,r);case 172:return function(e,t,n,r){const{factory:i}=e,{assignedName:o,name:a}=yz(e,t.name,r),s=Tz(e,t.initializer,o,n);return i.updatePropertyDeclaration(t,t.modifiers,a,t.questionToken??t.exclamationToken,t.type,s)}(e,t,n,r);case 226:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.left,t.right),a=Tz(e,t.right,o,n);return i.updateBinaryExpression(t,t.left,t.operatorToken,a)}(e,t,n,r);case 277:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):i.createStringLiteral(t.isExportEquals?"":"default"),a=Tz(e,t.expression,o,n);return i.updateExportAssignment(t,t.modifiers,a)}(e,t,n,r)}}var wz=(e=>(e[e.LiftRestriction=0]="LiftRestriction",e[e.All=1]="All",e))(wz||{});function Dz(e,t,n,r,i,o){const a=qB(t.tag,n,Xu);xn.assert(a);const s=[void 0],c=[],l=[],u=t.template;if(0===o&&!Ty(u))return ZB(t,n,e);const{factory:_}=e;if(PD(u))c.push(Ez(_,u)),l.push(Pz(_,u,r));else{c.push(Ez(_,u.head)),l.push(Pz(_,u.head,r));for(const e of u.templateSpans)c.push(Ez(_,e.literal)),l.push(Pz(_,e.literal,r)),s.push(xn.checkDefined(qB(e.expression,n,Xu)))}const d=e.getEmitHelperFactory().createTemplateObjectHelper(_.createArrayLiteralExpression(c),_.createArrayLiteralExpression(l));if(qI(r)){const e=_.createUniqueName("templateObject");i(e),s[0]=_.createLogicalOr(e,_.createAssignment(e,d))}else s[0]=d;return _.createCallExpression(a,void 0,s)}function Ez(e,t){return 26656&t.templateFlags?e.createVoidZero():e.createStringLiteral(t.text)}function Pz(e,t,n){let r=t.rawText;if(void 0===r){xn.assertIsDefined(n,"Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."),r=Kd(n,t);const e=15===t.kind||18===t.kind;r=r.substring(1,r.length-(e?1:2))}return r=r.replace(/\r\n?/g,"\n"),sI(e.createStringLiteral(r),t)}function Nz(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,resumeLexicalEnvironment:i,endLexicalEnvironment:o,hoistVariableDeclaration:a}=e,s=e.getEmitResolver(),c=e.getCompilerOptions(),l=wS(c),u=DS(c),_=!!c.experimentalDecorators,d=c.emitDecoratorMetadata?Iz(e):void 0,p=e.onEmitNode,f=e.onSubstituteNode;let m,g,h,y,v,b,x,S;return e.onEmitNode=function(e,t,n){const r=S,i=m;qN(t)&&(m=t),2&x&&function(e){return 267===fc(e).kind}(t)&&(S|=2),8&x&&function(e){return 266===fc(e).kind}(t)&&(S|=8),p(e,t,n),S=r,m=i},e.onSubstituteNode=function(e,n){return n=f(e,n),1===e?function(e){switch(e.kind){case 80:return function(e){return ke(e)||e}(e);case 211:case 212:return function(e){return function(e){const n=function(e){if(!NS(c))return GE(e)||XE(e)?s.getConstantValue(e):void 0}(e);if(void 0!==n){Tw(e,n);const i="string"==typeof n?t.createStringLiteral(n):n<0?t.createPrefixUnaryExpression(41,t.createNumericLiteral(-n)):t.createNumericLiteral(n);if(!c.removeComments){xw(i,3,` ${r=Gd(fc(e,Ox)),r.replace(/\*\//g,"*_/")} `)}return i}var r;return e}(e)}(e)}return e}(n):JN(n)?function(e){if(2&x){const n=e.name,r=ke(n);if(r){if(e.objectAssignmentInitializer){const i=t.createAssignment(r,e.objectAssignmentInitializer);return sI(t.createPropertyAssignment(n,i),e)}return sI(t.createPropertyAssignment(n,r),e)}}return e}(n):n},e.enableSubstitution(211),e.enableSubstitution(212),function(e){return 308===e.kind?function(e){return t.createBundle(e.sourceFiles.map(k))}(e):k(e)};function k(t){if(t.isDeclarationFile)return t;m=t;const n=T(t,R);return ww(n,e.readEmitHelpers()),m=void 0,n}function T(e,t){const n=y,r=v,i=b;!function(e){switch(e.kind){case 307:case 269:case 268:case 241:y=e,v=void 0;break;case 263:case 262:if(Bv(e,128))break;e.name?re(e):xn.assert(263===e.kind||Bv(e,2048))}}(e);const o=t(e);return y!==n&&(v=r),y=n,b=i,o}function C(e){return T(e,w)}function w(e){return 1&e.transformFlags?j(e):e}function D(e){return T(e,E)}function E(n){switch(n.kind){case 272:case 271:case 277:case 278:return function(n){if(function(e){const t=hc(e);if(t===e||mN(e))return!1;if(!t||t.kind!==e.kind)return!0;switch(e.kind){case 272:if(xn.assertNode(t,iN),e.importClause!==t.importClause)return!0;if(e.attributes!==t.attributes)return!0;break;case 271:if(xn.assertNode(t,rN),e.name!==t.name)return!0;if(e.isTypeOnly!==t.isTypeOnly)return!0;if(e.moduleReference!==t.moduleReference&&(ou(e.moduleReference)||ou(t.moduleReference)))return!0;break;case 278:if(xn.assertNode(t,gN),e.exportClause!==t.exportClause)return!0;if(e.attributes!==t.attributes)return!0}return!1}(n))return 1&n.transformFlags?ZB(n,C,e):n;switch(n.kind){case 272:return function(e){if(!e.importClause)return e;if(e.importClause.isTypeOnly)return;const n=qB(e.importClause,ce,oN);return n?t.updateImportDeclaration(e,void 0,n,e.moduleSpecifier,e.attributes):void 0}(n);case 271:return fe(n);case 277:return function(t){return c.verbatimModuleSyntax||s.isValueAliasDeclaration(t)?ZB(t,C,e):void 0}(n);case 278:return function(e){if(e.isTypeOnly)return;if(!e.exportClause||dN(e.exportClause))return e;const n=!!c.verbatimModuleSyntax,r=qB(e.exportClause,(e=>function(e,n){return dN(e)?function(e){return t.updateNamespaceExport(e,xn.checkDefined(qB(e.name,C,qD)))}(e):function(e,n){const r=VB(e.elements,de,yN);return n||Q(r)?t.updateNamedExports(e,r):void 0}(e,n)}(e,n)),Fl);return r?t.updateExportDeclaration(e,void 0,e.isTypeOnly,r,e.moduleSpecifier,e.attributes):void 0}(n);default:xn.fail("Unhandled ellided statement")}}(n);default:return w(n)}}function P(e){return T(e,N)}function N(e){if(278!==e.kind&&272!==e.kind&&273!==e.kind&&(271!==e.kind||283!==e.moduleReference.kind))return 1&e.transformFlags||Bv(e,32)?j(e):e}function A(n){return r=>T(r,(r=>function(n,r){switch(n.kind){case 176:return function(n){if(K(n))return t.updateConstructorDeclaration(n,void 0,HB(n.parameters,C,e),function(n,r){const a=r&&F(r.parameters,(e=>rc(e,r)));if(!Q(a))return XB(n,C,e);let s=[];i();const c=t.copyPrologue(n.statements,s,!1,C),l=JJ(n.statements,c),u=q(a,H);l.length?W(s,n.statements,c,l,0,u):(pe(s,u),pe(s,VB(n.statements,C,b_,c))),s=t.mergeLexicalEnvironment(s,o());const _=t.createBlock(sI(t.createNodeArray(s),n.statements),!0);return sI(_,n),ew(_,n),_}(n.body,n))}(n);case 172:return function(e,n){const r=33554432&e.flags||Bv(e,64);if(r&&(!_||!Wv(e)))return;let i=gu(n)?VB(e.modifiers,r?M:C,Su):VB(e.modifiers,I,Su);return i=$(i,e,n),r?t.updatePropertyDeclaration(e,Z(i,t.createModifiersFromModifierFlags(128)),xn.checkDefined(qB(e.name,C,au)),void 0,void 0,void 0):t.updatePropertyDeclaration(e,i,U(e),void 0,void 0,qB(e.initializer,C,Xu))}(n,r);case 177:return Y(n,r);case 178:return ee(n,r);case 174:return G(n,r);case 175:return ZB(n,C,e);case 240:return n;case 181:return;default:return xn.failBadSyntaxKind(n)}}(r,n)))}function I(e){return cE(e)?void 0:C(e)}function M(e){return iu(e)?void 0:C(e)}function L(e){if(!cE(e)&&!(28895&ob(e.kind)||g&&95===e.kind))return e}function j(n){if(b_(n)&&Bv(n,128))return t.createNotEmittedStatement(n);switch(n.kind){case 95:case 90:return g?void 0:n;case 125:case 123:case 124:case 128:case 164:case 87:case 138:case 148:case 103:case 147:case 188:case 189:case 190:case 191:case 187:case 182:case 168:case 133:case 159:case 136:case 154:case 150:case 146:case 116:case 155:case 185:case 184:case 186:case 183:case 192:case 193:case 194:case 196:case 197:case 198:case 199:case 200:case 201:case 181:case 270:return;case 265:case 264:return t.createNotEmittedStatement(n);case 263:return function(n){const r=function(e){let t=0;Q(zJ(e,!0,!0))&&(t|=1);const n=Sh(e);return n&&106!==fA(n.expression).kind&&(t|=64),bm(_,e)&&(t|=2),vm(_,e)&&(t|=4),me(e)?t|=8:function(e){return ge(e)&&Bv(e,2048)}(e)?t|=32:he(e)&&(t|=16),t}(n),i=l<=1&&!!(7&r);if(!function(e){return Wv(e)||Q(e.typeParameters)||Q(e.heritageClauses,B)||Q(e.members,B)}(n)&&!bm(_,n)&&!me(n))return t.updateClassDeclaration(n,VB(n.modifiers,L,iu),n.name,void 0,VB(n.heritageClauses,C,jN),VB(n.members,A(n),mu));i&&e.startLexicalEnvironment();const o=i||8&r;let a=VB(n.modifiers,o?M:C,Su);2&r&&(a=z(a,n));const s=o&&!n.name||4&r||1&r?n.name??t.getGeneratedNameForNode(n):n.name,c=t.updateClassDeclaration(n,a,s,void 0,VB(n.heritageClauses,C,jN),J(n));let u,d=Yd(n);if(1&r&&(d|=64),iw(c,d),i){const r=[c],i=Gb(as(m.text,n.members.end),20),o=t.getInternalName(n),a=t.createPartiallyEmittedExpression(o);NT(a,i.end),iw(a,3072);const s=t.createReturnStatement(a);PT(s,i.pos),iw(s,3840),r.push(s),jd(r,e.endLexicalEnvironment());const l=t.createImmediatelyInvokedArrowFunction(r);aw(l,1);const _=t.createVariableDeclaration(t.getLocalName(n,!1,!1),void 0,void 0,l);ew(_,n);const d=t.createVariableStatement(void 0,t.createVariableDeclarationList([_],1));ew(d,n),mw(d,n),lw(d,Kb(n)),hA(d),u=d}else u=c;if(o){if(8&r)return[u,ye(n)];if(32&r)return[u,t.createExportDefault(t.getLocalName(n,!1,!0))];if(16&r)return[u,t.createExternalModuleExport(t.getDeclarationName(n,!1,!0))]}return u}(n);case 231:return function(e){let n=VB(e.modifiers,M,Su);return bm(_,e)&&(n=z(n,e)),t.updateClassExpression(e,n,e.name,void 0,VB(e.heritageClauses,C,jN),J(e))}(n);case 298:return function(t){if(119!==t.token)return ZB(t,C,e)}(n);case 233:return function(e){return t.updateExpressionWithTypeArguments(e,xn.checkDefined(qB(e.expression,C,Vu)),void 0)}(n);case 210:return function(e){return t.updateObjectLiteralExpression(e,VB(e.properties,(n=e,e=>T(e,(e=>function(e,t){switch(e.kind){case 303:case 304:case 305:return C(e);case 177:return Y(e,t);case 178:return ee(e,t);case 174:return G(e,t);default:return xn.failBadSyntaxKind(e)}}(e,n)))),Cu));var n}(n);case 176:case 172:case 174:case 177:case 178:case 175:return xn.fail("Class and object literal elements must be visited with their respective visitors");case 262:return function(n){if(!K(n))return t.createNotEmittedStatement(n);const r=t.updateFunctionDeclaration(n,VB(n.modifiers,L,iu),n.asteriskToken,n.name,void 0,HB(n.parameters,C,e),void 0,XB(n.body,C,e)||t.createBlock([]));if(me(n)){const e=[r];return function(e,t){e.push(ye(t))}(e,n),e}return r}(n);case 218:return function(n){return K(n)?t.updateFunctionExpression(n,VB(n.modifiers,L,iu),n.asteriskToken,n.name,void 0,HB(n.parameters,C,e),void 0,XB(n.body,C,e)||t.createBlock([])):t.createOmittedExpression()}(n);case 219:return function(n){return t.updateArrowFunction(n,VB(n.modifiers,L,iu),void 0,HB(n.parameters,C,e),void 0,n.equalsGreaterThanToken,XB(n.body,C,e))}(n);case 169:return function(e){if(hv(e))return;const n=t.updateParameterDeclaration(e,VB(e.modifiers,(e=>cE(e)?C(e):void 0),Su),e.dotDotDotToken,xn.checkDefined(qB(e.name,C,su)),void 0,void 0,qB(e.initializer,C,Xu));return n!==e&&(mw(n,e),sI(n,Wb(e)),lw(n,Wb(e)),iw(n.name,64)),n}(n);case 217:return function(n){const r=fA(n.expression,-7);if(Qu(r)||vP(r)){const e=qB(n.expression,C,Xu);return xn.assert(e),t.createPartiallyEmittedExpression(e,n)}return ZB(n,C,e)}(n);case 216:case 234:return function(e){const n=qB(e.expression,C,Xu);return xn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 238:return function(e){const n=qB(e.expression,C,Xu);return xn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 213:return function(e){return t.updateCallExpression(e,xn.checkDefined(qB(e.expression,C,Xu)),void 0,VB(e.arguments,C,Xu))}(n);case 214:return function(e){return t.updateNewExpression(e,xn.checkDefined(qB(e.expression,C,Xu)),void 0,VB(e.arguments,C,Xu))}(n);case 215:return function(e){return t.updateTaggedTemplateExpression(e,xn.checkDefined(qB(e.tag,C,Xu)),void 0,xn.checkDefined(qB(e.template,C,qu)))}(n);case 235:return function(e){const n=qB(e.expression,C,Vu);return xn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 266:return function(e){if(!function(e){return!tf(e)||jS(c)}(e))return t.createNotEmittedStatement(e);const n=[];let i=4;const a=oe(n,e);a&&(4===u&&y===m||(i|=1024));const s=xe(e),l=Se(e),_=me(e)?t.getExternalModuleOrNamespaceExportName(h,e,!1,!0):t.getDeclarationName(e,!1,!0);let d=t.createLogicalOr(_,t.createAssignment(_,t.createObjectLiteralExpression()));if(me(e)){const n=t.getLocalName(e,!1,!0);d=t.createAssignment(n,d)}const p=t.createExpressionStatement(t.createCallExpression(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,s)],void 0,function(e,n){const i=h;h=n;const a=[];r();const s=O(e.members,ne);return jd(a,o()),pe(a,s),h=i,t.createBlock(sI(t.createNodeArray(a),e.members),!0)}(e,l)),void 0,[d]));return ew(p,e),a&&(hw(p,void 0),bw(p,void 0)),sI(p,e),ow(p,i),n.push(p),n}(n);case 243:return function(n){if(me(n)){const e=lx(n.declarationList);if(0===e.length)return;return sI(t.createExpressionStatement(t.inlineExpressions(O(e,te))),n)}return ZB(n,C,e)}(n);case 260:return function(e){const n=t.updateVariableDeclaration(e,xn.checkDefined(qB(e.name,C,su)),void 0,void 0,qB(e.initializer,C,Xu));return e.type&&Iw(n.name,e.type),n}(n);case 267:return ae(n);case 271:return fe(n);case 285:return function(e){return t.updateJsxSelfClosingElement(e,xn.checkDefined(qB(e.tagName,C,k_)),void 0,xn.checkDefined(qB(e.attributes,C,FN)))}(n);case 286:return function(e){return t.updateJsxOpeningElement(e,xn.checkDefined(qB(e.tagName,C,k_)),void 0,xn.checkDefined(qB(e.attributes,C,FN)))}(n);default:return ZB(n,C,e)}}function R(n){const r=WS(c,"alwaysStrict")&&!(qI(n)&&u>=5)&&!ef(n);return t.updateSourceFile(n,WB(n.statements,D,e,0,r))}function B(e){return!!(8192&e.transformFlags)}function J(e){const n=VB(e.members,A(e),mu);let r;const i=pv(e),o=i&&F(i.parameters,(e=>rc(e,i)));if(o)for(const e of o){const n=t.createPropertyDeclaration(void 0,e.name,void 0,void 0,void 0);ew(n,e),r=ue(r,n)}return r?(r=pe(r,n),sI(t.createNodeArray(r),e.members)):n}function z(e,n){const r=V(n,n);if(Q(r)){const n=[];pe(n,yn(e,HA)),pe(n,F(e,cE)),pe(n,r),pe(n,F(vn(e,HA),iu)),e=sI(t.createNodeArray(n),e)}return e}function $(e,n,r){if(gu(r)&&xm(_,n,r)){const i=V(n,r);if(Q(i)){const n=[];pe(n,F(e,cE)),pe(n,i),pe(n,F(e,iu)),e=sI(t.createNodeArray(n),e)}}return e}function V(e,r){if(_)return function(e,r){if(d){let i;if(function(e){const t=e.kind;return 174===t||177===t||178===t||172===t}(e)){const o=n().createMetadataHelper("design:type",d.serializeTypeOfNode({currentLexicalScope:y,currentNameScope:r},e,r));i=ue(i,t.createDecorator(o))}if(function(e){switch(e.kind){case 263:case 231:return void 0!==pv(e);case 174:case 177:case 178:return!0}return!1}(e)){const o=n().createMetadataHelper("design:paramtypes",d.serializeParameterTypesOfNode({currentLexicalScope:y,currentNameScope:r},e,r));i=ue(i,t.createDecorator(o))}if(function(e){return 174===e.kind}(e)){const o=n().createMetadataHelper("design:returntype",d.serializeReturnTypeOfNode({currentLexicalScope:y,currentNameScope:r},e));i=ue(i,t.createDecorator(o))}return i}}(e,r)}function U(e){const n=e.name;if(oE(n)&&(!zv(e)&&b||Wv(e)&&_)){const e=qB(n.expression,C,Xu);if(xn.assert(e),!MJ(El(e))){const r=t.getGeneratedNameForNode(n);return a(r),t.updateComputedPropertyName(n,t.createAssignment(r,e))}}return xn.checkDefined(qB(n,C,au))}function K(e){return!Nd(e.body)}function W(e,n,r,i,o,a){const s=i[o],c=n[s];if(pe(e,VB(n,C,b_,r,s-r)),VP(c)){const n=[];W(n,c.tryBlock.statements,0,i,o+1,a),sI(t.createNodeArray(n),c.tryBlock.statements),e.push(t.updateTryStatement(c,t.updateBlock(c.tryBlock,n),qB(c.catchClause,C,RN),qB(c.finallyBlock,C,DP)))}else pe(e,VB(n,C,b_,s,1)),pe(e,a);pe(e,VB(n,C,b_,s+1))}function H(e){const n=e.name;if(!qD(n))return;const r=OT(sI(t.cloneNode(n),n),n.parent);iw(r,3168);const i=OT(sI(t.cloneNode(n),n),n.parent);return iw(i,3072),hA(rw(sI(ew(t.createExpressionStatement(t.createAssignment(sI(t.createPropertyAccessExpression(t.createThis(),r),e.name),i)),e),Ub(e,-1))))}function G(n,r){if(!(1&n.transformFlags))return n;if(!K(n))return;let i=gu(r)?VB(n.modifiers,C,Su):VB(n.modifiers,I,Su);return i=$(i,n,r),t.updateMethodDeclaration(n,i,n.asteriskToken,U(n),void 0,void 0,HB(n.parameters,C,e),void 0,XB(n.body,C,e))}function X(e){return!(Nd(e.body)&&Bv(e,64))}function Y(n,r){if(!(1&n.transformFlags))return n;if(!X(n))return;let i=gu(r)?VB(n.modifiers,C,Su):VB(n.modifiers,I,Su);return i=$(i,n,r),t.updateGetAccessorDeclaration(n,i,U(n),HB(n.parameters,C,e),void 0,XB(n.body,C,e)||t.createBlock([]))}function ee(n,r){if(!(1&n.transformFlags))return n;if(!X(n))return;let i=gu(r)?VB(n.modifiers,C,Su):VB(n.modifiers,I,Su);return i=$(i,n,r),t.updateSetAccessorDeclaration(n,i,U(n),HB(n.parameters,C,e),XB(n.body,C,e)||t.createBlock([]))}function te(n){const r=n.name;return Eu(r)?iz(n,C,e,0,!1,ve):sI(t.createAssignment(be(r),xn.checkDefined(qB(n.initializer,C,Xu))),n)}function ne(n){const r=function(e,n){const r=e.name;return VD(r)?t.createIdentifier(""):oE(r)?r.expression:qD(r)?t.createStringLiteral(bc(r)):t.cloneNode(r)}(n),i=s.getEnumMemberValue(n),o=function(n,r){return void 0!==r?"string"==typeof r?t.createStringLiteral(r):r<0?t.createPrefixUnaryExpression(41,t.createNumericLiteral(-r)):t.createNumericLiteral(r):(0==(8&x)&&(x|=8,e.enableSubstitution(80)),n.initializer?xn.checkDefined(qB(n.initializer,C,Xu)):t.createVoidZero())}(n,null==i?void 0:i.value),a=t.createAssignment(t.createElementAccessExpression(h,r),o),c="string"==typeof(null==i?void 0:i.value)||(null==i?void 0:i.isSyntacticallyString)?a:t.createAssignment(t.createElementAccessExpression(h,a),r);return sI(t.createExpressionStatement(sI(c,n)),n)}function re(e){v||(v=new Map);const t=ie(e);v.has(t)||v.set(t,e)}function ie(e){return xn.assertNode(e.name,qD),e.name.escapedText}function oe(e,n){const r=t.createVariableDeclaration(t.getLocalName(n,!1,!0)),i=307===y.kind?0:1,o=t.createVariableStatement(VB(n.modifiers,L,iu),t.createVariableDeclarationList([r],i));return ew(r,n),hw(r,void 0),bw(r,void 0),ew(o,n),re(n),!!function(e){if(v){const t=ie(e);return v.get(t)===e}return!0}(n)&&(266===n.kind?lw(o.declarationList,n):lw(o,n),mw(o,n),ow(o,2048),e.push(o),!0)}function ae(n){if(!function(e){const t=hc(e,ZP);return!t||MB(t,jS(c))}(n))return t.createNotEmittedStatement(n);xn.assertNode(n.name,qD,"A TypeScript namespace should have an Identifier name."),0==(2&x)&&(x|=2,e.enableSubstitution(80),e.enableSubstitution(304),e.enableEmitNotification(267));const i=[];let a=4;const s=oe(i,n);s&&(4===u&&y===m||(a|=1024));const l=xe(n),_=Se(n),d=me(n)?t.getExternalModuleOrNamespaceExportName(h,n,!1,!0):t.getDeclarationName(n,!1,!0);let p=t.createLogicalOr(d,t.createAssignment(d,t.createObjectLiteralExpression()));if(me(n)){const e=t.getLocalName(n,!1,!0);p=t.createAssignment(e,p)}const f=t.createExpressionStatement(t.createCallExpression(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,l)],void 0,function(e,n){const i=h,a=g,s=v;h=n,g=e,v=void 0;const c=[];let l,u;if(r(),e.body)if(268===e.body.kind)T(e.body,(e=>pe(c,VB(e.statements,P,b_)))),l=e.body.statements,u=e.body;else{const t=ae(e.body);t&&(ot(t)?pe(c,t):c.push(t)),l=Ub(se(e).body.statements,-1)}jd(c,o()),h=i,g=a,v=s;const _=t.createBlock(sI(t.createNodeArray(c),l),!0);return sI(_,u),e.body&&268===e.body.kind||iw(_,3072|Yd(_)),_}(n,_)),void 0,[p]));return ew(f,n),s&&(hw(f,void 0),bw(f,void 0)),sI(f,n),ow(f,a),i.push(f),i}function se(e){if(267===e.body.kind)return se(e.body)||e.body}function ce(e){xn.assert(!e.isTypeOnly);const n=Te(e)?e.name:void 0,r=qB(e.namedBindings,le,__);return n||r?t.updateImportClause(e,!1,n,r):void 0}function le(e){if(274===e.kind)return Te(e)?e:void 0;{const n=c.verbatimModuleSyntax,r=VB(e.elements,_e,fN);return n||Q(r)?t.updateNamedImports(e,r):void 0}}function _e(e){return!e.isTypeOnly&&Te(e)?e:void 0}function de(e){return e.isTypeOnly||!c.verbatimModuleSyntax&&!s.isValueAliasDeclaration(e)?void 0:e}function fe(n){if(n.isTypeOnly)return;if(Em(n))return Te(n)?ZB(n,C,e):void 0;if(!function(e){return Te(e)||!qI(m)&&s.isTopLevelValueImportEqualsWithEntityName(e)}(n))return;const r=ZF(t,n.moduleReference);return iw(r,7168),he(n)||!me(n)?ew(sI(t.createVariableStatement(VB(n.modifiers,L,iu),t.createVariableDeclarationList([ew(t.createVariableDeclaration(n.name,void 0,void 0,r),n)])),n),n):ew(function(e,n,r){return sI(t.createExpressionStatement(t.createAssignment(t.getNamespaceMemberName(h,e,!1,!0),n)),r)}(n.name,r,n),n)}function me(e){return void 0!==g&&Bv(e,32)}function ge(e){return void 0===g&&Bv(e,32)}function he(e){return ge(e)&&!Bv(e,2048)}function ye(e){const n=t.createAssignment(t.getExternalModuleOrNamespaceExportName(h,e,!1,!0),t.getLocalName(e));lw(n,qb(e.name?e.name.pos:e.pos,e.end));const r=t.createExpressionStatement(n);return lw(r,qb(-1,e.end)),r}function ve(e,n,r){return sI(t.createAssignment(be(e),n),r)}function be(e){return t.getNamespaceMemberName(h,e,!1,!0)}function xe(e){const n=t.getGeneratedNameForNode(e);return lw(n,e.name),n}function Se(e){return t.getGeneratedNameForNode(e)}function ke(e){if(x&S&&!Xl(e)&&!iA(e)){const n=s.getReferencedExportContainer(e,!1);if(n&&307!==n.kind&&(2&S&&267===n.kind||8&S&&266===n.kind))return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(n),e),e)}}function Te(e){return c.verbatimModuleSyntax||Mm(e)||s.isReferencedAliasDeclaration(e)}}function Fz(e){const{factory:t,getEmitHelperFactory:n,hoistVariableDeclaration:r,endLexicalEnvironment:i,startLexicalEnvironment:o,resumeLexicalEnvironment:a,addBlockScopedVariable:s}=e,c=e.getEmitResolver(),l=e.getCompilerOptions(),u=wS(l),_=zS(l),d=!!l.experimentalDecorators,p=!_,f=_&&u<9,m=p||f,g=u<9,h=u<99?-1:_?0:3,y=u<9,v=y&&u>=2,b=m||g||-1===h,x=e.onSubstituteNode;e.onSubstituteNode=function(e,n){return n=x(e,n),1===e?function(e){switch(e.kind){case 80:return function(e){return function(e){if(1&T&&c.hasNodeCheckFlag(e,536870912)){const n=c.getReferencedValueDeclaration(e);if(n){const r=C[n.id];if(r){const n=t.cloneNode(r);return lw(n,e),mw(n,e),n}}}}(e)||e}(e);case 110:return function(e){if(2&T&&(null==E?void 0:E.data)&&!A.has(e)){const{facts:n,classConstructor:r,classThis:i}=E.data,o=L?i??r:r;if(o)return sI(ew(t.cloneNode(o),e),e);if(1&n&&d)return t.createParenthesizedExpression(t.createVoidZero())}return e}(e)}return e}(n):n};const k=e.onEmitNode;e.onEmitNode=function(e,t,n){const r=fc(t),i=N.get(r);if(i){const o=E,a=j;return E=i,j=L,L=!(pE(r)&&32&Zd(r)),k(e,t,n),L=j,j=a,void(E=o)}switch(t.kind){case 218:if(rP(r)||524288&Yd(t))break;case 262:case 176:case 177:case 178:case 174:case 172:{const r=E,i=j;return E=void 0,j=L,L=!1,k(e,t,n),L=j,j=i,void(E=r)}case 167:{const r=E,i=L;return E=null==E?void 0:E.previous,L=j,k(e,t,n),L=i,void(E=r)}}k(e,t,n)};let T,C,w,D,E,P=!1;const N=new Map,A=new Set;let I,M,L=!1,j=!1;return CJ(e,(function(t){if(t.isDeclarationFile)return t;if(E=void 0,P=!!(32&Zd(t)),!b&&!P)return t;const n=ZB(t,B,e);return ww(n,e.readEmitHelpers()),n}));function R(e){return 129===e.kind?ee()?void 0:e:lt(e,iu)}function B(n){if(!(16777216&n.transformFlags||134234112&n.transformFlags))return n;switch(n.kind){case 129:return xn.fail("Use `modifierVisitor` instead.");case 263:return function(e){return ge(e,he)}(n);case 231:return function(e){return ge(e,ye)}(n);case 175:case 172:return xn.fail("Use `classElementVisitor` instead.");case 303:case 260:case 169:case 208:return function(t){return iy(t,le)&&(t=Cz(e,t)),ZB(t,B,e)}(n);case 243:return function(t){const n=D;D=[];const r=ZB(t,B,e),i=Q(D)?[r,...D]:r;return D=n,i}(n);case 277:return function(t){return iy(t,le)&&(t=Cz(e,t,!0,t.isExportEquals?"":"default")),ZB(t,B,e)}(n);case 81:return function(e){return g?b_(e.parent)?e:ew(t.createIdentifier(""),e):e}(n);case 211:return function(n){if(VD(n.name)){const e=Le(n.name);if(e)return sI(ew(re(e,n.expression),n),n)}if(v&&M&&um(n)&&qD(n.name)&&Az(M)&&(null==E?void 0:E.data)){const{classConstructor:e,superClassReference:r,facts:i}=E.data;if(1&i)return De(n);if(e&&r){const i=t.createReflectGetCall(r,t.createStringLiteralFromNode(n.name),e);return ew(i,n.expression),sI(i,n.expression),i}}return ZB(n,B,e)}(n);case 212:return function(n){if(v&&M&&um(n)&&Az(M)&&(null==E?void 0:E.data)){const{classConstructor:e,superClassReference:r,facts:i}=E.data;if(1&i)return De(n);if(e&&r){const i=t.createReflectGetCall(r,qB(n.argumentExpression,B,Xu),e);return ew(i,n.expression),sI(i,n.expression),i}}return ZB(n,B,e)}(n);case 224:case 225:return oe(n,!1);case 226:return _e(n,!1);case 217:return de(n,!1);case 213:return function(n){var i;if(eu(n.expression)&&Le(n.expression.name)){const{thisArg:e,target:i}=t.createCallBinding(n.expression,r,u);return xl(n)?t.updateCallChain(n,t.createPropertyAccessChain(qB(i,B,Xu),n.questionDotToken,"call"),void 0,void 0,[qB(e,B,Xu),...VB(n.arguments,B,Xu)]):t.updateCallExpression(n,t.createPropertyAccessExpression(qB(i,B,Xu),"call"),void 0,[qB(e,B,Xu),...VB(n.arguments,B,Xu)])}if(v&&M&&um(n.expression)&&Az(M)&&(null==(i=null==E?void 0:E.data)?void 0:i.classConstructor)){const e=t.createFunctionCallCall(qB(n.expression,B,Xu),E.data.classConstructor,VB(n.arguments,B,Xu));return ew(e,n),sI(e,n),e}return ZB(n,B,e)}(n);case 244:return function(e){return t.updateExpressionStatement(e,qB(e.expression,z,Xu))}(n);case 215:return function(n){var i;if(eu(n.tag)&&Le(n.tag.name)){const{thisArg:e,target:i}=t.createCallBinding(n.tag,r,u);return t.updateTaggedTemplateExpression(n,t.createCallExpression(t.createPropertyAccessExpression(qB(i,B,Xu),"bind"),void 0,[qB(e,B,Xu)]),void 0,qB(n.template,B,qu))}if(v&&M&&um(n.tag)&&Az(M)&&(null==(i=null==E?void 0:E.data)?void 0:i.classConstructor)){const e=t.createFunctionBindCall(qB(n.tag,B,Xu),E.data.classConstructor,[]);return ew(e,n),sI(e,n),t.updateTaggedTemplateExpression(n,e,void 0,qB(n.template,B,qu))}return ZB(n,B,e)}(n);case 248:return function(n){return t.updateForStatement(n,qB(n.initializer,z,s_),qB(n.condition,B,Xu),qB(n.incrementor,z,Xu),QB(n.statement,B,e))}(n);case 110:return function(e){if(y&&M&&pE(M)&&(null==E?void 0:E.data)){const{classThis:t,classConstructor:n}=E.data;return t??n??e}return e}(n);case 262:case 218:return Y(void 0,J,n);case 176:case 174:case 177:case 178:return Y(n,J,n);default:return J(n)}}function J(t){return ZB(t,B,e)}function z(e){switch(e.kind){case 224:case 225:return oe(e,!0);case 226:return _e(e,!0);case 355:return function(e,n){const r=YB(e.elements,z);return t.updateCommaListExpression(e,r)}(e);case 217:return de(e,!0);default:return B(e)}}function $(n){switch(n.kind){case 298:return ZB(n,$,e);case 233:return function(n){var i;if(4&((null==(i=null==E?void 0:E.data)?void 0:i.facts)||0)){const e=t.createTempVariable(r,!0);return Ee().superClassReference=e,t.updateExpressionWithTypeArguments(n,t.createAssignment(e,qB(n.expression,B,Xu)),void 0)}return ZB(n,B,e)}(n);default:return B(n)}}function q(e){switch(e.kind){case 210:case 209:return ze(e);default:return B(e)}}function V(e){switch(e.kind){case 176:return Y(e,H,e);case 177:case 178:case 174:return Y(e,X,e);case 172:return Y(e,te,e);case 175:return Y(e,ve,e);case 167:return W(e);case 240:return e;default:return Su(e)?R(e):B(e)}}function U(e){return 167===e.kind?W(e):B(e)}function K(e){switch(e.kind){case 172:return Z(e);case 177:case 178:return V(e);default:xn.assertMissingNode(e,"Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration")}}function W(e){const n=qB(e.expression,B,Xu);return t.updateComputedPropertyName(e,function(e){return Q(w)&&(tP(e)?(w.push(e.expression),e=t.updateParenthesizedExpression(e,t.inlineExpressions(w))):(w.push(e),e=t.inlineExpressions(w)),w=void 0),e}(n))}function H(e){return I?xe(e,I):J(e)}function G(e){return!!g||!!(zv(e)&&32&Zd(e))}function X(n){if(xn.assert(!Wv(n)),!Zl(n)||!G(n))return ZB(n,V,e);const r=Le(n.name);if(xn.assert(r,"Undeclared private name for property declaration."),!r.isValid)return n;const i=function(e){xn.assert(VD(e.name));const t=Le(e.name);if(xn.assert(t,"Undeclared private name for property declaration."),"m"===t.kind)return t.methodName;if("a"===t.kind){if(I_(e))return t.getterName;if(A_(e))return t.setterName}}(n);i&&Ne().push(t.createAssignment(i,t.createFunctionExpression(F(n.modifiers,(e=>iu(e)&&!QD(e)&&!eE(e))),n.asteriskToken,i,void 0,HB(n.parameters,B,e),void 0,XB(n.body,B,e))))}function Y(e,t,n){if(e!==M){const r=M;M=e;const i=t(n);return M=r,i}return t(n)}function Z(n){return xn.assert(!Wv(n),"Decorators should already have been transformed and elided."),Zl(n)?function(n){if(!G(n))return p&&!Jv(n)&&(null==E?void 0:E.data)&&16&E.data.facts?t.updatePropertyDeclaration(n,VB(n.modifiers,B,Su),n.name,void 0,void 0,void 0):(iy(n,le)&&(n=Cz(e,n)),t.updatePropertyDeclaration(n,VB(n.modifiers,R,iu),qB(n.name,U,au),void 0,void 0,qB(n.initializer,B,Xu)));{const e=Le(n.name);if(xn.assert(e,"Undeclared private name for property declaration."),!e.isValid)return n;if(e.isStatic&&!g){const e=Te(n,t.createThis());if(e)return t.createClassStaticBlockDeclaration(t.createBlock([e],!0))}}}(n):function(e){if(!m||yu(e))return t.updatePropertyDeclaration(e,VB(e.modifiers,R,iu),qB(e.name,U,au),void 0,void 0,qB(e.initializer,B,Xu));{const n=function(e,n){if(oE(e)){const i=rI(e),o=qB(e.expression,B,Xu),a=El(o),l=MJ(a);if(!(i||mb(a)&&Xl(a.left))&&!l&&n){const n=t.getGeneratedNameForNode(e);return c.hasNodeCheckFlag(e,32768)?s(n):r(n),t.createAssignment(n,o)}return l||qD(a)?void 0:o}}(e.name,!!e.initializer||_);if(n&&Ne().push(...oI(n)),Jv(e)&&!g){const n=Te(e,t.createThis());if(n){const r=t.createClassStaticBlockDeclaration(t.createBlock([n]));return ew(r,e),mw(r,e),mw(n,{pos:-1,end:-1}),hw(n,void 0),bw(n,void 0),r}}}}(n)}function ee(){return-1===h||3===h&&!!(null==E?void 0:E.data)&&!!(16&E.data.facts)}function te(e){return yu(e)&&(ee()||zv(e)&&32&Zd(e))?function(e){const n=fw(e),i=cw(e),o=e.name;let a=o,s=o;if(oE(o)&&!MJ(o.expression)){const e=rI(o);if(e)a=t.updateComputedPropertyName(o,qB(o.expression,B,Xu)),s=t.updateComputedPropertyName(o,e.left);else{const e=t.createTempVariable(r);lw(e,o.expression);const n=qB(o.expression,B,Xu),i=t.createAssignment(e,n);lw(i,o.expression),a=t.updateComputedPropertyName(o,i),s=t.updateComputedPropertyName(o,e)}}const c=VB(e.modifiers,R,iu),l=eI(t,e,c,e.initializer);ew(l,e),iw(l,3072),lw(l,i);const u=Jv(e)?function(){const e=Ee();return e.classThis??e.classConstructor??(null==I?void 0:I.name)}()??t.createThis():t.createThis(),_=tI(t,e,c,a,u);ew(_,e),mw(_,n),lw(_,i);const d=t.createModifiersFromModifierFlags(ib(c)),p=nI(t,e,d,s,u);return ew(p,e),iw(p,3072),lw(p,i),UB([l,_,p],K,mu)}(e):Z(e)}function ne(e){if(M&&zv(M)&&hu(M)&&yu(fc(M))){const t=fA(e);110===t.kind&&A.add(t)}}function re(e,t){return ne(t=qB(t,B,Xu)),ie(e,t)}function ie(e,t){switch(mw(t,Ub(t,-1)),e.kind){case"a":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.getterName);case"m":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.methodName);case"f":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.isStatic?e.variableName:void 0);case"untransformed":return xn.fail("Access helpers should not be created for untransformed private elements");default:xn.assertNever(e,"Unknown private element type")}}function oe(n,i){if(46===n.operator||47===n.operator){const e=lh(n.operand);if(eu(e)){let o;if(o=Le(e.name)){const a=qB(e.expression,B,Xu);ne(a);const{readExpression:s,initializeExpression:c}=ae(a);let l=re(o,s);const u=cP(n)||i?void 0:t.createTempVariable(r);return l=nA(t,n,l,r,u),l=fe(o,c||s,l,64),ew(l,n),sI(l,n),u&&(l=t.createComma(l,u),sI(l,n)),l}}else if(v&&M&&um(e)&&Az(M)&&(null==E?void 0:E.data)){const{classConstructor:o,superClassReference:a,facts:s}=E.data;if(1&s){const r=De(e);return cP(n)?t.updatePrefixUnaryExpression(n,r):t.updatePostfixUnaryExpression(n,r)}if(o&&a){let s,c;if(GE(e)?qD(e.name)&&(c=s=t.createStringLiteralFromNode(e.name)):MJ(e.argumentExpression)?c=s=e.argumentExpression:(c=t.createTempVariable(r),s=t.createAssignment(c,qB(e.argumentExpression,B,Xu))),s&&c){let l=t.createReflectGetCall(a,c,o);sI(l,e);const u=i?void 0:t.createTempVariable(r);return l=nA(t,n,l,r,u),l=t.createReflectSetCall(a,s,l,o),ew(l,n),sI(l,n),u&&(l=t.createComma(l,u),sI(l,n)),l}}}}return ZB(n,B,e)}function ae(e){const n=ly(e)?e:t.cloneNode(e);if(110===e.kind&&A.has(e)&&A.add(n),MJ(e))return{readExpression:n,initializeExpression:void 0};const i=t.createTempVariable(r);return{readExpression:i,initializeExpression:t.createAssignment(i,n)}}function se(e){if(E&&N.set(fc(e),E),g){if(fz(e)){const t=qB(e.body.statements[0].expression,B,Xu);if(mb(t,!0)&&t.left===t.right)return;return t}if(bz(e))return qB(e.body.statements[0].expression,B,Xu);o();let n=Y(e,(e=>VB(e,B,b_)),e.body.statements);n=t.mergeLexicalEnvironment(n,i());const r=t.createImmediatelyInvokedArrowFunction(n);return ew(lh(r.expression),e),ow(lh(r.expression),4),ew(r,e),sI(r,e),r}}function le(e){if(mP(e)&&!e.name){const t=qJ(e);return!Q(t,bz)&&((g||!!Zd(e))&&Q(t,(e=>pE(e)||Zl(e)||m&&VJ(e))))}return!1}function _e(i,o){if(hb(i)){const e=w;w=void 0,i=t.updateBinaryExpression(i,qB(i.left,q,Xu),i.operatorToken,qB(i.right,B,Xu));const n=Q(w)?t.inlineExpressions(ce([...w,i])):i;return w=e,n}if(mb(i)){iy(i,le)&&(i=Cz(e,i),xn.assertNode(i,mb));const n=fA(i.left,9);if(eu(n)){const e=Le(n.name);if(e)return sI(ew(fe(e,n.expression,i.right,i.operatorToken.kind),i),i)}else if(v&&M&&um(i.left)&&Az(M)&&(null==E?void 0:E.data)){const{classConstructor:e,superClassReference:n,facts:a}=E.data;if(1&a)return t.updateBinaryExpression(i,De(i.left),i.operatorToken,qB(i.right,B,Xu));if(e&&n){let a=XE(i.left)?qB(i.left.argumentExpression,B,Xu):qD(i.left.name)?t.createStringLiteralFromNode(i.left.name):void 0;if(a){let s=qB(i.right,B,Xu);if(LJ(i.operatorToken.kind)){let o=a;MJ(a)||(o=t.createTempVariable(r),a=t.createAssignment(o,a));const c=t.createReflectGetCall(n,o,e);ew(c,i.left),sI(c,i.left),s=t.createBinaryExpression(c,jJ(i.operatorToken.kind),s),sI(s,i)}const c=o?void 0:t.createTempVariable(r);return c&&(s=t.createAssignment(c,s),sI(c,i)),s=t.createReflectSetCall(n,a,s,e),ew(s,i),sI(s,i),c&&(s=t.createComma(s,c),sI(s,i)),s}}}}return function(e){return VD(e.left)&&103===e.operatorToken.kind}(i)?function(t){const r=Le(t.left);if(r){const e=qB(t.right,B,Xu);return ew(n().createClassPrivateFieldInHelper(r.brandCheckIdentifier,e),t)}return ZB(t,B,e)}(i):ZB(i,B,e)}function de(e,n){const r=n?z:B,i=qB(e.expression,r,Xu);return t.updateParenthesizedExpression(e,i)}function fe(e,r,i,o){if(r=qB(r,B,Xu),i=qB(i,B,Xu),ne(r),LJ(o)){const{readExpression:n,initializeExpression:a}=ae(r);r=a||n,i=t.createBinaryExpression(ie(e,n),jJ(o),i)}switch(mw(r,Ub(r,-1)),e.kind){case"a":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,e.setterName);case"m":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,void 0);case"f":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,e.isStatic?e.variableName:void 0);case"untransformed":return xn.fail("Access helpers should not be created for untransformed private elements");default:xn.assertNever(e,"Unknown private element type")}}function me(e){return F(e.members,UJ)}function ge(n,r){var i;const o=I,a=w,s=E;I=n,w=void 0,E={previous:E,data:void 0};const l=32&Zd(n);if(g||l){const e=Pc(n);if(e&&qD(e))Pe().data.className=e;else if((null==(i=n.emitNode)?void 0:i.assignedName)&&wD(n.emitNode.assignedName))if(n.emitNode.assignedName.textSourceNode&&qD(n.emitNode.assignedName.textSourceNode))Pe().data.className=n.emitNode.assignedName.textSourceNode;else if(Ts(n.emitNode.assignedName.text,u)){const e=t.createIdentifier(n.emitNode.assignedName.text);Pe().data.className=e}}if(g){const e=me(n);Q(e)&&(Pe().data.weakSetName=Oe("instances",e[0].name))}const _=function(e){var t;let n=0;const r=fc(e);gu(r)&&bm(d,r)&&(n|=1),g&&(mz(e)||xz(e))&&(n|=2);let i=!1,o=!1,a=!1,s=!1;for(const r of e.members)Jv(r)?(r.name&&(VD(r.name)||yu(r))&&g?n|=2:!yu(r)||-1!==h||e.name||(null==(t=e.emitNode)?void 0:t.classThis)||(n|=2),(uE(r)||pE(r))&&(y&&16384&r.transformFlags&&(n|=8,1&n||(n|=2)),v&&134217728&r.transformFlags&&(1&n||(n|=6)))):qv(fc(r))||(yu(r)?(s=!0,a||(a=Zl(r))):Zl(r)?(a=!0,c.hasNodeCheckFlag(r,262144)&&(n|=2)):uE(r)&&(i=!0,o||(o=!!r.initializer)));return(f&&i||p&&o||g&&a||g&&s&&-1===h)&&(n|=16),n}(n);_&&(Ee().facts=_),8&_&&0==(2&T)&&(T|=2,e.enableSubstitution(110),e.enableEmitNotification(262),e.enableEmitNotification(218),e.enableEmitNotification(176),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(174),e.enableEmitNotification(172),e.enableEmitNotification(167));const m=r(n,_);return E=null==E?void 0:E.previous,xn.assert(E===s),I=o,w=a,m}function he(e,n){var i,o;let a;if(2&n)if(g&&(null==(i=e.emitNode)?void 0:i.classThis))Ee().classConstructor=e.emitNode.classThis,a=t.createAssignment(e.emitNode.classThis,t.getInternalName(e));else{const n=t.createTempVariable(r,!0);Ee().classConstructor=t.cloneNode(n),a=t.createAssignment(n,t.getInternalName(e))}(null==(o=e.emitNode)?void 0:o.classThis)&&(Ee().classThis=e.emitNode.classThis);const s=c.hasNodeCheckFlag(e,262144),l=Bv(e,32),u=Bv(e,2048);let _=VB(e.modifiers,R,iu);const d=VB(e.heritageClauses,$,jN),{members:f,prologue:m}=be(e),h=[];if(a&&Ne().unshift(a),Q(w)&&h.push(t.createExpressionStatement(t.inlineExpressions(w))),p||g||32&Zd(e)){const n=qJ(e);Q(n)&&ke(h,n,t.getInternalName(e))}h.length>0&&l&&u&&(_=VB(_,(e=>HA(e)?void 0:e),iu),h.push(t.createExportAssignment(void 0,!1,t.getLocalName(e,!1,!0))));const y=Ee().classConstructor;s&&y&&(we(),C[SJ(e)]=y);const v=t.updateClassDeclaration(e,_,e.name,void 0,d,f);return h.unshift(v),m&&h.unshift(t.createExpressionStatement(m)),h}function ye(e,n){var i,o,a;const l=!!(1&n),u=qJ(e),_=c.hasNodeCheckFlag(e,262144),d=c.hasNodeCheckFlag(e,32768);let p;function f(){var n;if(g&&(null==(n=e.emitNode)?void 0:n.classThis))return Ee().classConstructor=e.emitNode.classThis;const i=t.createTempVariable(d?s:r,!0);return Ee().classConstructor=t.cloneNode(i),i}(null==(i=e.emitNode)?void 0:i.classThis)&&(Ee().classThis=e.emitNode.classThis),2&n&&(p??(p=f()));const h=VB(e.modifiers,R,iu),y=VB(e.heritageClauses,$,jN),{members:v,prologue:b}=be(e),x=t.updateClassExpression(e,h,e.name,void 0,y,v),S=[];if(b&&S.push(b),(g||32&Zd(e))&&Q(u,(e=>pE(e)||Zl(e)||m&&VJ(e)))||Q(w))if(l)xn.assertIsDefined(D,"Decorated classes transformed by TypeScript are expected to be within a variable declaration."),Q(w)&&pe(D,O(w,t.createExpressionStatement)),Q(u)&&ke(D,u,(null==(o=e.emitNode)?void 0:o.classThis)??t.getInternalName(e)),p?S.push(t.createAssignment(p,x)):g&&(null==(a=e.emitNode)?void 0:a.classThis)?S.push(t.createAssignment(e.emitNode.classThis,x)):S.push(x);else{if(p??(p=f()),_){we();const n=t.cloneNode(p);n.emitNode.autoGenerate.flags&=-9,C[SJ(e)]=n}S.push(t.createAssignment(p,x)),pe(S,w),pe(S,function(e,t){const n=[];for(const r of e){const e=pE(r)?Y(r,se,r):Y(r,(()=>Ce(r,t)),void 0);e&&(hA(e),ew(e,r),ow(e,3072&Yd(r)),lw(e,Wb(r)),mw(e,r),n.push(e))}return n}(u,p)),S.push(t.cloneNode(p))}else S.push(x);return S.length>1&&(ow(x,131072),S.forEach(hA)),t.inlineExpressions(S)}function ve(t){if(!g)return ZB(t,B,e)}function be(e){const n=!!(32&Zd(e));if(g||P){for(const t of e.members)Zl(t)&&(G(t)?Ie(t,t.name,Fe):ZJ(Pe(),t.name,{kind:"untransformed"}));if(g&&Q(me(e))&&function(){const{weakSetName:e}=Pe().data;xn.assert(e,"weakSetName should be set in private identifier environment"),Ne().push(t.createAssignment(e,t.createNewExpression(t.createIdentifier("WeakSet"),void 0,[])))}(),ee())for(const r of e.members)if(yu(r)){const e=t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage");g||n&&zv(r)?Ie(r,e,Ae):ZJ(Pe(),e,{kind:"untransformed"})}}let i,o,a,s=VB(e.members,V,mu);if(Q(s,fE)||(i=xe(void 0,e)),!g&&Q(w)){let e=t.createExpressionStatement(t.inlineExpressions(w));if(134234112&e.transformFlags){const n=t.createTempVariable(r),i=t.createArrowFunction(void 0,void 0,[],void 0,void 0,t.createBlock([e]));o=t.createAssignment(n,i),e=t.createExpressionStatement(t.createCallExpression(n,void 0,[]))}const n=t.createBlock([e]);a=t.createClassStaticBlockDeclaration(n),w=void 0}if(i||a){let n;const r=S(s,fz),o=S(s,bz);n=ue(n,r),n=ue(n,o),n=ue(n,i),n=ue(n,a),n=pe(n,r||o?F(s,(e=>e!==r&&e!==o)):s),s=sI(t.createNodeArray(n),e.members)}return{members:s,prologue:o}}function xe(n,r){if(n=qB(n,B,fE),!((null==E?void 0:E.data)&&16&E.data.facts))return n;const o=Sh(r),s=!(!o||106===fA(o.expression).kind),c=HB(n?n.parameters:void 0,B,e),l=function(n,r,o){const s=zJ(n,!1,!1);let c=s;_||(c=F(c,(e=>!!e.initializer||VD(e.name)||Uv(e))));const l=me(n),u=Q(c)||Q(l);if(!r&&!u)return XB(void 0,B,e);a();const d=!r&&o;let p=0,f=[];const m=[],h=t.createThis();if(function(e,n,r){if(!g||!Q(n))return;const{weakSetName:i}=Pe().data;xn.assert(i,"weakSetName should be set in private identifier environment"),e.push(t.createExpressionStatement(function(e,t,n){return e.createCallExpression(e.createPropertyAccessExpression(n,"add"),void 0,[t])}(t,r,i)))}(m,l,h),r){const e=F(s,(e=>rc(fc(e),r))),t=F(c,(e=>!rc(fc(e),r)));ke(m,e,h),ke(m,t,h)}else ke(m,c,h);if(null==r?void 0:r.body){p=t.copyPrologue(r.body.statements,f,!1,B);const e=JJ(r.body.statements,p);if(e.length)Se(f,r.body.statements,p,e,0,m,r);else{for(;p=f.length?r.body.multiLine??f.length>0:f.length>0;return sI(t.createBlock(sI(t.createNodeArray(f),r?r.body.statements:n.members),y),r?r.body:void 0)}(r,n,s);return l?n?(xn.assert(c),t.updateConstructorDeclaration(n,void 0,c,l)):hA(ew(sI(t.createConstructorDeclaration(void 0,c??[],l),n||r),n)):n}function Se(e,n,r,i,o,a,s){const c=i[o],l=n[c];if(pe(e,VB(n,B,b_,r,c-r)),r=c+1,VP(l)){const n=[];Se(n,l.tryBlock.statements,0,i,o+1,a,s),sI(t.createNodeArray(n),l.tryBlock.statements),e.push(t.updateTryStatement(l,t.updateBlock(l.tryBlock,n),qB(l.catchClause,B,RN),qB(l.finallyBlock,B,DP)))}else{for(pe(e,VB(n,B,b_,c,1));rl(e,p,t),serializeTypeOfNode:(e,t,n)=>l(e,u,t,n),serializeParameterTypesOfNode:(e,t,n)=>l(e,_,t,n),serializeReturnTypeOfNode:(e,t)=>l(e,d,t)};function l(e,t,n,r){const i=s,o=c;s=e.currentLexicalScope,c=e.currentNameScope;const a=void 0===r?t(n):t(n,r);return s=i,c=o,a}function u(e,n){switch(e.kind){case 172:case 169:return p(e.type);case 178:case 177:return p(function(e,t){const n=Sv(t.members,e);return n.setAccessor&&mv(n.setAccessor)||n.getAccessor&&Cv(n.getAccessor)}(e,n));case 263:case 231:case 174:return t.createIdentifier("Function");default:return t.createVoidZero()}}function _(e,n){const r=gu(e)?pv(e):cu(e)&&Fd(e.body)?e:void 0,i=[];if(r){const e=function(e,t){if(t&&177===e.kind){const{setAccessor:n}=Sv(t.members,e);if(n)return n.parameters}return e.parameters}(r,n),t=e.length;for(let r=0;re.parent&&IE(e.parent)&&(e.parent.trueType===e||e.parent.falseType===e))))return t.createIdentifier("Object");const r=y(e.typeName),o=t.createTempVariable(n);return t.createConditionalExpression(t.createTypeCheck(t.createAssignment(o,r),"function"),void 0,o,void 0,t.createIdentifier("Object"));case 1:return v(e.typeName);case 2:return t.createVoidZero();case 4:return b("BigInt",7);case 6:return t.createIdentifier("Boolean");case 3:return t.createIdentifier("Number");case 5:return t.createIdentifier("String");case 7:return t.createIdentifier("Array");case 8:return b("Symbol",2);case 10:return t.createIdentifier("Function");case 9:return t.createIdentifier("Promise");case 11:return t.createIdentifier("Object");default:return xn.assertNever(i)}}(e);case 193:return m(e.types,!0);case 192:return m(e.types,!1);case 194:return m([e.trueType,e.falseType],!1);case 198:if(148===e.operator)return p(e.type);break;case 186:case 199:case 200:case 187:case 133:case 159:case 197:case 205:case 312:case 313:case 317:case 318:case 319:break;case 314:case 315:case 316:return p(e.type);default:return xn.failBadSyntaxKind(e)}return t.createIdentifier("Object")}function f(e){switch(e.kind){case 11:case 15:return t.createIdentifier("String");case 224:{const t=e.operand;switch(t.kind){case 9:case 10:return f(t);default:return xn.failBadSyntaxKind(t)}}case 9:return t.createIdentifier("Number");case 10:return b("BigInt",7);case 112:case 97:return t.createIdentifier("Boolean");case 106:return t.createVoidZero();default:return xn.failBadSyntaxKind(e)}}function m(e,n){let r;for(let i of e){if(i=ch(i),146===i.kind){if(n)return t.createVoidZero();continue}if(159===i.kind){if(!n)return t.createIdentifier("Object");continue}if(133===i.kind)return t.createIdentifier("Object");if(!a&&(JE(i)&&106===i.literal.kind||157===i.kind))continue;const e=p(i);if(qD(e)&&"Object"===e.escapedText)return e;if(r){if(!g(r,e))return t.createIdentifier("Object")}else r=e}return r??t.createVoidZero()}function g(e,t){return Xl(e)?Xl(t):qD(e)?qD(t)&&e.escapedText===t.escapedText:GE(e)?GE(t)&&g(e.expression,t.expression)&&g(e.name,t.name):aP(e)?aP(t)&&TD(e.expression)&&"0"===e.expression.text&&TD(t.expression)&&"0"===t.expression.text:wD(e)?wD(t)&&e.text===t.text:oP(e)?oP(t)&&g(e.expression,t.expression):tP(e)?tP(t)&&g(e.expression,t.expression):_P(e)?_P(t)&&g(e.condition,t.condition)&&g(e.whenTrue,t.whenTrue)&&g(e.whenFalse,t.whenFalse):!!uP(e)&&uP(t)&&e.operatorToken.kind===t.operatorToken.kind&&g(e.left,t.left)&&g(e.right,t.right)}function h(e,n){return t.createLogicalAnd(t.createStrictInequality(t.createTypeOfExpression(e),t.createStringLiteral("undefined")),n)}function y(e){if(80===e.kind){const t=v(e);return h(t,t)}if(80===e.left.kind)return h(v(e.left),v(e));const r=y(e.left),i=t.createTempVariable(n);return t.createLogicalAnd(t.createLogicalAnd(r.left,t.createStrictInequality(t.createAssignment(i,r.right),t.createVoidZero())),t.createPropertyAccessExpression(i,e.right))}function v(e){switch(e.kind){case 80:const n=OT(sI(_I.cloneNode(e),e),e.parent);return n.original=void 0,OT(n,hc(s)),n;case 166:return function(e){return t.createPropertyAccessExpression(v(e.left),e.right)}(e)}}function b(e,n){return oHA(e)||cE(e)?void 0:e),Su),f=Wb(o),m=function(n){if(i.hasNodeCheckFlag(n,262144)){c||(e.enableSubstitution(80),c=[]);const i=t.createUniqueName(n.name&&!Xl(n.name)?bc(n.name):"default");return c[SJ(n)]=i,r(i),i}}(o),h=a<2?t.getInternalName(o,!1,!0):t.getLocalName(o,!1,!0),y=VB(o.heritageClauses,u,jN);let v=VB(o.members,u,mu),b=[];({members:v,decorationStatements:b}=p(o,v));const x=a>=9&&!!m&&Q(v,(e=>uE(e)&&Bv(e,256)||pE(e)));x&&(v=sI(t.createNodeArray([t.createClassStaticBlockDeclaration(t.createBlock([t.createExpressionStatement(t.createAssignment(m,t.createThis()))])),...v]),v));const S=t.createClassExpression(d,s&&Xl(s)?void 0:s,void 0,y,v);ew(S,o),sI(S,f);const k=m&&!x?t.createAssignment(m,S):S,T=t.createVariableDeclaration(h,void 0,void 0,k);ew(T,o);const C=t.createVariableDeclarationList([T],1),w=t.createVariableStatement(void 0,C);ew(w,o),sI(w,f),mw(w,o);const D=[w];if(pe(D,b),function(e,r){const i=function(e){const r=g(WJ(e));if(!r)return;const i=c&&c[SJ(e)],o=a<2?t.getInternalName(e,!1,!0):t.getDeclarationName(e,!1,!0),s=n().createDecorateHelper(r,o),l=t.createAssignment(o,i?t.createAssignment(i,s):s);return iw(l,3072),lw(l,Wb(e)),l}(r);i&&e.push(ew(t.createExpressionStatement(i),r))}(D,o),l)if(_){const e=t.createExportDefault(h);D.push(e)}else{const e=t.createExternalModuleExport(t.getDeclarationName(o));D.push(e)}return D}(o,o.name):function(e,n){const r=VB(e.modifiers,l,iu),i=VB(e.heritageClauses,u,jN);let o=VB(e.members,u,mu),a=[];return({members:o,decorationStatements:a}=p(e,o)),pe([t.updateClassDeclaration(e,r,n,void 0,i,o)],a)}(o,o.name)):ZB(o,u,e)}(o);case 231:return function(e){return t.updateClassExpression(e,VB(e.modifiers,l,iu),e.name,void 0,VB(e.heritageClauses,u,jN),VB(e.members,u,mu))}(o);case 176:return function(e){return t.updateConstructorDeclaration(e,VB(e.modifiers,l,iu),VB(e.parameters,u,sE),qB(e.body,u,DP))}(o);case 174:return function(e){return f(t.updateMethodDeclaration(e,VB(e.modifiers,l,iu),e.asteriskToken,xn.checkDefined(qB(e.name,u,au)),void 0,void 0,VB(e.parameters,u,sE),void 0,qB(e.body,u,DP)),e)}(o);case 178:return function(e){return f(t.updateSetAccessorDeclaration(e,VB(e.modifiers,l,iu),xn.checkDefined(qB(e.name,u,au)),VB(e.parameters,u,sE),qB(e.body,u,DP)),e)}(o);case 177:return function(e){return f(t.updateGetAccessorDeclaration(e,VB(e.modifiers,l,iu),xn.checkDefined(qB(e.name,u,au)),VB(e.parameters,u,sE),void 0,qB(e.body,u,DP)),e)}(o);case 172:return function(e){if(!(33554432&e.flags||Bv(e,128)))return f(t.updatePropertyDeclaration(e,VB(e.modifiers,l,iu),xn.checkDefined(qB(e.name,u,au)),void 0,void 0,qB(e.initializer,u,Xu)),e)}(o);case 169:return function(e){const n=t.updateParameterDeclaration(e,XA(t,e.modifiers),e.dotDotDotToken,xn.checkDefined(qB(e.name,u,su)),void 0,void 0,qB(e.initializer,u,Xu));return n!==e&&(mw(n,e),sI(n,Wb(e)),lw(n,Wb(e)),iw(n.name,64)),n}(o);default:return ZB(o,u,e)}}function _(e){return!!(536870912&e.transformFlags)}function d(e){return Q(e,_)}function p(e,n){let r=[];return h(r,e,!1),h(r,e,!0),function(e){for(const t of e.members){if(!lI(t))continue;const n=HJ(t,e,!0);if(Q(null==n?void 0:n.decorators,_))return!0;if(Q(null==n?void 0:n.parameters,d))return!0}return!1}(e)&&(n=sI(t.createNodeArray([...n,t.createClassStaticBlockDeclaration(t.createBlock(r,!0))]),n),r=void 0),{decorationStatements:r,members:n}}function f(e,t){return e!==t&&(mw(e,t),lw(e,Wb(t))),e}function m(e){return kD(e.expression,"___metadata")}function g(e){if(!e)return;const{false:t,true:n}=Ge(e.decorators,m),r=[];return pe(r,O(t,v)),pe(r,R(e.parameters,b)),pe(r,O(n,v)),r}function h(e,n,r){pe(e,O(function(e,t){const n=function(e,t){return F(e.members,(n=>{return i=t,ym(!0,r=n,e)&&i===Jv(r);var r,i}))}(e,t);let r;for(const t of n)r=ue(r,y(e,t));return r}(n,r),(e=>t.createExpressionStatement(e))))}function y(e,r){const i=g(HJ(r,e,!0));if(!i)return;const o=function(e,n){return Jv(n)?t.getDeclarationName(e):function(e){return t.createPropertyAccessExpression(t.getDeclarationName(e),"prototype")}(e)}(e,r),a=function(e,n){const r=e.name;return VD(r)?t.createIdentifier(""):oE(r)?n&&!MJ(r.expression)?t.getGeneratedNameForNode(r):r.expression:qD(r)?t.createStringLiteral(bc(r)):t.cloneNode(r)}(r,!Bv(r,128)),s=uE(r)&&!Uv(r)?t.createVoidZero():t.createNull(),c=n().createDecorateHelper(i,o,a,s);return iw(c,3072),lw(c,Wb(r)),c}function v(e){return xn.checkDefined(qB(e.expression,u,Xu))}function b(e,t){let r;if(e){r=[];for(const i of e){const e=n().createParamHelper(v(i),t);sI(e,i.expression),iw(e,3072),r.push(e)}}return r}}function Mz(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=wS(e.getCompilerOptions());let s,c,l,u,_,d;return CJ(e,(function(t){s=void 0,d=!1;const n=ZB(t,b,e);return ww(n,e.readEmitHelpers()),d&&(sw(n,32),d=!1),n}));function p(){switch(c=void 0,l=void 0,u=void 0,null==s?void 0:s.kind){case"class":c=s.classInfo;break;case"class-element":c=s.next.classInfo,l=s.classThis,u=s.classSuper;break;case"name":const e=s.next.next.next;"class-element"===(null==e?void 0:e.kind)&&(c=e.next.classInfo,l=e.classThis,u=e.classSuper)}}function f(e){s={kind:"class",next:s,classInfo:e,savedPendingExpressions:_},_=void 0,p()}function m(){xn.assert("class"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'class' but got '${null==s?void 0:s.kind}' instead.`)),_=s.savedPendingExpressions,s=s.next,p()}function g(e){var t,n;xn.assert("class"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'class' but got '${null==s?void 0:s.kind}' instead.`)),s={kind:"class-element",next:s},(pE(e)||uE(e)&&zv(e))&&(s.classThis=null==(t=s.next.classInfo)?void 0:t.classThis,s.classSuper=null==(n=s.next.classInfo)?void 0:n.classSuper),p()}function h(){var e;xn.assert("class-element"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'class-element' but got '${null==s?void 0:s.kind}' instead.`)),xn.assert("class"===(null==(e=s.next)?void 0:e.kind),"Incorrect value for top.next.kind.",(()=>{var e;return`Expected top.next.kind to be 'class' but got '${null==(e=s.next)?void 0:e.kind}' instead.`})),s=s.next,p()}function y(){xn.assert("class-element"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'class-element' but got '${null==s?void 0:s.kind}' instead.`)),s={kind:"name",next:s},p()}function v(){xn.assert("name"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'name' but got '${null==s?void 0:s.kind}' instead.`)),s=s.next,p()}function b(n){if(!function(e){return!!(33554432&e.transformFlags)||!!l&&!!(16384&e.transformFlags)||!!l&&!!u&&!!(134217728&e.transformFlags)}(n))return n;switch(n.kind){case 170:return xn.fail("Use `modifierVisitor` instead.");case 263:return function(n){if(E(n)){const r=[],i=fc(n,gu)??n,o=i.name?t.createStringLiteralFromNode(i.name):t.createStringLiteral("default"),a=Bv(n,32),s=Bv(n,2048);if(n.name||(n=kz(e,n,o)),a&&s){const e=D(n);if(n.name){const i=t.createVariableDeclaration(t.getLocalName(n),void 0,void 0,e);ew(i,n);const o=t.createVariableDeclarationList([i],1),a=t.createVariableStatement(void 0,o);r.push(a);const s=t.createExportDefault(t.getDeclarationName(n));ew(s,n),mw(s,fw(n)),lw(s,Kb(n)),r.push(s)}else{const i=t.createExportDefault(e);ew(i,n),mw(i,fw(n)),lw(i,Kb(n)),r.push(i)}}else{xn.assertIsDefined(n.name,"A class declaration that is not a default export must have a name.");const e=D(n),i=a?e=>UD(e)?void 0:S(e):S,o=VB(n.modifiers,i,iu),s=t.getLocalName(n,!1,!0),c=t.createVariableDeclaration(s,void 0,void 0,e);ew(c,n);const l=t.createVariableDeclarationList([c],1),u=t.createVariableStatement(o,l);if(ew(u,n),mw(u,fw(n)),r.push(u),a){const e=t.createExternalModuleExport(s);ew(e,n),r.push(e)}}return Ne(r)}{const e=VB(n.modifiers,S,iu),r=VB(n.heritageClauses,b,jN);f(void 0);const i=VB(n.members,k,mu);return m(),t.updateClassDeclaration(n,e,n.name,void 0,r,i)}}(n);case 231:return function(e){if(E(e)){const t=D(e);return ew(t,e),t}{const n=VB(e.modifiers,S,iu),r=VB(e.heritageClauses,b,jN);f(void 0);const i=VB(e.members,k,mu);return m(),t.updateClassExpression(e,n,e.name,void 0,r,i)}}(n);case 176:case 172:case 175:return xn.fail("Not supported outside of a class. Use 'classElementVisitor' instead.");case 169:return function(n){iy(n,I)&&(n=Cz(e,n,M(n.initializer)));const r=t.updateParameterDeclaration(n,void 0,n.dotDotDotToken,qB(n.name,b,su),void 0,void 0,qB(n.initializer,b,Xu));return r!==n&&(mw(r,n),sI(r,Wb(n)),lw(r,Wb(n)),iw(r.name,64)),r}(n);case 226:return L(n,!1);case 303:case 260:case 208:return function(t){return iy(t,I)&&(t=Cz(e,t,M(t.initializer))),ZB(t,b,e)}(n);case 277:return function(t){return iy(t,I)&&(t=Cz(e,t,M(t.expression))),ZB(t,b,e)}(n);case 110:return function(e){return l??e}(n);case 248:return function(n){return t.updateForStatement(n,qB(n.initializer,T,s_),qB(n.condition,b,Xu),qB(n.incrementor,T,Xu),QB(n.statement,b,e))}(n);case 244:return function(t){return ZB(t,T,e)}(n);case 355:return R(n,!1);case 217:return K(n,!1);case 354:return function(e,n){const r=b,i=qB(e.expression,r,Xu);return t.updatePartiallyEmittedExpression(e,i)}(n);case 213:return function(n){if(um(n.expression)&&l){const e=qB(n.expression,b,Xu),r=VB(n.arguments,b,Xu),i=t.createFunctionCallCall(e,l,r);return ew(i,n),sI(i,n),i}return ZB(n,b,e)}(n);case 215:return function(n){if(um(n.tag)&&l){const e=qB(n.tag,b,Xu),r=t.createFunctionBindCall(e,l,[]);ew(r,n),sI(r,n);const i=qB(n.template,b,qu);return t.updateTaggedTemplateExpression(n,r,void 0,i)}return ZB(n,b,e)}(n);case 224:case 225:return j(n,!1);case 211:return function(n){if(um(n)&&qD(n.name)&&l&&u){const e=t.createStringLiteralFromNode(n.name),r=t.createReflectGetCall(u,e,l);return ew(r,n.expression),sI(r,n.expression),r}return ZB(n,b,e)}(n);case 212:return function(n){if(um(n)&&l&&u){const e=qB(n.argumentExpression,b,Xu),r=t.createReflectGetCall(u,e,l);return ew(r,n.expression),sI(r,n.expression),r}return ZB(n,b,e)}(n);case 167:return J(n);case 174:case 178:case 177:case 218:case 262:{"other"===(null==s?void 0:s.kind)?(xn.assert(!_),s.depth++):(s={kind:"other",next:s,depth:0,savedPendingExpressions:_},_=void 0,p());const t=ZB(n,x,e);return xn.assert("other"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'other' but got '${null==s?void 0:s.kind}' instead.`)),s.depth>0?(xn.assert(!_),s.depth--):(_=s.savedPendingExpressions,s=s.next,p()),t}default:return ZB(n,x,e)}}function x(e){if(170!==e.kind)return b(e)}function S(e){if(170!==e.kind)return e}function k(a){switch(a.kind){case 176:return function(e){g(e);const n=VB(e.modifiers,S,iu),r=VB(e.parameters,b,sE);let i;if(e.body&&c){const n=P(c.class,c);if(n){const r=[],o=t.copyPrologue(e.body.statements,r,!1,b),a=JJ(e.body.statements,o);a.length>0?N(r,e.body.statements,o,a,0,n):(pe(r,n),pe(r,VB(e.body.statements,b,b_))),i=t.createBlock(r,!0),ew(i,e.body),sI(i,e.body)}}return i??(i=qB(e.body,b,DP)),h(),t.updateConstructorDeclaration(e,n,r,i)}(a);case 174:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,ee);if(i)return h(),F(function(e,n,r){return e=VB(e,(e=>QD(e)?e:void 0),iu),t.createGetAccessorDeclaration(e,n,[],void 0,t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(r,t.createIdentifier("value")))]))}(n,r,i),e);{const i=VB(e.parameters,b,sE),o=qB(e.body,b,DP);return h(),F(t.updateMethodDeclaration(e,n,e.asteriskToken,r,void 0,void 0,i,void 0,o),e)}}(a);case 177:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,te);if(i)return h(),F(ie(n,r,i),e);{const i=VB(e.parameters,b,sE),o=qB(e.body,b,DP);return h(),F(t.updateGetAccessorDeclaration(e,n,r,i,void 0,o),e)}}(a);case 178:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,ne);if(i)return h(),F(oe(n,r,i),e);{const i=VB(e.parameters,b,sE),o=qB(e.body,b,DP);return h(),F(t.updateSetAccessorDeclaration(e,n,r,i,o),e)}}(a);case 172:return function(a){iy(a,I)&&(a=Cz(e,a,M(a.initializer))),g(a),xn.assert(!vp(a),"Not yet implemented.");const{modifiers:s,name:l,initializersName:u,extraInitializersName:_,descriptorName:d,thisArg:p}=A(a,c,Uv(a)?re:void 0);r();let f=qB(a.initializer,b,Xu);u&&(f=n().createRunInitializersHelper(p??t.createThis(),u,f??t.createVoidZero())),Jv(a)&&c&&f&&(c.hasStaticInitializers=!0);const m=i();if(Q(m)&&(f=t.createImmediatelyInvokedArrowFunction([...m,t.createReturnStatement(f)])),c&&(Jv(a)?(f=G(c,!0,f),_&&(c.pendingStaticInitializers??(c.pendingStaticInitializers=[]),c.pendingStaticInitializers.push(n().createRunInitializersHelper(c.classThis??t.createThis(),_)))):(f=G(c,!1,f),_&&(c.pendingInstanceInitializers??(c.pendingInstanceInitializers=[]),c.pendingInstanceInitializers.push(n().createRunInitializersHelper(t.createThis(),_))))),h(),Uv(a)&&d){const e=fw(a),n=cw(a),r=a.name;let i=r,c=r;if(oE(r)&&!MJ(r.expression)){const e=rI(r);if(e)i=t.updateComputedPropertyName(r,qB(r.expression,b,Xu)),c=t.updateComputedPropertyName(r,e.left);else{const e=t.createTempVariable(o);lw(e,r.expression);const n=qB(r.expression,b,Xu),a=t.createAssignment(e,n);lw(a,r.expression),i=t.updateComputedPropertyName(r,a),c=t.updateComputedPropertyName(r,e)}}const l=VB(s,(e=>129!==e.kind?e:void 0),iu),u=eI(t,a,l,f);ew(u,a),iw(u,3072),lw(u,n),lw(u.name,a.name);const _=ie(l,i,d);ew(_,a),mw(_,e),lw(_,n);const p=oe(l,c,d);return ew(p,a),iw(p,3072),lw(p,n),[u,_,p]}return F(t.updatePropertyDeclaration(a,s,l,void 0,void 0,f),a)}(a);case 175:return function(n){let r;if(g(n),bz(n))r=ZB(n,b,e);else if(fz(n)){const t=l;l=void 0,r=ZB(n,b,e),l=t}else if(r=n=ZB(n,b,e),c&&(c.hasStaticInitializers=!0,Q(c.pendingStaticInitializers))){const e=[];for(const n of c.pendingStaticInitializers){const r=t.createExpressionStatement(n);lw(r,cw(n)),e.push(r)}const n=t.createBlock(e,!0);r=[t.createClassStaticBlockDeclaration(n),r],c.pendingStaticInitializers=void 0}return h(),r}(a);default:return b(a)}}function T(e){switch(e.kind){case 224:case 225:return j(e,!0);case 226:return L(e,!0);case 355:return R(e,!0);case 217:return K(e,!0);default:return b(e)}}function C(e,n){return t.createUniqueName(`${function(e){let t=e.name&&qD(e.name)&&!Xl(e.name)?bc(e.name):e.name&&VD(e.name)&&!Xl(e.name)?bc(e.name).slice(1):e.name&&wD(e.name)&&Ts(e.name.text,99)?e.name.text:gu(e)?"class":"member";return I_(e)&&(t=`get_${t}`),A_(e)&&(t=`set_${t}`),e.name&&VD(e.name)&&(t=`private_${t}`),Jv(e)&&(t=`static_${t}`),"_"+t}(e)}_${n}`,24)}function w(e,n){return t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(e,void 0,void 0,n)],1))}function D(o){r(),!Sz(o)&&bm(!1,o)&&(o=kz(e,o,t.createStringLiteral("")));const a=t.getLocalName(o,!1,!1,!0),s=function(e){const r=t.createUniqueName("_metadata",48);let i,o,a,s,c,l=!1,u=!1,_=!1;if(hm(!1,e)){const n=Q(e.members,(e=>(Zl(e)||yu(e))&&zv(e)));a=t.createUniqueName("_classThis",n?24:48)}for(const r of e.members){if(bu(r)&&ym(!1,r,e))if(zv(r)){if(!o){o=t.createUniqueName("_staticExtraInitializers",48);const r=n().createRunInitializersHelper(a??t.createThis(),o);lw(r,e.name??Kb(e)),s??(s=[]),s.push(r)}}else{if(!i){i=t.createUniqueName("_instanceExtraInitializers",48);const r=n().createRunInitializersHelper(t.createThis(),i);lw(r,e.name??Kb(e)),c??(c=[]),c.push(r)}i??(i=t.createUniqueName("_instanceExtraInitializers",48))}if(pE(r)?bz(r)||(l=!0):uE(r)&&(zv(r)?l||(l=!!r.initializer||Wv(r)):u||(u=!vp(r))),(Zl(r)||yu(r))&&zv(r)&&(_=!0),o&&i&&l&&u&&_)break}return{class:e,classThis:a,metadataReference:r,instanceMethodExtraInitializersName:i,staticMethodExtraInitializersName:o,hasStaticInitializers:l,hasNonAmbientInstanceFields:u,hasStaticPrivateClassElements:_,pendingStaticInitializers:s,pendingInstanceInitializers:c}}(o),c=[];let l,u,p,g,h=!1;const y=X(WJ(o));y&&(s.classDecoratorsName=t.createUniqueName("_classDecorators",48),s.classDescriptorName=t.createUniqueName("_classDescriptor",48),s.classExtraInitializersName=t.createUniqueName("_classExtraInitializers",48),xn.assertIsDefined(s.classThis),c.push(w(s.classDecoratorsName,t.createArrayLiteralExpression(y)),w(s.classDescriptorName),w(s.classExtraInitializersName,t.createArrayLiteralExpression()),w(s.classThis)),s.hasStaticPrivateClassElements&&(h=!0,d=!0));const v=Dh(o.heritageClauses,96),x=v&&Se(v.types),S=x&&qB(x.expression,b,Xu);if(S){s.classSuper=t.createUniqueName("_classSuper",48);const e=fA(S),n=mP(e)&&!e.name||nP(e)&&!e.name||rP(e)?t.createComma(t.createNumericLiteral(0),S):S;c.push(w(s.classSuper,n));const r=t.updateExpressionWithTypeArguments(x,s.classSuper,void 0),i=t.updateHeritageClause(v,[r]);g=t.createNodeArray([i])}const T=s.classThis??t.createThis();f(s),l=ue(l,function(e,n){const r=t.createVariableDeclaration(e,void 0,void 0,t.createConditionalExpression(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("Symbol"),"function"),t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata")),t.createToken(58),t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"create"),void 0,[n?ae(n):t.createNull()]),t.createToken(59),t.createVoidZero()));return t.createVariableStatement(void 0,t.createVariableDeclarationList([r],2))}(s.metadataReference,s.classSuper));let C=o.members;if(C=VB(C,(e=>fE(e)?e:k(e)),mu),C=VB(C,(e=>fE(e)?k(e):e),mu),_){let n;for(let r of _)r=qB(r,(function r(i){return 16384&i.transformFlags?110===i.kind?(n||(n=t.createUniqueName("_outerThis",16),c.unshift(w(n,t.createThis()))),n):ZB(i,r,e):i}),Xu),l=ue(l,t.createExpressionStatement(r));_=void 0}if(m(),Q(s.pendingInstanceInitializers)&&!pv(o)){const e=P(0,s);if(e){const n=Sh(o),r=[];if(n&&106!==fA(n.expression).kind){const e=t.createSpreadElement(t.createIdentifier("arguments")),n=t.createCallExpression(t.createSuper(),void 0,[e]);r.push(t.createExpressionStatement(n))}pe(r,e);const i=t.createBlock(r,!0);p=t.createConstructorDeclaration(void 0,[],i)}}if(s.staticMethodExtraInitializersName&&c.push(w(s.staticMethodExtraInitializersName,t.createArrayLiteralExpression())),s.instanceMethodExtraInitializersName&&c.push(w(s.instanceMethodExtraInitializersName,t.createArrayLiteralExpression())),s.memberInfos&&ld(s.memberInfos,((e,n)=>{Jv(n)&&(c.push(w(e.memberDecoratorsName)),e.memberInitializersName&&c.push(w(e.memberInitializersName,t.createArrayLiteralExpression())),e.memberExtraInitializersName&&c.push(w(e.memberExtraInitializersName,t.createArrayLiteralExpression())),e.memberDescriptorName&&c.push(w(e.memberDescriptorName)))})),s.memberInfos&&ld(s.memberInfos,((e,n)=>{Jv(n)||(c.push(w(e.memberDecoratorsName)),e.memberInitializersName&&c.push(w(e.memberInitializersName,t.createArrayLiteralExpression())),e.memberExtraInitializersName&&c.push(w(e.memberExtraInitializersName,t.createArrayLiteralExpression())),e.memberDescriptorName&&c.push(w(e.memberDescriptorName)))})),l=pe(l,s.staticNonFieldDecorationStatements),l=pe(l,s.nonStaticNonFieldDecorationStatements),l=pe(l,s.staticFieldDecorationStatements),l=pe(l,s.nonStaticFieldDecorationStatements),s.classDescriptorName&&s.classDecoratorsName&&s.classExtraInitializersName&&s.classThis){l??(l=[]);const e=t.createPropertyAssignment("value",T),r=t.createObjectLiteralExpression([e]),i=t.createAssignment(s.classDescriptorName,r),c=t.createPropertyAccessExpression(T,"name"),u=n().createESDecorateHelper(t.createNull(),i,s.classDecoratorsName,{kind:"class",name:c,metadata:s.metadataReference},t.createNull(),s.classExtraInitializersName),_=t.createExpressionStatement(u);lw(_,Kb(o)),l.push(_);const d=t.createPropertyAccessExpression(s.classDescriptorName,"value"),p=t.createAssignment(s.classThis,d),f=t.createAssignment(a,p);l.push(t.createExpressionStatement(f))}if(l.push(function(e,n){const r=t.createObjectDefinePropertyCall(e,t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata"),t.createPropertyDescriptor({configurable:!0,writable:!0,enumerable:!0,value:n},!0));return iw(t.createIfStatement(n,t.createExpressionStatement(r)),1)}(T,s.metadataReference)),Q(s.pendingStaticInitializers)){for(const e of s.pendingStaticInitializers){const n=t.createExpressionStatement(e);lw(n,cw(e)),u=ue(u,n)}s.pendingStaticInitializers=void 0}if(s.classExtraInitializersName){const e=n().createRunInitializersHelper(T,s.classExtraInitializersName),r=t.createExpressionStatement(e);lw(r,o.name??Kb(o)),u=ue(u,r)}l&&u&&!s.hasStaticInitializers&&(pe(l,u),u=void 0);const D=l&&t.createClassStaticBlockDeclaration(t.createBlock(l,!0));D&&h&&aw(D,32);const E=u&&t.createClassStaticBlockDeclaration(t.createBlock(u,!0));if(D||p||E){const e=[],n=C.findIndex(bz);D?(pe(e,C,0,n+1),e.push(D),pe(e,C,n+1)):pe(e,C),p&&e.push(p),E&&e.push(E),C=sI(t.createNodeArray(e),C)}const N=i();let F;if(y){F=t.createClassExpression(void 0,void 0,void 0,g,C),s.classThis&&(F=gz(t,F,s.classThis));const e=t.createVariableDeclaration(a,void 0,void 0,F),n=t.createVariableDeclarationList([e]),r=s.classThis?t.createAssignment(a,s.classThis):a;c.push(t.createVariableStatement(void 0,n),t.createReturnStatement(r))}else F=t.createClassExpression(void 0,o.name,void 0,g,C),c.push(t.createReturnStatement(F));if(h){sw(F,32);for(const e of F.members)(Zl(e)||yu(e))&&zv(e)&&sw(e,32)}return ew(F,o),t.createImmediatelyInvokedArrowFunction(t.mergeLexicalEnvironment(c,N))}function E(e){return bm(!1,e)||vm(!1,e)}function P(e,n){if(Q(n.pendingInstanceInitializers)){const e=[];return e.push(t.createExpressionStatement(t.inlineExpressions(n.pendingInstanceInitializers))),n.pendingInstanceInitializers=void 0,e}}function N(e,n,r,i,o,a){const s=i[o],c=n[s];if(pe(e,VB(n,b,b_,r,s-r)),VP(c)){const n=[];N(n,c.tryBlock.statements,0,i,o+1,a),sI(t.createNodeArray(n),c.tryBlock.statements),e.push(t.updateTryStatement(c,t.updateBlock(c.tryBlock,n),qB(c.catchClause,b,RN),qB(c.finallyBlock,b,DP)))}else pe(e,VB(n,b,b_,s,1)),pe(e,a);pe(e,VB(n,b,b_,s+1))}function F(e,t){return e!==t&&(mw(e,t),lw(e,Kb(t))),e}function A(e,r,i){let a,s,c,l,u,d;if(!r){const t=VB(e.modifiers,S,iu);return y(),s=B(e.name),v(),{modifiers:t,referencedName:a,name:s,initializersName:c,descriptorName:d,thisArg:u}}const p=X(HJ(e,r.class,!1)),f=VB(e.modifiers,S,iu);if(p){const m=C(e,"decorators"),g=t.createArrayLiteralExpression(p),h=t.createAssignment(m,g),x={memberDecoratorsName:m};r.memberInfos??(r.memberInfos=new Map),r.memberInfos.set(e,x),_??(_=[]),_.push(h);const S=bu(e)||yu(e)?Jv(e)?r.staticNonFieldDecorationStatements??(r.staticNonFieldDecorationStatements=[]):r.nonStaticNonFieldDecorationStatements??(r.nonStaticNonFieldDecorationStatements=[]):uE(e)&&!yu(e)?Jv(e)?r.staticFieldDecorationStatements??(r.staticFieldDecorationStatements=[]):r.nonStaticFieldDecorationStatements??(r.nonStaticFieldDecorationStatements=[]):xn.fail(),k=mE(e)?"getter":gE(e)?"setter":dE(e)?"method":yu(e)?"accessor":uE(e)?"field":xn.fail();let T;if(qD(e.name)||VD(e.name))T={computed:!1,name:e.name};else if(Wh(e.name))T={computed:!0,name:t.createStringLiteralFromNode(e.name)};else{const r=e.name.expression;Wh(r)&&!qD(r)?T={computed:!0,name:t.createStringLiteralFromNode(r)}:(y(),({referencedName:a,name:s}=function(e){if(Wh(e)||VD(e))return{referencedName:t.createStringLiteralFromNode(e),name:qB(e,b,au)};if(Wh(e.expression)&&!qD(e.expression))return{referencedName:t.createStringLiteralFromNode(e.expression),name:qB(e,b,au)};const r=t.getGeneratedNameForNode(e);o(r);const i=n().createPropKeyHelper(qB(e.expression,b,Xu)),a=t.createAssignment(r,i);return{referencedName:r,name:t.updateComputedPropertyName(e,H(a))}}(e.name)),T={computed:!0,name:a},v())}const w={kind:k,name:T,static:Jv(e),private:VD(e.name),access:{get:uE(e)||mE(e)||dE(e),set:uE(e)||gE(e)},metadata:r.metadataReference};if(bu(e)){const o=Jv(e)?r.staticMethodExtraInitializersName:r.instanceMethodExtraInitializersName;let a;xn.assertIsDefined(o),Zl(e)&&i&&(a=i(e,VB(f,(e=>lt(e,WD)),iu)),x.memberDescriptorName=d=C(e,"descriptor"),a=t.createAssignment(d,a));const s=n().createESDecorateHelper(t.createThis(),a??t.createNull(),m,w,t.createNull(),o),c=t.createExpressionStatement(s);lw(c,Kb(e)),S.push(c)}else if(uE(e)){let o;c=x.memberInitializersName??(x.memberInitializersName=C(e,"initializers")),l=x.memberExtraInitializersName??(x.memberExtraInitializersName=C(e,"extraInitializers")),Jv(e)&&(u=r.classThis),Zl(e)&&Uv(e)&&i&&(o=i(e,void 0),x.memberDescriptorName=d=C(e,"descriptor"),o=t.createAssignment(d,o));const a=n().createESDecorateHelper(yu(e)?t.createThis():t.createNull(),o??t.createNull(),m,w,c,l),s=t.createExpressionStatement(a);lw(s,Kb(e)),S.push(s)}}return void 0===s&&(y(),s=B(e.name),v()),Q(f)||!dE(e)&&!uE(e)||iw(s,1024),{modifiers:f,referencedName:a,name:s,initializersName:c,extraInitializersName:l,descriptorName:d,thisArg:u}}function I(e){return mP(e)&&!e.name&&E(e)}function M(e){const t=fA(e);return mP(t)&&!t.name&&!bm(!1,t)}function L(n,r){if(hb(n)){const e=U(n.left),r=qB(n.right,b,Xu);return t.updateBinaryExpression(n,e,n.operatorToken,r)}if(mb(n)){if(iy(n,I))return ZB(n=Cz(e,n,M(n.right)),b,e);if(um(n.left)&&l&&u){let e=XE(n.left)?qB(n.left.argumentExpression,b,Xu):qD(n.left.name)?t.createStringLiteralFromNode(n.left.name):void 0;if(e){let i=qB(n.right,b,Xu);if(LJ(n.operatorToken.kind)){let r=e;MJ(e)||(r=t.createTempVariable(o),e=t.createAssignment(r,e));const a=t.createReflectGetCall(u,r,l);ew(a,n.left),sI(a,n.left),i=t.createBinaryExpression(a,jJ(n.operatorToken.kind),i),sI(i,n)}const a=r?void 0:t.createTempVariable(o);return a&&(i=t.createAssignment(a,i),sI(a,n)),i=t.createReflectSetCall(u,e,i,l),ew(i,n),sI(i,n),a&&(i=t.createComma(i,a),sI(i,n)),i}}}if(28===n.operatorToken.kind){const e=qB(n.left,T,Xu),i=qB(n.right,r?T:b,Xu);return t.updateBinaryExpression(n,e,n.operatorToken,i)}return ZB(n,b,e)}function j(n,r){if(46===n.operator||47===n.operator){const e=lh(n.operand);if(um(e)&&l&&u){let i=XE(e)?qB(e.argumentExpression,b,Xu):qD(e.name)?t.createStringLiteralFromNode(e.name):void 0;if(i){let e=i;MJ(i)||(e=t.createTempVariable(o),i=t.createAssignment(e,i));let a=t.createReflectGetCall(u,e,l);ew(a,n),sI(a,n);const s=r?void 0:t.createTempVariable(o);return a=nA(t,n,a,o,s),a=t.createReflectSetCall(u,i,a,l),ew(a,n),sI(a,n),s&&(a=t.createComma(a,s),sI(a,n)),a}}}return ZB(n,b,e)}function R(e,n){const r=n?YB(e.elements,T):YB(e.elements,b,T);return t.updateCommaListExpression(e,r)}function B(e){return oE(e)?J(e):qB(e,b,au)}function J(e){let n=qB(e.expression,b,Xu);return MJ(n)||(n=H(n)),t.updateComputedPropertyName(e,n)}function z(n){if(HE(n)||WE(n))return U(n);if(um(n)&&l&&u){const e=XE(n)?qB(n.argumentExpression,b,Xu):qD(n.name)?t.createStringLiteralFromNode(n.name):void 0;if(e){const r=t.createTempVariable(void 0),i=t.createAssignmentTargetWrapper(r,t.createReflectSetCall(u,e,r,l));return ew(i,n),sI(i,n),i}}return ZB(n,b,e)}function $(n){if(mb(n,!0)){iy(n,I)&&(n=Cz(e,n,M(n.right)));const r=z(n.left),i=qB(n.right,b,Xu);return t.updateBinaryExpression(n,r,n.operatorToken,i)}return z(n)}function q(n){return xn.assertNode(n,ju),fP(n)?function(n){if(Vu(n.expression)){const e=z(n.expression);return t.updateSpreadElement(n,e)}return ZB(n,b,e)}(n):gP(n)?ZB(n,b,e):$(n)}function V(n){return xn.assertNode(n,Mu),zN(n)?function(n){if(Vu(n.expression)){const e=z(n.expression);return t.updateSpreadAssignment(n,e)}return ZB(n,b,e)}(n):JN(n)?function(t){return iy(t,I)&&(t=Cz(e,t,M(t.objectAssignmentInitializer))),ZB(t,b,e)}(n):BN(n)?function(n){const r=qB(n.name,b,au);if(mb(n.initializer,!0)){const e=$(n.initializer);return t.updatePropertyAssignment(n,r,e)}if(Vu(n.initializer)){const e=z(n.initializer);return t.updatePropertyAssignment(n,r,e)}return ZB(n,b,e)}(n):ZB(n,b,e)}function U(e){if(WE(e)){const n=VB(e.elements,q,Xu);return t.updateArrayLiteralExpression(e,n)}{const n=VB(e.properties,V,Cu);return t.updateObjectLiteralExpression(e,n)}}function K(e,n){const r=n?T:b,i=qB(e.expression,r,Xu);return t.updateParenthesizedExpression(e,i)}function W(e,n){return Q(e)&&(n?tP(n)?(e.push(n.expression),n=t.updateParenthesizedExpression(n,t.inlineExpressions(e))):(e.push(n),n=t.inlineExpressions(e)):n=t.inlineExpressions(e)),n}function H(e){const t=W(_,e);return xn.assertIsDefined(t),t!==e&&(_=void 0),t}function G(e,t,n){const r=W(t?e.pendingStaticInitializers:e.pendingInstanceInitializers,n);return r!==n&&(t?e.pendingStaticInitializers=void 0:e.pendingInstanceInitializers=void 0),r}function X(e){if(!e)return;const t=[];return pe(t,O(e.decorators,Y)),t}function Y(e){const n=qB(e.expression,b,Xu);if(iw(n,3072),Ox(fA(n))){const{target:e,thisArg:r}=t.createCallBinding(n,o,a,!0);return t.restoreOuterExpressions(n,t.createFunctionBindCall(e,r,[]))}return n}function Z(e,r,i,o,a,s,c){const l=t.createFunctionExpression(i,o,void 0,void 0,s,void 0,c??t.createBlock([]));ew(l,e),lw(l,Kb(e)),iw(l,3072);const u="get"===a||"set"===a?a:void 0,_=t.createStringLiteralFromNode(r,void 0),d=n().createSetFunctionNameHelper(l,_,u),p=t.createPropertyAssignment(t.createIdentifier(a),d);return ew(p,e),lw(p,Kb(e)),iw(p,3072),p}function ee(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,e.asteriskToken,"value",VB(e.parameters,b,sE),qB(e.body,b,DP))])}function te(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"get",[],qB(e.body,b,DP))])}function ne(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"set",VB(e.parameters,b,sE),qB(e.body,b,DP))])}function re(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"get",[],t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(t.createThis(),t.getGeneratedPrivateNameForNode(e.name)))])),Z(e,e.name,n,void 0,"set",[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createThis(),t.getGeneratedPrivateNameForNode(e.name)),t.createIdentifier("value")))]))])}function ie(e,n,r){return e=VB(e,(e=>QD(e)?e:void 0),iu),t.createGetAccessorDeclaration(e,n,[],void 0,t.createBlock([t.createReturnStatement(t.createFunctionCallCall(t.createPropertyAccessExpression(r,t.createIdentifier("get")),t.createThis(),[]))]))}function oe(e,n,r){return e=VB(e,(e=>QD(e)?e:void 0),iu),t.createSetAccessorDeclaration(e,n,[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createReturnStatement(t.createFunctionCallCall(t.createPropertyAccessExpression(r,t.createIdentifier("set")),t.createThis(),[t.createIdentifier("value")]))]))}function ae(e){return t.createBinaryExpression(t.createElementAccessExpression(e,t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata")),61,t.createNull())}}function Lz(e){const{factory:t,getEmitHelperFactory:n,resumeLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=e.getEmitResolver(),s=e.getCompilerOptions(),c=wS(s);let l,u,_,d,p,m=0;const g=[];let h=0;const y=e.onEmitNode,v=e.onSubstituteNode;return e.onEmitNode=function(e,t,n){if(1&l&&function(e){const t=e.kind;return 263===t||176===t||174===t||177===t||178===t}(t)){const r=(a.hasNodeCheckFlag(t,128)?128:0)|(a.hasNodeCheckFlag(t,256)?256:0);if(r!==m){const i=m;return m=r,y(e,t,n),void(m=i)}}else if(l&&g[IB(t)]){const r=m;return m=0,y(e,t,n),void(m=r)}y(e,t,n)},e.onSubstituteNode=function(e,n){return n=v(e,n),1===e&&m?function(e){switch(e.kind){case 211:return K(e);case 212:return W(e);case 213:return function(e){const n=e.expression;if(um(n)){const r=GE(n)?K(n):W(n);return t.createCallExpression(t.createPropertyAccessExpression(r,"call"),void 0,[t.createThis(),...e.arguments])}return e}(e)}return e}(n):n},CJ(e,(function(t){if(t.isDeclarationFile)return t;b(1,!1),b(2,!yp(t,s));const n=ZB(t,C,e);return ww(n,e.readEmitHelpers()),n}));function b(e,t){h=t?h|e:h&~e}function x(e){return 0!=(h&e)}function S(e,t,n){const r=e&~h;if(r){b(r,!0);const e=t(n);return b(r,!1),e}return t(n)}function k(t){return ZB(t,C,e)}function T(t){switch(t.kind){case 218:case 262:case 174:case 177:case 178:case 176:return t;case 169:case 208:case 260:break;case 80:if(p&&a.isArgumentsLocalBinding(t))return p}return ZB(t,T,e)}function C(n){if(0==(256&n.transformFlags))return p?T(n):n;switch(n.kind){case 134:return;case 223:return function(n){return x(1)?ew(sI(t.createYieldExpression(void 0,qB(n.expression,C,Xu)),n),n):ZB(n,C,e)}(n);case 174:return S(3,E,n);case 262:return S(3,F,n);case 218:return S(3,A,n);case 219:return S(1,I,n);case 211:return _&&GE(n)&&108===n.expression.kind&&_.add(n.name.escapedText),ZB(n,C,e);case 212:return _&&108===n.expression.kind&&(d=!0),ZB(n,C,e);case 177:return S(3,P,n);case 178:return S(3,N,n);case 176:return S(3,D,n);case 263:case 231:return S(3,k,n);default:return ZB(n,C,e)}}function w(n){if(nh(n))switch(n.kind){case 243:return function(n){if(L(n.declarationList)){const e=j(n.declarationList,!1);return e?t.createExpressionStatement(e):void 0}return ZB(n,C,e)}(n);case 248:return function(n){const r=n.initializer;return t.updateForStatement(n,L(r)?j(r,!1):qB(n.initializer,C,s_),qB(n.condition,C,Xu),qB(n.incrementor,C,Xu),QB(n.statement,w,e))}(n);case 249:return function(n){return t.updateForInStatement(n,L(n.initializer)?j(n.initializer,!0):xn.checkDefined(qB(n.initializer,C,s_)),xn.checkDefined(qB(n.expression,C,Xu)),QB(n.statement,w,e))}(n);case 250:return function(n){return t.updateForOfStatement(n,qB(n.awaitModifier,C,GD),L(n.initializer)?j(n.initializer,!0):xn.checkDefined(qB(n.initializer,C,s_)),xn.checkDefined(qB(n.expression,C,Xu)),QB(n.statement,w,e))}(n);case 299:return function(t){const n=new Set;let r;if(M(t.variableDeclaration,n),n.forEach(((e,t)=>{u.has(t)&&(r||(r=new Set(u)),r.delete(t))})),r){const n=u;u=r;const i=ZB(t,w,e);return u=n,i}return ZB(t,w,e)}(n);case 241:case 255:case 269:case 296:case 297:case 258:case 246:case 247:case 245:case 254:case 256:return ZB(n,w,e);default:return xn.assertNever(n,"Unhandled node.")}return C(n)}function D(n){const r=p;p=void 0;const i=t.updateConstructorDeclaration(n,VB(n.modifiers,C,iu),HB(n.parameters,C,e),z(n));return p=r,i}function E(n){let r;const i=Jh(n),o=p;p=void 0;const a=t.updateMethodDeclaration(n,VB(n.modifiers,C,Su),n.asteriskToken,n.name,void 0,void 0,r=2&i?q(n):HB(n.parameters,C,e),void 0,2&i?V(n,r):z(n));return p=o,a}function P(n){const r=p;p=void 0;const i=t.updateGetAccessorDeclaration(n,VB(n.modifiers,C,Su),n.name,HB(n.parameters,C,e),void 0,z(n));return p=r,i}function N(n){const r=p;p=void 0;const i=t.updateSetAccessorDeclaration(n,VB(n.modifiers,C,Su),n.name,HB(n.parameters,C,e),z(n));return p=r,i}function F(n){let r;const i=p;p=void 0;const o=Jh(n),a=t.updateFunctionDeclaration(n,VB(n.modifiers,C,Su),n.asteriskToken,n.name,void 0,r=2&o?q(n):HB(n.parameters,C,e),void 0,2&o?V(n,r):XB(n.body,C,e));return p=i,a}function A(n){let r;const i=p;p=void 0;const o=Jh(n),a=t.updateFunctionExpression(n,VB(n.modifiers,C,iu),n.asteriskToken,n.name,void 0,r=2&o?q(n):HB(n.parameters,C,e),void 0,2&o?V(n,r):XB(n.body,C,e));return p=i,a}function I(n){let r;const i=Jh(n);return t.updateArrowFunction(n,VB(n.modifiers,C,iu),void 0,r=2&i?q(n):HB(n.parameters,C,e),void 0,n.equalsGreaterThanToken,2&i?V(n,r):XB(n.body,C,e))}function M({name:e},t){if(qD(e))t.add(e.escapedText);else for(const n of e.elements)gP(n)||M(n,t)}function L(e){return!!e&&WP(e)&&!(7&e.flags)&&e.declarations.some(J)}function j(e,n){!function(e){f(e.declarations,R)}(e);const r=lx(e);return 0===r.length?n?qB(t.converters.convertToAssignmentElementTarget(e.declarations[0].name),C,Xu):void 0:t.inlineExpressions(O(r,B))}function R({name:e}){if(qD(e))o(e);else for(const t of e.elements)gP(t)||R(t)}function B(e){const n=lw(t.createAssignment(t.converters.convertToAssignmentElementTarget(e.name),e.initializer),e);return xn.checkDefined(qB(n,C,Xu))}function J({name:e}){if(qD(e))return u.has(e.escapedText);for(const t of e.elements)if(!gP(t)&&J(t))return!0;return!1}function z(n){xn.assertIsDefined(n.body);const r=_,i=d;_=new Set,d=!1;let o=XB(n.body,C,e);const s=fc(n,uu);if(c>=2&&(a.hasNodeCheckFlag(n,256)||a.hasNodeCheckFlag(n,128))&&3!=(3&Jh(s))){if(U(),_.size){const e=jz(t,a,n,_);g[IB(e)]=!0;const r=o.statements.slice();jd(r,[e]),o=t.updateBlock(o,r)}d&&(a.hasNodeCheckFlag(n,256)?Cw(o,SD):a.hasNodeCheckFlag(n,128)&&Cw(o,xD))}return _=r,d=i,o}function $(){xn.assert(p);const e=t.createVariableDeclaration(p,void 0,void 0,t.createIdentifier("arguments")),n=t.createVariableStatement(void 0,[e]);return hA(n),ow(n,2097152),n}function q(n){if(nz(n.parameters))return HB(n.parameters,C,e);const r=[];for(const e of n.parameters){if(e.initializer||e.dotDotDotToken){if(219===n.kind){const e=t.createParameterDeclaration(void 0,t.createToken(26),t.createUniqueName("args",8));r.push(e)}break}const i=t.createParameterDeclaration(void 0,void 0,t.getGeneratedNameForNode(e.name,8));r.push(i)}const i=t.createNodeArray(r);return sI(i,n.parameters),i}function V(o,s){const l=nz(o.parameters)?void 0:HB(o.parameters,C,e);r();const f=fc(o,cu).type,m=c<2?function(e){const t=e&&fm(e);if(t&&ou(t)){const e=a.getTypeReferenceSerializationKind(t);if(1===e||0===e)return t}}(f):void 0,h=219===o.kind,y=p,v=a.hasNodeCheckFlag(o,512)&&!p;let b;if(v&&(p=t.createUniqueName("arguments")),l)if(h){const e=[];xn.assert(s.length<=o.parameters.length);for(let n=0;n=2&&(a.hasNodeCheckFlag(o,256)||a.hasNodeCheckFlag(o,128));if(r&&(U(),_.size)){const n=jz(t,a,o,_);g[IB(n)]=!0,jd(e,[n])}v&&jd(e,[$()]);const i=t.createBlock(e,!0);sI(i,o.body),r&&d&&(a.hasNodeCheckFlag(o,256)?Cw(i,SD):a.hasNodeCheckFlag(o,128)&&Cw(i,xD)),N=i}return u=S,h||(_=k,d=T,p=y),N}function U(){0==(1&l)&&(l|=1,e.enableSubstitution(213),e.enableSubstitution(211),e.enableSubstitution(212),e.enableEmitNotification(263),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(176),e.enableEmitNotification(243))}function K(e){return 108===e.expression.kind?sI(t.createPropertyAccessExpression(t.createUniqueName("_super",48),e.name),e):e}function W(e){return 108===e.expression.kind?function(e,n){return sI(256&m?t.createPropertyAccessExpression(t.createCallExpression(t.createUniqueName("_superIndex",48),void 0,[e]),"value"):t.createCallExpression(t.createUniqueName("_superIndex",48),void 0,[e]),n)}(e.argumentExpression,e):e}}function jz(e,t,n,r){const i=t.hasNodeCheckFlag(n,256),o=[];return r.forEach(((t,n)=>{const r=vc(n),a=[];a.push(e.createPropertyAssignment("get",e.createArrowFunction(void 0,void 0,[],void 0,void 0,iw(e.createPropertyAccessExpression(iw(e.createSuper(),8),r),8)))),i&&a.push(e.createPropertyAssignment("set",e.createArrowFunction(void 0,void 0,[e.createParameterDeclaration(void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,e.createAssignment(iw(e.createPropertyAccessExpression(iw(e.createSuper(),8),r),8),e.createIdentifier("v"))))),o.push(e.createPropertyAssignment(r,e.createObjectLiteralExpression(a)))})),e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createUniqueName("_super",48),void 0,void 0,e.createCallExpression(e.createPropertyAccessExpression(e.createIdentifier("Object"),"create"),void 0,[e.createNull(),e.createObjectLiteralExpression(o,!0)]))],2))}function Rz(e){const{factory:t,getEmitHelperFactory:n,resumeLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=e.getEmitResolver(),s=e.getCompilerOptions(),c=wS(s),l=e.onEmitNode;e.onEmitNode=function(e,t,n){if(1&_&&function(e){const t=e.kind;return 263===t||176===t||174===t||177===t||178===t}(t)){const r=(a.hasNodeCheckFlag(t,128)?128:0)|(a.hasNodeCheckFlag(t,256)?256:0);if(r!==v){const i=v;return v=r,l(e,t,n),void(v=i)}}else if(_&&x[IB(t)]){const r=v;return v=0,l(e,t,n),void(v=r)}l(e,t,n)};const u=e.onSubstituteNode;e.onSubstituteNode=function(e,n){return n=u(e,n),1===e&&v?function(e){switch(e.kind){case 211:return G(e);case 212:return X(e);case 213:return function(e){const n=e.expression;if(um(n)){const r=GE(n)?G(n):X(n);return t.createCallExpression(t.createPropertyAccessExpression(r,"call"),void 0,[t.createThis(),...e.arguments])}return e}(e)}return e}(n):n};let _,d,p,f,m,g,h,y=!1,v=0,b=0;const x=[];return CJ(e,(function(n){if(n.isDeclarationFile)return n;f=n;const r=function(n){const r=S(2,yp(n,s)?0:1);y=!1;const i=ZB(n,C,e),o=Z(i.statements,m&&[t.createVariableStatement(void 0,t.createVariableDeclarationList(m))]),a=t.updateSourceFile(i,sI(t.createNodeArray(o),n.statements));return k(r),a}(n);return ww(r,e.readEmitHelpers()),f=void 0,m=void 0,r}));function S(e,t){const n=b;return b=3&(b&~e|t),n}function k(e){b=e}function T(e){m=ue(m,t.createVariableDeclaration(e))}function C(e){return N(e,!1)}function w(e){return N(e,!0)}function D(e){if(134!==e.kind)return e}function E(e,t,n,r){if(function(e,t){return b!==(b&~e|t)}(n,r)){const i=S(n,r),o=e(t);return k(i),o}return e(t)}function P(t){return ZB(t,C,e)}function N(r,i){if(0==(128&r.transformFlags))return r;switch(r.kind){case 223:return function(r){return 2&d&&1&d?ew(sI(t.createYieldExpression(void 0,n().createAwaitHelper(qB(r.expression,C,Xu))),r),r):ZB(r,C,e)}(r);case 229:return function(r){if(2&d&&1&d){if(r.asteriskToken){const e=qB(xn.checkDefined(r.expression),C,Xu);return ew(sI(t.createYieldExpression(void 0,n().createAwaitHelper(t.updateYieldExpression(r,r.asteriskToken,sI(n().createAsyncDelegatorHelper(sI(n().createAsyncValuesHelper(e),e)),e)))),r),r)}return ew(sI(t.createYieldExpression(void 0,O(r.expression?qB(r.expression,C,Xu):t.createVoidZero())),r),r)}return ZB(r,C,e)}(r);case 253:return function(n){return 2&d&&1&d?t.updateReturnStatement(n,O(n.expression?qB(n.expression,C,Xu):t.createVoidZero())):ZB(n,C,e)}(r);case 256:return function(n){if(2&d){const e=Jf(n);return 250===e.kind&&e.awaitModifier?I(e,n):t.restoreEnclosingLabel(qB(e,C,b_,t.liftToBlock),n)}return ZB(n,C,e)}(r);case 210:return function(r){if(65536&r.transformFlags){const e=function(e){let n;const r=[];for(const i of e)if(305===i.kind){n&&(r.push(t.createObjectLiteralExpression(n)),n=void 0);const e=i.expression;r.push(qB(e,C,Xu))}else n=ue(n,303===i.kind?t.createPropertyAssignment(i.name,qB(i.initializer,C,Xu)):qB(i,C,Cu));return n&&r.push(t.createObjectLiteralExpression(n)),r}(r.properties);e.length&&210!==e[0].kind&&e.unshift(t.createObjectLiteralExpression());let i=e[0];if(e.length>1){for(let t=1;t=2&&(a.hasNodeCheckFlag(o,256)||a.hasNodeCheckFlag(o,128));if(m){0==(1&_)&&(_|=1,e.enableSubstitution(213),e.enableSubstitution(211),e.enableSubstitution(212),e.enableEmitNotification(263),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(176),e.enableEmitNotification(243));const n=jz(t,a,o,g);x[IB(n)]=!0,jd(d,[n])}d.push(f);const y=t.updateBlock(o.body,d);return m&&h&&(a.hasNodeCheckFlag(o,256)?Cw(y,SD):a.hasNodeCheckFlag(o,128)&&Cw(y,xD)),g=l,h=u,y}function W(e){r();let n=0;const o=[],a=qB(e.body,C,o_)??t.createBlock([]);DP(a)&&(n=t.copyPrologue(a.statements,o,!1,C)),pe(o,H(void 0,e));const s=i();if(n>0||Q(o)||Q(s)){const e=t.converters.convertToFunctionBlock(a,!0);return jd(o,s),pe(o,e.statements.slice(n)),t.updateBlock(e,sI(t.createNodeArray(o),e.statements))}return a}function H(n,r){let i=!1;for(const o of r.parameters)if(i){if(Eu(o.name)){if(o.name.elements.length>0){const r=sz(o,C,e,0,t.getGeneratedNameForNode(o));if(Q(r)){const e=t.createVariableDeclarationList(r),i=t.createVariableStatement(void 0,e);iw(i,2097152),n=ue(n,i)}}else if(o.initializer){const e=t.getGeneratedNameForNode(o),r=qB(o.initializer,C,Xu),i=t.createAssignment(e,r),a=t.createExpressionStatement(i);iw(a,2097152),n=ue(n,a)}}else if(o.initializer){const e=t.cloneNode(o.name);sI(e,o.name),iw(e,96);const r=qB(o.initializer,C,Xu);ow(r,3168);const i=t.createAssignment(e,r);sI(i,o),iw(i,3072);const a=t.createBlock([t.createExpressionStatement(i)]);sI(a,o),iw(a,3905);const s=t.createTypeCheck(t.cloneNode(o.name),"undefined"),c=t.createIfStatement(s,a);hA(c),sI(c,o),iw(c,2101056),n=ue(n,c)}}else if(65536&o.transformFlags){i=!0;const r=sz(o,C,e,1,t.getGeneratedNameForNode(o),!1,!0);if(Q(r)){const e=t.createVariableDeclarationList(r),i=t.createVariableStatement(void 0,e);iw(i,2097152),n=ue(n,i)}}return n}function G(e){return 108===e.expression.kind?sI(t.createPropertyAccessExpression(t.createUniqueName("_super",48),e.name),e):e}function X(e){return 108===e.expression.kind?function(e,n){return sI(256&v?t.createPropertyAccessExpression(t.createCallExpression(t.createIdentifier("_superIndex"),void 0,[e]),"value"):t.createCallExpression(t.createIdentifier("_superIndex"),void 0,[e]),n)}(e.argumentExpression,e):e}}function Bz(e){const t=e.factory;return CJ(e,(function(t){return t.isDeclarationFile?t:ZB(t,n,e)}));function n(r){return 0==(64&r.transformFlags)?r:299===r.kind?function(r){return r.variableDeclaration?ZB(r,n,e):t.updateCatchClause(r,t.createVariableDeclaration(t.createTempVariable(void 0)),qB(r.block,n,DP))}(r):ZB(r,n,e)}}function Jz(e){const{factory:t,hoistVariableDeclaration:n}=e;return CJ(e,(function(t){return t.isDeclarationFile?t:ZB(t,r,e)}));function r(i){if(0==(32&i.transformFlags))return i;switch(i.kind){case 213:{const e=o(i,!1);return xn.assertNotNode(e,xN),e}case 211:case 212:if(Sl(i)){const e=s(i,!1,!1);return xn.assertNotNode(e,xN),e}return ZB(i,r,e);case 226:return 61===i.operatorToken.kind?function(e){let i=qB(e.left,r,Xu),o=i;return OJ(i)||(o=t.createTempVariable(n),i=t.createAssignment(o,i)),sI(t.createConditionalExpression(c(i,o),void 0,o,void 0,qB(e.right,r,Xu)),e)}(i):ZB(i,r,e);case 220:return function(e){return Sl(lh(e.expression))?ew(a(e.expression,!1,!0),e):t.updateDeleteExpression(e,qB(e.expression,r,Xu))}(i);default:return ZB(i,r,e)}}function i(e,n,r){const i=a(e.expression,n,r);return xN(i)?t.createSyntheticReferenceExpression(t.updateParenthesizedExpression(e,i.expression),i.thisArg):t.updateParenthesizedExpression(e,i)}function o(n,o){if(Sl(n))return s(n,o,!1);if(tP(n.expression)&&Sl(lh(n.expression))){const e=i(n.expression,!0,!1),o=VB(n.arguments,r,Xu);return xN(e)?sI(t.createFunctionCallCall(e.expression,e.thisArg,o),n):t.updateCallExpression(n,e,void 0,o)}return ZB(n,r,e)}function a(e,a,c){switch(e.kind){case 217:return i(e,a,c);case 211:case 212:return function(e,i,o){if(Sl(e))return s(e,i,o);let a,c=qB(e.expression,r,Xu);return xn.assertNotNode(c,xN),i&&(OJ(c)?a=c:(a=t.createTempVariable(n),c=t.createAssignment(a,c))),c=211===e.kind?t.updatePropertyAccessExpression(e,c,qB(e.name,r,qD)):t.updateElementAccessExpression(e,c,qB(e.argumentExpression,r,Xu)),a?t.createSyntheticReferenceExpression(c,a):c}(e,a,c);case 213:return o(e,a);default:return qB(e,r,Xu)}}function s(e,i,o){const{expression:s,chain:l}=function(e){xn.assertNotNode(e,Pl);const t=[e];for(;!e.questionDotToken&&!ZE(e);)e=ut(El(e.expression),Sl),xn.assertNotNode(e,Pl),t.unshift(e);return{expression:e.expression,chain:t}}(e),u=a(El(s),xl(l[0]),!1);let _=xN(u)?u.thisArg:void 0,d=xN(u)?u.expression:u,p=t.restoreOuterExpressions(s,d,8);OJ(d)||(d=t.createTempVariable(n),p=t.createAssignment(d,p));let f,m=d;for(let e=0;ee&&pe(c,VB(n.statements,u,b_,e,d-e));break}d++}xn.assert(dt&&(t=e)}return t}(n.caseBlock.clauses);if(r){const i=m();return g([t.updateSwitchStatement(n,qB(n.expression,u,Xu),t.updateCaseBlock(n.caseBlock,n.caseBlock.clauses.map((n=>function(n,r){return 0!==Wz(n.statements)?MN(n)?t.updateCaseClause(n,qB(n.expression,u,Xu),_(n.statements,0,n.statements.length,r,void 0)):t.updateDefaultClause(n,_(n.statements,0,n.statements.length,r,void 0)):ZB(n,u,e)}(n,i)))))],i,2===r)}return ZB(n,u,e)}(n);default:return ZB(n,u,e)}}function _(i,o,a,s,_){const m=[];for(let r=o;rt&&(t=e)}return t}function Hz(e){const{factory:t,getEmitHelperFactory:n}=e,r=e.getCompilerOptions();let i,o;return CJ(e,(function(n){if(n.isDeclarationFile)return n;i=n,o={},o.importSpecifier=tk(r,n);let a=ZB(n,c,e);ww(a,e.readEmitHelpers());let s=a.statements;if(o.filenameDeclaration&&(s=Jd(s.slice(),t.createVariableStatement(void 0,t.createVariableDeclarationList([o.filenameDeclaration],2)))),o.utilizedImplicitRuntimeImports)for(const[e,r]of $e(o.utilizedImplicitRuntimeImports.entries()))if(qI(n)){const n=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamedImports($e(r.values()))),t.createStringLiteral(e),void 0);LT(n,!1),s=Jd(s.slice(),n)}else if(Zp(n)){const n=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createObjectBindingPattern($e(r.values(),(e=>t.createBindingElement(void 0,e.propertyName,e.name)))),void 0,void 0,t.createCallExpression(t.createIdentifier("require"),void 0,[t.createStringLiteral(e)]))],2));LT(n,!1),s=Jd(s.slice(),n)}return s!==a.statements&&(a=t.updateSourceFile(a,s)),o=void 0,a}));function a(){if(o.filenameDeclaration)return o.filenameDeclaration.name;const e=t.createVariableDeclaration(t.createUniqueName("_jsxFileName",48),void 0,void 0,t.createStringLiteral(i.fileName));return o.filenameDeclaration=e,o.filenameDeclaration.name}function s(e){var n,i;const a="createElement"===e?o.importSpecifier:nk(o.importSpecifier,r),s=null==(i=null==(n=o.utilizedImplicitRuntimeImports)?void 0:n.get(a))?void 0:i.get(e);if(s)return s.name;o.utilizedImplicitRuntimeImports||(o.utilizedImplicitRuntimeImports=new Map);let c=o.utilizedImplicitRuntimeImports.get(a);c||(c=new Map,o.utilizedImplicitRuntimeImports.set(a,c));const l=t.createUniqueName(`_${e}`,112),u=t.createImportSpecifier(!1,t.createIdentifier(e),l);return Bw(l,u),c.set(e,u),l}function c(t){return 2&t.transformFlags?function(t){switch(t.kind){case 284:return f(t,!1);case 285:return m(t,!1);case 288:return g(t,!1);case 294:return N(t);default:return ZB(t,c,e)}}(t):t}function l(e){switch(e.kind){case 12:return function(e){const n=function(e){let t,n=0,r=-1;for(let i=0;iBN(e)&&(qD(e.name)&&"__proto__"===bc(e.name)||wD(e.name)&&"__proto__"===e.name.text)))}function d(e){return void 0===o.importSpecifier||function(e){let t=!1;for(const n of e.attributes.properties)if(!AN(n)||HE(n.expression)&&!n.expression.properties.some(zN)){if(t&&NN(n)&&qD(n.name)&&"key"===n.name.escapedText)return!0}else t=!0;return!1}(e)}function f(e,t){return(d(e.openingElement)?b:y)(e.openingElement,e.children,t,e)}function m(e,t){return(d(e)?b:y)(e,void 0,t,e)}function g(e,t){return(void 0===o.importSpecifier?k:x)(e.openingFragment,e.children,t,e)}function h(e){const n=vy(e);if(1===p(n)&&!n[0].dotDotDotToken){const e=l(n[0]);return e&&t.createPropertyAssignment("children",e)}const r=q(e,l);return p(r)?t.createPropertyAssignment("children",t.createArrayLiteralExpression(r)):void 0}function y(e,n,r,i){const o=P(e),a=n&&n.length?h(n):void 0,s=S(e.attributes.properties,(e=>!!e.name&&qD(e.name)&&"key"===e.name.escapedText)),c=s?F(e.attributes.properties,(e=>e!==s)):e.attributes.properties;return v(o,p(c)?T(c,a):t.createObjectLiteralExpression(a?[a]:u),s,n||u,r,i)}function v(e,n,o,c,l,u){var _;const d=vy(c),f=p(d)>1||!!(null==(_=d[0])?void 0:_.dotDotDotToken),m=[e,n];if(o&&m.push(w(o.initializer)),5===r.jsx){const e=fc(i);if(e&&qN(e)){void 0===o&&m.push(t.createVoidZero()),m.push(f?t.createTrue():t.createFalse());const n=Xa(e,u.pos);m.push(t.createObjectLiteralExpression([t.createPropertyAssignment("fileName",a()),t.createPropertyAssignment("lineNumber",t.createNumericLiteral(n.line+1)),t.createPropertyAssignment("columnNumber",t.createNumericLiteral(n.character+1))])),m.push(t.createThis())}}const g=sI(t.createCallExpression(function(e){const t=function(e){return 5===r.jsx?"jsxDEV":e?"jsxs":"jsx"}(e);return s(t)}(f),void 0,m),u);return l&&hA(g),g}function b(n,a,c,u){const _=P(n),d=n.attributes.properties,f=p(d)?T(d):t.createNull(),m=void 0===o.importSpecifier?HF(t,e.getEmitResolver().getJsxFactoryEntity(i),r.reactNamespace,n):s("createElement"),g=GF(t,m,_,f,q(a,l),u);return c&&hA(g),g}function x(e,n,r,i){let o;if(n&&n.length){const e=function(e){const n=h(e);return n&&t.createObjectLiteralExpression([n])}(n);e&&(o=e)}return v(s("Fragment"),o||t.createObjectLiteralExpression([]),void 0,n,r,i)}function k(n,o,a,s){const c=XF(t,e.getEmitResolver().getJsxFactoryEntity(i),e.getEmitResolver().getJsxFragmentFactoryEntity(i),r.reactNamespace,q(o,l),n,s);return a&&hA(c),c}function T(e,i){const o=wS(r);return o&&o>=5?t.createObjectLiteralExpression(function(e,n){const r=j(G(e,AN,((e,n)=>j(O(e,(e=>{return n?HE((r=e).expression)&&!_(r.expression)?L(r.expression.properties,(e=>xn.checkDefined(qB(e,c,Cu)))):t.createSpreadAssignment(xn.checkDefined(qB(r.expression,c,Xu))):C(e);var r}))))));return n&&r.push(n),r}(e,i)):function(e,r){const i=[];let o=[];for(const t of e)if(AN(t)){if(HE(t.expression)&&!_(t.expression)){for(const e of t.expression.properties)zN(e)?(a(),i.push(xn.checkDefined(qB(e.expression,c,Xu)))):o.push(xn.checkDefined(qB(e,c)));continue}a(),i.push(xn.checkDefined(qB(t.expression,c,Xu)))}else o.push(C(t));return r&&o.push(r),a(),i.length&&!HE(i[0])&&i.unshift(t.createObjectLiteralExpression()),Ee(i)||n().createAssignHelper(i);function a(){o.length&&(i.push(t.createObjectLiteralExpression(o)),o=[])}}(e,i)}function C(e){const n=function(e){const n=e.name;if(qD(n)){const e=bc(n);return/^[A-Za-z_]\w*$/.test(e)?n:t.createStringLiteral(e)}return t.createStringLiteral(bc(n.namespace)+":"+bc(n.name))}(e),r=w(e.initializer);return t.createPropertyAssignment(n,r)}function w(e){if(void 0===e)return t.createTrue();if(11===e.kind){const n=void 0!==e.singleQuote?e.singleQuote:!Wm(e,i);return sI(t.createStringLiteral(function(e){const t=E(e);return t===e?void 0:t}(e.text)||e.text,n),e)}return 294===e.kind?void 0===e.expression?t.createTrue():xn.checkDefined(qB(e.expression,c,Xu)):kN(e)?f(e,!1):TN(e)?m(e,!1):DN(e)?g(e,!1):xn.failBadSyntaxKind(e)}function D(e,t){const n=E(t);return void 0===e?n:e+" "+n}function E(e){return e.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g,((e,t,n,r,i,o,a)=>{if(i)return Ps(parseInt(i,10));if(o)return Ps(parseInt(o,16));{const t=Gz.get(a);return t?Ps(t):e}}))}function P(e){if(284===e.kind)return P(e.openingElement);{const n=e.tagName;return qD(n)&&Jy(n.escapedText)?t.createStringLiteral(bc(n)):ON(n)?t.createStringLiteral(bc(n.namespace)+":"+bc(n.name)):ZF(t,n)}}function N(e){const n=qB(e.expression,c,Xu);return e.dotDotDotToken?t.createSpreadElement(n):n}}var Gz=new Map(Object.entries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}));function Xz(e){const{factory:t,hoistVariableDeclaration:n}=e;return CJ(e,(function(t){return t.isDeclarationFile?t:ZB(t,r,e)}));function r(i){return 0==(512&i.transformFlags)?i:226===i.kind?function(i){switch(i.operatorToken.kind){case 68:return function(e){let i,o;const a=qB(e.left,r,Xu),s=qB(e.right,r,Xu);if(XE(a)){const e=t.createTempVariable(n),r=t.createTempVariable(n);i=sI(t.createElementAccessExpression(sI(t.createAssignment(e,a.expression),a.expression),sI(t.createAssignment(r,a.argumentExpression),a.argumentExpression)),a),o=sI(t.createElementAccessExpression(e,r),a)}else if(GE(a)){const e=t.createTempVariable(n);i=sI(t.createPropertyAccessExpression(sI(t.createAssignment(e,a.expression),a.expression),a.name),a),o=sI(t.createPropertyAccessExpression(e,a.name),a)}else i=a,o=a;return sI(t.createAssignment(i,sI(t.createGlobalMethodCall("Math","pow",[o,s]),e)),e)}(i);case 43:return function(e){const n=qB(e.left,r,Xu),i=qB(e.right,r,Xu);return sI(t.createGlobalMethodCall("Math","pow",[n,i]),e)}(i);default:return ZB(i,r,e)}}(i):ZB(i,r,e)}}function Qz(e,t){return{kind:e,expression:t}}function Yz(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,resumeLexicalEnvironment:i,endLexicalEnvironment:o,hoistVariableDeclaration:a}=e,s=e.getCompilerOptions(),c=e.getEmitResolver(),l=e.onSubstituteNode,u=e.onEmitNode;let _,d,p,f,m,g;function h(e){f=ue(f,t.createVariableDeclaration(e))}return e.onEmitNode=function(e,t,n){if(1&g&&cu(t)){const r=y(32670,16&Yd(t)?81:65);return u(e,t,n),void v(r,0,0)}u(e,t,n)},e.onSubstituteNode=function(e,n){return n=l(e,n),1===e?function(e){switch(e.kind){case 80:return function(e){if(2&g&&!rA(e)){const n=c.getReferencedDeclarationWithCollidingName(e);if(n&&(!gu(n)||!function(e,t){let n=hc(t);if(!n||n===e||n.end<=e.pos||n.pos>=e.end)return!1;const r=Np(e);for(;n;){if(n===r||n===e)return!1;if(mu(n)&&n.parent===e)return!0;n=n.parent}return!1}(n,e)))return sI(t.getGeneratedNameForNode(Pc(n)),e)}return e}(e);case 110:return function(e){return 1&g&&16&p?sI(P(),e):e}(e)}return e}(n):qD(n)?function(e){if(2&g&&!rA(e)){const n=hc(e,qD);if(n&&function(e){switch(e.parent.kind){case 208:case 263:case 266:case 260:return e.parent.name===e&&c.isDeclarationWithCollidingName(e.parent)}return!1}(n))return sI(t.getGeneratedNameForNode(n),e)}return e}(n):n},CJ(e,(function(n){if(n.isDeclarationFile)return n;_=n,d=n.text;const i=function(e){const n=y(8064,64),i=[],a=[];r();const s=t.copyPrologue(e.statements,i,!1,k);return pe(a,VB(e.statements,k,b_,s)),f&&a.push(t.createVariableStatement(void 0,t.createVariableDeclarationList(f))),t.mergeLexicalEnvironment(i,o()),oe(i,e),v(n,0,0),t.updateSourceFile(e,sI(t.createNodeArray(Z(i,a)),e.statements))}(n);return ww(i,e.readEmitHelpers()),_=void 0,d=void 0,f=void 0,p=0,i}));function y(e,t){const n=p;return p=32767&(p&~e|t),n}function v(e,t,n){p=-32768&(p&~t|n)|e}function b(e){return 0!=(8192&p)&&253===e.kind&&!e.expression}function S(e){return 0!=(1024&e.transformFlags)||void 0!==m||8192&p&&function(e){return 4194304&e.transformFlags&&(BP(e)||FP(e)||JP(e)||zP(e)||tN(e)||MN(e)||LN(e)||VP(e)||RN(e)||$P(e)||Zu(e,!1)||DP(e))}(e)||Zu(e,!1)&&$e(e)||0!=(1&Zd(e))}function k(e){return S(e)?D(e,!1):e}function T(e){return S(e)?D(e,!0):e}function C(e){if(S(e)){const t=fc(e);if(uE(t)&&zv(t)){const t=y(32670,16449),n=D(e,!1);return v(t,229376,0),n}return D(e,!1)}return e}function w(e){return 108===e.kind?st(e,!0):k(e)}function D(n,r){switch(n.kind){case 126:return;case 263:return function(e){const n=t.createVariableDeclaration(t.getLocalName(e,!0),void 0,void 0,A(e));ew(n,e);const r=[],i=t.createVariableStatement(void 0,t.createVariableDeclarationList([n]));if(ew(i,e),sI(i,e),hA(i),r.push(i),Bv(e,32)){const n=Bv(e,2048)?t.createExportDefault(t.getLocalName(e)):t.createExternalModuleExport(t.getLocalName(e));ew(n,i),r.push(n)}return Ne(r)}(n);case 231:return function(e){return A(e)}(n);case 169:return function(e){return e.dotDotDotToken?void 0:Eu(e.name)?ew(sI(t.createParameterDeclaration(void 0,void 0,t.getGeneratedNameForNode(e),void 0,void 0,void 0),e),e):e.initializer?ew(sI(t.createParameterDeclaration(void 0,void 0,e.name,void 0,void 0,void 0),e),e):e}(n);case 262:return function(n){const r=m;m=void 0;const i=y(32670,65),o=HB(n.parameters,k,e),a=ge(n),s=32768&p?t.getLocalName(n):n.name;return v(i,229376,0),m=r,t.updateFunctionDeclaration(n,VB(n.modifiers,k,iu),n.asteriskToken,s,void 0,o,void 0,a)}(n);case 219:return function(n){16384&n.transformFlags&&!(16384&p)&&(p|=131072);const r=m;m=void 0;const i=y(15232,66),o=t.createFunctionExpression(void 0,void 0,void 0,void 0,HB(n.parameters,k,e),void 0,ge(n));return sI(o,n),ew(o,n),iw(o,16),v(i,0,0),m=r,o}(n);case 218:return function(n){const r=524288&Yd(n)?y(32662,69):y(32670,65),i=m;m=void 0;const o=HB(n.parameters,k,e),a=ge(n),s=32768&p?t.getLocalName(n):n.name;return v(r,229376,0),m=i,t.updateFunctionExpression(n,void 0,n.asteriskToken,s,void 0,o,void 0,a)}(n);case 260:return ve(n);case 80:return N(n);case 261:return function(n){if(7&n.flags||524288&n.transformFlags){7&n.flags&&ct();const e=VB(n.declarations,1&n.flags?ye:ve,KP),r=t.createVariableDeclarationList(e);return ew(r,n),sI(r,n),mw(r,n),524288&n.transformFlags&&(Eu(n.declarations[0].name)||Eu(De(n.declarations).name))&&lw(r,function(e){let t=-1,n=-1;for(const r of e)t=-1===t?r.pos:-1===r.pos?t:Math.min(t,r.pos),n=Math.max(n,r.end);return qb(t,n)}(e)),r}return ZB(n,k,e)}(n);case 255:return function(t){if(void 0!==m){const n=m.allowedNonLabeledJumps;m.allowedNonLabeledJumps|=2;const r=ZB(t,k,e);return m.allowedNonLabeledJumps=n,r}return ZB(t,k,e)}(n);case 269:return function(t){const n=y(7104,0),r=ZB(t,k,e);return v(n,0,0),r}(n);case 241:return function(t,n){const r=256&p?y(7104,512):y(6976,128),i=ZB(t,k,e);return v(r,0,0),i}(n);case 252:case 251:return function(n){if(m){const e=252===n.kind?2:4;if(!(n.label&&m.labels&&m.labels.get(bc(n.label))||!n.label&&m.allowedNonLabeledJumps&e)){let e;const r=n.label;r?252===n.kind?(e=`break-${r.escapedText}`,Ge(m,!0,bc(r),e)):(e=`continue-${r.escapedText}`,Ge(m,!1,bc(r),e)):252===n.kind?(m.nonLocalJumps|=2,e="break"):(m.nonLocalJumps|=4,e="continue");let i=t.createStringLiteral(e);if(m.loopOutParameters.length){const e=m.loopOutParameters;let n;for(let r=0;rEP(e)&&!!Te(e.declarationList.declarations).initializer,i=m;m=void 0;const o=VB(n.statements,C,b_);m=i;const a=F(o,r),s=F(o,(e=>!r(e))),c=ut(Te(a),EP).declarationList.declarations[0],l=fA(c.initializer);let u=lt(l,mb);!u&&uP(l)&&28===l.operatorToken.kind&&(u=lt(l.left,mb));const _=ut(u?fA(u.right):l,QE),d=ut(fA(_.expression),nP),p=d.body.statements;let f=0,g=-1;const h=[];if(u){const e=lt(p[f],NP);e&&(h.push(e),f++),h.push(p[f]),f++,h.push(t.createExpressionStatement(t.createAssignment(u.left,ut(c.name,qD))))}for(;!BP(xe(p,g));)g--;pe(h,p,f,g),g<-1&&pe(h,p,g+1);const y=lt(xe(p,g),BP);for(const e of s)BP(e)&&(null==y?void 0:y.expression)&&!qD(y.expression)?h.push(y):h.push(e);return pe(h,a,1),t.restoreOuterExpressions(e.expression,t.restoreOuterExpressions(c.initializer,t.restoreOuterExpressions(u&&u.right,t.updateCallExpression(_,t.restoreOuterExpressions(_.expression,t.updateFunctionExpression(d,void 0,void 0,void 0,void 0,d.parameters,void 0,t.updateBlock(d.body,h))),void 0,_.arguments))))}(n);const r=fA(n.expression);return 108===r.kind||um(r)||Q(n.arguments,fP)?function(n,r){if(32768&n.transformFlags||108===n.expression.kind||um(fA(n.expression))){const{target:e,thisArg:r}=t.createCallBinding(n.expression,a);let i;if(108===n.expression.kind&&iw(r,8),i=32768&n.transformFlags?t.createFunctionApplyCall(xn.checkDefined(qB(e,w,Xu)),108===n.expression.kind?r:xn.checkDefined(qB(r,k,Xu)),tt(n.arguments,!0,!1,!1)):sI(t.createFunctionCallCall(xn.checkDefined(qB(e,w,Xu)),108===n.expression.kind?r:xn.checkDefined(qB(r,k,Xu)),VB(n.arguments,k,Xu)),n),108===n.expression.kind){const e=t.createLogicalOr(i,Y());i=t.createAssignment(P(),e)}return ew(i,n)}return lf(n)&&(p|=131072),ZB(n,k,e)}(n):t.updateCallExpression(n,xn.checkDefined(qB(n.expression,w,Xu)),void 0,VB(n.arguments,k,Xu))}(n);case 214:return function(n){if(Q(n.arguments,fP)){const{target:e,thisArg:r}=t.createCallBinding(t.createPropertyAccessExpression(n.expression,"bind"),a);return t.createNewExpression(t.createFunctionApplyCall(xn.checkDefined(qB(e,k,Xu)),r,tt(t.createNodeArray([t.createVoidZero(),...n.arguments]),!0,!1,!1)),void 0,[])}return ZB(n,k,e)}(n);case 217:return function(t,n){return ZB(t,n?T:k,e)}(n,r);case 226:return he(n,r);case 355:return function(n,r){if(r)return ZB(n,T,e);let i;for(let e=0;e0&&e.push(t.createStringLiteral(r.literal.text)),n=t.createCallExpression(t.createPropertyAccessExpression(n,"concat"),void 0,e)}return sI(n,e)}(n);case 230:return function(e){return qB(e.expression,k,Xu)}(n);case 108:return st(n,!1);case 110:return function(e){return p|=65536,2&p&&!(16384&p)&&(p|=131072),m?2&p?(m.containsLexicalThis=!0,e):m.thisName||(m.thisName=t.createUniqueName("this")):e}(n);case 236:return function(e){return 105===e.keywordToken&&"target"===e.name.escapedText?(p|=32768,t.createUniqueName("_newTarget",48)):e}(n);case 174:return function(e){xn.assert(!oE(e.name));const n=me(e,Ub(e,-1),void 0,void 0);return iw(n,1024|Yd(n)),sI(t.createPropertyAssignment(e.name,n),e)}(n);case 177:case 178:return function(n){xn.assert(!oE(n.name));const r=m;m=void 0;const i=y(32670,65);let o;const a=HB(n.parameters,k,e),s=ge(n);return o=177===n.kind?t.updateGetAccessorDeclaration(n,n.modifiers,n.name,a,n.type,s):t.updateSetAccessorDeclaration(n,n.modifiers,n.name,a,s),v(i,229376,0),m=r,o}(n);case 243:return function(n){const r=y(0,Bv(n,32)?32:0);let i;if(m&&0==(7&n.declarationList.flags)&&!function(e){return 1===e.declarationList.declarations.length&&!!e.declarationList.declarations[0].initializer&&!!(1&Zd(e.declarationList.declarations[0].initializer))}(n)){let r;for(const i of n.declarationList.declarations)if(Ve(m,i),i.initializer){let n;Eu(i.name)?n=iz(i,k,e,0):(n=t.createBinaryExpression(i.name,64,xn.checkDefined(qB(i.initializer,k,Xu))),sI(n,i)),r=ue(r,n)}i=r?sI(t.createExpressionStatement(t.inlineExpressions(r)),n):void 0}else i=ZB(n,k,e);return v(r,0,0),i}(n);case 253:return function(n){return m?(m.nonLocalJumps|=8,b(n)&&(n=E(n)),t.createReturnStatement(t.createObjectLiteralExpression([t.createPropertyAssignment(t.createIdentifier("value"),n.expression?xn.checkDefined(qB(n.expression,k,Xu)):t.createVoidZero())]))):b(n)?E(n):ZB(n,k,e)}(n);default:return ZB(n,k,e)}}function E(e){return ew(t.createReturnStatement(P()),e)}function P(){return t.createUniqueName("_this",48)}function N(e){return m&&c.isArgumentsLocalBinding(e)?m.argumentsName||(m.argumentsName=t.createUniqueName("arguments")):256&e.flags?ew(sI(t.createIdentifier(vc(e.escapedText)),e),e):e}function A(a){a.name&&ct();const s=kh(a),c=t.createFunctionExpression(void 0,void 0,void 0,void 0,s?[t.createParameterDeclaration(void 0,void 0,at())]:[],void 0,function(a,s){const c=[],l=t.getInternalName(a),u=jh(l)?t.getGeneratedNameForNode(l):l;r(),function(e,r,i){i&&e.push(sI(t.createExpressionStatement(n().createExtendsHelper(t.getInternalName(r))),i))}(c,a,s),function(n,r,a,s){const c=m;m=void 0;const l=y(32662,73),u=pv(r),_=function(e,t){if(!e||!t)return!1;if(Q(e.parameters))return!1;const n=Se(e.body.statements);if(!n||!ly(n)||244!==n.kind)return!1;const r=n.expression;if(!ly(r)||213!==r.kind)return!1;const i=r.expression;if(!ly(i)||108!==i.kind)return!1;const o=Ee(r.arguments);if(!o||!ly(o)||230!==o.kind)return!1;const a=o.expression;return qD(a)&&"arguments"===a.escapedText}(u,void 0!==s),d=t.createFunctionDeclaration(void 0,void 0,a,void 0,function(t,n){return HB(t&&!n?t.parameters:void 0,k,e)||[]}(u,_),void 0,function(e,n,r,a){const s=!!r&&106!==fA(r.expression).kind;if(!e)return function(e,n){const r=[];i(),t.mergeLexicalEnvironment(r,o()),n&&r.push(t.createReturnStatement(t.createLogicalOr(t.createLogicalAnd(t.createStrictInequality(at(),t.createNull()),t.createFunctionApplyCall(at(),Y(),t.createIdentifier("arguments"))),Y())));const a=t.createNodeArray(r);sI(a,e.members);const s=t.createBlock(a,!0);return sI(s,e),iw(s,3072),s}(n,s);const c=[],l=[];i();const u=t.copyStandardPrologue(e.body.statements,c,0);(a||M(e.body))&&(p|=8192),pe(l,VB(e.body.statements,k,b_,u));const _=s||8192&p;te(c,e),ie(c,e,a),ce(c,e),_?ae(c,e,Y()):oe(c,e),t.mergeLexicalEnvironment(c,o()),_&&!X(e.body)&&l.push(t.createReturnStatement(P()));const d=t.createBlock(sI(t.createNodeArray([...c,...l]),e.body.statements),!0);return sI(d,e.body),function(e,n,r){const i=e;return e=function(e){for(let n=0;n0;n--){const i=e.statements[n];if(BP(i)&&i.expression&&L(i.expression)){const i=e.statements[n-1];let o;if(NP(i)&&U(fA(i.expression)))o=i.expression;else if(r&&B(i)){const e=i.declarationList.declarations[0];K(fA(e.initializer))&&(o=t.createAssignment(P(),e.initializer))}if(!o)break;const a=t.createReturnStatement(o);ew(a,i),sI(a,i);const s=t.createNodeArray([...e.statements.slice(0,n-1),a,...e.statements.slice(n+1)]);return sI(s,e.statements),t.updateBlock(e,s)}}return e}(e,n),e!==i&&(e=function(e,n){if(16384&n.transformFlags||65536&p||131072&p)return e;for(const t of n.statements)if(134217728&t.transformFlags&&!RJ(t))return e;return t.updateBlock(e,VB(e.statements,W,b_))}(e,n)),r&&(e=function(e){return t.updateBlock(e,VB(e.statements,H,b_))}(e)),e}(d,e.body,a)}(u,r,s,_));sI(d,u||r),s&&iw(d,16),n.push(d),v(l,229376,0),m=c}(c,a,u,s),function(e,t){for(const n of t.members)switch(n.kind){case 240:e.push(le(n));break;case 174:e.push(_e(_t(t,n),n,t));break;case 177:case 178:const r=Sv(t.members,n);n===r.firstAccessor&&e.push(de(_t(t,n),r,t));break;case 176:case 175:break;default:xn.failBadSyntaxKind(n,_&&_.fileName)}}(c,a);const f=Gb(as(d,a.members.end),20),g=t.createPartiallyEmittedExpression(u);NT(g,f.end),iw(g,3072);const h=t.createReturnStatement(g);PT(h,f.pos),iw(h,3840),c.push(h),jd(c,o());const b=t.createBlock(sI(t.createNodeArray(c),a.members),!0);return iw(b,3072),b}(a,s));iw(c,131072&Yd(a)|1048576);const l=t.createPartiallyEmittedExpression(c);NT(l,a.end),iw(l,3072);const u=t.createPartiallyEmittedExpression(l);NT(u,as(d,a.pos)),iw(u,3072);const f=t.createParenthesizedExpression(t.createCallExpression(u,void 0,s?[xn.checkDefined(qB(s.expression,k,Xu))]:[]));return yw(f,3,"* @class "),f}function I(e){return EP(e)&&x(e.declarationList.declarations,(e=>qD(e.name)&&!e.initializer))}function M(e){if(lf(e))return!0;if(!(134217728&e.transformFlags))return!1;switch(e.kind){case 219:case 218:case 262:case 176:case 175:return!1;case 177:case 178:case 174:case 172:{const t=e;return!!oE(t.name)&&!!LI(t.name,M)}}return!!LI(e,M)}function L(e){return Xl(e)&&"_this"===bc(e)}function R(e){return Xl(e)&&"_super"===bc(e)}function B(e){return EP(e)&&1===e.declarationList.declarations.length&&function(e){return KP(e)&&L(e.name)&&!!e.initializer}(e.declarationList.declarations[0])}function J(e){return mb(e,!0)&&L(e.left)}function z(e){return QE(e)&&GE(e.expression)&&R(e.expression.expression)&&qD(e.expression.name)&&("call"===bc(e.expression.name)||"apply"===bc(e.expression.name))&&e.arguments.length>=1&&110===e.arguments[0].kind}function $(e){return uP(e)&&57===e.operatorToken.kind&&110===e.right.kind&&z(e.left)}function q(e){return uP(e)&&56===e.operatorToken.kind&&uP(e.left)&&38===e.left.operatorToken.kind&&R(e.left.left)&&106===e.left.right.kind&&z(e.right)&&"apply"===bc(e.right.expression.name)}function V(e){return uP(e)&&57===e.operatorToken.kind&&110===e.right.kind&&q(e.left)}function U(e){return J(e)&&$(e.right)}function K(e){return z(e)||$(e)||U(e)||q(e)||V(e)||function(e){return J(e)&&V(e.right)}(e)}function W(e){if(B(e)){if(110===e.declarationList.declarations[0].initializer.kind)return}else if(J(e))return t.createPartiallyEmittedExpression(e.right,e);switch(e.kind){case 219:case 218:case 262:case 176:case 175:return e;case 177:case 178:case 174:case 172:{const n=e;return oE(n.name)?t.replacePropertyName(n,ZB(n.name,W,void 0)):e}}return ZB(e,W,void 0)}function H(e){if(z(e)&&2===e.arguments.length&&qD(e.arguments[1])&&"arguments"===bc(e.arguments[1]))return t.createLogicalAnd(t.createStrictInequality(at(),t.createNull()),e);switch(e.kind){case 219:case 218:case 262:case 176:case 175:return e;case 177:case 178:case 174:case 172:{const n=e;return oE(n.name)?t.replacePropertyName(n,ZB(n.name,H,void 0)):e}}return ZB(e,H,void 0)}function X(e){if(253===e.kind)return!0;if(245===e.kind){const t=e;if(t.elseStatement)return X(t.thenStatement)&&X(t.elseStatement)}else if(241===e.kind){const t=we(e.statements);if(t&&X(t))return!0}return!1}function Y(){return iw(t.createThis(),8)}function ee(e){return void 0!==e.initializer||Eu(e.name)}function te(e,t){if(!Q(t.parameters,ee))return!1;let n=!1;for(const r of t.parameters){const{name:t,initializer:i,dotDotDotToken:o}=r;o||(Eu(t)?n=ne(e,r,t,i)||n:i&&(re(e,r,t,i),n=!0))}return n}function ne(n,r,i,o){return i.elements.length>0?(Jd(n,iw(t.createVariableStatement(void 0,t.createVariableDeclarationList(sz(r,k,e,0,t.getGeneratedNameForNode(r)))),2097152)),!0):!!o&&(Jd(n,iw(t.createExpressionStatement(t.createAssignment(t.getGeneratedNameForNode(r),xn.checkDefined(qB(o,k,Xu)))),2097152)),!0)}function re(e,n,r,i){i=xn.checkDefined(qB(i,k,Xu));const o=t.createIfStatement(t.createTypeCheck(t.cloneNode(r),"undefined"),iw(sI(t.createBlock([t.createExpressionStatement(iw(sI(t.createAssignment(iw(OT(sI(t.cloneNode(r),r),r.parent),96),iw(i,3168|Yd(i))),n),3072))]),n),3905));hA(o),sI(o,n),iw(o,2101056),Jd(e,o)}function ie(n,r,i){const o=[],a=we(r.parameters);if(!function(e,t){return!(!e||!e.dotDotDotToken||t)}(a,i))return!1;const s=80===a.name.kind?OT(sI(t.cloneNode(a.name),a.name),a.name.parent):t.createTempVariable(void 0);iw(s,96);const c=80===a.name.kind?t.cloneNode(a.name):s,l=r.parameters.length-1,u=t.createLoopVariable();o.push(iw(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(s,void 0,void 0,t.createArrayLiteralExpression([]))])),a),2097152));const _=t.createForStatement(sI(t.createVariableDeclarationList([t.createVariableDeclaration(u,void 0,void 0,t.createNumericLiteral(l))]),a),sI(t.createLessThan(u,t.createPropertyAccessExpression(t.createIdentifier("arguments"),"length")),a),sI(t.createPostfixIncrement(u),a),t.createBlock([hA(sI(t.createExpressionStatement(t.createAssignment(t.createElementAccessExpression(c,0===l?u:t.createSubtract(u,t.createNumericLiteral(l))),t.createElementAccessExpression(t.createIdentifier("arguments"),u))),a))]));return iw(_,2097152),hA(_),o.push(_),80!==a.name.kind&&o.push(iw(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList(sz(a,k,e,0,c))),a),2097152)),Rd(n,o),!0}function oe(e,n){return!!(131072&p&&219!==n.kind)&&(ae(e,n,t.createThis()),!0)}function ae(n,r,i){0==(1&g)&&(g|=1,e.enableSubstitution(110),e.enableEmitNotification(176),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(219),e.enableEmitNotification(218),e.enableEmitNotification(262));const o=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(P(),void 0,void 0,i)]));iw(o,2100224),lw(o,r),Jd(n,o)}function ce(e,n){if(32768&p){let r;switch(n.kind){case 219:return e;case 174:case 177:case 178:r=t.createVoidZero();break;case 176:r=t.createPropertyAccessExpression(iw(t.createThis(),8),"constructor");break;case 262:case 218:r=t.createConditionalExpression(t.createLogicalAnd(iw(t.createThis(),8),t.createBinaryExpression(iw(t.createThis(),8),104,t.getLocalName(n))),void 0,t.createPropertyAccessExpression(iw(t.createThis(),8),"constructor"),void 0,t.createVoidZero());break;default:return xn.failBadSyntaxKind(n)}const i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createUniqueName("_newTarget",48),void 0,void 0,r)]));iw(i,2100224),Jd(e,i)}return e}function le(e){return sI(t.createEmptyStatement(),e)}function _e(n,r,i){const o=fw(r),a=cw(r),s=me(r,r,void 0,i),c=qB(r.name,k,au);let l;if(xn.assert(c),!VD(c)&&zS(e.getCompilerOptions())){const e=oE(c)?c.expression:qD(c)?t.createStringLiteral(vc(c.escapedText)):c;l=t.createObjectDefinePropertyCall(n,e,t.createPropertyDescriptor({value:s,enumerable:!1,writable:!0,configurable:!0}))}else{const e=UF(t,n,c,r.name);l=t.createAssignment(e,s)}iw(s,3072),lw(s,a);const u=sI(t.createExpressionStatement(l),r);return ew(u,r),mw(u,o),iw(u,96),u}function de(e,n,r){const i=t.createExpressionStatement(fe(e,n,r,!1));return iw(i,3072),lw(i,cw(n.firstAccessor)),i}function fe(e,{firstAccessor:n,getAccessor:r,setAccessor:i},o,a){const s=OT(sI(t.cloneNode(e),e),e.parent);iw(s,3136),lw(s,n.name);const c=qB(n.name,k,au);if(xn.assert(c),VD(c))return xn.failBadSyntaxKind(c,"Encountered unhandled private identifier while transforming ES2015.");const l=eA(t,c);iw(l,3104),lw(l,n.name);const u=[];if(r){const e=me(r,void 0,void 0,o);lw(e,cw(r)),iw(e,1024);const n=t.createPropertyAssignment("get",e);mw(n,fw(r)),u.push(n)}if(i){const e=me(i,void 0,void 0,o);lw(e,cw(i)),iw(e,1024);const n=t.createPropertyAssignment("set",e);mw(n,fw(i)),u.push(n)}u.push(t.createPropertyAssignment("enumerable",r||i?t.createFalse():t.createTrue()),t.createPropertyAssignment("configurable",t.createTrue()));const _=t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[s,l,t.createObjectLiteralExpression(u,!0)]);return a&&hA(_),_}function me(n,r,i,o){const a=m;m=void 0;const s=o&&gu(o)&&!Jv(n)?y(32670,73):y(32670,65),c=HB(n.parameters,k,e),l=ge(n);return 32768&p&&!i&&(262===n.kind||218===n.kind)&&(i=t.getGeneratedNameForNode(n)),v(s,229376,0),m=a,ew(sI(t.createFunctionExpression(void 0,n.asteriskToken,i,void 0,c,void 0,l),r),n)}function ge(e){let n,r,a=!1,s=!1;const c=[],l=[],u=e.body;let d;if(i(),DP(u)&&(d=t.copyStandardPrologue(u.statements,c,0,!1),d=t.copyCustomPrologue(u.statements,l,d,k,mf),d=t.copyCustomPrologue(u.statements,l,d,k,hf)),a=te(l,e)||a,a=ie(l,e,!1)||a,DP(u))d=t.copyCustomPrologue(u.statements,l,d,k),n=u.statements,pe(l,VB(u.statements,k,b_,d)),!a&&u.multiLine&&(a=!0);else{xn.assert(219===e.kind),n=Vb(u,-1);const i=e.equalsGreaterThanToken;ly(i)||ly(u)||(ex(i,u,_)?s=!0:a=!0);const o=qB(u,k,Xu),c=t.createReturnStatement(o);sI(c,u),Sw(c,u),iw(c,2880),l.push(c),r=u}if(t.mergeLexicalEnvironment(c,o()),ce(c,e),oe(c,e),Q(c)&&(a=!0),l.unshift(...c),DP(u)&&se(l,u.statements))return u;const p=t.createBlock(sI(t.createNodeArray(l),n),a);return sI(p,e.body),!a&&s&&iw(p,1),r&&_w(p,20,r),ew(p,e.body),p}function he(n,r){return hb(n)?iz(n,k,e,0,!r):28===n.operatorToken.kind?t.updateBinaryExpression(n,xn.checkDefined(qB(n.left,T,Xu)),n.operatorToken,xn.checkDefined(qB(n.right,r?T:k,Xu))):ZB(n,k,e)}function ye(n){return Eu(n.name)?ve(n):!n.initializer&&function(e){const t=c.hasNodeCheckFlag(e,16384),n=c.hasNodeCheckFlag(e,32768);return!(0!=(64&p)||t&&n&&0!=(512&p))&&0==(4096&p)&&(!c.isDeclarationWithCollidingName(e)||n&&!t&&0==(6144&p))}(n)?t.updateVariableDeclaration(n,n.name,void 0,void 0,t.createVoidZero()):ZB(n,k,e)}function ve(t){const n=y(32,0);let r;return r=Eu(t.name)?sz(t,k,e,0,void 0,0!=(32&n)):ZB(t,k,e),v(n,0,0),r}function be(e){m.labels.set(bc(e.label),!0)}function ke(e){m.labels.set(bc(e.label),!1)}function Ce(n,i,a,s,c){const l=y(n,i),u=function(n,i,a,s){if(!$e(n)){let r;m&&(r=m.allowedNonLabeledJumps,m.allowedNonLabeledJumps=6);const o=s?s(n,i,void 0,a):t.restoreEnclosingLabel(OP(n)?function(e){return t.updateForStatement(e,qB(e.initializer,T,s_),qB(e.condition,k,Xu),qB(e.incrementor,T,Xu),xn.checkDefined(qB(e.statement,k,b_,t.liftToBlock)))}(n):ZB(n,k,e),i,m&&ke);return m&&(m.allowedNonLabeledJumps=r),o}const c=function(e){let t;switch(e.kind){case 248:case 249:case 250:const n=e.initializer;n&&261===n.kind&&(t=n)}const n=[],r=[];if(t&&7&uc(t)){const i=Be(e)||Je(e)||ze(e);for(const o of t.declarations)Qe(e,o,n,r,i)}const i={loopParameters:n,loopOutParameters:r};return m&&(m.argumentsName&&(i.argumentsName=m.argumentsName),m.thisName&&(i.thisName=m.thisName),m.hoistedLocalVariables&&(i.hoistedLocalVariables=m.hoistedLocalVariables)),i}(n),l=[],u=m;m=c;const _=Be(n)?function(e,n){const r=t.createUniqueName("_loop_init"),i=0!=(1048576&e.initializer.transformFlags);let o=0;n.containsLexicalThis&&(o|=16),i&&4&p&&(o|=524288);const a=[];a.push(t.createVariableStatement(void 0,e.initializer)),He(n.loopOutParameters,2,1,a);return{functionName:r,containsYield:i,functionDeclaration:t.createVariableStatement(void 0,iw(t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,iw(t.createFunctionExpression(void 0,i?t.createToken(42):void 0,void 0,void 0,void 0,void 0,xn.checkDefined(qB(t.createBlock(a,!0),k,DP))),o))]),4194304)),part:t.createVariableDeclarationList(O(n.loopOutParameters,Ke))}}(n,c):void 0,d=qe(n)?function(e,n,i){const a=t.createUniqueName("_loop");r();const s=qB(e.statement,k,b_,t.liftToBlock),c=o(),l=[];(Je(e)||ze(e))&&(n.conditionVariable=t.createUniqueName("inc"),e.incrementor?l.push(t.createIfStatement(n.conditionVariable,t.createExpressionStatement(xn.checkDefined(qB(e.incrementor,k,Xu))),t.createExpressionStatement(t.createAssignment(n.conditionVariable,t.createTrue())))):l.push(t.createIfStatement(t.createLogicalNot(n.conditionVariable),t.createExpressionStatement(t.createAssignment(n.conditionVariable,t.createTrue())))),Je(e)&&l.push(t.createIfStatement(t.createPrefixUnaryExpression(54,xn.checkDefined(qB(e.condition,k,Xu))),xn.checkDefined(qB(t.createBreakStatement(),k,b_))))),xn.assert(s),DP(s)?pe(l,s.statements):l.push(s),He(n.loopOutParameters,1,1,l),jd(l,c);const u=t.createBlock(l,!0);DP(s)&&ew(u,s);const _=0!=(1048576&e.statement.transformFlags);let d=1048576;n.containsLexicalThis&&(d|=16),_&&0!=(4&p)&&(d|=524288);const f=t.createVariableStatement(void 0,iw(t.createVariableDeclarationList([t.createVariableDeclaration(a,void 0,void 0,iw(t.createFunctionExpression(void 0,_?t.createToken(42):void 0,void 0,void 0,n.loopParameters,void 0,u),d))]),4194304)),m=function(e,n,r,i){const o=[],a=!(-5&n.nonLocalJumps||n.labeledNonLocalBreaks||n.labeledNonLocalContinues),s=t.createCallExpression(e,void 0,O(n.loopParameters,(e=>e.name))),c=i?t.createYieldExpression(t.createToken(42),iw(s,8388608)):s;if(a)o.push(t.createExpressionStatement(c)),He(n.loopOutParameters,1,0,o);else{const e=t.createUniqueName("state"),i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(e,void 0,void 0,c)]));if(o.push(i),He(n.loopOutParameters,1,0,o),8&n.nonLocalJumps){let n;r?(r.nonLocalJumps|=8,n=t.createReturnStatement(e)):n=t.createReturnStatement(t.createPropertyAccessExpression(e,"value")),o.push(t.createIfStatement(t.createTypeCheck(e,"object"),n))}if(2&n.nonLocalJumps&&o.push(t.createIfStatement(t.createStrictEquality(e,t.createStringLiteral("break")),t.createBreakStatement())),n.labeledNonLocalBreaks||n.labeledNonLocalContinues){const i=[];Xe(n.labeledNonLocalBreaks,!0,e,r,i),Xe(n.labeledNonLocalContinues,!1,e,r,i),o.push(t.createSwitchStatement(e,t.createCaseBlock(i)))}}return o}(a,n,i,_);return{functionName:a,containsYield:_,functionDeclaration:f,part:m}}(n,c,u):void 0;let f;if(m=u,_&&l.push(_.functionDeclaration),d&&l.push(d.functionDeclaration),function(e,n,r){let i;if(n.argumentsName&&(r?r.argumentsName=n.argumentsName:(i||(i=[])).push(t.createVariableDeclaration(n.argumentsName,void 0,void 0,t.createIdentifier("arguments")))),n.thisName&&(r?r.thisName=n.thisName:(i||(i=[])).push(t.createVariableDeclaration(n.thisName,void 0,void 0,t.createIdentifier("this")))),n.hoistedLocalVariables)if(r)r.hoistedLocalVariables=n.hoistedLocalVariables;else{i||(i=[]);for(const e of n.hoistedLocalVariables)i.push(t.createVariableDeclaration(e))}if(n.loopOutParameters.length){i||(i=[]);for(const e of n.loopOutParameters)i.push(t.createVariableDeclaration(e.outParamName))}n.conditionVariable&&(i||(i=[]),i.push(t.createVariableDeclaration(n.conditionVariable,void 0,void 0,t.createFalse()))),i&&e.push(t.createVariableStatement(void 0,t.createVariableDeclarationList(i)))}(l,c,u),_&&l.push(function(e,n){const r=t.createCallExpression(e,void 0,[]),i=n?t.createYieldExpression(t.createToken(42),iw(r,8388608)):r;return t.createExpressionStatement(i)}(_.functionName,_.containsYield)),d)if(s)f=s(n,i,d.part,a);else{const e=Ue(n,_,t.createBlock(d.part,!0));f=t.restoreEnclosingLabel(e,i,m&&ke)}else{const e=Ue(n,_,xn.checkDefined(qB(n.statement,k,b_,t.liftToBlock)));f=t.restoreEnclosingLabel(e,i,m&&ke)}return l.push(f),l}(a,s,l,c);return v(l,0,0),u}function Pe(e,t){return Ce(0,1280,e,t)}function Fe(e,t){return Ce(5056,3328,e,t)}function Ae(e,t){return Ce(3008,5376,e,t)}function Ie(e,t){return Ce(3008,5376,e,t,s.downlevelIteration?je:Le)}function Oe(n,r,i){const o=[],a=n.initializer;if(WP(a)){7&n.initializer.flags&&ct();const i=Se(a.declarations);if(i&&Eu(i.name)){const a=sz(i,k,e,0,r),s=sI(t.createVariableDeclarationList(a),n.initializer);ew(s,n.initializer),lw(s,qb(a[0].pos,De(a).end)),o.push(t.createVariableStatement(void 0,s))}else o.push(sI(t.createVariableStatement(void 0,ew(sI(t.createVariableDeclarationList([t.createVariableDeclaration(i?i.name:t.createTempVariable(void 0),void 0,void 0,r)]),Ub(a,-1)),a)),Vb(a,-1)))}else{const e=t.createAssignment(a,r);hb(e)?o.push(t.createExpressionStatement(he(e,!0))):(NT(e,a.end),o.push(sI(t.createExpressionStatement(xn.checkDefined(qB(e,k,Xu))),Vb(a,-1))))}if(i)return Me(pe(o,i));{const e=qB(n.statement,k,b_,t.liftToBlock);return xn.assert(e),DP(e)?t.updateBlock(e,sI(t.createNodeArray(Z(o,e.statements)),e.statements)):(o.push(e),Me(o))}}function Me(e){return iw(t.createBlock(t.createNodeArray(e),!0),864)}function Le(e,n,r){const i=qB(e.expression,k,Xu);xn.assert(i);const o=t.createLoopVariable(),a=qD(i)?t.getGeneratedNameForNode(i):t.createTempVariable(void 0);iw(i,96|Yd(i));const s=sI(t.createForStatement(iw(sI(t.createVariableDeclarationList([sI(t.createVariableDeclaration(o,void 0,void 0,t.createNumericLiteral(0)),Ub(e.expression,-1)),sI(t.createVariableDeclaration(a,void 0,void 0,i),e.expression)]),e.expression),4194304),sI(t.createLessThan(o,t.createPropertyAccessExpression(a,"length")),e.expression),sI(t.createPostfixIncrement(o),e.expression),Oe(e,t.createElementAccessExpression(a,o),r)),e);return iw(s,512),sI(s,e),t.restoreEnclosingLabel(s,n,m&&ke)}function je(e,r,i,o){const s=qB(e.expression,k,Xu);xn.assert(s);const c=qD(s)?t.getGeneratedNameForNode(s):t.createTempVariable(void 0),l=qD(s)?t.getGeneratedNameForNode(c):t.createTempVariable(void 0),u=t.createUniqueName("e"),_=t.getGeneratedNameForNode(u),d=t.createTempVariable(void 0),p=sI(n().createValuesHelper(s),e.expression),f=t.createCallExpression(t.createPropertyAccessExpression(c,"next"),void 0,[]);a(u),a(d);const g=1024&o?t.inlineExpressions([t.createAssignment(u,t.createVoidZero()),p]):p,h=iw(sI(t.createForStatement(iw(sI(t.createVariableDeclarationList([sI(t.createVariableDeclaration(c,void 0,void 0,g),e.expression),t.createVariableDeclaration(l,void 0,void 0,f)]),e.expression),4194304),t.createLogicalNot(t.createPropertyAccessExpression(l,"done")),t.createAssignment(l,f),Oe(e,t.createPropertyAccessExpression(l,"value"),i)),e),512);return t.createTryStatement(t.createBlock([t.restoreEnclosingLabel(h,r,m&&ke)]),t.createCatchClause(t.createVariableDeclaration(_),iw(t.createBlock([t.createExpressionStatement(t.createAssignment(u,t.createObjectLiteralExpression([t.createPropertyAssignment("error",_)])))]),1)),t.createBlock([t.createTryStatement(t.createBlock([iw(t.createIfStatement(t.createLogicalAnd(t.createLogicalAnd(l,t.createLogicalNot(t.createPropertyAccessExpression(l,"done"))),t.createAssignment(d,t.createPropertyAccessExpression(c,"return"))),t.createExpressionStatement(t.createFunctionCallCall(d,c,[]))),1)]),void 0,iw(t.createBlock([iw(t.createIfStatement(u,t.createThrowStatement(t.createPropertyAccessExpression(u,"error"))),1)]),1))]))}function Re(e){return c.hasNodeCheckFlag(e,8192)}function Be(e){return OP(e)&&!!e.initializer&&Re(e.initializer)}function Je(e){return OP(e)&&!!e.condition&&Re(e.condition)}function ze(e){return OP(e)&&!!e.incrementor&&Re(e.incrementor)}function $e(e){return qe(e)||Be(e)}function qe(e){return c.hasNodeCheckFlag(e,4096)}function Ve(e,t){e.hoistedLocalVariables||(e.hoistedLocalVariables=[]),function t(n){if(80===n.kind)e.hoistedLocalVariables.push(n);else for(const e of n.elements)gP(e)||t(e.name)}(t.name)}function Ue(e,n,r){switch(e.kind){case 248:return function(e,n,r){const i=e.condition&&Re(e.condition),o=i||e.incrementor&&Re(e.incrementor);return t.updateForStatement(e,qB(n?n.part:e.initializer,T,s_),qB(i?void 0:e.condition,k,Xu),qB(o?void 0:e.incrementor,T,Xu),r)}(e,n,r);case 249:return function(e,n){return t.updateForInStatement(e,xn.checkDefined(qB(e.initializer,k,s_)),xn.checkDefined(qB(e.expression,k,Xu)),n)}(e,r);case 250:return function(e,n){return t.updateForOfStatement(e,void 0,xn.checkDefined(qB(e.initializer,k,s_)),xn.checkDefined(qB(e.expression,k,Xu)),n)}(e,r);case 246:return function(e,n){return t.updateDoStatement(e,n,xn.checkDefined(qB(e.expression,k,Xu)))}(e,r);case 247:return function(e,n){return t.updateWhileStatement(e,xn.checkDefined(qB(e.expression,k,Xu)),n)}(e,r);default:return xn.failBadSyntaxKind(e,"IterationStatement expected")}}function Ke(e){return t.createVariableDeclaration(e.originalName,void 0,void 0,e.outParamName)}function We(e,n){const r=0===n?e.outParamName:e.originalName,i=0===n?e.originalName:e.outParamName;return t.createBinaryExpression(i,64,r)}function He(e,n,r,i){for(const o of e)o.flags&n&&i.push(t.createExpressionStatement(We(o,r)))}function Ge(e,t,n,r){t?(e.labeledNonLocalBreaks||(e.labeledNonLocalBreaks=new Map),e.labeledNonLocalBreaks.set(n,r)):(e.labeledNonLocalContinues||(e.labeledNonLocalContinues=new Map),e.labeledNonLocalContinues.set(n,r))}function Xe(e,n,r,i,o){e&&e.forEach(((e,a)=>{const s=[];if(!i||i.labels&&i.labels.get(a)){const e=t.createIdentifier(a);s.push(n?t.createBreakStatement(e):t.createContinueStatement(e))}else Ge(i,n,a,e),s.push(t.createReturnStatement(r));o.push(t.createCaseClause(t.createStringLiteral(e),s))}))}function Qe(e,n,r,i,o){const a=n.name;if(Eu(a))for(const t of a.elements)gP(t)||Qe(e,t,r,i,o);else{r.push(t.createParameterDeclaration(void 0,void 0,a));const s=c.hasNodeCheckFlag(n,65536);if(s||o){const r=t.createUniqueName("out_"+bc(a));let o=0;s&&(o|=1),OP(e)&&(e.initializer&&c.isBindingCapturedByNode(e.initializer,n)&&(o|=2),(e.condition&&c.isBindingCapturedByNode(e.condition,n)||e.incrementor&&c.isBindingCapturedByNode(e.incrementor,n))&&(o|=1)),i.push({flags:o,originalName:a,outParamName:r})}}}function Ye(e,n,r){const i=t.createAssignment(UF(t,n,xn.checkDefined(qB(e.name,k,au))),xn.checkDefined(qB(e.initializer,k,Xu)));return sI(i,e),r&&hA(i),i}function Ze(e,n,r){const i=t.createAssignment(UF(t,n,xn.checkDefined(qB(e.name,k,au))),t.cloneNode(e.name));return sI(i,e),r&&hA(i),i}function et(e,n,r,i){const o=t.createAssignment(UF(t,n,xn.checkDefined(qB(e.name,k,au))),me(e,e,void 0,r));return sI(o,e),i&&hA(o),o}function tt(e,r,i,o){const a=e.length,c=j(G(e,nt,((e,t,n,r)=>t(e,i,o&&r===a))));if(1===c.length){const e=c[0];if(r&&!s.downlevelIteration||RT(e.expression)||kD(e.expression,"___spreadArray"))return e.expression}const l=n(),u=0!==c[0].kind;let _=u?t.createArrayLiteralExpression():c[0].expression;for(let e=u?0:1;e0?t.inlineExpressions(O(i,G)):void 0,qB(n.condition,R,Xu),qB(n.incrementor,R,Xu),QB(n.statement,R,e))}else n=ZB(n,R,e);return m&&ce(),n}(r);case 249:return function(n){m&&ae();const r=n.initializer;if(WP(r)){for(const e of r.declarations)a(e.name);n=t.updateForInStatement(n,r.declarations[0].name,xn.checkDefined(qB(n.expression,R,Xu)),xn.checkDefined(qB(n.statement,R,b_,t.liftToBlock)))}else n=ZB(n,R,e);return m&&ce(),n}(r);case 252:return function(t){if(m){const e=me(t.label&&bc(t.label));if(e>0)return ve(e,t)}return ZB(t,R,e)}(r);case 251:return function(t){if(m){const e=ge(t.label&&bc(t.label));if(e>0)return ve(e,t)}return ZB(t,R,e)}(r);case 253:return function(e){return function(e,n){return sI(t.createReturnStatement(t.createArrayLiteralExpression(e?[ye(2),e]:[ye(2)])),n)}(qB(e.expression,R,Xu),e)}(r);default:return 1048576&r.transformFlags?function(r){switch(r.kind){case 226:return function(n){const r=dy(n);switch(r){case 0:return function(n){return X(n.right)?sb(n.operatorToken.kind)?function(e){const t=ee(),n=Z();return Se(n,xn.checkDefined(qB(e.left,R,Xu)),e.left),56===e.operatorToken.kind?Ce(t,n,e.left):Te(t,n,e.left),Se(n,xn.checkDefined(qB(e.right,R,Xu)),e.right),te(t),n}(n):28===n.operatorToken.kind?q(n):t.updateBinaryExpression(n,Y(xn.checkDefined(qB(n.left,R,Xu))),n.operatorToken,xn.checkDefined(qB(n.right,R,Xu))):ZB(n,R,e)}(n);case 1:return function(n){const{left:r,right:i}=n;if(X(i)){let e;switch(r.kind){case 211:e=t.updatePropertyAccessExpression(r,Y(xn.checkDefined(qB(r.expression,R,Vu))),r.name);break;case 212:e=t.updateElementAccessExpression(r,Y(xn.checkDefined(qB(r.expression,R,Vu))),Y(xn.checkDefined(qB(r.argumentExpression,R,Xu))));break;default:e=xn.checkDefined(qB(r,R,Xu))}const o=n.operatorToken.kind;return LJ(o)?sI(t.createAssignment(e,sI(t.createBinaryExpression(Y(e),jJ(o),xn.checkDefined(qB(i,R,Xu))),n)),n):t.updateBinaryExpression(n,e,n.operatorToken,xn.checkDefined(qB(i,R,Xu)))}return ZB(n,R,e)}(n);default:return xn.assertNever(r)}}(r);case 355:return function(e){let n=[];for(const r of e.elements)uP(r)&&28===r.operatorToken.kind?n.push(q(r)):(X(r)&&n.length>0&&(De(1,[t.createExpressionStatement(t.inlineExpressions(n))]),n=[]),n.push(xn.checkDefined(qB(r,R,Xu))));return t.inlineExpressions(n)}(r);case 227:return function(t){if(X(t.whenTrue)||X(t.whenFalse)){const e=ee(),n=ee(),r=Z();return Ce(e,xn.checkDefined(qB(t.condition,R,Xu)),t.condition),Se(r,xn.checkDefined(qB(t.whenTrue,R,Xu)),t.whenTrue),ke(n),te(e),Se(r,xn.checkDefined(qB(t.whenFalse,R,Xu)),t.whenFalse),te(n),r}return ZB(t,R,e)}(r);case 229:return function(e){const r=ee(),i=qB(e.expression,R,Xu);return e.asteriskToken?function(e,t){De(7,[e],t)}(0==(8388608&Yd(e.expression))?sI(n().createValuesHelper(i),e):i,e):function(e,t){De(6,[e],t)}(i,e),te(r),function(e){return sI(t.createCallExpression(t.createPropertyAccessExpression(C,"sent"),void 0,[]),e)}(e)}(r);case 209:return function(e){return V(e.elements,void 0,void 0,e.multiLine)}(r);case 210:return function(e){const n=e.properties,r=e.multiLine,i=Q(n),o=Z();Se(o,t.createObjectLiteralExpression(VB(n,R,Cu,0,i),r));const a=Oe(n,(function(n,i){X(i)&&n.length>0&&(xe(t.createExpressionStatement(t.inlineExpressions(n))),n=[]);const a=qB(tA(t,e,i,o),R,Xu);return a&&(r&&hA(a),n.push(a)),n}),[],i);return a.push(r?hA(OT(sI(t.cloneNode(o),o),o.parent)):o),t.inlineExpressions(a)}(r);case 212:return function(n){return X(n.argumentExpression)?t.updateElementAccessExpression(n,Y(xn.checkDefined(qB(n.expression,R,Vu))),xn.checkDefined(qB(n.argumentExpression,R,Xu))):ZB(n,R,e)}(r);case 213:return function(n){if(!uf(n)&&f(n.arguments,X)){const{target:e,thisArg:r}=t.createCallBinding(n.expression,a,c,!0);return ew(sI(t.createFunctionApplyCall(Y(xn.checkDefined(qB(e,R,Vu))),r,V(n.arguments)),n),n)}return ZB(n,R,e)}(r);case 214:return function(n){if(f(n.arguments,X)){const{target:e,thisArg:r}=t.createCallBinding(t.createPropertyAccessExpression(n.expression,"bind"),a);return ew(sI(t.createNewExpression(t.createFunctionApplyCall(Y(xn.checkDefined(qB(e,R,Xu))),r,V(n.arguments,t.createVoidZero())),void 0,[]),n),n)}return ZB(n,R,e)}(r);default:return ZB(r,R,e)}}(r):4196352&r.transformFlags?ZB(r,R,e):r}}function J(n){if(n.asteriskToken)n=ew(sI(t.createFunctionDeclaration(n.modifiers,void 0,n.name,void 0,HB(n.parameters,R,e),void 0,$(n.body)),n),n);else{const t=p,r=m;p=!1,m=!1,n=ZB(n,R,e),p=t,m=r}return p?void o(n):n}function z(n){if(n.asteriskToken)n=ew(sI(t.createFunctionExpression(void 0,void 0,n.name,void 0,HB(n.parameters,R,e),void 0,$(n.body)),n),n);else{const t=p,r=m;p=!1,m=!1,n=ZB(n,R,e),p=t,m=r}return n}function $(e){const o=[],a=p,s=m,c=g,l=h,u=y,_=v,d=b,f=x,O=M,B=S,J=k,z=T,$=C;p=!0,m=!1,g=void 0,h=void 0,y=void 0,v=void 0,b=void 0,x=void 0,M=1,S=void 0,k=void 0,T=void 0,C=t.createTempVariable(void 0),r();const q=t.copyPrologue(e.statements,o,!1,R);U(e.statements,q);const V=function(){L=0,j=0,w=void 0,D=!1,E=!1,P=void 0,N=void 0,F=void 0,A=void 0,I=void 0;const e=function(){if(S){for(let e=0;e0)),1048576))}();return jd(o,i()),o.push(t.createReturnStatement(V)),p=a,m=s,g=c,h=l,y=u,v=_,b=d,x=f,M=O,S=B,k=J,T=z,C=$,sI(t.createBlock(o,e.multiLine),e)}function q(e){let n=[];return r(e.left),r(e.right),t.inlineExpressions(n);function r(e){uP(e)&&28===e.operatorToken.kind?(r(e.left),r(e.right)):(X(e)&&n.length>0&&(De(1,[t.createExpressionStatement(t.inlineExpressions(n))]),n=[]),n.push(xn.checkDefined(qB(e,R,Xu))))}}function V(e,n,r,i){const o=Q(e);let a;if(o>0){a=Z();const r=VB(e,R,Xu,0,o);Se(a,t.createArrayLiteralExpression(n?[n,...r]:r)),n=void 0}const s=Oe(e,(function(e,r){if(X(r)&&e.length>0){const r=void 0!==a;a||(a=Z()),Se(a,r?t.createArrayConcatCall(a,[t.createArrayLiteralExpression(e,i)]):t.createArrayLiteralExpression(n?[n,...e]:e,i)),n=void 0,e=[]}return e.push(xn.checkDefined(qB(r,R,Xu))),e}),[],o);return a?t.createArrayConcatCall(a,[t.createArrayLiteralExpression(s,i)]):sI(t.createArrayLiteralExpression(n?[n,...s]:s,i),r)}function U(e,t=0){const n=e.length;for(let r=t;r0?ke(t,e):xe(e)}(n);case 252:return function(e){const t=me(e.label?bc(e.label):void 0);t>0?ke(t,e):xe(e)}(n);case 253:return function(e){!function(e,t){De(8,[e],t)}(qB(e.expression,R,Xu),e)}(n);case 254:return function(e){X(e)?(function(e){const t=ee(),n=ee();te(t),ne({kind:1,expression:e,startLabel:t,endLabel:n})}(Y(xn.checkDefined(qB(e.expression,R,Xu)))),K(e.statement),xn.assert(1===oe()),te(re().endLabel)):xe(qB(e,R,b_))}(n);case 255:return function(e){if(X(e.caseBlock)){const n=e.caseBlock,r=n.clauses.length,i=function(){const e=ee();return ne({kind:2,isScript:!1,breakLabel:e}),e}(),o=Y(xn.checkDefined(qB(e.expression,R,Xu))),a=[];let s=-1;for(let e=0;e0)break;l.push(t.createCaseClause(xn.checkDefined(qB(r.expression,R,Xu)),[ve(a[i],r.expression)]))}else e++}l.length&&(xe(t.createSwitchStatement(o,t.createCaseBlock(l))),c+=l.length,l=[]),e>0&&(c+=e,e=0)}ke(s>=0?a[s]:i);for(let e=0;e0)break;o.push(G(t))}o.length&&(xe(t.createExpressionStatement(t.inlineExpressions(o))),i+=o.length,o=[])}}function G(e){return lw(t.createAssignment(lw(t.cloneNode(e.name),e.name),xn.checkDefined(qB(e.initializer,R,Xu))),e)}function X(e){return!!e&&0!=(1048576&e.transformFlags)}function Q(e){const t=e.length;for(let n=0;n=0;n--){const t=v[n];if(!de(t))break;if(t.labelText===e)return!0}return!1}function me(e){if(v)if(e)for(let t=v.length-1;t>=0;t--){const n=v[t];if(de(n)&&n.labelText===e)return n.breakLabel;if(_e(n)&&fe(e,t-1))return n.breakLabel}else for(let e=v.length-1;e>=0;e--){const t=v[e];if(_e(t))return t.breakLabel}return 0}function ge(e){if(v)if(e)for(let t=v.length-1;t>=0;t--){const n=v[t];if(pe(n)&&fe(e,t-1))return n.continueLabel}else for(let e=v.length-1;e>=0;e--){const t=v[e];if(pe(t))return t.continueLabel}return 0}function he(e){if(void 0!==e&&e>0){void 0===x&&(x=[]);const n=t.createNumericLiteral(Number.MAX_SAFE_INTEGER);return void 0===x[e]?x[e]=[n]:x[e].push(n),n}return t.createOmittedExpression()}function ye(e){const n=t.createNumericLiteral(e);return xw(n,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(e)),n}function ve(e,n){return xn.assertLessThan(0,e,"Invalid label"),sI(t.createReturnStatement(t.createArrayLiteralExpression([ye(3),he(e)])),n)}function be(){De(0)}function xe(e){e?De(1,[e]):be()}function Se(e,t,n){De(2,[e,t],n)}function ke(e,t){De(3,[e],t)}function Te(e,t,n){De(4,[e,t],n)}function Ce(e,t,n){De(5,[e,t],n)}function De(e,t,n){void 0===S&&(S=[],k=[],T=[]),void 0===b&&te(ee());const r=S.length;S[r]=e,k[r]=t,T[r]=n}function Ee(e){(function(e){if(!E)return!0;if(!b||!x)return!1;for(let t=0;t=0;e--){const n=I[e];N=[t.createWithStatement(n.expression,t.createBlock(N))]}if(A){const{startLabel:e,catchLabel:n,finallyLabel:r,endLabel:i}=A;N.unshift(t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createPropertyAccessExpression(C,"trys"),"push"),void 0,[t.createArrayLiteralExpression([he(e),he(n),he(r),he(i)])]))),A=void 0}e&&N.push(t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(C,"label"),t.createNumericLiteral(j+1))))}P.push(t.createCaseClause(t.createNumericLiteral(j),N||[])),N=void 0}function Ne(e){if(b)for(let t=0;tt.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.createIdentifier(bc(n))),e)),t.createVoidZero())))}for(const e of h.exportedFunctions)V(o,e);ue(o,qB(h.externalHelpersImportDeclaration,E,b_)),pe(o,VB(n.statements,E,b_,c)),D(o,!1),jd(o,i());const l=t.updateSourceFile(n,sI(t.createNodeArray(o),n.statements));return ww(l,e.readEmitHelpers()),l}function S(n){const r=t.createIdentifier("define"),i=TA(t,n,c,a),o=ef(n)&&n,{aliasedModuleNames:s,unaliasedModuleNames:l,importAliasNames:_}=T(n,!0),d=t.updateSourceFile(n,sI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(r,void 0,[...i?[i]:[],t.createArrayLiteralExpression(o?u:[t.createStringLiteral("require"),t.createStringLiteral("exports"),...s,...l]),o?o.statements.length?o.statements[0].expression:t.createObjectLiteralExpression():t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"require"),t.createParameterDeclaration(void 0,void 0,"exports"),..._],void 0,w(n))]))]),n.statements));return ww(d,e.readEmitHelpers()),d}function k(n){const{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:o}=T(n,!1),s=TA(t,n,c,a),l=t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"factory")],void 0,sI(t.createBlock([t.createIfStatement(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("module"),"object"),t.createTypeCheck(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),"object")),t.createBlock([t.createVariableStatement(void 0,[t.createVariableDeclaration("v",void 0,void 0,t.createCallExpression(t.createIdentifier("factory"),void 0,[t.createIdentifier("require"),t.createIdentifier("exports")]))]),iw(t.createIfStatement(t.createStrictInequality(t.createIdentifier("v"),t.createIdentifier("undefined")),t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),t.createIdentifier("v")))),1)]),t.createIfStatement(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("define"),"function"),t.createPropertyAccessExpression(t.createIdentifier("define"),"amd")),t.createBlock([t.createExpressionStatement(t.createCallExpression(t.createIdentifier("define"),void 0,[...s?[s]:[],t.createArrayLiteralExpression([t.createStringLiteral("require"),t.createStringLiteral("exports"),...r,...i]),t.createIdentifier("factory")]))])))],!0),void 0)),u=t.updateSourceFile(n,sI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(l,void 0,[t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"require"),t.createParameterDeclaration(void 0,void 0,"exports"),...o],void 0,w(n))]))]),n.statements));return ww(u,e.readEmitHelpers()),u}function T(e,n){const r=[],i=[],o=[];for(const n of e.amdDependencies)n.name?(r.push(t.createStringLiteral(n.path)),o.push(t.createParameterDeclaration(void 0,void 0,n.name))):i.push(t.createStringLiteral(n.path));for(const e of h.externalImports){const l=kA(t,e,g,c,s,a),u=SA(t,e,g);l&&(n&&u?(iw(u,8),r.push(l),o.push(t.createParameterDeclaration(void 0,void 0,u))):i.push(l))}return{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:o}}function C(e){if(rN(e)||gN(e)||!kA(t,e,g,c,s,a))return;const n=SA(t,e,g),r=j(e,n);return r!==n?t.createExpressionStatement(t.createAssignment(n,r)):void 0}function w(e){r();const n=[],o=t.copyPrologue(e.statements,n,!0,E);b()&&ue(n,W()),Q(h.exportedNames)&&ue(n,t.createExpressionStatement(Oe(h.exportedNames,((e,n)=>t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.createIdentifier(bc(n))),e)),t.createVoidZero())));for(const e of h.exportedFunctions)V(n,e);ue(n,qB(h.externalHelpersImportDeclaration,E,b_)),2===_&&pe(n,q(h.externalImports,C)),pe(n,VB(e.statements,E,b_,o)),D(n,!0),jd(n,i());const a=t.createBlock(n,!0);return v&&Cw(a,t$),a}function D(e,n){if(h.exportEquals){const r=qB(h.exportEquals.expression,F,Xu);if(r)if(n){const n=t.createReturnStatement(r);sI(n,h.exportEquals),iw(n,3840),e.push(n)}else{const n=t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),r));sI(n,h.exportEquals),iw(n,3072),e.push(n)}}}function E(e){switch(e.kind){case 272:return function(e){let n;const r=wg(e);if(2!==_){if(!e.importClause)return ew(sI(t.createExpressionStatement(R(e)),e),e);{const i=[];r&&!Dg(e)?i.push(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,j(e,R(e)))):(i.push(t.createVariableDeclaration(t.getGeneratedNameForNode(e),void 0,void 0,j(e,R(e)))),r&&Dg(e)&&i.push(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,t.getGeneratedNameForNode(e)))),n=ue(n,ew(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList(i,l>=2?2:0)),e),e))}}else r&&Dg(e)&&(n=ue(n,t.createVariableStatement(void 0,t.createVariableDeclarationList([ew(sI(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,t.getGeneratedNameForNode(e)),e),e)],l>=2?2:0))));return n=function(e,t){if(h.exportEquals)return e;const n=t.importClause;if(!n)return e;const r=new AJ;n.name&&(e=U(e,r,n));const i=n.namedBindings;if(i)switch(i.kind){case 274:e=U(e,r,i);break;case 275:for(const t of i.elements)e=U(e,r,t,!0)}return e}(n,e),Ne(n)}(e);case 271:return function(e){let n;return xn.assert(Em(e),"import= for internal module references should be handled in an earlier transformer."),2!==_?n=Bv(e,32)?ue(n,ew(sI(t.createExpressionStatement(G(e.name,R(e))),e),e)):ue(n,ew(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.cloneNode(e.name),void 0,void 0,R(e))],l>=2?2:0)),e),e)):Bv(e,32)&&(n=ue(n,ew(sI(t.createExpressionStatement(G(t.getExportName(e),t.getLocalName(e))),e),e))),n=function(e,t){return h.exportEquals?e:U(e,new AJ,t)}(n,e),Ne(n)}(e);case 278:return function(e){if(!e.moduleSpecifier)return;const r=t.getGeneratedNameForNode(e);if(e.exportClause&&hN(e.exportClause)){const i=[];2!==_&&i.push(ew(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,R(e))])),e),e));for(const o of e.exportClause.elements){const s=!(!FS(a)||2&Zd(e)||"default"!==bc(o.propertyName||o.name)),c=t.createPropertyAccessExpression(s?n().createImportDefaultHelper(r):r,o.propertyName||o.name);i.push(ew(sI(t.createExpressionStatement(G(t.getExportName(o),c,void 0,!0)),o),o))}return Ne(i)}if(e.exportClause){const i=[];return i.push(ew(sI(t.createExpressionStatement(G(t.cloneNode(e.exportClause.name),function(e,t){return!FS(a)||2&Zd(e)?t:wJ(e)?n().createImportStarHelper(t):t}(e,2!==_?R(e):Wd(e)?r:t.createIdentifier(bc(e.exportClause.name))))),e),e)),Ne(i)}return ew(sI(t.createExpressionStatement(n().createExportStarHelper(2!==_?R(e):r)),e),e)}(e);case 277:return function(e){if(!e.isExportEquals)return H(t.createIdentifier("default"),qB(e.expression,F,Xu),e,!0)}(e);default:return P(e)}}function P(n){switch(n.kind){case 243:return function(n){let r,i,o;if(Bv(n,32)){let e,a=!1;for(const r of n.declarationList.declarations)if(qD(r.name)&&iA(r.name))e||(e=VB(n.modifiers,X,iu)),i=r.initializer?ue(i,t.updateVariableDeclaration(r,r.name,void 0,void 0,G(r.name,qB(r.initializer,F,Xu)))):ue(i,r);else if(r.initializer)if(!Eu(r.name)&&(rP(r.initializer)||nP(r.initializer)||mP(r.initializer))){const e=t.createAssignment(sI(t.createPropertyAccessExpression(t.createIdentifier("exports"),r.name),r.name),t.createIdentifier(Hh(r.name)));i=ue(i,t.createVariableDeclaration(r.name,r.exclamationToken,r.type,qB(r.initializer,F,Xu))),o=ue(o,e),a=!0}else o=ue(o,J(r));if(i&&(r=ue(r,t.updateVariableStatement(n,e,t.updateVariableDeclarationList(n.declarationList,i)))),o){const e=ew(sI(t.createExpressionStatement(t.inlineExpressions(o)),n),n);a&&rw(e),r=ue(r,e)}}else r=ue(r,ZB(n,F,e));return r=function(e,t){return z(e,t.declarationList,!1)}(r,n),Ne(r)}(n);case 262:return function(n){let r;return r=Bv(n,32)?ue(r,ew(sI(t.createFunctionDeclaration(VB(n.modifiers,X,iu),n.asteriskToken,t.getDeclarationName(n,!0,!0),void 0,VB(n.parameters,F,sE),void 0,ZB(n.body,F,e)),n),n)):ue(r,ZB(n,F,e)),Ne(r)}(n);case 263:return function(n){let r;return r=Bv(n,32)?ue(r,ew(sI(t.createClassDeclaration(VB(n.modifiers,X,Su),t.getDeclarationName(n,!0,!0),void 0,VB(n.heritageClauses,F,jN),VB(n.members,F,mu)),n),n)):ue(r,ZB(n,F,e)),r=V(r,n),Ne(r)}(n);case 248:return O(n,!0);case 249:return function(n){if(WP(n.initializer)&&!(7&n.initializer.flags)){const r=z(void 0,n.initializer,!0);if(Q(r)){const i=qB(n.initializer,A,s_),o=qB(n.expression,F,Xu),a=QB(n.statement,P,e),s=DP(a)?t.updateBlock(a,[...r,...a.statements]):t.createBlock([...r,a],!0);return t.updateForInStatement(n,i,o,s)}}return t.updateForInStatement(n,qB(n.initializer,A,s_),qB(n.expression,F,Xu),QB(n.statement,P,e))}(n);case 250:return function(n){if(WP(n.initializer)&&!(7&n.initializer.flags)){const r=z(void 0,n.initializer,!0),i=qB(n.initializer,A,s_),o=qB(n.expression,F,Xu);let a=QB(n.statement,P,e);return Q(r)&&(a=DP(a)?t.updateBlock(a,[...r,...a.statements]):t.createBlock([...r,a],!0)),t.updateForOfStatement(n,n.awaitModifier,i,o,a)}return t.updateForOfStatement(n,n.awaitModifier,qB(n.initializer,A,s_),qB(n.expression,F,Xu),QB(n.statement,P,e))}(n);case 246:return function(n){return t.updateDoStatement(n,QB(n.statement,P,e),qB(n.expression,F,Xu))}(n);case 247:return function(n){return t.updateWhileStatement(n,qB(n.expression,F,Xu),QB(n.statement,P,e))}(n);case 256:return function(e){return t.updateLabeledStatement(e,e.label,xn.checkDefined(qB(e.statement,P,b_,t.liftToBlock)))}(n);case 254:return function(e){return t.updateWithStatement(e,qB(e.expression,F,Xu),xn.checkDefined(qB(e.statement,P,b_,t.liftToBlock)))}(n);case 245:return function(e){return t.updateIfStatement(e,qB(e.expression,F,Xu),xn.checkDefined(qB(e.thenStatement,P,b_,t.liftToBlock)),qB(e.elseStatement,P,b_,t.liftToBlock))}(n);case 255:return function(e){return t.updateSwitchStatement(e,qB(e.expression,F,Xu),xn.checkDefined(qB(e.caseBlock,P,tN)))}(n);case 269:return function(e){return t.updateCaseBlock(e,VB(e.clauses,P,E_))}(n);case 296:return function(e){return t.updateCaseClause(e,qB(e.expression,F,Xu),VB(e.statements,P,b_))}(n);case 297:case 258:case 241:return function(t){return ZB(t,P,e)}(n);case 299:return function(e){return t.updateCatchClause(e,e.variableDeclaration,xn.checkDefined(qB(e.block,P,DP)))}(n);default:return F(n)}}function N(n,r){if(!(276828160&n.transformFlags))return n;switch(n.kind){case 248:return O(n,!1);case 244:return function(e){return t.updateExpressionStatement(e,qB(e.expression,A,Xu))}(n);case 217:return function(e,n){return t.updateParenthesizedExpression(e,qB(e.expression,n?A:F,Xu))}(n,r);case 354:return function(e,n){return t.updatePartiallyEmittedExpression(e,qB(e.expression,n?A:F,Xu))}(n,r);case 213:if(uf(n)&&void 0===g.impliedNodeFormat)return function(n){if(0===_&&l>=7)return ZB(n,F,e);const r=kA(t,n,g,c,s,a),i=qB(Se(n.arguments),F,Xu),u=!r||i&&wD(i)&&i.text===r.text?i:r,d=!!(16384&n.transformFlags);switch(a.module){case 2:return M(u,d);case 3:return function(e,n){if(v=!0,OJ(e)){const r=Xl(e)?e:wD(e)?t.createStringLiteralFromNode(e):iw(sI(t.cloneNode(e),e),3072);return t.createConditionalExpression(t.createIdentifier("__syncRequire"),void 0,L(e),void 0,M(r,n))}{const r=t.createTempVariable(o);return t.createComma(t.createAssignment(r,e),t.createConditionalExpression(t.createIdentifier("__syncRequire"),void 0,L(r,!0),void 0,M(r,n)))}}(u??t.createVoidZero(),d);default:return L(u)}}(n);break;case 226:if(hb(n))return function(t,n){return I(t.left)?iz(t,F,e,0,!n,B):ZB(t,F,e)}(n,r);break;case 224:case 225:return function(n,r){if((46===n.operator||47===n.operator)&&qD(n.operand)&&!Xl(n.operand)&&!iA(n.operand)&&!cx(n.operand)){const e=Z(n.operand);if(e){let i,a=qB(n.operand,F,Xu);cP(n)?a=t.updatePrefixUnaryExpression(n,a):(a=t.updatePostfixUnaryExpression(n,a),r||(i=t.createTempVariable(o),a=t.createAssignment(i,a),sI(a,n)),a=t.createComma(a,t.cloneNode(n.operand)),sI(a,n));for(const t of e)y[IB(a)]=!0,a=G(t,a),sI(a,n);return i&&(y[IB(a)]=!0,a=t.createComma(a,i),sI(a,n)),a}}return ZB(n,F,e)}(n,r)}return ZB(n,F,e)}function F(e){return N(e,!1)}function A(e){return N(e,!0)}function I(e){if(HE(e))for(const t of e.properties)switch(t.kind){case 303:if(I(t.initializer))return!0;break;case 304:if(I(t.name))return!0;break;case 305:if(I(t.expression))return!0;break;case 174:case 177:case 178:return!1;default:xn.assertNever(t,"Unhandled object member kind")}else if(WE(e)){for(const t of e.elements)if(fP(t)){if(I(t.expression))return!0}else if(I(t))return!0}else if(qD(e))return p(Z(e))>(oA(e)?1:0);return!1}function O(n,r){if(r&&n.initializer&&WP(n.initializer)&&!(7&n.initializer.flags)){const i=z(void 0,n.initializer,!1);if(i){const o=[],a=qB(n.initializer,A,WP),s=t.createVariableStatement(void 0,a);o.push(s),pe(o,i);const c=qB(n.condition,F,Xu),l=qB(n.incrementor,A,Xu),u=QB(n.statement,r?P:F,e);return o.push(t.updateForStatement(n,void 0,c,l,u)),o}}return t.updateForStatement(n,qB(n.initializer,A,s_),qB(n.condition,F,Xu),qB(n.incrementor,A,Xu),QB(n.statement,r?P:F,e))}function M(e,r){const i=t.createUniqueName("resolve"),o=t.createUniqueName("reject"),s=[t.createParameterDeclaration(void 0,void 0,i),t.createParameterDeclaration(void 0,void 0,o)],c=t.createBlock([t.createExpressionStatement(t.createCallExpression(t.createIdentifier("require"),void 0,[t.createArrayLiteralExpression([e||t.createOmittedExpression()]),i,o]))]);let u;l>=2?u=t.createArrowFunction(void 0,void 0,s,void 0,void 0,c):(u=t.createFunctionExpression(void 0,void 0,void 0,void 0,s,void 0,c),r&&iw(u,16));const _=t.createNewExpression(t.createIdentifier("Promise"),void 0,[u]);return FS(a)?t.createCallExpression(t.createPropertyAccessExpression(_,t.createIdentifier("then")),void 0,[n().createImportStarCallbackHelper()]):_}function L(e,r){const i=e&&!MJ(e)&&!r,o=t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Promise"),"resolve"),void 0,i?l>=2?[t.createTemplateExpression(t.createTemplateHead(""),[t.createTemplateSpan(e,t.createTemplateTail(""))])]:[t.createCallExpression(t.createPropertyAccessExpression(t.createStringLiteral(""),"concat"),void 0,[e])]:[]);let s=t.createCallExpression(t.createIdentifier("require"),void 0,i?[t.createIdentifier("s")]:e?[e]:[]);FS(a)&&(s=n().createImportStarHelper(s));const c=i?[t.createParameterDeclaration(void 0,void 0,"s")]:[];let u;return u=l>=2?t.createArrowFunction(void 0,void 0,c,void 0,void 0,s):t.createFunctionExpression(void 0,void 0,void 0,void 0,c,void 0,t.createBlock([t.createReturnStatement(s)])),t.createCallExpression(t.createPropertyAccessExpression(o,"then"),void 0,[u])}function j(e,t){return!FS(a)||2&Zd(e)?t:DJ(e)?n().createImportStarHelper(t):EJ(e)?n().createImportDefaultHelper(t):t}function R(e){const n=kA(t,e,g,c,s,a),r=[];return n&&r.push(n),t.createCallExpression(t.createIdentifier("require"),void 0,r)}function B(e,n,r){const i=Z(e);if(i){let o=oA(e)?n:t.createAssignment(e,n);for(const e of i)iw(o,8),o=G(e,o,r);return o}return t.createAssignment(e,n)}function J(n){return Eu(n.name)?iz(qB(n,F,ux),F,e,0,!1,B):t.createAssignment(sI(t.createPropertyAccessExpression(t.createIdentifier("exports"),n.name),n.name),n.initializer?qB(n.initializer,F,Xu):t.createVoidZero())}function z(e,t,n){if(h.exportEquals)return e;for(const r of t.declarations)e=$(e,r,n);return e}function $(e,t,n){if(h.exportEquals)return e;if(Eu(t.name))for(const r of t.name.elements)gP(r)||(e=$(e,r,n));else Xl(t.name)||KP(t)&&!t.initializer&&!n||(e=U(e,new AJ,t));return e}function V(e,n){if(h.exportEquals)return e;const r=new AJ;return Bv(n,32)&&(e=K(e,r,Bv(n,2048)?t.createIdentifier("default"):t.getDeclarationName(n),t.getLocalName(n),n)),n.name&&(e=U(e,r,n)),e}function U(e,n,r,i){const o=t.getDeclarationName(r),a=h.exportSpecifiers.get(o);if(a)for(const t of a)e=K(e,n,t.name,o,t.name,void 0,i);return e}function K(e,t,n,r,i,o,a){return t.has(n)||(t.set(n,!0),e=ue(e,H(n,r,i,o,a))),e}function W(){const e=t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[t.createIdentifier("exports"),t.createStringLiteral("__esModule"),t.createObjectLiteralExpression([t.createPropertyAssignment("value",t.createTrue())])]));return iw(e,2097152),e}function H(e,n,r,i,o){const a=sI(t.createExpressionStatement(G(e,n,void 0,o)),r);return hA(a),i||iw(a,3072),a}function G(e,n,r,i){return sI(i?t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[t.createIdentifier("exports"),t.createStringLiteralFromNode(e),t.createObjectLiteralExpression([t.createPropertyAssignment("enumerable",t.createTrue()),t.createPropertyAssignment("get",t.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,t.createBlock([t.createReturnStatement(n)])))])]):t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)),n),r)}function X(e){switch(e.kind){case 95:case 90:return}return e}function Y(e){var n,r;if(8192&Yd(e)){const n=yA(g);return n?t.createPropertyAccessExpression(n,e):e}if((!Xl(e)||64&e.emitNode.autoGenerate.flags)&&!iA(e)){const i=s.getReferencedExportContainer(e,oA(e));if(i&&307===i.kind)return sI(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)),e);const o=s.getReferencedImportDeclaration(e);if(o){if(oN(o))return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(o.parent),t.createIdentifier("default")),e);if(fN(o)){const i=o.propertyName||o.name;return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=o.parent)?void 0:n.parent)?void 0:r.parent)||o),t.cloneNode(i)),e)}}}return e}function Z(e){if(Xl(e)){if(Yl(e)){const t=null==h?void 0:h.exportSpecifiers.get(e);if(t){const e=[];for(const n of t)e.push(n.name);return e}}}else{const t=s.getReferencedImportDeclaration(e);if(t)return null==h?void 0:h.exportedBindings[SJ(t)];const n=new Set,r=s.getReferencedValueDeclarations(e);if(r){for(const e of r){const t=null==h?void 0:h.exportedBindings[SJ(e)];if(t)for(const e of t)n.add(e)}if(n.size)return $e(n)}}}}var t$={name:"typescript:dynamicimport-sync-require",scoped:!0,text:'\n var __syncRequire = typeof module === "object" && typeof module.exports === "object";'};function n$(e){const{factory:t,startLexicalEnvironment:n,endLexicalEnvironment:r,hoistVariableDeclaration:i}=e,o=e.getCompilerOptions(),a=e.getEmitResolver(),s=e.getEmitHost(),c=e.onSubstituteNode,l=e.onEmitNode;e.onSubstituteNode=function(e,n){return function(e){return x&&e.id&&x[e.id]}(n=c(e,n))?n:1===e?function(e){switch(e.kind){case 80:return function(e){var n,r;if(8192&Yd(e)){const n=yA(m);return n?t.createPropertyAccessExpression(n,e):e}if(!Xl(e)&&!iA(e)){const i=a.getReferencedImportDeclaration(e);if(i){if(oN(i))return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(i.parent),t.createIdentifier("default")),e);if(fN(i))return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=i.parent)?void 0:n.parent)?void 0:r.parent)||i),t.cloneNode(i.propertyName||i.name)),e)}}return e}(e);case 226:return function(e){if(db(e.operatorToken.kind)&&qD(e.left)&&(!Xl(e.left)||Yl(e.left))&&!iA(e.left)){const t=K(e.left);if(t){let n=e;for(const e of t)n=j(e,W(n));return n}}return e}(e);case 236:return function(e){return _f(e)?t.createPropertyAccessExpression(y,t.createIdentifier("meta")):e}(e)}return e}(n):4===e?function(e){return 304===e.kind?function(e){var n,r;const i=e.name;if(!Xl(i)&&!iA(i)){const o=a.getReferencedImportDeclaration(i);if(o){if(oN(o))return sI(t.createPropertyAssignment(t.cloneNode(i),t.createPropertyAccessExpression(t.getGeneratedNameForNode(o.parent),t.createIdentifier("default"))),e);if(fN(o))return sI(t.createPropertyAssignment(t.cloneNode(i),t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=o.parent)?void 0:n.parent)?void 0:r.parent)||o),t.cloneNode(o.propertyName||o.name))),e)}}return e}(e):e}(n):n},e.onEmitNode=function(e,t,n){if(307===t.kind){const r=SJ(t);m=t,g=u[r],h=_[r],x=d[r],y=p[r],x&&delete d[r],l(e,t,n),m=void 0,g=void 0,h=void 0,y=void 0,x=void 0}else l(e,t,n)},e.enableSubstitution(80),e.enableSubstitution(304),e.enableSubstitution(226),e.enableSubstitution(236),e.enableEmitNotification(307);const u=[],_=[],d=[],p=[];let m,g,h,y,v,b,x;return CJ(e,(function(i){if(i.isDeclarationFile||!(hp(i,o)||8388608&i.transformFlags))return i;const c=SJ(i);m=i,b=i,g=u[c]=PJ(e,i),h=t.createUniqueName("exports"),_[c]=h,y=p[c]=t.createUniqueName("context");const l=function(e){const n=new Map,r=[];for(const i of e){const e=kA(t,i,m,s,a,o);if(e){const t=e.text,o=n.get(t);void 0!==o?r[o].externalImports.push(i):(n.set(t,r.length),r.push({name:e,externalImports:[i]}))}}return r}(g.externalImports),f=function(e,i){const a=[];n();const s=WS(o,"alwaysStrict")||qI(m),c=t.copyPrologue(e.statements,a,s,T);a.push(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration("__moduleName",void 0,void 0,t.createLogicalAnd(y,t.createPropertyAccessExpression(y,"id")))]))),qB(g.externalHelpersImportDeclaration,T,b_);const l=VB(e.statements,T,b_,c);pe(a,v),jd(a,r());const u=function(e){if(!g.hasExportStarsToExportValues)return;if(!Q(g.exportedNames)&&0===g.exportedFunctions.size&&0===g.exportSpecifiers.size){let t=!1;for(const e of g.externalImports)if(278===e.kind&&e.exportClause){t=!0;break}if(!t){const t=S(void 0);return e.push(t),t.name}}const n=[];if(g.exportedNames)for(const e of g.exportedNames)"default"!==e.escapedText&&n.push(t.createPropertyAssignment(t.createStringLiteralFromNode(e),t.createTrue()));for(const e of g.exportedFunctions)Bv(e,2048)||(xn.assert(!!e.name),n.push(t.createPropertyAssignment(t.createStringLiteralFromNode(e.name),t.createTrue())));const r=t.createUniqueName("exportedNames");e.push(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,t.createObjectLiteralExpression(n,!0))])));const i=S(r);return e.push(i),i.name}(a),_=2097152&e.transformFlags?t.createModifiersFromModifierFlags(1024):void 0,d=t.createObjectLiteralExpression([t.createPropertyAssignment("setters",k(u,i)),t.createPropertyAssignment("execute",t.createFunctionExpression(_,void 0,void 0,void 0,[],void 0,t.createBlock(l,!0)))],!0);return a.push(t.createReturnStatement(d)),t.createBlock(a,!0)}(i,l),C=t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,h),t.createParameterDeclaration(void 0,void 0,y)],void 0,f),w=TA(t,i,s,o),D=t.createArrayLiteralExpression(O(l,(e=>e.name))),E=iw(t.updateSourceFile(i,sI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("System"),"register"),void 0,w?[w,D,C]:[D,C]))]),i.statements)),2048);return o.outFile||Pw(E,f,(e=>!e.scoped)),x&&(d[c]=x,x=void 0),m=void 0,g=void 0,h=void 0,y=void 0,v=void 0,b=void 0,E}));function S(e){const n=t.createUniqueName("exportStar"),r=t.createIdentifier("m"),i=t.createIdentifier("n"),o=t.createIdentifier("exports");let a=t.createStrictInequality(i,t.createStringLiteral("default"));return e&&(a=t.createLogicalAnd(a,t.createLogicalNot(t.createCallExpression(t.createPropertyAccessExpression(e,"hasOwnProperty"),void 0,[i])))),t.createFunctionDeclaration(void 0,void 0,n,void 0,[t.createParameterDeclaration(void 0,void 0,r)],void 0,t.createBlock([t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(o,void 0,void 0,t.createObjectLiteralExpression([]))])),t.createForInStatement(t.createVariableDeclarationList([t.createVariableDeclaration(i)]),r,t.createBlock([iw(t.createIfStatement(a,t.createExpressionStatement(t.createAssignment(t.createElementAccessExpression(o,i),t.createElementAccessExpression(r,i)))),1)])),t.createExpressionStatement(t.createCallExpression(h,void 0,[o]))],!0))}function k(e,n){const r=[];for(const i of n){const n=f(i.externalImports,(e=>SA(t,e,m))),o=n?t.getGeneratedNameForNode(n):t.createUniqueName(""),a=[];for(const n of i.externalImports){const r=SA(t,n,m);switch(n.kind){case 272:if(!n.importClause)break;case 271:xn.assert(void 0!==r),a.push(t.createExpressionStatement(t.createAssignment(r,o))),Bv(n,32)&&a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createStringLiteral(bc(r)),o])));break;case 278:if(xn.assert(void 0!==r),n.exportClause)if(hN(n.exportClause)){const e=[];for(const r of n.exportClause.elements)e.push(t.createPropertyAssignment(t.createStringLiteral(bc(r.name)),t.createElementAccessExpression(o,t.createStringLiteral(bc(r.propertyName||r.name)))));a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createObjectLiteralExpression(e,!0)])))}else a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createStringLiteral(bc(n.exportClause.name)),o])));else a.push(t.createExpressionStatement(t.createCallExpression(e,void 0,[o])))}}r.push(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,o)],void 0,t.createBlock(a,!0)))}return t.createArrayLiteralExpression(r,!0)}function T(e){switch(e.kind){case 272:return function(e){return e.importClause&&i(SA(t,e,m)),Ne(function(e,t){if(g.exportEquals)return e;const n=t.importClause;if(!n)return e;n.name&&(e=I(e,n));const r=n.namedBindings;if(r)switch(r.kind){case 274:e=I(e,r);break;case 275:for(const t of r.elements)e=I(e,t)}return e}(undefined,e))}(e);case 271:return function(e){return xn.assert(Em(e),"import= for internal module references should be handled in an earlier transformer."),i(SA(t,e,m)),Ne(function(e,t){return g.exportEquals?e:I(e,t)}(undefined,e))}(e);case 278:return function(e){xn.assertIsDefined(e)}(e);case 277:return function(e){if(e.isExportEquals)return;const n=qB(e.expression,$,Xu);return L(t.createIdentifier("default"),n,!0)}(e);default:return R(e)}}function C(e){if(Eu(e.name))for(const t of e.name.elements)gP(t)||C(t);else i(t.cloneNode(e.name))}function w(e){return 0==(4194304&Yd(e))&&(307===b.kind||0==(7&fc(e).flags))}function D(t,n){const r=n?E:P;return Eu(t.name)?iz(t,$,e,0,!1,r):t.initializer?r(t.name,qB(t.initializer,$,Xu)):t.name}function E(e,t,n){return N(e,t,n,!0)}function P(e,t,n){return N(e,t,n,!1)}function N(e,n,r,o){return i(t.cloneNode(e)),o?j(e,W(sI(t.createAssignment(e,n),r))):W(sI(t.createAssignment(e,n),r))}function F(e,n,r){if(g.exportEquals)return e;if(Eu(n.name))for(const t of n.name.elements)gP(t)||(e=F(e,t,r));else if(!Xl(n.name)){let i;r&&(e=M(e,n.name,t.getLocalName(n)),i=bc(n.name)),e=I(e,n,i)}return e}function A(e,n){if(g.exportEquals)return e;let r;if(Bv(n,32)){const i=Bv(n,2048)?t.createStringLiteral("default"):n.name;e=M(e,i,t.getLocalName(n)),r=Hh(i)}return n.name&&(e=I(e,n,r)),e}function I(e,n,r){if(g.exportEquals)return e;const i=t.getDeclarationName(n),o=g.exportSpecifiers.get(i);if(o)for(const t of o)t.name.escapedText!==r&&(e=M(e,t.name,i));return e}function M(e,t,n,r){return ue(e,L(t,n,r))}function L(e,n,r){const i=t.createExpressionStatement(j(e,n));return hA(i),r||iw(i,3072),i}function j(e,n){const r=qD(e)?t.createStringLiteralFromNode(e):e;return iw(n,3072|Yd(n)),mw(t.createCallExpression(h,void 0,[r,n]),n)}function R(n){switch(n.kind){case 243:return function(e){if(!w(e.declarationList))return qB(e,$,b_);let n;if(of(e.declarationList)||rf(e.declarationList)){const r=VB(e.modifiers,U,Su),i=[];for(const n of e.declarationList.declarations)i.push(t.updateVariableDeclaration(n,t.getGeneratedNameForNode(n.name),void 0,void 0,D(n,!1)));const o=t.updateVariableDeclarationList(e.declarationList,i);n=ue(n,t.updateVariableStatement(e,r,o))}else{let r;const i=Bv(e,32);for(const t of e.declarationList.declarations)t.initializer?r=ue(r,D(t,i)):C(t);r&&(n=ue(n,sI(t.createExpressionStatement(t.inlineExpressions(r)),e)))}return n=function(e,t,n){if(g.exportEquals)return e;for(const n of t.declarationList.declarations)n.initializer&&(e=F(e,n,!1));return e}(n,e),Ne(n)}(n);case 262:return function(n){v=Bv(n,32)?ue(v,t.updateFunctionDeclaration(n,VB(n.modifiers,U,Su),n.asteriskToken,t.getDeclarationName(n,!0,!0),void 0,VB(n.parameters,$,sE),void 0,qB(n.body,$,DP))):ue(v,ZB(n,$,e)),v=A(v,n)}(n);case 263:return function(e){let n;const r=t.getLocalName(e);return i(r),n=ue(n,sI(t.createExpressionStatement(t.createAssignment(r,sI(t.createClassExpression(VB(e.modifiers,U,Su),e.name,void 0,VB(e.heritageClauses,$,jN),VB(e.members,$,mu)),e))),e)),n=A(n,e),Ne(n)}(n);case 248:return B(n,!0);case 249:return function(n){const r=b;return b=n,n=t.updateForInStatement(n,J(n.initializer),qB(n.expression,$,Xu),QB(n.statement,R,e)),b=r,n}(n);case 250:return function(n){const r=b;return b=n,n=t.updateForOfStatement(n,n.awaitModifier,J(n.initializer),qB(n.expression,$,Xu),QB(n.statement,R,e)),b=r,n}(n);case 246:return function(n){return t.updateDoStatement(n,QB(n.statement,R,e),qB(n.expression,$,Xu))}(n);case 247:return function(n){return t.updateWhileStatement(n,qB(n.expression,$,Xu),QB(n.statement,R,e))}(n);case 256:return function(e){return t.updateLabeledStatement(e,e.label,xn.checkDefined(qB(e.statement,R,b_,t.liftToBlock)))}(n);case 254:return function(e){return t.updateWithStatement(e,qB(e.expression,$,Xu),xn.checkDefined(qB(e.statement,R,b_,t.liftToBlock)))}(n);case 245:return function(e){return t.updateIfStatement(e,qB(e.expression,$,Xu),xn.checkDefined(qB(e.thenStatement,R,b_,t.liftToBlock)),qB(e.elseStatement,R,b_,t.liftToBlock))}(n);case 255:return function(e){return t.updateSwitchStatement(e,qB(e.expression,$,Xu),xn.checkDefined(qB(e.caseBlock,R,tN)))}(n);case 269:return function(e){const n=b;return b=e,e=t.updateCaseBlock(e,VB(e.clauses,R,E_)),b=n,e}(n);case 296:return function(e){return t.updateCaseClause(e,qB(e.expression,$,Xu),VB(e.statements,R,b_))}(n);case 297:case 258:return function(t){return ZB(t,R,e)}(n);case 299:return function(e){const n=b;return b=e,e=t.updateCatchClause(e,e.variableDeclaration,xn.checkDefined(qB(e.block,R,DP))),b=n,e}(n);case 241:return function(t){const n=b;return b=t,t=ZB(t,R,e),b=n,t}(n);default:return $(n)}}function B(n,r){const i=b;return b=n,n=t.updateForStatement(n,qB(n.initializer,r?J:q,s_),qB(n.condition,$,Xu),qB(n.incrementor,q,Xu),QB(n.statement,r?R:$,e)),b=i,n}function J(e){if(function(e){return WP(e)&&w(e)}(e)){let n;for(const t of e.declarations)n=ue(n,D(t,!1)),t.initializer||C(t);return n?t.inlineExpressions(n):t.createOmittedExpression()}return qB(e,q,s_)}function z(n,r){if(!(276828160&n.transformFlags))return n;switch(n.kind){case 248:return B(n,!1);case 244:return function(e){return t.updateExpressionStatement(e,qB(e.expression,q,Xu))}(n);case 217:return function(e,n){return t.updateParenthesizedExpression(e,qB(e.expression,n?q:$,Xu))}(n,r);case 354:return function(e,n){return t.updatePartiallyEmittedExpression(e,qB(e.expression,n?q:$,Xu))}(n,r);case 226:if(hb(n))return function(t,n){return V(t.left)?iz(t,$,e,0,!n):ZB(t,$,e)}(n,r);break;case 213:if(uf(n))return function(e){const n=kA(t,e,m,s,a,o),r=qB(Se(e.arguments),$,Xu),i=!n||r&&wD(r)&&r.text===n.text?r:n;return t.createCallExpression(t.createPropertyAccessExpression(y,t.createIdentifier("import")),void 0,i?[i]:[])}(n);break;case 224:case 225:return function(n,r){if((46===n.operator||47===n.operator)&&qD(n.operand)&&!Xl(n.operand)&&!iA(n.operand)&&!cx(n.operand)){const e=K(n.operand);if(e){let o,a=qB(n.operand,$,Xu);cP(n)?a=t.updatePrefixUnaryExpression(n,a):(a=t.updatePostfixUnaryExpression(n,a),r||(o=t.createTempVariable(i),a=t.createAssignment(o,a),sI(a,n)),a=t.createComma(a,t.cloneNode(n.operand)),sI(a,n));for(const t of e)a=j(t,W(a));return o&&(a=t.createComma(a,o),sI(a,n)),a}}return ZB(n,$,e)}(n,r)}return ZB(n,$,e)}function $(e){return z(e,!1)}function q(e){return z(e,!0)}function V(e){if(mb(e,!0))return V(e.left);if(fP(e))return V(e.expression);if(HE(e))return Q(e.properties,V);if(WE(e))return Q(e.elements,V);if(JN(e))return V(e.name);if(BN(e))return V(e.initializer);if(qD(e)){const t=a.getReferencedExportContainer(e);return void 0!==t&&307===t.kind}return!1}function U(e){switch(e.kind){case 95:case 90:return}return e}function K(e){let n;const r=function(e){if(!Xl(e)){const t=a.getReferencedImportDeclaration(e);if(t)return t;const n=a.getReferencedValueDeclaration(e);if(n&&(null==g?void 0:g.exportedBindings[SJ(n)]))return n;const r=a.getReferencedValueDeclarations(e);if(r)for(const e of r)if(e!==n&&(null==g?void 0:g.exportedBindings[SJ(e)]))return e;return n}}(e);if(r){const i=a.getReferencedExportContainer(e,!1);i&&307===i.kind&&(n=ue(n,t.getDeclarationName(r))),n=pe(n,null==g?void 0:g.exportedBindings[SJ(r)])}else if(Xl(e)&&Yl(e)){const t=null==g?void 0:g.exportSpecifiers.get(e);if(t){const e=[];for(const n of t)e.push(n.name);return e}}return n}function W(e){return void 0===x&&(x=[]),x[IB(e)]=!0,e}}function r$(e){const{factory:t,getEmitHelperFactory:n}=e,r=e.getEmitHost(),i=e.getEmitResolver(),o=e.getCompilerOptions(),a=wS(o),s=e.onEmitNode,c=e.onSubstituteNode;let l,u,_;return e.onEmitNode=function(e,t,n){qN(t)?((qI(t)||NS(o))&&o.importHelpers&&(l=new Map),s(e,t,n),l=void 0):s(e,t,n)},e.onSubstituteNode=function(e,n){return n=c(e,n),l&&qD(n)&&8192&Yd(n)?function(e){const n=bc(e);let r=l.get(n);return r||l.set(n,r=t.createUniqueName(n,48)),r}(n):n},e.enableEmitNotification(307),e.enableSubstitution(80),CJ(e,(function(r){if(r.isDeclarationFile)return r;if(qI(r)||NS(o)){u=r,_=void 0;let i=function(r){const i=bA(t,n(),r,o);if(i){const e=[],n=t.copyPrologue(r.statements,e);return ue(e,i),pe(e,VB(r.statements,d,b_,n)),t.updateSourceFile(r,sI(t.createNodeArray(e),r.statements))}return ZB(r,d,e)}(r);return u=void 0,_&&(i=t.updateSourceFile(i,sI(t.createNodeArray(Rd(i.statements.slice(),_)),i.statements))),!qI(r)||200===DS(o)||Q(i.statements,r_)?i:t.updateSourceFile(i,sI(t.createNodeArray([...i.statements,VF(t)]),i.statements))}return r}));function d(e){switch(e.kind){case 271:return DS(o)>=100?function(e){let n;return xn.assert(Em(e),"import= for internal module references should be handled in an earlier transformer."),n=ue(n,ew(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.cloneNode(e.name),void 0,void 0,p(e))],a>=2?2:0)),e),e)),n=function(e,n){return Bv(n,32)&&(e=ue(e,t.createExportDeclaration(void 0,n.isTypeOnly,t.createNamedExports([t.createExportSpecifier(!1,void 0,bc(n.name))])))),e}(n,e),Ne(n)}(e):void 0;case 277:return function(e){return e.isExportEquals?200===DS(o)?ew(t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),e.expression)),e):void 0:e}(e);case 278:return function(e){if(void 0!==o.module&&o.module>5)return e;if(!e.exportClause||!dN(e.exportClause)||!e.moduleSpecifier)return e;const n=e.exportClause.name,r=t.getGeneratedNameForNode(n),i=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamespaceImport(r)),e.moduleSpecifier,e.attributes);ew(i,e.exportClause);const a=Wd(e)?t.createExportDefault(r):t.createExportDeclaration(void 0,!1,t.createNamedExports([t.createExportSpecifier(!1,r,n)]));return ew(a,e),[i,a]}(e)}return e}function p(e){const n=kA(t,e,xn.checkDefined(u),r,i,o),s=[];if(n&&s.push(n),200===DS(o))return t.createCallExpression(t.createIdentifier("require"),void 0,s);if(!_){const e=t.createUniqueName("_createRequire",48),n=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamedImports([t.createImportSpecifier(!1,t.createIdentifier("createRequire"),e)])),t.createStringLiteral("module"),void 0),r=t.createUniqueName("__require",48),i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,t.createCallExpression(t.cloneNode(e),void 0,[t.createPropertyAccessExpression(t.createMetaProperty(102,t.createIdentifier("meta")),t.createIdentifier("url"))]))],a>=2?2:0));_=[n,i]}const c=_[1].declarationList.declarations[0].name;return xn.assertNode(c,qD),t.createCallExpression(t.cloneNode(c),void 0,s)}}function i$(e){const t=e.onSubstituteNode,n=e.onEmitNode,r=r$(e),i=e.onSubstituteNode,o=e.onEmitNode;e.onSubstituteNode=t,e.onEmitNode=n;const a=e$(e),s=e.onSubstituteNode,c=e.onEmitNode;let l;return e.onSubstituteNode=function(e,n){return qN(n)?(l=n,t(e,n)):l?99===l.impliedNodeFormat?i(e,n):s(e,n):t(e,n)},e.onEmitNode=function(e,t,r){return qN(t)&&(l=t),l?99===l.impliedNodeFormat?o(e,t,r):c(e,t,r):n(e,t,r)},e.enableSubstitution(307),e.enableEmitNotification(307),function(t){return 307===t.kind?u(t):function(t){return e.factory.createBundle(O(t.sourceFiles,u))}(t)};function u(e){if(e.isDeclarationFile)return e;l=e;const t=(99===e.impliedNodeFormat?r:a)(e);return l=void 0,xn.assert(qN(t)),t}}function o$(e){return KP(e)||uE(e)||lE(e)||KE(e)||A_(e)||I_(e)||yE(e)||hE(e)||dE(e)||_E(e)||HP(e)||sE(e)||aE(e)||hP(e)||rN(e)||QP(e)||fE(e)||vE(e)||GE(e)||XE(e)||uP(e)||Fg(e)}function a$(e){return A_(e)||I_(e)?function(t){const n=function(t){return Jv(e)?t.errorModuleName?2===t.accessibility?va.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind?t.errorModuleName?2===t.accessibility?va.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Property_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:_E(e)||dE(e)?function(t){const n=function(t){return Jv(e)?t.errorModuleName?2===t.accessibility?va.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind?t.errorModuleName?2===t.accessibility?va.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_method_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Method_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:s$(e)}function s$(e){return KP(e)||uE(e)||lE(e)||GE(e)||XE(e)||uP(e)||KE(e)||fE(e)?t:A_(e)||I_(e)?function(t){let n;return n=178===e.kind?Jv(e)?t.errorModuleName?va.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:Jv(e)?t.errorModuleName?2===t.accessibility?va.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?2===t.accessibility?va.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1,{diagnosticMessage:n,errorNode:e.name,typeName:e.name}}:yE(e)||hE(e)||dE(e)||_E(e)||HP(e)||vE(e)?function(t){let n;switch(e.kind){case 180:n=t.errorModuleName?va.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 179:n=t.errorModuleName?va.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 181:n=t.errorModuleName?va.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 174:case 173:n=Jv(e)?t.errorModuleName?2===t.accessibility?va.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:va.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:263===e.parent.kind?t.errorModuleName?2===t.accessibility?va.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:va.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t.errorModuleName?va.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 262:n=t.errorModuleName?2===t.accessibility?va.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:va.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return xn.fail("This is unknown kind for signature: "+e.kind)}return{diagnosticMessage:n,errorNode:e.name||e}}:sE(e)?rc(e,e.parent)&&Bv(e.parent,2)?t:function(t){const n=function(t){switch(e.parent.kind){case 176:return t.errorModuleName?2===t.accessibility?va.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 180:case 185:return t.errorModuleName?va.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 179:return t.errorModuleName?va.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 181:return t.errorModuleName?va.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 174:case 173:return Jv(e.parent)?t.errorModuleName?2===t.accessibility?va.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:263===e.parent.parent.kind?t.errorModuleName?2===t.accessibility?va.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 262:case 184:return t.errorModuleName?2===t.accessibility?va.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_exported_function_has_or_is_using_private_name_1;case 178:case 177:return t.errorModuleName?2===t.accessibility?va.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_accessor_has_or_is_using_private_name_1;default:return xn.fail(`Unknown parent for parameter: ${xn.formatSyntaxKind(e.parent.kind)}`)}}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:aE(e)?function(){let t;switch(e.parent.kind){case 263:t=va.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 264:t=va.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 200:t=va.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 185:case 180:t=va.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 179:t=va.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 174:case 173:t=Jv(e.parent)?va.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:263===e.parent.parent.kind?va.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:va.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 184:case 262:t=va.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 195:t=va.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;break;case 265:t=va.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return xn.fail("This is unknown parent for type parameter: "+e.parent.kind)}return{diagnosticMessage:t,errorNode:e,typeName:e.name}}:hP(e)?function(){let t;return t=GP(e.parent.parent)?jN(e.parent)&&119===e.parent.token?va.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.parent.parent.name?va.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:va.extends_clause_of_exported_class_has_or_is_using_private_name_0:va.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1,{diagnosticMessage:t,errorNode:e,typeName:Pc(e.parent.parent)}}:rN(e)?function(){return{diagnosticMessage:va.Import_declaration_0_is_using_private_name_1,errorNode:e,typeName:e.name}}:QP(e)||Fg(e)?function(t){return{diagnosticMessage:t.errorModuleName?va.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:va.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:Fg(e)?xn.checkDefined(e.typeExpression):e.type,typeName:Fg(e)?Pc(e):e.name}}:xn.assertNever(e,`Attempted to set a declaration diagnostic context for unhandled node kind: ${xn.formatSyntaxKind(e.kind)}`);function t(t){const n=function(t){return 260===e.kind||208===e.kind?t.errorModuleName?2===t.accessibility?va.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:va.Exported_variable_0_has_or_is_using_private_name_1:172===e.kind||211===e.kind||212===e.kind||226===e.kind||171===e.kind||169===e.kind&&Bv(e.parent,2)?Jv(e)?t.errorModuleName?2===t.accessibility?va.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind||169===e.kind?t.errorModuleName?2===t.accessibility?va.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}}function c$(e){const t={219:va.Add_a_return_type_to_the_function_expression,218:va.Add_a_return_type_to_the_function_expression,174:va.Add_a_return_type_to_the_method,177:va.Add_a_return_type_to_the_get_accessor_declaration,178:va.Add_a_type_to_parameter_of_the_set_accessor_declaration,262:va.Add_a_return_type_to_the_function_declaration,180:va.Add_a_return_type_to_the_function_declaration,169:va.Add_a_type_annotation_to_the_parameter_0,260:va.Add_a_type_annotation_to_the_variable_0,172:va.Add_a_type_annotation_to_the_property_0,171:va.Add_a_type_annotation_to_the_property_0,277:va.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it},n={218:va.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,262:va.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,219:va.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,174:va.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,180:va.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,177:va.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,178:va.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,169:va.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations,260:va.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations,172:va.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,171:va.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,167:va.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations,305:va.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations,304:va.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations,209:va.Only_const_arrays_can_be_inferred_with_isolatedDeclarations,277:va.Default_exports_can_t_be_inferred_with_isolatedDeclarations,230:va.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations};return function(r){if(mc(r,jN))return Rp(r,va.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations);if((wf(r)||TE(r.parent))&&(ou(r)||vb(r)))return function(e){const t=Rp(e,va.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations,Gd(e,!1));return o(e,t),t}(r);switch(xn.type(r),r.kind){case 177:case 178:return i(r);case 167:case 304:case 305:return function(e){const t=Rp(e,n[e.kind]);return o(e,t),t}(r);case 209:case 230:return function(e){const t=Rp(e,n[e.kind]);return o(e,t),t}(r);case 174:case 180:case 218:case 219:case 262:return function(e){const r=Rp(e,n[e.kind]);return o(e,r),fT(r,Rp(e,t[e.kind])),r}(r);case 208:return function(e){return Rp(e,va.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations)}(r);case 172:case 260:return function(e){const r=Rp(e,n[e.kind]),i=Gd(e.name,!1);return fT(r,Rp(e,t[e.kind],i)),r}(r);case 169:return function(r){if(A_(r.parent))return i(r.parent);const o=e.requiresAddingImplicitUndefined(r);if(!o&&r.initializer)return a(r.initializer);const s=Rp(r,o?va.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations:n[r.kind]),c=Gd(r.name,!1);return fT(s,Rp(r,t[r.kind],c)),s}(r);case 303:return a(r.initializer);case 231:return function(e){return a(e,va.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations)}(r);default:return a(r)}};function r(e){const t=mc(e,(e=>mN(e)||b_(e)||KP(e)||uE(e)||sE(e)));if(t)return mN(t)?t:BP(t)?mc(t,(e=>uu(e)&&!fE(e))):b_(t)?void 0:t}function i(e){const{getAccessor:r,setAccessor:i}=Sv(e.symbol.declarations,e),o=Rp((A_(e)?e.parameters[0]:e)??e,n[e.kind]);return i&&fT(o,Rp(i,t[i.kind])),r&&fT(o,Rp(r,t[r.kind])),o}function o(e,n){const i=r(e);if(i){const e=mN(i)||!i.name?"":Gd(i.name,!1);fT(n,Rp(i,t[i.kind],e))}return n}function a(e,i){const o=r(e);let a;if(o){const r=mN(o)||!o.name?"":Gd(o.name,!1);o===mc(e.parent,(e=>mN(e)||(b_(e)?"quit":!tP(e)&&!eP(e)&&!yP(e))))?(a=Rp(e,i??n[o.kind]),fT(a,Rp(o,t[o.kind],r))):(a=Rp(e,i??va.Expression_type_can_t_be_inferred_with_isolatedDeclarations),fT(a,Rp(o,t[o.kind],r)),fT(a,Rp(e,va.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit)))}else a=Rp(e,i??va.Expression_type_can_t_be_inferred_with_isolatedDeclarations);return a}}function l$(e,t,n){const r=e.getCompilerOptions(),i=F(iv(e,n),jm);return T$(t,e,YC,r,n?D(i,n)?[n]:u:i,[_$],!1).diagnostics}var u$=531469;function _$(e){const t=()=>xn.fail("Diagnostic emitted without context");let n,r,i,o,a=t,s=!0,c=!1,l=!1,_=!1,d=!1;const{factory:m}=e,g=e.getEmitHost(),h={trackSymbol:function(e,t,n){return!(262144&e.flags)&&I(T.isSymbolAccessible(e,t,n,!0))},reportInaccessibleThisError:function(){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,M(),"this"))},reportInaccessibleUniqueSymbolError:function(){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,M(),"unique symbol"))},reportCyclicStructureError:function(){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary,M()))},reportPrivateInBaseOfClassExpression:function(t){(y||v)&&e.addDiagnostic(Rp(y||v,va.Property_0_of_exported_class_expression_may_not_be_private_or_protected,t))},reportLikelyUnsafeImportRequiredError:function(t){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,M(),t))},reportTruncationError:function(){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed))},moduleResolverHost:g,reportNonlocalAugmentation:function(t,n,r){var i;const o=null==(i=n.declarations)?void 0:i.find((e=>Sd(e)===t)),a=F(r.declarations,(e=>Sd(e)!==t));if(o&&a)for(const t of a)e.addDiagnostic(fT(Rp(t,va.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized),Rp(o,va.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)))},reportNonSerializableProperty:function(t){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized,t))},reportInferenceFallback:A};let y,v,b,x,S,k;const T=e.getEmitResolver(),C=e.getCompilerOptions(),w=c$(T),{stripInternal:E,isolatedDeclarations:P}=C;return function(u){if(307===u.kind&&u.isDeclarationFile)return u;if(308===u.kind){c=!0,x=[],S=[],k=[];let p=!1;const f=m.createBundle(O(u.sourceFiles,(c=>{if(c.isDeclarationFile)return;if(p=p||c.hasNoDefaultLib,b=c,n=c,r=void 0,o=!1,i=new Map,a=t,_=!1,d=!1,h(c),Zp(c)||ef(c)){l=!1,s=!1;const t=Im(c)?m.createNodeArray(L(c)):VB(c.statements,oe,b_);return m.updateSourceFile(c,[m.createModuleDeclaration([m.createModifier(138)],m.createStringLiteral(Hy(e.getEmitHost(),c)),m.createModuleBlock(sI(m.createNodeArray(re(t)),c.statements)))],!0,[],[],!1,[])}s=!0;const u=Im(c)?m.createNodeArray(L(c)):VB(c.statements,oe,b_);return m.updateSourceFile(c,re(u),!0,[],[],!1,[])}))),y=Ro(Vo(F$(u,g,!0).declarationFilePath));return f.syntheticFileReferences=C(y),f.syntheticTypeReferences=v(),f.syntheticLibReferences=T(),f.hasNoDefaultLib=p,f}let p;if(s=!0,_=!1,d=!1,n=u,b=u,a=t,c=!1,l=!1,o=!1,r=void 0,i=new Map,x=[],S=[],k=[],h(b),Im(b))p=m.createNodeArray(L(u));else{const e=VB(u.statements,oe,b_);p=sI(m.createNodeArray(re(e)),u.statements),qI(u)&&(!l||_&&!d)&&(p=sI(m.createNodeArray([...p,VF(m)]),p))}const f=Ro(Vo(F$(u,g,!0).declarationFilePath));return m.updateSourceFile(u,p,!0,C(f),v(),u.hasNoDefaultLib,T());function h(e){x=Z(x,O(e.referencedFiles,(t=>[e,t]))),S=Z(S,e.typeReferenceDirectives),k=Z(k,e.libReferenceDirectives)}function y(e){const t={...e};return t.pos=-1,t.end=-1,t}function v(){return q(S,(e=>{if(e.preserve)return y(e)}))}function T(){return q(k,(e=>{if(e.preserve)return y(e)}))}function C(e){return q(x,(([t,n])=>{if(!n.preserve)return;const r=g.getSourceFileFromReference(t,n);if(!r)return;let i;if(r.isDeclarationFile)i=r.fileName;else{if(c&&D(u.sourceFiles,r))return;const e=F$(r,g,!0);i=e.declarationFilePath||e.jsFilePath||r.fileName}if(!i)return;const o=ma(e,i,g.getCurrentDirectory(),g.getCanonicalFileName,!1),a=y(n);return a.fileName=o,a}))}};function N(t){T.getPropertiesOfContainerFunction(t).forEach((t=>{if(hC(t.valueDeclaration)){const n=uP(t.valueDeclaration)?t.valueDeclaration.left:t.valueDeclaration;e.addDiagnostic(Rp(n,va.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function))}}))}function A(t){P&&!Im(b)&&(KP(t)&&T.isExpandoFunctionDeclaration(t)?N(t):e.addDiagnostic(w(t)))}function I(t){if(0===t.accessibility){if(t.aliasesToMakeVisible)if(r)for(const e of t.aliasesToMakeVisible)fe(r,e);else r=t.aliasesToMakeVisible}else if(3!==t.accessibility){const n=a(t);if(n)return n.typeName?e.addDiagnostic(Rp(t.errorNode||n.errorNode,n.diagnosticMessage,Gd(n.typeName),t.errorSymbolName,t.errorModuleName)):e.addDiagnostic(Rp(t.errorNode||n.errorNode,n.diagnosticMessage,t.errorSymbolName,t.errorModuleName)),!0}return!1}function M(){return y?Ap(y):v&&Pc(v)?Ap(Pc(v)):v&&mN(v)?v.isExportEquals?"export=":"default":"(Missing)"}function L(e){const t=a;a=t=>t.errorNode&&o$(t.errorNode)?s$(t.errorNode)(t):{diagnosticMessage:t.errorModuleName?va.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:va.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,errorNode:t.errorNode||e};const n=T.getDeclarationStatementsForSourceFile(e,u$,h);return a=t,n}function B(e){return 80===e.kind?e:207===e.kind?m.updateArrayBindingPattern(e,VB(e.elements,t,Nu)):m.updateObjectBindingPattern(e,VB(e.elements,t,KE));function t(e){return 232===e.kind?e:(e.propertyName&&oE(e.propertyName)&&vb(e.propertyName.expression)&&Y(e.propertyName.expression,n),m.updateBindingElement(e,e.dotDotDotToken,e.propertyName,B(e.name),void 0))}}function J(e,t,n){let r;o||(r=a,a=s$(e));const i=m.updateParameterDeclaration(e,function(e,t,n,r){return e.createModifiersFromModifierFlags(d$(t,n,void 0))}(m,e,t),e.dotDotDotToken,B(e.name),T.isOptionalParameter(e)?e.questionToken||m.createToken(58):void 0,V(e,n||e.type,!0),$(e));return o||(a=r),i}function z(e){return f$(e)&&!!e.initializer&&T.isLiteralConstDeclaration(hc(e))}function $(e){if(z(e))return DC(EC(e.initializer))||A(e),T.createLiteralConstValue(hc(e,f$),h)}function V(e,t,r){if(!r&&Rv(e,2))return;if(z(e))return;const i=169===e.kind&&T.requiresAddingImplicitUndefined(e);if(t&&!i)return qB(t,ie,wu);let s,c;switch(y=e.name,o||(s=a,a=s$(e)),e.kind){case 169:case 171:case 172:case 208:case 260:c=T.createTypeOfDeclaration(e,n,u$,h);break;case 262:case 180:case 173:case 174:case 177:case 179:c=T.createReturnTypeOfSignatureDeclaration(e,n,u$,h);break;default:xn.assertNever(e)}return y=void 0,o||(a=s),c??m.createKeywordTypeNode(133)}function U(e){switch((e=hc(e)).kind){case 262:case 267:case 264:case 263:case 265:case 266:return!T.isDeclarationVisible(e);case 260:return!K(e);case 271:case 272:case 278:case 277:return!1;case 175:return!0}return!1}function K(e){return!gP(e)&&(Eu(e.name)?Q(e.name.elements,K):T.isDeclarationVisible(e))}function W(e,t,n){if(Rv(e,2))return m.createNodeArray();const r=O(t,(e=>J(e,n)));return r?m.createNodeArray(r,t.hasTrailingComma):m.createNodeArray()}function H(e,t){let n;if(!t){const t=gv(e);t&&(n=[J(t)])}if(gE(e)){let r;if(!t){const t=fv(e);t&&(r=J(t,void 0,ge(e,Sv(HE(e.parent)?e.parent.properties:e.parent.members,e))))}r||(r=m.createParameterDeclaration(void 0,void 0,"value")),n=ue(n,r)}return m.createNodeArray(n||u)}function G(e,t){return Rv(e,2)?void 0:VB(t,ie,aE)}function X(e){return qN(e)||QP(e)||ZP(e)||GP(e)||XP(e)||cu(e)||vE(e)||BE(e)}function Y(e,t){I(T.isEntityNameVisible(e,t))}function ee(e,t){return O_(e)&&O_(t)&&(e.jsDoc=t.jsDoc),mw(e,fw(t))}function te(t,n){if(n){if(l=l||267!==t.kind&&205!==t.kind,$_(n)&&c){const n=Xy(e.getEmitHost(),T,t);if(n)return m.createStringLiteral(n)}return n}}function ne(e){const t=Kq(e);return e&&void 0!==t?e:void 0}function re(e){for(;p(r);){const e=r.shift();if(!wp(e))return xn.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${xn.formatSyntaxKind(e.kind)}`);const t=s;s=e.parent&&qN(e.parent)&&!(qI(e.parent)&&c);const n=le(e);s=t,i.set(SJ(e),n)}return VB(e,(function(e){if(wp(e)){const t=SJ(e);if(i.has(t)){const n=i.get(t);return i.delete(t),n&&((ot(n)?Q(n,n_):n_(n))&&(_=!0),qN(e.parent)&&(ot(n)?Q(n,r_):r_(n))&&(l=!0)),n}}return e}),b_)}function ie(t){if(de(t))return;if(h_(t)){if(U(t))return;if(Vh(t))if(P){if(GP(t.parent)||HE(t.parent))return void e.addDiagnostic(Rp(t,va.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));if((XP(t.parent)||CE(t.parent))&&!vb(t.name.expression))return void e.addDiagnostic(Rp(t,va.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations))}else if(!T.isLateBound(hc(t))||!vb(t.name.expression))return}if(cu(t)&&T.isImplementationOfOverload(t))return;if(wP(t))return;let r;X(t)&&(r=n,n=t);const i=a,s=o$(t),c=o;let l=(187===t.kind||200===t.kind)&&265!==t.parent.kind;if((dE(t)||_E(t))&&Rv(t,2)){if(t.symbol&&t.symbol.declarations&&t.symbol.declarations[0]!==t)return;return _(m.createPropertyDeclaration(me(t),t.name,void 0,void 0,void 0))}if(s&&!o&&(a=s$(t)),TE(t)&&Y(t.exprName,n),l&&(o=!0),function(e){switch(e.kind){case 180:case 176:case 174:case 177:case 178:case 172:case 171:case 173:case 179:case 181:case 260:case 168:case 233:case 183:case 194:case 184:case 185:case 205:return!0}return!1}(t))switch(t.kind){case 233:{(ou(t.expression)||vb(t.expression))&&Y(t.expression,n);const r=ZB(t,ie,e);return _(m.updateExpressionWithTypeArguments(r,r.expression,r.typeArguments))}case 183:{Y(t.typeName,n);const r=ZB(t,ie,e);return _(m.updateTypeReferenceNode(r,r.typeName,r.typeArguments))}case 180:return _(m.updateConstructSignature(t,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type)));case 176:return _(m.createConstructorDeclaration(me(t),W(t,t.parameters,0),void 0));case 174:return VD(t.name)?_(void 0):_(m.createMethodDeclaration(me(t),void 0,t.name,t.questionToken,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type),void 0));case 177:{if(VD(t.name))return _(void 0);const e=ge(t,Sv(HE(t.parent)?t.parent.properties:t.parent.members,t));return _(m.updateGetAccessorDeclaration(t,me(t),t.name,H(t,Rv(t,2)),V(t,e),void 0))}case 178:return VD(t.name)?_(void 0):_(m.updateSetAccessorDeclaration(t,me(t),t.name,H(t,Rv(t,2)),void 0));case 172:return VD(t.name)?_(void 0):_(m.updatePropertyDeclaration(t,me(t),t.name,t.questionToken,V(t,t.type),$(t)));case 171:return VD(t.name)?_(void 0):_(m.updatePropertySignature(t,me(t),t.name,t.questionToken,V(t,t.type)));case 173:return VD(t.name)?_(void 0):_(m.updateMethodSignature(t,me(t),t.name,t.questionToken,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type)));case 179:return _(m.updateCallSignature(t,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type)));case 181:return _(m.updateIndexSignature(t,me(t),W(t,t.parameters),qB(t.type,ie,wu)||m.createKeywordTypeNode(133)));case 260:return Eu(t.name)?_e(t.name):(l=!0,o=!0,_(m.updateVariableDeclaration(t,t.name,void 0,V(t,t.type),$(t))));case 168:return 174===(u=t).parent.kind&&Rv(u.parent,2)&&(t.default||t.constraint)?_(m.updateTypeParameterDeclaration(t,t.modifiers,t.name,void 0,void 0)):_(ZB(t,ie,e));case 194:{const e=qB(t.checkType,ie,wu),r=qB(t.extendsType,ie,wu),i=n;n=t.trueType;const o=qB(t.trueType,ie,wu);n=i;const a=qB(t.falseType,ie,wu);return xn.assert(e),xn.assert(r),xn.assert(o),xn.assert(a),_(m.updateConditionalTypeNode(t,e,r,o,a))}case 184:return _(m.updateFunctionTypeNode(t,VB(t.typeParameters,ie,aE),W(t,t.parameters),xn.checkDefined(qB(t.type,ie,wu))));case 185:return _(m.updateConstructorTypeNode(t,me(t),VB(t.typeParameters,ie,aE),W(t,t.parameters),xn.checkDefined(qB(t.type,ie,wu))));case 205:return df(t)?_(m.updateImportTypeNode(t,m.updateLiteralTypeNode(t.argument,te(t,t.argument.literal)),t.attributes,t.qualifier,VB(t.typeArguments,ie,wu),t.isTypeOf)):_(t);default:xn.assertNever(t,`Attempted to process unhandled node kind: ${xn.formatSyntaxKind(t.kind)}`)}var u;return DE(t)&&Xa(b,t.pos).line===Xa(b,t.end).line&&iw(t,1),_(ZB(t,ie,e));function _(e){return e&&s&&Vh(t)&&function(e){let t;o||(t=a,a=a$(e)),y=e.name,xn.assert(Vh(e)),Y(e.name.expression,n),o||(a=t),y=void 0}(t),X(t)&&(n=r),s&&!o&&(a=i),l&&(o=c),e===t?e:e&&ew(ee(e,t),t)}}function oe(e){if(!function(e){switch(e.kind){case 262:case 267:case 271:case 264:case 263:case 265:case 266:case 243:case 272:case 278:case 277:return!0}return!1}(e))return;if(de(e))return;switch(e.kind){case 278:return qN(e.parent)&&(l=!0),d=!0,m.updateExportDeclaration(e,e.modifiers,e.isTypeOnly,e.exportClause,te(e,e.moduleSpecifier),ne(e.attributes));case 277:if(qN(e.parent)&&(l=!0),d=!0,80===e.expression.kind)return e;{const t=m.createUniqueName("_default",16);a=()=>({diagnosticMessage:va.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:e}),v=e;const n=m.createVariableDeclaration(t,void 0,T.createTypeOfExpression(e.expression,e,u$,h),void 0);v=void 0;const r=m.createVariableStatement(s?[m.createModifier(138)]:[],m.createVariableDeclarationList([n],2));return ee(r,e),rw(e),[r,m.updateExportAssignment(e,e.modifiers,t)]}}const t=le(e);return i.set(SJ(e),t),e}function ae(e){if(rN(e)||Rv(e,2048)||!cI(e))return e;const t=m.createModifiersFromModifierFlags(131039&Qv(e));return m.replaceModifiers(e,t)}function se(e,t,n,r){const i=m.updateModuleDeclaration(e,t,n,r);if(sp(i)||32&i.flags)return i;const o=m.createModuleDeclaration(i.modifiers,i.name,i.body,32|i.flags);return ew(o,i),sI(o,i),o}function le(t){if(r)for(;Qt(r,t););if(de(t))return;switch(t.kind){case 271:return function(e){if(T.isDeclarationVisible(e)){if(283===e.moduleReference.kind){const t=Pm(e);return m.updateImportEqualsDeclaration(e,e.modifiers,e.isTypeOnly,e.name,m.updateExternalModuleReference(e.moduleReference,te(e,t)))}{const t=a;return a=s$(e),Y(e.moduleReference,n),a=t,e}}}(t);case 272:return function(t){if(!t.importClause)return m.updateImportDeclaration(t,t.modifiers,t.importClause,te(t,t.moduleSpecifier),ne(t.attributes));const n=t.importClause&&t.importClause.name&&T.isDeclarationVisible(t.importClause)?t.importClause.name:void 0;if(!t.importClause.namedBindings)return n&&m.updateImportDeclaration(t,t.modifiers,m.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,void 0),te(t,t.moduleSpecifier),ne(t.attributes));if(274===t.importClause.namedBindings.kind){const e=T.isDeclarationVisible(t.importClause.namedBindings)?t.importClause.namedBindings:void 0;return n||e?m.updateImportDeclaration(t,t.modifiers,m.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,e),te(t,t.moduleSpecifier),ne(t.attributes)):void 0}const r=q(t.importClause.namedBindings.elements,(e=>T.isDeclarationVisible(e)?e:void 0));return r&&r.length||n?m.updateImportDeclaration(t,t.modifiers,m.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,r&&r.length?m.updateNamedImports(t.importClause.namedBindings,r):void 0),te(t,t.moduleSpecifier),ne(t.attributes)):T.isImportRequiredByAugmentation(t)?(P&&e.addDiagnostic(Rp(t,va.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)),m.updateImportDeclaration(t,t.modifiers,void 0,te(t,t.moduleSpecifier),ne(t.attributes))):void 0}(t)}if(h_(t)&&U(t))return;if(AF(t))return;if(cu(t)&&T.isImplementationOfOverload(t))return;let o;X(t)&&(o=n,n=t);const c=o$(t),u=a;c&&(a=s$(t));const g=s;switch(t.kind){case 265:{s=!1;const e=b(m.updateTypeAliasDeclaration(t,me(t),t.name,VB(t.typeParameters,ie,aE),xn.checkDefined(qB(t.type,ie,wu))));return s=g,e}case 264:return b(m.updateInterfaceDeclaration(t,me(t),t.name,G(t,t.typeParameters),he(t.heritageClauses),VB(t.members,ie,ku)));case 262:{const e=b(m.updateFunctionDeclaration(t,me(t),void 0,t.name,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type),void 0));if(e&&T.isExpandoFunctionDeclaration(t)&&function(e){var t;if(e.body)return!0;const n=null==(t=e.symbol.declarations)?void 0:t.filter((e=>HP(e)&&!e.body));return!n||n.indexOf(e)===n.length-1}(t)){const r=T.getPropertiesOfContainerFunction(t);P&&N(t);const i=_I.createModuleDeclaration(void 0,e.name||m.createIdentifier("_default"),m.createModuleBlock([]),32);OT(i,n),i.locals=ed(r),i.symbol=r[0].parent;const o=[];let s=q(r,(e=>{if(!hC(e.valueDeclaration))return;const t=vc(e.escapedName);if(!Ts(t,99))return;a=s$(e.valueDeclaration);const n=T.createTypeOfDeclaration(e.valueDeclaration,i,-2146952179,h);a=u;const r=Mh(t),s=r?m.getGeneratedNameForNode(e.valueDeclaration):m.createIdentifier(t);r&&o.push([s,t]);const c=m.createVariableDeclaration(s,void 0,n,void 0);return m.createVariableStatement(r?void 0:[m.createToken(95)],m.createVariableDeclarationList([c]))}));o.length?s.push(m.createExportDeclaration(void 0,!1,m.createNamedExports(O(o,(([e,t])=>m.createExportSpecifier(!1,e,t)))))):s=q(s,(e=>m.replaceModifiers(e,0)));const c=m.createModuleDeclaration(me(t),t.name,m.createModuleBlock(s),32);if(!Rv(e,2048))return[e,c];const _=m.createModifiersFromModifierFlags(-2081&Qv(e)|128),p=m.updateFunctionDeclaration(e,_,void 0,e.name,e.typeParameters,e.parameters,e.type,void 0),f=m.updateModuleDeclaration(c,_,c.name,c.body),g=m.createExportAssignment(void 0,!1,c.name);return qN(t.parent)&&(l=!0),d=!0,[p,f,g]}return e}case 267:{s=!1;const e=t.body;if(e&&268===e.kind){const n=_,r=d;d=!1,_=!1;let i=re(VB(e.statements,oe,b_));33554432&t.flags&&(_=!1),pp(t)||Q(i,pe)||d||(i=_?m.createNodeArray([...i,VF(m)]):VB(i,ae,b_));const o=m.updateModuleBlock(e,i);s=g,_=n,d=r;const a=me(t);return b(se(t,a,fp(t)?te(t,t.name):t.name,o))}{s=g;const n=me(t);s=!1,qB(e,oe);const r=SJ(e),o=i.get(r);return i.delete(r),b(se(t,n,t.name,o))}}case 263:{y=t.name,v=t;const e=m.createNodeArray(me(t)),n=G(t,t.typeParameters),r=pv(t);let i;if(r){const e=a;i=ce(R(r.parameters,(e=>{if(Bv(e,31)&&!de(e))return a=s$(e),80===e.name.kind?ee(m.createPropertyDeclaration(me(e),e.name,e.questionToken,V(e,e.type),$(e)),e):function t(n){let r;for(const i of n.elements)gP(i)||(Eu(i.name)&&(r=Z(r,t(i.name))),r=r||[],r.push(m.createPropertyDeclaration(me(e),i.name,void 0,V(i,void 0),void 0)));return r}(e.name)}))),a=e}const o=Z(Z(Q(t.members,(e=>!!e.name&&VD(e.name)))?[m.createPropertyDeclaration(void 0,m.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:void 0,i),VB(t.members,ie,mu)),c=m.createNodeArray(o),l=Sh(t);if(l&&!vb(l.expression)&&106!==l.expression.kind){const r=t.name?vc(t.name.escapedText):"default",i=m.createUniqueName(`${r}_base`,16);a=()=>({diagnosticMessage:va.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:l,typeName:t.name});const o=m.createVariableDeclaration(i,void 0,T.createTypeOfExpression(l.expression,t,u$,h),void 0),u=m.createVariableStatement(s?[m.createModifier(138)]:[],m.createVariableDeclarationList([o],2)),_=m.createNodeArray(O(t.heritageClauses,(e=>{if(96===e.token){const t=a;a=s$(e.types[0]);const n=m.updateHeritageClause(e,O(e.types,(e=>m.updateExpressionWithTypeArguments(e,i,VB(e.typeArguments,ie,wu)))));return a=t,n}return m.updateHeritageClause(e,VB(m.createNodeArray(F(e.types,(e=>vb(e.expression)||106===e.expression.kind))),ie,hP))})));return[u,b(m.updateClassDeclaration(t,e,t.name,n,_,c))]}{const r=he(t.heritageClauses);return b(m.updateClassDeclaration(t,e,t.name,n,r,c))}}case 243:return b(function(e){if(!f(e.declarationList.declarations,K))return;const t=VB(e.declarationList.declarations,ie,KP);if(!p(t))return;const n=m.createNodeArray(me(e));let r;return of(e.declarationList)||rf(e.declarationList)?(r=m.createVariableDeclarationList(t,2),ew(r,e.declarationList),sI(r,e.declarationList),mw(r,e.declarationList)):r=m.updateVariableDeclarationList(e.declarationList,t),m.updateVariableStatement(e,n,r)}(t));case 266:return b(m.updateEnumDeclaration(t,m.createNodeArray(me(t)),t.name,m.createNodeArray(q(t.members,(t=>{if(de(t))return;const n=T.getEnumMemberValue(t),r=null==n?void 0:n.value;P&&t.initializer&&(null==n?void 0:n.hasExternalReferences)&&!oE(t.name)&&e.addDiagnostic(Rp(t,va.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations));const i=void 0===r?void 0:"string"==typeof r?m.createStringLiteral(r):r<0?m.createPrefixUnaryExpression(41,m.createNumericLiteral(-r)):m.createNumericLiteral(r);return ee(m.updateEnumMember(t,t.name,i),t)})))))}return xn.assertNever(t,`Unhandled top-level node in declaration emit: ${xn.formatSyntaxKind(t.kind)}`);function b(e){return X(t)&&(n=o),c&&(a=u),267===t.kind&&(s=g),e===t?e:(v=void 0,y=void 0,e&&ew(ee(e,t),t))}}function _e(e){return j(q(e.elements,(e=>function(e){if(232!==e.kind&&e.name){if(!K(e))return;return Eu(e.name)?_e(e.name):m.createVariableDeclaration(e.name,void 0,V(e,void 0),void 0)}}(e))))}function de(e){return!!E&&!!e&&W_(e,b)}function pe(e){return mN(e)||gN(e)}function me(e){const t=Qv(e),n=function(e){let t=130030,n=s&&!function(e){return 264===e.kind}(e)?128:0;const r=307===e.parent.kind;return(!r||c&&r&&qI(e.parent))&&(t^=128,n=0),d$(e,t,n)}(e);return t===n?UB(e.modifiers,(e=>lt(e,iu)),iu):m.createModifiersFromModifierFlags(n)}function ge(e,t){let n=p$(e);return n||e===t.firstAccessor||(n=p$(t.firstAccessor),a=s$(t.firstAccessor)),!n&&t.secondAccessor&&e!==t.secondAccessor&&(n=p$(t.secondAccessor),a=s$(t.secondAccessor)),n}function he(e){return m.createNodeArray(F(O(e,(e=>m.updateHeritageClause(e,VB(m.createNodeArray(F(e.types,(t=>vb(t.expression)||96===e.token&&106===t.expression.kind))),ie,hP)))),(e=>e.types&&!!e.types.length)))}}function d$(e,t=131070,n=0){let r=Qv(e)&t|n;return 2048&r&&!(32&r)&&(r^=32),2048&r&&128&r&&(r^=128),r}function p$(e){if(e)return 177===e.kind?e.type:e.parameters.length>0?e.parameters[0].type:void 0}function f$(e){switch(e.kind){case 172:case 171:return!Rv(e,2);case 169:case 260:return!0}return!1}var m$={scriptTransformers:u,declarationTransformers:u};function g$(e,t,n){return{scriptTransformers:h$(e,t,n),declarationTransformers:y$(t)}}function h$(e,t,n){if(n)return u;const r=wS(e),i=DS(e),o=zS(e),a=[];return pe(a,t&&O(t.before,b$)),a.push(Nz),e.experimentalDecorators&&a.push(Oz),ek(e)&&a.push(Hz),r<99&&a.push($z),e.experimentalDecorators||!(r<99)&&o||a.push(Mz),a.push(Fz),r<8&&a.push(zz),r<7&&a.push(Jz),r<6&&a.push(Bz),r<5&&a.push(Rz),r<4&&a.push(Lz),r<3&&a.push(Xz),r<2&&(a.push(Yz),a.push(Zz)),a.push(function(e){switch(e){case 99:case 7:case 6:case 5:case 200:return r$;case 4:return n$;case 100:case 199:return i$;default:return e$}}(i)),pe(a,t&&O(t.after,b$)),a}function y$(e){const t=[];return t.push(_$),pe(t,e&&O(e.afterDeclarations,x$)),t}function v$(e,t){return n=>{const r=e(n);return"function"==typeof r?t(n,r):function(e){return t=>VN(t)?e.transformBundle(t):e.transformSourceFile(t)}(r)}}function b$(e){return v$(e,CJ)}function x$(e){return v$(e,((e,t)=>t))}function S$(e,t){return t}function k$(e,t,n){n(e,t)}function T$(e,t,n,r,i,o,a){var s,c;const l=new Array(357);let u,_,d,p,f,m=0,g=[],h=[],y=[],v=[],b=0,x=!1,S=[],k=0,T=S$,C=k$,w=0;const D=[],E={factory:n,getCompilerOptions:()=>r,getEmitResolver:()=>e,getEmitHost:()=>t,getEmitHelperFactory:bt((()=>$w(E))),startLexicalEnvironment:function(){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),xn.assert(!x,"Lexical environment is suspended."),g[b]=u,h[b]=_,y[b]=d,v[b]=m,b++,u=void 0,_=void 0,d=void 0,m=0},suspendLexicalEnvironment:function(){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),xn.assert(!x,"Lexical environment is already suspended."),x=!0},resumeLexicalEnvironment:function(){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),xn.assert(x,"Lexical environment is not suspended."),x=!1},endLexicalEnvironment:function(){let e;if(xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),xn.assert(!x,"Lexical environment is suspended."),u||_||d){if(_&&(e=[..._]),u){const t=n.createVariableStatement(void 0,n.createVariableDeclarationList(u));iw(t,2097152),e?e.push(t):e=[t]}d&&(e=e?[...e,...d]:[...d])}return b--,u=g[b],_=h[b],d=y[b],m=v[b],0===b&&(g=[],h=[],y=[],v=[]),e},setLexicalEnvironmentFlags:function(e,t){m=t?m|e:m&~e},getLexicalEnvironmentFlags:function(){return m},hoistVariableDeclaration:function(e){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed.");const t=iw(n.createVariableDeclaration(e),128);u?u.push(t):u=[t],1&m&&(m|=2)},hoistFunctionDeclaration:function(e){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),iw(e,2097152),_?_.push(e):_=[e]},addInitializationStatement:function(e){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),iw(e,2097152),d?d.push(e):d=[e]},startBlockScope:function(){xn.assert(w>0,"Cannot start a block scope during initialization."),xn.assert(w<2,"Cannot start a block scope after transformation has completed."),S[k]=p,k++,p=void 0},endBlockScope:function(){xn.assert(w>0,"Cannot end a block scope during initialization."),xn.assert(w<2,"Cannot end a block scope after transformation has completed.");const e=Q(p)?[n.createVariableStatement(void 0,n.createVariableDeclarationList(p.map((e=>n.createVariableDeclaration(e))),1))]:void 0;return k--,p=S[k],0===k&&(S=[]),e},addBlockScopedVariable:function(e){xn.assert(k>0,"Cannot add a block scoped variable outside of an iteration body."),(p||(p=[])).push(e)},requestEmitHelper:function e(t){if(xn.assert(w>0,"Cannot modify the transformation context during initialization."),xn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),xn.assert(!t.scoped,"Cannot request a scoped emit helper."),t.dependencies)for(const n of t.dependencies)e(n);f=ue(f,t)},readEmitHelpers:function(){xn.assert(w>0,"Cannot modify the transformation context during initialization."),xn.assert(w<2,"Cannot modify the transformation context after transformation has completed.");const e=f;return f=void 0,e},enableSubstitution:function(e){xn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),l[e]|=1},enableEmitNotification:function(e){xn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),l[e]|=2},isSubstitutionEnabled:I,isEmitNotificationEnabled:O,get onSubstituteNode(){return T},set onSubstituteNode(e){xn.assert(w<1,"Cannot modify transformation hooks after initialization has completed."),xn.assert(void 0!==e,"Value must not be 'undefined'"),T=e},get onEmitNode(){return C},set onEmitNode(e){xn.assert(w<1,"Cannot modify transformation hooks after initialization has completed."),xn.assert(void 0!==e,"Value must not be 'undefined'"),C=e},addDiagnostic(e){D.push(e)}};for(const e of i)nw(Sd(hc(e)));pr("beforeTransform");const P=o.map((e=>e(E))),N=e=>{for(const t of P)e=t(e);return e};w=1;const F=[];for(const e of i)null==(s=or)||s.push(or.Phase.Emit,"transformNodes",307===e.kind?{path:e.path}:{kind:e.kind,pos:e.pos,end:e.end}),F.push((a?N:A)(e)),null==(c=or)||c.pop();return w=2,pr("afterTransform"),fr("transformTime","beforeTransform","afterTransform"),{transformed:F,substituteNode:function(e,t){return xn.assert(w<3,"Cannot substitute a node after the result is disposed."),t&&I(t)&&T(e,t)||t},emitNodeWithNotification:function(e,t,n){xn.assert(w<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),t&&(O(t)?C(e,t,n):n(e,t))},isEmitNotificationEnabled:O,dispose:function(){if(w<3){for(const e of i)nw(Sd(hc(e)));u=void 0,g=void 0,_=void 0,h=void 0,T=void 0,C=void 0,f=void 0,w=3}},diagnostics:D};function A(e){return!e||qN(e)&&e.isDeclarationFile?e:N(e)}function I(e){return 0!=(1&l[e.kind])&&0==(8&Yd(e))}function O(e){return 0!=(2&l[e.kind])||0!=(4&Yd(e))}}var C$={factory:YC,getCompilerOptions:()=>({}),getEmitResolver:vt,getEmitHost:vt,getEmitHelperFactory:vt,startLexicalEnvironment:_t,resumeLexicalEnvironment:_t,suspendLexicalEnvironment:_t,endLexicalEnvironment:ft,setLexicalEnvironmentFlags:_t,getLexicalEnvironmentFlags:()=>0,hoistVariableDeclaration:_t,hoistFunctionDeclaration:_t,addInitializationStatement:_t,startBlockScope:_t,endBlockScope:ft,addBlockScopedVariable:_t,requestEmitHelper:_t,readEmitHelpers:vt,enableSubstitution:_t,enableEmitNotification:_t,isSubstitutionEnabled:vt,isEmitNotificationEnabled:vt,onSubstituteNode:S$,onEmitNode:k$,addDiagnostic:_t},w$=function(){const e=[];return e[1024]=["{","}"],e[2048]=["(",")"],e[4096]=["<",">"],e[8192]=["[","]"],e}();function D$(e){return Ao(e,".tsbuildinfo")}function E$(e,t,n,r=!1,i,o){const a=ot(n)?n:iv(e,n,r),s=e.getCompilerOptions();if(s.outFile){if(a.length){const n=YC.createBundle(a),i=t(F$(n,e,r),n);if(i)return i}}else{if(!i)for(const n of a){const i=t(F$(n,e,r),n);if(i)return i}if(o){const e=P$(s);if(e)return t({buildInfoPath:e},void 0)}}}function P$(e){const t=e.configFilePath;if(!RS(e))return;if(e.tsBuildInfoFile)return e.tsBuildInfoFile;const n=e.outFile;let r;if(n)r=Yk(n);else{if(!t)return;const n=Yk(t);r=e.outDir?e.rootDir?Wo(e.outDir,da(e.rootDir,n,!0)):Ko(e.outDir,Bo(n)):n}return r+".tsbuildinfo"}function N$(e,t){const n=e.outFile,r=e.emitDeclarationOnly?void 0:n,i=r&&A$(r,e),o=t||LS(e)?Yk(n)+".d.ts":void 0;return{jsFilePath:r,sourceMapFilePath:i,declarationFilePath:o,declarationMapPath:o&&BS(e)?o+".map":void 0,buildInfoPath:P$(e)}}function F$(e,t,n){const r=t.getCompilerOptions();if(308===e.kind)return N$(r,n);{const i=Yy(e.fileName,t,I$(e.fileName,r)),o=ef(e),a=o&&0===ca(e.fileName,i,t.getCurrentDirectory(),!t.useCaseSensitiveFileNames()),s=r.emitDeclarationOnly||a?void 0:i,c=!s||ef(e)?void 0:A$(s,r),l=n||LS(r)&&!o?Zy(e.fileName,t):void 0;return{jsFilePath:s,sourceMapFilePath:c,declarationFilePath:l,declarationMapPath:l&&BS(r)?l+".map":void 0,buildInfoPath:void 0}}}function A$(e,t){return t.sourceMap&&!t.inlineSourceMap?e+".map":void 0}function I$(e,t){return Ao(e,".json")?".json":1===t.jsx&&Io(e,[".jsx",".tsx"])?".jsx":Io(e,[".mts",".mjs"])?".mjs":Io(e,[".cts",".cjs"])?".cjs":".js"}function O$(e,t,n,r){return n?Wo(n,da(r(),e,t)):e}function M$(e,t,n,r=(()=>q$(t,n))){return L$(e,t.options,n,r)}function L$(e,t,n,r){return tT(O$(e,n,t.declarationDir||t.outDir,r),tv(e))}function j$(e,t,n,r=(()=>q$(t,n))){if(t.options.emitDeclarationOnly)return;const i=Ao(e,".json"),o=R$(e,t.options,n,r);return i&&0===ca(e,o,xn.checkDefined(t.options.configFilePath),n)?void 0:o}function R$(e,t,n,r){return tT(O$(e,n,t.outDir,r),I$(e,t))}function B$(){let e;return{addOutput:function(t){t&&(e||(e=[])).push(t)},getOutputs:function(){return e||u}}}function J$(e,t){const{jsFilePath:n,sourceMapFilePath:r,declarationFilePath:i,declarationMapPath:o,buildInfoPath:a}=N$(e.options,!1);t(n),t(r),t(i),t(o),t(a)}function z$(e,t,n,r,i){if(QI(t))return;const o=j$(t,e,n,i);if(r(o),!Ao(t,".json")&&(o&&e.options.sourceMap&&r(`${o}.map`),LS(e.options))){const o=M$(t,e,n,i);r(o),e.options.declarationMap&&r(`${o}.map`)}}function $$(e,t,n,r,i){let o;return e.rootDir?(o=Go(e.rootDir,n),null==i||i(e.rootDir)):e.composite&&e.configFilePath?(o=Ro(Vo(e.configFilePath)),null==i||i(o)):o=Sq(t(),n,r),o&&o[o.length-1]!==xo&&(o+=xo),o}function q$({options:e,fileNames:t},n){return $$(e,(()=>F(t,(t=>!(e.noEmitForJsFiles&&Io(t,Mk)||QI(t))))),Ro(Vo(xn.checkDefined(e.configFilePath))),tn(!n))}function V$(e,t){const{addOutput:n,getOutputs:r}=B$();if(e.options.outFile)J$(e,n);else{const r=bt((()=>q$(e,t)));for(const i of e.fileNames)z$(e,i,t,n,r);n(P$(e.options))}return r()}function U$(e,t,n){t=Xo(t),xn.assert(D(e.fileNames,t),"Expected fileName to be present in command line");const{addOutput:r,getOutputs:i}=B$();return e.options.outFile?J$(e,r):z$(e,t,n,r),i()}function K$(e,t){if(e.options.outFile){const{jsFilePath:t,declarationFilePath:n}=N$(e.options,!1);return xn.checkDefined(t||n,`project ${e.options.configFilePath} expected to have at least one output`)}const n=bt((()=>q$(e,t)));for(const r of e.fileNames){if(QI(r))continue;const i=j$(r,e,t,n);if(i)return i;if(!Ao(r,".json")&&LS(e.options))return M$(r,e,t,n)}return P$(e.options)||xn.fail(`project ${e.options.configFilePath} expected to have at least one output`)}function W$(e,t){return!!t&&!!e}function H$(e,t,n,{scriptTransformers:r,declarationTransformers:i},o,a,s){var c=t.getCompilerOptions(),l=c.sourceMap||c.inlineSourceMap||BS(c)?[]:void 0,u=c.listEmittedFiles?[]:void 0,_=by(),d=$b(c),f=Vy(d),{enter:m,exit:g}=ir("printTime","beforePrint","afterPrint"),h=!1;return m(),E$(t,(function({jsFilePath:a,sourceMapFilePath:l,declarationFilePath:d,declarationMapPath:f,buildInfoPath:m},g){var b,x,S,k,T,C;null==(b=or)||b.push(or.Phase.Emit,"emitJsFileOrBundle",{jsFilePath:a}),function(n,i,a){if(!n||o||!i)return;if(t.isEmitBlocked(i)||c.noEmit)return void(h=!0);(qN(n)?[n]:F(n.sourceFiles,jm)).forEach((t=>{!c.noCheck&&vT(t,c)||jI(t,(t=>!rN(t)||32&Zv(t)?iN(t)?"skip":void e.markLinkedReferences(t):"skip"))}));const s=T$(e,t,YC,c,[n],r,!1),l=rq({removeComments:c.removeComments,newLine:c.newLine,noEmitHelpers:c.noEmitHelpers,module:DS(c),target:wS(c),sourceMap:c.sourceMap,inlineSourceMap:c.inlineSourceMap,inlineSources:c.inlineSources,extendedDiagnostics:c.extendedDiagnostics},{hasGlobalName:e.hasGlobalName,onEmitNode:s.emitNodeWithNotification,isEmitNotificationEnabled:s.isEmitNotificationEnabled,substituteNode:s.substituteNode});xn.assert(1===s.transformed.length,"Should only see one output from the transform"),v(i,a,s,l,c),s.dispose(),u&&(u.push(i),a&&u.push(a))}(g,a,l),null==(x=or)||x.pop(),null==(S=or)||S.push(or.Phase.Emit,"emitDeclarationFileOrBundle",{declarationFilePath:d}),function(n,r,a){if(!n||0===o)return;if(!r)return void((o||c.emitDeclarationOnly)&&(h=!0));const l=qN(n)?[n]:n.sourceFiles,d=s?l:F(l,jm),f=c.outFile?[YC.createBundle(d)]:d;d.forEach((e=>{(o&&!LS(c)||c.noCheck||W$(o,s)||!vT(e,c))&&y(e)}));const m=T$(e,t,YC,c,f,i,!1);if(p(m.diagnostics))for(const e of m.diagnostics)_.add(e);const g=!!m.diagnostics&&!!m.diagnostics.length||!!t.isEmitBlocked(r)||!!c.noEmit;if(h=h||g,!g||s){xn.assert(1===m.transformed.length,"Should only see one output from the decl transform");const t={removeComments:c.removeComments,newLine:c.newLine,noEmitHelpers:!0,module:c.module,target:c.target,sourceMap:!s&&c.declarationMap,inlineSourceMap:c.inlineSourceMap,extendedDiagnostics:c.extendedDiagnostics,onlyPrintJsDocStyle:!0,omitBraceSourceMapPositions:!0};v(r,a,m,rq(t,{hasGlobalName:e.hasGlobalName,onEmitNode:m.emitNodeWithNotification,isEmitNotificationEnabled:m.isEmitNotificationEnabled,substituteNode:m.substituteNode}),{sourceMap:t.sourceMap,sourceRoot:c.sourceRoot,mapRoot:c.mapRoot,extendedDiagnostics:c.extendedDiagnostics}),u&&(u.push(r),a&&u.push(a))}m.dispose()}(g,d,f),null==(k=or)||k.pop(),null==(T=or)||T.push(or.Phase.Emit,"emitBuildInfo",{buildInfoPath:m}),function(e){if(!e||n||h)return;if(t.isEmitBlocked(e))return void(h=!0);const r=t.getBuildInfo()||G$(void 0);cv(t,_,e,X$(r),!1,void 0,{buildInfo:r}),null==u||u.push(e)}(m),null==(C=or)||C.pop()}),iv(t,n,s),s,a,!n),g(),{emitSkipped:h,diagnostics:_.getDiagnostics(),emittedFiles:u,sourceMaps:l};function y(t){mN(t)?80===t.expression.kind&&e.collectLinkedAliases(t.expression,!0):yN(t)?e.collectLinkedAliases(t.propertyName||t.name,!0):LI(t,y)}function v(e,n,r,i,o){const a=r.transformed[0],s=308===a.kind?a:void 0,u=307===a.kind?a:void 0,p=s?s.sourceFiles:[u];let m,g;if(function(e,t){return(e.sourceMap||e.inlineSourceMap)&&(307!==t.kind||!Ao(t.fileName,".json"))}(o,a)&&(m=nJ(t,Bo(Vo(e)),function(e){const t=Vo(e.sourceRoot||"");return t?ea(t):t}(o),function(e,n,r){if(e.sourceRoot)return t.getCommonSourceDirectory();if(e.mapRoot){let n=Vo(e.mapRoot);return r&&(n=Ro(av(r.fileName,t,n))),0===jo(n)&&(n=Ko(t.getCommonSourceDirectory(),n)),n}return Ro(Xo(n))}(o,e,u),o)),s?i.writeBundle(s,f,m):i.writeFile(u,f,m),m){l&&l.push({inputSourceFileNames:m.getSources(),sourceMap:m.toJSON()});const r=function(e,n,r,i,o){if(e.inlineSourceMap){const e=n.toString();return`data:application/json;base64,${Lb(vo,e)}`}const a=Bo(Vo(xn.checkDefined(i)));if(e.mapRoot){let n=Vo(e.mapRoot);return o&&(n=Ro(av(o.fileName,t,n))),0===jo(n)?(n=Ko(t.getCommonSourceDirectory(),n),encodeURI(ma(Ro(Xo(r)),Ko(n,a),t.getCurrentDirectory(),t.getCanonicalFileName,!0))):encodeURI(Ko(n,a))}return encodeURI(a)}(o,m,e,n,u);if(r&&(f.isAtStartOfLine()||f.rawWrite(d),g=f.getTextPos(),f.writeComment(`//# sourceMappingURL=${r}`)),n){const e=m.toString();cv(t,_,n,e,!1,p)}}else f.writeLine();const h=f.getText();cv(t,_,e,h,!!c.emitBOM,p,{sourceMapUrlPos:g,diagnostics:r.diagnostics}),f.clear()}}function G$(e){return{program:e,version:c}}function X$(e){return JSON.stringify(e)}function Q$(e,t){return Rb(e,t)}var Y$={hasGlobalName:vt,getReferencedExportContainer:vt,getReferencedImportDeclaration:vt,getReferencedDeclarationWithCollidingName:vt,isDeclarationWithCollidingName:vt,isValueAliasDeclaration:vt,isReferencedAliasDeclaration:vt,isTopLevelValueImportEqualsWithEntityName:vt,hasNodeCheckFlag:vt,isDeclarationVisible:vt,isLateBound:e=>!1,collectLinkedAliases:vt,markLinkedReferences:vt,isImplementationOfOverload:vt,requiresAddingImplicitUndefined:vt,isExpandoFunctionDeclaration:vt,getPropertiesOfContainerFunction:vt,createTypeOfDeclaration:vt,createReturnTypeOfSignatureDeclaration:vt,createTypeOfExpression:vt,createLiteralConstValue:vt,isSymbolAccessible:vt,isEntityNameVisible:vt,getConstantValue:vt,getEnumMemberValue:vt,getReferencedValueDeclaration:vt,getReferencedValueDeclarations:vt,getTypeReferenceSerializationKind:vt,isOptionalParameter:vt,isArgumentsLocalBinding:vt,getExternalModuleFileFromDeclaration:vt,isLiteralConstDeclaration:vt,getJsxFactoryEntity:vt,getJsxFragmentFactoryEntity:vt,isBindingCapturedByNode:vt,getDeclarationStatementsForSourceFile:vt,isImportRequiredByAugmentation:vt},Z$=bt((()=>rq({}))),eq=bt((()=>rq({removeComments:!0}))),tq=bt((()=>rq({removeComments:!0,neverAsciiEscape:!0}))),nq=bt((()=>rq({removeComments:!0,omitTrailingSemicolon:!0})));function rq(e={},t={}){var n,r,i,o,a,s,c,l,u,_,d,p,m,g,h,y,v,b,S,k,C,w,D,E,P,N,{hasGlobalName:F,onEmitNode:A=k$,isEmitNotificationEnabled:I,substituteNode:O=S$,onBeforeEmitNode:M,onAfterEmitNode:L,onBeforeEmitNodeArray:j,onAfterEmitNodeArray:R,onBeforeEmitToken:B,onAfterEmitToken:J}=t,z=!!e.extendedDiagnostics,$=!!e.omitBraceSourceMapPositions,q=$b(e),V=DS(e),U=new Map,K=e.preserveSourceNewlines,W=function(e){v.write(e)},H=!0,G=-1,X=-1,Y=-1,Z=-1,ee=-1,te=!1,ne=!!e.removeComments,{enter:re,exit:ie}=rr(z,"commentTime","beforeComment","afterComment"),oe=YC.parenthesizer,ae={select:e=>0===e?oe.parenthesizeLeadingTypeArgument:void 0},se=function(){return KA((function(e,t){if(t){t.stackIndex++,t.preserveSourceNewlinesStack[t.stackIndex]=K,t.containerPosStack[t.stackIndex]=Y,t.containerEndStack[t.stackIndex]=Z,t.declarationListContainerEndStack[t.stackIndex]=ee;const n=t.shouldEmitCommentsStack[t.stackIndex]=Ie(e),r=t.shouldEmitSourceMapsStack[t.stackIndex]=Oe(e);null==M||M(e),n&&Kn(e),r&&mr(e),Ne(e)}else t={stackIndex:0,preserveSourceNewlinesStack:[void 0],containerPosStack:[-1],containerEndStack:[-1],declarationListContainerEndStack:[-1],shouldEmitCommentsStack:[!1],shouldEmitSourceMapsStack:[!1]};return t}),(function(t,n,r){return e(t,r,"left")}),(function(e,t,n){const r=28!==e.kind,i=kn(n,n.left,e),o=kn(n,e,n.right);pn(i,r),or(e.pos),ln(e,103===e.kind?Qt:Yt),sr(e.end,!0),pn(o,!0)}),(function(t,n,r){return e(t,r,"right")}),(function(e,t){if(fn(kn(e,e.left,e.operatorToken),kn(e,e.operatorToken,e.right)),t.stackIndex>0){const n=t.preserveSourceNewlinesStack[t.stackIndex],r=t.containerPosStack[t.stackIndex],i=t.containerEndStack[t.stackIndex],o=t.declarationListContainerEndStack[t.stackIndex],a=t.shouldEmitCommentsStack[t.stackIndex],s=t.shouldEmitSourceMapsStack[t.stackIndex];Fe(n),s&&gr(e),a&&Wn(e,r,i,o),null==L||L(e),t.stackIndex--}}),void 0);function e(e,t,n){const r="left"===n?oe.getParenthesizeLeftSideOfBinaryForOperator(t.operatorToken.kind):oe.getParenthesizeRightSideOfBinaryForOperator(t.operatorToken.kind);let i=Me(0,1,e);if(i===Je&&(xn.assertIsDefined(P),i=Le(1,1,e=r(ut(P,Xu))),P=void 0),(i===Un||i===fr||i===Re)&&uP(e))return e;N=r,i(1,e)}}();return be(),{printNode:function(e,t,n){switch(e){case 0:xn.assert(qN(t),"Expected a SourceFile node.");break;case 2:xn.assert(qD(t),"Expected an Identifier node.");break;case 1:xn.assert(Xu(t),"Expected an Expression node.")}switch(t.kind){case 307:return le(t);case 308:return ce(t)}return ue(e,t,n,fe()),me()},printList:function(e,t,n){return _e(e,t,n,fe()),me()},printFile:le,printBundle:ce,writeNode:ue,writeList:_e,writeFile:pe,writeBundle:de};function ce(e){return de(e,fe(),void 0),me()}function le(e){return pe(e,fe(),void 0),me()}function ue(e,t,n,r){const i=v;ye(r,void 0),ge(e,t,n),be(),v=i}function _e(e,t,n,r){const i=v;ye(r,void 0),n&&he(n),qt(void 0,t,e),be(),v=i}function de(e,t,n){S=!1;const r=v;var i;ye(t,n),Pt(e),Et(e),ze(e),Ct(!!(i=e).hasNoDefaultLib,i.syntheticFileReferences||[],i.syntheticTypeReferences||[],i.syntheticLibReferences||[]);for(const t of e.sourceFiles)ge(0,t,t);be(),v=r}function pe(e,t,n){S=!0;const r=v;ye(t,n),Pt(e),Et(e),ge(0,e,e),be(),v=r}function fe(){return b||(b=Vy(q))}function me(){const e=b.getText();return b.clear(),e}function ge(e,t,n){n&&he(n),Ae(e,t,void 0)}function he(e){n=e,D=void 0,E=void 0,e&&br(e)}function ye(t,n){t&&e.omitTrailingSemicolon&&(t=Uy(t)),k=n,H=!(v=t)||!k}function be(){r=[],i=[],o=[],a=new Set,s=[],c=new Map,l=[],u=0,_=[],d=0,p=[],m=void 0,g=[],h=void 0,n=void 0,D=void 0,E=void 0,ye(void 0,void 0)}function xe(){return D||(D=Ka(xn.checkDefined(n)))}function ke(e,t){void 0!==e&&Ae(4,e,t)}function Te(e){void 0!==e&&Ae(2,e,void 0)}function Ce(e,t){void 0!==e&&Ae(1,e,t)}function Pe(e){Ae(wD(e)?6:4,e)}function Ne(e){K&&4&Zd(e)&&(K=!1)}function Fe(e){K=e}function Ae(e,t,n){N=n,Me(0,e,t)(e,t),N=void 0}function Ie(e){return!ne&&!qN(e)}function Oe(e){return!H&&!qN(e)&&!Lm(e)}function Me(e,t,n){switch(e){case 0:if(A!==k$&&(!I||I(n)))return je;case 1:if(O!==S$&&(P=O(t,n)||n)!==n)return N&&(P=N(P)),Je;case 2:if(Ie(n))return Un;case 3:if(Oe(n))return fr;case 4:return Re;default:return xn.assertNever(e)}}function Le(e,t,n){return Me(e+1,t,n)}function je(e,t){const n=Le(0,e,t);A(e,t,n)}function Re(e,t){if(null==M||M(t),K){const n=K;Ne(t),Be(e,t),Fe(n)}else Be(e,t);null==L||L(t),N=void 0}function Be(e,t,r=!0){if(r){const n=Nw(t);if(n)return function(e,t,n){switch(n.kind){case 1:!function(e,t,n){rn(`\${${n.order}:`),Be(e,t,!1),rn("}")}(e,t,n);break;case 0:!function(e,t,n){xn.assert(242===t.kind,`A tab stop cannot be attached to a node of kind ${xn.formatSyntaxKind(t.kind)}.`),xn.assert(5!==e,"A tab stop cannot be attached to an embedded statement."),rn(`$${n.order}`)}(e,t,n)}}(e,t,n)}if(0===e)return Tt(ut(t,qN));if(2===e)return Ve(ut(t,qD));if(6===e)return qe(ut(t,wD),!0);if(3===e)return function(e){ke(e.name),tn(),Qt("in"),tn(),ke(e.constraint)}(ut(t,aE));if(7===e)return function(e){Gt("{"),tn(),Qt(132===e.token?"assert":"with"),Gt(":"),tn();qt(e,e.elements,526226),tn(),Gt("}")}(ut(t,lN));if(5===e)return xn.assertNode(t,PP),Ye(!0);if(4===e){switch(t.kind){case 16:case 17:case 18:return qe(t,!1);case 80:return Ve(t);case 81:return Ue(t);case 166:return function(e){(function(e){80===e.kind?Ce(e):ke(e)})(e.left),Gt("."),ke(e.right)}(t);case 167:return function(e){Gt("["),Ce(e.expression,oe.parenthesizeExpressionOfComputedPropertyName),Gt("]")}(t);case 168:return function(e){At(e,e.modifiers),ke(e.name),e.constraint&&(tn(),Qt("extends"),tn(),ke(e.constraint)),e.default&&(tn(),Yt("="),tn(),ke(e.default))}(t);case 169:return function(e){Ft(e,e.modifiers,!0),ke(e.dotDotDotToken),Nt(e.name,Zt),ke(e.questionToken),e.parent&&317===e.parent.kind&&!e.name?ke(e.type):It(e.type),Ot(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name?e.name.end:e.modifiers?e.modifiers.end:e.pos,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 170:return a=t,Gt("@"),void Ce(a.expression,oe.parenthesizeLeftSideOfAccess);case 171:return function(e){At(e,e.modifiers),Nt(e.name,nn),ke(e.questionToken),It(e.type),Xt()}(t);case 172:return function(e){Ft(e,e.modifiers,!0),ke(e.name),ke(e.questionToken),ke(e.exclamationToken),It(e.type),Ot(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name.end,e),Xt()}(t);case 173:return function(e){At(e,e.modifiers),ke(e.name),ke(e.questionToken),st(e,dt,_t)}(t);case 174:return function(e){Ft(e,e.modifiers,!0),ke(e.asteriskToken),ke(e.name),ke(e.questionToken),st(e,dt,ct)}(t);case 175:return function(e){Qt("static"),En(e),pt(e.body),Pn(e)}(t);case 176:return function(e){Ft(e,e.modifiers,!1),Qt("constructor"),st(e,dt,ct)}(t);case 177:case 178:return function(e){const t=Ft(e,e.modifiers,!0);tt(177===e.kind?139:153,t,Qt,e),tn(),ke(e.name),st(e,dt,ct)}(t);case 179:return function(e){st(e,dt,_t)}(t);case 180:return function(e){Qt("new"),tn(),st(e,dt,_t)}(t);case 181:return function(e){Ft(e,e.modifiers,!1),qt(e,e.parameters,8848),It(e.type),Xt()}(t);case 182:return function(e){e.assertsModifier&&(ke(e.assertsModifier),tn()),ke(e.parameterName),e.type&&(tn(),Qt("is"),tn(),ke(e.type))}(t);case 183:return function(e){ke(e.typeName),Rt(e,e.typeArguments)}(t);case 184:return function(e){st(e,Ke,We)}(t);case 185:return function(e){At(e,e.modifiers),Qt("new"),tn(),st(e,Ke,We)}(t);case 186:return function(e){Qt("typeof"),tn(),ke(e.exprName),Rt(e,e.typeArguments)}(t);case 187:return function(e){En(e),f(e.members,In),Gt("{");const t=1&Yd(e)?768:32897;qt(e,e.members,524288|t),Gt("}"),Pn(e)}(t);case 188:return function(e){ke(e.elementType,oe.parenthesizeNonArrayTypeOfPostfixType),Gt("["),Gt("]")}(t);case 189:return function(e){tt(23,e.pos,Gt,e);const t=1&Yd(e)?528:657;qt(e,e.elements,524288|t,oe.parenthesizeElementTypeOfTupleType),tt(24,e.elements.end,Gt,e)}(t);case 190:return function(e){ke(e.type,oe.parenthesizeTypeOfOptionalType),Gt("?")}(t);case 192:return function(e){qt(e,e.types,516,oe.parenthesizeConstituentTypeOfUnionType)}(t);case 193:return function(e){qt(e,e.types,520,oe.parenthesizeConstituentTypeOfIntersectionType)}(t);case 194:return function(e){ke(e.checkType,oe.parenthesizeCheckTypeOfConditionalType),tn(),Qt("extends"),tn(),ke(e.extendsType,oe.parenthesizeExtendsTypeOfConditionalType),tn(),Gt("?"),tn(),ke(e.trueType),tn(),Gt(":"),tn(),ke(e.falseType)}(t);case 195:return function(e){Qt("infer"),tn(),ke(e.typeParameter)}(t);case 196:return function(e){Gt("("),ke(e.type),Gt(")")}(t);case 233:return Xe(t);case 197:return void Qt("this");case 198:return function(e){un(e.operator,Qt),tn();const t=148===e.operator?oe.parenthesizeOperandOfReadonlyTypeOperator:oe.parenthesizeOperandOfTypeOperator;ke(e.type,t)}(t);case 199:return function(e){ke(e.objectType,oe.parenthesizeNonArrayTypeOfPostfixType),Gt("["),ke(e.indexType),Gt("]")}(t);case 200:return function(e){const t=Yd(e);Gt("{"),1&t?tn():(on(),an()),e.readonlyToken&&(ke(e.readonlyToken),148!==e.readonlyToken.kind&&Qt("readonly"),tn()),Gt("["),Ae(3,e.typeParameter),e.nameType&&(tn(),Qt("as"),tn(),ke(e.nameType)),Gt("]"),e.questionToken&&(ke(e.questionToken),58!==e.questionToken.kind&&Gt("?")),Gt(":"),tn(),ke(e.type),Xt(),1&t?tn():(on(),sn()),qt(e,e.members,2),Gt("}")}(t);case 201:return function(e){Ce(e.literal)}(t);case 202:return function(e){ke(e.dotDotDotToken),ke(e.name),ke(e.questionToken),tt(59,e.name.end,Gt,e),tn(),ke(e.type)}(t);case 203:return function(e){ke(e.head),qt(e,e.templateSpans,262144)}(t);case 204:return function(e){ke(e.type),ke(e.literal)}(t);case 205:return function(e){e.isTypeOf&&(Qt("typeof"),tn()),Qt("import"),Gt("("),ke(e.argument),e.attributes&&(Gt(","),tn(),Ae(7,e.attributes)),Gt(")"),e.qualifier&&(Gt("."),ke(e.qualifier)),Rt(e,e.typeArguments)}(t);case 206:return function(e){Gt("{"),qt(e,e.elements,525136),Gt("}")}(t);case 207:return function(e){Gt("["),qt(e,e.elements,524880),Gt("]")}(t);case 208:return function(e){ke(e.dotDotDotToken),e.propertyName&&(ke(e.propertyName),Gt(":"),tn()),ke(e.name),Ot(e.initializer,e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 239:return function(e){Ce(e.expression),ke(e.literal)}(t);case 240:return void Xt();case 241:return function(e){Qe(e,!e.multiLine&&Tn(e))}(t);case 243:return function(e){Ft(e,e.modifiers,!1),ke(e.declarationList),Xt()}(t);case 242:return Ye(!1);case 244:return function(e){Ce(e.expression,oe.parenthesizeExpressionOfExpressionStatement),n&&ef(n)&&!ly(e.expression)||Xt()}(t);case 245:return function(e){const t=tt(101,e.pos,Qt,e);tn(),tt(21,t,Gt,e),Ce(e.expression),tt(22,e.expression.end,Gt,e),jt(e,e.thenStatement),e.elseStatement&&(_n(e,e.thenStatement,e.elseStatement),tt(93,e.thenStatement.end,Qt,e),245===e.elseStatement.kind?(tn(),ke(e.elseStatement)):jt(e,e.elseStatement))}(t);case 246:return function(e){tt(92,e.pos,Qt,e),jt(e,e.statement),DP(e.statement)&&!K?tn():_n(e,e.statement,e.expression),Ze(e,e.statement.end),Xt()}(t);case 247:return function(e){Ze(e,e.pos),jt(e,e.statement)}(t);case 248:return function(e){const t=tt(99,e.pos,Qt,e);tn();let n=tt(21,t,Gt,e);et(e.initializer),n=tt(27,e.initializer?e.initializer.end:n,Gt,e),Lt(e.condition),n=tt(27,e.condition?e.condition.end:n,Gt,e),Lt(e.incrementor),tt(22,e.incrementor?e.incrementor.end:n,Gt,e),jt(e,e.statement)}(t);case 249:return function(e){const t=tt(99,e.pos,Qt,e);tn(),tt(21,t,Gt,e),et(e.initializer),tn(),tt(103,e.initializer.end,Qt,e),tn(),Ce(e.expression),tt(22,e.expression.end,Gt,e),jt(e,e.statement)}(t);case 250:return function(e){const t=tt(99,e.pos,Qt,e);tn(),function(e){e&&(ke(e),tn())}(e.awaitModifier),tt(21,t,Gt,e),et(e.initializer),tn(),tt(165,e.initializer.end,Qt,e),tn(),Ce(e.expression),tt(22,e.expression.end,Gt,e),jt(e,e.statement)}(t);case 251:return function(e){tt(88,e.pos,Qt,e),Mt(e.label),Xt()}(t);case 252:return function(e){tt(83,e.pos,Qt,e),Mt(e.label),Xt()}(t);case 253:return function(e){tt(107,e.pos,Qt,e),Lt(e.expression&&it(e.expression),it),Xt()}(t);case 254:return function(e){const t=tt(118,e.pos,Qt,e);tn(),tt(21,t,Gt,e),Ce(e.expression),tt(22,e.expression.end,Gt,e),jt(e,e.statement)}(t);case 255:return function(e){const t=tt(109,e.pos,Qt,e);tn(),tt(21,t,Gt,e),Ce(e.expression),tt(22,e.expression.end,Gt,e),tn(),ke(e.caseBlock)}(t);case 256:return function(e){ke(e.label),tt(59,e.label.end,Gt,e),tn(),ke(e.statement)}(t);case 257:return function(e){tt(111,e.pos,Qt,e),Lt(it(e.expression),it),Xt()}(t);case 258:return function(e){tt(113,e.pos,Qt,e),tn(),ke(e.tryBlock),e.catchClause&&(_n(e,e.tryBlock,e.catchClause),ke(e.catchClause)),e.finallyBlock&&(_n(e,e.catchClause||e.tryBlock,e.finallyBlock),tt(98,(e.catchClause||e.tryBlock).end,Qt,e),tn(),ke(e.finallyBlock))}(t);case 259:return function(e){cn(89,e.pos,Qt),Xt()}(t);case 260:return function(e){var t,n,r;ke(e.name),ke(e.exclamationToken),It(e.type),Ot(e.initializer,(null==(t=e.type)?void 0:t.end)??(null==(r=null==(n=e.name.emitNode)?void 0:n.typeNode)?void 0:r.end)??e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 261:return function(e){rf(e)?(Qt("await"),tn(),Qt("using")):Qt(cf(e)?"let":af(e)?"const":of(e)?"using":"var"),tn(),qt(e,e.declarations,528)}(t);case 262:return function(e){at(e)}(t);case 263:return function(e){gt(e)}(t);case 264:return function(e){Ft(e,e.modifiers,!1),Qt("interface"),tn(),ke(e.name),Bt(e,e.typeParameters),qt(e,e.heritageClauses,512),tn(),Gt("{"),En(e),f(e.members,In),qt(e,e.members,129),Pn(e),Gt("}")}(t);case 265:return function(e){Ft(e,e.modifiers,!1),Qt("type"),tn(),ke(e.name),Bt(e,e.typeParameters),tn(),Gt("="),tn(),ke(e.type),Xt()}(t);case 266:return function(e){Ft(e,e.modifiers,!1),Qt("enum"),tn(),ke(e.name),tn(),Gt("{"),qt(e,e.members,145),Gt("}")}(t);case 267:return function(e){Ft(e,e.modifiers,!1),2048&~e.flags&&(Qt(32&e.flags?"namespace":"module"),tn()),ke(e.name);let t=e.body;if(!t)return Xt();for(;t&&ZP(t);)Gt("."),ke(t.name),t=t.body;tn(),ke(t)}(t);case 268:return function(e){En(e),f(e.statements,An),Qe(e,Tn(e)),Pn(e)}(t);case 269:return function(e){tt(19,e.pos,Gt,e),qt(e,e.clauses,129),tt(20,e.clauses.end,Gt,e,!0)}(t);case 270:return function(e){let t=tt(95,e.pos,Qt,e);tn(),t=tt(130,t,Qt,e),tn(),t=tt(145,t,Qt,e),tn(),ke(e.name),Xt()}(t);case 271:return function(e){Ft(e,e.modifiers,!1),tt(102,e.modifiers?e.modifiers.end:e.pos,Qt,e),tn(),e.isTypeOnly&&(tt(156,e.pos,Qt,e),tn()),ke(e.name),tn(),tt(64,e.name.end,Gt,e),tn(),function(e){80===e.kind?Ce(e):ke(e)}(e.moduleReference),Xt()}(t);case 272:return function(e){Ft(e,e.modifiers,!1),tt(102,e.modifiers?e.modifiers.end:e.pos,Qt,e),tn(),e.importClause&&(ke(e.importClause),tn(),tt(161,e.importClause.end,Qt,e),tn()),Ce(e.moduleSpecifier),e.attributes&&Mt(e.attributes),Xt()}(t);case 273:return function(e){e.isTypeOnly&&(tt(156,e.pos,Qt,e),tn()),ke(e.name),e.name&&e.namedBindings&&(tt(28,e.name.end,Gt,e),tn()),ke(e.namedBindings)}(t);case 274:return function(e){const t=tt(42,e.pos,Gt,e);tn(),tt(130,t,Qt,e),tn(),ke(e.name)}(t);case 280:return function(e){const t=tt(42,e.pos,Gt,e);tn(),tt(130,t,Qt,e),tn(),ke(e.name)}(t);case 275:case 279:return function(e){!function(e){Gt("{"),qt(e,e.elements,525136),Gt("}")}(e)}(t);case 276:case 281:return function(e){!function(e){e.isTypeOnly&&(Qt("type"),tn()),e.propertyName&&(ke(e.propertyName),tn(),tt(130,e.propertyName.end,Qt,e),tn()),ke(e.name)}(e)}(t);case 277:return function(e){const t=tt(95,e.pos,Qt,e);tn(),e.isExportEquals?tt(64,t,Yt,e):tt(90,t,Qt,e),tn(),Ce(e.expression,e.isExportEquals?oe.getParenthesizeRightSideOfBinaryForOperator(64):oe.parenthesizeExpressionOfExportDefault),Xt()}(t);case 278:return function(e){Ft(e,e.modifiers,!1);let t=tt(95,e.pos,Qt,e);tn(),e.isTypeOnly&&(t=tt(156,t,Qt,e),tn()),e.exportClause?ke(e.exportClause):t=tt(42,t,Gt,e),e.moduleSpecifier&&(tn(),tt(161,e.exportClause?e.exportClause.end:t,Qt,e),tn(),Ce(e.moduleSpecifier)),e.attributes&&Mt(e.attributes),Xt()}(t);case 300:return function(e){tt(e.token,e.pos,Qt,e),tn();qt(e,e.elements,526226)}(t);case 301:return function(e){ke(e.name),Gt(":"),tn();const t=e.value;0==(1024&Yd(t))&&sr(fw(t).pos),ke(t)}(t);case 282:case 319:case 330:case 331:case 333:case 334:case 335:case 336:case 353:return;case 283:return function(e){Qt("require"),Gt("("),Ce(e.expression),Gt(")")}(t);case 12:return function(e){v.writeLiteral(e.text)}(t);case 286:case 289:return function(e){if(Gt("<"),CN(e)){const t=vn(e.tagName,e);ht(e.tagName),Rt(e,e.typeArguments),e.attributes.properties&&e.attributes.properties.length>0&&tn(),ke(e.attributes),bn(e.attributes,e),fn(t)}Gt(">")}(t);case 287:case 290:return function(e){Gt("")}(t);case 291:return function(e){ke(e.name),function(e,t,n,r){n&&(t("="),r(n))}(0,Gt,e.initializer,Pe)}(t);case 292:return function(e){qt(e,e.properties,262656)}(t);case 293:return function(e){Gt("{..."),Ce(e.expression),Gt("}")}(t);case 294:return function(e){var t,r;if(e.expression||!ne&&!ly(e)&&(function(e){let t=!1;return ms((null==n?void 0:n.text)||"",e+1,(()=>t=!0)),t}(r=e.pos)||function(e){let t=!1;return fs((null==n?void 0:n.text)||"",e+1,(()=>t=!0)),t}(r))){const r=n&&!ly(e)&&Xa(n,e.pos).line!==Xa(n,e.end).line;r&&v.increaseIndent();const i=tt(19,e.pos,Gt,e);ke(e.dotDotDotToken),Ce(e.expression),tt(20,(null==(t=e.expression)?void 0:t.end)||i,Gt,e),r&&v.decreaseIndent()}}(t);case 295:return function(e){Te(e.namespace),Gt(":"),Te(e.name)}(t);case 296:return function(e){tt(84,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeExpressionForDisallowedComma),yt(e,e.statements,e.expression.end)}(t);case 297:return function(e){const t=tt(90,e.pos,Qt,e);yt(e,e.statements,t)}(t);case 298:return function(e){tn(),un(e.token,Qt),tn(),qt(e,e.types,528)}(t);case 299:return function(e){const t=tt(85,e.pos,Qt,e);tn(),e.variableDeclaration&&(tt(21,t,Gt,e),ke(e.variableDeclaration),tt(22,e.variableDeclaration.end,Gt,e),tn()),ke(e.block)}(t);case 303:return function(e){ke(e.name),Gt(":"),tn();const t=e.initializer;0==(1024&Yd(t))&&sr(fw(t).pos),Ce(t,oe.parenthesizeExpressionForDisallowedComma)}(t);case 304:return function(e){ke(e.name),e.objectAssignmentInitializer&&(tn(),Gt("="),tn(),Ce(e.objectAssignmentInitializer,oe.parenthesizeExpressionForDisallowedComma))}(t);case 305:return function(e){e.expression&&(tt(26,e.pos,Gt,e),Ce(e.expression,oe.parenthesizeExpressionForDisallowedComma))}(t);case 306:return function(e){ke(e.name),Ot(e.initializer,e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 307:return Tt(t);case 308:return xn.fail("Bundles should be printed using printBundle");case 309:return kt(t);case 310:return function(e){tn(),Gt("{"),ke(e.name),Gt("}")}(t);case 312:return Gt("*");case 313:return Gt("?");case 314:return function(e){Gt("?"),ke(e.type)}(t);case 315:return function(e){Gt("!"),ke(e.type)}(t);case 316:return function(e){ke(e.type),Gt("=")}(t);case 317:return function(e){Qt("function"),Jt(e,e.parameters),Gt(":"),ke(e.type)}(t);case 191:case 318:return function(e){Gt("..."),ke(e.type)}(t);case 320:return function(e){if(W("/**"),e.comment){const t=fl(e.comment);if(t){const e=t.split(/\r\n?|\n/g);for(const t of e)on(),tn(),Gt("*"),tn(),W(t)}}e.tags&&(1!==e.tags.length||344!==e.tags[0].kind||e.comment?qt(e,e.tags,33):(tn(),ke(e.tags[0]))),tn(),W("*/")}(t);case 322:return vt(t);case 323:return bt(t);case 327:case 332:case 337:return xt((o=t).tagName),void St(o.comment);case 328:case 329:return function(e){xt(e.tagName),tn(),Gt("{"),ke(e.class),Gt("}"),St(e.comment)}(t);case 338:return function(e){xt(e.tagName),e.name&&(tn(),ke(e.name)),St(e.comment),bt(e.typeExpression)}(t);case 339:return function(e){St(e.comment),bt(e.typeExpression)}(t);case 341:case 348:return xt((i=t).tagName),kt(i.typeExpression),tn(),i.isBracketed&&Gt("["),ke(i.name),i.isBracketed&&Gt("]"),void St(i.comment);case 340:case 342:case 343:case 344:case 349:case 350:return function(e){xt(e.tagName),kt(e.typeExpression),St(e.comment)}(t);case 345:return function(e){xt(e.tagName),kt(e.constraint),tn(),qt(e,e.typeParameters,528),St(e.comment)}(t);case 346:return function(e){xt(e.tagName),e.typeExpression&&(309===e.typeExpression.kind?kt(e.typeExpression):(tn(),Gt("{"),W("Object"),e.typeExpression.isArrayType&&(Gt("["),Gt("]")),Gt("}"))),e.fullName&&(tn(),ke(e.fullName)),St(e.comment),e.typeExpression&&322===e.typeExpression.kind&&vt(e.typeExpression)}(t);case 347:return function(e){xt(e.tagName),ke(e.name),St(e.comment)}(t);case 351:return function(e){xt(e.tagName),tn(),e.importClause&&(ke(e.importClause),tn(),tt(161,e.importClause.end,Qt,e),tn()),Ce(e.moduleSpecifier),e.attributes&&Mt(e.attributes),St(e.comment)}(t)}if(Xu(t)&&(e=1,O!==S$)){const n=O(e,t)||t;n!==t&&(t=n,N&&(t=N(t)))}}var i,o,a;if(1===e)switch(t.kind){case 9:case 10:return function(e){qe(e,!1)}(t);case 11:case 14:case 15:return qe(t,!1);case 80:return Ve(t);case 81:return Ue(t);case 209:return function(e){Vt(e,e.elements,8914|(e.multiLine?65536:0),oe.parenthesizeExpressionForDisallowedComma)}(t);case 210:return function(e){En(e),f(e.properties,In);const t=131072&Yd(e);t&&an();const r=e.multiLine?65536:0,i=n&&n.languageVersion>=1&&!ef(n)?64:0;qt(e,e.properties,526226|i|r),t&&sn(),Pn(e)}(t);case 211:return function(e){Ce(e.expression,oe.parenthesizeLeftSideOfAccess);const t=e.questionDotToken||FT(YC.createToken(25),e.expression.end,e.name.pos),n=kn(e,e.expression,t),r=kn(e,t,e.name);pn(n,!1),29===t.kind||!function(e){if(TD(e=El(e))){const t=Dn(e,!0,!1);return!(448&e.numericLiteralFlags||t.includes(Ra(25))||t.includes(String.fromCharCode(69))||t.includes(String.fromCharCode(101)))}if(Ox(e)){const t=kw(e);return"number"==typeof t&&isFinite(t)&&t>=0&&Math.floor(t)===t}}(e.expression)||v.hasTrailingComment()||v.hasTrailingWhitespace()||Gt("."),e.questionDotToken?ke(t):tt(t.kind,e.expression.end,Gt,e),pn(r,!1),ke(e.name),fn(n,r)}(t);case 212:return function(e){Ce(e.expression,oe.parenthesizeLeftSideOfAccess),ke(e.questionDotToken),tt(23,e.expression.end,Gt,e),Ce(e.argumentExpression),tt(24,e.argumentExpression.end,Gt,e)}(t);case 213:return function(e){const t=16&Zd(e);t&&(Gt("("),Wt("0"),Gt(","),tn()),Ce(e.expression,oe.parenthesizeLeftSideOfAccess),t&&Gt(")"),ke(e.questionDotToken),Rt(e,e.typeArguments),Vt(e,e.arguments,2576,oe.parenthesizeExpressionForDisallowedComma)}(t);case 214:return function(e){tt(105,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeExpressionOfNew),Rt(e,e.typeArguments),Vt(e,e.arguments,18960,oe.parenthesizeExpressionForDisallowedComma)}(t);case 215:return function(e){const t=16&Zd(e);t&&(Gt("("),Wt("0"),Gt(","),tn()),Ce(e.tag,oe.parenthesizeLeftSideOfAccess),t&&Gt(")"),Rt(e,e.typeArguments),tn(),Ce(e.template)}(t);case 216:return function(e){Gt("<"),ke(e.type),Gt(">"),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 217:return function(e){const t=tt(21,e.pos,Gt,e),n=vn(e.expression,e);Ce(e.expression,void 0),bn(e.expression,e),fn(n),tt(22,e.expression?e.expression.end:t,Gt,e)}(t);case 218:return function(e){On(e.name),at(e)}(t);case 219:return function(e){At(e,e.modifiers),st(e,He,Ge)}(t);case 220:return function(e){tt(91,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 221:return function(e){tt(114,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 222:return function(e){tt(116,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 223:return function(e){tt(135,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 224:return function(e){un(e.operator,Yt),function(e){const t=e.operand;return 224===t.kind&&(40===e.operator&&(40===t.operator||46===t.operator)||41===e.operator&&(41===t.operator||47===t.operator))}(e)&&tn(),Ce(e.operand,oe.parenthesizeOperandOfPrefixUnary)}(t);case 225:return function(e){Ce(e.operand,oe.parenthesizeOperandOfPostfixUnary),un(e.operator,Yt)}(t);case 226:return se(t);case 227:return function(e){const t=kn(e,e.condition,e.questionToken),n=kn(e,e.questionToken,e.whenTrue),r=kn(e,e.whenTrue,e.colonToken),i=kn(e,e.colonToken,e.whenFalse);Ce(e.condition,oe.parenthesizeConditionOfConditionalExpression),pn(t,!0),ke(e.questionToken),pn(n,!0),Ce(e.whenTrue,oe.parenthesizeBranchOfConditionalExpression),fn(t,n),pn(r,!0),ke(e.colonToken),pn(i,!0),Ce(e.whenFalse,oe.parenthesizeBranchOfConditionalExpression),fn(r,i)}(t);case 228:return function(e){ke(e.head),qt(e,e.templateSpans,262144)}(t);case 229:return function(e){tt(127,e.pos,Qt,e),ke(e.asteriskToken),Lt(e.expression&&it(e.expression),ot)}(t);case 230:return function(e){tt(26,e.pos,Gt,e),Ce(e.expression,oe.parenthesizeExpressionForDisallowedComma)}(t);case 231:return function(e){On(e.name),gt(e)}(t);case 232:case 282:case 353:return;case 234:return function(e){Ce(e.expression,void 0),e.type&&(tn(),Qt("as"),tn(),ke(e.type))}(t);case 235:return function(e){Ce(e.expression,oe.parenthesizeLeftSideOfAccess),Yt("!")}(t);case 233:return Xe(t);case 238:return function(e){Ce(e.expression,void 0),e.type&&(tn(),Qt("satisfies"),tn(),ke(e.type))}(t);case 236:return function(e){cn(e.keywordToken,e.pos,Gt),Gt("."),ke(e.name)}(t);case 237:return xn.fail("SyntheticExpression should never be printed.");case 284:return function(e){ke(e.openingElement),qt(e,e.children,262144),ke(e.closingElement)}(t);case 285:return function(e){Gt("<"),ht(e.tagName),Rt(e,e.typeArguments),tn(),ke(e.attributes),Gt("/>")}(t);case 288:return function(e){ke(e.openingFragment),qt(e,e.children,262144),ke(e.closingFragment)}(t);case 352:return xn.fail("SyntaxList should not be printed");case 354:return function(e){const t=Yd(e);1024&t||e.pos===e.expression.pos||sr(e.expression.pos),Ce(e.expression),2048&t||e.end===e.expression.end||or(e.expression.end)}(t);case 355:return function(e){Vt(e,e.elements,528,void 0)}(t);case 356:return xn.fail("SyntheticReferenceExpression should not be printed")}return Ph(t.kind)?ln(t,Qt):Ml(t.kind)?ln(t,Gt):void xn.fail(`Unhandled SyntaxKind: ${xn.formatSyntaxKind(t.kind)}.`)}function Je(e,t){const n=Le(1,e,t);xn.assertIsDefined(P),t=P,P=void 0,n(e,t)}function ze(t){let r=!1;const i=308===t.kind?t:void 0;if(i&&0===V)return;const o=i?i.sourceFiles.length:1;for(let a=0;a")}function We(e){tn(),ke(e.type)}function He(e){Bt(e,e.typeParameters),zt(e,e.parameters),It(e.type),tn(),ke(e.equalsGreaterThanToken)}function Ge(e){DP(e.body)?pt(e.body):(tn(),Ce(e.body,oe.parenthesizeConciseBodyOfArrowFunction))}function Xe(e){Ce(e.expression,oe.parenthesizeLeftSideOfAccess),Rt(e,e.typeArguments)}function Qe(e,t){tt(19,e.pos,Gt,e);const n=t||1&Yd(e)?768:129;qt(e,e.statements,n),tt(20,e.statements.end,Gt,e,!!(1&n))}function Ye(e){e?Gt(";"):Xt()}function Ze(e,t){const n=tt(117,t,Qt,e);tn(),tt(21,n,Gt,e),Ce(e.expression),tt(22,e.expression.end,Gt,e)}function et(e){void 0!==e&&(261===e.kind?ke(e):Ce(e))}function tt(e,t,r,i,o){const a=hc(i),s=a&&a.kind===i.kind,c=t;if(s&&n&&(t=as(n.text,t)),s&&i.pos!==c){const e=o&&n&&!ix(c,t,n);e&&an(),or(c),e&&sn()}if(t=$||19!==e&&20!==e?un(e,r,t):cn(e,t,r,i),s&&i.end!==t){const e=294===i.kind;sr(t,!e,e)}return t}function nt(e){return 2===e.kind||!!e.hasTrailingNewLine}function rt(e){if(!n)return!1;const t=vs(n.text,e.pos);if(t){const t=hc(e);if(t&&tP(t.parent))return!0}return!!Q(t,nt)||!!Q(gw(e),nt)||!!kP(e)&&(!(e.pos===e.expression.pos||!Q(bs(n.text,e.expression.pos),nt))||rt(e.expression))}function it(e){if(!ne&&kP(e)&&rt(e)){const t=hc(e);if(t&&tP(t)){const n=YC.createParenthesizedExpression(e.expression);return ew(n,e),sI(n,t),n}return YC.createParenthesizedExpression(e)}return e}function ot(e){return it(oe.parenthesizeExpressionForDisallowedComma(e))}function at(e){Ft(e,e.modifiers,!1),Qt("function"),ke(e.asteriskToken),tn(),Te(e.name),st(e,dt,ct)}function st(e,t,n){const r=131072&Yd(e);r&&an(),En(e),f(e.parameters,An),t(e),n(e),Pn(e),r&&sn()}function ct(e){const t=e.body;t?pt(t):Xt()}function _t(e){Xt()}function dt(e){Bt(e,e.typeParameters),Jt(e,e.parameters),It(e.type)}function pt(e){An(e),null==M||M(e),tn(),Gt("{"),an();const t=function(e){if(1&Yd(e))return!0;if(e.multiLine)return!1;if(!ly(e)&&n&&!Xb(e,n))return!1;if(mn(e,Se(e.statements),2)||hn(e,we(e.statements),2,e.statements))return!1;let t;for(const n of e.statements){if(gn(t,n,2)>0)return!1;t=n}return!0}(e)?ft:mt;Yn(e,e.statements,t),sn(),cn(20,e.statements.end,Gt,e),null==L||L(e)}function ft(e){mt(e,!0)}function mt(e,t){const n=Dt(e.statements),r=v.getTextPos();ze(e),0===n&&r===v.getTextPos()&&t?(sn(),qt(e,e.statements,768),an()):qt(e,e.statements,1,void 0,n)}function gt(e){Ft(e,e.modifiers,!0),tt(86,Wb(e).pos,Qt,e),e.name&&(tn(),Te(e.name));const t=131072&Yd(e);t&&an(),Bt(e,e.typeParameters),qt(e,e.heritageClauses,0),tn(),Gt("{"),En(e),f(e.members,In),qt(e,e.members,129),Pn(e),Gt("}"),t&&sn()}function ht(e){80===e.kind?Ce(e):ke(e)}function yt(e,t,r){let i=163969;1===t.length&&(!n||ly(e)||ly(t[0])||Qb(e,t[0],n))?(cn(59,r,Gt,e),tn(),i&=-130):tt(59,r,Gt,e),qt(e,t,i)}function vt(e){qt(e,YC.createNodeArray(e.jsDocPropertyTags),33)}function bt(e){e.typeParameters&&qt(e,YC.createNodeArray(e.typeParameters),33),e.parameters&&qt(e,YC.createNodeArray(e.parameters),33),e.type&&(on(),tn(),Gt("*"),tn(),ke(e.type))}function xt(e){Gt("@"),ke(e)}function St(e){const t=fl(e);t&&(tn(),W(t))}function kt(e){e&&(tn(),Gt("{"),ke(e.type),Gt("}"))}function Tt(e){on();const t=e.statements;0===t.length||!pf(t[0])||ly(t[0])?Yn(e,t,wt):wt(e)}function Ct(e,t,r,i){if(e&&(en('/// '),on()),n&&n.moduleName&&(en(`/// `),on()),n&&n.amdDependencies)for(const e of n.amdDependencies)e.name?en(`/// `):en(`/// `),on();function o(e,t){for(const n of t){const t=n.resolutionMode?`resolution-mode="${99===n.resolutionMode?"import":"require"}" `:"",r=n.preserve?'preserve="true" ':"";en(`/// `),on()}}o("path",t),o("types",r),o("lib",i)}function wt(e){const t=e.statements;En(e),f(e.statements,An),ze(e);const n=T(t,(e=>!pf(e)));!function(e){e.isDeclarationFile&&Ct(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives,e.libReferenceDirectives)}(e),qt(e,t,1,void 0,-1===n?t.length:n),Pn(e)}function Dt(e,t,n){let r=!!t;for(let i=0;i=r.length||0===s;if(c&&32768&i)return null==j||j(r),void(null==R||R(r));15360&i&&(Gt(function(e){return w$[15360&e][0]}(i)),c&&r&&sr(r.pos,!0)),null==j||j(r),c?!(1&i)||K&&(!t||n&&Xb(t,n))?256&i&&!(524288&i)&&tn():on():Kt(e,t,r,i,o,a,s,r.hasTrailingComma,r),null==R||R(r),15360&i&&(c&&r&&or(r.end),Gt(function(e){return w$[15360&e][1]}(i)))}function Kt(e,t,n,r,i,o,a,s,c){const l=0==(262144&r);let u=l;const _=mn(t,n[o],r);_?(on(_),u=!1):256&r&&tn(),128&r&&an();const d=function(e,t){return 1===e.length?iq:"object"==typeof t?oq:aq}(e,i);let p,f=!1;for(let s=0;s0?(0==(131&r)&&(an(),f=!0),u&&60&r&&!iT(a.pos)&&sr(fw(a).pos,!!(512&r),!0),on(e),u=!1):p&&512&r&&tn()}u?sr(fw(a).pos):u=l,y=a.pos,d(a,e,i,s),f&&(sn(),f=!1),p=a}const m=p?Yd(p):0,g=ne||!!(2048&m),h=s&&64&r&&16&r;h&&(p&&!g?tt(28,p.end,Gt,p):Gt(",")),p&&(t?t.end:-1)!==p.end&&60&r&&!g&&or(h&&(null==c?void 0:c.end)?c.end:p.end),128&r&&sn();const v=hn(t,n[o+a-1],r,c);v?on(v):2097408&r&&tn()}function Wt(e){v.writeLiteral(e)}function Ht(e,t){v.writeSymbol(e,t)}function Gt(e){v.writePunctuation(e)}function Xt(){v.writeTrailingSemicolon(";")}function Qt(e){v.writeKeyword(e)}function Yt(e){v.writeOperator(e)}function Zt(e){v.writeParameter(e)}function en(e){v.writeComment(e)}function tn(){v.writeSpace(" ")}function nn(e){v.writeProperty(e)}function rn(e){v.nonEscapingWrite?v.nonEscapingWrite(e):v.write(e)}function on(e=1){for(let t=0;t0)}function an(){v.increaseIndent()}function sn(){v.decreaseIndent()}function cn(e,t,n,r){return H?un(e,n,t):function(e,t,n,r,i){if(H||e&&Lm(e))return i(t,n,r);const o=e&&e.emitNode,a=o&&o.flags||0,s=o&&o.tokenSourceMapRanges&&o.tokenSourceMapRanges[t],c=s&&s.source||C;return r=hr(c,s?s.pos:r),0==(256&a)&&r>=0&&vr(c,r),r=i(t,n,r),s&&(r=s.end),0==(512&a)&&r>=0&&vr(c,r),r}(r,e,n,t,un)}function ln(e,t){B&&B(e),t(Ra(e.kind)),J&&J(e)}function un(e,t,n){const r=Ra(e);return t(r),n<0?n:n+r.length}function _n(e,t,n){if(1&Yd(e))tn();else if(K){const r=kn(e,t,n);r?on(r):tn()}else on()}function dn(e){const t=e.split(/\r\n?|\n/g),n=z_(t);for(const e of t){const t=n?e.slice(n):e;t.length&&(on(),W(t))}}function pn(e,t){e?(an(),on(e)):t&&tn()}function fn(e,t){e&&sn(),t&&sn()}function mn(e,t,r){if(2&r||K){if(65536&r)return 1;if(void 0===t)return!e||n&&Xb(e,n)?0:1;if(t.pos===y)return 0;if(12===t.kind)return 0;if(n&&e&&!iT(e.pos)&&!ly(t)&&(!t.parent||fc(t.parent)===fc(e)))return K?yn((r=>ax(t.pos,e.pos,n,r))):Qb(e,t,n)?0:1;if(Sn(t,r))return 1}return 1&r?1:0}function gn(e,t,r){if(2&r||K){if(void 0===e||void 0===t)return 0;if(12===t.kind)return 0;if(n&&!ly(e)&&!ly(t))return K&&function(e,t){if(t.pos-1&&r.indexOf(t)===i+1}(e,t)?yn((r=>tx(e,t,n,r))):!K&&(o=t,(i=fc(i=e)).parent&&i.parent===fc(o).parent)?ex(e,t,n)?0:1:65536&r?1:0;if(Sn(e,r)||Sn(t,r))return 1}else if(dw(t))return 1;var i,o;return 1&r?1:0}function hn(e,t,r,i){if(2&r||K){if(65536&r)return 1;if(void 0===t)return!e||n&&Xb(e,n)?0:1;if(n&&e&&!iT(e.pos)&&!ly(t)&&(!t.parent||t.parent===e)){if(K){const r=i&&!iT(i.end)?i.end:t.end;return yn((t=>sx(r,e.end,n,t)))}return Yb(e,t,n)?0:1}if(Sn(t,r))return 1}return 1&r&&!(131072&r)?1:0}function yn(e){xn.assert(!!K);const t=e(!0);return 0===t?e(!1):t}function vn(e,t){const n=K&&mn(t,e,0);return n&&pn(n,!1),!!n}function bn(e,t){const n=K&&hn(t,e,0,void 0);n&&on(n)}function Sn(e,t){if(ly(e)){const n=dw(e);return void 0===n?0!=(65536&t):n}return 0!=(65536&t)}function kn(e,t,r){return 262144&Yd(e)?0:(e=Cn(e),t=Cn(t),dw(r=Cn(r))?1:!n||ly(e)||ly(t)||ly(r)?0:K?yn((e=>tx(t,r,n,e))):ex(t,r,n)?0:1)}function Tn(e){return 0===e.statements.length&&(!n||ex(e,e,n))}function Cn(e){for(;217===e.kind&&ly(e);)e=e.expression;return e}function wn(e,t){if(Xl(e)||Ql(e))return Mn(e);if(wD(e)&&e.textSourceNode)return wn(e.textSourceNode,t);const r=n,i=!!r&&!!e.parent&&!ly(e);if(hl(e)){if(!i||Sd(e)!==fc(r))return bc(e)}else if(ON(e)){if(!i||Sd(e)!==fc(r))return pC(e)}else if(xn.assertNode(e,Bl),!i)return e.text;return Kd(r,e,t)}function Dn(t,r,i){if(11===t.kind&&t.textSourceNode){const e=t.textSourceNode;if(qD(e)||VD(e)||TD(e)||ON(e)){const n=TD(e)?e.text:wn(e);return i?`"${Ry(n)}"`:r||16777216&Yd(t)?`"${Fy(n)}"`:`"${Iy(n)}"`}return Dn(e,r,i)}const o=(r?1:0)|(i?2:0)|(e.terminateUnterminatedLiterals?4:0)|(e.target&&e.target>=8?8:0);return np(t,n,o)}function En(e){l.push(u),u=0,g.push(h),e&&1048576&Yd(e)||(_.push(d),d=0,s.push(c),c=void 0,p.push(m))}function Pn(e){u=l.pop(),h=g.pop(),e&&1048576&Yd(e)||(d=_.pop(),c=s.pop(),m=p.pop())}function Nn(e){m&&m!==we(p)||(m=new Set),m.add(e)}function Fn(e){h&&h!==we(g)||(h=new Set),h.add(e)}function An(e){if(e)switch(e.kind){case 241:case 296:case 297:f(e.statements,An);break;case 256:case 254:case 246:case 247:An(e.statement);break;case 245:An(e.thenStatement),An(e.elseStatement);break;case 248:case 250:case 249:An(e.initializer),An(e.statement);break;case 255:An(e.caseBlock);break;case 269:f(e.clauses,An);break;case 258:An(e.tryBlock),An(e.catchClause),An(e.finallyBlock);break;case 299:An(e.variableDeclaration),An(e.block);break;case 243:An(e.declarationList);break;case 261:f(e.declarations,An);break;case 260:case 169:case 208:case 263:case 274:case 280:On(e.name);break;case 262:On(e.name),1048576&Yd(e)&&(f(e.parameters,An),An(e.body));break;case 206:case 207:case 275:f(e.elements,An);break;case 272:An(e.importClause);break;case 273:On(e.name),An(e.namedBindings);break;case 276:On(e.propertyName||e.name)}}function In(e){if(e)switch(e.kind){case 303:case 304:case 172:case 171:case 174:case 173:case 177:case 178:On(e.name)}}function On(e){e&&(Xl(e)||Ql(e)?Mn(e):Eu(e)&&An(e))}function Mn(e){const t=e.emitNode.autoGenerate;if(4==(7&t.flags))return Ln(QA(e),VD(e),t.flags,t.prefix,t.suffix);{const n=t.id;return o[n]||(o[n]=function(e){const t=e.emitNode.autoGenerate,n=YA(t.prefix,Mn),r=YA(t.suffix);switch(7&t.flags){case 1:return Jn(0,!!(8&t.flags),VD(e),n,r);case 2:return xn.assertNode(e,qD),Jn(268435456,!!(8&t.flags),!1,n,r);case 3:return zn(bc(e),32&t.flags?Rn:jn,!!(16&t.flags),!!(8&t.flags),VD(e),n,r)}return xn.fail(`Unsupported GeneratedIdentifierKind: ${xn.formatEnum(7&t.flags,Fr,!0)}.`)}(e))}}function Ln(e,t,n,o,a){const s=IB(e),c=t?i:r;return c[s]||(c[s]=Vn(e,t,n??0,YA(o,Mn),YA(a)))}function jn(e,t){return Rn(e)&&!function(e,t){let n,r;if(t?(n=h,r=g):(n=m,r=p),null==n?void 0:n.has(e))return!0;for(let t=r.length-1;t>=0;t--)if(n!==r[t]&&(n=r[t],null==n?void 0:n.has(e)))return!0;return!1}(e,t)&&!a.has(e)}function Rn(e,t){return!n||Pd(n,e,F)}function Bn(e,t){switch(e){case"":d=t;break;case"#":u=t;break;default:c??(c=new Map),c.set(e,t)}}function Jn(e,t,n,r,i){r.length>0&&35===r.charCodeAt(0)&&(r=r.slice(1));const o=ZA(n,r,"",i);let a=function(e){switch(e){case"":return d;case"#":return u;default:return(null==c?void 0:c.get(e))??0}}(o);if(e&&!(a&e)){const s=ZA(n,r,268435456===e?"_i":"_n",i);if(jn(s,n))return a|=e,n?Fn(s):t&&Nn(s),Bn(o,a),s}for(;;){const e=268435455&a;if(a++,8!==e&&13!==e){const s=ZA(n,r,e<26?"_"+String.fromCharCode(97+e):"_"+(e-26),i);if(jn(s,n))return n?Fn(s):t&&Nn(s),Bn(o,a),s}}}function zn(e,t=jn,n,r,i,o,s){if(e.length>0&&35===e.charCodeAt(0)&&(e=e.slice(1)),o.length>0&&35===o.charCodeAt(0)&&(o=o.slice(1)),n){const n=ZA(i,o,e,s);if(t(n,i))return i?Fn(n):r?Nn(n):a.add(n),n}95!==e.charCodeAt(e.length-1)&&(e+="_");let c=1;for(;;){const n=ZA(i,o,e+c,s);if(t(n,i))return i?Fn(n):r?Nn(n):a.add(n),n;c++}}function $n(e){return zn(e,Rn,!0,!1,!1,"","")}function qn(){return zn("default",jn,!1,!1,!1,"","")}function Vn(e,t,n,r,i){switch(e.kind){case 80:case 81:return zn(wn(e),jn,!!(16&n),!!(8&n),t,r,i);case 267:case 266:return xn.assert(!r&&!i&&!t),function(e){const t=wn(e.name);return function(e,t){for(let n=t;n&&_h(n,t);n=n.nextContainer)if(f_(n)&&n.locals){const t=n.locals.get(yc(e));if(t&&3257279&t.flags)return!1}return!0}(t,lt(e,f_))?t:zn(t,jn,!1,!1,!1,"","")}(e);case 272:case 278:return xn.assert(!r&&!i&&!t),function(e){const t=Cg(e);return zn(wD(t)?ip(t.text):"module",jn,!1,!1,!1,"","")}(e);case 262:case 263:{xn.assert(!r&&!i&&!t);const o=e.name;return o&&!Xl(o)?Vn(o,!1,n,r,i):qn()}case 277:return xn.assert(!r&&!i&&!t),qn();case 231:return xn.assert(!r&&!i&&!t),zn("class",jn,!1,!1,!1,"","");case 174:case 177:case 178:return function(e,t,n,r){return qD(e.name)?Ln(e.name,t):Jn(0,!1,t,n,r)}(e,t,r,i);case 167:return Jn(0,!0,t,r,i);default:return Jn(0,!1,t,r,i)}}function Un(e,t){const n=Le(2,e,t),r=Y,i=Z,o=ee;Kn(t),n(e,t),Wn(t,r,i,o)}function Kn(e){const t=Yd(e),n=fw(e);!function(e,t,n,r){re(),te=!1;const i=n<0||0!=(1024&t)||12===e.kind,o=r<0||0!=(2048&t)||12===e.kind;(n>0||r>0)&&n!==r&&(i||Zn(n,353!==e.kind),(!i||n>=0&&0!=(1024&t))&&(Y=n),(!o||r>=0&&0!=(2048&t))&&(Z=r,261===e.kind&&(ee=r))),f(gw(e),Gn),ie()}(e,t,n.pos,n.end),4096&t&&(ne=!0)}function Wn(e,t,n,r){const i=Yd(e),o=fw(e);4096&i&&(ne=!1),Hn(e,i,o.pos,o.end,t,n,r);const a=Ow(e);a&&Hn(e,i,a.pos,a.end,t,n,r)}function Hn(e,t,n,r,i,o,a){re();const s=r<0||0!=(2048&t)||12===e.kind;f(vw(e),Xn),(n>0||r>0)&&n!==r&&(Y=i,Z=o,ee=a,s||353===e.kind||function(e){_r(e,ar)}(r)),ie()}function Gn(e){(e.hasLeadingNewline||2===e.kind)&&v.writeLine(),Qn(e),e.hasTrailingNewLine||2===e.kind?v.writeLine():v.writeSpace(" ")}function Xn(e){v.isAtStartOfLine()||v.writeSpace(" "),Qn(e),e.hasTrailingNewLine&&v.writeLine()}function Qn(e){const t=function(e){return 3===e.kind?`/*${e.text}*/`:`//${e.text}`}(e);Iv(t,3===e.kind?qa(t):void 0,v,0,t.length,q)}function Yn(e,t,r){re();const{pos:i,end:o}=t,a=Yd(e),s=ne||o<0||0!=(2048&a);i<0||0!=(1024&a)||function(e){const t=n&&Av(n.text,xe(),v,dr,e,q,ne);t&&(E?E.push(t):E=[t])}(t),ie(),4096&a&&!ne?(ne=!0,r(e),ne=!1):r(e),re(),s||(Zn(t.end,!0),te&&!v.isAtStartOfLine()&&v.writeLine()),ie()}function Zn(e,t){te=!1,t?0===e&&(null==n?void 0:n.isDeclarationFile)?ur(e,tr):ur(e,ir):0===e&&ur(e,er)}function er(e,t,n,r,i){pr(e,t)&&ir(e,t,n,r,i)}function tr(e,t,n,r,i){pr(e,t)||ir(e,t,n,r,i)}function nr(t,n){return!e.onlyPrintJsDocStyle||fI(t,n)||$d(t,n)}function ir(e,t,r,i,o){n&&nr(n.text,e)&&(te||(Nv(xe(),v,o,e),te=!0),yr(e),Iv(n.text,xe(),v,e,t,q),yr(t),i?v.writeLine():3===r&&v.writeSpace(" "))}function or(e){ne||-1===e||Zn(e,!0)}function ar(e,t,r,i){n&&nr(n.text,e)&&(v.isAtStartOfLine()||v.writeSpace(" "),yr(e),Iv(n.text,xe(),v,e,t,q),yr(t),i&&v.writeLine())}function sr(e,t,n){ne||(re(),_r(e,t?ar:n?cr:lr),ie())}function cr(e,t,r){n&&(yr(e),Iv(n.text,xe(),v,e,t,q),yr(t),2===r&&v.writeLine())}function lr(e,t,r,i){n&&(yr(e),Iv(n.text,xe(),v,e,t,q),yr(t),i?v.writeLine():v.writeSpace(" "))}function ur(e,t){!n||-1!==Y&&e===Y||(function(e){return void 0!==E&&De(E).nodePos===e}(e)?function(e){if(!n)return;const t=De(E).detachedCommentEndPos;E.length-1?E.pop():E=void 0,fs(n.text,t,e,t)}(t):fs(n.text,e,t,e))}function _r(e,t){n&&(-1===Z||e!==Z&&e!==ee)&&ms(n.text,e,t)}function dr(e,t,r,i,o,a){n&&nr(n.text,i)&&(yr(i),Iv(e,t,r,i,o,a),yr(o))}function pr(e,t){return!!n&&zd(n.text,e,t)}function fr(e,t){const n=Le(3,e,t);mr(t),n(e,t),gr(t)}function mr(e){const t=Yd(e),n=cw(e),r=n.source||C;353!==e.kind&&0==(32&t)&&n.pos>=0&&vr(n.source||C,hr(r,n.pos)),128&t&&(H=!0)}function gr(e){const t=Yd(e),n=cw(e);128&t&&(H=!1),353!==e.kind&&0==(64&t)&&n.end>=0&&vr(n.source||C,n.end)}function hr(e,t){return e.skipTrivia?e.skipTrivia(t):as(e.text,t)}function yr(e){if(H||iT(e)||xr(C))return;const{line:t,character:n}=Xa(C,e);k.addMapping(v.getLine(),v.getColumn(),G,t,n,void 0)}function vr(e,t){if(e!==C){const n=C,r=G;br(e),yr(t),function(e,t){C=e,G=t}(n,r)}else yr(t)}function br(t){H||(C=t,t!==w?xr(t)||(G=k.addSource(t.fileName),e.inlineSources&&k.setSourceContent(G,t.text),w=t,X=G):G=X)}function xr(e){return Ao(e.fileName,".json")}}function iq(e,t,n,r){t(e)}function oq(e,t,n,r){t(e,n.select(r))}function aq(e,t,n,r){t(e,n)}function sq(e,t,n){if(!e.getDirectories||!e.readDirectory)return;const r=new Map,i=tn(n);return{useCaseSensitiveFileNames:n,fileExists:function(t){const n=s(o(t));return n&&_(n.sortedAndCanonicalizedFiles,i(c(t)))||e.fileExists(t)},readFile:(t,n)=>e.readFile(t,n),directoryExists:e.directoryExists&&function(t){const n=o(t);return r.has(ea(n))||e.directoryExists(t)},getDirectories:function(t){const n=l(t,o(t));return n?n.directories.slice():e.getDirectories(t)},readDirectory:function(r,i,a,s,_){const p=o(r),f=l(r,p);let m;return void 0!==f?Ck(r,i,a,s,n,t,_,(function(e){const t=o(e);if(t===p)return f||g(e,t);const n=l(e,t);return void 0!==n?n||g(e,t):_T}),d):e.readDirectory(r,i,a,s,_);function g(t,n){if(m&&n===p)return m;const r={files:O(e.readDirectory(t,void 0,void 0,["*.*"]),c)||u,directories:e.getDirectories(t)||u};return n===p&&(m=r),r}},createDirectory:e.createDirectory&&function(t){const n=s(o(t));if(n){const e=c(t),r=i(e);ie(n.sortedAndCanonicalizedDirectories,r,Mt)&&n.directories.push(e)}e.createDirectory(t)},writeFile:e.writeFile&&function(t,n,r){const i=s(o(t));return i&&p(i,c(t),!0),e.writeFile(t,n,r)},addOrDeleteFileOrDirectory:function(t,n){if(void 0!==a(n))return void f();const r=s(n);if(!r)return;if(!e.directoryExists)return void f();const o=c(t),l={fileExists:e.fileExists(t),directoryExists:e.directoryExists(t)};return l.directoryExists||_(r.sortedAndCanonicalizedDirectories,i(o))?f():p(r,o,l.fileExists),l},addOrDeleteFile:function(e,t,n){if(1===n)return;const r=s(t);r&&p(r,c(e),0===n)},clearCache:f,realpath:e.realpath&&d};function o(e){return Yo(e,t,i)}function a(e){return r.get(ea(e))}function s(e){const t=a(Ro(e));return t?(t.sortedAndCanonicalizedFiles||(t.sortedAndCanonicalizedFiles=t.files.map(i).sort(),t.sortedAndCanonicalizedDirectories=t.directories.map(i).sort()),t):t}function c(e){return Bo(Xo(e))}function l(t,n){const i=a(n=ea(n));if(i)return i;try{return function(t,n){var i;if(!e.realpath||ea(o(e.realpath(t)))===n){const i={files:O(e.readDirectory(t,void 0,void 0,["*.*"]),c)||[],directories:e.getDirectories(t)||[]};return r.set(ea(n),i),i}if(null==(i=e.directoryExists)?void 0:i.call(e,t))return r.set(n,!1),!1}(t,n)}catch(e){return void xn.assert(!r.has(ea(n)))}}function _(e,t){return Ae(e,t,mt,Mt)>=0}function d(t){return e.realpath?e.realpath(t):t}function p(e,t,n){const r=e.sortedAndCanonicalizedFiles,o=i(t);if(n)ie(r,o,Mt)&&e.files.push(t);else{const t=Ae(r,o,mt,Mt);if(t>=0){r.splice(t,1);const n=e.files.findIndex((e=>i(e)===o));e.files.splice(n,1)}}}function f(){r.clear()}}var cq=(e=>(e[e.Update=0]="Update",e[e.RootNamesAndUpdate=1]="RootNamesAndUpdate",e[e.Full=2]="Full",e))(cq||{});function lq(e,t,n,r,i){var o;const a=Ue((null==(o=null==t?void 0:t.configFile)?void 0:o.extendedSourceFiles)||u,i);n.forEach(((t,n)=>{a.has(n)||(t.projects.delete(e),t.close())})),a.forEach(((t,i)=>{const o=n.get(i);o?o.projects.add(e):n.set(i,{projects:new Set([e]),watcher:r(t,i),close:()=>{const e=n.get(i);e&&0===e.projects.size&&(e.watcher.close(),n.delete(i))}})}))}function uq(e,t){t.forEach((t=>{t.projects.delete(e)&&t.close()}))}function _q(e,t,n){e.delete(t)&&e.forEach((({extendedResult:r},i)=>{var o;(null==(o=r.extendedSourceFiles)?void 0:o.some((e=>n(e)===t)))&&_q(e,i,n)}))}function dq(e,t,n){kx(t,e.getMissingFilePaths(),{createNewValue:n,onDeleteValue:dx})}function pq(e,t,n){function r(e,t){return{watcher:n(e,t),flags:t}}t?kx(e,new Map(Object.entries(t)),{createNewValue:r,onDeleteValue:vq,onExistingValue:function(t,n,i){t.flags!==n&&(t.watcher.close(),e.set(i,r(i,n)))}}):xx(e,vq)}function fq({watchedDirPath:e,fileOrDirectory:t,fileOrDirectoryPath:n,configFileName:r,options:i,program:o,extraFileExtensions:a,currentDirectory:s,useCaseSensitiveFileNames:c,writeLog:l,toPath:u,getScriptKind:_}){const d=_U(n);if(!d)return l(`Project: ${r} Detected ignored path: ${t}`),!0;if((n=d)===e)return!1;if(Fo(n)&&!Hk(t,i,a)&&!function(){if(!_)return!1;switch(_(t)){case 3:case 4:case 7:case 5:return!0;case 1:case 2:return JS(i);case 6:return MS(i);case 0:return!1}}())return l(`Project: ${r} Detected file add/remove of non supported extension: ${t}`),!0;if(SL(t,i.configFile.configFileSpecs,Go(Ro(r),s),c,s))return l(`Project: ${r} Detected excluded file: ${t}`),!0;if(!o)return!1;if(i.outFile||i.outDir)return!1;if(QI(n)){if(i.declarationDir)return!1}else if(!Io(n,Mk))return!1;const p=Yk(n),f=ot(o)?void 0:function(e){return!!e.getState}(o)?o.getProgramOrUndefined():o,m=f||ot(o)?void 0:o;return!(!g(p+".ts")&&!g(p+".tsx")||(l(`Project: ${r} Detected output file: ${t}`),0));function g(e){return f?!!f.getSourceFileByPath(e):m?m.getState().fileInfos.has(e):!!S(o,(t=>u(t)===e))}}function mq(e,t){return!!e&&e.isEmittedFile(t)}var gq=(e=>(e[e.None=0]="None",e[e.TriggerOnly=1]="TriggerOnly",e[e.Verbose=2]="Verbose",e))(gq||{});function hq(e,t,n,r){_o(2===t?n:_t);const i={watchFile:(t,n,r,i)=>e.watchFile(t,n,r,i),watchDirectory:(t,n,r,i)=>e.watchDirectory(t,n,0!=(1&r),i)},o=0!==t?{watchFile:l("watchFile"),watchDirectory:l("watchDirectory")}:void 0,a=2===t?{watchFile:function(e,t,i,a,s,c){n(`FileWatcher:: Added:: ${u(e,i,a,s,c,r)}`);const l=o.watchFile(e,t,i,a,s,c);return{close:()=>{n(`FileWatcher:: Close:: ${u(e,i,a,s,c,r)}`),l.close()}}},watchDirectory:function(e,t,i,a,s,c){const l=`DirectoryWatcher:: Added:: ${u(e,i,a,s,c,r)}`;n(l);const _=Yn(),d=o.watchDirectory(e,t,i,a,s,c),p=Yn()-_;return n(`Elapsed:: ${p}ms ${l}`),{close:()=>{const t=`DirectoryWatcher:: Close:: ${u(e,i,a,s,c,r)}`;n(t);const o=Yn();d.close();const l=Yn()-o;n(`Elapsed:: ${l}ms ${t}`)}}}}:o||i,s=2===t?function(e,t,i,o,a){return n(`ExcludeWatcher:: Added:: ${u(e,t,i,o,a,r)}`),{close:()=>n(`ExcludeWatcher:: Close:: ${u(e,t,i,o,a,r)}`)}}:QU;return{watchFile:c("watchFile"),watchDirectory:c("watchDirectory")};function c(t){return(n,r,i,o,c,l)=>{var u;return TL(n,"watchFile"===t?null==o?void 0:o.excludeFiles:null==o?void 0:o.excludeDirectories,"boolean"==typeof e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),(null==(u=e.getCurrentDirectory)?void 0:u.call(e))||"")?s(n,i,o,c,l):a[t].call(void 0,n,r,i,o,c,l)}}function l(e){return(t,o,a,s,c,l)=>i[e].call(void 0,t,((...i)=>{const _=`${"watchFile"===e?"FileWatcher":"DirectoryWatcher"}:: Triggered with ${i[0]} ${void 0!==i[1]?i[1]:""}:: ${u(t,a,s,c,l,r)}`;n(_);const d=Yn();o.call(void 0,...i);const p=Yn()-d;n(`Elapsed:: ${p}ms ${_}`)}),a,s,c,l)}function u(e,t,n,r,i,o){return`WatchInfo: ${e} ${t} ${JSON.stringify(n)} ${o?o(r,i):void 0===i?r:`${r} ${i}`}`}}function yq(e){const t=null==e?void 0:e.fallbackPolling;return{watchFile:void 0!==t?t:1}}function vq(e){e.watcher.close()}function bq(e,t,n="tsconfig.json"){return ga(e,(e=>{const r=Ko(e,n);return t(r)?r:void 0}))}function xq(e,t){const n=Ro(t);return Xo(wo(e)?e:Ko(n,e))}function Sq(e,t,n){let r;return f(e,(e=>{const i=Ho(e,t);if(i.pop(),!r)return void(r=i);const o=Math.min(r.length,i.length);for(let e=0;e{let o;try{pr("beforeIORead"),o=e(n),pr("afterIORead"),fr("I/O Read","beforeIORead","afterIORead")}catch(e){i&&i(e.message),o=""}return void 0!==o?JI(n,o,r,t):void 0}}function Cq(e,t,n){return(r,i,o,a)=>{try{pr("beforeIOWrite"),uv(r,i,o,e,t,n),pr("afterIOWrite"),fr("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}}}function wq(e,t,n=vo){const r=new Map,i=tn(n.useCaseSensitiveFileNames);function o(){return Ro(Xo(n.getExecutingFilePath()))}const a=$b(e),s=n.realpath&&(e=>n.realpath(e)),c={getSourceFile:Tq((e=>c.readFile(e)),t),getDefaultLibLocation:o,getDefaultLibFileName:e=>Ko(o(),Ls(e)),writeFile:Cq(((e,t,r)=>n.writeFile(e,t,r)),(e=>(c.createDirectory||n.createDirectory)(e)),(e=>{return t=e,!!r.has(t)||!!(c.directoryExists||n.directoryExists)(t)&&(r.set(t,!0),!0);var t})),getCurrentDirectory:bt((()=>n.getCurrentDirectory())),useCaseSensitiveFileNames:()=>n.useCaseSensitiveFileNames,getCanonicalFileName:i,getNewLine:()=>a,fileExists:e=>n.fileExists(e),readFile:e=>n.readFile(e),trace:e=>n.write(e+a),directoryExists:e=>n.directoryExists(e),getEnvironmentVariable:e=>n.getEnvironmentVariable?n.getEnvironmentVariable(e):"",getDirectories:e=>n.getDirectories(e),realpath:s,readDirectory:(e,t,r,i,o)=>n.readDirectory(e,t,r,i,o),createDirectory:e=>n.createDirectory(e),createHash:Ze(n,n.createHash)};return c}function Dq(e,t,n){const r=e.readFile,i=e.fileExists,o=e.directoryExists,a=e.createDirectory,s=e.writeFile,c=new Map,l=new Map,u=new Map,_=new Map,d=(t,n)=>{const i=r.call(e,n);return c.set(t,void 0!==i&&i),i};e.readFile=n=>{const i=t(n),o=c.get(i);return void 0!==o?!1!==o?o:void 0:Ao(n,".json")||D$(n)?d(i,n):r.call(e,n)};const p=n?(e,r,i,o)=>{const a=t(e),s="object"==typeof r?r.impliedNodeFormat:void 0,c=_.get(s),l=null==c?void 0:c.get(a);if(l)return l;const u=n(e,r,i,o);return u&&(QI(e)||Ao(e,".json"))&&_.set(s,(c||new Map).set(a,u)),u}:void 0;return e.fileExists=n=>{const r=t(n),o=l.get(r);if(void 0!==o)return o;const a=i.call(e,n);return l.set(r,!!a),a},s&&(e.writeFile=(n,r,...i)=>{const o=t(n);l.delete(o);const a=c.get(o);void 0!==a&&a!==r?(c.delete(o),_.forEach((e=>e.delete(o)))):p&&_.forEach((e=>{const t=e.get(o);t&&t.text!==r&&e.delete(o)})),s.call(e,n,r,...i)}),o&&(e.directoryExists=n=>{const r=t(n),i=u.get(r);if(void 0!==i)return i;const a=o.call(e,n);return u.set(r,!!a),a},a&&(e.createDirectory=n=>{const r=t(n);u.delete(r),a.call(e,n)})),{originalReadFile:r,originalFileExists:i,originalDirectoryExists:o,originalCreateDirectory:a,originalWriteFile:s,getSourceFileWithCache:p,readFileWithCache:e=>{const n=t(e),r=c.get(n);return void 0!==r?!1!==r?r:void 0:d(n,e)}}}function Eq(e,t,n){let r;return r=pe(r,e.getConfigFileParsingDiagnostics()),r=pe(r,e.getOptionsDiagnostics(n)),r=pe(r,e.getSyntacticDiagnostics(t,n)),r=pe(r,e.getGlobalDiagnostics(n)),r=pe(r,e.getSemanticDiagnostics(t,n)),LS(e.getCompilerOptions())&&(r=pe(r,e.getDeclarationDiagnostics(t,n))),Ms(r||u)}function Pq(e,t){let n="";for(const r of e)n+=Nq(r,t);return n}function Nq(e,t){const n=`${vi(e)} TS${e.code}: ${Jq(e.messageText,t.getNewLine())}${t.getNewLine()}`;if(e.file){const{line:r,character:i}=Xa(e.file,e.start);return`${pa(e.file.fileName,t.getCurrentDirectory(),(e=>t.getCanonicalFileName(e)))}(${r+1},${i+1}): `+n}return n}var Fq=(e=>(e.Grey="",e.Red="",e.Yellow="",e.Blue="",e.Cyan="",e))(Fq||{}),Aq="",Iq="",Oq=" ";function Mq(e){switch(e){case 1:return"";case 0:return"";case 2:return xn.fail("Should never get an Info diagnostic on the command line.");case 3:return""}}function Lq(e,t){return t+e+Iq}function jq(e,t,n,r,i,o){const{line:a,character:s}=Xa(e,t),{line:c,character:l}=Xa(e,t+n),u=Xa(e,e.text.length).line,_=c-a>=4;let d=(c+1+"").length;_&&(d=Math.max("...".length,d));let p="";for(let t=a;t<=c;t++){p+=o.getNewLine(),_&&a+1n.getCanonicalFileName(e))):e.fileName,""),a+=":",a+=r(`${i+1}`,""),a+=":",a+=r(`${o+1}`,""),a}function Bq(e,t){let n="";for(const r of e){if(r.file){const{file:e,start:i}=r;n+=Rq(e,i,t),n+=" - "}if(n+=Lq(vi(r),Mq(r.category)),n+=Lq(` TS${r.code}: `,""),n+=Jq(r.messageText,t.getNewLine()),r.file&&r.code!==va.File_appears_to_be_binary.code&&(n+=t.getNewLine(),n+=jq(r.file,r.start,r.length,"",Mq(r.category),t)),r.relatedInformation){n+=t.getNewLine();for(const{file:e,start:i,length:o,messageText:a}of r.relatedInformation)e&&(n+=t.getNewLine(),n+=" "+Rq(e,i,t),n+=jq(e,i,o,Oq,"",t)),n+=t.getNewLine(),n+=Oq+Jq(a,t.getNewLine())}n+=t.getNewLine()}return n}function Jq(e,t,n=0){if(st(e))return e;if(void 0===e)return"";let r="";if(n){r+=t;for(let e=0;eVq(t,e,n)};function Xq(e,t,n,r,i){return{nameAndMode:Gq,resolve:(o,a)=>Sj(o,e,n,r,i,t,a)}}function Qq(e){return st(e)?e:e.fileName}var Yq={getName:Qq,getMode:(e,t)=>zq(e,null==t?void 0:t.impliedNodeFormat)};function Zq(e,t,n,r,i){return{nameAndMode:Yq,resolve:(o,a)=>tj(o,e,n,r,t,i,a)}}function eV(e,t,n,r,i,o,a,s){if(0===e.length)return u;const c=[],l=new Map,_=s(t,n,r,o,a);for(const t of e){const e=_.nameAndMode.getName(t),o=_.nameAndMode.getMode(t,i,(null==n?void 0:n.commandLine.options)||r),a=dj(e,o);let s=l.get(a);s||l.set(a,s=_.resolve(e,o)),c.push(s)}return c}function tV(e,t){return nV(void 0,e,((e,n)=>e&&t(e,n)))}function nV(e,t,n,r){let i;return function e(t,o,a){if(r){const e=r(t,a);if(e)return e}return f(o,((t,r)=>{if(t&&(null==i?void 0:i.has(t.sourceFile.path)))return;const o=n(t,a,r);return o||!t?o:((i||(i=new Set)).add(t.sourceFile.path),e(t.commandLine.projectReferences,t.references,t))}))}(e,t,void 0)}var rV="__inferred type names__.ts";function iV(e,t,n){return Ko(e.configFilePath?Ro(e.configFilePath):t,`__lib_node_modules_lookup_${n}__.ts`)}function oV(e){const t=e.split(".");let n=t[1],r=2;for(;t[r]&&"d"!==t[r];)n+=(2===r?"/":"-")+t[r],r++;return"@typescript/lib-"+n}function aV(e){return yt(e.fileName)}function sV(e){const t=aV(e);return fO.get(t)}function cV(e){switch(null==e?void 0:e.kind){case 3:case 4:case 5:case 7:return!0;default:return!1}}function lV(e){return void 0!==e.pos}function uV(e,t){var n,r,i,o;const a=xn.checkDefined(e.getSourceFileByPath(t.file)),{kind:s,index:c}=t;let l,u,_;switch(s){case 3:const t=TV(a,c);if(_=null==(r=null==(n=e.getResolvedModuleFromModuleSpecifier(t,a))?void 0:n.resolvedModule)?void 0:r.packageId,-1===t.pos)return{file:a,packageId:_,text:t.text};l=as(a.text,t.pos),u=t.end;break;case 4:({pos:l,end:u}=a.referencedFiles[c]);break;case 5:({pos:l,end:u}=a.typeReferenceDirectives[c]),_=null==(o=null==(i=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a.typeReferenceDirectives[c],a))?void 0:i.resolvedTypeReferenceDirective)?void 0:o.packageId;break;case 7:({pos:l,end:u}=a.libReferenceDirectives[c]);break;default:return xn.assertNever(s)}return{file:a,pos:l,end:u,packageId:_}}function _V(e,t,n,r,i,o,a,s,c,l){if(!e||(null==s?void 0:s()))return!1;if(!se(e.getRootFileNames(),t))return!1;let u;if(!se(e.getProjectReferences(),l,(function(t,n,r){return fd(t,n)&&p(e.getResolvedProjectReferences()[r],t)})))return!1;if(e.getSourceFiles().some((function(e){return!function(e){return e.version===r(e.resolvedPath,e.fileName)}(e)||o(e.path)})))return!1;const _=e.getMissingFilePaths();if(_&&ld(_,i))return!1;const d=e.getCompilerOptions();return!(!bx(d,n)||e.resolvedLibReferences&&ld(e.resolvedLibReferences,((e,t)=>a(t)))||d.configFile&&n.configFile&&d.configFile.text!==n.configFile.text);function p(e,t){if(e){if(D(u,e))return!0;const n=xV(t),r=c(n);return!!r&&e.commandLine.options.configFile===r.options.configFile&&!!se(e.commandLine.fileNames,r.fileNames)&&((u||(u=[])).push(e),!f(e.references,((t,n)=>!p(t,e.commandLine.projectReferences[n]))))}const n=xV(t);return!c(n)}}function dV(e){return e.options.configFile?[...e.options.configFile.parseDiagnostics,...e.errors]:e.errors}function pV(e,t,n,r){const i=fV(e,t,n,r);return"object"==typeof i?i.impliedNodeFormat:i}function fV(e,t,n,r){switch(ES(r)){case 3:case 99:return Io(e,[".d.mts",".mts",".mjs"])?99:Io(e,[".d.cts",".cts",".cjs"])?1:Io(e,[".d.ts",".ts",".tsx",".js",".jsx"])?function(){const i=Wj(t,n,r),o=[];i.failedLookupLocations=o,i.affectingLocations=o;const a=Hj(e,i);return{impliedNodeFormat:"module"===(null==a?void 0:a.contents.packageJsonContent.type)?99:1,packageJsonLocations:o,packageJsonScope:a}}():void 0;default:return}}var mV=new Set([va.Cannot_redeclare_block_scoped_variable_0.code,va.A_module_cannot_have_multiple_default_exports.code,va.Another_export_default_is_here.code,va.The_first_export_default_is_here.code,va.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,va.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,va.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,va.constructor_is_a_reserved_word.code,va.delete_cannot_be_called_on_an_identifier_in_strict_mode.code,va.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code,va.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,va.Invalid_use_of_0_in_strict_mode.code,va.A_label_is_not_allowed_here.code,va.with_statements_are_not_allowed_in_strict_mode.code,va.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code,va.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code,va.A_class_declaration_without_the_default_modifier_must_have_a_name.code,va.A_class_member_cannot_have_the_0_keyword.code,va.A_comma_expression_is_not_allowed_in_a_computed_property_name.code,va.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code,va.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,va.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,va.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code,va.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code,va.A_definite_assignment_assertion_is_not_permitted_in_this_context.code,va.A_destructuring_declaration_must_have_an_initializer.code,va.A_get_accessor_cannot_have_parameters.code,va.A_rest_element_cannot_contain_a_binding_pattern.code,va.A_rest_element_cannot_have_a_property_name.code,va.A_rest_element_cannot_have_an_initializer.code,va.A_rest_element_must_be_last_in_a_destructuring_pattern.code,va.A_rest_parameter_cannot_have_an_initializer.code,va.A_rest_parameter_must_be_last_in_a_parameter_list.code,va.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,va.A_return_statement_cannot_be_used_inside_a_class_static_block.code,va.A_set_accessor_cannot_have_rest_parameter.code,va.A_set_accessor_must_have_exactly_one_parameter.code,va.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,va.An_export_declaration_cannot_have_modifiers.code,va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,va.An_import_declaration_cannot_have_modifiers.code,va.An_object_member_cannot_be_declared_optional.code,va.Argument_of_dynamic_import_cannot_be_spread_element.code,va.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code,va.Cannot_redeclare_identifier_0_in_catch_clause.code,va.Catch_clause_variable_cannot_have_an_initializer.code,va.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code,va.Classes_can_only_extend_a_single_class.code,va.Classes_may_not_have_a_field_named_constructor.code,va.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,va.Duplicate_label_0.code,va.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,va.for_await_loops_cannot_be_used_inside_a_class_static_block.code,va.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,va.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,va.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code,va.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code,va.Jump_target_cannot_cross_function_boundary.code,va.Line_terminator_not_permitted_before_arrow.code,va.Modifiers_cannot_appear_here.code,va.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code,va.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code,va.Private_identifiers_are_not_allowed_outside_class_bodies.code,va.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,va.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code,va.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code,va.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code,va.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code,va.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code,va.Trailing_comma_not_allowed.code,va.Variable_declaration_list_cannot_be_empty.code,va._0_and_1_operations_cannot_be_mixed_without_parentheses.code,va._0_expected.code,va._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code,va._0_list_cannot_be_empty.code,va._0_modifier_already_seen.code,va._0_modifier_cannot_appear_on_a_constructor_declaration.code,va._0_modifier_cannot_appear_on_a_module_or_namespace_element.code,va._0_modifier_cannot_appear_on_a_parameter.code,va._0_modifier_cannot_appear_on_class_elements_of_this_kind.code,va._0_modifier_cannot_be_used_here.code,va._0_modifier_must_precede_1_modifier.code,va._0_declarations_can_only_be_declared_inside_a_block.code,va._0_declarations_must_be_initialized.code,va.extends_clause_already_seen.code,va.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,va.Class_constructor_may_not_be_a_generator.code,va.Class_constructor_may_not_be_an_accessor.code,va.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.Private_field_0_must_be_declared_in_an_enclosing_class.code,va.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code]);function gV(e,t,n,r,i){var o,a,c,l,_,d,p,m,g,y,v,b,x,k,C,w;const E=ot(e)?function(e,t,n,r,i,o){return{rootNames:e,options:t,host:n,oldProgram:r,configFileParsingDiagnostics:i,typeScriptVersion:void 0}}(e,t,n,r,i):e,{rootNames:P,options:N,configFileParsingDiagnostics:A,projectReferences:I,typeScriptVersion:O}=E;let{oldProgram:M}=E;for(const e of NO)if(Le(N,e.name)&&"string"==typeof N[e.name])throw new Error(`${e.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);const L=bt((()=>Gn("ignoreDeprecations",va.Invalid_value_for_ignoreDeprecations)));let B,J,z,$,V,U,K;const W=new Map;let H,G,X,Y=et();const ee={},te={};let ne,re,ie,oe,ae,ce,le,_e,de,pe;const fe="number"==typeof N.maxNodeModuleJsDepth?N.maxNodeModuleJsDepth:0;let me=0;const ge=new Map,he=new Map;null==(o=or)||o.push(or.Phase.Program,"createProgram",{configFilePath:N.configFilePath,rootDir:N.rootDir},!0),pr("beforeProgram");const ye=E.host||kq(N),be=bV(ye);let xe=N.noLib;const Se=bt((()=>ye.getDefaultLibFileName(N))),ke=ye.getDefaultLibLocation?ye.getDefaultLibLocation():Ro(Se()),Te=by();let Ce=[];const we=ye.getCurrentDirectory(),De=zk(N),Ee=$k(N,De),Pe=new Map;let Ne,Fe,Ae,Ie;const Oe=ye.hasInvalidatedResolutions||dt;let Me;if(ye.resolveModuleNameLiterals?(Ie=ye.resolveModuleNameLiterals.bind(ye),Ae=null==(a=ye.getModuleResolutionCache)?void 0:a.call(ye)):ye.resolveModuleNames?(Ie=(e,t,n,r,i,o)=>ye.resolveModuleNames(e.map(Hq),t,null==o?void 0:o.map(Hq),n,r,i).map((e=>e?void 0!==e.extension?{resolvedModule:e}:{resolvedModule:{...e,extension:sT(e.resolvedFileName)}}:Wq)),Ae=null==(c=ye.getModuleResolutionCache)?void 0:c.call(ye)):(Ae=hj(we,Ln,N),Ie=(e,t,n,r,i)=>eV(e,t,n,r,i,ye,Ae,Xq)),ye.resolveTypeReferenceDirectiveReferences)Me=ye.resolveTypeReferenceDirectiveReferences.bind(ye);else if(ye.resolveTypeReferenceDirectives)Me=(e,t,n,r,i)=>ye.resolveTypeReferenceDirectives(e.map(Qq),t,n,r,null==i?void 0:i.impliedNodeFormat).map((e=>({resolvedTypeReferenceDirective:e})));else{const e=yj(we,Ln,void 0,null==Ae?void 0:Ae.getPackageJsonInfoCache(),null==Ae?void 0:Ae.optionsToRedirectsKey);Me=(t,n,r,i,o)=>eV(t,n,r,i,o,ye,e,Zq)}const je=ye.hasInvalidatedLibResolutions||dt;let Re;if(ye.resolveLibrary)Re=ye.resolveLibrary.bind(ye);else{const e=hj(we,Ln,N,null==Ae?void 0:Ae.getPackageJsonInfoCache());Re=(t,n,r)=>bj(t,n,r,ye,e)}const Be=new Map;let Je=new Map,ze=et(),$e=!1;const qe=new Map;let Ve=new Map;const Ue=ye.useCaseSensitiveFileNames()?new Map:void 0;let Ke,We,He,Ge;const Xe=!!(null==(l=ye.useSourceOfProjectReferenceRedirect)?void 0:l.call(ye))&&!N.disableSourceOfProjectReferenceRedirect,{onProgramCreateComplete:Qe,fileExists:Ye,directoryExists:tt}=function(e){let t;const n=e.compilerHost.fileExists,r=e.compilerHost.directoryExists,i=e.compilerHost.getDirectories,o=e.compilerHost.realpath;if(!e.useSourceOfProjectReferenceRedirect)return{onProgramCreateComplete:_t,fileExists:s};let a;return e.compilerHost.fileExists=s,r&&(a=e.compilerHost.directoryExists=n=>r.call(e.compilerHost,n)?(function(t){var n;if(!e.getResolvedProjectReferences()||JT(t))return;if(!o||!t.includes(Ij))return;const r=e.getSymlinkCache(),i=ea(e.toPath(t));if(null==(n=r.getSymlinkedDirectories())?void 0:n.has(i))return;const a=Xo(o.call(e.compilerHost,t));let s;a!==t&&(s=ea(e.toPath(a)))!==i?r.setSymlinkedDirectory(t,{real:ea(a),realPath:s}):r.setSymlinkedDirectory(i,!1)}(n),!0):!!e.getResolvedProjectReferences()&&(t||(t=new Set,e.forEachResolvedProjectReference((n=>{const r=n.commandLine.options.outFile;if(r)t.add(Ro(e.toPath(r)));else{const r=n.commandLine.options.declarationDir||n.commandLine.options.outDir;r&&t.add(e.toPath(r))}}))),c(n,!1))),i&&(e.compilerHost.getDirectories=t=>!e.getResolvedProjectReferences()||r&&r.call(e.compilerHost,t)?i.call(e.compilerHost,t):[]),o&&(e.compilerHost.realpath=t=>{var n;return(null==(n=e.getSymlinkCache().getSymlinkedFiles())?void 0:n.get(e.toPath(t)))||o.call(e.compilerHost,t)}),{onProgramCreateComplete:function(){e.compilerHost.fileExists=n,e.compilerHost.directoryExists=r,e.compilerHost.getDirectories=i},fileExists:s,directoryExists:a};function s(t){return!!n.call(e.compilerHost,t)||!!e.getResolvedProjectReferences()&&!!QI(t)&&c(t,!0)}function c(r,i){var o;const a=i?t=>function(t){const r=e.getSourceOfProjectReferenceRedirect(e.toPath(t));return void 0!==r?!st(r)||n.call(e.compilerHost,r):void 0}(t):n=>function(n){const r=e.toPath(n),i=`${r}${xo}`;return ud(t,(e=>r===e||an(e,i)||an(r,`${e}/`)))}(n),s=a(r);if(void 0!==s)return s;const c=e.getSymlinkCache(),l=c.getSymlinkedDirectories();if(!l)return!1;const u=e.toPath(r);return!!u.includes(Ij)&&(!(!i||!(null==(o=c.getSymlinkedFiles())?void 0:o.has(u)))||h(l.entries(),(([t,n])=>{if(!n||!an(u,t))return;const o=a(u.replace(t,n.realPath));if(i&&o){const i=Go(r,e.compilerHost.getCurrentDirectory());c.setSymlinkedFile(u,`${n.real}${i.replace(new RegExp(t,"i"),"")}`)}return o}))||!1)}}({compilerHost:ye,getSymlinkCache:ir,useSourceOfProjectReferenceRedirect:Xe,toPath:Ft,getResolvedProjectReferences:jt,getSourceOfProjectReferenceRedirect:wn,forEachResolvedProjectReference:Cn}),nt=ye.readFile.bind(ye);null==(_=or)||_.push(or.Phase.Program,"shouldProgramCreateNewSourceFiles",{hasOldProgram:!!M});const rt=function(e,t){return!!e&&sd(e.getCompilerOptions(),t,CO)}(M,N);let it;if(null==(d=or)||d.pop(),null==(p=or)||p.push(or.Phase.Program,"tryReuseStructureFromOldProgram",{}),it=function(){var e;if(!M)return 0;const t=M.getCompilerOptions();if(id(t,N))return 0;if(!se(M.getRootFileNames(),P))return 0;if(nV(M.getProjectReferences(),M.getResolvedProjectReferences(),((e,t,n)=>{const r=Rn((t?t.commandLine.projectReferences:I)[n]);return e?!r||r.sourceFile!==e.sourceFile||!se(e.commandLine.fileNames,r.commandLine.fileNames):void 0!==r}),((e,t)=>!se(e,t?En(t.sourceFile.path).commandLine.projectReferences:I,fd))))return 0;I&&(Ke=I.map(Rn));const n=[],r=[];if(it=2,ld(M.getMissingFilePaths(),(e=>ye.fileExists(e))))return 0;const i=M.getSourceFiles();let o;var a;(a=o||(o={}))[a.Exists=0]="Exists",a[a.Modified=1]="Modified";const s=new Map;for(const t of i){const i=gn(t.fileName,Ae,ye,N);let o,a=ye.getSourceFileByPath?ye.getSourceFileByPath(t.fileName,t.resolvedPath,i,void 0,rt):ye.getSourceFile(t.fileName,i,void 0,rt);if(!a)return 0;if(a.packageJsonLocations=(null==(e=i.packageJsonLocations)?void 0:e.length)?i.packageJsonLocations:void 0,a.packageJsonScope=i.packageJsonScope,xn.assert(!a.redirectInfo,"Host should not return a redirect source file from `getSourceFile`"),t.redirectInfo){if(a!==t.redirectInfo.unredirected)return 0;o=!1,a=t}else if(M.redirectTargetsMap.has(t.path)){if(a!==t)return 0;o=!1}else o=a!==t;a.path=t.path,a.originalFileName=t.originalFileName,a.resolvedPath=t.resolvedPath,a.fileName=t.fileName;const c=M.sourceFileToPackageName.get(t.path);if(void 0!==c){const e=s.get(c),t=o?1:0;if(void 0!==e&&1===t||1===e)return 0;s.set(c,t)}if(o)t.impliedNodeFormat!==a.impliedNodeFormat?it=1:se(t.libReferenceDirectives,a.libReferenceDirectives,on)?t.hasNoDefaultLib!==a.hasNoDefaultLib?it=1:se(t.referencedFiles,a.referencedFiles,on)?(un(a),se(t.imports,a.imports,cn)&&se(t.moduleAugmentations,a.moduleAugmentations,cn)?(12582912&t.flags)!=(12582912&a.flags)?it=1:se(t.typeReferenceDirectives,a.typeReferenceDirectives,on)||(it=1):it=1):it=1:it=1,r.push(a);else if(Oe(t.path))it=1,r.push(a);else for(const e of t.ambientModuleNames)W.set(e,t.fileName);n.push(a)}if(2!==it)return it;for(const e of r){const t=kV(e),n=It(t,e);(le??(le=new Map)).set(e.path,n),bd(t,n,(t=>M.getResolvedModule(e,t.text,ar(e,t))),md)&&(it=1);const r=e.typeReferenceDirectives,i=Ot(r,e);(de??(de=new Map)).set(e.path,i),bd(r,i,(t=>M.getResolvedTypeReferenceDirective(e,Qq(t),zq(t,e.impliedNodeFormat))),vd)&&(it=1)}if(2!==it)return it;if(ad(t,N))return 1;if(M.resolvedLibReferences&&ld(M.resolvedLibReferences,((e,t)=>On(t).actual!==e.actual)))return 1;if(ye.hasChangedAutomaticTypeDirectiveNames){if(ye.hasChangedAutomaticTypeDirectiveNames())return 1}else if(re=oj(N,ye),!se(M.getAutomaticTypeDirectiveNames(),re))return 1;Ve=M.getMissingFilePaths(),xn.assert(n.length===M.getSourceFiles().length);for(const e of n)qe.set(e.path,e);return M.getFilesByNameMap().forEach(((e,t)=>{e?e.path!==t?qe.set(t,qe.get(e.path)):M.isSourceFileFromExternalLibrary(e)&&he.set(e.path,!0):qe.set(t,e)})),z=n,Y=M.getFileIncludeReasons(),ne=M.getFileProcessingDiagnostics(),re=M.getAutomaticTypeDirectiveNames(),ie=M.getAutomaticTypeDirectiveResolutions(),Je=M.sourceFileToPackageName,ze=M.redirectTargetsMap,$e=M.usesUriStyleNodeCoreModules,ce=M.resolvedModules,_e=M.resolvedTypeReferenceDirectiveNames,oe=M.resolvedLibReferences,pe=M.getCurrentPackagesMap(),2}(),null==(m=or)||m.pop(),2!==it){if(B=[],J=[],I&&(Ke||(Ke=I.map(Rn)),P.length&&(null==Ke||Ke.forEach(((e,t)=>{if(!e)return;const n=e.commandLine.options.outFile;if(Xe){if(n||0===DS(e.commandLine.options))for(const n of e.commandLine.fileNames)pn(n,{kind:1,index:t})}else if(n)pn(tT(n,".d.ts"),{kind:2,index:t});else if(0===DS(e.commandLine.options)){const n=bt((()=>q$(e.commandLine,!ye.useCaseSensitiveFileNames())));for(const r of e.commandLine.fileNames)QI(r)||Ao(r,".json")||pn(M$(r,e.commandLine,!ye.useCaseSensitiveFileNames(),n),{kind:2,index:t})}})))),null==(g=or)||g.push(or.Phase.Program,"processRootFiles",{count:P.length}),f(P,((e,t)=>rn(e,!1,!1,{kind:0,index:t}))),null==(y=or)||y.pop(),re??(re=P.length?oj(N,ye):u),ie=pj(),re.length){null==(v=or)||v.push(or.Phase.Program,"processTypeReferences",{count:re.length});const e=Ko(N.configFilePath?Ro(N.configFilePath):we,rV),t=Ot(re,e);for(let e=0;e{rn(In(e),!0,!1,{kind:6,index:t})}))}z=ve(B,(function(e,t){return Nt(Pt(e),Pt(t))})).concat(J),B=void 0,J=void 0,H=void 0}if(M&&ye.onReleaseOldSourceFile){const e=M.getSourceFiles();for(const t of e){const e=$t(t.resolvedPath);(rt||!e||e.impliedNodeFormat!==t.impliedNodeFormat||t.resolvedPath===t.path&&e.resolvedPath!==t.path)&&ye.onReleaseOldSourceFile(t,M.getCompilerOptions(),!!$t(t.path))}ye.getParsedCommandLine||M.forEachResolvedProjectReference((e=>{En(e.sourceFile.path)||ye.onReleaseOldSourceFile(e.sourceFile,M.getCompilerOptions(),!1)}))}M&&ye.onReleaseParsedCommandLine&&nV(M.getProjectReferences(),M.getResolvedProjectReferences(),((e,t,n)=>{const r=xV((null==t?void 0:t.commandLine.projectReferences[n])||M.getProjectReferences()[n]);(null==We?void 0:We.has(Ft(r)))||ye.onReleaseParsedCommandLine(r,e,M.getCompilerOptions())})),M=void 0,ae=void 0,le=void 0,de=void 0;const at={getRootFileNames:()=>P,getSourceFile:zt,getSourceFileByPath:$t,getSourceFiles:()=>z,getMissingFilePaths:()=>Ve,getModuleResolutionCache:()=>Ae,getFilesByNameMap:()=>qe,getCompilerOptions:()=>N,getSyntacticDiagnostics:function(e,t){return qt(e,Kt,t)},getOptionsDiagnostics:function(){return Ms(Z(ct().getGlobalDiagnostics(),function(){if(!N.configFile)return u;let e=ct().getDiagnostics(N.configFile.fileName);return Cn((t=>{e=Z(e,ct().getDiagnostics(t.sourceFile.fileName))})),e}()))},getGlobalDiagnostics:function(){return P.length?Ms(Bt().getGlobalDiagnostics().slice()):u},getSemanticDiagnostics:function(e,t){return qt(e,Gt,t)},getCachedSemanticDiagnostics:function(e){var t;return e?null==(t=ee.perFile)?void 0:t.get(e.path):ee.allDiagnostics},getSuggestionDiagnostics:function(e,t){return Wt((()=>Bt().getSuggestionDiagnostics(e,t)))},getDeclarationDiagnostics:function(e,t){const n=at.getCompilerOptions();return!e||n.outFile?Zt(e,t):qt(e,nn,t)},getBindAndCheckDiagnostics:function(e,t){return Xt(e,t)},getProgramDiagnostics:Vt,getTypeChecker:Bt,getClassifiableNames:function(){var e;if(!K){Bt(),K=new Set;for(const t of z)null==(e=t.classifiableNames)||e.forEach((e=>K.add(e)))}return K},getCommonSourceDirectory:At,emit:function(e,t,n,r,i,o){var a,s;null==(a=or)||a.push(or.Phase.Emit,"emit",{path:null==e?void 0:e.path},!0);const c=Wt((()=>function(e,t,n,r,i,o,a){if(!a){const i=yV(e,t,n,r);if(i)return i}const s=Bt(),c=s.getEmitResolver(N.outFile?void 0:t,r,W$(i,a));pr("beforeEmit");const l=s.runWithCancellationToken(r,(()=>H$(c,Mt(n),t,g$(N,o,i),i,!1,a)));return pr("afterEmit"),fr("Emit","beforeEmit","afterEmit"),l}(at,e,t,n,r,i,o)));return null==(s=or)||s.pop(),c},getCurrentDirectory:()=>we,getNodeCount:()=>Bt().getNodeCount(),getIdentifierCount:()=>Bt().getIdentifierCount(),getSymbolCount:()=>Bt().getSymbolCount(),getTypeCount:()=>Bt().getTypeCount(),getInstantiationCount:()=>Bt().getInstantiationCount(),getRelationCacheSizes:()=>Bt().getRelationCacheSizes(),getFileProcessingDiagnostics:()=>ne,getAutomaticTypeDirectiveNames:()=>re,getAutomaticTypeDirectiveResolutions:()=>ie,isSourceFileFromExternalLibrary:Rt,isSourceFileDefaultLibrary:function(e){if(!e.isDeclarationFile)return!1;if(e.hasNoDefaultLib)return!0;if(!N.noLib)return!1;const t=ye.useCaseSensitiveFileNames()?Et:Dt;return N.lib?Q(N.lib,(n=>t(e.fileName,oe.get(n).actual))):t(e.fileName,Se())},getModeForUsageLocation:ar,getModeForResolutionAtIndex:function(e,t){return ar(e,TV(e,t))},getSourceFileFromReference:function(e,t){return _n(xq(t.fileName,e.fileName),zt)},getLibFileFromReference:function(e){var t;const n=sV(e),r=n&&(null==(t=null==oe?void 0:oe.get(n))?void 0:t.actual);return void 0!==r?zt(r):void 0},sourceFileToPackageName:Je,redirectTargetsMap:ze,usesUriStyleNodeCoreModules:$e,resolvedModules:ce,resolvedTypeReferenceDirectiveNames:_e,resolvedLibReferences:oe,getResolvedModule:ut,getResolvedModuleFromModuleSpecifier:function(e,t){return t??(t=Sd(e)),xn.assertIsDefined(t,"`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."),ut(t,e.text,ar(t,e))},getResolvedTypeReferenceDirective:pt,getResolvedTypeReferenceDirectiveFromTypeReferenceDirective:function(e,t){return pt(t,e.fileName,e.resolutionMode||t.impliedNodeFormat)},forEachResolvedModule:ft,forEachResolvedTypeReferenceDirective:gt,getCurrentPackagesMap:()=>pe,typesPackageExists:function(e){return vt().has(fR(e))},packageBundlesTypes:function(e){return!!vt().get(e)},isEmittedFile:function(e){if(N.noEmit)return!1;const t=Ft(e);if($t(t))return!1;const n=N.outFile;if(n)return rr(t,n)||rr(t,Yk(n)+".d.ts");if(N.declarationDir&&la(N.declarationDir,t,we,!ye.useCaseSensitiveFileNames()))return!0;if(N.outDir)return la(N.outDir,t,we,!ye.useCaseSensitiveFileNames());if(Io(t,Mk)||QI(t)){const e=Yk(t);return!!$t(e+".ts")||!!$t(e+".tsx")}return!1},getConfigFileParsingDiagnostics:function(){return A||u},getProjectReferences:function(){return I},getResolvedProjectReferences:jt,getProjectReferenceRedirect:bn,getResolvedProjectReferenceToRedirect:Tn,getResolvedProjectReferenceByPath:En,forEachResolvedProjectReference:Cn,isSourceOfProjectReferenceRedirect:Dn,getRedirectReferenceForResolutionFromSourceOfProject:wt,emitBuildInfo:function(e){var t,n;xn.assert(!N.outFile),null==(t=or)||t.push(or.Phase.Emit,"emitBuildInfo",{},!0),pr("beforeEmit");const r=H$(Y$,Mt(e),void 0,m$,!1,!0);return pr("afterEmit"),fr("Emit","beforeEmit","afterEmit"),null==(n=or)||n.pop(),r},fileExists:Ye,readFile:nt,directoryExists:tt,getSymlinkCache:ir,realpath:null==(C=ye.realpath)?void 0:C.bind(ye),useCaseSensitiveFileNames:()=>ye.useCaseSensitiveFileNames(),getCanonicalFileName:Ln,getFileIncludeReasons:()=>Y,structureIsReused:it,writeFile:Lt};return Qe(),function(){N.strictPropertyInitialization&&!WS(N,"strictNullChecks")&&Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks"),N.exactOptionalPropertyTypes&&!WS(N,"strictNullChecks")&&Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"exactOptionalPropertyTypes","strictNullChecks"),(N.isolatedModules||N.verbatimModuleSyntax)&&N.outFile&&Hn(va.Option_0_cannot_be_specified_with_option_1,"outFile",N.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules"),N.isolatedDeclarations&&(JS(N)&&Hn(va.Option_0_cannot_be_specified_with_option_1,"allowJs","isolatedDeclarations"),LS(N)||Hn(va.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"isolatedDeclarations","declaration","composite")),N.inlineSourceMap&&(N.sourceMap&&Hn(va.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),N.mapRoot&&Hn(va.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap")),N.composite&&(!1===N.declaration&&Hn(va.Composite_projects_may_not_disable_declaration_emit,"declaration"),!1===N.incremental&&Hn(va.Composite_projects_may_not_disable_incremental_compilation,"declaration"));const e=N.outFile;if(N.tsBuildInfoFile?RS(N)||Hn(va.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"tsBuildInfoFile","incremental","composite"):!N.incremental||e||N.configFilePath||Te.add(cS(va.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)),Bn("5.0","5.5","6.0",(function(e,t,n,r,...i){if(n){const o=uS(void 0,va.Use_0_instead,n);Qn(!t,e,void 0,uS(o,r,...i))}else Qn(!t,e,void 0,r,...i)}),(e=>{0===N.target&&e("target","ES3"),N.noImplicitUseStrict&&e("noImplicitUseStrict"),N.keyofStringsOnly&&e("keyofStringsOnly"),N.suppressExcessPropertyErrors&&e("suppressExcessPropertyErrors"),N.suppressImplicitAnyIndexErrors&&e("suppressImplicitAnyIndexErrors"),N.noStrictGenericChecks&&e("noStrictGenericChecks"),N.charset&&e("charset"),N.out&&e("out",void 0,"outFile"),N.importsNotUsedAsValues&&e("importsNotUsedAsValues",void 0,"verbatimModuleSyntax"),N.preserveValueImports&&e("preserveValueImports",void 0,"verbatimModuleSyntax")})),function(){const e=N.suppressOutputPathCheck?void 0:P$(N);nV(I,Ke,((t,n,r)=>{const i=(n?n.commandLine.projectReferences:I)[r],o=n&&n.sourceFile;if(function(e,t,n){Bn("5.0","5.5","6.0",(function(e,r,i,o,...a){Xn(t,n,o,...a)}),(t=>{e.prepend&&t("prepend")}))}(i,o,r),!t)return void Xn(o,r,va.File_0_not_found,i.path);const a=t.commandLine.options;a.composite&&!a.noEmit||(n?n.commandLine.fileNames:P).length&&(a.composite||Xn(o,r,va.Referenced_project_0_must_have_setting_composite_Colon_true,i.path),a.noEmit&&Xn(o,r,va.Referenced_project_0_may_not_disable_emit,i.path)),!n&&e&&e===P$(a)&&(Xn(o,r,va.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,e,i.path),Pe.set(Ft(e),!0))}))}(),N.composite){const e=new Set(P.map(Ft));for(const t of z)ov(t,at)&&!e.has(t.path)&&$n(t,va.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,[t.fileName,N.configFilePath||""])}if(N.paths)for(const e in N.paths)if(Le(N.paths,e))if(rk(e)||Vn(!0,e,va.Pattern_0_can_have_at_most_one_Asterisk_character,e),ot(N.paths[e])){const t=N.paths[e].length;0===t&&Vn(!1,e,va.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,e);for(let n=0;nqI(e)&&!e.isDeclarationFile));if(N.isolatedModules||N.verbatimModuleSyntax)0===N.module&&t<2&&N.isolatedModules&&Hn(va.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher,"isolatedModules","target"),!1===N.preserveConstEnums&&Hn(va.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled,N.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules","preserveConstEnums");else if(n&&t<2&&0===N.module){const e=Qp(n,"boolean"==typeof n.externalModuleIndicator?n:n.externalModuleIndicator);Te.add(aS(n,e.start,e.length,va.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none))}if(e&&!N.emitDeclarationOnly)if(N.module&&2!==N.module&&4!==N.module)Hn(va.Only_amd_and_system_modules_are_supported_alongside_0,"outFile","module");else if(void 0===N.module&&n){const e=Qp(n,"boolean"==typeof n.externalModuleIndicator?n:n.externalModuleIndicator);Te.add(aS(n,e.start,e.length,va.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system,"outFile"))}if(MS(N)&&(1===ES(N)?Hn(va.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic,"resolveJsonModule"):qS(N)||Hn(va.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd,"resolveJsonModule","module")),N.outDir||N.rootDir||N.sourceRoot||N.mapRoot){const e=At();N.outDir&&""===e&&z.some((e=>jo(e.fileName)>1))&&Hn(va.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}N.checkJs&&!JS(N)&&Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs"),N.emitDeclarationOnly&&(LS(N)||Hn(va.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"),N.noEmit&&Hn(va.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit")),N.noCheck&&N.noEmit&&Hn(va.Option_0_cannot_be_specified_with_option_1,"noCheck","noEmit"),N.emitDecoratorMetadata&&!N.experimentalDecorators&&Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators"),N.jsxFactory?(N.reactNamespace&&Hn(va.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),4!==N.jsx&&5!==N.jsx||Hn(va.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFactory",_O.get(""+N.jsx)),zI(N.jsxFactory,t)||Gn("jsxFactory",va.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,N.jsxFactory)):N.reactNamespace&&!Ts(N.reactNamespace,t)&&Gn("reactNamespace",va.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,N.reactNamespace),N.jsxFragmentFactory&&(N.jsxFactory||Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"jsxFragmentFactory","jsxFactory"),4!==N.jsx&&5!==N.jsx||Hn(va.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFragmentFactory",_O.get(""+N.jsx)),zI(N.jsxFragmentFactory,t)||Gn("jsxFragmentFactory",va.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name,N.jsxFragmentFactory)),N.reactNamespace&&(4!==N.jsx&&5!==N.jsx||Hn(va.Option_0_cannot_be_specified_when_option_jsx_is_1,"reactNamespace",_O.get(""+N.jsx))),N.jsxImportSource&&2===N.jsx&&Hn(va.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxImportSource",_O.get(""+N.jsx));const r=DS(N);N.verbatimModuleSyntax&&(2!==r&&3!==r&&4!==r||Hn(va.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System,"verbatimModuleSyntax")),!N.allowImportingTsExtensions||N.noEmit||N.emitDeclarationOnly||Gn("allowImportingTsExtensions",va.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);const i=ES(N);if(N.resolvePackageJsonExports&&!KS(i)&&Hn(va.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonExports"),N.resolvePackageJsonImports&&!KS(i)&&Hn(va.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonImports"),N.customConditions&&!KS(i)&&Hn(va.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"customConditions"),100!==i||$S(r)||200===r||Gn("moduleResolution",va.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later,"bundler"),Ci[r]&&100<=r&&r<=199&&!(3<=i&&i<=99)){const e=Ci[r];Gn("moduleResolution",va.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1,e,e)}else if(bi[i]&&3<=i&&i<=99&&!(100<=r&&r<=199)){const e=bi[i];Gn("module",va.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1,e,e)}if(!N.noEmit&&!N.suppressOutputPathCheck){const e=Mt(),t=new Set;E$(e,(e=>{N.emitDeclarationOnly||o(e.jsFilePath,t),o(e.declarationFilePath,t)}))}function o(e,t){if(e){const n=Ft(e);if(qe.has(n)){let t;N.configFilePath||(t=uS(void 0,va.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),t=uS(t,va.Cannot_write_file_0_because_it_would_overwrite_input_file,e),nr(e,lS(t))}const r=ye.useCaseSensitiveFileNames()?n:yt(n);t.has(r)?nr(e,cS(va.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,e)):t.add(r)}}}(),pr("afterProgram"),fr("Program","beforeProgram","afterProgram"),null==(w=or)||w.pop(),at;function ct(){return Ce&&(null==ne||ne.forEach((e=>{switch(e.kind){case 1:return Te.add(Jn(e.file&&$t(e.file),e.fileProcessingReason,e.diagnostic,e.args||u));case 0:return Te.add(function({reason:e}){const{file:t,pos:n,end:r}=uV(at,e),i=aV(t.libReferenceDirectives[e.index]),o=Ut(Ht(sn(i,"lib."),".d.ts"),pO,mt);return aS(t,xn.checkDefined(n),xn.checkDefined(r)-n,o?va.Cannot_find_lib_definition_for_0_Did_you_mean_1:va.Cannot_find_lib_definition_for_0,i,o)}(e));case 2:return e.diagnostics.forEach((e=>Te.add(e)));default:xn.assertNever(e)}})),Ce.forEach((({file:e,diagnostic:t,args:n})=>Te.add(Jn(e,void 0,t,n)))),Ce=void 0,G=void 0,X=void 0),Te}function ut(e,t,n){var r;return null==(r=null==ce?void 0:ce.get(e.path))?void 0:r.get(t,n)}function pt(e,t,n){var r;return null==(r=null==_e?void 0:_e.get(e.path))?void 0:r.get(t,n)}function ft(e,t){ht(ce,e,t)}function gt(e,t){ht(_e,e,t)}function ht(e,t,n){var r;n?null==(r=null==e?void 0:e.get(n.path))||r.forEach(((e,r,i)=>t(e,r,i,n.path))):null==e||e.forEach(((e,n)=>e.forEach(((e,r,i)=>t(e,r,i,n)))))}function vt(){return pe||(pe=new Map,ft((({resolvedModule:e})=>{(null==e?void 0:e.packageId)&&pe.set(e.packageId.name,".d.ts"===e.extension||!!pe.get(e.packageId.name))})),pe)}function xt(e){var t;(null==(t=e.resolutionDiagnostics)?void 0:t.length)&&(ne??(ne=[])).push({kind:2,diagnostics:e.resolutionDiagnostics})}function St(e,t,n,r){if(ye.resolveModuleNameLiterals||!ye.resolveModuleNames)return xt(n);if(!Ae||Os(t))return;const i=Ro(Go(e.originalFileName,we)),o=Ct(e),a=Ae.getFromNonRelativeNameCache(t,r,i,o);a&&xt(a)}function kt(e,t,n){var r,i;if(!e.length)return u;const o=Go(t.originalFileName,we),a=Ct(t);null==(r=or)||r.push(or.Phase.Program,"resolveModuleNamesWorker",{containingFileName:o}),pr("beforeResolveModule");const s=Ie(e,o,a,N,t,n);return pr("afterResolveModule"),fr("ResolveModule","beforeResolveModule","afterResolveModule"),null==(i=or)||i.pop(),s}function Tt(e,t,n){var r,i;if(!e.length)return[];const o=st(t)?void 0:t,a=st(t)?t:Go(t.originalFileName,we),s=o&&Ct(o);null==(r=or)||r.push(or.Phase.Program,"resolveTypeReferenceDirectiveNamesWorker",{containingFileName:a}),pr("beforeResolveTypeReference");const c=Me(e,a,s,N,o,n);return pr("afterResolveTypeReference"),fr("ResolveTypeReference","beforeResolveTypeReference","afterResolveTypeReference"),null==(i=or)||i.pop(),c}function Ct(e){const t=Tn(e.originalFileName);if(t||!QI(e.originalFileName))return t;const n=wt(e.path);if(n)return n;if(!ye.realpath||!N.preserveSymlinks||!e.originalFileName.includes(Ij))return;const r=Ft(ye.realpath(e.originalFileName));return r===e.path?void 0:wt(r)}function wt(e){const t=wn(e);return st(t)?Tn(t):t?Cn((t=>{const n=t.commandLine.options.outFile;if(n)return Ft(n)===e?t:void 0})):void 0}function Pt(e){if(la(ke,e.fileName,!1)){const t=Bo(e.fileName);if("lib.d.ts"===t||"lib.es6.d.ts"===t)return 0;const n=Ht(sn(t,"lib."),".d.ts"),r=pO.indexOf(n);if(-1!==r)return r+1}return pO.length+2}function Ft(e){return Yo(e,we,Ln)}function At(){if(void 0===V){const e=F(z,(e=>ov(e,at)));V=$$(N,(()=>q(e,(e=>e.isDeclarationFile?void 0:e.fileName))),we,Ln,(t=>function(e,t){let n=!0;const r=ye.getCanonicalFileName(Go(t,we));for(const i of e)i.isDeclarationFile||0!==ye.getCanonicalFileName(Go(i.fileName,we)).indexOf(r)&&($n(i,va.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,[i.fileName,t]),n=!1);return n}(e,t)))}return V}function It(e,t){if(0===it&&!t.ambientModuleNames.length)return kt(e,t,void 0);let n,r,i;const o=Wq,a=M&&M.getSourceFile(t.fileName);for(let s=0;swe,getSourceFile:at.getSourceFile,getSourceFileByPath:at.getSourceFileByPath,getSourceFiles:at.getSourceFiles,isSourceFileFromExternalLibrary:Rt,getResolvedProjectReferenceToRedirect:Tn,getProjectReferenceRedirect:bn,isSourceOfProjectReferenceRedirect:Dn,getSymlinkCache:ir,writeFile:e||Lt,isEmitBlocked:Jt,readFile:e=>ye.readFile(e),fileExists:e=>{const t=Ft(e);return!!$t(t)||!Ve.has(t)&&ye.fileExists(e)},realpath:Ze(ye,ye.realpath),useCaseSensitiveFileNames:()=>ye.useCaseSensitiveFileNames(),getBuildInfo:()=>{var e;return null==(e=at.getBuildInfo)?void 0:e.call(at)},getSourceFileFromReference:(e,t)=>at.getSourceFileFromReference(e,t),redirectTargetsMap:ze,getFileIncludeReasons:at.getFileIncludeReasons,createHash:Ze(ye,ye.createHash),getModuleResolutionCache:()=>at.getModuleResolutionCache(),trace:Ze(ye,ye.trace)}}function Lt(e,t,n,r,i,o){ye.writeFile(e,t,n,r,i,o)}function jt(){return Ke}function Rt(e){return!!he.get(e.path)}function Bt(){return U||(U=LB(at))}function Jt(e){return Pe.has(Ft(e))}function zt(e){return $t(Ft(e))}function $t(e){return qe.get(e)||void 0}function qt(e,t,n){return Ms(e?t(e,n):R(at.getSourceFiles(),(e=>(n&&n.throwIfCancellationRequested(),t(e,n)))))}function Vt(e){var t;if(yT(e,N,at))return u;const n=ct().getDiagnostics(e.fileName);return(null==(t=e.commentDirectives)?void 0:t.length)?Yt(e,e.commentDirectives,n).diagnostics:n}function Kt(e){return Im(e)?(e.additionalSyntacticDiagnostics||(e.additionalSyntacticDiagnostics=function(e){return Wt((()=>{const t=[];return n(e,e),jI(e,n,(function(e,n){if(MA(n)){const e=S(n.modifiers,cE);e&&t.push(i(e,va.Decorators_are_not_valid_here))}else if(lI(n)&&n.modifiers){const e=T(n.modifiers,cE);if(e>=0)if(sE(n)&&!N.experimentalDecorators)t.push(i(n.modifiers[e],va.Decorators_are_not_valid_here));else if(GP(n)){const r=T(n.modifiers,UD);if(r>=0){const o=T(n.modifiers,KD);if(e>r&&o>=0&&e=0&&e=0&&t.push(fT(i(n.modifiers[o],va.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),i(n.modifiers[e],va.Decorator_used_before_export_here)))}}}}switch(n.kind){case 263:case 231:case 174:case 176:case 177:case 178:case 218:case 262:case 219:if(e===n.typeParameters)return t.push(r(e,va.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)),"skip";case 243:if(e===n.modifiers)return function(e,n){for(const r of e)switch(r.kind){case 87:if(n)continue;case 125:case 123:case 124:case 148:case 138:case 128:case 164:case 103:case 147:t.push(i(r,va.The_0_modifier_can_only_be_used_in_TypeScript_files,Ra(r.kind)))}}(n.modifiers,243===n.kind),"skip";break;case 172:if(e===n.modifiers){for(const n of e)iu(n)&&126!==n.kind&&129!==n.kind&&t.push(i(n,va.The_0_modifier_can_only_be_used_in_TypeScript_files,Ra(n.kind)));return"skip"}break;case 169:if(e===n.modifiers&&Q(e,iu))return t.push(r(e,va.Parameter_modifiers_can_only_be_used_in_TypeScript_files)),"skip";break;case 213:case 214:case 233:case 285:case 286:case 215:if(e===n.typeArguments)return t.push(r(e,va.Type_arguments_can_only_be_used_in_TypeScript_files)),"skip"}})),t;function n(e,n){switch(n.kind){case 169:case 172:case 174:if(n.questionToken===e)return t.push(i(e,va.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),"skip";case 173:case 176:case 177:case 178:case 218:case 262:case 219:case 260:if(n.type===e)return t.push(i(e,va.Type_annotations_can_only_be_used_in_TypeScript_files)),"skip"}switch(e.kind){case 273:if(e.isTypeOnly)return t.push(i(n,va._0_declarations_can_only_be_used_in_TypeScript_files,"import type")),"skip";break;case 278:if(e.isTypeOnly)return t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,"export type")),"skip";break;case 276:case 281:if(e.isTypeOnly)return t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,fN(e)?"import...type":"export...type")),"skip";break;case 271:return t.push(i(e,va.import_can_only_be_used_in_TypeScript_files)),"skip";case 277:if(e.isExportEquals)return t.push(i(e,va.export_can_only_be_used_in_TypeScript_files)),"skip";break;case 298:if(119===e.token)return t.push(i(e,va.implements_clauses_can_only_be_used_in_TypeScript_files)),"skip";break;case 264:const r=Ra(120);return xn.assertIsDefined(r),t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,r)),"skip";case 267:const o=32&e.flags?Ra(145):Ra(144);return xn.assertIsDefined(o),t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,o)),"skip";case 265:return t.push(i(e,va.Type_aliases_can_only_be_used_in_TypeScript_files)),"skip";case 176:case 174:case 262:return e.body?void 0:(t.push(i(e,va.Signature_declarations_can_only_be_used_in_TypeScript_files)),"skip");case 266:const a=xn.checkDefined(Ra(94));return t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,a)),"skip";case 235:return t.push(i(e,va.Non_null_assertions_can_only_be_used_in_TypeScript_files)),"skip";case 234:return t.push(i(e.type,va.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 238:return t.push(i(e.type,va.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 216:xn.fail()}}function r(t,n,...r){const i=t.pos;return aS(e,i,t.end-i,n,...r)}function i(t,n,...r){return Jp(e,t,n,...r)}}))}(e)),Z(e.additionalSyntacticDiagnostics,e.parseDiagnostics)):e.parseDiagnostics}function Wt(e){try{return e()}catch(e){throw e instanceof Lr&&(U=void 0),e}}function Gt(e,t){return Z(vV(Xt(e,t),N),Vt(e))}function Xt(e,t){return tn(e,t,ee,Qt)}function Qt(e,t){return Wt((()=>{if(yT(e,N,at))return u;const n=Bt();xn.assert(!!e.bindDiagnostics);const r=(1===e.scriptKind||2===e.scriptKind)&&uT(e,N),i=Td(e,N.checkJs);let o=e.bindDiagnostics,a=n.getDiagnostics(e,t);return i&&(o=F(o,(e=>mV.has(e.code))),a=F(a,(e=>mV.has(e.code)))),function(e,t,...n){var r;const i=j(n);if(!t||!(null==(r=e.commentDirectives)?void 0:r.length))return i;const{diagnostics:o,directives:a}=Yt(e,e.commentDirectives,i);for(const t of a.getUnusedExpectations())o.push(Wp(e,t.range,va.Unused_ts_expect_error_directive));return o}(e,!i,o,a,r?e.jsDocDiagnostics:void 0)}))}function Yt(e,t,n){const r=qd(e,t),i=n.filter((e=>-1===function(e,t){const{file:n,start:r}=e;if(!n)return-1;const i=Ka(n);let o=Wa(i,r).line-1;for(;o>=0;){if(t.markUsed(o))return o;const e=n.text.slice(i[o],i[o+1]).trim();if(""!==e&&!/^(\s*)\/\/(.*)$/.test(e))return-1;o--}return-1}(e,r)));return{diagnostics:i,directives:r}}function Zt(e,t){return tn(e,t,te,en)}function en(e,t){return Wt((()=>{const n=Bt().getEmitResolver(e,t);return l$(Mt(_t),n,e)||u}))}function tn(e,t,n,r){var i;const o=e?null==(i=n.perFile)?void 0:i.get(e.path):n.allDiagnostics;if(o)return o;const a=r(e,t);return e?(n.perFile||(n.perFile=new Map)).set(e.path,a):n.allDiagnostics=a,a}function nn(e,t){return e.isDeclarationFile?[]:Zt(e,t)}function rn(e,t,n,r){dn(Xo(e),t,n,void 0,r)}function on(e,t){return e.fileName===t.fileName}function cn(e,t){return 80===e.kind?80===t.kind&&e.escapedText===t.escapedText:11===t.kind&&e.text===t.text}function ln(e,t){const n=YC.createStringLiteral(e),r=YC.createImportDeclaration(void 0,void 0,n);return sw(r,2),OT(n,r),OT(r,t),n.flags&=-17,r.flags&=-17,n}function un(e){if(e.imports)return;const t=Im(e),n=qI(e);let r,i,o;if(t||!e.isDeclarationFile&&(NS(N)||qI(e))){N.importHelpers&&(r=[ln(G_,e)]);const t=nk(tk(N,e),N);t&&(r||(r=[])).push(ln(t,e))}for(const t of e.statements)a(t,!1);return(4194304&e.flags||t)&&function(e){const n=/import|require/g;for(;null!==n.exec(e.text);){const i=s(e,n.lastIndex);if(t&&Jm(i,!0))LT(i,!1),r=ue(r,i.arguments[0]);else if(uf(i)&&i.arguments.length>=1&&$_(i.arguments[0]))LT(i,!1),r=ue(r,i.arguments[0]);else if(df(i))LT(i,!1),r=ue(r,i.argument.literal);else if(t&&AF(i)){const e=Cg(i);e&&wD(e)&&e.text&&(LT(i,!1),r=ue(r,e))}}}(e),e.imports=r||u,e.moduleAugmentations=i||u,void(e.ambientModuleNames=o||u);function a(t,s){if(Ep(t)){const n=Cg(t);!(n&&wD(n)&&n.text)||s&&Os(n.text)||(LT(t,!1),r=ue(r,n),$e||0!==me||e.isDeclarationFile||($e=an(n.text,"node:")))}else if(ZP(t)&&sp(t)&&(s||Bv(t,128)||e.isDeclarationFile)){t.name.parent=t;const r=Hh(t.name);if(n||s&&!Os(r))(i||(i=[])).push(t.name);else if(!s){e.isDeclarationFile&&(o||(o=[])).push(r);const n=t.body;if(n)for(const e of n.statements)a(e,!0)}}}function s(e,n){let r=e;const i=e=>{if(e.pos<=n&&(nAo(i,e))))return void(n&&(qk(i)?n(va.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option,e):n(va.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1,e,"'"+j(De).join("', '")+"'")));const o=t(e);if(n)if(o)cV(r)&&i===ye.getCanonicalFileName($t(r.file).fileName)&&n(va.A_file_cannot_have_a_reference_to_itself);else{const t=bn(e);t?n(va.Output_file_0_has_not_been_built_from_source_file_1,t,e):n(va.File_0_not_found,e)}return o}{const r=N.allowNonTsExtensions&&t(e);if(r)return r;if(n&&N.allowNonTsExtensions)return void n(va.File_0_not_found,e);const i=f(De[0],(n=>t(e+n)));return n&&!i&&n(va.Could_not_resolve_the_path_0_with_the_extensions_Colon_1,e,"'"+j(De).join("', '")+"'"),i}}function dn(e,t,n,r,i){_n(e,(e=>mn(e,t,n,i,r)),((e,...t)=>zn(void 0,i,e,t)),i)}function pn(e,t){return dn(e,!1,!1,void 0,t)}function fn(e,t,n){!cV(n)&&Q(Y.get(t.path),cV)?zn(t,n,va.Already_included_file_name_0_differs_from_file_name_1_only_in_casing,[t.fileName,e]):zn(t,n,va.File_name_0_differs_from_already_included_file_name_1_only_in_casing,[e,t.fileName])}function mn(e,t,n,r,i){var o,a;null==(o=or)||o.push(or.Phase.Program,"findSourceFile",{fileName:e,isDefaultLib:t||void 0,fileIncludeKind:jr[r.kind]});const s=function(e,t,n,r,i){var o;const a=Ft(e);if(Xe){let o=wn(a);if(!o&&ye.realpath&&N.preserveSymlinks&&QI(e)&&e.includes(Ij)){const t=Ft(ye.realpath(e));t!==a&&(o=wn(t))}if(o){const s=st(o)?mn(o,t,n,r,i):void 0;return s&&yn(s,a,e,void 0),s}}const s=e;if(qe.has(a)){const n=qe.get(a),i=hn(n||void 0,r,!0);if(n&&i&&!1!==N.forceConsistentCasingInFileNames){const t=n.fileName;Ft(t)!==Ft(e)&&(e=bn(e)||e),Qo(t,we)!==Qo(e,we)&&fn(e,n,r)}return n&&he.get(n.path)&&0===me?(he.set(n.path,!1),N.noResolve||(Pn(n,t),Fn(n)),N.noLib||Mn(n),ge.set(n.path,!1),jn(n)):n&&ge.get(n.path)&&mezn(void 0,r,va.Cannot_read_file_0_Colon_1,[e,t])),rt);if(i){const t=yd(i),n=Be.get(t);if(n){const t=function(e,t,n,r,i,o,a){var s;const c=_I.createRedirectedSourceFile({redirectTarget:e,unredirected:t});return c.fileName=n,c.path=r,c.resolvedPath=i,c.originalFileName=o,c.packageJsonLocations=(null==(s=a.packageJsonLocations)?void 0:s.length)?a.packageJsonLocations:void 0,c.packageJsonScope=a.packageJsonScope,he.set(r,me>0),c}(n,u,e,a,Ft(e),s,l);return ze.add(n.path,e),yn(t,a,e,c),hn(t,r,!1),Je.set(a,hd(i)),J.push(t),t}u&&(Be.set(t,u),Je.set(a,hd(i)))}if(yn(u,a,e,c),u){if(he.set(a,me>0),u.fileName=e,u.path=a,u.resolvedPath=Ft(e),u.originalFileName=s,u.packageJsonLocations=(null==(o=l.packageJsonLocations)?void 0:o.length)?l.packageJsonLocations:void 0,u.packageJsonScope=l.packageJsonScope,hn(u,r,!1),ye.useCaseSensitiveFileNames()){const t=yt(a),n=Ue.get(t);n?fn(e,n,r):Ue.set(t,u)}xe=xe||u.hasNoDefaultLib&&!n,N.noResolve||(Pn(u,t),Fn(u)),N.noLib||Mn(u),jn(u),t?B.push(u):J.push(u),(H??(H=new Set)).add(u.path)}return u}(e,t,n,r,i);return null==(a=or)||a.pop(),s}function gn(e,t,n,r){const i=fV(Go(e,we),null==t?void 0:t.getPackageJsonInfoCache(),n,r),o=wS(r),a=TS(r);return"object"==typeof i?{...i,languageVersion:o,setExternalModuleIndicator:a,jsDocParsingMode:n.jsDocParsingMode}:{languageVersion:o,impliedNodeFormat:i,setExternalModuleIndicator:a,jsDocParsingMode:n.jsDocParsingMode}}function hn(e,t,n){return!(!e||n&&cV(t)&&(null==H?void 0:H.has(t.file))||(Y.add(e.path,t),0))}function yn(e,t,n,r){r?(vn(n,r,e),vn(n,t,e||!1)):vn(n,t,e)}function vn(e,t,n){qe.set(t,n),void 0!==n?Ve.delete(t):Ve.set(t,e)}function bn(e){const t=Sn(e);return t&&kn(t,e)}function Sn(e){if(Ke&&Ke.length&&!QI(e)&&!Ao(e,".json"))return Tn(e)}function kn(e,t){const n=e.commandLine.options.outFile;return n?tT(n,".d.ts"):M$(t,e.commandLine,!ye.useCaseSensitiveFileNames())}function Tn(e){void 0===He&&(He=new Map,Cn((e=>{Ft(N.configFilePath)!==e.sourceFile.path&&e.commandLine.fileNames.forEach((t=>He.set(Ft(t),e.sourceFile.path)))})));const t=He.get(Ft(e));return t&&En(t)}function Cn(e){return tV(Ke,e)}function wn(e){if(QI(e))return void 0===Ge&&(Ge=new Map,Cn((e=>{const t=e.commandLine.options.outFile;if(t){const e=tT(t,".d.ts");Ge.set(Ft(e),!0)}else{const t=bt((()=>q$(e.commandLine,!ye.useCaseSensitiveFileNames())));f(e.commandLine.fileNames,(n=>{if(!QI(n)&&!Ao(n,".json")){const r=M$(n,e.commandLine,!ye.useCaseSensitiveFileNames(),t);Ge.set(Ft(r),n)}}))}}))),Ge.get(e)}function Dn(e){return Xe&&!!Tn(e)}function En(e){if(We)return We.get(e)||void 0}function Pn(e,t){f(e.referencedFiles,((n,r)=>{dn(xq(n.fileName,e.fileName),t,!1,void 0,{kind:4,file:e.path,index:r})}))}function Fn(e){const t=e.typeReferenceDirectives;if(!t.length)return;const n=(null==de?void 0:de.get(e.path))||Ot(t,e),r=pj();(_e??(_e=new Map)).set(e.path,r);for(let i=0;i{const r=sV(t);r?rn(In(r),!0,!0,{kind:7,file:e.path,index:n}):(ne||(ne=[])).push({kind:0,reason:{kind:7,file:e.path,index:n}})}))}function Ln(e){return ye.getCanonicalFileName(e)}function jn(e){var t;if(un(e),e.imports.length||e.moduleAugmentations.length){const n=kV(e),r=(null==le?void 0:le.get(e.path))||It(n,e);xn.assert(r.length===n.length);const i=(null==(t=Ct(e))?void 0:t.commandLine.options)||N,o=pj();(ce??(ce=new Map)).set(e.path,o);for(let t=0;tfe,f=d&&!SV(i,a,e)&&!i.noResolve&&t{u?void 0===i?r(n,i,o,va.Option_0_has_been_removed_Please_remove_it_from_your_configuration,n):r(n,i,o,va.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration,n,i):void 0===i?r(n,i,o,va.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error,n,t,e):r(n,i,o,va.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error,n,i,t,e)}))}function Jn(e,t,n,r){let i;const o=e&&Y.get(e.path);let a,s,c,l,_,d=cV(t)?t:void 0,p=e&&(null==G?void 0:G.get(e.path));p?(p.fileIncludeReasonDetails?(i=new Set(o),null==o||o.forEach(h)):null==o||o.forEach(g),l=p.redirectInfo):(null==o||o.forEach(g),l=e&&qU(e)),t&&g(t);const f=(null==i?void 0:i.size)!==(null==o?void 0:o.length);d&&1===(null==i?void 0:i.size)&&(i=void 0),i&&p&&(p.details&&!f?_=uS(p.details,n,...r||u):p.fileIncludeReasonDetails&&(f?a=y()?ue(p.fileIncludeReasonDetails.next.slice(0,o.length),a[0]):[...p.fileIncludeReasonDetails.next,a[0]]:y()?a=p.fileIncludeReasonDetails.next.slice(0,o.length):c=p.fileIncludeReasonDetails)),_||(c||(c=i&&uS(a,va.The_file_is_in_the_program_because_Colon)),_=uS(l?c?[c,...l]:l:c,n,...r||u)),e&&(p?(!p.fileIncludeReasonDetails||!f&&c)&&(p.fileIncludeReasonDetails=c):(G??(G=new Map)).set(e.path,p={fileIncludeReasonDetails:c,redirectInfo:l}),p.details||f||(p.details=_.next));const m=d&&uV(at,d);return m&&lV(m)?Vp(m.file,m.pos,m.end-m.pos,_,s):lS(_,s);function g(e){(null==i?void 0:i.has(e))||((i??(i=new Set)).add(e),(a??(a=[])).push(KU(at,e)),h(e))}function h(e){!d&&cV(e)?d=e:d!==e&&(s=ue(s,function(e){let t=null==X?void 0:X.get(e);return void 0===t&&(X??(X=new Map)).set(e,t=function(e){if(cV(e)){const t=uV(at,e);let n;switch(e.kind){case 3:n=va.File_is_included_via_import_here;break;case 4:n=va.File_is_included_via_reference_here;break;case 5:n=va.File_is_included_via_type_library_reference_here;break;case 7:n=va.File_is_included_via_library_reference_here;break;default:xn.assertNever(e)}return lV(t)?aS(t.file,t.pos,t.end-t.pos,n):void 0}if(!N.configFile)return;let t,n;switch(e.kind){case 0:if(!N.configFile.configFileSpecs)return;const i=Go(P[e.index],we),o=VU(at,i);if(o){t=Gf(N.configFile,"files",o),n=va.File_is_matched_by_files_list_specified_here;break}const a=UU(at,i);if(!a||!st(a))return;t=Gf(N.configFile,"include",a),n=va.File_is_matched_by_include_pattern_specified_here;break;case 1:case 2:const s=xn.checkDefined(null==Ke?void 0:Ke[e.index]),c=nV(I,Ke,((e,t,n)=>e===s?{sourceFile:(null==t?void 0:t.sourceFile)||N.configFile,index:n}:void 0));if(!c)return;const{sourceFile:l,index:u}=c,_=Xf(l,"references",(e=>WE(e.initializer)?e.initializer:void 0));return _&&_.elements.length>u?Jp(l,_.elements[u],2===e.kind?va.File_is_output_from_referenced_project_specified_here:va.File_is_source_from_referenced_project_specified_here):void 0;case 8:if(!N.types)return;t=Wn("types",e.typeReference),n=va.File_is_entry_point_of_type_library_specified_here;break;case 6:if(void 0!==e.index){t=Wn("lib",N.lib[e.index]),n=va.File_is_library_specified_here;break}const d=HS(wS(N));t=d?(r=d,Un("target",(e=>wD(e.initializer)&&e.initializer.text===r?e.initializer:void 0))):void 0,n=va.File_is_default_library_for_target_specified_here;break;default:xn.assertNever(e)}var r;return t&&Jp(N.configFile,t,n)}(e)??!1),t||void 0}(e)))}function y(){var e;return(null==(e=p.fileIncludeReasonDetails.next)?void 0:e.length)!==(null==o?void 0:o.length)}}function zn(e,t,n,r){(ne||(ne=[])).push({kind:1,file:e&&e.path,fileProcessingReason:t,diagnostic:n,args:r})}function $n(e,t,n){Ce.push({file:e,diagnostic:t,args:n})}function qn(e,t,n,...r){let i=!0;Kn((o=>{HE(o.initializer)&&Kf(o.initializer,e,(e=>{const o=e.initializer;WE(o)&&o.elements.length>t&&(Te.add(Jp(N.configFile,o.elements[t],n,...r)),i=!1)}))})),i&&Yn(n,...r)}function Vn(e,t,n,...r){let i=!0;Kn((o=>{HE(o.initializer)&&tr(o.initializer,e,t,void 0,n,...r)&&(i=!1)})),i&&Yn(n,...r)}function Un(e,t){return Kf(Zn(),e,t)}function Kn(e){return Un("paths",e)}function Wn(e,t){const n=Zn();return n&&Wf(n,e,t)}function Hn(e,t,n,r){Qn(!0,t,n,e,t,n,r)}function Gn(e,t,...n){Qn(!1,e,void 0,t,...n)}function Xn(e,t,n,...r){const i=Xf(e||N.configFile,"references",(e=>WE(e.initializer)?e.initializer:void 0));i&&i.elements.length>t?Te.add(Jp(e||N.configFile,i.elements[t],n,...r)):Te.add(cS(n,...r))}function Qn(e,t,n,r,...i){const o=Zn();(!o||!tr(o,e,t,n,r,...i))&&Yn(r,...i)}function Yn(e,...t){const n=er();n?"messageText"in e?Te.add(zp(N.configFile,n.name,e)):Te.add(Jp(N.configFile,n.name,e,...t)):"messageText"in e?Te.add(lS(e)):Te.add(cS(e,...t))}function Zn(){if(void 0===Ne){const e=er();Ne=e&<(e.initializer,HE)||!1}return Ne||void 0}function er(){return void 0===Fe&&(Fe=Kf(Hf(N.configFile),"compilerOptions",mt)||!1),Fe||void 0}function tr(e,t,n,r,i,...o){let a=!1;return Kf(e,n,(e=>{"messageText"in i?Te.add(zp(N.configFile,t?e.name:e.initializer,i)):Te.add(Jp(N.configFile,t?e.name:e.initializer,i,...o)),a=!0}),r),a}function nr(e,t){Pe.set(Ft(e),!0),Te.add(t)}function rr(e,t){return 0===ca(e,t,we,!ye.useCaseSensitiveFileNames())}function ir(){return ye.getSymlinkCache?ye.getSymlinkCache():($||($=ik(we,Ln)),z&&!$.hasProcessedResolutions()&&$.setSymlinksFromResolutions(ft,gt,ie),$)}function ar(e,t){var n;return Uq(e,t,(null==(n=Ct(e))?void 0:n.commandLine.options)||N)}}var hV={diagnostics:u,sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0};function yV(e,t,n,r){const i=e.getCompilerOptions();if(i.noEmit)return e.getSemanticDiagnostics(t,r),t||i.outFile?hV:e.emitBuildInfo(n,r);if(!i.noEmitOnError)return;let o,a=[...e.getOptionsDiagnostics(r),...e.getSyntacticDiagnostics(t,r),...e.getGlobalDiagnostics(r),...e.getSemanticDiagnostics(t,r)];if(0===a.length&&LS(e.getCompilerOptions())&&(a=e.getDeclarationDiagnostics(void 0,r)),a.length){if(!t&&!i.outFile){const t=e.emitBuildInfo(n,r);t.diagnostics&&(a=[...a,...t.diagnostics]),o=t.emittedFiles}return{diagnostics:a,sourceMaps:void 0,emittedFiles:o,emitSkipped:!0}}}function vV(e,t){return F(e,(e=>!e.skippedOn||!t[e.skippedOn]))}function bV(e,t=e){return{fileExists:e=>t.fileExists(e),readDirectory:(e,n,r,i,o)=>(xn.assertIsDefined(t.readDirectory,"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"),t.readDirectory(e,n,r,i,o)),readFile:e=>t.readFile(e),directoryExists:Ze(t,t.directoryExists),getDirectories:Ze(t,t.getDirectories),realpath:Ze(t,t.realpath),useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),getCurrentDirectory:()=>e.getCurrentDirectory(),onUnRecoverableConfigFileDiagnostic:e.onUnRecoverableConfigFileDiagnostic||ft,trace:e.trace?t=>e.trace(t):void 0}}function xV(e){return gK(e.path)}function SV(e,{extension:t},{isDeclarationFile:n}){switch(t){case".ts":case".d.ts":case".mts":case".d.mts":case".cts":case".d.cts":return;case".tsx":return r();case".jsx":return r()||i();case".js":case".mjs":case".cjs":return i();case".json":return MS(e)?void 0:va.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used;default:return n||e.allowArbitraryExtensions?void 0:va.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set}function r(){return e.jsx?void 0:va.Module_0_was_resolved_to_1_but_jsx_is_not_set}function i(){return JS(e)||!WS(e,"noImplicitAny")?void 0:va.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type}}function kV({imports:e,moduleAugmentations:t}){const n=e.map((e=>e));for(const e of t)11===e.kind&&n.push(e);return n}function TV({imports:e,moduleAugmentations:t},n){if(n(e[e.ComputedDts=0]="ComputedDts",e[e.StoredSignatureAtEmit=1]="StoredSignatureAtEmit",e[e.UsedVersion=2]="UsedVersion",e))(DV||{});(e=>{function t(){return function(e,t,r){const i={getKeys:e=>t.get(e),getValues:t=>e.get(t),keys:()=>e.keys(),size:()=>e.size,deleteKey:i=>{(r||(r=new Set)).add(i);const o=e.get(i);return!!o&&(o.forEach((e=>n(t,e,i))),e.delete(i),!0)},set:(o,a)=>{null==r||r.delete(o);const s=e.get(o);return e.set(o,a),null==s||s.forEach((e=>{a.has(e)||n(t,e,o)})),a.forEach((e=>{(null==s?void 0:s.has(e))||function(e,t,n){let r=e.get(t);r||(r=new Set,e.set(t,r)),r.add(n)}(t,e,o)})),i}};return i}(new Map,new Map,void 0)}function n(e,t,n){const r=e.get(t);return!!(null==r?void 0:r.delete(n))&&(r.size||e.delete(t),!0)}function r(e,t){const n=e.getSymbolAtLocation(t);return n&&function(e){return q(e.declarations,(e=>{var t;return null==(t=Sd(e))?void 0:t.resolvedPath}))}(n)}function i(e,t,n,r){return Yo(e.getProjectReferenceRedirect(t)||t,n,r)}function o(e,t,n){let o;if(t.imports&&t.imports.length>0){const n=e.getTypeChecker();for(const e of t.imports){const t=r(n,e);null==t||t.forEach(c)}}const a=Ro(t.resolvedPath);if(t.referencedFiles&&t.referencedFiles.length>0)for(const r of t.referencedFiles)c(i(e,r.fileName,a,n));if(e.forEachResolvedTypeReferenceDirective((({resolvedTypeReferenceDirective:t})=>{if(!t)return;const r=t.resolvedFileName;c(i(e,r,a,n))}),t),t.moduleAugmentations.length){const n=e.getTypeChecker();for(const e of t.moduleAugmentations){if(!wD(e))continue;const t=n.getSymbolAtLocation(e);t&&s(t)}}for(const t of e.getTypeChecker().getAmbientModules())t.declarations&&t.declarations.length>1&&s(t);return o;function s(e){if(e.declarations)for(const n of e.declarations){const e=Sd(n);e&&e!==t&&c(e.resolvedPath)}}function c(e){(o||(o=new Set)).add(e)}}function a(e,t){return t&&!t.referencedMap==!e}function s(e){return 0===e.module||e.outFile?void 0:t()}function c(e,t,n,r,i){const o=t.getSourceFileByPath(n);return o?_(e,t,o,r,i)?(e.referencedMap?h:g)(e,t,o,r,i):[o]:u}function l(e,t,n,r,i){e.emit(t,((n,o,a,s,c,l)=>{xn.assert(QI(n),`File extension for signature expected to be dts: Got:: ${n}`),i(YV(e,t,o,r,l),c)}),n,!0,void 0,!0)}function _(e,t,n,r,i,o=e.useFileVersionAsSignature){var a;if(null==(a=e.hasCalledUpdateShapeSignature)?void 0:a.has(n.resolvedPath))return!1;const s=e.fileInfos.get(n.resolvedPath),c=s.signature;let u;return n.isDeclarationFile||o||l(t,n,r,i,(t=>{u=t,i.storeSignatureInfo&&(e.signatureInfo??(e.signatureInfo=new Map)).set(n.resolvedPath,0)})),void 0===u&&(u=n.version,i.storeSignatureInfo&&(e.signatureInfo??(e.signatureInfo=new Map)).set(n.resolvedPath,2)),(e.oldSignatures||(e.oldSignatures=new Map)).set(n.resolvedPath,c||!1),(e.hasCalledUpdateShapeSignature||(e.hasCalledUpdateShapeSignature=new Set)).add(n.resolvedPath),s.signature=u,u!==c}function d(e,t){if(!e.allFileNames){const n=t.getSourceFiles();e.allFileNames=n===u?u:n.map((e=>e.fileName))}return e.allFileNames}function p(e,t){const n=e.referencedMap.getKeys(t);return n?$e(n.keys()):[]}function f(e){return function(e){return Q(e.moduleAugmentations,(e=>pp(e.parent)))}(e)||!Zp(e)&&!ef(e)&&!function(e){for(const t of e.statements)if(!cp(t))return!1;return!0}(e)}function m(e,t,n){if(e.allFilesExcludingDefaultLibraryFile)return e.allFilesExcludingDefaultLibraryFile;let r;n&&i(n);for(const e of t.getSourceFiles())e!==n&&i(e);return e.allFilesExcludingDefaultLibraryFile=r||u,e.allFilesExcludingDefaultLibraryFile;function i(e){t.isSourceFileDefaultLibrary(e)||(r||(r=[])).push(e)}}function g(e,t,n){const r=t.getCompilerOptions();return r&&r.outFile?[n]:m(e,t,n)}function h(e,t,n,r,i){if(f(n))return m(e,t,n);const o=t.getCompilerOptions();if(o&&(NS(o)||o.outFile))return[n];const a=new Map;a.set(n.resolvedPath,n);const s=p(e,n.resolvedPath);for(;s.length>0;){const n=s.pop();if(!a.has(n)){const o=t.getSourceFileByPath(n);a.set(n,o),o&&_(e,t,o,r,i)&&s.push(...p(e,o.resolvedPath))}}return $e(V(a.values(),(e=>e)))}e.createManyToManyPathMap=t,e.canReuseOldState=a,e.createReferencedMap=s,e.create=function(e,t,n){var r,i;const c=new Map,l=e.getCompilerOptions(),u=s(l),_=a(u,t);e.getTypeChecker();for(const n of e.getSourceFiles()){const a=xn.checkDefined(n.version,"Program intended to be used with Builder should have source files with versions set"),s=_?null==(r=t.oldSignatures)?void 0:r.get(n.resolvedPath):void 0,d=void 0===s?_?null==(i=t.fileInfos.get(n.resolvedPath))?void 0:i.signature:void 0:s||void 0;if(u){const t=o(e,n,e.getCanonicalFileName);t&&u.set(n.resolvedPath,t)}c.set(n.resolvedPath,{version:a,signature:d,affectsGlobalScope:l.outFile?void 0:f(n)||void 0,impliedFormat:n.impliedNodeFormat})}return{fileInfos:c,referencedMap:u,useFileVersionAsSignature:!n&&!_}},e.releaseCache=function(e){e.allFilesExcludingDefaultLibraryFile=void 0,e.allFileNames=void 0},e.getFilesAffectedBy=function(e,t,n,r,i){var o;const a=c(e,t,n,r,i);return null==(o=e.oldSignatures)||o.clear(),a},e.getFilesAffectedByWithOldState=c,e.updateSignatureOfFile=function(e,t,n){e.fileInfos.get(n).signature=t,(e.hasCalledUpdateShapeSignature||(e.hasCalledUpdateShapeSignature=new Set)).add(n)},e.computeDtsSignature=l,e.updateShapeSignature=_,e.getAllDependencies=function(e,t,n){if(t.getCompilerOptions().outFile)return d(e,t);if(!e.referencedMap||f(n))return d(e,t);const r=new Set,i=[n.resolvedPath];for(;i.length;){const t=i.pop();if(!r.has(t)){r.add(t);const n=e.referencedMap.getValues(t);if(n)for(const e of n.keys())i.push(e)}}return $e(V(r.keys(),(e=>{var n;return(null==(n=t.getSourceFileByPath(e))?void 0:n.fileName)??e})))},e.getReferencedByPaths=p,e.getAllFilesExcludingDefaultLibraryFile=m})(wV||(wV={}));var EV=(e=>(e[e.None=0]="None",e[e.Js=1]="Js",e[e.JsMap=2]="JsMap",e[e.JsInlineMap=4]="JsInlineMap",e[e.Dts=8]="Dts",e[e.DtsMap=16]="DtsMap",e[e.AllJs=7]="AllJs",e[e.AllDts=24]="AllDts",e[e.All=31]="All",e))(EV||{});function PV(e){let t=1;return e.sourceMap&&(t|=2),e.inlineSourceMap&&(t|=4),LS(e)&&(t|=8),e.declarationMap&&(t|=16),e.emitDeclarationOnly&&(t&=24),t}function NV(e,t){const n=t&&(ct(t)?t:PV(t)),r=ct(e)?e:PV(e);if(n===r)return 0;if(!n||!r)return r;const i=n^r;let o=0;return 7&i&&(o=7&r),24&i&&(o|=24&r),o}function FV(e,t){e.changedFilesSet.add(t),e.buildInfoEmitPending=!0,e.programEmitPending=void 0}function AV(e,t,n){return!!e.declarationMap==!!t.declarationMap?n:st(n)?[n]:n[0]}function IV(e,t){return e.length?L(e,(e=>{if(st(e.messageText))return e;const n=OV(e.messageText,e.file,t,(e=>{var t;return null==(t=e.repopulateInfo)?void 0:t.call(e)}));return n===e.messageText?e:{...e,messageText:n}})):e}function OV(e,t,n,r){const i=r(e);if(i)return{...gd(t,n,i.moduleReference,i.mode,i.packageName||i.moduleReference),next:MV(e.next,t,n,r)};const o=MV(e.next,t,n,r);return o===e.next?e:{...e,next:o}}function MV(e,t,n,r){return L(e,(e=>OV(e,t,n,r)))}function LV(e,t,n){if(!e.length)return u;let r;return e.map((e=>{const r=jV(e,t,n,i);r.reportsUnnecessary=e.reportsUnnecessary,r.reportsDeprecated=e.reportDeprecated,r.source=e.source,r.skippedOn=e.skippedOn;const{relatedInformation:o}=e;return r.relatedInformation=o?o.length?o.map((e=>jV(e,t,n,i))):[]:void 0,r}));function i(e){return r??(r=Ro(Go(P$(n.getCompilerOptions()),n.getCurrentDirectory()))),Yo(e,r,n.getCanonicalFileName)}}function jV(e,t,n,r){const{file:i}=e,o=!1!==i?n.getSourceFileByPath(i?r(i):t):void 0;return{...e,file:o,messageText:st(e.messageText)?e.messageText:OV(e.messageText,o,n,(e=>e.info))}}function RV(e,t){xn.assert(!t||!e.affectedFiles||e.affectedFiles[e.affectedFilesIndex-1]!==t||!e.semanticDiagnosticsPerFile.has(t.resolvedPath))}function BV(e,t,n){for(var r;;){const{affectedFiles:i}=e;if(i){const o=e.seenAffectedFiles;let a=e.affectedFilesIndex;for(;at.isSourceFileDefaultLibrary(r)&&!yT(r,n,t)&&qV(e,r.resolvedPath)))}}function zV(e,t,n,r){if(qV(e,t.resolvedPath),e.allFilesExcludingDefaultLibraryFile===e.affectedFiles)return JV(e),void wV.updateShapeSignature(e,xn.checkDefined(e.program),t,n,r);e.compilerOptions.assumeChangesOnlyAffectDirectDependencies||function(e,t,n,r){var i,o;if(!e.referencedMap||!e.changedFilesSet.has(t.resolvedPath))return;if(!VV(e,t.resolvedPath))return;if(NS(e.compilerOptions)){const i=new Map;i.set(t.resolvedPath,!0);const o=wV.getReferencedByPaths(e,t.resolvedPath);for(;o.length>0;){const t=o.pop();if(!i.has(t)){if(i.set(t,!0),UV(e,t,!1,n,r))return;if($V(e,t,!1,n,r),VV(e,t)){const n=xn.checkDefined(e.program).getSourceFileByPath(t);o.push(...wV.getReferencedByPaths(e,n.resolvedPath))}}}}const a=new Set,s=!!(null==(i=t.symbol)?void 0:i.exports)&&!!ld(t.symbol.exports,(n=>{if(0!=(128&n.flags))return!0;const r=mx(n,e.program.getTypeChecker());return r!==n&&0!=(128&r.flags)&&Q(r.declarations,(e=>Sd(e)===t))}));null==(o=e.referencedMap.getKeys(t.resolvedPath))||o.forEach((t=>{if(UV(e,t,s,n,r))return!0;const i=e.referencedMap.getKeys(t);return i&&ud(i,(t=>KV(e,t,s,a,n,r)))}))}(e,t,n,r)}function $V(e,t,n,r,i){if(qV(e,t),!e.changedFilesSet.has(t)){const o=xn.checkDefined(e.program),a=o.getSourceFileByPath(t);a&&(wV.updateShapeSignature(e,o,a,r,i,!0),n?tU(e,t,PV(e.compilerOptions)):LS(e.compilerOptions)&&tU(e,t,e.compilerOptions.declarationMap?24:8))}}function qV(e,t){return!e.semanticDiagnosticsFromOldState||(e.semanticDiagnosticsFromOldState.delete(t),e.semanticDiagnosticsPerFile.delete(t),!e.semanticDiagnosticsFromOldState.size)}function VV(e,t){const n=xn.checkDefined(e.oldSignatures).get(t)||void 0;return xn.checkDefined(e.fileInfos.get(t)).signature!==n}function UV(e,t,n,r,i){var o;return!!(null==(o=e.fileInfos.get(t))?void 0:o.affectsGlobalScope)&&(wV.getAllFilesExcludingDefaultLibraryFile(e,e.program,void 0).forEach((t=>$V(e,t.resolvedPath,n,r,i))),JV(e),!0)}function KV(e,t,n,r,i,o){var a;if(W(r,t)){if(UV(e,t,n,i,o))return!0;$V(e,t,n,i,o),null==(a=e.referencedMap.getKeys(t))||a.forEach((t=>KV(e,t,n,r,i,o)))}}function WV(e,t,n){return Z(function(e,t,n){const r=t.resolvedPath;if(e.semanticDiagnosticsPerFile){const t=e.semanticDiagnosticsPerFile.get(r);if(t)return vV(t,e.compilerOptions)}const i=xn.checkDefined(e.program).getBindAndCheckDiagnostics(t,n);return e.semanticDiagnosticsPerFile&&e.semanticDiagnosticsPerFile.set(r,i),vV(i,e.compilerOptions)}(e,t,n),xn.checkDefined(e.program).getProgramDiagnostics(t))}function HV(e){var t;return!!(null==(t=e.options)?void 0:t.outFile)}var GV=(e=>(e[e.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",e[e.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram",e))(GV||{});function XV(e,t,n,r,i,o){let a,s,c;return void 0===e?(xn.assert(void 0===t),a=n,c=r,xn.assert(!!c),s=c.getProgram()):ot(e)?(c=r,s=gV({rootNames:e,options:t,host:n,oldProgram:c&&c.getProgramOrUndefined(),configFileParsingDiagnostics:i,projectReferences:o}),a=n):(s=e,a=t,c=n,i=r),{host:a,newProgram:s,oldProgram:c,configFileParsingDiagnostics:i||u}}function QV(e,t){return void 0!==(null==t?void 0:t.sourceMapUrlPos)?e.substring(0,t.sourceMapUrlPos):e}function YV(e,t,n,r,i){var o;let a;return n=QV(n,i),(null==(o=null==i?void 0:i.diagnostics)?void 0:o.length)&&(n+=i.diagnostics.map((n=>`${function(n){return n.file.resolvedPath===t.resolvedPath?`(${n.start},${n.length})`:(void 0===a&&(a=Ro(t.resolvedPath)),`${ta(da(a,n.file.resolvedPath,e.getCanonicalFileName))}(${n.start},${n.length})`)}(n)}${yi[n.category]}${n.code}: ${s(n.messageText)}`)).join("\n")),(r.createHash??Hi)(n);function s(e){return st(e)?e:void 0===e?"":e.next?e.messageText+e.next.map(s).join("\n"):e.messageText}}function ZV(e,t,n){return(t.createHash??Hi)(QV(e,n))}function eU(e,{newProgram:t,host:n,oldProgram:r,configFileParsingDiagnostics:i}){let o=r&&r.getState();if(o&&t===o.program&&i===t.getConfigFileParsingDiagnostics())return t=void 0,o=void 0,r;const a=function(e,t){var n,r;const i=wV.create(e,t,!1);i.program=e;const o=e.getCompilerOptions();i.compilerOptions=o;const a=o.outFile;a?o.composite&&(null==t?void 0:t.outSignature)&&a===t.compilerOptions.outFile&&(i.outSignature=t.outSignature&&AV(o,t.compilerOptions,t.outSignature)):i.semanticDiagnosticsPerFile=new Map,i.changedFilesSet=new Set,i.latestChangedDtsFile=o.composite?null==t?void 0:t.latestChangedDtsFile:void 0;const s=wV.canReuseOldState(i.referencedMap,t),c=s?t.compilerOptions:void 0,l=s&&t.semanticDiagnosticsPerFile&&!!i.semanticDiagnosticsPerFile&&!XS(o,c),u=o.composite&&(null==t?void 0:t.emitSignatures)&&!a&&!YS(o,t.compilerOptions);s?(null==(n=t.changedFilesSet)||n.forEach((e=>i.changedFilesSet.add(e))),!a&&(null==(r=t.affectedFilesPendingEmit)?void 0:r.size)&&(i.affectedFilesPendingEmit=new Map(t.affectedFilesPendingEmit),i.seenAffectedFiles=new Set),i.programEmitPending=t.programEmitPending):i.buildInfoEmitPending=!0;const _=i.referencedMap,d=s?t.referencedMap:void 0,p=l&&!o.skipLibCheck==!c.skipLibCheck,f=p&&!o.skipDefaultLibCheck==!c.skipDefaultLibCheck;if(i.fileInfos.forEach(((n,r)=>{var a;let c,m;if(!s||!(c=t.fileInfos.get(r))||c.version!==n.version||c.impliedFormat!==n.impliedFormat||(g=m=_&&_.getValues(r))!==(h=d&&d.getValues(r))&&(void 0===g||void 0===h||g.size!==h.size||ud(g,(e=>!h.has(e))))||m&&ud(m,(e=>!i.fileInfos.has(e)&&t.fileInfos.has(e))))FV(i,r);else{const n=e.getSourceFileByPath(r),o=null==(a=t.emitDiagnosticsPerFile)?void 0:a.get(r);if(o&&(i.emitDiagnosticsPerFile??(i.emitDiagnosticsPerFile=new Map)).set(r,t.hasReusableDiagnostic?LV(o,r,e):IV(o,e)),l){if(n.isDeclarationFile&&!p)return;if(n.hasNoDefaultLib&&!f)return;const o=t.semanticDiagnosticsPerFile.get(r);o&&(i.semanticDiagnosticsPerFile.set(r,t.hasReusableDiagnostic?LV(o,r,e):IV(o,e)),(i.semanticDiagnosticsFromOldState??(i.semanticDiagnosticsFromOldState=new Set)).add(r))}}var g,h;if(u){const e=t.emitSignatures.get(r);e&&(i.emitSignatures??(i.emitSignatures=new Map)).set(r,AV(o,t.compilerOptions,e))}})),s&&ld(t.fileInfos,((e,t)=>!(i.fileInfos.has(t)||!a&&!e.affectsGlobalScope&&(i.buildInfoEmitPending=!0,1)))))wV.getAllFilesExcludingDefaultLibraryFile(i,e,void 0).forEach((e=>FV(i,e.resolvedPath)));else if(c){const t=QS(o,c)?PV(o):NV(o,c);0!==t&&(a?i.programEmitPending=i.programEmitPending?i.programEmitPending|t:t:(e.getSourceFiles().forEach((e=>{i.changedFilesSet.has(e.resolvedPath)||tU(i,e.resolvedPath,t)})),xn.assert(!i.seenAffectedFiles||!i.seenAffectedFiles.size),i.seenAffectedFiles=i.seenAffectedFiles||new Set,i.buildInfoEmitPending=!0))}return i}(t,o);t.getBuildInfo=()=>function(e){var t,n;const r=xn.checkDefined(e.program).getCurrentDirectory(),i=Ro(Go(P$(e.compilerOptions),r)),o=e.latestChangedDtsFile?x(e.latestChangedDtsFile):void 0,a=[],s=new Map,c=new Set(e.program.getRootFileNames().map((t=>Yo(t,r,e.program.getCanonicalFileName)))),l=[];if(e.compilerOptions.outFile){const t=$e(e.fileInfos.entries(),(([e,t])=>(C(e,k(e)),t.impliedFormat?{version:t.version,impliedFormat:t.impliedFormat,signature:void 0,affectsGlobalScope:void 0}:t.version)));return G$({fileNames:a,fileInfos:t,root:l,resolvedRoot:w(),options:D(e.compilerOptions),outSignature:e.outSignature,latestChangedDtsFile:o,pendingEmit:e.programEmitPending?e.programEmitPending!==PV(e.compilerOptions)&&e.programEmitPending:void 0})}let _,d,p;const m=$e(e.fileInfos.entries(),(([t,n])=>{var r,i;const o=k(t);C(t,o),xn.assert(a[o-1]===S(t));const s=null==(r=e.oldSignatures)?void 0:r.get(t),c=void 0!==s?s||void 0:n.signature;if(e.compilerOptions.composite){const n=e.program.getSourceFileByPath(t);if(!ef(n)&&ov(n,e.program)){const n=null==(i=e.emitSignatures)?void 0:i.get(t);n!==c&&(p=ue(p,void 0===n?o:[o,st(n)||n[0]!==c?n:u]))}}return n.version===c?n.affectsGlobalScope||n.impliedFormat?{version:n.version,signature:void 0,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}:n.version:void 0!==c?void 0===s?n:{version:n.version,signature:c,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}:{version:n.version,signature:!1,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}}));let g;(null==(t=e.referencedMap)?void 0:t.size())&&(g=$e(e.referencedMap.keys()).sort(Mt).map((t=>[k(t),T(e.referencedMap.getValues(t))])));const h=function(){let t;return e.fileInfos.forEach(((n,r)=>{var i;const o=null==(i=e.semanticDiagnosticsPerFile)?void 0:i.get(r);o?o.length&&(t=ue(t,[k(r),P(o,r)])):e.changedFilesSet.has(r)||(t=ue(t,k(r)))})),t}();let y,v;if(null==(n=e.affectedFilesPendingEmit)?void 0:n.size){const t=PV(e.compilerOptions),n=new Set;for(const r of $e(e.affectedFilesPendingEmit.keys()).sort(Mt))if(W(n,r)){const n=e.program.getSourceFileByPath(r);if(!n||!ov(n,e.program))continue;const i=k(r),o=e.affectedFilesPendingEmit.get(r);y=ue(y,o===t?i:8===o?[i]:[i,o])}}if(e.changedFilesSet.size)for(const t of $e(e.changedFilesSet.keys()).sort(Mt))v=ue(v,k(t));const b=function(){var t;let n;if(!(null==(t=e.emitDiagnosticsPerFile)?void 0:t.size))return n;for(const t of $e(e.emitDiagnosticsPerFile.keys()).sort(Mt)){const r=e.emitDiagnosticsPerFile.get(t);n=ue(n,[k(t),P(r,t)])}return n}();return G$({fileNames:a,fileInfos:m,root:l,resolvedRoot:w(),options:D(e.compilerOptions),fileIdsList:_,referencedMap:g,semanticDiagnosticsPerFile:h,emitDiagnosticsPerFile:b,affectedFilesPendingEmit:y,changeFileSet:v,emitSignatures:p,latestChangedDtsFile:o});function x(e){return S(Go(e,r))}function S(t){return ta(da(i,t,e.program.getCanonicalFileName))}function k(e){let t=s.get(e);return void 0===t&&(a.push(S(e)),s.set(e,t=a.length)),t}function T(e){const t=$e(e.keys(),k).sort(Nt),n=t.join();let r=null==d?void 0:d.get(n);return void 0===r&&(_=ue(_,t),(d??(d=new Map)).set(n,r=_.length)),r}function C(t,n){const r=e.program.getSourceFile(t);if(!e.program.getFileIncludeReasons().get(r.path).some((e=>0===e.kind)))return;if(!l.length)return l.push(n);const i=l[l.length-1],o=ot(i);if(o&&i[1]===n-1)return i[1]=n;if(o||1===l.length||i!==n-1)return l.push(n);const a=l[l.length-2];return ct(a)&&a===i-1?(l[l.length-2]=[a,n],l.length=l.length-1):l.push(n)}function w(){let t;return c.forEach((n=>{const r=e.program.getSourceFileByPath(n);r&&n!==r.resolvedPath&&(t=ue(t,[k(r.resolvedPath),k(n)]))})),t}function D(e){let t;const{optionsNameMap:n}=MO();for(const r of Re(e).sort(Mt)){const i=n.get(r.toLowerCase());(null==i?void 0:i.affectsBuildInfo)&&((t||(t={}))[r]=E(i,e[r]))}return t}function E(e,t){if(e)if(xn.assert("listOrElement"!==e.type),"list"===e.type){const n=t;if(e.element.isFilePath&&n.length)return n.map(x)}else if(e.isFilePath)return x(t);return t}function P(e,t){return xn.assert(!!e.length),e.map((e=>{const n=N(e,t);n.reportsUnnecessary=e.reportsUnnecessary,n.reportDeprecated=e.reportsDeprecated,n.source=e.source,n.skippedOn=e.skippedOn;const{relatedInformation:r}=e;return n.relatedInformation=r?r.length?r.map((e=>N(e,t))):[]:void 0,n}))}function N(e,t){const{file:n}=e;return{...e,file:!!n&&(n.resolvedPath===t?void 0:S(n.resolvedPath)),messageText:st(e.messageText)?e.messageText:F(e.messageText)}}function F(e){if(e.repopulateInfo)return{info:e.repopulateInfo(),next:A(e.next)};const t=A(e.next);return t===e.next?e:{...e,next:t}}function A(e){return e&&f(e,((t,n)=>{const r=F(t);if(t===r)return;const i=n>0?e.slice(0,n-1):[];i.push(r);for(let t=n+1;ta,c=sU(s,i);return c.getState=s,c.saveEmitState=()=>function(e){const t=e.compilerOptions.outFile;return xn.assert(!e.changedFilesSet.size||t),{affectedFilesPendingEmit:e.affectedFilesPendingEmit&&new Map(e.affectedFilesPendingEmit),seenEmittedFiles:e.seenEmittedFiles&&new Map(e.seenEmittedFiles),programEmitPending:e.programEmitPending,emitSignatures:e.emitSignatures&&new Map(e.emitSignatures),outSignature:e.outSignature,latestChangedDtsFile:e.latestChangedDtsFile,hasChangedEmitSignature:e.hasChangedEmitSignature,changedFilesSet:t?new Set(e.changedFilesSet):void 0,buildInfoEmitPending:e.buildInfoEmitPending,emitDiagnosticsPerFile:e.emitDiagnosticsPerFile&&new Map(e.emitDiagnosticsPerFile)}}(a),c.restoreEmitState=e=>function(e,t){e.affectedFilesPendingEmit=t.affectedFilesPendingEmit,e.seenEmittedFiles=t.seenEmittedFiles,e.programEmitPending=t.programEmitPending,e.emitSignatures=t.emitSignatures,e.outSignature=t.outSignature,e.latestChangedDtsFile=t.latestChangedDtsFile,e.hasChangedEmitSignature=t.hasChangedEmitSignature,e.buildInfoEmitPending=t.buildInfoEmitPending,e.emitDiagnosticsPerFile=t.emitDiagnosticsPerFile,t.changedFilesSet&&(e.changedFilesSet=t.changedFilesSet)}(a,e),c.hasChangedEmitSignature=()=>!!a.hasChangedEmitSignature,c.getAllDependencies=e=>wV.getAllDependencies(a,xn.checkDefined(a.program),e),c.getSemanticDiagnostics=function(e,t){if(RV(a,e),xn.checkDefined(a.program).getCompilerOptions().outFile)return xn.assert(!a.semanticDiagnosticsPerFile),xn.checkDefined(a.program).getSemanticDiagnostics(e,t);if(e)return WV(a,e,t);for(;d(t););let n;for(const e of xn.checkDefined(a.program).getSourceFiles())n=pe(n,WV(a,e,t));return n||u},c.emit=function(t,n,r,i,o){1===e&&RV(a,t);const s=yV(c,t,n,r);if(s)return s;if(!t){if(1===e){let e,t,a=[],s=!1,c=[];for(;t=l(n,r,i,o);)s=s||t.result.emitSkipped,e=pe(e,t.result.diagnostics),c=pe(c,t.result.emittedFiles),a=pe(a,t.result.sourceMaps);return{emitSkipped:s,diagnostics:e||u,emittedFiles:c,sourceMaps:a}}!function(e,t){var n;(null==(n=e.affectedFilesPendingEmit)?void 0:n.size)&&(t?e.affectedFilesPendingEmit.forEach(((t,n)=>{const r=7&t;r?e.affectedFilesPendingEmit.set(n,r):e.affectedFilesPendingEmit.delete(n)})):e.affectedFilesPendingEmit=void 0)}(a,i)}return xn.checkDefined(a.program).emit(t,_(n,o),r,i,o)},c.releaseProgram=()=>function(e){wV.releaseCache(e),e.program=void 0}(a),0===e?c.getSemanticDiagnosticsOfNextAffectedFile=d:1===e?(c.getSemanticDiagnosticsOfNextAffectedFile=d,c.emitNextAffectedFile=l,c.emitBuildInfo=function(e,t){if(a.buildInfoEmitPending){const r=xn.checkDefined(a.program).emitBuildInfo(e||Ze(n,n.writeFile),t);return a.buildInfoEmitPending=!1,r}return hV}):vt(),c;function l(e,t,r,i){var o,s,c;let l=BV(a,t,n);const u=PV(a.compilerOptions);let d,p=r?24&u:u;if(!l)if(a.compilerOptions.outFile){if(!a.programEmitPending)return;if(p=a.programEmitPending,r&&(p&=24),!p)return;l=a.program}else{const i=function(e,t){var n;if(null==(n=e.affectedFilesPendingEmit)?void 0:n.size)return ld(e.affectedFilesPendingEmit,((n,r)=>{var i;const o=e.program.getSourceFileByPath(r);if(!o||!ov(o,e.program))return void e.affectedFilesPendingEmit.delete(r);let a=NV(n,null==(i=e.seenEmittedFiles)?void 0:i.get(o.resolvedPath));return t&&(a&=24),a?{affectedFile:o,emitKind:a}:void 0}))}(a,r);if(!i){const r=function(e){var t;if(null==(t=e.emitDiagnosticsPerFile)?void 0:t.size)return ld(e.emitDiagnosticsPerFile,((t,n)=>{var r;const i=e.program.getSourceFileByPath(n);if(!i||!ov(i,e.program))return void e.emitDiagnosticsPerFile.delete(n);const o=(null==(r=e.seenEmittedFiles)?void 0:r.get(i.resolvedPath))||0;return 24&o?void 0:{affectedFile:i,diagnostics:t,seenKind:o}}))}(a);if(r)return(a.seenEmittedFiles??(a.seenEmittedFiles=new Map)).set(r.affectedFile.resolvedPath,24|r.seenKind),{result:{emitSkipped:!0,diagnostics:r.diagnostics},affected:r.affectedFile};if(!a.buildInfoEmitPending)return;const i=a.program,o=i.emitBuildInfo(e||Ze(n,n.writeFile),t);return a.buildInfoEmitPending=!1,{result:o,affected:i}}({affectedFile:l,emitKind:p}=i)}7&p&&(d=0),24&p&&(d=void 0===d?1:void 0),l===a.program&&(a.programEmitPending=a.changedFilesSet.size?NV(u,p):a.programEmitPending?NV(a.programEmitPending,p):void 0);const f=a.program.emit(l===a.program?void 0:l,_(e,i),t,d,i);if(l!==a.program){const e=l;a.seenAffectedFiles.add(e.resolvedPath),void 0!==a.affectedFilesIndex&&a.affectedFilesIndex++,a.buildInfoEmitPending=!0;const t=(null==(o=a.seenEmittedFiles)?void 0:o.get(e.resolvedPath))||0;(a.seenEmittedFiles??(a.seenEmittedFiles=new Map)).set(e.resolvedPath,p|t);const n=NV((null==(s=a.affectedFilesPendingEmit)?void 0:s.get(e.resolvedPath))||u,p|t);n?(a.affectedFilesPendingEmit??(a.affectedFilesPendingEmit=new Map)).set(e.resolvedPath,n):null==(c=a.affectedFilesPendingEmit)||c.delete(e.resolvedPath),f.diagnostics.length&&(a.emitDiagnosticsPerFile??(a.emitDiagnosticsPerFile=new Map)).set(e.resolvedPath,f.diagnostics)}else a.changedFilesSet.clear();return{result:f,affected:l}}function _(e,t){return LS(a.compilerOptions)?(r,i,o,s,c,l)=>{var u,_,d;if(QI(r))if(a.compilerOptions.outFile){if(a.compilerOptions.composite){const e=p(a.outSignature,void 0);if(!e)return;a.outSignature=e}}else{let e;if(xn.assert(1===(null==c?void 0:c.length)),!t){const t=c[0],r=a.fileInfos.get(t.resolvedPath);if(r.signature===t.version){const o=YV(a.program,t,i,n,l);(null==(u=null==l?void 0:l.diagnostics)?void 0:u.length)||(e=o),o!==t.version&&(n.storeSignatureInfo&&(a.signatureInfo??(a.signatureInfo=new Map)).set(t.resolvedPath,1),a.affectedFiles?(void 0===(null==(_=a.oldSignatures)?void 0:_.get(t.resolvedPath))&&(a.oldSignatures??(a.oldSignatures=new Map)).set(t.resolvedPath,r.signature||!1),r.signature=o):r.signature=o)}}if(a.compilerOptions.composite){const t=c[0].resolvedPath;if(e=p(null==(d=a.emitSignatures)?void 0:d.get(t),e),!e)return;(a.emitSignatures??(a.emitSignatures=new Map)).set(t,e)}}function p(e,t){const o=!e||st(e)?e:e[0];if(t??(t=ZV(i,n,l)),t===o){if(e===o)return;l?l.differsOnlyInMap=!0:l={differsOnlyInMap:!0}}else a.hasChangedEmitSignature=!0,a.latestChangedDtsFile=r;return t}e?e(r,i,o,s,c,l):n.writeFile?n.writeFile(r,i,o,s,c,l):a.program.writeFile(r,i,o,s,c,l)}:e||Ze(n,n.writeFile)}function d(e,t){for(;;){const r=BV(a,e,n);let i;if(!r)return;if(r!==a.program){const n=r;if(t&&t(n)||(i=WV(a,n,e)),a.seenAffectedFiles.add(n.resolvedPath),a.affectedFilesIndex++,a.buildInfoEmitPending=!0,!i)continue}else i=a.program.getSemanticDiagnostics(void 0,e),a.changedFilesSet.clear(),a.programEmitPending=PV(a.compilerOptions);return{result:i,affected:r}}}}function tU(e,t,n){var r,i;const o=(null==(r=e.affectedFilesPendingEmit)?void 0:r.get(t))||0;(e.affectedFilesPendingEmit??(e.affectedFilesPendingEmit=new Map)).set(t,o|n),null==(i=e.emitDiagnosticsPerFile)||i.delete(t)}function nU(e){return st(e)?{version:e,signature:e,affectsGlobalScope:void 0,impliedFormat:void 0}:st(e.signature)?e:{version:e.version,signature:!1===e.signature?void 0:e.version,affectsGlobalScope:e.affectsGlobalScope,impliedFormat:e.impliedFormat}}function rU(e,t){return ct(e)?t:e[1]||8}function iU(e,t){return e||PV(t||{})}function oU(e,t,n){var r,i,o,a;const s=e.program,c=Ro(Go(t,n.getCurrentDirectory())),l=tn(n.useCaseSensitiveFileNames());let _;const d=null==(r=s.fileNames)?void 0:r.map((function(e){return Yo(e,c,l)}));let p;const f=s.latestChangedDtsFile?g(s.latestChangedDtsFile):void 0;if(HV(s)){const e=new Map;s.fileInfos.forEach(((t,n)=>{const r=h(n+1);e.set(r,st(t)?{version:t,signature:void 0,affectsGlobalScope:void 0,impliedFormat:void 0}:t)})),_={fileInfos:e,compilerOptions:s.options?jM(s.options,g):{},latestChangedDtsFile:f,outSignature:s.outSignature,programEmitPending:void 0===s.pendingEmit?void 0:iU(s.pendingEmit,s.options)}}else{p=null==(i=s.fileIdsList)?void 0:i.map((e=>new Set(e.map(h))));const e=new Map,t=(null==(o=s.options)?void 0:o.composite)&&!s.options.outFile?new Map:void 0;s.fileInfos.forEach(((n,r)=>{const i=h(r+1),o=nU(n);e.set(i,o),t&&o.signature&&t.set(i,o.signature)})),null==(a=s.emitSignatures)||a.forEach((e=>{if(ct(e))t.delete(h(e));else{const n=h(e[0]);t.set(n,st(e[1])||e[1].length?e[1]:[t.get(n)])}}));const n=new Set(O(s.changeFileSet,h)),r=s.affectedFilesPendingEmit?PV(s.options||{}):void 0;_={fileInfos:e,compilerOptions:s.options?jM(s.options,g):{},referencedMap:function(e,t){const n=wV.createReferencedMap(t);return n&&e?(e.forEach((([e,t])=>n.set(h(e),p[t-1]))),n):n}(s.referencedMap,s.options??{}),semanticDiagnosticsPerFile:function(e,t,n){const r=new Map(V(t.keys(),(e=>n.has(e)?void 0:[e,u])));return null==e||e.forEach((e=>{ct(e)?r.delete(h(e)):r.set(h(e[0]),e[1])})),r.size?r:void 0}(s.semanticDiagnosticsPerFile,e,n),emitDiagnosticsPerFile:(m=s.emitDiagnosticsPerFile,m&&Ue(m,(e=>h(e[0])),(e=>e[1]))),hasReusableDiagnostic:!0,affectedFilesPendingEmit:s.affectedFilesPendingEmit&&Ue(s.affectedFilesPendingEmit,(e=>h(ct(e)?e:e[0])),(e=>rU(e,r))),changedFilesSet:n,latestChangedDtsFile:f,emitSignatures:(null==t?void 0:t.size)?t:void 0}}var m;return{getState:()=>_,saveEmitState:_t,restoreEmitState:_t,getProgram:vt,getProgramOrUndefined:ft,releaseProgram:_t,getCompilerOptions:()=>_.compilerOptions,getSourceFile:vt,getSourceFiles:vt,getOptionsDiagnostics:vt,getGlobalDiagnostics:vt,getConfigFileParsingDiagnostics:vt,getSyntacticDiagnostics:vt,getDeclarationDiagnostics:vt,getSemanticDiagnostics:vt,emit:vt,getAllDependencies:vt,getCurrentDirectory:vt,emitNextAffectedFile:vt,getSemanticDiagnosticsOfNextAffectedFile:vt,emitBuildInfo:vt,close:_t,hasChangedEmitSignature:dt};function g(e){return Go(e,c)}function h(e){return d[e-1]}}function aU(e,t,n){const r=Ro(Go(t,n.getCurrentDirectory())),i=tn(n.useCaseSensitiveFileNames()),o=new Map;let a=0;const s=new Map,c=new Map(e.resolvedRoot);return e.fileInfos.forEach(((t,n)=>{const s=Yo(e.fileNames[n],r,i),c=st(t)?t:t.version;if(o.set(s,c),ae().program,releaseProgram:()=>e().program=void 0,getCompilerOptions:()=>e().compilerOptions,getSourceFile:e=>n().getSourceFile(e),getSourceFiles:()=>n().getSourceFiles(),getOptionsDiagnostics:e=>n().getOptionsDiagnostics(e),getGlobalDiagnostics:e=>n().getGlobalDiagnostics(e),getConfigFileParsingDiagnostics:()=>t,getSyntacticDiagnostics:(e,t)=>n().getSyntacticDiagnostics(e,t),getDeclarationDiagnostics:(e,t)=>n().getDeclarationDiagnostics(e,t),getSemanticDiagnostics:(e,t)=>n().getSemanticDiagnostics(e,t),emit:(e,t,r,i,o)=>n().emit(e,t,r,i,o),emitBuildInfo:(e,t)=>n().emitBuildInfo(e,t),getAllDependencies:vt,getCurrentDirectory:()=>n().getCurrentDirectory(),close:_t};function n(){return xn.checkDefined(e().program)}}function cU(e,t,n,r,i,o){return eU(0,XV(e,t,n,r,i,o))}function lU(e,t,n,r,i,o){return eU(1,XV(e,t,n,r,i,o))}function uU(e,t,n,r,i,o){const{newProgram:a,configFileParsingDiagnostics:s}=XV(e,t,n,r,i,o);return sU((()=>({program:a,compilerOptions:a.getCompilerOptions()})),s)}function _U(e){return Wt(e,"/node_modules/.staging")?Ht(e,"/.staging"):Q(co,(t=>e.includes(t)))?void 0:e}function dU(e,t){if(t<=1)return 1;let n=1,r=0===e[0].search(/[a-zA-Z]:/);if(e[0]!==xo&&!r&&0===e[1].search(/[a-zA-Z]\$$/)){if(2===t)return 2;n=2,r=!0}return r&&!e[n].match(/^users$/i)?n:e[n].match(/^workspaces$/i)?n+1:n+2}function pU(e,t){return void 0===t&&(t=e.length),!(t<=2)&&t>dU(e,t)+1}function fU(e){return gU(Ro(e))}function mU(e,t){if(t.lengthi.length+1?bU(s,a,Math.max(i.length+1,c+1),u):{dir:n,dirPath:r,nonRecursive:!0}:vU(s,a,a.length-1,c,l,i,u)}function vU(e,t,n,r,i,o,a){if(-1!==i)return bU(e,t,i+1,a);let s=!0,c=n;for(let e=0;e=n&&r+2function(e,t,n,r,i,o,a){const s=TU(e),c=Sj(n,r,i,s,t,o,a);if(!e.getGlobalCache)return c;const l=e.getGlobalCache();if(!(void 0===l||Os(n)||c.resolvedModule&&oT(c.resolvedModule.extension))){const{resolvedModule:r,failedLookupLocations:o,affectingLocations:a,resolutionDiagnostics:u}=SR(xn.checkDefined(e.globalCacheResolutionModuleName)(n),e.projectName,i,s,l,t);if(r)return c.resolvedModule=r,c.failedLookupLocations=KL(c.failedLookupLocations,o),c.affectingLocations=KL(c.affectingLocations,a),c.resolutionDiagnostics=KL(c.resolutionDiagnostics,u),c}return c}(r,i,o,e,n,t,a)}}function wU(e,t,n){let r,i,o;const a=et(),s=new Set,c=new Set,l=new Map,_=new Map;let d,p,f,m,g,y=!1,v=!1;const b=bt((()=>e.getCurrentDirectory())),x=e.getCachedDirectoryStructureHost(),S=new Map,k=hj(b(),e.getCanonicalFileName,e.getCompilationSettings()),T=new Map,C=yj(b(),e.getCanonicalFileName,e.getCompilationSettings(),k.getPackageJsonInfoCache(),k.optionsToRedirectsKey),w=new Map,D=hj(b(),e.getCanonicalFileName,vj(e.getCompilationSettings()),k.getPackageJsonInfoCache()),E=new Map,P=new Map,N=SU(t,b),F=e.toPath(N),A=$o(F),I=new Map,O=new Map,M=new Map,L=new Map;return{rootDirForResolution:t,resolvedModuleNames:S,resolvedTypeReferenceDirectives:T,resolvedLibraries:w,resolvedFileToResolution:l,resolutionsWithFailedLookups:s,resolutionsWithOnlyAffectingLocations:c,directoryWatchesOfFailedLookups:E,fileWatchesOfAffectingLocations:P,packageDirWatchers:O,dirPathToSymlinkPackageRefCount:M,watchFailedLookupLocationsOfExternalModuleResolutions:U,getModuleResolutionCache:()=>k,startRecordingFilesWithChangedResolutions:function(){r=[]},finishRecordingFilesWithChangedResolutions:function(){const e=r;return r=void 0,e},startCachingPerDirectoryResolution:function(){k.isReadonly=void 0,C.isReadonly=void 0,D.isReadonly=void 0,k.getPackageJsonInfoCache().isReadonly=void 0,k.clearAllExceptPackageJsonInfoCache(),C.clearAllExceptPackageJsonInfoCache(),D.clearAllExceptPackageJsonInfoCache(),a.forEach(Y),a.clear(),I.clear()},finishCachingPerDirectoryResolution:function(t,n){o=void 0,v=!1,a.forEach(Y),a.clear(),t!==n&&(function(t){w.forEach(((n,r)=>{var i;(null==(i=null==t?void 0:t.resolvedLibReferences)?void 0:i.has(r))||(ne(n,e.toPath(iV(e.getCompilationSettings(),b(),r)),j),w.delete(r))}))}(t),null==t||t.getSourceFiles().forEach((e=>{var t;const n=Zp(e)?(null==(t=e.packageJsonLocations)?void 0:t.length)??0:0,r=_.get(e.resolvedPath)??u;for(let t=r.length;tn)for(let e=n;e{const r=null==t?void 0:t.getSourceFileByPath(n);r&&r.resolvedPath===n||(e.forEach((e=>P.get(e).files--)),_.delete(n))}))),E.forEach(z),P.forEach($),O.forEach(J),y=!1,k.isReadonly=!0,C.isReadonly=!0,D.isReadonly=!0,k.getPackageJsonInfoCache().isReadonly=!0,I.clear()},resolveModuleNameLiterals:function(t,r,i,o,a,s){return q({entries:t,containingFile:r,containingSourceFile:a,redirectedReference:i,options:o,reusedNames:s,perFileCache:S,loader:CU(r,i,o,e,k),getResolutionWithResolvedFileName:j,shouldRetryResolution:e=>!e.resolvedModule||!aT(e.resolvedModule.extension),logChanges:n,deferWatchingNonRelativeResolution:!0})},resolveTypeReferenceDirectiveReferences:function(t,n,r,i,o,a){return q({entries:t,containingFile:n,containingSourceFile:o,redirectedReference:r,options:i,reusedNames:a,perFileCache:T,loader:Zq(n,r,i,TU(e),C),getResolutionWithResolvedFileName:R,shouldRetryResolution:e=>void 0===e.resolvedTypeReferenceDirective,deferWatchingNonRelativeResolution:!1})},resolveLibrary:function(t,n,r,i){const o=TU(e);let a=null==w?void 0:w.get(i);if(!a||a.isInvalidated){const s=a;a=bj(t,n,r,o,D);const c=e.toPath(n);U(t,a,c,j,!1),w.set(i,a),s&&ne(s,c,j)}else if(jL(r,o)){const e=j(a);LL(o,(null==e?void 0:e.resolvedFileName)?e.packageId?va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,t,n,null==e?void 0:e.resolvedFileName,(null==e?void 0:e.packageId)&&yd(e.packageId))}return a},resolveSingleModuleNameWithoutWatching:function(t,n){var r,i;const o=e.toPath(n),a=S.get(o),s=null==a?void 0:a.get(t,void 0);if(s&&!s.isInvalidated)return s;const c=null==(r=e.beforeResolveSingleModuleNameWithoutWatching)?void 0:r.call(e,k),l=TU(e),u=Sj(t,n,e.getCompilationSettings(),l,k);return null==(i=e.afterResolveSingleModuleNameWithoutWatching)||i.call(e,k,t,n,u,c),u},removeResolutionsFromProjectReferenceRedirects:function(t){if(!Ao(t,".json"))return;const n=e.getCurrentProgram();if(!n)return;const r=n.getResolvedProjectReferenceByPath(t);r&&r.commandLine.fileNames.forEach((t=>ae(e.toPath(t))))},removeResolutionsOfFile:ae,hasChangedAutomaticTypeDirectiveNames:()=>y,invalidateResolutionOfFile:function(t){ae(t);const n=y;se(l.get(t),pt)&&y&&!n&&e.onChangedAutomaticTypeDirectiveNames()},invalidateResolutionsOfFailedLookupLocations:ue,setFilesWithInvalidatedNonRelativeUnresolvedImports:function(e){xn.assert(o===e||void 0===o),o=e},createHasInvalidatedResolutions:function(e,t){ue();const n=i;return i=void 0,{hasInvalidatedResolutions:t=>e(t)||v||!!(null==n?void 0:n.has(t))||B(t),hasInvalidatedLibResolutions:e=>{var n;return t(e)||!!(null==(n=null==w?void 0:w.get(e))?void 0:n.isInvalidated)}}},isFileWithInvalidatedNonRelativeUnresolvedImports:B,updateTypeRootsWatch:function(){const t=e.getCompilationSettings();if(t.types)return void fe();const n=QL(t,{getCurrentDirectory:b});n?kx(L,new Set(n),{createNewValue:me,onDeleteValue:dx}):fe()},closeTypeRootsWatch:fe,clear:function(){xx(E,vq),xx(P,vq),I.clear(),O.clear(),M.clear(),a.clear(),fe(),S.clear(),T.clear(),l.clear(),s.clear(),c.clear(),f=void 0,m=void 0,g=void 0,p=void 0,d=void 0,v=!1,k.clear(),C.clear(),k.update(e.getCompilationSettings()),C.update(e.getCompilationSettings()),D.clear(),_.clear(),w.clear(),y=!1},onChangesAffectModuleResolution:function(){v=!0,k.clearAllExceptPackageJsonInfoCache(),C.clearAllExceptPackageJsonInfoCache(),k.update(e.getCompilationSettings()),C.update(e.getCompilationSettings())}};function j(e){return e.resolvedModule}function R(e){return e.resolvedTypeReferenceDirective}function B(e){if(!o)return!1;const t=o.get(e);return!!t&&!!t.length}function J(e,t){0===e.dirPathToWatcher.size&&O.delete(t)}function z(e,t){0===e.refCount&&(E.delete(t),e.watcher.close())}function $(e,t){var n;0!==e.files||0!==e.resolutions||(null==(n=e.symlinks)?void 0:n.size)||(P.delete(t),e.watcher.close())}function q({entries:t,containingFile:n,containingSourceFile:i,redirectedReference:o,options:a,perFileCache:s,reusedNames:c,loader:l,getResolutionWithResolvedFileName:u,deferWatchingNonRelativeResolution:_,shouldRetryResolution:d,logChanges:p}){const f=e.toPath(n),m=s.get(f)||s.set(f,pj()).get(f),g=[],h=p&&B(f),y=e.getCurrentProgram(),b=y&&y.getResolvedProjectReferenceToRedirect(n),x=b?!o||o.sourceFile.path!==b.sourceFile.path:!!o,k=pj();for(const c of t){const t=l.nameAndMode.getName(c),y=l.nameAndMode.getMode(c,i,(null==o?void 0:o.commandLine.options)||a);let b=m.get(t,y);if(!k.has(t,y)&&(v||x||!b||b.isInvalidated||h&&!Os(t)&&d(b))){const n=b;b=l.resolve(t,y),e.onDiscoveredSymlink&&DU(b)&&e.onDiscoveredSymlink(),m.set(t,y,b),b!==n&&(U(t,b,f,u,_),n&&ne(n,f,u)),p&&r&&!T(n,b)&&(r.push(f),p=!1)}else{const r=TU(e);if(jL(a,r)&&!k.has(t,y)){const e=u(b);LL(r,s===S?(null==e?void 0:e.resolvedFileName)?e.packageId?va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:(null==e?void 0:e.resolvedFileName)?e.packageId?va.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:va.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:va.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,t,n,null==e?void 0:e.resolvedFileName,(null==e?void 0:e.packageId)&&yd(e.packageId))}}xn.assert(void 0!==b&&!b.isInvalidated),k.set(t,y,!0),g.push(b)}return null==c||c.forEach((e=>k.set(l.nameAndMode.getName(e),l.nameAndMode.getMode(e,i,(null==o?void 0:o.commandLine.options)||a),!0))),m.size()!==k.size()&&m.forEach(((e,t,n)=>{k.has(t,n)||(ne(e,f,u),m.delete(t,n))})),g;function T(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=u(e),r=u(t);return n===r||!(!n||!r)&&n.resolvedFileName===r.resolvedFileName}}function V(e){return Wt(e,"/node_modules/@types")}function U(t,n,r,i,o){var s;if(n.refCount)n.refCount++,xn.assertIsDefined(n.files);else{n.refCount=1,xn.assert(!(null==(s=n.files)?void 0:s.size)),!o||Os(t)?W(n):a.add(t,n);const r=i(n);if(r&&r.resolvedFileName){const t=e.toPath(r.resolvedFileName);let i=l.get(t);i||l.set(t,i=new Set),i.add(n)}}(n.files??(n.files=new Set)).add(r)}function K(t,n){const r=yU(t,e.toPath(t),N,F,A,b);if(r){const{dir:e,dirPath:t,nonRecursive:i,packageDir:o,packageDirPath:a}=r;t===F?(xn.assert(i),xn.assert(!o),n=!0):Z(e,t,o,a,i)}return n}function W(e){xn.assert(!!e.refCount);const{failedLookupLocations:t,affectingLocations:n,alternateResult:r}=e;if(!(null==t?void 0:t.length)&&!(null==n?void 0:n.length)&&!r)return;((null==t?void 0:t.length)||r)&&s.add(e);let i=!1;if(t)for(const e of t)i=K(e,i);r&&(i=K(r,i)),i&&Z(N,F,void 0,void 0,!0),H(e,!(null==t?void 0:t.length)&&!r)}function H(e,t){xn.assert(!!e.refCount);const{affectingLocations:n}=e;if(null==n?void 0:n.length){t&&c.add(e);for(const e of n)G(e,!0)}}function G(t,n){const r=P.get(t);if(r)return void(n?r.resolutions++:r.files++);let i,o=t,a=!1;e.realpath&&(o=e.realpath(t),t!==o&&(a=!0,i=P.get(o)));const s=n?1:0,c=n?0:1;if(!a||!i){const t={watcher:hU(e.toPath(o))?e.watchAffectingFileLocation(o,((t,n)=>{null==x||x.addOrDeleteFile(t,e.toPath(o),n),X(o,k.getPackageJsonInfoCache().getInternalMap()),e.scheduleInvalidateResolutionsOfFailedLookupLocations()})):XU,resolutions:a?0:s,files:a?0:c,symlinks:void 0};P.set(o,t),a&&(i=t)}if(a){xn.assert(!!i);const e={watcher:{close:()=>{var e;const n=P.get(o);!(null==(e=null==n?void 0:n.symlinks)?void 0:e.delete(t))||n.symlinks.size||n.resolutions||n.files||(P.delete(o),n.watcher.close())}},resolutions:s,files:c,symlinks:void 0};P.set(t,e),(i.symlinks??(i.symlinks=new Set)).add(t)}}function X(t,n){var r;const i=P.get(t);(null==i?void 0:i.resolutions)&&(p??(p=new Set)).add(t),(null==i?void 0:i.files)&&(d??(d=new Set)).add(t),null==(r=null==i?void 0:i.symlinks)||r.forEach((e=>X(e,n))),null==n||n.delete(e.toPath(t))}function Y(t,n){const r=e.getCurrentProgram();r&&r.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(n)?t.forEach((e=>H(e,!0))):t.forEach(W)}function Z(t,n,r,i,o){i&&e.realpath?function(t,n,r,i,o){xn.assert(!o);let a=I.get(i),s=O.get(i);if(void 0===a){const t=e.realpath(r);a=t!==r&&e.toPath(t)!==i,I.set(i,a),s?s.isSymlink!==a&&(s.dirPathToWatcher.forEach((e=>{re(s.isSymlink?i:n,!1),e.watcher=l()})),s.isSymlink=a):O.set(i,s={dirPathToWatcher:new Map,isSymlink:a})}else xn.assertIsDefined(s),xn.assert(a===s.isSymlink);const c=s.dirPathToWatcher.get(n);function l(){return a?ee(r,i,o):ee(t,n,o)}c?c.refCount++:(s.dirPathToWatcher.set(n,{watcher:l(),refCount:1}),a&&M.set(n,(M.get(n)??0)+1))}(t,n,r,i,o):ee(t,n,o)}function ee(e,t,n){let r=E.get(t);return r?(xn.assert(!!n==!!r.nonRecursive),r.refCount++):E.set(t,r={watcher:ie(e,t,n),refCount:1,nonRecursive:n}),r}function te(t,n,r){const i=yU(t,e.toPath(t),N,F,A,b);if(i){const{dirPath:t,packageDirPath:o}=i;if(t===F)n=!0;else if(o&&e.realpath){const e=O.get(o),n=e.dirPathToWatcher.get(t);if(n.refCount--,0===n.refCount){if(re(e.isSymlink?o:t,r),e.dirPathToWatcher.delete(t),e.isSymlink){const e=M.get(t)-1;0===e?M.delete(t):M.set(t,e)}r&&J(e,o)}}else re(t,r)}return n}function ne(t,n,r,i){if(xn.checkDefined(t.files).delete(n),t.refCount--,t.refCount)return;const o=r(t);if(o&&o.resolvedFileName){const n=e.toPath(o.resolvedFileName),r=l.get(n);(null==r?void 0:r.delete(t))&&!r.size&&l.delete(n)}const{failedLookupLocations:a,affectingLocations:u,alternateResult:_}=t;if(s.delete(t)){let e=!1;if(a)for(const t of a)e=te(t,e,i);_&&(e=te(_,e,i)),e&&re(F,i)}else(null==u?void 0:u.length)&&c.delete(t);if(u)for(const e of u){const t=P.get(e);t.resolutions--,i&&$(t,e)}}function re(e,t){const n=E.get(e);n.refCount--,t&&z(n,e)}function ie(t,n,r){return e.watchDirectoryOfFailedLookupLocation(t,(t=>{const r=e.toPath(t);x&&x.addOrDeleteFileOrDirectory(t,r),ce(r,n===r)}),r?0:1)}function oe(e,t,n,r){const i=e.get(t);i&&(i.forEach((e=>ne(e,t,n,r))),e.delete(t))}function ae(e,t){oe(S,e,j,t),oe(T,e,R,t)}function se(e,t){if(!e)return!1;let n=!1;return e.forEach((e=>{if(!e.isInvalidated&&t(e)){e.isInvalidated=n=!0;for(const t of xn.checkDefined(e.files))(i??(i=new Set)).add(t),y=y||Wt(t,rV)}})),n}function ce(t,n){if(n)(g||(g=new Set)).add(t);else{const n=_U(t);if(!n)return!1;if(t=n,e.fileIsOpen(t))return!1;const r=Ro(t);if(V(t)||ha(t)||V(r)||ha(r))(f||(f=new Set)).add(t),(m||(m=new Set)).add(t);else{if(mq(e.getCurrentProgram(),t))return!1;if(Ao(t,".map"))return!1;(f||(f=new Set)).add(t);const n=Mj(t,!0);n&&(m||(m=new Set)).add(n)}}e.scheduleInvalidateResolutionsOfFailedLookupLocations()}function le(){const e=k.getPackageJsonInfoCache().getInternalMap();e&&(f||m||g)&&e.forEach(((t,n)=>de(n)?e.delete(n):void 0))}function ue(){var t;if(v)return d=void 0,le(),(f||m||g||p)&&se(w,_e),f=void 0,m=void 0,g=void 0,p=void 0,!0;let n=!1;return d&&(null==(t=e.getCurrentProgram())||t.getSourceFiles().forEach((e=>{Q(e.packageJsonLocations,(e=>d.has(e)))&&((i??(i=new Set)).add(e.path),n=!0)})),d=void 0),f||m||g||p?(n=se(s,_e)||n,le(),f=void 0,m=void 0,g=void 0,n=se(c,pe)||n,p=void 0,n):n}function _e(t){var n;return!!pe(t)||!!(f||m||g)&&((null==(n=t.failedLookupLocations)?void 0:n.some((t=>de(e.toPath(t)))))||!!t.alternateResult&&de(e.toPath(t.alternateResult)))}function de(e){return(null==f?void 0:f.has(e))||h((null==m?void 0:m.keys())||[],(t=>!!an(e,t)||void 0))||h((null==g?void 0:g.keys())||[],(t=>!(!(e.length>t.length&&an(e,t))||!Do(t)&&e[t.length]!==xo)||void 0))}function pe(e){var t;return!!p&&(null==(t=e.affectingLocations)?void 0:t.some((e=>p.has(e))))}function fe(){xx(L,dx)}function me(t){return function(t){return!!e.getCompilationSettings().typeRoots||fU(e.toPath(t))}(t)?e.watchTypeRootsDirectory(t,(n=>{const r=e.toPath(n);x&&x.addOrDeleteFileOrDirectory(n,r),y=!0,e.onChangedAutomaticTypeDirectiveNames();const i=xU(t,e.toPath(t),F,A,b,(e=>E.has(e)||M.has(e)));i&&ce(r,i===r)}),1):XU}}function DU(e){var t,n;return!(!(null==(t=e.resolvedModule)?void 0:t.originalPath)&&!(null==(n=e.resolvedTypeReferenceDirective)?void 0:n.originalPath))}var EU=vo?{getCurrentDirectory:()=>vo.getCurrentDirectory(),getNewLine:()=>vo.newLine,getCanonicalFileName:tn(vo.useCaseSensitiveFileNames)}:void 0;function PU(e,t){const n=e===vo&&EU?EU:{getCurrentDirectory:()=>e.getCurrentDirectory(),getNewLine:()=>e.newLine,getCanonicalFileName:tn(e.useCaseSensitiveFileNames)};if(!t)return t=>e.write(Nq(t,n));const r=new Array(1);return t=>{r[0]=t,e.write(Bq(r,n)+n.getNewLine()),r[0]=void 0}}function NU(e,t,n){return!(!e.clearScreen||n.preserveWatchOutput||n.extendedDiagnostics||n.diagnostics||!D(FU,t.code)||(e.clearScreen(),0))}var FU=[va.Starting_compilation_in_watch_mode.code,va.File_change_detected_Starting_incremental_compilation.code];function AU(e){return e.now?e.now().toLocaleTimeString("en-US",{timeZone:"UTC"}).replace(" "," "):(new Date).toLocaleTimeString()}function IU(e,t){return t?(t,n,r)=>{NU(e,t,r);let i=`[${Lq(AU(e),"")}] `;i+=`${Jq(t.messageText,e.newLine)}${n+n}`,e.write(i)}:(t,n,r)=>{let i="";NU(e,t,r)||(i+=n),i+=`${AU(e)} - `,i+=`${Jq(t.messageText,e.newLine)}${function(e,t){return D(FU,e.code)?t+t:t}(t,n)}`,e.write(i)}}function OU(e,t,n,r,i,o){const a=i;a.onUnRecoverableConfigFileDiagnostic=e=>aK(i,o,e);const s=tM(e,t,a,n,r);return a.onUnRecoverableConfigFileDiagnostic=void 0,s}function MU(e){return N(e,(e=>1===e.category))}function LU(e){return F(e,(e=>1===e.category)).map((e=>{if(void 0!==e.file)return`${e.file.fileName}`})).map((t=>{if(void 0===t)return;const n=S(e,(e=>void 0!==e.file&&e.file.fileName===t));if(void 0!==n){const{line:e}=Xa(n.file,n.start);return{fileName:t,line:e+1}}}))}function jU(e){return 1===e?va.Found_1_error_Watching_for_file_changes:va.Found_0_errors_Watching_for_file_changes}function RU(e,t){const n=Lq(":"+e.line,"");return Eo(e.fileName)&&Eo(t)?da(t,e.fileName,!1)+n:e.fileName+n}function BU(e,t,n,r){if(0===e)return"";const i=t.filter((e=>void 0!==e)),o=i.map((e=>`${e.fileName}:${e.line}`)).filter(((e,t,n)=>n.indexOf(e)===t)),a=i[0]&&RU(i[0],r.getCurrentDirectory());let s;s=1===e?void 0!==t[0]?[va.Found_1_error_in_0,a]:[va.Found_1_error]:0===o.length?[va.Found_0_errors,e]:1===o.length?[va.Found_0_errors_in_the_same_file_starting_at_Colon_1,e,a]:[va.Found_0_errors_in_1_files,e,o.length];const c=cS(...s),l=o.length>1?function(e,t){const n=e.filter(((e,t,n)=>t===n.findIndex((t=>(null==t?void 0:t.fileName)===(null==e?void 0:e.fileName)))));if(0===n.length)return"";const r=e=>Math.log(e)*Math.LOG10E+1,i=n.map((t=>[t,N(e,(e=>e.fileName===t.fileName))])),o=i.reduce(((e,t)=>Math.max(e,t[1]||0)),0),a=va.Errors_Files.message,s=a.split(" ")[0].length,c=Math.max(s,r(o)),l=Math.max(r(o)-s,0);let u="";return u+=" ".repeat(l)+a+"\n",i.forEach((e=>{const[n,r]=e,i=Math.log(r)*Math.LOG10E+1|0,o=i{t(e.fileName)}))}function $U(e,t){var n,r;const i=e.getFileIncludeReasons(),o=t=>pa(t,e.getCurrentDirectory(),e.getCanonicalFileName);for(const a of e.getSourceFiles())t(`${WU(a,o)}`),null==(n=i.get(a.path))||n.forEach((n=>t(` ${KU(e,n,o).messageText}`))),null==(r=qU(a,o))||r.forEach((e=>t(` ${e.messageText}`)))}function qU(e,t){var n;let r;if(e.path!==e.resolvedPath&&(r??(r=[])).push(uS(void 0,va.File_is_output_of_project_reference_source_0,WU(e.originalFileName,t))),e.redirectInfo&&(r??(r=[])).push(uS(void 0,va.File_redirects_to_file_0,WU(e.redirectInfo.redirectTarget,t))),Zp(e))switch(e.impliedNodeFormat){case 99:e.packageJsonScope&&(r??(r=[])).push(uS(void 0,va.File_is_ECMAScript_module_because_0_has_field_type_with_value_module,WU(De(e.packageJsonLocations),t)));break;case 1:e.packageJsonScope?(r??(r=[])).push(uS(void 0,e.packageJsonScope.contents.packageJsonContent.type?va.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:va.File_is_CommonJS_module_because_0_does_not_have_field_type,WU(De(e.packageJsonLocations),t))):(null==(n=e.packageJsonLocations)?void 0:n.length)&&(r??(r=[])).push(uS(void 0,va.File_is_CommonJS_module_because_package_json_was_not_found))}return r}function VU(e,t){var n;const r=e.getCompilerOptions().configFile;if(!(null==(n=null==r?void 0:r.configFileSpecs)?void 0:n.validatedFilesSpec))return;const i=e.getCanonicalFileName(t),o=Ro(Go(r.fileName,e.getCurrentDirectory())),a=T(r.configFileSpecs.validatedFilesSpec,(t=>e.getCanonicalFileName(Go(t,o))===i));return-1!==a?r.configFileSpecs.validatedFilesSpecBeforeSubstitution[a]:void 0}function UU(e,t){var n,r;const i=e.getCompilerOptions().configFile;if(!(null==(n=null==i?void 0:i.configFileSpecs)?void 0:n.validatedIncludeSpecs))return;if(i.configFileSpecs.isDefaultIncludeSpec)return!0;const o=Ao(t,".json"),a=Ro(Go(i.fileName,e.getCurrentDirectory())),s=e.useCaseSensitiveFileNames(),c=T(null==(r=null==i?void 0:i.configFileSpecs)?void 0:r.validatedIncludeSpecs,(e=>{if(o&&!Wt(e,".json"))return!1;const n=bk(e,a,"files");return!!n&&Tk(`(${n})$`,s).test(t)}));return-1!==c?i.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[c]:void 0}function KU(e,t,n){var r,i;const o=e.getCompilerOptions();if(cV(t)){const r=uV(e,t),i=lV(r)?r.file.text.substring(r.pos,r.end):`"${r.text}"`;let o;switch(xn.assert(lV(r)||3===t.kind,"Only synthetic references are imports"),t.kind){case 3:o=lV(r)?r.packageId?va.Imported_via_0_from_file_1_with_packageId_2:va.Imported_via_0_from_file_1:r.text===G_?r.packageId?va.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:va.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:r.packageId?va.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:va.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions;break;case 4:xn.assert(!r.packageId),o=va.Referenced_via_0_from_file_1;break;case 5:o=r.packageId?va.Type_library_referenced_via_0_from_file_1_with_packageId_2:va.Type_library_referenced_via_0_from_file_1;break;case 7:xn.assert(!r.packageId),o=va.Library_referenced_via_0_from_file_1;break;default:xn.assertNever(t)}return uS(void 0,o,i,WU(r.file,n),r.packageId&&yd(r.packageId))}switch(t.kind){case 0:if(!(null==(r=o.configFile)?void 0:r.configFileSpecs))return uS(void 0,va.Root_file_specified_for_compilation);const a=Go(e.getRootFileNames()[t.index],e.getCurrentDirectory());if(VU(e,a))return uS(void 0,va.Part_of_files_list_in_tsconfig_json);const s=UU(e,a);return st(s)?uS(void 0,va.Matched_by_include_pattern_0_in_1,s,WU(o.configFile,n)):uS(void 0,s?va.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:va.Root_file_specified_for_compilation);case 1:case 2:const c=2===t.kind,l=xn.checkDefined(null==(i=e.getResolvedProjectReferences())?void 0:i[t.index]);return uS(void 0,o.outFile?c?va.Output_from_referenced_project_0_included_because_1_specified:va.Source_from_referenced_project_0_included_because_1_specified:c?va.Output_from_referenced_project_0_included_because_module_is_specified_as_none:va.Source_from_referenced_project_0_included_because_module_is_specified_as_none,WU(l.sourceFile.fileName,n),o.outFile?"--outFile":"--out");case 8:return uS(void 0,...o.types?t.packageId?[va.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1,t.typeReference,yd(t.packageId)]:[va.Entry_point_of_type_library_0_specified_in_compilerOptions,t.typeReference]:t.packageId?[va.Entry_point_for_implicit_type_library_0_with_packageId_1,t.typeReference,yd(t.packageId)]:[va.Entry_point_for_implicit_type_library_0,t.typeReference]);case 6:{if(void 0!==t.index)return uS(void 0,va.Library_0_specified_in_compilerOptions,o.lib[t.index]);const e=HS(wS(o));return uS(void 0,...e?[va.Default_library_for_target_0,e]:[va.Default_library])}default:xn.assertNever(t)}}function WU(e,t){const n=st(e)?e:e.fileName;return t?t(n):n}function HU(e,t,n,r,i,o,a,s){const c=!!e.getCompilerOptions().listFilesOnly,l=e.getConfigFileParsingDiagnostics().slice(),_=l.length;pe(l,e.getSyntacticDiagnostics(void 0,o)),l.length===_&&(pe(l,e.getOptionsDiagnostics(o)),c||(pe(l,e.getGlobalDiagnostics(o)),l.length===_&&pe(l,e.getSemanticDiagnostics(void 0,o))));const d=c?{emitSkipped:!0,diagnostics:u}:e.emit(void 0,i,o,a,s),{emittedFiles:p,diagnostics:m}=d;pe(l,m);const g=Ms(l);if(g.forEach(t),n){const t=e.getCurrentDirectory();f(p,(e=>{const r=Go(e,t);n(`TSFILE: ${r}`)})),zU(e,n)}return r&&r(MU(g),LU(g)),{emitResult:d,diagnostics:g}}function GU(e,t,n,r,i,o,a,s){const{emitResult:c,diagnostics:l}=HU(e,t,n,r,i,o,a,s);return c.emitSkipped&&l.length>0?1:l.length>0?2:0}var XU={close:_t},QU=()=>XU;function YU(e=vo,t){return{onWatchStatusChange:t||IU(e),watchFile:Ze(e,e.watchFile)||QU,watchDirectory:Ze(e,e.watchDirectory)||QU,setTimeout:Ze(e,e.setTimeout)||_t,clearTimeout:Ze(e,e.clearTimeout)||_t}}var ZU={ConfigFile:"Config file",ExtendedConfigFile:"Extended config file",SourceFile:"Source file",MissingFile:"Missing file",WildcardDirectory:"Wild card directory",FailedLookupLocations:"Failed Lookup Locations",AffectingFileLocation:"File location affecting resolution",TypeRoots:"Type roots",ConfigFileOfReferencedProject:"Config file of referened project",ExtendedConfigOfReferencedProject:"Extended config file of referenced project",WildcardDirectoryOfReferencedProject:"Wild card directory of referenced project",PackageJson:"package.json file",ClosedScriptInfo:"Closed Script info",ConfigFileForInferredRoot:"Config file for the inferred project root",NodeModules:"node_modules for closed script infos and package.jsons affecting module specifier cache",MissingSourceMapFile:"Missing source map file",NoopConfigFileForInferredRoot:"Noop Config file for the inferred project root",MissingGeneratedFile:"Missing generated file",NodeModulesForModuleSpecifierCache:"node_modules for module specifier cache invalidation",TypingInstallerLocationFile:"File location for typing installer",TypingInstallerLocationDirectory:"Directory location for typing installer"};function eK(e,t){const n=e.trace?t.extendedDiagnostics?2:t.diagnostics?1:0:0,r=0!==n?t=>e.trace(t):_t,i=hq(e,n,r);return i.writeLog=r,i}function tK(e,t,n=e){const r=e.useCaseSensitiveFileNames(),i={getSourceFile:Tq(((t,n)=>n?e.readFile(t,n):i.readFile(t)),void 0),getDefaultLibLocation:Ze(e,e.getDefaultLibLocation),getDefaultLibFileName:t=>e.getDefaultLibFileName(t),writeFile:Cq(((t,n,r)=>e.writeFile(t,n,r)),(t=>e.createDirectory(t)),(t=>e.directoryExists(t))),getCurrentDirectory:bt((()=>e.getCurrentDirectory())),useCaseSensitiveFileNames:()=>r,getCanonicalFileName:tn(r),getNewLine:()=>$b(t()),fileExists:t=>e.fileExists(t),readFile:t=>e.readFile(t),trace:Ze(e,e.trace),directoryExists:Ze(n,n.directoryExists),getDirectories:Ze(n,n.getDirectories),realpath:Ze(e,e.realpath),getEnvironmentVariable:Ze(e,e.getEnvironmentVariable)||(()=>""),createHash:Ze(e,e.createHash),readDirectory:Ze(e,e.readDirectory),storeSignatureInfo:e.storeSignatureInfo,jsDocParsingMode:e.jsDocParsingMode};return i}function nK(e,t){if(t.match(rJ)){let e=t.length,n=e;for(let r=e-1;r>=0;r--){const i=t.charCodeAt(r);switch(i){case 10:r&&13===t.charCodeAt(r-1)&&r--;case 13:break;default:if(i<127||!Za(i)){n=r;continue}}const o=t.substring(n,e);if(o.match(iJ)){t=t.substring(0,n);break}if(!o.match(oJ))break;e=n}}return(e.createHash||Hi)(t)}function rK(e){const t=e.getSourceFile;e.getSourceFile=(...n)=>{const r=t.call(e,...n);return r&&(r.version=nK(e,r.text)),r}}function iK(e,t){const n=bt((()=>Ro(Xo(e.getExecutingFilePath()))));return{useCaseSensitiveFileNames:()=>e.useCaseSensitiveFileNames,getNewLine:()=>e.newLine,getCurrentDirectory:bt((()=>e.getCurrentDirectory())),getDefaultLibLocation:n,getDefaultLibFileName:e=>Ko(n(),Ls(e)),fileExists:t=>e.fileExists(t),readFile:(t,n)=>e.readFile(t,n),directoryExists:t=>e.directoryExists(t),getDirectories:t=>e.getDirectories(t),readDirectory:(t,n,r,i,o)=>e.readDirectory(t,n,r,i,o),realpath:Ze(e,e.realpath),getEnvironmentVariable:Ze(e,e.getEnvironmentVariable),trace:t=>e.write(t+e.newLine),createDirectory:t=>e.createDirectory(t),writeFile:(t,n,r)=>e.writeFile(t,n,r),createHash:Ze(e,e.createHash),createProgram:t||lU,storeSignatureInfo:e.storeSignatureInfo,now:Ze(e,e.now)}}function oK(e=vo,t,n,r){const i=t=>e.write(t+e.newLine),o=iK(e,t);return Ye(o,YU(e,r)),o.afterProgramCreate=e=>{const t=e.getCompilerOptions(),r=$b(t);HU(e,n,i,(e=>o.onWatchStatusChange(cS(jU(e),e),r,t,e)))},o}function aK(e,t,n){t(n),e.exit(1)}function sK({configFileName:e,optionsToExtend:t,watchOptionsToExtend:n,extraFileExtensions:r,system:i,createProgram:o,reportDiagnostic:a,reportWatchStatus:s}){const c=a||PU(i),l=oK(i,o,c,s);return l.onUnRecoverableConfigFileDiagnostic=e=>aK(i,c,e),l.configFileName=e,l.optionsToExtend=t,l.watchOptionsToExtend=n,l.extraFileExtensions=r,l}function cK({rootFiles:e,options:t,watchOptions:n,projectReferences:r,system:i,createProgram:o,reportDiagnostic:a,reportWatchStatus:s}){const c=oK(i,o,a||PU(i),s);return c.rootFiles=e,c.options=t,c.watchOptions=n,c.projectReferences=r,c}function lK(e){const t=e.system||vo,n=e.host||(e.host=_K(e.options,t)),r=dK(e),i=GU(r,e.reportDiagnostic||PU(t),(e=>n.trace&&n.trace(e)),e.reportErrorSummary||e.options.pretty?(e,r)=>t.write(BU(e,r,t.newLine,n)):void 0);return e.afterProgramEmitAndDiagnostics&&e.afterProgramEmitAndDiagnostics(r),i}function uK(e,t){const n=P$(e);if(!n)return;let r;if(t.getBuildInfo)r=t.getBuildInfo(n,e.configFilePath);else{const e=t.readFile(n);if(!e)return;r=Q$(n,e)}return r&&r.version===c&&r.program?oU(r,n,t):void 0}function _K(e,t=vo){const n=wq(e,void 0,t);return n.createHash=Ze(t,t.createHash),n.storeSignatureInfo=t.storeSignatureInfo,rK(n),Dq(n,(e=>Yo(e,n.getCurrentDirectory(),n.getCanonicalFileName))),n}function dK({rootNames:e,options:t,configFileParsingDiagnostics:n,projectReferences:r,host:i,createProgram:o}){return(o=o||lU)(e,t,i=i||_K(t),uK(t,i),n,r)}function pK(e,t,n,r,i,o,a,s){return ot(e)?cK({rootFiles:e,options:t,watchOptions:s,projectReferences:a,system:n,createProgram:r,reportDiagnostic:i,reportWatchStatus:o}):sK({configFileName:e,optionsToExtend:t,watchOptionsToExtend:a,extraFileExtensions:s,system:n,createProgram:r,reportDiagnostic:i,reportWatchStatus:o})}function fK(e){let t,n,r,i,o,a,s,c,l=e.extendedConfigCache,u=!1;const _=new Map;let d,p=!1;const f=e.useCaseSensitiveFileNames(),m=e.getCurrentDirectory(),{configFileName:g,optionsToExtend:h={},watchOptionsToExtend:y,extraFileExtensions:v,createProgram:b}=e;let x,S,{rootFiles:k,options:T,watchOptions:C,projectReferences:w}=e,D=!1,E=!1;const P=void 0===g?void 0:sq(e,m,f),N=P||e,F=bV(e,N);let A=H();g&&e.configFileParsingResult&&(se(e.configFileParsingResult),A=H()),Z(va.Starting_compilation_in_watch_mode),g&&!e.configFileParsingResult&&(A=$b(h),xn.assert(!k),ae(),A=H()),xn.assert(T),xn.assert(k);const{watchFile:I,watchDirectory:O,writeLog:M}=eK(e,T),L=tn(f);let j;M(`Current directory: ${m} CaseSensitiveFileNames: ${f}`),g&&(j=I(g,(function(){xn.assert(!!g),n=2,re()}),2e3,C,ZU.ConfigFile));const R=tK(e,(()=>T),N);rK(R);const B=R.getSourceFile;R.getSourceFile=(e,...t)=>Q(e,G(e),...t),R.getSourceFileByPath=Q,R.getNewLine=()=>A,R.fileExists=function(e){const t=G(e);return!X(_.get(t))&&N.fileExists(e)},R.onReleaseOldSourceFile=function(e,t,n){const r=_.get(e.resolvedPath);void 0!==r&&(X(r)?(d||(d=[])).push(e.path):r.sourceFile===e&&(r.fileWatcher&&r.fileWatcher.close(),_.delete(e.resolvedPath),n||J.removeResolutionsOfFile(e.path)))},R.onReleaseParsedCommandLine=function(e){var t;const n=G(e),r=null==s?void 0:s.get(n);r&&(s.delete(n),r.watchedDirectories&&xx(r.watchedDirectories,vq),null==(t=r.watcher)||t.close(),uq(n,c))},R.toPath=G,R.getCompilationSettings=()=>T,R.useSourceOfProjectReferenceRedirect=Ze(e,e.useSourceOfProjectReferenceRedirect),R.watchDirectoryOfFailedLookupLocation=(e,t,n)=>O(e,t,n,C,ZU.FailedLookupLocations),R.watchAffectingFileLocation=(e,t)=>I(e,t,2e3,C,ZU.AffectingFileLocation),R.watchTypeRootsDirectory=(e,t,n)=>O(e,t,n,C,ZU.TypeRoots),R.getCachedDirectoryStructureHost=()=>P,R.scheduleInvalidateResolutionsOfFailedLookupLocations=function(){if(!e.setTimeout||!e.clearTimeout)return J.invalidateResolutionsOfFailedLookupLocations();const t=te();M("Scheduling invalidateFailedLookup"+(t?", Cancelled earlier one":"")),a=e.setTimeout(ne,250,"timerToInvalidateFailedLookupResolutions")},R.onInvalidatedResolution=re,R.onChangedAutomaticTypeDirectiveNames=re,R.fileIsOpen=dt,R.getCurrentProgram=K,R.writeLog=M,R.getParsedCommandLine=ce;const J=wU(R,g?Ro(Go(g,m)):m,!1);R.resolveModuleNameLiterals=Ze(e,e.resolveModuleNameLiterals),R.resolveModuleNames=Ze(e,e.resolveModuleNames),R.resolveModuleNameLiterals||R.resolveModuleNames||(R.resolveModuleNameLiterals=J.resolveModuleNameLiterals.bind(J)),R.resolveTypeReferenceDirectiveReferences=Ze(e,e.resolveTypeReferenceDirectiveReferences),R.resolveTypeReferenceDirectives=Ze(e,e.resolveTypeReferenceDirectives),R.resolveTypeReferenceDirectiveReferences||R.resolveTypeReferenceDirectives||(R.resolveTypeReferenceDirectiveReferences=J.resolveTypeReferenceDirectiveReferences.bind(J)),R.resolveLibrary=e.resolveLibrary?e.resolveLibrary.bind(e):J.resolveLibrary.bind(J),R.getModuleResolutionCache=e.resolveModuleNameLiterals||e.resolveModuleNames?Ze(e,e.getModuleResolutionCache):()=>J.getModuleResolutionCache();const z=e.resolveModuleNameLiterals||e.resolveTypeReferenceDirectiveReferences||e.resolveModuleNames||e.resolveTypeReferenceDirectives?Ze(e,e.hasInvalidatedResolutions)||pt:dt,$=e.resolveLibrary?Ze(e,e.hasInvalidatedLibResolutions)||pt:dt;return t=uK(T,R),W(),fe(),g&&ge(G(g),T,C,ZU.ExtendedConfigFile),g?{getCurrentProgram:U,getProgram:oe,close:q,getResolutionCache:V}:{getCurrentProgram:U,getProgram:oe,updateRootFileNames:function(e){xn.assert(!g,"Cannot update root file names with config file watch mode"),k=e,re()},close:q,getResolutionCache:V};function q(){te(),J.clear(),xx(_,(e=>{e&&e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)})),j&&(j.close(),j=void 0),null==l||l.clear(),l=void 0,c&&(xx(c,vq),c=void 0),i&&(xx(i,vq),i=void 0),r&&(xx(r,dx),r=void 0),s&&(xx(s,(e=>{var t;null==(t=e.watcher)||t.close(),e.watcher=void 0,e.watchedDirectories&&xx(e.watchedDirectories,vq),e.watchedDirectories=void 0})),s=void 0),t=void 0}function V(){return J}function U(){return t}function K(){return t&&t.getProgramOrUndefined()}function W(){M("Synchronizing program"),xn.assert(T),xn.assert(k),te();const n=U();p&&(A=H(),n&&id(n.getCompilerOptions(),T)&&J.onChangesAffectModuleResolution());const{hasInvalidatedResolutions:i,hasInvalidatedLibResolutions:o}=J.createHasInvalidatedResolutions(z,$),{originalReadFile:a,originalFileExists:s,originalDirectoryExists:c,originalCreateDirectory:l,originalWriteFile:f,readFileWithCache:m}=Dq(R,G);return _V(K(),k,T,(e=>function(e,t){const n=_.get(e);if(!n)return;if(n.version)return n.version;const r=t(e);return void 0!==r?nK(R,r):void 0}(e,m)),(e=>R.fileExists(e)),i,o,ee,ce,w)?E&&(u&&Z(va.File_change_detected_Starting_incremental_compilation),t=b(void 0,void 0,R,t,S,w),E=!1):(u&&Z(va.File_change_detected_Starting_incremental_compilation),function(e,n){M("CreatingProgramWith::"),M(` roots: ${JSON.stringify(k)}`),M(` options: ${JSON.stringify(T)}`),w&&M(` projectReferences: ${JSON.stringify(w)}`);const i=p||!K();p=!1,E=!1,J.startCachingPerDirectoryResolution(),R.hasInvalidatedResolutions=e,R.hasInvalidatedLibResolutions=n,R.hasChangedAutomaticTypeDirectiveNames=ee;const o=K();if(t=b(k,T,R,t,S,w),J.finishCachingPerDirectoryResolution(t.getProgram(),o),dq(t.getProgram(),r||(r=new Map),de),i&&J.updateTypeRootsWatch(),d){for(const e of d)r.has(e)||_.delete(e);d=void 0}}(i,o)),u=!1,e.afterProgramCreate&&n!==t&&e.afterProgramCreate(t),R.readFile=a,R.fileExists=s,R.directoryExists=c,R.createDirectory=l,R.writeFile=f,t}function H(){return $b(T||h)}function G(e){return Yo(e,m,L)}function X(e){return"boolean"==typeof e}function Q(e,t,n,r,i){const o=_.get(t);if(X(o))return;const a="object"==typeof n?n.impliedNodeFormat:void 0;if(void 0===o||i||function(e){return"boolean"==typeof e.version}(o)||o.sourceFile.impliedNodeFormat!==a){const i=B(e,n,r);if(o)i?(o.sourceFile=i,o.version=i.version,o.fileWatcher||(o.fileWatcher=le(t,e,ue,250,C,ZU.SourceFile))):(o.fileWatcher&&o.fileWatcher.close(),_.set(t,!1));else if(i){const n=le(t,e,ue,250,C,ZU.SourceFile);_.set(t,{sourceFile:i,version:i.version,fileWatcher:n})}else _.set(t,!1);return i}return o.sourceFile}function Y(e){const t=_.get(e);void 0!==t&&(X(t)?_.set(e,{version:!1}):t.version=!1)}function Z(t){e.onWatchStatusChange&&e.onWatchStatusChange(cS(t),A,T||h)}function ee(){return J.hasChangedAutomaticTypeDirectiveNames()}function te(){return!!a&&(e.clearTimeout(a),a=void 0,!0)}function ne(){a=void 0,J.invalidateResolutionsOfFailedLookupLocations()&&re()}function re(){e.setTimeout&&e.clearTimeout&&(o&&e.clearTimeout(o),M("Scheduling update"),o=e.setTimeout(ie,250,"timerToUpdateProgram"))}function ie(){o=void 0,u=!0,oe()}function oe(){var e,t,r,i;switch(n){case 1:null==(e=tr)||e.logStartUpdateProgram("PartialConfigReload"),M("Reloading new file names and options"),xn.assert(T),xn.assert(g),n=0,k=xL(T.configFile.configFileSpecs,Go(Ro(g),m),T,F,v),nL(k,Go(g,m),T.configFile.configFileSpecs,S,D)&&(E=!0),W();break;case 2:null==(t=tr)||t.logStartUpdateProgram("FullConfigReload"),xn.assert(g),M(`Reloading config file: ${g}`),n=0,P&&P.clearCache(),ae(),p=!0,W(),fe(),ge(G(g),T,C,ZU.ExtendedConfigFile);break;default:null==(r=tr)||r.logStartUpdateProgram("SynchronizeProgram"),W()}return null==(i=tr)||i.logStopUpdateProgram("Done"),U()}function ae(){xn.assert(g),se(tM(g,h,F,l||(l=new Map),y,v))}function se(e){k=e.fileNames,T=e.options,C=e.watchOptions,w=e.projectReferences,x=e.wildcardDirectories,S=dV(e).slice(),D=tL(e.raw),E=!0}function ce(t){const n=G(t);let r=null==s?void 0:s.get(n);if(r){if(!r.updateLevel)return r.parsedCommandLine;if(r.parsedCommandLine&&1===r.updateLevel&&!e.getParsedCommandLine){M("Reloading new file names and options"),xn.assert(T);const e=xL(r.parsedCommandLine.options.configFile.configFileSpecs,Go(Ro(t),m),T,F);return r.parsedCommandLine={...r.parsedCommandLine,fileNames:e},r.updateLevel=void 0,r.parsedCommandLine}}M(`Loading config file: ${t}`);const i=e.getParsedCommandLine?e.getParsedCommandLine(t):function(e){const t=F.onUnRecoverableConfigFileDiagnostic;F.onUnRecoverableConfigFileDiagnostic=_t;const n=tM(e,void 0,F,l||(l=new Map),y);return F.onUnRecoverableConfigFileDiagnostic=t,n}(t);return r?(r.parsedCommandLine=i,r.updateLevel=void 0):(s||(s=new Map)).set(n,r={parsedCommandLine:i}),function(e,t,n){var r,i,o,a;n.watcher||(n.watcher=I(e,((n,r)=>{_e(e,t,r);const i=null==s?void 0:s.get(t);i&&(i.updateLevel=2),J.removeResolutionsFromProjectReferenceRedirects(t),re()}),2e3,(null==(r=n.parsedCommandLine)?void 0:r.watchOptions)||C,ZU.ConfigFileOfReferencedProject)),pq(n.watchedDirectories||(n.watchedDirectories=new Map),null==(i=n.parsedCommandLine)?void 0:i.wildcardDirectories,((r,i)=>{var o;return O(r,(n=>{const i=G(n);P&&P.addOrDeleteFileOrDirectory(n,i),Y(i);const o=null==s?void 0:s.get(t);(null==o?void 0:o.parsedCommandLine)&&(fq({watchedDirPath:G(r),fileOrDirectory:n,fileOrDirectoryPath:i,configFileName:e,options:o.parsedCommandLine.options,program:o.parsedCommandLine.fileNames,currentDirectory:m,useCaseSensitiveFileNames:f,writeLog:M,toPath:G})||2!==o.updateLevel&&(o.updateLevel=1,re()))}),i,(null==(o=n.parsedCommandLine)?void 0:o.watchOptions)||C,ZU.WildcardDirectoryOfReferencedProject)})),ge(t,null==(o=n.parsedCommandLine)?void 0:o.options,(null==(a=n.parsedCommandLine)?void 0:a.watchOptions)||C,ZU.ExtendedConfigOfReferencedProject)}(t,n,r),i}function le(e,t,n,r,i,o){return I(t,((t,r)=>n(t,r,e)),r,i,o)}function ue(e,t,n){_e(e,n,t),2===t&&_.has(n)&&J.invalidateResolutionOfFile(n),Y(n),re()}function _e(e,t,n){P&&P.addOrDeleteFile(e,t,n)}function de(e,t){return(null==s?void 0:s.has(e))?XU:le(e,t,pe,500,C,ZU.MissingFile)}function pe(e,t,n){_e(e,n,t),0===t&&r.has(n)&&(r.get(n).close(),r.delete(n),Y(n),re())}function fe(){pq(i||(i=new Map),x,me)}function me(e,t){return O(e,(t=>{xn.assert(g),xn.assert(T);const r=G(t);P&&P.addOrDeleteFileOrDirectory(t,r),Y(r),fq({watchedDirPath:G(e),fileOrDirectory:t,fileOrDirectoryPath:r,configFileName:g,extraFileExtensions:v,options:T,program:U()||k,currentDirectory:m,useCaseSensitiveFileNames:f,writeLog:M,toPath:G})||2!==n&&(n=1,re())}),t,C,ZU.WildcardDirectory)}function ge(e,t,r,i){lq(e,t,c||(c=new Map),((e,t)=>I(e,((r,i)=>{var o;_e(e,t,i),l&&_q(l,t,G);const a=null==(o=c.get(t))?void 0:o.projects;(null==a?void 0:a.size)&&a.forEach((e=>{if(g&&G(g)===e)n=2;else{const t=null==s?void 0:s.get(e);t&&(t.updateLevel=2),J.removeResolutionsFromProjectReferenceRedirects(e)}re()}))}),2e3,r,i)),G)}}var mK=(e=>(e[e.Unbuildable=0]="Unbuildable",e[e.UpToDate=1]="UpToDate",e[e.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",e[e.OutputMissing=3]="OutputMissing",e[e.ErrorReadingFile=4]="ErrorReadingFile",e[e.OutOfDateWithSelf=5]="OutOfDateWithSelf",e[e.OutOfDateWithUpstream=6]="OutOfDateWithUpstream",e[e.OutOfDateBuildInfo=7]="OutOfDateBuildInfo",e[e.OutOfDateOptions=8]="OutOfDateOptions",e[e.OutOfDateRoots=9]="OutOfDateRoots",e[e.UpstreamOutOfDate=10]="UpstreamOutOfDate",e[e.UpstreamBlocked=11]="UpstreamBlocked",e[e.ComputingUpstream=12]="ComputingUpstream",e[e.TsVersionOutputOfDate=13]="TsVersionOutputOfDate",e[e.UpToDateWithInputFileText=14]="UpToDateWithInputFileText",e[e.ContainerOnly=15]="ContainerOnly",e[e.ForceBuild=16]="ForceBuild",e))(mK||{});function gK(e){return Ao(e,".json")?e:Ko(e,"tsconfig.json")}var hK=new Date(-864e13),yK=new Date(864e13);function vK(e,t){return function(e,t,n){const r=e.get(t);let i;return r||(i=new Map,e.set(t,i)),r||i}(e,t)}function bK(e){return e.now?e.now():new Date}function xK(e){return!!e&&!!e.buildOrder}function SK(e){return xK(e)?e.buildOrder:e}function kK(e,t){return n=>{let r=t?`[${Lq(AU(e),"")}] `:`${AU(e)} - `;r+=`${Jq(n.messageText,e.newLine)}${e.newLine+e.newLine}`,e.write(r)}}function TK(e,t,n,r){const i=iK(e,t);return i.getModifiedTime=e.getModifiedTime?t=>e.getModifiedTime(t):ft,i.setModifiedTime=e.setModifiedTime?(t,n)=>e.setModifiedTime(t,n):_t,i.deleteFile=e.deleteFile?t=>e.deleteFile(t):_t,i.reportDiagnostic=n||PU(e),i.reportSolutionBuilderStatus=r||kK(e),i.now=Ze(e,e.now),i}function CK(e=vo,t,n,r,i){const o=TK(e,t,n,r);return o.reportErrorSummary=i,o}function wK(e=vo,t,n,r,i){const o=TK(e,t,n,r);return Ye(o,YU(e,i)),o}function DK(e,t,n){return SW(!1,e,t,n)}function EK(e,t,n,r){return SW(!0,e,t,n,r)}function PK(e,t){return Yo(t,e.compilerHost.getCurrentDirectory(),e.compilerHost.getCanonicalFileName)}function NK(e,t){const{resolvedConfigFilePaths:n}=e,r=n.get(t);if(void 0!==r)return r;const i=PK(e,t);return n.set(t,i),i}function FK(e){return!!e.options}function AK(e,t){const n=e.configFileCache.get(t);return n&&FK(n)?n:void 0}function IK(e,t,n){const{configFileCache:r}=e,i=r.get(n);if(i)return FK(i)?i:void 0;let o;pr("SolutionBuilder::beforeConfigFileParsing");const{parseConfigFileHost:a,baseCompilerOptions:s,baseWatchOptions:c,extendedConfigCache:l,host:u}=e;let _;return u.getParsedCommandLine?(_=u.getParsedCommandLine(t),_||(o=cS(va.File_0_not_found,t))):(a.onUnRecoverableConfigFileDiagnostic=e=>o=e,_=tM(t,s,a,l,c),a.onUnRecoverableConfigFileDiagnostic=_t),r.set(n,_||o),pr("SolutionBuilder::afterConfigFileParsing"),fr("SolutionBuilder::Config file parsing","SolutionBuilder::beforeConfigFileParsing","SolutionBuilder::afterConfigFileParsing"),_}function OK(e,t){return gK(Wo(e.compilerHost.getCurrentDirectory(),t))}function MK(e,t){const n=new Map,r=new Map,i=[];let o,a;for(const e of t)s(e);return a?{buildOrder:o||u,circularDiagnostics:a}:o||u;function s(t,c){const l=NK(e,t);if(r.has(l))return;if(n.has(l))return void(c||(a||(a=[])).push(cS(va.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,i.join("\r\n"))));n.set(l,!0),i.push(t);const u=IK(e,t,l);if(u&&u.projectReferences)for(const t of u.projectReferences)s(OK(e,t.path),c||t.circular);i.pop(),r.set(l,!0),(o||(o=[])).push(t)}}function LK(e){return e.buildOrder||function(e){const t=MK(e,e.rootNames.map((t=>OK(e,t))));e.resolvedConfigFilePaths.clear();const n=new Set(SK(t).map((t=>NK(e,t)))),r={onDeleteValue:_t};return Sx(e.configFileCache,n,r),Sx(e.projectStatus,n,r),Sx(e.builderPrograms,n,r),Sx(e.diagnostics,n,r),Sx(e.projectPendingBuild,n,r),Sx(e.projectErrorsReported,n,r),Sx(e.buildInfoCache,n,r),Sx(e.outputTimeStamps,n,r),Sx(e.lastCachedPackageJsonLookups,n,r),e.watch&&(Sx(e.allWatchedConfigFiles,n,{onDeleteValue:dx}),e.allWatchedExtendedConfigFiles.forEach((e=>{e.projects.forEach((t=>{n.has(t)||e.projects.delete(t)})),e.close()})),Sx(e.allWatchedWildcardDirectories,n,{onDeleteValue:e=>e.forEach(vq)}),Sx(e.allWatchedInputFiles,n,{onDeleteValue:e=>e.forEach(dx)}),Sx(e.allWatchedPackageJsonFiles,n,{onDeleteValue:e=>e.forEach(dx)})),e.buildOrder=t}(e)}function jK(e,t,n){const r=t&&OK(e,t),i=LK(e);if(xK(i))return i;if(r){const t=NK(e,r);if(-1===T(i,(n=>NK(e,n)===t)))return}const o=r?MK(e,[r]):i;return xn.assert(!xK(o)),xn.assert(!n||void 0!==r),xn.assert(!n||o[o.length-1]===r),n?o.slice(0,o.length-1):o}function RK(e){e.cache&&BK(e);const{compilerHost:t,host:n}=e,r=e.readFileWithCache,i=t.getSourceFile,{originalReadFile:o,originalFileExists:a,originalDirectoryExists:s,originalCreateDirectory:c,originalWriteFile:l,getSourceFileWithCache:u,readFileWithCache:_}=Dq(n,(t=>PK(e,t)),((...e)=>i.call(t,...e)));e.readFileWithCache=_,t.getSourceFile=u,e.cache={originalReadFile:o,originalFileExists:a,originalDirectoryExists:s,originalCreateDirectory:c,originalWriteFile:l,originalReadFileWithCache:r,originalGetSourceFile:i}}function BK(e){if(!e.cache)return;const{cache:t,host:n,compilerHost:r,extendedConfigCache:i,moduleResolutionCache:o,typeReferenceDirectiveResolutionCache:a,libraryResolutionCache:s}=e;n.readFile=t.originalReadFile,n.fileExists=t.originalFileExists,n.directoryExists=t.originalDirectoryExists,n.createDirectory=t.originalCreateDirectory,n.writeFile=t.originalWriteFile,r.getSourceFile=t.originalGetSourceFile,e.readFileWithCache=t.originalReadFileWithCache,i.clear(),null==o||o.clear(),null==a||a.clear(),null==s||s.clear(),e.cache=void 0}function JK(e,t){e.projectStatus.delete(t),e.diagnostics.delete(t)}function zK({projectPendingBuild:e},t,n){const r=e.get(t);(void 0===r||re.projectPendingBuild.set(NK(e,t),0))),t&&t.throwIfCancellationRequested())}var qK=(e=>(e[e.Build=0]="Build",e[e.UpdateOutputFileStamps=1]="UpdateOutputFileStamps",e))(qK||{});function VK(e,t){return e.projectPendingBuild.delete(t),e.diagnostics.has(t)?1:0}function UK(e,t,n){if(!e.projectPendingBuild.size)return;if(xK(t))return;const{options:r,projectPendingBuild:i}=e;for(let o=0;oi.options,getCurrentDirectory:()=>e.compilerHost.getCurrentDirectory(),getBuilderProgram:()=>l(mt),getProgram:()=>l((e=>e.getProgramOrUndefined())),getSourceFile:e=>l((t=>t.getSourceFile(e))),getSourceFiles:()=>_((e=>e.getSourceFiles())),getOptionsDiagnostics:e=>_((t=>t.getOptionsDiagnostics(e))),getGlobalDiagnostics:e=>_((t=>t.getGlobalDiagnostics(e))),getConfigFileParsingDiagnostics:()=>_((e=>e.getConfigFileParsingDiagnostics())),getSyntacticDiagnostics:(e,t)=>_((n=>n.getSyntacticDiagnostics(e,t))),getAllDependencies:e=>_((t=>t.getAllDependencies(e))),getSemanticDiagnostics:(e,t)=>_((n=>n.getSemanticDiagnostics(e,t))),getSemanticDiagnosticsOfNextAffectedFile:(e,t)=>l((n=>n.getSemanticDiagnosticsOfNextAffectedFile&&n.getSemanticDiagnosticsOfNextAffectedFile(e,t))),emit:(n,r,i,o,a)=>n||o?l((s=>{var c,l;return s.emit(n,r,i,o,a||(null==(l=(c=e.host).getCustomTransformers)?void 0:l.call(c,t)))})):(y(2,i),4===c?h(r,i):3===c?g(r,i,a):void 0),done:function(t,r,i){return y(6,t,r,i),pr("SolutionBuilder::Projects built"),VK(e,n)}};function l(e){return y(0),a&&e(a)}function _(e){return l(e)||u}function d(){var r,o,l;if(xn.assert(void 0===a),e.options.dry)return TW(e,va.A_non_dry_build_would_build_project_0,t),s=1,void(c=5);if(e.options.verbose&&TW(e,va.Building_project_0,t),0===i.fileNames.length)return DW(e,n,dV(i)),s=0,void(c=5);const{host:u,compilerHost:_}=e;if(e.projectCompilerOptions=i.options,null==(r=e.moduleResolutionCache)||r.update(i.options),null==(o=e.typeReferenceDirectiveResolutionCache)||o.update(i.options),a=u.createProgram(i.fileNames,i.options,_,function({options:e,builderPrograms:t,compilerHost:n},r,i){if(!e.force)return t.get(r)||uK(i.options,n)}(e,n,i),dV(i),i.projectReferences),e.watch){const t=null==(l=e.moduleResolutionCache)?void 0:l.getPackageJsonInfoCache().getInternalMap();e.lastCachedPackageJsonLookups.set(n,t&&new Set($e(t.values(),(t=>e.host.realpath&&(aj(t)||t.directoryExists)?e.host.realpath(Ko(t.packageDirectory,"package.json")):Ko(t.packageDirectory,"package.json"))))),e.builderPrograms.set(n,a)}c++}function p(t,r,i){t.length?({buildResult:s,step:c}=XK(e,n,a,0,t,r,i)):c++}function f(e){xn.assertIsDefined(a),p([...a.getConfigFileParsingDiagnostics(),...a.getOptionsDiagnostics(e),...a.getGlobalDiagnostics(e),...a.getSyntacticDiagnostics(void 0,e)],8,"Syntactic")}function m(e){p(xn.checkDefined(a).getSemanticDiagnostics(void 0,e),16,"Semantic")}function g(r,o,l){var u,_,d;xn.assertIsDefined(a),xn.assert(3===c);const p=a.saveEmitState();let f;const m=[],{emitResult:g}=HU(a,(e=>(f||(f=[])).push(e)),void 0,void 0,((e,t,n,r,i,o)=>m.push({name:e,text:t,writeByteOrderMark:n,data:o})),o,!1,l||(null==(_=(u=e.host).getCustomTransformers)?void 0:_.call(u,t)));if(f)return a.restoreEmitState(p),({buildResult:s,step:c}=XK(e,n,a,0,f,32,"Declaration file")),{emitSkipped:!0,diagnostics:g.diagnostics};const{host:h,compilerHost:y}=e,v=(null==(d=a.hasChangedEmitSignature)?void 0:d.call(a))?0:2,b=by(),x=new Map,S=a.getCompilerOptions(),k=RS(S);let T,C;return m.forEach((({name:t,text:i,writeByteOrderMark:o,data:a})=>{const s=PK(e,t);x.set(PK(e,t),t),(null==a?void 0:a.buildInfo)&&tW(e,a.buildInfo,n,S,v);const c=(null==a?void 0:a.differsOnlyInMap)?Zi(e.host,t):void 0;cv(r?{writeFile:r}:y,b,t,i,o),(null==a?void 0:a.differsOnlyInMap)?e.host.setModifiedTime(t,c):!k&&e.watch&&(T||(T=eW(e,n))).set(s,C||(C=bK(e.host)))})),function(t,r,o,l){const u=t.getDiagnostics();if(u.length)return({buildResult:s,step:c}=XK(e,n,a,0,u,64,"Emit")),u;e.write&&r.forEach((t=>HK(e,i,t))),sW(e,i,n,va.Updating_unchanged_output_timestamps_of_project_0,r),e.diagnostics.delete(n),e.projectStatus.set(n,{type:1,oldestOutputFileName:o}),GK(e,a),c=5,s=l}(b,x,m.length?m[0].name:K$(i,!h.useCaseSensitiveFileNames()),v),g}function h(t,r){xn.assertIsDefined(a),xn.assert(4===c);const o=a.emitBuildInfo(((r,i,o,s,c,l)=>{(null==l?void 0:l.buildInfo)&&tW(e,l.buildInfo,n,a.getCompilerOptions(),2),t?t(r,i,o,s,c,l):e.compilerHost.writeFile(r,i,o,s,c,l)}),r);return o.diagnostics.length&&(wW(e,o.diagnostics),e.diagnostics.set(n,[...e.diagnostics.get(n),...o.diagnostics]),s&=64),o.emittedFiles&&e.write&&o.emittedFiles.forEach((t=>HK(e,i,t))),GK(e,a),c=5,o}function y(a,l,u,_){for(;c<=a&&c<6;){const a=c;switch(c){case 0:d();break;case 1:f(l);break;case 2:m(l);break;case 3:g(u,l,_);break;case 4:h(u,l);break;case 5:uW(e,t,n,r,i,o,xn.checkDefined(s)),c++}xn.assert(c>a)}}}(e,t.project,t.projectPath,t.projectIndex,t.config,n):function(e,t,n,r,i){let o=!0;return{kind:1,project:t,projectPath:n,buildOrder:i,getCompilerOptions:()=>r.options,getCurrentDirectory:()=>e.compilerHost.getCurrentDirectory(),updateOutputFileStatmps:()=>{lW(e,r,n),o=!1},done:()=>(o&&lW(e,r,n),pr("SolutionBuilder::Timestamps only updates"),VK(e,n))}}(e,t.project,t.projectPath,t.config,n)}function WK(e,t,n){const r=UK(e,t,n);return r?KK(e,r,t):r}function HK({write:e},t,n){e&&t.options.listEmittedFiles&&e(`TSFILE: ${n}`)}function GK(e,t){t&&(e.write&&zU(t,e.write),e.host.afterProgramEmitAndDiagnostics&&e.host.afterProgramEmitAndDiagnostics(t),t.releaseProgram()),e.projectCompilerOptions=e.baseCompilerOptions}function XK(e,t,n,r,i,o,a){const s=n&&!n.getCompilerOptions().outFile;return DW(e,t,i),e.projectStatus.set(t,{type:0,reason:`${a} errors`}),s?{buildResult:o,step:4}:(GK(e,n),{buildResult:o,step:5})}function QK(e){return!!e.watcher}function YK(e,t){const n=PK(e,t),r=e.filesWatched.get(n);if(e.watch&&r){if(!QK(r))return r;if(r.modifiedTime)return r.modifiedTime}const i=Zi(e.host,t);return e.watch&&(r?r.modifiedTime=i:e.filesWatched.set(n,i)),i}function ZK(e,t,n,r,i,o,a){const s=PK(e,t),c=e.filesWatched.get(s);if(c&&QK(c))c.callbacks.push(n);else{const l=e.watchFile(t,((t,n,r)=>{const i=xn.checkDefined(e.filesWatched.get(s));xn.assert(QK(i)),i.modifiedTime=r,i.callbacks.forEach((e=>e(t,n,r)))}),r,i,o,a);e.filesWatched.set(s,{callbacks:[n],watcher:l,modifiedTime:c})}return{close:()=>{const t=xn.checkDefined(e.filesWatched.get(s));xn.assert(QK(t)),1===t.callbacks.length?(e.filesWatched.delete(s),vq(t)):en(t.callbacks,n)}}}function eW(e,t){if(!e.watch)return;let n=e.outputTimeStamps.get(t);return n||e.outputTimeStamps.set(t,n=new Map),n}function tW(e,t,n,r,i){const o=P$(r),a=nW(e,o,n),s=bK(e.host);a?(a.buildInfo=t,a.modifiedTime=s,2&i||(a.latestChangedDtsTime=s)):e.buildInfoCache.set(n,{path:PK(e,o),buildInfo:t,modifiedTime:s,latestChangedDtsTime:2&i?void 0:s})}function nW(e,t,n){const r=PK(e,t),i=e.buildInfoCache.get(n);return(null==i?void 0:i.path)===r?i:void 0}function rW(e,t,n,r){const i=PK(e,t),o=e.buildInfoCache.get(n);if(void 0!==o&&o.path===i)return o.buildInfo||void 0;const a=e.readFileWithCache(t),s=a?Q$(t,a):void 0;return e.buildInfoCache.set(n,{path:i,buildInfo:s||!1,modifiedTime:r||Yi}),s}function iW(e,t,n,r){if(nb&&(y=n,b=t),g&&S.add(r)}if(g){h||(h=aU(g,d,_));const e=ld(h.roots,((e,t)=>S.has(t)?void 0:t));if(e)return{type:9,buildInfoFile:d,inputFile:e}}if(!d){const r=V$(t,!_.useCaseSensitiveFileNames()),i=eW(e,n);for(const t of r){const n=PK(e,t);let r=null==i?void 0:i.get(n);if(r||(r=Zi(e.host,t),null==i||i.set(n,r)),r===Yi)return{type:3,missingOutputFileName:t};if(riW(e,t,v,p)));if(w)return w;const D=e.lastCachedPackageJsonLookups.get(n);return D&&ud(D,(t=>iW(e,t,v,p)))||{type:T?2:x?14:1,newestInputFileTime:b,newestInputFileName:y,oldestOutputFileName:p}}(e,t,n);return pr("SolutionBuilder::afterUpToDateCheck"),fr("SolutionBuilder::Up-to-date check","SolutionBuilder::beforeUpToDateCheck","SolutionBuilder::afterUpToDateCheck"),e.projectStatus.set(n,i),i}function sW(e,t,n,r,i){if(t.options.noEmit)return;let o;const a=P$(t.options);if(a)return(null==i?void 0:i.has(PK(e,a)))||(e.options.verbose&&TW(e,r,t.options.configFilePath),e.host.setModifiedTime(a,o=bK(e.host)),nW(e,a,n).modifiedTime=o),void e.outputTimeStamps.delete(n);const{host:s}=e,c=V$(t,!s.useCaseSensitiveFileNames()),l=eW(e,n),u=l?new Set:void 0;if(!i||c.length!==i.size){let n=!!e.options.verbose;for(const a of c){const c=PK(e,a);(null==i?void 0:i.has(c))||(n&&(n=!1,TW(e,r,t.options.configFilePath)),s.setModifiedTime(a,o||(o=bK(e.host))),l&&(l.set(c,o),u.add(c)))}}null==l||l.forEach(((e,t)=>{(null==i?void 0:i.has(t))||u.has(t)||l.delete(t)}))}function cW(e,t,n){if(!t.composite)return;const r=xn.checkDefined(e.buildInfoCache.get(n));if(void 0!==r.latestChangedDtsTime)return r.latestChangedDtsTime||void 0;const i=r.buildInfo&&r.buildInfo.program&&r.buildInfo.program.latestChangedDtsFile?e.host.getModifiedTime(Go(r.buildInfo.program.latestChangedDtsFile,Ro(r.path))):void 0;return r.latestChangedDtsTime=i||!1,i}function lW(e,t,n){if(e.options.dry)return TW(e,va.A_non_dry_build_would_update_timestamps_for_output_of_project_0,t.options.configFilePath);sW(e,t,n,va.Updating_output_timestamps_of_project_0),e.projectStatus.set(n,{type:1,oldestOutputFileName:K$(t,!e.host.useCaseSensitiveFileNames())})}function uW(e,t,n,r,i,o,a){if(!(124&a)&&i.options.composite)for(let i=r+1;ie.diagnostics.has(NK(e,t))))?c?2:1:0}(e,t,n,r,i,o);return pr("SolutionBuilder::afterBuild"),fr("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),a}function dW(e,t,n){pr("SolutionBuilder::beforeClean");const r=function(e,t,n){const r=jK(e,t,n);if(!r)return 3;if(xK(r))return wW(e,r.circularDiagnostics),4;const{options:i,host:o}=e,a=i.dry?[]:void 0;for(const t of r){const n=NK(e,t),r=IK(e,t,n);if(void 0===r){EW(e,n);continue}const i=V$(r,!o.useCaseSensitiveFileNames());if(!i.length)continue;const s=new Set(r.fileNames.map((t=>PK(e,t))));for(const t of i)s.has(PK(e,t))||o.fileExists(t)&&(a?a.push(t):(o.deleteFile(t),pW(e,n,0)))}return a&&TW(e,va.A_non_dry_build_would_delete_the_following_files_Colon_0,a.map((e=>`\r\n * ${e}`)).join("")),0}(e,t,n);return pr("SolutionBuilder::afterClean"),fr("SolutionBuilder::Clean","SolutionBuilder::beforeClean","SolutionBuilder::afterClean"),r}function pW(e,t,n){e.host.getParsedCommandLine&&1===n&&(n=2),2===n&&(e.configFileCache.delete(t),e.buildOrder=void 0),e.needsSummary=!0,JK(e,t),zK(e,t,n),RK(e)}function fW(e,t,n){e.reportFileChangeDetected=!0,pW(e,t,n),mW(e,250,!0)}function mW(e,t,n){const{hostWithWatch:r}=e;r.setTimeout&&r.clearTimeout&&(e.timerToBuildInvalidatedProject&&r.clearTimeout(e.timerToBuildInvalidatedProject),e.timerToBuildInvalidatedProject=r.setTimeout(gW,t,"timerToBuildInvalidatedProject",e,n))}function gW(e,t,n){pr("SolutionBuilder::beforeBuild");const r=function(e,t){e.timerToBuildInvalidatedProject=void 0,e.reportFileChangeDetected&&(e.reportFileChangeDetected=!1,e.projectErrorsReported.clear(),CW(e,va.File_change_detected_Starting_incremental_compilation));let n=0;const r=LK(e),i=WK(e,r,!1);if(i)for(i.done(),n++;e.projectPendingBuild.size;){if(e.timerToBuildInvalidatedProject)return;const i=UK(e,r,!1);if(!i)break;if(1!==i.kind&&(t||5===n))return void mW(e,100,!1);KK(e,i,r).done(),1!==i.kind&&n++}return BK(e),r}(t,n);pr("SolutionBuilder::afterBuild"),fr("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),r&&PW(t,r)}function hW(e,t,n,r){e.watch&&!e.allWatchedConfigFiles.has(n)&&e.allWatchedConfigFiles.set(n,ZK(e,t,(()=>fW(e,n,2)),2e3,null==r?void 0:r.watchOptions,ZU.ConfigFile,t))}function yW(e,t,n){lq(t,null==n?void 0:n.options,e.allWatchedExtendedConfigFiles,((t,r)=>ZK(e,t,(()=>{var t;return null==(t=e.allWatchedExtendedConfigFiles.get(r))?void 0:t.projects.forEach((t=>fW(e,t,2)))}),2e3,null==n?void 0:n.watchOptions,ZU.ExtendedConfigFile)),(t=>PK(e,t)))}function vW(e,t,n,r){e.watch&&pq(vK(e.allWatchedWildcardDirectories,n),r.wildcardDirectories,((i,o)=>e.watchDirectory(i,(o=>{var a;fq({watchedDirPath:PK(e,i),fileOrDirectory:o,fileOrDirectoryPath:PK(e,o),configFileName:t,currentDirectory:e.compilerHost.getCurrentDirectory(),options:r.options,program:e.builderPrograms.get(n)||(null==(a=AK(e,n))?void 0:a.fileNames),useCaseSensitiveFileNames:e.parseConfigFileHost.useCaseSensitiveFileNames,writeLog:t=>e.writeLog(t),toPath:t=>PK(e,t)})||fW(e,n,1)}),o,null==r?void 0:r.watchOptions,ZU.WildcardDirectory,t)))}function bW(e,t,n,r){e.watch&&kx(vK(e.allWatchedInputFiles,n),new Set(r.fileNames),{createNewValue:i=>ZK(e,i,(()=>fW(e,n,0)),250,null==r?void 0:r.watchOptions,ZU.SourceFile,t),onDeleteValue:dx})}function xW(e,t,n,r){e.watch&&e.lastCachedPackageJsonLookups&&kx(vK(e.allWatchedPackageJsonFiles,n),e.lastCachedPackageJsonLookups.get(n),{createNewValue:i=>ZK(e,i,(()=>fW(e,n,0)),2e3,null==r?void 0:r.watchOptions,ZU.PackageJson,t),onDeleteValue:dx})}function SW(e,t,n,r,i){const o=function(e,t,n,r,i){const o=t,a=t,s=function(e){const t={};return gO.forEach((n=>{Le(e,n.name)&&(t[n.name]=e[n.name])})),t}(r),c=tK(o,(()=>m.projectCompilerOptions));let l,u,_;rK(c),c.getParsedCommandLine=e=>IK(m,e,NK(m,e)),c.resolveModuleNameLiterals=Ze(o,o.resolveModuleNameLiterals),c.resolveTypeReferenceDirectiveReferences=Ze(o,o.resolveTypeReferenceDirectiveReferences),c.resolveLibrary=Ze(o,o.resolveLibrary),c.resolveModuleNames=Ze(o,o.resolveModuleNames),c.resolveTypeReferenceDirectives=Ze(o,o.resolveTypeReferenceDirectives),c.getModuleResolutionCache=Ze(o,o.getModuleResolutionCache),c.resolveModuleNameLiterals||c.resolveModuleNames||(l=hj(c.getCurrentDirectory(),c.getCanonicalFileName),c.resolveModuleNameLiterals=(e,t,n,r,i)=>eV(e,t,n,r,i,o,l,Xq),c.getModuleResolutionCache=()=>l),c.resolveTypeReferenceDirectiveReferences||c.resolveTypeReferenceDirectives||(u=yj(c.getCurrentDirectory(),c.getCanonicalFileName,void 0,null==l?void 0:l.getPackageJsonInfoCache(),null==l?void 0:l.optionsToRedirectsKey),c.resolveTypeReferenceDirectiveReferences=(e,t,n,r,i)=>eV(e,t,n,r,i,o,u,Zq)),c.resolveLibrary||(_=hj(c.getCurrentDirectory(),c.getCanonicalFileName,void 0,null==l?void 0:l.getPackageJsonInfoCache()),c.resolveLibrary=(e,t,n)=>bj(e,t,n,o,_)),c.getBuildInfo=(e,t)=>rW(m,e,NK(m,t),void 0);const{watchFile:d,watchDirectory:p,writeLog:f}=eK(a,r),m={host:o,hostWithWatch:a,parseConfigFileHost:bV(o),write:Ze(o,o.trace),options:r,baseCompilerOptions:s,rootNames:n,baseWatchOptions:i,resolvedConfigFilePaths:new Map,configFileCache:new Map,projectStatus:new Map,extendedConfigCache:new Map,buildInfoCache:new Map,outputTimeStamps:new Map,builderPrograms:new Map,diagnostics:new Map,projectPendingBuild:new Map,projectErrorsReported:new Map,compilerHost:c,moduleResolutionCache:l,typeReferenceDirectiveResolutionCache:u,libraryResolutionCache:_,buildOrder:void 0,readFileWithCache:e=>o.readFile(e),projectCompilerOptions:s,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:e,watch:e,allWatchedWildcardDirectories:new Map,allWatchedInputFiles:new Map,allWatchedConfigFiles:new Map,allWatchedExtendedConfigFiles:new Map,allWatchedPackageJsonFiles:new Map,filesWatched:new Map,lastCachedPackageJsonLookups:new Map,timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:d,watchDirectory:p,writeLog:f};return m}(e,t,n,r,i);return{build:(e,t,n,r)=>_W(o,e,t,n,r),clean:e=>dW(o,e),buildReferences:(e,t,n,r)=>_W(o,e,t,n,r,!0),cleanReferences:e=>dW(o,e,!0),getNextInvalidatedProject:e=>($K(o,e),WK(o,LK(o),!1)),getBuildOrder:()=>LK(o),getUpToDateStatusOfProject:e=>{const t=OK(o,e),n=NK(o,t);return aW(o,IK(o,t,n),n)},invalidateProject:(e,t)=>pW(o,e,t||0),close:()=>function(e){xx(e.allWatchedConfigFiles,dx),xx(e.allWatchedExtendedConfigFiles,vq),xx(e.allWatchedWildcardDirectories,(e=>xx(e,vq))),xx(e.allWatchedInputFiles,(e=>xx(e,dx))),xx(e.allWatchedPackageJsonFiles,(e=>xx(e,dx)))}(o)}}function kW(e,t){return pa(t,e.compilerHost.getCurrentDirectory(),e.compilerHost.getCanonicalFileName)}function TW(e,t,...n){e.host.reportSolutionBuilderStatus(cS(t,...n))}function CW(e,t,...n){var r,i;null==(i=(r=e.hostWithWatch).onWatchStatusChange)||i.call(r,cS(t,...n),e.host.getNewLine(),e.baseCompilerOptions)}function wW({host:e},t){t.forEach((t=>e.reportDiagnostic(t)))}function DW(e,t,n){wW(e,n),e.projectErrorsReported.set(t,!0),n.length&&e.diagnostics.set(t,n)}function EW(e,t){DW(e,t,[e.configFileCache.get(t)])}function PW(e,t){if(!e.needsSummary)return;e.needsSummary=!1;const n=e.watch||!!e.host.reportErrorSummary,{diagnostics:r}=e;let i=0,o=[];xK(t)?(NW(e,t.buildOrder),wW(e,t.circularDiagnostics),n&&(i+=MU(t.circularDiagnostics)),n&&(o=[...o,...LU(t.circularDiagnostics)])):(t.forEach((t=>{const n=NK(e,t);e.projectErrorsReported.has(n)||wW(e,r.get(n)||u)})),n&&r.forEach((e=>i+=MU(e))),n&&r.forEach((e=>[...o,...LU(e)]))),e.watch?CW(e,jU(i),i):e.host.reportErrorSummary&&e.host.reportErrorSummary(i,o)}function NW(e,t){e.options.verbose&&TW(e,va.Projects_in_this_build_Colon_0,t.map((t=>"\r\n * "+kW(e,t))).join(""))}function FW(e,t,n){e.options.verbose&&function(e,t,n){switch(n.type){case 5:return TW(e,va.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,kW(e,t),kW(e,n.outOfDateOutputFileName),kW(e,n.newerInputFileName));case 6:return TW(e,va.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,kW(e,t),kW(e,n.outOfDateOutputFileName),kW(e,n.newerProjectName));case 3:return TW(e,va.Project_0_is_out_of_date_because_output_file_1_does_not_exist,kW(e,t),kW(e,n.missingOutputFileName));case 4:return TW(e,va.Project_0_is_out_of_date_because_there_was_error_reading_file_1,kW(e,t),kW(e,n.fileName));case 7:return TW(e,va.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted,kW(e,t),kW(e,n.buildInfoFile));case 8:return TW(e,va.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,kW(e,t),kW(e,n.buildInfoFile));case 9:return TW(e,va.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,kW(e,t),kW(e,n.buildInfoFile),kW(e,n.inputFile));case 1:if(void 0!==n.newestInputFileTime)return TW(e,va.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2,kW(e,t),kW(e,n.newestInputFileName||""),kW(e,n.oldestOutputFileName||""));break;case 2:return TW(e,va.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,kW(e,t));case 14:return TW(e,va.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,kW(e,t));case 10:return TW(e,va.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,kW(e,t),kW(e,n.upstreamProjectName));case 11:return TW(e,n.upstreamProjectBlocked?va.Project_0_can_t_be_built_because_its_dependency_1_was_not_built:va.Project_0_can_t_be_built_because_its_dependency_1_has_errors,kW(e,t),kW(e,n.upstreamProjectName));case 0:return TW(e,va.Failed_to_parse_file_0_Colon_1,kW(e,t),n.reason);case 13:return TW(e,va.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,kW(e,t),n.version,c);case 16:TW(e,va.Project_0_is_being_forcibly_rebuilt,kW(e,t))}}(e,t,n)}var AW=(e=>(e[e.time=0]="time",e[e.count=1]="count",e[e.memory=2]="memory",e))(AW||{});function IW(e,t,n){return MW(e,n)?PU(e,!0):t}function OW(e){return!!e.writeOutputIsTTY&&e.writeOutputIsTTY()&&!e.getEnvironmentVariable("NO_COLOR")}function MW(e,t){return t&&void 0!==t.pretty?t.pretty:OW(e)}function LW(e){return e.options.all?he(bO,((e,t)=>It(e.name,t.name))):F(bO.slice(),(e=>!!e.showInSimplifiedHelpView))}function jW(e){e.write(eM(va.Version_0,c)+e.newLine)}function RW(e){if(!OW(e))return{bold:e=>e,blue:e=>e,blueBackground:e=>e,brightWhite:e=>e};const t=e.getEnvironmentVariable("OS")&&e.getEnvironmentVariable("OS").toLowerCase().includes("windows"),n=e.getEnvironmentVariable("WT_SESSION"),r=e.getEnvironmentVariable("TERM_PROGRAM")&&"vscode"===e.getEnvironmentVariable("TERM_PROGRAM"),i="truecolor"===e.getEnvironmentVariable("COLORTERM")||"xterm-256color"===e.getEnvironmentVariable("TERM");function o(e){return`${e}`}return{bold:function(e){return`${e}`},blue:function(e){return!t||n||r?`${e}`:o(e)},brightWhite:o,blueBackground:function(e){return i?`${e}`:`${e}`}}}function BW(e){return`--${e.name}${e.shortName?`, -${e.shortName}`:""}`}function JW(e,t,n,r){var i;const o=[],a=RW(e),s=BW(t),c=function(e){if("object"!==e.type)return{valueType:function(e){switch(xn.assert("listOrElement"!==e.type),e.type){case"string":case"number":case"boolean":return eM(va.type_Colon);case"list":return eM(va.one_or_more_Colon);default:return eM(va.one_of_Colon)}}(e),possibleValues:function e(t){let n;switch(t.type){case"string":case"number":case"boolean":n=t.type;break;case"list":case"listOrElement":n=e(t.element);break;case"object":n="";break;default:const r={};return t.type.forEach(((e,n)=>{var i;(null==(i=t.deprecatedKeys)?void 0:i.has(n))||(r[e]||(r[e]=[])).push(n)})),Object.entries(r).map((([,e])=>e.join("/"))).join(", ")}return n}(e)}}(t),l="object"==typeof t.defaultValueDescription?eM(t.defaultValueDescription):(u=t.defaultValueDescription,_="list"===t.type||"listOrElement"===t.type?t.element.type:t.type,void 0!==u&&"object"==typeof _?$e(_.entries()).filter((([,e])=>e===u)).map((([e])=>e)).join("/"):String(u));var u,_;const d=(null==(i=e.getWidthOfTerminal)?void 0:i.call(e))??0;if(d>=80){let i="";t.description&&(i=eM(t.description)),o.push(...f(s,i,n,r,d,!0),e.newLine),p(c,t)&&(c&&o.push(...f(c.valueType,c.possibleValues,n,r,d,!1),e.newLine),l&&o.push(...f(eM(va.default_Colon),l,n,r,d,!1),e.newLine)),o.push(e.newLine)}else{if(o.push(a.blue(s),e.newLine),t.description){const e=eM(t.description);o.push(e)}if(o.push(e.newLine),p(c,t)){if(c&&o.push(`${c.valueType} ${c.possibleValues}`),l){c&&o.push(e.newLine);const t=eM(va.default_Colon);o.push(`${t} ${l}`)}o.push(e.newLine)}o.push(e.newLine)}return o;function p(e,t){const n=t.defaultValueDescription;return!(t.category===va.Command_line_Options||D(["string"],null==e?void 0:e.possibleValues)&&D([void 0,"false","n/a"],n))}function f(e,t,n,r,i,o){const s=[];let c=!0,l=t;const u=i-r;for(;l.length>0;){let t="";c?(t=e.padStart(n),t=t.padEnd(r),t=o?a.blue(t):t):t="".padStart(r);const i=l.substr(0,u);l=l.slice(u),s.push(`${t}${i}`),c=!1}return s}}function zW(e,t){let n=0;for(const e of t){const t=BW(e).length;n=n>t?n:t}const r=n+2,i=r+2;let o=[];for(const n of t){const t=JW(e,n,r,i);o=[...o,...t]}return o[o.length-2]!==e.newLine&&o.push(e.newLine),o}function $W(e,t,n,r,i,o){let a=[];if(a.push(RW(e).bold(t)+e.newLine+e.newLine),i&&a.push(i+e.newLine+e.newLine),!r)return a=[...a,...zW(e,n)],o&&a.push(o+e.newLine+e.newLine),a;const s=new Map;for(const e of n){if(!e.category)continue;const t=eM(e.category),n=s.get(t)??[];n.push(e),s.set(t,n)}return s.forEach(((t,n)=>{a.push(`### ${n}${e.newLine}${e.newLine}`),a=[...a,...zW(e,t)]})),o&&a.push(o+e.newLine+e.newLine),a}function qW(e,t){let n=[...VW(e,`${eM(va.tsc_Colon_The_TypeScript_Compiler)} - ${eM(va.Version_0,c)}`)];n=[...n,...$W(e,eM(va.BUILD_OPTIONS),t,!1,sS(va.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const t of n)e.write(t)}function VW(e,t){var n;const r=RW(e),i=[],o=(null==(n=e.getWidthOfTerminal)?void 0:n.call(e))??0,a=r.blueBackground("".padStart(5)),s=r.blueBackground(r.brightWhite("TS ".padStart(5)));if(o>=t.length+5){const n=(o>120?120:o)-5;i.push(t.padEnd(n)+a+e.newLine),i.push("".padStart(n)+s+e.newLine)}else i.push(t+e.newLine),i.push(e.newLine);return i}function UW(e,t){t.options.all?function(e,t,n,r){let i=[...VW(e,`${eM(va.tsc_Colon_The_TypeScript_Compiler)} - ${eM(va.Version_0,c)}`)];i=[...i,...$W(e,eM(va.ALL_COMPILER_OPTIONS),t,!0,void 0,sS(va.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))],i=[...i,...$W(e,eM(va.WATCH_OPTIONS),r,!1,eM(va.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon))],i=[...i,...$W(e,eM(va.BUILD_OPTIONS),n,!1,sS(va.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const t of i)e.write(t)}(e,LW(t),FO,mO):function(e,t){const n=RW(e);let r=[...VW(e,`${eM(va.tsc_Colon_The_TypeScript_Compiler)} - ${eM(va.Version_0,c)}`)];r.push(n.bold(eM(va.COMMON_COMMANDS))+e.newLine+e.newLine),a("tsc",va.Compiles_the_current_project_tsconfig_json_in_the_working_directory),a("tsc app.ts util.ts",va.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options),a("tsc -b",va.Build_a_composite_project_in_the_working_directory),a("tsc --init",va.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory),a("tsc -p ./path/to/tsconfig.json",va.Compiles_the_TypeScript_project_located_at_the_specified_path),a("tsc --help --all",va.An_expanded_version_of_this_information_showing_all_possible_compiler_options),a(["tsc --noEmit","tsc --target esnext"],va.Compiles_the_current_project_with_additional_settings);const i=t.filter((e=>e.isCommandLineOnly||e.category===va.Command_line_Options)),o=t.filter((e=>!D(i,e)));r=[...r,...$W(e,eM(va.COMMAND_LINE_FLAGS),i,!1,void 0,void 0),...$W(e,eM(va.COMMON_COMPILER_OPTIONS),o,!1,void 0,sS(va.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))];for(const t of r)e.write(t);function a(t,i){const o="string"==typeof t?[t]:t;for(const t of o)r.push(" "+n.blue(t)+e.newLine);r.push(" "+eM(i)+e.newLine+e.newLine)}}(e,LW(t))}function KW(e,t,n){let r,i=PU(e);if(n.options.build)return i(cS(va.Option_build_must_be_the_first_command_line_argument)),e.exit(1);if(n.options.locale&&pc(n.options.locale,e,n.errors),n.errors.length>0)return n.errors.forEach(i),e.exit(1);if(n.options.init)return function(e,t,n,r){const i=Xo(Ko(e.getCurrentDirectory(),"tsconfig.json"));if(e.fileExists(i))t(cS(va.A_tsconfig_json_file_is_already_defined_at_Colon_0,i));else{e.writeFile(i,LM(n,r,e.newLine));const t=[e.newLine,...VW(e,"Created a new tsconfig.json with:")];t.push(OM(n,e.newLine)+e.newLine+e.newLine),t.push("You can learn more at https://aka.ms/tsconfig"+e.newLine);for(const n of t)e.write(n)}}(e,i,n.options,n.fileNames),e.exit(0);if(n.options.version)return jW(e),e.exit(0);if(n.options.help||n.options.all)return UW(e,n),e.exit(0);if(n.options.watch&&n.options.listFilesOnly)return i(cS(va.Options_0_and_1_cannot_be_combined,"watch","listFilesOnly")),e.exit(1);if(n.options.project){if(0!==n.fileNames.length)return i(cS(va.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)),e.exit(1);const t=Xo(n.options.project);if(!t||e.directoryExists(t)){if(r=Ko(t,"tsconfig.json"),!e.fileExists(r))return i(cS(va.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0,n.options.project)),e.exit(1)}else if(r=t,!e.fileExists(r))return i(cS(va.The_specified_path_does_not_exist_Colon_0,n.options.project)),e.exit(1)}else 0===n.fileNames.length&&(r=bq(Xo(e.getCurrentDirectory()),(t=>e.fileExists(t))));if(0===n.fileNames.length&&!r)return n.options.showConfig?i(cS(va.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0,Xo(e.getCurrentDirectory()))):(jW(e),UW(e,n)),e.exit(1);const o=e.getCurrentDirectory(),a=jM(n.options,(e=>Go(e,o)));if(r){const o=new Map,s=OU(r,a,o,n.watchOptions,e,i);if(a.showConfig)return 0!==s.errors.length?(i=IW(e,i,s.options),s.errors.forEach(i),e.exit(1)):(e.write(JSON.stringify(DM(s,r,e),null,4)+e.newLine),e.exit(0));if(i=IW(e,i,s.options),_x(s.options)){if(GW(e,i))return;return function(e,t,n,r,i,o,a){const s=sK({configFileName:r.options.configFilePath,optionsToExtend:i,watchOptionsToExtend:o,system:e,reportDiagnostic:n,reportWatchStatus:rH(e,r.options)});return nH(e,t,s),s.configFileParsingResult=r,s.extendedConfigCache=a,fK(s)}(e,t,i,s,a,n.watchOptions,o)}RS(s.options)?ZW(e,t,i,s):YW(e,t,i,s)}else{if(a.showConfig)return e.write(JSON.stringify(DM(n,Ko(o,"tsconfig.json"),e),null,4)+e.newLine),e.exit(0);if(i=IW(e,i,a),_x(a)){if(GW(e,i))return;return function(e,t,n,r,i,o){const a=cK({rootFiles:r,options:i,watchOptions:o,system:e,reportDiagnostic:n,reportWatchStatus:rH(e,i)});return nH(e,t,a),fK(a)}(e,t,i,n.fileNames,a,n.watchOptions)}RS(a)?ZW(e,t,i,{...n,options:a}):YW(e,t,i,{...n,options:a})}}function WW(e){if(e.length>0&&45===e[0].charCodeAt(0)){const t=e[0].slice(45===e[0].charCodeAt(1)?2:1).toLowerCase();return"build"===t||"b"===t}return!1}function HW(e,t,n){if(WW(n)){const{buildOptions:r,watchOptions:i,projects:o,errors:a}=ZO(n.slice(1));if(!r.generateCpuProfile||!e.enableCPUProfiler)return XW(e,t,r,i,o,a);e.enableCPUProfiler(r.generateCpuProfile,(()=>XW(e,t,r,i,o,a)))}const r=HO(n,(t=>e.readFile(t)));if(!r.options.generateCpuProfile||!e.enableCPUProfiler)return KW(e,t,r);e.enableCPUProfiler(r.options.generateCpuProfile,(()=>KW(e,t,r)))}function GW(e,t){return!(e.watchFile&&e.watchDirectory||(t(cS(va.The_current_host_does_not_support_the_0_option,"--watch")),e.exit(1),0))}function XW(e,t,n,r,i,o){const a=IW(e,PU(e),n);if(n.locale&&pc(n.locale,e,o),o.length>0)return o.forEach(a),e.exit(1);if(n.help)return jW(e),qW(e,AO),e.exit(0);if(0===i.length)return jW(e),qW(e,AO),e.exit(0);if(!e.getModifiedTime||!e.setModifiedTime||n.clean&&!e.deleteFile)return a(cS(va.The_current_host_does_not_support_the_0_option,"--build")),e.exit(1);if(n.watch){if(GW(e,a))return;const o=wK(e,void 0,a,kK(e,MW(e,n)),rH(e,n));o.jsDocParsingMode=2;const s=iH(e,n);eH(e,t,o,s);const c=o.onWatchStatusChange;let l=!1;o.onWatchStatusChange=(e,t,n,r)=>{null==c||c(e,t,n,r),!l||e.code!==va.Found_0_errors_Watching_for_file_changes.code&&e.code!==va.Found_1_error_Watching_for_file_changes.code||oH(u,s)};const u=EK(o,i,n,r);return u.build(),oH(u,s),l=!0,u}const s=CK(e,void 0,a,kK(e,MW(e,n)),QW(e,n));s.jsDocParsingMode=2;const c=iH(e,n);eH(e,t,s,c);const l=DK(s,i,n),u=n.clean?l.clean():l.build();return oH(l,c),Cr(),e.exit(u)}function QW(e,t){return MW(e,t)?(t,n)=>e.write(BU(t,n,e.newLine,e)):void 0}function YW(e,t,n,r){const{fileNames:i,options:o,projectReferences:a}=r,s=wq(o,void 0,e);s.jsDocParsingMode=2;const c=s.getCurrentDirectory(),l=tn(s.useCaseSensitiveFileNames());Dq(s,(e=>Yo(e,c,l))),cH(e,o,!1);const u=gV({rootNames:i,options:o,projectReferences:a,host:s,configFileParsingDiagnostics:dV(r)}),_=GU(u,n,(t=>e.write(t+e.newLine)),QW(e,o));return uH(e,u,void 0),t(u),e.exit(_)}function ZW(e,t,n,r){const{options:i,fileNames:o,projectReferences:a}=r;cH(e,i,!1);const s=_K(i,e);s.jsDocParsingMode=2;const c=lK({host:s,system:e,rootNames:o,options:i,configFileParsingDiagnostics:dV(r),projectReferences:a,reportDiagnostic:n,reportErrorSummary:QW(e,i),afterProgramEmitAndDiagnostics:n=>{uH(e,n.getProgram(),void 0),t(n)}});return e.exit(c)}function eH(e,t,n,r){tH(e,n,!0),n.afterProgramEmitAndDiagnostics=n=>{uH(e,n.getProgram(),r),t(n)}}function tH(e,t,n){const r=t.createProgram;t.createProgram=(t,i,o,a,s,c)=>(xn.assert(void 0!==t||void 0===i&&!!a),void 0!==i&&cH(e,i,n),r(t,i,o,a,s,c))}function nH(e,t,n){n.jsDocParsingMode=2,tH(e,n,!1);const r=n.afterProgramCreate;n.afterProgramCreate=n=>{r(n),uH(e,n.getProgram(),void 0),t(n)}}function rH(e,t){return IU(e,MW(e,t))}function iH(e,t){if(e===vo&&t.extendedDiagnostics)return Sr(),function(){let e;return{addAggregateStatistic:function(t){const n=null==e?void 0:e.get(t.name);n?2===n.type?n.value=Math.max(n.value,t.value):n.value+=t.value:(e??(e=new Map)).set(t.name,t)},forEachAggregateStatistics:function(t){null==e||e.forEach(t)},clear:function(){e=void 0}}}()}function oH(e,t){if(!t)return;if(!xr())return void vo.write(va.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+"\n");const n=[];function r(e){const t=mr(e);t&&n.push({name:i(e),value:t,type:1})}function i(e){return e.replace("SolutionBuilder::","")}n.push({name:"Projects in scope",value:SK(e.getBuildOrder()).length,type:1}),r("SolutionBuilder::Projects built"),r("SolutionBuilder::Timestamps only updates"),r("SolutionBuilder::Bundles updated"),t.forEachAggregateStatistics((e=>{e.name=`Aggregate ${e.name}`,n.push(e)})),hr(((e,t)=>{lH(e)&&n.push({name:`${i(e)} time`,value:t,type:0})})),kr(),Sr(),t.clear(),_H(vo,n)}function aH(e,t){return e===vo&&(t.diagnostics||t.extendedDiagnostics)}function sH(e,t){return e===vo&&t.generateTrace}function cH(e,t,n){aH(e,t)&&Sr(e),sH(e,t)&&Tr(n?"build":"project",t.generateTrace,t.configFilePath)}function lH(e){return an(e,"SolutionBuilder::")}function uH(e,t,n){var r;const i=t.getCompilerOptions();let o;if(sH(e,i)&&(null==(r=or)||r.stopTracing()),aH(e,i)){o=[];const r=e.getMemoryUsage?e.getMemoryUsage():-1;s("Files",t.getSourceFiles().length);const l=function(e){const t=function(){const e=new Map;return e.set("Library",0),e.set("Definitions",0),e.set("TypeScript",0),e.set("JavaScript",0),e.set("JSON",0),e.set("Other",0),e}();return f(e.getSourceFiles(),(n=>{const r=function(e,t){if(e.isSourceFileDefaultLibrary(t))return"Library";if(t.isDeclarationFile)return"Definitions";const n=t.path;return Io(n,Fk)?"TypeScript":Io(n,Mk)?"JavaScript":Ao(n,".json")?"JSON":"Other"}(e,n),i=Ka(n).length;t.set(r,t.get(r)+i)})),t}(t);if(i.extendedDiagnostics)for(const[e,t]of l.entries())s("Lines of "+e,t);else s("Lines",y(l.values(),((e,t)=>e+t),0));s("Identifiers",t.getIdentifierCount()),s("Symbols",t.getSymbolCount()),s("Types",t.getTypeCount()),s("Instantiations",t.getInstantiationCount()),r>=0&&a({name:"Memory used",value:r,type:2},!0);const u=xr(),_=u?gr("Program"):0,d=u?gr("Bind"):0,p=u?gr("Check"):0,m=u?gr("Emit"):0;if(i.extendedDiagnostics){const e=t.getRelationCacheSizes();s("Assignability cache size",e.assignable),s("Identity cache size",e.identity),s("Subtype cache size",e.subtype),s("Strict subtype cache size",e.strictSubtype),u&&hr(((e,t)=>{lH(e)||c(`${e} time`,t,!0)}))}else u&&(c("I/O read",gr("I/O Read"),!0),c("I/O write",gr("I/O Write"),!0),c("Parse time",_,!0),c("Bind time",d,!0),c("Check time",p,!0),c("Emit time",m,!0));u&&c("Total time",_+d+p+m,!1),_H(e,o),u?n?(hr((e=>{lH(e)||vr(e)})),yr((e=>{lH(e)||br(e)}))):kr():e.write(va.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+"\n")}function a(e,t){o.push(e),t&&(null==n||n.addAggregateStatistic(e))}function s(e,t){a({name:e,value:t,type:1},!0)}function c(e,t,n){a({name:e,value:t,type:0},n)}}function _H(e,t){let n=0,r=0;for(const e of t){e.name.length>n&&(n=e.name.length);const t=dH(e);t.length>r&&(r=t.length)}for(const i of t)e.write(`${i.name}:`.padEnd(n+2)+dH(i).toString().padStart(r)+e.newLine)}function dH(e){switch(e.type){case 1:return""+e.value;case 0:return(e.value/1e3).toFixed(2)+"s";case 2:return Math.round(e.value/1e3)+"K";default:xn.assertNever(e.type)}}function pH(e,t){const n=WS(e,"strictNullChecks");return{typeFromExpression:_,serializeTypeOfDeclaration:function(e,n){switch(e.kind){case 171:return r(kv(e));case 169:return s(e,n);case 260:return function(e,n){const i=kv(e);if(i)return r(i);let o;return e.initializer&&(t.isExpandoFunctionDeclaration(e)||(o=_(e.initializer,n,void 0,void 0,sf(e)))),o??c(e,n)}(e,n);case 172:return function(e,t){const n=kv(e);if(n)return r(n);let i;if(e.initializer){const n=nf(e);i=_(e.initializer,t,void 0,void 0,n)}return i??c(e,t)}(e,n);case 208:return c(e,n);case 277:return i(e.expression,n,void 0,!0);case 211:case 212:case 226:return r(kv(e))||c(e,n);case 303:return _(e.initializer,n)||c(e,n);default:xn.assertNever(e,`Node needs to be an inferrable node, found ${xn.formatSyntaxKind(e.kind)}`)}},serializeReturnTypeForSignature:function(e,t){switch(e.kind){case 177:return a(e,t);case 174:case 262:case 180:case 173:case 179:case 176:case 178:case 181:case 184:case 185:case 218:case 219:case 317:case 323:return y(e,t);default:xn.assertNever(e,`Node needs to be an inferrable node, found ${xn.formatSyntaxKind(e.kind)}`)}},serializeTypeOfExpression:i};function r(e,t){return!(void 0===e||!(!t||e&&h(e)))||void 0}function i(e,t,n,r){return _(e,t,!1,n,r)??l(e,t)}function o(e){if(e)return 177===e.kind?Cv(e):e.parameters.length>0?kv(e.parameters[0]):void 0}function a(e,n){const i=t.getAllAccessorDeclarations(e),a=function(e,t){let n=o(e);return n||e===t.firstAccessor||(n=o(t.firstAccessor)),!n&&t.secondAccessor&&e!==t.secondAccessor&&(n=o(t.secondAccessor)),n}(e,i);return a?r(a):!!i.getAccessor&&y(i.getAccessor,n)}function s(e,n){const i=e.parent;if(178===i.kind)return a(i,n);const o=kv(e),s=t.requiresAddingImplicitUndefined(e);let l;return o?l=r(o,s):e.initializer&&qD(e.name)&&(l=_(e.initializer,n,void 0,s)),l??c(e,n)}function c(e,t){return t.tracker.reportInferenceFallback(e),!1}function l(e,t){return t.tracker.reportInferenceFallback(e),!1}function u(e,t,n,i){return Dl(t)?_(e,n,!0,i):(i&&!h(t)&&n.tracker.reportInferenceFallback(t),r(t))}function _(e,n,i=!1,o=!1,a=!1){switch(e.kind){case 217:return _A(e)?u(e.expression,dA(e),n,o):_(e.expression,n,i,o);case 80:if(t.isUndefinedIdentifierExpression(e))return!0;break;case 106:case 9:case 15:case 11:case 10:case 112:case 97:return!0;case 219:case 218:return function(e,t){const n=r(e.type)??y(e,t),i=f(e.typeParameters),o=e.parameters.every((e=>p(e,t)));return n&&i&&o}(e,n);case 216:case 234:const s=e;return u(s.expression,s.type,n,o);case 224:const c=e;if(DC(c)){if(10===c.operand.kind)return!0;if(9===c.operand.kind)return!0}break;case 228:if(!i&&!a)return!0;break;case 209:return function(e,t,n){if(!function(e,t,n){if(!n)return t.tracker.reportInferenceFallback(e),!1;for(const n of e.elements)if(230===n.kind)return t.tracker.reportInferenceFallback(n),!1;return!0}(e,t,n))return!1;let r=!0;for(const i of e.elements)xn.assert(230!==i.kind),232!==i.kind&&(r=(_(i,t,n)??l(i,t))&&r);return!0}(e,n,i);case 210:return function(e,t,n){if(!function(e,t){let n=!0;for(const r of e.properties){if(262144&r.flags){n=!1;break}if(304===r.kind||305===r.kind)t.tracker.reportInferenceFallback(r),n=!1;else{if(262144&r.name.flags){n=!1;break}81===r.name.kind?n=!1:167===r.name.kind&&(DC(r.name.expression,!1)||(t.tracker.reportInferenceFallback(r.name),n=!1))}}return n}(e,t))return!1;let r=!0;for(const i of e.properties){xn.assert(!JN(i)&&!zN(i));i.name;switch(i.kind){case 174:r=!!m(i,0,t)&&r;break;case 303:r=!!d(i,0,t,n)&&r;break;case 178:case 177:r=!!g(i,0,t)&&r}}return r}(e,n,i);case 231:return l(e,n)}}function d(e,t,n,r){return _(e.initializer,n,r)??c(e,n)}function p(e,t){return s(e,t)}function f(e){return(null==e?void 0:e.every((e=>r(e.constraint)&&r(e.default))))??!0}function m(e,t,n){const r=y(e,n),i=f(e.typeParameters),o=e.parameters.every((e=>p(e,n)));return r&&i&&o}function g(e,n,i){const a=t.getAllAccessorDeclarations(e),s=a.getAccessor&&o(a.getAccessor),c=a.setAccessor&&o(a.setAccessor);if(void 0!==s&&void 0!==c){const t=e.parameters.every((e=>p(e,i)));return I_(e)?t&&r(s):t}if(a.firstAccessor===e){const t=s??c,n=t?r(t):function(e,t,n){return 177===e.kind?y(e,n):(n.tracker.reportInferenceFallback(e),!1)}(e,0,i);return n}return!1}function h(e){return!n||!(!Ph(e.kind)&&201!==e.kind&&184!==e.kind&&185!==e.kind&&188!==e.kind&&189!==e.kind&&187!==e.kind&&203!==e.kind&&197!==e.kind)||(196===e.kind?h(e.type):(192===e.kind||193===e.kind)&&e.types.every(h))}function y(e,t){let n;const i=Cv(e);return i&&(n=r(i)),!n&&rh(e)&&(n=function(e,t){let n;if(e&&!Nd(e.body)){if(3&Jh(e))return;const t=e.body;t&&DP(t)?Pf(t,(e=>{if(n)return n=void 0,!0;n=e.expression})):n=t}if(n)return _(n,t)}(e,t)),n??function(e,t){return t.tracker.reportInferenceFallback(e),!1}(e,t)}}var fH={};o(fH,{NameValidationResult:()=>zH,discoverTypings:()=>BH,isTypingUpToDate:()=>FH,loadSafeList:()=>jH,loadTypesMap:()=>RH,nodeCoreModuleList:()=>OH,nodeCoreModules:()=>MH,nonRelativeModuleNameForTypingCache:()=>LH,prefixedNodeCoreModuleList:()=>IH,renderPackageNameValidationFailure:()=>VH,validatePackageName:()=>$H});var mH,gH,hH="action::set",yH="action::invalidate",vH="action::packageInstalled",bH="event::typesRegistry",xH="event::beginInstallTypes",SH="event::endInstallTypes",kH="event::initializationFailed",TH="action::watchTypingLocations";function CH(e){return vo.args.includes(e)}function wH(e){const t=vo.args.indexOf(e);return t>=0&&t`node:${e}`)),OH=[...AH,...IH],MH=new Set(OH);function LH(e){return MH.has(e)?"node":e}function jH(e,t){const n=nM(t,(t=>e.readFile(t)));return new Map(Object.entries(n.config))}function RH(e,t){var n;const r=nM(t,(t=>e.readFile(t)));if(null==(n=r.config)?void 0:n.simpleMap)return new Map(Object.entries(r.config.simpleMap))}function BH(e,t,n,r,i,o,a,s,c,l){if(!a||!a.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};const u=new Map;n=q(n,(e=>{const t=Xo(e);if(qk(t))return t}));const _=[];a.include&&y(a.include,"Explicitly included types");const d=a.exclude||[];if(!l.types){const e=new Set(n.map(Ro));e.add(r),e.forEach((e=>{v(e,"bower.json","bower_components",_),v(e,"package.json","node_modules",_)}))}a.disableFilenameBasedTypeAcquisition||function(e){const n=q(e,(e=>{if(!qk(e))return;const t=Xt(Yk(yt(Bo(e))));return i.get(t)}));n.length&&y(n,"Inferred typings from file names"),Q(e,(e=>Ao(e,".jsx")))&&(t&&t("Inferred 'react' typings due to presence of '.jsx' extension"),h("react"))}(n),s&&y(ne(s.map(LH),Et,Mt),"Inferred typings from unresolved imports");for(const e of d)u.delete(e)&&t&&t(`Typing for ${e} is in exclude list, will be ignored.`);o.forEach(((e,t)=>{const n=c.get(t);!1===u.get(t)&&void 0!==n&&FH(e,n)&&u.set(t,e.typingLocation)}));const p=[],m=[];u.forEach(((e,t)=>{e?m.push(e):p.push(t)}));const g={cachedTypingPaths:m,newTypingNames:p,filesToWatch:_};return t&&t(`Finished typings discovery:${NH(g)}`),g;function h(e){u.has(e)||u.set(e,!1)}function y(e,n){t&&t(`${n}: ${JSON.stringify(e)}`),f(e,h)}function v(n,r,i,o){const a=Ko(n,r);let s,c;e.fileExists(a)&&(o.push(a),s=nM(a,(t=>e.readFile(t))).config,c=R([s.dependencies,s.devDependencies,s.optionalDependencies,s.peerDependencies],Re),y(c,`Typing names in '${a}' dependencies`));const l=Ko(n,i);if(o.push(l),!e.directoryExists(l))return;const _=[],d=c?c.map((e=>Ko(l,e,r))):e.readDirectory(l,[".json"],void 0,void 0,3).filter((e=>{if(Bo(e)!==r)return!1;const t=$o(Xo(e)),n="@"===t[t.length-3][0];return n&&yt(t[t.length-4])===i||!n&&yt(t[t.length-3])===i}));t&&t(`Searching for typing names in ${l}; all files: ${JSON.stringify(d)}`);for(const n of d){const r=Xo(n),i=nM(r,(t=>e.readFile(t))).config;if(!i.name)continue;const o=i.types||i.typings;if(o){const n=Go(o,Ro(r));e.fileExists(n)?(t&&t(` Package '${i.name}' provides its own types.`),u.set(i.name,n)):t&&t(` Package '${i.name}' provides its own types but they are missing.`)}else _.push(i.name)}y(_," Found package names")}}var JH,zH=(e=>(e[e.Ok=0]="Ok",e[e.EmptyName=1]="EmptyName",e[e.NameTooLong=2]="NameTooLong",e[e.NameStartsWithDot=3]="NameStartsWithDot",e[e.NameStartsWithUnderscore=4]="NameStartsWithUnderscore",e[e.NameContainsNonURISafeCharacters=5]="NameContainsNonURISafeCharacters",e))(zH||{});function $H(e){return qH(e,!0)}function qH(e,t){if(!e)return 1;if(e.length>214)return 2;if(46===e.charCodeAt(0))return 3;if(95===e.charCodeAt(0))return 4;if(t){const t=/^@([^/]+)\/([^/]+)$/.exec(e);if(t){const e=qH(t[1],!1);if(0!==e)return{name:t[1],isScopeName:!0,result:e};const n=qH(t[2],!1);return 0!==n?{name:t[2],isScopeName:!1,result:n}:0}}return encodeURIComponent(e)!==e?5:0}function VH(e,t){return"object"==typeof e?UH(t,e.result,e.name,e.isScopeName):UH(t,e,t,!1)}function UH(e,t,n,r){const i=r?"Scope":"Package";switch(t){case 1:return`'${e}':: ${i} name '${n}' cannot be empty`;case 2:return`'${e}':: ${i} name '${n}' should be less than 214 characters`;case 3:return`'${e}':: ${i} name '${n}' cannot start with '.'`;case 4:return`'${e}':: ${i} name '${n}' cannot start with '_'`;case 5:return`'${e}':: ${i} name '${n}' contains non URI safe characters`;case 0:return xn.fail();default:xn.assertNever(t)}}(e=>{class t{constructor(e){this.text=e}getText(e,t){return 0===e&&t===this.text.length?this.text:this.text.substring(e,t)}getLength(){return this.text.length}getChangeRange(){}}e.fromString=function(e){return new t(e)}})(JH||(JH={}));var KH=(e=>(e[e.Dependencies=1]="Dependencies",e[e.DevDependencies=2]="DevDependencies",e[e.PeerDependencies=4]="PeerDependencies",e[e.OptionalDependencies=8]="OptionalDependencies",e[e.All=15]="All",e))(KH||{}),WH=(e=>(e[e.Off=0]="Off",e[e.On=1]="On",e[e.Auto=2]="Auto",e))(WH||{}),HH=(e=>(e[e.Semantic=0]="Semantic",e[e.PartialSemantic=1]="PartialSemantic",e[e.Syntactic=2]="Syntactic",e))(HH||{}),GH={},XH=(e=>(e.Original="original",e.TwentyTwenty="2020",e))(XH||{}),QH=(e=>(e.All="All",e.SortAndCombine="SortAndCombine",e.RemoveUnused="RemoveUnused",e))(QH||{}),YH=(e=>(e[e.Invoked=1]="Invoked",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",e))(YH||{}),ZH=(e=>(e.Type="Type",e.Parameter="Parameter",e.Enum="Enum",e))(ZH||{}),eG=(e=>(e.none="none",e.definition="definition",e.reference="reference",e.writtenReference="writtenReference",e))(eG||{}),tG=(e=>(e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart",e))(tG||{}),nG=(e=>(e.Ignore="ignore",e.Insert="insert",e.Remove="remove",e))(nG||{});function rG(e){return{indentSize:4,tabSize:4,newLineCharacter:e||"\n",convertTabsToSpaces:!0,indentStyle:2,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:"ignore",trimTrailingWhitespace:!0,indentSwitchCase:!0}}var iG=rG("\n"),oG=(e=>(e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral",e[e.link=22]="link",e[e.linkName=23]="linkName",e[e.linkText=24]="linkText",e))(oG||{}),aG=(e=>(e[e.None=0]="None",e[e.MayIncludeAutoImports=1]="MayIncludeAutoImports",e[e.IsImportStatementCompletion=2]="IsImportStatementCompletion",e[e.IsContinuation=4]="IsContinuation",e[e.ResolvedModuleSpecifiers=8]="ResolvedModuleSpecifiers",e[e.ResolvedModuleSpecifiersBeyondLimit=16]="ResolvedModuleSpecifiersBeyondLimit",e[e.MayIncludeMethodSnippets=32]="MayIncludeMethodSnippets",e))(aG||{}),sG=(e=>(e.Comment="comment",e.Region="region",e.Code="code",e.Imports="imports",e))(sG||{}),cG=(e=>(e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration",e))(cG||{}),lG=(e=>(e[e.None=0]="None",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",e[e.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",e[e.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition",e))(lG||{}),uG=(e=>(e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.BigIntLiteral=7]="BigIntLiteral",e[e.StringLiteral=8]="StringLiteral",e[e.RegExpLiteral=9]="RegExpLiteral",e))(uG||{}),_G=(e=>(e.unknown="",e.warning="warning",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.localClassElement="local class",e.interfaceElement="interface",e.typeElement="type",e.enumElement="enum",e.enumMemberElement="enum member",e.variableElement="var",e.localVariableElement="local var",e.variableUsingElement="using",e.variableAwaitUsingElement="await using",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.memberAccessorVariableElement="accessor",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e.directory="directory",e.externalModuleName="external module name",e.jsxAttribute="JSX attribute",e.string="string",e.link="link",e.linkName="link name",e.linkText="link text",e))(_G||{}),dG=(e=>(e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e.abstractModifier="abstract",e.optionalModifier="optional",e.deprecatedModifier="deprecated",e.dtsModifier=".d.ts",e.tsModifier=".ts",e.tsxModifier=".tsx",e.jsModifier=".js",e.jsxModifier=".jsx",e.jsonModifier=".json",e.dmtsModifier=".d.mts",e.mtsModifier=".mts",e.mjsModifier=".mjs",e.dctsModifier=".d.cts",e.ctsModifier=".cts",e.cjsModifier=".cjs",e))(dG||{}),pG=(e=>(e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.bigintLiteral="bigint",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAliasName="type alias name",e.parameterName="parameter name",e.docCommentTagName="doc comment tag name",e.jsxOpenTagName="jsx open tag name",e.jsxCloseTagName="jsx close tag name",e.jsxSelfClosingTagName="jsx self closing tag name",e.jsxAttribute="jsx attribute",e.jsxText="jsx text",e.jsxAttributeStringLiteralValue="jsx attribute string literal value",e))(pG||{}),fG=(e=>(e[e.comment=1]="comment",e[e.identifier=2]="identifier",e[e.keyword=3]="keyword",e[e.numericLiteral=4]="numericLiteral",e[e.operator=5]="operator",e[e.stringLiteral=6]="stringLiteral",e[e.regularExpressionLiteral=7]="regularExpressionLiteral",e[e.whiteSpace=8]="whiteSpace",e[e.text=9]="text",e[e.punctuation=10]="punctuation",e[e.className=11]="className",e[e.enumName=12]="enumName",e[e.interfaceName=13]="interfaceName",e[e.moduleName=14]="moduleName",e[e.typeParameterName=15]="typeParameterName",e[e.typeAliasName=16]="typeAliasName",e[e.parameterName=17]="parameterName",e[e.docCommentTagName=18]="docCommentTagName",e[e.jsxOpenTagName=19]="jsxOpenTagName",e[e.jsxCloseTagName=20]="jsxCloseTagName",e[e.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",e[e.jsxAttribute=22]="jsxAttribute",e[e.jsxText=23]="jsxText",e[e.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",e[e.bigintLiteral=25]="bigintLiteral",e))(fG||{}),mG=Cs(99,!0),gG=(e=>(e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All",e))(gG||{});function hG(e){switch(e.kind){case 260:return Mm(e)&&el(e)?7:1;case 169:case 208:case 172:case 171:case 303:case 304:case 174:case 173:case 176:case 177:case 178:case 262:case 218:case 219:case 299:case 291:return 1;case 168:case 264:case 265:case 187:return 2;case 346:return void 0===e.name?3:2;case 306:case 263:return 3;case 267:return sp(e)||1===DR(e)?5:4;case 266:case 275:case 276:case 271:case 272:case 277:case 278:return 7;case 307:return 5}return 7}function yG(e){const t=(e=vX(e)).parent;return 307===e.kind?1:mN(t)||yN(t)||SN(t)||fN(t)||oN(t)||rN(t)&&e===t.name?7:vG(e)?function(e){const t=166===e.kind?e:iE(e.parent)&&e.parent.right===e?e.parent:void 0;return t&&271===t.parent.kind?7:4}(e):dh(e)?hG(t):ou(e)&&mc(e,_n(KN,q_,WN))?7:function(e){switch(Cb(e)&&(e=e.parent),e.kind){case 110:return!Tm(e);case 197:return!0}switch(e.parent.kind){case 183:return!0;case 205:return!e.parent.isTypeOf;case 233:return wf(e.parent)}return!1}(e)?2:function(e){return function(e){let t=e,n=!0;if(166===t.parent.kind){for(;t.parent&&166===t.parent.kind;)t=t.parent;n=t.right===e}return 183===t.parent.kind&&!n}(e)||function(e){let t=e,n=!0;if(211===t.parent.kind){for(;t.parent&&211===t.parent.kind;)t=t.parent;n=t.name===e}if(!n&&233===t.parent.kind&&298===t.parent.parent.kind){const e=t.parent.parent.parent;return 263===e.kind&&119===t.parent.parent.token||264===e.kind&&96===t.parent.parent.token}return!1}(e)}(e)?4:aE(t)?(xn.assert(CF(t.parent)),2):JE(t)?3:1}function vG(e){for(;166===e.parent.kind;)e=e.parent;return Fm(e.parent)&&e.parent.moduleReference===e}function bG(e,t=!1,n=!1){return PG(e,QE,wG,t,n)}function xG(e,t=!1,n=!1){return PG(e,YE,wG,t,n)}function SG(e,t=!1,n=!1){return PG(e,$u,wG,t,n)}function kG(e,t=!1,n=!1){return PG(e,ZE,DG,t,n)}function TG(e,t=!1,n=!1){return PG(e,cE,wG,t,n)}function CG(e,t=!1,n=!1){return PG(e,D_,EG,t,n)}function wG(e){return e.expression}function DG(e){return e.tag}function EG(e){return e.tagName}function PG(e,t,n,r,i){let o=r?FG(e):NG(e);return i&&(o=fA(o)),!!o&&!!o.parent&&t(o.parent)&&n(o.parent)===o}function NG(e){return BG(e)?e.parent:e}function FG(e){return BG(e)||JG(e)?e.parent:e}function AG(e,t){for(;e;){if(256===e.kind&&e.label.escapedText===t)return e.label;e=e.parent}}function IG(e,t){return!!GE(e.expression)&&e.expression.name.text===t}function OG(e){var t;return qD(e)&&(null==(t=lt(e.parent,Nl))?void 0:t.label)===e}function MG(e){var t;return qD(e)&&(null==(t=lt(e.parent,$P))?void 0:t.label)===e}function LG(e){return MG(e)||OG(e)}function jG(e){var t;return(null==(t=lt(e.parent,F_))?void 0:t.tagName)===e}function RG(e){var t;return(null==(t=lt(e.parent,iE))?void 0:t.right)===e}function BG(e){var t;return(null==(t=lt(e.parent,GE))?void 0:t.name)===e}function JG(e){var t;return(null==(t=lt(e.parent,XE))?void 0:t.argumentExpression)===e}function zG(e){var t;return(null==(t=lt(e.parent,ZP))?void 0:t.name)===e}function $G(e){var t;return qD(e)&&(null==(t=lt(e.parent,cu))?void 0:t.name)===e}function qG(e){switch(e.parent.kind){case 172:case 171:case 303:case 306:case 174:case 173:case 177:case 178:case 267:return Pc(e.parent)===e;case 212:return e.parent.argumentExpression===e;case 167:return!0;case 201:return 199===e.parent.parent.kind;default:return!1}}function VG(e){return Em(e.parent.parent)&&Pm(e.parent.parent)===e}function UG(e){for(Fg(e)&&(e=e.parent.parent);;){if(!(e=e.parent))return;switch(e.kind){case 307:case 174:case 173:case 262:case 218:case 177:case 178:case 263:case 264:case 266:case 267:return e}}}function KG(e){switch(e.kind){case 307:return qI(e)?"module":"script";case 267:return"module";case 263:case 231:return"class";case 264:return"interface";case 265:case 338:case 346:return"type";case 266:return"enum";case 260:return t(e);case 208:return t(sy(e));case 219:case 262:case 218:return"function";case 177:return"getter";case 178:return"setter";case 174:case 173:return"method";case 303:const{initializer:n}=e;return cu(n)?"method":"property";case 172:case 171:case 304:case 305:return"property";case 181:return"index";case 180:return"construct";case 179:return"call";case 176:case 175:return"constructor";case 168:return"type parameter";case 306:return"enum member";case 169:return Bv(e,31)?"property":"parameter";case 271:case 276:case 281:case 274:case 280:return"alias";case 226:const r=ag(e),{right:i}=e;switch(r){case 7:case 8:case 9:case 0:default:return"";case 1:case 2:const e=KG(i);return""===e?"const":e;case 3:case 5:return nP(i)?"method":"property";case 4:return"property";case 6:return"local class"}case 80:return oN(e.parent)?"alias":"";case 277:const o=KG(e.expression);return""===o?"const":o;default:return""}function t(e){return af(e)?"const":cf(e)?"let":"var"}}function WG(e){switch(e.kind){case 110:return!0;case 80:return xv(e)&&169===e.parent.kind;default:return!1}}var HG=/^\/\/\/\s*=n.end}function tX(e,t,n){return e.pos<=t&&e.end>=n}function nX(e,t,n){return iX(e.pos,e.end,t,n)}function rX(e,t,n,r){return iX(e.getStart(t),e.end,n,r)}function iX(e,t,n,r){return Math.max(e,n)e.kind===t))}function _X(e){const t=S(e.parent.getChildren(),(t=>IF(t)&&XG(t,e)));return xn.assert(!t||D(t.getChildren(),e)),t}function dX(e){return 90===e.kind}function pX(e){return 86===e.kind}function fX(e){return 100===e.kind}function mX(e,t){if(16777216&e.flags)return;const n=GY(e,t);if(n)return n;const r=function(e){let t;return mc(e,(e=>(wu(e)&&(t=e),!iE(e.parent)&&!wu(e.parent)&&!ku(e.parent)))),t}(e);return r&&t.getTypeAtLocation(r)}function gX(e,t){if(e.importClause){if(e.importClause.name&&e.importClause.namedBindings)return;if(e.importClause.name)return e.importClause.name;if(e.importClause.namedBindings){if(pN(e.importClause.namedBindings)){const t=Ee(e.importClause.namedBindings.elements);if(!t)return;return t.name}if(_N(e.importClause.namedBindings))return e.importClause.namedBindings.name}}if(!t)return e.moduleSpecifier}function hX(e,t){if(e.exportClause){if(hN(e.exportClause)){if(!Ee(e.exportClause.elements))return;return e.exportClause.elements[0].name}if(dN(e.exportClause))return e.exportClause.name}if(!t)return e.moduleSpecifier}function yX(e,t){const{parent:n}=e;if(iu(e)&&(t||90!==e.kind)?cI(n)&&D(n.modifiers,e):86===e.kind?GP(n)||mP(e):100===e.kind?HP(n)||nP(e):120===e.kind?XP(n):94===e.kind?YP(n):156===e.kind?QP(n):145===e.kind||144===e.kind?ZP(n):102===e.kind?rN(n):139===e.kind?mE(n):153===e.kind&&gE(n)){const e=function(e,t){if(!t)switch(e.kind){case 263:case 231:return function(e){if(Dc(e))return e.name;if(GP(e)){const t=e.modifiers&&S(e.modifiers,dX);if(t)return t}if(mP(e)){const t=S(e.getChildren(),pX);if(t)return t}}(e);case 262:case 218:return function(e){if(Dc(e))return e.name;if(HP(e)){const t=S(e.modifiers,dX);if(t)return t}if(nP(e)){const t=S(e.getChildren(),fX);if(t)return t}}(e);case 176:return e}if(Dc(e))return e.name}(n,t);if(e)return e}if((115===e.kind||87===e.kind||121===e.kind)&&WP(n)&&1===n.declarations.length){const e=n.declarations[0];if(qD(e.name))return e.name}if(156===e.kind){if(oN(n)&&n.isTypeOnly){const e=gX(n.parent,t);if(e)return e}if(gN(n)&&n.isTypeOnly){const e=hX(n,t);if(e)return e}}if(130===e.kind){if(fN(n)&&n.propertyName||yN(n)&&n.propertyName||_N(n)||dN(n))return n.name;if(gN(n)&&n.exportClause&&dN(n.exportClause))return n.exportClause.name}if(102===e.kind&&iN(n)){const e=gX(n,t);if(e)return e}if(95===e.kind){if(gN(n)){const e=hX(n,t);if(e)return e}if(mN(n))return fA(n.expression)}if(149===e.kind&&SN(n))return n.expression;if(161===e.kind&&(iN(n)||gN(n))&&n.moduleSpecifier)return n.moduleSpecifier;if((96===e.kind||119===e.kind)&&jN(n)&&n.token===e.kind){const e=function(e){if(1===e.types.length)return e.types[0].expression}(n);if(e)return e}if(96===e.kind){if(aE(n)&&n.constraint&&xE(n.constraint))return n.constraint.typeName;if(IE(n)&&xE(n.extendsType))return n.extendsType.typeName}if(140===e.kind&&OE(n))return n.typeParameter.name;if(103===e.kind&&aE(n)&&BE(n.parent))return n.name;if(143===e.kind&&jE(n)&&143===n.operator&&xE(n.type))return n.type.typeName;if(148===e.kind&&jE(n)&&148===n.operator&&wE(n.type)&&xE(n.type.elementType))return n.type.elementType.typeName;if(!t){if((105===e.kind&&YE(n)||116===e.kind&&aP(n)||114===e.kind&&oP(n)||135===e.kind&&sP(n)||127===e.kind&&pP(n)||91===e.kind&&iP(n))&&n.expression)return fA(n.expression);if((103===e.kind||104===e.kind)&&uP(n)&&n.operatorToken===e)return fA(n.right);if(130===e.kind&&yP(n)&&xE(n.type))return n.type.typeName;if(103===e.kind&&MP(n)||165===e.kind&&LP(n))return fA(n.expression)}return e}function vX(e){return yX(e,!1)}function bX(e){return yX(e,!0)}function xX(e,t){return SX(e,t,(e=>Wh(e)||Ph(e.kind)||VD(e)))}function SX(e,t,n){return TX(e,t,!1,n,!1)}function kX(e,t){return TX(e,t,!0,void 0,!1)}function TX(e,t,n,r,i){let o,a=e;for(;;){const i=a.getChildren(e),c=Ie(i,t,((e,t)=>t),((o,a)=>{const c=i[o].getEnd();if(ct?1:s(i[o],l,c)?i[o-1]&&s(i[o-1])?1:0:r&&l===t&&i[o-1]&&i[o-1].getEnd()===t&&s(i[o-1])?1:-1}));if(o)return o;if(!(c>=0&&i[c]))return a;a=i[c]}function s(a,s,c){if(c??(c=a.getEnd()),ct)return!1;if(tn.getStart(e)&&t(r.pos<=e.pos&&r.end>e.end||r.pos===e.end)&&UX(r,n)?t(r):void 0))}(t)}function EX(e,t,n,r){const i=function i(o){if(PX(o)&&1!==o.kind)return o;const a=o.getChildren(t),s=Ie(a,e,((e,t)=>t),((t,n)=>e=a[t-1].end?0:1:-1));if(s>=0&&a[s]){const n=a[s];if(e=e||!UX(n,t)||OX(n)){const e=FX(a,s,t,o.kind);return e?!r&&N_(e)&&e.getChildren(t).length?i(e):NX(e,t):void 0}return i(n)}}xn.assert(void 0!==n||307===o.kind||1===o.kind||N_(o));const c=FX(a,a.length,t,o.kind);return c&&NX(c,t)}(n||t);return xn.assert(!(i&&OX(i))),i}function PX(e){return Ll(e)&&!OX(e)}function NX(e,t){if(PX(e))return e;const n=e.getChildren(t);if(0===n.length)return e;const r=FX(n,n.length,t,e.kind);return r&&NX(r,t)}function FX(e,t,n,r){for(let i=t-1;i>=0;i--)if(OX(e[i]))0!==i||12!==r&&285!==r||xn.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(UX(e[i],n))return e[i]}function AX(e,t,n=EX(t,e)){if(n&&Hl(n)){const r=n.getStart(e),i=n.getEnd();if(rn.getStart(e)}function LX(e,t){const n=kX(e,t);return!!DD(n)||!(19!==n.kind||!IN(n.parent)||!kN(n.parent.parent))||!(30!==n.kind||!D_(n.parent)||!kN(n.parent.parent))}function jX(e,t){return function(n){for(;n;)if(n.kind>=285&&n.kind<=294||12===n.kind||30===n.kind||32===n.kind||80===n.kind||20===n.kind||19===n.kind||44===n.kind)n=n.parent;else{if(284!==n.kind)return!1;if(t>n.getStart(e))return!0;n=n.parent}return!1}(kX(e,t))}function RX(e,t,n){const r=Ra(e.kind),i=Ra(t),o=e.getFullStart(),a=n.text.lastIndexOf(i,o);if(-1===a)return;if(n.text.lastIndexOf(r,o-1)!!e.typeParameters&&e.typeParameters.length>=t))}function $X(e,t){if(-1===t.text.lastIndexOf("<",e?e.pos:t.text.length))return;let n=e,r=0,i=0;for(;n;){switch(n.kind){case 30:if(n=EX(n.getFullStart(),t),n&&29===n.kind&&(n=EX(n.getFullStart(),t)),!n||!qD(n))return;if(!r)return dh(n)?void 0:{called:n,nTypeArguments:i};r--;break;case 50:r=3;break;case 49:r=2;break;case 32:r++;break;case 20:if(n=RX(n,19,t),!n)return;break;case 22:if(n=RX(n,21,t),!n)return;break;case 24:if(n=RX(n,23,t),!n)return;break;case 28:i++;break;case 39:case 80:case 11:case 9:case 10:case 112:case 97:case 114:case 96:case 143:case 25:case 52:case 58:case 59:break;default:if(wu(n))break;return}n=EX(n.getFullStart(),t)}}function qX(e,t,n){return A_e.getRangeOfEnclosingComment(e,t,void 0,n)}function VX(e,t){return!!mc(kX(e,t),oF)}function UX(e,t){return 1===e.kind?!!e.jsDoc:0!==e.getWidth(t)}function KX(e,t=0){const n=[],r=h_(e)?lc(e)&~t:0;return 2&r&&n.push("private"),4&r&&n.push("protected"),1&r&&n.push("public"),(256&r||pE(e))&&n.push("static"),64&r&&n.push("abstract"),32&r&&n.push("export"),65536&r&&n.push("deprecated"),33554432&e.flags&&n.push("declare"),277===e.kind&&n.push("export"),n.length>0?n.join(","):""}function WX(e){return 183===e.kind||213===e.kind?e.typeArguments:cu(e)||263===e.kind||264===e.kind?e.typeParameters:void 0}function HX(e){return 2===e||3===e}function GX(e){return!(11!==e&&14!==e&&!zl(e))}function XX(e,t,n){return!!(4&t.flags)&&e.isEmptyAnonymousObjectType(n)}function QX(e){if(!e.isIntersection())return!1;const{types:t,checker:n}=e;return 2===t.length&&(XX(n,t[0],t[1])||XX(n,t[1],t[0]))}function YX(e,t,n){return zl(e.kind)&&e.getStart(n){const n=IB(t);return!e[n]&&(e[n]=!0)}}function yQ(e){return e.getText(0,e.getLength())}function vQ(e,t){let n="";for(let r=0;r!(t.isDeclarationFile||e.isSourceFileFromExternalLibrary(t)||!t.externalModuleIndicator&&!t.commonJsModuleIndicator)))}function kQ(e){return e.getSourceFiles().some((t=>!t.isDeclarationFile&&!e.isSourceFileFromExternalLibrary(t)&&!!t.externalModuleIndicator))}function TQ(e){return!!e.module||wS(e)>=2||!!e.noEmit}function CQ(e,t){return{fileExists:t=>e.fileExists(t),getCurrentDirectory:()=>t.getCurrentDirectory(),readFile:Ze(t,t.readFile),useCaseSensitiveFileNames:Ze(t,t.useCaseSensitiveFileNames),getSymlinkCache:Ze(t,t.getSymlinkCache)||e.getSymlinkCache,getModuleSpecifierCache:Ze(t,t.getModuleSpecifierCache),getPackageJsonInfoCache:()=>{var t;return null==(t=e.getModuleResolutionCache())?void 0:t.getPackageJsonInfoCache()},getGlobalTypingsCacheLocation:Ze(t,t.getGlobalTypingsCacheLocation),redirectTargetsMap:e.redirectTargetsMap,getProjectReferenceRedirect:t=>e.getProjectReferenceRedirect(t),isSourceOfProjectReferenceRedirect:t=>e.isSourceOfProjectReferenceRedirect(t),getNearestAncestorDirectoryWithPackageJson:Ze(t,t.getNearestAncestorDirectoryWithPackageJson),getFileIncludeReasons:()=>e.getFileIncludeReasons(),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function wQ(e,t){return{...CQ(e,t),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function DQ(e){return 2===e||e>=3&&e<=99||100===e}function EQ(e,t,n,r,i){return YC.createImportDeclaration(void 0,e||t?YC.createImportClause(!!i,e,t&&t.length?YC.createNamedImports(t):void 0):void 0,"string"==typeof n?PQ(n,r):n,void 0)}function PQ(e,t){return YC.createStringLiteral(e,0===t)}var NQ=(e=>(e[e.Single=0]="Single",e[e.Double=1]="Double",e))(NQ||{});function FQ(e,t){return Wm(e,t)?1:0}function AQ(e,t){if(t.quotePreference&&"auto"!==t.quotePreference)return"single"===t.quotePreference?0:1;{const t=Am(e)&&e.imports&&S(e.imports,(e=>wD(e)&&!ly(e.parent)));return t?FQ(t,e):1}}function IQ(e){switch(e){case 0:return"'";case 1:return'"';default:return xn.assertNever(e)}}function OQ(e){const t=MQ(e);return void 0===t?void 0:vc(t)}function MQ(e){return"default"!==e.escapedName?e.escapedName:g(e.declarations,(e=>{const t=Pc(e);return t&&80===t.kind?t.escapedText:void 0}))}function LQ(e){return $_(e)&&(SN(e.parent)||iN(e.parent)||AF(e.parent)||Jm(e.parent,!1)&&e.parent.arguments[0]===e||uf(e.parent)&&e.parent.arguments[0]===e)}function jQ(e){return KE(e)&&VE(e.parent)&&qD(e.name)&&!e.propertyName}function RQ(e,t){const n=e.getTypeAtLocation(t.parent);return n&&e.getPropertyOfType(n,t.name.text)}function BQ(e,t,n){if(e)for(;e.parent;){if(qN(e.parent)||!JQ(n,e.parent,t))return e;e=e.parent}}function JQ(e,t,n){return Bs(e,t.getStart(n))&&t.getEnd()<=js(e)}function zQ(e,t){return cI(e)?S(e.modifiers,(e=>e.kind===t)):void 0}function $Q(e,t,n,r,i){var o;const a=243===(ot(n)?n[0]:n).kind?Um:kp,s=F(t.statements,a),{comparer:c,isSorted:l}=vle.getOrganizeImportsStringComparerWithDetection(s,i),u=ot(n)?ve(n,((e,t)=>vle.compareImportsOrRequireStatements(e,t,c))):[n];if(null==s?void 0:s.length)if(xn.assert(Am(t)),s&&l)for(const n of u){const r=vle.getImportDeclarationInsertionIndex(s,n,c);if(0===r){const r=s[0]===t.statements[0]?{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude}:{};e.insertNodeBefore(t,s[0],n,!1,r)}else{const i=s[r-1];e.insertNodeAfter(t,i,n)}}else{const n=we(s);n?e.insertNodesAfter(t,n,u):e.insertNodesAtTopOfFile(t,u,r)}else if(Am(t))e.insertNodesAtTopOfFile(t,u,r);else for(const n of u)e.insertStatementsInNewFile(t.fileName,[n],null==(o=fc(n))?void 0:o.getSourceFile())}function qQ(e,t){return xn.assert(e.isTypeOnly),ut(e.getChildAt(0,t),mQ)}function VQ(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}function UQ(e,t,n){return(n?Et:Dt)(e.fileName,t.fileName)&&VQ(e.textSpan,t.textSpan)}function KQ(e){return(t,n)=>UQ(t,n,e)}function WQ(e,t){if(e)for(let n=0;n!!sE(e)||!(KE(e)||VE(e)||UE(e))&&"quit"))}var ZQ=function(){const e=10*X_;let t,n,r,i;c();const o=e=>s(e,17);return{displayParts:()=>{const n=t.length&&t[t.length-1].text;return i>e&&n&&"..."!==n&&(Qa(n.charCodeAt(n.length-1))||t.push(tY(" ",16)),t.push(tY("...",15))),t},writeKeyword:e=>s(e,5),writeOperator:e=>s(e,12),writePunctuation:e=>s(e,15),writeTrailingSemicolon:e=>s(e,15),writeSpace:e=>s(e,16),writeStringLiteral:e=>s(e,8),writeParameter:e=>s(e,13),writeProperty:e=>s(e,14),writeLiteral:e=>s(e,8),writeSymbol:function(n,r){i>e||(a(),i+=n.length,t.push(eY(n,r)))},writeLine:function(){i>e||(i+=1,t.push(hY()),n=!0)},write:o,writeComment:o,getText:()=>"",getTextPos:()=>0,getColumn:()=>0,getLine:()=>0,isAtStartOfLine:()=>!1,hasTrailingWhitespace:()=>!1,hasTrailingComment:()=>!1,rawWrite:vt,getIndent:()=>r,increaseIndent:()=>{r++},decreaseIndent:()=>{r--},clear:c};function a(){if(!(i>e)&&n){const e=$y(r);e&&(i+=e.length,t.push(tY(e,16))),n=!1}}function s(n,r){i>e||(a(),i+=n.length,t.push(tY(n,r)))}function c(){t=[],n=!0,r=0,i=0}}();function eY(e,t){return tY(e,function(e){const t=e.flags;return 3&t?YQ(e)?13:9:4&t||32768&t||65536&t?14:8&t?19:16&t?20:32&t?1:64&t?4:384&t?2:1536&t?11:8192&t?10:262144&t?18:524288&t||2097152&t?0:17}(t))}function tY(e,t){return{text:e,kind:oG[t]}}function nY(){return tY(" ",16)}function rY(e){return tY(Ra(e),5)}function iY(e){return tY(Ra(e),15)}function oY(e){return tY(Ra(e),12)}function aY(e){return tY(e,13)}function sY(e){return tY(e,14)}function cY(e){const t=Ba(e);return void 0===t?lY(e):rY(t)}function lY(e){return tY(e,17)}function uY(e){return tY(e,0)}function _Y(e){return tY(e,18)}function dY(e){return tY(e,24)}function pY(e,t){return{text:e,kind:oG[23],target:{fileName:Sd(t).fileName,textSpan:aQ(t)}}}function fY(e){return tY(e,22)}function mY(e,t){var n;const r=[fY(`{@${HN(e)?"link":GN(e)?"linkcode":"linkplain"} `)];if(e.name){const i=null==t?void 0:t.getSymbolAtLocation(e.name),o=i&&t?CY(i,t):void 0,a=function(e){let t=e.indexOf("://");if(0===t){for(;t"===e[n]&&t--,n++,!t)return n}return 0}(e.text),s=Gd(e.name)+e.text.slice(0,a),c=function(e){let t=0;if(124===e.charCodeAt(t++)){for(;t{e.writeType(t,n,17408|r,i)}))}function bY(e,t,n,r,i=0){return yY((o=>{e.writeSymbol(t,n,r,8|i,o)}))}function xY(e,t,n,r=0){return r|=25632,yY((i=>{e.writeSignature(t,n,r,void 0,i)}))}function SY(e,t){const n=t.getSourceFile();return yY((t=>{nq().writeNode(4,e,n,t)}))}function kY(e){return!!e.parent&&Vl(e.parent)&&e.parent.propertyName===e}function TY(e,t){return Ek(e,t.getScriptKind&&t.getScriptKind(e))}function CY(e,t){let n=e;for(;wY(n)||td(n)&&n.links.target;)n=td(n)&&n.links.target?n.links.target:mx(n,t);return n}function wY(e){return 0!=(2097152&e.flags)}function DY(e,t){return OB(mx(e,t))}function EY(e,t){for(;Qa(e.charCodeAt(t));)t+=1;return t}function PY(e,t){for(;t>-1&&Ya(e.charCodeAt(t));)t-=1;return t+1}function NY(e,t=!0){const n=e&&AY(e);return n&&!t&&MY(n),LT(n,!1)}function FY(e,t,n){let r=n(e);return r?ew(r,e):r=AY(e,n),r&&!t&&MY(r),r}function AY(e,t){const n=t?e=>FY(e,!0,t):NY,r=ZB(e,n,void 0,t?e=>e&&OY(e,!0,t):e=>e&&IY(e),n);return r===e?sI(wD(e)?ew(YC.createStringLiteralFromNode(e),e):TD(e)?ew(YC.createNumericLiteral(e.text,e.numericLiteralFlags),e):YC.cloneNode(e),e):(r.parent=void 0,r)}function IY(e,t=!0){if(e){const n=YC.createNodeArray(e.map((e=>NY(e,t))),e.hasTrailingComma);return sI(n,e),n}return e}function OY(e,t,n){return YC.createNodeArray(e.map((e=>FY(e,t,n))),e.hasTrailingComma)}function MY(e){LY(e),jY(e)}function LY(e){BY(e,1024,JY)}function jY(e){BY(e,2048,Nx)}function RY(e,t){const n=e.getSourceFile();!function(e,t){const n=e.getFullStart(),r=e.getStart();for(let e=n;ee))}function zY(e,t){let n=e;for(let r=1;!Pd(t,n);r++)n=`${e}_${r}`;return n}function $Y(e,t,n,r){let i=0,o=-1;for(const{fileName:a,textChanges:s}of e){xn.assert(a===t);for(const e of s){const{span:t,newText:a}=e,s=WY(a,Fy(n));if(-1!==s&&(o=t.start+i+s,!r))return o;i+=a.length-t.length}}return xn.assert(r),xn.assert(o>=0),o}function qY(e,t,n,r,i){fs(n.text,e.pos,KY(t,n,r,i,yw))}function VY(e,t,n,r,i){ms(n.text,e.end,KY(t,n,r,i,xw))}function UY(e,t,n,r,i){ms(n.text,e.pos,KY(t,n,r,i,yw))}function KY(e,t,n,r,i){return(o,a,s,c)=>{3===s?(o+=2,a-=2):o+=2,i(e,n||s,t.text.slice(o,a),void 0!==r?r:c)}}function WY(e,t){if(an(e,t))return 0;let n=e.indexOf(" "+t);return-1===n&&(n=e.indexOf("."+t)),-1===n&&(n=e.indexOf('"'+t)),-1===n?-1:n+1}function HY(e){return uP(e)&&28===e.operatorToken.kind||HE(e)||(yP(e)||vP(e))&&HE(e.expression)}function GY(e,t,n){const r=ah(e.parent);switch(r.kind){case 214:return t.getContextualType(r,n);case 226:{const{left:i,operatorToken:o,right:a}=r;return QY(o.kind)?t.getTypeAtLocation(e===a?i:a):t.getContextualType(e,n)}case 296:return eZ(r,t);default:return t.getContextualType(e,n)}}function XY(e,t,n){const r=AQ(e,t),i=JSON.stringify(n);return 0===r?`'${By(i).replace(/'/g,(()=>"\\'")).replace(/\\"/g,'"')}'`:i}function QY(e){switch(e){case 37:case 35:case 38:case 36:return!0;default:return!1}}function YY(e){switch(e.kind){case 11:case 15:case 228:case 215:return!0;default:return!1}}function ZY(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()}function eZ(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}var tZ="anonymous function";function nZ(e,t,n,r){const i=n.getTypeChecker();let o=!0;const a=()=>o=!1,s=i.typeToTypeNode(e,t,1,{trackSymbol:(e,t,n)=>(o=o&&0===i.isSymbolAccessible(e,t,n,!1).accessibility,!o),reportInaccessibleThisError:a,reportPrivateInBaseOfClassExpression:a,reportInaccessibleUniqueSymbolError:a,moduleResolverHost:wQ(n,r)});return o?s:void 0}function rZ(e){return 179===e||180===e||181===e||171===e||173===e}function iZ(e){return 262===e||176===e||174===e||177===e||178===e}function oZ(e){return 267===e}function aZ(e){return 243===e||244===e||246===e||251===e||252===e||253===e||257===e||259===e||172===e||265===e||272===e||271===e||278===e||270===e||277===e}var sZ=_n(rZ,iZ,oZ,aZ);function cZ(e,t,n){const r=mc(t,(t=>t.end!==e?"quit":sZ(t.kind)));return!!r&&function(e,t){const n=e.getLastToken(t);if(n&&27===n.kind)return!1;if(rZ(e.kind)){if(n&&28===n.kind)return!1}else if(oZ(e.kind)){const n=De(e.getChildren(t));if(n&&eN(n))return!1}else if(iZ(e.kind)){const n=De(e.getChildren(t));if(n&&zf(n))return!1}else if(!aZ(e.kind))return!1;if(246===e.kind)return!0;const r=DX(e,mc(e,(e=>!e.parent)),t);return!r||20===r.kind||t.getLineAndCharacterOfPosition(e.getEnd()).line!==t.getLineAndCharacterOfPosition(r.getStart(t)).line}(r,n)}function lZ(e){let t=0,n=0;return LI(e,(function r(i){if(aZ(i.kind)){const r=i.getLastToken(e);27===(null==r?void 0:r.kind)?t++:n++}else if(rZ(i.kind)){const r=i.getLastToken(e);27===(null==r?void 0:r.kind)?t++:r&&28!==r.kind&&Xa(e,r.getStart(e)).line!==Xa(e,Gp(e,r.end).start).line&&n++}return t+n>=5||LI(i,r)})),0===t&&n<=1||t/n>.2}function uZ(e,t){return mZ(e,e.getDirectories,t)||[]}function _Z(e,t,n,r,i){return mZ(e,e.readDirectory,t,n,r,i)||u}function dZ(e,t){return mZ(e,e.fileExists,t)}function pZ(e,t){return fZ((()=>zb(t,e)))||!1}function fZ(e){try{return e()}catch{return}}function mZ(e,t,...n){return fZ((()=>t&&t.apply(e,n)))}function gZ(e,t,n){const r=[];return ga(e,(e=>{if(e===n)return!0;const i=Ko(e,"package.json");dZ(t,i)&&r.push(i)})),r}function hZ(e,t){let n;return ga(e,(e=>"node_modules"===e||(n=bq(e,(e=>dZ(t,e)),"package.json"),!!n||void 0))),n}function yZ(e,t){if(!t.fileExists)return[];const n=[];return ga(Ro(e),(e=>{const r=Ko(e,"package.json");if(t.fileExists(r)){const e=vZ(r,t);e&&n.push(e)}})),n}function vZ(e,t){if(!t.readFile)return;const n=["dependencies","devDependencies","optionalDependencies","peerDependencies"],r=Jb(t.readFile(e)||""),i={};if(r)for(const e of n){const t=r[e];if(!t)continue;const n=new Map;for(const e in t)n.set(e,t[e]);i[e]=n}const o=[[1,i.dependencies],[2,i.devDependencies],[8,i.optionalDependencies],[4,i.peerDependencies]];return{...i,parseable:!!r,fileName:e,get:a,has:(e,t)=>!!a(e,t)};function a(e,t=15){for(const[n,r]of o)if(r&&t&n){const t=r.get(e);if(void 0!==t)return t}}}function bZ(e,t,n){const r=(n.getPackageJsonsVisibleToFile&&n.getPackageJsonsVisibleToFile(e.fileName)||yZ(e.fileName,n)).filter((e=>e.parseable));let i,o,a;return{allowsImportingAmbientModule:function(e,t){if(!r.length||!e.valueDeclaration)return!0;if(o){const t=o.get(e);if(void 0!==t)return t}else o=new Map;const n=By(e.getName());if(c(n))return o.set(e,!0),!0;const i=l(e.valueDeclaration.getSourceFile().fileName,t);if(void 0===i)return o.set(e,!0),!0;const a=s(i)||s(n);return o.set(e,a),a},allowsImportingSourceFile:function(e,t){if(!r.length)return!0;if(a){const t=a.get(e);if(void 0!==t)return t}else a=new Map;const n=l(e.fileName,t);if(!n)return a.set(e,!0),!0;const i=s(n);return a.set(e,i),i},allowsImportingSpecifier:function(e){return!(r.length&&!c(e))||(!(!Po(e)&&!wo(e))||s(e))}};function s(e){const t=u(e);for(const e of r)if(e.has(t)||e.has(fR(t)))return!0;return!1}function c(t){return!!(Am(e)&&Im(e)&&fH.nodeCoreModules.has(t)&&(void 0===i&&(i=xZ(e)),i))}function l(r,i){if(!r.includes("node_modules"))return;const o=JR.getNodeModulesPackageName(n.getCompilationSettings(),e,r,i,t);return o?Po(o)||wo(o)?void 0:u(o):void 0}function u(e){const t=$o(gR(e)).slice(1);return an(t[0],"@")?`${t[0]}/${t[1]}`:t[0]}}function xZ(e){return Q(e.imports,(({text:e})=>fH.nodeCoreModules.has(e)))}function SZ(e){return D($o(e),"node_modules")}function kZ(e){return void 0!==e.file&&void 0!==e.start&&void 0!==e.length}function TZ(e,t){const n=Ie(t,aQ(e),mt,Ft);if(n>=0){const r=t[n];return xn.assertEqual(r.file,e.getSourceFile(),"Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"),ut(r,kZ)}}function CZ(e,t){var n;let r=Ie(t,e.start,(e=>e.start),Nt);for(r<0&&(r=~r);(null==(n=t[r-1])?void 0:n.start)===e.start;)r--;const i=[],o=js(e);for(;;){const n=lt(t[r],kZ);if(!n||n.start>o)break;zs(e,n)&&i.push(n),r++}return i}function wZ({startPosition:e,endPosition:t}){return Xs(e,void 0===t?e:t)}function DZ(e,t){return mc(kX(e,t.start),(n=>n.getStart(e)js(t)?"quit":Xu(n)&&VQ(t,aQ(n,e))))}function EZ(e,t,n=mt){return e?ot(e)?n(O(e,t)):t(e,0):void 0}function PZ(e){return ot(e)?Te(e):e}function NZ(e,t){if(AZ(e)){const n=IZ(e);if(n)return n;const r=MZ(OZ(e),t,!1),i=MZ(OZ(e),t,!0);return r===i?r:[r,i]}return e.name}function FZ(e,t,n){return AZ(e)?IZ(e)||MZ(OZ(e),t,!!n):e.name}function AZ(e){return!(33554432&e.flags||"export="!==e.escapedName&&"default"!==e.escapedName)}function IZ(e){return g(e.declarations,(e=>{var t,n,r;return mN(e)?null==(t=lt(fA(e.expression),qD))?void 0:t.text:yN(e)&&2097152===e.symbol.flags?null==(n=lt(e.propertyName,qD))?void 0:n.text:null==(r=lt(Pc(e),qD))?void 0:r.text}))}function OZ(e){var t;return xn.checkDefined(e.parent,`Symbol parent was undefined. Flags: ${xn.formatSymbolFlags(e.flags)}. Declarations: ${null==(t=e.declarations)?void 0:t.map((e=>{const t=xn.formatSyntaxKind(e.kind),n=Mm(e),{expression:r}=e;return(n?"[JS]":"")+t+(r?` (expression: ${xn.formatSyntaxKind(r.kind)})`:"")})).join(", ")}.`)}function MZ(e,t,n){return LZ(Yk(By(e.name)),t,n)}function LZ(e,t,n){const r=Bo(Ht(e,"/index"));let i="",o=!0;const a=r.charCodeAt(0);Ss(a,t)?(i+=String.fromCharCode(a),n&&(i=i.toUpperCase())):o=!1;for(let e=1;ee.length)return!1;for(let i=0;iZP(e)&&pp(e))))}function zZ(e){return!!(65536&lc(e))}function $Z(e,t){return g(e.imports,(e=>{if(fH.nodeCoreModules.has(e.text))return an(e.text,"node:")}))??t.usesUriStyleNodeCoreModules}function qZ(e){return"\n"===e?1:0}function VZ(e){return ot(e)?Yx(tS(e[0]),e.slice(1)):tS(e)}function UZ({options:e},t){const n=!e.semicolons||"ignore"===e.semicolons,r="remove"===e.semicolons||n&&!lZ(t);return{...e,semicolons:r?"remove":"ignore"}}function KZ(e){return 2===e||3===e}function WZ(e,t){return e.isSourceFileFromExternalLibrary(t)||e.isSourceFileDefaultLibrary(t)}function HZ(e,t){const n=new Set,r=new Set,i=new Set;for(const a of t)if(!LN(a)){const t=lh(a.expression);if(Bl(t))switch(t.kind){case 15:case 11:n.add(t.text);break;case 9:r.add(parseInt(t.text));break;case 10:const e=kT(Wt(t.text,"n")?t.text.slice(0,-1):t.text);e&&i.add(ST(e))}else{const t=e.getSymbolAtLocation(a.expression);if(t&&t.valueDeclaration&&$N(t.valueDeclaration)){const n=e.getConstantValue(t.valueDeclaration);void 0!==n&&o(n)}}}return{addValue:o,hasValue:function(e){switch(typeof e){case"string":return n.has(e);case"number":return r.has(e);case"object":return i.has(ST(e))}}};function o(e){switch(typeof e){case"string":n.add(e);break;case"number":r.add(e)}}}function GZ(e,t,n,r){var i;if(!qk("string"==typeof e?e:e.fileName))return!1;const o=t.getCompilerOptions(),a=DS(o),s="string"==typeof e?pV(Yo(e,n.getCurrentDirectory(),Wy(n)),null==(i=t.getPackageJsonInfoCache)?void 0:i.call(t),n,o):e.impliedNodeFormat;if(99===s)return!1;if(1===s)return!0;if(o.verbatimModuleSyntax&&1===a)return!0;if(o.verbatimModuleSyntax&&$S(a))return!1;if("object"==typeof e){if(e.commonJsModuleIndicator)return!0;if(e.externalModuleIndicator)return!1}return r}function XZ(e){switch(e.kind){case 241:case 307:case 268:case 296:return!0;default:return!1}}function QZ(e,t,n,r){var i;const o=fV(e,null==(i=n.getPackageJsonInfoCache)?void 0:i.call(n),r,n.getCompilerOptions());let a,s;return"object"==typeof o&&(a=o.impliedNodeFormat,s=o.packageJsonScope),{path:Yo(e,n.getCurrentDirectory(),n.getCanonicalFileName),fileName:e,externalModuleIndicator:99===t||void 0,commonJsModuleIndicator:1===t||void 0,impliedNodeFormat:a,packageJsonScope:s,statements:u,imports:u}}var YZ=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.Namespace=2]="Namespace",e[e.CommonJS=3]="CommonJS",e))(YZ||{}),ZZ=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals",e[e.UMD=3]="UMD",e))(ZZ||{});function e0(e){let t=1;const n=et(),r=new Map,i=new Map;let o;const a={isUsableByFile:e=>e===o,isEmpty:()=>!n.size,clear:()=>{n.clear(),r.clear(),o=void 0},add:(e,s,c,l,u,_,d,p)=>{let f;if(e!==o&&(a.clear(),o=e),u){const t=XT(u.fileName);if(t){const{topLevelNodeModulesIndex:n,topLevelPackageNameIndex:r,packageRootIndex:o}=t;if(f=hR(gR(u.fileName.substring(r+1,o))),an(e,u.path.substring(0,n))){const e=i.get(f),t=u.fileName.substring(0,r+1);e?n>e.indexOf(Ij)&&i.set(f,t):i.set(f,t)}}}const m=1===_&&Ab(s)||s,g=0===_||nd(m)?vc(c):NZ(m,void 0),h="string"==typeof g?g:g[0],y="string"==typeof g?void 0:g[1],v=By(l.name),b=t++,x=mx(s,p),S=33554432&s.flags?void 0:s,k=33554432&l.flags?void 0:l;S&&k||r.set(b,[s,l]),n.add(function(e,t,n,r){const i=n||"";return`${e.length} ${OB(mx(t,r))} ${e} ${i}`}(h,s,Os(v)?void 0:v,p),{id:b,symbolTableKey:c,symbolName:h,capitalizedSymbolName:y,moduleName:v,moduleFile:u,moduleFileName:null==u?void 0:u.fileName,packageName:f,exportKind:_,targetFlags:x.flags,isFromPackageJson:d,symbol:S,moduleSymbol:k})},get:(e,t)=>{if(e!==o)return;const r=n.get(t);return null==r?void 0:r.map(s)},search:(t,r,a,c)=>{if(t===o)return ld(n,((t,n)=>{const{symbolName:o,ambientModuleName:l}=function(e){const t=e.indexOf(" "),n=e.indexOf(" ",t+1),r=parseInt(e.substring(0,t),10),i=e.substring(n+1),o=i.substring(0,r),a=i.substring(r+1);return{symbolName:o,ambientModuleName:""===a?void 0:a}}(n),u=r&&t[0].capitalizedSymbolName||o;if(a(u,t[0].targetFlags)){const r=t.map(s).filter(((n,r)=>function(t,n){if(!n||!t.moduleFileName)return!0;const r=e.getGlobalTypingsCacheLocation();if(r&&an(t.moduleFileName,r))return!0;const o=i.get(n);return!o||an(t.moduleFileName,o)}(n,t[r].packageName)));if(r.length){const e=c(r,u,!!l,n);if(void 0!==e)return e}}}))},releaseSymbols:()=>{r.clear()},onFileChanged:(e,t,n)=>!(c(e)&&c(t)||(o&&o!==t.path||n&&xZ(e)!==xZ(t)||!se(e.moduleAugmentations,t.moduleAugmentations)||!function(e,t){if(!se(e.ambientModuleNames,t.ambientModuleNames))return!1;let n=-1,r=-1;for(const i of t.ambientModuleNames){const o=e=>lp(e)&&e.name.text===i;if(n=T(e.statements,o,n+1),r=T(t.statements,o,r+1),e.statements[n]!==t.statements[r])return!1}return!0}(e,t)?(a.clear(),0):(o=t.path,1)))};return xn.isDebugging&&Object.defineProperty(a,"__cache",{value:n}),a;function s(t){if(t.symbol&&t.moduleSymbol)return t;const{id:n,exportKind:i,targetFlags:o,isFromPackageJson:a,moduleFileName:s}=t,[c,l]=r.get(n)||u;if(c&&l)return{symbol:c,moduleSymbol:l,moduleFileName:s,exportKind:i,targetFlags:o,isFromPackageJson:a};const _=(a?e.getPackageJsonAutoImportProvider():e.getCurrentProgram()).getTypeChecker(),d=t.moduleSymbol||l||xn.checkDefined(t.moduleFile?_.getMergedSymbol(t.moduleFile.symbol):_.tryFindAmbientModule(t.moduleName)),p=t.symbol||c||xn.checkDefined(2===i?_.resolveExternalModuleSymbol(d):_.tryGetMemberInModuleExportsAndProperties(vc(t.symbolTableKey),d),`Could not find symbol '${t.symbolName}' by key '${t.symbolTableKey}' in module ${d.name}`);return r.set(n,[p,d]),{symbol:p,moduleSymbol:d,moduleFileName:s,exportKind:i,targetFlags:o,isFromPackageJson:a}}function c(e){return!(e.commonJsModuleIndicator||e.externalModuleIndicator||e.moduleAugmentations||e.ambientModuleNames)}}function t0(e,t,n,r,i,o,a){var s;if(t===n)return!1;const c=null==a?void 0:a.get(t.path,n.path,r,{});if(void 0!==(null==c?void 0:c.isBlockedByPackageJsonDependencies))return!c.isBlockedByPackageJsonDependencies;const l=Wy(o),u=null==(s=o.getGlobalTypingsCacheLocation)?void 0:s.call(o),_=!!JR.forEachFileNameOfModule(t.fileName,n.fileName,o,!1,(r=>{const i=e.getSourceFile(r);return(i===n||!i)&&function(e,t,n,r){const i=ga(t,(e=>"node_modules"===Bo(e)?e:void 0)),o=i&&Ro(n(i));return void 0===o||an(n(e),o)||!!r&&an(n(r),o)}(t.fileName,r,l,u)}));if(i){const e=_&&i.allowsImportingSourceFile(n,o);return null==a||a.setBlockedByPackageJsonDependencies(t.path,n.path,r,{},!e),e}return _}function n0(e,t,n,r,i){var o,a;const s=Ky(t),c=n.autoImportFileExcludePatterns&&q(n.autoImportFileExcludePatterns,(e=>{const t=xk(e,"","exclude");return t?Tk(t,s):void 0}));r0(e.getTypeChecker(),e.getSourceFiles(),c,t,((t,n)=>i(t,n,e,!1)));const l=r&&(null==(o=t.getPackageJsonAutoImportProvider)?void 0:o.call(t));if(l){const n=Yn(),r=e.getTypeChecker();r0(l.getTypeChecker(),l.getSourceFiles(),c,t,((t,n)=>{(n&&!e.getSourceFile(n.fileName)||!n&&!r.resolveName(t.name,void 0,1536,!1))&&i(t,n,l,!0)})),null==(a=t.log)||a.call(t,"forEachExternalModuleToImportFrom autoImportProvider: "+(Yn()-n))}}function r0(e,t,n,r,i){var o,a;const s=null==(o=r.getSymlinkCache)?void 0:o.call(r).getSymlinkedDirectoriesByRealpath(),c=n&&(({fileName:e,path:t})=>{if(n.some((t=>t.test(e))))return!0;if((null==s?void 0:s.size)&&Oj(e)){let r=Ro(e);return ga(Ro(t),(t=>{const i=s.get(ea(t));if(i)return i.some((t=>n.some((n=>n.test(e.replace(r,t))))));r=Ro(r)}))??!1}return!1});for(const t of e.getAmbientModules())t.name.includes("*")||n&&(null==(a=t.declarations)?void 0:a.every((e=>c(e.getSourceFile()))))||i(t,void 0);for(const n of t)Zp(n)&&!(null==c?void 0:c(n))&&i(e.getMergedSymbol(n.symbol),n)}function i0(e,t,n,r,i){var o,a,s,c,l;const u=Yn();null==(o=t.getPackageJsonAutoImportProvider)||o.call(t);const _=(null==(a=t.getCachedExportInfoMap)?void 0:a.call(t))||e0({getCurrentProgram:()=>n,getPackageJsonAutoImportProvider:()=>{var e;return null==(e=t.getPackageJsonAutoImportProvider)?void 0:e.call(t)},getGlobalTypingsCacheLocation:()=>{var e;return null==(e=t.getGlobalTypingsCacheLocation)?void 0:e.call(t)}});if(_.isUsableByFile(e.path))return null==(s=t.log)||s.call(t,"getExportInfoMap: cache hit"),_;null==(c=t.log)||c.call(t,"getExportInfoMap: cache miss or empty; calculating new results");let d=0;try{n0(n,t,r,!0,((t,n,r,o)=>{++d%100==0&&(null==i||i.throwIfCancellationRequested());const a=new Map,s=r.getTypeChecker(),c=o0(t,s);c&&a0(c.symbol,s)&&_.add(e.path,c.symbol,1===c.exportKind?"default":"export=",t,n,c.exportKind,o,s),s.forEachExportAndPropertyOfModule(t,((r,i)=>{r!==(null==c?void 0:c.symbol)&&a0(r,s)&&Fx(a,i)&&_.add(e.path,r,i,t,n,0,o,s)}))}))}catch(e){throw _.clear(),e}return null==(l=t.log)||l.call(t,`getExportInfoMap: done in ${Yn()-u} ms`),_}function o0(e,t){const n=t.resolveExternalModuleSymbol(e);if(n!==e)return{symbol:n,exportKind:2};const r=t.tryGetMemberInModuleExports("default",e);return r?{symbol:r,exportKind:1}:void 0}function a0(e,t){return!(t.isUndefinedSymbol(e)||t.isUnknownSymbol(e)||Yh(e)||Zh(e))}function s0(e,t,n,r,i){let o,a=e;for(;a;){const e=IZ(a);if(e){const t=i(e);if(t)return t}if("default"!==a.escapedName&&"export="!==a.escapedName){const e=i(a.name);if(e)return e}o=ue(o,a),a=2097152&a.flags?t.getImmediateAliasedSymbol(a):void 0}for(const e of o??u)if(e.parent&&nd(e.parent)){const t=i(MZ(e.parent,wS(n),r));if(t)return t}}function c0(){const e=Cs(99,!1);function t(t,n,r){let i=0,o=0;const a=[],{prefix:s,pushTemplate:c}=function(e){switch(e){case 3:return{prefix:'"\\\n'};case 2:return{prefix:"'\\\n"};case 1:return{prefix:"/*\n"};case 4:return{prefix:"`\n"};case 5:return{prefix:"}\n",pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return xn.assertNever(e)}}(n);t=s+t;const l=s.length;c&&a.push(16),e.setText(t);let u=0;const _=[];let d=0;do{i=e.scan(),Rh(i)||(p(),o=i);const n=e.getTokenEnd();if(d0(e.getTokenStart(),n,l,f0(i),_),n>=t.length){const t=_0(e,i,we(a));void 0!==t&&(u=t)}}while(1!==i);function p(){switch(i){case 44:case 69:u0[o]||14!==e.reScanSlashToken()||(i=14);break;case 30:80===o&&d++;break;case 32:d>0&&d--;break;case 133:case 154:case 150:case 136:case 155:d>0&&!r&&(i=80);break;case 16:a.push(i);break;case 19:a.length>0&&a.push(i);break;case 20:if(a.length>0){const t=we(a);16===t?(i=e.reScanTemplateToken(!1),18===i?a.pop():xn.assertEqual(i,17,"Should have been a template middle.")):(xn.assertEqual(t,19,"Should have been an open brace"),a.pop())}break;default:if(!Ph(i))break;(25===o||Ph(o)&&Ph(i)&&!function(e,t){if(!ZX(e))return!0;switch(t){case 139:case 153:case 137:case 126:case 129:return!0;default:return!1}}(o,i))&&(i=80)}}return{endOfLineState:u,spans:_}}return{getClassificationsForLine:function(e,n,r){return function(e,t){const n=[],r=e.spans;let i=0;for(let e=0;e=0){const e=t-i;e>0&&n.push({length:e,classification:4})}n.push({length:o,classification:p0(a)}),i=t+o}const o=t.length-i;return o>0&&n.push({length:o,classification:4}),{entries:n,finalLexState:e.endOfLineState}}(t(e,n,r),e)},getEncodedLexicalClassifications:t}}var l0,u0=Ke([80,11,9,10,14,110,46,47,22,24,20,112,97],(e=>e),(()=>!0));function _0(e,t,n){switch(t){case 11:{if(!e.isUnterminated())return;const t=e.getTokenText(),n=t.length-1;let r=0;for(;92===t.charCodeAt(n-r);)r++;if(0==(1&r))return;return 34===t.charCodeAt(0)?3:2}case 3:return e.isUnterminated()?1:void 0;default:if(zl(t)){if(!e.isUnterminated())return;switch(t){case 18:return 5;case 15:return 4;default:return xn.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+t)}}return 16===n?6:void 0}}function d0(e,t,n,r,i){if(8===r)return;0===e&&n>0&&(e+=n);const o=t-e;o>0&&i.push(e-n,o,r)}function p0(e){switch(e){case 1:return 3;case 3:return 1;case 4:return 6;case 25:return 7;case 5:return 2;case 6:return 8;case 8:return 4;case 10:return 0;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return 5;default:return}}function f0(e){if(Ph(e))return 3;if(function(e){switch(e){case 42:case 44:case 45:case 40:case 41:case 48:case 49:case 50:case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:case 35:case 36:case 37:case 38:case 51:case 53:case 52:case 56:case 57:case 75:case 74:case 79:case 71:case 72:case 73:case 65:case 66:case 67:case 69:case 70:case 64:case 28:case 61:case 76:case 77:case 78:return!0;default:return!1}}(e)||function(e){switch(e){case 40:case 41:case 55:case 54:case 46:case 47:return!0;default:return!1}}(e))return 5;if(e>=19&&e<=79)return 10;switch(e){case 9:return 4;case 10:return 25;case 11:return 6;case 14:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;default:return zl(e)?6:2}}function m0(e,t,n,r,i){return b0(h0(e,t,n,r,i))}function g0(e,t){switch(t){case 267:case 263:case 264:case 262:case 231:case 218:case 219:e.throwIfCancellationRequested()}}function h0(e,t,n,r,i){const o=[];return n.forEachChild((function a(s){if(s&&Us(i,s.pos,s.getFullWidth())){if(g0(t,s.kind),qD(s)&&!Nd(s)&&r.has(s.escapedText)){const t=e.getSymbolAtLocation(s),r=t&&y0(t,yG(s),e);r&&function(e,t,n){const r=t-e;xn.assert(r>0,`Classification had non-positive length of ${r}`),o.push(e),o.push(r),o.push(n)}(s.getStart(n),s.getEnd(),r)}s.forEachChild(a)}})),{spans:o,endOfLineState:0}}function y0(e,t,n){const r=e.getFlags();return 0==(2885600&r)?void 0:32&r?11:384&r?12:524288&r?16:1536&r?4&t||1&t&&function(e){return Q(e.declarations,(e=>ZP(e)&&1===DR(e)))}(e)?14:void 0:2097152&r?y0(n.getAliasedSymbol(e),t,n):2&t?64&r?13:262144&r?15:void 0:void 0}function v0(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function b0(e){xn.assert(e.spans.length%3==0);const t=e.spans,n=[];for(let e=0;e])*)(\/>)?)?/im.exec(i);if(!o)return!1;if(!o[3]||!(o[3]in Ki))return!1;let a=e;u(a,o[1].length),a+=o[1].length,c(a,o[2].length,10),a+=o[2].length,c(a,o[3].length,21),a+=o[3].length;const s=o[4];let l=a;for(;;){const e=r.exec(s);if(!e)break;const t=a+e.index+e[1].length;t>l&&(u(l,t-l),l=t),c(l,e[2].length,22),l+=e[2].length,e[3].length&&(u(l,e[3].length),l+=e[3].length),c(l,e[4].length,5),l+=e[4].length,e[5].length&&(u(l,e[5].length),l+=e[5].length),c(l,e[6].length,24),l+=e[6].length}a+=o[4].length,a>l&&u(l,a-l),o[5]&&(c(a,o[5].length,10),a+=o[5].length);const _=e+n;return a<_&&u(a,_-a),!0}(r,i))return;u(r,i)}function u(e,t){c(e,t,1)}function _(e){for(const t of e.getChildren())g(t)}function d(e,t,n){let r;for(r=t;r=0),i>0){const t=n||m(e.kind,e);t&&c(r,i,t)}return!0}function m(e,t){if(Ph(e))return 3;if((30===e||32===e)&&t&&WX(t.parent))return 10;if(Nh(e)){if(t){const n=t.parent;if(64===e&&(260===n.kind||172===n.kind||169===n.kind||291===n.kind))return 5;if(226===n.kind||224===n.kind||225===n.kind||227===n.kind)return 5}return 10}if(9===e)return 4;if(10===e)return 25;if(11===e)return t&&291===t.parent.kind?24:6;if(14===e)return 6;if(zl(e))return 6;if(12===e)return 23;if(80===e){if(t){switch(t.parent.kind){case 263:return t.parent.name===t?11:void 0;case 168:return t.parent.name===t?15:void 0;case 264:return t.parent.name===t?13:void 0;case 266:return t.parent.name===t?12:void 0;case 267:return t.parent.name===t?14:void 0;case 169:return t.parent.name===t?yv(t)?3:17:void 0}if(Dl(t.parent))return 3}return 2}}function g(n){if(n&&Ks(r,i,n.pos,n.getFullWidth())){g0(e,n.kind);for(const e of n.getChildren(t))f(e)||g(e)}}}function k0(e){return!!e.sourceFile}function T0(e,t,n){return C0(e,t,n)}function C0(e,t="",n,r){const i=new Map,o=tn(!!e);function a(e){return"function"==typeof e.getCompilationSettings?e.getCompilationSettings():e}function s(e,t,n,r,i,o,a,s){return u(e,t,n,r,i,o,!0,a,s)}function c(e,t,n,r,i,o,s,c){return u(e,t,a(n),r,i,o,!1,s,c)}function l(e,t){const n=k0(e)?e:e.get(xn.checkDefined(t,"If there are more than one scriptKind's for same document the scriptKind should be provided"));return xn.assert(void 0===t||!n||n.sourceFile.scriptKind===t,`Script kind should match provided ScriptKind:${t} and sourceFile.scriptKind: ${null==n?void 0:n.sourceFile.scriptKind}, !entry: ${!n}`),n}function u(e,t,o,s,c,u,_,d,p){var f,m,g,h;d=Ek(e,d);const y=a(o),v=o===y?void 0:o,b=6===d?100:wS(y),x="object"==typeof p?p:{languageVersion:b,impliedNodeFormat:v&&pV(t,null==(h=null==(g=null==(m=null==(f=v.getCompilerHost)?void 0:f.call(v))?void 0:m.getModuleResolutionCache)?void 0:g.call(m))?void 0:h.getPackageJsonInfoCache(),v,y),setExternalModuleIndicator:TS(y),jsDocParsingMode:n};x.languageVersion=b,xn.assertEqual(n,x.jsDocParsingMode);const S=i.size,k=D0(s,x.impliedNodeFormat),T=K(i,k,(()=>new Map));if(or){i.size>S&&or.instant(or.Phase.Session,"createdDocumentRegistryBucket",{configFilePath:y.configFilePath,key:k});const e=!QI(t)&&ld(i,((e,n)=>n!==k&&e.has(t)&&n));e&&or.instant(or.Phase.Session,"documentRegistryBucketOverlap",{path:t,key1:e,key2:k})}const C=T.get(t);let w=C&&l(C,d);if(!w&&r){const e=r.getDocument(k,t);e&&e.scriptKind===d&&e.text===yQ(c)&&(xn.assert(_),w={sourceFile:e,languageServiceRefCount:0},D())}if(w)w.sourceFile.version!==u&&(w.sourceFile=D7(w.sourceFile,c,u,c.getChangeRange(w.sourceFile.scriptSnapshot)),r&&r.setDocument(k,t,w.sourceFile)),_&&w.languageServiceRefCount++;else{const n=w7(e,c,x,u,!1,d);r&&r.setDocument(k,t,n),w={sourceFile:n,languageServiceRefCount:1},D()}return xn.assert(0!==w.languageServiceRefCount),w.sourceFile;function D(){if(C)if(k0(C)){const e=new Map;e.set(C.sourceFile.scriptKind,C),e.set(d,w),T.set(t,e)}else C.set(d,w);else T.set(t,w)}}function _(e,t,n,r){const o=xn.checkDefined(i.get(D0(t,r))),a=o.get(e),s=l(a,n);s.languageServiceRefCount--,xn.assert(s.languageServiceRefCount>=0),0===s.languageServiceRefCount&&(k0(a)?o.delete(e):(a.delete(n),1===a.size&&o.set(e,h(a.values(),mt))))}return{acquireDocument:function(e,n,r,i,c,l){return s(e,Yo(e,t,o),n,w0(a(n)),r,i,c,l)},acquireDocumentWithKey:s,updateDocument:function(e,n,r,i,s,l){return c(e,Yo(e,t,o),n,w0(a(n)),r,i,s,l)},updateDocumentWithKey:c,releaseDocument:function(e,n,r,i){return _(Yo(e,t,o),w0(n),r,i)},releaseDocumentWithKey:_,getKeyForCompilationSettings:w0,getDocumentRegistryBucketKeyWithMode:D0,reportStats:function(){const e=$e(i.keys()).filter((e=>e&&"_"===e.charAt(0))).map((e=>{const t=i.get(e),n=[];return t.forEach(((e,t)=>{k0(e)?n.push({name:t,scriptKind:e.sourceFile.scriptKind,refCount:e.languageServiceRefCount}):e.forEach(((e,r)=>n.push({name:t,scriptKind:r,refCount:e.languageServiceRefCount})))})),n.sort(((e,t)=>t.refCount-e.refCount)),{bucket:e,sourceFiles:n}}));return JSON.stringify(e,void 0,2)},getBuckets:()=>i}}function w0(e){return lj(e,CO)}function D0(e,t){return t?`${e}|${t}`:e}function E0(e,t,n,r,i,o,a){const s=Ky(r),c=tn(s),l=P0(t,n,c,a),u=P0(n,t,c,a);return r_e.ChangeTracker.with({host:r,formatContext:i,preferences:o},(i=>{!function(e,t,n,r,i,o,a){const{configFile:s}=e.getCompilerOptions();if(!s)return;const c=Ro(s.fileName),l=Hf(s);function u(e){const t=WE(e.initializer)?e.initializer.elements:[e.initializer];let n=!1;for(const e of t)n=_(e)||n;return n}function _(e){if(!wD(e))return!1;const r=N0(c,e.text),i=n(r);return void 0!==i&&(t.replaceRangeWithText(s,O0(e,s),d(i)),!0)}function d(e){return da(c,e,!a)}l&&M0(l,((e,n)=>{switch(n){case"files":case"include":case"exclude":{if(u(e)||"include"!==n||!WE(e.initializer))return;const l=q(e.initializer.elements,(e=>wD(e)?e.text:void 0));if(0===l.length)return;const _=kk(c,[],l,a,o);return void(Tk(xn.checkDefined(_.includeFilePattern),a).test(r)&&!Tk(xn.checkDefined(_.includeFilePattern),a).test(i)&&t.insertNodeAfter(s,De(e.initializer.elements),YC.createStringLiteral(d(i))))}case"compilerOptions":return void M0(e.initializer,((e,t)=>{const n=GO(t);xn.assert("listOrElement"!==(null==n?void 0:n.type)),n&&(n.isFilePath||"list"===n.type&&n.element.isFilePath)?u(e):"paths"===t&&M0(e.initializer,(e=>{if(WE(e.initializer))for(const t of e.initializer.elements)_(t)}))}))}}))}(e,i,l,t,n,r.getCurrentDirectory(),s),function(e,t,n,r,i,o){const a=e.getSourceFiles();for(const s of a){const c=n(s.fileName),l=c??s.fileName,u=Ro(l),_=r(s.fileName),d=_||s.fileName,p=Ro(d),f=void 0!==c||void 0!==_;I0(s,t,(e=>{if(!Po(e))return;const t=N0(p,e),r=n(t);return void 0===r?void 0:ta(da(u,r,o))}),(t=>{const r=e.getTypeChecker().getSymbolAtLocation(t);if((null==r?void 0:r.declarations)&&r.declarations.some((e=>sp(e))))return;const o=void 0!==_?A0(t,Sj(t.text,d,e.getCompilerOptions(),i),n,a):F0(r,t,s,e,i,n);return void 0!==o&&(o.updated||f&&Po(t.text))?JR.updateModuleSpecifier(e.getCompilerOptions(),s,l,o.newFileName,CQ(e,i),t.text):void 0}))}}(e,i,l,u,r,c)}))}function P0(e,t,n,r){const i=n(e);return e=>{const o=r&&r.tryGetSourcePosition({fileName:e,pos:0}),a=function(e){if(n(e)===i)return t;const r=ak(e,i,n);return void 0===r?void 0:t+"/"+r}(o?o.fileName:e);return o?void 0===a?void 0:function(e,t,n,r){const i=fa(e,t,r);return N0(Ro(n),i)}(o.fileName,a,e,n):a}}function N0(e,t){return ta(function(e,t){return Xo(Ko(e,t))}(e,t))}function F0(e,t,n,r,i,o){if(e){const t=S(e.declarations,qN).fileName,n=o(t);return void 0===n?{newFileName:t,updated:!1}:{newFileName:n,updated:!0}}{const e=r.getModeForUsageLocation(n,t);return A0(t,i.resolveModuleNameLiterals||!i.resolveModuleNames?r.getResolvedModuleFromModuleSpecifier(t,n):i.getResolvedModuleWithFailedLookupLocationsFromCache&&i.getResolvedModuleWithFailedLookupLocationsFromCache(t.text,n.fileName,e),o,r.getSourceFiles())}}function A0(e,t,n,r){if(!t)return;if(t.resolvedModule){const e=o(t.resolvedModule.resolvedFileName);if(e)return e}return f(t.failedLookupLocations,(function(e){const t=n(e);return t&&S(r,(e=>e.fileName===t))?i(e):void 0}))||Po(e.text)&&f(t.failedLookupLocations,i)||t.resolvedModule&&{newFileName:t.resolvedModule.resolvedFileName,updated:!1};function i(e){return Wt(e,"/package.json")?void 0:o(e)}function o(e){const t=n(e);return t&&{newFileName:t,updated:!0}}}function I0(e,t,n,r){for(const r of e.referencedFiles||u){const i=n(r.fileName);void 0!==i&&i!==e.text.slice(r.pos,r.end)&&t.replaceRangeWithText(e,r,i)}for(const n of e.imports){const i=r(n);void 0!==i&&i!==n.text&&t.replaceRangeWithText(e,O0(n,e),i)}}function O0(e,t){return qb(e.getStart(t)+1,e.end-1)}function M0(e,t){if(HE(e))for(const n of e.properties)BN(n)&&wD(n.name)&&t(n,n.name.text)}(e=>{function t(e,t){return{fileName:t.fileName,textSpan:aQ(e,t),kind:"none"}}function n(e){return qP(e)?[e]:VP(e)?Z(e.catchClause?n(e.catchClause):e.tryBlock&&n(e.tryBlock),e.finallyBlock&&n(e.finallyBlock)):cu(e)?void 0:i(e,n)}function r(e){return Nl(e)?[e]:cu(e)?void 0:i(e,r)}function i(e,t){const n=[];return e.forEachChild((e=>{const r=t(e);void 0!==r&&n.push(...at(r))})),n}function o(e,t){const n=a(t);return!!n&&n===e}function a(e){return mc(e,(t=>{switch(t.kind){case 255:if(251===e.kind)return!1;case 248:case 249:case 250:case 247:case 246:return!e.label||function(e,t){return!!mc(e.parent,(e=>$P(e)?e.label.escapedText===t:"quit"))}(t,e.label.escapedText);default:return cu(t)&&"quit"}}))}function s(e,t,...n){return!(!t||!D(n,t.kind)||(e.push(t),0))}function c(e){const t=[];if(s(t,e.getFirstToken(),99,117,92)&&246===e.kind){const n=e.getChildren();for(let e=n.length-1;e>=0&&!s(t,n[e],117);e--);}return f(r(e.statement),(n=>{o(e,n)&&s(t,n.getFirstToken(),83,88)})),t}function l(e){const t=a(e);if(t)switch(t.kind){case 248:case 249:case 250:case 246:case 247:return c(t);case 255:return u(t)}}function u(e){const t=[];return s(t,e.getFirstToken(),109),f(e.caseBlock.clauses,(n=>{s(t,n.getFirstToken(),84,90),f(r(n),(n=>{o(e,n)&&s(t,n.getFirstToken(),83)}))})),t}function _(e,t){const n=[];return s(n,e.getFirstToken(),113),e.catchClause&&s(n,e.catchClause.getFirstToken(),85),e.finallyBlock&&s(n,uX(e,98,t),98),n}function d(e,t){const r=function(e){let t=e;for(;t.parent;){const e=t.parent;if(zf(e)||307===e.kind)return e;if(VP(e)&&e.tryBlock===t&&e.catchClause)return t;t=e}}(e);if(!r)return;const i=[];return f(n(r),(e=>{i.push(uX(e,111,t))})),zf(r)&&Pf(r,(e=>{i.push(uX(e,107,t))})),i}function p(e,t){const r=Qf(e);if(!r)return;const i=[];return Pf(ut(r.body,DP),(e=>{i.push(uX(e,107,t))})),f(n(r.body),(e=>{i.push(uX(e,111,t))})),i}function m(e){const t=Qf(e);if(!t)return;const n=[];return t.modifiers&&t.modifiers.forEach((e=>{s(n,e,134)})),LI(t,(e=>{g(e,(e=>{sP(e)&&s(n,e.getFirstToken(),135)}))})),n}function g(e,t){t(e),cu(e)||gu(e)||XP(e)||ZP(e)||QP(e)||wu(e)||LI(e,(e=>g(e,t)))}e.getDocumentHighlights=function(e,n,r,i,o){const a=xX(r,i);if(a.parent&&(CN(a.parent)&&a.parent.tagName===a||wN(a.parent))){const{openingElement:e,closingElement:n}=a.parent.parent,i=[e,n].map((({tagName:e})=>t(e,r)));return[{fileName:r.fileName,highlightSpans:i}]}return function(e,t,n,r,i){const o=new Set(i.map((e=>e.fileName))),a=Rse.getReferenceEntriesForNode(e,t,n,i,r,void 0,o);if(!a)return;const s=We(a.map(Rse.toHighlightSpan),(e=>e.fileName),(e=>e.span)),c=tn(n.useCaseSensitiveFileNames());return $e(V(s.entries(),(([e,t])=>{if(!o.has(e)){if(!n.redirectTargetsMap.has(Yo(e,n.getCurrentDirectory(),c)))return;const t=n.getSourceFile(e);e=S(i,(e=>!!e.redirectInfo&&e.redirectInfo.redirectTarget===t)).fileName,xn.assert(o.has(e))}return{fileName:e,highlightSpans:t}})))}(i,a,e,n,o)||function(e,n){const r=function(e,n){switch(e.kind){case 101:case 93:return FP(e.parent)?function(e,n){const r=function(e,t){const n=[];for(;FP(e.parent)&&e.parent.elseStatement===e;)e=e.parent;for(;;){const r=e.getChildren(t);s(n,r[0],101);for(let e=r.length-1;e>=0&&!s(n,r[e],93);e--);if(!e.elseStatement||!FP(e.elseStatement))break;e=e.elseStatement}return n}(e,n),i=[];for(let e=0;e=t.end;e--)if(!Ya(n.text.charCodeAt(e))){a=!1;break}if(a){i.push({fileName:n.fileName,textSpan:Xs(t.getStart(),o.end),kind:"reference"}),e++;continue}}i.push(t(r[e],n))}return i}(e.parent,n):void 0;case 107:return o(e.parent,BP,p);case 111:return o(e.parent,qP,d);case 113:case 85:case 98:return o(85===e.kind?e.parent.parent:e.parent,VP,_);case 109:return o(e.parent,zP,u);case 84:case 90:return LN(e.parent)||MN(e.parent)?o(e.parent.parent.parent,zP,u):void 0;case 83:case 88:return o(e.parent,Nl,l);case 99:case 117:case 92:return o(e.parent,(e=>Zu(e,!0)),c);case 137:return i(fE,[137]);case 139:case 153:return i(hu,[139,153]);case 135:return o(e.parent,sP,m);case 134:return a(m(e));case 127:return a(function(e){const t=Qf(e);if(!t)return;const n=[];return LI(t,(e=>{g(e,(e=>{pP(e)&&s(n,e.getFirstToken(),127)}))})),n}(e));case 103:case 147:return;default:return tu(e.kind)&&(h_(e.parent)||EP(e.parent))?a((r=e.kind,q(function(e,t){const n=e.parent;switch(n.kind){case 268:case 307:case 241:case 296:case 297:return 64&t&&GP(e)?[...e.members,e]:n.statements;case 176:case 174:case 262:return[...n.parameters,...gu(n.parent)?n.parent.members:[]];case 263:case 231:case 264:case 187:const r=n.members;if(15&t){const e=S(n.members,fE);if(e)return[...r,...e.parameters]}else if(64&t)return[...r,n];return r;case 210:return;default:xn.assertNever(n,"Invalid container kind.")}}(e.parent,ob(r)),(e=>zQ(e,r))))):void 0}var r;function i(t,r){return o(e.parent,t,(e=>{var i;return q(null==(i=lt(e,p_))?void 0:i.symbol.declarations,(e=>t(e)?S(e.getChildren(n),(e=>D(r,e.kind))):void 0))}))}function o(e,t,r){return t(e)?a(r(e,n)):void 0}function a(e){return e&&e.map((e=>t(e,n)))}}(e,n);return r&&[{fileName:n.fileName,highlightSpans:r}]}(a,r)}})(l0||(l0={}));var L0=(e=>(e[e.exact=0]="exact",e[e.prefix=1]="prefix",e[e.substring=2]="substring",e[e.camelCase=3]="camelCase",e))(L0||{});function j0(e,t){return{kind:e,isCaseSensitive:t}}function R0(e){const t=new Map,n=e.trim().split(".").map((e=>{return{totalTextChunk:Q0(t=e.trim()),subWordTextChunks:X0(t)};var t}));return 1===n.length&&""===n[0].totalTextChunk.text?{getMatchForLastSegmentOfPattern:()=>j0(2,!0),getFullMatch:()=>j0(2,!0),patternContainsDots:!1}:n.some((e=>!e.subWordTextChunks.length))?void 0:{getFullMatch:(e,r)=>function(e,t,n,r){if(!z0(t,De(n),r))return;if(n.length-1>e.length)return;let i;for(let t=n.length-2,o=e.length-1;t>=0;t-=1,o-=1)i=$0(i,z0(e[o],n[t],r));return i}(e,r,n,t),getMatchForLastSegmentOfPattern:e=>z0(e,De(n),t),patternContainsDots:n.length>1}}function B0(e,t){let n=t.get(e);return n||t.set(e,n=Z0(e)),n}function J0(e,t,n){const r=function(e,t){const n=e.length-t.length;for(let r=0;r<=n;r++)if(a1(t,((t,n)=>H0(e.charCodeAt(n+r))===t)))return r;return-1}(e,t.textLowerCase);if(0===r)return j0(t.text.length===e.length?0:1,an(e,t.text));if(t.isLowerCase){if(-1===r)return;const i=B0(e,n);for(const n of i)if(V0(e,n,t.text,!0))return j0(2,V0(e,n,t.text,!1));if(t.text.length0)return j0(2,!0);if(t.characterSpans.length>0){const r=B0(e,n),i=!!U0(e,r,t,!1)||!U0(e,r,t,!0)&&void 0;if(void 0!==i)return j0(3,i)}}}function z0(e,t,n){if(a1(t.totalTextChunk.text,(e=>32!==e&&42!==e))){const r=J0(e,t.totalTextChunk,n);if(r)return r}const r=t.subWordTextChunks;let i;for(const t of r)i=$0(i,J0(e,t,n));return i}function $0(e,t){return At([e,t],q0)}function q0(e,t){return void 0===e?1:void 0===t?-1:Nt(e.kind,t.kind)||Vt(!e.isCaseSensitive,!t.isCaseSensitive)}function V0(e,t,n,r,i={start:0,length:n.length}){return i.length<=t.length&&o1(0,i.length,(o=>function(e,t,n){return n?H0(e)===H0(t):e===t}(n.charCodeAt(i.start+o),e.charCodeAt(t.start+o),r)))}function U0(e,t,n,r){const i=n.characterSpans;let o,a,s=0,c=0;for(;;){if(c===i.length)return!0;if(s===t.length)return!1;let l=t[s],u=!1;for(;c=65&&e<=90)return!0;if(e<127||!Ma(e,99))return!1;const t=String.fromCharCode(e);return t===t.toUpperCase()}function W0(e){if(e>=97&&e<=122)return!0;if(e<127||!Ma(e,99))return!1;const t=String.fromCharCode(e);return t===t.toLowerCase()}function H0(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function G0(e){return e>=48&&e<=57}function X0(e){const t=[];let n=0,r=0;for(let o=0;o0&&(t.push(Q0(e.substr(n,r))),r=0);var i;return r>0&&t.push(Q0(e.substr(n,r))),t}function Q0(e){const t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:Y0(e)}}function Y0(e){return e1(e,!1)}function Z0(e){return e1(e,!0)}function e1(e,t){const n=[];let r=0;for(let i=1;it1(e)&&95!==e),t,n)}function r1(e,t,n){return t!==n&&t+1t(e.charCodeAt(n),n)))}function s1(e,t=!0,n=!1){const r={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},i=[];let o,a,s,c=0,l=!1;function u(){return a=s,s=mG.scan(),19===s?c++:20===s&&c--,s}function _(){const e=mG.getTokenValue(),t=mG.getTokenStart();return{fileName:e,pos:t,end:t+e.length}}function d(){i.push(_()),f()}function f(){0===c&&(l=!0)}function m(){let e=mG.getToken();return 138===e&&(e=u(),144===e&&(e=u(),11===e&&(o||(o=[]),o.push({ref:_(),depth:c}))),!0)}function g(){if(25===a)return!1;let e=mG.getToken();if(102===e){if(e=u(),21===e){if(e=u(),11===e||15===e)return d(),!0}else{if(11===e)return d(),!0;if(156===e&&mG.lookAhead((()=>{const e=mG.scan();return 161!==e&&(42===e||19===e||80===e||Ph(e))}))&&(e=u()),80===e||Ph(e))if(e=u(),161===e){if(e=u(),11===e)return d(),!0}else if(64===e){if(y(!0))return!0}else{if(28!==e)return!0;e=u()}if(19===e){for(e=u();20!==e&&1!==e;)e=u();20===e&&(e=u(),161===e&&(e=u(),11===e&&d()))}else 42===e&&(e=u(),130===e&&(e=u(),(80===e||Ph(e))&&(e=u(),161===e&&(e=u(),11===e&&d()))))}return!0}return!1}function h(){let e=mG.getToken();if(95===e){if(f(),e=u(),156===e&&mG.lookAhead((()=>{const e=mG.scan();return 42===e||19===e}))&&(e=u()),19===e){for(e=u();20!==e&&1!==e;)e=u();20===e&&(e=u(),161===e&&(e=u(),11===e&&d()))}else if(42===e)e=u(),161===e&&(e=u(),11===e&&d());else if(102===e&&(e=u(),156===e&&mG.lookAhead((()=>{const e=mG.scan();return 80===e||Ph(e)}))&&(e=u()),(80===e||Ph(e))&&(e=u(),64===e&&y(!0))))return!0;return!0}return!1}function y(e,t=!1){let n=e?u():mG.getToken();return 149===n&&(n=u(),21===n&&(n=u(),(11===n||t&&15===n)&&d()),!0)}function v(){let e=mG.getToken();if(80===e&&"define"===mG.getTokenValue()){if(e=u(),21!==e)return!0;if(e=u(),11===e||15===e){if(e=u(),28!==e)return!0;e=u()}if(23!==e)return!0;for(e=u();24!==e&&1!==e;)11!==e&&15!==e||d(),e=u();return!0}return!1}if(t&&function(){for(mG.setText(e),u();1!==mG.getToken();){if(16===mG.getToken()){const e=[mG.getToken()];e:for(;p(e);){const t=mG.scan();switch(t){case 1:break e;case 102:g();break;case 16:e.push(t);break;case 19:p(e)&&e.push(t);break;case 20:p(e)&&(16===we(e)?18===mG.reScanTemplateToken(!1)&&e.pop():e.pop())}}u()}m()||g()||h()||n&&(y(!1,!0)||v())||u()}mG.setText(void 0)}(),ZI(r,e),eO(r,_t),l){if(o)for(const e of o)i.push(e.ref);return{referencedFiles:r.referencedFiles,typeReferenceDirectives:r.typeReferenceDirectives,libReferenceDirectives:r.libReferenceDirectives,importedFiles:i,isLibFile:!!r.hasNoDefaultLib,ambientExternalModules:void 0}}{let e;if(o)for(const t of o)0===t.depth?(e||(e=[]),e.push(t.ref.fileName)):i.push(t.ref);return{referencedFiles:r.referencedFiles,typeReferenceDirectives:r.typeReferenceDirectives,libReferenceDirectives:r.libReferenceDirectives,importedFiles:i,isLibFile:!!r.hasNoDefaultLib,ambientExternalModules:e}}}var c1=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/;function l1(e){const t=tn(e.useCaseSensitiveFileNames()),n=e.getCurrentDirectory(),r=new Map,i=new Map;return{tryGetSourcePosition:function e(t){if(!QI(t.fileName))return;if(!s(t.fileName))return;const n=a(t.fileName).getSourcePosition(t);return n&&n!==t?e(n)||n:void 0},tryGetGeneratedPosition:function(r){if(QI(r.fileName))return;const i=s(r.fileName);if(!i)return;const o=e.getProgram();if(o.isSourceOfProjectReferenceRedirect(i.fileName))return;const c=o.getCompilerOptions().outFile,l=c?Yk(c)+".d.ts":ev(r.fileName,o.getCompilerOptions(),n,o.getCommonSourceDirectory(),t);if(void 0===l)return;const u=a(l,r.fileName).getGeneratedPosition(r);return u===r?void 0:u},toLineColumnOffset:function(e,t){return c(e).getLineAndCharacterOfPosition(t)},clearCache:function(){r.clear(),i.clear()},documentPositionMappers:i};function o(e){return Yo(e,n,t)}function a(n,r){const a=o(n),s=i.get(a);if(s)return s;let l;if(e.getDocumentPositionMapper)l=e.getDocumentPositionMapper(n,r);else if(e.readFile){const r=c(n);l=r&&u1({getSourceFileLike:c,getCanonicalFileName:t,log:t=>e.log(t)},n,aJ(r.text,Ka(r)),(t=>!e.fileExists||e.fileExists(t)?e.readFile(t):void 0))}return i.set(a,l||xJ),l||xJ}function s(t){const n=e.getProgram();if(!n)return;const r=o(t),i=n.getSourceFileByPath(r);return i&&i.resolvedPath===r?i:void 0}function c(t){return e.getSourceFileLike?e.getSourceFileLike(t):s(t)||function(t){const n=o(t),i=r.get(n);if(void 0!==i)return i||void 0;if(!e.readFile||e.fileExists&&!e.fileExists(t))return void r.set(n,!1);const a=e.readFile(t),s=!!a&&function(e,t){return{text:e,lineMap:void 0,getLineAndCharacterOfPosition(e){return Wa(Ka(this),e)}}}(a);return r.set(n,s),s||void 0}(t)}}function u1(e,t,n,r){let i=sJ(n);if(i){const n=c1.exec(i);if(n){if(n[1]){const r=n[1];return _1(e,jb(vo,r),t)}i=void 0}}const o=[];i&&o.push(i),o.push(t+".map");const a=i&&Go(i,Ro(t));for(const n of o){const i=Go(n,Ro(t)),o=r(i,a);if(st(o))return _1(e,o,i);if(void 0!==o)return o||void 0}}function _1(e,t,n){const r=uJ(t);if(r&&r.sources&&r.file&&r.mappings&&(!r.sourcesContent||!r.sourcesContent.some(st)))return bJ(e,r,n)}var d1=new Map;function p1(e,t,n){var r;t.getSemanticDiagnostics(e,n);const i=[],o=t.getTypeChecker();var a;1!==e.impliedNodeFormat&&!Io(e.fileName,[".cts",".cjs"])&&e.commonJsModuleIndicator&&(kQ(t)||TQ(t.getCompilerOptions()))&&function(e){return e.statements.some((e=>{switch(e.kind){case 243:return e.declarationList.declarations.some((e=>!!e.initializer&&Jm(f1(e.initializer),!0)));case 244:{const{expression:t}=e;if(!uP(t))return Jm(t,!0);const n=ag(t);return 1===n||2===n}default:return!1}}))}(e)&&i.push(Rp(uP(a=e.commonJsModuleIndicator)?a.left:a,va.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module));const s=Im(e);if(d1.clear(),function t(n){if(s)(function(e,t){var n,r,i,o;if(nP(e)){if(KP(e.parent)&&(null==(n=e.symbol.members)?void 0:n.size))return!0;const o=t.getSymbolOfExpando(e,!1);return!(!o||!(null==(r=o.exports)?void 0:r.size)&&!(null==(i=o.members)?void 0:i.size))}return!!HP(e)&&!!(null==(o=e.symbol.members)?void 0:o.size)})(n,o)&&i.push(Rp(KP(n.parent)?n.parent.name:n,va.This_constructor_function_may_be_converted_to_a_class_declaration));else{if(EP(n)&&n.parent===e&&2&n.declarationList.flags&&1===n.declarationList.declarations.length){const e=n.declarationList.declarations[0].initializer;e&&Jm(e,!0)&&i.push(Rp(e,va.require_call_may_be_converted_to_an_import))}const t=a8.getJSDocTypedefNodes(n);for(const e of t)i.push(Rp(e,va.JSDoc_typedef_may_be_converted_to_TypeScript_type));a8.parameterShouldGetTypeFromJSDoc(n)&&i.push(Rp(n.name||n,va.JSDoc_types_may_be_moved_to_TypeScript_types))}k1(n)&&function(e,t,n){(function(e,t){return!zh(e)&&e.body&&DP(e.body)&&function(e,t){return!!Pf(e,(e=>h1(e,t)))}(e.body,t)&&g1(e,t)})(e,t)&&!d1.has(S1(e))&&n.push(Rp(!e.name&&KP(e.parent)&&qD(e.parent.name)?e.parent.name:e,va.This_may_be_converted_to_an_async_function))}(n,o,i),n.forEachChild(t)}(e),AS(t.getCompilerOptions()))for(const n of e.imports){const o=m1(kg(n));if(!o)continue;const a=null==(r=t.getResolvedModuleFromModuleSpecifier(n,e))?void 0:r.resolvedModule,s=a&&t.getSourceFile(a.resolvedFileName);s&&s.externalModuleIndicator&&!0!==s.externalModuleIndicator&&mN(s.externalModuleIndicator)&&s.externalModuleIndicator.isExportEquals&&i.push(Rp(o,va.Import_may_be_converted_to_a_default_import))}return pe(i,e.bindSuggestionDiagnostics),pe(i,t.getSuggestionDiagnostics(e,n)),i.sort(((e,t)=>e.start-t.start))}function f1(e){return GE(e)?f1(e.expression):e}function m1(e){switch(e.kind){case 272:const{importClause:t,moduleSpecifier:n}=e;return t&&!t.name&&t.namedBindings&&274===t.namedBindings.kind&&wD(n)?t.namedBindings.name:void 0;case 271:return e.name;default:return}}function g1(e,t){const n=t.getSignatureFromDeclaration(e),r=n?t.getReturnTypeOfSignature(n):void 0;return!!r&&!!t.getPromisedTypeOfPromise(r)}function h1(e,t){return BP(e)&&!!e.expression&&y1(e.expression,t)}function y1(e,t){if(!v1(e)||!b1(e)||!e.arguments.every((e=>x1(e,t))))return!1;let n=e.expression.expression;for(;v1(n)||GE(n);)if(QE(n)){if(!b1(n)||!n.arguments.every((e=>x1(e,t))))return!1;n=n.expression.expression}else n=n.expression;return!0}function v1(e){return QE(e)&&(IG(e,"then")||IG(e,"catch")||IG(e,"finally"))}function b1(e){const t=e.expression.name.text,n="then"===t?2:"catch"===t||"finally"===t?1:0;return!(e.arguments.length>n)&&(e.arguments.length106===e.kind||qD(e)&&"undefined"===e.text)))}function x1(e,t){switch(e.kind){case 262:case 218:if(1&Jh(e))return!1;case 219:d1.set(S1(e),!0);case 106:return!0;case 80:case 211:{const n=t.getSymbolAtLocation(e);return!!n&&(t.isUndefinedSymbol(n)||Q(mx(n,t).declarations,(e=>cu(e)||L_(e)&&!!e.initializer&&cu(e.initializer))))}default:return!1}}function S1(e){return`${e.pos.toString()}:${e.end.toString()}`}function k1(e){switch(e.kind){case 262:case 174:case 218:case 219:return!0;default:return!1}}var T1=new Set(["isolatedModules"]);function C1(e,t){return N1(e,t,!1)}function w1(e,t){return N1(e,t,!0)}var D1,E1,P1="lib.d.ts";function N1(e,t,n){D1??(D1=JI(P1,'/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number {}\ninterface Object {}\ninterface RegExp {}\ninterface String {}\ninterface Array { length: number; [n: number]: T; }\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}',{languageVersion:99}));const r=[],i=t.compilerOptions?A1(t.compilerOptions,r):{},o={target:1,jsx:1};for(const e in o)Le(o,e)&&void 0===i[e]&&(i[e]=o[e]);for(const e of DO)i.verbatimModuleSyntax&&T1.has(e.name)||(i[e.name]=e.transpileOptionValue);i.suppressOutputPathCheck=!0,i.allowNonTsExtensions=!0,n?(i.declaration=!0,i.emitDeclarationOnly=!0,i.isolatedDeclarations=!0):i.declaration=!1;const a=$b(i),s={getSourceFile:e=>e===Xo(c)?l:e===Xo(P1)?D1:void 0,writeFile:(e,t)=>{Ao(e,".map")?(xn.assertEqual(_,void 0,"Unexpected multiple source map outputs, file:",e),_=t):(xn.assertEqual(u,void 0,"Unexpected multiple outputs, file:",e),u=t)},getDefaultLibFileName:()=>P1,useCaseSensitiveFileNames:()=>!1,getCanonicalFileName:e=>e,getCurrentDirectory:()=>"",getNewLine:()=>a,fileExists:e=>e===c||!!n&&e===P1,readFile:()=>"",directoryExists:()=>!0,getDirectories:()=>[]},c=t.fileName||(t.compilerOptions&&t.compilerOptions.jsx?"module.tsx":"module.ts"),l=JI(c,e,{languageVersion:wS(i),impliedNodeFormat:pV(Yo(c,"",s.getCanonicalFileName),void 0,s,i),setExternalModuleIndicator:TS(i),jsDocParsingMode:t.jsDocParsingMode??0});let u,_;t.moduleName&&(l.moduleName=t.moduleName),t.renamedDependencies&&(l.renamedDependencies=new Map(Object.entries(t.renamedDependencies)));const d=gV(n?[c,P1]:[c],i,s);return t.reportDiagnostics&&(pe(r,d.getSyntacticDiagnostics(l)),pe(r,d.getOptionsDiagnostics())),pe(r,d.emit(void 0,void 0,void 0,n,t.transformers,n).diagnostics),void 0===u?xn.fail("Output generation failed"):{outputText:u,diagnostics:r,sourceMapText:_}}function F1(e,t,n,r,i){const o=C1(e,{compilerOptions:t,fileName:n,reportDiagnostics:!!r,moduleName:i});return pe(r,o.diagnostics),o.outputText}function A1(e,t){E1=E1||F(bO,(e=>"object"==typeof e.type&&!ld(e.type,(e=>"number"!=typeof e)))),e=eQ(e);for(const n of E1){if(!Le(e,n.name))continue;const r=e[n.name];st(r)?e[n.name]=JO(n,r,t):ld(n.type,(e=>e===r))||t.push(RO(n))}return e}var I1={};function O1(e,t,n,r,i,o,a){const s=R0(r);if(!s)return u;const c=[],l=1===e.length?e[0]:void 0;for(const r of e)n.throwIfCancellationRequested(),o&&r.isDeclarationFile||M1(r,!!a,l)||r.getNamedDeclarations().forEach(((e,n)=>{L1(s,n,e,t,r.fileName,!!a,l,c)}));return c.sort($1),(void 0===i?c:c.slice(0,i)).map(q1)}function M1(e,t,n){return e!==n&&t&&(SZ(e.path)||e.hasNoDefaultLib)}function L1(e,t,n,r,i,o,a,s){const c=e.getMatchForLastSegmentOfPattern(t);if(c)for(const l of n)if(j1(l,r,o,a))if(e.patternContainsDots){const n=e.getFullMatch(z1(l),t);n&&s.push({name:t,fileName:i,matchKind:n.kind,isCaseSensitive:n.isCaseSensitive,declaration:l})}else s.push({name:t,fileName:i,matchKind:c.kind,isCaseSensitive:c.isCaseSensitive,declaration:l})}function j1(e,t,n,r){var i;switch(e.kind){case 273:case 276:case 271:const o=t.getSymbolAtLocation(e.name),a=t.getAliasedSymbol(o);return o.escapedName!==a.escapedName&&!(null==(i=a.declarations)?void 0:i.every((e=>M1(e.getSourceFile(),n,r))));default:return!0}}function R1(e,t){const n=Pc(e);return!!n&&(J1(n,t)||167===n.kind&&B1(n.expression,t))}function B1(e,t){return J1(e,t)||GE(e)&&(t.push(e.name.text),!0)&&B1(e.expression,t)}function J1(e,t){return Wh(e)&&(t.push(Hh(e)),!0)}function z1(e){const t=[],n=Pc(e);if(n&&167===n.kind&&!B1(n.expression,t))return u;t.shift();let r=UG(e);for(;r;){if(!R1(r,t))return u;r=UG(r)}return t.reverse()}function $1(e,t){return Nt(e.matchKind,t.matchKind)||$t(e.name,t.name)}function q1(e){const t=e.declaration,n=UG(t),r=n&&Pc(n);return{name:e.name,kind:KG(t),kindModifiers:KX(t),matchKind:L0[e.matchKind],isCaseSensitive:e.isCaseSensitive,fileName:e.fileName,textSpan:aQ(t),containerName:r?r.text:"",containerKind:r?KG(n):""}}o(I1,{getNavigateToItems:()=>O1});var V1={};o(V1,{getNavigationBarItems:()=>Z1,getNavigationTree:()=>e2});var U1,K1,W1,H1,G1=/\s+/g,X1=[],Q1=[],Y1=[];function Z1(e,t){U1=t,K1=e;try{return O(function(e){const t=[];return function e(n){if(function(e){if(e.children)return!0;switch(r2(e)){case 263:case 231:case 266:case 264:case 267:case 307:case 265:case 346:case 338:return!0;case 219:case 262:case 218:return t(e);default:return!1}function t(e){if(!e.node.body)return!1;switch(r2(e.parent)){case 268:case 307:case 174:case 176:return!0;default:return!1}}}(n)&&(t.push(n),n.children))for(const t of n.children)e(t)}(e),t}(o2(e)),E2)}finally{t2()}}function e2(e,t){U1=t,K1=e;try{return D2(o2(e))}finally{t2()}}function t2(){K1=void 0,U1=void 0,X1=[],W1=void 0,Y1=[]}function n2(e){return R2(e.getText(K1))}function r2(e){return e.node.kind}function i2(e,t){e.children?e.children.push(t):e.children=[t]}function o2(e){xn.assert(!X1.length);const t={node:e,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};W1=t;for(const t of e.statements)g2(t);return d2(),xn.assert(!W1&&!X1.length),t}function a2(e,t){i2(W1,s2(e,t))}function s2(e,t){return{node:e,name:t||(h_(e)||Xu(e)?Pc(e):void 0),additionalNodes:void 0,parent:W1,children:void 0,indent:W1.indent+1}}function c2(e){H1||(H1=new Map),H1.set(e,!0)}function l2(e){for(let t=0;t0;t--)_2(e,n[t]);return[n.length-1,n[0]]}function _2(e,t){const n=s2(e,t);i2(W1,n),X1.push(W1),Q1.push(H1),H1=void 0,W1=n}function d2(){W1.children&&(h2(W1.children,W1),k2(W1.children)),W1=X1.pop(),H1=Q1.pop()}function p2(e,t,n){_2(e,n),g2(t),d2()}function f2(e){e.initializer&&function(e){switch(e.kind){case 219:case 218:case 231:return!0;default:return!1}}(e.initializer)?(_2(e),LI(e.initializer,g2),d2()):p2(e,e.initializer)}function m2(e){const t=Pc(e);if(void 0===t)return!1;if(oE(t)){const e=t.expression;return vb(e)||TD(e)||$h(e)}return!!t}function g2(e){if(U1.throwIfCancellationRequested(),e&&!Ll(e))switch(e.kind){case 176:const t=e;p2(t,t.body);for(const e of t.parameters)rc(e,t)&&a2(e);break;case 174:case 177:case 178:case 173:m2(e)&&p2(e,e.body);break;case 172:m2(e)&&f2(e);break;case 171:m2(e)&&a2(e);break;case 273:const n=e;n.name&&a2(n.name);const{namedBindings:r}=n;if(r)if(274===r.kind)a2(r);else for(const e of r.elements)a2(e);break;case 304:p2(e,e.name);break;case 305:const{expression:i}=e;qD(i)?a2(e,i):a2(e);break;case 208:case 303:case 260:{const t=e;Eu(t.name)?g2(t.name):f2(t);break}case 262:const o=e.name;o&&qD(o)&&c2(o.text),p2(e,e.body);break;case 219:case 218:p2(e,e.body);break;case 266:_2(e);for(const t of e.members)I2(t)||a2(t);d2();break;case 263:case 231:case 264:_2(e);for(const t of e.members)g2(t);d2();break;case 267:p2(e,A2(e).body);break;case 277:{const t=e.expression,n=HE(t)||QE(t)?t:rP(t)||nP(t)?t.body:void 0;n?(_2(e),g2(n),d2()):a2(e);break}case 281:case 271:case 181:case 179:case 180:case 265:a2(e);break;case 213:case 226:{const t=ag(e);switch(t){case 1:case 2:return void p2(e,e.right);case 6:case 3:{const n=e,r=n.left,i=3===t?r.expression:r;let o,a=0;return qD(i.expression)?(c2(i.expression.text),o=i.expression):[a,o]=u2(n,i.expression),6===t?HE(n.right)&&n.right.properties.length>0&&(_2(n,o),LI(n.right,g2),d2()):nP(n.right)||rP(n.right)?p2(e,n.right,o):(_2(n,o),p2(e,n.right,r.name),d2()),void l2(a)}case 7:case 9:{const n=e,r=7===t?n.arguments[0]:n.arguments[0].expression,i=n.arguments[1],[o,a]=u2(e,r);return _2(e,a),_2(e,sI(YC.createIdentifier(i.text),i)),g2(e.arguments[2]),d2(),d2(),void l2(o)}case 5:{const t=e,n=t.left,r=n.expression;if(qD(r)&&"prototype"!==mg(n)&&H1&&H1.has(r.text))return void(nP(t.right)||rP(t.right)?p2(e,t.right,r):ug(n)&&(_2(t,r),p2(t.left,t.right,pg(n)),d2()));break}case 4:case 0:case 8:break;default:xn.assertNever(t)}}default:O_(e)&&f(e.jsDoc,(e=>{f(e.tags,(e=>{Fg(e)&&a2(e)}))})),LI(e,g2)}}function h2(e,t){const n=new Map;A(e,((e,r)=>{const i=e.name||Pc(e.node),o=i&&n2(i);if(!o)return!0;const a=n.get(o);if(!a)return n.set(o,e),!0;if(a instanceof Array){for(const n of a)if(v2(n,e,r,t))return!1;return a.push(e),!0}{const i=a;return!v2(i,e,r,t)&&(n.set(o,[i,e]),!0)}}))}var y2={5:!0,3:!0,7:!0,9:!0,0:!1,1:!1,2:!1,8:!1,6:!0,4:!1};function v2(e,t,n,r){return!!function(e,t,n,r){function i(e){return nP(e)||HP(e)||KP(e)}const o=uP(t.node)||QE(t.node)?ag(t.node):0,a=uP(e.node)||QE(e.node)?ag(e.node):0;if(y2[o]&&y2[a]||i(e.node)&&y2[o]||i(t.node)&&y2[a]||GP(e.node)&&b2(e.node)&&y2[o]||GP(t.node)&&y2[a]||GP(e.node)&&b2(e.node)&&i(t.node)||GP(t.node)&&i(e.node)&&b2(e.node)){let o=e.additionalNodes&&we(e.additionalNodes)||e.node;if(!GP(e.node)&&!GP(t.node)||i(e.node)||i(t.node)){const n=i(e.node)?e.node:i(t.node)?t.node:void 0;if(void 0!==n){const r=s2(sI(YC.createConstructorDeclaration(void 0,[],void 0),n));r.indent=e.indent+1,r.children=e.node===n?e.children:t.children,e.children=e.node===n?Z([r],t.children||[t]):Z(e.children||[{...e}],[r])}else(e.children||t.children)&&(e.children=Z(e.children||[{...e}],t.children||[t]),e.children&&(h2(e.children,e),k2(e.children)));o=e.node=sI(YC.createClassDeclaration(void 0,e.name||YC.createIdentifier("__class__"),void 0,void 0,[]),e.node)}else e.children=Z(e.children,t.children),e.children&&h2(e.children,e);const a=t.node;return r.children[n-1].node.end===o.end?sI(o,{pos:o.pos,end:a.end}):(e.additionalNodes||(e.additionalNodes=[]),e.additionalNodes.push(sI(YC.createClassDeclaration(void 0,e.name||YC.createIdentifier("__class__"),void 0,void 0,[]),t.node))),!0}return 0!==o}(e,t,n,r)||!!function(e,t,n){if(e.kind!==t.kind||e.parent!==t.parent&&(!x2(e,n)||!x2(t,n)))return!1;switch(e.kind){case 172:case 174:case 177:case 178:return Jv(e)===Jv(t);case 267:return S2(e,t)&&F2(e)===F2(t);default:return!0}}(e.node,t.node,r)&&(o=t,(i=e).additionalNodes=i.additionalNodes||[],i.additionalNodes.push(o.node),o.additionalNodes&&i.additionalNodes.push(...o.additionalNodes),i.children=Z(i.children,o.children),i.children&&(h2(i.children,i),k2(i.children)),!0);var i,o}function b2(e){return!!(16&e.flags)}function x2(e,t){const n=eN(e.parent)?e.parent.parent:e.parent;return n===t.node||D(t.additionalNodes,n)}function S2(e,t){return e.body&&t.body?e.body.kind===t.body.kind&&(267!==e.body.kind||S2(e.body,t.body)):e.body===t.body}function k2(e){e.sort(T2)}function T2(e,t){return $t(C2(e.node),C2(t.node))||Nt(r2(e),r2(t))}function C2(e){if(267===e.kind)return N2(e);const t=Pc(e);if(t&&au(t)){const e=Kh(t);return e&&vc(e)}switch(e.kind){case 218:case 219:case 231:return L2(e);default:return}}function w2(e,t){if(267===e.kind)return R2(N2(e));if(t){const e=qD(t)?t.text:XE(t)?`[${n2(t.argumentExpression)}]`:n2(t);if(e.length>0)return R2(e)}switch(e.kind){case 307:const t=e;return qI(t)?`"${Fy(Bo(Yk(Xo(t.fileName))))}"`:"";case 277:return mN(e)&&e.isExportEquals?"export=":"default";case 219:case 262:case 218:case 263:case 231:return 2048&Zv(e)?"default":L2(e);case 176:return"constructor";case 180:return"new()";case 179:return"()";case 181:return"[]";default:return""}}function D2(e){return{text:w2(e.node,e.name),kind:KG(e.node),kindModifiers:M2(e.node),spans:P2(e),nameSpan:e.name&&O2(e.name),childItems:O(e.children,D2)}}function E2(e){return{text:w2(e.node,e.name),kind:KG(e.node),kindModifiers:M2(e.node),spans:P2(e),childItems:O(e.children,(function(e){return{text:w2(e.node,e.name),kind:KG(e.node),kindModifiers:KX(e.node),spans:P2(e),childItems:Y1,indent:0,bolded:!1,grayed:!1}}))||Y1,indent:e.indent,bolded:!1,grayed:!1}}function P2(e){const t=[O2(e.node)];if(e.additionalNodes)for(const n of e.additionalNodes)t.push(O2(n));return t}function N2(e){return sp(e)?Gd(e.name):F2(e)}function F2(e){const t=[Hh(e.name)];for(;e.body&&267===e.body.kind;)e=e.body,t.push(Hh(e.name));return t.join(".")}function A2(e){return e.body&&ZP(e.body)?A2(e.body):e}function I2(e){return!e.name||167===e.name.kind}function O2(e){return 307===e.kind?lQ(e):aQ(e,K1)}function M2(e){return e.parent&&260===e.parent.kind&&(e=e.parent),KX(e)}function L2(e){const{parent:t}=e;if(e.name&&pd(e.name)>0)return R2(Ap(e.name));if(KP(t))return R2(Ap(t.name));if(uP(t)&&64===t.operatorToken.kind)return n2(t.left).replace(G1,"");if(BN(t))return n2(t.name);if(2048&Zv(e))return"default";if(gu(e))return"";if(QE(t)){let e=j2(t.expression);if(void 0!==e)return e=R2(e),e.length>150?`${e} callback`:`${e}(${R2(q(t.arguments,(e=>$_(e)||qu(e)?e.getText(K1):void 0)).join(", "))}) callback`}return""}function j2(e){if(qD(e))return e.text;if(GE(e)){const t=j2(e.expression),n=e.name.text;return void 0===t?n:`${t}.${n}`}}function R2(e){return(e=e.length>150?e.substring(0,150)+"...":e).replace(/\\?(\r?\n|\r|\u2028|\u2029)/g,"")}var B2={};o(B2,{addExportToChanges:()=>R6,addExportsInOldFile:()=>b6,addImportsForMovedSymbols:()=>E6,addNewFileToTsconfig:()=>h6,addOrRemoveBracesToArrowFunction:()=>f3,addTargetFileImports:()=>r3,containsJsx:()=>z6,convertArrowFunctionOrFunctionExpression:()=>C3,convertParamsToDestructuredObject:()=>M3,convertStringOrTemplateLiteral:()=>e4,convertToOptionalChainExpression:()=>d4,createNewFileName:()=>B6,deleteMovedStatements:()=>y6,deleteUnusedImports:()=>N6,deleteUnusedOldImports:()=>v6,doChangeNamedToNamespaceOrDefault:()=>t6,extractSymbol:()=>T4,filterImport:()=>M6,forEachImportInStatement:()=>w6,generateGetAccessorAndSetAccessor:()=>q4,getApplicableRefactors:()=>$2,getEditsForRefactor:()=>q2,getExistingLocals:()=>Z6,getIdentifierForNode:()=>n3,getNewStatementsAndRemoveFromOldFile:()=>g6,getStatementsToMove:()=>J6,getTopLevelDeclarationStatement:()=>j6,getUsageInfo:()=>q6,inferFunctionReturnType:()=>W4,isRefactorErrorInfo:()=>e3,isTopLevelDeclaration:()=>G6,moduleSpecifierFromImport:()=>C6,nameOfTopLevelDeclaration:()=>L6,refactorKindBeginsWith:()=>t3,registerRefactor:()=>z2,updateImportsInOtherFiles:()=>x6});var J2=new Map;function z2(e,t){J2.set(e,t)}function $2(e,t){return $e(J(J2.values(),(n=>{var r;return e.cancellationToken&&e.cancellationToken.isCancellationRequested()||!(null==(r=n.kinds)?void 0:r.some((t=>t3(t,e.kind))))?void 0:n.getAvailableActions(e,t)})))}function q2(e,t,n,r){const i=J2.get(t);return i&&i.getEditsForAction(e,n,r)}var V2="Convert export",U2={name:"Convert default export to named export",description:tS(va.Convert_default_export_to_named_export),kind:"refactor.rewrite.export.named"},K2={name:"Convert named export to default export",description:tS(va.Convert_named_export_to_default_export),kind:"refactor.rewrite.export.default"};function W2(e,t=!0){const{file:n,program:r}=e,i=wZ(e),o=kX(n,i.start),a=o.parent&&32&Zv(o.parent)&&t?o.parent:BQ(o,n,i);if(!a||!(qN(a.parent)||eN(a.parent)&&sp(a.parent.parent)))return{error:tS(va.Could_not_find_export_statement)};const s=r.getTypeChecker(),c=function(e,t){if(qN(e))return e.symbol;const n=e.parent.symbol;return n.valueDeclaration&&fp(n.valueDeclaration)?t.getMergedSymbol(n):n}(a.parent,s),l=Zv(a)||(mN(a)&&!a.isExportEquals?2080:0),u=!!(2048&l);if(!(32&l)||!u&&c.exports.has("default"))return{error:tS(va.This_file_already_has_a_default_export)};const _=e=>qD(e)&&s.getSymbolAtLocation(e)?void 0:{error:tS(va.Can_only_convert_named_export)};switch(a.kind){case 262:case 263:case 264:case 266:case 265:case 267:{const e=a;if(!e.name)return;return _(e.name)||{exportNode:e,exportName:e.name,wasDefault:u,exportingModuleSymbol:c}}case 243:{const e=a;if(!(2&e.declarationList.flags)||1!==e.declarationList.declarations.length)return;const t=Te(e.declarationList.declarations);if(!t.initializer)return;return xn.assert(!u,"Can't have a default flag here"),_(t.name)||{exportNode:e,exportName:t.name,wasDefault:u,exportingModuleSymbol:c}}case 277:{const e=a;if(e.isExportEquals)return;return _(e.expression)||{exportNode:e,exportName:e.expression,wasDefault:u,exportingModuleSymbol:c}}default:return}}function H2(e,t){return YC.createImportSpecifier(!1,e===t?void 0:YC.createIdentifier(e),YC.createIdentifier(t))}function G2(e,t){return YC.createExportSpecifier(!1,e===t?void 0:YC.createIdentifier(e),YC.createIdentifier(t))}z2(V2,{kinds:[U2.kind,K2.kind],getAvailableActions:function(e){const t=W2(e,"invoked"===e.triggerReason);if(!t)return u;if(!e3(t)){const e=t.wasDefault?U2:K2;return[{name:V2,description:e.description,actions:[e]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:V2,description:tS(va.Convert_default_export_to_named_export),actions:[{...U2,notApplicableReason:t.error},{...K2,notApplicableReason:t.error}]}]:u},getEditsForAction:function(e,t){xn.assert(t===U2.name||t===K2.name,"Unexpected action name");const n=W2(e);xn.assert(n&&!e3(n),"Expected applicable refactor info");const r=r_e.ChangeTracker.with(e,(t=>function(e,t,n,r,i){(function(e,{wasDefault:t,exportNode:n,exportName:r},i,o){if(t)if(mN(n)&&!n.isExportEquals){const t=n.expression,r=G2(t.text,t.text);i.replaceNode(e,n,YC.createExportDeclaration(void 0,!1,YC.createNamedExports([r])))}else i.delete(e,xn.checkDefined(zQ(n,90),"Should find a default keyword in modifier list"));else{const t=xn.checkDefined(zQ(n,95),"Should find an export keyword in modifier list");switch(n.kind){case 262:case 263:case 264:i.insertNodeAfter(e,t,YC.createToken(90));break;case 243:const a=Te(n.declarationList.declarations);if(!Rse.Core.isSymbolReferencedInFile(r,o,e)&&!a.type){i.replaceNode(e,n,YC.createExportDefault(xn.checkDefined(a.initializer,"Initializer was previously known to be present")));break}case 266:case 265:case 267:i.deleteModifier(e,t),i.insertNodeAfter(e,n,YC.createExportDefault(YC.createIdentifier(r.text)));break;default:xn.fail(`Unexpected exportNode kind ${n.kind}`)}}})(e,n,r,t.getTypeChecker()),function(e,{wasDefault:t,exportName:n,exportingModuleSymbol:r},i,o){const a=e.getTypeChecker(),s=xn.checkDefined(a.getSymbolAtLocation(n),"Export name should resolve to a symbol");Rse.Core.eachExportReference(e.getSourceFiles(),a,o,s,r,n.text,t,(e=>{if(n===e)return;const r=e.getSourceFile();t?function(e,t,n,r){const{parent:i}=t;switch(i.kind){case 211:n.replaceNode(e,t,YC.createIdentifier(r));break;case 276:case 281:{const t=i;n.replaceNode(e,t,H2(r,t.name.text));break}case 273:{const o=i;xn.assert(o.name===t,"Import clause name should match provided ref");const a=H2(r,t.text),{namedBindings:s}=o;if(s)if(274===s.kind){n.deleteRange(e,{pos:t.getStart(e),end:s.getStart(e)});const i=wD(o.parent.moduleSpecifier)?FQ(o.parent.moduleSpecifier,e):1,a=EQ(void 0,[H2(r,t.text)],o.parent.moduleSpecifier,i);n.insertNodeAfter(e,o.parent,a)}else n.delete(e,t),n.insertNodeAtEndOfList(e,s.elements,a);else n.replaceNode(e,t,YC.createNamedImports([a]));break}case 205:const o=i;n.replaceNode(e,i,YC.createImportTypeNode(o.argument,o.attributes,YC.createIdentifier(r),o.typeArguments,o.isTypeOf));break;default:xn.failBadSyntaxKind(i)}}(r,e,i,n.text):function(e,t,n){const r=t.parent;switch(r.kind){case 211:n.replaceNode(e,t,YC.createIdentifier("default"));break;case 276:{const t=YC.createIdentifier(r.name.text);1===r.parent.elements.length?n.replaceNode(e,r.parent,t):(n.delete(e,r),n.insertNodeBefore(e,r.parent,t));break}case 281:n.replaceNode(e,r,G2("default",r.name.text));break;default:xn.assertNever(r,`Unexpected parent kind ${r.kind}`)}}(r,e,i)}))}(t,n,r,i)}(e.file,e.program,n,t,e.cancellationToken)));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var X2="Convert import",Q2={0:{name:"Convert namespace import to named imports",description:tS(va.Convert_namespace_import_to_named_imports),kind:"refactor.rewrite.import.named"},2:{name:"Convert named imports to namespace import",description:tS(va.Convert_named_imports_to_namespace_import),kind:"refactor.rewrite.import.namespace"},1:{name:"Convert named imports to default import",description:tS(va.Convert_named_imports_to_default_import),kind:"refactor.rewrite.import.default"}};function Y2(e,t=!0){const{file:n}=e,r=wZ(e),i=kX(n,r.start),o=t?mc(i,_n(iN,AF)):BQ(i,n,r);if(void 0===o||!iN(o)&&!AF(o))return{error:"Selection is not an import declaration."};const a=r.start+r.length,s=DX(o,o.parent,n);if(s&&a>s.getStart())return;const{importClause:c}=o;return c?c.namedBindings?274===c.namedBindings.kind?{convertTo:0,import:c.namedBindings}:Z2(e.program,c)?{convertTo:1,import:c.namedBindings}:{convertTo:2,import:c.namedBindings}:{error:tS(va.Could_not_find_namespace_import_or_named_imports)}:{error:tS(va.Could_not_find_import_clause)}}function Z2(e,t){return AS(e.getCompilerOptions())&&function(e,t){const n=t.resolveExternalModuleName(e);if(!n)return!1;return n!==t.resolveExternalModuleSymbol(n)}(t.parent.moduleSpecifier,e.getTypeChecker())}function e6(e){return GE(e)?e.name:e.right}function t6(e,t,n,r,i=Z2(t,r.parent)){const o=t.getTypeChecker(),a=r.parent.parent,{moduleSpecifier:s}=a,c=new Set;r.elements.forEach((e=>{const t=o.getSymbolAtLocation(e.name);t&&c.add(t)}));const l=s&&wD(s)?LZ(s.text,99):"module",u=r.elements.some((function(t){return!!Rse.Core.eachSymbolReferenceInFile(t.name,o,e,(e=>{const t=o.resolveName(l,e,-1,!0);return!!t&&(!c.has(t)||yN(e.parent))}))}))?zY(l,e):l,_=new Set;for(const t of r.elements){const r=(t.propertyName||t.name).text;Rse.Core.eachSymbolReferenceInFile(t.name,o,e,(i=>{const o=YC.createPropertyAccessExpression(YC.createIdentifier(u),r);JN(i.parent)?n.replaceNode(e,i.parent,YC.createPropertyAssignment(i.text,o)):yN(i.parent)?_.add(t):n.replaceNode(e,i,o)}))}if(n.replaceNode(e,r,i?YC.createIdentifier(u):YC.createNamespaceImport(YC.createIdentifier(u))),_.size&&iN(a)){const t=$e(_.values(),(e=>YC.createImportSpecifier(e.isTypeOnly,e.propertyName&&YC.createIdentifier(e.propertyName.text),YC.createIdentifier(e.name.text))));n.insertNodeAfter(e,r.parent.parent,n6(a,void 0,t))}}function n6(e,t,n){return YC.createImportDeclaration(void 0,r6(t,n),e.moduleSpecifier,void 0)}function r6(e,t){return YC.createImportClause(!1,e,t&&t.length?YC.createNamedImports(t):void 0)}z2(X2,{kinds:Je(Q2).map((e=>e.kind)),getAvailableActions:function(e){const t=Y2(e,"invoked"===e.triggerReason);if(!t)return u;if(!e3(t)){const e=Q2[t.convertTo];return[{name:X2,description:e.description,actions:[e]}]}return e.preferences.provideRefactorNotApplicableReason?Je(Q2).map((e=>({name:X2,description:e.description,actions:[{...e,notApplicableReason:t.error}]}))):u},getEditsForAction:function(e,t){xn.assert(Q(Je(Q2),(e=>e.name===t)),"Unexpected action name");const n=Y2(e);xn.assert(n&&!e3(n),"Expected applicable refactor info");const r=r_e.ChangeTracker.with(e,(t=>function(e,t,n,r){const i=t.getTypeChecker();0===r.convertTo?function(e,t,n,r,i){let o=!1;const a=[],s=new Map;Rse.Core.eachSymbolReferenceInFile(r.name,t,e,(e=>{if(Bu(e.parent)){const r=e6(e.parent).text;t.resolveName(r,e,-1,!0)&&s.set(r,!0),xn.assert((GE(n=e.parent)?n.expression:n.left)===e,"Parent expression should match id"),a.push(e.parent)}else o=!0;var n}));const c=new Map;for(const t of a){const r=e6(t).text;let i=c.get(r);void 0===i&&c.set(r,i=s.has(r)?zY(r,e):r),n.replaceNode(e,t,YC.createIdentifier(i))}const l=[];c.forEach(((e,t)=>{l.push(YC.createImportSpecifier(!1,e===t?void 0:YC.createIdentifier(t),YC.createIdentifier(e)))}));const u=r.parent.parent;if(o&&!i&&iN(u))n.insertNodeAfter(e,u,n6(u,void 0,l));else{const t=o?YC.createIdentifier(r.name.text):void 0;n.replaceNode(e,r.parent,r6(t,l))}}(e,i,n,r.import,AS(t.getCompilerOptions())):t6(e,t,n,r.import,1===r.convertTo)}(e.file,e.program,t,n)));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var i6="Extract type",o6={name:"Extract to type alias",description:tS(va.Extract_to_type_alias),kind:"refactor.extract.type"},a6={name:"Extract to interface",description:tS(va.Extract_to_interface),kind:"refactor.extract.interface"},s6={name:"Extract to typedef",description:tS(va.Extract_to_typedef),kind:"refactor.extract.typedef"};function c6(e,t=!0){const{file:n,startPosition:r}=e,i=Im(n),o=uQ(wZ(e)),a=o.pos===o.end&&t,s=function(e,t,n,r){const i=[()=>kX(e,t),()=>SX(e,t,(()=>!0))];for(const t of i){const i=t(),o=rX(i,e,n.pos,n.end),a=mc(i,(t=>t.parent&&wu(t)&&!u6(n,t.parent,e)&&(r||o)));if(a)return a}}(n,r,o,a);if(!s||!wu(s))return{info:{error:tS(va.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const c=e.program.getTypeChecker(),l=function(e,t){return mc(e,b_)||(t?mc(e,oF):void 0)}(s,i);if(void 0===l)return{info:{error:tS(va.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};const _=function(e,t){return mc(e,(e=>e===t?"quit":!(!FE(e.parent)&&!AE(e.parent))))??e}(s,l);if(!wu(_))return{info:{error:tS(va.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const d=[];(FE(_.parent)||AE(_.parent))&&o.end>s.end&&pe(d,_.parent.types.filter((e=>rX(e,n,o.pos,o.end))));const p=d.length>1?d:_,{typeParameters:f,affectedTextRange:m}=function(e,t,n,r){const i=[],o=at(t),a={pos:o[0].getStart(r),end:o[o.length-1].end};for(const e of o)if(s(e))return{typeParameters:void 0,affectedTextRange:void 0};return{typeParameters:i,affectedTextRange:a};function s(t){if(xE(t)){if(qD(t.typeName)){const o=t.typeName,s=e.resolveName(o.text,o,262144,!0);for(const e of(null==s?void 0:s.declarations)||u)if(aE(e)&&e.getSourceFile()===r){if(e.name.escapedText===o.escapedText&&u6(e,a,r))return!0;if(u6(n,e,r)&&!u6(a,e,r)){fe(i,e);break}}}}else if(OE(t)){const e=mc(t,(e=>IE(e)&&u6(e.extendsType,t,r)));if(!e||!u6(a,e,r))return!0}else if(bE(t)||LE(t)){const e=mc(t.parent,cu);if(e&&e.type&&u6(e.type,t,r)&&!u6(a,e,r))return!0}else if(TE(t))if(qD(t.exprName)){const i=e.resolveName(t.exprName.text,t.exprName,111551,!1);if((null==i?void 0:i.valueDeclaration)&&u6(n,i.valueDeclaration,r)&&!u6(a,i.valueDeclaration,r))return!0}else if(yv(t.exprName.left)&&!u6(a,t.parent,r))return!0;return r&&DE(t)&&Xa(r,t.pos).line===Xa(r,t.end).line&&iw(t,1),LI(t,s)}}(c,p,l,n);return f?{info:{isJS:i,selection:p,enclosingNode:l,typeParameters:f,typeElements:l6(c,p)},affectedTextRange:m}:{info:{error:tS(va.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0}}function l6(e,t){if(t){if(ot(t)){const n=[];for(const r of t){const t=l6(e,r);if(!t)return;pe(n,t)}return n}if(AE(t)){const n=[],r=new Map;for(const i of t.types){const t=l6(e,i);if(!t||!t.every((e=>e.name&&Fx(r,xQ(e.name)))))return;pe(n,t)}return n}return ME(t)?l6(e,t.type):CE(t)?t.members:void 0}}function u6(e,t,n){return tX(e,as(n.text,t.pos),t.end)}function _6(e){return ot(e.selection)?{firstTypeNode:e.selection[0],lastTypeNode:e.selection[e.selection.length-1],newTypeNode:FE(e.selection[0].parent)?YC.createUnionTypeNode(e.selection):YC.createIntersectionTypeNode(e.selection)}:{firstTypeNode:e.selection,lastTypeNode:e.selection,newTypeNode:e.selection}}z2(i6,{kinds:[o6.kind,a6.kind,s6.kind],getAvailableActions:function(e){const{info:t,affectedTextRange:n}=c6(e,"invoked"===e.triggerReason);return t?e3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:i6,description:tS(va.Extract_type),actions:[{...s6,notApplicableReason:t.error},{...o6,notApplicableReason:t.error},{...a6,notApplicableReason:t.error}]}]:u:[{name:i6,description:tS(va.Extract_type),actions:t.isJS?[s6]:ue([o6],t.typeElements&&a6)}].map((t=>({...t,actions:t.actions.map((t=>({...t,range:n?{start:{line:Xa(e.file,n.pos).line,offset:Xa(e.file,n.pos).character},end:{line:Xa(e.file,n.end).line,offset:Xa(e.file,n.end).character}}:void 0})))}))):u},getEditsForAction:function(e,t){const{file:n}=e,{info:r}=c6(e);xn.assert(r&&!e3(r),"Expected to find a range to extract");const i=zY("NewType",n),o=r_e.ChangeTracker.with(e,(o=>{switch(t){case o6.name:return xn.assert(!r.isJS,"Invalid actionName/JS combo"),function(e,t,n,r){const{enclosingNode:i,typeParameters:o}=r,{firstTypeNode:a,lastTypeNode:s,newTypeNode:c}=_6(r),l=YC.createTypeAliasDeclaration(void 0,n,o.map((e=>YC.updateTypeParameterDeclaration(e,e.modifiers,e.name,e.constraint,void 0))),c);e.insertNodeBefore(t,i,Aw(l),!0),e.replaceNodeRange(t,a,s,YC.createTypeReferenceNode(n,o.map((e=>YC.createTypeReferenceNode(e.name,void 0)))),{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.ExcludeWhitespace})}(o,n,i,r);case s6.name:return xn.assert(r.isJS,"Invalid actionName/JS combo"),function(e,t,n,r,i){var o;at(i.selection).forEach((e=>{iw(e,7168)}));const{enclosingNode:a,typeParameters:s}=i,{firstTypeNode:c,lastTypeNode:l,newTypeNode:u}=_6(i),_=YC.createJSDocTypedefTag(YC.createIdentifier("typedef"),YC.createJSDocTypeExpression(u),YC.createIdentifier(r)),d=[];f(s,(e=>{const t=gl(e),n=YC.createTypeParameterDeclaration(void 0,e.name),r=YC.createJSDocTemplateTag(YC.createIdentifier("template"),t&&ut(t,UN),[n]);d.push(r)}));const p=YC.createJSDocComment(void 0,YC.createNodeArray(Z(d,[_])));if(oF(a)){const r=a.getStart(n),i=gY(t.host,null==(o=t.formatContext)?void 0:o.options);e.insertNodeAt(n,a.getStart(n),p,{suffix:i+i+n.text.slice(PY(n.text,r-1),r)})}else e.insertNodeBefore(n,a,p,!0);e.replaceNodeRange(n,c,l,YC.createTypeReferenceNode(r,s.map((e=>YC.createTypeReferenceNode(e.name,void 0)))))}(o,e,n,i,r);case a6.name:return xn.assert(!r.isJS&&!!r.typeElements,"Invalid actionName/JS combo"),function(e,t,n,r){var i;const{enclosingNode:o,typeParameters:a,typeElements:s}=r,c=YC.createInterfaceDeclaration(void 0,n,a,void 0,s);sI(c,null==(i=s[0])?void 0:i.parent),e.insertNodeBefore(t,o,Aw(c),!0);const{firstTypeNode:l,lastTypeNode:u}=_6(r);e.replaceNodeRange(t,l,u,YC.createTypeReferenceNode(n,a.map((e=>YC.createTypeReferenceNode(e.name,void 0)))),{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.ExcludeWhitespace})}(o,n,i,r);default:xn.fail("Unexpected action name")}})),a=n.fileName;return{edits:o,renameFilename:a,renameLocation:$Y(o,a,i,!1)}}});var d6="Move to file",p6=tS(va.Move_to_file),f6={name:"Move to file",description:p6,kind:"refactor.move.file"};function m6(e){return{edits:[],renameFilename:void 0,renameLocation:void 0,notApplicableReason:e}}function g6(e,t,n,r,i,o,a,s,c,l){const u=o.getTypeChecker(),_=yn(e.statements,pf),d=!GZ(t.fileName,o,a,!!e.commonJsModuleIndicator),f=AQ(e,s);E6(n.oldFileImportsFromTargetFile,t.fileName,l,o),v6(e,i.all,n.unusedImportsFromOldFile,l),l.writeFixes(r,f),y6(e,i.ranges,r),x6(r,o,a,e,n.movedSymbols,t.fileName,f),b6(e,n.targetFileImportsFromOldFile,r,d),r3(e,n.oldImportsNeededByTargetFile,n.targetFileImportsFromOldFile,u,o,c),!Am(t)&&_.length&&r.insertStatementsInNewFile(t.fileName,_,e),c.writeFixes(r,f);const m=function(e,t,n,r){return R(t,(t=>{if(F6(t)&&!P6(e,t,r)&&K6(t,(e=>{var t;return n.includes(xn.checkDefined(null==(t=lt(e,p_))?void 0:t.symbol))}))){const e=function(e,t){return t?[A6(e)]:function(e){return[e,...O6(e).map(I6)]}(e)}(NY(t),r);if(e)return e}return NY(t)}))}(e,i.all,$e(n.oldFileImportsFromTargetFile.keys()),d);Am(t)&&t.statements.length>0?function(e,t,n,r,i){var o;const a=new Set,s=null==(o=r.symbol)?void 0:o.exports;if(s){const n=t.getTypeChecker(),o=new Map;for(const e of i.all)F6(e)&&Bv(e,32)&&K6(e,(e=>{var t;const n=g(p_(e)?null==(t=s.get(e.symbol.escapedName))?void 0:t.declarations:void 0,(e=>gN(e)?e:yN(e)?lt(e.parent.parent,gN):void 0));n&&n.moduleSpecifier&&o.set(n,(o.get(n)||new Set).add(e))}));for(const[t,i]of $e(o))if(t.exportClause&&hN(t.exportClause)&&p(t.exportClause.elements)){const o=t.exportClause.elements,s=F(o,(e=>void 0===S(mx(e.symbol,n).declarations,(e=>G6(e)&&i.has(e)))));if(0===p(s)){e.deleteNode(r,t),a.add(t);continue}p(s)gN(e)&&!!e.moduleSpecifier&&!a.has(e)));c?e.insertNodesBefore(r,c,n,!0):e.insertNodesAfter(r,r.statements[r.statements.length-1],n)}(r,o,m,t,i):Am(t)?r.insertNodesAtEndOfFile(t,m,!1):r.insertStatementsInNewFile(t.fileName,c.hasFixes()?[4,...m]:m,e)}function h6(e,t,n,r,i){const o=e.getCompilerOptions().configFile;if(!o)return;const a=Xo(Ko(n,"..",r)),s=fa(o.fileName,a,i),c=o.statements[0]&<(o.statements[0].expression,HE),l=c&&S(c.properties,(e=>BN(e)&&wD(e.name)&&"files"===e.name.text));l&&WE(l.initializer)&&t.insertNodeInListAfter(o,De(l.initializer.elements),YC.createStringLiteral(s),l.initializer.elements)}function y6(e,t,n){for(const{first:r,afterLast:i}of t)n.deleteNodeRangeExcludingEnd(e,r,i)}function v6(e,t,n,r){for(const i of e.statements)D(t,i)||w6(i,(e=>{D6(e,(e=>{n.has(e.symbol)&&r.removeExistingImport(e)}))}))}function b6(e,t,n,r){const i=hQ();t.forEach(((t,o)=>{if(o.declarations)for(const t of o.declarations){if(!G6(t))continue;const o=L6(t);if(!o)continue;const a=j6(t);i(a)&&R6(e,a,o,n,r)}}))}function x6(e,t,n,r,i,o,a){const s=t.getTypeChecker();for(const c of t.getSourceFiles())if(c!==r)for(const l of c.statements)w6(l,(u=>{if(s.getSymbolAtLocation(C6(u))!==r.symbol)return;const _=e=>{const t=KE(e.parent)?RQ(s,e.parent):mx(s.getSymbolAtLocation(e),s);return!!t&&i.has(t)};N6(c,u,e,_);const d=Wo(Ro(Go(r.fileName,t.getCurrentDirectory())),o);if(0===Lt(!t.useCaseSensitiveFileNames())(d,c.fileName))return;const p=VR(t.getCompilerOptions(),c,c.fileName,d,CQ(t,n)),f=M6(u,PQ(p,a),_);f&&e.insertNodeAfter(c,l,f);const m=S6(u);m&&k6(e,c,s,i,p,m,u,a)}))}function S6(e){switch(e.kind){case 272:return e.importClause&&e.importClause.namedBindings&&274===e.importClause.namedBindings.kind?e.importClause.namedBindings.name:void 0;case 271:return e.name;case 260:return lt(e.name,qD);default:return xn.assertNever(e,`Unexpected node kind ${e.kind}`)}}function k6(e,t,n,r,i,o,a,s){const c=LZ(i,99);let l=!1;const u=[];if(Rse.Core.eachSymbolReferenceInFile(o,n,t,(e=>{GE(e.parent)&&(l=l||!!n.resolveName(c,e,-1,!0),r.has(n.getSymbolAtLocation(e.parent.name))&&u.push(e))})),u.length){const n=l?zY(c,t):c;for(const r of u)e.replaceNode(t,r,YC.createIdentifier(n));e.insertNodeAfter(t,a,function(e,t,n,r){const i=YC.createIdentifier(t),o=PQ(n,r);switch(e.kind){case 272:return YC.createImportDeclaration(void 0,YC.createImportClause(!1,void 0,YC.createNamespaceImport(i)),o,void 0);case 271:return YC.createImportEqualsDeclaration(void 0,!1,i,YC.createExternalModuleReference(o));case 260:return YC.createVariableDeclaration(i,void 0,void 0,T6(o));default:return xn.assertNever(e,`Unexpected node kind ${e.kind}`)}}(a,c,i,s))}}function T6(e){return YC.createCallExpression(YC.createIdentifier("require"),void 0,[e])}function C6(e){return 272===e.kind?e.moduleSpecifier:271===e.kind?e.moduleReference.expression:e.initializer.arguments[0]}function w6(e,t){if(iN(e))wD(e.moduleSpecifier)&&t(e);else if(rN(e))SN(e.moduleReference)&&$_(e.moduleReference.expression)&&t(e);else if(EP(e))for(const n of e.declarationList.declarations)n.initializer&&Jm(n.initializer,!0)&&t(n)}function D6(e,t){var n,r,i,o,a;if(272===e.kind){if((null==(n=e.importClause)?void 0:n.name)&&t(e.importClause),274===(null==(i=null==(r=e.importClause)?void 0:r.namedBindings)?void 0:i.kind)&&t(e.importClause.namedBindings),275===(null==(a=null==(o=e.importClause)?void 0:o.namedBindings)?void 0:a.kind))for(const n of e.importClause.namedBindings.elements)t(n)}else if(271===e.kind)t(e);else if(260===e.kind)if(80===e.name.kind)t(e);else if(206===e.name.kind)for(const n of e.name.elements)qD(n.name)&&t(n)}function E6(e,t,n,r){for(const[i,o]of e){const e=FZ(i,wS(r.getCompilerOptions())),a="default"===i.name&&i.parent?1:0;n.addImportForNonExistentExport(e,t,a,i.flags,o)}}function P6(e,t,n,r){var i;return n?!NP(t)&&Bv(t,32)||!!(r&&e.symbol&&(null==(i=e.symbol.exports)?void 0:i.has(r.escapedText))):!!e.symbol&&!!e.symbol.exports&&O6(t).some((t=>e.symbol.exports.has(yc(t))))}function N6(e,t,n,r){if(272===t.kind&&t.importClause){const{name:i,namedBindings:o}=t.importClause;if((!i||r(i))&&(!o||275===o.kind&&0!==o.elements.length&&o.elements.every((e=>r(e.name)))))return n.delete(e,t)}D6(t,(t=>{t.name&&qD(t.name)&&r(t.name)&&n.delete(e,t)}))}function F6(e){return xn.assert(qN(e.parent),"Node parent should be a SourceFile"),Q6(e)||EP(e)}function A6(e){const t=cI(e)?Z([YC.createModifier(95)],Ac(e)):void 0;switch(e.kind){case 262:return YC.updateFunctionDeclaration(e,t,e.asteriskToken,e.name,e.typeParameters,e.parameters,e.type,e.body);case 263:const n=lI(e)?Fc(e):void 0;return YC.updateClassDeclaration(e,Z(n,t),e.name,e.typeParameters,e.heritageClauses,e.members);case 243:return YC.updateVariableStatement(e,t,e.declarationList);case 267:return YC.updateModuleDeclaration(e,t,e.name,e.body);case 266:return YC.updateEnumDeclaration(e,t,e.name,e.members);case 265:return YC.updateTypeAliasDeclaration(e,t,e.name,e.typeParameters,e.type);case 264:return YC.updateInterfaceDeclaration(e,t,e.name,e.typeParameters,e.heritageClauses,e.members);case 271:return YC.updateImportEqualsDeclaration(e,t,e.isTypeOnly,e.name,e.moduleReference);case 244:return xn.fail();default:return xn.assertNever(e,`Unexpected declaration kind ${e.kind}`)}}function I6(e){return YC.createExpressionStatement(YC.createBinaryExpression(YC.createPropertyAccessExpression(YC.createIdentifier("exports"),YC.createIdentifier(e)),64,YC.createIdentifier(e)))}function O6(e){switch(e.kind){case 262:case 263:return[e.name.text];case 243:return q(e.declarationList.declarations,(e=>qD(e.name)?e.name.text:void 0));case 267:case 266:case 265:case 264:case 271:return u;case 244:return xn.fail("Can't export an ExpressionStatement");default:return xn.assertNever(e,`Unexpected decl kind ${e.kind}`)}}function M6(e,t,n){switch(e.kind){case 272:{const r=e.importClause;if(!r)return;const i=r.name&&n(r.name)?r.name:void 0,o=r.namedBindings&&function(e,t){if(274===e.kind)return t(e.name)?e:void 0;{const n=e.elements.filter((e=>t(e.name)));return n.length?YC.createNamedImports(n):void 0}}(r.namedBindings,n);return i||o?YC.createImportDeclaration(void 0,YC.createImportClause(r.isTypeOnly,i,o),NY(t),void 0):void 0}case 271:return n(e.name)?e:void 0;case 260:{const r=function(e,t){switch(e.kind){case 80:return t(e)?e:void 0;case 207:return e;case 206:{const n=e.elements.filter((e=>e.propertyName||!qD(e.name)||t(e.name)));return n.length?YC.createObjectBindingPattern(n):void 0}}}(e.name,n);return r?function(e,t,n,r=2){return YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(e,void 0,t,n)],r))}(r,e.type,T6(t),e.parent.flags):void 0}default:return xn.assertNever(e,`Unexpected import kind ${e.kind}`)}}function L6(e){return NP(e)?lt(e.expression.left.name,qD):lt(e.name,qD)}function j6(e){switch(e.kind){case 260:return e.parent.parent;case 208:return j6(ut(e.parent.parent,(e=>KP(e)||KE(e))));default:return e}}function R6(e,t,n,r,i){if(!P6(e,t,i,n))if(i)NP(t)||r.insertExportModifier(e,t);else{const n=O6(t);0!==n.length&&r.insertNodesAfter(e,t,n.map(I6))}}function B6(e,t,n,r){const i=t.getTypeChecker();if(r){const t=q6(e,r.all,i),s=Ro(e.fileName),c=sT(e.fileName),l=Ko(s,function(e,t,n,r){let i=e;for(let o=1;;o++){const a=Ko(n,i+t);if(!r.fileExists(a))return i;i=`${e}.${o}`}}((o=t.oldFileImportsFromTargetFile,a=t.movedSymbols,ud(o,OQ)||ud(a,OQ)||"newFile"),c,s,n))+c;return l}var o,a;return""}function J6(e){const t=function(e){const{file:t}=e,n=uQ(wZ(e)),{statements:r}=t;let i=T(r,(e=>e.end>n.pos));if(-1===i)return;const o=Y6(t,r[i]);o&&(i=o.start);let a=T(r,(e=>e.end>=n.end),i);-1!==a&&n.end<=r[a].getStart()&&a--;const s=Y6(t,r[a]);return s&&(a=s.end),{toMove:r.slice(i,-1===a?r.length:a+1),afterLast:-1===a?void 0:r[a+1]}}(e);if(void 0===t)return;const n=[],r=[],{toMove:i,afterLast:o}=t;return Y(i,$6,((e,t)=>{for(let r=e;r!!(2&e.transformFlags)))}function $6(e){return!function(e){switch(e.kind){case 272:return!0;case 271:return!Bv(e,32);case 243:return e.declarationList.declarations.every((e=>!!e.initializer&&Jm(e.initializer,!0)));default:return!1}}(e)&&!pf(e)}function q6(e,t,n,r=new Set){var i;const o=new Set,a=new Map,s=new Map,c=function(e){if(void 0===e)return;const t=n.getJsxNamespace(e),r=n.resolveName(t,e,1920,!0);return r&&Q(r.declarations,W6)?r:void 0}(z6(t));c&&a.set(c,[!1,lt(null==(i=c.declarations)?void 0:i[0],(e=>fN(e)||oN(e)||_N(e)||rN(e)||KE(e)||KP(e)))]);for(const e of t)K6(e,(e=>{o.add(xn.checkDefined(NP(e)?n.getSymbolAtLocation(e.expression.left):e.symbol,"Need a symbol here"))}));const l=new Set;for(const i of t)U6(i,n,((t,i)=>{var c;if(t.declarations&&!V6(n,t))if(r.has(mx(t,n)))l.add(t);else for(const n of t.declarations)if(W6(n)){const e=a.get(t);a.set(t,[(void 0===e||e)&&i,lt(n,(e=>fN(e)||oN(e)||_N(e)||rN(e)||KE(e)||KP(e)))])}else G6(n)&&(KP(c=n)?c.parent.parent.parent:c.parent)===e&&!o.has(t)&&s.set(t,i)}));for(const e of a.keys())l.add(e);const u=new Map;for(const r of e.statements)D(t,r)||(c&&2&r.transformFlags&&l.delete(c),U6(r,n,((e,t)=>{o.has(e)&&u.set(e,t),l.delete(e)})));return{movedSymbols:o,targetFileImportsFromOldFile:s,oldFileImportsFromTargetFile:u,oldImportsNeededByTargetFile:a,unusedImportsFromOldFile:l}}function V6(e,t){return!!e.resolveName(t.name,void 0,788968,!1)}function U6(e,t,n){e.forEachChild((function e(r){if(qD(r)&&!dh(r)){const e=t.getSymbolAtLocation(r);e&&n(e,wT(r))}else r.forEachChild(e)}))}function K6(e,t){switch(e.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return t(e);case 243:return g(e.declarationList.declarations,(e=>X6(e.name,t)));case 244:{const{expression:n}=e;return uP(n)&&1===ag(n)?t(e):void 0}}}function W6(e){switch(e.kind){case 271:case 276:case 273:case 274:return!0;case 260:return H6(e);case 208:return KP(e.parent.parent)&&H6(e.parent.parent);default:return!1}}function H6(e){return qN(e.parent.parent.parent)&&!!e.initializer&&Jm(e.initializer,!0)}function G6(e){return Q6(e)&&qN(e.parent)||KP(e)&&qN(e.parent.parent.parent)}function X6(e,t){switch(e.kind){case 80:return t(ut(e.parent,(e=>KP(e)||KE(e))));case 207:case 206:return g(e.elements,(e=>gP(e)?void 0:X6(e.name,t)));default:return xn.assertNever(e,`Unexpected name kind ${e.kind}`)}}function Q6(e){switch(e.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return!0;default:return!1}}function Y6(e,t){if(uu(t)){const n=t.symbol.declarations;if(void 0===n||p(n)<=1||!D(n,t))return;const r=n[0],i=n[p(n)-1],o=q(n,(t=>Sd(t)===e&&b_(t)?t:void 0)),a=T(e.statements,(e=>e.end>=i.end));return{toMove:o,start:T(e.statements,(e=>e.end>=r.end)),end:a}}}function Z6(e,t,n){const r=new Set;for(const t of e.imports){const e=kg(t);if(iN(e)&&e.importClause&&e.importClause.namedBindings&&pN(e.importClause.namedBindings))for(const t of e.importClause.namedBindings.elements){const e=n.getSymbolAtLocation(t.propertyName||t.name);e&&r.add(mx(e,n))}if(zm(e.parent)&&VE(e.parent.name))for(const t of e.parent.name.elements){const e=n.getSymbolAtLocation(t.propertyName||t.name);e&&r.add(mx(e,n))}}for(const i of t)U6(i,n,(t=>{const i=mx(t,n);i.valueDeclaration&&Sd(i.valueDeclaration).path===e.path&&r.add(i)}));return r}function e3(e){return void 0!==e.error}function t3(e,t){return!t||e.substr(0,t.length)===t}function n3(e,t,n,r){return!GE(e)||gu(t)||n.resolveName(e.name.text,e,111551,!1)||VD(e.name)||xc(e.name)?zY(gu(t)?"newProperty":"newLocal",r):e.name.text}function r3(e,t,n,r,i,o){t.forEach((([e,t],n)=>{var i;const a=mx(n,r);r.isUnknownSymbol(a)?o.addVerbatimImport(xn.checkDefined(t??mc(null==(i=n.declarations)?void 0:i[0],Cp))):o.addImportFromExportedSymbol(a,e,t)})),E6(n,e.fileName,o,i)}z2(d6,{kinds:[f6.kind],getAvailableActions:function(e,t){const n=e.file,r=J6(e);if(!t)return u;if("implicit"===e.triggerReason&&void 0!==e.endPosition){const t=mc(kX(n,e.startPosition),XZ),r=mc(kX(n,e.endPosition),XZ);if(t&&!qN(t)&&r&&!qN(r))return u}if(e.preferences.allowTextChangesInNewFiles&&r){const e={start:{line:Xa(n,r.all[0].getStart(n)).line,offset:Xa(n,r.all[0].getStart(n)).character},end:{line:Xa(n,De(r.all).end).line,offset:Xa(n,De(r.all).end).character}};return[{name:d6,description:p6,actions:[{...f6,range:e}]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:d6,description:p6,actions:[{...f6,notApplicableReason:tS(va.Selection_is_not_a_valid_statement_or_statements)}]}]:u},getEditsForAction:function(e,t,n){xn.assert(t===d6,"Wrong refactor invoked");const r=xn.checkDefined(J6(e)),{host:i,program:o}=e;xn.assert(n,"No interactive refactor arguments available");const a=n.targetFile;if(qk(a)||Vk(a)){if(i.fileExists(a)&&void 0===o.getSourceFile(a))return m6(tS(va.Cannot_move_statements_to_the_selected_file));const t=r_e.ChangeTracker.with(e,(t=>function(e,t,n,r,i,o,a,s){const c=r.getTypeChecker(),l=!a.fileExists(n),u=l?QZ(n,t.externalModuleIndicator?99:t.commonJsModuleIndicator?1:void 0,r,a):xn.checkDefined(r.getSourceFile(n)),_=a8.createImportAdder(t,e.program,e.preferences,e.host),d=a8.createImportAdder(u,e.program,e.preferences,e.host);g6(t,u,q6(t,i.all,c,l?void 0:Z6(u,i.all,c)),o,i,r,a,s,d,_),l&&h6(r,o,t.fileName,n,Wy(a))}(e,e.file,n.targetFile,e.program,r,t,e.host,e.preferences)));return{edits:t,renameFilename:void 0,renameLocation:void 0}}return m6(tS(va.Cannot_move_to_file_selected_file_is_invalid))}});var i3="Inline variable",o3=tS(va.Inline_variable),a3={name:i3,description:o3,kind:"refactor.inline.variable"};function s3(e,t,n,r){var i,o;const a=r.getTypeChecker(),s=xX(e,t),c=s.parent;if(qD(s)){if(ux(c)&&Mf(c)&&qD(c.name)){if(1!==(null==(i=a.getMergedSymbol(c.symbol).declarations)?void 0:i.length))return{error:tS(va.Variables_with_multiple_declarations_cannot_be_inlined)};if(c3(c))return;const t=l3(c,a,e);return t&&{references:t,declaration:c,replacement:c.initializer}}if(n){let t=a.resolveName(s.text,s,111551,!1);if(t=t&&a.getMergedSymbol(t),1!==(null==(o=null==t?void 0:t.declarations)?void 0:o.length))return{error:tS(va.Variables_with_multiple_declarations_cannot_be_inlined)};const n=t.declarations[0];if(!ux(n)||!Mf(n)||!qD(n.name))return;if(c3(n))return;const r=l3(n,a,e);return r&&{references:r,declaration:n,replacement:n.initializer}}return{error:tS(va.Could_not_find_variable_to_inline)}}}function c3(e){return Q(ut(e.parent.parent,EP).modifiers,UD)}function l3(e,t,n){const r=[],i=Rse.Core.eachSymbolReferenceInFile(e.name,t,n,(t=>!(!Rse.isWriteAccessForReference(t)||JN(t.parent))||!(!yN(t.parent)&&!mN(t.parent))||!!TE(t.parent)||!!Js(e,t.pos)||void r.push(t)));return 0===r.length||i?void 0:r}function u3(e,t){t=NY(t);const{parent:n}=e;return Xu(n)&&(fy(t){for(const t of a)e.replaceNode(n,t,u3(t,c));e.delete(n,s)}))}}});var _3="Move to a new file",d3=tS(va.Move_to_a_new_file),p3={name:_3,description:d3,kind:"refactor.move.newFile"};z2(_3,{kinds:[p3.kind],getAvailableActions:function(e){const t=J6(e),n=e.file;if("implicit"===e.triggerReason&&void 0!==e.endPosition){const t=mc(kX(n,e.startPosition),XZ),r=mc(kX(n,e.endPosition),XZ);if(t&&!qN(t)&&r&&!qN(r))return u}if(e.preferences.allowTextChangesInNewFiles&&t){const n=e.file,r={start:{line:Xa(n,t.all[0].getStart(n)).line,offset:Xa(n,t.all[0].getStart(n)).character},end:{line:Xa(n,De(t.all).end).line,offset:Xa(n,De(t.all).end).character}};return[{name:_3,description:d3,actions:[{...p3,range:r}]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:_3,description:d3,actions:[{...p3,notApplicableReason:tS(va.Selection_is_not_a_valid_statement_or_statements)}]}]:u},getEditsForAction:function(e,t){xn.assert(t===_3,"Wrong refactor invoked");const n=xn.checkDefined(J6(e)),r=r_e.ChangeTracker.with(e,(t=>function(e,t,n,r,i,o,a){const s=t.getTypeChecker(),c=q6(e,n.all,s),l=B6(e,t,i,n),u=QZ(l,e.externalModuleIndicator?99:e.commonJsModuleIndicator?1:void 0,t,i),_=a8.createImportAdder(e,o.program,o.preferences,o.host);g6(e,u,c,r,n,t,i,a,a8.createImportAdder(u,o.program,o.preferences,o.host),_),h6(t,r,e.fileName,l,Wy(i))}(e.file,e.program,n,t,e.host,e,e.preferences)));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var f3={},m3="Convert overload list to single signature",g3=tS(va.Convert_overload_list_to_single_signature),h3={name:m3,description:g3,kind:"refactor.rewrite.function.overloadList"};function y3(e){switch(e.kind){case 173:case 174:case 179:case 176:case 180:case 262:return!0}return!1}function v3(e,t,n){const r=mc(kX(e,t),y3);if(!r)return;if(uu(r)&&r.body&&YG(r.body,t))return;const i=n.getTypeChecker(),o=r.symbol;if(!o)return;const a=o.declarations;if(p(a)<=1)return;if(!x(a,(t=>Sd(t)===e)))return;if(!y3(a[0]))return;const s=a[0].kind;if(!x(a,(e=>e.kind===s)))return;const c=a;if(Q(c,(e=>!!e.typeParameters||Q(e.parameters,(e=>!!e.modifiers||!qD(e.name))))))return;const l=q(c,(e=>i.getSignatureFromDeclaration(e)));if(p(l)!==p(a))return;const u=i.getReturnTypeOfSignature(l[0]);return x(l,(e=>i.getReturnTypeOfSignature(e)===u))?c:void 0}z2(m3,{kinds:[h3.kind],getEditsForAction:function(e){const{file:t,startPosition:n,program:r}=e,i=v3(t,n,r);if(!i)return;const o=r.getTypeChecker(),a=i[i.length-1];let s=a;switch(a.kind){case 173:s=YC.updateMethodSignature(a,a.modifiers,a.name,a.questionToken,a.typeParameters,c(i),a.type);break;case 174:s=YC.updateMethodDeclaration(a,a.modifiers,a.asteriskToken,a.name,a.questionToken,a.typeParameters,c(i),a.type,a.body);break;case 179:s=YC.updateCallSignature(a,a.typeParameters,c(i),a.type);break;case 176:s=YC.updateConstructorDeclaration(a,a.modifiers,c(i),a.body);break;case 180:s=YC.updateConstructSignature(a,a.typeParameters,c(i),a.type);break;case 262:s=YC.updateFunctionDeclaration(a,a.modifiers,a.asteriskToken,a.name,a.typeParameters,c(i),a.type,a.body);break;default:return xn.failBadSyntaxKind(a,"Unhandled signature kind in overload list conversion refactoring")}if(s!==a)return{renameFilename:void 0,renameLocation:void 0,edits:r_e.ChangeTracker.with(e,(e=>{e.replaceNodeRange(t,i[0],i[i.length-1],s)}))};function c(e){const t=e[e.length-1];return uu(t)&&t.body&&(e=e.slice(0,e.length-1)),YC.createNodeArray([YC.createParameterDeclaration(void 0,YC.createToken(26),"args",void 0,YC.createUnionTypeNode(O(e,l)))])}function l(e){const t=O(e.parameters,u);return iw(YC.createTupleTypeNode(t),Q(t,(e=>!!p(gw(e))))?0:1)}function u(e){xn.assert(qD(e.name));const t=sI(YC.createNamedTupleMember(e.dotDotDotToken,e.name,e.questionToken,e.type||YC.createKeywordTypeNode(133)),e),n=e.symbol&&e.symbol.getDocumentationComment(o);if(n){const e=S7(n);e.length&&hw(t,[{text:`*\n${e.split("\n").map((e=>` * ${e}`)).join("\n")}\n `,kind:3,pos:-1,end:-1,hasTrailingNewLine:!0,hasLeadingNewline:!0}])}return t}},getAvailableActions:function(e){const{file:t,startPosition:n,program:r}=e;return v3(t,n,r)?[{name:m3,description:g3,actions:[h3]}]:u}});var b3="Add or remove braces in an arrow function",x3=tS(va.Add_or_remove_braces_in_an_arrow_function),S3={name:"Add braces to arrow function",description:tS(va.Add_braces_to_arrow_function),kind:"refactor.rewrite.arrow.braces.add"},k3={name:"Remove braces from arrow function",description:tS(va.Remove_braces_from_arrow_function),kind:"refactor.rewrite.arrow.braces.remove"};function T3(e,t,n=!0,r){const i=kX(e,t),o=Qf(i);if(!o)return{error:tS(va.Could_not_find_a_containing_arrow_function)};if(!rP(o))return{error:tS(va.Containing_function_is_not_an_arrow_function)};if(XG(o,i)&&(!XG(o.body,i)||n)){if(t3(S3.kind,r)&&Xu(o.body))return{func:o,addBraces:!0,expression:o.body};if(t3(k3.kind,r)&&DP(o.body)&&1===o.body.statements.length){const e=Te(o.body.statements);if(BP(e))return{func:o,addBraces:!1,expression:e.expression&&HE(Bx(e.expression,!1))?YC.createParenthesizedExpression(e.expression):e.expression,returnStatement:e}}}}z2(b3,{kinds:[k3.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r}=e,i=T3(n,r);xn.assert(i&&!e3(i),"Expected applicable refactor info");const{expression:o,returnStatement:a,func:s}=i;let c;if(t===S3.name){const e=YC.createReturnStatement(o);c=YC.createBlock([e],!0),qY(o,e,n,3,!0)}else if(t===k3.name&&a){const e=o||YC.createVoidZero();c=HY(e)?YC.createParenthesizedExpression(e):e,UY(a,c,n,3,!1),qY(a,c,n,3,!1),VY(a,c,n,3,!1)}else xn.fail("invalid action");return{renameFilename:void 0,renameLocation:void 0,edits:r_e.ChangeTracker.with(e,(e=>{e.replaceNode(n,s.body,c)}))}},getAvailableActions:function(e){const{file:t,startPosition:n,triggerReason:r}=e,i=T3(t,n,"invoked"===r);return i?e3(i)?e.preferences.provideRefactorNotApplicableReason?[{name:b3,description:x3,actions:[{...S3,notApplicableReason:i.error},{...k3,notApplicableReason:i.error}]}]:u:[{name:b3,description:x3,actions:[i.addBraces?S3:k3]}]:u}});var C3={},w3="Convert arrow function or function expression",D3=tS(va.Convert_arrow_function_or_function_expression),E3={name:"Convert to anonymous function",description:tS(va.Convert_to_anonymous_function),kind:"refactor.rewrite.function.anonymous"},P3={name:"Convert to named function",description:tS(va.Convert_to_named_function),kind:"refactor.rewrite.function.named"},N3={name:"Convert to arrow function",description:tS(va.Convert_to_arrow_function),kind:"refactor.rewrite.function.arrow"};function F3(e){let t=!1;return e.forEachChild((function e(n){WG(n)?t=!0:gu(n)||HP(n)||nP(n)||LI(n,e)})),t}function A3(e,t,n){const r=kX(e,t),i=n.getTypeChecker(),o=function(e,t,n){if(!function(e){return KP(e)||WP(e)&&1===e.declarations.length}(n))return;const r=(KP(n)?n:Te(n.declarations)).initializer;return r&&(rP(r)||nP(r)&&!O3(e,t,r))?r:void 0}(e,i,r.parent);if(o&&!F3(o.body)&&!i.containsArgumentsReference(o))return{selectedVariableDeclaration:!0,func:o};const a=Qf(r);if(a&&(nP(a)||rP(a))&&!XG(a.body,r)&&!F3(a.body)&&!i.containsArgumentsReference(a)){if(nP(a)&&O3(e,i,a))return;return{selectedVariableDeclaration:!1,func:a}}}function I3(e){if(Xu(e)){const t=YC.createReturnStatement(e),n=e.getSourceFile();return sI(t,e),MY(t),UY(e,t,n,void 0,!0),YC.createBlock([t],!0)}return e}function O3(e,t,n){return!!n.name&&Rse.Core.isSymbolReferencedInFile(n.name,t,e)}z2(w3,{kinds:[E3.kind,P3.kind,N3.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r,program:i}=e,o=A3(n,r,i);if(!o)return;const{func:a}=o,s=[];switch(t){case E3.name:s.push(...function(e,t){const{file:n}=e,r=I3(t.body),i=YC.createFunctionExpression(t.modifiers,t.asteriskToken,void 0,t.typeParameters,t.parameters,t.type,r);return r_e.ChangeTracker.with(e,(e=>e.replaceNode(n,t,i)))}(e,a));break;case P3.name:const t=function(e){const t=e.parent;if(!KP(t)||!Mf(t))return;const n=t.parent,r=n.parent;return WP(n)&&EP(r)&&qD(t.name)?{variableDeclaration:t,variableDeclarationList:n,statement:r,name:t.name}:void 0}(a);if(!t)return;s.push(...function(e,t,n){const{file:r}=e,i=I3(t.body),{variableDeclaration:o,variableDeclarationList:a,statement:s,name:c}=n;LY(s);const l=32&cc(o)|Qv(t),u=YC.createModifiersFromModifierFlags(l),_=YC.createFunctionDeclaration(p(u)?u:void 0,t.asteriskToken,c,t.typeParameters,t.parameters,t.type,i);return 1===a.declarations.length?r_e.ChangeTracker.with(e,(e=>e.replaceNode(r,s,_))):r_e.ChangeTracker.with(e,(e=>{e.delete(r,o),e.insertNodeAfter(r,s,_)}))}(e,a,t));break;case N3.name:if(!nP(a))return;s.push(...function(e,t){const{file:n}=e,r=t.body.statements[0];let i;!function(e,t){return 1===e.statements.length&&BP(t)&&!!t.expression}(t.body,r)?i=t.body:(i=r.expression,MY(i),RY(r,i));const o=YC.createArrowFunction(t.modifiers,t.typeParameters,t.parameters,t.type,YC.createToken(39),i);return r_e.ChangeTracker.with(e,(e=>e.replaceNode(n,t,o)))}(e,a));break;default:return xn.fail("invalid action")}return{renameFilename:void 0,renameLocation:void 0,edits:s}},getAvailableActions:function(e){const{file:t,startPosition:n,program:r,kind:i}=e,o=A3(t,n,r);if(!o)return u;const{selectedVariableDeclaration:a,func:s}=o,c=[],l=[];if(t3(P3.kind,i)){const e=a||rP(s)&&KP(s.parent)?void 0:tS(va.Could_not_convert_to_named_function);e?l.push({...P3,notApplicableReason:e}):c.push(P3)}if(t3(E3.kind,i)){const e=!a&&rP(s)?void 0:tS(va.Could_not_convert_to_anonymous_function);e?l.push({...E3,notApplicableReason:e}):c.push(E3)}if(t3(N3.kind,i)){const e=nP(s)?void 0:tS(va.Could_not_convert_to_arrow_function);e?l.push({...N3,notApplicableReason:e}):c.push(N3)}return[{name:w3,description:D3,actions:0===c.length&&e.preferences.provideRefactorNotApplicableReason?l:c}]}});var M3={},L3="Convert parameters to destructured object",j3=tS(va.Convert_parameters_to_destructured_object),R3={name:L3,description:j3,kind:"refactor.rewrite.parameters.toDestructured"};function B3(e,t){const n=O7(e);if(n){const e=t.getContextualTypeForObjectLiteralElement(n),r=null==e?void 0:e.getSymbol();if(r&&!(6&px(r)))return r}}function J3(e){const t=e.node;return fN(t.parent)||oN(t.parent)||rN(t.parent)||_N(t.parent)||yN(t.parent)||mN(t.parent)?t:void 0}function z3(e){if(h_(e.node.parent))return e.node}function $3(e){if(e.node.parent){const t=e.node,n=t.parent;switch(n.kind){case 213:case 214:const e=lt(n,$u);if(e&&e.expression===t)return e;break;case 211:const r=lt(n,GE);if(r&&r.parent&&r.name===t){const e=lt(r.parent,$u);if(e&&e.expression===r)return e}break;case 212:const i=lt(n,XE);if(i&&i.parent&&i.argumentExpression===t){const e=lt(i.parent,$u);if(e&&e.expression===i)return e}}}}function q3(e){if(e.node.parent){const t=e.node,n=t.parent;switch(n.kind){case 211:const e=lt(n,GE);if(e&&e.expression===t)return e;break;case 212:const r=lt(n,XE);if(r&&r.expression===t)return r}}}function V3(e){const t=e.node;if(2===yG(t)||yb(t.parent))return t}function U3(e,t,n){const r=SX(e,t),i=Yf(r);if(!function(e){const t=mc(e,P_);if(t){const e=mc(t,(e=>!P_(e)));return!!e&&uu(e)}return!1}(r))return!(i&&function(e,t){var n;if(!function(e,t){return function(e){return G3(e)?e.length-1:e.length}(e)>=1&&x(e,(e=>function(e,t){if(U_(e)){const n=t.getTypeAtLocation(e);if(!t.isArrayType(n)&&!t.isTupleType(n))return!1}return!e.modifiers&&qD(e.name)}(e,t)))}(e.parameters,t))return!1;switch(e.kind){case 262:return W3(e)&&K3(e,t);case 174:if(HE(e.parent)){const r=B3(e.name,t);return 1===(null==(n=null==r?void 0:r.declarations)?void 0:n.length)&&K3(e,t)}return K3(e,t);case 176:return GP(e.parent)?W3(e.parent)&&K3(e,t):H3(e.parent.parent)&&K3(e,t);case 218:case 219:return H3(e.parent)}return!1}(i,n)&&XG(i,r))||i.body&&XG(i.body,r)?void 0:i}function K3(e,t){return!!e.body&&!t.isImplementationOfOverload(e)}function W3(e){return!!e.name||!!zQ(e,90)}function H3(e){return KP(e)&&af(e)&&qD(e.name)&&!e.type}function G3(e){return e.length>0&&WG(e[0].name)}function X3(e){return G3(e)&&(e=YC.createNodeArray(e.slice(1),e.hasTrailingComma)),e}function Q3(e,t){const n=X3(e.parameters),r=U_(De(n)),i=O(r?t.slice(0,n.length-1):t,((e,t)=>{const r=(i=Z3(n[t]),qD(o=e)&&Hh(o)===i?YC.createShorthandPropertyAssignment(i):YC.createPropertyAssignment(i,o));var i,o;return MY(r.name),BN(r)&&MY(r.initializer),RY(e,r),r}));if(r&&t.length>=n.length){const e=t.slice(n.length-1),r=YC.createPropertyAssignment(Z3(De(n)),YC.createArrayLiteralExpression(e));i.push(r)}return YC.createObjectLiteralExpression(i,!1)}function Y3(e,t,n){const r=t.getTypeChecker(),i=X3(e.parameters),o=O(i,(function(e){const t=YC.createBindingElement(void 0,void 0,Z3(e),U_(e)&&_(e)?YC.createArrayLiteralExpression():e.initializer);return MY(t),e.initializer&&t.initializer&&RY(e.initializer,t.initializer),t})),a=YC.createObjectBindingPattern(o),s=function(e){const t=O(e,u);return ow(YC.createTypeLiteralNode(t),1)}(i);let c;x(i,_)&&(c=YC.createObjectLiteralExpression());const l=YC.createParameterDeclaration(void 0,void 0,a,void 0,s,c);if(G3(e.parameters)){const t=e.parameters[0],n=YC.createParameterDeclaration(void 0,void 0,t.name,void 0,t.type);return MY(n.name),RY(t.name,n.name),t.type&&(MY(n.type),RY(t.type,n.type)),YC.createNodeArray([n,l])}return YC.createNodeArray([l]);function u(e){let i=e.type;var o;i||!e.initializer&&!U_(e)||(o=e,i=nZ(r.getTypeAtLocation(o),o,t,n));const a=YC.createPropertySignature(void 0,Z3(e),_(e)?YC.createToken(58):e.questionToken,i);return MY(a),RY(e.name,a.name),e.type&&a.type&&RY(e.type,a.type),a}function _(e){if(U_(e)){const t=r.getTypeAtLocation(e);return!r.isTupleType(t)}return r.isOptionalParameter(e)}}function Z3(e){return Hh(e.name)}z2(L3,{kinds:[R3.kind],getEditsForAction:function(e,t){xn.assert(t===L3,"Unexpected action name");const{file:n,startPosition:r,program:i,cancellationToken:o,host:a}=e,s=U3(n,r,i.getTypeChecker());if(!s||!o)return;const c=function(e,t,n){const r=function(e){switch(e.kind){case 262:return e.name?[e.name]:[xn.checkDefined(zQ(e,90),"Nameless function declaration should be a default export")];case 174:return[e.name];case 176:const t=xn.checkDefined(uX(e,137,e.getSourceFile()),"Constructor declaration should have constructor keyword");return 231===e.parent.kind?[e.parent.parent.name,t]:[t];case 219:return[e.parent.name];case 218:return e.name?[e.name,e.parent.name]:[e.parent.name];default:return xn.assertNever(e,`Unexpected function declaration kind ${e.kind}`)}}(e),i=fE(e)?function(e){switch(e.parent.kind){case 263:const t=e.parent;return t.name?[t.name]:[xn.checkDefined(zQ(t,90),"Nameless class declaration should be a default export")];case 231:const n=e.parent,r=e.parent.parent,i=n.name;return i?[i,r.name]:[r.name]}}(e):[],o=ne([...r,...i],wt),a=t.getTypeChecker(),s=function(t){const n={accessExpressions:[],typeUsages:[]},o={functionCalls:[],declarations:[],classReferences:n,valid:!0},s=O(r,c),l=O(i,c),u=fE(e),_=O(r,(e=>B3(e,a)));for(const r of t){if(r.kind===Rse.EntryKind.Span){o.valid=!1;continue}if(D(_,c(r.node))){if(_E(d=r.node.parent)&&(XP(d.parent)||CE(d.parent))){o.signature=r.node.parent;continue}const e=$3(r);if(e){o.functionCalls.push(e);continue}}const t=B3(r.node,a);if(t&&D(_,t)){const e=z3(r);if(e){o.declarations.push(e);continue}}if(D(s,c(r.node))||xG(r.node)){if(J3(r))continue;const e=z3(r);if(e){o.declarations.push(e);continue}const t=$3(r);if(t){o.functionCalls.push(t);continue}}if(u&&D(l,c(r.node))){if(J3(r))continue;const t=z3(r);if(t){o.declarations.push(t);continue}const i=q3(r);if(i){n.accessExpressions.push(i);continue}if(GP(e.parent)){const e=V3(r);if(e){n.typeUsages.push(e);continue}}}o.valid=!1}var d;return o}(R(o,(e=>Rse.getReferenceEntriesForNode(-1,e,t,t.getSourceFiles(),n))));return x(s.declarations,(e=>D(o,e)))||(s.valid=!1),s;function c(e){const t=a.getSymbolAtLocation(e);return t&&CY(t,a)}}(s,i,o);if(c.valid){const t=r_e.ChangeTracker.with(e,(e=>function(e,t,n,r,i,o){const a=o.signature,s=O(Y3(i,t,n),(e=>NY(e)));a&&l(a,O(Y3(a,t,n),(e=>NY(e)))),l(i,s);const c=oe(o.functionCalls,((e,t)=>Nt(e.pos,t.pos)));for(const e of c)if(e.arguments&&e.arguments.length){const t=NY(Q3(i,e.arguments),!0);r.replaceNodeRange(Sd(e),Te(e.arguments),De(e.arguments),t,{leadingTriviaOption:r_e.LeadingTriviaOption.IncludeAll,trailingTriviaOption:r_e.TrailingTriviaOption.Include})}function l(t,n){r.replaceNodeRangeWithNodes(e,Te(t.parameters),De(t.parameters),n,{joiner:", ",indentation:0,leadingTriviaOption:r_e.LeadingTriviaOption.IncludeAll,trailingTriviaOption:r_e.TrailingTriviaOption.Include})}}(n,i,a,e,s,c)));return{renameFilename:void 0,renameLocation:void 0,edits:t}}return{edits:[]}},getAvailableActions:function(e){const{file:t,startPosition:n}=e;return Im(t)?u:U3(t,n,e.program.getTypeChecker())?[{name:L3,description:j3,actions:[R3]}]:u}});var e4={},t4="Convert to template string",n4=tS(va.Convert_to_template_string),r4={name:t4,description:n4,kind:"refactor.rewrite.string"};function i4(e,t){const n=kX(e,t),r=a4(n);return!s4(r).isValidConcatenation&&tP(r.parent)&&uP(r.parent.parent)?r.parent.parent:n}function o4(e,t){const n=a4(t),r=e.file,i=function({nodes:e,operators:t},n){const r=((e,t)=>(n,r)=>{n(r,i)=>{for(;r.length>0;){const o=r.shift();VY(e[o],i,t,3,!1),n(o,i)}})(e,n,r),[o,a,s,c]=l4(0,e);if(o===e.length){const e=YC.createNoSubstitutionTemplateLiteral(a,s);return i(c,e),e}const l=[],u=YC.createTemplateHead(a,s);i(c,u);for(let t=o;t{u4(e);const r=t===n.templateSpans.length-1,i=e.literal.text+(r?a:""),o=c4(e.literal)+(r?s:"");return YC.createTemplateSpan(e.expression,u&&r?YC.createTemplateTail(i,o):YC.createTemplateMiddle(i,o))}));l.push(...e)}else{const e=u?YC.createTemplateTail(a,s):YC.createTemplateMiddle(a,s);i(c,e),l.push(YC.createTemplateSpan(n,e))}}return YC.createTemplateExpression(u,l)}(s4(n),r),o=bs(r.text,n.end);if(o){const t=o[o.length-1],a={pos:o[0].pos,end:t.end};return r_e.ChangeTracker.with(e,(e=>{e.deleteRange(r,a),e.replaceNode(r,n,i)}))}return r_e.ChangeTracker.with(e,(e=>e.replaceNode(r,n,i)))}function a4(e){return mc(e.parent,(e=>{switch(e.kind){case 211:case 212:return!1;case 228:case 226:return!(uP(e.parent)&&(t=e.parent,64!==t.operatorToken.kind&&65!==t.operatorToken.kind));default:return"quit"}var t}))||e}function s4(e){const t=e=>{if(!uP(e))return{nodes:[e],operators:[],validOperators:!0,hasString:wD(e)||PD(e)};const{nodes:n,operators:r,hasString:i,validOperators:o}=t(e.left);if(!(i||wD(e.right)||dP(e.right)))return{nodes:[e],operators:[],hasString:!1,validOperators:!0};const a=40===e.operatorToken.kind,s=o&&a;return n.push(e.right),r.push(e.operatorToken),{nodes:n,operators:r,hasString:!0,validOperators:s}},{nodes:n,operators:r,validOperators:i,hasString:o}=t(e);return{nodes:n,operators:r,isValidConcatenation:i&&o}}function c4(e){const t=ND(e)||FD(e)?-2:-1;return Gd(e).slice(1,t)}function l4(e,t){const n=[];let r="",i="";for(;e"\\"===e[0]?e:"\\"+e)),n.push(e),e++}return[e,r,i,n]}function u4(e){const t=e.getSourceFile();VY(e,e.expression,t,3,!1),UY(e.expression,e.expression,t,3,!1)}function _4(e){return tP(e)&&(u4(e),e=e.expression),e}z2(t4,{kinds:[r4.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r}=e,i=i4(n,r);return t===n4?{edits:o4(e,i)}:xn.fail("invalid action")},getAvailableActions:function(e){const{file:t,startPosition:n}=e,r=a4(i4(t,n)),i=wD(r),o={name:t4,description:n4,actions:[]};return i&&"invoked"!==e.triggerReason?u:Tm(r)&&(i||uP(r)&&s4(r).isValidConcatenation)?(o.actions.push(r4),[o]):e.preferences.provideRefactorNotApplicableReason?(o.actions.push({...r4,notApplicableReason:tS(va.Can_only_convert_string_concatenations_and_string_literals)}),[o]):u}});var d4={},p4="Convert to optional chain expression",f4=tS(va.Convert_to_optional_chain_expression),m4={name:p4,description:f4,kind:"refactor.rewrite.expression.optionalChain"};function g4(e){return uP(e)||_P(e)}function h4(e){return g4(e)||function(e){return NP(e)||BP(e)||EP(e)}(e)}function y4(e,t=!0){const{file:n,program:r}=e,i=wZ(e),o=0===i.length;if(o&&!t)return;const a=kX(n,i.start),s=wX(n,i.start+i.length),c=Xs(a.pos,s&&s.end>=a.pos?s.getEnd():a.getEnd()),l=o?function(e){for(;e.parent;){if(h4(e)&&!h4(e.parent))return e;e=e.parent}}(a):function(e,t){for(;e.parent;){if(h4(e)&&0!==t.length&&e.end>=t.start+t.length)return e;e=e.parent}}(a,c),u=l&&h4(l)?function(e){if(g4(e))return e;if(EP(e)){const t=Mg(e),n=null==t?void 0:t.initializer;return n&&g4(n)?n:void 0}return e.expression&&g4(e.expression)?e.expression:void 0}(l):void 0;if(!u)return{error:tS(va.Could_not_find_convertible_access_expression)};const _=r.getTypeChecker();return _P(u)?function(e,t){const n=e.condition,r=S4(e.whenTrue);if(!r||t.isNullableType(t.getTypeAtLocation(r)))return{error:tS(va.Could_not_find_convertible_access_expression)};if((GE(n)||qD(n))&&b4(n,r.expression))return{finalExpression:r,occurrences:[n],expression:e};if(uP(n)){const t=v4(r.expression,n);return t?{finalExpression:r,occurrences:t,expression:e}:{error:tS(va.Could_not_find_matching_access_expressions)}}}(u,_):function(e){if(56!==e.operatorToken.kind)return{error:tS(va.Can_only_convert_logical_AND_access_chains)};const t=S4(e.right);if(!t)return{error:tS(va.Could_not_find_convertible_access_expression)};const n=v4(t.expression,e.left);return n?{finalExpression:t,occurrences:n,expression:e}:{error:tS(va.Could_not_find_matching_access_expressions)}}(u)}function v4(e,t){const n=[];for(;uP(t)&&56===t.operatorToken.kind;){const r=b4(lh(e),lh(t.right));if(!r)break;n.push(r),e=r,t=t.left}const r=b4(e,t);return r&&n.push(r),n.length>0?n:void 0}function b4(e,t){if(qD(t)||GE(t)||XE(t))return function(e,t){for(;(QE(e)||GE(e)||XE(e))&&x4(e)!==x4(t);)e=e.expression;for(;GE(e)&&GE(t)||XE(e)&&XE(t);){if(x4(e)!==x4(t))return!1;e=e.expression,t=t.expression}return qD(e)&&qD(t)&&e.getText()===t.getText()}(e,t)?t:void 0}function x4(e){return qD(e)||$h(e)?e.getText():GE(e)?x4(e.name):XE(e)?x4(e.argumentExpression):void 0}function S4(e){return uP(e=lh(e))?S4(e.left):(GE(e)||XE(e)||QE(e))&&!Sl(e)?e:void 0}function k4(e,t,n){if(GE(t)||XE(t)||QE(t)){const r=k4(e,t.expression,n),i=n.length>0?n[n.length-1]:void 0,o=(null==i?void 0:i.getText())===t.expression.getText();if(o&&n.pop(),QE(t))return o?YC.createCallChain(r,YC.createToken(29),t.typeArguments,t.arguments):YC.createCallChain(r,t.questionDotToken,t.typeArguments,t.arguments);if(GE(t))return o?YC.createPropertyAccessChain(r,YC.createToken(29),t.name):YC.createPropertyAccessChain(r,t.questionDotToken,t.name);if(XE(t))return o?YC.createElementAccessChain(r,YC.createToken(29),t.argumentExpression):YC.createElementAccessChain(r,t.questionDotToken,t.argumentExpression)}return t}z2(p4,{kinds:[m4.kind],getEditsForAction:function(e,t){const n=y4(e);return xn.assert(n&&!e3(n),"Expected applicable refactor info"),{edits:r_e.ChangeTracker.with(e,(t=>function(e,t,n,r,i){const{finalExpression:o,occurrences:a,expression:s}=r,c=a[a.length-1],l=k4(t,o,a);l&&(GE(l)||XE(l)||QE(l))&&(uP(s)?n.replaceNodeRange(e,c,o,l):_P(s)&&n.replaceNode(e,s,YC.createBinaryExpression(l,YC.createToken(61),s.whenFalse)))}(e.file,e.program.getTypeChecker(),t,n))),renameFilename:void 0,renameLocation:void 0}},getAvailableActions:function(e){const t=y4(e,"invoked"===e.triggerReason);return t?e3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:p4,description:f4,actions:[{...m4,notApplicableReason:t.error}]}]:u:[{name:p4,description:f4,actions:[m4]}]:u}});var T4={};o(T4,{Messages:()=>C4,RangeFacts:()=>F4,getRangeToExtract:()=>A4,getRefactorActionsToExtractSymbol:()=>P4,getRefactorEditsToExtractSymbol:()=>N4});var C4,w4="Extract Symbol",D4={name:"Extract Constant",description:tS(va.Extract_constant),kind:"refactor.extract.constant"},E4={name:"Extract Function",description:tS(va.Extract_function),kind:"refactor.extract.function"};function P4(e){const t=e.kind,n=A4(e.file,wZ(e),"invoked"===e.triggerReason),r=n.targetRange;if(void 0===r){if(!n.errors||0===n.errors.length||!e.preferences.provideRefactorNotApplicableReason)return u;const r=[];return t3(E4.kind,t)&&r.push({name:w4,description:E4.description,actions:[{...E4,notApplicableReason:m(n.errors)}]}),t3(D4.kind,t)&&r.push({name:w4,description:D4.description,actions:[{...D4,notApplicableReason:m(n.errors)}]}),r}const{affectedTextRange:i,extractions:o}=function(e,t){const{scopes:n,affectedTextRange:r,readsAndWrites:{functionErrorsPerScope:i,constantErrorsPerScope:o}}=M4(e,t),a=n.map(((e,t)=>{const n=function(e){return uu(e)?"inner function":gu(e)?"method":"function"}(e),r=function(e){return gu(e)?"readonly field":"constant"}(e),a=uu(e)?function(e){switch(e.kind){case 176:return"constructor";case 218:case 262:return e.name?`function '${e.name.text}'`:tZ;case 219:return"arrow function";case 174:return`method '${e.name.getText()}'`;case 177:return`'get ${e.name.getText()}'`;case 178:return`'set ${e.name.getText()}'`;default:xn.assertNever(e,`Unexpected scope kind ${e.kind}`)}}(e):gu(e)?function(e){return 263===e.kind?e.name?`class '${e.name.text}'`:"anonymous class declaration":e.name?`class expression '${e.name.text}'`:"anonymous class expression"}(e):function(e){return 268===e.kind?`namespace '${e.parent.name.getText()}'`:e.externalModuleIndicator?0:1}(e);let s,c;return 1===a?(s=Yx(tS(va.Extract_to_0_in_1_scope),[n,"global"]),c=Yx(tS(va.Extract_to_0_in_1_scope),[r,"global"])):0===a?(s=Yx(tS(va.Extract_to_0_in_1_scope),[n,"module"]),c=Yx(tS(va.Extract_to_0_in_1_scope),[r,"module"])):(s=Yx(tS(va.Extract_to_0_in_1),[n,a]),c=Yx(tS(va.Extract_to_0_in_1),[r,a])),0!==t||gu(e)||(c=Yx(tS(va.Extract_to_0_in_enclosing_scope),[r])),{functionExtraction:{description:s,errors:i[t]},constantExtraction:{description:c,errors:o[t]}}}));return{affectedTextRange:r,extractions:a}}(r,e);if(void 0===o)return u;const a=[],s=new Map;let c;const l=[],_=new Map;let d,p=0;for(const{functionExtraction:n,constantExtraction:r}of o){if(t3(E4.kind,t)){const t=n.description;0===n.errors.length?s.has(t)||(s.set(t,!0),a.push({description:t,name:`function_scope_${p}`,kind:E4.kind,range:{start:{line:Xa(e.file,i.pos).line,offset:Xa(e.file,i.pos).character},end:{line:Xa(e.file,i.end).line,offset:Xa(e.file,i.end).character}}})):c||(c={description:t,name:`function_scope_${p}`,notApplicableReason:m(n.errors),kind:E4.kind})}if(t3(D4.kind,t)){const t=r.description;0===r.errors.length?_.has(t)||(_.set(t,!0),l.push({description:t,name:`constant_scope_${p}`,kind:D4.kind,range:{start:{line:Xa(e.file,i.pos).line,offset:Xa(e.file,i.pos).character},end:{line:Xa(e.file,i.end).line,offset:Xa(e.file,i.end).character}}})):d||(d={description:t,name:`constant_scope_${p}`,notApplicableReason:m(r.errors),kind:D4.kind})}p++}const f=[];return a.length?f.push({name:w4,description:tS(va.Extract_function),actions:a}):e.preferences.provideRefactorNotApplicableReason&&c&&f.push({name:w4,description:tS(va.Extract_function),actions:[c]}),l.length?f.push({name:w4,description:tS(va.Extract_constant),actions:l}):e.preferences.provideRefactorNotApplicableReason&&d&&f.push({name:w4,description:tS(va.Extract_constant),actions:[d]}),f.length?f:u;function m(e){let t=e[0].messageText;return"string"!=typeof t&&(t=t.messageText),t}}function N4(e,t){const n=A4(e.file,wZ(e)).targetRange,r=/^function_scope_(\d+)$/.exec(t);if(r){const t=+r[1];return xn.assert(isFinite(t),"Expected to parse a finite number from the function scope index"),function(e,t,n){const{scopes:r,readsAndWrites:{target:i,usagesPerScope:o,functionErrorsPerScope:a,exposedVariableDeclarations:s}}=M4(e,t);return xn.assert(!a[n].length,"The extraction went missing? How?"),t.cancellationToken.throwIfCancellationRequested(),function(e,t,{usages:n,typeParameterUsages:r,substitutions:i},o,a,s){const c=s.program.getTypeChecker(),l=wS(s.program.getCompilerOptions()),_=a8.createImportAdder(s.file,s.program,s.preferences,s.host),d=t.getSourceFile(),p=zY(gu(t)?"newMethod":"newFunction",d),f=Mm(t),m=YC.createIdentifier(p);let g;const h=[],y=[];let v;n.forEach(((e,n)=>{let r;if(!f){let n=c.getTypeOfSymbolAtLocation(e.symbol,e.node);n=c.getBaseTypeOfLiteralType(n),r=a8.typeToAutoImportableTypeNode(c,_,n,t,l,1)}const i=YC.createParameterDeclaration(void 0,void 0,n,void 0,r);h.push(i),2===e.usage&&(v||(v=[])).push(e),y.push(YC.createIdentifier(n))}));const b=$e(r.values(),(e=>({type:e,declaration:L4(e,s.startPosition)}))).sort(j4),x=0===b.length?void 0:q(b,(({declaration:e})=>e)),k=void 0!==x?x.map((e=>YC.createTypeReferenceNode(e.name,void 0))):void 0;if(Xu(e)&&!f){const n=c.getContextualType(e);g=c.typeToTypeNode(n,t,1)}const{body:T,returnValueProperty:C}=function(e,t,n,r,i){const o=void 0!==n||t.length>0;if(DP(e)&&!o&&0===r.size)return{body:YC.createBlock(e.statements,!0),returnValueProperty:void 0};let a,s=!1;const c=YC.createNodeArray(DP(e)?e.statements.slice(0):[b_(e)?e:YC.createReturnStatement(lh(e))]);if(o||r.size){const l=VB(c,(function e(i){if(!s&&BP(i)&&o){const r=R4(t,n);return i.expression&&(a||(a="__return"),r.unshift(YC.createPropertyAssignment(a,qB(i.expression,e,Xu)))),1===r.length?YC.createReturnStatement(r[0].name):YC.createReturnStatement(YC.createObjectLiteralExpression(r))}{const t=s;s=s||uu(i)||gu(i);const n=r.get(IB(i).toString()),o=n?NY(n):ZB(i,e,void 0);return s=t,o}}),b_).slice();if(o&&!i&&b_(e)){const e=R4(t,n);1===e.length?l.push(YC.createReturnStatement(e[0].name)):l.push(YC.createReturnStatement(YC.createObjectLiteralExpression(e)))}return{body:YC.createBlock(l,!0),returnValueProperty:a}}return{body:YC.createBlock(c,!0),returnValueProperty:void 0}}(e,o,v,i,!!(1&a.facts));let w;MY(T);const D=!!(16&a.facts);if(gu(t)){const e=f?[]:[YC.createModifier(123)];32&a.facts&&e.push(YC.createModifier(126)),4&a.facts&&e.push(YC.createModifier(134)),w=YC.createMethodDeclaration(e.length?e:void 0,2&a.facts?YC.createToken(42):void 0,m,void 0,x,h,g,T)}else D&&h.unshift(YC.createParameterDeclaration(void 0,void 0,"this",void 0,c.typeToTypeNode(c.getTypeAtLocation(a.thisNode),t,1),void 0)),w=YC.createFunctionDeclaration(4&a.facts?[YC.createToken(134)]:void 0,2&a.facts?YC.createToken(42):void 0,m,x,h,g,T);const E=r_e.ChangeTracker.fromContext(s),P=function(e,t){return S(function(e){if(uu(e)){const t=e.body;if(DP(t))return t.statements}else{if(eN(e)||qN(e))return e.statements;if(gu(e))return e.members}return u}(t),(t=>t.pos>=e&&uu(t)&&!fE(t)))}((B4(a.range)?De(a.range):a.range).end,t);P?E.insertNodeBefore(s.file,P,w,!0):E.insertNodeAtEndOfScope(s.file,t,w),_.writeFixes(E);const N=[],F=function(e,t,n){const r=YC.createIdentifier(n);if(gu(e)){const n=32&t.facts?YC.createIdentifier(e.name.text):YC.createThis();return YC.createPropertyAccessExpression(n,r)}return r}(t,a,p);D&&y.unshift(YC.createIdentifier("this"));let A=YC.createCallExpression(D?YC.createPropertyAccessExpression(F,"call"):F,k,y);if(2&a.facts&&(A=YC.createYieldExpression(YC.createToken(42),A)),4&a.facts&&(A=YC.createAwaitExpression(A)),z4(e)&&(A=YC.createJsxExpression(void 0,A)),o.length&&!v)if(xn.assert(!C,"Expected no returnValueProperty"),xn.assert(!(1&a.facts),"Expected RangeFacts.HasReturn flag to be unset"),1===o.length){const e=o[0];N.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(NY(e.name),void 0,NY(e.type),A)],e.parent.flags)))}else{const e=[],n=[];let r=o[0].parent.flags,i=!1;for(const a of o){e.push(YC.createBindingElement(void 0,void 0,NY(a.name)));const o=c.typeToTypeNode(c.getBaseTypeOfLiteralType(c.getTypeAtLocation(a)),t,1);n.push(YC.createPropertySignature(void 0,a.symbol.name,void 0,o)),i=i||void 0!==a.type,r&=a.parent.flags}const a=i?YC.createTypeLiteralNode(n):void 0;a&&iw(a,1),N.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(YC.createObjectBindingPattern(e),void 0,a,A)],r)))}else if(o.length||v){if(o.length)for(const e of o){let t=e.parent.flags;2&t&&(t=-3&t|1),N.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(e.symbol.name,void 0,M(e.type))],t)))}C&&N.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(C,void 0,M(g))],1)));const e=R4(o,v);C&&e.unshift(YC.createShorthandPropertyAssignment(C)),1===e.length?(xn.assert(!C,"Shouldn't have returnValueProperty here"),N.push(YC.createExpressionStatement(YC.createAssignment(e[0].name,A))),1&a.facts&&N.push(YC.createReturnStatement())):(N.push(YC.createExpressionStatement(YC.createAssignment(YC.createObjectLiteralExpression(e),A))),C&&N.push(YC.createReturnStatement(YC.createIdentifier(C))))}else 1&a.facts?N.push(YC.createReturnStatement(A)):B4(a.range)?N.push(YC.createExpressionStatement(A)):N.push(A);B4(a.range)?E.replaceNodeRangeWithNodes(s.file,Te(a.range),De(a.range),N):E.replaceNodeWithNodes(s.file,a.range,N);const I=E.getChanges(),O=(B4(a.range)?Te(a.range):a.range).getSourceFile().fileName;return{renameFilename:O,renameLocation:$Y(I,O,p,!1),edits:I};function M(e){if(void 0===e)return;const t=NY(e);let n=t;for(;ME(n);)n=n.type;return FE(n)&&S(n.types,(e=>157===e.kind))?t:YC.createUnionTypeNode([t,YC.createKeywordTypeNode(157)])}}(i,r[n],o[n],s,e,t)}(n,e,t)}const i=/^constant_scope_(\d+)$/.exec(t);if(i){const t=+i[1];return xn.assert(isFinite(t),"Expected to parse a finite number from the constant scope index"),function(e,t,n){const{scopes:r,readsAndWrites:{target:i,usagesPerScope:o,constantErrorsPerScope:a,exposedVariableDeclarations:s}}=M4(e,t);return xn.assert(!a[n].length,"The extraction went missing? How?"),xn.assert(0===s.length,"Extract constant accepted a range containing a variable declaration?"),t.cancellationToken.throwIfCancellationRequested(),function(e,t,{substitutions:n},r,i){const o=i.program.getTypeChecker(),a=t.getSourceFile(),s=n3(e,t,o,a),c=Mm(t);let l=c||!o.isContextSensitive(e)?void 0:o.typeToTypeNode(o.getContextualType(e),t,1),u=function(e,t){return t.size?function e(n){const r=t.get(IB(n).toString());return r?NY(r):ZB(n,e,void 0)}(e):e}(lh(e),n);({variableType:l,initializer:u}=function(n,r){if(void 0===n)return{variableType:n,initializer:r};if(!nP(r)&&!rP(r)||r.typeParameters)return{variableType:n,initializer:r};const i=o.getTypeAtLocation(e),a=Ee(o.getSignaturesOfType(i,0));if(!a)return{variableType:n,initializer:r};if(a.getTypeParameters())return{variableType:n,initializer:r};const s=[];let c=!1;for(const e of r.parameters)if(e.type)s.push(e);else{const n=o.getTypeAtLocation(e);n===o.getAnyType()&&(c=!0),s.push(YC.updateParameterDeclaration(e,e.modifiers,e.dotDotDotToken,e.name,e.questionToken,e.type||o.typeToTypeNode(n,t,1),e.initializer))}if(c)return{variableType:n,initializer:r};if(n=void 0,rP(r))r=YC.updateArrowFunction(r,cI(e)?Ac(e):void 0,r.typeParameters,s,r.type||o.typeToTypeNode(a.getReturnType(),t,1),r.equalsGreaterThanToken,r.body);else{if(a&&a.thisParameter){const n=Se(s);if(!n||qD(n.name)&&"this"!==n.name.escapedText){const n=o.getTypeOfSymbolAtLocation(a.thisParameter,e);s.splice(0,0,YC.createParameterDeclaration(void 0,void 0,"this",void 0,o.typeToTypeNode(n,t,1)))}}r=YC.updateFunctionExpression(r,cI(e)?Ac(e):void 0,r.asteriskToken,r.name,r.typeParameters,s,r.type||o.typeToTypeNode(a.getReturnType(),t,1),r.body)}return{variableType:n,initializer:r}}(l,u)),MY(u);const _=r_e.ChangeTracker.fromContext(i);if(gu(t)){xn.assert(!c,"Cannot extract to a JS class");const n=[];n.push(YC.createModifier(123)),32&r&&n.push(YC.createModifier(126)),n.push(YC.createModifier(148));const o=YC.createPropertyDeclaration(n,s,void 0,l,u);let a=YC.createPropertyAccessExpression(32&r?YC.createIdentifier(t.name.getText()):YC.createThis(),YC.createIdentifier(s));z4(e)&&(a=YC.createJsxExpression(void 0,a));const d=function(e,t){const n=t.members;let r;xn.assert(n.length>0,"Found no members");let i=!0;for(const t of n){if(t.pos>e)return r||n[0];if(i&&!uE(t)){if(void 0!==r)return t;i=!1}r=t}return void 0===r?xn.fail():r}(e.pos,t);_.insertNodeBefore(i.file,d,o,!0),_.replaceNode(i.file,e,a)}else{const n=YC.createVariableDeclaration(s,void 0,l,u),r=function(e,t){let n;for(;void 0!==e&&e!==t;){if(KP(e)&&e.initializer===n&&WP(e.parent)&&e.parent.declarations.length>1)return e;n=e,e=e.parent}}(e,t);if(r){_.insertNodeBefore(i.file,r,n);const t=YC.createIdentifier(s);_.replaceNode(i.file,e,t)}else if(244===e.parent.kind&&t===mc(e,O4)){const t=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([n],2));_.replaceNode(i.file,e.parent,t)}else{const r=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([n],2)),o=function(e,t){let n;xn.assert(!gu(t));for(let r=e;r!==t;r=r.parent)O4(r)&&(n=r);for(let r=(n||e).parent;;r=r.parent){if(XZ(r)){let t;for(const n of r.statements){if(n.pos>e.pos)break;t=n}return!t&&MN(r)?(xn.assert(zP(r.parent.parent),"Grandparent isn't a switch statement"),r.parent.parent):xn.checkDefined(t,"prevStatement failed to get set")}xn.assert(r!==t,"Didn't encounter a block-like before encountering scope")}}(e,t);if(0===o.pos?_.insertNodeAtTopOfFile(i.file,r,!1):_.insertNodeBefore(i.file,o,r,!1),244===e.parent.kind)_.delete(i.file,e.parent);else{let t=YC.createIdentifier(s);z4(e)&&(t=YC.createJsxExpression(void 0,t)),_.replaceNode(i.file,e,t)}}}const d=_.getChanges(),p=e.getSourceFile().fileName;return{renameFilename:p,renameLocation:$Y(d,p,s,!0),edits:d}}(Xu(i)?i:i.statements[0].expression,r[n],o[n],e.facts,t)}(n,e,t)}xn.fail("Unrecognized action name")}z2(w4,{kinds:[D4.kind,E4.kind],getEditsForAction:N4,getAvailableActions:P4}),(e=>{function t(e){return{message:e,code:0,category:3,key:e}}e.cannotExtractRange=t("Cannot extract range."),e.cannotExtractImport=t("Cannot extract import statement."),e.cannotExtractSuper=t("Cannot extract super call."),e.cannotExtractJSDoc=t("Cannot extract JSDoc."),e.cannotExtractEmpty=t("Cannot extract empty range."),e.expressionExpected=t("expression expected."),e.uselessConstantType=t("No reason to extract constant of type."),e.statementOrExpressionExpected=t("Statement or expression expected."),e.cannotExtractRangeContainingConditionalBreakOrContinueStatements=t("Cannot extract range containing conditional break or continue statements."),e.cannotExtractRangeContainingConditionalReturnStatement=t("Cannot extract range containing conditional return statement."),e.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange=t("Cannot extract range containing labeled break or continue with target outside of the range."),e.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators=t("Cannot extract range containing writes to references located outside of the target range in generators."),e.typeWillNotBeVisibleInTheNewScope=t("Type will not visible in the new scope."),e.functionWillNotBeVisibleInTheNewScope=t("Function will not visible in the new scope."),e.cannotExtractIdentifier=t("Select more than a single identifier."),e.cannotExtractExportedEntity=t("Cannot extract exported declaration"),e.cannotWriteInExpression=t("Cannot write back side-effects when extracting an expression"),e.cannotExtractReadonlyPropertyInitializerOutsideConstructor=t("Cannot move initialization of read-only class property outside of the constructor"),e.cannotExtractAmbientBlock=t("Cannot extract code from ambient contexts"),e.cannotAccessVariablesFromNestedScopes=t("Cannot access variables from nested scopes"),e.cannotExtractToJSClass=t("Cannot extract constant to a class scope in JS"),e.cannotExtractToExpressionArrowFunction=t("Cannot extract constant to an arrow function without a block"),e.cannotExtractFunctionsContainingThisToMethod=t("Cannot extract functions containing this to method")})(C4||(C4={}));var F4=(e=>(e[e.None=0]="None",e[e.HasReturn=1]="HasReturn",e[e.IsGenerator=2]="IsGenerator",e[e.IsAsyncFunction=4]="IsAsyncFunction",e[e.UsesThis=8]="UsesThis",e[e.UsesThisInFunction=16]="UsesThisInFunction",e[e.InStaticRegion=32]="InStaticRegion",e))(F4||{});function A4(e,t,n=!0){const{length:r}=t;if(0===r&&!n)return{errors:[aS(e,t.start,r,C4.cannotExtractEmpty)]};const i=0===r&&n,o=CX(e,t.start),a=wX(e,js(t)),s=o&&a&&n?function(e,t,n){const r=e.getStart(n);let i=t.getEnd();return 59===n.text.charCodeAt(i)&&i++,{start:r,length:i-r}}(o,a,e):t,c=i?function(e){return mc(e,(e=>e.parent&&J4(e)&&!uP(e.parent)))}(o):BQ(o,e,s),l=i?c:BQ(a,e,s);let u,_=0;if(!c||!l)return{errors:[aS(e,t.start,r,C4.cannotExtractRange)]};if(16777216&c.flags)return{errors:[aS(e,t.start,r,C4.cannotExtractJSDoc)]};if(c.parent!==l.parent)return{errors:[aS(e,t.start,r,C4.cannotExtractRange)]};if(c!==l){if(!XZ(c.parent))return{errors:[aS(e,t.start,r,C4.cannotExtractRange)]};const n=[];for(const e of c.parent.statements){if(e===c||n.length){const t=f(e);if(t)return{errors:t};n.push(e)}if(e===l)break}return n.length?{targetRange:{range:n,facts:_,thisNode:u}}:{errors:[aS(e,t.start,r,C4.cannotExtractRange)]}}if(BP(c)&&!c.expression)return{errors:[aS(e,t.start,r,C4.cannotExtractRange)]};const d=function(e){if(BP(e)){if(e.expression)return e.expression}else if(EP(e)||WP(e)){const t=EP(e)?e.declarationList.declarations:e.declarations;let n,r=0;for(const e of t)e.initializer&&(r++,n=e.initializer);if(1===r)return n}else if(KP(e)&&e.initializer)return e.initializer;return e}(c),p=function(e){if(qD(NP(e)?e.expression:e))return[Rp(e,C4.cannotExtractIdentifier)]}(d)||f(d);return p?{errors:p}:{targetRange:{range:I4(d),facts:_,thisNode:u}};function f(e){let n;var r;if((r=n||(n={}))[r.None=0]="None",r[r.Break=1]="Break",r[r.Continue=2]="Continue",r[r.Return=4]="Return",xn.assert(e.pos<=e.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"),xn.assert(!iT(e.pos),"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"),!(b_(e)||Tm(e)&&J4(e)||$4(e)))return[Rp(e,C4.statementOrExpressionExpected)];if(33554432&e.flags)return[Rp(e,C4.cannotExtractAmbientBlock)];const i=Zf(e);let o;i&&function(e,t){let n=e;for(;n!==t;){if(172===n.kind){Jv(n)&&(_|=32);break}if(169===n.kind){176===Qf(n).kind&&(_|=32);break}174===n.kind&&Jv(n)&&(_|=32),n=n.parent}}(e,i);let a,s=4;if(function e(n){if(o)return!0;if(h_(n)&&Bv(260===n.kind?n.parent.parent:n,32))return(o||(o=[])).push(Rp(n,C4.cannotExtractExportedEntity)),!0;switch(n.kind){case 272:return(o||(o=[])).push(Rp(n,C4.cannotExtractImport)),!0;case 277:return(o||(o=[])).push(Rp(n,C4.cannotExtractExportedEntity)),!0;case 108:if(213===n.parent.kind){const e=Zf(n);if(void 0===e||e.pos=t.start+t.length)return(o||(o=[])).push(Rp(n,C4.cannotExtractSuper)),!0}else _|=8,u=n;break;case 219:LI(n,(function e(t){if(WG(t))_|=8,u=n;else{if(gu(t)||cu(t)&&!rP(t))return!1;LI(t,e)}}));case 263:case 262:qN(n.parent)&&void 0===n.parent.externalModuleIndicator&&(o||(o=[])).push(Rp(n,C4.functionWillNotBeVisibleInTheNewScope));case 231:case 218:case 174:case 176:case 177:case 178:return!1}const r=s;switch(n.kind){case 245:s&=-5;break;case 258:s=0;break;case 241:n.parent&&258===n.parent.kind&&n.parent.finallyBlock===n&&(s=4);break;case 297:case 296:s|=1;break;default:Zu(n,!1)&&(s|=3)}switch(n.kind){case 197:case 110:_|=8,u=n;break;case 256:{const t=n.label;(a||(a=[])).push(t.escapedText),LI(n,e),a.pop();break}case 252:case 251:{const e=n.label;e?D(a,e.escapedText)||(o||(o=[])).push(Rp(n,C4.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):s&(252===n.kind?1:2)||(o||(o=[])).push(Rp(n,C4.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break}case 223:_|=4;break;case 229:_|=2;break;case 253:4&s?_|=1:(o||(o=[])).push(Rp(n,C4.cannotExtractRangeContainingConditionalReturnStatement));break;default:LI(n,e)}s=r}(e),8&_){const t=rm(e,!1,!1);(262===t.kind||174===t.kind&&210===t.parent.kind||218===t.kind)&&(_|=16)}return o}}function I4(e){return b_(e)?[e]:Tm(e)?NP(e.parent)?[e.parent]:e:$4(e)?e:void 0}function O4(e){return rP(e)?a_(e.body):uu(e)||qN(e)||eN(e)||gu(e)}function M4(e,t){const{file:n}=t,r=function(e){let t=B4(e.range)?Te(e.range):e.range;if(8&e.facts&&!(16&e.facts)){const e=Zf(t);if(e){const n=mc(t,uu);return n?[n,e]:[e]}}const n=[];for(;;)if(t=t.parent,169===t.kind&&(t=mc(t,(e=>uu(e))).parent),O4(t)&&(n.push(t),307===t.kind))return n}(e),i=function(e,t){return B4(e.range)?{pos:Te(e.range).getStart(t),end:De(e.range).getEnd()}:e.range}(e,n),o=function(e,t,n,r,i,o){const a=new Map,s=[],c=[],l=[],u=[],_=[],d=new Map,p=[];let f;const m=B4(e.range)?1===e.range.length&&NP(e.range[0])?e.range[0].expression:void 0:e.range;let g;if(void 0===m){const t=e.range,n=Te(t).getStart(),i=De(t).end;g=aS(r,n,i-n,C4.expressionExpected)}else 147456&i.getTypeAtLocation(m).flags&&(g=Rp(m,C4.uselessConstantType));for(const e of t){s.push({usages:new Map,typeParameterUsages:new Map,substitutions:new Map}),c.push(new Map),l.push([]);const t=[];g&&t.push(g),gu(e)&&Mm(e)&&t.push(Rp(e,C4.cannotExtractToJSClass)),rP(e)&&!DP(e.body)&&t.push(Rp(e,C4.cannotExtractToExpressionArrowFunction)),u.push(t)}const h=new Map,y=B4(e.range)?YC.createBlock(e.range):e.range,v=B4(e.range)?Te(e.range):e.range,b=!!mc(v,(e=>xp(e)&&0!==ml(e).length));if(function o(a,d=1){b&&x(i.getTypeAtLocation(a));if(h_(a)&&a.symbol&&_.push(a),mb(a))o(a.left,2),o(a.right);else if(Hu(a))o(a.operand,2);else if(GE(a)||XE(a))LI(a,o);else if(qD(a)){if(!a.parent)return;if(iE(a.parent)&&a!==a.parent.left)return;if(GE(a.parent)&&a!==a.parent.expression)return;!function(o,a,_){const d=function(o,a,_){const d=k(o);if(!d)return;const p=OB(d).toString(),f=h.get(p);if(f&&f>=a)return p;if(h.set(p,a),f){for(const e of s)e.usages.get(o.text)&&e.usages.set(o.text,{usage:a,symbol:d,node:o});return p}const m=d.getDeclarations(),g=m&&S(m,(e=>e.getSourceFile()===r));if(g&&!tX(n,g.getStart(),g.end)){if(2&e.facts&&2===a){const e=Rp(o,C4.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);for(const t of l)t.push(e);for(const t of u)t.push(e)}for(let e=0;e0){const e=new Map;let n=0;for(let r=v;void 0!==r&&n{s[n].typeParameterUsages.set(t,e)})),n++),xp(r))for(const t of ml(r)){const n=i.getTypeAtLocation(t);a.has(n.id.toString())&&e.set(n.id.toString(),n)}xn.assert(n===t.length,"Should have iterated all scopes")}_.length&&LI(bp(t[0],t[0].parent)?t[0]:Np(t[0]),(function t(n){if(n===e.range||B4(e.range)&&e.range.includes(n))return;const r=qD(n)?k(n):i.getSymbolAtLocation(n);if(r){const e=S(_,(e=>e.symbol===r));if(e)if(KP(e)){const t=e.symbol.id.toString();d.has(t)||(p.push(e),d.set(t,!0))}else f=f||e}LI(n,t)}));for(let n=0;n0&&(r.usages.size>0||r.typeParameterUsages.size>0)){const t=B4(e.range)?e.range[0]:e.range;u[n].push(Rp(t,C4.cannotAccessVariablesFromNestedScopes))}16&e.facts&&gu(t[n])&&l[n].push(Rp(e.thisNode,C4.cannotExtractFunctionsContainingThisToMethod));let i,o=!1;if(s[n].usages.forEach((e=>{2===e.usage&&(o=!0,106500&e.symbol.flags&&e.symbol.valueDeclaration&&Rv(e.symbol.valueDeclaration,8)&&(i=e.symbol.valueDeclaration))})),xn.assert(B4(e.range)||0===p.length,"No variable declarations expected if something was extracted"),o&&!B4(e.range)){const t=Rp(e.range,C4.cannotWriteInExpression);l[n].push(t),u[n].push(t)}else if(i&&n>0){const e=Rp(i,C4.cannotExtractReadonlyPropertyInitializerOutsideConstructor);l[n].push(e),u[n].push(e)}else if(f){const e=Rp(f,C4.cannotExtractExportedEntity);l[n].push(e),u[n].push(e)}}return{target:y,usagesPerScope:s,functionErrorsPerScope:l,constantErrorsPerScope:u,exposedVariableDeclarations:p};function x(e){const t=i.getSymbolWalker((()=>(o.throwIfCancellationRequested(),!0))),{visitedTypes:n}=t.walkType(e);for(const e of n)e.isTypeParameter()&&a.set(e.id.toString(),e)}function k(e){return e.parent&&JN(e.parent)&&e.parent.name===e?i.getShorthandAssignmentValueSymbol(e.parent):i.getSymbolAtLocation(e)}function T(e,t,n){if(!e)return;const r=e.getDeclarations();if(r&&r.some((e=>e.parent===t)))return YC.createIdentifier(e.name);const i=T(e.parent,t,n);return void 0!==i?n?YC.createQualifiedName(i,YC.createIdentifier(e.name)):YC.createPropertyAccessExpression(i,e.name):void 0}}(e,r,i,n,t.program.getTypeChecker(),t.cancellationToken);return{scopes:r,affectedTextRange:i,readsAndWrites:o}}function L4(e,t){let n;const r=e.symbol;if(r&&r.declarations)for(const e of r.declarations)(void 0===n||e.posYC.createShorthandPropertyAssignment(e.symbol.name))),r=O(t,(e=>YC.createShorthandPropertyAssignment(e.symbol.name)));return void 0===n?r:void 0===r?n:n.concat(r)}function B4(e){return ot(e)}function J4(e){const{parent:t}=e;if(306===t.kind)return!1;switch(e.kind){case 11:return 272!==t.kind&&276!==t.kind;case 230:case 206:case 208:return!1;case 80:return 208!==t.kind&&276!==t.kind&&281!==t.kind}return!0}function z4(e){return $4(e)||(kN(e)||TN(e)||DN(e))&&(kN(e.parent)||DN(e.parent))}function $4(e){return wD(e)&&e.parent&&NN(e.parent)}var q4={},V4="Generate 'get' and 'set' accessors",U4=tS(va.Generate_get_and_set_accessors),K4={name:V4,description:U4,kind:"refactor.rewrite.property.generateAccessors"};z2(V4,{kinds:[K4.kind],getEditsForAction:function(e,t){if(!e.endPosition)return;const n=a8.getAccessorConvertiblePropertyAtPosition(e.file,e.program,e.startPosition,e.endPosition);xn.assert(n&&!e3(n),"Expected applicable refactor info");const r=a8.generateAccessorFromProperty(e.file,e.program,e.startPosition,e.endPosition,e,t);if(!r)return;const i=e.file.fileName,o=n.renameAccessor?n.accessorName:n.fieldName;return{renameFilename:i,renameLocation:(qD(o)?0:-1)+$Y(r,i,o.text,sE(n.declaration)),edits:r}},getAvailableActions(e){if(!e.endPosition)return u;const t=a8.getAccessorConvertiblePropertyAtPosition(e.file,e.program,e.startPosition,e.endPosition,"invoked"===e.triggerReason);return t?e3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:V4,description:U4,actions:[{...K4,notApplicableReason:t.error}]}]:u:[{name:V4,description:U4,actions:[K4]}]:u}});var W4={},H4="Infer function return type",G4=tS(va.Infer_function_return_type),X4={name:H4,description:G4,kind:"refactor.rewrite.function.returnType"};function Q4(e){if(Mm(e.file)||!t3(X4.kind,e.kind))return;const t=mc(xX(e.file,e.startPosition),(e=>DP(e)||e.parent&&rP(e.parent)&&(39===e.kind||e.parent.body===e)?"quit":function(e){switch(e.kind){case 262:case 218:case 219:case 174:return!0;default:return!1}}(e)));if(!t||!t.body||t.type)return{error:tS(va.Return_type_must_be_inferred_from_a_function)};const n=e.program.getTypeChecker(),r=function(e,t){if(e.isImplementationOfOverload(t)){const n=e.getTypeAtLocation(t).getCallSignatures();if(n.length>1)return e.getUnionType(q(n,(e=>e.getReturnType())))}const n=e.getSignatureFromDeclaration(t);if(n)return e.getReturnTypeOfSignature(n)}(n,t);if(!r)return{error:tS(va.Could_not_determine_function_return_type)};const i=n.typeToTypeNode(r,t,1);return i?{declaration:t,returnTypeNode:i}:void 0}z2(H4,{kinds:[X4.kind],getEditsForAction:function(e){const t=Q4(e);if(t&&!e3(t))return{renameFilename:void 0,renameLocation:void 0,edits:r_e.ChangeTracker.with(e,(n=>function(e,t,n,r){const i=uX(n,22,e),o=rP(n)&&void 0===i,a=o?Te(n.parameters):i;a&&(o&&(t.insertNodeBefore(e,a,YC.createToken(21)),t.insertNodeAfter(e,a,YC.createToken(22))),t.insertNodeAt(e,a.end,r,{prefix:": "}))}(e.file,n,t.declaration,t.returnTypeNode)))}},getAvailableActions:function(e){const t=Q4(e);return t?e3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:H4,description:G4,actions:[{...X4,notApplicableReason:t.error}]}]:u:[{name:H4,description:G4,actions:[X4]}]:u}});var Y4=(e=>(e[e.typeOffset=8]="typeOffset",e[e.modifierMask=255]="modifierMask",e))(Y4||{}),Z4=(e=>(e[e.class=0]="class",e[e.enum=1]="enum",e[e.interface=2]="interface",e[e.namespace=3]="namespace",e[e.typeParameter=4]="typeParameter",e[e.type=5]="type",e[e.parameter=6]="parameter",e[e.variable=7]="variable",e[e.enumMember=8]="enumMember",e[e.property=9]="property",e[e.function=10]="function",e[e.member=11]="member",e))(Z4||{}),e7=(e=>(e[e.declaration=0]="declaration",e[e.static=1]="static",e[e.async=2]="async",e[e.readonly=3]="readonly",e[e.defaultLibrary=4]="defaultLibrary",e[e.local=5]="local",e))(e7||{});function t7(e,t,n,r){const i=n7(e,t,n,r);xn.assert(i.spans.length%3==0);const o=i.spans,a=[];for(let e=0;ee(r)||r.isUnion()&&r.types.some(e);if(6!==n&&e((e=>e.getConstructSignatures().length>0)))return 0;if(e((e=>e.getCallSignatures().length>0))&&!e((e=>e.getProperties().length>0))||function(e){for(;o7(e);)e=e.parent;return QE(e.parent)&&e.parent.expression===e}(t))return 9===n?11:10}}return n}(o,c,i);const s=n.valueDeclaration;if(s){const r=cc(s),o=uc(s);256&r&&(a|=2),1024&r&&(a|=4),0!==i&&2!==i&&(8&r||2&o||8&n.getFlags())&&(a|=8),7!==i&&10!==i||!function(e,t){return KE(e)&&(e=i7(e)),KP(e)?(!qN(e.parent.parent.parent)||RN(e.parent))&&e.getSourceFile()===t:!!HP(e)&&(!qN(e.parent)&&e.getSourceFile()===t)}(s,t)||(a|=32),e.isSourceFileDefaultLibrary(s.getSourceFile())&&(a|=16)}else n.declarations&&n.declarations.some((t=>e.isSourceFileDefaultLibrary(t.getSourceFile())))&&(a|=16);r(c,i,a)}}}LI(c,s),a=l}(t)}(e,t,n,((e,n,r)=>{i.push(e.getStart(t),e.getWidth(t),(n+1<<8)+r)}),r),i}function i7(e){for(;;){if(!KE(e.parent.parent))return e.parent.parent;e=e.parent.parent}}function o7(e){return iE(e.parent)&&e.parent.right===e||GE(e.parent)&&e.parent.name===e}var a7=new Map([[260,7],[169,6],[172,9],[267,3],[266,1],[306,8],[263,0],[174,11],[262,10],[218,10],[173,11],[177,9],[178,9],[171,9],[264,2],[265,5],[168,4],[303,9],[304,9]]),s7="0.8";function c7(e,t,n,r){const i=Ol(e)?new l7(e,t,n):80===e?new p7(80,t,n):81===e?new f7(81,t,n):new d7(e,t,n);return i.parent=r,i.flags=101441536&r.flags,i}var l7=class{constructor(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}assertHasRealPosition(e){xn.assert(!iT(this.pos)&&!iT(this.end),e||"Node must have a real position for this operation")}getSourceFile(){return Sd(this)}getStart(e,t){return this.assertHasRealPosition(),Vd(this,e,t)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos}getFullText(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(e){return this.getChildren(e).length}getChildAt(e,t){return this.getChildren(t)[e]}getChildren(e){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),zF(this)??$F(this,function(e,t){const n=[];if(N_(e))return e.forEachChild((e=>{n.push(e)})),n;mG.setText((t||e.getSourceFile()).text);let r=e.pos;const i=t=>{u7(n,r,t.pos,e),n.push(t),r=t.end};return f(e.jsDoc,i),r=e.pos,e.forEachChild(i,(t=>{u7(n,r,t.pos,e),n.push(function(e,t){const n=c7(352,e.pos,e.end,t),r=[];let i=e.pos;for(const n of e)u7(r,i,n.pos,t),r.push(n),i=n.end;return u7(r,i,e.end,t),$F(n,r),n}(t,e)),r=t.end})),u7(n,r,e.end,e),mG.setText(void 0),n}(this,e))}getFirstToken(e){this.assertHasRealPosition();const t=this.getChildren(e);if(!t.length)return;const n=S(t,(e=>e.kind<309||e.kind>351));return n.kind<166?n:n.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();const t=we(this.getChildren(e));if(t)return t.kind<166?t:t.getLastToken(e)}forEachChild(e,t){return LI(this,e,t)}};function u7(e,t,n,r){for(mG.resetTokenState(t);t"inheritDoc"===e.tagName.text||"inheritdoc"===e.tagName.text))}function g7(e,t){if(!e)return u;let n=Wce.getJsDocTagsFromDeclarations(e,t);if(t&&(0===n.length||e.some(m7))){const r=new Set;for(const i of e){const e=y7(t,i,(e=>{var n;if(!r.has(e))return r.add(e),177===i.kind||178===i.kind?e.getContextualJsDocTags(i,t):1===(null==(n=e.declarations)?void 0:n.length)?e.getJsDocTags(t):void 0}));e&&(n=[...e,...n])}}return n}function h7(e,t){if(!e)return u;let n=Wce.getJsDocCommentsFromDeclarations(e,t);if(t&&(0===n.length||e.some(m7))){const r=new Set;for(const i of e){const e=y7(t,i,(e=>{if(!r.has(e))return r.add(e),177===i.kind||178===i.kind?e.getContextualDocumentationComment(i,t):e.getDocumentationComment(t)}));e&&(n=0===n.length?e.slice():e.concat(hY(),n))}}return n}function y7(e,t,n){var r;const i=176===(null==(r=t.parent)?void 0:r.kind)?t.parent.parent:t.parent;if(!i)return;const o=zv(t);return g(Ch(i),(r=>{const i=e.getTypeAtLocation(r),a=o&&i.symbol?e.getTypeOfSymbol(i.symbol):i,s=e.getPropertyOfType(a,t.symbol.name);return s?n(s):void 0}))}var v7=class extends l7{constructor(e,t,n){super(e,t,n)}update(e,t){return VI(this,e,t)}getLineAndCharacterOfPosition(e){return Xa(this,e)}getLineStarts(){return Ka(this)}getPositionOfLineAndCharacter(e,t,n){return Ua(Ka(this),e,t,this.text,n)}getLineEndOfPosition(e){const{line:t}=this.getLineAndCharacterOfPosition(e),n=this.getLineStarts();let r;t+1>=n.length&&(r=this.getEnd()),r||(r=n[t+1]-1);const i=this.getFullText();return"\n"===i[r]&&"\r"===i[r-1]?r-1:r}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){const e=et();return this.forEachChild((function r(i){switch(i.kind){case 262:case 218:case 174:case 173:const o=i,a=n(o);if(a){const t=function(t){let n=e.get(t);return n||e.set(t,n=[]),n}(a),n=we(t);n&&o.parent===n.parent&&o.symbol===n.symbol?o.body&&!n.body&&(t[t.length-1]=o):t.push(o)}LI(i,r);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(i),LI(i,r);break;case 169:if(!Bv(i,31))break;case 260:case 208:{const e=i;if(Eu(e.name)){LI(e.name,r);break}e.initializer&&r(e.initializer)}case 306:case 172:case 171:t(i);break;case 278:const s=i;s.exportClause&&(hN(s.exportClause)?f(s.exportClause.elements,r):r(s.exportClause.name));break;case 272:const c=i.importClause;c&&(c.name&&t(c.name),c.namedBindings&&(274===c.namedBindings.kind?t(c.namedBindings):f(c.namedBindings.elements,r)));break;case 226:0!==ag(i)&&t(i);default:LI(i,r)}})),e;function t(t){const r=n(t);r&&e.add(r,t)}function n(e){const t=Ec(e);return t&&(oE(t)&&GE(t.expression)?t.expression.name.text:au(t)?xQ(t):void 0)}}};function b7(e){let t=!0;for(const n in e)if(Le(e,n)&&!x7(n)){t=!1;break}if(t)return e;const n={};for(const t in e)Le(e,t)&&(n[x7(t)?t:t.charAt(0).toLowerCase()+t.substr(1)]=e[t]);return n}function x7(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function S7(e){return e?O(e,(e=>e.text)).join(""):""}function k7(){return{target:1,jsx:1}}function T7(){return a8.getSupportedErrorCodes()}function C7(e,t,n){e.version=n,e.scriptSnapshot=t}function w7(e,t,n,r,i,o){const a=JI(e,yQ(t),n,i,o);return C7(a,t,r),a}function D7(e,t,n,r,i){if(r&&n!==e.version){let o;const a=0!==r.span.start?e.text.substr(0,r.span.start):"",s=js(r.span)!==e.text.length?e.text.substr(js(r.span)):"";if(0===r.newLength)o=a&&s?a+s:a||s;else{const e=t.getText(r.span.start,r.span.start+r.newLength);o=a&&s?a+e+s:a?a+e:e+s}const c=VI(e,o,r,i);return C7(c,t,n),c.nameTable=void 0,e!==c&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),c}const o={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator,jsDocParsingMode:e.jsDocParsingMode};return w7(e.fileName,t,o,n,!0,e.scriptKind)}var E7={isCancellationRequested:dt,throwIfCancellationRequested:_t},P7=class{constructor(e,t=20){this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}isCancellationRequested(){const e=Yn();return Math.abs(e-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested())}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw null==(e=or)||e.instant(or.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new Lr}},N7=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],F7=[...N7,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"];function A7(e,t=T0(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory(),e.jsDocParsingMode),n){var r;let i;i=void 0===n?0:"boolean"==typeof n?n?2:0:n;const o=new class{constructor(e){this.host=e}getCurrentSourceFile(e){var t,n,r,i,o,a,s,c;const l=this.host.getScriptSnapshot(e);if(!l)throw new Error("Could not find file: '"+e+"'.");const u=TY(e,this.host),_=this.host.getScriptVersion(e);let d;if(this.currentFileName!==e)d=w7(e,l,{languageVersion:99,impliedNodeFormat:pV(Yo(e,this.host.getCurrentDirectory(),(null==(r=null==(n=(t=this.host).getCompilerHost)?void 0:n.call(t))?void 0:r.getCanonicalFileName)||Wy(this.host)),null==(c=null==(s=null==(a=null==(o=(i=this.host).getCompilerHost)?void 0:o.call(i))?void 0:a.getModuleResolutionCache)?void 0:s.call(a))?void 0:c.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:TS(this.host.getCompilationSettings()),jsDocParsingMode:0},_,!0,u);else if(this.currentFileVersion!==_){const e=l.getChangeRange(this.currentFileScriptSnapshot);d=D7(this.currentSourceFile,l,_,e)}return d&&(this.currentFileVersion=_,this.currentFileName=e,this.currentFileScriptSnapshot=l,this.currentSourceFile=d),this.currentSourceFile}}(e);let a,s,c=0;const l=e.getCancellationToken?new class{constructor(e){this.cancellationToken=e}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw null==(e=or)||e.instant(or.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new Lr}}(e.getCancellationToken()):E7,_=e.getCurrentDirectory();function d(t){e.log&&e.log(t)}eS(null==(r=e.getLocalizedDiagnosticMessages)?void 0:r.bind(e));const p=Ky(e),m=tn(p),g=l1({useCaseSensitiveFileNames:()=>p,getCurrentDirectory:()=>_,getProgram:v,fileExists:Ze(e,e.fileExists),readFile:Ze(e,e.readFile),getDocumentPositionMapper:Ze(e,e.getDocumentPositionMapper),getSourceFileLike:Ze(e,e.getSourceFileLike),log:d});function h(e){const t=a.getSourceFile(e);if(!t){const t=new Error(`Could not find source file: '${e}'.`);throw t.ProgramFiles=a.getSourceFiles().map((e=>e.fileName)),t}return t}function y(){e.updateFromProject&&!e.updateFromProjectInProgress?e.updateFromProject():function(){var n,r,o;if(xn.assert(2!==i),e.getProjectVersion){const t=e.getProjectVersion();if(t){if(s===t&&!(null==(n=e.hasChangedAutomaticTypeDirectiveNames)?void 0:n.call(e)))return;s=t}}const u=e.getTypeRootsVersion?e.getTypeRootsVersion():0;c!==u&&(d("TypeRoots version has changed; provide new program"),a=void 0,c=u);const f=e.getScriptFileNames().slice(),h=e.getCompilationSettings()||{target:1,jsx:1},y=e.hasInvalidatedResolutions||dt,v=Ze(e,e.hasInvalidatedLibResolutions)||dt,b=Ze(e,e.hasChangedAutomaticTypeDirectiveNames),x=null==(r=e.getProjectReferences)?void 0:r.call(e);let S,k={getSourceFile:F,getSourceFileByPath:A,getCancellationToken:()=>l,getCanonicalFileName:m,useCaseSensitiveFileNames:()=>p,getNewLine:()=>$b(h),getDefaultLibFileName:t=>e.getDefaultLibFileName(t),writeFile:_t,getCurrentDirectory:()=>_,fileExists:t=>e.fileExists(t),readFile:t=>e.readFile&&e.readFile(t),getSymlinkCache:Ze(e,e.getSymlinkCache),realpath:Ze(e,e.realpath),directoryExists:t=>zb(t,e),getDirectories:t=>e.getDirectories?e.getDirectories(t):[],readDirectory:(t,n,r,i,o)=>(xn.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(t,n,r,i,o)),onReleaseOldSourceFile:N,onReleaseParsedCommandLine:function(t,n,r){var i;e.getParsedCommandLine?null==(i=e.onReleaseParsedCommandLine)||i.call(e,t,n,r):n&&N(n.sourceFile,r)},hasInvalidatedResolutions:y,hasInvalidatedLibResolutions:v,hasChangedAutomaticTypeDirectiveNames:b,trace:Ze(e,e.trace),resolveModuleNames:Ze(e,e.resolveModuleNames),getModuleResolutionCache:Ze(e,e.getModuleResolutionCache),createHash:Ze(e,e.createHash),resolveTypeReferenceDirectives:Ze(e,e.resolveTypeReferenceDirectives),resolveModuleNameLiterals:Ze(e,e.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:Ze(e,e.resolveTypeReferenceDirectiveReferences),resolveLibrary:Ze(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:Ze(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:P,jsDocParsingMode:e.jsDocParsingMode};const T=k.getSourceFile,{getSourceFileWithCache:C}=Dq(k,(e=>Yo(e,_,m)),((...e)=>T.call(k,...e)));k.getSourceFile=C,null==(o=e.setCompilerHost)||o.call(e,k);const w={useCaseSensitiveFileNames:p,fileExists:e=>k.fileExists(e),readFile:e=>k.readFile(e),directoryExists:e=>k.directoryExists(e),getDirectories:e=>k.getDirectories(e),realpath:k.realpath,readDirectory:(...e)=>k.readDirectory(...e),trace:k.trace,getCurrentDirectory:k.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:_t},D=t.getKeyForCompilationSettings(h);let E=new Set;return _V(a,f,h,((t,n)=>e.getScriptVersion(n)),(e=>k.fileExists(e)),y,v,b,P,x)?(k=void 0,S=void 0,void(E=void 0)):(a=gV({rootNames:f,options:h,host:k,oldProgram:a,projectReferences:x}),k=void 0,S=void 0,E=void 0,g.clearCache(),void a.getTypeChecker());function P(t){const n=Yo(t,_,m),r=null==S?void 0:S.get(n);if(void 0!==r)return r||void 0;const i=e.getParsedCommandLine?e.getParsedCommandLine(t):function(e){const t=F(e,100);if(t)return t.path=Yo(e,_,m),t.resolvedPath=t.path,t.originalFileName=t.fileName,JM(t,w,Go(Ro(e),_),void 0,Go(e,_))}(t);return(S||(S=new Map)).set(n,i||!1),i}function N(e,n){const r=t.getKeyForCompilationSettings(n);t.releaseDocumentWithKey(e.resolvedPath,r,e.scriptKind,e.impliedNodeFormat)}function F(e,t,n,r){return A(e,Yo(e,_,m),t,0,r)}function A(n,r,i,o,s){xn.assert(k,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");const c=e.getScriptSnapshot(n);if(!c)return;const l=TY(n,e),u=e.getScriptVersion(n);if(!s){const o=a&&a.getSourceFileByPath(r);if(o){if(l===o.scriptKind||E.has(o.resolvedPath))return t.updateDocumentWithKey(n,r,e,D,c,u,l,i);t.releaseDocumentWithKey(o.resolvedPath,t.getKeyForCompilationSettings(a.getCompilerOptions()),o.scriptKind,o.impliedNodeFormat),E.add(o.resolvedPath)}}return t.acquireDocumentWithKey(n,r,e,D,c,u,l,i)}}()}function v(){if(2!==i)return y(),a;xn.assert(void 0===a)}function b(){if(a){const e=t.getKeyForCompilationSettings(a.getCompilerOptions());f(a.getSourceFiles(),(n=>t.releaseDocumentWithKey(n.resolvedPath,e,n.scriptKind,n.impliedNodeFormat))),a=void 0}}function x(e,t,n,r){y();const i=n&&n.use===Rse.FindReferencesUse.Rename?a.getSourceFiles().filter((e=>!a.isSourceFileDefaultLibrary(e))):a.getSourceFiles();return Rse.findReferenceOrRenameEntries(a,l,i,e,t,n,r)}const S=new Map(Object.entries({19:20,21:22,23:24,32:30}));function k(t){return xn.assertEqual(t.type,"install package"),e.installPackage?e.installPackage({fileName:(n=t.file,Yo(n,_,m)),packageName:t.packageName}):Promise.reject("Host does not implement `installPackage`");var n}function T(e,t){return{lineStarts:e.getLineStarts(),firstLine:e.getLineAndCharacterOfPosition(t.pos).line,lastLine:e.getLineAndCharacterOfPosition(t.end).line}}function C(e,t,n){const r=o.getCurrentSourceFile(e),i=[],{lineStarts:a,firstLine:s,lastLine:c}=T(r,t);let l=n||!1,u=Number.MAX_VALUE;const _=new Map,d=new RegExp(/\S/),p=jX(r,a[s]),f=p?"{/*":"//";for(let e=s;e<=c;e++){const t=r.text.substring(a[e],r.getLineEndOfPosition(a[e])),i=d.exec(t);i&&(u=Math.min(u,i.index),_.set(e.toString(),i.index),t.substr(i.index,f.length)!==f&&(l=void 0===n||n))}for(let n=s;n<=c;n++){if(s!==c&&a[n]===t.end)continue;const o=_.get(n.toString());void 0!==o&&(p?i.push(...w(e,{pos:a[n]+u,end:r.getLineEndOfPosition(a[n])},l,p)):l?i.push({newText:f,span:{length:0,start:a[n]+u}}):r.text.substr(a[n]+o,f.length)===f&&i.push({newText:"",span:{length:f.length,start:a[n]+o}}))}return i}function w(e,t,n,r){var i;const a=o.getCurrentSourceFile(e),s=[],{text:c}=a;let l=!1,u=n||!1;const _=[];let{pos:d}=t;const p=void 0!==r?r:jX(a,d),f=p?"{/*":"/*",m=p?"*/}":"*/",g=p?"\\{\\/\\*":"\\/\\*",h=p?"\\*\\/\\}":"\\*\\/";for(;d<=t.end;){const e=qX(a,d+(c.substr(d,f.length)===f?f.length:0));if(e)p&&(e.pos--,e.end++),_.push(e.pos),3===e.kind&&_.push(e.end),l=!0,d=e.end+1;else{const e=c.substring(d,t.end).search(`(${g})|(${h})`);u=void 0!==n?n:u||!HQ(c,d,-1===e?t.end:d+e),d=-1===e?t.end+1:d+e+m.length}}if(u||!l){2!==(null==(i=qX(a,t.pos))?void 0:i.kind)&&ie(_,t.pos,Nt),ie(_,t.end,Nt);const e=_[0];c.substr(e,f.length)!==f&&s.push({newText:f,span:{length:0,start:e}});for(let e=1;e<_.length-1;e++)c.substr(_[e]-m.length,m.length)!==m&&s.push({newText:m,span:{length:0,start:_[e]}}),c.substr(_[e],f.length)!==f&&s.push({newText:f,span:{length:0,start:_[e]}});s.length%2!=0&&s.push({newText:m,span:{length:0,start:_[_.length-1]}})}else for(const e of _){const t=e-m.length>0?e-m.length:0,n=c.substr(t,m.length)===m?m.length:0;s.push({newText:"",span:{length:f.length,start:e-n}})}return s}function D({openingElement:e,closingElement:t,parent:n}){return!sO(e.tagName,t.tagName)||kN(n)&&sO(e.tagName,n.openingElement.tagName)&&D(n)}function E({closingFragment:e,parent:t}){return!!(262144&e.flags)||DN(t)&&E(t)}function P(t,n,r,i,o,a){const[s,c]="number"==typeof n?[n,void 0]:[n.pos,n.end];return{file:t,startPosition:s,endPosition:c,program:v(),host:e,formatContext:A_e.getFormatContext(i,e),cancellationToken:l,preferences:r,triggerReason:o,kind:a}}S.forEach(((e,t)=>S.set(e.toString(),Number(t))));const N={dispose:function(){b(),e=void 0},cleanupSemanticCache:b,getSyntacticDiagnostics:function(e){return y(),a.getSyntacticDiagnostics(h(e),l).slice()},getSemanticDiagnostics:function(e){y();const t=h(e),n=a.getSemanticDiagnostics(t,l);if(!LS(a.getCompilerOptions()))return n.slice();const r=a.getDeclarationDiagnostics(t,l);return[...n,...r]},getSuggestionDiagnostics:function(e){return y(),p1(h(e),a,l)},getCompilerOptionsDiagnostics:function(){return y(),[...a.getOptionsDiagnostics(l),...a.getGlobalDiagnostics(l)]},getSyntacticClassifications:function(e,t){return x0(l,o.getCurrentSourceFile(e),t)},getSemanticClassifications:function(e,t,n){return y(),"2020"===(n||"original")?t7(a,l,h(e),t):m0(a.getTypeChecker(),l,h(e),a.getClassifiableNames(),t)},getEncodedSyntacticClassifications:function(e,t){return S0(l,o.getCurrentSourceFile(e),t)},getEncodedSemanticClassifications:function(e,t,n){return y(),"original"===(n||"original")?h0(a.getTypeChecker(),l,h(e),a.getClassifiableNames(),t):n7(a,l,h(e),t)},getCompletionsAtPosition:function(t,n,r=GH,i){const o={...r,includeCompletionsForModuleExports:r.includeCompletionsForModuleExports||r.includeExternalModuleExports,includeCompletionsWithInsertText:r.includeCompletionsWithInsertText||r.includeInsertTextCompletions};return y(),$oe.getCompletionsAtPosition(e,a,d,h(t),n,o,r.triggerCharacter,r.triggerKind,l,i&&A_e.getFormatContext(i,e),r.includeSymbol)},getCompletionEntryDetails:function(t,n,r,i,o,s=GH,c){return y(),$oe.getCompletionEntryDetails(a,d,h(t),n,{name:r,source:o,data:c},e,i&&A_e.getFormatContext(i,e),s,l)},getCompletionEntrySymbol:function(t,n,r,i,o=GH){return y(),$oe.getCompletionEntrySymbol(a,d,h(t),n,{name:r,source:i},e,o)},getSignatureHelpItems:function(e,t,{triggerReason:n}=GH){y();const r=h(e);return due.getSignatureHelpItems(a,r,t,n,l)},getQuickInfoAtPosition:function(e,t){y();const n=h(e),r=xX(n,t);if(r===n)return;const i=a.getTypeChecker(),o=function(e){return YE(e.parent)&&e.pos===e.parent.pos?e.parent.expression:EE(e.parent)&&e.pos===e.parent.pos||_f(e.parent)&&e.parent.name===e||ON(e.parent)?e.parent:e}(r),s=function(e,t){const n=O7(e);if(n){const e=t.getContextualType(n.parent),r=e&&M7(n,t,e,!1);if(r&&1===r.length)return Te(r)}return t.getSymbolAtLocation(e)}(o,i);if(!s||i.isUnknownSymbol(s)){const e=function(e,t,n){switch(t.kind){case 80:return!(16777216&t.flags&&!Mm(t)&&(171===t.parent.kind&&t.parent.name===t||mc(t,(e=>169===e.kind)))||LG(t)||jG(t)||Dl(t.parent));case 211:case 166:return!qX(e,n);case 110:case 197:case 108:case 202:return!0;case 236:return _f(t);default:return!1}}(n,o,t)?i.getTypeAtLocation(o):void 0;return e&&{kind:"",kindModifiers:"",textSpan:aQ(o,n),displayParts:i.runWithCancellationToken(l,(t=>vY(t,e,UG(o)))),documentation:e.symbol?e.symbol.getDocumentationComment(i):void 0,tags:e.symbol?e.symbol.getJsDocTags(i):void 0}}const{symbolKind:c,displayParts:u,documentation:_,tags:d}=i.runWithCancellationToken(l,(e=>Hue.getSymbolDisplayPartsDocumentationAndSymbolKind(e,s,n,UG(o),o)));return{kind:c,kindModifiers:Hue.getSymbolModifiers(i,s),textSpan:aQ(o,n),displayParts:u,documentation:_,tags:d}},getDefinitionAtPosition:function(e,t,n,r){return y(),Cce.getDefinitionAtPosition(a,h(e),t,n,r)},getDefinitionAndBoundSpan:function(e,t){return y(),Cce.getDefinitionAndBoundSpan(a,h(e),t)},getImplementationAtPosition:function(e,t){return y(),Rse.getImplementationsAtPosition(a,l,a.getSourceFiles(),h(e),t)},getTypeDefinitionAtPosition:function(e,t){return y(),Cce.getTypeDefinitionAtPosition(a.getTypeChecker(),h(e),t)},getReferencesAtPosition:function(e,t){return y(),x(xX(h(e),t),t,{use:Rse.FindReferencesUse.References},Rse.toReferenceEntry)},findReferences:function(e,t){return y(),Rse.findReferencedSymbols(a,l,a.getSourceFiles(),h(e),t)},getFileReferences:function(e){return y(),Rse.Core.getReferencesForFileName(e,a,a.getSourceFiles()).map(Rse.toReferenceEntry)},getDocumentHighlights:function(e,t,n){const r=Xo(e);xn.assert(n.some((e=>Xo(e)===r))),y();const i=q(n,(e=>a.getSourceFile(e))),o=h(e);return l0.getDocumentHighlights(a,l,o,t,i)},getNameOrDottedNameSpan:function(e,t,n){const r=o.getCurrentSourceFile(e),i=xX(r,t);if(i===r)return;switch(i.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let a=i;for(;;)if(BG(a)||RG(a))a=a.parent;else{if(!zG(a))break;if(267!==a.parent.parent.kind||a.parent.parent.body!==a.parent)break;a=a.parent.parent.name}return Xs(a.getStart(),i.getEnd())},getBreakpointStatementAtPosition:function(e,t){const n=o.getCurrentSourceFile(e);return R7.spanInSourceFileAtLocation(n,t)},getNavigateToItems:function(e,t,n,r=!1,i=!1){return y(),O1(n?[h(n)]:a.getSourceFiles(),a.getTypeChecker(),l,e,t,r,i)},getRenameInfo:function(e,t,n){return y(),oue.getRenameInfo(a,h(e),t,n||{})},getSmartSelectionRange:function(e,t){return jue.getSmartSelectionRange(t,o.getCurrentSourceFile(e))},findRenameLocations:function(e,t,n,r,i){y();const o=h(e),a=bX(xX(o,t));if(oue.nodeIsEligibleForRename(a)){if(qD(a)&&(CN(a.parent)||wN(a.parent))&&Jy(a.escapedText)){const{openingElement:e,closingElement:t}=a.parent.parent;return[e,t].map((e=>{const t=aQ(e.tagName,o);return{fileName:o.fileName,textSpan:t,...Rse.toContextSpan(t,o,e.parent)}}))}{const e=AQ(o,i??GH),s="boolean"==typeof i?i:null==i?void 0:i.providePrefixAndSuffixTextForRename;return x(a,t,{findInStrings:n,findInComments:r,providePrefixAndSuffixTextForRename:s,use:Rse.FindReferencesUse.Rename},((t,n,r)=>Rse.toRenameLocation(t,n,r,s||!1,e)))}}},getNavigationBarItems:function(e){return Z1(o.getCurrentSourceFile(e),l)},getNavigationTree:function(e){return e2(o.getCurrentSourceFile(e),l)},getOutliningSpans:function(e){const t=o.getCurrentSourceFile(e);return Xle.collectElements(t,l)},getTodoComments:function(e,t){y();const n=h(e);l.throwIfCancellationRequested();const r=n.text,i=[];if(t.length>0&&!n.fileName.includes("/node_modules/")){const e=function(){const e="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/\/+\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",n="(?:"+O(t,(e=>"("+e.text.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")+")")).join("|")+")";return new RegExp(e+"("+n+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}();let a;for(;a=e.exec(r);){l.throwIfCancellationRequested();const e=3;xn.assert(a.length===t.length+e);const s=a[1],c=a.index+s.length;if(!qX(n,c))continue;let u;for(let n=0;n=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57)continue;const _=a[2];i.push({descriptor:u,message:_,position:c})}}var o;return i},getBraceMatchingAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=SX(n,t),i=r.getStart(n)===t?S.get(r.kind.toString()):void 0,a=i&&uX(r.parent,i,n);return a?[aQ(r,n),aQ(a,n)].sort(((e,t)=>e.start-t.start)):u},getIndentationAtPosition:function(e,t,n){let r=Yn();const i=b7(n),a=o.getCurrentSourceFile(e);d("getIndentationAtPosition: getCurrentSourceFile: "+(Yn()-r)),r=Yn();const s=A_e.SmartIndenter.getIndentation(t,a,i);return d("getIndentationAtPosition: computeIndentation : "+(Yn()-r)),s},getFormattingEditsForRange:function(t,n,r,i){const a=o.getCurrentSourceFile(t);return A_e.formatSelection(n,r,a,A_e.getFormatContext(b7(i),e))},getFormattingEditsForDocument:function(t,n){return A_e.formatDocument(o.getCurrentSourceFile(t),A_e.getFormatContext(b7(n),e))},getFormattingEditsAfterKeystroke:function(t,n,r,i){const a=o.getCurrentSourceFile(t),s=A_e.getFormatContext(b7(i),e);if(!qX(a,n))switch(r){case"{":return A_e.formatOnOpeningCurly(n,a,s);case"}":return A_e.formatOnClosingCurly(n,a,s);case";":return A_e.formatOnSemicolon(n,a,s);case"\n":return A_e.formatOnEnter(n,a,s)}return[]},getDocCommentTemplateAtPosition:function(t,n,r,i){const a=i?A_e.getFormatContext(i,e).options:void 0;return Wce.getDocCommentTemplateAtPosition(gY(e,a),o.getCurrentSourceFile(t),n,r)},isValidBraceCompletionAtPosition:function(e,t,n){if(60===n)return!1;const r=o.getCurrentSourceFile(e);if(AX(r,t))return!1;if(IX(r,t))return 123===n;if(MX(r,t))return!1;switch(n){case 39:case 34:case 96:return!qX(r,t)}return!0},getJsxClosingTagAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=EX(t,n);if(!r)return;const i=32===r.kind&&CN(r.parent)?r.parent.parent:DD(r)&&kN(r.parent)?r.parent:void 0;if(i&&D(i))return{newText:``};const a=32===r.kind&&EN(r.parent)?r.parent.parent:DD(r)&&DN(r.parent)?r.parent:void 0;return a&&E(a)?{newText:""}:void 0},getLinkedEditingRangeAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=EX(t,n);if(!r||307===r.parent.kind)return;const i="[a-zA-Z0-9:\\-\\._$]*";if(DN(r.parent.parent)){const e=r.parent.parent.openingFragment,o=r.parent.parent.closingFragment;if(xd(e)||xd(o))return;const a=e.getStart(n)+1,s=o.getStart(n)+2;if(t!==a&&t!==s)return;return{ranges:[{start:a,length:0},{start:s,length:0}],wordPattern:i}}{const e=mc(r.parent,(e=>!(!CN(e)&&!wN(e))));if(!e)return;xn.assert(CN(e)||wN(e),"tag should be opening or closing element");const o=e.parent.openingElement,a=e.parent.closingElement,s=o.tagName.getStart(n),c=o.tagName.end,l=a.tagName.getStart(n),u=a.tagName.end;if(s===o.getStart(n)||l===a.getStart(n)||c===o.getEnd()||u===a.getEnd())return;if(!(s<=t&&t<=c||l<=t&&t<=u))return;if(o.tagName.getText(n)!==a.tagName.getText(n))return;return{ranges:[{start:s,length:c-s},{start:l,length:u-l}],wordPattern:i}}},getSpanOfEnclosingComment:function(e,t,n){const r=o.getCurrentSourceFile(e),i=A_e.getRangeOfEnclosingComment(r,t);return!i||n&&3!==i.kind?void 0:lQ(i)},getCodeFixesAtPosition:function(t,n,r,i,o,s=GH){y();const c=h(t),u=Xs(n,r),_=A_e.getFormatContext(o,e);return R(ne(i,wt,Nt),(t=>(l.throwIfCancellationRequested(),a8.getFixes({errorCode:t,sourceFile:c,span:u,program:a,host:e,cancellationToken:l,formatContext:_,preferences:s}))))},getCombinedCodeFix:function(t,n,r,i=GH){y(),xn.assert("file"===t.type);const o=h(t.fileName),s=A_e.getFormatContext(r,e);return a8.getAllFixes({fixId:n,sourceFile:o,program:a,host:e,cancellationToken:l,formatContext:s,preferences:i})},applyCodeActionCommand:function(e,t){const n="string"==typeof e?t:e;return ot(n)?Promise.all(n.map((e=>k(e)))):k(n)},organizeImports:function(t,n,r=GH){y(),xn.assert("file"===t.type);const i=h(t.fileName),o=A_e.getFormatContext(n,e),s=t.mode??(t.skipDestructiveCodeActions?"SortAndCombine":"All");return vle.organizeImports(i,o,e,a,r,s)},getEditsForFileRename:function(t,n,r,i=GH){return E0(v(),t,n,e,A_e.getFormatContext(r,e),i,g)},getEmitOutput:function(t,n,r){y();const i=h(t),o=e.getCustomTransformers&&e.getCustomTransformers();return CV(a,i,!!n,l,o,r)},getNonBoundSourceFile:function(e){return o.getCurrentSourceFile(e)},getProgram:v,getCurrentProgram:()=>a,getAutoImportProvider:function(){var t;return null==(t=e.getPackageJsonAutoImportProvider)?void 0:t.call(e)},updateIsDefinitionOfReferencedSymbols:function(t,n){const r=a.getTypeChecker(),i=function(){for(const i of t)for(const t of i.references){if(n.has(t)){const e=o(t);return xn.assertIsDefined(e),r.getSymbolAtLocation(e)}const i=XQ(t,g,Ze(e,e.fileExists));if(i&&n.has(i)){const e=o(i);if(e)return r.getSymbolAtLocation(e)}}}();if(!i)return!1;for(const r of t)for(const t of r.references){const r=o(t);if(xn.assertIsDefined(r),n.has(t)||Rse.isDeclarationOfSymbol(r,i)){n.add(t),t.isDefinition=!0;const r=XQ(t,g,Ze(e,e.fileExists));r&&n.add(r)}else t.isDefinition=!1}return!0;function o(e){const t=a.getSourceFile(e.fileName);if(!t)return;const n=xX(t,e.textSpan.start);return Rse.Core.getAdjustedNode(n,{use:Rse.FindReferencesUse.References})}},getApplicableRefactors:function(e,t,n=GH,r,i,o){y();const a=h(e);return B2.getApplicableRefactors(P(a,t,n,GH,r,i),o)},getEditsForRefactor:function(e,t,n,r,i,o=GH,a){y();const s=h(e);return B2.getEditsForRefactor(P(s,n,o,t),r,i,a)},getMoveToRefactoringFileSuggestions:function(t,n,r=GH){y();const i=h(t),o=xn.checkDefined(a.getSourceFiles()),s=sT(t),c=J6(P(i,n,r,GH)),l=z6(null==c?void 0:c.all),u=q(o,(e=>{const t=sT(e.fileName);return(null==a?void 0:a.isSourceFileFromExternalLibrary(i))||i===h(e.fileName)||".ts"===s&&".d.ts"===t||".d.ts"===s&&an(Bo(e.fileName),"lib.")&&".d.ts"===t||s!==t&&(!(".tsx"===s&&".ts"===t||".jsx"===s&&".js"===t)||l)?void 0:e.fileName}));return{newFileName:B6(i,a,e,c),files:u}},toLineColumnOffset:function(e,t){return 0===t?{line:0,character:0}:g.toLineColumnOffset(e,t)},getSourceMapper:()=>g,clearSourceMapperCache:()=>g.clearCache(),prepareCallHierarchy:function(e,t){y();const n=J7.resolveCallHierarchyDeclaration(a,xX(h(e),t));return n&&EZ(n,(e=>J7.createCallHierarchyItem(a,e)))},provideCallHierarchyIncomingCalls:function(e,t){y();const n=h(e),r=PZ(J7.resolveCallHierarchyDeclaration(a,0===t?n:xX(n,t)));return r?J7.getIncomingCalls(a,r,l):[]},provideCallHierarchyOutgoingCalls:function(e,t){y();const n=h(e),r=PZ(J7.resolveCallHierarchyDeclaration(a,0===t?n:xX(n,t)));return r?J7.getOutgoingCalls(a,r):[]},toggleLineComment:C,toggleMultilineComment:w,commentSelection:function(e,t){const n=o.getCurrentSourceFile(e),{firstLine:r,lastLine:i}=T(n,t);return r===i&&t.pos!==t.end?w(e,t,!0):C(e,t,!0)},uncommentSelection:function(e,t){const n=o.getCurrentSourceFile(e),r=[],{pos:i}=t;let{end:a}=t;i===a&&(a+=jX(n,i)?2:1);for(let t=i;t<=a;t++){const i=qX(n,t);if(i){switch(i.kind){case 2:r.push(...C(e,{end:i.end,pos:i.pos+1},!1));break;case 3:r.push(...w(e,{end:i.end,pos:i.pos+1},!1))}t=i.end+1}}return r},provideInlayHints:function(t,n,r=GH){y();const i=h(t);return qce.provideInlayHints(function(t,n,r){return{file:t,program:v(),host:e,span:n,preferences:r,cancellationToken:l}}(i,n,r))},getSupportedCodeFixes:T7,getPasteEdits:function(t,n){return y(),Ppe.pasteEditsProvider(h(t.targetFile),t.pastedText,t.pasteLocations,t.copiedFrom?{file:h(t.copiedFrom.file),range:t.copiedFrom.range}:void 0,e,t.preferences,A_e.getFormatContext(n,e),l)},mapCode:function(t,n,r,i,a){return ple.mapCode(o.getCurrentSourceFile(t),n,r,e,A_e.getFormatContext(i,e),a)}};switch(i){case 0:break;case 1:N7.forEach((e=>N[e]=()=>{throw new Error(`LanguageService Operation: ${e} not allowed in LanguageServiceMode.PartialSemantic`)}));break;case 2:F7.forEach((e=>N[e]=()=>{throw new Error(`LanguageService Operation: ${e} not allowed in LanguageServiceMode.Syntactic`)}));break;default:xn.assertNever(i)}return N}function I7(e){return e.nameTable||function(e){const t=e.nameTable=new Map;e.forEachChild((function e(n){if(qD(n)&&!jG(n)&&n.escapedText||$h(n)&&function(e){return dh(e)||283===e.parent.kind||function(e){return e&&e.parent&&212===e.parent.kind&&e.parent.argumentExpression===e}(e)||fh(e)}(n)){const e=Gh(n);t.set(e,void 0===t.get(e)?n.pos:-1)}else if(VD(n)){const e=n.escapedText;t.set(e,void 0===t.get(e)?n.pos:-1)}if(LI(n,e),O_(n))for(const t of n.jsDoc)LI(t,e)}))}(e),e.nameTable}function O7(e){const t=function(e){switch(e.kind){case 11:case 15:case 9:if(167===e.parent.kind)return R_(e.parent.parent)?e.parent.parent:void 0;case 80:return!R_(e.parent)||210!==e.parent.parent.kind&&292!==e.parent.parent.kind||e.parent.name!==e?void 0:e.parent}}(e);return t&&(HE(t.parent)||FN(t.parent))?t:void 0}function M7(e,t,n,r){const i=xQ(e.name);if(!i)return u;if(!n.isUnion()){const e=n.getProperty(i);return e?[e]:u}const o=HE(e.parent)||FN(e.parent)?F(n.types,(n=>!t.isTypeInvalidDueToUnionDiscriminant(n,e.parent))):n.types,a=q(o,(e=>e.getProperty(i)));if(r&&(0===a.length||a.length===n.types.length)){const e=n.getProperty(i);if(e)return[e]}return o.length||a.length?ne(a,wt):q(n.types,(e=>e.getProperty(i)))}function L7(e){if(vo)return Ko(Ro(Xo(vo.getExecutingFilePath())),Ls(e));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}function j7(e,t,n){const r=[];n=A1(n,r);const i=ot(e)?e:[e],o=T$(void 0,void 0,YC,n,i,t,!0);return o.diagnostics=Z(o.diagnostics,r),o}Qx({getNodeConstructor:()=>l7,getTokenConstructor:()=>d7,getIdentifierConstructor:()=>p7,getPrivateIdentifierConstructor:()=>f7,getSourceFileConstructor:()=>v7,getSymbolConstructor:()=>class{constructor(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}getFlags(){return this.flags}get name(){return Sc(this)}getEscapedName(){return this.escapedName}getName(){return this.name}getDeclarations(){return this.declarations}getDocumentationComment(e){if(!this.documentationComment)if(this.documentationComment=u,!this.declarations&&td(this)&&this.links.target&&td(this.links.target)&&this.links.target.links.tupleLabelDeclaration){const t=this.links.target.links.tupleLabelDeclaration;this.documentationComment=h7([t],e)}else this.documentationComment=h7(this.declarations,e);return this.documentationComment}getContextualDocumentationComment(e,t){if(e){if(I_(e)&&(this.contextualGetAccessorDocumentationComment||(this.contextualGetAccessorDocumentationComment=h7(F(this.declarations,I_),t)),p(this.contextualGetAccessorDocumentationComment)))return this.contextualGetAccessorDocumentationComment;if(A_(e)&&(this.contextualSetAccessorDocumentationComment||(this.contextualSetAccessorDocumentationComment=h7(F(this.declarations,A_),t)),p(this.contextualSetAccessorDocumentationComment)))return this.contextualSetAccessorDocumentationComment}return this.getDocumentationComment(t)}getJsDocTags(e){return void 0===this.tags&&(this.tags=u,this.tags=g7(this.declarations,e)),this.tags}getContextualJsDocTags(e,t){if(e){if(I_(e)&&(this.contextualGetAccessorTags||(this.contextualGetAccessorTags=g7(F(this.declarations,I_),t)),p(this.contextualGetAccessorTags)))return this.contextualGetAccessorTags;if(A_(e)&&(this.contextualSetAccessorTags||(this.contextualSetAccessorTags=g7(F(this.declarations,A_),t)),p(this.contextualSetAccessorTags)))return this.contextualSetAccessorTags}return this.getJsDocTags(t)}},getTypeConstructor:()=>class{constructor(e,t){this.flags=t,this.checker=e}getFlags(){return this.flags}getSymbol(){return this.symbol}getProperties(){return this.checker.getPropertiesOfType(this)}getProperty(e){return this.checker.getPropertyOfType(this,e)}getApparentProperties(){return this.checker.getAugmentedPropertiesOfType(this)}getCallSignatures(){return this.checker.getSignaturesOfType(this,0)}getConstructSignatures(){return this.checker.getSignaturesOfType(this,1)}getStringIndexType(){return this.checker.getIndexTypeOfType(this,0)}getNumberIndexType(){return this.checker.getIndexTypeOfType(this,1)}getBaseTypes(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0}isNullableType(){return this.checker.isNullableType(this)}getNonNullableType(){return this.checker.getNonNullableType(this)}getNonOptionalType(){return this.checker.getNonOptionalType(this)}getConstraint(){return this.checker.getBaseConstraintOfType(this)}getDefault(){return this.checker.getDefaultFromTypeParameter(this)}isUnion(){return!!(1048576&this.flags)}isIntersection(){return!!(2097152&this.flags)}isUnionOrIntersection(){return!!(3145728&this.flags)}isLiteral(){return!!(2432&this.flags)}isStringLiteral(){return!!(128&this.flags)}isNumberLiteral(){return!!(256&this.flags)}isTypeParameter(){return!!(262144&this.flags)}isClassOrInterface(){return!!(3&wx(this))}isClass(){return!!(1&wx(this))}isIndexType(){return!!(4194304&this.flags)}get typeArguments(){if(4&wx(this))return this.checker.getTypeArguments(this)}},getSignatureConstructor:()=>class{constructor(e,t){this.flags=t,this.checker=e}getDeclaration(){return this.declaration}getTypeParameters(){return this.typeParameters}getParameters(){return this.parameters}getReturnType(){return this.checker.getReturnTypeOfSignature(this)}getTypeParameterAtPosition(e){const t=this.checker.getParameterType(this,e);if(t.isIndexType()&>(t.type)){const e=t.type.getConstraint();if(e)return this.checker.getIndexType(e)}return t}getDocumentationComment(){return this.documentationComment||(this.documentationComment=h7(fn(this.declaration),this.checker))}getJsDocTags(){return this.jsDocTags||(this.jsDocTags=g7(fn(this.declaration),this.checker))}},getSourceMapSourceConstructor:()=>class{constructor(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||(e=>e)}getLineAndCharacterOfPosition(e){return Xa(this,e)}}});var R7={};function B7(e,t){if(e.isDeclarationFile)return;let n=kX(e,t);const r=e.getLineAndCharacterOfPosition(t).line;if(e.getLineAndCharacterOfPosition(n.getStart(e)).line>r){const t=EX(n.pos,e);if(!t||e.getLineAndCharacterOfPosition(t.getEnd()).line!==r)return;n=t}if(!(33554432&n.flags))return l(n);function i(t,n){const r=lI(t)?k(t.modifiers,cE):void 0;return Xs(r?as(e.text,r.end):t.getStart(e),(n||t).getEnd())}function o(t,n){return i(t,DX(n,n.parent,e))}function a(t,n){return t&&r===e.getLineAndCharacterOfPosition(t.getStart(e)).line?l(t):l(n)}function s(t){return l(EX(t.pos,e))}function c(t){return l(DX(t,t.parent,e))}function l(t){if(t){const{parent:u}=t;switch(t.kind){case 243:return _(t.declarationList.declarations[0]);case 260:case 172:case 171:return _(t);case 169:return function e(t){if(Eu(t.name))return g(t.name);if(function(e){return!!e.initializer||void 0!==e.dotDotDotToken||Bv(e,3)}(t))return i(t);{const n=t.parent,r=n.parameters.indexOf(t);return xn.assert(-1!==r),0!==r?e(n.parameters[r-1]):l(n.body)}}(t);case 262:case 174:case 173:case 177:case 178:case 176:case 218:case 219:return function(e){if(e.body)return d(e)?i(e):l(e.body)}(t);case 241:if(zf(t))return function(e){const t=e.statements.length?e.statements[0]:e.getLastToken();return d(e.parent)?a(e.parent,t):l(t)}(t);case 268:return p(t);case 299:return p(t.block);case 244:return i(t.expression);case 253:return i(t.getChildAt(0),t.expression);case 247:return o(t,t.expression);case 246:return l(t.statement);case 259:return i(t.getChildAt(0));case 245:return o(t,t.expression);case 256:return l(t.statement);case 252:case 251:return i(t.getChildAt(0),t.label);case 248:return(r=t).initializer?m(r):r.condition?i(r.condition):r.incrementor?i(r.incrementor):void 0;case 249:return o(t,t.expression);case 250:return m(t);case 255:return o(t,t.expression);case 296:case 297:return l(t.statements[0]);case 258:return p(t.tryBlock);case 257:case 277:return i(t,t.expression);case 271:return i(t,t.moduleReference);case 272:case 278:return i(t,t.moduleSpecifier);case 267:if(1!==DR(t))return;case 263:case 266:case 306:case 208:return i(t);case 254:return l(t.statement);case 170:return function(t,n,r){if(t){const i=t.indexOf(n);if(i>=0){let n=i,o=i+1;for(;n>0&&r(t[n-1]);)n--;for(;o0)return l(t.declarations[0])}}function g(e){const t=f(e.elements,(e=>232!==e.kind?e:void 0));return t?l(t):208===e.parent.kind?i(e.parent):u(e.parent)}function h(e){xn.assert(207!==e.kind&&206!==e.kind);const t=f(209===e.kind?e.elements:e.properties,(e=>232!==e.kind?e:void 0));return t?l(t):i(226===e.parent.kind?e.parent:e)}}}o(R7,{spanInSourceFileAtLocation:()=>B7});var J7={};function z7(e){return uE(e)||KP(e)}function $7(e){return(nP(e)||rP(e)||mP(e))&&z7(e.parent)&&e===e.parent.initializer&&qD(e.parent.name)&&(!!(2&uc(e.parent))||uE(e.parent))}function q7(e){return qN(e)||ZP(e)||HP(e)||nP(e)||GP(e)||mP(e)||pE(e)||dE(e)||_E(e)||mE(e)||gE(e)}function V7(e){return qN(e)||ZP(e)&&qD(e.name)||HP(e)||GP(e)||pE(e)||dE(e)||_E(e)||mE(e)||gE(e)||function(e){return(nP(e)||mP(e))&&Dc(e)}(e)||$7(e)}function U7(e){return qN(e)?e:Dc(e)?e.name:$7(e)?e.parent.name:xn.checkDefined(e.modifiers&&S(e.modifiers,K7))}function K7(e){return 90===e.kind}function W7(e,t){const n=U7(t);return n&&e.getSymbolAtLocation(n)}function H7(e,t){if(t.body)return t;if(fE(t))return pv(t.parent);if(HP(t)||dE(t)){const n=W7(e,t);return n&&n.valueDeclaration&&uu(n.valueDeclaration)&&n.valueDeclaration.body?n.valueDeclaration:void 0}return t}function G7(e,t){const n=W7(e,t);let r;if(n&&n.declarations){const e=te(n.declarations),t=O(n.declarations,(e=>({file:e.getSourceFile().fileName,pos:e.pos})));e.sort(((e,n)=>Mt(t[e].file,t[n].file)||t[e].pos-t[n].pos));const i=O(e,(e=>n.declarations[e]));let o;for(const e of i)V7(e)&&(o&&o.parent===e.parent&&o.end===e.pos||(r=ue(r,e)),o=e)}return r}function X7(e,t){return pE(t)?t:uu(t)?H7(e,t)??G7(e,t)??t:G7(e,t)??t}function Q7(e,t){const n=e.getTypeChecker();let r=!1;for(;;){if(V7(t))return X7(n,t);if(q7(t)){const e=mc(t,V7);return e&&X7(n,e)}if(dh(t)){if(V7(t.parent))return X7(n,t.parent);if(q7(t.parent)){const e=mc(t.parent,V7);return e&&X7(n,e)}return z7(t.parent)&&t.parent.initializer&&$7(t.parent.initializer)?t.parent.initializer:void 0}if(fE(t))return V7(t.parent)?t.parent:void 0;if(126!==t.kind||!pE(t.parent)){if(KP(t)&&t.initializer&&$7(t.initializer))return t.initializer;if(!r){let e=n.getSymbolAtLocation(t);if(e&&(2097152&e.flags&&(e=n.getAliasedSymbol(e)),e.valueDeclaration)){r=!0,t=e.valueDeclaration;continue}}return}t=t.parent}}function Y7(e,t){const n=t.getSourceFile(),r=function(e,t){if(qN(t))return{text:t.fileName,pos:0,end:0};if((HP(t)||GP(t))&&!Dc(t)){const e=t.modifiers&&S(t.modifiers,K7);if(e)return{text:"default",pos:e.getStart(),end:e.getEnd()}}if(pE(t)){const n=as(t.getSourceFile().text,Wb(t).pos),r=n+6,i=e.getTypeChecker(),o=i.getSymbolAtLocation(t.parent);return{text:(o?`${i.symbolToString(o,t.parent)} `:"")+"static {}",pos:n,end:r}}const n=$7(t)?t.parent.name:xn.checkDefined(Pc(t),"Expected call hierarchy item to have a name");let r=qD(n)?bc(n):$h(n)?n.text:oE(n)&&$h(n.expression)?n.expression.text:void 0;if(void 0===r){const i=e.getTypeChecker(),o=i.getSymbolAtLocation(n);o&&(r=i.symbolToString(o,t))}if(void 0===r){const e=nq();r=dd((n=>e.writeNode(4,t,t.getSourceFile(),n)))}return{text:r,pos:n.getStart(),end:n.getEnd()}}(e,t),i=function(e){var t,n,r,i;if($7(e))return uE(e.parent)&&gu(e.parent.parent)?mP(e.parent.parent)?null==(t=Nc(e.parent.parent))?void 0:t.getText():null==(n=e.parent.parent.name)?void 0:n.getText():eN(e.parent.parent.parent.parent)&&qD(e.parent.parent.parent.parent.parent.name)?e.parent.parent.parent.parent.parent.name.getText():void 0;switch(e.kind){case 177:case 178:case 174:return 210===e.parent.kind?null==(r=Nc(e.parent))?void 0:r.getText():null==(i=Pc(e.parent))?void 0:i.getText();case 262:case 263:case 267:if(eN(e.parent)&&qD(e.parent.parent.name))return e.parent.parent.name.getText()}}(t),o=KG(t),a=KX(t),s=Xs(as(n.text,t.getFullStart(),!1,!0),t.getEnd()),c=Xs(r.pos,r.end);return{file:n.fileName,kind:o,kindModifiers:a,name:r.text,containerName:i,span:s,selectionSpan:c}}function Z7(e){return void 0!==e}function e8(e){if(e.kind===Rse.EntryKind.Node){const{node:t}=e;if(SG(t,!0,!0)||kG(t,!0,!0)||TG(t,!0,!0)||CG(t,!0,!0)||BG(t)||JG(t)){const e=t.getSourceFile();return{declaration:mc(t,V7)||e,range:cQ(t,e)}}}}function t8(e){return IB(e.declaration)}function n8(e,t,n){if(qN(t)||ZP(t)||pE(t))return[];const r=U7(t),i=F(Rse.findReferenceOrRenameEntries(e,n,e.getSourceFiles(),r,0,{use:Rse.FindReferencesUse.References},e8),Z7);return i?He(i,t8,(t=>function(e,t){return{from:Y7(e,t[0].declaration),fromSpans:O(t,(e=>lQ(e.range)))}}(e,t))):[]}function r8(e,t){return 33554432&t.flags||_E(t)?[]:He(function(e,t){const n=[],r=function(e,t){function n(n){const r=ZE(n)?n.tag:D_(n)?n.tagName:Ox(n)||pE(n)?n:n.expression,i=Q7(e,r);if(i){const e=cQ(r,n.getSourceFile());if(ot(i))for(const n of i)t.push({declaration:n,range:e});else t.push({declaration:i,range:e})}}return function e(t){if(t&&!(33554432&t.flags))if(V7(t)){if(gu(t))for(const n of t.members)n.name&&oE(n.name)&&e(n.name.expression)}else{switch(t.kind){case 80:case 271:case 272:case 278:case 264:case 265:return;case 175:return void n(t);case 216:case 234:case 238:return void e(t.expression);case 260:case 169:return e(t.name),void e(t.initializer);case 213:case 214:return n(t),e(t.expression),void f(t.arguments,e);case 215:return n(t),e(t.tag),void e(t.template);case 286:case 285:return n(t),e(t.tagName),void e(t.attributes);case 170:return n(t),void e(t.expression);case 211:case 212:n(t),LI(t,e)}wf(t)||LI(t,e)}}}(e,n);switch(t.kind){case 307:!function(e,t){f(e.statements,t)}(t,r);break;case 267:!function(e,t){!Bv(e,128)&&e.body&&eN(e.body)&&f(e.body.statements,t)}(t,r);break;case 262:case 218:case 219:case 174:case 177:case 178:!function(e,t,n){const r=H7(e,t);r&&(f(r.parameters,n),n(r.body))}(e.getTypeChecker(),t,r);break;case 263:case 231:!function(e,t){f(e.modifiers,t);const n=kh(e);n&&t(n.expression);for(const n of e.members)cI(n)&&f(n.modifiers,t),uE(n)?t(n.initializer):fE(n)&&n.body?(f(n.parameters,t),t(n.body)):pE(n)&&t(n)}(t,r);break;case 175:!function(e,t){t(e.body)}(t,r);break;default:xn.assertNever(t)}return n}(e,t),t8,(t=>function(e,t){return{to:Y7(e,t[0].declaration),fromSpans:O(t,(e=>lQ(e.range)))}}(e,t)))}o(J7,{createCallHierarchyItem:()=>Y7,getIncomingCalls:()=>n8,getOutgoingCalls:()=>r8,resolveCallHierarchyDeclaration:()=>Q7});var i8={};o(i8,{v2020:()=>o8});var o8={};o(o8,{TokenEncodingConsts:()=>Y4,TokenModifier:()=>e7,TokenType:()=>Z4,getEncodedSemanticClassifications:()=>n7,getSemanticClassifications:()=>t7});var a8={};o(a8,{PreserveOptionalFlags:()=>lie,addNewNodeForMemberSymbol:()=>uie,codeFixAll:()=>b8,createCodeFixAction:()=>_8,createCodeFixActionMaybeFixAll:()=>d8,createCodeFixActionWithoutFixAll:()=>u8,createCombinedCodeActions:()=>y8,createFileTextChanges:()=>v8,createImportAdder:()=>$9,createImportSpecifierResolver:()=>V9,createJsonPropertyAssignment:()=>kie,createMissingMemberNodes:()=>sie,createSignatureDeclarationFromCallExpression:()=>die,createSignatureDeclarationFromSignature:()=>_ie,createStubbedBody:()=>bie,eachDiagnostic:()=>x8,findAncestorMatchingSpan:()=>Eie,findJsonProperty:()=>Tie,generateAccessorFromProperty:()=>Pie,getAccessorConvertiblePropertyAtPosition:()=>Iie,getAllFixes:()=>h8,getAllSupers:()=>Lie,getArgumentTypesAndTypeParameters:()=>gie,getFixes:()=>g8,getImportCompletionAction:()=>U9,getImportKind:()=>see,getJSDocTypedefNodes:()=>P9,getNoopSymbolTrackerWithResolver:()=>cie,getPromoteTypeOnlyCompletionAction:()=>K9,getSupportedErrorCodes:()=>m8,importFixName:()=>B9,importSymbols:()=>Die,parameterShouldGetTypeFromJSDoc:()=>c5,registerCodeFix:()=>f8,setJsonCompilerOptionValue:()=>Sie,setJsonCompilerOptionValues:()=>xie,tryGetAutoImportableReferenceFromTypeNode:()=>Cie,typeToAutoImportableTypeNode:()=>fie});var s8,c8=et(),l8=new Map;function u8(e,t,n){return p8(e,VZ(n),t,void 0,void 0)}function _8(e,t,n,r,i,o){return p8(e,VZ(n),t,r,VZ(i),o)}function d8(e,t,n,r,i,o){return p8(e,VZ(n),t,r,i&&VZ(i),o)}function p8(e,t,n,r,i,o){return{fixName:e,description:t,changes:n,fixId:r,fixAllDescription:i,commands:o?[o]:void 0}}function f8(e){for(const t of e.errorCodes)s8=void 0,c8.add(String(t),e);if(e.fixIds)for(const t of e.fixIds)xn.assert(!l8.has(t)),l8.set(t,e)}function m8(){return s8??(s8=$e(c8.keys()))}function g8(e){const t=S8(e);return R(c8.get(String(e.errorCode)),(n=>O(n.getCodeActions(e),function(e,t){const{errorCodes:n}=e;let r=0;for(const e of t)if(D(n,e.code)&&r++,r>1)break;const i=r<2;return({fixId:e,fixAllDescription:t,...n})=>i?n:{...n,fixId:e,fixAllDescription:t}}(n,t))))}function h8(e){return l8.get(ut(e.fixId,st)).getAllCodeActions(e)}function y8(e,t){return{changes:e,commands:t}}function v8(e,t){return{fileName:e,textChanges:t}}function b8(e,t,n){const r=[];return y8(r_e.ChangeTracker.with(e,(i=>x8(e,t,(e=>n(i,e,r))))),0===r.length?void 0:r)}function x8(e,t,n){for(const r of S8(e))D(t,r.code)&&n(r)}function S8({program:e,sourceFile:t,cancellationToken:n}){const r=[...e.getSemanticDiagnostics(t,n),...e.getSyntacticDiagnostics(t,n),...p1(t,e,n)];return LS(e.getCompilerOptions())&&r.push(...e.getDeclarationDiagnostics(t,n)),r}var k8="addConvertToUnknownForNonOverlappingTypes",T8=[va.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];function C8(e,t,n){const r=yP(n)?YC.createAsExpression(n.expression,YC.createKeywordTypeNode(159)):YC.createTypeAssertion(YC.createKeywordTypeNode(159),n.expression);e.replaceNode(t,n.expression,r)}function w8(e,t){if(!Mm(e))return mc(kX(e,t),(e=>yP(e)||eP(e)))}f8({errorCodes:T8,getCodeActions:function(e){const t=w8(e.sourceFile,e.span.start);if(void 0===t)return;const n=r_e.ChangeTracker.with(e,(n=>C8(n,e.sourceFile,t)));return[_8(k8,n,va.Add_unknown_conversion_for_non_overlapping_types,k8,va.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[k8],getAllCodeActions:e=>b8(e,T8,((e,t)=>{const n=w8(t.file,t.start);n&&C8(e,t.file,n)}))}),f8({errorCodes:[va.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,va.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,va.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code],getCodeActions:function(e){const{sourceFile:t}=e;return[u8("addEmptyExportDeclaration",r_e.ChangeTracker.with(e,(e=>{const n=YC.createExportDeclaration(void 0,!1,YC.createNamedExports([]),void 0);e.insertNodeAtEndOfScope(t,t,n)})),va.Add_export_to_make_this_file_into_a_module)]}});var D8="addMissingAsync",E8=[va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,va.Type_0_is_not_assignable_to_type_1.code,va.Type_0_is_not_comparable_to_type_1.code];function P8(e,t,n,r){const i=n((n=>function(e,t,n,r){if(r&&r.has(IB(n)))return;null==r||r.add(IB(n));const i=YC.replaceModifiers(NY(n,!0),YC.createNodeArray(YC.createModifiersFromModifierFlags(1024|Zv(n))));e.replaceNode(t,n,i)}(n,e.sourceFile,t,r)));return _8(D8,i,va.Add_async_modifier_to_containing_function,D8,va.Add_all_missing_async_modifiers)}function N8(e,t){if(t)return mc(kX(e,t.start),(n=>n.getStart(e)js(t)?"quit":(rP(n)||dE(n)||nP(n)||HP(n))&&VQ(t,aQ(n,e))))}f8({fixIds:[D8],errorCodes:E8,getCodeActions:function(e){const{sourceFile:t,errorCode:n,cancellationToken:r,program:i,span:o}=e,a=S(i.getTypeChecker().getDiagnostics(t,r),function(e,t){return({start:n,length:r,relatedInformation:i,code:o})=>ct(n)&&ct(r)&&VQ({start:n,length:r},e)&&o===t&&!!i&&Q(i,(e=>e.code===va.Did_you_mean_to_mark_this_function_as_async.code))}(o,n)),s=N8(t,a&&a.relatedInformation&&S(a.relatedInformation,(e=>e.code===va.Did_you_mean_to_mark_this_function_as_async.code)));if(s)return[P8(e,s,(t=>r_e.ChangeTracker.with(e,t)))]},getAllCodeActions:e=>{const{sourceFile:t}=e,n=new Set;return b8(e,E8,((r,i)=>{const o=i.relatedInformation&&S(i.relatedInformation,(e=>e.code===va.Did_you_mean_to_mark_this_function_as_async.code)),a=N8(t,o);if(a)return P8(e,a,(e=>(e(r),[])),n)}))}});var F8="addMissingAwait",A8=va.Property_0_does_not_exist_on_type_1.code,I8=[va.This_expression_is_not_callable.code,va.This_expression_is_not_constructable.code],O8=[va.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,va.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,va.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,va.Operator_0_cannot_be_applied_to_type_1.code,va.Operator_0_cannot_be_applied_to_types_1_and_2.code,va.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code,va.This_condition_will_always_return_true_since_this_0_is_always_defined.code,va.Type_0_is_not_an_array_type.code,va.Type_0_is_not_an_array_type_or_a_string_type.code,va.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code,va.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,va.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,va.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,va.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,A8,...I8];function M8(e,t,n,r,i){const o=DZ(e,n);return o&&function(e,t,n,r,i){return Q(i.getTypeChecker().getDiagnostics(e,r),(({start:e,length:r,relatedInformation:i,code:o})=>ct(e)&&ct(r)&&VQ({start:e,length:r},n)&&o===t&&!!i&&Q(i,(e=>e.code===va.Did_you_forget_to_use_await.code))))}(e,t,n,r,i)&&B8(o)?o:void 0}function L8(e,t,n,r,i,o){const{sourceFile:a,program:s,cancellationToken:c}=e,l=function(e,t,n,r,i){const o=function(e,t){if(GE(e.parent)&&qD(e.parent.expression))return{identifiers:[e.parent.expression],isCompleteFix:!0};if(qD(e))return{identifiers:[e],isCompleteFix:!0};if(uP(e)){let n,r=!0;for(const i of[e.left,e.right]){const e=t.getTypeAtLocation(i);if(t.getPromisedTypeOfPromise(e)){if(!qD(i)){r=!1;continue}(n||(n=[])).push(i)}}return n&&{identifiers:n,isCompleteFix:r}}}(e,i);if(!o)return;let a,s=o.isCompleteFix;for(const e of o.identifiers){const o=i.getSymbolAtLocation(e);if(!o)continue;const c=lt(o.valueDeclaration,KP),l=c&<(c.name,qD),u=Eh(c,243);if(!c||!u||c.type||!c.initializer||u.getSourceFile()!==t||Bv(u,32)||!l||!B8(c.initializer)){s=!1;continue}const _=r.getSemanticDiagnostics(t,n);Rse.Core.eachSymbolReferenceInFile(l,i,t,(n=>e!==n&&!R8(n,_,t,i)))?s=!1:(a||(a=[])).push({expression:c.initializer,declarationSymbol:o})}return a&&{initializers:a,needsSecondPassForFixAll:!s}}(t,a,c,s,r);if(l)return u8("addMissingAwaitToInitializer",i((e=>{f(l.initializers,(({expression:t})=>J8(e,n,a,r,t,o))),o&&l.needsSecondPassForFixAll&&J8(e,n,a,r,t,o)})),1===l.initializers.length?[va.Add_await_to_initializer_for_0,l.initializers[0].declarationSymbol.name]:va.Add_await_to_initializers)}function j8(e,t,n,r,i,o){const a=i((i=>J8(i,n,e.sourceFile,r,t,o)));return _8(F8,a,va.Add_await,F8,va.Fix_all_expressions_possibly_missing_await)}function R8(e,t,n,r){const i=GE(e.parent)?e.parent.name:uP(e.parent)?e.parent:e,o=S(t,(e=>e.start===i.getStart(n)&&e.start+e.length===i.getEnd()));return o&&D(O8,o.code)||1&r.getTypeAtLocation(i).flags}function B8(e){return 65536&e.flags||!!mc(e,(e=>e.parent&&rP(e.parent)&&e.parent.body===e||DP(e)&&(262===e.parent.kind||218===e.parent.kind||219===e.parent.kind||174===e.parent.kind)))}function J8(e,t,n,r,i,o){if(LP(i.parent)&&!i.parent.awaitModifier){const t=r.getTypeAtLocation(i),o=r.getAsyncIterableType();if(o&&r.isTypeAssignableTo(t,o)){const t=i.parent;return void e.replaceNode(n,t,YC.updateForOfStatement(t,YC.createToken(135),t.initializer,t.expression,t.statement))}}if(uP(i))for(const t of[i.left,i.right]){if(o&&qD(t)){const e=r.getSymbolAtLocation(t);if(e&&o.has(OB(e)))continue}const i=r.getTypeAtLocation(t),a=r.getPromisedTypeOfPromise(i)?YC.createAwaitExpression(t):t;e.replaceNode(n,t,a)}else if(t===A8&&GE(i.parent)){if(o&&qD(i.parent.expression)){const e=r.getSymbolAtLocation(i.parent.expression);if(e&&o.has(OB(e)))return}e.replaceNode(n,i.parent.expression,YC.createParenthesizedExpression(YC.createAwaitExpression(i.parent.expression))),z8(e,i.parent.expression,n)}else if(D(I8,t)&&$u(i.parent)){if(o&&qD(i)){const e=r.getSymbolAtLocation(i);if(e&&o.has(OB(e)))return}e.replaceNode(n,i,YC.createParenthesizedExpression(YC.createAwaitExpression(i))),z8(e,i,n)}else{if(o&&KP(i.parent)&&qD(i.parent.name)){const e=r.getSymbolAtLocation(i.parent.name);if(e&&!W(o,OB(e)))return}e.replaceNode(n,i,YC.createAwaitExpression(i))}}function z8(e,t,n){const r=EX(t.pos,n);r&&cZ(r.end,r.parent,n)&&e.insertText(n,t.getStart(n),";")}f8({fixIds:[F8],errorCodes:O8,getCodeActions:function(e){const{sourceFile:t,errorCode:n,span:r,cancellationToken:i,program:o}=e,a=M8(t,n,r,i,o);if(!a)return;const s=e.program.getTypeChecker(),c=t=>r_e.ChangeTracker.with(e,t);return ce([L8(e,a,n,s,c),j8(e,a,n,s,c)])},getAllCodeActions:e=>{const{sourceFile:t,program:n,cancellationToken:r}=e,i=e.program.getTypeChecker(),o=new Set;return b8(e,O8,((a,s)=>{const c=M8(t,s.code,s,r,n);if(!c)return;const l=e=>(e(a),[]);return L8(e,c,s.code,i,l,o)||j8(e,c,s.code,i,l,o)}))}});var $8="addMissingConst",q8=[va.Cannot_find_name_0.code,va.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code];function V8(e,t,n,r,i){const o=kX(t,n),a=mc(o,(e=>i_(e.parent)?e.parent.initializer===e:!function(e){switch(e.kind){case 80:case 209:case 210:case 303:case 304:return!0;default:return!1}}(e)&&"quit"));if(a)return U8(e,a,t,i);const s=o.parent;if(uP(s)&&64===s.operatorToken.kind&&NP(s.parent))return U8(e,o,t,i);if(WE(s)){const n=r.getTypeChecker();if(!x(s.elements,(e=>function(e,t){const n=qD(e)?e:mb(e,!0)&&qD(e.left)?e.left:void 0;return!!n&&!t.getSymbolAtLocation(n)}(e,n))))return;return U8(e,s,t,i)}const c=mc(o,(e=>!!NP(e.parent)||!function(e){switch(e.kind){case 80:case 226:case 28:return!0;default:return!1}}(e)&&"quit"));if(c){if(!K8(c,r.getTypeChecker()))return;return U8(e,c,t,i)}}function U8(e,t,n,r){r&&!W(r,t)||e.insertModifierBefore(n,87,t)}function K8(e,t){return!!uP(e)&&(28===e.operatorToken.kind?x([e.left,e.right],(e=>K8(e,t))):64===e.operatorToken.kind&&qD(e.left)&&!t.getSymbolAtLocation(e.left))}f8({errorCodes:q8,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>V8(t,e.sourceFile,e.span.start,e.program)));if(t.length>0)return[_8($8,t,va.Add_const_to_unresolved_variable,$8,va.Add_const_to_all_unresolved_variables)]},fixIds:[$8],getAllCodeActions:e=>{const t=new Set;return b8(e,q8,((n,r)=>V8(n,r.file,r.start,e.program,t)))}});var W8="addMissingDeclareProperty",H8=[va.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];function G8(e,t,n,r){const i=kX(t,n);if(!qD(i))return;const o=i.parent;172!==o.kind||r&&!W(r,o)||e.insertModifierBefore(t,138,o)}f8({errorCodes:H8,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>G8(t,e.sourceFile,e.span.start)));if(t.length>0)return[_8(W8,t,va.Prefix_with_declare,W8,va.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[W8],getAllCodeActions:e=>{const t=new Set;return b8(e,H8,((e,n)=>G8(e,n.file,n.start,t)))}});var X8="addMissingInvocationForDecorator",Q8=[va._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];function Y8(e,t,n){const r=mc(kX(t,n),cE);xn.assert(!!r,"Expected position to be owned by a decorator.");const i=YC.createCallExpression(r.expression,void 0,void 0);e.replaceNode(t,r.expression,i)}f8({errorCodes:Q8,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>Y8(t,e.sourceFile,e.span.start)));return[_8(X8,t,va.Call_decorator_expression,X8,va.Add_to_all_uncalled_decorators)]},fixIds:[X8],getAllCodeActions:e=>b8(e,Q8,((e,t)=>Y8(e,t.file,t.start)))});var Z8="addNameToNamelessParameter",e5=[va.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];function t5(e,t,n){const r=kX(t,n),i=r.parent;if(!sE(i))return xn.fail("Tried to add a parameter name to a non-parameter: "+xn.formatSyntaxKind(r.kind));const o=i.parent.parameters.indexOf(i);xn.assert(!i.type,"Tried to add a parameter name to a parameter that already had one."),xn.assert(o>-1,"Parameter not found in parent parameter list.");let a=i.name.getEnd(),s=YC.createTypeReferenceNode(i.name,void 0),c=n5(t,i);for(;c;)s=YC.createArrayTypeNode(s),a=c.getEnd(),c=n5(t,c);const l=YC.createParameterDeclaration(i.modifiers,i.dotDotDotToken,"arg"+o,i.questionToken,i.dotDotDotToken&&!wE(s)?YC.createArrayTypeNode(s):s,i.initializer);e.replaceRange(t,qb(i.getStart(t),a),l)}function n5(e,t){const n=DX(t.name,t.parent,e);if(n&&23===n.kind&&UE(n.parent)&&sE(n.parent.parent))return n.parent.parent}f8({errorCodes:e5,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>t5(t,e.sourceFile,e.span.start)));return[_8(Z8,t,va.Add_parameter_name,Z8,va.Add_names_to_all_parameters_without_names)]},fixIds:[Z8],getAllCodeActions:e=>b8(e,e5,((e,t)=>t5(e,t.file,t.start)))});var r5="addOptionalPropertyUndefined";function i5(e,t){var n;if(e){if(uP(e.parent)&&64===e.parent.operatorToken.kind)return{source:e.parent.right,target:e.parent.left};if(KP(e.parent)&&e.parent.initializer)return{source:e.parent.initializer,target:e.parent.name};if(QE(e.parent)){const n=t.getSymbolAtLocation(e.parent.expression);if(!(null==n?void 0:n.valueDeclaration)||!pu(n.valueDeclaration.kind))return;if(!Xu(e))return;const r=e.parent.arguments.indexOf(e);if(-1===r)return;const i=n.valueDeclaration.parameters[r].name;if(qD(i))return{source:e,target:i}}else if(BN(e.parent)&&qD(e.parent.name)||JN(e.parent)){const r=i5(e.parent.parent,t);if(!r)return;const i=t.getPropertyOfType(t.getTypeAtLocation(r.target),e.parent.name.text),o=null==(n=null==i?void 0:i.declarations)?void 0:n[0];if(!o)return;return{source:BN(e.parent)?e.parent.initializer:e.parent.name,target:o}}}}f8({errorCodes:[va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code,va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code],getCodeActions(e){const t=e.program.getTypeChecker(),n=function(e,t,n){var r,i;const o=i5(DZ(e,t),n);if(!o)return u;const{source:a,target:s}=o,c=function(e,t,n){return GE(t)&&!!n.getExactOptionalProperties(n.getTypeAtLocation(t.expression)).length&&n.getTypeAtLocation(e)===n.getUndefinedType()}(a,s,n)?n.getTypeAtLocation(s.expression):n.getTypeAtLocation(s);return(null==(i=null==(r=c.symbol)?void 0:r.declarations)?void 0:i.some((e=>Sd(e).fileName.match(/\.d\.ts$/))))?u:n.getExactOptionalProperties(c)}(e.sourceFile,e.span,t);if(!n.length)return;const r=r_e.ChangeTracker.with(e,(e=>function(e,t){for(const n of t){const t=n.valueDeclaration;if(t&&(lE(t)||uE(t))&&t.type){const n=YC.createUnionTypeNode([...192===t.type.kind?t.type.types:[t.type],YC.createTypeReferenceNode("undefined")]);e.replaceNode(t.getSourceFile(),t.type,n)}}}(e,n)));return[u8(r5,r,va.Add_undefined_to_optional_property_type)]},fixIds:[r5]});var o5="annotateWithTypeFromJSDoc",a5=[va.JSDoc_types_may_be_moved_to_TypeScript_types.code];function s5(e,t){const n=kX(e,t);return lt(sE(n.parent)?n.parent.parent:n.parent,c5)}function c5(e){return function(e){return uu(e)||260===e.kind||171===e.kind||172===e.kind}(e)&&l5(e)}function l5(e){return uu(e)?e.parameters.some(l5)||!e.type&&!!sl(e):!e.type&&!!al(e)}function u5(e,t,n){if(uu(n)&&(sl(n)||n.parameters.some((e=>!!al(e))))){if(!n.typeParameters){const r=wv(n);r.length&&e.insertTypeParameters(t,n,r)}const r=rP(n)&&!uX(n,21,t);r&&e.insertNodeBefore(t,Te(n.parameters),YC.createToken(21));for(const r of n.parameters)if(!r.type){const n=al(r);n&&e.tryInsertTypeAnnotation(t,r,qB(n,_5,wu))}if(r&&e.insertNodeAfter(t,De(n.parameters),YC.createToken(22)),!n.type){const r=sl(n);r&&e.tryInsertTypeAnnotation(t,n,qB(r,_5,wu))}}else{const r=xn.checkDefined(al(n),"A JSDocType for this declaration should exist");xn.assert(!n.type,"The JSDocType decl should have a type"),e.tryInsertTypeAnnotation(t,n,qB(r,_5,wu))}}function _5(e){switch(e.kind){case 312:case 313:return YC.createTypeReferenceNode("any",u);case 316:return function(e){return YC.createUnionTypeNode([qB(e.type,_5,wu),YC.createTypeReferenceNode("undefined",u)])}(e);case 315:return _5(e.type);case 314:return function(e){return YC.createUnionTypeNode([qB(e.type,_5,wu),YC.createTypeReferenceNode("null",u)])}(e);case 318:return function(e){return YC.createArrayTypeNode(qB(e.type,_5,wu))}(e);case 317:return function(e){return YC.createFunctionTypeNode(u,e.parameters.map(d5),e.type??YC.createKeywordTypeNode(133))}(e);case 183:return function(e){let t=e.typeName,n=e.typeArguments;if(qD(e.typeName)){if(Bm(e))return function(e){const t=YC.createParameterDeclaration(void 0,void 0,150===e.typeArguments[0].kind?"n":"s",void 0,YC.createTypeReferenceNode(150===e.typeArguments[0].kind?"number":"string",[]),void 0),n=YC.createTypeLiteralNode([YC.createIndexSignature(void 0,[t],e.typeArguments[1])]);return iw(n,1),n}(e);let r=e.typeName.text;switch(e.typeName.text){case"String":case"Boolean":case"Object":case"Number":r=r.toLowerCase();break;case"array":case"date":case"promise":r=r[0].toUpperCase()+r.slice(1)}t=YC.createIdentifier(r),n="Array"!==r&&"Promise"!==r||e.typeArguments?VB(e.typeArguments,_5,wu):YC.createNodeArray([YC.createTypeReferenceNode("any",u)])}return YC.createTypeReferenceNode(t,n)}(e);case 322:return function(e){const t=YC.createTypeLiteralNode(O(e.jsDocPropertyTags,(e=>YC.createPropertySignature(void 0,qD(e.name)?e.name:e.name.right,eC(e)?YC.createToken(58):void 0,e.typeExpression&&qB(e.typeExpression.type,_5,wu)||YC.createKeywordTypeNode(133)))));return iw(t,1),t}(e);default:const t=ZB(e,_5,void 0);return iw(t,1),t}}function d5(e){const t=e.parent.parameters.indexOf(e),n=318===e.type.kind&&t===e.parent.parameters.length-1,r=e.name||(n?"rest":"arg"+t),i=n?YC.createToken(26):e.dotDotDotToken;return YC.createParameterDeclaration(e.modifiers,i,r,e.questionToken,qB(e.type,_5,wu),e.initializer)}f8({errorCodes:a5,getCodeActions(e){const t=s5(e.sourceFile,e.span.start);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>u5(n,e.sourceFile,t)));return[_8(o5,n,va.Annotate_with_type_from_JSDoc,o5,va.Annotate_everything_with_types_from_JSDoc)]},fixIds:[o5],getAllCodeActions:e=>b8(e,a5,((e,t)=>{const n=s5(t.file,t.start);n&&u5(e,t.file,n)}))});var p5="convertFunctionToEs6Class",f5=[va.This_constructor_function_may_be_converted_to_a_class_declaration.code];function m5(e,t,n,r,i,o){const a=r.getSymbolAtLocation(kX(t,n));if(!(a&&a.valueDeclaration&&19&a.flags))return;const s=a.valueDeclaration;if(HP(s)||nP(s))e.replaceNode(t,s,function(e){const t=c(a);e.body&&t.unshift(YC.createConstructorDeclaration(void 0,e.parameters,e.body));const n=g5(e,95);return YC.createClassDeclaration(n,e.name,void 0,void 0,t)}(s));else if(KP(s)){const n=function(e){const t=e.initializer;if(!t||!nP(t)||!qD(e.name))return;const n=c(e.symbol);t.body&&n.unshift(YC.createConstructorDeclaration(void 0,t.parameters,t.body));const r=g5(e.parent.parent,95);return YC.createClassDeclaration(r,e.name,void 0,void 0,n)}(s);if(!n)return;const r=s.parent.parent;WP(s.parent)&&s.parent.declarations.length>1?(e.delete(t,s),e.insertNodeAfter(t,r,n)):e.replaceNode(t,r,n)}function c(n){const r=[];return n.exports&&n.exports.forEach((e=>{if("prototype"===e.name&&e.declarations){const t=e.declarations[0];1===e.declarations.length&&GE(t)&&uP(t.parent)&&64===t.parent.operatorToken.kind&&HE(t.parent.right)&&a(t.parent.right.symbol,void 0,r)}else a(e,[YC.createToken(126)],r)})),n.members&&n.members.forEach(((i,o)=>{var s,c,l,u;if("constructor"===o&&i.valueDeclaration){const r=null==(u=null==(l=null==(c=null==(s=n.exports)?void 0:s.get("prototype"))?void 0:c.declarations)?void 0:l[0])?void 0:u.parent;r&&uP(r)&&HE(r.right)&&Q(r.right.properties,h5)||e.delete(t,i.valueDeclaration.parent)}else a(i,void 0,r)})),r;function a(n,r,a){if(!(8192&n.flags||4096&n.flags))return;const s=n.valueDeclaration,c=s.parent,l=c.right;if(_=l,!(Ox(u=s)?GE(u)&&h5(u)||cu(_):x(u.properties,(e=>!!(dE(e)||yl(e)||BN(e)&&nP(e.initializer)&&e.name||h5(e))))))return;var u,_;if(Q(a,(e=>{const t=Pc(e);return!(!t||!qD(t)||bc(t)!==Sc(n))})))return;const d=c.parent&&244===c.parent.kind?c.parent:c;if(e.delete(t,d),l)if(Ox(s)&&(nP(l)||rP(l))){const e=AQ(t,i),n=function(e,t,n){if(GE(e))return e.name;const r=e.argumentExpression;return TD(r)?r:$_(r)?Ts(r.text,wS(t))?YC.createIdentifier(r.text):PD(r)?YC.createStringLiteral(r.text,0===n):r:void 0}(s,o,e);n&&p(a,l,n)}else{if(!HE(l)){if(Im(t))return;if(!GE(s))return;const e=YC.createPropertyDeclaration(r,s.name,void 0,void 0,l);return qY(c.parent,e,t),void a.push(e)}f(l.properties,(e=>{(dE(e)||yl(e))&&a.push(e),BN(e)&&nP(e.initializer)&&p(a,e.initializer,e.name),h5(e)}))}else a.push(YC.createPropertyDeclaration(r,n.name,void 0,void 0,void 0));function p(e,n,i){return nP(n)?function(e,n,i){const o=Z(r,g5(n,134)),a=YC.createMethodDeclaration(o,void 0,i,void 0,void 0,n.parameters,void 0,n.body);return qY(c,a,t),void e.push(a)}(e,n,i):function(e,n,i){const o=n.body;let a;a=241===o.kind?o:YC.createBlock([YC.createReturnStatement(o)]);const s=Z(r,g5(n,134)),l=YC.createMethodDeclaration(s,void 0,i,void 0,void 0,n.parameters,void 0,a);qY(c,l,t),e.push(l)}(e,n,i)}}}}function g5(e,t){return cI(e)?F(e.modifiers,(e=>e.kind===t)):void 0}function h5(e){return!!e.name&&!(!qD(e.name)||"constructor"!==e.name.text)}f8({errorCodes:f5,getCodeActions(e){const t=r_e.ChangeTracker.with(e,(t=>m5(t,e.sourceFile,e.span.start,e.program.getTypeChecker(),e.preferences,e.program.getCompilerOptions())));return[_8(p5,t,va.Convert_function_to_an_ES2015_class,p5,va.Convert_all_constructor_functions_to_classes)]},fixIds:[p5],getAllCodeActions:e=>b8(e,f5,((t,n)=>m5(t,n.file,n.start,e.program.getTypeChecker(),e.preferences,e.program.getCompilerOptions())))});var y5="convertToAsyncFunction",v5=[va.This_may_be_converted_to_an_async_function.code],b5=!0;function x5(e,t,n,r){const i=kX(t,n);let o;if(o=qD(i)&&KP(i.parent)&&i.parent.initializer&&uu(i.parent.initializer)?i.parent.initializer:lt(Qf(kX(t,n)),k1),!o)return;const a=new Map,s=Mm(o),c=function(e,t){if(!e.body)return new Set;const n=new Set;return LI(e.body,(function e(r){S5(r,t,"then")?(n.add(IB(r)),f(r.arguments,e)):S5(r,t,"catch")||S5(r,t,"finally")?(n.add(IB(r)),LI(r,e)):C5(r,t)?n.add(IB(r)):LI(r,e)})),n}(o,r),l=function(e,t,n){const r=new Map,i=et();return LI(e,(function e(o){if(!qD(o))return void LI(o,e);const a=t.getSymbolAtLocation(o);if(a){const e=R5(t.getTypeAtLocation(o),t),s=OB(a).toString();if(!e||sE(o.parent)||uu(o.parent)||n.has(s)){if(o.parent&&(sE(o.parent)||KP(o.parent)||KE(o.parent))){const e=o.text,t=i.get(e);if(t&&t.some((e=>e!==a))){const t=w5(o,i);r.set(s,t.identifier),n.set(s,t),i.add(e,a)}else{const t=NY(o);n.set(s,$5(t)),i.add(e,a)}}}else{const t=Se(e.parameters),r=(null==t?void 0:t.valueDeclaration)&&sE(t.valueDeclaration)&<(t.valueDeclaration.name,qD)||YC.createUniqueName("result",16),o=w5(r,i);n.set(s,o),i.add(r.text,a)}}})),FY(e,!0,(e=>{if(KE(e)&&qD(e.name)&&VE(e.parent)){const n=t.getSymbolAtLocation(e.name),i=n&&r.get(String(OB(n)));if(i&&i.text!==(e.name||e.propertyName).getText())return YC.createBindingElement(e.dotDotDotToken,e.propertyName||e.name,i,e.initializer)}else if(qD(e)){const n=t.getSymbolAtLocation(e),i=n&&r.get(String(OB(n)));if(i)return YC.createIdentifier(i.text)}}))}(o,r,a);if(!g1(l,r))return;const _=l.body&&DP(l.body)?function(e,t){const n=[];return Pf(e,(e=>{h1(e,t)&&n.push(e)})),n}(l.body,r):u,d={checker:r,synthNamesMap:a,setOfExpressionsToReturn:c,isInJSFile:s};if(!_.length)return;const p=as(t.text,Wb(o).pos);e.insertModifierAt(t,p,134,{suffix:" "});for(const n of _)if(LI(n,(function r(i){if(QE(i)){const r=P5(i,i,d,!1);if(D5())return!0;e.replaceNodeWithNodes(t,n,r)}else if(!cu(i)&&(LI(i,r),D5()))return!0})),D5())return}function S5(e,t,n){if(!QE(e))return!1;const r=IG(e,n)&&t.getTypeAtLocation(e);return!(!r||!t.getPromisedTypeOfPromise(r))}function k5(e,t){return 0!=(4&wx(e))&&e.target===t}function T5(e,t,n){if("finally"===e.expression.name.escapedText)return;const r=n.getTypeAtLocation(e.expression.expression);if(k5(r,n.getPromiseType())||k5(r,n.getPromiseLikeType())){if("then"!==e.expression.name.escapedText)return xe(e.typeArguments,0);if(t===xe(e.arguments,0))return xe(e.typeArguments,0);if(t===xe(e.arguments,1))return xe(e.typeArguments,1)}}function C5(e,t){return!!Xu(e)&&!!t.getPromisedTypeOfPromise(t.getTypeAtLocation(e))}function w5(e,t){const n=(t.get(e.text)||u).length;return $5(0===n?e:YC.createIdentifier(e.text+"_"+n))}function D5(){return!b5}function E5(){return b5=!1,u}function P5(e,t,n,r,i){if(S5(t,n.checker,"then"))return function(e,t,n,r,i,o){if(!t||N5(r,t))return I5(e,n,r,i,o);if(n&&!N5(r,n))return E5();const a=J5(t,r),s=P5(e.expression.expression,e.expression.expression,r,!0,a);if(D5())return E5();const c=L5(t,i,o,a,e,r);return D5()?E5():Z(s,c)}(t,xe(t.arguments,0),xe(t.arguments,1),n,r,i);if(S5(t,n.checker,"catch"))return I5(t,xe(t.arguments,0),n,r,i);if(S5(t,n.checker,"finally"))return function(e,t,n,r,i){if(!t||N5(n,t))return P5(e,e.expression.expression,n,r,i);const o=F5(e,n,i),a=P5(e,e.expression.expression,n,!0,o);if(D5())return E5();const s=L5(t,r,void 0,void 0,e,n);if(D5())return E5();const c=YC.createBlock(a),l=YC.createBlock(s);return A5(e,n,YC.createTryStatement(c,void 0,l),o,i)}(t,xe(t.arguments,0),n,r,i);if(GE(t))return P5(e,t.expression,n,r,i);const o=n.checker.getTypeAtLocation(t);return o&&n.checker.getPromisedTypeOfPromise(o)?(xn.assertNode(fc(t).parent,GE),function(e,t,n,r,i){if(H5(e,n)){let e=NY(t);return r&&(e=YC.createAwaitExpression(e)),[YC.createReturnStatement(e)]}return O5(i,YC.createAwaitExpression(t),void 0)}(e,t,n,r,i)):E5()}function N5({checker:e},t){if(106===t.kind)return!0;if(qD(t)&&!Xl(t)&&"undefined"===bc(t)){const n=e.getSymbolAtLocation(t);return!n||e.isUndefinedSymbol(n)}return!1}function F5(e,t,n){let r;return n&&!H5(e,t)&&(W5(n)?(r=n,t.synthNamesMap.forEach(((e,r)=>{if(e.identifier.text===n.identifier.text){const e=(i=n,$5(YC.createUniqueName(i.identifier.text,16)));t.synthNamesMap.set(r,e)}var i}))):r=$5(YC.createUniqueName("result",16),n.types),K5(r)),r}function A5(e,t,n,r,i){const o=[];let a;if(r&&!H5(e,t)){a=NY(K5(r));const e=r.types,n=t.checker.getUnionType(e,2),i=t.isInJSFile?void 0:t.checker.typeToTypeNode(n,void 0,void 0),s=[YC.createVariableDeclaration(a,void 0,i)],c=YC.createVariableStatement(void 0,YC.createVariableDeclarationList(s,1));o.push(c)}return o.push(n),i&&a&&1===i.kind&&o.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(NY(U5(i)),void 0,void 0,a)],2))),o}function I5(e,t,n,r,i){if(!t||N5(n,t))return P5(e,e.expression.expression,n,r,i);const o=J5(t,n),a=F5(e,n,i),s=P5(e,e.expression.expression,n,!0,a);if(D5())return E5();const c=L5(t,r,a,o,e,n);if(D5())return E5();const l=YC.createBlock(s),u=YC.createCatchClause(o&&NY(V5(o)),YC.createBlock(c));return A5(e,n,YC.createTryStatement(l,u,void 0),a,i)}function O5(e,t,n){return!e||z5(e)?[YC.createExpressionStatement(t)]:W5(e)&&e.hasBeenDeclared?[YC.createExpressionStatement(YC.createAssignment(NY(q5(e)),t))]:[YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(NY(V5(e)),void 0,n,t)],2))]}function M5(e,t){if(t&&e){const n=YC.createUniqueName("result",16);return[...O5($5(n),e,t),YC.createReturnStatement(n)]}return[YC.createReturnStatement(e)]}function L5(e,t,n,r,i,o){var a;switch(e.kind){case 106:break;case 211:case 80:if(!r)break;const s=YC.createCallExpression(NY(e),void 0,W5(r)?[q5(r)]:[]);if(H5(i,o))return M5(s,T5(i,e,o.checker));const c=o.checker.getTypeAtLocation(e),l=o.checker.getSignaturesOfType(c,0);if(!l.length)return E5();const _=l[0].getReturnType(),d=O5(n,YC.createAwaitExpression(s),T5(i,e,o.checker));return n&&n.types.push(o.checker.getAwaitedType(_)||_),d;case 218:case 219:{const r=e.body,s=null==(a=R5(o.checker.getTypeAtLocation(e),o.checker))?void 0:a.getReturnType();if(DP(r)){let a=[],c=!1;for(const l of r.statements)if(BP(l))if(c=!0,h1(l,o.checker))a=a.concat(B5(o,l,t,n));else{const t=s&&l.expression?j5(o.checker,s,l.expression):l.expression;a.push(...M5(t,T5(i,e,o.checker)))}else{if(t&&Pf(l,pt))return E5();a.push(l)}return H5(i,o)?a.map((e=>NY(e))):function(e,t,n,r){const i=[];for(const r of e)if(BP(r)){if(r.expression){const e=C5(r.expression,n.checker)?YC.createAwaitExpression(r.expression):r.expression;void 0===t?i.push(YC.createExpressionStatement(e)):W5(t)&&t.hasBeenDeclared?i.push(YC.createExpressionStatement(YC.createAssignment(q5(t),e))):i.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(V5(t),void 0,void 0,e)],2)))}}else i.push(NY(r));return r||void 0===t||i.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(V5(t),void 0,void 0,YC.createIdentifier("undefined"))],2))),i}(a,n,o,c)}{const a=y1(r,o.checker)?B5(o,YC.createReturnStatement(r),t,n):u;if(a.length>0)return a;if(s){const t=j5(o.checker,s,r);if(H5(i,o))return M5(t,T5(i,e,o.checker));{const e=O5(n,t,void 0);return n&&n.types.push(o.checker.getAwaitedType(s)||s),e}}return E5()}}default:return E5()}return u}function j5(e,t,n){const r=NY(n);return e.getPromisedTypeOfPromise(t)?YC.createAwaitExpression(r):r}function R5(e,t){return we(t.getSignaturesOfType(e,0))}function B5(e,t,n,r){let i=[];return LI(t,(function t(o){if(QE(o)){const t=P5(o,o,e,n,r);if(i=i.concat(t),i.length>0)return}else cu(o)||LI(o,t)})),i}function J5(e,t){const n=[];let r;if(uu(e)?e.parameters.length>0&&(r=function e(t){if(qD(t))return i(t);return function(e,t=u,n=[]){return{kind:1,bindingPattern:e,elements:t,types:n}}(t,R(t.elements,(t=>gP(t)?[]:[e(t.name)])))}(e.parameters[0].name)):qD(e)?r=i(e):GE(e)&&qD(e.name)&&(r=i(e.name)),r&&(!("identifier"in r)||"undefined"!==r.identifier.text))return r;function i(e){var r;const i=function(e){var n;return(null==(n=lt(e,p_))?void 0:n.symbol)??t.checker.getSymbolAtLocation(e)}((r=e).original?r.original:r);return i&&t.synthNamesMap.get(OB(i).toString())||$5(e,n)}}function z5(e){return!e||(W5(e)?!e.identifier.text:x(e.elements,z5))}function $5(e,t=[]){return{kind:0,identifier:e,types:t,hasBeenDeclared:!1,hasBeenReferenced:!1}}function q5(e){return e.hasBeenReferenced=!0,e.identifier}function V5(e){return W5(e)?K5(e):U5(e)}function U5(e){for(const t of e.elements)V5(t);return e.bindingPattern}function K5(e){return e.hasBeenDeclared=!0,e.identifier}function W5(e){return 0===e.kind}function H5(e,t){return!!e.original&&t.setOfExpressionsToReturn.has(IB(e.original))}function G5(e,t,n,r,i){var o;for(const a of e.imports){const s=null==(o=n.getResolvedModuleFromModuleSpecifier(a,e))?void 0:o.resolvedModule;if(!s||s.resolvedFileName!==t.fileName)continue;const c=kg(a);switch(c.kind){case 271:r.replaceNode(e,c,EQ(c.name,void 0,a,i));break;case 213:Jm(c,!1)&&r.replaceNode(e,c,YC.createPropertyAccessExpression(NY(c),"default"))}}}function X5(e,t){e.forEachChild((function n(r){if(GE(r)&&LR(e,r.expression)&&qD(r.name)){const{parent:e}=r;t(r,uP(e)&&e.left===r&&64===e.operatorToken.kind)}r.forEachChild(n)}))}function Q5(e,t,n,r,i,o,a,s,c){switch(t.kind){case 243:return Y5(e,t,r,n,i,o,c),!1;case 244:{const{expression:i}=t;switch(i.kind){case 213:return Jm(i,!0)&&r.replaceNode(e,t,EQ(void 0,void 0,i.arguments[0],c)),!1;case 226:{const{operatorToken:t}=i;return 64===t.kind&&function(e,t,n,r,i,o){const{left:a,right:s}=n;if(!GE(a))return!1;if(LR(e,a)){if(!LR(e,s)){const i=HE(s)?function(e,t){const n=$(e.properties,(e=>{switch(e.kind){case 177:case 178:case 304:case 305:return;case 303:return qD(e.name)?function(e,t,n){const r=[YC.createToken(95)];switch(t.kind){case 218:{const{name:n}=t;if(n&&n.text!==e)return i()}case 219:return o9(e,r,t,n);case 231:return function(e,t,n,r){return YC.createClassDeclaration(Z(t,IY(n.modifiers)),e,IY(n.typeParameters),IY(n.heritageClauses),t9(n.members,r))}(e,r,t,n);default:return i()}function i(){return c9(r,YC.createIdentifier(e),t9(t,n))}}(e.name.text,e.initializer,t):void 0;case 174:return qD(e.name)?o9(e.name.text,[YC.createToken(95)],e,t):void 0;default:xn.assertNever(e,`Convert to ES6 got invalid prop kind ${e.kind}`)}}));return n&&[n,!1]}(s,o):Jm(s,!0)?function(e,t){const n=e.text,r=t.getSymbolAtLocation(e),i=r?r.exports:_;return i.has("export=")?[[e9(n)],!0]:i.has("default")?i.size>1?[[Z5(n),e9(n)],!0]:[[e9(n)],!0]:[[Z5(n)],!1]}(s.arguments[0],t):void 0;return i?(r.replaceNodeWithNodes(e,n.parent,i[0]),i[1]):(r.replaceRangeWithText(e,qb(a.getStart(e),s.pos),"export default"),!0)}r.delete(e,n.parent)}else LR(e,a.expression)&&function(e,t,n,r){const{text:i}=t.left.name,o=r.get(i);if(void 0!==o){const r=[c9(void 0,o,t.right),l9([YC.createExportSpecifier(!1,o,i)])];n.replaceNodeWithNodes(e,t.parent,r)}else!function({left:e,right:t,parent:n},r,i){const o=e.name.text;if(!(nP(t)||rP(t)||mP(t))||t.name&&t.name.text!==o)i.replaceNodeRangeWithNodes(r,e.expression,uX(e,25,r),[YC.createToken(95),YC.createToken(87)],{joiner:" ",suffix:" "});else{i.replaceRange(r,{pos:e.getStart(r),end:t.getStart(r)},YC.createToken(95),{suffix:" "}),t.name||i.insertName(r,t,o);const a=uX(n,27,r);a&&i.delete(r,a)}}(t,e,n)}(e,n,r,i);return!1}(e,n,i,r,a,s)}}}default:return!1}}function Y5(e,t,n,r,i,o,a){const{declarationList:s}=t;let c=!1;const l=O(s.declarations,(t=>{const{name:n,initializer:l}=t;if(l){if(LR(e,l))return c=!0,u9([]);if(Jm(l,!0))return c=!0,function(e,t,n,r,i,o){switch(e.kind){case 206:{const n=$(e.elements,(e=>e.dotDotDotToken||e.initializer||e.propertyName&&!qD(e.propertyName)||!qD(e.name)?void 0:s9(e.propertyName&&e.propertyName.text,e.name.text)));if(n)return u9([EQ(void 0,n,t,o)])}case 207:{const n=n9(LZ(t.text,i),r);return u9([EQ(YC.createIdentifier(n),void 0,t,o),c9(void 0,NY(e),YC.createIdentifier(n))])}case 80:return function(e,t,n,r,i){const o=n.getSymbolAtLocation(e),a=new Map;let s,c=!1;for(const t of r.original.get(e.text)){if(n.getSymbolAtLocation(t)!==o||t===e)continue;const{parent:i}=t;if(GE(i)){const{name:{text:e}}=i;if("default"===e){c=!0;const e=t.getText();(s??(s=new Map)).set(i,YC.createIdentifier(e))}else{xn.assert(i.expression===t,"Didn't expect expression === use");let n=a.get(e);void 0===n&&(n=n9(e,r),a.set(e,n)),(s??(s=new Map)).set(i,YC.createIdentifier(n))}}else c=!0}const l=0===a.size?void 0:$e(M(a.entries(),(([e,t])=>YC.createImportSpecifier(!1,e===t?void 0:YC.createIdentifier(e),YC.createIdentifier(t)))));return l||(c=!0),u9([EQ(c?NY(e):void 0,l,t,i)],s)}(e,t,n,r,o);default:return xn.assertNever(e,`Convert to ES module got invalid name kind ${e.kind}`)}}(n,l.arguments[0],r,i,o,a);if(GE(l)&&Jm(l.expression,!0))return c=!0,function(e,t,n,r,i){switch(e.kind){case 206:case 207:{const o=n9(t,r);return u9([a9(o,t,n,i),c9(void 0,e,YC.createIdentifier(o))])}case 80:return u9([a9(e.text,t,n,i)]);default:return xn.assertNever(e,`Convert to ES module got invalid syntax form ${e.kind}`)}}(n,l.name.text,l.expression.arguments[0],i,a)}return u9([YC.createVariableStatement(void 0,YC.createVariableDeclarationList([t],s.flags))])}));if(c){let r;return n.replaceNodeWithNodes(e,t,R(l,(e=>e.newImports))),f(l,(e=>{e.useSitesToUnqualify&&_d(e.useSitesToUnqualify,r??(r=new Map))})),r}}function Z5(e){return l9(void 0,e)}function e9(e){return l9([YC.createExportSpecifier(!1,void 0,"default")],e)}function t9(e,t){return t&&Q($e(t.keys()),(t=>XG(e,t)))?ot(e)?OY(e,!0,n):FY(e,!0,n):e;function n(e){if(211===e.kind){const n=t.get(e);return t.delete(e),n}}}function n9(e,t){for(;t.original.has(e)||t.additional.has(e);)e=`_${e}`;return t.additional.add(e),e}function r9(e){const t=et();return i9(e,(e=>t.add(e.text,e))),t}function i9(e,t){qD(e)&&function(e){const{parent:t}=e;switch(t.kind){case 211:return t.name!==e;case 208:case 276:return t.propertyName!==e;default:return!0}}(e)&&t(e),e.forEachChild((e=>i9(e,t)))}function o9(e,t,n,r){return YC.createFunctionDeclaration(Z(t,IY(n.modifiers)),NY(n.asteriskToken),e,IY(n.typeParameters),IY(n.parameters),NY(n.type),YC.converters.convertToFunctionBlock(t9(n.body,r)))}function a9(e,t,n,r){return"default"===t?EQ(YC.createIdentifier(e),void 0,n,r):EQ(void 0,[s9(t,e)],n,r)}function s9(e,t){return YC.createImportSpecifier(!1,void 0!==e&&e!==t?YC.createIdentifier(e):void 0,YC.createIdentifier(t))}function c9(e,t,n){return YC.createVariableStatement(e,YC.createVariableDeclarationList([YC.createVariableDeclaration(t,void 0,void 0,n)],2))}function l9(e,t){return YC.createExportDeclaration(void 0,!1,e&&YC.createNamedExports(e),void 0===t?void 0:YC.createStringLiteral(t))}function u9(e,t){return{newImports:e,useSitesToUnqualify:t}}f8({errorCodes:v5,getCodeActions(e){b5=!0;const t=r_e.ChangeTracker.with(e,(t=>x5(t,e.sourceFile,e.span.start,e.program.getTypeChecker())));return b5?[_8(y5,t,va.Convert_to_async_function,y5,va.Convert_all_to_async_functions)]:[]},fixIds:[y5],getAllCodeActions:e=>b8(e,v5,((t,n)=>x5(t,n.file,n.start,e.program.getTypeChecker())))}),f8({errorCodes:[va.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],getCodeActions(e){const{sourceFile:t,program:n,preferences:r}=e;return[u8("convertToEsModule",r_e.ChangeTracker.with(e,(e=>{const i=function(e,t,n,r,i){const o={original:r9(e),additional:new Set},a=function(e,t,n){const r=new Map;return X5(e,(e=>{const{text:i}=e.name;r.has(i)||!jh(e.name)&&!t.resolveName(i,e,111551,!0)||r.set(i,n9(`_${i}`,n))})),r}(e,t,o);!function(e,t,n){X5(e,((r,i)=>{if(i)return;const{text:o}=r.name;n.replaceNode(e,r,YC.createIdentifier(t.get(o)||o))}))}(e,a,n);let s,c=!1;for(const a of F(e.statements,EP)){const c=Y5(e,a,n,t,o,r,i);c&&_d(c,s??(s=new Map))}for(const l of F(e.statements,(e=>!EP(e)))){const u=Q5(e,l,t,n,o,r,a,s,i);c=c||u}return null==s||s.forEach(((t,r)=>{n.replaceNode(e,r,t)})),c}(t,n.getTypeChecker(),e,wS(n.getCompilerOptions()),AQ(t,r));if(i)for(const i of n.getSourceFiles())G5(i,t,n,e,AQ(i,r))})),va.Convert_to_ES_module)]}});var _9="correctQualifiedNameToIndexedAccessType",d9=[va.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];function p9(e,t){const n=mc(kX(e,t),iE);return xn.assert(!!n,"Expected position to be owned by a qualified name."),qD(n.left)?n:void 0}function f9(e,t,n){const r=n.right.text,i=YC.createIndexedAccessTypeNode(YC.createTypeReferenceNode(n.left,void 0),YC.createLiteralTypeNode(YC.createStringLiteral(r)));e.replaceNode(t,n,i)}f8({errorCodes:d9,getCodeActions(e){const t=p9(e.sourceFile,e.span.start);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>f9(n,e.sourceFile,t))),r=`${t.left.text}["${t.right.text}"]`;return[_8(_9,n,[va.Rewrite_as_the_indexed_access_type_0,r],_9,va.Rewrite_all_as_indexed_access_types)]},fixIds:[_9],getAllCodeActions:e=>b8(e,d9,((e,t)=>{const n=p9(t.file,t.start);n&&f9(e,t.file,n)}))});var m9=[va.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code],g9="convertToTypeOnlyExport";function h9(e,t){return lt(kX(t,e.start).parent,yN)}function y9(e,t,n){if(!t)return;const r=t.parent,i=r.parent,o=function(e,t){const n=e.parent;if(1===n.elements.length)return n.elements;const r=CZ(aQ(n),t.program.getSemanticDiagnostics(t.sourceFile,t.cancellationToken));return F(n.elements,(t=>{var n;return t===e||(null==(n=TZ(t,r))?void 0:n.code)===m9[0]}))}(t,n);if(o.length===r.elements.length)e.insertModifierBefore(n.sourceFile,156,r);else{const t=YC.updateExportDeclaration(i,i.modifiers,!1,YC.updateNamedExports(r,F(r.elements,(e=>!D(o,e)))),i.moduleSpecifier,void 0),a=YC.createExportDeclaration(void 0,!0,YC.createNamedExports(o),i.moduleSpecifier,void 0);e.replaceNode(n.sourceFile,i,t,{leadingTriviaOption:r_e.LeadingTriviaOption.IncludeAll,trailingTriviaOption:r_e.TrailingTriviaOption.Exclude}),e.insertNodeAfter(n.sourceFile,i,a)}}f8({errorCodes:m9,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>y9(t,h9(e.span,e.sourceFile),e)));if(t.length)return[_8(g9,t,va.Convert_to_type_only_export,g9,va.Convert_all_re_exported_types_to_type_only_exports)]},fixIds:[g9],getAllCodeActions:function(e){const t=new Map;return b8(e,m9,((n,r)=>{const i=h9(r,e.sourceFile);i&&Fx(t,IB(i.parent.parent))&&y9(n,i,e)}))}});var v9=[va._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,va._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code],b9="convertToTypeOnlyImport";function x9(e,t){const{parent:n}=kX(e,t);return fN(n)||iN(n)&&n.importClause?n:void 0}function S9(e,t,n){if(e.parent.parent.name)return!1;const r=e.parent.elements.filter((e=>!e.isTypeOnly));if(1===r.length)return!0;const i=n.getTypeChecker();for(const e of r)if(Rse.Core.eachSymbolReferenceInFile(e.name,i,t,(e=>{const t=i.getSymbolAtLocation(e);return!!t&&i.symbolIsValue(t)||!wT(e)})))return!1;return!0}function k9(e,t,n){var r;if(fN(n))e.replaceNode(t,n,YC.updateImportSpecifier(n,!0,n.propertyName,n.name));else{const i=n.importClause;if(i.name&&i.namedBindings)e.replaceNodeWithNodes(t,n,[YC.createImportDeclaration(IY(n.modifiers,!0),YC.createImportClause(!0,NY(i.name,!0),void 0),NY(n.moduleSpecifier,!0),NY(n.attributes,!0)),YC.createImportDeclaration(IY(n.modifiers,!0),YC.createImportClause(!0,void 0,NY(i.namedBindings,!0)),NY(n.moduleSpecifier,!0),NY(n.attributes,!0))]);else{const o=275===(null==(r=i.namedBindings)?void 0:r.kind)?YC.updateNamedImports(i.namedBindings,L(i.namedBindings.elements,(e=>YC.updateImportSpecifier(e,!1,e.propertyName,e.name)))):i.namedBindings,a=YC.updateImportDeclaration(n,n.modifiers,YC.updateImportClause(i,!0,i.name,o),n.moduleSpecifier,n.attributes);e.replaceNode(t,n,a)}}}f8({errorCodes:v9,getCodeActions:function(e){var t;const n=x9(e.sourceFile,e.span.start);if(n){const r=r_e.ChangeTracker.with(e,(t=>k9(t,e.sourceFile,n))),i=276===n.kind&&iN(n.parent.parent.parent)&&S9(n,e.sourceFile,e.program)?r_e.ChangeTracker.with(e,(t=>k9(t,e.sourceFile,n.parent.parent.parent))):void 0,o=_8(b9,r,276===n.kind?[va.Use_type_0,(null==(t=n.propertyName)?void 0:t.text)??n.name.text]:va.Use_import_type,b9,va.Fix_all_with_type_only_imports);return Q(i)?[u8(b9,i,va.Use_import_type),o]:[o]}},fixIds:[b9],getAllCodeActions:function(e){const t=new Set;return b8(e,v9,((n,r)=>{const i=x9(r.file,r.start);272!==(null==i?void 0:i.kind)||t.has(i)?276===(null==i?void 0:i.kind)&&iN(i.parent.parent.parent)&&!t.has(i.parent.parent.parent)&&S9(i,r.file,e.program)?(k9(n,r.file,i.parent.parent.parent),t.add(i.parent.parent.parent)):276===(null==i?void 0:i.kind)&&k9(n,r.file,i):(k9(n,r.file,i),t.add(i))}))}});var T9="convertTypedefToType",C9=[va.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];function w9(e,t,n,r,i=!1){if(!wF(t))return;const o=function(e){var t;const{typeExpression:n}=e;if(!n)return;const r=null==(t=e.name)?void 0:t.getText();return r?322===n.kind?function(e,t){const n=E9(t);if(Q(n))return YC.createInterfaceDeclaration(void 0,e,void 0,void 0,n)}(r,n):309===n.kind?function(e,t){const n=NY(t.type);if(n)return YC.createTypeAliasDeclaration(void 0,YC.createIdentifier(e),void 0,n)}(r,n):void 0:void 0}(t);if(!o)return;const a=t.parent,{leftSibling:s,rightSibling:c}=function(e){const t=e.parent,n=t.getChildCount()-1,r=t.getChildren().findIndex((t=>t.getStart()===e.getStart()&&t.getEnd()===e.getEnd()));return{leftSibling:r>0?t.getChildAt(r-1):void 0,rightSibling:r0;e--)if(!/[*/\s]/g.test(r.substring(e-1,e)))return t+e;return n}function E9(e){const t=e.jsDocPropertyTags;if(Q(t))return q(t,(e=>{var t;const n=function(e){return 80===e.name.kind?e.name.text:e.name.right.text}(e),r=null==(t=e.typeExpression)?void 0:t.type,i=e.isBracketed;let o;if(r&&aF(r)){const e=E9(r);o=YC.createTypeLiteralNode(e)}else r&&(o=NY(r));if(o&&n){const e=i?YC.createToken(58):void 0;return YC.createPropertySignature(void 0,n,e,o)}}))}function P9(e){return O_(e)?R(e.jsDoc,(e=>{var t;return null==(t=e.tags)?void 0:t.filter((e=>wF(e)))})):[]}f8({fixIds:[T9],errorCodes:C9,getCodeActions(e){const t=gY(e.host,e.formatContext.options),n=kX(e.sourceFile,e.span.start);if(!n)return;const r=r_e.ChangeTracker.with(e,(r=>w9(r,n,e.sourceFile,t)));return r.length>0?[_8(T9,r,va.Convert_typedef_to_TypeScript_type,T9,va.Convert_all_typedef_to_TypeScript_types)]:void 0},getAllCodeActions:e=>b8(e,C9,((t,n)=>{const r=gY(e.host,e.formatContext.options),i=kX(n.file,n.start);i&&w9(t,i,n.file,r,!0)}))});var N9="convertLiteralTypeToMappedType",F9=[va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];function A9(e,t){const n=kX(e,t);if(qD(n)){const t=ut(n.parent.parent,lE),r=n.getText(e);return{container:ut(t.parent,CE),typeNode:t.type,constraint:r,name:"K"===r?"P":"K"}}}function I9(e,t,{container:n,typeNode:r,constraint:i,name:o}){e.replaceNode(t,n,YC.createMappedTypeNode(void 0,YC.createTypeParameterDeclaration(void 0,o,YC.createTypeReferenceNode(i)),void 0,void 0,r,void 0))}f8({errorCodes:F9,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=A9(t,n.start);if(!r)return;const{name:i,constraint:o}=r,a=r_e.ChangeTracker.with(e,(e=>I9(e,t,r)));return[_8(N9,a,[va.Convert_0_to_1_in_0,o,i],N9,va.Convert_all_type_literals_to_mapped_type)]},fixIds:[N9],getAllCodeActions:e=>b8(e,F9,((e,t)=>{const n=A9(t.file,t.start);n&&I9(e,t.file,n)}))});var O9=[va.Class_0_incorrectly_implements_interface_1.code,va.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code],M9="fixClassIncorrectlyImplementsInterface";function L9(e,t){return xn.checkDefined(Zf(kX(e,t)),"There should be a containing class")}function j9(e){return!(e.valueDeclaration&&2&Qv(e.valueDeclaration))}function R9(e,t,n,r,i,o){const a=e.program.getTypeChecker(),s=function(e,t){const n=Sh(e);if(!n)return ed();const r=t.getTypeAtLocation(n);return ed(t.getPropertiesOfType(r).filter(j9))}(r,a),c=a.getTypeAtLocation(t),l=a.getPropertiesOfType(c).filter(un(j9,(e=>!s.has(e.escapedName)))),u=a.getTypeAtLocation(r),_=S(r.members,(e=>fE(e)));u.getNumberIndexType()||p(c,1),u.getStringIndexType()||p(c,0);const d=$9(n,e.program,o,e.host);function p(t,i){const o=a.getIndexInfoOfType(t,i);o&&f(n,r,a.indexInfoToIndexSignatureDeclaration(o,r,void 0,cie(e)))}function f(e,t,n){_?i.insertNodeAfter(e,_,n):i.insertMemberAtStart(e,t,n)}sie(r,l,n,e,o,d,(e=>f(n,r,e))),d.writeFixes(i)}f8({errorCodes:O9,getCodeActions(e){const{sourceFile:t,span:n}=e,r=L9(t,n.start);return q(Th(r),(n=>{const i=r_e.ChangeTracker.with(e,(i=>R9(e,n,t,r,i,e.preferences)));return 0===i.length?void 0:_8(M9,i,[va.Implement_interface_0,n.getText(t)],M9,va.Implement_all_unimplemented_interfaces)}))},fixIds:[M9],getAllCodeActions(e){const t=new Map;return b8(e,O9,((n,r)=>{const i=L9(r.file,r.start);if(Fx(t,IB(i)))for(const t of Th(i))R9(e,t,r.file,i,n,e.preferences)}))}});var B9="import",J9="fixMissingImport",z9=[va.Cannot_find_name_0.code,va.Cannot_find_name_0_Did_you_mean_1.code,va.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,va.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,va.Cannot_find_namespace_0.code,va._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,va.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,va._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,va.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,va.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,va.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,va.Cannot_find_namespace_0_Did_you_mean_1.code];function $9(e,t,n,r,i){return q9(e,t,!1,n,r,i)}function q9(e,t,n,r,i,o){const a=t.getCompilerOptions(),s=[],c=[],l=new Map,u=new Set,_=new Set,d=new Map;return{addImportFromDiagnostic:function(e,t){const r=nee(t,e.code,e.start,n);r&&r.length&&p(Te(r))},addImportFromExportedSymbol:function(n,s,c){var l;const u=xn.checkDefined(n.parent),_=FZ(n,wS(a)),d=t.getTypeChecker(),f=d.getMergedSymbol(mx(n,d)),m=G9(e,f,_,u,!1,t,i,r,o),g=eee(e,t);let h=W9(e,xn.checkDefined(m),t,void 0,!!s,g,i,r);if(h){const e=(null==(l=lt(null==c?void 0:c.name,qD))?void 0:l.text)??_;c&&Ul(c)&&(3===h.kind||2===h.kind)&&1===h.addAsTypeOnly&&(h={...h,addAsTypeOnly:2}),p({fix:h,symbolName:e??_,errorIdentifierText:void 0})}},writeFixes:function(t,n){var i,o;let p,f,m;p=Am(e)&&0===e.imports.length&&void 0!==n?n:AQ(e,r);for(const n of s)fee(t,e,n);for(const n of c)mee(t,e,n,p);if(u.size){xn.assert(Am(e),"Cannot remove imports from a future source file");const n=new Set(q([...u],(e=>mc(e,iN)))),r=new Set(q([...u],(e=>mc(e,zm)))),a=[...n].filter((e=>{var t,n,r;return!l.has(e.importClause)&&(!(null==(t=e.importClause)?void 0:t.name)||u.has(e.importClause))&&(!lt(null==(n=e.importClause)?void 0:n.namedBindings,_N)||u.has(e.importClause.namedBindings))&&(!lt(null==(r=e.importClause)?void 0:r.namedBindings,pN)||x(e.importClause.namedBindings.elements,(e=>u.has(e))))})),s=[...r].filter((e=>(206!==e.name.kind||!l.has(e.name))&&(206!==e.name.kind||x(e.name.elements,(e=>u.has(e)))))),c=[...n].filter((e=>{var t,n;return(null==(t=e.importClause)?void 0:t.namedBindings)&&-1===a.indexOf(e)&&!(null==(n=l.get(e.importClause))?void 0:n.namedImports)&&(274===e.importClause.namedBindings.kind||x(e.importClause.namedBindings.elements,(e=>u.has(e))))}));for(const n of[...a,...s])t.delete(e,n);for(const n of c)t.replaceNode(e,n.importClause,YC.updateImportClause(n.importClause,n.importClause.isTypeOnly,n.importClause.name,void 0));for(const n of u){const r=mc(n,iN);r&&-1===a.indexOf(r)&&-1===c.indexOf(r)?273===n.kind?t.delete(e,n.name):(xn.assert(276===n.kind,"NamespaceImport should have been handled earlier"),(null==(i=l.get(r.importClause))?void 0:i.namedImports)?(f??(f=new Set)).add(n):t.delete(e,n)):208===n.kind?(null==(o=l.get(n.parent))?void 0:o.namedImports)?(f??(f=new Set)).add(n):t.delete(e,n):271===n.kind&&t.delete(e,n)}}l.forEach((({importClauseOrBindingPattern:n,defaultImport:i,namedImports:o})=>{pee(t,e,n,i,$e(o.entries(),(([e,t])=>({addAsTypeOnly:t,name:e}))),f,r)})),d.forEach((({useRequire:e,defaultImport:t,namedImports:n,namespaceLikeImport:i},o)=>{const s=(e?bee:vee)(o.slice(2),p,t,n&&$e(n.entries(),(([e,t])=>({addAsTypeOnly:t,name:e}))),i,a,r);m=_e(m,s)})),m=_e(m,function(){if(!_.size)return;const e=new Set(q([..._],(e=>mc(e,iN)))),t=new Set(q([..._],(e=>mc(e,Um))));return[...q([..._],(e=>271===e.kind?NY(e,!0):void 0)),...[...e].map((e=>{var t;return _.has(e)?NY(e,!0):NY(YC.updateImportDeclaration(e,e.modifiers,e.importClause&&YC.updateImportClause(e.importClause,e.importClause.isTypeOnly,_.has(e.importClause)?e.importClause.name:void 0,_.has(e.importClause.namedBindings)?e.importClause.namedBindings:(null==(t=lt(e.importClause.namedBindings,pN))?void 0:t.elements.some((e=>_.has(e))))?YC.updateNamedImports(e.importClause.namedBindings,e.importClause.namedBindings.elements.filter((e=>_.has(e)))):void 0),e.moduleSpecifier,e.attributes),!0)})),...[...t].map((e=>_.has(e)?NY(e,!0):NY(YC.updateVariableStatement(e,e.modifiers,YC.updateVariableDeclarationList(e.declarationList,q(e.declarationList.declarations,(e=>_.has(e)?e:YC.updateVariableDeclaration(e,206===e.name.kind?YC.updateObjectBindingPattern(e.name,e.name.elements.filter((e=>_.has(e)))):e.name,e.exclamationToken,e.type,e.initializer))))),!0)))]}()),m&&$Q(t,e,m,!0,r)},hasFixes:function(){return s.length>0||c.length>0||l.size>0||d.size>0||_.size>0||u.size>0},addImportForUnresolvedIdentifier:function(e,t,n){const r=function(e,t,n){const r=cee(e,t,n),i=bZ(e.sourceFile,e.preferences,e.host);return r&&ree(r,e.sourceFile,e.program,i,e.host,e.preferences)}(e,t,n);r&&r.length&&p(Te(r))},addImportForNonExistentExport:function(n,o,s,c,l){const u=t.getSourceFile(o),_=eee(e,t);if(u&&u.symbol){const{fixes:a}=Q9([{exportKind:s,isFromPackageJson:!1,moduleFileName:o,moduleSymbol:u.symbol,targetFlags:c}],void 0,l,_,t,e,i,r);a.length&&p({fix:a[0],symbolName:n,errorIdentifierText:n})}else{const r=QZ(o,99,t,i);p({fix:{kind:3,moduleSpecifierKind:"relative",moduleSpecifier:JR.getLocalModuleSpecifierBetweenFileNames(e,o,a,CQ(t,i)),importKind:see(r,s,a),addAsTypeOnly:Y9(l,0,void 0,c,t.getTypeChecker(),a),useRequire:_},symbolName:n,errorIdentifierText:n})}},removeExistingImport:function(e){273===e.kind&&xn.assertIsDefined(e.name,"ImportClause should have a name if it's being removed"),u.add(e)},addVerbatimImport:function(e){_.add(e)}};function p(e){var t,n;const{fix:r,symbolName:i}=e;switch(r.kind){case 0:s.push(r);break;case 1:c.push(r);break;case 2:{const{importClauseOrBindingPattern:e,importKind:n,addAsTypeOnly:a}=r;let s=l.get(e);if(s||l.set(e,s={importClauseOrBindingPattern:e,defaultImport:void 0,namedImports:new Map}),0===n){const e=null==s?void 0:s.namedImports.get(i);s.namedImports.set(i,o(e,a))}else xn.assert(void 0===s.defaultImport||s.defaultImport.name===i,"(Add to Existing) Default import should be missing or match symbolName"),s.defaultImport={name:i,addAsTypeOnly:o(null==(t=s.defaultImport)?void 0:t.addAsTypeOnly,a)};break}case 3:{const{moduleSpecifier:e,importKind:t,useRequire:s,addAsTypeOnly:c}=r,l=function(e,t,n,r){const i=u(e,!0),o=u(e,!1),a=d.get(i),s=d.get(o),c={defaultImport:void 0,namedImports:void 0,namespaceLikeImport:void 0,useRequire:n};return 1===t&&2===r?a||(d.set(i,c),c):1===r&&(a||s)?a||s:s||(d.set(o,c),c)}(e,t,s,c);switch(xn.assert(l.useRequire===s,"(Add new) Tried to add an `import` and a `require` for the same module"),t){case 1:xn.assert(void 0===l.defaultImport||l.defaultImport.name===i,"(Add new) Default import should be missing or match symbolName"),l.defaultImport={name:i,addAsTypeOnly:o(null==(n=l.defaultImport)?void 0:n.addAsTypeOnly,c)};break;case 0:const e=(l.namedImports||(l.namedImports=new Map)).get(i);l.namedImports.set(i,o(e,c));break;case 3:if(a.verbatimModuleSyntax){const e=(l.namedImports||(l.namedImports=new Map)).get(i);l.namedImports.set(i,o(e,c))}else xn.assert(void 0===l.namespaceLikeImport||l.namespaceLikeImport.name===i,"Namespacelike import shoudl be missing or match symbolName"),l.namespaceLikeImport={importKind:t,name:i,addAsTypeOnly:c};break;case 2:xn.assert(void 0===l.namespaceLikeImport||l.namespaceLikeImport.name===i,"Namespacelike import shoudl be missing or match symbolName"),l.namespaceLikeImport={importKind:t,name:i,addAsTypeOnly:c}}break}case 4:break;default:xn.assertNever(r,`fix wasn't never - got kind ${r.kind}`)}function o(e,t){return Math.max(e??0,t)}function u(e,t){return`${t?1:0}|${e}`}}}function V9(e,t,n,r){const i=bZ(e,r,n),o=Z9(t.getTypeChecker(),e,t.getCompilerOptions());return{getModuleSpecifierForBestExportInfo:function(a,s,c,l){const{fixes:u,computedWithoutCacheCount:_}=Q9(a,s,c,!1,t,e,n,r,o,l),d=iee(u,e,t,i,n,r);return d&&{...d,computedWithoutCacheCount:_}}}}function U9(e,t,n,r,i,o,a,s,c,l,u,_){let d;n?(d=i0(r,a,s,u,_).get(r.path,n),xn.assertIsDefined(d,"Some exportInfo should match the specified exportMapKey")):(d=No(By(t.name))?[X9(e,i,t,s,a)]:G9(r,e,i,t,o,s,a,u,_),xn.assertIsDefined(d,"Some exportInfo should match the specified symbol / moduleSymbol"));const p=eee(r,s),f=wT(kX(r,l)),m=xn.checkDefined(W9(r,d,s,l,f,p,a,u));return{moduleSpecifier:m.moduleSpecifier,codeAction:H9(_ee({host:a,formatContext:c,preferences:u},r,i,m,!1,s,u))}}function K9(e,t,n,r,i,o){const a=n.getCompilerOptions(),s=Pe(uee(e,n.getTypeChecker(),t,a)),c=lee(e,t,s,n),l=s!==t.text;return c&&H9(_ee({host:r,formatContext:i,preferences:o},e,s,c,l,n,o))}function W9(e,t,n,r,i,o,a,s){const c=bZ(e,s,a);return iee(Q9(t,r,i,o,n,e,a,s).fixes,e,n,c,a,s)}function H9({description:e,changes:t,commands:n}){return{description:e,changes:t,commands:n}}function G9(e,t,n,r,i,o,a,s,c){const l=tee(o,a);return i0(e,a,o,s,c).search(e.path,i,(e=>e===n),(e=>{if(mx(e[0].symbol,l(e[0].isFromPackageJson))===t&&e.some((e=>e.moduleSymbol===r||e.symbol.parent===r)))return e}))}function X9(e,t,n,r,i){var o,a;const s=l(r.getTypeChecker(),!1);if(s)return s;const c=null==(a=null==(o=i.getPackageJsonAutoImportProvider)?void 0:o.call(i))?void 0:a.getTypeChecker();return xn.checkDefined(c&&l(c,!0),"Could not find symbol in specified module for code actions");function l(r,i){const o=o0(n,r);if(o&&mx(o.symbol,r)===e)return{symbol:o.symbol,moduleSymbol:n,moduleFileName:void 0,exportKind:o.exportKind,targetFlags:mx(e,r).flags,isFromPackageJson:i};const a=r.tryGetMemberInModuleExportsAndProperties(t,n);return a&&mx(a,r)===e?{symbol:a,moduleSymbol:n,moduleFileName:void 0,exportKind:0,targetFlags:mx(e,r).flags,isFromPackageJson:i}:void 0}}function Q9(e,t,n,r,i,o,a,s,c=(Am(o)?Z9(i.getTypeChecker(),o,i.getCompilerOptions()):void 0),l){const _=i.getTypeChecker(),d=c?R(e,c.getImportsForExportInfo):u,p=void 0!==t&&function(e,t){return g(e,(({declaration:e,importKind:n})=>{var r;if(0!==n)return;const i=function(e){var t,n,r;switch(e.kind){case 260:return null==(t=lt(e.name,qD))?void 0:t.text;case 271:return e.name.text;case 351:case 272:return null==(r=lt(null==(n=e.importClause)?void 0:n.namedBindings,_N))?void 0:r.name.text;default:return xn.assertNever(e)}}(e),o=i&&(null==(r=Sg(e))?void 0:r.text);return o?{kind:0,namespacePrefix:i,usagePosition:t,moduleSpecifierKind:void 0,moduleSpecifier:o}:void 0}))}(d,t),f=function(e,t,n,r){let i;for(const t of e){const e=o(t);if(!e)continue;const n=Ul(e.importClauseOrBindingPattern);if(4!==e.addAsTypeOnly&&n||4===e.addAsTypeOnly&&!n)return e;i??(i=e)}return i;function o({declaration:e,importKind:i,symbol:o,targetFlags:a}){if(3===i||2===i||271===e.kind)return;if(260===e.kind)return 0!==i&&1!==i||206!==e.name.kind?void 0:{kind:2,importClauseOrBindingPattern:e.name,importKind:i,moduleSpecifierKind:void 0,moduleSpecifier:e.initializer.arguments[0].text,addAsTypeOnly:4};const{importClause:s}=e;if(!s||!$_(e.moduleSpecifier))return;const{name:c,namedBindings:l}=s;if(s.isTypeOnly&&(0!==i||!l))return;const u=Y9(t,0,o,a,n,r);return 1===i&&(c||2===u&&l)||0===i&&274===(null==l?void 0:l.kind)?void 0:{kind:2,importClauseOrBindingPattern:s,importKind:i,moduleSpecifierKind:void 0,moduleSpecifier:e.moduleSpecifier.text,addAsTypeOnly:u}}}(d,n,_,i.getCompilerOptions());if(f)return{computedWithoutCacheCount:0,fixes:[...p?[p]:u,f]};const{fixes:m,computedWithoutCacheCount:h=0}=function(e,t,n,r,i,o,a,s,c,l){const u=g(t,(e=>function({declaration:e,importKind:t,symbol:n,targetFlags:r},i,o,a,s){var c;const l=null==(c=Sg(e))?void 0:c.text;if(l)return{kind:3,moduleSpecifierKind:void 0,moduleSpecifier:l,importKind:t,addAsTypeOnly:o?4:Y9(i,0,n,r,a,s),useRequire:o}}(e,o,a,n.getTypeChecker(),n.getCompilerOptions())));return u?{fixes:[u]}:function(e,t,n,r,i,o,a,s,c){const l=qk(t.fileName),u=e.getCompilerOptions(),_=CQ(e,a),d=tee(e,a),p=DQ(ES(u)),f=c?e=>JR.tryGetModuleSpecifiersFromCache(e.moduleSymbol,t,_,s):(e,n)=>JR.getModuleSpecifiersWithCacheInfo(e.moduleSymbol,n,u,t,_,s,void 0,!0);let m=0;const g=R(o,((e,o)=>{const a=d(e.isFromPackageJson),{computedWithoutCache:s,moduleSpecifiers:c,kind:_}=f(e,a)??{},g=!!(111551&e.targetFlags),h=Y9(r,0,e.symbol,e.targetFlags,a,u);return m+=s?1:0,q(c,(r=>{if(p&&Oj(r))return;if(!g&&l&&void 0!==n)return{kind:1,moduleSpecifierKind:_,moduleSpecifier:r,usagePosition:n,exportInfo:e,isReExport:o>0};const s=see(t,e.exportKind,u);let c;if(void 0!==n&&3===s&&0===e.exportKind){const t=a.resolveExternalModuleSymbol(e.moduleSymbol);let r;t!==e.moduleSymbol&&(r=s0(t,a,u,!1,mt)),r||(r=MZ(e.moduleSymbol,wS(u),!1)),c={namespacePrefix:r,usagePosition:n}}return{kind:3,moduleSpecifierKind:_,moduleSpecifier:r,importKind:s,useRequire:i,addAsTypeOnly:h,exportInfo:e,isReExport:o>0,qualification:c}}))}));return{computedWithoutCacheCount:m,fixes:g}}(n,r,i,o,a,e,s,c,l)}(e,d,i,o,t,n,r,a,s,l);return{computedWithoutCacheCount:h,fixes:[...p?[p]:u,...m]}}function Y9(e,t,n,r,i,o){return e?!n||!o.verbatimModuleSyntax||111551&r&&!i.getTypeOnlyAliasDeclaration(n)?1:2:4}function Z9(e,t,n){let r;for(const n of t.imports){const t=kg(n);if(zm(t.parent)){const i=e.resolveExternalModuleName(n);i&&(r||(r=et())).add(OB(i),t.parent)}else if(272===t.kind||271===t.kind||351===t.kind){const i=e.getSymbolAtLocation(n);i&&(r||(r=et())).add(OB(i),t)}}return{getImportsForExportInfo:({moduleSymbol:e,exportKind:i,targetFlags:o,symbol:a})=>{const s=null==r?void 0:r.get(OB(e));if(!s)return u;if(Im(t)&&!(111551&o)&&!x(s,AF))return u;const c=see(t,i,n);return s.map((e=>({declaration:e,importKind:c,symbol:a,targetFlags:o})))}}}function eee(e,t){if(!qk(e.fileName))return!1;if(e.commonJsModuleIndicator&&!e.externalModuleIndicator)return!0;if(e.externalModuleIndicator&&!e.commonJsModuleIndicator)return!1;const n=t.getCompilerOptions();if(n.configFile)return DS(n)<5;if(1===e.impliedNodeFormat)return!0;if(99===e.impliedNodeFormat)return!1;for(const n of t.getSourceFiles())if(n!==e&&Im(n)&&!t.isSourceFileFromExternalLibrary(n)){if(n.commonJsModuleIndicator&&!n.externalModuleIndicator)return!0;if(n.externalModuleIndicator&&!n.commonJsModuleIndicator)return!1}return!0}function tee(e,t){return xt((n=>n?t.getPackageJsonAutoImportProvider().getTypeChecker():e.getTypeChecker()))}function nee(e,t,n,r){const i=kX(e.sourceFile,n);let o;if(t===va._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code)o=function({sourceFile:e,program:t,host:n,preferences:r},i){const o=t.getTypeChecker(),a=function(e,t){const n=qD(e)?t.getSymbolAtLocation(e):void 0;if(Ex(n))return n;const{parent:r}=e;if(D_(r)&&r.tagName===e||EN(r)){const n=t.resolveName(t.getJsxNamespace(r),D_(r)?e:r,111551,!1);if(Ex(n))return n}}(i,o);if(!a)return;const s=o.getAliasedSymbol(a),c=a.name;return Q9([{symbol:a,moduleSymbol:s,moduleFileName:void 0,exportKind:3,targetFlags:s.flags,isFromPackageJson:!1}],void 0,!1,eee(e,t),t,e,n,r).fixes.map((e=>{var t;return{fix:e,symbolName:c,errorIdentifierText:null==(t=lt(i,qD))?void 0:t.text}}))}(e,i);else{if(!qD(i))return;if(t===va._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code){const t=Pe(uee(e.sourceFile,e.program.getTypeChecker(),i,e.program.getCompilerOptions())),n=lee(e.sourceFile,i,t,e.program);return n&&[{fix:n,symbolName:t,errorIdentifierText:i.text}]}o=cee(e,i,r)}const a=bZ(e.sourceFile,e.preferences,e.host);return o&&ree(o,e.sourceFile,e.program,a,e.host,e.preferences)}function ree(e,t,n,r,i,o){const a=e=>Yo(e,i.getCurrentDirectory(),Wy(i));return he(e,((e,i)=>Vt(!!e.isJsxNamespaceFix,!!i.isJsxNamespaceFix)||Nt(e.fix.kind,i.fix.kind)||oee(e.fix,i.fix,t,n,o,r.allowsImportingSpecifier,a)))}function iee(e,t,n,r,i,o){if(Q(e))return 0===e[0].kind||2===e[0].kind?e[0]:e.reduce(((e,a)=>-1===oee(a,e,t,n,o,r.allowsImportingSpecifier,(e=>Yo(e,i.getCurrentDirectory(),Wy(i))))?a:e))}function oee(e,t,n,r,i,o,a){return 0!==e.kind&&0!==t.kind?Vt("node_modules"!==t.moduleSpecifierKind||o(t.moduleSpecifier),"node_modules"!==e.moduleSpecifierKind||o(e.moduleSpecifier))||function(e,t,n){return"non-relative"===n.importModuleSpecifierPreference||"project-relative"===n.importModuleSpecifierPreference?Vt("relative"===e.moduleSpecifierKind,"relative"===t.moduleSpecifierKind):0}(e,t,i)||function(e,t,n,r){return an(e,"node:")&&!an(t,"node:")?$Z(n,r)?-1:1:an(t,"node:")&&!an(e,"node:")?$Z(n,r)?1:-1:0}(e.moduleSpecifier,t.moduleSpecifier,n,r)||Vt(aee(e,n.path,a),aee(t,n.path,a))||Xk(e.moduleSpecifier,t.moduleSpecifier):0}function aee(e,t,n){var r;return!(!e.isReExport||!(null==(r=e.exportInfo)?void 0:r.moduleFileName)||"index"!==Bo(e.exportInfo.moduleFileName,[".js",".jsx",".d.ts",".ts",".tsx"],!0))&&an(t,n(Ro(e.exportInfo.moduleFileName)))}function see(e,t,n,r){if(n.verbatimModuleSyntax&&(1===DS(n)||1===e.impliedNodeFormat))return 3;switch(t){case 0:return 0;case 1:return 1;case 2:return function(e,t,n){const r=AS(t),i=qk(e.fileName);if(!i&&DS(t)>=5)return r?1:2;if(i)return e.externalModuleIndicator||n?r?1:2:3;for(const t of e.statements??u)if(rN(t)&&!Nd(t.moduleReference))return 3;return r?1:3}(e,n,!!r);case 3:return function(e,t,n){if(AS(t))return 1;const r=DS(t);switch(r){case 2:case 1:case 3:return qk(e.fileName)&&(e.externalModuleIndicator||n)?2:3;case 4:case 5:case 6:case 7:case 99:case 0:case 200:return 2;case 100:case 199:return 99===e.impliedNodeFormat?2:3;default:return xn.assertNever(r,`Unexpected moduleKind ${r}`)}}(e,n,!!r);default:return xn.assertNever(t)}}function cee({sourceFile:e,program:t,cancellationToken:n,host:r,preferences:i},o,a){const s=t.getTypeChecker(),c=t.getCompilerOptions();return R(uee(e,s,o,c),(s=>{if("default"===s)return;const c=wT(o),l=eee(e,t),u=function(e,t,n,r,i,o,a,s,c){var l;const u=et(),_=bZ(i,c,s),d=null==(l=s.getModuleSpecifierCache)?void 0:l.call(s),p=xt((e=>CQ(e?s.getPackageJsonAutoImportProvider():o,s)));function f(e,t,n,r,o,a){const s=p(a);if(t&&t0(o,i,t,c,_,s,d)||!t&&_.allowsImportingAmbientModule(e,s)){const i=o.getTypeChecker();u.add(DY(n,i).toString(),{symbol:n,moduleSymbol:e,moduleFileName:null==t?void 0:t.fileName,exportKind:r,targetFlags:mx(n,i).flags,isFromPackageJson:a})}}return n0(o,s,c,a,((i,o,a,s)=>{const c=a.getTypeChecker();r.throwIfCancellationRequested();const l=a.getCompilerOptions(),u=o0(i,c);u&&See(c.getSymbolFlags(u.symbol),n)&&s0(u.symbol,c,l,t,(t=>t===e))&&f(i,o,u.symbol,u.exportKind,a,s);const _=c.tryGetMemberInModuleExportsAndProperties(e,i);_&&See(c.getSymbolFlags(_),n)&&f(i,o,_,0,a,s)})),u}(s,km(o),yG(o),n,e,t,a,r,i);return $e(J(u.values(),(n=>Q9(n,o.getStart(e),c,l,t,e,r,i).fixes)),(e=>({fix:e,symbolName:s,errorIdentifierText:o.text,isJsxNamespaceFix:s!==o.text})))}))}function lee(e,t,n,r){const i=r.getTypeChecker(),o=i.resolveName(n,t,111551,!0);if(!o)return;const a=i.getTypeOnlyAliasDeclaration(o);return a&&Sd(a)===e?{kind:4,typeOnlyAliasDeclaration:a}:void 0}function uee(e,t,n,r){const i=n.parent;if((D_(i)||wN(i))&&i.tagName===n&&KZ(r.jsx)){const r=t.getJsxNamespace(e);if(function(e,t,n){if(Jy(t.text))return!0;const r=n.resolveName(e,t,111551,!0);return!r||Q(r.declarations,Wl)&&!(111551&r.flags)}(r,n,t))return Jy(n.text)||t.resolveName(n.text,n,111551,!1)?[r]:[n.text,r]}return[n.text]}function _ee(e,t,n,r,i,o,a){let s;const c=r_e.ChangeTracker.with(e,(e=>{s=function(e,t,n,r,i,o,a){const s=AQ(t,a);switch(r.kind){case 0:return fee(e,t,r),[va.Change_0_to_1,n,`${r.namespacePrefix}.${n}`];case 1:return mee(e,t,r,s),[va.Change_0_to_1,n,gee(r.moduleSpecifier,s)+n];case 2:{const{importClauseOrBindingPattern:o,importKind:s,addAsTypeOnly:c,moduleSpecifier:l}=r;pee(e,t,o,1===s?{name:n,addAsTypeOnly:c}:void 0,0===s?[{name:n,addAsTypeOnly:c}]:u,void 0,a);const _=By(l);return i?[va.Import_0_from_1,n,_]:[va.Update_import_from_0,_]}case 3:{const{importKind:c,moduleSpecifier:l,addAsTypeOnly:u,useRequire:_,qualification:d}=r;return $Q(e,t,(_?bee:vee)(l,s,1===c?{name:n,addAsTypeOnly:u}:void 0,0===c?[{name:n,addAsTypeOnly:u}]:void 0,2===c||3===c?{importKind:c,name:(null==d?void 0:d.namespacePrefix)||n,addAsTypeOnly:u}:void 0,o.getCompilerOptions(),a),!0,a),d&&fee(e,t,d),i?[va.Import_0_from_1,n,l]:[va.Add_import_from_0,l]}case 4:{const{typeOnlyAliasDeclaration:i}=r,s=function(e,t,n,r,i){const o=n.getCompilerOptions(),a=o.verbatimModuleSyntax;switch(t.kind){case 276:if(t.isTypeOnly){if(t.parent.elements.length>1){const n=YC.updateImportSpecifier(t,!1,t.propertyName,t.name),{specifierComparer:o}=vle.getNamedImportSpecifierComparerWithDetection(t.parent.parent.parent,i,r),a=vle.getImportSpecifierInsertionIndex(t.parent.elements,n,o);if(a!==t.parent.elements.indexOf(t))return e.delete(r,t),e.insertImportSpecifierAtIndex(r,n,t.parent,a),t}return e.deleteRange(r,{pos:Vd(t.getFirstToken()),end:Vd(t.propertyName??t.name)}),t}return xn.assert(t.parent.parent.isTypeOnly),s(t.parent.parent),t.parent.parent;case 273:return s(t),t;case 274:return s(t.parent),t.parent;case 271:return e.deleteRange(r,t.getChildAt(1)),t;default:xn.failBadSyntaxKind(t)}function s(s){var c;if(e.delete(r,qQ(s,r)),!o.allowImportingTsExtensions){const t=Sg(s.parent),i=t&&(null==(c=n.getResolvedModuleFromModuleSpecifier(t,r))?void 0:c.resolvedModule);if(null==i?void 0:i.resolvedUsingTsExtension){const n=na(t.text,I$(t.text,o));e.replaceNode(r,t,YC.createStringLiteral(n))}}if(a){const n=lt(s.namedBindings,pN);if(n&&n.elements.length>1){!1!==vle.getNamedImportSpecifierComparerWithDetection(s.parent,i,r).isSorted&&276===t.kind&&0!==n.elements.indexOf(t)&&(e.delete(r,t),e.insertImportSpecifierAtIndex(r,t,n,0));for(const i of n.elements)i===t||i.isTypeOnly||e.insertModifierBefore(r,156,i)}}}}(e,i,o,t,a);return 276===s.kind?[va.Remove_type_from_import_of_0_from_1,n,dee(s.parent.parent)]:[va.Remove_type_from_import_declaration_from_0,dee(s)]}default:return xn.assertNever(r,`Unexpected fix kind ${r.kind}`)}}(e,t,n,r,i,o,a)}));return _8(B9,c,s,J9,va.Add_all_missing_imports)}function dee(e){var t,n;return 271===e.kind?(null==(n=lt(null==(t=lt(e.moduleReference,SN))?void 0:t.expression,$_))?void 0:n.text)||e.moduleReference.getText():ut(e.parent.moduleSpecifier,wD).text}function pee(e,t,n,r,i,o,a){var s;if(206===n.kind){if(o&&n.elements.some((e=>o.has(e))))return void e.replaceNode(t,n,YC.createObjectBindingPattern([...n.elements.filter((e=>!o.has(e))),...r?[YC.createBindingElement(void 0,"default",r.name)]:u,...i.map((e=>YC.createBindingElement(void 0,void 0,e.name)))]));r&&_(n,r.name,"default");for(const e of i)_(n,e.name,void 0);return}const c=n.isTypeOnly&&Q([r,...i],(e=>4===(null==e?void 0:e.addAsTypeOnly))),l=n.namedBindings&&(null==(s=lt(n.namedBindings,pN))?void 0:s.elements);if(r&&(xn.assert(!n.name,"Cannot add a default import to an import clause that already has one"),e.insertNodeAt(t,n.getStart(t),YC.createIdentifier(r.name),{suffix:", "})),i.length){const{specifierComparer:r,isSorted:s}=vle.getNamedImportSpecifierComparerWithDetection(n.parent,a,t),u=ve(i.map((e=>YC.createImportSpecifier((!n.isTypeOnly||c)&&yee(e,a),void 0,YC.createIdentifier(e.name)))),r);if(o)e.replaceNode(t,n.namedBindings,YC.updateNamedImports(n.namedBindings,ve([...l.filter((e=>!o.has(e))),...u],r)));else if((null==l?void 0:l.length)&&!1!==s){const i=c&&l?YC.updateNamedImports(n.namedBindings,L(l,(e=>YC.updateImportSpecifier(e,!0,e.propertyName,e.name)))).elements:l;for(const o of u){const a=vle.getImportSpecifierInsertionIndex(i,o,r);e.insertImportSpecifierAtIndex(t,o,n.namedBindings,a)}}else if(null==l?void 0:l.length)for(const n of u)e.insertNodeInListAfter(t,De(l),n,l);else if(u.length){const r=YC.createNamedImports(u);n.namedBindings?e.replaceNode(t,n.namedBindings,r):e.insertNodeAfter(t,xn.checkDefined(n.name,"Import clause must have either named imports or a default import"),r)}}if(c&&(e.delete(t,qQ(n,t)),l))for(const n of l)e.insertModifierBefore(t,156,n);function _(n,r,i){const o=YC.createBindingElement(void 0,i,r);n.elements.length?e.insertNodeInListAfter(t,De(n.elements),o):e.replaceNode(t,n,YC.createObjectBindingPattern([o]))}}function fee(e,t,{namespacePrefix:n,usagePosition:r}){e.insertText(t,r,n+".")}function mee(e,t,{moduleSpecifier:n,usagePosition:r},i){e.insertText(t,r,gee(n,i))}function gee(e,t){const n=IQ(t);return`import(${n}${e}${n}).`}function hee({addAsTypeOnly:e}){return 2===e}function yee(e,t){return hee(e)||!!t.preferTypeOnlyAutoImports&&4!==e.addAsTypeOnly}function vee(e,t,n,r,i,o,a){const s=PQ(e,t);let c;if(void 0!==n||(null==r?void 0:r.length)){const i=(!n||hee(n))&&x(r,hee)||(o.verbatimModuleSyntax||a.preferTypeOnlyAutoImports)&&4!==(null==n?void 0:n.addAsTypeOnly)&&!Q(r,(e=>4===e.addAsTypeOnly));c=_e(c,EQ(n&&YC.createIdentifier(n.name),null==r?void 0:r.map((e=>YC.createImportSpecifier(!i&&yee(e,a),void 0,YC.createIdentifier(e.name)))),e,t,i))}return i&&(c=_e(c,3===i.importKind?YC.createImportEqualsDeclaration(void 0,yee(i,a),YC.createIdentifier(i.name),YC.createExternalModuleReference(s)):YC.createImportDeclaration(void 0,YC.createImportClause(yee(i,a),void 0,YC.createNamespaceImport(YC.createIdentifier(i.name))),s,void 0))),xn.checkDefined(c)}function bee(e,t,n,r,i){const o=PQ(e,t);let a;if(n||(null==r?void 0:r.length)){const e=(null==r?void 0:r.map((({name:e})=>YC.createBindingElement(void 0,void 0,e))))||[];n&&e.unshift(YC.createBindingElement(void 0,"default",n.name)),a=_e(a,xee(YC.createObjectBindingPattern(e),o))}return i&&(a=_e(a,xee(i.name,o))),xn.checkDefined(a)}function xee(e,t){return YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration("string"==typeof e?YC.createIdentifier(e):e,void 0,void 0,YC.createCallExpression(YC.createIdentifier("require"),void 0,[t]))],2))}function See(e,t){return!!(7===t||(1&t?111551&e:2&t?788968&e:4&t&&1920&e))}f8({errorCodes:z9,getCodeActions(e){const{errorCode:t,preferences:n,sourceFile:r,span:i,program:o}=e,a=nee(e,t,i.start,!0);if(a)return a.map((({fix:t,symbolName:i,errorIdentifierText:a})=>_ee(e,r,i,t,i!==a,o,n)))},fixIds:[J9],getAllCodeActions:e=>{const{sourceFile:t,program:n,preferences:r,host:i,cancellationToken:o}=e,a=q9(t,n,!0,r,i,o);return x8(e,z9,(t=>a.addImportFromDiagnostic(t,e))),y8(r_e.ChangeTracker.with(e,a.writeFixes))}});var kee="addMissingConstraint",Tee=[va.Type_0_is_not_comparable_to_type_1.code,va.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,va.Type_0_is_not_assignable_to_type_1.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,va.Property_0_is_incompatible_with_index_signature.code,va.Property_0_in_type_1_is_not_assignable_to_type_2.code,va.Type_0_does_not_satisfy_the_constraint_1.code];function Cee(e,t,n){const r=S(e.getSemanticDiagnostics(t),(e=>e.start===n.start&&e.length===n.length));if(void 0===r||void 0===r.relatedInformation)return;const i=S(r.relatedInformation,(e=>e.code===va.This_type_parameter_might_need_an_extends_0_constraint.code));if(void 0===i||void 0===i.file||void 0===i.start||void 0===i.length)return;let o=Eie(i.file,Gs(i.start,i.length));if(void 0!==o&&(qD(o)&&aE(o.parent)&&(o=o.parent),aE(o))){if(BE(o.parent))return;const r=kX(t,n.start);return{constraint:(a=e.getTypeChecker(),(wu((s=r).parent)?a.getTypeArgumentConstraint(s.parent):(Xu(s)?a.getContextualType(s):void 0)||a.getTypeAtLocation(s))||function(e){const[,t]=Jq(e,"\n",0).match(/`extends (.*)`/)||[];return t}(i.messageText)),declaration:o,token:r}}var a,s}function wee(e,t,n,r,i,o){const{declaration:a,constraint:s}=o,c=t.getTypeChecker();if(st(s))e.insertText(i,a.name.end,` extends ${s}`);else{const o=wS(t.getCompilerOptions()),l=cie({program:t,host:r}),u=$9(i,t,n,r),_=fie(c,u,s,void 0,o,void 0,l);_&&(e.replaceNode(i,a,YC.updateTypeParameterDeclaration(a,void 0,a.name,_,a.default)),u.writeFixes(e))}}f8({errorCodes:Tee,getCodeActions(e){const{sourceFile:t,span:n,program:r,preferences:i,host:o}=e,a=Cee(r,t,n);if(void 0===a)return;const s=r_e.ChangeTracker.with(e,(e=>wee(e,r,i,o,t,a)));return[_8(kee,s,va.Add_extends_constraint,kee,va.Add_extends_constraint_to_all_type_parameters)]},fixIds:[kee],getAllCodeActions:e=>{const{program:t,preferences:n,host:r}=e,i=new Map;return y8(r_e.ChangeTracker.with(e,(o=>{x8(e,Tee,(e=>{const a=Cee(t,e.file,Gs(e.start,e.length));if(a&&Fx(i,IB(a.declaration)))return wee(o,t,n,r,e.file,a)}))})))}});var Dee="fixOverrideModifier",Eee="fixAddOverrideModifier",Pee="fixRemoveOverrideModifier",Nee=[va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code,va.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code,va.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code,va.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code,va.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code,va.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code,va.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code],Fee={[va.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Add_all_missing_override_modifiers},[va.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Add_all_missing_override_modifiers},[va.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:va.Remove_override_modifier,fixId:Pee,fixAllDescriptions:va.Remove_all_unnecessary_override_modifiers},[va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:va.Remove_override_modifier,fixId:Pee,fixAllDescriptions:va.Remove_override_modifier},[va.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Add_all_missing_override_modifiers},[va.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Add_all_missing_override_modifiers},[va.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Remove_all_unnecessary_override_modifiers},[va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:va.Remove_override_modifier,fixId:Pee,fixAllDescriptions:va.Remove_all_unnecessary_override_modifiers},[va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:va.Remove_override_modifier,fixId:Pee,fixAllDescriptions:va.Remove_all_unnecessary_override_modifiers}};function Aee(e,t,n,r){switch(n){case va.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code:case va.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:case va.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code:case va.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code:case va.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:return function(e,t,n){const r=Oee(t,n);if(Im(t))return void e.addJSDocTags(t,r,[YC.createJSDocOverrideTag(YC.createIdentifier("override"))]);const i=r.modifiers||u,o=S(i,QD),a=S(i,YD),s=S(i,(e=>ZX(e.kind))),c=k(i,cE),l=a?a.end:o?o.end:s?s.end:c?as(t.text,c.end):r.getStart(t),_=s||o||a?{prefix:" "}:{suffix:" "};e.insertModifierAt(t,l,164,_)}(e,t.sourceFile,r);case va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code:case va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code:case va.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code:case va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code:return function(e,t,n){const r=Oee(t,n);if(Im(t))return void e.filterJSDocTags(t,r,dn(gF));const i=S(r.modifiers,ZD);xn.assertIsDefined(i),e.deleteModifier(t,i)}(e,t.sourceFile,r);default:xn.fail("Unexpected error code: "+n)}}function Iee(e){switch(e.kind){case 176:case 172:case 174:case 177:case 178:return!0;case 169:return rc(e,e.parent);default:return!1}}function Oee(e,t){const n=mc(kX(e,t),(e=>gu(e)?"quit":Iee(e)));return xn.assert(n&&Iee(n)),n}f8({errorCodes:Nee,getCodeActions:function(e){const{errorCode:t,span:n}=e,r=Fee[t];if(!r)return u;const{descriptions:i,fixId:o,fixAllDescriptions:a}=r,s=r_e.ChangeTracker.with(e,(r=>Aee(r,e,t,n.start)));return[d8(Dee,s,i,o,a)]},fixIds:[Dee,Eee,Pee],getAllCodeActions:e=>b8(e,Nee,((t,n)=>{const{code:r,start:i}=n,o=Fee[r];o&&o.fixId===e.fixId&&Aee(t,e,r,i)}))});var Mee="fixNoPropertyAccessFromIndexSignature",Lee=[va.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code];function jee(e,t,n,r){const i=AQ(t,r),o=YC.createStringLiteral(n.name.text,0===i);e.replaceNode(t,n,vl(n)?YC.createElementAccessChain(n.expression,n.questionDotToken,o):YC.createElementAccessExpression(n.expression,o))}function Ree(e,t){return ut(kX(e,t).parent,GE)}f8({errorCodes:Lee,fixIds:[Mee],getCodeActions(e){const{sourceFile:t,span:n,preferences:r}=e,i=Ree(t,n.start),o=r_e.ChangeTracker.with(e,(t=>jee(t,e.sourceFile,i,r)));return[_8(Mee,o,[va.Use_element_access_for_0,i.name.text],Mee,va.Use_element_access_for_all_undeclared_properties)]},getAllCodeActions:e=>b8(e,Lee,((t,n)=>jee(t,n.file,Ree(n.file,n.start),e.preferences)))});var Bee="fixImplicitThis",Jee=[va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function zee(e,t,n,r){const i=kX(t,n);if(!WG(i))return;const o=rm(i,!1,!1);if((HP(o)||nP(o))&&!qN(rm(o,!1,!1))){const n=xn.checkDefined(uX(o,100,t)),{name:i}=o,a=xn.checkDefined(o.body);if(nP(o)){if(i&&Rse.Core.isSymbolReferencedInFile(i,r,t,a))return;return e.delete(t,n),i&&e.delete(t,i),e.insertText(t,a.pos," =>"),[va.Convert_function_expression_0_to_arrow_function,i?i.text:tZ]}return e.replaceNode(t,n,YC.createToken(87)),e.insertText(t,i.end," = "),e.insertText(t,a.pos," =>"),[va.Convert_function_declaration_0_to_arrow_function,i.text]}}f8({errorCodes:Jee,getCodeActions:function(e){const{sourceFile:t,program:n,span:r}=e;let i;const o=r_e.ChangeTracker.with(e,(e=>{i=zee(e,t,r.start,n.getTypeChecker())}));return i?[_8(Bee,o,i,Bee,va.Fix_all_implicit_this_errors)]:u},fixIds:[Bee],getAllCodeActions:e=>b8(e,Jee,((t,n)=>{zee(t,n.file,n.start,e.program.getTypeChecker())}))});var $ee="fixImportNonExportedMember",qee=[va.Module_0_declares_1_locally_but_it_is_not_exported.code];function Vee(e,t,n){var r,i;const o=kX(e,t);if(qD(o)){const t=mc(o,iN);if(void 0===t)return;const a=wD(t.moduleSpecifier)?t.moduleSpecifier:void 0;if(void 0===a)return;const s=null==(r=n.getResolvedModuleFromModuleSpecifier(a,e))?void 0:r.resolvedModule;if(void 0===s)return;const c=n.getSourceFile(s.resolvedFileName);if(void 0===c||WZ(n,c))return;const l=null==(i=lt(c.symbol.valueDeclaration,f_))?void 0:i.locals;if(void 0===l)return;const u=l.get(o.escapedText);if(void 0===u)return;const _=function(e){if(void 0===e.valueDeclaration)return Se(e.declarations);const t=e.valueDeclaration,n=KP(t)?lt(t.parent.parent,EP):void 0;return n&&1===p(n.declarationList.declarations)?n:t}(u);if(void 0===_)return;return{exportName:{node:o,isTypeOnly:YT(_)},node:_,moduleSourceFile:c,moduleSpecifier:a.text}}}function Uee(e,t,n,r,i){p(r)&&(i?Wee(e,t,n,i,r):Hee(e,t,n,r))}function Kee(e,t){return k(e.statements,(e=>gN(e)&&(t&&e.isTypeOnly||!e.isTypeOnly)))}function Wee(e,t,n,r,i){const o=r.exportClause&&hN(r.exportClause)?r.exportClause.elements:YC.createNodeArray([]),a=!(r.isTypeOnly||!NS(t.getCompilerOptions())&&!S(o,(e=>e.isTypeOnly)));e.replaceNode(n,r,YC.updateExportDeclaration(r,r.modifiers,r.isTypeOnly,YC.createNamedExports(YC.createNodeArray([...o,...Gee(i,a)],o.hasTrailingComma)),r.moduleSpecifier,r.attributes))}function Hee(e,t,n,r){e.insertNodeAtEndOfScope(n,n,YC.createExportDeclaration(void 0,!1,YC.createNamedExports(Gee(r,NS(t.getCompilerOptions()))),void 0,void 0))}function Gee(e,t){return YC.createNodeArray(O(e,(e=>YC.createExportSpecifier(t&&e.isTypeOnly,void 0,e.node))))}f8({errorCodes:qee,fixIds:[$ee],getCodeActions(e){const{sourceFile:t,span:n,program:r}=e,i=Vee(t,n.start,r);if(void 0===i)return;const o=r_e.ChangeTracker.with(e,(e=>function(e,t,{exportName:n,node:r,moduleSourceFile:i}){const o=Kee(i,n.isTypeOnly);o?Wee(e,t,i,o,[n]):ZT(r)?e.insertExportModifier(i,r):Hee(e,t,i,[n])}(e,r,i)));return[_8($ee,o,[va.Export_0_from_module_1,i.exportName.node.text,i.moduleSpecifier],$ee,va.Export_all_referenced_locals)]},getAllCodeActions(e){const{program:t}=e;return y8(r_e.ChangeTracker.with(e,(n=>{const r=new Map;x8(e,qee,(e=>{const i=Vee(e.file,e.start,t);if(void 0===i)return;const{exportName:o,node:a,moduleSourceFile:s}=i;if(void 0===Kee(s,o.isTypeOnly)&&ZT(a))n.insertExportModifier(s,a);else{const e=r.get(s)||{typeOnlyExports:[],exports:[]};o.isTypeOnly?e.typeOnlyExports.push(o):e.exports.push(o),r.set(s,e)}})),r.forEach(((e,r)=>{const i=Kee(r,!0);i&&i.isTypeOnly?(Uee(n,t,r,e.typeOnlyExports,i),Uee(n,t,r,e.exports,Kee(r,!1))):Uee(n,t,r,[...e.exports,...e.typeOnlyExports],i)}))})))}});var Xee="fixIncorrectNamedTupleSyntax";f8({errorCodes:[va.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code,va.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code],getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=function(e,t){return mc(kX(e,t),(e=>202===e.kind))}(t,n.start),i=r_e.ChangeTracker.with(e,(e=>function(e,t,n){if(!n)return;let r=n.type,i=!1,o=!1;for(;190===r.kind||191===r.kind||196===r.kind;)190===r.kind?i=!0:191===r.kind&&(o=!0),r=r.type;const a=YC.updateNamedTupleMember(n,n.dotDotDotToken||(o?YC.createToken(26):void 0),n.name,n.questionToken||(i?YC.createToken(58):void 0),r);a!==n&&e.replaceNode(t,n,a)}(e,t,r)));return[_8(Xee,i,va.Move_labeled_tuple_element_modifiers_to_labels,Xee,va.Move_labeled_tuple_element_modifiers_to_labels)]},fixIds:[Xee]});var Qee="fixSpelling",Yee=[va.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,va.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,va.Cannot_find_name_0_Did_you_mean_1.code,va.Could_not_find_name_0_Did_you_mean_1.code,va.Cannot_find_namespace_0_Did_you_mean_1.code,va.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,va.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,va._0_has_no_exported_member_named_1_Did_you_mean_2.code,va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,va.No_overload_matches_this_call.code,va.Type_0_is_not_assignable_to_type_1.code];function Zee(e,t,n,r){const i=kX(e,t),o=i.parent;if((r===va.No_overload_matches_this_call.code||r===va.Type_0_is_not_assignable_to_type_1.code)&&!NN(o))return;const a=n.program.getTypeChecker();let s;if(GE(o)&&o.name===i){xn.assert(hl(i),"Expected an identifier for spelling (property access)");let e=a.getTypeAtLocation(o.expression);64&o.flags&&(e=a.getNonNullableType(e)),s=a.getSuggestedSymbolForNonexistentProperty(i,e)}else if(uP(o)&&103===o.operatorToken.kind&&o.left===i&&VD(i)){const e=a.getTypeAtLocation(o.right);s=a.getSuggestedSymbolForNonexistentProperty(i,e)}else if(iE(o)&&o.right===i){const e=a.getSymbolAtLocation(o.left);e&&1536&e.flags&&(s=a.getSuggestedSymbolForNonexistentModule(o.right,e))}else if(fN(o)&&o.name===i){xn.assertNode(i,qD,"Expected an identifier for spelling (import)");const t=function(e,t,n){var r;if(!t||!$_(t.moduleSpecifier))return;const i=null==(r=e.program.getResolvedModuleFromModuleSpecifier(t.moduleSpecifier,n))?void 0:r.resolvedModule;return i?e.program.getSourceFile(i.resolvedFileName):void 0}(n,mc(i,iN),e);t&&t.symbol&&(s=a.getSuggestedSymbolForNonexistentModule(i,t.symbol))}else if(NN(o)&&o.name===i){xn.assertNode(i,qD,"Expected an identifier for JSX attribute");const e=mc(i,D_),t=a.getContextualTypeForArgumentAtIndex(e,0);s=a.getSuggestedSymbolForNonexistentJSXAttribute(i,t)}else if($v(o)&&mu(o)&&o.name===i){const e=mc(i,gu),t=e?Sh(e):void 0,n=t?a.getTypeAtLocation(t):void 0;n&&(s=a.getSuggestedSymbolForNonexistentClassMember(Gd(i),n))}else{const e=yG(i),t=Gd(i);xn.assert(void 0!==t,"name should be defined"),s=a.getSuggestedSymbolForNonexistentSymbol(i,t,function(e){let t=0;return 4&e&&(t|=1920),2&e&&(t|=788968),1&e&&(t|=111551),t}(e))}return void 0===s?void 0:{node:i,suggestedSymbol:s}}function ete(e,t,n,r,i){const o=Sc(r);if(!Ts(o,i)&&GE(n.parent)){const i=r.valueDeclaration;i&&Dc(i)&&VD(i.name)?e.replaceNode(t,n,YC.createIdentifier(o)):e.replaceNode(t,n.parent,YC.createElementAccessExpression(n.parent.expression,YC.createStringLiteral(o)))}else e.replaceNode(t,n,YC.createIdentifier(o))}f8({errorCodes:Yee,getCodeActions(e){const{sourceFile:t,errorCode:n}=e,r=Zee(t,e.span.start,e,n);if(!r)return;const{node:i,suggestedSymbol:o}=r,a=wS(e.host.getCompilationSettings());return[_8("spelling",r_e.ChangeTracker.with(e,(e=>ete(e,t,i,o,a))),[va.Change_spelling_to_0,Sc(o)],Qee,va.Fix_all_detected_spelling_errors)]},fixIds:[Qee],getAllCodeActions:e=>b8(e,Yee,((t,n)=>{const r=Zee(n.file,n.start,e,n.code),i=wS(e.host.getCompilationSettings());r&&ete(t,e.sourceFile,r.node,r.suggestedSymbol,i)}))});var tte="returnValueCorrect",nte="fixAddReturnStatement",rte="fixRemoveBracesFromArrowFunctionBody",ite="fixWrapTheBlockWithParen",ote=[va.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code,va.Type_0_is_not_assignable_to_type_1.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code];function ate(e,t,n){const r=e.createSymbol(4,t.escapedText);r.links.type=e.getTypeAtLocation(n);const i=ed([r]);return e.createAnonymousType(void 0,i,[],[],[])}function ste(e,t,n,r){if(!t.body||!DP(t.body)||1!==p(t.body.statements))return;const i=Te(t.body.statements);if(NP(i)&&cte(e,t,e.getTypeAtLocation(i.expression),n,r))return{declaration:t,kind:0,expression:i.expression,statement:i,commentSource:i.expression};if($P(i)&&NP(i.statement)){const o=YC.createObjectLiteralExpression([YC.createPropertyAssignment(i.label,i.statement.expression)]);if(cte(e,t,ate(e,i.label,i.statement.expression),n,r))return rP(t)?{declaration:t,kind:1,expression:o,statement:i,commentSource:i.statement.expression}:{declaration:t,kind:0,expression:o,statement:i,commentSource:i.statement.expression}}else if(DP(i)&&1===p(i.statements)){const o=Te(i.statements);if($P(o)&&NP(o.statement)){const a=YC.createObjectLiteralExpression([YC.createPropertyAssignment(o.label,o.statement.expression)]);if(cte(e,t,ate(e,o.label,o.statement.expression),n,r))return{declaration:t,kind:0,expression:a,statement:i,commentSource:o}}}}function cte(e,t,n,r,i){if(i){const r=e.getSignatureFromDeclaration(t);if(r){Bv(t,1024)&&(n=e.createPromiseType(n));const i=e.createSignature(t,r.typeParameters,r.thisParameter,r.parameters,n,void 0,r.minArgumentCount,r.flags);n=e.createAnonymousType(void 0,ed(),[i],[],[])}else n=e.getAnyType()}return e.isTypeAssignableTo(n,r)}function lte(e,t,n,r){const i=kX(t,n);if(!i.parent)return;const o=mc(i.parent,uu);switch(r){case va.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code:if(!(o&&o.body&&o.type&&XG(o.type,i)))return;return ste(e,o,e.getTypeFromTypeNode(o.type),!1);case va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:if(!o||!QE(o.parent)||!o.body)return;const t=o.parent.arguments.indexOf(o);if(-1===t)return;const n=e.getContextualTypeForArgumentAtIndex(o.parent,t);if(!n)return;return ste(e,o,n,!0);case va.Type_0_is_not_assignable_to_type_1.code:if(!dh(i)||!If(i.parent)&&!NN(i.parent))return;const r=function(e){switch(e.kind){case 260:case 169:case 208:case 172:case 303:return e.initializer;case 291:return e.initializer&&(IN(e.initializer)?e.initializer.expression:void 0);case 304:case 171:case 306:case 348:case 341:return}}(i.parent);if(!r||!uu(r)||!r.body)return;return ste(e,r,e.getTypeAtLocation(i.parent),!0)}}function ute(e,t,n,r){MY(n);const i=lZ(t);e.replaceNode(t,r,YC.createReturnStatement(n),{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.Exclude,suffix:i?";":void 0})}function _te(e,t,n,r,i,o){const a=o||HY(r)?YC.createParenthesizedExpression(r):r;MY(i),RY(i,a),e.replaceNode(t,n.body,a)}function dte(e,t,n,r){e.replaceNode(t,n.body,YC.createParenthesizedExpression(r))}function pte(e,t,n){const r=r_e.ChangeTracker.with(e,(r=>ute(r,e.sourceFile,t,n)));return _8(tte,r,va.Add_a_return_statement,nte,va.Add_all_missing_return_statement)}function fte(e,t,n){const r=r_e.ChangeTracker.with(e,(r=>dte(r,e.sourceFile,t,n)));return _8(tte,r,va.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal,ite,va.Wrap_all_object_literal_with_parentheses)}f8({errorCodes:ote,fixIds:[nte,rte,ite],getCodeActions:function(e){const{program:t,sourceFile:n,span:{start:r},errorCode:i}=e,o=lte(t.getTypeChecker(),n,r,i);if(o)return 0===o.kind?ue([pte(e,o.expression,o.statement)],rP(o.declaration)?function(e,t,n,r){const i=r_e.ChangeTracker.with(e,(i=>_te(i,e.sourceFile,t,n,r,!1)));return _8(tte,i,va.Remove_braces_from_arrow_function_body,rte,va.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues)}(e,o.declaration,o.expression,o.commentSource):void 0):[fte(e,o.declaration,o.expression)]},getAllCodeActions:e=>b8(e,ote,((t,n)=>{const r=lte(e.program.getTypeChecker(),n.file,n.start,n.code);if(r)switch(e.fixId){case nte:ute(t,n.file,r.expression,r.statement);break;case rte:if(!rP(r.declaration))return;_te(t,n.file,r.declaration,r.expression,r.commentSource,!1);break;case ite:if(!rP(r.declaration))return;dte(t,n.file,r.declaration,r.expression);break;default:xn.fail(JSON.stringify(e.fixId))}}))});var mte="fixMissingMember",gte="fixMissingProperties",hte="fixMissingAttributes",yte="fixMissingFunctionDeclaration",vte=[va.Property_0_does_not_exist_on_type_1.code,va.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,va.Property_0_is_missing_in_type_1_but_required_in_type_2.code,va.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,va.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,va.Cannot_find_name_0.code];function bte(e,t,n,r,i){var o;const a=kX(e,t),s=a.parent;if(n===va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code){if(19!==a.kind||!HE(s)||!QE(s.parent))return;const e=T(s.parent.arguments,(e=>e===s));if(e<0)return;const t=r.getResolvedSignature(s.parent);if(!(t&&t.declaration&&t.parameters[e]))return;const n=t.parameters[e].valueDeclaration;if(!(n&&sE(n)&&qD(n.name)))return;const i=$e(r.getUnmatchedProperties(r.getTypeAtLocation(s),r.getParameterType(t,e),!1,!1));if(!p(i))return;return{kind:3,token:n.name,identifier:n.name.text,properties:i,parentDeclaration:s}}if(19===a.kind&&HE(s)){const e=r.getContextualType(s)||r.getTypeAtLocation(s),t=$e(r.getUnmatchedProperties(r.getTypeAtLocation(s),e,!1,!1));if(!p(t))return;return{kind:3,token:s,identifier:"",properties:t,parentDeclaration:s}}if(!hl(a))return;if(qD(a)&&L_(s)&&s.initializer&&HE(s.initializer)){const e=r.getContextualType(a)||r.getTypeAtLocation(a),t=$e(r.getUnmatchedProperties(r.getTypeAtLocation(s.initializer),e,!1,!1));if(!p(t))return;return{kind:3,token:a,identifier:a.text,properties:t,parentDeclaration:s.initializer}}if(qD(a)&&D_(a.parent)){const e=function(e,t,n){const r=e.getContextualType(n.attributes);if(void 0===r)return u;const i=r.getProperties();if(!p(i))return u;const o=new Set;for(const t of n.attributes.properties)if(NN(t)&&o.add(lC(t.name)),AN(t)){const n=e.getTypeAtLocation(t.expression);for(const e of n.getProperties())o.add(e.escapedName)}return F(i,(e=>Ts(e.name,t,1)&&!(16777216&e.flags||48&px(e)||o.has(e.escapedName))))}(r,wS(i.getCompilerOptions()),a.parent);if(!p(e))return;return{kind:4,token:a,attributes:e,parentDeclaration:a.parent}}if(qD(a)){const t=null==(o=r.getContextualType(a))?void 0:o.getNonNullableType();if(t&&16&wx(t)){const n=Se(r.getSignaturesOfType(t,0));if(void 0===n)return;return{kind:5,token:a,signature:n,sourceFile:e,parentDeclaration:Ite(a)}}if(QE(s)&&s.expression===a)return{kind:2,token:a,call:s,sourceFile:e,modifierFlags:0,parentDeclaration:Ite(a)}}if(!GE(s))return;const c=bQ(r.getTypeAtLocation(s.expression)),l=c.symbol;if(!l||!l.declarations)return;if(qD(a)&&QE(s.parent)){const t=S(l.declarations,ZP),n=null==t?void 0:t.getSourceFile();if(t&&n&&!WZ(i,n))return{kind:2,token:a,call:s.parent,sourceFile:e,modifierFlags:32,parentDeclaration:t};const r=S(l.declarations,qN);if(e.commonJsModuleIndicator)return;if(r&&!WZ(i,r))return{kind:2,token:a,call:s.parent,sourceFile:r,modifierFlags:32,parentDeclaration:r}}const _=S(l.declarations,gu);if(!_&&VD(a))return;const d=_||S(l.declarations,(e=>XP(e)||CE(e)));if(d&&!WZ(i,d.getSourceFile())){const e=!CE(d)&&(c.target||c)!==r.getDeclaredTypeOfSymbol(l);if(e&&(VD(a)||XP(d)))return;const t=d.getSourceFile(),n=CE(d)?0:(e?256:0)|(RZ(a.text)?2:0),i=Im(t);return{kind:0,token:a,call:lt(s.parent,QE),modifierFlags:n,parentDeclaration:d,declSourceFile:t,isJSFile:i}}const f=S(l.declarations,YP);return!f||1056&c.flags||VD(a)||WZ(i,f.getSourceFile())?void 0:{kind:1,token:a,parentDeclaration:f}}function xte(e,t,n,r,i){const o=r.text;if(i){if(231===n.kind)return;const r=n.name.getText(),i=Ste(YC.createIdentifier(r),o);e.insertNodeAfter(t,n,i)}else if(VD(r)){const r=YC.createPropertyDeclaration(void 0,o,void 0,void 0,void 0),i=Cte(n);i?e.insertNodeAfter(t,i,r):e.insertMemberAtStart(t,n,r)}else{const r=pv(n);if(!r)return;const i=Ste(YC.createThis(),o);e.insertNodeAtConstructorEnd(t,r,i)}}function Ste(e,t){return YC.createExpressionStatement(YC.createAssignment(YC.createPropertyAccessExpression(e,t),Ate()))}function kte(e,t,n){let r;if(226===n.parent.parent.kind){const i=n.parent.parent,o=n.parent===i.left?i.right:i.left,a=e.getWidenedType(e.getBaseTypeOfLiteralType(e.getTypeAtLocation(o)));r=e.typeToTypeNode(a,t,1)}else{const t=e.getContextualType(n.parent);r=t?e.typeToTypeNode(t,void 0,1):void 0}return r||YC.createKeywordTypeNode(133)}function Tte(e,t,n,r,i,o){const a=o?YC.createNodeArray(YC.createModifiersFromModifierFlags(o)):void 0,s=gu(n)?YC.createPropertyDeclaration(a,r,void 0,i,void 0):YC.createPropertySignature(void 0,r,void 0,i),c=Cte(n);c?e.insertNodeAfter(t,c,s):e.insertMemberAtStart(t,n,s)}function Cte(e){let t;for(const n of e.members){if(!uE(n))break;t=n}return t}function wte(e,t,n,r,i,o,a){const s=$9(a,e.program,e.preferences,e.host),c=die(gu(o)?174:173,e,s,n,r,i,o),l=function(e,t){if(CE(e))return;const n=mc(t,(e=>dE(e)||fE(e)));return n&&n.parent===e?n:void 0}(o,n);l?t.insertNodeAfter(a,l,c):t.insertMemberAtStart(a,o,c),s.writeFixes(t)}function Dte(e,t,{token:n,parentDeclaration:r}){const i=Q(r.members,(e=>{const n=t.getTypeAtLocation(e);return!!(n&&402653316&n.flags)})),o=r.getSourceFile(),a=YC.createEnumMember(n,i?YC.createStringLiteral(n.text):void 0),s=we(r.members);s?e.insertNodeInListAfter(o,s,a,r.members):e.insertMemberAtStart(o,r,a)}function Ete(e,t,n){const r=AQ(t.sourceFile,t.preferences),i=$9(t.sourceFile,t.program,t.preferences,t.host),o=2===n.kind?die(262,t,i,n.call,bc(n.token),n.modifierFlags,n.parentDeclaration):_ie(262,t,r,n.signature,bie(va.Function_not_implemented.message,r),n.token,void 0,void 0,void 0,i);void 0===o&&xn.fail("fixMissingFunctionDeclaration codefix got unexpected error."),BP(n.parentDeclaration)?e.insertNodeBefore(n.sourceFile,n.parentDeclaration,o,!0):e.insertNodeAtEndOfScope(n.sourceFile,n.parentDeclaration,o),i.writeFixes(e)}function Pte(e,t,n){const r=$9(t.sourceFile,t.program,t.preferences,t.host),i=AQ(t.sourceFile,t.preferences),o=t.program.getTypeChecker(),a=n.parentDeclaration.attributes,s=Q(a.properties,AN),c=O(n.attributes,(e=>{const a=Fte(t,o,r,i,o.getTypeOfSymbol(e),n.parentDeclaration),s=YC.createIdentifier(e.name),c=YC.createJsxAttribute(s,YC.createJsxExpression(void 0,a));return OT(s,c),c})),l=YC.createJsxAttributes(s?[...c,...a.properties]:[...a.properties,...c]),u={prefix:a.pos===a.end?" ":void 0};e.replaceNode(t.sourceFile,a,l,u),r.writeFixes(e)}function Nte(e,t,n){const r=$9(t.sourceFile,t.program,t.preferences,t.host),i=AQ(t.sourceFile,t.preferences),o=wS(t.program.getCompilerOptions()),a=t.program.getTypeChecker(),s=O(n.properties,(e=>{const s=Fte(t,a,r,i,a.getTypeOfSymbol(e),n.parentDeclaration);return YC.createPropertyAssignment(function(e,t,n,r){if(td(e)){const t=r.symbolToNode(e,111551,void 0,1073741824);if(t&&oE(t))return t}return HT(e.name,t,0===n,!1,!1)}(e,o,i,a),s)})),c={leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.Exclude,indentation:n.indentation};e.replaceNode(t.sourceFile,n.parentDeclaration,YC.createObjectLiteralExpression([...n.parentDeclaration.properties,...s],!0),c),r.writeFixes(e)}function Fte(e,t,n,r,i,o){if(3&i.flags)return Ate();if(134217732&i.flags)return YC.createStringLiteral("",0===r);if(8&i.flags)return YC.createNumericLiteral(0);if(64&i.flags)return YC.createBigIntLiteral("0n");if(16&i.flags)return YC.createFalse();if(1056&i.flags){const e=i.symbol.exports?ke(i.symbol.exports.values()):i.symbol,n=t.symbolToExpression(i.symbol.parent?i.symbol.parent:i.symbol,111551,void 0,64);return void 0===e||void 0===n?YC.createNumericLiteral(0):YC.createPropertyAccessExpression(n,t.symbolToString(e))}if(256&i.flags)return YC.createNumericLiteral(i.value);if(2048&i.flags)return YC.createBigIntLiteral(i.value);if(128&i.flags)return YC.createStringLiteral(i.value,0===r);if(512&i.flags)return i===t.getFalseType()||i===t.getFalseType(!0)?YC.createFalse():YC.createTrue();if(65536&i.flags)return YC.createNull();if(1048576&i.flags)return g(i.types,(i=>Fte(e,t,n,r,i,o)))??Ate();if(t.isArrayLikeType(i))return YC.createArrayLiteralExpression();if(function(e){return 524288&e.flags&&(128&wx(e)||e.symbol&<(Ee(e.symbol.declarations),CE))}(i)){const a=O(t.getPropertiesOfType(i),(i=>{const a=Fte(e,t,n,r,t.getTypeOfSymbol(i),o);return YC.createPropertyAssignment(i.name,a)}));return YC.createObjectLiteralExpression(a,!0)}if(16&wx(i)){if(void 0===S(i.symbol.declarations||u,_n(SE,_E,dE)))return Ate();const a=t.getSignaturesOfType(i,0);return void 0===a?Ate():_ie(218,e,r,a[0],bie(va.Function_not_implemented.message,r),void 0,void 0,void 0,o,n)??Ate()}if(1&wx(i)){const e=Cx(i.symbol);if(void 0===e||qv(e))return Ate();const t=pv(e);return t&&p(t.parameters)?Ate():YC.createNewExpression(YC.createIdentifier(i.symbol.name),void 0,void 0)}return Ate()}function Ate(){return YC.createIdentifier("undefined")}function Ite(e){if(mc(e,IN)){const t=mc(e.parent,BP);if(t)return t}return Sd(e)}f8({errorCodes:vte,getCodeActions(e){const t=e.program.getTypeChecker(),n=bte(e.sourceFile,e.span.start,e.errorCode,t,e.program);if(n){if(3===n.kind){const t=r_e.ChangeTracker.with(e,(t=>Nte(t,e,n)));return[_8(gte,t,va.Add_missing_properties,gte,va.Add_all_missing_properties)]}if(4===n.kind){const t=r_e.ChangeTracker.with(e,(t=>Pte(t,e,n)));return[_8(hte,t,va.Add_missing_attributes,hte,va.Add_all_missing_attributes)]}if(2===n.kind||5===n.kind){const t=r_e.ChangeTracker.with(e,(t=>Ete(t,e,n)));return[_8(yte,t,[va.Add_missing_function_declaration_0,n.token.text],yte,va.Add_all_missing_function_declarations)]}if(1===n.kind){const t=r_e.ChangeTracker.with(e,(t=>Dte(t,e.program.getTypeChecker(),n)));return[_8(mte,t,[va.Add_missing_enum_member_0,n.token.text],mte,va.Add_all_missing_members)]}return Z(function(e,t){const{parentDeclaration:n,declSourceFile:r,modifierFlags:i,token:o,call:a}=t;if(void 0===a)return;const s=o.text,c=t=>r_e.ChangeTracker.with(e,(i=>wte(e,i,a,o,t,n,r))),l=[_8(mte,c(256&i),[256&i?va.Declare_static_method_0:va.Declare_method_0,s],mte,va.Add_all_missing_members)];return 2&i&&l.unshift(u8(mte,c(2),[va.Declare_private_method_0,s])),l}(e,n),function(e,t){return t.isJSFile?fn(function(e,{parentDeclaration:t,declSourceFile:n,modifierFlags:r,token:i}){if(XP(t)||CE(t))return;const o=r_e.ChangeTracker.with(e,(e=>xte(e,n,t,i,!!(256&r))));if(0===o.length)return;const a=256&r?va.Initialize_static_property_0:VD(i)?va.Declare_a_private_field_named_0:va.Initialize_property_0_in_the_constructor;return _8(mte,o,[a,i.text],mte,va.Add_all_missing_members)}(e,t)):function(e,{parentDeclaration:t,declSourceFile:n,modifierFlags:r,token:i}){const o=i.text,a=256&r,s=kte(e.program.getTypeChecker(),t,i),c=r=>r_e.ChangeTracker.with(e,(e=>Tte(e,n,t,o,s,r))),l=[_8(mte,c(256&r),[a?va.Declare_static_property_0:va.Declare_property_0,o],mte,va.Add_all_missing_members)];return a||VD(i)||(2&r&&l.unshift(u8(mte,c(2),[va.Declare_private_property_0,o])),l.push(function(e,t,n,r,i){const o=YC.createKeywordTypeNode(154),a=YC.createParameterDeclaration(void 0,void 0,"x",void 0,o,void 0),s=YC.createIndexSignature(void 0,[a],i),c=r_e.ChangeTracker.with(e,(e=>e.insertMemberAtStart(t,n,s)));return u8(mte,c,[va.Add_index_signature_for_property_0,r])}(e,n,t,i.text,s))),l}(e,t)}(e,n))}},fixIds:[mte,yte,gte,hte],getAllCodeActions:e=>{const{program:t,fixId:n}=e,r=t.getTypeChecker(),i=new Map,o=new Map;return y8(r_e.ChangeTracker.with(e,(t=>{x8(e,vte,(a=>{const s=bte(a.file,a.start,a.code,r,e.program);if(s&&Fx(i,IB(s.parentDeclaration)+"#"+(3===s.kind?s.identifier:s.token.text)))if(n!==yte||2!==s.kind&&5!==s.kind){if(n===gte&&3===s.kind)Nte(t,e,s);else if(n===hte&&4===s.kind)Pte(t,e,s);else if(1===s.kind&&Dte(t,r,s),0===s.kind){const{parentDeclaration:e,token:t}=s,n=K(o,e,(()=>[]));n.some((e=>e.token.text===t.text))||n.push(s)}}else Ete(t,e,s)})),o.forEach(((n,i)=>{const a=CE(i)?void 0:Lie(i,r);for(const i of n){if(null==a?void 0:a.some((e=>{const t=o.get(e);return!!t&&t.some((({token:e})=>e.text===i.token.text))})))continue;const{parentDeclaration:n,declSourceFile:s,modifierFlags:c,token:l,call:u,isJSFile:_}=i;if(u&&!VD(l))wte(e,t,u,l,256&c,n,s);else if(!_||XP(n)||CE(n)){const e=kte(r,n,l);Tte(t,s,n,l.text,e,256&c)}else xte(t,s,n,l,!!(256&c))}}))})))}});var Ote="addMissingNewOperator",Mte=[va.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];function Lte(e,t,n){const r=ut(function(e,t){let n=kX(e,t.start);const r=js(t);for(;n.endLte(e,t,n)));return[_8(Ote,r,va.Add_missing_new_operator_to_call,Ote,va.Add_missing_new_operator_to_all_calls)]},fixIds:[Ote],getAllCodeActions:e=>b8(e,Mte,((t,n)=>Lte(t,e.sourceFile,n)))});var jte="addMissingParam",Rte="addOptionalParam",Bte=[va.Expected_0_arguments_but_got_1.code];function Jte(e,t,n){const r=mc(kX(e,n),QE);if(void 0===r||0===p(r.arguments))return;const i=t.getTypeChecker(),o=F(i.getTypeAtLocation(r.expression).symbol.declarations,qte);if(void 0===o)return;const a=we(o);if(void 0===a||void 0===a.body||WZ(t,a.getSourceFile()))return;const s=function(e){const t=Pc(e);return t||(KP(e.parent)&&qD(e.parent.name)||uE(e.parent)||sE(e.parent)?e.parent.name:void 0)}(a);if(void 0===s)return;const c=[],l=[],u=p(a.parameters),_=p(r.arguments);if(u>_)return;const d=[a,...Ute(a,o)];for(let e=0,t=0,n=0;e<_;e++){const o=r.arguments[e],s=Ox(o)?Mx(o):o,_=i.getWidenedType(i.getBaseTypeOfLiteralType(i.getTypeAtLocation(o))),p=t{const s=Sd(i),c=$9(s,t,n,r);p(i.parameters)?e.replaceNodeRangeWithNodes(s,Te(i.parameters),De(i.parameters),Vte(c,a,i,o),{joiner:", ",indentation:0,leadingTriviaOption:r_e.LeadingTriviaOption.IncludeAll,trailingTriviaOption:r_e.TrailingTriviaOption.Include}):f(Vte(c,a,i,o),((t,n)=>{0===p(i.parameters)&&0===n?e.insertNodeAt(s,i.parameters.end,t):e.insertNodeAtEndOfList(s,i.parameters,t)})),c.writeFixes(e)}))}function qte(e){switch(e.kind){case 262:case 218:case 174:case 219:return!0;default:return!1}}function Vte(e,t,n,r){const i=O(n.parameters,(e=>YC.createParameterDeclaration(e.modifiers,e.dotDotDotToken,e.name,e.questionToken,e.type,e.initializer)));for(const{pos:n,declaration:o}of r){const r=n>0?i[n-1]:void 0;i.splice(n,0,YC.updateParameterDeclaration(o,o.modifiers,o.dotDotDotToken,o.name,r&&r.questionToken?YC.createToken(58):o.questionToken,Gte(e,o.type,t),o.initializer))}return i}function Ute(e,t){const n=[];for(const r of t)if(Kte(r)){if(p(r.parameters)===p(e.parameters)){n.push(r);continue}if(p(r.parameters)>p(e.parameters))return[]}return n}function Kte(e){return qte(e)&&void 0===e.body}function Wte(e,t,n){return YC.createParameterDeclaration(void 0,void 0,e,n,t,void 0)}function Hte(e,t){return p(e)&&Q(e,(e=>t$te(t,e.program,e.preferences,e.host,r,i))),[p(i)>1?va.Add_missing_parameters_to_0:va.Add_missing_parameter_to_0,n],jte,va.Add_all_missing_parameters)),p(o)&&ue(a,_8(Rte,r_e.ChangeTracker.with(e,(t=>$te(t,e.program,e.preferences,e.host,r,o))),[p(o)>1?va.Add_optional_parameters_to_0:va.Add_optional_parameter_to_0,n],Rte,va.Add_all_optional_parameters)),a},getAllCodeActions:e=>b8(e,Bte,((t,n)=>{const r=Jte(e.sourceFile,e.program,n.start);if(r){const{declarations:n,newParameters:i,newOptionalParameters:o}=r;e.fixId===jte&&$te(t,e.program,e.preferences,e.host,n,i),e.fixId===Rte&&$te(t,e.program,e.preferences,e.host,n,o)}}))});var Xte="installTypesPackage",Qte=va.Cannot_find_module_0_or_its_corresponding_type_declarations.code,Yte=[Qte,va.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code];function Zte(e,t){return{type:"install package",file:e,packageName:t}}function ene(e,t){const n=lt(kX(e,t),wD);if(!n)return;const r=n.text,{packageName:i}=eR(r);return Os(i)?void 0:i}function tne(e,t,n){var r;return n===Qte?fH.nodeCoreModules.has(e)?"@types/node":void 0:(null==(r=t.isKnownTypesPackageName)?void 0:r.call(t,e))?fR(e):void 0}f8({errorCodes:Yte,getCodeActions:function(e){const{host:t,sourceFile:n,span:{start:r}}=e,i=ene(n,r);if(void 0===i)return;const o=tne(i,t,e.errorCode);return void 0===o?[]:[_8("fixCannotFindModule",[],[va.Install_0,o],Xte,va.Install_all_missing_types_packages,Zte(n.fileName,o))]},fixIds:[Xte],getAllCodeActions:e=>b8(e,Yte,((t,n,r)=>{const i=ene(n.file,n.start);if(void 0!==i)switch(e.fixId){case Xte:{const t=tne(i,e.host,n.code);t&&r.push(Zte(n.file.fileName,t));break}default:xn.fail(`Bad fixId: ${e.fixId}`)}}))});var nne=[va.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,va.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,va.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,va.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,va.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,va.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code],rne="fixClassDoesntImplementInheritedAbstractMember";function ine(e,t){return ut(kX(e,t).parent,gu)}function one(e,t,n,r,i){const o=Sh(e),a=n.program.getTypeChecker(),s=a.getTypeAtLocation(o),c=a.getPropertiesOfType(s).filter(ane),l=$9(t,n.program,i,n.host);sie(e,c,t,n,i,l,(n=>r.insertMemberAtStart(t,e,n))),l.writeFixes(r)}function ane(e){const t=Zv(Te(e.getDeclarations()));return!(2&t||!(64&t))}f8({errorCodes:nne,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=r_e.ChangeTracker.with(e,(r=>one(ine(t,n.start),t,e,r,e.preferences)));return 0===r.length?void 0:[_8(rne,r,va.Implement_inherited_abstract_class,rne,va.Implement_all_inherited_abstract_classes)]},fixIds:[rne],getAllCodeActions:function(e){const t=new Map;return b8(e,nne,((n,r)=>{const i=ine(r.file,r.start);Fx(t,IB(i))&&one(i,e.sourceFile,e,n,e.preferences)}))}});var sne="classSuperMustPrecedeThisAccess",cne=[va.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];function lne(e,t,n,r){e.insertNodeAtConstructorStart(t,n,r),e.delete(t,r)}function une(e,t){const n=kX(e,t);if(110!==n.kind)return;const r=Qf(n),i=_ne(r.body);return i&&!i.expression.arguments.some((e=>GE(e)&&e.expression===n))?{constructor:r,superCall:i}:void 0}function _ne(e){return NP(e)&&lf(e.expression)?e:cu(e)?void 0:LI(e,_ne)}f8({errorCodes:cne,getCodeActions(e){const{sourceFile:t,span:n}=e,r=une(t,n.start);if(!r)return;const{constructor:i,superCall:o}=r,a=r_e.ChangeTracker.with(e,(e=>lne(e,t,i,o)));return[_8(sne,a,va.Make_super_call_the_first_statement_in_the_constructor,sne,va.Make_all_super_calls_the_first_statement_in_their_constructor)]},fixIds:[sne],getAllCodeActions(e){const{sourceFile:t}=e,n=new Map;return b8(e,cne,((e,r)=>{const i=une(r.file,r.start);if(!i)return;const{constructor:o,superCall:a}=i;Fx(n,IB(o.parent))&&lne(e,t,o,a)}))}});var dne="constructorForDerivedNeedSuperCall",pne=[va.Constructors_for_derived_classes_must_contain_a_super_call.code];function fne(e,t){const n=kX(e,t);return xn.assert(fE(n.parent),"token should be at the constructor declaration"),n.parent}function mne(e,t,n){const r=YC.createExpressionStatement(YC.createCallExpression(YC.createSuper(),void 0,u));e.insertNodeAtConstructorStart(t,n,r)}f8({errorCodes:pne,getCodeActions(e){const{sourceFile:t,span:n}=e,r=fne(t,n.start),i=r_e.ChangeTracker.with(e,(e=>mne(e,t,r)));return[_8(dne,i,va.Add_missing_super_call,dne,va.Add_all_missing_super_calls)]},fixIds:[dne],getAllCodeActions:e=>b8(e,pne,((t,n)=>mne(t,e.sourceFile,fne(n.file,n.start))))});var gne="fixEnableJsxFlag",hne=[va.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];function yne(e,t){Sie(e,t,"jsx",YC.createStringLiteral("react"))}f8({errorCodes:hne,getCodeActions:function(e){const{configFile:t}=e.program.getCompilerOptions();if(void 0===t)return;const n=r_e.ChangeTracker.with(e,(e=>yne(e,t)));return[u8(gne,n,va.Enable_the_jsx_flag_in_your_configuration_file)]},fixIds:[gne],getAllCodeActions:e=>b8(e,hne,(t=>{const{configFile:n}=e.program.getCompilerOptions();void 0!==n&&yne(t,n)}))});var vne="fixNaNEquality",bne=[va.This_condition_will_always_return_0.code];function xne(e,t,n){const r=S(e.getSemanticDiagnostics(t),(e=>e.start===n.start&&e.length===n.length));if(void 0===r||void 0===r.relatedInformation)return;const i=S(r.relatedInformation,(e=>e.code===va.Did_you_mean_0.code));if(void 0===i||void 0===i.file||void 0===i.start||void 0===i.length)return;const o=Eie(i.file,Gs(i.start,i.length));return void 0!==o&&Xu(o)&&uP(o.parent)?{suggestion:kne(i.messageText),expression:o.parent,arg:o}:void 0}function Sne(e,t,n,r){const i=YC.createCallExpression(YC.createPropertyAccessExpression(YC.createIdentifier("Number"),YC.createIdentifier("isNaN")),void 0,[n]),o=r.operatorToken.kind;e.replaceNode(t,r,38===o||36===o?YC.createPrefixUnaryExpression(54,i):i)}function kne(e){const[,t]=Jq(e,"\n",0).match(/'(.*)'/)||[];return t}f8({errorCodes:bne,getCodeActions(e){const{sourceFile:t,span:n,program:r}=e,i=xne(r,t,n);if(void 0===i)return;const{suggestion:o,expression:a,arg:s}=i,c=r_e.ChangeTracker.with(e,(e=>Sne(e,t,s,a)));return[_8(vne,c,[va.Use_0,o],vne,va.Use_Number_isNaN_in_all_conditions)]},fixIds:[vne],getAllCodeActions:e=>b8(e,bne,((t,n)=>{const r=xne(e.program,n.file,Gs(n.start,n.length));r&&Sne(t,n.file,r.arg,r.expression)}))}),f8({errorCodes:[va.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,va.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,va.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code],getCodeActions:function(e){const t=e.program.getCompilerOptions(),{configFile:n}=t;if(void 0===n)return;const r=[],i=DS(t);if(i>=5&&i<99){const t=r_e.ChangeTracker.with(e,(e=>{Sie(e,n,"module",YC.createStringLiteral("esnext"))}));r.push(u8("fixModuleOption",t,[va.Set_the_module_option_in_your_configuration_file_to_0,"esnext"]))}const o=wS(t);if(o<4||o>99){const t=r_e.ChangeTracker.with(e,(e=>{if(!Hf(n))return;const t=[["target",YC.createStringLiteral("es2017")]];1===i&&t.push(["module",YC.createStringLiteral("commonjs")]),xie(e,n,t)}));r.push(u8("fixTargetOption",t,[va.Set_the_target_option_in_your_configuration_file_to_0,"es2017"]))}return r.length?r:void 0}});var Tne="fixPropertyAssignment",Cne=[va.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code];function wne(e,t,n){e.replaceNode(t,n,YC.createPropertyAssignment(n.name,n.objectAssignmentInitializer))}function Dne(e,t){return ut(kX(e,t).parent,JN)}f8({errorCodes:Cne,fixIds:[Tne],getCodeActions(e){const{sourceFile:t,span:n}=e,r=Dne(t,n.start),i=r_e.ChangeTracker.with(e,(t=>wne(t,e.sourceFile,r)));return[_8(Tne,i,[va.Change_0_to_1,"=",":"],Tne,[va.Switch_each_misused_0_to_1,"=",":"])]},getAllCodeActions:e=>b8(e,Cne,((e,t)=>wne(e,t.file,Dne(t.file,t.start))))});var Ene="extendsInterfaceBecomesImplements",Pne=[va.Cannot_extend_an_interface_0_Did_you_mean_implements.code];function Nne(e,t){const n=Zf(kX(e,t)).heritageClauses,r=n[0].getFirstToken();return 96===r.kind?{extendsToken:r,heritageClauses:n}:void 0}function Fne(e,t,n,r){if(e.replaceNode(t,n,YC.createToken(119)),2===r.length&&96===r[0].token&&119===r[1].token){const n=r[1].getFirstToken(),i=n.getFullStart();e.replaceRange(t,{pos:i,end:i},YC.createToken(28));const o=t.text;let a=n.end;for(;aFne(e,t,r,i)));return[_8(Ene,o,va.Change_extends_to_implements,Ene,va.Change_all_extended_interfaces_to_implements)]},fixIds:[Ene],getAllCodeActions:e=>b8(e,Pne,((e,t)=>{const n=Nne(t.file,t.start);n&&Fne(e,t.file,n.extendsToken,n.heritageClauses)}))});var Ane="forgottenThisPropertyAccess",Ine=va.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,One=[va.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,va.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,Ine];function Mne(e,t,n){const r=kX(e,t);if(qD(r)||VD(r))return{node:r,className:n===Ine?Zf(r).name.text:void 0}}function Lne(e,t,{node:n,className:r}){MY(n),e.replaceNode(t,n,YC.createPropertyAccessExpression(r?YC.createIdentifier(r):YC.createThis(),n))}f8({errorCodes:One,getCodeActions(e){const{sourceFile:t}=e,n=Mne(t,e.span.start,e.errorCode);if(!n)return;const r=r_e.ChangeTracker.with(e,(e=>Lne(e,t,n)));return[_8(Ane,r,[va.Add_0_to_unresolved_variable,n.className||"this"],Ane,va.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]},fixIds:[Ane],getAllCodeActions:e=>b8(e,One,((t,n)=>{const r=Mne(n.file,n.start,n.code);r&&Lne(t,e.sourceFile,r)}))});var jne="fixInvalidJsxCharacters_expression",Rne="fixInvalidJsxCharacters_htmlEntity",Bne=[va.Unexpected_token_Did_you_mean_or_gt.code,va.Unexpected_token_Did_you_mean_or_rbrace.code];f8({errorCodes:Bne,fixIds:[jne,Rne],getCodeActions(e){const{sourceFile:t,preferences:n,span:r}=e,i=r_e.ChangeTracker.with(e,(e=>zne(e,n,t,r.start,!1))),o=r_e.ChangeTracker.with(e,(e=>zne(e,n,t,r.start,!0)));return[_8(jne,i,va.Wrap_invalid_character_in_an_expression_container,jne,va.Wrap_all_invalid_characters_in_an_expression_container),_8(Rne,o,va.Convert_invalid_character_to_its_html_entity_code,Rne,va.Convert_all_invalid_characters_to_HTML_entity_code)]},getAllCodeActions:e=>b8(e,Bne,((t,n)=>zne(t,e.preferences,n.file,n.start,e.fixId===Rne)))});var Jne={">":">","}":"}"};function zne(e,t,n,r,i){const o=n.getText()[r];if(!function(e){return Le(Jne,e)}(o))return;const a=i?Jne[o]:`{${XY(n,t,o)}}`;e.replaceRangeWithText(n,{pos:r,end:r+1},a)}var $ne="deleteUnmatchedParameter",qne="renameUnmatchedParameter",Vne=[va.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code];function Une(e,t){const n=kX(e,t);if(n.parent&&xF(n.parent)&&qD(n.parent.name)){const e=n.parent,t=Wg(e),r=Ug(e);if(t&&r)return{jsDocHost:t,signature:r,name:n.parent.name,jsDocParameterTag:e}}}f8({fixIds:[$ne,qne],errorCodes:Vne,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=[],i=Une(t,n.start);if(i)return ue(r,function(e,{name:t,jsDocHost:n,jsDocParameterTag:r}){const i=r_e.ChangeTracker.with(e,(t=>t.filterJSDocTags(e.sourceFile,n,(e=>e!==r))));return _8($ne,i,[va.Delete_unused_param_tag_0,t.getText(e.sourceFile)],$ne,va.Delete_all_unused_param_tags)}(e,i)),ue(r,function(e,{name:t,jsDocHost:n,signature:r,jsDocParameterTag:i}){if(!p(r.parameters))return;const o=e.sourceFile,a=ll(r),s=new Set;for(const e of a)xF(e)&&qD(e.name)&&s.add(e.name.escapedText);const c=g(r.parameters,(e=>qD(e.name)&&!s.has(e.name.escapedText)?e.name.getText(o):void 0));if(void 0===c)return;const l=YC.updateJSDocParameterTag(i,i.tagName,YC.createIdentifier(c),i.isBracketed,i.typeExpression,i.isNameFirst,i.comment),u=r_e.ChangeTracker.with(e,(e=>e.replaceJSDocComment(o,n,O(a,(e=>e===i?l:e)))));return u8(qne,u,[va.Rename_param_tag_name_0_to_1,t.getText(o),c])}(e,i)),r},getAllCodeActions:function(e){const t=new Map;return y8(r_e.ChangeTracker.with(e,(n=>{x8(e,Vne,(({file:e,start:n})=>{const r=Une(e,n);r&&t.set(r.signature,ue(t.get(r.signature),r.jsDocParameterTag))})),t.forEach(((t,r)=>{if(e.fixId===$ne){const e=new Set(t);n.filterJSDocTags(r.getSourceFile(),r,(t=>!e.has(t)))}}))})))}});var Kne="fixUnreferenceableDecoratorMetadata";f8({errorCodes:[va.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code],getCodeActions:e=>{const t=function(e,t,n){const r=lt(kX(e,n),qD);if(!r||183!==r.parent.kind)return;const i=t.getTypeChecker().getSymbolAtLocation(r);return S((null==i?void 0:i.declarations)||u,_n(oN,fN,rN))}(e.sourceFile,e.program,e.span.start);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>276===t.kind&&function(e,t,n,r){B2.doChangeNamedToNamespaceOrDefault(t,r,e,n.parent)}(n,e.sourceFile,t,e.program))),r=r_e.ChangeTracker.with(e,(n=>function(e,t,n,r){if(271===n.kind)return void e.insertModifierBefore(t,156,n.name);const i=273===n.kind?n:n.parent.parent;if(i.name&&i.namedBindings)return;const o=r.getTypeChecker();Eg(i,(e=>{if(111551&mx(e.symbol,o).flags)return!0}))||e.insertModifierBefore(t,156,i)}(n,e.sourceFile,t,e.program)));let i;return n.length&&(i=ue(i,u8(Kne,n,va.Convert_named_imports_to_namespace_import))),r.length&&(i=ue(i,u8(Kne,r,va.Use_import_type))),i},fixIds:[Kne]});var Wne="unusedIdentifier",Hne="unusedIdentifier_prefix",Gne="unusedIdentifier_delete",Xne="unusedIdentifier_deleteImports",Qne="unusedIdentifier_infer",Yne=[va._0_is_declared_but_its_value_is_never_read.code,va._0_is_declared_but_never_used.code,va.Property_0_is_declared_but_its_value_is_never_read.code,va.All_imports_in_import_declaration_are_unused.code,va.All_destructured_elements_are_unused.code,va.All_variables_are_unused.code,va.All_type_parameters_are_unused.code];function Zne(e,t,n){e.replaceNode(t,n.parent,YC.createKeywordTypeNode(159))}function ere(e,t){return _8(Wne,e,t,Gne,va.Delete_all_unused_declarations)}function tre(e,t,n){e.delete(t,xn.checkDefined(ut(n.parent,Sp).typeParameters,"The type parameter to delete should exist"))}function nre(e){return 102===e.kind||80===e.kind&&(276===e.parent.kind||273===e.parent.kind)}function rre(e){return 102===e.kind?lt(e.parent,iN):void 0}function ire(e,t){return WP(t.parent)&&Te(t.parent.getChildren(e))===t}function ore(e,t,n){e.delete(t,243===n.parent.kind?n.parent:n)}function are(e,t,n,r){t!==va.Property_0_is_declared_but_its_value_is_never_read.code&&(140===r.kind&&(r=ut(r.parent,OE).typeParameter.name),qD(r)&&function(e){switch(e.parent.kind){case 169:case 168:return!0;case 260:switch(e.parent.parent.parent.kind){case 250:case 249:return!0}}return!1}(r)&&(e.replaceNode(n,r,YC.createIdentifier(`_${r.text}`)),sE(r.parent)&&Oc(r.parent).forEach((t=>{qD(t.name)&&e.replaceNode(n,t.name,YC.createIdentifier(`_${t.name.text}`))}))))}function sre(e,t,n,r,i,o,a,s){!function(e,t,n,r,i,o,a,s){const{parent:c}=e;if(sE(c))!function(e,t,n,r,i,o,a,s=!1){if(function(e,t,n,r,i,o,a){const{parent:s}=n;switch(s.kind){case 174:case 176:const c=s.parameters.indexOf(n),l=dE(s)?s.name:s,u=Rse.Core.getReferencedSymbolsForNode(s.pos,l,i,r,o);if(u)for(const e of u)for(const t of e.references)if(t.kind===Rse.EntryKind.Node){const e=tE(t.node)&&QE(t.node.parent)&&t.node.parent.arguments.length>c,r=GE(t.node.parent)&&tE(t.node.parent.expression)&&QE(t.node.parent.parent)&&t.node.parent.parent.arguments.length>c,i=(dE(t.node.parent)||_E(t.node.parent))&&t.node.parent!==n.parent&&t.node.parent.parameters.length>c;if(e||r||i)return!1}return!0;case 262:return!s.name||!function(e,t,n){return!!Rse.Core.eachSymbolReferenceInFile(n,e,t,(e=>qD(e)&&QE(e.parent)&&e.parent.arguments.includes(e)))}(e,t,s.name)||lre(s,n,a);case 218:case 219:return lre(s,n,a);case 178:return!1;case 177:return!0;default:return xn.failBadSyntaxKind(s)}}(r,t,n,i,o,a,s))if(n.modifiers&&n.modifiers.length>0&&(!qD(n.name)||Rse.Core.isSymbolReferencedInFile(n.name,r,t)))for(const r of n.modifiers)iu(r)&&e.deleteModifier(t,r);else!n.initializer&&cre(n,r,i)&&e.delete(t,n)}(t,n,c,r,i,o,a,s);else if(!(s&&qD(e)&&Rse.Core.isSymbolReferencedInFile(e,r,n))){const r=oN(c)?e:oE(c)?c.parent:c;xn.assert(r!==n,"should not delete whole source file"),t.delete(n,r)}}(t,n,e,r,i,o,a,s),qD(t)&&Rse.Core.eachSymbolReferenceInFile(t,r,e,(t=>{var r;GE(t.parent)&&t.parent.name===t&&(t=t.parent),!s&&(uP((r=t).parent)&&r.parent.left===r||(lP(r.parent)||cP(r.parent))&&r.parent.operand===r)&&NP(r.parent.parent)&&n.delete(e,t.parent.parent)}))}function cre(e,t,n){const r=e.parent.parameters.indexOf(e);return!Rse.Core.someSignatureUsage(e.parent,n,t,((e,t)=>!t||t.arguments.length>r))}function lre(e,t,n){const r=e.parameters,i=r.indexOf(t);return xn.assert(-1!==i,"The parameter should already be in the list"),n?r.slice(i+1).every((e=>qD(e.name)&&!e.symbol.isReferenced)):i===r.length-1}f8({errorCodes:Yne,getCodeActions(e){const{errorCode:t,sourceFile:n,program:r,cancellationToken:i}=e,o=r.getTypeChecker(),a=r.getSourceFiles(),s=kX(n,e.span.start);if(CF(s))return[ere(r_e.ChangeTracker.with(e,(e=>e.delete(n,s))),va.Remove_template_tag)];if(30===s.kind)return[ere(r_e.ChangeTracker.with(e,(e=>tre(e,n,s))),va.Remove_type_parameters)];const c=rre(s);if(c){const t=r_e.ChangeTracker.with(e,(e=>e.delete(n,c)));return[_8(Wne,t,[va.Remove_import_from_0,Px(c)],Xne,va.Delete_all_unused_imports)]}if(nre(s)){const t=r_e.ChangeTracker.with(e,(e=>sre(n,s,e,o,a,r,i,!1)));if(t.length)return[_8(Wne,t,[va.Remove_unused_declaration_for_Colon_0,s.getText(n)],Xne,va.Delete_all_unused_imports)]}if(VE(s.parent)||UE(s.parent)){if(sE(s.parent.parent)){const t=s.parent.elements,r=[t.length>1?va.Remove_unused_declarations_for_Colon_0:va.Remove_unused_declaration_for_Colon_0,O(t,(e=>e.getText(n))).join(", ")];return[ere(r_e.ChangeTracker.with(e,(e=>function(e,t,n){f(n.elements,(n=>e.delete(t,n)))}(e,n,s.parent))),r)]}return[ere(r_e.ChangeTracker.with(e,(t=>function(e,t,n,{parent:r}){if(KP(r)&&r.initializer&&zu(r.initializer))if(WP(r.parent)&&p(r.parent.declarations)>1){const i=r.parent.parent,o=i.getStart(n),a=i.end;t.delete(n,r),t.insertNodeAt(n,a,r.initializer,{prefix:gY(e.host,e.formatContext.options)+n.text.slice(PY(n.text,o-1),o),suffix:lZ(n)?";":""})}else t.replaceNode(n,r.parent,r.initializer);else t.delete(n,r)}(e,t,n,s.parent))),va.Remove_unused_destructuring_declaration)]}if(ire(n,s))return[ere(r_e.ChangeTracker.with(e,(e=>ore(e,n,s.parent))),va.Remove_variable_statement)];if(qD(s)&&HP(s.parent))return[ere(r_e.ChangeTracker.with(e,(e=>function(e,t,n){const r=n.symbol.declarations;if(r)for(const n of r)e.delete(t,n)}(e,n,s.parent))),[va.Remove_unused_declaration_for_Colon_0,s.getText(n)])];const l=[];if(140===s.kind){const t=r_e.ChangeTracker.with(e,(e=>Zne(e,n,s))),r=ut(s.parent,OE).typeParameter.name.text;l.push(_8(Wne,t,[va.Replace_infer_0_with_unknown,r],Qne,va.Replace_all_unused_infer_with_unknown))}else{const t=r_e.ChangeTracker.with(e,(e=>sre(n,s,e,o,a,r,i,!1)));if(t.length){const e=oE(s.parent)?s.parent:s;l.push(ere(t,[va.Remove_unused_declaration_for_Colon_0,e.getText(n)]))}}const u=r_e.ChangeTracker.with(e,(e=>are(e,t,n,s)));return u.length&&l.push(_8(Wne,u,[va.Prefix_0_with_an_underscore,s.getText(n)],Hne,va.Prefix_all_unused_declarations_with_where_possible)),l},fixIds:[Hne,Gne,Xne,Qne],getAllCodeActions:e=>{const{sourceFile:t,program:n,cancellationToken:r}=e,i=n.getTypeChecker(),o=n.getSourceFiles();return b8(e,Yne,((a,s)=>{const c=kX(t,s.start);switch(e.fixId){case Hne:are(a,s.code,t,c);break;case Xne:{const e=rre(c);e?a.delete(t,e):nre(c)&&sre(t,c,a,i,o,n,r,!0);break}case Gne:if(140===c.kind||nre(c))break;if(CF(c))a.delete(t,c);else if(30===c.kind)tre(a,t,c);else if(VE(c.parent)){if(c.parent.parent.initializer)break;sE(c.parent.parent)&&!cre(c.parent.parent,i,o)||a.delete(t,c.parent.parent)}else{if(UE(c.parent.parent)&&c.parent.parent.parent.initializer)break;ire(t,c)?ore(a,t,c.parent):sre(t,c,a,i,o,n,r,!0)}break;case Qne:140===c.kind&&Zne(a,t,c);break;default:xn.fail(JSON.stringify(e.fixId))}}))}});var ure="fixUnreachableCode",_re=[va.Unreachable_code_detected.code];function dre(e,t,n,r,i){const o=kX(t,n),a=mc(o,b_);if(a.getStart(t)!==o.getStart(t)){const e=JSON.stringify({statementKind:xn.formatSyntaxKind(a.kind),tokenKind:xn.formatSyntaxKind(o.kind),errorCode:i,start:n,length:r});xn.fail("Token and statement should start at the same point. "+e)}const s=(DP(a.parent)?a.parent:a).parent;if(!DP(a.parent)||a===Te(a.parent.statements))switch(s.kind){case 245:if(s.elseStatement){if(DP(a.parent))break;return void e.replaceNode(t,a,YC.createBlock(u))}case 247:case 248:return void e.delete(t,s)}if(DP(a.parent)){const i=n+r,o=xn.checkDefined(function(e,t){let n;for(const t of e){if(!(t.posdre(t,e.sourceFile,e.span.start,e.span.length,e.errorCode)));return[_8(ure,t,va.Remove_unreachable_code,ure,va.Remove_all_unreachable_code)]},fixIds:[ure],getAllCodeActions:e=>b8(e,_re,((e,t)=>dre(e,t.file,t.start,t.length,t.code)))});var pre="fixUnusedLabel",fre=[va.Unused_label.code];function mre(e,t,n){const r=kX(t,n),i=ut(r.parent,$P),o=r.getStart(t),a=i.statement.getStart(t),s=ix(o,a,t)?a:as(t.text,uX(i,59,t).end,!0);e.deleteRange(t,{pos:o,end:s})}f8({errorCodes:fre,getCodeActions(e){const t=r_e.ChangeTracker.with(e,(t=>mre(t,e.sourceFile,e.span.start)));return[_8(pre,t,va.Remove_unused_label,pre,va.Remove_all_unused_labels)]},fixIds:[pre],getAllCodeActions:e=>b8(e,fre,((e,t)=>mre(e,t.file,t.start)))});var gre="fixJSDocTypes_plain",hre="fixJSDocTypes_nullable",yre=[va.JSDoc_types_can_only_be_used_inside_documentation_comments.code,va._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code,va._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code];function vre(e,t,n,r,i){e.replaceNode(t,n,i.typeToTypeNode(r,n,void 0))}function bre(e,t,n){const r=mc(kX(e,t),xre),i=r&&r.type;return i&&{typeNode:i,type:Sre(n,i)}}function xre(e){switch(e.kind){case 234:case 179:case 180:case 262:case 177:case 181:case 200:case 174:case 173:case 169:case 172:case 171:case 178:case 265:case 216:case 260:return!0;default:return!1}}function Sre(e,t){if(ZN(t)){const n=e.getTypeFromTypeNode(t.type);return n===e.getNeverType()||n===e.getVoidType()?n:e.getUnionType(ue([n,e.getUndefinedType()],t.postfix?void 0:e.getNullType()))}return e.getTypeFromTypeNode(t)}f8({errorCodes:yre,getCodeActions(e){const{sourceFile:t}=e,n=e.program.getTypeChecker(),r=bre(t,e.span.start,n);if(!r)return;const{typeNode:i,type:o}=r,a=i.getText(t),s=[c(o,gre,va.Change_all_jsdoc_style_types_to_TypeScript)];return 314===i.kind&&s.push(c(o,hre,va.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)),s;function c(r,o,s){return _8("jdocTypes",r_e.ChangeTracker.with(e,(e=>vre(e,t,i,r,n))),[va.Change_0_to_1,a,n.typeToString(r)],o,s)}},fixIds:[gre,hre],getAllCodeActions(e){const{fixId:t,program:n,sourceFile:r}=e,i=n.getTypeChecker();return b8(e,yre,((e,n)=>{const o=bre(n.file,n.start,i);if(!o)return;const{typeNode:a,type:s}=o,c=314===a.kind&&t===hre?i.getNullableType(s,32768):s;vre(e,r,a,c,i)}))}});var kre="fixMissingCallParentheses",Tre=[va.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code];function Cre(e,t,n){e.replaceNodeWithText(t,n,`${n.text}()`)}function wre(e,t){const n=kX(e,t);if(GE(n.parent)){let e=n.parent;for(;GE(e.parent);)e=e.parent;return e.name}if(qD(n))return n}f8({errorCodes:Tre,fixIds:[kre],getCodeActions(e){const{sourceFile:t,span:n}=e,r=wre(t,n.start);if(!r)return;const i=r_e.ChangeTracker.with(e,(t=>Cre(t,e.sourceFile,r)));return[_8(kre,i,va.Add_missing_call_parentheses,kre,va.Add_all_missing_call_parentheses)]},getAllCodeActions:e=>b8(e,Tre,((e,t)=>{const n=wre(t.file,t.start);n&&Cre(e,t.file,n)}))});var Dre="fixMissingTypeAnnotationOnExports",Ere="add-annotation",Pre="add-type-assertion",Nre=[va.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,va.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,va.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,va.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,va.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,va.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,va.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code,va.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code,va.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code,va.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code,va.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code,va.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code,va.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code,va.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code,va.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code,va.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code,va.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code,va.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code,va.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations.code,va.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code,va.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code],Fre=new Set([177,174,172,262,218,219,260,169,277,263,206,207]);function Are(e,t,n,r,i){const o=Ire(n,r,i);o.result&&o.textChanges.length&&t.push(_8(e,o.textChanges,o.result,Dre,va.Add_all_missing_type_annotations))}function Ire(e,t,n){const r={typeNode:void 0,mutatedTarget:!1},i=r_e.ChangeTracker.fromContext(e),o=e.sourceFile,a=e.program,s=a.getTypeChecker(),c=wS(a.getCompilerOptions()),l=$9(e.sourceFile,e.program,e.preferences,e.host),u=new Set,_=new Set,d=rq({preserveSourceNewlines:!1}),p=n({addTypeAnnotation:function(t){e.cancellationToken.throwIfCancellationRequested();const n=kX(o,t.start),r=g(n);if(r)return HP(r)?function(e){var t;if(null==_?void 0:_.has(e))return;null==_||_.add(e);const n=s.getTypeAtLocation(e),r=s.getPropertiesOfType(n);if(!e.name||0===r.length)return;const c=[];for(const t of r)Ts(t.name,wS(a.getCompilerOptions()))&&(t.valueDeclaration&&KP(t.valueDeclaration)||c.push(YC.createVariableStatement([YC.createModifier(95)],YC.createVariableDeclarationList([YC.createVariableDeclaration(t.name,void 0,w(s.getTypeOfSymbol(t),e),void 0)]))));if(0===c.length)return;const l=[];(null==(t=e.modifiers)?void 0:t.some((e=>95===e.kind)))&&l.push(YC.createModifier(95)),l.push(YC.createModifier(138));const u=YC.createModuleDeclaration(l,e.name,YC.createModuleBlock(c),101441696);return i.insertNodeAfter(o,e,u),[va.Annotate_types_of_properties_expando_function_in_a_namespace]}(r):h(r);const c=mc(n,(e=>Fre.has(e.kind)&&(!VE(e)&&!UE(e)||KP(e.parent))));return c?h(c):void 0},addInlineAssertion:function(t){e.cancellationToken.throwIfCancellationRequested();const n=kX(o,t.start);if(g(n))return;const r=E(n,t);if(!r||rh(r)||rh(r.parent))return;const a=Xu(r),c=JN(r);if(!c&&h_(r))return;if(mc(r,Eu))return;if(mc(r,$N))return;if(a&&(mc(r,jN)||mc(r,wu)))return;if(fP(r))return;const l=mc(r,KP),u=l&&s.getTypeAtLocation(l);if(u&&8192&u.flags)return;if(!a&&!c)return;const{typeNode:_,mutatedTarget:d}=x(r,u);return _&&!d?(c?i.insertNodeAt(o,r.end,m(NY(r.name),_),{prefix:": "}):a?i.replaceNode(o,r,function(e,t){return f(e)&&(e=YC.createParenthesizedExpression(e)),YC.createAsExpression(YC.createSatisfiesExpression(e,NY(t)),t)}(NY(r),_)):xn.assertNever(r),[va.Add_satisfies_and_an_inline_type_assertion_with_0,D(_)]):void 0},extractAsVariable:function(t){e.cancellationToken.throwIfCancellationRequested();const n=E(kX(o,t.start),t);if(!n||rh(n)||rh(n.parent))return;if(!Xu(n))return;if(WE(n))return i.replaceNode(o,n,m(n,YC.createTypeReferenceNode("const"))),[va.Mark_array_literal_as_const];const r=mc(n,BN);if(r){if(r===n.parent&&vb(n))return;const e=YC.createUniqueName(n3(n,o,s,o),16);let t=n,a=n;if(fP(t)&&(t=ah(t.parent),a=T(t.parent)?t=t.parent:m(t,YC.createTypeReferenceNode("const"))),vb(t))return;const c=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(e,void 0,void 0,a)],2)),l=mc(n,b_);return i.insertNodeBefore(o,l,c),i.replaceNode(o,t,YC.createAsExpression(YC.cloneNode(e),YC.createTypeQueryNode(YC.cloneNode(e)))),[va.Extract_to_variable_and_replace_with_0_as_typeof_0,D(e)]}}});return l.writeFixes(i),{result:p,textChanges:i.getChanges()};function f(e){return!(vb(e)||QE(e)||HE(e)||WE(e))}function m(e,t){return f(e)&&(e=YC.createParenthesizedExpression(e)),YC.createAsExpression(e,t)}function g(e){const t=mc(e,(e=>b_(e)?"quit":hC(e)));if(t&&hC(t)){let e=t;if(uP(e)&&(e=e.left,!hC(e)))return;const n=s.getTypeAtLocation(e.expression);if(!n)return;if(Q(s.getPropertiesOfType(n),(e=>e.valueDeclaration===t||e.valueDeclaration===t.parent))){const e=n.symbol.valueDeclaration;if(e){if(UT(e)&&KP(e.parent))return e.parent;if(HP(e))return e}}}}function h(e){if(!(null==u?void 0:u.has(e)))switch(null==u||u.add(e),e.kind){case 169:case 172:case 260:return function(e){const{typeNode:t}=x(e);if(t)return e.type?i.replaceNode(Sd(e),e.type,t):i.tryInsertTypeAnnotation(Sd(e),e,t),[va.Add_annotation_of_type_0,D(t)]}(e);case 219:case 218:case 262:case 174:case 177:return function(e,t){if(e.type)return;const{typeNode:n}=x(e);return n?(i.tryInsertTypeAnnotation(t,e,n),[va.Add_return_type_0,D(n)]):void 0}(e,o);case 277:return function(e){if(e.isExportEquals)return;const{typeNode:t}=x(e.expression);if(!t)return;const n=YC.createUniqueName("_default");return i.replaceNodeWithNodes(o,e,[YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(n,void 0,t,e.expression)],2)),YC.updateExportAssignment(e,null==e?void 0:e.modifiers,n)]),[va.Extract_default_export_to_variable]}(e);case 263:return function(e){var t,n;const r=null==(t=e.heritageClauses)?void 0:t.find((e=>96===e.token)),a=null==r?void 0:r.types[0];if(!a)return;const{typeNode:s}=x(a.expression);if(!s)return;const c=YC.createUniqueName(e.name?e.name.text+"Base":"Anonymous",16),l=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(c,void 0,s,a.expression)],2));i.insertNodeBefore(o,e,l);const u=bs(o.text,a.end),_=(null==(n=null==u?void 0:u[u.length-1])?void 0:n.end)??a.end;return i.replaceRange(o,{pos:a.getFullStart(),end:_},c,{prefix:" "}),[va.Extract_base_class_to_variable]}(e);case 206:case 207:return function(e){var t;const n=e.parent,r=e.parent.parent.parent;if(!n.initializer)return;let a;const s=[];if(qD(n.initializer))a={expression:{kind:3,identifier:n.initializer}};else{const e=YC.createUniqueName("dest",16);a={expression:{kind:3,identifier:e}},s.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(e,void 0,void 0,n.initializer)],2)))}const c=[];UE(e)?y(e,c,a):v(e,c,a);const l=new Map;for(const e of c){if(e.element.propertyName&&oE(e.element.propertyName)){const t=e.element.propertyName.expression,n=YC.getGeneratedNameForNode(t),r=YC.createVariableDeclaration(n,void 0,void 0,t),i=YC.createVariableDeclarationList([r],2),o=YC.createVariableStatement(void 0,i);s.push(o),l.set(t,n)}const n=e.element.name;if(UE(n))y(n,c,e);else if(VE(n))v(n,c,e);else{const{typeNode:i}=x(n);let o=b(e,l);if(e.element.initializer){const n=null==(t=e.element)?void 0:t.propertyName,r=YC.createUniqueName(n&&qD(n)?n.text:"temp",16);s.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(r,void 0,void 0,o)],2))),o=YC.createConditionalExpression(YC.createBinaryExpression(r,YC.createToken(37),YC.createIdentifier("undefined")),YC.createToken(58),e.element.initializer,YC.createToken(59),o)}const a=Bv(r,32)?[YC.createToken(95)]:void 0;s.push(YC.createVariableStatement(a,YC.createVariableDeclarationList([YC.createVariableDeclaration(n,void 0,i,o)],2)))}}return r.declarationList.declarations.length>1&&s.push(YC.updateVariableStatement(r,r.modifiers,YC.updateVariableDeclarationList(r.declarationList,r.declarationList.declarations.filter((t=>t!==e.parent))))),i.replaceNodeWithNodes(o,r,s),[va.Extract_binding_expressions_to_variable]}(e);default:throw new Error(`Cannot find a fix for the given node ${e.kind}`)}}function y(e,t,n){for(let r=0;r=0;--e){const i=n[e].expression;0===i.kind?r=YC.createPropertyAccessChain(r,void 0,YC.createIdentifier(i.text)):1===i.kind?r=YC.createElementAccessExpression(r,t.get(i.computed)):2===i.kind&&(r=YC.createElementAccessExpression(r,i.arrayIndex))}return r}function x(e,n){if(1===t)return C(e);let i=rh(e)?function(e){const t=s.getSignatureFromDeclaration(e);if(t)return s.getReturnTypeOfSignature(t)}(e):s.getTypeAtLocation(e);if(!i)return r;if(2===t){n&&(i=n);const e=s.getWidenedLiteralType(i);if(s.isTypeAssignableTo(e,i))return r;i=e}sE(e)&&s.requiresAddingImplicitUndefined(e)&&(i=s.getUnionType([s.getUndefinedType(),i],0));const a=(KP(e)||uE(e)&&Bv(e,264))&&8192&i.flags?1048576:0;return{typeNode:w(i,mc(e,h_)??o,a),mutatedTarget:!1}}function S(e){return YC.createTypeQueryNode(NY(e))}function k(e,t,n,a,s,c,l,u){const _=[],d=[];let p;const f=mc(e,b_);for(const t of a(e))s(t)?(g(),vb(t.expression)?(_.push(S(t.expression)),d.push(t)):m(t.expression)):(p??(p=[])).push(t);return 0===d.length?r:(g(),i.replaceNode(o,e,l(d)),{typeNode:u(_),mutatedTarget:!0});function m(e){const r=YC.createUniqueName(t+"_Part"+(d.length+1),16),a=n?YC.createAsExpression(e,YC.createTypeReferenceNode("const")):e,s=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(r,void 0,void 0,a)],2));i.insertNodeBefore(o,f,s),_.push(S(r)),d.push(c(r))}function g(){p&&(m(l(p)),p=void 0)}}function T(e){return Qu(e)&&Dl(e.type)}function C(e){if(sE(e))return r;if(JN(e))return{typeNode:S(e.name),mutatedTarget:!1};if(vb(e))return{typeNode:S(e),mutatedTarget:!1};if(T(e))return C(e.expression);if(WE(e)){const t=mc(e,KP);return function(e,t="temp"){const n=!!mc(e,T);return n?k(e,t,n,(e=>e.elements),fP,YC.createSpreadElement,(e=>YC.createArrayLiteralExpression(e,!0)),(e=>YC.createTupleTypeNode(e.map(YC.createRestTypeNode)))):r}(e,t&&qD(t.name)?t.name.text:void 0)}if(HE(e)){const t=mc(e,KP);return function(e,t="temp"){return k(e,t,!!mc(e,T),(e=>e.properties),zN,YC.createSpreadAssignment,(e=>YC.createObjectLiteralExpression(e,!0)),YC.createIntersectionTypeNode)}(e,t&&qD(t.name)?t.name.text:void 0)}if(KP(e)&&e.initializer)return C(e.initializer);if(_P(e)){const{typeNode:t,mutatedTarget:n}=C(e.whenTrue);if(!t)return r;const{typeNode:i,mutatedTarget:o}=C(e.whenFalse);return i?{typeNode:YC.createUnionTypeNode([t,i]),mutatedTarget:n||o}:r}return r}function w(e,t,n=0){let r=!1;const i=fie(s,l,e,t,c,1074273293|n,{moduleResolverHost:a,trackSymbol:()=>!0,reportTruncationError(){r=!0}});return r?YC.createKeywordTypeNode(133):i}function D(e){iw(e,1);const t=d.printNode(4,e,o);return t.length>X_?t.substring(0,X_-"...".length)+"...":(iw(e,0),t)}function E(e,t){for(;e&&e.endt.addTypeAnnotation(e.span))),Are(Ere,t,e,1,(t=>t.addTypeAnnotation(e.span))),Are(Ere,t,e,2,(t=>t.addTypeAnnotation(e.span))),Are(Pre,t,e,0,(t=>t.addInlineAssertion(e.span))),Are(Pre,t,e,1,(t=>t.addInlineAssertion(e.span))),Are(Pre,t,e,2,(t=>t.addInlineAssertion(e.span))),Are("extract-expression",t,e,0,(t=>t.extractAsVariable(e.span))),t},getAllCodeActions:e=>y8(Ire(e,0,(t=>{x8(e,Nre,(e=>{t.addTypeAnnotation(e)}))})).textChanges)});var Ore="fixAwaitInSyncFunction",Mre=[va.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code];function Lre(e,t){const n=Qf(kX(e,t));if(!n)return;let r;switch(n.kind){case 174:r=n.name;break;case 262:case 218:r=uX(n,100,e);break;case 219:r=uX(n,n.typeParameters?30:21,e)||Te(n.parameters);break;default:return}return r&&{insertBefore:r,returnType:(i=n,i.type?i.type:KP(i.parent)&&i.parent.type&&SE(i.parent.type)?i.parent.type.type:void 0)};var i}function jre(e,t,{insertBefore:n,returnType:r}){if(r){const n=fm(r);n&&80===n.kind&&"Promise"===n.text||e.replaceNode(t,r,YC.createTypeReferenceNode("Promise",YC.createNodeArray([r])))}e.insertModifierBefore(t,134,n)}f8({errorCodes:Mre,getCodeActions(e){const{sourceFile:t,span:n}=e,r=Lre(t,n.start);if(!r)return;const i=r_e.ChangeTracker.with(e,(e=>jre(e,t,r)));return[_8(Ore,i,va.Add_async_modifier_to_containing_function,Ore,va.Add_all_missing_async_modifiers)]},fixIds:[Ore],getAllCodeActions:function(e){const t=new Map;return b8(e,Mre,((n,r)=>{const i=Lre(r.file,r.start);i&&Fx(t,IB(i.insertBefore))&&jre(n,e.sourceFile,i)}))}});var Rre=[va._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,va._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code],Bre="fixPropertyOverrideAccessor";function Jre(e,t,n,r,i){let o,a;if(r===va._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code)o=t,a=t+n;else if(r===va._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code){const n=i.program.getTypeChecker(),r=kX(e,t).parent;xn.assert(hu(r),"error span of fixPropertyOverrideAccessor should only be on an accessor");const s=r.parent;xn.assert(gu(s),"erroneous accessors should only be inside classes");const c=Ee(Lie(s,n));if(!c)return[];const l=vc(Lp(r.name)),u=n.getPropertyOfType(n.getTypeAtLocation(c),l);if(!u||!u.valueDeclaration)return[];o=u.valueDeclaration.pos,a=u.valueDeclaration.end,e=Sd(u.valueDeclaration)}else xn.fail("fixPropertyOverrideAccessor codefix got unexpected error code "+r);return Pie(e,i.program,o,a,i,va.Generate_get_and_set_accessors.message)}f8({errorCodes:Rre,getCodeActions(e){const t=Jre(e.sourceFile,e.span.start,e.span.length,e.errorCode,e);if(t)return[_8(Bre,t,va.Generate_get_and_set_accessors,Bre,va.Generate_get_and_set_accessors_for_all_overriding_properties)]},fixIds:[Bre],getAllCodeActions:e=>b8(e,Rre,((t,n)=>{const r=Jre(n.file,n.start,n.length,n.code,e);if(r)for(const n of r)t.pushRaw(e.sourceFile,n)}))});var zre="inferFromUsage",$re=[va.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,va.Variable_0_implicitly_has_an_1_type.code,va.Parameter_0_implicitly_has_an_1_type.code,va.Rest_parameter_0_implicitly_has_an_any_type.code,va.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,va._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,va.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,va.Member_0_implicitly_has_an_1_type.code,va.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,va.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,va.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,va.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,va.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,va._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,va.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,va.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function qre(e,t){switch(e){case va.Parameter_0_implicitly_has_an_1_type.code:case va.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return gE(Qf(t))?va.Infer_type_of_0_from_usage:va.Infer_parameter_types_from_usage;case va.Rest_parameter_0_implicitly_has_an_any_type.code:case va.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Infer_parameter_types_from_usage;case va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:return va.Infer_this_type_of_0_from_usage;default:return va.Infer_type_of_0_from_usage}}function Vre(e,t,n,r,i,o,a,s,c){if(!nu(n.kind)&&80!==n.kind&&26!==n.kind&&110!==n.kind)return;const{parent:l}=n,u=$9(t,i,c,s);switch(r=function(e){switch(e){case va.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:return va.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;case va.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Variable_0_implicitly_has_an_1_type.code;case va.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Parameter_0_implicitly_has_an_1_type.code;case va.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Rest_parameter_0_implicitly_has_an_any_type.code;case va.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:return va.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;case va._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:return va._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;case va.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:return va.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;case va.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Member_0_implicitly_has_an_1_type.code}return e}(r)){case va.Member_0_implicitly_has_an_1_type.code:case va.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:if(KP(l)&&a(l)||uE(l)||lE(l))return Ure(e,u,t,l,i,s,o),u.writeFixes(e),l;if(GE(l)){const n=nZ(Xre(l.name,i,o),l,i,s);if(n){const r=YC.createJSDocTypeTag(void 0,YC.createJSDocTypeExpression(n),void 0);e.addJSDocTags(t,ut(l.parent.parent,NP),[r])}return u.writeFixes(e),l}return;case va.Variable_0_implicitly_has_an_1_type.code:{const t=i.getTypeChecker().getSymbolAtLocation(n);return t&&t.valueDeclaration&&KP(t.valueDeclaration)&&a(t.valueDeclaration)?(Ure(e,u,Sd(t.valueDeclaration),t.valueDeclaration,i,s,o),u.writeFixes(e),t.valueDeclaration):void 0}}const _=Qf(n);if(void 0===_)return;let d;switch(r){case va.Parameter_0_implicitly_has_an_1_type.code:if(gE(_)){Kre(e,u,t,_,i,s,o),d=_;break}case va.Rest_parameter_0_implicitly_has_an_any_type.code:if(a(_)){const n=ut(l,sE);!function(e,t,n,r,i,o,a,s){if(!qD(r.name))return;const c=function(e,t,n,r){const i=Qre(e,t,n,r);return i&&Yre(n,i,r).parameters(e)||e.parameters.map((e=>({declaration:e,type:qD(e.name)?Xre(e.name,n,r):n.getTypeChecker().getAnyType()})))}(i,n,o,s);if(xn.assert(i.parameters.length===c.length,"Parameter count and inference count should match"),Mm(i))Hre(e,n,c,o,a);else{const r=rP(i)&&!uX(i,21,n);r&&e.insertNodeBefore(n,Te(i.parameters),YC.createToken(21));for(const{declaration:r,type:i}of c)!r||r.type||r.initializer||Wre(e,t,n,r,i,o,a);r&&e.insertNodeAfter(n,De(i.parameters),YC.createToken(22))}}(e,u,t,n,_,i,s,o),d=n}break;case va.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:case va._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:mE(_)&&qD(_.name)&&(Wre(e,u,t,_,Xre(_.name,i,o),i,s),d=_);break;case va.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:gE(_)&&(Kre(e,u,t,_,i,s,o),d=_);break;case va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:r_e.isThisTypeAnnotatable(_)&&a(_)&&(function(e,t,n,r,i,o){const a=Qre(n,t,r,o);if(!a||!a.length)return;const s=nZ(Yre(r,a,o).thisParameter(),n,r,i);s&&(Mm(n)?function(e,t,n,r){e.addJSDocTags(t,n,[YC.createJSDocThisTag(void 0,YC.createJSDocTypeExpression(r))])}(e,t,n,s):e.tryInsertThisTypeAnnotation(t,n,s))}(e,t,_,i,s,o),d=_);break;default:return xn.fail(String(r))}return u.writeFixes(e),d}function Ure(e,t,n,r,i,o,a){qD(r.name)&&Wre(e,t,n,r,Xre(r.name,i,a),i,o)}function Kre(e,t,n,r,i,o,a){const s=Se(r.parameters);if(s&&qD(r.name)&&qD(s.name)){let c=Xre(r.name,i,a);c===i.getTypeChecker().getAnyType()&&(c=Xre(s.name,i,a)),Mm(r)?Hre(e,n,[{declaration:s,type:c}],i,o):Wre(e,t,n,s,c,i,o)}}function Wre(e,t,n,r,i,o,a){const s=nZ(i,r,o,a);if(s)if(Mm(n)&&171!==r.kind){const t=KP(r)?lt(r.parent.parent,EP):r;if(!t)return;const i=YC.createJSDocTypeExpression(s),o=mE(r)?YC.createJSDocReturnTag(void 0,i,void 0):YC.createJSDocTypeTag(void 0,i,void 0);e.addJSDocTags(n,t,[o])}else(function(e,t,n,r,i,o){const a=Cie(e,o);return!(!a||!r.tryInsertTypeAnnotation(n,t,a.typeNode))&&(f(a.symbols,(e=>i.addImportFromExportedSymbol(e,!0))),!0)})(s,r,n,e,t,wS(o.getCompilerOptions()))||e.tryInsertTypeAnnotation(n,r,s)}function Hre(e,t,n,r,i){const o=n.length&&n[0].declaration.parent;if(!o)return;const a=q(n,(e=>{const t=e.declaration;if(t.initializer||al(t)||!qD(t.name))return;const n=e.type&&nZ(e.type,t,r,i);return n?(iw(YC.cloneNode(t.name),7168),{name:YC.cloneNode(t.name),param:t,isOptional:!!e.isOptional,typeNode:n}):void 0}));if(a.length)if(rP(o)||nP(o)){const n=rP(o)&&!uX(o,21,t);n&&e.insertNodeBefore(t,Te(o.parameters),YC.createToken(21)),f(a,(({typeNode:n,param:r})=>{const i=YC.createJSDocTypeTag(void 0,YC.createJSDocTypeExpression(n)),o=YC.createJSDocComment(void 0,[i]);e.insertNodeAt(t,r.getStart(t),o,{suffix:" "})})),n&&e.insertNodeAfter(t,De(o.parameters),YC.createToken(22))}else{const n=O(a,(({name:e,typeNode:t,isOptional:n})=>YC.createJSDocParameterTag(void 0,e,!!n,YC.createJSDocTypeExpression(t),!1,void 0)));e.addJSDocTags(t,o,n)}}function Gre(e,t,n){return q(Rse.getReferenceEntriesForNode(-1,e,t,t.getSourceFiles(),n),(e=>e.kind!==Rse.EntryKind.Span?lt(e.node,qD):void 0))}function Xre(e,t,n){return Yre(t,Gre(e,t,n),n).single()}function Qre(e,t,n,r){let i;switch(e.kind){case 176:i=uX(e,137,t);break;case 219:case 218:const n=e.parent;i=(KP(n)||uE(n))&&qD(n.name)?n.name:e.name;break;case 262:case 174:case 173:i=e.name}if(i)return Gre(i,n,r)}function Yre(e,t,n){const r=e.getTypeChecker(),i={string:()=>r.getStringType(),number:()=>r.getNumberType(),Array:e=>r.createArrayType(e),Promise:e=>r.createPromiseType(e)},o=[r.getStringType(),r.getNumberType(),r.createArrayType(r.getAnyType()),r.createPromiseType(r.getAnyType())];return{single:function(){return d(s(t))},parameters:function(i){if(0===t.length||!i.parameters)return;const o={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};for(const e of t)n.throwIfCancellationRequested(),c(e,o);const a=[...o.constructs||[],...o.calls||[]];return i.parameters.map(((t,o)=>{const c=[],l=U_(t);let u=!1;for(const e of a)if(e.argumentTypes.length<=o)u=Mm(i),c.push(r.getUndefinedType());else if(l)for(let t=o;t{t.has(n)||t.set(n,[]),t.get(n).push(e)}));const n=new Map;return t.forEach(((e,t)=>{n.set(t,a(e))})),{isNumber:e.some((e=>e.isNumber)),isString:e.some((e=>e.isString)),isNumberOrString:e.some((e=>e.isNumberOrString)),candidateTypes:R(e,(e=>e.candidateTypes)),properties:n,calls:R(e,(e=>e.calls)),constructs:R(e,(e=>e.constructs)),numberIndex:f(e,(e=>e.numberIndex)),stringIndex:f(e,(e=>e.stringIndex)),candidateThisTypes:R(e,(e=>e.candidateThisTypes)),inferredTypes:void 0}}function s(e){const t={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};for(const r of e)n.throwIfCancellationRequested(),c(r,t);return m(t)}function c(e,t){for(;Cb(e);)e=e.parent;switch(e.parent.kind){case 244:!function(e,t){v(t,QE(e)?r.getVoidType():r.getAnyType())}(e,t);break;case 225:t.isNumber=!0;break;case 224:!function(e,t){switch(e.operator){case 46:case 47:case 41:case 55:t.isNumber=!0;break;case 40:t.isNumberOrString=!0}}(e.parent,t);break;case 226:!function(e,t,n){switch(t.operatorToken.kind){case 43:case 42:case 44:case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 66:case 68:case 67:case 69:case 70:case 74:case 75:case 79:case 71:case 73:case 72:case 41:case 30:case 33:case 32:case 34:const i=r.getTypeAtLocation(t.left===e?t.right:t.left);1056&i.flags?v(n,i):n.isNumber=!0;break;case 65:case 40:const o=r.getTypeAtLocation(t.left===e?t.right:t.left);1056&o.flags?v(n,o):296&o.flags?n.isNumber=!0:402653316&o.flags?n.isString=!0:1&o.flags||(n.isNumberOrString=!0);break;case 64:case 35:case 37:case 38:case 36:case 77:case 78:case 76:v(n,r.getTypeAtLocation(t.left===e?t.right:t.left));break;case 103:e===t.left&&(n.isString=!0);break;case 57:case 61:e!==t.left||260!==e.parent.parent.kind&&!mb(e.parent.parent,!0)||v(n,r.getTypeAtLocation(t.right))}}(e,e.parent,t);break;case 296:case 297:!function(e,t){v(t,r.getTypeAtLocation(e.parent.parent.expression))}(e.parent,t);break;case 213:case 214:e.parent.expression===e?function(e,t){const n={argumentTypes:[],return_:{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0}};if(e.arguments)for(const t of e.arguments)n.argumentTypes.push(r.getTypeAtLocation(t));c(e,n.return_),213===e.kind?(t.calls||(t.calls=[])).push(n):(t.constructs||(t.constructs=[])).push(n)}(e.parent,t):l(e,t);break;case 211:!function(e,t){const n=yc(e.name.text);t.properties||(t.properties=new Map);const r=t.properties.get(n)||{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};c(e,r),t.properties.set(n,r)}(e.parent,t);break;case 212:!function(e,t,n){if(t!==e.argumentExpression){const t=r.getTypeAtLocation(e.argumentExpression),i={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};c(e,i),296&t.flags?n.numberIndex=i:n.stringIndex=i}else n.isNumberOrString=!0}(e.parent,e,t);break;case 303:case 304:!function(e,t){const n=KP(e.parent.parent)?e.parent.parent:e.parent;b(t,r.getTypeAtLocation(n))}(e.parent,t);break;case 172:!function(e,t){b(t,r.getTypeAtLocation(e.parent))}(e.parent,t);break;case 260:{const{name:n,initializer:i}=e.parent;if(e===n){i&&v(t,r.getTypeAtLocation(i));break}}default:return l(e,t)}}function l(e,t){Tm(e)&&v(t,r.getContextualType(e))}function _(e){return d(m(e))}function d(e){if(!e.length)return r.getAnyType();const t=r.getUnionType([r.getStringType(),r.getNumberType()]);let n=function(e,t){const n=[];for(const r of e)for(const{high:e,low:i}of t)e(r)&&(xn.assert(!i(r),"Priority can't have both low and high"),n.push(i));return e.filter((e=>n.every((t=>!t(e)))))}(e,[{high:e=>e===r.getStringType()||e===r.getNumberType(),low:e=>e===t},{high:e=>!(16385&e.flags),low:e=>!!(16385&e.flags)},{high:e=>!(114689&e.flags||16&wx(e)),low:e=>!!(16&wx(e))}]);const i=n.filter((e=>16&wx(e)));return i.length&&(n=n.filter((e=>!(16&wx(e)))),n.push(function(e){if(1===e.length)return e[0];const t=[],n=[],i=[],o=[];let a=!1,s=!1;const c=et();for(const l of e){for(const e of r.getPropertiesOfType(l))c.add(e.escapedName,e.valueDeclaration?r.getTypeOfSymbolAtLocation(e,e.valueDeclaration):r.getAnyType());t.push(...r.getSignaturesOfType(l,0)),n.push(...r.getSignaturesOfType(l,1));const e=r.getIndexInfoOfType(l,0);e&&(i.push(e.type),a=a||e.isReadonly);const u=r.getIndexInfoOfType(l,1);u&&(o.push(u.type),s=s||u.isReadonly)}const l=X(c,((t,n)=>{const i=n.lengthr.getBaseTypeOfLiteralType(e))),l=(null==(a=e.calls)?void 0:a.length)?g(e):void 0;return l&&c?s.push(r.getUnionType([l,...c],2)):(l&&s.push(l),p(c)&&s.push(...c)),s.push(...function(e){if(!e.properties||!e.properties.size)return[];const t=o.filter((t=>function(e,t){return!!t.properties&&!ld(t.properties,((t,n)=>{const i=r.getTypeOfPropertyOfType(e,n);return!i||(t.calls?!r.getSignaturesOfType(i,0).length||!r.isTypeAssignableTo(i,(o=t.calls,r.createAnonymousType(void 0,ed(),[y(o)],u,u))):!r.isTypeAssignableTo(i,_(t)));var o}))}(t,e)));return 0function(e,t){if(!(4&wx(e)&&t.properties))return e;const n=e.target,o=Ee(n.typeParameters);if(!o)return e;const a=[];return t.properties.forEach(((e,t)=>{const i=r.getTypeOfPropertyOfType(n,t);xn.assert(!!i,"generic should have all the properties of its reference."),a.push(...h(i,_(e),o))})),i[e.symbol.escapedName](d(a))}(t,e))):[]}(e)),s}function g(e){const t=new Map;e.properties&&e.properties.forEach(((e,n)=>{const i=r.createSymbol(4,n);i.links.type=_(e),t.set(n,i)}));const n=e.calls?[y(e.calls)]:[],i=e.constructs?[y(e.constructs)]:[],o=e.stringIndex?[r.createIndexInfo(r.getStringType(),_(e.stringIndex),!1)]:[];return r.createAnonymousType(void 0,t,n,i,o)}function h(e,t,n){if(e===n)return[t];if(3145728&e.flags)return R(e.types,(e=>h(e,t,n)));if(4&wx(e)&&4&wx(t)){const i=r.getTypeArguments(e),o=r.getTypeArguments(t),a=[];if(i&&o)for(let e=0;ee.argumentTypes.length)));for(let i=0;ie.argumentTypes[i]||r.getUndefinedType()))),e.some((e=>void 0===e.argumentTypes[i]))&&(n.flags|=16777216),t.push(n)}const i=_(a(e.map((e=>e.return_))));return r.createSignature(void 0,void 0,void 0,t,i,void 0,n,0)}function v(e,t){!t||1&t.flags||131072&t.flags||(e.candidateTypes||(e.candidateTypes=[])).push(t)}function b(e,t){!t||1&t.flags||131072&t.flags||(e.candidateThisTypes||(e.candidateThisTypes=[])).push(t)}}f8({errorCodes:$re,getCodeActions(e){const{sourceFile:t,program:n,span:{start:r},errorCode:i,cancellationToken:o,host:a,preferences:s}=e,c=kX(t,r);let l;const u=r_e.ChangeTracker.with(e,(e=>{l=Vre(e,t,c,i,n,o,pt,a,s)})),_=l&&Pc(l);return _&&0!==u.length?[_8(zre,u,[qre(i,c),Gd(_)],zre,va.Infer_all_types_from_usage)]:void 0},fixIds:[zre],getAllCodeActions(e){const{sourceFile:t,program:n,cancellationToken:r,host:i,preferences:o}=e,a=hQ();return b8(e,$re,((e,s)=>{Vre(e,t,kX(s.file,s.start),s.code,n,r,a,i,o)}))}});var Zre="fixReturnTypeInAsyncFunction",eie=[va.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code];function tie(e,t,n){if(Mm(e))return;const r=mc(kX(e,n),uu),i=null==r?void 0:r.type;if(!i)return;const o=t.getTypeFromTypeNode(i),a=t.getAwaitedType(o)||t.getVoidType(),s=t.typeToTypeNode(a,i,void 0);return s?{returnTypeNode:i,returnType:o,promisedTypeNode:s,promisedType:a}:void 0}function nie(e,t,n,r){e.replaceNode(t,n,YC.createTypeReferenceNode("Promise",[r]))}f8({errorCodes:eie,fixIds:[Zre],getCodeActions:function(e){const{sourceFile:t,program:n,span:r}=e,i=n.getTypeChecker(),o=tie(t,n.getTypeChecker(),r.start);if(!o)return;const{returnTypeNode:a,returnType:s,promisedTypeNode:c,promisedType:l}=o,u=r_e.ChangeTracker.with(e,(e=>nie(e,t,a,c)));return[_8(Zre,u,[va.Replace_0_with_Promise_1,i.typeToString(s),i.typeToString(l)],Zre,va.Fix_all_incorrect_return_type_of_an_async_functions)]},getAllCodeActions:e=>b8(e,eie,((t,n)=>{const r=tie(n.file,e.program.getTypeChecker(),n.start);r&&nie(t,n.file,r.returnTypeNode,r.promisedTypeNode)}))});var rie="disableJsDiagnostics",iie="disableJsDiagnostics",oie=q(Object.keys(va),(e=>{const t=va[e];return 1===t.category?t.code:void 0}));function aie(e,t,n,r){const{line:i}=Xa(t,n);r&&!W(r,i)||e.insertCommentBeforeLine(t,i,n," @ts-ignore")}function sie(e,t,n,r,i,o,a){const s=e.symbol.members;for(const c of t)s.has(c.escapedName)||uie(c,e,n,r,i,o,a,void 0)}function cie(e){return{trackSymbol:()=>!1,moduleResolverHost:wQ(e.program,e.host)}}f8({errorCodes:oie,getCodeActions:function(e){const{sourceFile:t,program:n,span:r,host:i,formatContext:o}=e;if(!Mm(t)||!uT(t,n.getCompilerOptions()))return;const a=t.checkJsDirective?"":gY(i,o.options),s=[u8(rie,[v8(t.fileName,[dQ(t.checkJsDirective?Xs(t.checkJsDirective.pos,t.checkJsDirective.end):Gs(0,0),`// @ts-nocheck${a}`)])],va.Disable_checking_for_this_file)];return r_e.isValidLocationToAddComment(t,r.start)&&s.unshift(_8(rie,r_e.ChangeTracker.with(e,(e=>aie(e,t,r.start))),va.Ignore_this_error_message,iie,va.Add_ts_ignore_to_all_error_messages)),s},fixIds:[iie],getAllCodeActions:e=>{const t=new Set;return b8(e,oie,((e,n)=>{r_e.isValidLocationToAddComment(n.file,n.start)&&aie(e,n.file,n.start,t)}))}});var lie=(e=>(e[e.Method=1]="Method",e[e.Property=2]="Property",e[e.All=3]="All",e))(lie||{});function uie(e,t,n,r,i,o,a,s,c=3,l=!1){const _=e.getDeclarations(),d=Se(_),f=r.program.getTypeChecker(),m=wS(r.program.getCompilerOptions()),g=(null==d?void 0:d.kind)??171,h=function(e,t){if(262144&px(e)){const t=e.links.nameType;if(t&&mC(t))return YC.createIdentifier(vc(gC(t)))}return NY(Pc(t),!1)}(e,d),y=d?Qv(d):0;let v=256&y;v|=1&y?1:4&y?4:0,d&&yu(d)&&(v|=512);const b=function(){let e;return v&&(e=_e(e,YC.createModifiersFromModifierFlags(v))),r.program.getCompilerOptions().noImplicitOverride&&d&&qv(d)&&(e=ue(e,YC.createToken(164))),e&&YC.createNodeArray(e)}(),x=f.getWidenedType(f.getTypeOfSymbolAtLocation(e,t)),S=!!(16777216&e.flags),k=!!(33554432&t.flags)||l,T=AQ(n,i);switch(g){case 171:case 172:let n=1;n|=0===T?268435456:0;let i=f.typeToTypeNode(x,t,n,cie(r));if(o){const e=Cie(i,m);e&&(i=e.typeNode,Die(o,e.symbols))}a(YC.createPropertyDeclaration(b,d?w(h):e.getName(),S&&2&c?YC.createToken(58):void 0,i,void 0));break;case 177:case 178:{xn.assertIsDefined(_);let e=f.typeToTypeNode(x,t,void 0,cie(r));const n=Sv(_,d),i=n.secondAccessor?[n.firstAccessor,n.secondAccessor]:[n.firstAccessor];if(o){const t=Cie(e,m);t&&(e=t.typeNode,Die(o,t.symbols))}for(const t of i)if(mE(t))a(YC.createGetAccessorDeclaration(b,w(h),u,E(e),D(s,T,k)));else{xn.assertNode(t,gE,"The counterpart to a getter should be a setter");const n=fv(t),r=n&&qD(n.name)?bc(n.name):void 0;a(YC.createSetAccessorDeclaration(b,w(h),yie(1,[r],[E(e)],1,!1),D(s,T,k)))}break}case 173:case 174:xn.assertIsDefined(_);const l=x.isUnion()?R(x.types,(e=>e.getCallSignatures())):x.getCallSignatures();if(!Q(l))break;if(1===_.length){xn.assert(1===l.length,"One declaration implies one signature");const e=l[0];C(T,e,b,w(h),D(s,T,k));break}for(const e of l)C(T,e,b,w(h));if(!k)if(_.length>l.length){const e=f.getSignatureFromDeclaration(_[_.length-1]);C(T,e,b,w(h),D(s,T))}else xn.assert(_.length===l.length,"Declarations and signatures should match count"),a(function(e,t,n,r,i,o,a,s,c){let l=r[0],u=r[0].minArgumentCount,_=!1;for(const e of r)u=Math.min(e.minArgumentCount,u),JB(e)&&(_=!0),e.parameters.length>=l.parameters.length&&(!JB(e)||JB(l))&&(l=e);const d=l.parameters.length-(JB(l)?1:0),f=l.parameters.map((e=>e.name)),m=yie(d,f,void 0,u,!1);if(_){const e=YC.createParameterDeclaration(void 0,YC.createToken(26),f[d]||"rest",d>=u?YC.createToken(58):void 0,YC.createArrayTypeNode(YC.createKeywordTypeNode(159)),void 0);m.push(e)}return function(e,t,n,r,i,o,a,s){return YC.createMethodDeclaration(e,void 0,t,n?YC.createToken(58):void 0,void 0,i,o,s||vie(a))}(a,i,o,0,m,function(e,t,n,r){if(p(e)){const i=t.getUnionType(O(e,t.getReturnTypeOfSignature));return t.typeToTypeNode(i,r,1,cie(n))}}(r,e,t,n),s,c)}(f,r,t,l,w(h),S&&!!(1&c),b,T,s))}function C(e,n,i,s,l){const u=_ie(174,r,e,n,l,s,i,S&&!!(1&c),t,o);u&&a(u)}function w(e){return qD(e)&&"constructor"===e.escapedText?YC.createComputedPropertyName(YC.createStringLiteral(bc(e),0===T)):NY(e,!1)}function D(e,t,n){return n?void 0:NY(e,!1)||vie(t)}function E(e){return NY(e,!1)}}function _ie(e,t,n,r,i,o,a,s,c,l){const u=t.program,_=u.getTypeChecker(),d=wS(u.getCompilerOptions()),p=Mm(c),f=524545|(0===n?268435456:0),m=_.signatureToSignatureDeclaration(r,e,c,f,cie(t));if(!m)return;let g=p?void 0:m.typeParameters,h=m.parameters,y=p?void 0:NY(m.type);if(l){if(g){const e=L(g,(e=>{let t=e.constraint,n=e.default;if(t){const e=Cie(t,d);e&&(t=e.typeNode,Die(l,e.symbols))}if(n){const e=Cie(n,d);e&&(n=e.typeNode,Die(l,e.symbols))}return YC.updateTypeParameterDeclaration(e,e.modifiers,e.name,t,n)}));g!==e&&(g=sI(YC.createNodeArray(e,g.hasTrailingComma),g))}const e=L(h,(e=>{let t=p?void 0:e.type;if(t){const e=Cie(t,d);e&&(t=e.typeNode,Die(l,e.symbols))}return YC.updateParameterDeclaration(e,e.modifiers,e.dotDotDotToken,e.name,p?void 0:e.questionToken,t,e.initializer)}));if(h!==e&&(h=sI(YC.createNodeArray(e,h.hasTrailingComma),h)),y){const e=Cie(y,d);e&&(y=e.typeNode,Die(l,e.symbols))}}const v=s?YC.createToken(58):void 0,b=m.asteriskToken;return nP(m)?YC.updateFunctionExpression(m,a,m.asteriskToken,lt(o,qD),g,h,y,i??m.body):rP(m)?YC.updateArrowFunction(m,a,g,h,y,m.equalsGreaterThanToken,i??m.body):dE(m)?YC.updateMethodDeclaration(m,a,b,o??YC.createIdentifier(""),v,g,h,y,i):HP(m)?YC.updateFunctionDeclaration(m,a,m.asteriskToken,lt(o,qD),g,h,y,i??m.body):void 0}function die(e,t,n,r,i,o,a){const s=AQ(t.sourceFile,t.preferences),c=wS(t.program.getCompilerOptions()),l=cie(t),u=t.program.getTypeChecker(),_=Mm(a),{typeArguments:d,arguments:p,parent:f}=r,m=_?void 0:u.getContextualType(r),g=O(p,(e=>qD(e)?e.text:GE(e)&&qD(e.name)?e.name.text:void 0)),h=_?[]:O(p,(e=>u.getTypeAtLocation(e))),{argumentTypeNodes:y,argumentTypeParameters:v}=gie(u,n,h,a,c,1,l),b=o?YC.createNodeArray(YC.createModifiersFromModifierFlags(o)):void 0,x=pP(f)?YC.createToken(42):void 0,S=_?void 0:function(e,t,n){const r=new Set(t.map((e=>e[0]))),i=new Map(t);if(n){const i=n.filter((n=>!t.some((t=>{var r;return e.getTypeAtLocation(n)===(null==(r=t[1])?void 0:r.argumentType)})))),o=r.size+i.length;for(let e=0;r.size{var t;return YC.createTypeParameterDeclaration(void 0,e,null==(t=i.get(e))?void 0:t.constraint)}))}(u,v,d),k=yie(p.length,g,y,void 0,_),T=_||void 0===m?void 0:u.typeToTypeNode(m,a,void 0,l);switch(e){case 174:return YC.createMethodDeclaration(b,x,i,void 0,S,k,T,vie(s));case 173:return YC.createMethodSignature(b,i,void 0,S,k,void 0===T?YC.createKeywordTypeNode(159):T);case 262:return xn.assert("string"==typeof i||qD(i),"Unexpected name"),YC.createFunctionDeclaration(b,x,i,S,k,T,bie(va.Function_not_implemented.message,s));default:xn.fail("Unexpected kind")}}function pie(e){return 84+e<=90?String.fromCharCode(84+e):`T${e}`}function fie(e,t,n,r,i,o,a){let s=e.typeToTypeNode(n,r,o,a);if(s&&zE(s)){const e=Cie(s,i);e&&(Die(t,e.symbols),s=e.typeNode)}return NY(s)}function mie(e){return e.isUnionOrIntersection()?e.types.some(mie):262144&e.flags}function gie(e,t,n,r,i,o,a){const s=[],c=new Map;for(let u=0;u=r?YC.createToken(58):void 0,i?void 0:(null==n?void 0:n[s])||YC.createKeywordTypeNode(159),void 0);o.push(l)}return o}function vie(e){return bie(va.Method_not_implemented.message,e)}function bie(e,t){return YC.createBlock([YC.createThrowStatement(YC.createNewExpression(YC.createIdentifier("Error"),void 0,[YC.createStringLiteral(e,0===t)]))],!0)}function xie(e,t,n){const r=Hf(t);if(!r)return;const i=Tie(r,"compilerOptions");if(void 0===i)return void e.insertNodeAtObjectStart(t,r,kie("compilerOptions",YC.createObjectLiteralExpression(n.map((([e,t])=>kie(e,t))),!0)));const o=i.initializer;if(HE(o))for(const[r,i]of n){const n=Tie(o,r);void 0===n?e.insertNodeAtObjectStart(t,o,kie(r,i)):e.replaceNode(t,n.initializer,i)}}function Sie(e,t,n,r){xie(e,t,[[n,r]])}function kie(e,t){return YC.createPropertyAssignment(YC.createStringLiteral(e),t)}function Tie(e,t){return S(e.properties,(e=>BN(e)&&!!e.name&&wD(e.name)&&e.name.text===t))}function Cie(e,t){let n;const r=qB(e,(function e(r){if(df(r)&&r.qualifier){const i=bb(r.qualifier),o=FZ(i.symbol,t),a=o!==i.text?wie(r.qualifier,YC.createIdentifier(o)):r.qualifier;n=ue(n,i.symbol);const s=VB(r.typeArguments,e,wu);return YC.createTypeReferenceNode(a,s)}return ZB(r,e,void 0)}),wu);if(n&&r)return{typeNode:r,symbols:n}}function wie(e,t){return 80===e.kind?t:YC.createQualifiedName(wie(e.left,t),e.right)}function Die(e,t){t.forEach((t=>e.addImportFromExportedSymbol(t,!0)))}function Eie(e,t){const n=js(t);let r=kX(e,t.start);for(;r.ende.replaceNode(t,n,r)));return u8(jie,i,[va.Replace_import_with_0,i[0].textChanges[0].newText])}function Bie(e,t){const n=e.program.getTypeChecker().getTypeAtLocation(t);if(!(n.symbol&&td(n.symbol)&&n.symbol.links.originatingImport))return[];const r=[],i=n.symbol.links.originatingImport;if(uf(i)||pe(r,function(e,t){const n=Sd(t),r=wg(t),i=e.program.getCompilerOptions(),o=[];return o.push(Rie(e,n,t,EQ(r.name,void 0,t.moduleSpecifier,AQ(n,e.preferences)))),1===DS(i)&&o.push(Rie(e,n,t,YC.createImportEqualsDeclaration(void 0,!1,r.name,YC.createExternalModuleReference(t.moduleSpecifier)))),o}(e,i)),Xu(t)&&(!Dc(t.parent)||t.parent.name!==t)){const n=e.sourceFile,i=r_e.ChangeTracker.with(e,(e=>e.replaceNode(n,t,YC.createPropertyAccessExpression(t,"default"),{})));r.push(u8(jie,i,va.Use_synthetic_default_member))}return r}f8({errorCodes:[va.This_expression_is_not_callable.code,va.This_expression_is_not_constructable.code],getCodeActions:function(e){const t=e.sourceFile,n=va.This_expression_is_not_callable.code===e.errorCode?213:214,r=mc(kX(t,e.span.start),(e=>e.kind===n));if(!r)return[];return Bie(e,r.expression)}}),f8({errorCodes:[va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,va.Type_0_does_not_satisfy_the_constraint_1.code,va.Type_0_is_not_assignable_to_type_1.code,va.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,va.Type_predicate_0_is_not_assignable_to_1.code,va.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code,va._0_index_type_1_is_not_assignable_to_2_index_type_3.code,va.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,va.Property_0_in_type_1_is_not_assignable_to_type_2.code,va.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,va.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code],getCodeActions:function(e){const t=mc(kX(e.sourceFile,e.span.start),(t=>t.getStart()===e.span.start&&t.getEnd()===e.span.start+e.span.length));return t?Bie(e,t):[]}});var Jie="strictClassInitialization",zie="addMissingPropertyDefiniteAssignmentAssertions",$ie="addMissingPropertyUndefinedType",qie="addMissingPropertyInitializer",Vie=[va.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];function Uie(e,t){const n=kX(e,t);if(qD(n)&&uE(n.parent)){const e=kv(n.parent);if(e)return{type:e,prop:n.parent,isJs:Mm(n.parent)}}}function Kie(e,t,n){MY(n);const r=YC.updatePropertyDeclaration(n,n.modifiers,n.name,YC.createToken(54),n.type,n.initializer);e.replaceNode(t,n,r)}function Wie(e,t,n){const r=YC.createKeywordTypeNode(157),i=FE(n.type)?n.type.types.concat(r):[n.type,r],o=YC.createUnionTypeNode(i);n.isJs?e.addJSDocTags(t,n.prop,[YC.createJSDocTypeTag(void 0,YC.createJSDocTypeExpression(o))]):e.replaceNode(t,n.type,o)}function Hie(e,t,n,r){MY(n);const i=YC.updatePropertyDeclaration(n,n.modifiers,n.name,n.questionToken,n.type,r);e.replaceNode(t,n,i)}function Gie(e,t){return Xie(e,e.getTypeFromTypeNode(t.type))}function Xie(e,t){if(512&t.flags)return t===e.getFalseType()||t===e.getFalseType(!0)?YC.createFalse():YC.createTrue();if(t.isStringLiteral())return YC.createStringLiteral(t.value);if(t.isNumberLiteral())return YC.createNumericLiteral(t.value);if(2048&t.flags)return YC.createBigIntLiteral(t.value);if(t.isUnion())return g(t.types,(t=>Xie(e,t)));if(t.isClass()){const e=Cx(t.symbol);if(!e||Bv(e,64))return;const n=pv(e);if(n&&n.parameters.length)return;return YC.createNewExpression(YC.createIdentifier(t.symbol.name),void 0,void 0)}return e.isArrayLikeType(t)?YC.createArrayLiteralExpression():void 0}f8({errorCodes:Vie,getCodeActions:function(e){const t=Uie(e.sourceFile,e.span.start);if(!t)return;const n=[];return ue(n,function(e,t){const n=r_e.ChangeTracker.with(e,(n=>Wie(n,e.sourceFile,t)));return _8(Jie,n,[va.Add_undefined_type_to_property_0,t.prop.name.getText()],$ie,va.Add_undefined_type_to_all_uninitialized_properties)}(e,t)),ue(n,function(e,t){if(t.isJs)return;const n=r_e.ChangeTracker.with(e,(n=>Kie(n,e.sourceFile,t.prop)));return _8(Jie,n,[va.Add_definite_assignment_assertion_to_property_0,t.prop.getText()],zie,va.Add_definite_assignment_assertions_to_all_uninitialized_properties)}(e,t)),ue(n,function(e,t){if(t.isJs)return;const n=Gie(e.program.getTypeChecker(),t.prop);if(!n)return;const r=r_e.ChangeTracker.with(e,(r=>Hie(r,e.sourceFile,t.prop,n)));return _8(Jie,r,[va.Add_initializer_to_property_0,t.prop.name.getText()],qie,va.Add_initializers_to_all_uninitialized_properties)}(e,t)),n},fixIds:[zie,$ie,qie],getAllCodeActions:e=>b8(e,Vie,((t,n)=>{const r=Uie(n.file,n.start);if(r)switch(e.fixId){case zie:Kie(t,n.file,r.prop);break;case $ie:Wie(t,n.file,r);break;case qie:const i=Gie(e.program.getTypeChecker(),r.prop);if(!i)return;Hie(t,n.file,r.prop,i);break;default:xn.fail(JSON.stringify(e.fixId))}}))});var Qie="requireInTs",Yie=[va.require_call_may_be_converted_to_an_import.code];function Zie(e,t,n){const{allowSyntheticDefaults:r,defaultImportName:i,namedImports:o,statement:a,required:s}=n;e.replaceNode(t,a,i&&!r?YC.createImportEqualsDeclaration(void 0,!1,i,YC.createExternalModuleReference(s)):YC.createImportDeclaration(void 0,YC.createImportClause(!1,i,o),s,void 0))}function eoe(e,t,n){const{parent:r}=kX(e,n);Jm(r,!0)||xn.failBadSyntaxKind(r);const i=ut(r.parent,KP),o=lt(i.name,qD),a=VE(i.name)?function(e){const t=[];for(const n of e.elements){if(!qD(n.name)||n.initializer)return;t.push(YC.createImportSpecifier(!1,lt(n.propertyName,qD),n.name))}if(t.length)return YC.createNamedImports(t)}(i.name):void 0;if(o||a)return{allowSyntheticDefaults:AS(t.getCompilerOptions()),defaultImportName:o,namedImports:a,statement:ut(i.parent.parent,EP),required:Te(r.arguments)}}f8({errorCodes:Yie,getCodeActions(e){const t=eoe(e.sourceFile,e.program,e.span.start);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>Zie(n,e.sourceFile,t)));return[_8(Qie,n,va.Convert_require_to_import,Qie,va.Convert_all_require_to_import)]},fixIds:[Qie],getAllCodeActions:e=>b8(e,Yie,((t,n)=>{const r=eoe(n.file,e.program,n.start);r&&Zie(t,e.sourceFile,r)}))});var toe="useDefaultImport",noe=[va.Import_may_be_converted_to_a_default_import.code];function roe(e,t){const n=kX(e,t);if(!qD(n))return;const{parent:r}=n;if(rN(r)&&SN(r.moduleReference))return{importNode:r,name:n,moduleSpecifier:r.moduleReference.expression};if(_N(r)&&iN(r.parent.parent)){const e=r.parent.parent;return{importNode:e,name:n,moduleSpecifier:e.moduleSpecifier}}}function ioe(e,t,n,r){e.replaceNode(t,n.importNode,EQ(n.name,void 0,n.moduleSpecifier,AQ(t,r)))}f8({errorCodes:noe,getCodeActions(e){const{sourceFile:t,span:{start:n}}=e,r=roe(t,n);if(!r)return;const i=r_e.ChangeTracker.with(e,(n=>ioe(n,t,r,e.preferences)));return[_8(toe,i,va.Convert_to_default_import,toe,va.Convert_all_to_default_imports)]},fixIds:[toe],getAllCodeActions:e=>b8(e,noe,((t,n)=>{const r=roe(n.file,n.start);r&&ioe(t,n.file,r,e.preferences)}))});var ooe="useBigintLiteral",aoe=[va.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code];function soe(e,t,n){const r=lt(kX(t,n.start),TD);if(!r)return;const i=r.getText(t)+"n";e.replaceNode(t,r,YC.createBigIntLiteral(i))}f8({errorCodes:aoe,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>soe(t,e.sourceFile,e.span)));if(t.length>0)return[_8(ooe,t,va.Convert_to_a_bigint_numeric_literal,ooe,va.Convert_all_to_bigint_numeric_literals)]},fixIds:[ooe],getAllCodeActions:e=>b8(e,aoe,((e,t)=>soe(e,t.file,t)))});var coe="fixAddModuleReferTypeMissingTypeof",loe=[va.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];function uoe(e,t){const n=kX(e,t);return xn.assert(102===n.kind,"This token should be an ImportKeyword"),xn.assert(205===n.parent.kind,"Token parent should be an ImportType"),n.parent}function _oe(e,t,n){const r=YC.updateImportTypeNode(n,n.argument,n.attributes,n.qualifier,n.typeArguments,!0);e.replaceNode(t,n,r)}f8({errorCodes:loe,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=uoe(t,n.start),i=r_e.ChangeTracker.with(e,(e=>_oe(e,t,r)));return[_8(coe,i,va.Add_missing_typeof,coe,va.Add_missing_typeof)]},fixIds:[coe],getAllCodeActions:e=>b8(e,loe,((t,n)=>_oe(t,e.sourceFile,uoe(n.file,n.start))))});var doe="wrapJsxInFragment",poe=[va.JSX_expressions_must_have_one_parent_element.code];function foe(e,t){let n=kX(e,t).parent.parent;if((uP(n)||(n=n.parent,uP(n)))&&Nd(n.operatorToken))return n}function moe(e,t,n){const r=function(e){const t=[];let n=e;for(;;){if(uP(n)&&Nd(n.operatorToken)&&28===n.operatorToken.kind){if(t.push(n.left),T_(n.right))return t.push(n.right),t;if(uP(n.right)){n=n.right;continue}return}return}}(n);r&&e.replaceNode(t,n,YC.createJsxFragment(YC.createJsxOpeningFragment(),r,YC.createJsxJsxClosingFragment()))}f8({errorCodes:poe,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=foe(t,n.start);if(!r)return;const i=r_e.ChangeTracker.with(e,(e=>moe(e,t,r)));return[_8(doe,i,va.Wrap_in_JSX_fragment,doe,va.Wrap_all_unparented_JSX_in_JSX_fragment)]},fixIds:[doe],getAllCodeActions:e=>b8(e,poe,((t,n)=>{const r=foe(e.sourceFile,n.start);r&&moe(t,e.sourceFile,r)}))});var goe="wrapDecoratorInParentheses",hoe=[va.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];function yoe(e,t,n){const r=mc(kX(t,n),cE);xn.assert(!!r,"Expected position to be owned by a decorator.");const i=YC.createParenthesizedExpression(r.expression);e.replaceNode(t,r.expression,i)}f8({errorCodes:hoe,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>yoe(t,e.sourceFile,e.span.start)));return[_8(goe,t,va.Wrap_in_parentheses,goe,va.Wrap_all_invalid_decorator_expressions_in_parentheses)]},fixIds:[goe],getAllCodeActions:e=>b8(e,hoe,((e,t)=>yoe(e,t.file,t.start)))});var voe="fixConvertToMappedObjectType",boe=[va.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];function xoe(e,t){const n=lt(kX(e,t).parent.parent,vE);if(!n)return;const r=XP(n.parent)?n.parent:lt(n.parent.parent,QP);return r?{indexSignature:n,container:r}:void 0}function Soe(e,t,{indexSignature:n,container:r}){const i=(XP(r)?r.members:r.type.members).filter((e=>!vE(e))),o=Te(n.parameters),a=YC.createTypeParameterDeclaration(void 0,ut(o.name,qD),o.type),s=YC.createMappedTypeNode(Kv(n)?YC.createModifier(148):void 0,a,void 0,n.questionToken,n.type,void 0),c=YC.createIntersectionTypeNode([...Ch(r),s,...i.length?[YC.createTypeLiteralNode(i)]:u]);var l,_;e.replaceNode(t,r,(l=r,_=c,YC.createTypeAliasDeclaration(l.modifiers,l.name,l.typeParameters,_)))}f8({errorCodes:boe,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=xoe(t,n.start);if(!r)return;const i=r_e.ChangeTracker.with(e,(e=>Soe(e,t,r))),o=bc(r.container.name);return[_8(voe,i,[va.Convert_0_to_mapped_object_type,o],voe,[va.Convert_0_to_mapped_object_type,o])]},fixIds:[voe],getAllCodeActions:e=>b8(e,boe,((e,t)=>{const n=xoe(t.file,t.start);n&&Soe(e,t.file,n)}))});var koe="removeAccidentalCallParentheses";f8({errorCodes:[va.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code],getCodeActions(e){const t=mc(kX(e.sourceFile,e.span.start),QE);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>{n.deleteRange(e.sourceFile,{pos:t.expression.end,end:t.end})}));return[u8(koe,n,va.Remove_parentheses)]},fixIds:[koe]});var Toe="removeUnnecessaryAwait",Coe=[va.await_has_no_effect_on_the_type_of_this_expression.code];function woe(e,t,n){const r=lt(kX(t,n.start),(e=>135===e.kind)),i=r&<(r.parent,sP);if(!i)return;let o=i;if(tP(i.parent)&&qD(Bx(i.expression,!1))){const e=EX(i.parent.pos,t);e&&105!==e.kind&&(o=i.parent)}e.replaceNode(t,o,i.expression)}f8({errorCodes:Coe,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>woe(t,e.sourceFile,e.span)));if(t.length>0)return[_8(Toe,t,va.Remove_unnecessary_await,Toe,va.Remove_all_unnecessary_uses_of_await)]},fixIds:[Toe],getAllCodeActions:e=>b8(e,Coe,((e,t)=>woe(e,t.file,t)))});var Doe=[va.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code],Eoe="splitTypeOnlyImport";function Poe(e,t){return mc(kX(e,t.start),iN)}function Noe(e,t,n){if(!t)return;const r=xn.checkDefined(t.importClause);e.replaceNode(n.sourceFile,t,YC.updateImportDeclaration(t,t.modifiers,YC.updateImportClause(r,r.isTypeOnly,r.name,void 0),t.moduleSpecifier,t.attributes)),e.insertNodeAfter(n.sourceFile,t,YC.createImportDeclaration(void 0,YC.updateImportClause(r,r.isTypeOnly,void 0,r.namedBindings),t.moduleSpecifier,t.attributes))}f8({errorCodes:Doe,fixIds:[Eoe],getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>Noe(t,Poe(e.sourceFile,e.span),e)));if(t.length)return[_8(Eoe,t,va.Split_into_two_separate_import_declarations,Eoe,va.Split_all_invalid_type_only_imports)]},getAllCodeActions:e=>b8(e,Doe,((t,n)=>{Noe(t,Poe(e.sourceFile,n),e)}))});var Foe="fixConvertConstToLet",Aoe=[va.Cannot_assign_to_0_because_it_is_a_constant.code];function Ioe(e,t,n){var r;const i=n.getTypeChecker().getSymbolAtLocation(kX(e,t));if(void 0===i)return;const o=lt(null==(r=null==i?void 0:i.valueDeclaration)?void 0:r.parent,WP);if(void 0===o)return;const a=uX(o,87,e);return void 0!==a?{symbol:i,token:a}:void 0}function Ooe(e,t,n){e.replaceNode(t,n,YC.createToken(121))}f8({errorCodes:Aoe,getCodeActions:function(e){const{sourceFile:t,span:n,program:r}=e,i=Ioe(t,n.start,r);if(void 0===i)return;const o=r_e.ChangeTracker.with(e,(e=>Ooe(e,t,i.token)));return[d8(Foe,o,va.Convert_const_to_let,Foe,va.Convert_all_const_to_let)]},getAllCodeActions:e=>{const{program:t}=e,n=new Map;return y8(r_e.ChangeTracker.with(e,(r=>{x8(e,Aoe,(e=>{const i=Ioe(e.file,e.start,t);if(i&&Fx(n,OB(i.symbol)))return Ooe(r,e.file,i.token)}))})))},fixIds:[Foe]});var Moe="fixExpectedComma",Loe=[va._0_expected.code];function joe(e,t,n){const r=kX(e,t);return 27===r.kind&&r.parent&&(HE(r.parent)||WE(r.parent))?{node:r}:void 0}function Roe(e,t,{node:n}){const r=YC.createToken(28);e.replaceNode(t,n,r)}f8({errorCodes:Loe,getCodeActions(e){const{sourceFile:t}=e,n=joe(t,e.span.start,e.errorCode);if(!n)return;const r=r_e.ChangeTracker.with(e,(e=>Roe(e,t,n)));return[_8(Moe,r,[va.Change_0_to_1,";",","],Moe,[va.Change_0_to_1,";",","])]},fixIds:[Moe],getAllCodeActions:e=>b8(e,Loe,((t,n)=>{const r=joe(n.file,n.start,n.code);r&&Roe(t,e.sourceFile,r)}))});var Boe="addVoidToPromise",Joe=[va.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,va.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code];function zoe(e,t,n,r,i){const o=kX(t,n.start);if(!qD(o)||!QE(o.parent)||o.parent.expression!==o||0!==o.parent.arguments.length)return;const a=r.getTypeChecker(),s=a.getSymbolAtLocation(o),c=null==s?void 0:s.valueDeclaration;if(!c||!sE(c)||!YE(c.parent.parent))return;if(null==i?void 0:i.has(c))return;null==i||i.add(c);const l=function(e){var t;if(!Mm(e))return e.typeArguments;if(tP(e.parent)){const n=null==(t=ol(e.parent))?void 0:t.typeExpression.type;if(n&&xE(n)&&qD(n.typeName)&&"Promise"===bc(n.typeName))return n.typeArguments}}(c.parent.parent);if(Q(l)){const n=l[0],r=!FE(n)&&!ME(n)&&ME(YC.createUnionTypeNode([n,YC.createKeywordTypeNode(116)]).types[0]);r&&e.insertText(t,n.pos,"("),e.insertText(t,n.end,r?") | void":" | void")}else{const n=a.getResolvedSignature(o.parent),r=null==n?void 0:n.parameters[0],i=r&&a.getTypeOfSymbolAtLocation(r,c.parent.parent);Mm(c)?(!i||3&i.flags)&&(e.insertText(t,c.parent.parent.end,")"),e.insertText(t,as(t.text,c.parent.parent.pos),"/** @type {Promise} */(")):(!i||2&i.flags)&&e.insertText(t,c.parent.parent.expression.end,"")}}f8({errorCodes:Joe,fixIds:[Boe],getCodeActions(e){const t=r_e.ChangeTracker.with(e,(t=>zoe(t,e.sourceFile,e.span,e.program)));if(t.length>0)return[_8("addVoidToPromise",t,va.Add_void_to_Promise_resolved_without_a_value,Boe,va.Add_void_to_all_Promises_resolved_without_a_value)]},getAllCodeActions:e=>b8(e,Joe,((t,n)=>zoe(t,n.file,n,e.program,new Set)))});var $oe={};o($oe,{CompletionKind:()=>Aae,CompletionSource:()=>Koe,SortText:()=>Uoe,StringCompletions:()=>cse,SymbolOriginInfoKind:()=>Woe,createCompletionDetails:()=>Nae,createCompletionDetailsForSymbol:()=>Pae,getCompletionEntriesFromSymbols:()=>Cae,getCompletionEntryDetails:()=>Dae,getCompletionEntrySymbol:()=>Fae,getCompletionsAtPosition:()=>tae,getPropertiesForObjectExpression:()=>Kae,moduleSpecifierResolutionCacheAttemptLimit:()=>Voe,moduleSpecifierResolutionLimit:()=>qoe});var qoe=100,Voe=1e3,Uoe={LocalDeclarationPriority:"10",LocationPriority:"11",OptionalMember:"12",MemberDeclaredBySpreadAssignment:"13",SuggestedClassMembers:"14",GlobalsOrKeywords:"15",AutoImportSuggestions:"16",ClassMemberSnippets:"17",JavascriptIdentifiers:"18",Deprecated:e=>"z"+e,ObjectLiteralProperty:(e,t)=>`${e}\0${t}\0`,SortBelow:e=>e+"1"},Koe=(e=>(e.ThisProperty="ThisProperty/",e.ClassMemberSnippet="ClassMemberSnippet/",e.TypeOnlyAlias="TypeOnlyAlias/",e.ObjectLiteralMethodSnippet="ObjectLiteralMethodSnippet/",e.SwitchCases="SwitchCases/",e.ObjectLiteralMemberWithComma="ObjectLiteralMemberWithComma/",e))(Koe||{}),Woe=(e=>(e[e.ThisType=1]="ThisType",e[e.SymbolMember=2]="SymbolMember",e[e.Export=4]="Export",e[e.Promise=8]="Promise",e[e.Nullable=16]="Nullable",e[e.ResolvedExport=32]="ResolvedExport",e[e.TypeOnlyAlias=64]="TypeOnlyAlias",e[e.ObjectLiteralMethod=128]="ObjectLiteralMethod",e[e.Ignore=256]="Ignore",e[e.ComputedPropertyName=512]="ComputedPropertyName",e[e.SymbolMemberNoExport=2]="SymbolMemberNoExport",e[e.SymbolMemberExport=6]="SymbolMemberExport",e))(Woe||{});function Hoe(e){return!!(e&&4&e.kind)}function Goe(e){return!(!e||32!==e.kind)}function Xoe(e){return(Hoe(e)||Goe(e))&&!!e.isFromPackageJson}function Qoe(e){return!!(e&&64&e.kind)}function Yoe(e){return!!(e&&128&e.kind)}function Zoe(e){return!!(e&&512&e.kind)}function eae(e,t,n,r,i,o,a,s,c){var l,u,_;const d=Yn(),p=a||KS(ES(r.getCompilerOptions()));let f=!1,m=0,g=0,h=0,y=0;const v=c({tryResolve:function(e,t){if(t){const t=n.getModuleSpecifierForBestExportInfo(e,i,s);return t&&m++,t||"failed"}const r=p||o.allowIncompleteCompletions&&gf,resolvedAny:()=>g>0,resolvedBeyondLimit:()=>g>qoe}),b=y?` (${(h/y*100).toFixed(1)}% hit rate)`:"";return null==(l=t.log)||l.call(t,`${e}: resolved ${g} module specifiers, plus ${m} ambient and ${h} from cache${b}`),null==(u=t.log)||u.call(t,`${e}: response is ${f?"incomplete":"complete"}`),null==(_=t.log)||_.call(t,`${e}: ${Yn()-d}`),v}function tae(e,t,n,r,i,o,a,s,c,l,u=!1){var _;const{previousToken:d}=Mae(i,r);if(a&&!AX(r,i,d)&&!function(e,t,n,r){switch(t){case".":case"@":return!0;case'"':case"'":case"`":return!!n&&YY(n)&&r===n.getStart(e)+1;case"#":return!!n&&VD(n)&&!!Zf(n);case"<":return!!n&&30===n.kind&&(!uP(n.parent)||Qae(n.parent));case"/":return!!n&&($_(n)?!!Tg(n):44===n.kind&&wN(n.parent));case" ":return!!n&&nE(n)&&307===n.parent.kind;default:return xn.assertNever(t)}}(r,a,d,i))return;if(" "===a)return o.includeCompletionsForImportStatements&&o.includeCompletionsWithInsertText?{isGlobalCompletion:!0,isMemberCompletion:!1,isNewIdentifierLocation:!0,isIncomplete:!0,entries:[]}:void 0;const p=t.getCompilerOptions(),f=t.getTypeChecker(),m=o.allowIncompleteCompletions?null==(_=e.getIncompleteCompletionsCache)?void 0:_.call(e):void 0;if(m&&3===s&&d&&qD(d)){const n=function(e,t,n,r,i,o,a,s){const c=e.get();if(!c)return;const l=xX(t,s),u=n.text.toLowerCase(),_=i0(t,i,r,o,a),d=eae("continuePreviousIncompleteResponse",i,a8.createImportSpecifierResolver(t,r,i,o),r,n.getStart(),o,!1,wT(n),(e=>{const n=q(c.entries,(n=>{var o;if(!n.hasAction||!n.source||!n.data||rae(n.data))return n;if(!sse(n.name,u))return;const{origin:a}=xn.checkDefined(Lae(n.name,n.data,r,i)),s=_.get(t.path,n.data.exportMapKey),c=s&&e.tryResolve(s,!Os(By(a.moduleSymbol.name)));if("skipped"===c)return n;if(!c||"failed"===c)return void(null==(o=i.log)||o.call(i,`Unexpected failure resolving auto import for '${n.name}' from '${n.source}'`));const l={...a,kind:32,moduleSpecifier:c.moduleSpecifier};return n.data=bae(l),n.source=Tae(l),n.sourceDisplay=[lY(l.moduleSpecifier)],n}));return e.skippedAny()||(c.isIncomplete=void 0),n}));return c.entries=d,c.flags=4|(c.flags||0),c.optionalReplacementSpan=lae(l),c}(m,r,d,t,e,o,c,i);if(n)return n}else null==m||m.clear();const g=cse.getStringLiteralCompletions(r,i,d,p,e,t,n,o,u);if(g)return g;if(d&&Nl(d.parent)&&(83===d.kind||88===d.kind||80===d.kind))return function(e){const t=function(e){const t=[],n=new Map;let r=e;for(;r&&!cu(r);){if($P(r)){const e=r.label.text;n.has(e)||(n.set(e,!0),t.push({name:e,kindModifiers:"",kind:"label",sortText:Uoe.LocationPriority}))}r=r.parent}return t}(e);if(t.length)return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:t}}(d.parent);const h=Oae(t,n,r,p,i,o,void 0,e,l,c);var y;if(h)switch(h.kind){case 0:const a=function(e,t,n,r,i,o,a,s,c,l){const{symbols:u,contextToken:_,completionKind:d,isInSnippetScope:p,isNewIdentifierLocation:f,location:m,propertyAccessToConvert:g,keywordFilters:h,symbolToOriginInfoMap:y,recommendedCompletion:v,isJsxInitializer:b,isTypeOnlyLocation:x,isJsxIdentifierExpected:S,isRightOfOpenTag:k,isRightOfDotOrQuestionDot:T,importStatementCompletion:C,insideJsDocTagTypeExpression:w,symbolToSortTextMap:D,hasUnresolvedAutoImports:E}=o;let P=o.literals;const N=n.getTypeChecker();if(1===bS(e.scriptKind)){const t=function(e,t){const n=mc(e,(e=>{switch(e.kind){case 287:return!0;case 44:case 32:case 80:case 211:return!1;default:return"quit"}}));if(n){const e=!!uX(n,32,t),r=n.parent.openingElement.tagName.getText(t)+(e?"":">");return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,optionalReplacementSpan:aQ(n.tagName),entries:[{name:r,kind:"class",kindModifiers:void 0,sortText:Uoe.LocationPriority}]}}}(m,e);if(t)return t}const F=mc(_,MN);if(F&&(rE(_)||_h(_,F.expression))){const e=HZ(N,F.parent.clauses);P=P.filter((t=>!e.hasValue(t))),u.forEach(((t,n)=>{if(t.valueDeclaration&&$N(t.valueDeclaration)){const r=N.getConstantValue(t.valueDeclaration);void 0!==r&&e.hasValue(r)&&(y[n]={kind:256})}}))}const A=[],I=uae(e,r);if(I&&!f&&(!u||0===u.length)&&0===h)return;const O=Cae(u,A,void 0,_,m,c,e,t,n,wS(r),i,d,a,r,s,x,g,S,b,C,v,y,D,S,k,l);if(0!==h)for(const t of Jae(h,!w&&Im(e)))(x&&fQ(Ba(t.name))||!x&&("abstract"===(M=t.name)||"async"===M||"await"===M||"declare"===M||"module"===M||"namespace"===M||"type"===M||"satisfies"===M||"as"===M)||!O.has(t.name))&&(O.add(t.name),ie(A,t,nae,void 0,!0));var M;for(const e of function(e,t){const n=[];if(e){const r=e.getSourceFile(),i=e.parent,o=r.getLineAndCharacterOfPosition(e.end).line,a=r.getLineAndCharacterOfPosition(t).line;(iN(i)||gN(i)&&i.moduleSpecifier)&&e===i.moduleSpecifier&&o===a&&n.push({name:Ra(132),kind:"keyword",kindModifiers:"",sortText:Uoe.GlobalsOrKeywords})}return n}(_,c))O.has(e.name)||(O.add(e.name),ie(A,e,nae,void 0,!0));for(const t of P){const n=gae(e,a,t);O.add(n.name),ie(A,n,nae,void 0,!0)}let L;if(I||function(e,t,n,r,i){I7(e).forEach(((e,o)=>{if(e===t)return;const a=vc(o);!n.has(a)&&Ts(a,r)&&(n.add(a),ie(i,{name:a,kind:"warning",kindModifiers:"",sortText:Uoe.JavascriptIdentifiers,isFromUncheckedFile:!0},nae))}))}(e,m.pos,O,wS(r),A),a.includeCompletionsWithInsertText&&_&&!k&&!T&&(L=mc(_,tN))){const i=_ae(L,e,a,r,t,n,s);i&&A.push(i.entry)}return{flags:o.flags,isGlobalCompletion:p,isIncomplete:!(!a.allowIncompleteCompletions||!E)||void 0,isMemberCompletion:fae(d),isNewIdentifierLocation:f,optionalReplacementSpan:lae(m),entries:A}}(r,e,t,p,n,h,o,l,i,u);return(null==a?void 0:a.isIncomplete)&&(null==m||m.set(a)),a;case 1:return iae([...Wce.getJSDocTagNameCompletions(),...oae(r,i,f,p,o,!0)]);case 2:return iae([...Wce.getJSDocTagCompletions(),...oae(r,i,f,p,o,!1)]);case 3:return iae(Wce.getJSDocParameterNameCompletions(h.tag));case 4:return y=h.keywordCompletions,{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:h.isNewIdentifierLocation,entries:y.slice()};default:return xn.assertNever(h)}}function nae(e,t){var n,r;let i=$t(e.sortText,t.sortText);return 0===i&&(i=$t(e.name,t.name)),0===i&&(null==(n=e.data)?void 0:n.moduleSpecifier)&&(null==(r=t.data)?void 0:r.moduleSpecifier)&&(i=Xk(e.data.moduleSpecifier,t.data.moduleSpecifier)),0===i?-1:i}function rae(e){return!!(null==e?void 0:e.moduleSpecifier)}function iae(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:e}}function oae(e,t,n,r,i,o){const a=kX(e,t);if(!F_(a)&&!oF(a))return[];const s=oF(a)?a:a.parent;if(!oF(s))return[];const c=s.parent;if(!cu(c))return[];const l=Im(e),u=i.includeCompletionsWithSnippetText||void 0,_=N(s.tags,(e=>xF(e)&&e.getEnd()<=t));return q(c.parameters,(e=>{if(!Oc(e).length){if(qD(e.name)){const t={tabstop:1},a=e.name.text;let s=sae(a,e.initializer,e.dotDotDotToken,l,!1,!1,n,r,i),c=u?sae(a,e.initializer,e.dotDotDotToken,l,!1,!0,n,r,i,t):void 0;return o&&(s=s.slice(1),c&&(c=c.slice(1))),{name:s,kind:"parameter",sortText:Uoe.LocationPriority,insertText:u?c:void 0,isSnippet:u}}if(e.parent.parameters.indexOf(e)===_){const t=`param${_}`,a=aae(t,e.name,e.initializer,e.dotDotDotToken,l,!1,n,r,i),s=u?aae(t,e.name,e.initializer,e.dotDotDotToken,l,!0,n,r,i):void 0;let c=a.join($b(r)+"* "),d=null==s?void 0:s.join($b(r)+"* ");return o&&(c=c.slice(1),d&&(d=d.slice(1))),{name:c,kind:"parameter",sortText:Uoe.LocationPriority,insertText:u?d:void 0,isSnippet:u}}}}))}function aae(e,t,n,r,i,o,a,s,c){return i?l(e,t,n,r,{tabstop:1}):[sae(e,n,r,i,!1,o,a,s,c,{tabstop:1})];function l(e,t,n,r,l){if(VE(t)&&!r){const _={tabstop:l.tabstop},d=sae(e,n,r,i,!0,o,a,s,c,_);let p=[];for(const n of t.elements){const t=u(e,n,_);if(!t){p=void 0;break}p.push(...t)}if(p)return l.tabstop=_.tabstop,[d,...p]}return[sae(e,n,r,i,!1,o,a,s,c,l)]}function u(e,t,n){if(!t.propertyName&&qD(t.name)||qD(t.name)){const r=t.propertyName?Mp(t.propertyName):t.name.text;if(!r)return;return[sae(`${e}.${r}`,t.initializer,t.dotDotDotToken,i,!1,o,a,s,c,n)]}if(t.propertyName){const r=Mp(t.propertyName);return r&&l(`${e}.${r}`,t.name,t.initializer,t.dotDotDotToken,n)}}}function sae(e,t,n,r,i,o,a,s,c,l){if(o&&xn.assertIsDefined(l),t&&(e=function(e,t){const n=t.getText().trim();return n.includes("\n")||n.length>80?`[${e}]`:`[${e}=${n}]`}(e,t)),o&&(e=KT(e)),r){let r="*";if(i)xn.assert(!n,"Cannot annotate a rest parameter with type 'Object'."),r="Object";else{if(t){const e=a.getTypeAtLocation(t.parent);if(!(16385&e.flags)){const n=t.getSourceFile(),i=0===AQ(n,c)?268435456:0,l=a.typeToTypeNode(e,mc(t,cu),i);if(l){const e=o?vae({removeComments:!0,module:s.module,target:s.target}):rq({removeComments:!0,module:s.module,target:s.target});iw(l,1),r=e.printNode(4,l,n)}}}o&&"*"===r&&(r=`\${${l.tabstop++}:${r}}`)}return`@param {${!i&&n?"...":""}${r}} ${e} ${o?`\${${l.tabstop++}}`:""}`}return`@param ${e} ${o?`\${${l.tabstop++}}`:""}`}function cae(e,t,n){return{kind:4,keywordCompletions:Jae(e,t),isNewIdentifierLocation:n}}function lae(e){return 80===(null==e?void 0:e.kind)?aQ(e):void 0}function uae(e,t){return!Im(e)||!!uT(e,t)}function _ae(e,t,n,r,i,o,a){const s=e.clauses,c=o.getTypeChecker(),l=c.getTypeAtLocation(e.parent.expression);if(l&&l.isUnion()&&x(l.types,(e=>e.isLiteral()))){const u=HZ(c,s),_=wS(r),d=AQ(t,n),p=a8.createImportAdder(t,o,n,i),f=[];for(const t of l.types)if(1024&t.flags){xn.assert(t.symbol,"An enum member type should have a symbol"),xn.assert(t.symbol.parent,"An enum member type should have a parent symbol (the enum symbol)");const n=t.symbol.valueDeclaration&&c.getConstantValue(t.symbol.valueDeclaration);if(void 0!==n){if(u.hasValue(n))continue;u.addValue(n)}const r=a8.typeToAutoImportableTypeNode(c,p,t,e,_);if(!r)return;const i=dae(r,_,d);if(!i)return;f.push(i)}else if(!u.hasValue(t.value))switch(typeof t.value){case"object":f.push(t.value.negative?YC.createPrefixUnaryExpression(41,YC.createBigIntLiteral({negative:!1,base10Value:t.value.base10Value})):YC.createBigIntLiteral(t.value));break;case"number":f.push(t.value<0?YC.createPrefixUnaryExpression(41,YC.createNumericLiteral(-t.value)):YC.createNumericLiteral(t.value));break;case"string":f.push(YC.createStringLiteral(t.value,0===d))}if(0===f.length)return;const m=O(f,(e=>YC.createCaseClause(e,[]))),g=gY(i,null==a?void 0:a.options),h=vae({removeComments:!0,module:r.module,target:r.target,newLine:qZ(g)}),y=a?e=>h.printAndFormatNode(4,e,t,a):e=>h.printNode(4,e,t),v=O(m,((e,t)=>n.includeCompletionsWithSnippetText?`${y(e)}$${t+1}`:`${y(e)}`)).join(g);return{entry:{name:`${h.printNode(4,m[0],t)} ...`,kind:"",sortText:Uoe.GlobalsOrKeywords,insertText:v,hasAction:p.hasFixes()||void 0,source:"SwitchCases/",isSnippet:!!n.includeCompletionsWithSnippetText||void 0},importAdder:p}}}function dae(e,t,n){switch(e.kind){case 183:return pae(e.typeName,t,n);case 199:const r=dae(e.objectType,t,n),i=dae(e.indexType,t,n);return r&&i&&YC.createElementAccessExpression(r,i);case 201:const o=e.literal;switch(o.kind){case 11:return YC.createStringLiteral(o.text,0===n);case 9:return YC.createNumericLiteral(o.text,o.numericLiteralFlags)}return;case 196:const a=dae(e.type,t,n);return a&&(qD(a)?a:YC.createParenthesizedExpression(a));case 186:return pae(e.exprName,t,n);case 205:xn.fail("We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.")}}function pae(e,t,n){if(qD(e))return e;const r=vc(e.right.escapedText);return tC(r,t)?YC.createPropertyAccessExpression(pae(e.left,t,n),r):YC.createElementAccessExpression(pae(e.left,t,n),YC.createStringLiteral(r,0===n))}function fae(e){switch(e){case 0:case 3:case 2:return!0;default:return!1}}function mae(e,t,n){return"object"==typeof n?ST(n)+"n":st(n)?XY(e,t,n):JSON.stringify(n)}function gae(e,t,n){return{name:mae(e,t,n),kind:"string",kindModifiers:"",sortText:Uoe.LocationPriority}}function hae(e,t,n,r,i,o,a,s,c,l,u,_,d,p,f,m,g,h,y,v,b,k,T,C){var w,D;let E,P,N,F,A,I,O,M=oQ(n,o),L=Tae(_);const j=c.getTypeChecker(),R=_&&function(e){return!!(16&e.kind)}(_),B=_&&function(e){return!!(2&e.kind)}(_)||u;if(_&&function(e){return!!(1&e.kind)}(_))E=u?`this${R?"?.":""}[${Sae(a,y,l)}]`:`this${R?"?.":"."}${l}`;else if((B||R)&&p){E=B?u?`[${Sae(a,y,l)}]`:`[${l}]`:l,(R||p.questionDotToken)&&(E=`?.${E}`);const e=uX(p,25,a)||uX(p,29,a);if(!e)return;const t=an(l,p.name.text)?p.name.end:e.end;M=Xs(e.getStart(a),t)}if(f&&(void 0===E&&(E=l),E=`{${E}}`,"boolean"!=typeof f&&(M=aQ(f,a))),_&&function(e){return!!(8&e.kind)}(_)&&p){void 0===E&&(E=l);const e=EX(p.pos,a);let t="";e&&cZ(e.end,e.parent,a)&&(t=";"),t+=`(await ${p.expression.getText()})`,E=u?`${t}${E}`:`${t}${R?"?.":"."}${E}`,M=Xs((lt(p.parent,sP)?p.parent:p.expression).getStart(a),p.end)}if(Goe(_)&&(A=[lY(_.moduleSpecifier)],m&&(({insertText:E,replacementSpan:M}=function(e,t,n,r,i,o,a){const s=t.replacementSpan,c=KT(XY(i,a,n.moduleSpecifier)),l=n.isDefaultExport?1:"export="===n.exportName?2:0,u=a.includeCompletionsWithSnippetText?"$1":"",_=a8.getImportKind(i,l,o,!0),d=t.couldBeTypeOnlyImportSpecifier,p=t.isTopLevelTypeOnly?` ${Ra(156)} `:" ",f=d?`${Ra(156)} `:"",m=r?";":"";switch(_){case 3:return{replacementSpan:s,insertText:`import${p}${KT(e)}${u} = require(${c})${m}`};case 1:return{replacementSpan:s,insertText:`import${p}${KT(e)}${u} from ${c}${m}`};case 2:return{replacementSpan:s,insertText:`import${p}* as ${KT(e)} from ${c}${m}`};case 0:return{replacementSpan:s,insertText:`import${p}{ ${f}${KT(e)}${u} } from ${c}${m}`}}}(l,m,_,g,a,h,y)),F=!!y.includeCompletionsWithSnippetText||void 0)),64===(null==_?void 0:_.kind)&&(I=!0),0===v&&r&&28!==(null==(w=EX(r.pos,a,r))?void 0:w.kind)&&(dE(r.parent.parent)||mE(r.parent.parent)||gE(r.parent.parent)||zN(r.parent)||(null==(D=mc(r.parent,BN))?void 0:D.getLastToken(a))===r||JN(r.parent)&&Xa(a,r.getEnd()).line!==Xa(a,o).line)&&(L="ObjectLiteralMemberWithComma/",I=!0),y.includeCompletionsWithClassMemberSnippets&&y.includeCompletionsWithInsertText&&3===v&&function(e,t,n){if(Mm(t))return!1;return!!(106500&e.flags)&&(gu(t)||t.parent&&t.parent.parent&&mu(t.parent)&&t===t.parent.name&&t.parent.getLastToken(n)===t.parent.name&&gu(t.parent.parent)||t.parent&&IF(t)&&gu(t.parent))}(e,i,a)){let t;const n=yae(s,c,h,y,l,e,i,o,r,b);if(!n)return;({insertText:E,filterText:P,isSnippet:F,importAdder:t}=n),((null==t?void 0:t.hasFixes())||n.eraseRange)&&(I=!0,L="ClassMemberSnippet/")}if(_&&Yoe(_)&&(({insertText:E,isSnippet:F,labelDetails:O}=_),y.useLabelDetailsInCompletionEntries||(l+=O.detail,O=void 0),L="ObjectLiteralMethodSnippet/",t=Uoe.SortBelow(t)),k&&!T&&y.includeCompletionsWithSnippetText&&y.jsxAttributeCompletionStyle&&"none"!==y.jsxAttributeCompletionStyle&&(!NN(i.parent)||!i.parent.initializer)){let t="braces"===y.jsxAttributeCompletionStyle;const n=j.getTypeOfSymbolAtLocation(e,i);"auto"!==y.jsxAttributeCompletionStyle||528&n.flags||1048576&n.flags&&S(n.types,(e=>!!(528&e.flags)))||(402653316&n.flags||1048576&n.flags&&x(n.types,(e=>!!(402686084&e.flags||QX(e))))?(E=`${KT(l)}=${XY(a,y,"$1")}`,F=!0):t=!0),t&&(E=`${KT(l)}={$1}`,F=!0)}if(void 0!==E&&!y.includeCompletionsWithInsertText)return;(Hoe(_)||Goe(_))&&(N=bae(_),I=!m);const J=mc(i,Lx);if(275===(null==J?void 0:J.kind)){const e=Ba(l);J&&e&&(135===e||Ih(e))&&(E=`${l} as ${l}_`)}return{name:l,kind:Hue.getSymbolKind(j,e,i),kindModifiers:Hue.getSymbolModifiers(j,e),sortText:t,source:L,hasAction:!!I||void 0,isRecommended:kae(e,d,j)||void 0,insertText:E,filterText:P,replacementSpan:M,sourceDisplay:A,labelDetails:O,isSnippet:F,isPackageJsonImport:Xoe(_)||void 0,isImportStatementCompletion:!!m||void 0,data:N,...C?{symbol:e}:void 0}}function yae(e,t,n,r,i,o,a,s,c,l){const u=mc(a,gu);if(!u)return;let _,d=i;const p=i,f=t.getTypeChecker(),m=a.getSourceFile(),g=vae({removeComments:!0,module:n.module,target:n.target,omitTrailingSemicolon:!1,newLine:qZ(gY(e,null==l?void 0:l.options))}),h=a8.createImportAdder(m,t,r,e);let y;if(r.includeCompletionsWithSnippetText){_=!0;const e=YC.createEmptyStatement();y=YC.createBlock([e],!0),Fw(e,{kind:0,order:0})}else y=YC.createBlock([],!0);let v=0;const{modifiers:b,range:x,decorators:S}=function(e,t,n){if(!e||Xa(t,n).line>Xa(t,e.getEnd()).line)return{modifiers:0};let r,i,o=0;const a={pos:n,end:n};if(uE(e.parent)&&(i=function(e){if(iu(e))return e.kind;if(qD(e)){const t=xc(e);if(t&&tu(t))return t}}(e))){e.parent.modifiers&&(o|=98303&ib(e.parent.modifiers),r=e.parent.modifiers.filter(cE)||[],a.pos=Math.min(...e.parent.modifiers.map((e=>e.getStart(t)))));const n=ob(i);o&n||(o|=n,a.pos=Math.min(a.pos,e.getStart(t))),e.parent.name!==e&&(a.end=e.parent.name.getStart(t))}return{modifiers:o,decorators:r,range:a.pos{let t=0;k&&(t|=64),mu(e)&&1===f.getMemberOverrideModifierStatus(u,e,o)&&(t|=16),T.length||(v=e.modifierFlagsCache|t),e=YC.replaceModifiers(e,v),T.push(e)}),y,a8.PreserveOptionalFlags.Property,!!k),T.length){const e=8192&o.flags;let t=17|v;t|=e?1024:136;const n=b&t;if(b&~t)return;if(4&v&&1&n&&(v&=-5),0===n||1&n||(v&=-2),v|=n,T=T.map((e=>YC.replaceModifiers(e,v))),null==S?void 0:S.length){const e=T[T.length-1];lI(e)&&(T[T.length-1]=YC.replaceDecoratorsAndModifiers(e,S.concat(Ac(e)||[])))}const r=131073;d=l?g.printAndFormatSnippetList(r,YC.createNodeArray(T),m,l):g.printSnippetList(r,YC.createNodeArray(T),m)}return{insertText:d,filterText:p,isSnippet:_,importAdder:h,eraseRange:x}}function vae(e){let t;const n=r_e.createWriter($b(e)),r=rq(e,n),i={...n,write:e=>o(e,(()=>n.write(e))),nonEscapingWrite:n.write,writeLiteral:e=>o(e,(()=>n.writeLiteral(e))),writeStringLiteral:e=>o(e,(()=>n.writeStringLiteral(e))),writeSymbol:(e,t)=>o(e,(()=>n.writeSymbol(e,t))),writeParameter:e=>o(e,(()=>n.writeParameter(e))),writeComment:e=>o(e,(()=>n.writeComment(e))),writeProperty:e=>o(e,(()=>n.writeProperty(e)))};return{printSnippetList:function(e,n,r){const i=a(e,n,r);return t?r_e.applyChanges(i,t):i},printAndFormatSnippetList:function(e,n,r,i){const o={text:a(e,n,r),getLineAndCharacterOfPosition(e){return Xa(this,e)}},s=UZ(i,r),c=R(n,(e=>{const t=r_e.assignPositionsToNode(e);return A_e.formatNodeGivenIndentation(t,o,r.languageVariant,0,0,{...i,options:s})})),l=t?ve(Z(c,t),((e,t)=>Ft(e.span,t.span))):c;return r_e.applyChanges(o.text,l)},printNode:function(e,n,r){const i=s(e,n,r);return t?r_e.applyChanges(i,t):i},printAndFormatNode:function(e,n,r,i){const o={text:s(e,n,r),getLineAndCharacterOfPosition(e){return Xa(this,e)}},a=UZ(i,r),c=r_e.assignPositionsToNode(n),l=A_e.formatNodeGivenIndentation(c,o,r.languageVariant,0,0,{...i,options:a}),u=t?ve(Z(l,t),((e,t)=>Ft(e.span,t.span))):l;return r_e.applyChanges(o.text,u)}};function o(e,r){const i=KT(e);if(i!==e){const e=n.getTextPos();r();const o=n.getTextPos();t=ue(t||(t=[]),{newText:i,span:{start:e,length:o-e}})}else r()}function a(e,n,o){return t=void 0,i.clear(),r.writeList(e,n,o,i),i.getText()}function s(e,n,o){return t=void 0,i.clear(),r.writeNode(e,n,o,i),i.getText()}}function bae(e){const t=e.fileName?void 0:By(e.moduleSymbol.name),n=!!e.isFromPackageJson||void 0;return Goe(e)?{exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,ambientModuleName:t,fileName:e.fileName,isPackageJsonImport:n}:{exportName:e.exportName,exportMapKey:e.exportMapKey,fileName:e.fileName,ambientModuleName:e.fileName?void 0:By(e.moduleSymbol.name),isPackageJsonImport:!!e.isFromPackageJson||void 0}}function xae(e,t,n){const r="default"===e.exportName,i=!!e.isPackageJsonImport;return rae(e)?{kind:32,exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,symbolName:t,fileName:e.fileName,moduleSymbol:n,isDefaultExport:r,isFromPackageJson:i}:{kind:4,exportName:e.exportName,exportMapKey:e.exportMapKey,symbolName:t,fileName:e.fileName,moduleSymbol:n,isDefaultExport:r,isFromPackageJson:i}}function Sae(e,t,n){return/^\d+$/.test(n)?n:XY(e,t,n)}function kae(e,t,n){return e===t||!!(1048576&e.flags)&&n.getExportSymbolOfSymbol(e)===t}function Tae(e){return Hoe(e)?By(e.moduleSymbol.name):Goe(e)?e.moduleSpecifier:1===(null==e?void 0:e.kind)?"ThisProperty/":64===(null==e?void 0:e.kind)?"TypeOnlyAlias/":void 0}function Cae(e,t,n,r,i,o,a,s,c,l,u,_,d,p,f,m,g,h,y,v,b,x,S,k,T,C=!1){const w=Yn(),D=function(e,t){if(!e)return;const n=mc(e,(e=>zf(e)||ise(e)||Eu(e)?"quit":(sE(e)||aE(e))&&!vE(e.parent))),r=mc(t,(e=>zf(e)||ise(e)||Eu(e)?"quit":KP(e)));return n||r}(r,i),E=lZ(a),P=c.getTypeChecker(),N=new Map;for(let u=0;ue.getSourceFile()===i.getSourceFile())));N.set(O,R),ie(t,j,nae,void 0,!0)}return u("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(Yn()-w)),{has:e=>N.has(e),add:e=>N.set(e,!0)};function F(e,t){var n;let r=e.flags;if(!qN(i)){if(mN(i.parent))return!0;if(lt(D,KP)&&e.valueDeclaration===D)return!1;const o=e.valueDeclaration??(null==(n=e.declarations)?void 0:n[0]);if(D&&o&&(aE(D)&&aE(o)||sE(D)&&sE(o))){const e=o.pos,t=sE(D)?D.parent.parameters:OE(D.parent)?void 0:D.parent.typeParameters;if(e>=D.pos&&t&&emae(n,a,e)===i.name));return void 0!==v?{type:"literal",literal:v}:g(l,((e,t)=>{const n=p[t],r=jae(e,wS(s),n,d,c.isJsxIdentifierExpected);return r&&r.name===i.name&&("ClassMemberSnippet/"===i.source&&106500&e.flags||"ObjectLiteralMethodSnippet/"===i.source&&8196&e.flags||Tae(n)===i.source||"ObjectLiteralMemberWithComma/"===i.source)?{type:"symbol",symbol:e,location:_,origin:n,contextToken:f,previousToken:m,isJsxInitializer:h,isTypeOnlyLocation:y}:void 0}))||{type:"none"}}function Dae(e,t,n,r,i,o,a,s,c){const l=e.getTypeChecker(),u=e.getCompilerOptions(),{name:_,source:d,data:p}=i,{previousToken:f,contextToken:m}=Mae(r,n);if(AX(n,r,f))return cse.getStringLiteralCompletionDetails(_,n,r,f,e,o,c,s);const g=wae(e,t,n,r,i,o,s);switch(g.type){case"request":{const{request:e}=g;switch(e.kind){case 1:return Wce.getJSDocTagNameCompletionDetails(_);case 2:return Wce.getJSDocTagCompletionDetails(_);case 3:return Wce.getJSDocParameterNameCompletionDetails(_);case 4:return Q(e.keywordCompletions,(e=>e.name===_))?Eae(_,"keyword",5):void 0;default:return xn.assertNever(e)}}case"symbol":{const{symbol:t,location:i,contextToken:f,origin:m,previousToken:h}=g,{codeActions:y,sourceDisplay:v}=function(e,t,n,r,i,o,a,s,c,l,u,_,d,p,f,m){if((null==p?void 0:p.moduleSpecifier)&&u&&Yae(n||u,c).replacementSpan)return{codeActions:void 0,sourceDisplay:[lY(p.moduleSpecifier)]};if("ClassMemberSnippet/"===f){const{importAdder:r,eraseRange:u}=yae(a,o,s,d,e,i,t,l,n,_);if((null==r?void 0:r.hasFixes())||u)return{sourceDisplay:void 0,codeActions:[{changes:r_e.ChangeTracker.with({host:a,formatContext:_,preferences:d},(e=>{r&&r.writeFixes(e),u&&e.deleteRange(c,u)})),description:(null==r?void 0:r.hasFixes())?VZ([va.Includes_imports_of_types_referenced_by_0,e]):VZ([va.Update_modifiers_of_0,e])}]}}if(Qoe(r)){const e=a8.getPromoteTypeOnlyCompletionAction(c,r.declaration.name,o,a,_,d);return xn.assertIsDefined(e,"Expected to have a code action for promoting type-only alias"),{codeActions:[e],sourceDisplay:void 0}}if("ObjectLiteralMemberWithComma/"===f&&n){const t=r_e.ChangeTracker.with({host:a,formatContext:_,preferences:d},(e=>e.insertText(c,n.end,",")));if(t)return{sourceDisplay:void 0,codeActions:[{changes:t,description:VZ([va.Add_missing_comma_for_object_member_completion_0,e])}]}}if(!r||!Hoe(r)&&!Goe(r))return{codeActions:void 0,sourceDisplay:void 0};const g=r.isFromPackageJson?a.getPackageJsonAutoImportProvider().getTypeChecker():o.getTypeChecker(),{moduleSymbol:h}=r,y=g.getMergedSymbol(mx(i.exportSymbol||i,g)),v=30===(null==n?void 0:n.kind)&&D_(n.parent),{moduleSpecifier:b,codeAction:x}=a8.getImportCompletionAction(y,h,null==p?void 0:p.exportMapKey,c,e,v,a,o,_,u&&qD(u)?u.getStart(c):l,d,m);return xn.assert(!(null==p?void 0:p.moduleSpecifier)||b===p.moduleSpecifier),{sourceDisplay:[lY(b)],codeActions:[x]}}(_,i,f,m,t,e,o,u,n,r,h,a,s,p,d,c);return Pae(t,Zoe(m)?m.symbolName:t.name,l,n,i,c,y,v)}case"literal":{const{literal:e}=g;return Eae(mae(n,s,e),"string","string"==typeof e?8:7)}case"cases":{const t=_ae(m.parent,n,s,e.getCompilerOptions(),o,e,void 0);if(null==t?void 0:t.importAdder.hasFixes()){const{entry:e,importAdder:n}=t,r=r_e.ChangeTracker.with({host:o,formatContext:a,preferences:s},n.writeFixes);return{name:e.name,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0,codeActions:[{changes:r,description:VZ([va.Includes_imports_of_types_referenced_by_0,_])}]}}return{name:_,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0}}case"none":return Bae().some((e=>e.name===_))?Eae(_,"keyword",5):void 0;default:xn.assertNever(g)}}function Eae(e,t,n){return Nae(e,"",t,[tY(e,n)])}function Pae(e,t,n,r,i,o,a,s){const{displayParts:c,documentation:l,symbolKind:u,tags:_}=n.runWithCancellationToken(o,(t=>Hue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,e,r,i,i,7)));return Nae(t,Hue.getSymbolModifiers(n,e),u,c,l,_,a,s)}function Nae(e,t,n,r,i,o,a,s){return{name:e,kindModifiers:t,kind:n,displayParts:r,documentation:i,tags:o,codeActions:a,source:s,sourceDisplay:s}}function Fae(e,t,n,r,i,o,a){const s=wae(e,t,n,r,i,o,a);return"symbol"===s.type?s.symbol:void 0}var Aae=(e=>(e[e.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",e[e.Global=1]="Global",e[e.PropertyAccess=2]="PropertyAccess",e[e.MemberLike=3]="MemberLike",e[e.String=4]="String",e[e.None=5]="None",e))(Aae||{});function Iae(e,t,n){const r=n.getAccessibleSymbolChain(e,t,-1,!1);return r?Te(r):e.parent&&(function(e){var t;return!!(null==(t=e.declarations)?void 0:t.some((e=>307===e.kind)))}(e.parent)?e:Iae(e.parent,t,n))}function Oae(e,t,n,r,i,o,a,s,c,l){const u=e.getTypeChecker(),_=uae(n,r);let d=Yn(),p=kX(n,i);t("getCompletionData: Get current token: "+(Yn()-d)),d=Yn();const m=qX(n,i,p);t("getCompletionData: Is inside comment: "+(Yn()-d));let h=!1,y=!1,v=!1;if(m){if(VX(n,i)){if(64===n.text.charCodeAt(i-1))return{kind:1};{const e=GG(i,n);if(!/[^*|\s(/)]/.test(n.text.substring(e,i)))return{kind:2}}}const e=function(e,t){return mc(e,(e=>!(!F_(e)||!YG(e,t))||!!oF(e)&&"quit"))}(p,i);if(e){if(e.tagName.pos<=i&&i<=e.tagName.end)return{kind:1};if(AF(e))y=!0;else{const t=function(e){if(function(e){switch(e.kind){case 341:case 348:case 342:case 344:case 346:case 349:case 350:return!0;case 345:return!!e.constraint;default:return!1}}(e)){const t=CF(e)?e.constraint:e.typeExpression;return t&&309===t.kind?t:void 0}if(cF(e)||PF(e))return e.class}(e);if(t&&(p=kX(n,i),p&&(dh(p)||348===p.parent.kind&&p.parent.name===p)||(h=ge(t))),!h&&xF(e)&&(Nd(e.name)||e.name.pos<=i&&i<=e.name.end))return{kind:3,tag:e}}}if(!h&&!y)return void t("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.")}d=Yn();const b=!h&&!y&&Im(n),x=Mae(i,n),k=x.previousToken;let T=x.contextToken;t("getCompletionData: Get previous token: "+(Yn()-d));let C,w,D=p,E=!1,P=!1,N=!1,A=!1,I=!1,O=!1,M=xX(n,i),L=0,j=!1,B=0;if(T){const e=Yae(T,n);if(e.keywordCompletion){if(e.isKeywordOnlyCompletion)return{kind:4,keywordCompletions:[(J=e.keywordCompletion,{name:Ra(J),kind:"keyword",kindModifiers:"",sortText:Uoe.GlobalsOrKeywords})],isNewIdentifierLocation:e.isNewIdentifierLocation};L=function(e){if(156===e)return 8;xn.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters")}(e.keywordCompletion)}if(e.replacementSpan&&o.includeCompletionsForImportStatements&&o.includeCompletionsWithInsertText&&(B|=2,w=e,j=e.isNewIdentifierLocation),!e.replacementSpan&&function(e){const r=Yn(),o=function(e){return(ED(e)||Hl(e))&&(ZG(e,i)||i===e.end&&(!!e.isUnterminated||ED(e)))}(e)||function(e){const t=e.parent,r=t.kind;switch(e.kind){case 28:return 260===r||261===(o=e).parent.kind&&!JX(o,n,u)||243===r||266===r||de(r)||264===r||207===r||265===r||gu(t)&&!!t.typeParameters&&t.typeParameters.end>=e.pos;case 25:case 23:return 207===r;case 59:return 208===r;case 21:return 299===r||de(r);case 19:return 266===r;case 30:return 263===r||231===r||264===r||265===r||pu(r);case 126:return 172===r&&!gu(t.parent);case 26:return 169===r||!!t.parent&&207===t.parent.kind;case 125:case 123:case 124:return 169===r&&!fE(t.parent);case 130:return 276===r||281===r||274===r;case 139:case 153:return!Xae(e);case 80:if(276===r&&e===t.name&&"type"===e.text)return!1;if(mc(e.parent,KP)&&function(e,t){return n.getLineEndOfPosition(e.getEnd())k.end))}(e)||function(e){if(9===e.kind){const t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(e)||function(e){if(12===e.kind)return!0;if(32===e.kind&&e.parent){if(M===e.parent&&(286===M.kind||285===M.kind))return!1;if(286===e.parent.kind)return 286!==M.parent.kind;if(287===e.parent.kind||285===e.parent.kind)return!!e.parent.parent&&284===e.parent.parent.kind}return!1}(e)||CD(e);return t("getCompletionsAtPosition: isCompletionListBlocker: "+(Yn()-r)),o}(T))return t("Returning an empty list because completion was requested in an invalid position."),L?cae(L,b,le()):void 0;let r=T.parent;if(25===T.kind||29===T.kind)switch(E=25===T.kind,P=29===T.kind,r.kind){case 211:if(C=r,D=C.expression,Nd(jx(C))||(QE(D)||cu(D))&&D.end===T.pos&&D.getChildCount(n)&&22!==De(D.getChildren(n)).kind)return;break;case 166:D=r.left;break;case 267:D=r.name;break;case 205:D=r;break;case 236:D=r.getFirstToken(n),xn.assert(102===D.kind||105===D.kind);break;default:return}else if(!w){if(r&&211===r.kind&&(T=r,r=r.parent),p.parent===M)switch(p.kind){case 32:284!==p.parent.kind&&286!==p.parent.kind||(M=p);break;case 44:285===p.parent.kind&&(M=p)}switch(r.kind){case 287:44===T.kind&&(A=!0,M=T);break;case 226:if(!Qae(r))break;case 285:case 284:case 286:O=!0,30===T.kind&&(N=!0,M=T);break;case 294:case 293:(20===k.kind||80===k.kind&&291===k.parent.kind)&&(O=!0);break;case 291:if(r.initializer===k&&k.endCQ(t?s.getPackageJsonAutoImportProvider():e,s)));if(E||P)!function(){V=2;const e=df(D),t=e&&!D.isTypeOf||wf(D.parent)||JX(T,n,u),r=vG(D);if(ou(D)||e||GE(D)){const n=ZP(D.parent);n&&(j=!0);let i=u.getSymbolAtLocation(D);if(i&&(i=mx(i,u),1920&i.flags)){const a=u.getExportsOfModule(i);xn.assertEachIsDefined(a,"getExportsOfModule() should all be defined");const s=t=>u.isValidPropertyAccess(e?D:D.parent,t.name),c=e=>ose(e,u),l=n?e=>{var t;return!!(1920&e.flags)&&!(null==(t=e.declarations)?void 0:t.every((e=>e.parent===D.parent)))}:r?e=>c(e)||s(e):t||h?c:s;for(const e of a)l(e)&&K.push(e);if(!t&&!h&&i.declarations&&i.declarations.some((e=>307!==e.kind&&267!==e.kind&&266!==e.kind))){let e=u.getTypeOfSymbolAtLocation(i,D).getNonOptionalType(),t=!1;if(e.isNullableType()){const n=E&&!P&&!1!==o.includeAutomaticOptionalChainCompletions;(n||P)&&(e=e.getNonNullableType(),n&&(t=!0))}ie(e,!!(65536&D.flags),t)}return}}if(!t||vv(D)){u.tryGetThisTypeAt(D,!1);let e=u.getTypeAtLocation(D).getNonOptionalType();if(t)ie(e.getNonNullableType(),!1,!1);else{let t=!1;if(e.isNullableType()){const n=E&&!P&&!1!==o.includeAutomaticOptionalChainCompletions;(n||P)&&(e=e.getNonNullableType(),n&&(t=!0))}ie(e,!!(65536&D.flags),t)}}}();else if(N)K=u.getJsxIntrinsicTagNamesAt(M),xn.assertEachIsDefined(K,"getJsxIntrinsicTagNames() should all be defined"),se(),V=1,L=0;else if(A){const e=T.parent.parent.openingElement.tagName,t=u.getSymbolAtLocation(e);t&&(K=[t]),V=1,L=0}else if(!se())return L?cae(L,b,j):void 0;t("getCompletionData: Semantic work: "+(Yn()-z));const te=k&&function(e,t,n,r){const{parent:i}=e;switch(e.kind){case 80:return GY(e,r);case 64:switch(i.kind){case 260:return r.getContextualType(i.initializer);case 226:return r.getTypeAtLocation(i.left);case 291:return r.getContextualTypeForJsxAttribute(i);default:return}case 105:return r.getContextualType(i);case 84:const o=lt(i,MN);return o?eZ(o,r):void 0;case 19:return!IN(i)||kN(i.parent)||DN(i.parent)?void 0:r.getContextualTypeForJsxAttribute(i.parent);default:const a=due.getArgumentInfoForCompletions(e,t,n,r);return a?r.getContextualTypeForArgumentAtIndex(a.invocation,a.argumentIndex):QY(e.kind)&&uP(i)&&QY(i.operatorToken.kind)?r.getTypeAtLocation(i.left):r.getContextualType(e,4)||r.getContextualType(e)}}(k,i,n,u),ne=lt(k,$_)||O?[]:q(te&&(te.isUnion()?te.types:[te]),(e=>!e.isLiteral()||1024&e.flags?void 0:e.value)),re=k&&te&&function(e,t,n){return g(t&&(t.isUnion()?t.types:[t]),(t=>{const r=t&&t.symbol;return r&&424&r.flags&&!Tx(r)?Iae(r,e,n):void 0}))}(k,te,u);return{kind:0,symbols:K,completionKind:V,isInSnippetScope:v,propertyAccessToConvert:C,isNewIdentifierLocation:j,location:M,keywordFilters:L,literals:ne,symbolToOriginInfoMap:W,recommendedCompletion:re,previousToken:k,contextToken:T,isJsxInitializer:I,insideJsDocTagTypeExpression:h,symbolToSortTextMap:H,isTypeOnlyLocation:X,isJsxIdentifierExpected:O,isRightOfOpenTag:N,isRightOfDotOrQuestionDot:E||P,importStatementCompletion:w,hasUnresolvedAutoImports:U,flags:B};function ie(e,t,n){j=!!e.getStringIndexType(),P&&Q(e.getCallSignatures())&&(j=!0);const r=205===D.kind?D:D.parent;if(_)for(const t of e.getApparentProperties())u.isValidPropertyAccessForCompletions(r,e,t)&&oe(t,!1,n);else K.push(...F(Hae(e,u),(t=>u.isValidPropertyAccessForCompletions(r,e,t))));if(t&&o.includeCompletionsWithInsertText){const t=u.getPromisedTypeOfPromise(e);if(t)for(const e of t.getApparentProperties())u.isValidPropertyAccessForCompletions(r,t,e)&&oe(e,!0,n)}}function oe(t,r,a){var c;const l=g(t.declarations,(e=>lt(Pc(e),oE)));if(l){const r=ae(l.expression),a=r&&u.getSymbolAtLocation(r),f=a&&Iae(a,T,u),m=f&&OB(f);if(m&&Fx(G,m)){const t=K.length;K.push(f);const r=f.parent;if(r&&nd(r)&&u.tryGetMemberInModuleExportsAndProperties(f.name,r)===f){const a=Os(By(r.name))?null==(c=kd(r))?void 0:c.fileName:void 0,{moduleSpecifier:l}=($||($=a8.createImportSpecifierResolver(n,e,s,o))).getModuleSpecifierForBestExportInfo([{exportKind:0,moduleFileName:a,isFromPackageJson:!1,moduleSymbol:r,symbol:f,targetFlags:mx(f,u).flags}],i,wT(M))||{};if(l){const e={kind:p(6),moduleSymbol:r,isDefaultExport:!1,symbolName:f.name,exportName:f.name,fileName:a,moduleSpecifier:l};W[t]=e}}else W[t]={kind:p(2)}}else if(o.includeCompletionsWithInsertText){if(m&&G.has(m))return;d(t),_(t),K.push(t)}}else d(t),_(t),K.push(t);function _(e){(function(e){return!!(e.valueDeclaration&&256&Qv(e.valueDeclaration)&&gu(e.valueDeclaration.parent))})(e)&&(H[OB(e)]=Uoe.LocalDeclarationPriority)}function d(e){o.includeCompletionsWithInsertText&&(r&&Fx(G,OB(e))?W[K.length]={kind:p(8)}:a&&(W[K.length]={kind:16}))}function p(e){return a?16|e:e}}function ae(e){return qD(e)?e:GE(e)?ae(e.expression):void 0}function se(){const t=function(){const e=function(e){if(!e)return;const t=e.parent;switch(e.kind){case 19:if(CE(t))return t;break;case 27:case 28:case 80:if(171===t.kind&&CE(t.parent))return t.parent}}(T);if(!e)return 0;const t=(AE(e.parent)?e.parent:void 0)||e,n=Gae(t,u);if(!n)return 0;const r=u.getTypeFromTypeNode(t),i=Hae(n,u),o=Hae(r,u),a=new Set;return o.forEach((e=>a.add(e.escapedName))),K=Z(K,F(i,(e=>!a.has(e.escapedName)))),V=0,j=!0,1}()||function(){if(26===(null==T?void 0:T.kind))return 0;const t=K.length,a=function(e,t,n){var r;if(e){const{parent:i}=e;switch(e.kind){case 19:case 28:if(HE(i)||VE(i))return i;break;case 42:return dE(i)?lt(i.parent,HE):void 0;case 134:return lt(i.parent,HE);case 80:if("async"===e.text&&JN(e.parent))return e.parent.parent;{if(HE(e.parent.parent)&&(zN(e.parent)||JN(e.parent)&&Xa(n,e.getEnd()).line!==Xa(n,t).line))return e.parent.parent;const r=mc(i,BN);if((null==r?void 0:r.getLastToken(n))===e&&HE(r.parent))return r.parent}break;default:if((null==(r=i.parent)?void 0:r.parent)&&(dE(i.parent)||mE(i.parent)||gE(i.parent))&&HE(i.parent.parent))return i.parent.parent;if(zN(i)&&HE(i.parent))return i.parent;const o=mc(i,BN);if(59!==e.kind&&(null==o?void 0:o.getLastToken(n))===e&&HE(o.parent))return o.parent}}}(T,i,n);if(!a)return 0;let l,_;if(V=0,210===a.kind){const e=function(e,t){const n=t.getContextualType(e);if(n)return n;const r=ah(e.parent);return uP(r)&&64===r.operatorToken.kind&&e===r.left?t.getTypeAtLocation(r):Xu(r)?t.getContextualType(r):void 0}(a,u);if(void 0===e)return 67108864&a.flags?2:0;const t=u.getContextualType(a,4),n=(t||e).getStringIndexType(),r=(t||e).getNumberIndexType();if(j=!!n||!!r,l=Kae(e,t,a,u),_=a.properties,0===l.length&&!r)return 0}else{xn.assert(206===a.kind),j=!1;const e=sy(a.parent);if(!If(e))return xn.fail("Root declaration is not variable-like.");let t=L_(e)||!!kv(e)||250===e.parent.parent.kind;if(t||169!==e.kind||(Xu(e.parent)?t=!!u.getContextualType(e.parent):174!==e.parent.kind&&178!==e.parent.kind||(t=Xu(e.parent.parent)&&!!u.getContextualType(e.parent.parent))),t){const e=u.getTypeAtLocation(a);if(!e)return 2;l=u.getPropertiesOfType(e).filter((t=>u.isPropertyAccessible(a,!1,!1,e,t))),_=a.elements}}if(l&&l.length>0){const n=function(e,t){if(0===t.length)return e;const n=new Set,r=new Set;for(const e of t){if(303!==e.kind&&304!==e.kind&&208!==e.kind&&174!==e.kind&&177!==e.kind&&178!==e.kind&&305!==e.kind)continue;if(ge(e))continue;let t;if(zN(e))pe(e,n);else if(KE(e)&&e.propertyName)80===e.propertyName.kind&&(t=e.propertyName.escapedText);else{const n=Pc(e);t=n&&Wh(n)?Gh(n):void 0}void 0!==t&&r.add(t)}const i=e.filter((e=>!r.has(e.escapedName)));return me(n,i),i}(l,xn.checkDefined(_));K=Z(K,n),fe(),210===a.kind&&o.includeCompletionsWithObjectLiteralMethodSnippets&&o.includeCompletionsWithInsertText&&(function(e){for(let t=e;t{if(!(8196&t.flags))return;const n=jae(t,wS(r),void 0,0,!1);if(!n)return;const{name:i}=n,a=function(e,t,n,r,i,o,a,s){const c=a.includeCompletionsWithSnippetText||void 0;let l=t;const u=n.getSourceFile(),_=function(e,t,n,r,i,o){const a=e.getDeclarations();if(!a||!a.length)return;const s=r.getTypeChecker(),c=a[0],l=NY(Pc(c),!1),u=s.getWidenedType(s.getTypeOfSymbolAtLocation(e,t)),_=33554432|(0===AQ(n,o)?268435456:0);switch(c.kind){case 171:case 172:case 173:case 174:{let e=1048576&u.flags&&u.types.length<10?s.getUnionType(u.types,2):u;if(1048576&e.flags){const t=F(e.types,(e=>s.getSignaturesOfType(e,0).length>0));if(1!==t.length)return;e=t[0]}if(1!==s.getSignaturesOfType(e,0).length)return;const n=s.typeToTypeNode(e,t,_,a8.getNoopSymbolTrackerWithResolver({program:r,host:i}));if(!n||!SE(n))return;let a;if(o.includeCompletionsWithSnippetText){const e=YC.createEmptyStatement();a=YC.createBlock([e],!0),Fw(e,{kind:0,order:0})}else a=YC.createBlock([],!0);const c=n.parameters.map((e=>YC.createParameterDeclaration(void 0,e.dotDotDotToken,e.name,void 0,void 0,e.initializer)));return YC.createMethodDeclaration(void 0,void 0,l,void 0,void 0,c,void 0,a)}default:return}}(e,n,u,r,i,a);if(!_)return;const d=vae({removeComments:!0,module:o.module,target:o.target,omitTrailingSemicolon:!1,newLine:qZ(gY(i,null==s?void 0:s.options))});l=s?d.printAndFormatSnippetList(80,YC.createNodeArray([_],!0),u,s):d.printSnippetList(80,YC.createNodeArray([_],!0),u);const p=rq({removeComments:!0,module:o.module,target:o.target,omitTrailingSemicolon:!0}),f=YC.createMethodSignature(void 0,"",_.questionToken,_.typeParameters,_.parameters,_.type);return{isSnippet:c,insertText:l,labelDetails:{detail:p.printNode(4,f,u)}}}(t,i,p,e,s,r,o,c);if(!a)return;const l={kind:128,...a};B|=32,W[K.length]=l,K.push(t)})))}var d,p;return 1}()||(w?(j=!0,ce(),1):0)||function(){if(!T)return 0;const e=19===T.kind||28===T.kind?lt(T.parent,Lx):gQ(T)?lt(T.parent.parent,Lx):void 0;if(!e)return 0;gQ(T)||(L=8);const{moduleSpecifier:t}=275===e.kind?e.parent.parent:e.parent;if(!t)return j=!0,275===e.kind?2:0;const n=u.getSymbolAtLocation(t);if(!n)return j=!0,2;V=3,j=!1;const r=u.getExportsAndPropertiesOfModule(n),i=new Set(e.elements.filter((e=>!ge(e))).map((e=>(e.propertyName||e.name).escapedText))),o=r.filter((e=>"default"!==e.escapedName&&!i.has(e.escapedName)));return K=Z(K,o),o.length||(L=0),1}()||function(){if(void 0===T)return 0;const e=19===T.kind||28===T.kind?lt(T.parent,lN):59===T.kind?lt(T.parent.parent,lN):void 0;if(void 0===e)return 0;const t=new Set(e.elements.map(xC));return K=F(u.getTypeAtLocation(e).getApparentProperties(),(e=>!t.has(e.escapedName))),1}()||function(){var e;const t=!T||19!==T.kind&&28!==T.kind?void 0:lt(T.parent,hN);if(!t)return 0;const n=mc(t,_n(qN,ZP));return V=5,j=!1,null==(e=n.locals)||e.forEach(((e,t)=>{var r,i;K.push(e),(null==(i=null==(r=n.symbol)?void 0:r.exports)?void 0:i.has(t))&&(H[OB(e)]=Uoe.OptionalMember)})),1}()||(function(e){if(e){const t=e.parent;switch(e.kind){case 21:case 28:return fE(e.parent)?e.parent:void 0;default:if(ue(e))return t.parent}}}(T)?(V=5,j=!0,L=4,1):0)||function(){const e=function(e,t,n,r){switch(n.kind){case 352:return lt(n.parent,Ax);case 1:const t=lt(we(ut(n.parent,qN).statements),Ax);if(t&&!uX(t,20,e))return t;break;case 81:if(lt(n.parent,uE))return mc(n,gu);break;case 80:if(xc(n))return;if(uE(n.parent)&&n.parent.initializer===n)return;if(Xae(n))return mc(n,Ax)}if(t){if(137===n.kind||qD(t)&&uE(t.parent)&&gu(n))return mc(t,gu);switch(t.kind){case 64:return;case 27:case 20:return Xae(n)&&n.parent.name===n?n.parent.parent:lt(n,Ax);case 19:case 28:return lt(t.parent,Ax);default:if(Ax(n)){if(Xa(e,t.getEnd()).line!==Xa(e,r).line)return n;const i=gu(t.parent.parent)?qae:$ae;return i(t.kind)||42===t.kind||qD(t)&&i(xc(t)??0)?t.parent.parent:void 0}return}}}(n,T,M,i);if(!e)return 0;if(V=3,j=!0,L=42===T.kind?0:gu(e)?2:3,!gu(e))return 1;const t=27===T.kind?T.parent.parent:T.parent;let r=mu(t)?Qv(t):0;if(80===T.kind&&!ge(T))switch(T.getText()){case"private":r|=2;break;case"static":r|=256;break;case"override":r|=16}if(pE(t)&&(r|=256),!(2&r)){const t=R(gu(e)&&16&r?fn(Sh(e)):Ch(e),(t=>{const n=u.getTypeAtLocation(t);return 256&r?(null==n?void 0:n.symbol)&&u.getPropertiesOfType(u.getTypeOfSymbolAtLocation(n.symbol,e)):n&&u.getPropertiesOfType(n)}));K=Z(K,function(e,t,n){const r=new Set;for(const e of t){if(172!==e.kind&&174!==e.kind&&177!==e.kind&&178!==e.kind)continue;if(ge(e))continue;if(Rv(e,2))continue;if(Jv(e)!==!!(256&n))continue;const t=Kh(e.name);t&&r.add(t)}return e.filter((e=>!(r.has(e.escapedName)||!e.declarations||2&fx(e)||e.valueDeclaration&&Zl(e.valueDeclaration))))}(t,e.members,r)),f(K,((e,t)=>{const n=null==e?void 0:e.valueDeclaration;if(n&&mu(n)&&n.name&&oE(n.name)){const n={kind:512,symbolName:u.symbolToString(e)};W[t]=n}}))}return 1}()||function(){const e=function(e){if(e){const t=e.parent;switch(e.kind){case 32:case 31:case 44:case 80:case 211:case 292:case 291:case 293:if(t&&(285===t.kind||286===t.kind)){if(32===e.kind){const r=EX(e.pos,n,void 0);if(!t.typeArguments||r&&44===r.kind)break}return t}if(291===t.kind)return t.parent.parent;break;case 11:if(t&&(291===t.kind||293===t.kind))return t.parent.parent;break;case 20:if(t&&294===t.kind&&t.parent&&291===t.parent.kind)return t.parent.parent.parent;if(t&&293===t.kind)return t.parent.parent}}}(T),t=e&&u.getContextualType(e.attributes);if(!t)return 0;const r=e&&u.getContextualType(e.attributes,4);return K=Z(K,function(e,t){const n=new Set,r=new Set;for(const e of t)ge(e)||(291===e.kind?n.add(lC(e.name)):AN(e)&&pe(e,r));const i=e.filter((e=>!n.has(e.escapedName)));return me(r,i),i}(Kae(t,r,e.attributes,u),e.attributes.properties)),fe(),V=3,j=!1,1}()||(function(){L=function(e){if(e){let t;const n=mc(e.parent,(e=>gu(e)?"quit":!(!uu(e)||t!==e.body)||(t=e,!1)));return n&&n}}(T)?5:1,V=1,j=le(),k!==T&&xn.assert(!!k,"Expected 'contextToken' to be defined when different from 'previousToken'.");const e=k!==T?k.getStart():i,t=function(e,t,n){let r=e;for(;r&&!oX(r,t,n);)r=r.parent;return r}(T,e,n)||n;v=function(e){switch(e.kind){case 307:case 228:case 294:case 241:return!0;default:return b_(e)}}(t);const r=2887656|(X?0:111551),a=k&&!wT(k);K=Z(K,u.getSymbolsInScope(t,r)),xn.assertEachIsDefined(K,"getSymbolsInScope() should all be defined");for(let e=0;ee.getSourceFile()===n))||(H[OB(t)]=Uoe.GlobalsOrKeywords),a&&!(111551&t.flags)){const n=t.declarations&&S(t.declarations,Ul);if(n){const t={kind:64,declaration:n};W[e]=t}}}if(o.includeCompletionsWithInsertText&&307!==t.kind){const e=u.tryGetThisTypeAt(t,!1,gu(t.parent)?t:void 0);if(e&&!function(e,t,n){const r=n.resolveName("self",void 0,111551,!1);if(r&&n.getTypeOfSymbolAtLocation(r,t)===e)return!0;const i=n.resolveName("global",void 0,111551,!1);if(i&&n.getTypeOfSymbolAtLocation(i,t)===e)return!0;const o=n.resolveName("globalThis",void 0,111551,!1);return!(!o||n.getTypeOfSymbolAtLocation(o,t)!==e)}(e,n,u))for(const t of Hae(e,u))W[K.length]={kind:1},K.push(t),H[OB(t)]=Uoe.SuggestedClassMembers}ce(),X&&(L=T&&Qu(T.parent)?6:7)}(),1);return 1===t}function ce(){var t,r;if(!function(){var t;return!!w||!!o.includeCompletionsForModuleExports&&(!(!n.externalModuleIndicator&&!n.commonJsModuleIndicator)||!!TQ(e.getCompilerOptions())||(null==(t=e.getSymlinkCache)?void 0:t.call(e).hasAnySymlinks())||!!e.getCompilerOptions().paths||SQ(e))}())return;if(xn.assert(!(null==a?void 0:a.data),"Should not run 'collectAutoImports' when faster path is available via `data`"),a&&!a.source)return;B|=1;const c=k===T&&w?"":k&&qD(k)?k.text.toLowerCase():"",u=null==(t=s.getModuleSpecifierCache)?void 0:t.call(s),_=i0(n,s,e,o,l),d=null==(r=s.getPackageJsonAutoImportProvider)?void 0:r.call(s),p=a?void 0:bZ(n,o,s);function f(t){const r=lt(t.moduleSymbol.valueDeclaration,qN);if(!r){const r=By(t.moduleSymbol.name);return(!fH.nodeCoreModules.has(r)||an(r,"node:")===$Z(n,e))&&(!p||p.allowsImportingAmbientModule(t.moduleSymbol,ee(t.isFromPackageJson)))}return t0(t.isFromPackageJson?d:e,n,r,o,p,ee(t.isFromPackageJson),u)}eae("collectAutoImports",s,$||($=a8.createImportSpecifierResolver(n,e,s,o)),e,i,o,!!w,wT(M),(e=>{_.search(n.path,N,((e,t)=>{if(!Ts(e,wS(s.getCompilationSettings())))return!1;if(!a&&Mh(e))return!1;if(!(X||w||111551&t))return!1;if(X&&!(790504&t))return!1;const n=e.charCodeAt(0);return(!N||!(n<65||n>90))&&(!!a||sse(e,c))}),((t,n,r,i)=>{if(a&&!Q(t,(e=>a.source===By(e.moduleSymbol.name))))return;if(!(t=F(t,f)).length)return;const o=e.tryResolve(t,r)||{};if("failed"===o)return;let s,c=t[0];"skipped"!==o&&({exportInfo:c=t[0],moduleSpecifier:s}=o);const l=1===c.exportKind;!function(e,t){const n=OB(e);H[n]!==Uoe.GlobalsOrKeywords&&(W[K.length]=t,H[n]=w?Uoe.LocationPriority:Uoe.AutoImportSuggestions,K.push(e))}(l&&Ab(xn.checkDefined(c.symbol))||xn.checkDefined(c.symbol),{kind:s?32:4,moduleSpecifier:s,symbolName:n,exportMapKey:i,exportName:2===c.exportKind?"export=":xn.checkDefined(c.symbol).name,fileName:c.moduleFileName,isDefaultExport:l,moduleSymbol:c.moduleSymbol,isFromPackageJson:c.isFromPackageJson})})),U=e.skippedAny(),B|=e.resolvedAny()?8:0,B|=e.resolvedBeyondLimit()?16:0}))}function le(){if(T){const e=T.parent.kind,t=Uae(T);switch(t){case 28:return 213===e||176===e||214===e||209===e||226===e||184===e||210===e;case 21:return 213===e||176===e||214===e||217===e||196===e;case 23:return 209===e||181===e||167===e;case 144:case 145:case 102:return!0;case 25:return 267===e;case 19:return 263===e||210===e;case 64:return 260===e||226===e;case 16:return 228===e;case 17:return 239===e;case 134:return 174===e||304===e;case 42:return 174===e}if(qae(t))return!0}return!1}function ue(e){return!!e.parent&&sE(e.parent)&&fE(e.parent.parent)&&(nu(e.kind)||dh(e))}function _e(e,t){return 64!==e.kind&&(27===e.kind||!ix(e.end,t,n))}function de(e){return pu(e)&&176!==e}function pe(e,t){const n=e.expression,r=u.getSymbolAtLocation(n),i=r&&u.getTypeOfSymbolAtLocation(r,n),o=i&&i.properties;o&&o.forEach((e=>{t.add(e.name)}))}function fe(){K.forEach((e=>{if(16777216&e.flags){const t=OB(e);H[t]=H[t]??Uoe.OptionalMember}}))}function me(e,t){if(0!==e.size)for(const n of t)e.has(n.name)&&(H[OB(n)]=Uoe.MemberDeclaredBySpreadAssignment)}function ge(e){return e.getStart(n)<=i&&i<=e.getEnd()}}function Mae(e,t){const n=EX(e,t);return n&&e<=n.end&&(hl(n)||Ph(n.kind))?{contextToken:EX(n.getFullStart(),t,void 0),previousToken:n}:{contextToken:n,previousToken:n}}function Lae(e,t,n,r){const i=t.isPackageJsonImport?r.getPackageJsonAutoImportProvider():n,o=i.getTypeChecker(),a=t.ambientModuleName?o.tryFindAmbientModule(t.ambientModuleName):t.fileName?o.getMergedSymbol(xn.checkDefined(i.getSourceFile(t.fileName)).symbol):void 0;if(!a)return;let s="export="===t.exportName?o.resolveExternalModuleSymbol(a):o.tryGetMemberInModuleExportsAndProperties(t.exportName,a);return s?(s="default"===t.exportName&&Ab(s)||s,{symbol:s,origin:xae(t,e,a)}):void 0}function jae(e,t,n,r,i){if(function(e){return!!(e&&256&e.kind)}(n))return;const o=function(e){return Hoe(e)||Goe(e)||Zoe(e)}(n)?n.symbolName:e.name;if(void 0===o||1536&e.flags&&Km(o.charCodeAt(0))||Yh(e))return;const a={name:o,needsConvertPropertyAccess:!1};if(Ts(o,t,i?1:0)||e.valueDeclaration&&Zl(e.valueDeclaration))return a;switch(r){case 3:return Zoe(n)?{name:n.symbolName,needsConvertPropertyAccess:!1}:void 0;case 0:return{name:JSON.stringify(o),needsConvertPropertyAccess:!1};case 2:case 1:return 32===o.charCodeAt(0)?void 0:{name:o,needsConvertPropertyAccess:!0};case 5:case 4:return a;default:xn.assertNever(r)}}var Rae=[],Bae=bt((()=>{const e=[];for(let t=83;t<=165;t++)e.push({name:Ra(t),kind:"keyword",kindModifiers:"",sortText:Uoe.GlobalsOrKeywords});return e}));function Jae(e,t){if(!t)return zae(e);const n=e+8+1;return Rae[n]||(Rae[n]=zae(e).filter((e=>!function(e){switch(e){case 128:case 133:case 163:case 136:case 138:case 94:case 162:case 119:case 140:case 120:case 142:case 143:case 144:case 145:case 146:case 150:case 151:case 164:case 123:case 124:case 125:case 148:case 154:case 155:case 156:case 158:case 159:return!0;default:return!1}}(Ba(e.name)))))}function zae(e){return Rae[e]||(Rae[e]=Bae().filter((t=>{const n=Ba(t.name);switch(e){case 0:return!1;case 1:return Vae(n)||138===n||144===n||156===n||145===n||128===n||fQ(n)&&157!==n;case 5:return Vae(n);case 2:return qae(n);case 3:return $ae(n);case 4:return nu(n);case 6:return fQ(n)||87===n;case 7:return fQ(n);case 8:return 156===n;default:return xn.assertNever(e)}})))}function $ae(e){return 148===e}function qae(e){switch(e){case 128:case 129:case 137:case 139:case 153:case 134:case 138:case 164:return!0;default:return ru(e)}}function Vae(e){return 134===e||135===e||160===e||130===e||152===e||156===e||!Ah(e)&&!qae(e)}function Uae(e){return qD(e)?xc(e)??0:e.kind}function Kae(e,t,n,r){const i=t&&t!==e,o=!i||3&t.flags?e:r.getUnionType([e,t]),a=function(e,t,n){return e.isUnion()?n.getAllPossiblePropertiesOfTypes(F(e.types,(e=>!(402784252&e.flags||n.isArrayLikeType(e)||n.isTypeInvalidDueToUnionDiscriminant(e,t)||n.typeHasCallOrConstructSignatures(e)||e.isClass()&&Wae(e.getApparentProperties()))))):e.getApparentProperties()}(o,n,r);return o.isClass()&&Wae(a)?[]:i?F(a,(function(e){return!p(e.declarations)||Q(e.declarations,(e=>e.parent!==n))})):a}function Wae(e){return Q(e,(e=>!!(6&fx(e))))}function Hae(e,t){return e.isUnion()?xn.checkEachDefined(t.getAllPossiblePropertiesOfTypes(e.types),"getAllPossiblePropertiesOfTypes() should all be defined"):xn.checkEachDefined(e.getApparentProperties(),"getApparentProperties() should all be defined")}function Gae(e,t){if(!e)return;if(wu(e)&&B_(e.parent))return t.getTypeArgumentConstraint(e);const n=Gae(e.parent,t);if(n)switch(e.kind){case 171:return t.getTypeOfPropertyOfContextualType(n,e.symbol.escapedName);case 193:case 187:case 192:return n}}function Xae(e){return e.parent&&Tu(e.parent)&&Ax(e.parent.parent)}function Qae({left:e}){return Nd(e)}function Yae(e,t){var n,r,i;let o,a=!1;const s=function(){const n=e.parent;if(rN(n)){const r=n.getLastToken(t);return qD(e)&&r!==e?(o=161,void(a=!0)):(o=156===e.kind?void 0:156,rse(n.moduleReference)?n:void 0)}if(tse(n,e)&&nse(n.parent))return n;if(!pN(n)&&!_N(n))return gN(n)&&42===e.kind||hN(n)&&20===e.kind?(a=!0,void(o=161)):nE(e)&&qN(n)?(o=156,e):nE(e)&&iN(n)?(o=156,rse(n.moduleSpecifier)?n:void 0):void 0;if(n.parent.isTypeOnly||19!==e.kind&&102!==e.kind&&28!==e.kind||(o=156),nse(n)){if(20!==e.kind&&80!==e.kind)return n.parent.parent;a=!0,o=161}}();return{isKeywordOnlyCompletion:a,keywordCompletion:o,isNewIdentifierLocation:!(!s&&156!==o),isTopLevelTypeOnly:!!(null==(r=null==(n=lt(s,iN))?void 0:n.importClause)?void 0:r.isTypeOnly)||!!(null==(i=lt(s,rN))?void 0:i.isTypeOnly),couldBeTypeOnlyImportSpecifier:!!s&&tse(s,e),replacementSpan:Zae(s)}}function Zae(e){var t;if(!e)return;const n=mc(e,_n(iN,rN,AF))??e,r=n.getSourceFile();if(Xb(n,r))return aQ(n,r);xn.assert(102!==n.kind&&276!==n.kind);const i=272===n.kind||351===n.kind?ese(null==(t=n.importClause)?void 0:t.namedBindings)??n.moduleSpecifier:n.moduleReference,o={pos:n.getFirstToken().getStart(),end:i.pos};return Xb(o,r)?lQ(o):void 0}function ese(e){var t;return S(null==(t=lt(e,pN))?void 0:t.elements,(t=>{var n;return!t.propertyName&&Mh(t.name.text)&&28!==(null==(n=EX(t.name.pos,e.getSourceFile(),e))?void 0:n.kind)}))}function tse(e,t){return fN(e)&&(e.isTypeOnly||t===e.name&&gQ(t))}function nse(e){if(!rse(e.parent.parent.moduleSpecifier)||e.parent.name)return!1;if(pN(e)){const t=ese(e);return(t?e.elements.indexOf(t):e.elements.length)<2}return!0}function rse(e){var t;return!!Nd(e)||!(null==(t=lt(SN(e)?e.expression:e,$_))?void 0:t.text)}function ise(e){return e.parent&&rP(e.parent)&&(e.parent.body===e||39===e.kind)}function ose(e,t,n=new Map){return r(e)||r(mx(e.exportSymbol||e,t));function r(e){return!!(788968&e.flags)||t.isUnknownSymbol(e)||!!(1536&e.flags)&&Fx(n,OB(e))&&t.getExportsOfModule(e).some((e=>ose(e,t,n)))}}function ase(e,t){const n=mx(e,t).declarations;return!!p(n)&&x(n,zZ)}function sse(e,t){if(0===t.length)return!0;let n,r=!1,i=0;const o=e.length;for(let s=0;sdse,getStringLiteralCompletions:()=>_se});var lse={directory:0,script:1,"external module name":2};function use(){const e=new Map;return{add:function(t){const n=e.get(t.name);(!n||lse[n.kind]t>=e.pos&&t<=e.end));if(!a)return;const s=e.text.slice(a.pos,t),c=Mse.exec(s);if(!c)return;const[,l,u,_]=c,d=Ro(e.path),p="path"===u?Cse(_,d,kse(n,0,e),r,!0,e.path):"types"===u?Ose(r,n,d,Nse(_),kse(n,1,e)):xn.fail();return xse(_,a.pos+l.length,$e(p.values()))}(e,t,r,i);return n&&pse(n)}if(AX(e,t,n)){if(!n||!$_(n))return;return function(e,t,n,r,i,o,a,s,c,l){if(void 0===e)return;const u=sQ(t,c);switch(e.kind){case 0:return pse(e.paths);case 1:{const _=[];return Cae(e.symbols,_,t,t,n,c,n,r,i,99,o,4,s,a,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,l),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:e.hasIndexSignature,optionalReplacementSpan:u,entries:_}}case 2:{const n=15===t.kind?96:an(Gd(t),"'")?39:34,r=e.types.map((e=>({name:Fy(e.value,n),kindModifiers:"",kind:"string",sortText:Uoe.LocationPriority,replacementSpan:oQ(t,c)})));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:e.isNewIdentifier,optionalReplacementSpan:u,entries:r}}default:return xn.assertNever(e)}}(mse(e,n,t,o,i,s),n,e,i,o,a,r,s,t,c)}}function dse(e,t,n,r,i,o,a,s){if(!r||!$_(r))return;const c=mse(t,r,n,i,o,s);return c&&function(e,t,n,r,i,o){switch(n.kind){case 0:{const t=S(n.paths,(t=>t.name===e));return t&&Nae(e,fse(t.extension),t.kind,[lY(e)])}case 1:{const a=S(n.symbols,(t=>t.name===e));return a&&Pae(a,a.name,i,r,t,o)}case 2:return S(n.types,(t=>t.value===e))?Nae(e,"","string",[lY(e)]):void 0;default:return xn.assertNever(n)}}(e,r,c,t,i.getTypeChecker(),a)}function pse(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!0,entries:e.map((({name:e,kind:t,span:n,extension:r})=>({name:e,kind:t,kindModifiers:fse(r),sortText:Uoe.LocationPriority,replacementSpan:n})))}}function fse(e){switch(e){case".d.ts":return".d.ts";case".js":return".js";case".json":return".json";case".jsx":return".jsx";case".ts":return".ts";case".tsx":return".tsx";case".d.mts":return".d.mts";case".mjs":return".mjs";case".mts":return".mts";case".d.cts":return".d.cts";case".cjs":return".cjs";case".cts":return".cts";case".tsbuildinfo":return xn.fail("Extension .tsbuildinfo is unsupported.");case void 0:return"";default:return xn.assertNever(e)}}function mse(e,t,n,r,i,o){const a=r.getTypeChecker(),s=gse(t.parent);switch(s.kind){case 201:{const c=gse(s.parent);return 205===c.kind?{kind:0,paths:Sse(e,t,r,i,o)}:function e(t){switch(t.kind){case 233:case 183:{const e=mc(s,(e=>e.parent===t));return e?{kind:2,types:yse(a.getTypeArgumentConstraint(e)),isNewIdentifier:!1}:void 0}case 199:const{indexType:i,objectType:o}=t;if(!YG(i,n))return;return hse(a.getTypeFromTypeNode(o));case 192:{const n=e(gse(t.parent));if(!n)return;const i=(r=s,q(t.types,(e=>e!==r&&JE(e)&&wD(e.literal)?e.literal.text:void 0)));return 1===n.kind?{kind:1,symbols:n.symbols.filter((e=>!D(i,e.name))),hasIndexSignature:n.hasIndexSignature}:{kind:2,types:n.types.filter((e=>!D(i,e.value))),isNewIdentifier:!1}}default:return}var r}(c)}case 303:return HE(s.parent)&&s.name===t?function(e,t){const n=e.getContextualType(t);if(!n)return;return{kind:1,symbols:Kae(n,e.getContextualType(t,4),t,e),hasIndexSignature:ZY(n)}}(a,s.parent):c()||c(0);case 212:{const{expression:e,argumentExpression:n}=s;return t===lh(n)?hse(a.getTypeAtLocation(e)):void 0}case 213:case 214:case 291:if(!function(e){return QE(e.parent)&&Se(e.parent.arguments)===e&&qD(e.parent.expression)&&"require"===e.parent.expression.escapedText}(t)&&!uf(s)){const r=due.getArgumentInfoForCompletions(291===s.kind?s.parent:t,n,e,a);return r&&function(e,t,n,r){let i=!1;const o=new Map,a=D_(e)?xn.checkDefined(mc(t.parent,NN)):t,s=R(r.getCandidateSignaturesForStringLiteralCompletions(e,a),(t=>{if(!JB(t)&&n.argumentCount>t.parameters.length)return;let s=t.getTypeParameterAtPosition(n.argumentIndex);if(D_(e)){const e=r.getTypeOfPropertyOfType(s,uC(a.name));e&&(s=e)}return i=i||!!(4&s.flags),yse(s,o)}));return p(s)?{kind:2,types:s,isNewIdentifier:i}:void 0}(r.invocation,t,r,a)||c(0)}case 272:case 278:case 283:case 351:return{kind:0,paths:Sse(e,t,r,i,o)};case 296:const l=HZ(a,s.parent.clauses),u=c();if(!u)return;return{kind:2,types:u.types.filter((e=>!l.hasValue(e.value))),isNewIdentifier:!1};default:return c()||c(0)}function c(e=4){const n=yse(GY(t,a,e));if(n.length)return{kind:2,types:n,isNewIdentifier:!1}}}function gse(e){switch(e.kind){case 196:return oh(e);case 217:return ah(e);default:return e}}function hse(e){return e&&{kind:1,symbols:F(e.getApparentProperties(),(e=>!(e.valueDeclaration&&Zl(e.valueDeclaration)))),hasIndexSignature:ZY(e)}}function yse(e,t=new Map){return e?(e=bQ(e)).isUnion()?R(e.types,(e=>yse(e,t))):!e.isStringLiteral()||1024&e.flags||!Fx(t,e.value)?u:[e]:u}function vse(e,t,n){return{name:e,kind:t,extension:n}}function bse(e){return vse(e,"directory",void 0)}function xse(e,t,n){const r=function(e,t){const n=Math.max(e.lastIndexOf(xo),e.lastIndexOf(So)),r=-1!==n?n+1:0,i=e.length-r;return 0===i||Ts(e.substr(r,i),99)?void 0:Gs(t+r,i)}(e,t),i=0===e.length?void 0:Gs(t,e.length);return n.map((({name:e,kind:t,extension:n})=>e.includes(xo)||e.includes(So)?{name:e,kind:t,extension:n,span:i}:{name:e,kind:t,extension:n,span:r}))}function Sse(e,t,n,r,i){return xse(t.text,t.getStart(e)+1,function(e,t,n,r,i){const o=Vo(t.text),a=$_(t)?n.getModeForUsageLocation(e,t):void 0,s=e.path,c=Ro(s),l=n.getCompilerOptions(),_=n.getTypeChecker(),d=kse(l,1,e,_,i,a);return function(e){if(e&&e.length>=2&&46===e.charCodeAt(0)){const t=e.length>=3&&46===e.charCodeAt(1)?2:1,n=e.charCodeAt(t);return 47===n||92===n}return!1}(o)||!l.baseUrl&&!l.paths&&(wo(o)||Co(o))?function(e,t,n,r,i,o){return n.rootDirs?function(e,t,n,r,i,o,a){return ne(R(function(e,t,n,r){const i=g(e=e.map((e=>ea(Xo(wo(e)?e:Ko(t,e))))),(e=>la(e,n,t,r)?n.substr(e.length):void 0));return ne([...e.map((e=>Ko(e,i))),n].map((e=>Zo(e))),Et,Mt)}(e,i.project||o.getCurrentDirectory(),n,!(o.useCaseSensitiveFileNames&&o.useCaseSensitiveFileNames())),(e=>$e(Cse(t,e,r,o,!0,a).values()))),((e,t)=>e.name===t.name&&e.kind===t.kind&&e.extension===t.extension))}(n.rootDirs,e,t,o,n,r,i):$e(Cse(e,t,o,r,!0,i).values())}(o,c,l,r,s,d):function(e,t,n,r,i,o,a){const{baseUrl:s,paths:c}=r,l=use(),_=ES(r);if(s){const t=Xo(Ko(i.getCurrentDirectory(),s));Cse(e,t,o,i,!1,void 0,l)}if(c){const t=rv(r,i);Dse(l,e,t,o,i,c)}const d=Nse(e);for(const t of function(e,t,n){const r=n.getAmbientModules().map((e=>By(e.name))).filter((t=>an(t,e)&&!t.includes("*")));if(void 0!==t){const e=ea(t);return r.map((t=>sn(t,e)))}return r}(e,d,a))l.add(vse(t,"external module name",void 0));if(Ose(i,r,t,d,o,l),DQ(_)){let a=!1;if(void 0===d)for(const e of function(e,t){if(!e.readFile||!e.fileExists)return u;const n=[];for(const r of gZ(t,e)){const t=Bb(r,e);for(const e of Lse){const r=t[e];if(r)for(const e in r)Le(r,e)&&!an(e,"@types/")&&n.push(e)}}return n}(i,t)){const t=vse(e,"external module name",void 0);l.has(t.name)||(a=!0,l.add(t))}if(!a){let a=t=>{const n=Ko(t,"node_modules");pZ(i,n)&&Cse(e,n,o,i,!1,void 0,l)};if(d&&IS(r)){const t=a;a=a=>{const s=$o(e);s.shift();let c=s.shift();if(!c)return t(a);if(an(c,"@")){const e=s.shift();if(!e)return t(a);c=Ko(c,e)}const u=Ko(a,"node_modules",c),_=Ko(u,"package.json");if(dZ(i,_)){const t=Bb(_,i).exports;if(t){if("object"!=typeof t||null===t)return;const a=Re(t),c=s.join("/")+(s.length&&Oo(e)?"/":""),_=rj(r,n);return void Ese(l,!0,c,u,o,i,a,(e=>fn(Pse(t[e],_))),rR)}}return t(a)}}ga(t,a)}}return $e(l.values())}(o,c,a,l,r,d,_)}(e,t,n,r,i))}function kse(e,t,n,r,i,o){return{extensionsToSearch:j(Tse(e,r)),referenceKind:t,importingSourceFile:n,endingPreference:null==i?void 0:i.importModuleSpecifierEnding,resolutionMode:o}}function Tse(e,t){const n=t?q(t.getAmbientModules(),(e=>{const t=e.name.slice(1,-1);if(t.startsWith("*.")&&!t.includes("/"))return t.slice(1)})):[],r=[...zk(e),n];return DQ(ES(e))?$k(e,r):r}function Cse(e,t,n,r,i,o,a=use()){var s;void 0===e&&(e=""),Oo(e=Vo(e))||(e=Ro(e)),""===e&&(e="."+xo);const c=Wo(t,e=ea(e)),l=Oo(c)?c:Ro(c);if(!i){const e=hZ(l,r);if(e){const t=Bb(e,r).typesVersions;if("object"==typeof t){const i=null==(s=XL(t))?void 0:s.paths;if(i){const t=Ro(e);if(Dse(a,c.slice(ea(t).length),t,n,r,i))return a}}}}const u=!(r.useCaseSensitiveFileNames&&r.useCaseSensitiveFileNames());if(!pZ(r,l))return a;const _=_Z(r,l,n.extensionsToSearch,void 0,["./*"]);if(_)for(let e of _){if(e=Xo(e),o&&0===ca(e,o,t,u))continue;const{name:i,extension:s}=wse(Bo(e),r.getCompilationSettings(),n,!1);a.add(vse(i,"script",s))}const d=uZ(r,l);if(d)for(const e of d){const t=Bo(Xo(e));"@types"!==t&&a.add(bse(t))}return a}function wse(e,t,n,r){const i=JR.tryGetRealFileNameForNonJsDeclarationFileName(e);if(i)return{name:i,extension:lT(i)};if(0===n.referenceKind)return{name:e,extension:lT(e)};let o=$R({importModuleSpecifierEnding:n.endingPreference},t,n.importingSourceFile).getAllowedEndingsInPreferredOrder(n.resolutionMode);if(r&&(o=o.filter((e=>0!==e&&1!==e))),3===o[0]){if(Io(e,Bk))return{name:e,extension:lT(e)};const n=JR.tryGetJSExtensionForFile(e,t);return n?{name:tT(e,n),extension:n}:{name:e,extension:lT(e)}}if(!r&&(0===o[0]||1===o[0])&&Io(e,[".js",".jsx",".ts",".tsx",".d.ts"]))return{name:Yk(e),extension:lT(e)};const a=JR.tryGetJSExtensionForFile(e,t);return a?{name:tT(e,a),extension:a}:{name:e,extension:lT(e)}}function Dse(e,t,n,r,i,o){return Ese(e,!1,t,n,r,i,Re(o),(e=>o[e]),((e,t)=>{const n=nT(e),r=nT(t),i="object"==typeof n?n.prefix.length:e.length;return Nt("object"==typeof r?r.prefix.length:t.length,i)}))}function Ese(e,t,n,r,i,o,a,s,c){let l,u=[];for(const e of a){if("."===e)continue;const a=e.replace(/^\.\//,""),_=s(e);if(_){const s=nT(a);if(!s)continue;const d="object"==typeof s&&ln(s,n);d&&(void 0===l||-1===c(e,l))&&(l=e,u=u.filter((e=>!e.matchedPattern))),"string"!=typeof s&&void 0!==l&&1===c(e,l)||u.push({matchedPattern:d,results:Fse(a,_,n,r,i,t&&d,o).map((({name:e,kind:t,extension:n})=>vse(e,t,n)))})}}return u.forEach((t=>t.results.forEach((t=>e.add(t))))),void 0!==l}function Pse(e,t){if("string"==typeof e)return e;if(e&&"object"==typeof e&&!ot(e))for(const n in e)if("default"===n||t.includes(n)||aR(t,n))return Pse(e[n],t)}function Nse(e){return jse(e)?Oo(e)?e:Ro(e):void 0}function Fse(e,t,n,r,i,o,a){if(!Wt(e,"*"))return e.includes("*")?u:l(e,"script");const s=e.slice(0,e.length-1),c=cn(n,s);return void 0===c?"/"===e[e.length-2]?l(s,"directory"):R(t,(e=>{var t;return null==(t=Ase("",r,e,i,o,a))?void 0:t.map((({name:e,...t})=>({name:s+e,...t})))})):R(t,(e=>Ase(c,r,e,i,o,a)));function l(e,t){return an(e,n)?[{name:Zo(e),kind:t,extension:void 0}]:u}}function Ase(e,t,n,r,i,o){if(!o.readDirectory)return;const a=nT(n);if(void 0===a||st(a))return;const s=Wo(a.prefix),c=Oo(a.prefix)?s:Ro(s),l=Oo(a.prefix)?"":Bo(s),_=jse(e),d=_?Oo(e)?e:Ro(e):void 0,p=_?Ko(c,l+d):c,f=Xo(a.suffix),m=f&&tv("_"+f),h=m?[tT(f,m),f]:[f],y=Xo(Ko(t,p)),v=_?y:ea(y)+l,b=f?h.map((e=>"**/*"+e)):["./*"];return[...q(_Z(o,y,r.extensionsToSearch,void 0,b),(e=>{const t=(n=e,g(h,(e=>{const t=(o=e,an(r=Xo(n),i=v)&&Wt(r,o)?r.slice(i.length,r.length-o.length):void 0);var r,i,o;return void 0===t?void 0:Ise(t)})));var n;if(t){if(jse(t))return bse($o(Ise(t))[1]);const{name:e,extension:n}=wse(t,o.getCompilationSettings(),r,i);return vse(e,"script",n)}})),...f?u:q(uZ(o,y),(e=>"node_modules"===e?void 0:bse(e)))]}function Ise(e){return e[0]===xo?e.slice(1):e}function Ose(e,t,n,r,i,o=use()){const a=new Map,s=fZ((()=>QL(t,e)))||u;for(const e of s)c(e);for(const t of gZ(n,e))c(Ko(Ro(t),"node_modules/@types"));return o;function c(n){if(pZ(e,n))for(const s of uZ(e,n)){const c=hR(s);if(!t.types||D(t.types,c))if(void 0===r)a.has(c)||(o.add(vse(c,"external module name",void 0)),a.set(c,!0));else{const t=Ko(n,s),a=ak(r,c,Wy(e));void 0!==a&&Cse(a,t,i,e,!1,void 0,o)}}}}var Mse=/^(\/\/\/\s*{const i=t.getSymbolAtLocation(n);if(i){const t=OB(i).toString();let n=r.get(t);n||r.set(t,n=[]),n.push(e)}}));return r}(e,n,r);return(o,a,s)=>{const{directImports:c,indirectUsers:l}=function(e,t,n,{exportingModuleSymbol:r,exportKind:i},o,a){const s=hQ(),c=hQ(),l=[],u=!!r.globalExports,_=u?void 0:[];return function e(t){const n=m(t);if(n)for(const t of n)if(s(t))switch(a&&a.throwIfCancellationRequested(),t.kind){case 213:if(uf(t)){f(mc(r=t,Xse)||r.getSourceFile(),!!d(r,!0));break}if(!u){const e=t.parent;if(2===i&&260===e.kind){const{name:t}=e;if(80===t.kind){l.push(t);break}}}break;case 80:break;case 271:p(t,t.name,Bv(t,32),!1);break;case 272:case 351:l.push(t);const n=t.importClause&&t.importClause.namedBindings;n&&274===n.kind?p(t,n.name,!1,!0):!u&&Dg(t)&&f(Gse(t));break;case 278:t.exportClause?280===t.exportClause.kind?f(Gse(t),!0):l.push(t):e(Hse(t,o));break;case 205:!u&&t.isTypeOf&&!t.qualifier&&d(t)&&f(t.getSourceFile(),!0),l.push(t);break;default:xn.failBadSyntaxKind(t,"Unexpected import kind.")}var r}(r),{directImports:l,indirectUsers:function(){if(u)return e;if(r.declarations)for(const e of r.declarations)fp(e)&&t.has(e.getSourceFile().fileName)&&f(e);return _.map(Sd)}()};function d(e,t=!1){return mc(e,(e=>t&&Xse(e)?"quit":cI(e)&&Q(e.modifiers,UD)))}function p(e,t,n,r){if(2===i)r||l.push(e);else if(!u){const r=Gse(e);xn.assert(307===r.kind||267===r.kind),n||function(e,t,n){const r=n.getSymbolAtLocation(t);return!!Vse(e,(e=>{if(!gN(e))return;const{exportClause:t,moduleSpecifier:i}=e;return!i&&t&&hN(t)&&t.elements.some((e=>n.getExportSpecifierLocalTargetSymbol(e)===r))}))}(r,t,o)?f(r,!0):f(r)}}function f(e,t=!1){if(xn.assert(!u),!c(e))return;if(_.push(e),!t)return;const n=o.getMergedSymbol(e.symbol);if(!n)return;xn.assert(!!(1536&n.flags));const r=m(n);if(r)for(const e of r)zE(e)||f(Gse(e),!0)}function m(e){return n.get(OB(e).toString())}}(e,t,i,a,n,r);return{indirectUsers:l,...$se(c,o,a.exportKind,n,s)}}}o(Rse,{Core:()=>oce,DefinitionKind:()=>Yse,EntryKind:()=>Zse,ExportKind:()=>Jse,FindReferencesUse:()=>ace,ImportExport:()=>zse,createImportTracker:()=>Bse,findModuleReferences:()=>qse,findReferenceOrRenameEntries:()=>uce,findReferencedSymbols:()=>sce,getContextNode:()=>rce,getExportInfo:()=>Wse,getImplementationsAtPosition:()=>cce,getImportOrExportSymbol:()=>Kse,getReferenceEntriesForNode:()=>_ce,getTextSpanOfEntry:()=>Sce,isContextWithStartAndEndNode:()=>tce,isDeclarationOfSymbol:()=>Tce,isWriteAccessForReference:()=>kce,nodeEntry:()=>ece,toContextSpan:()=>ice,toHighlightSpan:()=>bce,toReferenceEntry:()=>gce,toRenameLocation:()=>mce});var Jse=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals",e))(Jse||{}),zse=(e=>(e[e.Import=0]="Import",e[e.Export=1]="Export",e))(zse||{});function $se(e,t,n,r,i){const o=[],a=[];function s(e,t){o.push([e,t])}if(e)for(const t of e)c(t);return{importSearches:o,singleReferences:a};function c(e){if(271===e.kind)return void(Qse(e)&&l(e.name));if(80===e.kind)return void l(e);if(205===e.kind){if(e.qualifier){const n=bb(e.qualifier);n.escapedText===Sc(t)&&a.push(n)}else 2===n&&a.push(e.argument.literal);return}if(11!==e.moduleSpecifier.kind)return;if(278===e.kind)return void(e.exportClause&&hN(e.exportClause)&&u(e.exportClause));const{name:o,namedBindings:c}=e.importClause||{name:void 0,namedBindings:void 0};if(c)switch(c.kind){case 274:l(c.name);break;case 275:0!==n&&1!==n||u(c);break;default:xn.assertNever(c)}!o||1!==n&&2!==n||i&&o.escapedText!==MQ(t)||s(o,r.getSymbolAtLocation(o))}function l(e){2!==n||i&&!_(e.escapedText)||s(e,r.getSymbolAtLocation(e))}function u(e){if(e)for(const n of e.elements){const{name:e,propertyName:o}=n;_((o||e).escapedText)&&(o?(a.push(o),i&&e.escapedText!==t.escapedName||s(e,r.getSymbolAtLocation(e))):s(e,281===n.kind&&n.propertyName?r.getExportSpecifierLocalTargetSymbol(n):r.getSymbolAtLocation(e)))}}function _(e){return e===t.escapedName||0!==n&&"default"===e}}function qse(e,t,n){var r;const i=[],o=e.getTypeChecker();for(const a of t){const t=n.valueDeclaration;if(307===(null==t?void 0:t.kind)){for(const n of a.referencedFiles)e.getSourceFileFromReference(a,n)===t&&i.push({kind:"reference",referencingFile:a,ref:n});for(const n of a.typeReferenceDirectives){const o=null==(r=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(n,a))?void 0:r.resolvedTypeReferenceDirective;void 0!==o&&o.resolvedFileName===t.fileName&&i.push({kind:"reference",referencingFile:a,ref:n})}}Use(a,((e,t)=>{o.getSymbolAtLocation(t)===n&&i.push(ly(e)?{kind:"implicit",literal:t,referencingFile:a}:{kind:"import",literal:t})}))}return i}function Vse(e,t){return f(307===e.kind?e.statements:e.body.statements,(e=>t(e)||Xse(e)&&f(e.body&&e.body.statements,t)))}function Use(e,t){if(e.externalModuleIndicator||void 0!==e.imports)for(const n of e.imports)t(kg(n),n);else Vse(e,(e=>{switch(e.kind){case 278:case 272:{const n=e;n.moduleSpecifier&&wD(n.moduleSpecifier)&&t(n,n.moduleSpecifier);break}case 271:{const n=e;Qse(n)&&t(n,n.moduleReference.expression);break}}}))}function Kse(e,t,n,r){return r?i():i()||function(){if(!function(e){const{parent:t}=e;switch(t.kind){case 271:return t.name===e&&Qse(t);case 276:return!t.propertyName;case 273:case 274:return xn.assert(t.name===e),!0;case 208:return Mm(e)&&$m(t.parent.parent);default:return!1}}(e))return;let r=n.getImmediateAliasedSymbol(t);if(!r)return;if(r=function(e,t){if(e.declarations)for(const n of e.declarations){if(yN(n)&&!n.propertyName&&!n.parent.parent.moduleSpecifier)return t.getExportSpecifierLocalTargetSymbol(n)||e;if(GE(n)&&og(n.expression)&&!VD(n.name))return t.getSymbolAtLocation(n);if(JN(n)&&uP(n.parent.parent)&&2===ag(n.parent.parent))return t.getExportSpecifierLocalTargetSymbol(n.name)}return e}(r,n),"export="===r.escapedName&&(r=function(e,t){var n,r;if(2097152&e.flags)return t.getImmediateAliasedSymbol(e);const i=xn.checkDefined(e.valueDeclaration);return mN(i)?null==(n=lt(i.expression,p_))?void 0:n.symbol:uP(i)?null==(r=lt(i.right,p_))?void 0:r.symbol:qN(i)?i.symbol:void 0}(r,n),void 0===r))return;const i=MQ(r);return void 0===i||"default"===i||i===t.escapedName?{kind:0,symbol:r}:void 0}();function i(){var i;const{parent:s}=e,c=s.parent;if(t.exportSymbol)return 211===s.kind?(null==(i=t.declarations)?void 0:i.some((e=>e===s)))&&uP(c)?u(c,!1):void 0:o(t.exportSymbol,a(s));{const i=function(e,t){const n=KP(e)?e:KE(e)?ac(e):void 0;return n?e.name!==t||RN(n.parent)?void 0:EP(n.parent.parent)?n.parent.parent:void 0:e}(s,e);if(i&&Bv(i,32)){if(rN(i)&&i.moduleReference===e){if(r)return;return{kind:0,symbol:n.getSymbolAtLocation(i.name)}}return o(t,a(i))}if(dN(s))return o(t,0);if(mN(s))return l(s);if(mN(c))return l(c);if(uP(s))return u(s,!0);if(uP(c))return u(c,!0);if(wF(s)||_F(s))return o(t,0)}function l(e){if(!e.symbol.parent)return;const n=e.isExportEquals?2:1;return{kind:1,symbol:t,exportInfo:{exportingModuleSymbol:e.symbol.parent,exportKind:n}}}function u(e,r){let i;switch(ag(e)){case 1:i=0;break;case 2:i=2;break;default:return}const a=r?n.getSymbolAtLocation(Mx(ut(e.left,Ox))):t;return a&&o(a,i)}}function o(e,t){const r=Wse(e,t,n);return r&&{kind:1,symbol:e,exportInfo:r}}function a(e){return Bv(e,2048)?1:0}}function Wse(e,t,n){const r=e.parent;if(!r)return;const i=n.getMergedSymbol(r);return nd(i)?{exportingModuleSymbol:i,exportKind:t}:void 0}function Hse(e,t){return t.getMergedSymbol(Gse(e).symbol)}function Gse(e){if(213===e.kind)return e.getSourceFile();const{parent:t}=e;return 307===t.kind?t:(xn.assert(268===t.kind),ut(t.parent,Xse))}function Xse(e){return 267===e.kind&&11===e.name.kind}function Qse(e){return 283===e.moduleReference.kind&&11===e.moduleReference.expression.kind}var Yse=(e=>(e[e.Symbol=0]="Symbol",e[e.Label=1]="Label",e[e.Keyword=2]="Keyword",e[e.This=3]="This",e[e.String=4]="String",e[e.TripleSlashReference=5]="TripleSlashReference",e))(Yse||{}),Zse=(e=>(e[e.Span=0]="Span",e[e.Node=1]="Node",e[e.StringLiteral=2]="StringLiteral",e[e.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",e[e.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal",e))(Zse||{});function ece(e,t=1){return{kind:t,node:e.name||e,context:nce(e)}}function tce(e){return e&&void 0===e.kind}function nce(e){if(h_(e))return rce(e);if(e.parent){if(!h_(e.parent)&&!mN(e.parent)){if(Mm(e)){const t=uP(e.parent)?e.parent:Ox(e.parent)&&uP(e.parent.parent)&&e.parent.parent.left===e.parent?e.parent.parent:void 0;if(t&&0!==ag(t))return rce(t)}if(CN(e.parent)||wN(e.parent))return e.parent.parent;if(TN(e.parent)||$P(e.parent)||Nl(e.parent))return e.parent;if($_(e)){const t=Tg(e);if(t){const e=mc(t,(e=>h_(e)||b_(e)||F_(e)));return h_(e)?rce(e):e}}const t=mc(e,oE);return t?rce(t.parent):void 0}return e.parent.name===e||fE(e.parent)||mN(e.parent)||(Vl(e.parent)||KE(e.parent))&&e.parent.propertyName===e||90===e.kind&&Bv(e.parent,2080)?rce(e.parent):void 0}}function rce(e){if(e)switch(e.kind){case 260:return WP(e.parent)&&1===e.parent.declarations.length?EP(e.parent.parent)?e.parent.parent:i_(e.parent.parent)?rce(e.parent.parent):e.parent:e;case 208:return rce(e.parent.parent);case 276:return e.parent.parent.parent;case 281:case 274:return e.parent.parent;case 273:case 280:return e.parent;case 226:return NP(e.parent)?e.parent:e;case 250:case 249:return{start:e.initializer,end:e.expression};case 303:case 304:return tQ(e.parent)?rce(mc(e.parent,(e=>uP(e)||i_(e)))):e;case 255:return{start:S(e.getChildren(e.getSourceFile()),(e=>109===e.kind)),end:e.caseBlock};default:return e}}function ice(e,t,n){if(!n)return;const r=tce(n)?xce(n.start,t,n.end):xce(n,t);return r.start!==e.start||r.length!==e.length?{contextSpan:r}:void 0}var oce,ace=(e=>(e[e.Other=0]="Other",e[e.References=1]="References",e[e.Rename=2]="Rename",e))(ace||{});function sce(e,t,n,r,i){const o=xX(r,i),a={use:1},s=oce.getReferencedSymbolsForNode(i,o,e,n,t,a),c=e.getTypeChecker(),l=oce.getAdjustedNode(o,a),u=function(e){return 90===e.kind||!!ph(e)||fh(e)||137===e.kind&&fE(e.parent)}(l)?c.getSymbolAtLocation(l):void 0;return s&&s.length?q(s,(({definition:e,references:n})=>e&&{definition:c.runWithCancellationToken(t,(t=>function(e,t,n){const r=(()=>{switch(e.type){case 0:{const{symbol:r}=e,{displayParts:i,kind:o}=fce(r,t,n),a=i.map((e=>e.text)).join(""),s=r.declarations&&Se(r.declarations);return{...pce(s?Pc(s)||s:n),name:a,kind:o,displayParts:i,context:rce(s)}}case 1:{const{node:t}=e;return{...pce(t),name:t.text,kind:"label",displayParts:[tY(t.text,17)]}}case 2:{const{node:t}=e,n=Ra(t.kind);return{...pce(t),name:n,kind:"keyword",displayParts:[{text:n,kind:"keyword"}]}}case 3:{const{node:n}=e,r=t.getSymbolAtLocation(n),i=r&&Hue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,r,n.getSourceFile(),UG(n),n).displayParts||[lY("this")];return{...pce(n),name:"this",kind:"var",displayParts:i}}case 4:{const{node:t}=e;return{...pce(t),name:t.text,kind:"var",displayParts:[tY(Gd(t),8)]}}case 5:return{textSpan:lQ(e.reference),sourceFile:e.file,name:e.reference.fileName,kind:"string",displayParts:[tY(`"${e.reference.fileName}"`,8)]};default:return xn.assertNever(e)}})(),{sourceFile:i,textSpan:o,name:a,kind:s,displayParts:c,context:l}=r;return{containerKind:"",containerName:"",fileName:i.fileName,kind:s,name:a,textSpan:o,displayParts:c,...ice(o,i,l)}}(e,t,o))),references:n.map((e=>function(e,t){const n=gce(e);return t?{...n,isDefinition:0!==e.kind&&Tce(e.node,t)}:n}(e,u)))})):void 0}function cce(e,t,n,r,i){const o=xX(r,i);let a;const s=lce(e,t,n,o,i);if(211===o.parent.kind||208===o.parent.kind||212===o.parent.kind||108===o.kind)a=s&&[...s];else if(s){const r=rt(s),i=new Map;for(;!r.isEmpty();){const o=r.dequeue();if(!Fx(i,IB(o.node)))continue;a=ue(a,o);const s=lce(e,t,n,o.node,o.node.pos);s&&r.enqueue(...s)}}const c=e.getTypeChecker();return O(a,(e=>function(e,t){const n=hce(e);if(0!==e.kind){const{node:r}=e;return{...n,...vce(r,t)}}return{...n,kind:"",displayParts:[]}}(e,c)))}function lce(e,t,n,r,i){if(307===r.kind)return;const o=e.getTypeChecker();if(304===r.parent.kind){const e=[];return oce.getReferenceEntriesForShorthandPropertyAssignment(r,o,(t=>e.push(ece(t)))),e}if(108===r.kind||um(r.parent)){const e=o.getSymbolAtLocation(r);return e.valueDeclaration&&[ece(e.valueDeclaration)]}return _ce(i,r,e,n,t,{implementations:!0,use:1})}function uce(e,t,n,r,i,o,a){return O(dce(oce.getReferencedSymbolsForNode(i,r,e,n,t,o)),(t=>a(t,r,e.getTypeChecker())))}function _ce(e,t,n,r,i,o={},a=new Set(r.map((e=>e.fileName)))){return dce(oce.getReferencedSymbolsForNode(e,t,n,r,i,o,a))}function dce(e){return e&&R(e,(e=>e.references))}function pce(e){const t=e.getSourceFile();return{sourceFile:t,textSpan:xce(oE(e)?e.expression:e,t)}}function fce(e,t,n){const r=oce.getIntersectingMeaningFromDeclarations(n,e),i=e.declarations&&Se(e.declarations)||n,{displayParts:o,symbolKind:a}=Hue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,e,i.getSourceFile(),i,i,r);return{displayParts:o,kind:a}}function mce(e,t,n,r,i){return{...hce(e),...r&&yce(e,t,n,i)}}function gce(e){const t=hce(e);if(0===e.kind)return{...t,isWriteAccess:!1};const{kind:n,node:r}=e;return{...t,isWriteAccess:kce(r),isInString:2===n||void 0}}function hce(e){if(0===e.kind)return{textSpan:e.textSpan,fileName:e.fileName};{const t=e.node.getSourceFile(),n=xce(e.node,t);return{textSpan:n,fileName:t.fileName,...ice(n,t,e.context)}}}function yce(e,t,n,r){if(0!==e.kind&&(qD(t)||$_(t))){const{node:r,kind:i}=e,o=r.parent,a=t.text,s=JN(o);if(s||jQ(o)&&o.name===r&&void 0===o.dotDotDotToken){const e={prefixText:a+": "},t={suffixText:": "+a};if(3===i)return e;if(4===i)return t;if(s){const n=o.parent;return HE(n)&&uP(n.parent)&&og(n.parent.left)?e:t}return e}if(fN(o)&&!o.propertyName)return D((yN(t.parent)?n.getExportSpecifierLocalTargetSymbol(t.parent):n.getSymbolAtLocation(t)).declarations,o)?{prefixText:a+" as "}:GH;if(yN(o)&&!o.propertyName)return t===e.node||n.getSymbolAtLocation(t)===n.getSymbolAtLocation(e.node)?{prefixText:a+" as "}:{suffixText:" as "+a}}if(0!==e.kind&&TD(e.node)&&Ox(e.node.parent)){const e=IQ(r);return{prefixText:e,suffixText:e}}return GH}function vce(e,t){const n=t.getSymbolAtLocation(h_(e)&&e.name?e.name:e);return n?fce(n,t,e):210===e.kind?{kind:"interface",displayParts:[iY(21),lY("object literal"),iY(22)]}:231===e.kind?{kind:"local class",displayParts:[iY(21),lY("anonymous local class"),iY(22)]}:{kind:KG(e),displayParts:[]}}function bce(e){const t=hce(e);if(0===e.kind)return{fileName:t.fileName,span:{textSpan:t.textSpan,kind:"reference"}};const n=kce(e.node),r={textSpan:t.textSpan,kind:n?"writtenReference":"reference",isInString:2===e.kind||void 0,...t.contextSpan&&{contextSpan:t.contextSpan}};return{fileName:t.fileName,span:r}}function xce(e,t,n){let r=e.getStart(t),i=(n||e).getEnd();return $_(e)&&i-r>2&&(xn.assert(void 0===n),r+=1,i-=1),269===(null==n?void 0:n.kind)&&(i=n.getFullStart()),Xs(r,i)}function Sce(e){return 0===e.kind?e.textSpan:xce(e.node,e.node.getSourceFile())}function kce(e){const t=ph(e);return!!t&&function(e){if(33554432&e.flags)return!0;switch(e.kind){case 226:case 208:case 263:case 231:case 90:case 266:case 306:case 281:case 273:case 271:case 276:case 264:case 338:case 346:case 291:case 267:case 270:case 274:case 280:case 169:case 304:case 265:case 168:return!0;case 303:return!tQ(e.parent);case 262:case 218:case 176:case 174:case 177:case 178:return!!e.body;case 260:case 172:return!!e.initializer||RN(e.parent);case 173:case 171:case 348:case 341:return!1;default:return xn.failBadSyntaxKind(e)}}(t)||90===e.kind||yx(e)}function Tce(e,t){var n;if(!t)return!1;const r=ph(e)||(90===e.kind?e.parent:fh(e)||137===e.kind&&fE(e.parent)?e.parent.parent:void 0),i=r&&uP(r)?r.left:void 0;return!(!r||!(null==(n=t.declarations)?void 0:n.some((e=>e===r||e===i))))}(e=>{function t(e,t){return 1===t.use?e=vX(e):2===t.use&&(e=bX(e)),e}function n(e,t,n){let r;const i=t.get(e.path)||u;for(const e of i)if(cV(e)){const t=n.getSourceFileByPath(e.file),i=uV(n,e);lV(i)&&(r=ue(r,{kind:0,fileName:t.fileName,textSpan:lQ(i)}))}return r}function r(e,t,n){if(e.parent&&nN(e.parent)){const e=n.getAliasedSymbol(t),r=n.getMergedSymbol(e);if(e!==r)return r}}function i(e,t,n,r,i,a){const c=1536&e.flags&&e.declarations&&S(e.declarations,qN);if(!c)return;const u=e.exports.get("export="),_=s(t,e,!!u,n,a);if(!u||!a.has(c.fileName))return _;const d=t.getTypeChecker();return o(t,_,l(e=mx(u,d),void 0,n,a,d,r,i))}function o(e,...t){let n;for(const r of t)if(r&&r.length)if(n)for(const t of r){if(!t.definition||0!==t.definition.type){n.push(t);continue}const r=t.definition.symbol,i=T(n,(e=>!!e.definition&&0===e.definition.type&&e.definition.symbol===r));if(-1===i){n.push(t);continue}const o=n[i];n[i]={definition:o.definition,references:o.references.concat(t.references).sort(((t,n)=>{const r=a(e,t),i=a(e,n);if(r!==i)return Nt(r,i);const o=Sce(t),s=Sce(n);return o.start!==s.start?Nt(o.start,s.start):Nt(o.length,s.length)}))}}else n=r;return n}function a(e,t){const n=0===t.kind?e.getSourceFile(t.fileName):t.node.getSourceFile();return e.getSourceFiles().indexOf(n)}function s(e,t,n,r,i){xn.assert(!!t.valueDeclaration);const o=q(qse(e,r,t),(e=>{if("import"===e.kind){const t=e.literal.parent;if(JE(t)){const e=ut(t.parent,zE);if(n&&!e.qualifier)return}return ece(e.literal)}return"implicit"===e.kind?ece(e.literal.text!==G_&&jI(e.referencingFile,(e=>2&e.transformFlags?kN(e)||TN(e)||DN(e)?e:void 0:"skip"))||e.referencingFile.statements[0]||e.referencingFile):{kind:0,fileName:e.referencingFile.fileName,textSpan:lQ(e.ref)}}));if(t.declarations)for(const e of t.declarations)switch(e.kind){case 307:break;case 267:i.has(e.getSourceFile().fileName)&&o.push(ece(e.name));break;default:xn.assert(!!(33554432&t.flags),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}const a=t.exports.get("export=");if(null==a?void 0:a.declarations)for(const e of a.declarations){const t=e.getSourceFile();if(i.has(t.fileName)){const n=uP(e)&&GE(e.left)?e.left.expression:mN(e)?xn.checkDefined(uX(e,95,t)):Pc(e)||e;o.push(ece(n))}}return o.length?[{definition:{type:0,symbol:t},references:o}]:u}function c(e){return 148===e.kind&&jE(e.parent)&&148===e.parent.operator}function l(e,t,n,r,i,o,a){const s=t&&function(e,t,n,r){const{parent:i}=t;return yN(i)&&r?L(t,e,i,n):g(e.declarations,(r=>{if(!r.parent){if(33554432&e.flags)return;xn.fail(`Unexpected symbol at ${xn.formatSyntaxKind(t.kind)}: ${xn.formatSymbol(e)}`)}return CE(r.parent)&&FE(r.parent.parent)?n.getPropertyOfType(n.getTypeFromTypeNode(r.parent.parent),e.name):void 0}))}(e,t,i,!Z(a))||e,c=t?G(t,s):7,l=[],u=new y(n,r,t?function(e){switch(e.kind){case 176:case 137:return 1;case 80:if(gu(e.parent))return xn.assert(e.parent.name===e),2;default:return 0}}(t):0,i,o,c,a,l),d=Z(a)&&s.declarations?S(s.declarations,yN):void 0;if(d)M(d.name,s,d,u.createSearch(t,e,void 0),u,!0,!0);else if(t&&90===t.kind&&"default"===s.escapedName&&s.parent)j(t,s,u),v(t,s,{exportingModuleSymbol:s.parent,exportKind:1},u);else{const e=u.createSearch(t,s,void 0,{allSearchSymbols:t?U(s,t,i,2===a.use,!!a.providePrefixAndSuffixTextForRename,!!a.implementations):[s]});_(s,u,e)}return l}function _(e,t,n){const r=function(e){const{declarations:t,flags:n,parent:r,valueDeclaration:i}=e;if(i&&(218===i.kind||231===i.kind))return i;if(!t)return;if(8196&n){const e=S(t,(e=>Rv(e,2)||Zl(e)));return e?Eh(e,263):void 0}if(t.some(jQ))return;const o=r&&!(262144&e.flags);if(o&&(!nd(r)||r.globalExports))return;let a;for(const e of t){const t=UG(e);if(a&&a!==t)return;if(!t||307===t.kind&&!Zp(t))return;if(a=t,nP(a)){let e;for(;e=zg(a);)a=e}}return o?a.getSourceFile():a}(e);if(r)A(r,r.getSourceFile(),n,t,!(qN(r)&&!D(t.sourceFiles,r)));else for(const e of t.sourceFiles)t.cancellationToken.throwIfCancellationRequested(),k(e,n,t)}let d;var m;function h(e){if(!(33555968&e.flags))return;const t=e.declarations&&S(e.declarations,(e=>!qN(e)&&!ZP(e)));return t&&t.symbol}e.getReferencedSymbolsForNode=function(e,a,_,d,p,f={},m=new Set(d.map((e=>e.fileName)))){var h,y;if(qN(a=t(a,f))){const t=Cce.getReferenceAtPosition(a,e,_);if(!(null==t?void 0:t.file))return;const r=_.getTypeChecker().getMergedSymbol(t.file.symbol);if(r)return s(_,r,!1,d,m);const i=_.getFileIncludeReasons();if(!i)return;return[{definition:{type:5,reference:t.reference,file:a},references:n(t.file,i,_)||u}]}if(!f.implementations){const e=function(e,t,n){if(fQ(e.kind)){if(116===e.kind&&aP(e.parent))return;if(148===e.kind&&!c(e))return;return function(e,t,n,r){const i=R(e,(e=>(n.throwIfCancellationRequested(),q(w(e,Ra(t),e),(e=>{if(e.kind===t&&(!r||r(e)))return ece(e)})))));return i.length?[{definition:{type:2,node:i[0].node},references:i}]:void 0}(t,e.kind,n,148===e.kind?c:void 0)}if(_f(e.parent)&&e.parent.name===e)return function(e,t){const n=R(e,(e=>(t.throwIfCancellationRequested(),q(w(e,"meta",e),(e=>{const t=e.parent;if(_f(t))return ece(t)})))));return n.length?[{definition:{type:2,node:n[0].node},references:n}]:void 0}(t,n);if(QD(e)&&pE(e.parent))return[{definition:{type:2,node:e},references:[ece(e)]}];if(OG(e)){const t=AG(e.parent,e.text);return t&&P(t.parent,t)}return MG(e)?P(e.parent,e):WG(e)?function(e,t,n){let r=rm(e,!1,!1),i=256;switch(r.kind){case 174:case 173:if($f(r)){i&=Zv(r),r=r.parent;break}case 172:case 171:case 176:case 177:case 178:i&=Zv(r),r=r.parent;break;case 307:if(qI(r)||V(e))return;case 262:case 218:break;default:return}const o=R(307===r.kind?t:[r.getSourceFile()],(e=>(n.throwIfCancellationRequested(),w(e,"this",qN(r)?e:r).filter((e=>{if(!WG(e))return!1;const t=rm(e,!1,!1);if(!p_(t))return!1;switch(r.kind){case 218:case 262:return r.symbol===t.symbol;case 174:case 173:return $f(r)&&r.symbol===t.symbol;case 231:case 263:case 210:return t.parent&&p_(t.parent)&&r.symbol===t.parent.symbol&&Jv(t)===!!i;case 307:return 307===t.kind&&!qI(t)&&!V(e)}}))))).map((e=>ece(e)));return[{definition:{type:3,node:g(o,(e=>sE(e.node.parent)?e.node:void 0))||e},references:o}]}(e,t,n):108===e.kind?function(e){let t=sm(e,!1);if(!t)return;let n=256;switch(t.kind){case 172:case 171:case 174:case 173:case 176:case 177:case 178:n&=Zv(t),t=t.parent;break;default:return}const r=q(w(t.getSourceFile(),"super",t),(e=>{if(108!==e.kind)return;const r=sm(e,!1);return r&&Jv(r)===!!n&&r.parent.symbol===t.symbol?ece(e):void 0}));return[{definition:{type:0,symbol:t.symbol},references:r}]}(e):void 0}(a,d,p);if(e)return e}const v=_.getTypeChecker(),b=v.getSymbolAtLocation(fE(a)&&a.parent.name||a);if(!b){if(!f.implementations&&$_(a)){if(LQ(a)){const e=_.getFileIncludeReasons(),t=null==(y=null==(h=_.getResolvedModuleFromModuleSpecifier(a))?void 0:h.resolvedModule)?void 0:y.resolvedFileName,r=t?_.getSourceFile(t):void 0;if(r)return[{definition:{type:4,node:a},references:n(r,e,_)||u}]}return function(e,t,n,r){const i=mX(e,n),o=R(t,(t=>(r.throwIfCancellationRequested(),q(w(t,e.text),(r=>{if($_(r)&&r.text===e.text){if(!i)return PD(r)&&!Xb(r,t)?void 0:ece(r,2);{const e=mX(r,n);if(i!==n.getStringType()&&(i===e||function(e,t){if(lE(e.parent))return t.getPropertyOfType(t.getTypeAtLocation(e.parent.parent),e.text)}(r,n)))return ece(r,2)}}})))));return[{definition:{type:4,node:e},references:o}]}(a,d,v,p)}return}if("export="===b.escapedName)return s(_,b.parent,!1,d,m);const x=i(b,_,d,p,f,m);if(x&&!(33554432&b.flags))return x;const S=r(a,b,v),k=S&&i(S,_,d,p,f,m);return o(_,x,l(b,a,d,m,v,p,f),k)},e.getAdjustedNode=t,e.getReferencesForFileName=function(e,t,r,i=new Set(r.map((e=>e.fileName)))){var o,a;const c=null==(o=t.getSourceFile(e))?void 0:o.symbol;if(c)return(null==(a=s(t,c,!1,r,i)[0])?void 0:a.references)||u;const l=t.getFileIncludeReasons(),_=t.getSourceFile(e);return _&&l&&n(_,l,t)||u},(m=d||(d={}))[m.None=0]="None",m[m.Constructor=1]="Constructor",m[m.Class=2]="Class";class y{constructor(e,t,n,r,i,o,a,s){this.sourceFiles=e,this.sourceFilesSet=t,this.specialSearchKind=n,this.checker=r,this.cancellationToken=i,this.searchMeaning=o,this.options=a,this.result=s,this.inheritsFromCache=new Map,this.markSeenContainingTypeReference=hQ(),this.markSeenReExportRHS=hQ(),this.symbolIdToReferences=[],this.sourceFileToSeenSymbols=[]}includesSourceFile(e){return this.sourceFilesSet.has(e.fileName)}getImportSearches(e,t){return this.importTracker||(this.importTracker=Bse(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(e,t,2===this.options.use)}createSearch(e,t,n,r={}){const{text:i=By(Sc(Ab(t)||h(t)||t)),allSearchSymbols:o=[t]}=r,a=yc(i),s=this.options.implementations&&e?function(e,t,n){const r=BG(e)?e.parent:void 0,i=r&&n.getTypeAtLocation(r.expression),o=q(i&&(i.isUnionOrIntersection()?i.types:i.symbol===t.parent?void 0:[i]),(e=>e.symbol&&96&e.symbol.flags?e.symbol:void 0));return 0===o.length?void 0:o}(e,t,this.checker):void 0;return{symbol:t,comingFrom:n,text:i,escapedText:a,parents:s,allSearchSymbols:o,includes:e=>D(o,e)}}referenceAdder(e){const t=OB(e);let n=this.symbolIdToReferences[t];return n||(n=this.symbolIdToReferences[t]=[],this.result.push({definition:{type:0,symbol:e},references:n})),(e,t)=>n.push(ece(e,t))}addStringOrCommentReference(e,t){this.result.push({definition:void 0,references:[{kind:0,fileName:e,textSpan:t}]})}markSearchedSymbols(e,t){const n=IB(e),r=this.sourceFileToSeenSymbols[n]||(this.sourceFileToSeenSymbols[n]=new Set);let i=!1;for(const e of t)i=W(r,OB(e))||i;return i}}function v(e,t,n,r){const{importSearches:i,singleReferences:o,indirectUsers:a}=r.getImportSearches(t,n);if(o.length){const e=r.referenceAdder(t);for(const t of o)b(t,r)&&e(t)}for(const[e,t]of i)N(e.getSourceFile(),r.createSearch(e,t,1),r);if(a.length){let i;switch(n.exportKind){case 0:i=r.createSearch(e,t,1);break;case 1:i=2===r.options.use?void 0:r.createSearch(e,t,1,{text:"default"})}if(i)for(const e of a)k(e,i,r)}}function b(e,t){return!(!I(e,t)||2===t.options.use&&(!qD(e)||Vl(e.parent)&&"default"===e.escapedText))}function x(e,t){if(e.declarations)for(const n of e.declarations){const r=n.getSourceFile();N(r,t.createSearch(n,e,0),t,t.includesSourceFile(r))}}function k(e,t,n){void 0!==I7(e).get(t.escapedText)&&N(e,t,n)}function C(e,t,n,r,i=n){const o=rc(e.parent,e.parent.parent)?Te(t.getSymbolsOfParameterPropertyDeclaration(e.parent,e.text)):t.getSymbolAtLocation(e);if(o)for(const a of w(n,o.name,i)){if(!qD(a)||a===e||a.escapedText!==e.escapedText)continue;const n=t.getSymbolAtLocation(a);if(n===o||t.getShorthandAssignmentValueSymbol(a.parent)===o||yN(a.parent)&&L(a,n,a.parent,t)===o){const e=r(a);if(e)return e}}}function w(e,t,n=e){return q(E(e,t,n),(t=>{const n=xX(e,t);return n===e?void 0:n}))}function E(e,t,n=e){const r=[];if(!t||!t.length)return r;const i=e.text,o=i.length,a=t.length;let s=i.indexOf(t,n.pos);for(;s>=0&&!(s>n.end);){const e=s+a;0!==s&&ks(i.charCodeAt(s-1),99)||e!==o&&ks(i.charCodeAt(e),99)||r.push(s),s=i.indexOf(t,s+a+1)}return r}function P(e,t){const n=e.getSourceFile(),r=t.text,i=q(w(n,r,e),(e=>e===t||OG(e)&&AG(e,r)===t?ece(e):void 0));return[{definition:{type:1,node:t},references:i}]}function N(e,t,n,r=!0){return n.cancellationToken.throwIfCancellationRequested(),A(e,e,t,n,r)}function A(e,t,n,r,i){if(r.markSearchedSymbols(t,n.allSearchSymbols))for(const o of E(t,n.text,e))O(t,o,n,r,i)}function I(e,t){return!!(yG(e)&t.searchMeaning)}function O(e,t,n,r,i){const o=xX(e,t);if(!function(e,t){switch(e.kind){case 81:if(WN(e.parent))return!0;case 80:return e.text.length===t.length;case 15:case 11:{const n=e;return(qG(n)||zG(e)||VG(e)||QE(e.parent)&&sg(e.parent)&&e.parent.arguments[1]===e)&&n.text.length===t.length}case 9:return qG(e)&&e.text.length===t.length;case 90:return"default".length===t.length;default:return!1}}(o,n.text))return void(!r.options.implementations&&(r.options.findInStrings&&AX(e,t)||r.options.findInComments&&rQ(e,t))&&r.addStringOrCommentReference(e.fileName,Gs(t,n.text.length)));if(!I(o,r))return;let a=r.checker.getSymbolAtLocation(o);if(!a)return;const s=o.parent;if(fN(s)&&s.propertyName===o)return;if(yN(s))return xn.assert(80===o.kind),void M(o,a,s,n,r,i);if(Al(s)&&s.isNameFirst&&s.typeExpression&&aF(s.typeExpression.type)&&s.typeExpression.type.jsDocPropertyTags&&p(s.typeExpression.type.jsDocPropertyTags))return void function(e,t,n,r){const i=r.referenceAdder(n.symbol);j(t,n.symbol,r),f(e,(e=>{iE(e.name)&&i(e.name.left)}))}(s.typeExpression.type.jsDocPropertyTags,o,n,r);const c=function(e,t,n,r){const{checker:i}=r;return K(t,n,i,!1,2!==r.options.use||!!r.options.providePrefixAndSuffixTextForRename,((n,r,i,o)=>(i&&H(t)!==H(i)&&(i=void 0),e.includes(i||r||n)?{symbol:!r||6&px(n)?n:r,kind:o}:void 0)),(t=>!(e.parents&&!e.parents.some((e=>$(t.parent,e,r.inheritsFromCache,i))))))}(n,a,o,r);if(c){switch(r.specialSearchKind){case 0:i&&j(o,c,r);break;case 1:!function(e,t,n,r){xG(e)&&j(e,n.symbol,r);const i=()=>r.referenceAdder(n.symbol);if(gu(e.parent))xn.assert(90===e.kind||e.parent.name===e),function(e,t,n){const r=B(e);if(r&&r.declarations)for(const e of r.declarations){const r=uX(e,137,t);xn.assert(176===e.kind&&!!r),n(r)}e.exports&&e.exports.forEach((e=>{const t=e.valueDeclaration;if(t&&174===t.kind){const e=t.body;e&&Y(e,110,(e=>{xG(e)&&n(e)}))}}))}(n.symbol,t,i());else{const t=pb(NG(e).parent);t&&(function(e,t){const n=B(e.symbol);if(n&&n.declarations)for(const e of n.declarations){xn.assert(176===e.kind);const n=e.body;n&&Y(n,108,(e=>{bG(e)&&t(e)}))}}(t,i()),function(e,t){if(function(e){return!!B(e.symbol)}(e))return;const n=e.symbol,r=t.createSearch(void 0,n,void 0);_(n,t,r)}(t,r))}}(o,e,n,r);break;case 2:!function(e,t,n){j(e,t.symbol,n);const r=e.parent;if(2===n.options.use||!gu(r))return;xn.assert(r.name===e);const i=n.referenceAdder(t.symbol);for(const e of r.members)bu(e)&&Jv(e)&&e.body&&e.body.forEachChild((function e(t){110===t.kind?i(t):cu(t)||gu(t)||t.forEachChild(e)}))}(o,n,r);break;default:xn.assertNever(r.specialSearchKind)}Mm(o)&&KE(o.parent)&&$m(o.parent.parent.parent)&&(a=o.parent.symbol,!a)||function(e,t,n,r){const i=Kse(e,t,r.checker,1===n.comingFrom);if(!i)return;const{symbol:o}=i;0===i.kind?Z(r.options)||x(o,r):v(e,o,i.exportInfo,r)}(o,a,n,r)}else!function({flags:e,valueDeclaration:t},n,r){const i=r.checker.getShorthandAssignmentValueSymbol(t),o=t&&Pc(t);33554432&e||!o||!n.includes(i)||j(o,i,r)}(a,n,r)}function M(e,t,n,r,i,o,a){xn.assert(!a||!!i.options.providePrefixAndSuffixTextForRename,"If alwaysGetReferences is true, then prefix/suffix text must be enabled");const{parent:s,propertyName:c,name:l}=n,u=s.parent,_=L(e,t,n,i.checker);if(a||r.includes(_)){if(c?e===c?(u.moduleSpecifier||d(),o&&2!==i.options.use&&i.markSeenReExportRHS(l)&&j(l,xn.checkDefined(n.symbol),i)):i.markSeenReExportRHS(e)&&d():2===i.options.use&&"default"===l.escapedText||d(),!Z(i.options)||a){const t="default"===e.escapedText||"default"===n.name.escapedText?1:0,r=xn.checkDefined(n.symbol),o=Wse(r,t,i.checker);o&&v(e,r,o,i)}if(1!==r.comingFrom&&u.moduleSpecifier&&!c&&!Z(i.options)){const e=i.checker.getExportSpecifierLocalTargetSymbol(n);e&&x(e,i)}}function d(){o&&j(e,_,i)}}function L(e,t,n,r){return function(e,t){const{parent:n,propertyName:r,name:i}=t;return xn.assert(r===e||i===e),r?r===e:!n.parent.moduleSpecifier}(e,n)&&r.getExportSpecifierLocalTargetSymbol(n)||t}function j(e,t,n){const{kind:r,symbol:i}="kind"in t?t:{kind:void 0,symbol:t};if(2===n.options.use&&90===e.kind)return;const o=n.referenceAdder(i);n.options.implementations?function(e,t,n){if(dh(e)&&(33554432&(r=e.parent).flags?!XP(r)&&!QP(r):If(r)?L_(r):uu(r)?r.body:gu(r)||d_(r)))return void t(e);var r;if(80!==e.kind)return;304===e.parent.kind&&X(e,n.checker,t);const i=J(e);if(i)return void t(i);const o=mc(e,(e=>!iE(e.parent)&&!wu(e.parent)&&!ku(e.parent))),a=o.parent;if(M_(a)&&a.type===o&&n.markSeenContainingTypeReference(a))if(L_(a))s(a.initializer);else if(cu(a)&&a.body){const e=a.body;241===e.kind?Pf(e,(e=>{e.expression&&s(e.expression)})):s(e)}else Qu(a)&&s(a.expression);function s(e){z(e)&&t(e)}}(e,o,n):o(e,r)}function B(e){return e.members&&e.members.get("__constructor")}function J(e){return qD(e)||GE(e)?J(e.parent):hP(e)?lt(e.parent.parent,_n(gu,XP)):void 0}function z(e){switch(e.kind){case 217:return z(e.expression);case 219:case 218:case 210:case 231:case 209:return!0;default:return!1}}function $(e,t,n,r){if(e===t)return!0;const i=OB(e)+","+OB(t),o=n.get(i);if(void 0!==o)return o;n.set(i,!1);const a=!!e.declarations&&e.declarations.some((e=>Ch(e).some((e=>{const i=r.getTypeAtLocation(e);return!!i&&!!i.symbol&&$(i.symbol,t,n,r)}))));return n.set(i,a),a}function V(e){return 80===e.kind&&169===e.parent.kind&&e.parent.name===e}function U(e,t,n,r,i,o){const a=[];return K(e,t,n,r,!(r&&i),((t,n,r)=>{r&&H(e)!==H(r)&&(r=void 0),a.push(r||n||t)}),(()=>!o)),a}function K(e,t,n,i,o,a,s){const c=O7(t);if(c){const e=n.getShorthandAssignmentValueSymbol(t.parent);if(e&&i)return a(e,void 0,void 0,3);const r=n.getContextualType(c.parent),o=r&&g(M7(c,n,r,!0),(e=>d(e,4)));if(o)return o;const s=function(e,t){return tQ(e.parent.parent)?t.getPropertySymbolOfDestructuringAssignment(e):void 0}(t,n),l=s&&a(s,void 0,void 0,4);if(l)return l;const u=e&&a(e,void 0,void 0,3);if(u)return u}const l=r(t,e,n);if(l){const e=a(l,void 0,void 0,1);if(e)return e}const u=d(e);if(u)return u;if(e.valueDeclaration&&rc(e.valueDeclaration,e.valueDeclaration.parent)){const t=n.getSymbolsOfParameterPropertyDeclaration(ut(e.valueDeclaration,sE),e.name);return xn.assert(2===t.length&&!!(1&t[0].flags)&&!!(4&t[1].flags)),d(1&e.flags?t[1]:t[0])}const _=Y_(e,281);if(!i||_&&!_.propertyName){const e=_&&n.getExportSpecifierLocalTargetSymbol(_);if(e){const t=a(e,void 0,void 0,1);if(t)return t}}if(!i){let r;return r=o?jQ(t.parent)?RQ(n,t.parent):void 0:p(e,n),r&&d(r,4)}if(xn.assert(i),o){const t=p(e,n);return t&&d(t,4)}function d(e,t){return g(n.getRootSymbols(e),(r=>a(e,r,void 0,t)||(r.parent&&96&r.parent.flags&&s(r)?function(e,t,n,r){const i=new Map;return function e(o){if(96&o.flags&&Fx(i,OB(o)))return g(o.declarations,(i=>g(Ch(i),(i=>{const o=n.getTypeAtLocation(i),a=o&&o.symbol&&n.getPropertyOfType(o,t);return o&&a&&(g(n.getRootSymbols(a),r)||e(o.symbol))}))))}(e)}(r.parent,r.name,n,(n=>a(e,r,n,t))):void 0)))}function p(e,t){const n=Y_(e,208);if(n&&jQ(n))return RQ(t,n)}}function H(e){return!!e.valueDeclaration&&!!(256&Qv(e.valueDeclaration))}function G(e,t){let n=yG(e);const{declarations:r}=t;if(r){let e;do{e=n;for(const e of r){const t=hG(e);t&n&&(n|=t)}}while(n!==e)}return n}function X(e,t,n){const r=t.getSymbolAtLocation(e),i=t.getShorthandAssignmentValueSymbol(r.valueDeclaration);if(i)for(const e of i.getDeclarations())1&hG(e)&&n(e)}function Y(e,t,n){LI(e,(e=>{e.kind===t&&n(e),Y(e,t,n)}))}function Z(e){return 2===e.use&&e.providePrefixAndSuffixTextForRename}e.eachExportReference=function(e,t,n,r,i,o,a,s){const c=Bse(e,new Set(e.map((e=>e.fileName))),t,n),{importSearches:l,indirectUsers:u,singleReferences:_}=c(r,{exportKind:a?1:0,exportingModuleSymbol:i},!1);for(const[e]of l)s(e);for(const e of _)qD(e)&&zE(e.parent)&&s(e);for(const e of u)for(const n of w(e,a?"default":o)){const e=t.getSymbolAtLocation(n),i=Q(null==e?void 0:e.declarations,(e=>!!lt(e,mN)));!qD(n)||Vl(n.parent)||e!==r&&!i||s(n)}},e.isSymbolReferencedInFile=function(e,t,n,r=n){return C(e,t,n,(()=>!0),r)||!1},e.eachSymbolReferenceInFile=C,e.getTopMostDeclarationNamesInFile=function(e,t){return F(w(t,e),(e=>!!ph(e))).reduce(((e,t)=>{const n=function(e){let t=0;for(;e;)e=UG(e),t++;return t}(t);return Q(e.declarationNames)&&n!==e.depth?ne===i))&&r(t,a))return!0}return!1},e.getIntersectingMeaningFromDeclarations=G,e.getReferenceEntriesForShorthandPropertyAssignment=X})(oce||(oce={}));var Cce={};function wce(e,t,n,r,i){var o;const a=Ece(t,n,e),s=a&&[(c=a.reference.fileName,l=a.fileName,_=a.unverified,{fileName:l,textSpan:Xs(0,0),kind:"script",name:c,containerName:void 0,containerKind:void 0,unverified:_})]||u;var c,l,_;if(null==a?void 0:a.file)return s;const d=xX(t,n);if(d===t)return;const{parent:p}=d,m=e.getTypeChecker();if(164===d.kind||qD(d)&&gF(p)&&p.tagName===d)return function(e,t){const n=mc(t,mu);if(!n||!n.name)return;const r=mc(n,gu);if(!r)return;const i=Sh(r);if(!i)return;const o=lh(i.expression),a=mP(o)?o.symbol:e.getSymbolAtLocation(o);if(!a)return;const s=vc(Lp(n.name)),c=zv(n)?e.getPropertyOfType(e.getTypeOfSymbol(a),s):e.getPropertyOfType(e.getDeclaredTypeOfSymbol(a),s);return c?Lce(e,c,t):void 0}(m,d)||u;if(OG(d)){const e=AG(d.parent,d.text);return e?[Rce(m,e,"label",d.text,void 0)]:void 0}switch(d.kind){case 107:const e=mc(d.parent,(e=>pE(e)?"quit":uu(e)));return e?[zce(m,e)]:void 0;case 90:if(!LN(d.parent))break;case 84:const n=mc(d.parent,zP);if(n)return[Bce(n,t)]}if(135===d.kind){const e=mc(d,(e=>uu(e)));return e&&Q(e.modifiers,(e=>134===e.kind))?[zce(m,e)]:void 0}if(127===d.kind){const e=mc(d,(e=>uu(e)));return e&&e.asteriskToken?[zce(m,e)]:void 0}if(QD(d)&&pE(d.parent)){const e=d.parent.parent,{symbol:t,failedAliasResolution:n}=Mce(e,m,i),r=F(e.members,pE),o=t?m.symbolToString(t,e):"",a=d.getSourceFile();return O(r,(e=>{let{pos:t}=Wb(e);return t=as(a.text,t),Rce(m,e,"constructor","static {}",o,!1,n,{start:t,length:"static".length})}))}let{symbol:g,failedAliasResolution:h}=Mce(d,m,i),y=d;if(r&&h){const e=f([d,...(null==g?void 0:g.declarations)||u],(e=>mc(e,Tp))),t=e&&Sg(e);t&&(({symbol:g,failedAliasResolution:h}=Mce(t,m,i)),y=t)}if(!g&&LQ(y)){const n=null==(o=e.getResolvedModuleFromModuleSpecifier(y,t))?void 0:o.resolvedModule;if(n)return[{name:y.text,fileName:n.resolvedFileName,containerName:void 0,containerKind:void 0,kind:"script",textSpan:Gs(0,0),failedAliasResolution:h,isAmbient:QI(n.resolvedFileName),unverified:y!==d}]}if(!g)return Z(s,function(e,t){return q(t.getIndexInfosAtLocation(e),(e=>e.declaration&&zce(t,e.declaration)))}(d,m));if(r&&x(g.declarations,(e=>e.getSourceFile().fileName===t.fileName)))return;const v=function(e,t){const n=function(e){const t=mc(e,(e=>!BG(e))),n=null==t?void 0:t.parent;return n&&zu(n)&&mm(n)===t?n:void 0}(t),r=n&&e.getResolvedSignature(n);return lt(r&&r.declaration,(e=>cu(e)&&!SE(e)))}(m,d);if(v&&(!D_(d.parent)||!function(e){switch(e.kind){case 176:case 185:case 179:case 180:return!0;default:return!1}}(v))){const e=zce(m,v,h);if(m.getRootSymbols(g).some((e=>function(e,t){var n;return e===t.symbol||e===t.symbol.parent||mb(t.parent)||!zu(t.parent)&&e===(null==(n=lt(t.parent,p_))?void 0:n.symbol)}(e,v))))return[e];{const t=Lce(m,g,d,h,v)||u;return 108===d.kind?[e,...t]:[...t,e]}}if(304===d.parent.kind){const e=m.getShorthandAssignmentValueSymbol(g.valueDeclaration);return Z((null==e?void 0:e.declarations)?e.declarations.map((t=>jce(t,m,e,d,!1,h))):u,Dce(m,d))}if(au(d)&&KE(p)&&VE(p.parent)&&d===(p.propertyName||p.name)){const e=xQ(d),t=m.getTypeAtLocation(p.parent);return void 0===e?u:R(t.isUnion()?t.types:[t],(t=>{const n=t.getProperty(e);return n&&Lce(m,n,d)}))}const b=Dce(m,d);return Z(s,b.length?b:Lce(m,g,d,h))}function Dce(e,t){const n=O7(t);if(n){const r=n&&e.getContextualType(n.parent);if(r)return R(M7(n,e,r,!1),(n=>Lce(e,n,t)))}return u}function Ece(e,t,n){var r,i;const o=$ce(e.referencedFiles,t);if(o){const t=n.getSourceFileFromReference(e,o);return t&&{reference:o,fileName:t.fileName,file:t,unverified:!1}}const a=$ce(e.typeReferenceDirectives,t);if(a){const t=null==(r=n.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a,e))?void 0:r.resolvedTypeReferenceDirective,i=t&&n.getSourceFile(t.resolvedFileName);return i&&{reference:a,fileName:i.fileName,file:i,unverified:!1}}const s=$ce(e.libReferenceDirectives,t);if(s){const e=n.getLibFileFromReference(s);return e&&{reference:s,fileName:e.fileName,file:e,unverified:!1}}if(e.imports.length||e.moduleAugmentations.length){const r=SX(e,t);let o;if(LQ(r)&&Os(r.text)&&(o=n.getResolvedModuleFromModuleSpecifier(r,e))){const t=null==(i=o.resolvedModule)?void 0:i.resolvedFileName,a=t||Wo(Ro(e.fileName),r.text);return{file:n.getSourceFile(a),fileName:a,reference:{pos:r.getStart(),end:r.getEnd(),fileName:r.text},unverified:!t}}}}o(Cce,{createDefinitionInfo:()=>jce,findReferenceInPosition:()=>$ce,getDefinitionAndBoundSpan:()=>Oce,getDefinitionAtPosition:()=>wce,getReferenceAtPosition:()=>Ece,getTypeDefinitionAtPosition:()=>Ace});var Pce=new Set(["Array","ArrayLike","ReadonlyArray","Promise","PromiseLike","Iterable","IterableIterator","AsyncIterable","Set","WeakSet","ReadonlySet","Map","WeakMap","ReadonlyMap","Partial","Required","Readonly","Pick","Omit"]);function Nce(e,t){if(!t.aliasSymbol)return!1;const n=t.aliasSymbol.name;if(!Pce.has(n))return!1;const r=e.resolveName(n,void 0,788968,!1);return!!r&&r===t.aliasSymbol}function Fce(e,t,n,r){var i,o;if(4&wx(t)&&function(e,t){const n=t.symbol.name;if(!Pce.has(n))return!1;const r=e.resolveName(n,void 0,788968,!1);return!!r&&r===t.target.symbol}(e,t))return Ice(e.getTypeArguments(t)[0],e,n,r);if(Nce(e,t)&&t.aliasTypeArguments)return Ice(t.aliasTypeArguments[0],e,n,r);if(32&wx(t)&&t.target&&Nce(e,t.target)){const a=null==(o=null==(i=t.aliasSymbol)?void 0:i.declarations)?void 0:o[0];if(a&&QP(a)&&xE(a.type)&&a.type.typeArguments)return Ice(e.getTypeAtLocation(a.type.typeArguments[0]),e,n,r)}return[]}function Ace(e,t,n){const r=xX(t,n);if(r===t)return;if(_f(r.parent)&&r.parent.name===r)return Ice(e.getTypeAtLocation(r.parent),e,r.parent,!1);const{symbol:i,failedAliasResolution:o}=Mce(r,e,!1);if(!i)return;const a=e.getTypeOfSymbolAtLocation(i,r),s=function(e,t,n){if(t.symbol===e||e.valueDeclaration&&t.symbol&&KP(e.valueDeclaration)&&e.valueDeclaration.initializer===t.symbol.valueDeclaration){const e=t.getCallSignatures();if(1===e.length)return n.getReturnTypeOfSignature(Te(e))}}(i,a,e),c=s&&Ice(s,e,r,o),[l,u]=c&&0!==c.length?[s,c]:[a,Ice(a,e,r,o)];return u.length?[...Fce(e,l,r,o),...u]:!(111551&i.flags)&&788968&i.flags?Lce(e,mx(i,e),r,o):void 0}function Ice(e,t,n,r){return R(!e.isUnion()||32&e.flags?[e]:e.types,(e=>e.symbol&&Lce(t,e.symbol,n,r)))}function Oce(e,t,n){const r=wce(e,t,n);if(!r||0===r.length)return;const i=$ce(t.referencedFiles,n)||$ce(t.typeReferenceDirectives,n)||$ce(t.libReferenceDirectives,n);if(i)return{definitions:r,textSpan:lQ(i)};const o=xX(t,n);return{definitions:r,textSpan:Gs(o.getStart(),o.getWidth())}}function Mce(e,t,n){const r=t.getSymbolAtLocation(e);let i=!1;if((null==r?void 0:r.declarations)&&2097152&r.flags&&!n&&function(e,t){return 80===e.kind&&(e.parent===t||274!==t.kind)}(e,r.declarations[0])){const e=t.getAliasedSymbol(r);if(e.declarations)return{symbol:e};i=!0}return{symbol:r,failedAliasResolution:i}}function Lce(e,t,n,r,i){const o=F(t.declarations,(e=>e!==i)),a=function(){if(32&t.flags&&!(19&t.flags)&&(xG(n)||137===n.kind)){const e=S(o,gu);return e&&c(e.members,!0)}}()||(SG(n)||$G(n)?c(o,!1):void 0);if(a)return a;const s=F(o,(e=>!function(e){if(!Hm(e))return!1;const t=mc(e,(e=>!!mb(e)||!Hm(e)&&"quit"));return!!t&&5===ag(t)}(e)));return O(Q(s)?s:o,(i=>jce(i,e,t,n,!1,r)));function c(i,o){if(!i)return;const a=i.filter(o?fE:cu),s=a.filter((e=>!!e.body));return a.length?0!==s.length?s.map((r=>jce(r,e,t,n))):[jce(De(a),e,t,n,!1,r)]:void 0}}function jce(e,t,n,r,i,o){const a=t.symbolToString(n),s=Hue.getSymbolKind(t,n,r),c=n.parent?t.symbolToString(n.parent,r):"";return Rce(t,e,s,a,c,i,o)}function Rce(e,t,n,r,i,o,a,s){const c=t.getSourceFile();return s||(s=aQ(Pc(t)||t,c)),{fileName:c.fileName,textSpan:s,kind:n,name:r,containerKind:void 0,containerName:i,...Rse.toContextSpan(s,c,Rse.getContextNode(t)),isLocal:!Jce(e,t),isAmbient:!!(33554432&t.flags),unverified:o,failedAliasResolution:a}}function Bce(e,t){const n=Rse.getContextNode(e),r=aQ(tce(n)?n.start:n,t);return{fileName:t.fileName,textSpan:r,kind:"keyword",name:"switch",containerKind:void 0,containerName:"",...Rse.toContextSpan(r,t,n),isLocal:!0,isAmbient:!1,unverified:!1,failedAliasResolution:void 0}}function Jce(e,t){if(e.isDeclarationVisible(t))return!0;if(!t.parent)return!1;if(L_(t.parent)&&t.parent.initializer===t)return Jce(e,t.parent);switch(t.kind){case 172:case 177:case 178:case 174:if(Rv(t,2))return!1;case 176:case 303:case 304:case 210:case 231:case 219:case 218:return Jce(e,t.parent);default:return!1}}function zce(e,t,n){return jce(t,e,t.symbol,t,!1,n)}function $ce(e,t){return S(e,(e=>Js(e,t)))}var qce={};function Vce(e){return"literals"===e.includeInlayParameterNameHints}function Uce(e){return!0===e.interactiveInlayHints}function Kce(e){const{file:t,program:n,span:r,cancellationToken:i,preferences:o}=e,a=t.text,s=n.getCompilerOptions(),c=AQ(t,o),l=n.getTypeChecker(),u=[];return function e(n){if(n&&0!==n.getFullWidth()){switch(n.kind){case 267:case 263:case 264:case 262:case 231:case 218:case 174:case 219:i.throwIfCancellationRequested()}if(Us(r,n.pos,n.getFullWidth())&&(!wu(n)||hP(n)))return o.includeInlayVariableTypeHints&&KP(n)||o.includeInlayPropertyDeclarationTypeHints&&uE(n)?function(e){if(void 0===e.initializer&&(!uE(e)||1&l.getTypeAtLocation(e).flags)||Eu(e.name)||KP(e)&&!v(e))return;if(kv(e))return;const t=l.getTypeAtLocation(e);if(p(t))return;const n=y(t);if(n){const t="string"==typeof n?n:n.map((e=>e.text)).join("");if(!1===o.includeInlayVariableTypeHintsWhenTypeMatchesName&&Dt(e.name.getText(),t))return;d(n,e.name.end)}}(n):o.includeInlayEnumMemberValueHints&&$N(n)?function(e){if(e.initializer)return;const t=l.getConstantValue(e);var n,r;void 0!==t&&(n=t.toString(),r=e.end,u.push({text:`= ${n}`,position:r,kind:"Enum",whitespaceBefore:!0}))}(n):function(e){return"literals"===e.includeInlayParameterNameHints||"all"===e.includeInlayParameterNameHints}(o)&&(QE(n)||YE(n))?function(e){const t=e.arguments;if(!t||!t.length)return;const n=[],r=l.getResolvedSignatureForSignatureHelp(e,n);if(!r||!n.length)return;let i=0;for(const e of t){const t=lh(e);if(Vce(o)&&!g(t)){i++;continue}let n=0;if(fP(t)){const e=l.getTypeAtLocation(t.expression);if(l.isTupleType(e)){const{elementFlags:t,fixedLength:r}=e.target;if(0===r)continue;const i=T(t,(e=>!(1&e)));(i<0?r:i)>0&&(n=i<0?r:i)}}const a=l.getParameterIdentifierInfoAtPosition(r,i);if(i+=n||1,a){const{parameter:n,parameterName:r,isRestParameter:i}=a;if(!o.includeInlayParameterNameHintsWhenArgumentMatchesName&&f(t,r)&&!i)continue;const s=vc(r);if(m(t,s))continue;_(s,n,e.getStart(),i)}}}(n):(o.includeInlayFunctionParameterTypeHints&&uu(n)&&$T(n)&&function(e){const t=l.getSignatureFromDeclaration(e);if(t)for(let n=0;nnew RegExp(`^\\s?/\\*\\*?\\s?${e}\\s?\\*\\/\\s?$`))(n);return Q(r,(e=>i.test(a.substring(e.pos,e.end))))}function g(e){switch(e.kind){case 224:{const t=e.operand;return Bl(t)||qD(t)&&qT(t.escapedText)}case 112:case 97:case 106:case 15:case 228:return!0;case 80:{const t=e.escapedText;return function(e){return"undefined"===e}(t)||qT(t)}}return Bl(e)}function h(e){const t=e.valueDeclaration;if(!t||!sE(t))return;const n=l.getTypeOfSymbolAtLocation(e,t);return p(n)?void 0:y(n)}function y(e){if(!Uce(o))return function(e){const n=eq();return dd((r=>{const i=l.typeToTypeNode(e,void 0,71286784);xn.assertIsDefined(i,"should always get typenode"),n.writeNode(4,i,t,r)}))}(e);const n=l.typeToTypeNode(e,void 0,71286784);xn.assertIsDefined(n,"should always get typenode");const r=[];return i(n),r;function i(e){var t,n;if(!e)return;const o=Ra(e.kind);if(o)r.push({text:o});else if(Bl(e))r.push({text:u(e)});else switch(e.kind){case 80:xn.assertNode(e,qD);const o=bc(e),c=e.symbol&&e.symbol.declarations&&e.symbol.declarations.length&&Pc(e.symbol.declarations[0]);c?r.push(b(o,c)):r.push({text:o});break;case 166:xn.assertNode(e,iE),i(e.left),r.push({text:"."}),i(e.right);break;case 182:xn.assertNode(e,bE),e.assertsModifier&&r.push({text:"asserts "}),i(e.parameterName),e.type&&(r.push({text:" is "}),i(e.type));break;case 183:xn.assertNode(e,xE),i(e.typeName),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 168:xn.assertNode(e,aE),e.modifiers&&s(e.modifiers," "),i(e.name),e.constraint&&(r.push({text:" extends "}),i(e.constraint)),e.default&&(r.push({text:" = "}),i(e.default));break;case 169:xn.assertNode(e,sE),e.modifiers&&s(e.modifiers," "),e.dotDotDotToken&&r.push({text:"..."}),i(e.name),e.questionToken&&r.push({text:"?"}),e.type&&(r.push({text:": "}),i(e.type));break;case 185:xn.assertNode(e,kE),r.push({text:"new "}),a(e),r.push({text:" => "}),i(e.type);break;case 186:xn.assertNode(e,TE),r.push({text:"typeof "}),i(e.exprName),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 187:xn.assertNode(e,CE),r.push({text:"{"}),e.members.length&&(r.push({text:" "}),s(e.members,"; "),r.push({text:" "})),r.push({text:"}"});break;case 188:xn.assertNode(e,wE),i(e.elementType),r.push({text:"[]"});break;case 189:xn.assertNode(e,DE),r.push({text:"["}),s(e.elements,", "),r.push({text:"]"});break;case 202:xn.assertNode(e,EE),e.dotDotDotToken&&r.push({text:"..."}),i(e.name),e.questionToken&&r.push({text:"?"}),r.push({text:": "}),i(e.type);break;case 190:xn.assertNode(e,PE),i(e.type),r.push({text:"?"});break;case 191:xn.assertNode(e,NE),r.push({text:"..."}),i(e.type);break;case 192:xn.assertNode(e,FE),s(e.types," | ");break;case 193:xn.assertNode(e,AE),s(e.types," & ");break;case 194:xn.assertNode(e,IE),i(e.checkType),r.push({text:" extends "}),i(e.extendsType),r.push({text:" ? "}),i(e.trueType),r.push({text:" : "}),i(e.falseType);break;case 195:xn.assertNode(e,OE),r.push({text:"infer "}),i(e.typeParameter);break;case 196:xn.assertNode(e,ME),r.push({text:"("}),i(e.type),r.push({text:")"});break;case 198:xn.assertNode(e,jE),r.push({text:`${Ra(e.operator)} `}),i(e.type);break;case 199:xn.assertNode(e,RE),i(e.objectType),r.push({text:"["}),i(e.indexType),r.push({text:"]"});break;case 200:xn.assertNode(e,BE),r.push({text:"{ "}),e.readonlyToken&&(40===e.readonlyToken.kind?r.push({text:"+"}):41===e.readonlyToken.kind&&r.push({text:"-"}),r.push({text:"readonly "})),r.push({text:"["}),i(e.typeParameter),e.nameType&&(r.push({text:" as "}),i(e.nameType)),r.push({text:"]"}),e.questionToken&&(40===e.questionToken.kind?r.push({text:"+"}):41===e.questionToken.kind&&r.push({text:"-"}),r.push({text:"?"})),r.push({text:": "}),e.type&&i(e.type),r.push({text:"; }"});break;case 201:xn.assertNode(e,JE),i(e.literal);break;case 184:xn.assertNode(e,SE),a(e),r.push({text:" => "}),i(e.type);break;case 205:xn.assertNode(e,zE),e.isTypeOf&&r.push({text:"typeof "}),r.push({text:"import("}),i(e.argument),e.assertions&&(r.push({text:", { assert: "}),s(e.assertions.assertClause.elements,", "),r.push({text:" }"})),r.push({text:")"}),e.qualifier&&(r.push({text:"."}),i(e.qualifier)),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 171:xn.assertNode(e,lE),(null==(t=e.modifiers)?void 0:t.length)&&(s(e.modifiers," "),r.push({text:" "})),i(e.name),e.questionToken&&r.push({text:"?"}),e.type&&(r.push({text:": "}),i(e.type));break;case 181:xn.assertNode(e,vE),r.push({text:"["}),s(e.parameters,", "),r.push({text:"]"}),e.type&&(r.push({text:": "}),i(e.type));break;case 173:xn.assertNode(e,_E),(null==(n=e.modifiers)?void 0:n.length)&&(s(e.modifiers," "),r.push({text:" "})),i(e.name),e.questionToken&&r.push({text:"?"}),a(e),e.type&&(r.push({text:": "}),i(e.type));break;case 179:xn.assertNode(e,hE),a(e),e.type&&(r.push({text:": "}),i(e.type));break;case 207:xn.assertNode(e,UE),r.push({text:"["}),s(e.elements,", "),r.push({text:"]"});break;case 206:xn.assertNode(e,VE),r.push({text:"{"}),e.elements.length&&(r.push({text:" "}),s(e.elements,", "),r.push({text:" "})),r.push({text:"}"});break;case 208:xn.assertNode(e,KE),i(e.name);break;case 224:xn.assertNode(e,cP),r.push({text:Ra(e.operator)}),i(e.operand);break;case 203:xn.assertNode(e,qE),i(e.head),e.templateSpans.forEach(i);break;case 16:xn.assertNode(e,ND),r.push({text:u(e)});break;case 204:xn.assertNode(e,$E),i(e.type),i(e.literal);break;case 17:xn.assertNode(e,FD),r.push({text:u(e)});break;case 18:xn.assertNode(e,AD),r.push({text:u(e)});break;case 197:xn.assertNode(e,LE),r.push({text:"this"});break;default:xn.failBadSyntaxKind(e)}}function a(e){e.typeParameters&&(r.push({text:"<"}),s(e.typeParameters,", "),r.push({text:">"})),r.push({text:"("}),s(e.parameters,", "),r.push({text:")"})}function s(e,t){e.forEach(((e,n)=>{n>0&&r.push({text:t}),i(e)}))}function u(e){switch(e.kind){case 11:return 0===c?`'${Fy(e.text,39)}'`:`"${Fy(e.text,34)}"`;case 16:case 17:case 18:{const t=e.rawText??Sy(Fy(e.text,96));switch(e.kind){case 16:return"`"+t+"${";case 17:return"}"+t+"${";case 18:return"}"+t+"`"}}}return e.text}}function v(e){if((ay(e)||KP(e)&&af(e))&&e.initializer){const t=lh(e.initializer);return!(g(t)||YE(t)||HE(t)||Qu(t))}return!0}function b(e,t){const n=t.getSourceFile();return{text:e,span:aQ(t,n),file:n.fileName}}}o(qce,{provideInlayHints:()=>Kce});var Wce={};o(Wce,{getDocCommentTemplateAtPosition:()=>ule,getJSDocParameterNameCompletionDetails:()=>lle,getJSDocParameterNameCompletions:()=>cle,getJSDocTagCompletionDetails:()=>sle,getJSDocTagCompletions:()=>ale,getJSDocTagNameCompletionDetails:()=>ole,getJSDocTagNameCompletions:()=>ile,getJsDocCommentsFromDeclarations:()=>Qce,getJsDocTagsFromDeclarations:()=>Zce});var Hce,Gce,Xce=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","import","inheritdoc","inner","instance","interface","kind","lends","license","link","linkcode","linkplain","listens","member","memberof","method","mixes","module","name","namespace","overload","override","package","param","private","prop","property","protected","public","readonly","requires","returns","satisfies","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"];function Qce(e,t){const n=[];return WQ(e,(e=>{for(const r of function(e){switch(e.kind){case 341:case 348:return[e];case 338:case 346:return[e,e.parent];case 323:if(hF(e.parent))return[e.parent.parent];default:return Bg(e)}}(e)){const i=oF(r)&&r.tags&&S(r.tags,(e=>327===e.kind&&("inheritDoc"===e.tagName.escapedText||"inheritdoc"===e.tagName.escapedText)));if(void 0===r.comment&&!i||oF(r)&&346!==e.kind&&338!==e.kind&&r.tags&&r.tags.some((e=>346===e.kind||338===e.kind))&&!r.tags.some((e=>341===e.kind||342===e.kind)))continue;let o=r.comment?nle(r.comment,t):[];i&&i.comment&&(o=o.concat(nle(i.comment,t))),D(n,o,Yce)||n.push(o)}})),j(b(n,[hY()]))}function Yce(e,t){return E(e,t,((e,t)=>e.kind===t.kind&&e.text===t.text))}function Zce(e,t){const n=[];return WQ(e,(e=>{const r=ll(e);if(!r.some((e=>346===e.kind||338===e.kind))||r.some((e=>341===e.kind||342===e.kind)))for(const e of r)n.push({name:e.tagName.text,text:rle(e,t)}),n.push(...ele(tle(e),t))})),n}function ele(e,t){return R(e,(e=>Z([{name:e.tagName.text,text:rle(e,t)}],ele(tle(e),t))))}function tle(e){return Al(e)&&e.isNameFirst&&e.typeExpression&&aF(e.typeExpression.type)?e.typeExpression.type.jsDocPropertyTags:void 0}function nle(e,t){return"string"==typeof e?[lY(e)]:R(e,(e=>321===e.kind?[lY(e.text)]:mY(e,t)))}function rle(e,t){const{comment:n,kind:r}=e,i=function(e){switch(e){case 341:return aY;case 348:return sY;case 345:return _Y;case 346:case 338:return uY;default:return lY}}(r);switch(r){case 349:const r=e.typeExpression;return r?o(r):void 0===n?void 0:nle(n,t);case 329:case 328:return o(e.class);case 345:const a=e,s=[];if(a.constraint&&s.push(lY(a.constraint.getText())),p(a.typeParameters)){p(s)&&s.push(nY());const e=a.typeParameters[a.typeParameters.length-1];f(a.typeParameters,(t=>{s.push(i(t.getText())),e!==t&&s.push(iY(28),nY())}))}return n&&s.push(nY(),...nle(n,t)),s;case 344:case 350:return o(e.typeExpression);case 346:case 338:case 348:case 341:case 347:const{name:c}=e;return c?o(c):void 0===n?void 0:nle(n,t);default:return void 0===n?void 0:nle(n,t)}function o(e){return r=e.getText(),n?r.match(/^https?$/)?[lY(r),...nle(n,t)]:[i(r),nY(),...nle(n,t)]:[lY(r)];var r}}function ile(){return Hce||(Hce=O(Xce,(e=>({name:e,kind:"keyword",kindModifiers:"",sortText:$oe.SortText.LocationPriority}))))}var ole=sle;function ale(){return Gce||(Gce=O(Xce,(e=>({name:`@${e}`,kind:"keyword",kindModifiers:"",sortText:$oe.SortText.LocationPriority}))))}function sle(e){return{name:e,kind:"",kindModifiers:"",displayParts:[lY(e)],documentation:u,tags:void 0,codeActions:void 0}}function cle(e){if(!qD(e.name))return u;const t=e.name.text,n=e.parent,r=n.parent;return cu(r)?q(r.parameters,(r=>{if(!qD(r.name))return;const i=r.name.text;return n.tags.some((t=>t!==e&&xF(t)&&qD(t.name)&&t.name.escapedText===i))||void 0!==t&&!an(i,t)?void 0:{name:i,kind:"parameter",kindModifiers:"",sortText:$oe.SortText.LocationPriority}})):[]}function lle(e){return{name:e,kind:"parameter",kindModifiers:"",displayParts:[lY(e)],documentation:u,tags:void 0,codeActions:void 0}}function ule(e,t,n,r){const i=kX(t,n),o=mc(i,oF);if(o&&(void 0!==o.comment||p(o.tags)))return;const a=i.getStart(t);if(!o&&a_le(e,t)))}(i,r);if(!s)return;const{commentOwner:c,parameters:l,hasReturn:u}=s,_=we(O_(c)&&c.jsDoc?c.jsDoc:void 0);if(c.getStart(t){const a=80===e.kind?e.text:"param"+o;return`${n} * @param ${t?i?"{...any} ":"{any} ":""}${a}${r}`})).join("")}(l||[],f,d,e):"")+(u?function(e,t){return`${e} * @returns${t}`}(d,e):""),g=p(ll(c))>0;if(m&&!g){const t="/**"+e+d+" * ";return{newText:t+e+m+d+" */"+(a===n?e+d:""),caretOffset:t.length}}return{newText:"/** */",caretOffset:3}}function _le(e,t){switch(e.kind){case 262:case 218:case 174:case 176:case 173:case 219:const n=e;return{commentOwner:e,parameters:n.parameters,hasReturn:dle(n,t)};case 303:return _le(e.initializer,t);case 263:case 264:case 266:case 306:case 265:return{commentOwner:e};case 171:{const n=e;return n.type&&SE(n.type)?{commentOwner:e,parameters:n.type.parameters,hasReturn:dle(n.type,t)}:{commentOwner:e}}case 243:{const n=e.declarationList.declarations,r=1===n.length&&n[0].initializer?function(e){for(;217===e.kind;)e=e.expression;switch(e.kind){case 218:case 219:return e;case 231:return S(e.members,fE)}}(n[0].initializer):void 0;return r?{commentOwner:e,parameters:r.parameters,hasReturn:dle(r,t)}:{commentOwner:e}}case 307:return"quit";case 267:return 267===e.parent.kind?void 0:{commentOwner:e};case 244:return _le(e.expression,t);case 226:{const n=e;return 0===ag(n)?"quit":cu(n.right)?{commentOwner:e,parameters:n.right.parameters,hasReturn:dle(n.right,t)}:{commentOwner:e}}case 172:const r=e.initializer;if(r&&(nP(r)||rP(r)))return{commentOwner:e,parameters:r.parameters,hasReturn:dle(r,t)}}}function dle(e,t){return!!(null==t?void 0:t.generateReturnInDocTemplate)&&(SE(e)||rP(e)&&Xu(e.body)||uu(e)&&e.body&&DP(e.body)&&!!Pf(e.body,(e=>e)))}var ple={};function fle(e,t,n,r,i,o){return r_e.ChangeTracker.with({host:r,formatContext:i,preferences:o},(r=>{const i=t.map((t=>function(e,t){const n=[{parse:()=>JI("__mapcode_content_nodes.ts",t,e.languageVersion,!0,e.scriptKind),body:e=>e.statements},{parse:()=>JI("__mapcode_class_content_nodes.ts",`class __class {\n${t}\n}`,e.languageVersion,!0,e.scriptKind),body:e=>e.statements[0].members}],r=[];for(const{parse:e,body:t}of n){const n=e(),i=t(n);if(i.length&&0===n.parseDiagnostics.length)return i;i.length&&r.push({sourceFile:n,body:i})}const{body:i}=r.sort(((e,t)=>e.sourceFile.parseDiagnostics.length-t.sourceFile.parseDiagnostics.length))[0];return i}(e,t))),o=n&&j(n);for(const t of i)mle(e,r,t,o)}))}function mle(e,t,n,r){mu(n[0])||ku(n[0])?function(e,t,n,r){let i;if(i=r&&r.length?f(r,(t=>mc(kX(e,t.start),_n(gu,XP)))):S(e.statements,_n(gu,XP)),!i)return;const o=i.members.find((e=>n.some((t=>gle(t,e)))));if(o){const r=k(i.members,(e=>n.some((t=>gle(t,e)))));return f(n,hle),void t.replaceNodeRangeWithNodes(e,o,r,n)}f(n,hle),t.insertNodesAfter(e,i.members[i.members.length-1],n)}(e,t,n,r):function(e,t,n,r){if(!(null==r?void 0:r.length))return void t.insertNodesAtEndOfFile(e,n,!1);for(const i of r){const r=mc(kX(e,i.start),(e=>_n(DP,qN)(e)&&Q(e.statements,(e=>n.some((t=>gle(t,e)))))));if(r){const i=r.statements.find((e=>n.some((t=>gle(t,e)))));if(i){const o=k(r.statements,(e=>n.some((t=>gle(t,e)))));return f(n,hle),void t.replaceNodeRangeWithNodes(e,i,o,n)}}}let i=e.statements;for(const t of r){const n=mc(kX(e,t.start),DP);if(n){i=n.statements;break}}f(n,hle),t.insertNodesAfter(e,i[i.length-1],n)}(e,t,n,r)}function gle(e,t){var n,r,i,o,a,s;return e.kind===t.kind&&(176===e.kind?e.kind===t.kind:Dc(e)&&Dc(t)?e.name.getText()===t.name.getText():FP(e)&&FP(t)||IP(e)&&IP(t)?e.expression.getText()===t.expression.getText():OP(e)&&OP(t)?(null==(n=e.initializer)?void 0:n.getText())===(null==(r=t.initializer)?void 0:r.getText())&&(null==(i=e.incrementor)?void 0:i.getText())===(null==(o=t.incrementor)?void 0:o.getText())&&(null==(a=e.condition)?void 0:a.getText())===(null==(s=t.condition)?void 0:s.getText()):i_(e)&&i_(t)?e.expression.getText()===t.expression.getText()&&e.initializer.getText()===t.initializer.getText():$P(e)&&$P(t)?e.label.getText()===t.label.getText():e.getText()===t.getText())}function hle(e){yle(e),e.parent=void 0}function yle(e){e.pos=-1,e.end=-1,e.forEachChild(yle)}o(ple,{mapCode:()=>fle});var vle={};function ble(e,t,n,r,i,o){const a=r_e.ChangeTracker.fromContext({host:n,formatContext:t,preferences:i}),s="SortAndCombine"===o||"All"===o,c=s,l="RemoveUnused"===o||"All"===o,u=e.statements.filter(iN),_=Sle(e,u),{comparersToTest:d,typeOrdersToTest:f}=xle(i),m=d[0],g={moduleSpecifierComparer:"boolean"==typeof i.organizeImportsIgnoreCase?m:void 0,namedImportComparer:"boolean"==typeof i.organizeImportsIgnoreCase?m:void 0,typeOrder:i.organizeImportsTypeOrder};if("boolean"!=typeof i.organizeImportsIgnoreCase&&({comparer:g.moduleSpecifierComparer}=Ole(_,d)),!g.typeOrder||"boolean"!=typeof i.organizeImportsIgnoreCase){const e=Mle(u,d,f);if(e){const{namedImportComparer:t,typeOrder:n}=e;g.namedImportComparer=g.namedImportComparer??t,g.typeOrder=g.typeOrder??n}}_.forEach((e=>y(e,g))),"RemoveUnused"!==o&&function(e){const t=[],n=e.statements,r=p(n);let i=0,o=0;for(;iSle(e,t)))}(e).forEach((e=>v(e,g.namedImportComparer)));for(const t of e.statements.filter(sp))t.body&&(Sle(e,t.body.statements.filter(iN)).forEach((e=>y(e,g))),"RemoveUnused"!==o&&v(t.body.statements.filter(gN),g.namedImportComparer));return a.getChanges();function h(r,i){if(0===p(r))return;iw(r[0],1024);const o=c?He(r,(e=>Tle(e.moduleSpecifier))):[r],l=R(s?ve(o,((e,t)=>Nle(e[0].moduleSpecifier,t[0].moduleSpecifier,g.moduleSpecifierComparer??m))):o,(e=>Tle(e[0].moduleSpecifier)||void 0===e[0].moduleSpecifier?i(e):e));if(0===l.length)a.deleteNodes(e,r,{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.Include},!0);else{const i={leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.Include,suffix:gY(n,t.options)};a.replaceNodeWithNodes(e,r[0],l,i);const o=a.nodeHasTrailingComment(e,r[0],i);a.deleteNodes(e,r.slice(1),{trailingTriviaOption:r_e.TrailingTriviaOption.Include},o)}}function y(t,n){const i=n.moduleSpecifierComparer??m,o=n.namedImportComparer??m,a=$le({organizeImportsTypeOrder:n.typeOrder??"last"},o);h(t,(t=>(l&&(t=function(e,t,n){const r=n.getTypeChecker(),i=n.getCompilerOptions(),o=r.getJsxNamespace(t),a=r.getJsxFragmentFactory(t),s=!!(2&t.transformFlags),c=[];for(const n of e){const{importClause:e,moduleSpecifier:r}=n;if(!e){c.push(n);continue}let{name:i,namedBindings:o}=e;if(i&&!l(i)&&(i=void 0),o)if(_N(o))l(o.name)||(o=void 0);else{const e=o.elements.filter((e=>l(e.name)));e.lengthKle(e,t,i)))),t)))}function v(e,t){const n=$le(i,t);h(e,(e=>Dle(e,n)))}}function xle(e){return{comparersToTest:"boolean"==typeof e.organizeImportsIgnoreCase?[Jle(e,e.organizeImportsIgnoreCase)]:[Jle(e,!0),Jle(e,!1)],typeOrdersToTest:e.organizeImportsTypeOrder?[e.organizeImportsTypeOrder]:["last","inline","first"]}}function Sle(e,t){const n=Cs(e.languageVersion,!1,e.languageVariant),r=[];let i=0;for(const o of t)r[i]&&kle(e,o,n)&&i++,r[i]||(r[i]=[]),r[i].push(o);return r}function kle(e,t,n){const r=t.getFullStart(),i=t.getStart();n.setText(e.text,r,i-r);let o=0;for(;n.getTokenStart()=2))return!0;return!1}function Tle(e){return void 0!==e&&$_(e)?e.text:void 0}function Cle(e){let t;const n={defaultImports:[],namespaceImports:[],namedImports:[]},r={defaultImports:[],namespaceImports:[],namedImports:[]};for(const i of e){if(void 0===i.importClause){t=t||i;continue}const e=i.importClause.isTypeOnly?n:r,{name:o,namedBindings:a}=i.importClause;o&&e.defaultImports.push(i),a&&(_N(a)?e.namespaceImports.push(i):e.namedImports.push(i))}return{importWithoutClause:t,typeOnlyImports:n,regularImports:r}}function wle(e,t,n,r){if(0===e.length)return e;const i=Ge(e,(e=>{if(e.attributes){let t=e.attributes.token+" ";for(const n of he(e.attributes.elements,((e,t)=>Mt(e.name.text,t.name.text))))t+=n.name.text+":",t+=$_(n.value)?`"${n.value.text}"`:n.value.getText()+" ";return t}return""})),o=[];for(const e in i){const a=i[e],{importWithoutClause:s,typeOnlyImports:c,regularImports:l}=Cle(a);s&&o.push(s);for(const e of[l,c]){const i=e===c,{defaultImports:a,namespaceImports:s,namedImports:l}=e;if(!i&&1===a.length&&1===s.length&&0===l.length){const e=a[0];o.push(Ele(e,e.importClause.name,s[0].importClause.namedBindings));continue}const _=ve(s,((e,n)=>t(e.importClause.namedBindings.name.text,n.importClause.namedBindings.name.text)));for(const e of _)o.push(Ele(e,void 0,e.importClause.namedBindings));const d=Se(a),p=Se(l),f=d??p;if(!f)continue;let m;const g=[];if(1===a.length)m=a[0].importClause.name;else for(const e of a)g.push(YC.createImportSpecifier(!1,YC.createIdentifier("default"),e.importClause.name));g.push(...Ile(l));const h=YC.createNodeArray(ve(g,n),null==p?void 0:p.importClause.namedBindings.elements.hasTrailingComma),y=0===h.length?m?void 0:YC.createNamedImports(u):p?YC.updateNamedImports(p.importClause.namedBindings,h):YC.createNamedImports(h);r&&y&&(null==p?void 0:p.importClause.namedBindings)&&!Xb(p.importClause.namedBindings,r)&&iw(y,2),i&&m&&y?(o.push(Ele(f,m,void 0)),o.push(Ele(p??f,void 0,y))):o.push(Ele(f,m,y))}}return o}function Dle(e,t){if(0===e.length)return e;const{exportWithoutClause:n,namedExports:r,typeOnlyExports:i}=function(e){let t;const n=[],r=[];for(const i of e)void 0===i.exportClause?t=t||i:i.isTypeOnly?r.push(i):n.push(i);return{exportWithoutClause:t,namedExports:n,typeOnlyExports:r}}(e),o=[];n&&o.push(n);for(const e of[r,i]){if(0===e.length)continue;const n=[];n.push(...R(e,(e=>e.exportClause&&hN(e.exportClause)?e.exportClause.elements:u)));const r=ve(n,t),i=e[0];o.push(YC.updateExportDeclaration(i,i.modifiers,i.isTypeOnly,i.exportClause&&(hN(i.exportClause)?YC.updateNamedExports(i.exportClause,r):YC.updateNamespaceExport(i.exportClause,i.exportClause.name)),i.moduleSpecifier,i.attributes))}return o}function Ele(e,t,n){return YC.updateImportDeclaration(e,e.modifiers,YC.updateImportClause(e.importClause,e.importClause.isTypeOnly,t,n),e.moduleSpecifier,e.attributes)}function Ple(e,t,n,r){switch(null==r?void 0:r.organizeImportsTypeOrder){case"first":return Vt(t.isTypeOnly,e.isTypeOnly)||n(e.name.text,t.name.text);case"inline":return n(e.name.text,t.name.text);default:return Vt(e.isTypeOnly,t.isTypeOnly)||n(e.name.text,t.name.text)}}function Nle(e,t,n){const r=void 0===e?void 0:Tle(e),i=void 0===t?void 0:Tle(t);return Vt(void 0===r,void 0===i)||Vt(Os(r),Os(i))||n(r,i)}function Fle(e){var t;switch(e.kind){case 271:return null==(t=lt(e.moduleReference,SN))?void 0:t.expression;case 272:return e.moduleSpecifier;case 243:return e.declarationList.declarations[0].initializer.arguments[0]}}function Ale(e,t){const n=wD(t)&&t.text;return st(n)&&Q(e.moduleAugmentations,(e=>wD(e)&&e.text===n))}function Ile(e){return R(e,(e=>O(function(e){var t;return(null==(t=e.importClause)?void 0:t.namedBindings)&&pN(e.importClause.namedBindings)?e.importClause.namedBindings.elements:void 0}(e),(e=>e.name&&e.propertyName&&e.name.escapedText===e.propertyName.escapedText?YC.updateImportSpecifier(e,e.isTypeOnly,void 0,e.name):e))))}function Ole(e,t){const n=[];return e.forEach((e=>{n.push(e.map((e=>Tle(Fle(e))||"")))})),jle(n,t)}function Mle(e,t,n){let r=!1;const i=e.filter((e=>{var t,n;const i=null==(n=lt(null==(t=e.importClause)?void 0:t.namedBindings,pN))?void 0:n.elements;return!!(null==i?void 0:i.length)&&(!r&&i.some((e=>e.isTypeOnly))&&i.some((e=>!e.isTypeOnly))&&(r=!0),!0)}));if(0===i.length)return;const o=i.map((e=>{var t,n;return null==(n=lt(null==(t=e.importClause)?void 0:t.namedBindings,pN))?void 0:n.elements})).filter((e=>void 0!==e));if(!r||0===n.length){const e=jle(o.map((e=>e.map((e=>e.name.text)))),t);return{namedImportComparer:e.comparer,typeOrder:1===n.length?n[0]:void 0,isSorted:e.isSorted}}const a={first:1/0,last:1/0,inline:1/0},s={first:t[0],last:t[0],inline:t[0]};for(const e of t){const t={first:0,last:0,inline:0};for(const r of o)for(const i of n)t[i]=(t[i]??0)+Lle(r,((t,n)=>Ple(t,n,e,{organizeImportsTypeOrder:i})));for(const r of n){const n=r;t[n]0&&n++;return n}function jle(e,t){let n,r=1/0;for(const i of t){let t=0;for(const n of e)n.length<=1||(t+=Lle(n,i));tPle(t,r,n,e)}function qle(e,t,n){const{comparersToTest:r,typeOrdersToTest:i}=xle(t),o=Mle([e],r,i);let a,s=$le(t,r[0]);if("boolean"!=typeof t.organizeImportsIgnoreCase||!t.organizeImportsTypeOrder)if(o){const{namedImportComparer:e,typeOrder:t,isSorted:n}=o;a=n,s=$le({organizeImportsTypeOrder:t},e)}else if(n){const e=Mle(n.statements.filter(iN),r,i);if(e){const{namedImportComparer:t,typeOrder:n,isSorted:r}=e;a=r,s=$le({organizeImportsTypeOrder:n},t)}}return{specifierComparer:s,isSorted:a}}function Vle(e,t,n){const r=Ae(e,t,mt,((e,t)=>Kle(e,t,n)));return r<0?~r:r}function Ule(e,t,n){const r=Ae(e,t,mt,n);return r<0?~r:r}function Kle(e,t,n){return Nle(Fle(e),Fle(t),n)||function(e,t){return Nt(Rle(e),Rle(t))}(e,t)}function Wle(e,t,n,r){const i=Ble(t);return wle(e,i,$le({organizeImportsTypeOrder:null==r?void 0:r.organizeImportsTypeOrder},i),n)}function Hle(e,t,n){return Dle(e,((e,r)=>Ple(e,r,Ble(t),{organizeImportsTypeOrder:(null==n?void 0:n.organizeImportsTypeOrder)??"last"})))}function Gle(e,t,n){return Nle(e,t,Ble(!!n))}o(vle,{compareImportsOrRequireStatements:()=>Kle,compareModuleSpecifiers:()=>Gle,getDetectionLists:()=>xle,getImportDeclarationInsertionIndex:()=>Vle,getImportSpecifierInsertionIndex:()=>Ule,getNamedImportSpecifierComparerWithDetection:()=>qle,getOrganizeImportsStringComparerWithDetection:()=>zle,organizeImports:()=>ble,testCoalesceExports:()=>Hle,testCoalesceImports:()=>Wle});var Xle={};function Qle(e,t){const n=[];return function(e,t,n){let r=40,i=0;const o=[...e.statements,e.endOfFileToken],a=o.length;for(;i...")}(e);case 288:return function(e){const n=Xs(e.openingFragment.getStart(t),e.closingFragment.getEnd());return iue(n,"code",n,!1,"<>...")}(e);case 285:case 286:return function(e){if(0!==e.properties.length)return nue(e.getStart(t),e.getEnd(),"code")}(e.attributes);case 228:case 15:return function(e){if(15!==e.kind||0!==e.text.length)return nue(e.getStart(t),e.getEnd(),"code")}(e);case 207:return i(e,!1,!KE(e.parent),23);case 219:return function(e){if(DP(e.body)||tP(e.body)||ix(e.body.getFullStart(),e.body.getEnd(),t))return;return iue(Xs(e.body.getFullStart(),e.body.getEnd()),"code",aQ(e))}(e);case 213:return function(e){if(!e.arguments.length)return;const n=uX(e,21,t),r=uX(e,22,t);return n&&r&&!ix(n.pos,r.pos,t)?rue(n,r,e,t,!1,!0):void 0}(e);case 217:return function(e){if(ix(e.getStart(),e.getEnd(),t))return;return iue(Xs(e.getStart(),e.getEnd()),"code",aQ(e))}(e);case 275:case 279:case 300:return function(e){if(!e.elements.length)return;const n=uX(e,19,t),r=uX(e,20,t);return n&&r&&!ix(n.pos,r.pos,t)?rue(n,r,e,t,!1,!1):void 0}(e)}var n;function r(e,t=19){return i(e,!1,!WE(e.parent)&&!QE(e.parent),t)}function i(n,r=!1,i=!0,o=19,a=(19===o?20:24)){const s=uX(e,o,t),c=uX(e,a,t);return s&&c&&rue(s,c,n,t,r,i)}}(i,e);a&&n.push(a),r--,QE(i)?(r++,s(i.expression),r--,i.arguments.forEach(s),null==(o=i.typeArguments)||o.forEach(s)):FP(i)&&i.elseStatement&&FP(i.elseStatement)?(s(i.expression),s(i.thenStatement),r++,s(i.elseStatement),r--):i.forEachChild(s),r++}}(e,t,n),function(e,t){const n=[],r=e.getLineStarts();for(const i of r){const r=e.getLineEndOfPosition(i),o=Zle(e.text.substring(i,r));if(o&&!qX(e,i))if(o[1]){const e=n.pop();e&&(e.textSpan.length=r-e.textSpan.start,e.hintSpan.length=r-e.textSpan.start,t.push(e))}else{const t=Xs(e.text.indexOf("//",i),r);n.push(iue(t,"region",t,!1,o[2]||"#region"))}}}(e,n),n.sort(((e,t)=>e.textSpan.start-t.textSpan.start))}o(Xle,{collectElements:()=>Qle});var Yle=/^#(end)?region(?:\s+(.*))?(?:\r)?$/;function Zle(e){return an(e=e.trimStart(),"//")?(e=e.slice(2).trim(),Yle.exec(e)):null}function eue(e,t,n,r){const i=vs(t.text,e);if(!i)return;let o=-1,a=-1,s=0;const c=t.getFullText();for(const{kind:e,pos:t,end:u}of i)switch(n.throwIfCancellationRequested(),e){case 2:if(Zle(c.slice(t,u))){l(),s=0;break}0===s&&(o=t),a=u,s++;break;case 3:l(),r.push(nue(t,u,"comment")),s=0;break;default:xn.assertNever(e)}function l(){s>1&&r.push(nue(o,a,"comment"))}l()}function tue(e,t,n,r){DD(e)||eue(e.pos,t,n,r)}function nue(e,t,n){return iue(Xs(e,t),n)}function rue(e,t,n,r,i=!1,o=!0){return iue(Xs(o?e.getFullStart():e.getStart(r),t.getEnd()),"code",aQ(n,r),i)}function iue(e,t,n=e,r=!1,i="..."){return{textSpan:e,kind:t,hintSpan:n,bannerText:i,autoCollapse:r}}var oue={};function aue(e,t,n,r){const i=bX(xX(t,n));if(_ue(i)){const n=function(e,t,n,r,i){const o=t.getSymbolAtLocation(e);if(!o){if($_(e)){const r=mX(e,t);if(r&&(128&r.flags||1048576&r.flags&&x(r.types,(e=>!!(128&e.flags)))))return cue(e.text,e.text,"string","",e,n)}else if(LG(e)){const t=Gd(e);return cue(t,t,"label","",e,n)}return}const{declarations:a}=o;if(!a||0===a.length)return;if(a.some((e=>function(e,t){const n=t.getSourceFile();return e.isSourceFileDefaultLibrary(n)&&Ao(n.fileName,".d.ts")}(r,e))))return lue(va.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(qD(e)&&"default"===e.escapedText&&o.parent&&1536&o.parent.flags)return;if($_(e)&&Tg(e))return i.allowRenameOfImportPath?function(e,t,n){if(!Os(e.text))return lue(va.You_cannot_rename_a_module_via_a_global_import);const r=n.declarations&&S(n.declarations,qN);if(!r)return;const i=Wt(e.text,"/index")||Wt(e.text,"/index.js")?void 0:Gt(Yk(r.fileName),"/index"),o=void 0===i?r.fileName:i,a=void 0===i?"module":"directory",s=e.text.lastIndexOf("/")+1,c=Gs(e.getStart(t)+1+s,e.text.length-s);return{canRename:!0,fileToRename:o,kind:a,displayName:o,fullDisplayName:e.text,kindModifiers:"",triggerSpan:c}}(e,n,o):void 0;const s=function(e,t,n,r){if(!r.providePrefixAndSuffixTextForRename&&2097152&t.flags){const e=t.declarations&&S(t.declarations,(e=>fN(e)));e&&!e.propertyName&&(t=n.getAliasedSymbol(t))}const{declarations:i}=t;if(!i)return;const o=sue(e.path);if(void 0===o)return Q(i,(e=>SZ(e.getSourceFile().path)))?va.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:void 0;for(const e of i){const t=sue(e.getSourceFile().path);if(t){const e=Math.min(o.length,t.length);for(let n=0;n<=e;n++)if(0!==Mt(o[n],t[n]))return va.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder}}}(n,o,t,i);if(s)return lue(s);const c=Hue.getSymbolKind(t,o,e),l=kY(e)||$h(e)&&167===e.parent.kind?By(Hh(e)):void 0;return cue(l||t.symbolToString(o),l||t.getFullyQualifiedName(o),c,Hue.getSymbolModifiers(t,o),e,n)}(i,e.getTypeChecker(),t,e,r);if(n)return n}return lue(va.You_cannot_rename_this_element)}function sue(e){const t=$o(e),n=t.lastIndexOf("node_modules");if(-1!==n)return t.slice(0,n+2)}function cue(e,t,n,r,i,o){return{canRename:!0,fileToRename:void 0,kind:n,displayName:e,fullDisplayName:t,kindModifiers:r,triggerSpan:uue(i,o)}}function lue(e){return{canRename:!1,localizedErrorMessage:tS(e)}}function uue(e,t){let n=e.getStart(t),r=e.getWidth(t);return $_(e)&&(n+=1,r-=2),Gs(n,r)}function _ue(e){switch(e.kind){case 80:case 81:case 11:case 15:case 110:return!0;case 9:return qG(e);default:return!1}}o(oue,{getRenameInfo:()=>aue,nodeIsEligibleForRename:()=>_ue});var due={};function pue(e,t,n,r,i){const o=e.getTypeChecker(),a=wX(t,n);if(!a)return;const s=!!r&&"characterTyped"===r.kind;if(s&&(AX(t,n,a)||qX(t,n)))return;const c=!!r&&"invoked"===r.kind,l=function(e,t,n,r,i){for(let o=e;!qN(o)&&(i||!DP(o));o=o.parent){xn.assert(XG(o.parent,o),"Not a subspan",(()=>`Child: ${xn.formatSyntaxKind(o.kind)}, parent: ${xn.formatSyntaxKind(o.parent.kind)}`));const e=yue(o,t,n,r);if(e)return e}}(a,n,t,o,c);if(!l)return;i.throwIfCancellationRequested();const u=function({invocation:e,argumentCount:t},n,r,i,o){switch(e.kind){case 0:{if(o&&!function(e,t,n){if(!$u(t))return!1;const r=t.getChildren(n);switch(e.kind){case 21:return D(r,e);case 28:{const t=_X(e);return!!t&&D(r,t)}case 30:return fue(e,n,t.expression);default:return!1}}(i,e.node,r))return;const a=[],s=n.getResolvedSignatureForSignatureHelp(e.node,a,t);return 0===a.length?void 0:{kind:0,candidates:a,resolvedSignature:s}}case 1:{const{called:a}=e;if(o&&!fue(i,r,qD(a)?a.parent:a))return;const s=zX(a,t,n);if(0!==s.length)return{kind:0,candidates:s,resolvedSignature:Te(s)};const c=n.getSymbolAtLocation(a);return c&&{kind:1,symbol:c}}case 2:return{kind:0,candidates:[e.signature],resolvedSignature:e.signature};default:return xn.assertNever(e)}}(l,o,t,a,s);return i.throwIfCancellationRequested(),u?o.runWithCancellationToken(i,(e=>0===u.kind?Nue(u.candidates,u.resolvedSignature,l,t,e):function(e,{argumentCount:t,argumentsSpan:n,invocation:r,argumentIndex:i},o,a){const s=a.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e);if(s)return{items:[Fue(e,s,a,Eue(r),o)],applicableSpan:n,selectedItemIndex:0,argumentIndex:i,argumentCount:t}}(u.symbol,l,t,e))):Im(t)?function(e,t,n){if(2===e.invocation.kind)return;const r=Due(e.invocation),i=GE(r)?r.name.text:void 0,o=t.getTypeChecker();return void 0===i?void 0:g(t.getSourceFiles(),(t=>g(t.getNamedDeclarations().get(i),(r=>{const i=r.symbol&&o.getTypeOfSymbolAtLocation(r.symbol,r),a=i&&i.getCallSignatures();if(a&&a.length)return o.runWithCancellationToken(n,(n=>Nue(a,a[0],e,t,n,!0)))}))))}(l,e,i):void 0}function fue(e,t,n){const r=e.getFullStart();let i=e.parent;for(;i;){const e=EX(r,t,i,!0);if(e)return XG(n,e);i=i.parent}return xn.fail("Could not find preceding token")}function mue(e,t,n,r){const i=hue(e,t,n,r);return!i||i.isTypeParameterList||0!==i.invocation.kind?void 0:{invocation:i.invocation.node,argumentCount:i.argumentCount,argumentIndex:i.argumentIndex}}function gue(e,t,n,r){const i=function(e,t,n){if(30===e.kind||21===e.kind)return{list:wue(e.parent,e,t),argumentIndex:0};{const t=_X(e);return t&&{list:t,argumentIndex:Sue(n,t,e)}}}(e,n,r);if(!i)return;const{list:o,argumentIndex:a}=i,s=function(e,t){return kue(e,t,void 0)}(r,o);0!==a&&xn.assertLessThan(a,s);const c=function(e,t){const n=e.getFullStart();return Gs(n,as(t.text,e.getEnd(),!1)-n)}(o,n);return{list:o,argumentIndex:a,argumentCount:s,argumentsSpan:c}}function hue(e,t,n,r){const{parent:i}=e;if($u(i)){const t=i,o=gue(e,0,n,r);if(!o)return;const{list:a,argumentIndex:s,argumentCount:c,argumentsSpan:l}=o;return{isTypeParameterList:!!i.typeArguments&&i.typeArguments.pos===a.pos,invocation:{kind:0,node:t},argumentsSpan:l,argumentIndex:s,argumentCount:c}}if(PD(e)&&ZE(i))return YX(e,t,n)?Tue(i,0,n):void 0;if(ND(e)&&215===i.parent.kind){const r=i,o=r.parent;return xn.assert(228===r.kind),Tue(o,YX(e,t,n)?0:1,n)}if(CP(i)&&ZE(i.parent.parent)){const r=i,o=i.parent.parent;if(AD(e)&&!YX(e,t,n))return;const a=function(e,t,n,r){return xn.assert(n>=t.getStart(),"Assumed 'position' could not occur before node."),$l(t)?YX(t,n,r)?0:e+2:e+1}(r.parent.templateSpans.indexOf(r),e,t,n);return Tue(o,a,n)}if(D_(i)){const e=i.attributes.pos;return{isTypeParameterList:!1,invocation:{kind:0,node:i},argumentsSpan:Gs(e,as(n.text,i.attributes.end,!1)-e),argumentIndex:0,argumentCount:1}}{const t=$X(e,n);if(t){const{called:r,nTypeArguments:i}=t;return{isTypeParameterList:!0,invocation:{kind:1,called:r},argumentsSpan:Xs(r.getStart(n),e.end),argumentIndex:i,argumentCount:i+1}}return}}function yue(e,t,n,r){return function(e,t,n,r){const i=function(e){switch(e.kind){case 21:case 28:return e;default:return mc(e.parent,(e=>!!sE(e)||!(KE(e)||VE(e)||UE(e))&&"quit"))}}(e);if(void 0===i)return;const o=function(e,t,n,r){const{parent:i}=e;switch(i.kind){case 217:case 174:case 218:case 219:const n=gue(e,0,t,r);if(!n)return;const{argumentIndex:o,argumentCount:a,argumentsSpan:s}=n,c=dE(i)?r.getContextualTypeForObjectLiteralElement(i):r.getContextualType(i);return c&&{contextualType:c,argumentIndex:o,argumentCount:a,argumentsSpan:s};case 226:{const t=vue(i),n=r.getContextualType(t),o=21===e.kind?0:bue(i)-1,a=bue(t);return n&&{contextualType:n,argumentIndex:o,argumentCount:a,argumentsSpan:aQ(i)}}default:return}}(i,n,0,r);if(void 0===o)return;const{contextualType:a,argumentIndex:s,argumentCount:c,argumentsSpan:l}=o,u=a.getNonNullableType(),_=u.symbol;if(void 0===_)return;const d=we(u.getCallSignatures());var p;return void 0!==d?{isTypeParameterList:!1,invocation:{kind:2,signature:d,node:e,symbol:(p=_,"__type"===p.name&&g(p.declarations,(e=>{var t;return SE(e)?null==(t=lt(e.parent,p_))?void 0:t.symbol:void 0}))||p)},argumentsSpan:l,argumentIndex:s,argumentCount:c}:void 0}(e,0,n,r)||hue(e,t,n,r)}function vue(e){return uP(e.parent)?vue(e.parent):e}function bue(e){return uP(e.left)?bue(e.left)+1:2}function xue(e,t){const n=t.getTypeAtLocation(e.expression);if(t.isTupleType(n)){const{elementFlags:e,fixedLength:t}=n.target;if(0===t)return 0;const r=T(e,(e=>!(1&e)));return r<0?t:r}return 0}function Sue(e,t,n){return kue(e,t,n)}function kue(e,t,n){const r=t.getChildren();let i=0,o=!1;for(const t of r){if(n&&t===n)return o||28!==t.kind||i++,i;fP(t)?(i+=xue(t,e),o=!0):28===t.kind?o?o=!1:i++:(i++,o=!0)}return n?i:r.length&&28===De(r).kind?i+1:i}function Tue(e,t,n){const r=PD(e.template)?1:e.template.templateSpans.length+1;return 0!==t&&xn.assertLessThan(t,r),{isTypeParameterList:!1,invocation:{kind:0,node:e},argumentsSpan:Cue(e,n),argumentIndex:t,argumentCount:r}}function Cue(e,t){const n=e.template,r=n.getStart();let i=n.getEnd();return 228===n.kind&&0===De(n.templateSpans).literal.getFullWidth()&&(i=as(t.text,i,!1)),Gs(r,i-r)}function wue(e,t,n){const r=e.getChildren(n),i=r.indexOf(t);return xn.assert(i>=0&&r.length>i+1),r[i+1]}function Due(e){return 0===e.kind?mm(e.node):e.called}function Eue(e){return 0===e.kind?e.node:1===e.kind?e.called:e.node}o(due,{getArgumentInfoForCompletions:()=>mue,getSignatureHelpItems:()=>pue});var Pue=70246400;function Nue(e,t,{isTypeParameterList:n,argumentCount:r,argumentsSpan:i,invocation:o,argumentIndex:a},s,c,l){var _;const d=Eue(o),p=2===o.kind?o.symbol:c.getSymbolAtLocation(Due(o))||l&&(null==(_=t.declaration)?void 0:_.symbol),f=p?bY(c,p,l?s:void 0,void 0):u,m=O(e,(e=>function(e,t,n,r,i,o){return O((n?Oue:Mue)(e,r,i,o),(({isVariadic:n,parameters:o,prefix:a,suffix:s})=>{const c=[...t,...a],l=[...s,...Iue(e,i,r)],u=e.getDocumentationComment(r),_=e.getJsDocTags();return{isVariadic:n,prefixDisplayParts:c,suffixDisplayParts:l,separatorDisplayParts:Aue,parameters:o,documentation:u,tags:_}}))}(e,f,n,c,d,s)));0!==a&&xn.assertLessThan(a,r);let g=0,h=0;for(let n=0;n1)){let e=0;for(const t of i){if(t.isVariadic||t.parameters.length>=r){g=h+e;break}e++}}h+=i.length}xn.assert(-1!==g);const y={items:B(m,mt),applicableSpan:i,selectedItemIndex:g,argumentIndex:a,argumentCount:r},v=y.items[g];if(v.isVariadic){const e=T(v.parameters,(e=>!!e.isRest));-1Lue(e,n,r,i,a))),c=e.getDocumentationComment(n),l=e.getJsDocTags(n);return{isVariadic:!1,prefixDisplayParts:[...o,iY(30)],suffixDisplayParts:[iY(32)],separatorDisplayParts:Aue,parameters:s,documentation:c,tags:l}}var Aue=[iY(28),nY()];function Iue(e,t,n){return yY((r=>{r.writePunctuation(":"),r.writeSpace(" ");const i=n.getTypePredicateOfSignature(e);i?n.writeTypePredicate(i,t,void 0,r):n.writeType(n.getReturnTypeOfSignature(e),t,void 0,r)}))}function Oue(e,t,n,r){const i=(e.target||e).typeParameters,o=eq(),a=(i||u).map((e=>Lue(e,t,n,r,o))),s=e.thisParameter?[t.symbolToParameterDeclaration(e.thisParameter,n,Pue)]:[];return t.getExpandedParameters(e).map((e=>{const i=YC.createNodeArray([...s,...O(e,(e=>t.symbolToParameterDeclaration(e,n,Pue)))]),c=yY((e=>{o.writeList(2576,i,r,e)}));return{isVariadic:!1,parameters:a,prefix:[iY(30)],suffix:[iY(32),...c]}}))}function Mue(e,t,n,r){const i=eq(),o=yY((o=>{if(e.typeParameters&&e.typeParameters.length){const a=YC.createNodeArray(e.typeParameters.map((e=>t.typeParameterToDeclaration(e,n,Pue))));i.writeList(53776,a,r,o)}})),a=t.getExpandedParameters(e),s=t.hasEffectiveRestParameter(e)?1===a.length?e=>!0:e=>{var t;return!!(e.length&&32768&(null==(t=lt(e[e.length-1],td))?void 0:t.links.checkFlags))}:e=>!1;return a.map((e=>({isVariadic:s(e),parameters:e.map((e=>function(e,t,n,r,i){const o=yY((o=>{const a=t.symbolToParameterDeclaration(e,n,Pue);i.writeNode(4,a,r,o)})),a=t.isOptionalParameter(e.valueDeclaration),s=td(e)&&!!(32768&e.links.checkFlags);return{name:e.name,documentation:e.getDocumentationComment(t),displayParts:o,isOptional:a,isRest:s}}(e,t,n,r,i))),prefix:[...o,iY(21)],suffix:[iY(22)]})))}function Lue(e,t,n,r,i){const o=yY((o=>{const a=t.typeParameterToDeclaration(e,n,Pue);i.writeNode(4,a,r,o)}));return{name:e.symbol.name,documentation:e.symbol.getDocumentationComment(t),displayParts:o,isOptional:!1,isRest:!1}}var jue={};function Rue(e,t){var n,r;let i={textSpan:Xs(t.getFullStart(),t.getEnd())},o=t;e:for(;;){const i=zue(o);if(!i.length)break;for(let c=0;ce)break e;const d=Ee(bs(t.text,u.end));if(d&&2===d.kind&&s(d.pos,d.end),Bue(t,e,u)){if(a_(u)&&uu(o)&&!ix(u.getStart(t),u.getEnd(),t)&&a(u.getStart(t),u.getEnd()),DP(u)||CP(u)||ND(u)||AD(u)||l&&ND(l)||WP(u)&&EP(o)||IF(u)&&WP(o)||KP(u)&&IF(o)&&1===i.length||UN(u)||sF(u)||aF(u)){o=u;break}CP(o)&&_&&ql(_)&&a(u.getFullStart()-"${".length,_.getStart()+"}".length);const e=IF(u)&&Uue(l)&&Kue(_)&&!ix(l.getStart(),_.getStart(),t);let s=e?l.getEnd():u.getStart();const c=e?_.getStart():Wue(t,u);if(O_(u)&&(null==(n=u.jsDoc)?void 0:n.length)&&a(Te(u.jsDoc).getStart(),c),IF(u)){const e=u.getChildren()[0];e&&O_(e)&&(null==(r=e.jsDoc)?void 0:r.length)&&e.getStart()!==u.pos&&(s=Math.min(s,Te(e.jsDoc).getStart()))}a(s,c),(wD(u)||qu(u))&&a(s+1,c-1),o=u;break}if(c===i.length-1)break e}}return i;function a(t,n){if(t!==n){const r=Xs(t,n);(!i||!VQ(r,i.textSpan)&&Ws(r,e))&&(i={textSpan:r,...i&&{parent:i}})}}function s(e,n){a(e,n);let r=e;for(;47===t.text.charCodeAt(r);)r++;a(r,n)}}function Bue(e,t,n){return xn.assert(n.pos<=t),tRue});var Jue=_n(iN,rN);function zue(e){var t;if(qN(e))return $ue(e.getChildAt(0).getChildren(),Jue);if(BE(e)){const[t,...n]=e.getChildren(),r=xn.checkDefined(n.pop());xn.assertEqual(t.kind,19),xn.assertEqual(r.kind,20);const i=$ue(n,(t=>t===e.readonlyToken||148===t.kind||t===e.questionToken||58===t.kind));return[t,Vue(que($ue(i,(({kind:e})=>23===e||168===e||24===e)),(({kind:e})=>59===e))),r]}if(lE(e)){const n=$ue(e.getChildren(),(t=>t===e.name||D(e.modifiers,t))),r=320===(null==(t=n[0])?void 0:t.kind)?n[0]:void 0,i=que(r?n.slice(1):n,(({kind:e})=>59===e));return r?[r,Vue(i)]:i}if(sE(e)){const t=$ue(e.getChildren(),(t=>t===e.dotDotDotToken||t===e.name));return que($ue(t,(n=>n===t[0]||n===e.questionToken)),(({kind:e})=>64===e))}return KE(e)?que(e.getChildren(),(({kind:e})=>64===e)):e.getChildren()}function $ue(e,t){const n=[];let r;for(const i of e)t(i)?(r=r||[],r.push(i)):(r&&(n.push(Vue(r)),r=void 0),n.push(i));return r&&n.push(Vue(r)),n}function que(e,t,n=!0){if(e.length<2)return e;const r=T(e,t);if(-1===r)return e;const i=e.slice(0,r),o=e[r],a=De(e),s=n&&27===a.kind,c=e.slice(r+1,s?e.length-1:void 0),l=ce([i.length?Vue(i):void 0,o,c.length?Vue(c):void 0]);return s?l.concat(a):l}function Vue(e){return xn.assertGreaterThanOrEqual(e.length,1),FT(_I.createSyntaxList(e),e[0].pos,De(e).end)}function Uue(e){const t=e&&e.kind;return 19===t||23===t||21===t||286===t}function Kue(e){const t=e&&e.kind;return 20===t||24===t||22===t||287===t}function Wue(e,t){switch(t.kind){case 341:case 338:case 348:case 346:case 343:return e.getLineEndOfPosition(t.getStart());default:return t.getEnd()}}var Hue={};o(Hue,{getSymbolDisplayPartsDocumentationAndSymbolKind:()=>t_e,getSymbolKind:()=>Xue,getSymbolModifiers:()=>Zue});var Gue=70246400;function Xue(e,t,n){const r=Que(e,t,n);if(""!==r)return r;const i=gx(t);return 32&i?Y_(t,231)?"local class":"class":384&i?"enum":524288&i?"type":64&i?"interface":262144&i?"type parameter":8&i?"enum member":2097152&i?"alias":1536&i?"module":r}function Que(e,t,n){const r=e.getRootSymbols(t);if(1===r.length&&8192&Te(r).flags&&0!==e.getTypeOfSymbolAtLocation(t,n).getNonNullableType().getCallSignatures().length)return"method";if(e.isUndefinedSymbol(t))return"var";if(e.isArgumentsSymbol(t))return"local var";if(110===n.kind&&Xu(n)||bv(n))return"parameter";const i=gx(t);if(3&i)return YQ(t)?"parameter":t.valueDeclaration&&af(t.valueDeclaration)?"const":t.valueDeclaration&&of(t.valueDeclaration)?"using":t.valueDeclaration&&rf(t.valueDeclaration)?"await using":f(t.declarations,cf)?"let":n_e(t)?"local var":"var";if(16&i)return n_e(t)?"local function":"function";if(32768&i)return"getter";if(65536&i)return"setter";if(8192&i)return"method";if(16384&i)return"constructor";if(131072&i)return"index";if(4&i){if(33554432&i&&6&t.links.checkFlags){const r=f(e.getRootSymbols(t),(e=>{if(98311&e.getFlags())return"property"}));return r||(e.getTypeOfSymbolAtLocation(t,n).getCallSignatures().length?"method":"property")}return"property"}return""}function Yue(e){if(e.declarations&&e.declarations.length){const[t,...n]=e.declarations,r=KX(t,p(n)&&zZ(t)&&Q(n,(e=>!zZ(e)))?65536:0);if(r)return r.split(",")}return[]}function Zue(e,t){if(!t)return"";const n=new Set(Yue(t));if(2097152&t.flags){const r=e.getAliasedSymbol(t);r!==t&&f(Yue(r),(e=>{n.add(e)}))}return 16777216&t.flags&&n.add("optional"),n.size>0?$e(n.values()).join(","):""}function e_e(e,t,n,r,i,o,a,s){var c;const l=[];let _=[],d=[];const p=gx(t);let m=1&a?Que(e,t,i):"",h=!1;const y=110===i.kind&&Cm(i)||bv(i);let v,b,x=!1;if(110===i.kind&&!y)return{displayParts:[rY(110)],documentation:[],symbolKind:"primitive type",tags:void 0};if(""!==m||32&p||2097152&p){if("getter"===m||"setter"===m){const e=S(t.declarations,(e=>e.name===i));if(e)switch(e.kind){case 177:m="getter";break;case 178:m="setter";break;case 172:m="accessor";break;default:xn.assertNever(e)}else m="property"}let n,a;if(o??(o=y?e.getTypeAtLocation(i):e.getTypeOfSymbolAtLocation(t,i)),i.parent&&211===i.parent.kind){const e=i.parent.name;(e===i||e&&0===e.getFullWidth())&&(i=i.parent)}if($u(i)?a=i:(bG(i)||xG(i)||i.parent&&(D_(i.parent)||ZE(i.parent))&&cu(t.valueDeclaration))&&(a=i.parent),a){n=e.getResolvedSignature(a);const i=214===a.kind||QE(a)&&108===a.expression.kind,s=i?o.getConstructSignatures():o.getCallSignatures();if(!n||D(s,n.target)||D(s,n)||(n=s.length?s[0]:void 0),n){switch(i&&32&p?(m="constructor",P(o.symbol,m)):2097152&p?(m="alias",N(m),l.push(nY()),i&&(4&n.flags&&(l.push(rY(128)),l.push(nY())),l.push(rY(105)),l.push(nY())),E(t)):P(t,m),m){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":l.push(iY(59)),l.push(nY()),16&wx(o)||!o.symbol||(pe(l,bY(e,o.symbol,r,void 0,5)),l.push(hY())),i&&(4&n.flags&&(l.push(rY(128)),l.push(nY())),l.push(rY(105)),l.push(nY())),F(n,s,262144);break;default:F(n,s)}h=!0,x=s.length>1}}else if($G(i)&&!(98304&p)||137===i.kind&&176===i.parent.kind){const r=i.parent;if(t.declarations&&S(t.declarations,(e=>e===(137===i.kind?r.parent:r)))){const i=176===r.kind?o.getNonNullableType().getConstructSignatures():o.getNonNullableType().getCallSignatures();n=e.isImplementationOfOverload(r)?i[0]:e.getSignatureFromDeclaration(r),176===r.kind?(m="constructor",P(o.symbol,m)):P(179!==r.kind||2048&o.symbol.flags||4096&o.symbol.flags?t:o.symbol,m),n&&F(n,i),h=!0,x=i.length>1}}}if(32&p&&!h&&!y&&(C(),Y_(t,231)?N("local class"):l.push(rY(86)),l.push(nY()),E(t),A(t,n)),64&p&&2&a&&(T(),l.push(rY(120)),l.push(nY()),E(t),A(t,n)),524288&p&&2&a&&(T(),l.push(rY(156)),l.push(nY()),E(t),A(t,n),l.push(nY()),l.push(oY(64)),l.push(nY()),pe(l,vY(e,i.parent&&Dl(i.parent)?e.getTypeAtLocation(i.parent):e.getDeclaredTypeOfSymbol(t),r,8388608))),384&p&&(T(),Q(t.declarations,(e=>YP(e)&&tf(e)))&&(l.push(rY(87)),l.push(nY())),l.push(rY(94)),l.push(nY()),E(t)),1536&p&&!y){T();const e=Y_(t,267),n=e&&e.name&&80===e.name.kind;l.push(rY(n?145:144)),l.push(nY()),E(t)}if(262144&p&&2&a)if(T(),l.push(iY(21)),l.push(lY("type parameter")),l.push(iY(22)),l.push(nY()),E(t),t.parent)w(),E(t.parent,r),A(t.parent,r);else{const r=Y_(t,168);if(void 0===r)return xn.fail();const i=r.parent;if(i)if(cu(i)){w();const t=e.getSignatureFromDeclaration(i);180===i.kind?(l.push(rY(105)),l.push(nY())):179!==i.kind&&i.name&&E(i.symbol),pe(l,xY(e,t,n,32))}else QP(i)&&(w(),l.push(rY(156)),l.push(nY()),E(i.symbol),A(i.symbol,n))}if(8&p){m="enum member",P(t,"enum member");const n=null==(c=t.declarations)?void 0:c[0];if(306===(null==n?void 0:n.kind)){const t=e.getConstantValue(n);void 0!==t&&(l.push(nY()),l.push(oY(64)),l.push(nY()),l.push(tY(rp(t),"number"==typeof t?7:8)))}}if(2097152&t.flags){if(T(),!h||0===_.length&&0===d.length){const n=e.getAliasedSymbol(t);if(n!==t&&n.declarations&&n.declarations.length>0){const i=n.declarations[0],s=Pc(i);if(s&&!h){const c=cp(i)&&Bv(i,128),u="default"!==t.name&&!c,_=e_e(e,n,Sd(i),r,s,o,a,u?t:n);l.push(..._.displayParts),l.push(hY()),v=_.documentation,b=_.tags}else v=n.getContextualDocumentationComment(i,e),b=n.getJsDocTags(e)}}if(t.declarations)switch(t.declarations[0].kind){case 270:l.push(rY(95)),l.push(nY()),l.push(rY(145));break;case 277:l.push(rY(95)),l.push(nY()),l.push(rY(t.declarations[0].isExportEquals?64:90));break;case 281:l.push(rY(95));break;default:l.push(rY(102))}l.push(nY()),E(t),f(t.declarations,(t=>{if(271===t.kind){const n=t;if(Em(n))l.push(nY()),l.push(oY(64)),l.push(nY()),l.push(rY(149)),l.push(iY(21)),l.push(tY(Gd(Pm(n)),8)),l.push(iY(22));else{const t=e.getSymbolAtLocation(n.moduleReference);t&&(l.push(nY()),l.push(oY(64)),l.push(nY()),E(t,r))}return!0}}))}if(!h)if(""!==m){if(o)if(y?(T(),l.push(rY(110))):P(t,m),"property"===m||"accessor"===m||"getter"===m||"setter"===m||"JSX attribute"===m||3&p||"local var"===m||"index"===m||"using"===m||"await using"===m||y){if(l.push(iY(59)),l.push(nY()),o.symbol&&262144&o.symbol.flags&&"index"!==m){const t=yY((t=>{const n=e.typeParameterToDeclaration(o,r,Gue);k().writeNode(4,n,Sd(hc(r)),t)}));pe(l,t)}else pe(l,vY(e,o,r));if(td(t)&&t.links.target&&td(t.links.target)&&t.links.target.links.tupleLabelDeclaration){const e=t.links.target.links.tupleLabelDeclaration;xn.assertNode(e.name,qD),l.push(nY()),l.push(iY(21)),l.push(lY(bc(e.name))),l.push(iY(22))}}else if(16&p||8192&p||16384&p||131072&p||98304&p||"method"===m){const e=o.getNonNullableType().getCallSignatures();e.length&&(F(e[0],e),x=e.length>1)}}else m=Xue(e,t,i);if(0!==_.length||x||(_=t.getContextualDocumentationComment(r,e)),0===_.length&&4&p&&t.parent&&t.declarations&&f(t.parent.declarations,(e=>307===e.kind)))for(const n of t.declarations){if(!n.parent||226!==n.parent.kind)continue;const t=e.getSymbolAtLocation(n.parent.right);if(t&&(_=t.getDocumentationComment(e),d=t.getJsDocTags(e),_.length>0))break}if(0===_.length&&qD(i)&&t.valueDeclaration&&KE(t.valueDeclaration)){const n=t.valueDeclaration,r=n.parent,i=n.propertyName||n.name;if(qD(i)&&VE(r)){const t=Hh(i),n=e.getTypeAtLocation(r);_=g(n.isUnion()?n.types:[n],(n=>{const r=n.getProperty(t);return r?r.getDocumentationComment(e):void 0}))||u}}return 0!==d.length||x||(d=t.getContextualJsDocTags(r,e)),0===_.length&&v&&(_=v),0===d.length&&b&&(d=b),{displayParts:l,documentation:_,symbolKind:m,tags:0===d.length?void 0:d};function k(){return eq()}function T(){l.length&&l.push(hY()),C()}function C(){s&&(N("alias"),l.push(nY()))}function w(){l.push(nY()),l.push(rY(103)),l.push(nY())}function E(r,i){let o;s&&r===t&&(r=s),"index"===m&&(o=e.getIndexInfosOfIndexSymbol(r));let a=[];131072&r.flags&&o?(r.parent&&(a=bY(e,r.parent)),a.push(iY(23)),o.forEach(((t,n)=>{a.push(...vY(e,t.keyType)),n!==o.length-1&&(a.push(nY()),a.push(iY(52)),a.push(nY()))})),a.push(iY(24))):a=bY(e,r,i||n,void 0,7),pe(l,a),16777216&t.flags&&l.push(iY(58))}function P(e,t){T(),t&&(N(t),e&&!Q(e.declarations,(e=>rP(e)||(nP(e)||mP(e))&&!e.name))&&(l.push(nY()),E(e)))}function N(e){switch(e){case"var":case"function":case"let":case"const":case"constructor":case"using":case"await using":return void l.push(cY(e));default:return l.push(iY(21)),l.push(cY(e)),void l.push(iY(22))}}function F(t,n,i=0){pe(l,xY(e,t,r,32|i)),n.length>1&&(l.push(nY()),l.push(iY(21)),l.push(oY(40)),l.push(tY((n.length-1).toString(),7)),l.push(nY()),l.push(lY(2===n.length?"overload":"overloads")),l.push(iY(22))),_=t.getDocumentationComment(e),d=t.getJsDocTags(),n.length>1&&0===_.length&&0===d.length&&(_=n[0].getDocumentationComment(e),d=n[0].getJsDocTags().filter((e=>"deprecated"!==e.name)))}function A(t,n){const r=yY((r=>{const i=e.symbolToTypeParameterDeclarations(t,n,Gue);k().writeList(53776,i,Sd(hc(n)),r)}));pe(l,r)}}function t_e(e,t,n,r,i,o=yG(i),a){return e_e(e,t,n,r,i,void 0,o,a)}function n_e(e){return!e.parent&&f(e.declarations,(e=>{if(218===e.kind)return!0;if(260!==e.kind&&262!==e.kind)return!1;for(let t=e.parent;!zf(t);t=t.parent)if(307===t.kind||268===t.kind)return!1;return!0}))}var r_e={};function i_e(e){const t=e.__pos;return xn.assert("number"==typeof t),t}function o_e(e,t){xn.assert("number"==typeof t),e.__pos=t}function a_e(e){const t=e.__end;return xn.assert("number"==typeof t),t}function s_e(e,t){xn.assert("number"==typeof t),e.__end=t}o(r_e,{ChangeTracker:()=>v_e,LeadingTriviaOption:()=>c_e,TrailingTriviaOption:()=>l_e,applyChanges:()=>k_e,assignPositionsToNode:()=>w_e,createWriter:()=>E_e,deleteNode:()=>N_e,isThisTypeAnnotatable:()=>h_e,isValidLocationToAddComment:()=>P_e});var c_e=(e=>(e[e.Exclude=0]="Exclude",e[e.IncludeAll=1]="IncludeAll",e[e.JSDoc=2]="JSDoc",e[e.StartLine=3]="StartLine",e))(c_e||{}),l_e=(e=>(e[e.Exclude=0]="Exclude",e[e.ExcludeWhitespace=1]="ExcludeWhitespace",e[e.Include=2]="Include",e))(l_e||{});function u_e(e,t){return as(e,t,!1,!0)}var __e={leadingTriviaOption:0,trailingTriviaOption:0};function d_e(e,t,n,r){return{pos:p_e(e,t,r),end:m_e(e,n,r)}}function p_e(e,t,n,r=!1){var i,o;const{leadingTriviaOption:a}=n;if(0===a)return t.getStart(e);if(3===a){const n=t.getStart(e),r=GG(n,e);return YG(t,r)?r:n}if(2===a){const n=vf(t,e.text);if(null==n?void 0:n.length)return GG(n[0].pos,e)}const s=t.getFullStart(),c=t.getStart(e);if(s===c)return c;const l=GG(s,e);if(GG(c,e)===l)return 1===a?s:c;if(r){const t=(null==(i=vs(e.text,s))?void 0:i[0])||(null==(o=bs(e.text,s))?void 0:o[0]);if(t)return as(e.text,t.end,!0,!0)}const u=s>0?1:0;let _=wd(_v(e,l)+u,e);return _=u_e(e.text,_),wd(_v(e,_),e)}function f_e(e,t,n){const{end:r}=t,{trailingTriviaOption:i}=n;if(2===i){const n=bs(e.text,r);if(n){const r=_v(e,t.end);for(const t of n){if(2===t.kind||_v(e,t.pos)>r)break;if(_v(e,t.end)>r)return as(e.text,t.end,!0,!0)}}}}function m_e(e,t,n){var r;const{end:i}=t,{trailingTriviaOption:o}=n;if(0===o)return i;if(1===o){const t=Z(bs(e.text,i),vs(e.text,i));return(null==(r=null==t?void 0:t[t.length-1])?void 0:r.end)||i}const a=f_e(e,t,n);if(a)return a;const s=as(e.text,i,!0);return s===i||2!==o&&!Za(e.text.charCodeAt(s-1))?i:s}function g_e(e,t){return!!t&&!!e.parent&&(28===t.kind||27===t.kind&&210===e.parent.kind)}function h_e(e){return nP(e)||HP(e)}var y_e,v_e=class e{constructor(e,t){this.newLineCharacter=e,this.formatContext=t,this.changes=[],this.classesWithNodesInsertedAtStart=new Map,this.deletedNodes=[]}static fromContext(t){return new e(gY(t.host,t.formatContext.options),t.formatContext)}static with(t,n){const r=e.fromContext(t);return n(r),r.getChanges()}pushRaw(e,t){xn.assertEqual(e.fileName,t.fileName);for(const n of t.textChanges)this.changes.push({kind:3,sourceFile:e,text:n.newText,range:uQ(n.span)})}deleteRange(e,t){this.changes.push({kind:0,sourceFile:e,range:t})}delete(e,t){this.deletedNodes.push({sourceFile:e,node:t})}deleteNode(e,t,n={leadingTriviaOption:1}){this.deleteRange(e,d_e(e,t,t,n))}deleteNodes(e,t,n={leadingTriviaOption:1},r){for(const i of t){const t=p_e(e,i,n,r),o=m_e(e,i,n);this.deleteRange(e,{pos:t,end:o}),r=!!f_e(e,i,n)}}deleteModifier(e,t){this.deleteRange(e,{pos:t.getStart(e),end:as(e.text,t.end,!0)})}deleteNodeRange(e,t,n,r={leadingTriviaOption:1}){const i=p_e(e,t,r),o=m_e(e,n,r);this.deleteRange(e,{pos:i,end:o})}deleteNodeRangeExcludingEnd(e,t,n,r={leadingTriviaOption:1}){const i=p_e(e,t,r),o=void 0===n?e.text.length:p_e(e,n,r);this.deleteRange(e,{pos:i,end:o})}replaceRange(e,t,n,r={}){this.changes.push({kind:1,sourceFile:e,range:t,options:r,node:n})}replaceNode(e,t,n,r=__e){this.replaceRange(e,d_e(e,t,t,r),n,r)}replaceNodeRange(e,t,n,r,i=__e){this.replaceRange(e,d_e(e,t,n,i),r,i)}replaceRangeWithNodes(e,t,n,r={}){this.changes.push({kind:2,sourceFile:e,range:t,options:r,nodes:n})}replaceNodeWithNodes(e,t,n,r=__e){this.replaceRangeWithNodes(e,d_e(e,t,t,r),n,r)}replaceNodeWithText(e,t,n){this.replaceRangeWithText(e,d_e(e,t,t,__e),n)}replaceNodeRangeWithNodes(e,t,n,r,i=__e){this.replaceRangeWithNodes(e,d_e(e,t,n,i),r,i)}nodeHasTrailingComment(e,t,n=__e){return!!f_e(e,t,n)}nextCommaToken(e,t){const n=DX(t,t.parent,e);return n&&28===n.kind?n:void 0}replacePropertyAssignment(e,t,n){const r=this.nextCommaToken(e,t)?"":","+this.newLineCharacter;this.replaceNode(e,t,n,{suffix:r})}insertNodeAt(e,t,n,r={}){this.replaceRange(e,qb(t),n,r)}insertNodesAt(e,t,n,r={}){this.replaceRangeWithNodes(e,qb(t),n,r)}insertNodeAtTopOfFile(e,t,n){this.insertAtTopOfFile(e,t,n)}insertNodesAtTopOfFile(e,t,n){this.insertAtTopOfFile(e,t,n)}insertAtTopOfFile(e,t,n){const r=function(e){let t;for(const n of e.statements){if(!pf(n))break;t=n}let n=0;const r=e.text;if(t)return n=t.end,c(),n;const i=xs(r);void 0!==i&&(n=i.length,c());const o=vs(r,n);if(!o)return n;let a,s;for(const t of o){if(3===t.kind){if($d(r,t.pos)){a={range:t,pinnedOrTripleSlash:!0};continue}}else if(zd(r,t.pos,t.end)){a={range:t,pinnedOrTripleSlash:!0};continue}if(a){if(a.pinnedOrTripleSlash)break;if(e.getLineAndCharacterOfPosition(t.pos).line>=e.getLineAndCharacterOfPosition(a.range.end).line+2)break}if(e.statements.length&&(void 0===s&&(s=e.getLineAndCharacterOfPosition(e.statements[0].getStart()).line),sst(e.comment)?YC.createJSDocText(e.comment):e.comment)),r=Ee(t.jsDoc);return r&&ix(r.pos,r.end,e)&&0===p(n)?void 0:YC.createNodeArray(b(n,YC.createJSDocText("\n")))}replaceJSDocComment(e,t,n){this.insertJsdocCommentBefore(e,function(e){if(219!==e.kind)return e;const t=172===e.parent.kind?e.parent:e.parent.parent;return t.jsDoc=e.jsDoc,t}(t),YC.createJSDocComment(this.createJSDocText(e,t),YC.createNodeArray(n)))}addJSDocTags(e,t,n){const r=B(t.jsDoc,(e=>e.tags)),i=n.filter((e=>!r.some(((t,n)=>{const i=function(e,t){if(e.kind===t.kind)switch(e.kind){case 341:{const n=e,r=t;return qD(n.name)&&qD(r.name)&&n.name.escapedText===r.name.escapedText?YC.createJSDocParameterTag(void 0,r.name,!1,r.typeExpression,r.isNameFirst,n.comment):void 0}case 342:return YC.createJSDocReturnTag(void 0,t.typeExpression,e.comment);case 344:return YC.createJSDocTypeTag(void 0,t.typeExpression,e.comment)}}(t,e);return i&&(r[n]=i),!!i}))));this.replaceJSDocComment(e,t,[...r,...i])}filterJSDocTags(e,t,n){this.replaceJSDocComment(e,t,F(B(t.jsDoc,(e=>e.tags)),n))}replaceRangeWithText(e,t,n){this.changes.push({kind:3,sourceFile:e,range:t,text:n})}insertText(e,t,n){this.replaceRangeWithText(e,qb(t),n)}tryInsertTypeAnnotation(e,t,n){let r;if(cu(t)){if(r=uX(t,22,e),!r){if(!rP(t))return!1;r=Te(t.parameters)}}else r=(260===t.kind?t.exclamationToken:t.questionToken)??t.name;return this.insertNodeAt(e,r.end,n,{prefix:": "}),!0}tryInsertThisTypeAnnotation(e,t,n){const r=uX(t,21,e).getStart(e)+1,i=t.parameters.length?", ":"";this.insertNodeAt(e,r,n,{prefix:"this: ",suffix:i})}insertTypeParameters(e,t,n){const r=(uX(t,21,e)||Te(t.parameters)).getStart(e);this.insertNodesAt(e,r,n,{prefix:"<",suffix:">",joiner:", "})}getOptionsForInsertNodeBefore(e,t,n){return b_(e)||mu(e)?{suffix:n?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:KP(e)?{suffix:", "}:sE(e)?sE(t)?{suffix:", "}:{}:wD(e)&&iN(e.parent)||pN(e)?{suffix:", "}:fN(e)?{suffix:","+(n?this.newLineCharacter:" ")}:xn.failBadSyntaxKind(e)}insertNodeAtConstructorStart(e,t,n){const r=Se(t.body.statements);r&&t.body.multiLine?this.insertNodeBefore(e,r,n):this.replaceConstructorBody(e,t,[n,...t.body.statements])}insertNodeAtConstructorStartAfterSuperCall(e,t,n){const r=S(t.body.statements,(e=>NP(e)&&lf(e.expression)));r&&t.body.multiLine?this.insertNodeAfter(e,r,n):this.replaceConstructorBody(e,t,[...t.body.statements,n])}insertNodeAtConstructorEnd(e,t,n){const r=we(t.body.statements);r&&t.body.multiLine?this.insertNodeAfter(e,r,n):this.replaceConstructorBody(e,t,[...t.body.statements,n])}replaceConstructorBody(e,t,n){this.replaceNode(e,t.body,YC.createBlock(n,!0))}insertNodeAtEndOfScope(e,t,n){const r=p_e(e,t.getLastToken(),{});this.insertNodeAt(e,r,n,{prefix:Za(e.text.charCodeAt(t.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})}insertMemberAtStart(e,t,n){this.insertNodeAtStartWorker(e,t,n)}insertNodeAtObjectStart(e,t,n){this.insertNodeAtStartWorker(e,t,n)}insertNodeAtStartWorker(e,t,n){const r=this.guessIndentationFromExistingMembers(e,t)??this.computeIndentationForNewMember(e,t);this.insertNodeAt(e,S_e(t).pos,n,this.getInsertNodeAtStartInsertOptions(e,t,r))}guessIndentationFromExistingMembers(e,t){let n,r=t;for(const i of S_e(t)){if(Qb(r,i,e))return;const t=i.getStart(e),o=A_e.SmartIndenter.findFirstNonWhitespaceColumn(GG(t,e),t,e,this.formatContext.options);if(void 0===n)n=o;else if(o!==n)return;r=i}return n}computeIndentationForNewMember(e,t){const n=t.getStart(e);return A_e.SmartIndenter.findFirstNonWhitespaceColumn(GG(n,e),n,e,this.formatContext.options)+(this.formatContext.options.indentSize??4)}getInsertNodeAtStartInsertOptions(e,t,n){const r=0===S_e(t).length,i=Fx(this.classesWithNodesInsertedAtStart,IB(t),{node:t,sourceFile:e}),o=HE(t)&&(!ef(e)||!r);return{indentation:n,prefix:(HE(t)&&ef(e)&&r&&!i?",":"")+this.newLineCharacter,suffix:o?",":XP(t)&&r?";":""}}insertNodeAfterComma(e,t,n){const r=this.insertNodeAfterWorker(e,this.nextCommaToken(e,t)||t,n);this.insertNodeAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAfter(e,t,n){const r=this.insertNodeAfterWorker(e,t,n);this.insertNodeAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAtEndOfList(e,t,n){this.insertNodeAt(e,t.end,n,{prefix:", "})}insertNodesAfter(e,t,n){const r=this.insertNodeAfterWorker(e,t,Te(n));this.insertNodesAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAfterWorker(e,t,n){var r,i;return i=n,((lE(r=t)||uE(r))&&Tu(i)&&167===i.name.kind||v_(r)&&v_(i))&&59!==e.text.charCodeAt(t.end-1)&&this.replaceRange(e,qb(t.end),YC.createToken(27)),m_e(e,t,{})}getInsertNodeAfterOptions(e,t){const n=this.getInsertNodeAfterOptionsWorker(t);return{...n,prefix:t.end===e.end&&b_(t)?n.prefix?`\n${n.prefix}`:"\n":n.prefix}}getInsertNodeAfterOptionsWorker(e){switch(e.kind){case 263:case 267:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 260:case 11:case 80:return{prefix:", "};case 303:return{suffix:","+this.newLineCharacter};case 95:return{prefix:" "};case 169:return{};default:return xn.assert(b_(e)||Tu(e)),{suffix:this.newLineCharacter}}}insertName(e,t,n){if(xn.assert(!t.name),219===t.kind){const r=uX(t,39,e),i=uX(t,21,e);i?(this.insertNodesAt(e,i.getStart(e),[YC.createToken(100),YC.createIdentifier(n)],{joiner:" "}),N_e(this,e,r)):(this.insertText(e,Te(t.parameters).getStart(e),`function ${n}(`),this.replaceRange(e,r,YC.createToken(22))),241!==t.body.kind&&(this.insertNodesAt(e,t.body.getStart(e),[YC.createToken(19),YC.createToken(107)],{joiner:" ",suffix:" "}),this.insertNodesAt(e,t.body.end,[YC.createToken(27),YC.createToken(20)],{joiner:" "}))}else{const r=uX(t,218===t.kind?100:86,e).end;this.insertNodeAt(e,r,YC.createIdentifier(n),{prefix:" "})}}insertExportModifier(e,t){this.insertText(e,t.getStart(e),"export ")}insertImportSpecifierAtIndex(e,t,n,r){const i=n.elements[r-1];i?this.insertNodeInListAfter(e,i,t):this.insertNodeBefore(e,n.elements[0],t,!ix(n.elements[0].getStart(),n.parent.parent.getStart(),e))}insertNodeInListAfter(e,t,n,r=A_e.SmartIndenter.getContainingList(t,e)){if(!r)return void xn.fail("node is not a list element");const i=Qd(r,t);if(i<0)return;const o=t.getEnd();if(i!==r.length-1){const o=kX(e,t.end);if(o&&g_e(t,o)){const t=r[i+1],a=u_e(e.text,t.getFullStart()),s=`${Ra(o.kind)}${e.text.substring(o.end,a)}`;this.insertNodesAt(e,a,[n],{suffix:s})}}else{const a=t.getStart(e),s=GG(a,e);let c,l=!1;if(1===r.length)c=28;else{const n=EX(t.pos,e);c=g_e(t,n)?n.kind:28,l=GG(r[i-1].getStart(e),e)!==s}if(!function(e,t){let n=t;for(;n{const[n,r]=function(e,t){const n=uX(e,19,t),r=uX(e,20,t);return[null==n?void 0:n.end,null==r?void 0:r.end]}(e,t);if(void 0!==n&&void 0!==r){const i=0===S_e(e).length,o=ix(n,r,t);i&&o&&n!==r-1&&this.deleteRange(t,qb(n,r-1)),o&&this.insertText(t,r-1,this.newLineCharacter)}}))}finishDeleteDeclarations(){const e=new Set;for(const{sourceFile:t,node:n}of this.deletedNodes)this.deletedNodes.some((e=>e.sourceFile===t&&QG(e.node,n)))||(ot(n)?this.deleteRange(t,hT(t,n)):T_e.deleteDeclaration(this,e,t,n));e.forEach((t=>{const n=t.getSourceFile(),r=A_e.SmartIndenter.getContainingList(t,n);if(t!==De(r))return;const i=C(r,(t=>!e.has(t)),r.length-2);-1!==i&&this.deleteRange(n,{pos:r[i].end,end:b_e(n,r[i+1])})}))}getChanges(e){this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();const t=y_e.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,e);return this.newFileChanges&&this.newFileChanges.forEach(((e,n)=>{t.push(y_e.newFileChanges(n,e,this.newLineCharacter,this.formatContext))})),t}createNewFile(e,t,n){this.insertStatementsInNewFile(t,n,e)}};function b_e(e,t){return as(e.text,p_e(e,t,{leadingTriviaOption:1}),!1,!0)}function x_e(e,t,n,r){const i=b_e(e,r);if(void 0===n||ix(m_e(e,t,{}),i,e))return i;const o=EX(r.getStart(e),e);if(g_e(t,o)){const r=EX(t.getStart(e),e);if(g_e(n,r)){const t=as(e.text,o.getEnd(),!0,!0);if(ix(r.getStart(e),o.getStart(e),e))return Za(e.text.charCodeAt(t-1))?t-1:t;if(Za(e.text.charCodeAt(t)))return t}}return i}function S_e(e){return HE(e)?e.properties:e.members}function k_e(e,t){for(let n=t.length-1;n>=0;n--){const{span:r,newText:i}=t[n];e=`${e.substring(0,r.start)}${i}${e.substring(js(r))}`}return e}(e=>{function t(e,t,r,i){const o=R(t,(e=>e.statements.map((t=>4===t?"":n(t,e.oldFile,r).text)))).join(r),a=JI("any file name",o,{languageVersion:99,jsDocParsingMode:1},!0,e);return k_e(o,A_e.formatDocument(a,i))+r}function n(e,t,n){const r=E_e(n);return rq({newLine:qZ(n),neverAsciiEscape:!0,preserveSourceNewlines:!0,terminateUnterminatedLiterals:!0},r).writeNode(4,e,t,r),{text:r.getText(),node:w_e(e)}}e.getTextChangesFromChanges=function(e,t,r,i){return q(He(e,(e=>e.sourceFile.path)),(e=>{const o=e[0].sourceFile,a=ve(e,((e,t)=>e.range.pos-t.range.pos||e.range.end-t.range.end));for(let e=0;e`${JSON.stringify(a[e].range)} and ${JSON.stringify(a[e+1].range)}`));const s=q(a,(e=>{const a=lQ(e.range),s=1===e.kind?Sd(fc(e.node))??e.sourceFile:2===e.kind?Sd(fc(e.nodes[0]))??e.sourceFile:e.sourceFile,c=function(e,t,r,i,o,a){var s;if(0===e.kind)return"";if(3===e.kind)return e.text;const{options:c={},range:{pos:l}}=e,u=e=>function(e,t,r,i,{indentation:o,prefix:a,delta:s},c,l,u){const{node:_,text:d}=n(e,t,c);u&&u(_,d);const p=UZ(l,t),f=void 0!==o?o:A_e.SmartIndenter.getIndentation(i,r,p,a===c||GG(i,t)===i);void 0===s&&(s=A_e.SmartIndenter.shouldIndentChildNode(p,e)&&p.indentSize||0);const m={text:d,getLineAndCharacterOfPosition(e){return Xa(this,e)}};return k_e(d,A_e.formatNodeGivenIndentation(_,m,t.languageVariant,f,s,{...l,options:p}))}(e,t,r,l,c,i,o,a),_=2===e.kind?e.nodes.map((e=>Ht(u(e),i))).join((null==(s=e.options)?void 0:s.joiner)||i):u(e.node),d=void 0!==c.indentation||GG(l,t)===l?_:_.replace(/^\s+/,"");return(c.prefix||"")+d+(!c.suffix||Wt(d,c.suffix)?"":c.suffix)}(e,s,o,t,r,i);if(a.length!==c.length||!jZ(s.text,c,a.start))return dQ(a,c)}));return s.length>0?{fileName:o.fileName,textChanges:s}:void 0}))},e.newFileChanges=function(e,n,r,i){const o=t(Pk(e),n,r,i);return{fileName:e,textChanges:[dQ(Gs(0,0),o)],isNewFile:!0}},e.newFileChangesWorker=t,e.getNonformattedText=n})(y_e||(y_e={}));var T_e,C_e={...C$,factory:JC(1|C$.factory.flags,C$.factory.baseFactory)};function w_e(e){const t=ZB(e,w_e,C_e,D_e,w_e),n=ly(t)?t:Object.create(t);return FT(n,i_e(e),a_e(e)),n}function D_e(e,t,n,r,i){const o=VB(e,t,n,r,i);if(!o)return o;xn.assert(e);const a=o===e?YC.createNodeArray(o.slice(0)):o;return FT(a,i_e(e),a_e(e)),a}function E_e(e){let t=0;const n=Vy(e);function r(e,r){if(r||!function(e){return as(e,0)===e.length}(e)){t=n.getTextPos();let r=0;for(;Qa(e.charCodeAt(e.length-r-1));)r++;t-=r}}return{onBeforeEmitNode:e=>{e&&o_e(e,t)},onAfterEmitNode:e=>{e&&s_e(e,t)},onBeforeEmitNodeArray:e=>{e&&o_e(e,t)},onAfterEmitNodeArray:e=>{e&&s_e(e,t)},onBeforeEmitToken:e=>{e&&o_e(e,t)},onAfterEmitToken:e=>{e&&s_e(e,t)},write:function(e){n.write(e),r(e,!1)},writeComment:function(e){n.writeComment(e)},writeKeyword:function(e){n.writeKeyword(e),r(e,!1)},writeOperator:function(e){n.writeOperator(e),r(e,!1)},writePunctuation:function(e){n.writePunctuation(e),r(e,!1)},writeTrailingSemicolon:function(e){n.writeTrailingSemicolon(e),r(e,!1)},writeParameter:function(e){n.writeParameter(e),r(e,!1)},writeProperty:function(e){n.writeProperty(e),r(e,!1)},writeSpace:function(e){n.writeSpace(e),r(e,!1)},writeStringLiteral:function(e){n.writeStringLiteral(e),r(e,!1)},writeSymbol:function(e,t){n.writeSymbol(e,t),r(e,!1)},writeLine:function(e){n.writeLine(e)},increaseIndent:function(){n.increaseIndent()},decreaseIndent:function(){n.decreaseIndent()},getText:function(){return n.getText()},rawWrite:function(e){n.rawWrite(e),r(e,!1)},writeLiteral:function(e){n.writeLiteral(e),r(e,!0)},getTextPos:function(){return n.getTextPos()},getLine:function(){return n.getLine()},getColumn:function(){return n.getColumn()},getIndent:function(){return n.getIndent()},isAtStartOfLine:function(){return n.isAtStartOfLine()},hasTrailingComment:()=>n.hasTrailingComment(),hasTrailingWhitespace:()=>n.hasTrailingWhitespace(),clear:function(){n.clear(),t=0}}}function P_e(e,t){return!(qX(e,t)||AX(e,t)||MX(e,t)||LX(e,t))}function N_e(e,t,n,r={leadingTriviaOption:1}){const i=p_e(t,n,r),o=m_e(t,n,r);e.deleteRange(t,{pos:i,end:o})}function F_e(e,t,n,r){const i=xn.checkDefined(A_e.SmartIndenter.getContainingList(r,n)),o=Qd(i,r);xn.assert(-1!==o),1!==i.length?(xn.assert(!t.has(r),"Deleting a node twice"),t.add(r),e.deleteRange(n,{pos:b_e(n,r),end:o===i.length-1?m_e(n,r,{}):x_e(n,r,i[o-1],i[o+1])})):N_e(e,n,r)}(e=>{function t(e,t,n){if(n.parent.name){const r=xn.checkDefined(kX(t,n.pos-1));e.deleteRange(t,{pos:r.getStart(t),end:n.end})}else N_e(e,t,Eh(n,272))}e.deleteDeclaration=function(e,n,r,i){switch(i.kind){case 169:{const t=i.parent;rP(t)&&1===t.parameters.length&&!uX(t,21,r)?e.replaceNodeWithText(r,i,"()"):F_e(e,n,r,i);break}case 272:case 271:N_e(e,r,i,{leadingTriviaOption:r.imports.length&&i===Te(r.imports).parent||i===S(r.statements,kp)?0:O_(i)?2:3});break;case 208:const o=i.parent;207===o.kind&&i!==De(o.elements)?N_e(e,r,i):F_e(e,n,r,i);break;case 260:!function(e,t,n,r){const{parent:i}=r;if(299===i.kind)return void e.deleteNodeRange(n,uX(i,21,n),uX(i,22,n));if(1!==i.declarations.length)return void F_e(e,t,n,r);const o=i.parent;switch(o.kind){case 250:case 249:e.replaceNode(n,r,YC.createObjectLiteralExpression());break;case 248:N_e(e,n,i);break;case 243:N_e(e,n,o,{leadingTriviaOption:O_(o)?2:3});break;default:xn.assertNever(o)}}(e,n,r,i);break;case 168:F_e(e,n,r,i);break;case 276:const a=i.parent;1===a.elements.length?t(e,r,a):F_e(e,n,r,i);break;case 274:t(e,r,i);break;case 27:N_e(e,r,i,{trailingTriviaOption:0});break;case 100:N_e(e,r,i,{leadingTriviaOption:0});break;case 263:case 262:N_e(e,r,i,{leadingTriviaOption:O_(i)?2:3});break;default:i.parent?oN(i.parent)&&i.parent.name===i?function(e,t,n){if(n.namedBindings){const r=n.name.getStart(t),i=kX(t,n.name.end);if(i&&28===i.kind){const n=as(t.text,i.end,!1,!0);e.deleteRange(t,{pos:r,end:n})}else N_e(e,t,n.name)}else N_e(e,t,n.parent)}(e,r,i.parent):QE(i.parent)&&D(i.parent.arguments,i)?F_e(e,n,r,i):N_e(e,r,i):N_e(e,r,i)}}})(T_e||(T_e={}));var A_e={};o(A_e,{FormattingContext:()=>O_e,FormattingRequestKind:()=>I_e,RuleAction:()=>J_e,RuleFlags:()=>z_e,SmartIndenter:()=>lpe,anyContext:()=>B_e,createTextRangeWithKind:()=>ppe,formatDocument:()=>ype,formatNodeGivenIndentation:()=>kpe,formatOnClosingCurly:()=>hpe,formatOnEnter:()=>fpe,formatOnOpeningCurly:()=>gpe,formatOnSemicolon:()=>mpe,formatSelection:()=>vpe,getAllRules:()=>$_e,getFormatContext:()=>npe,getFormattingScanner:()=>j_e,getIndentationString:()=>Epe,getRangeOfEnclosingComment:()=>Dpe});var I_e=(e=>(e[e.FormatDocument=0]="FormatDocument",e[e.FormatSelection=1]="FormatSelection",e[e.FormatOnEnter=2]="FormatOnEnter",e[e.FormatOnSemicolon=3]="FormatOnSemicolon",e[e.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",e[e.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace",e))(I_e||{}),O_e=class{constructor(e,t,n){this.sourceFile=e,this.formattingRequestKind=t,this.options=n}updateContext(e,t,n,r,i){this.currentTokenSpan=xn.checkDefined(e),this.currentTokenParent=xn.checkDefined(t),this.nextTokenSpan=xn.checkDefined(n),this.nextTokenParent=xn.checkDefined(r),this.contextNode=xn.checkDefined(i),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0}ContextNodeAllOnSameLine(){return void 0===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine}NextNodeAllOnSameLine(){return void 0===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine}TokensAreOnSameLine(){if(void 0===this.tokensAreOnSameLine){const e=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,t=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=e===t}return this.tokensAreOnSameLine}ContextNodeBlockIsOnOneLine(){return void 0===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine}NextNodeBlockIsOnOneLine(){return void 0===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine}NodeIsOnOneLine(e){return this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line===this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line}BlockIsOnOneLine(e){const t=uX(e,19,this.sourceFile),n=uX(e,20,this.sourceFile);return!(!t||!n)&&this.sourceFile.getLineAndCharacterOfPosition(t.getEnd()).line===this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line}},M_e=Cs(99,!1,0),L_e=Cs(99,!1,1);function j_e(e,t,n,r,i){const o=1===t?L_e:M_e;o.setText(e),o.resetTokenState(n);let a,s,c,l,u,_=!0;const d=i({advance:function(){u=void 0,o.getTokenFullStart()!==n?_=!!s&&4===De(s).kind:o.scan(),a=void 0,s=void 0;let e=o.getTokenFullStart();for(;ea,lastTrailingTriviaWasNewLine:()=>_,skipToEndOf:function(e){o.resetTokenState(e.end),c=o.getTokenFullStart(),l=void 0,u=void 0,_=!1,a=void 0,s=void 0},skipToStartOf:function(e){o.resetTokenState(e.pos),c=o.getTokenFullStart(),l=void 0,u=void 0,_=!1,a=void 0,s=void 0},getTokenFullStart:()=>(null==u?void 0:u.token.pos)??o.getTokenStart(),getStartPos:()=>(null==u?void 0:u.token.pos)??o.getTokenStart()});return u=void 0,o.setText(void 0),d;function p(){const e=u?u.token.kind:o.getToken();return 1!==e&&!Rh(e)}function f(){return 1===(u?u.token.kind:o.getToken())}function m(e,t){return Ll(t)&&e.token.kind!==t.kind&&(e.token.kind=t.kind),e}}var R_e,B_e=u,J_e=(e=>(e[e.None=0]="None",e[e.StopProcessingSpaceActions=1]="StopProcessingSpaceActions",e[e.StopProcessingTokenActions=2]="StopProcessingTokenActions",e[e.InsertSpace=4]="InsertSpace",e[e.InsertNewLine=8]="InsertNewLine",e[e.DeleteSpace=16]="DeleteSpace",e[e.DeleteToken=32]="DeleteToken",e[e.InsertTrailingSemicolon=64]="InsertTrailingSemicolon",e[e.StopAction=3]="StopAction",e[e.ModifySpaceAction=28]="ModifySpaceAction",e[e.ModifyTokenAction=96]="ModifyTokenAction",e))(J_e||{}),z_e=(e=>(e[e.None=0]="None",e[e.CanDeleteNewLines=1]="CanDeleteNewLines",e))(z_e||{});function $_e(){const e=[];for(let t=0;t<=165;t++)1!==t&&e.push(t);function t(...t){return{tokens:e.filter((e=>!t.some((t=>t===e)))),isSpecific:!1}}const n={tokens:e,isSpecific:!1},r=V_e([...e,3]),i=V_e([...e,1]),o=K_e(83,165),a=K_e(30,79),s=[103,104,165,130,142,152],c=[80,...pQ],l=r,u=V_e([80,32,3,86,95,102]),_=V_e([22,3,92,113,98,93,85]);return[q_e("IgnoreBeforeComment",n,[2,3],B_e,1),q_e("IgnoreAfterLineComment",2,n,B_e,1),q_e("NotSpaceBeforeColon",n,59,[Ede,nde,rde],16),q_e("SpaceAfterColon",59,n,[Ede,nde,Ode],4),q_e("NoSpaceBeforeQuestionMark",n,58,[Ede,nde,rde],16),q_e("SpaceAfterQuestionMarkInConditionalOperator",58,n,[Ede,ade],4),q_e("NoSpaceAfterQuestionMark",58,n,[Ede,ode],16),q_e("NoSpaceBeforeDot",n,[25,29],[Ede,tpe],16),q_e("NoSpaceAfterDot",[25,29],n,[Ede],16),q_e("NoSpaceBetweenImportParenInImportType",102,21,[Ede,Dde],16),q_e("NoSpaceAfterUnaryPrefixOperator",[46,47,55,54],[9,10,80,21,23,19,110,105],[Ede,nde],16),q_e("NoSpaceAfterUnaryPreincrementOperator",46,[80,21,110,105],[Ede],16),q_e("NoSpaceAfterUnaryPredecrementOperator",47,[80,21,110,105],[Ede],16),q_e("NoSpaceBeforeUnaryPostincrementOperator",[80,22,24,105],46,[Ede,Yde],16),q_e("NoSpaceBeforeUnaryPostdecrementOperator",[80,22,24,105],47,[Ede,Yde],16),q_e("SpaceAfterPostincrementWhenFollowedByAdd",46,40,[Ede,tde],4),q_e("SpaceAfterAddWhenFollowedByUnaryPlus",40,40,[Ede,tde],4),q_e("SpaceAfterAddWhenFollowedByPreincrement",40,46,[Ede,tde],4),q_e("SpaceAfterPostdecrementWhenFollowedBySubtract",47,41,[Ede,tde],4),q_e("SpaceAfterSubtractWhenFollowedByUnaryMinus",41,41,[Ede,tde],4),q_e("SpaceAfterSubtractWhenFollowedByPredecrement",41,47,[Ede,tde],4),q_e("NoSpaceAfterCloseBrace",20,[28,27],[Ede],16),q_e("NewLineBeforeCloseBraceInBlockContext",r,20,[ude],8),q_e("SpaceAfterCloseBrace",20,t(22),[Ede,vde],4),q_e("SpaceBetweenCloseBraceAndElse",20,93,[Ede],4),q_e("SpaceBetweenCloseBraceAndWhile",20,117,[Ede],4),q_e("NoSpaceBetweenEmptyBraceBrackets",19,20,[Ede,xde],16),q_e("SpaceAfterConditionalClosingParen",22,23,[bde],4),q_e("NoSpaceBetweenFunctionKeywordAndStar",100,42,[gde],16),q_e("SpaceAfterStarInGeneratorDeclaration",42,80,[gde],4),q_e("SpaceAfterFunctionInFuncDecl",100,n,[fde],4),q_e("NewLineAfterOpenBraceInBlockContext",19,n,[ude],8),q_e("SpaceAfterGetSetInMember",[139,153],80,[fde],4),q_e("NoSpaceBetweenYieldKeywordAndStar",127,42,[Ede,Xde],16),q_e("SpaceBetweenYieldOrYieldStarAndOperand",[127,42],n,[Ede,Xde],4),q_e("NoSpaceBetweenReturnAndSemicolon",107,27,[Ede],16),q_e("SpaceAfterCertainKeywords",[115,111,105,91,107,114,135],n,[Ede],4),q_e("SpaceAfterLetConstInVariableDeclaration",[121,87],n,[Ede,Jde],4),q_e("NoSpaceBeforeOpenParenInFuncCall",n,21,[Ede,Sde,kde],16),q_e("SpaceBeforeBinaryKeywordOperator",n,s,[Ede,tde],4),q_e("SpaceAfterBinaryKeywordOperator",s,n,[Ede,tde],4),q_e("SpaceAfterVoidOperator",116,n,[Ede,Gde],4),q_e("SpaceBetweenAsyncAndOpenParen",134,21,[wde,Ede],4),q_e("SpaceBetweenAsyncAndFunctionKeyword",134,[100,80],[Ede],4),q_e("NoSpaceBetweenTagAndTemplateString",[80,22],[15,16],[Ede],16),q_e("SpaceBeforeJsxAttribute",n,80,[Ade,Ede],4),q_e("SpaceBeforeSlashInJsxOpeningElement",n,44,[Lde,Ede],4),q_e("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement",44,32,[Lde,Ede],16),q_e("NoSpaceBeforeEqualInJsxAttribute",n,64,[Ide,Ede],16),q_e("NoSpaceAfterEqualInJsxAttribute",64,n,[Ide,Ede],16),q_e("NoSpaceBeforeJsxNamespaceColon",80,59,[Mde],16),q_e("NoSpaceAfterJsxNamespaceColon",59,80,[Mde],16),q_e("NoSpaceAfterModuleImport",[144,149],21,[Ede],16),q_e("SpaceAfterCertainTypeScriptKeywords",[128,129,86,138,90,94,95,96,139,119,102,120,144,145,123,125,124,148,153,126,156,161,143,140],n,[Ede],4),q_e("SpaceBeforeCertainTypeScriptKeywords",n,[96,119,161],[Ede],4),q_e("SpaceAfterModuleName",11,19,[$de],4),q_e("SpaceBeforeArrow",n,39,[Ede],4),q_e("SpaceAfterArrow",39,n,[Ede],4),q_e("NoSpaceAfterEllipsis",26,80,[Ede],16),q_e("NoSpaceAfterOptionalParameters",58,[22,28],[Ede,nde],16),q_e("NoSpaceBetweenEmptyInterfaceBraceBrackets",19,20,[Ede,qde],16),q_e("NoSpaceBeforeOpenAngularBracket",c,30,[Ede,Kde],16),q_e("NoSpaceBetweenCloseParenAndAngularBracket",22,30,[Ede,Kde],16),q_e("NoSpaceAfterOpenAngularBracket",30,n,[Ede,Kde],16),q_e("NoSpaceBeforeCloseAngularBracket",n,32,[Ede,Kde],16),q_e("NoSpaceAfterCloseAngularBracket",32,[21,23,32,28],[Ede,Kde,mde,Hde],16),q_e("SpaceBeforeAt",[22,80],60,[Ede],4),q_e("NoSpaceAfterAt",60,n,[Ede],16),q_e("SpaceAfterDecorator",n,[128,80,95,90,86,126,125,123,124,139,153,23,42],[Rde],4),q_e("NoSpaceBeforeNonNullAssertionOperator",n,54,[Ede,Qde],16),q_e("NoSpaceAfterNewKeywordOnConstructorSignature",105,21,[Ede,Vde],16),q_e("SpaceLessThanAndNonJSXTypeAnnotation",30,30,[Ede],4),q_e("SpaceAfterConstructor",137,21,[H_e("insertSpaceAfterConstructor"),Ede],4),q_e("NoSpaceAfterConstructor",137,21,[X_e("insertSpaceAfterConstructor"),Ede],16),q_e("SpaceAfterComma",28,n,[H_e("insertSpaceAfterCommaDelimiter"),Ede,Nde,Tde,Cde],4),q_e("NoSpaceAfterComma",28,n,[X_e("insertSpaceAfterCommaDelimiter"),Ede,Nde],16),q_e("SpaceAfterAnonymousFunctionKeyword",[100,42],21,[H_e("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),fde],4),q_e("NoSpaceAfterAnonymousFunctionKeyword",[100,42],21,[X_e("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),fde],16),q_e("SpaceAfterKeywordInControl",o,21,[H_e("insertSpaceAfterKeywordsInControlFlowStatements"),bde],4),q_e("NoSpaceAfterKeywordInControl",o,21,[X_e("insertSpaceAfterKeywordsInControlFlowStatements"),bde],16),q_e("SpaceAfterOpenParen",21,n,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],4),q_e("SpaceBeforeCloseParen",n,22,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],4),q_e("SpaceBetweenOpenParens",21,21,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],4),q_e("NoSpaceBetweenParens",21,22,[Ede],16),q_e("NoSpaceAfterOpenParen",21,n,[X_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],16),q_e("NoSpaceBeforeCloseParen",n,22,[X_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],16),q_e("SpaceAfterOpenBracket",23,n,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ede],4),q_e("SpaceBeforeCloseBracket",n,24,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ede],4),q_e("NoSpaceBetweenBrackets",23,24,[Ede],16),q_e("NoSpaceAfterOpenBracket",23,n,[X_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ede],16),q_e("NoSpaceBeforeCloseBracket",n,24,[X_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ede],16),q_e("SpaceAfterOpenBrace",19,n,[Y_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),cde],4),q_e("SpaceBeforeCloseBrace",n,20,[Y_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),cde],4),q_e("NoSpaceBetweenEmptyBraceBrackets",19,20,[Ede,xde],16),q_e("NoSpaceAfterOpenBrace",19,n,[G_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Ede],16),q_e("NoSpaceBeforeCloseBrace",n,20,[G_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Ede],16),q_e("SpaceBetweenEmptyBraceBrackets",19,20,[H_e("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")],4),q_e("NoSpaceBetweenEmptyBraceBrackets",19,20,[G_e("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"),Ede],16),q_e("SpaceAfterTemplateHeadAndMiddle",[16,17],n,[H_e("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Pde],4,1),q_e("SpaceBeforeTemplateMiddleAndTail",n,[17,18],[H_e("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Ede],4),q_e("NoSpaceAfterTemplateHeadAndMiddle",[16,17],n,[X_e("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Pde],16,1),q_e("NoSpaceBeforeTemplateMiddleAndTail",n,[17,18],[X_e("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Ede],16),q_e("SpaceAfterOpenBraceInJsxExpression",19,n,[H_e("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ede,Fde],4),q_e("SpaceBeforeCloseBraceInJsxExpression",n,20,[H_e("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ede,Fde],4),q_e("NoSpaceAfterOpenBraceInJsxExpression",19,n,[X_e("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ede,Fde],16),q_e("NoSpaceBeforeCloseBraceInJsxExpression",n,20,[X_e("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ede,Fde],16),q_e("SpaceAfterSemicolonInFor",27,n,[H_e("insertSpaceAfterSemicolonInForStatements"),Ede,Z_e],4),q_e("NoSpaceAfterSemicolonInFor",27,n,[X_e("insertSpaceAfterSemicolonInForStatements"),Ede,Z_e],16),q_e("SpaceBeforeBinaryOperator",n,a,[H_e("insertSpaceBeforeAndAfterBinaryOperators"),Ede,tde],4),q_e("SpaceAfterBinaryOperator",a,n,[H_e("insertSpaceBeforeAndAfterBinaryOperators"),Ede,tde],4),q_e("NoSpaceBeforeBinaryOperator",n,a,[X_e("insertSpaceBeforeAndAfterBinaryOperators"),Ede,tde],16),q_e("NoSpaceAfterBinaryOperator",a,n,[X_e("insertSpaceBeforeAndAfterBinaryOperators"),Ede,tde],16),q_e("SpaceBeforeOpenParenInFuncDecl",n,21,[H_e("insertSpaceBeforeFunctionParenthesis"),Ede,fde],4),q_e("NoSpaceBeforeOpenParenInFuncDecl",n,21,[X_e("insertSpaceBeforeFunctionParenthesis"),Ede,fde],16),q_e("NewLineBeforeOpenBraceInControl",_,19,[H_e("placeOpenBraceOnNewLineForControlBlocks"),bde,lde],8,1),q_e("NewLineBeforeOpenBraceInFunction",l,19,[H_e("placeOpenBraceOnNewLineForFunctions"),fde,lde],8,1),q_e("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock",u,19,[H_e("placeOpenBraceOnNewLineForFunctions"),hde,lde],8,1),q_e("SpaceAfterTypeAssertion",32,n,[H_e("insertSpaceAfterTypeAssertion"),Ede,Wde],4),q_e("NoSpaceAfterTypeAssertion",32,n,[X_e("insertSpaceAfterTypeAssertion"),Ede,Wde],16),q_e("SpaceBeforeTypeAnnotation",n,[58,59],[H_e("insertSpaceBeforeTypeAnnotation"),Ede,ide],4),q_e("NoSpaceBeforeTypeAnnotation",n,[58,59],[X_e("insertSpaceBeforeTypeAnnotation"),Ede,ide],16),q_e("NoOptionalSemicolon",27,i,[W_e("semicolons","remove"),Zde],32),q_e("OptionalSemicolon",n,i,[W_e("semicolons","insert"),epe],64),q_e("NoSpaceBeforeSemicolon",n,27,[Ede],16),q_e("SpaceBeforeOpenBraceInControl",_,19,[Q_e("placeOpenBraceOnNewLineForControlBlocks"),bde,zde,sde],4,1),q_e("SpaceBeforeOpenBraceInFunction",l,19,[Q_e("placeOpenBraceOnNewLineForFunctions"),fde,dde,zde,sde],4,1),q_e("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock",u,19,[Q_e("placeOpenBraceOnNewLineForFunctions"),hde,zde,sde],4,1),q_e("NoSpaceBeforeComma",n,28,[Ede],16),q_e("NoSpaceBeforeOpenBracket",t(134,84),23,[Ede],16),q_e("NoSpaceAfterCloseBracket",24,n,[Ede,jde],16),q_e("SpaceAfterSemicolon",27,n,[Ede],4),q_e("SpaceBetweenForAndAwaitKeyword",99,135,[Ede],4),q_e("SpaceBetweenDotDotDotAndTypeName",26,c,[Ede],16),q_e("SpaceBetweenStatements",[22,92,93,84],n,[Ede,Nde,ede],4),q_e("SpaceAfterTryCatchFinally",[113,85,98],19,[Ede],4)]}function q_e(e,t,n,r,i,o=0){return{leftTokenRange:U_e(t),rightTokenRange:U_e(n),rule:{debugName:e,context:r,action:i,flags:o}}}function V_e(e){return{tokens:e,isSpecific:!0}}function U_e(e){return"number"==typeof e?V_e([e]):ot(e)?V_e(e):e}function K_e(e,t,n=[]){const r=[];for(let i=e;i<=t;i++)D(n,i)||r.push(i);return V_e(r)}function W_e(e,t){return n=>n.options&&n.options[e]===t}function H_e(e){return t=>t.options&&Le(t.options,e)&&!!t.options[e]}function G_e(e){return t=>t.options&&Le(t.options,e)&&!t.options[e]}function X_e(e){return t=>!t.options||!Le(t.options,e)||!t.options[e]}function Q_e(e){return t=>!t.options||!Le(t.options,e)||!t.options[e]||t.TokensAreOnSameLine()}function Y_e(e){return t=>!t.options||!Le(t.options,e)||!!t.options[e]}function Z_e(e){return 248===e.contextNode.kind}function ede(e){return!Z_e(e)}function tde(e){switch(e.contextNode.kind){case 226:return 28!==e.contextNode.operatorToken.kind;case 227:case 194:case 234:case 281:case 276:case 182:case 192:case 193:case 238:return!0;case 208:case 265:case 271:case 277:case 260:case 169:case 306:case 172:case 171:return 64===e.currentTokenSpan.kind||64===e.nextTokenSpan.kind;case 249:case 168:return 103===e.currentTokenSpan.kind||103===e.nextTokenSpan.kind||64===e.currentTokenSpan.kind||64===e.nextTokenSpan.kind;case 250:return 165===e.currentTokenSpan.kind||165===e.nextTokenSpan.kind}return!1}function nde(e){return!tde(e)}function rde(e){return!ide(e)}function ide(e){const t=e.contextNode.kind;return 172===t||171===t||169===t||260===t||pu(t)}function ode(e){return!function(e){return uE(e.contextNode)&&e.contextNode.questionToken}(e)}function ade(e){return 227===e.contextNode.kind||194===e.contextNode.kind}function sde(e){return e.TokensAreOnSameLine()||dde(e)}function cde(e){return 206===e.contextNode.kind||200===e.contextNode.kind||function(e){return _de(e)&&(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}(e)}function lde(e){return dde(e)&&!(e.NextNodeAllOnSameLine()||e.NextNodeBlockIsOnOneLine())}function ude(e){return _de(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}function _de(e){return pde(e.contextNode)}function dde(e){return pde(e.nextTokenParent)}function pde(e){if(yde(e))return!0;switch(e.kind){case 241:case 269:case 210:case 268:return!0}return!1}function fde(e){switch(e.contextNode.kind){case 262:case 174:case 173:case 177:case 178:case 179:case 218:case 176:case 219:case 264:return!0}return!1}function mde(e){return!fde(e)}function gde(e){return 262===e.contextNode.kind||218===e.contextNode.kind}function hde(e){return yde(e.contextNode)}function yde(e){switch(e.kind){case 263:case 231:case 264:case 266:case 187:case 267:case 278:case 279:case 272:case 275:return!0}return!1}function vde(e){switch(e.currentTokenParent.kind){case 263:case 267:case 266:case 299:case 268:case 255:return!0;case 241:{const t=e.currentTokenParent.parent;if(!t||219!==t.kind&&218!==t.kind)return!0}}return!1}function bde(e){switch(e.contextNode.kind){case 245:case 255:case 248:case 249:case 250:case 247:case 258:case 246:case 254:case 299:return!0;default:return!1}}function xde(e){return 210===e.contextNode.kind}function Sde(e){return function(e){return 213===e.contextNode.kind}(e)||function(e){return 214===e.contextNode.kind}(e)}function kde(e){return 28!==e.currentTokenSpan.kind}function Tde(e){return 24!==e.nextTokenSpan.kind}function Cde(e){return 22!==e.nextTokenSpan.kind}function wde(e){return 219===e.contextNode.kind}function Dde(e){return 205===e.contextNode.kind}function Ede(e){return e.TokensAreOnSameLine()&&12!==e.contextNode.kind}function Pde(e){return 12!==e.contextNode.kind}function Nde(e){return 284!==e.contextNode.kind&&288!==e.contextNode.kind}function Fde(e){return 294===e.contextNode.kind||293===e.contextNode.kind}function Ade(e){return 291===e.nextTokenParent.kind||295===e.nextTokenParent.kind&&291===e.nextTokenParent.parent.kind}function Ide(e){return 291===e.contextNode.kind}function Ode(e){return 295!==e.nextTokenParent.kind}function Mde(e){return 295===e.nextTokenParent.kind}function Lde(e){return 285===e.contextNode.kind}function jde(e){return!fde(e)&&!dde(e)}function Rde(e){return e.TokensAreOnSameLine()&&Wv(e.contextNode)&&Bde(e.currentTokenParent)&&!Bde(e.nextTokenParent)}function Bde(e){for(;e&&Xu(e);)e=e.parent;return e&&170===e.kind}function Jde(e){return 261===e.currentTokenParent.kind&&e.currentTokenParent.getStart(e.sourceFile)===e.currentTokenSpan.pos}function zde(e){return 2!==e.formattingRequestKind}function $de(e){return 267===e.contextNode.kind}function qde(e){return 187===e.contextNode.kind}function Vde(e){return 180===e.contextNode.kind}function Ude(e,t){if(30!==e.kind&&32!==e.kind)return!1;switch(t.kind){case 183:case 216:case 265:case 263:case 231:case 264:case 262:case 218:case 219:case 174:case 173:case 179:case 180:case 213:case 214:case 233:return!0;default:return!1}}function Kde(e){return Ude(e.currentTokenSpan,e.currentTokenParent)||Ude(e.nextTokenSpan,e.nextTokenParent)}function Wde(e){return 216===e.contextNode.kind}function Hde(e){return!Wde(e)}function Gde(e){return 116===e.currentTokenSpan.kind&&222===e.currentTokenParent.kind}function Xde(e){return 229===e.contextNode.kind&&void 0!==e.contextNode.expression}function Qde(e){return 235===e.contextNode.kind}function Yde(e){return!function(e){switch(e.contextNode.kind){case 245:case 248:case 249:case 250:case 246:case 247:return!0;default:return!1}}(e)}function Zde(e){let t=e.nextTokenSpan.kind,n=e.nextTokenSpan.pos;if(Rh(t)){const r=e.nextTokenParent===e.currentTokenParent?DX(e.currentTokenParent,mc(e.currentTokenParent,(e=>!e.parent)),e.sourceFile):e.nextTokenParent.getFirstToken(e.sourceFile);if(!r)return!0;t=r.kind,n=r.getStart(e.sourceFile)}return e.sourceFile.getLineAndCharacterOfPosition(e.currentTokenSpan.pos).line===e.sourceFile.getLineAndCharacterOfPosition(n).line?20===t||1===t:240!==t&&27!==t&&(264===e.contextNode.kind||265===e.contextNode.kind?!lE(e.currentTokenParent)||!!e.currentTokenParent.type||21!==t:uE(e.currentTokenParent)?!e.currentTokenParent.initializer:248!==e.currentTokenParent.kind&&242!==e.currentTokenParent.kind&&240!==e.currentTokenParent.kind&&23!==t&&21!==t&&40!==t&&41!==t&&44!==t&&14!==t&&28!==t&&228!==t&&16!==t&&15!==t&&25!==t)}function epe(e){return cZ(e.currentTokenSpan.end,e.currentTokenParent,e.sourceFile)}function tpe(e){return!GE(e.contextNode)||!TD(e.contextNode.expression)||e.contextNode.expression.getText().includes(".")}function npe(e,t){return{options:e,getRules:(void 0===R_e&&(R_e=function(e){const t=function(e){const t=new Array(upe*upe),n=new Array(t.length);for(const r of e){const e=r.leftTokenRange.isSpecific&&r.rightTokenRange.isSpecific;for(const i of r.leftTokenRange.tokens)for(const o of r.rightTokenRange.tokens){const a=ipe(i,o);let s=t[a];void 0===s&&(s=t[a]=[]),dpe(s,r.rule,e,n,a)}}return t}(e);return e=>{const n=t[ipe(e.currentTokenSpan.kind,e.nextTokenSpan.kind)];if(n){const t=[];let r=0;for(const i of n){const n=~rpe(r);i.action&n&&x(i.context,(t=>t(e)))&&(t.push(i),r|=i.action)}if(t.length)return t}}}($_e())),R_e),host:t}}function rpe(e){let t=0;return 1&e&&(t|=28),2&e&&(t|=96),28&e&&(t|=28),96&e&&(t|=96),t}function ipe(e,t){return xn.assert(e<=165&&t<=165,"Must compute formatting context from tokens"),e*upe+t}var ope,ape,spe,cpe,lpe,upe=166,_pe=((ope=_pe||{})[ope.StopRulesSpecific=0]="StopRulesSpecific",ope[ope.StopRulesAny=5]="StopRulesAny",ope[ope.ContextRulesSpecific=10]="ContextRulesSpecific",ope[ope.ContextRulesAny=15]="ContextRulesAny",ope[ope.NoContextRulesSpecific=20]="NoContextRulesSpecific",ope[ope.NoContextRulesAny=25]="NoContextRulesAny",ope);function dpe(e,t,n,r,i){const o=3&t.action?n?0:_pe.StopRulesAny:t.context!==B_e?n?_pe.ContextRulesSpecific:_pe.ContextRulesAny:n?_pe.NoContextRulesSpecific:_pe.NoContextRulesAny,a=r[i]||0;e.splice(function(e,t){let n=0;for(let r=0;r<=t;r+=5)n+=31&e,e>>=5;return n}(a,o),0,t),r[i]=function(e,t){const n=1+(e>>t&31);return xn.assert((31&n)===n,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),e&~(31<xn.formatSyntaxKind(n)}),r}function fpe(e,t,n){const r=t.getLineAndCharacterOfPosition(e).line;if(0===r)return[];let i=Ed(r,t);for(;Ya(t.text.charCodeAt(i));)i--;return Za(t.text.charCodeAt(i))&&i--,Cpe({pos:wd(r-1,t),end:i+1},t,n,2)}function mpe(e,t,n){return Tpe(xpe(bpe(e,27,t)),t,n,3)}function gpe(e,t,n){const r=bpe(e,19,t);return r?Cpe({pos:GG(xpe(r.parent).getStart(t),t),end:e},t,n,4):[]}function hpe(e,t,n){return Tpe(xpe(bpe(e,20,t)),t,n,5)}function ype(e,t){return Cpe({pos:0,end:e.text.length},e,t,0)}function vpe(e,t,n,r){return Cpe({pos:GG(e,n),end:t},n,r,1)}function bpe(e,t,n){const r=EX(e,n);return r&&r.kind===t&&e===r.getEnd()?r:void 0}function xpe(e){let t=e;for(;t&&t.parent&&t.parent.end===e.end&&!Spe(t.parent,t);)t=t.parent;return t}function Spe(e,t){switch(e.kind){case 263:case 264:return XG(e.members,t);case 267:const n=e.body;return!!n&&268===n.kind&&XG(n.statements,t);case 307:case 241:case 268:return XG(e.statements,t);case 299:return XG(e.block.statements,t)}return!1}function kpe(e,t,n,r,i,o){const a={pos:e.pos,end:e.end};return j_e(t.text,n,a.pos,a.end,(n=>wpe(a,e,r,i,n,o,1,(e=>!1),t)))}function Tpe(e,t,n,r){return e?Cpe({pos:GG(e.getStart(t),t),end:e.end},t,n,r):[]}function Cpe(e,t,n,r){const i=function(e,t){return function n(r){const i=LI(r,(n=>eX(n.getStart(t),n.end,e)&&n));if(i){const e=n(i);if(e)return e}return r}(t)}(e,t);return j_e(t.text,t.languageVariant,function(e,t,n){const r=e.getStart(n);if(r===t.pos&&e.end===t.end)return r;const i=EX(t.pos,n);return i?i.end>=t.pos?e.pos:i.end:e.pos}(i,e,t),e.end,(o=>wpe(e,i,lpe.getIndentationForNode(i,e,t,n.options),function(e,t,n){let r,i=-1;for(;e;){const o=n.getLineAndCharacterOfPosition(e.getStart(n)).line;if(-1!==i&&o!==i)break;if(lpe.shouldIndentChildNode(t,e,r,n))return t.indentSize;i=o,r=e,e=e.parent}return 0}(i,n.options,t),o,n,r,function(e,t){if(!e.length)return i;const n=e.filter((e=>nX(t,e.start,e.start+e.length))).sort(((e,t)=>e.start-t.start));if(!n.length)return i;let r=0;return e=>{for(;;){if(r>=n.length)return!1;const t=n[r];if(e.end<=t.start)return!1;if(iX(e.pos,e.end,t.start,t.start+t.length))return!0;r++}};function i(){return!1}}(t.parseDiagnostics,e),t)))}function wpe(e,t,n,r,i,{options:o,getRules:a,host:s},c,l,u){var _;const d=new O_e(u,c,o);let p,f,g,h,y,v=-1;const b=[];if(i.advance(),i.isOnToken()){const a=u.getLineAndCharacterOfPosition(t.getStart(u)).line;let s=a;Wv(t)&&(s=u.getLineAndCharacterOfPosition(Ud(t,u)).line),function t(n,r,a,s,c,_){if(!nX(e,n.getStart(u),n.getEnd()))return;const d=k(n,a,c,_);let m=r;for(LI(n,(e=>{g(e,-1,n,d,a,s,!1)}),(t=>{!function(t,r,a,s){xn.assert(jl(t)),xn.assert(!ly(t));const c=function(e,t){switch(e.kind){case 176:case 262:case 218:case 174:case 173:case 219:case 179:case 180:case 184:case 185:case 177:case 178:if(e.typeParameters===t)return 30;if(e.parameters===t)return 21;break;case 213:case 214:if(e.typeArguments===t)return 30;if(e.arguments===t)return 21;break;case 263:case 231:case 264:case 265:if(e.typeParameters===t)return 30;break;case 183:case 215:case 186:case 233:case 205:if(e.typeArguments===t)return 30;break;case 187:return 19}return 0}(r,t);let l=s,_=a;if(!nX(e,t.pos,t.end))return void(t.endt.pos)break;if(e.token.kind===c){let t;if(_=u.getLineAndCharacterOfPosition(e.token.pos).line,h(e,r,s,r),-1!==v)t=v;else{const n=GG(e.token.pos,u);t=lpe.findFirstNonWhitespaceColumn(n,e.token.pos,u,o)}l=k(r,a,t,o.indentSize)}else h(e,r,s,r)}let d=-1;for(let e=0;eMath.min(n.end,e.end))break;h(t,n,d,n)}function g(r,a,s,c,l,_,d,p){if(xn.assert(!ly(r)),Nd(r)||Ad(s,r))return a;const f=r.getStart(u),g=u.getLineAndCharacterOfPosition(f).line;let b=g;Wv(r)&&(b=u.getLineAndCharacterOfPosition(Ud(r,u)).line);let x=-1;if(d&&XG(e,s)&&(x=function(e,t,n,r,i){if(nX(r,e,t)||tX(r,e,t)){if(-1!==i)return i}else{const t=u.getLineAndCharacterOfPosition(e).line,r=GG(e,u),i=lpe.findFirstNonWhitespaceColumn(r,e,u,o);if(t!==n||e===i){const e=lpe.getBaseIndentation(o);return e>i?e:i}}return-1}(f,r.end,l,e,a),-1!==x&&(a=x)),!nX(e,r.pos,r.end))return r.ende.end)return a;if(t.token.end>f){t.token.pos>f&&i.skipToStartOf(r);break}h(t,n,c,n)}if(!i.isOnToken()||i.getTokenFullStart()>=e.end)return a;if(Ll(r)){const e=i.readTokenInfo(r);if(12!==r.kind)return xn.assert(e.token.end===r.end,"Token end is child end"),h(e,n,c,r),a}const S=170===r.kind?g:_,k=function(e,t,n,r,i,a){const s=lpe.shouldIndentChildNode(o,e)?o.indentSize:0;return a===t?{indentation:t===y?v:i.getIndentation(),delta:Math.min(o.indentSize,i.getDelta(e)+s)}:-1===n?21===e.kind&&t===y?{indentation:v,delta:i.getDelta(e)}:lpe.childStartsOnTheSameLineWithElseInIfStatement(r,e,t,u)||lpe.childIsUnindentedBranchOfConditionalExpression(r,e,t,u)||lpe.argumentStartsOnSameLineAsPreviousArgument(r,e,t,u)?{indentation:i.getIndentation(),delta:s}:{indentation:i.getIndentation()+i.getDelta(e),delta:s}:{indentation:n,delta:s}}(r,g,x,n,c,S);return t(r,m,g,b,k.indentation,k.delta),m=n,p&&209===s.kind&&-1===a&&(a=k.indentation),a}function h(t,n,r,o,a){xn.assert(XG(n,t.token));const s=i.lastTrailingTriviaWasNewLine();let c=!1;t.leadingTrivia&&w(t.leadingTrivia,n,m,r);let _=0;const d=XG(e,t.token),g=u.getLineAndCharacterOfPosition(t.token.pos);if(d){const e=l(t.token),i=f;if(_=D(t.token,g,n,m,r),!e)if(0===_){const e=i&&u.getLineAndCharacterOfPosition(i.end).line;c=s&&g.line!==e}else c=1===_}if(t.trailingTrivia&&(p=De(t.trailingTrivia).end,w(t.trailingTrivia,n,m,r)),c){const e=d&&!l(t.token)?r.getIndentationForToken(g.line,t.token.kind,o,!!a):-1;let n=!0;if(t.leadingTrivia){const i=r.getIndentationForComment(t.token.kind,e,o);n=C(t.leadingTrivia,i,n,(e=>P(e.pos,i,!1)))}-1!==e&&n&&(P(t.token.pos,e,1===_),y=g.line,v=e)}i.advance(),m=n}}(t,t,a,s,n,r)}const x=i.getCurrentLeadingTrivia();if(x){const r=lpe.nodeWillIndentChild(o,t,void 0,u,!1)?n+o.indentSize:n;C(x,r,!0,(e=>{D(e,u.getLineAndCharacterOfPosition(e.pos),t,t,void 0),P(e.pos,r,!1)})),!1!==o.trimTrailingWhitespace&&function(t){let n=f?f.end:e.pos;for(const e of t)HX(e.kind)&&(n=e.end){const e=i.isOnEOF()?i.readEOFTokenRange():i.isOnToken()?i.readTokenInfo(t).token:void 0;if(e&&e.pos===p){const n=(null==(_=EX(e.end,u,t))?void 0:_.parent)||g;E(e,u.getLineAndCharacterOfPosition(e.pos).line,n,f,h,g,n,void 0)}}return b;function k(e,t,n,r){return{getIndentationForComment:(e,t,r)=>{switch(e){case 20:case 24:case 22:return n+i(r)}return-1!==t?t:n},getIndentationForToken:(r,o,a,s)=>!s&&function(n,r,i){switch(r){case 19:case 20:case 22:case 93:case 117:case 60:return!1;case 44:case 32:switch(i.kind){case 286:case 287:case 285:return!1}break;case 23:case 24:if(200!==i.kind)return!1}return t!==n&&!(Wv(e)&&r===function(e){if(cI(e)){const t=S(e.modifiers,iu,T(e.modifiers,cE));if(t)return t.kind}switch(e.kind){case 263:return 86;case 264:return 120;case 262:return 100;case 266:return 266;case 177:return 139;case 178:return 153;case 174:if(e.asteriskToken)return 42;case 172:case 169:const t=Pc(e);if(t)return t.kind}}(e))}(r,o,a)?n+i(a):n,getIndentation:()=>n,getDelta:i,recomputeIndentation:(t,i)=>{lpe.shouldIndentChildNode(o,i,e,u)&&(n+=t?o.indentSize:-o.indentSize,r=lpe.shouldIndentChildNode(o,e)?o.indentSize:0)}};function i(t){return lpe.nodeWillIndentChild(o,e,t,u,!0)?r:0}}function C(t,n,r,i){for(const o of t){const t=XG(e,o);switch(o.kind){case 3:t&&N(o,n,!r),r=!1;break;case 2:r&&t&&i(o),r=!1;break;case 4:r=!0}}return r}function w(t,n,r,i){for(const o of t)HX(o.kind)&&XG(e,o)&&D(o,u.getLineAndCharacterOfPosition(o.pos),n,r,i)}function D(t,n,r,i,o){let a=0;return l(t)||(f?a=E(t,n.line,r,f,h,g,i,o):F(u.getLineAndCharacterOfPosition(e.pos).line,n.line)),f=t,p=t.end,g=r,h=n.line,a}function E(e,t,n,r,i,c,l,_){d.updateContext(r,c,e,n,l);const p=a(d);let f=!1!==d.options.trimTrailingWhitespace,g=0;return p?m(p,(a=>{if(g=function(e,t,n,r,i){const a=i!==n;switch(e.action){case 1:return 0;case 16:if(t.end!==r.pos)return O(t.end,r.pos-t.end),a?2:0;break;case 32:O(t.pos,t.end-t.pos);break;case 8:if(1!==e.flags&&n!==i)return 0;if(1!=i-n)return M(t.end,r.pos-t.end,gY(s,o)),a?0:1;break;case 4:if(1!==e.flags&&n!==i)return 0;if(1!=r.pos-t.end||32!==u.text.charCodeAt(t.end))return M(t.end,r.pos-t.end," "),a?2:0;break;case 64:c=t.end,";"&&b.push(_Q(c,0,";"))}var c;return 0}(a,r,i,e,t),_)switch(g){case 2:n.getStart(u)===e.pos&&_.recomputeIndentation(!1,l);break;case 1:n.getStart(u)===e.pos&&_.recomputeIndentation(!0,l);break;default:xn.assert(0===g)}f=f&&!(16&a.action)&&1!==a.flags})):f=f&&1!==e.kind,t!==i&&f&&F(i,t,r),g}function P(e,t,n){const r=Epe(t,o);if(n)M(e,0,r);else{const n=u.getLineAndCharacterOfPosition(e),i=wd(n.line,u);(t!==function(e,t){let n=0;for(let r=0;r0){const e=Epe(r,o);M(t,n.character,e)}else O(t,n.character)}}function F(e,t,n){for(let r=e;rt)continue;const i=A(e,t);-1!==i&&(xn.assert(i===e||!Ya(u.text.charCodeAt(i-1))),O(i,t+1-i))}}function A(e,t){let n=t;for(;n>=e&&Ya(u.text.charCodeAt(n));)n--;return n!==t?n+1:-1}function I(e,t,n){F(u.getLineAndCharacterOfPosition(e).line,u.getLineAndCharacterOfPosition(t).line+1,n)}function O(e,t){t&&b.push(_Q(e,t,""))}function M(e,t,n){(t||n)&&b.push(_Q(e,t,n))}}function Dpe(e,t,n,r=kX(e,t)){const i=mc(r,oF);if(i&&(r=i.parent),r.getStart(e)<=t&&tZG(n,t)||t===n.end&&(2===n.kind||t===e.getFullWidth())))}function Epe(e,t){if((!ape||ape.tabSize!==t.tabSize||ape.indentSize!==t.indentSize)&&(ape={tabSize:t.tabSize,indentSize:t.indentSize},spe=cpe=void 0),t.convertTabsToSpaces){let n;const r=Math.floor(e/t.indentSize),i=e%t.indentSize;return cpe||(cpe=[]),void 0===cpe[r]?(n=vQ(" ",t.indentSize*r),cpe[r]=n):n=cpe[r],i?n+vQ(" ",i):n}{const n=Math.floor(e/t.tabSize),r=e-n*t.tabSize;let i;return spe||(spe=[]),void 0===spe[n]?spe[n]=i=vQ("\t",n):i=spe[n],r?i+vQ(" ",r):i}}(e=>{let t;var n;function r(e){return e.baseIndentSize||0}function i(e,t,n,i,s,c,l){var f;let m=e.parent;for(;m;){let r=!0;if(n){const t=e.getStart(s);r=tn.end}const h=o(m,e,s),y=h.line===t.line||d(m,e,t.line,s);if(r){const n=null==(f=p(e,s))?void 0:f[0];let r=g(e,s,l,!!n&&u(n,s).line>h.line);if(-1!==r)return r+i;if(r=a(e,m,t,y,s,l),-1!==r)return r+i}k(l,m,e,s,c)&&!y&&(i+=l.indentSize);const v=_(m,e,t.line,s);m=(e=m).parent,t=v?s.getLineAndCharacterOfPosition(e.getStart(s)):h}return i+r(l)}function o(e,t,n){const r=p(t,n),i=r?r.pos:e.getStart(n);return n.getLineAndCharacterOfPosition(i)}function a(e,t,n,r,i,o){return!h_(e)&&!v_(e)||307!==t.kind&&r?-1:y(n,i,o)}let s;var c;function l(e,t,n,r){const i=DX(e,t,r);return i?19===i.kind?1:20===i.kind&&n===u(i,r).line?2:0:0}function u(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function _(e,t,n,r){return!(!QE(e)||!D(e.arguments,t))&&Xa(r,e.expression.getEnd()).line===n}function d(e,t,n,r){if(245===e.kind&&e.elseStatement===t){const t=uX(e,93,r);return xn.assert(void 0!==t),u(t,r).line===n}return!1}function p(e,t){return e.parent&&f(e.getStart(t),e.getEnd(),e.parent,t)}function f(e,t,n,r){switch(n.kind){case 183:return i(n.typeArguments);case 210:return i(n.properties);case 209:case 275:case 279:case 206:case 207:return i(n.elements);case 187:return i(n.members);case 262:case 218:case 219:case 174:case 173:case 179:case 176:case 185:case 180:return i(n.typeParameters)||i(n.parameters);case 177:return i(n.parameters);case 263:case 231:case 264:case 265:case 345:return i(n.typeParameters);case 214:case 213:return i(n.typeArguments)||i(n.arguments);case 261:return i(n.declarations)}function i(i){return i&&tX(function(e,t,n){const r=e.getChildren(n);for(let e=1;e=0&&t=0;o--)if(28!==e[o].kind){if(n.getLineAndCharacterOfPosition(e[o].end).line!==i.line)return y(i,n,r);i=u(e[o],n)}return-1}function y(e,t,n){const r=t.getPositionOfLineAndCharacter(e.line,0);return b(r,r+e.character,t,n)}function v(e,t,n,r){let i=0,o=0;for(let a=e;at.text.length)return r(n);if(0===n.indentStyle)return 0;const a=EX(e,t,void 0,!0),s=Dpe(t,e,a||null);if(s&&3===s.kind)return function(e,t,n,r){const i=Xa(e,t).line-1,o=Xa(e,r.pos).line;if(xn.assert(o>=0),i<=o)return b(wd(o,e),t,e,n);const a=wd(i,e),{column:s,character:c}=v(a,t,e,n);return 0===s?s:42===e.text.charCodeAt(a+c)?s-1:s}(t,e,n,s);if(!a)return r(n);if(GX(a.kind)&&a.getStart(t)<=e&&e0&&Qa(e.text.charCodeAt(r));)r--;return b(GG(r,e),r,e,n)}(t,e,n);if(28===a.kind&&226!==a.parent.kind){const e=function(e,t,n){const r=cX(e);return r&&r.listItemIndex>0?h(r.list.getChildren(),r.listItemIndex-1,t,n):-1}(a,t,n);if(-1!==e)return e}const p=function(e,t,n){return t&&f(e,e,t,n)}(e,a.parent,t);if(p&&!XG(p,a)){const e=[218,219].includes(_.parent.kind)?0:n.indentSize;return m(p,t,n)+e}return function(e,t,n,o,a,s){let c,_=n;for(;_;){if(oX(_,t,e)&&k(s,_,c,e,!0)){const t=u(_,e),r=l(n,_,o,e);return i(_,t,void 0,0!==r?a&&2===r?s.indentSize:0:o!==t.line?s.indentSize:0,e,!0,s)}const r=g(_,e,s,!0);if(-1!==r)return r;c=_,_=_.parent}return r(s)}(t,e,a,c,o,n)},e.getIndentationForNode=function(e,t,n,r){const o=n.getLineAndCharacterOfPosition(e.getStart(n));return i(e,o,t,0,n,!1,r)},e.getBaseIndentation=r,(c=s||(s={}))[c.Unknown=0]="Unknown",c[c.OpenBrace=1]="OpenBrace",c[c.CloseBrace=2]="CloseBrace",e.isArgumentAndStartLineOverlapsExpressionBeingCalled=_,e.childStartsOnTheSameLineWithElseInIfStatement=d,e.childIsUnindentedBranchOfConditionalExpression=function(e,t,n,r){if(_P(e)&&(t===e.whenTrue||t===e.whenFalse)){const i=Xa(r,e.condition.end).line;if(t===e.whenTrue)return n===i;{const t=u(e.whenTrue,r).line,o=Xa(r,e.whenTrue.end).line;return i===t&&o===n}}return!1},e.argumentStartsOnSameLineAsPreviousArgument=function(e,t,n,r){if($u(e)){if(!e.arguments)return!1;const i=S(e.arguments,(e=>e.pos===t.pos));if(!i)return!1;const o=e.arguments.indexOf(i);if(0===o)return!1;if(n===Xa(r,e.arguments[o-1].getEnd()).line)return!0}return!1},e.getContainingList=p,e.findFirstNonWhitespaceCharacterAndColumn=v,e.findFirstNonWhitespaceColumn=b,e.nodeWillIndentChild=x,e.shouldIndentChildNode=k})(lpe||(lpe={}));var Ppe={};function Npe(e,t,n,r,i,o,a,s){const c=r_e.ChangeTracker.with({host:i,formatContext:a,preferences:o},(c=>function(e,t,n,r,i,o,a,s,c){let l;t.length!==n.length&&(l=1===t.length?t:[t.join("\n")]);const u=[];let _=e.text;for(let e=n.length-1;e>=0;e--){const{pos:r,end:i}=n[e];_=l?_.slice(0,r)+l[0]+_.slice(i):_.slice(0,r)+t[e]+_.slice(i)}xn.checkDefined(i.runWithTemporaryFileUpdate).call(i,e.fileName,_,((n,l,_)=>{const d=a8.createImportAdder(_,n,o,i);if(null==r?void 0:r.range){xn.assert(r.range.length===t.length),r.range.forEach((e=>{const t=r.file.statements,n=T(t,(t=>t.end>e.pos));if(-1===n)return;let i=T(t,(t=>t.end>=e.end),n);-1!==i&&e.end<=t[i].getStart()&&i--,u.push(...t.slice(n,-1===i?t.length:i+1))}));const o=q6(r.file,u,l.getTypeChecker(),Z6(_,u,l.getTypeChecker()));xn.assertIsDefined(l);const a=!GZ(e.fileName,l,i,!!r.file.commonJsModuleIndicator);b6(r.file,o.targetFileImportsFromOldFile,c,a),r3(r.file,o.oldImportsNeededByTargetFile,o.targetFileImportsFromOldFile,l.getTypeChecker(),n,d)}else{const e={sourceFile:_,program:l,cancellationToken:s,host:i,preferences:o,formatContext:a};LI(_,(function t(n){qD(n)&&!(null==l?void 0:l.getTypeChecker().resolveName(n.text,n,-1,!1))&&d.addImportForUnresolvedIdentifier(e,n,!0),n.forEachChild(t)}))}d.writeFixes(c,AQ(r?r.file:e,o))})),n.forEach(((n,r)=>{c.replaceRangeWithText(e,{pos:n.pos,end:n.end},l?l[0]:t[r])}))}(e,t,n,r,i,o,a,s,c)));return{edits:c,fixId:"providePostPasteEdits"}}o(Ppe,{pasteEditsProvider:()=>Npe});var Fpe,Ape={};function Ipe(e,t,n,r,i){let o=t?"DeprecationError: ":"DeprecationWarning: ";return o+=`'${e}' `,o+=r?`has been deprecated since v${r}`:"is deprecated",o+=t?" and can no longer be used.":n?` and will no longer be usable after v${n}.`:".",o+=i?` ${Yx(i,[e])}`:"",o}function Ope(e,t={}){const n="string"==typeof t.typeScriptVersion?new Nn(t.typeScriptVersion):t.typeScriptVersion??Fpe??(Fpe=new Nn(c)),r="string"==typeof t.errorAfter?new Nn(t.errorAfter):t.errorAfter,i="string"==typeof t.warnAfter?new Nn(t.warnAfter):t.warnAfter,o="string"==typeof t.since?new Nn(t.since):t.since??i,a=t.error||r&&n.compareTo(r)>=0,s=!i||n.compareTo(i)>=0;return a?function(e,t,n,r){const i=Ipe(e,!0,t,n,r);return()=>{throw new TypeError(i)}}(e,r,o,t.message):s?function(e,t,n,r){let i=!1;return()=>{i||(xn.log.warn(Ipe(e,!1,t,n,r)),i=!0)}}(e,r,o,t.message):_t}function Mpe(e,t,n,r){if(Object.defineProperty(s,"name",{...Object.getOwnPropertyDescriptor(s,"name"),value:e}),r)for(const n of Object.keys(r)){const a=+n;!isNaN(a)&&Le(t,`${a}`)&&(t[a]=(i=t[a],function(e,t){return function(){return e(),t.apply(this,arguments)}}(Ope((null==(o={...r[a],name:e})?void 0:o.name)??xn.getFunctionName(i),o),i)))}var i,o;const a=function(e,t){return n=>{for(let r=0;Le(e,`${r}`)&&Le(t,`${r}`);r++)if((0,t[r])(n))return r}}(t,n);return s;function s(...e){const n=a(e),r=void 0!==n?t[n]:void 0;if("function"==typeof r)return r(...e);throw new TypeError("Invalid arguments")}}function Lpe(e){return{overload:t=>({bind:n=>({finish:()=>Mpe(e,t,n),deprecate:r=>({finish:()=>Mpe(e,t,n,r)})})})}}o(Ape,{ANONYMOUS:()=>tZ,AccessFlags:()=>si,AssertionLevel:()=>Ct,AssignmentDeclarationKind:()=>hi,AssignmentKind:()=>Qg,Associativity:()=>_y,BreakpointResolver:()=>R7,BuilderFileEmit:()=>EV,BuilderProgramKind:()=>GV,BuilderState:()=>wV,CallHierarchy:()=>J7,CharacterCodes:()=>Ii,CheckFlags:()=>ei,CheckMode:()=>DB,ClassificationType:()=>fG,ClassificationTypeNames:()=>pG,CommentDirectiveType:()=>Mr,Comparison:()=>l,CompletionInfoFlags:()=>aG,CompletionTriggerKind:()=>YH,Completions:()=>$oe,ContainerFlags:()=>NR,ContextFlags:()=>Ur,Debug:()=>xn,DiagnosticCategory:()=>yi,Diagnostics:()=>va,DocumentHighlights:()=>l0,ElementFlags:()=>ai,EmitFlags:()=>ji,EmitHint:()=>zi,EmitOnly:()=>Br,EndOfLineState:()=>lG,ExitStatus:()=>zr,ExportKind:()=>ZZ,Extension:()=>Oi,ExternalEmitHelpers:()=>Ji,FileIncludeKind:()=>jr,FilePreprocessingDiagnosticsKind:()=>Rr,FileSystemEntryKind:()=>fo,FileWatcherEventKind:()=>Xi,FindAllReferences:()=>Rse,FlattenLevel:()=>rz,FlowFlags:()=>Or,ForegroundColorEscapeSequences:()=>Fq,FunctionFlags:()=>Bh,GeneratedIdentifierFlags:()=>Fr,GetLiteralTextFlags:()=>tp,GoToDefinition:()=>Cce,HighlightSpanKind:()=>eG,IdentifierNameMap:()=>AJ,IdentifierNameMultiMap:()=>IJ,ImportKind:()=>YZ,ImportsNotUsedAsValues:()=>Di,IndentStyle:()=>tG,IndexFlags:()=>ci,IndexKind:()=>di,InferenceFlags:()=>mi,InferencePriority:()=>fi,InlayHintKind:()=>ZH,InlayHints:()=>qce,InternalEmitFlags:()=>Ri,InternalSymbolName:()=>ti,IntersectionFlags:()=>Vr,InvalidatedProjectKind:()=>qK,JSDocParsingMode:()=>Wi,JsDoc:()=>Wce,JsTyping:()=>fH,JsxEmit:()=>wi,JsxFlags:()=>Pr,JsxReferenceKind:()=>li,LanguageFeatureMinimumTarget:()=>Bi,LanguageServiceMode:()=>HH,LanguageVariant:()=>Fi,LexicalEnvironmentFlags:()=>qi,ListFormat:()=>Vi,LogLevel:()=>Sn,MapCode:()=>ple,MemberOverrideStatus:()=>$r,ModifierFlags:()=>Er,ModuleDetectionKind:()=>xi,ModuleInstanceState:()=>wR,ModuleKind:()=>Ci,ModuleResolutionKind:()=>bi,ModuleSpecifierEnding:()=>Uk,NavigateTo:()=>I1,NavigationBar:()=>V1,NewLineKind:()=>Ei,NodeBuilderFlags:()=>Kr,NodeCheckFlags:()=>ni,NodeFactoryFlags:()=>jC,NodeFlags:()=>Dr,NodeResolutionFeatures:()=>Cj,ObjectFlags:()=>ii,OperationCanceledException:()=>Lr,OperatorPrecedence:()=>gy,OrganizeImports:()=>vle,OrganizeImportsMode:()=>QH,OuterExpressionKinds:()=>$i,OutliningElementsCollector:()=>Xle,OutliningSpanKind:()=>sG,OutputFileType:()=>cG,PackageJsonAutoImportPreference:()=>WH,PackageJsonDependencyGroup:()=>KH,PatternMatchKind:()=>L0,PollingInterval:()=>Qi,PollingWatchKind:()=>Ti,PragmaKindFlags:()=>Ui,PrivateIdentifierKind:()=>zw,ProcessLevel:()=>wz,ProgramUpdateLevel:()=>cq,QuotePreference:()=>NQ,RegularExpressionFlags:()=>Ar,RelationComparisonResult:()=>Nr,Rename:()=>oue,ScriptElementKind:()=>_G,ScriptElementKindModifier:()=>dG,ScriptKind:()=>Pi,ScriptSnapshot:()=>JH,ScriptTarget:()=>Ni,SemanticClassificationFormat:()=>XH,SemanticMeaning:()=>gG,SemicolonPreference:()=>nG,SignatureCheckMode:()=>EB,SignatureFlags:()=>_i,SignatureHelp:()=>due,SignatureInfo:()=>DV,SignatureKind:()=>ui,SmartSelectionRange:()=>jue,SnippetKind:()=>Li,StatisticType:()=>AW,StructureIsReused:()=>Jr,SymbolAccessibility:()=>Gr,SymbolDisplay:()=>Hue,SymbolDisplayPartKind:()=>oG,SymbolFlags:()=>Zr,SymbolFormatFlags:()=>Hr,SyntaxKind:()=>wr,SyntheticSymbolKind:()=>Xr,Ternary:()=>gi,ThrottledCancellationToken:()=>P7,TokenClass:()=>uG,TokenFlags:()=>Ir,TransformFlags:()=>Mi,TypeFacts:()=>CB,TypeFlags:()=>ri,TypeFormatFlags:()=>Wr,TypeMapKind:()=>pi,TypePredicateKind:()=>Qr,TypeReferenceSerializationKind:()=>Yr,UnionReduction:()=>qr,UpToDateStatusType:()=>mK,VarianceFlags:()=>oi,Version:()=>Nn,VersionRange:()=>An,WatchDirectoryFlags:()=>Ai,WatchDirectoryKind:()=>ki,WatchFileKind:()=>Si,WatchLogLevel:()=>gq,WatchType:()=>ZU,accessPrivateIdentifier:()=>ez,addDisposableResourceHelper:()=>vD,addEmitFlags:()=>ow,addEmitHelper:()=>Cw,addEmitHelpers:()=>ww,addInternalEmitFlags:()=>sw,addNodeFactoryPatcher:()=>BC,addObjectAllocatorPatcher:()=>Xx,addRange:()=>pe,addRelatedInfo:()=>fT,addSyntheticLeadingComment:()=>yw,addSyntheticTrailingComment:()=>xw,addToSeen:()=>Fx,advancedAsyncSuperHelper:()=>SD,affectsDeclarationPathOptionDeclarations:()=>kO,affectsEmitOptionDeclarations:()=>SO,allKeysStartWithDot:()=>tR,altDirectorySeparator:()=>So,and:()=>un,append:()=>ue,appendIfUnique:()=>me,arrayFrom:()=>$e,arrayIsEqualTo:()=>se,arrayIsHomogeneous:()=>ET,arrayIsSorted:()=>ae,arrayOf:()=>ze,arrayReverseIterator:()=>ye,arrayToMap:()=>Ue,arrayToMultiMap:()=>We,arrayToNumericMap:()=>Ke,arraysEqual:()=>E,assertType:()=>pn,assign:()=>qe,assignHelper:()=>Xw,asyncDelegator:()=>Zw,asyncGeneratorHelper:()=>Yw,asyncSuperHelper:()=>xD,asyncValues:()=>eD,attachFileToDiagnostics:()=>oS,awaitHelper:()=>Qw,awaiterHelper:()=>nD,base64decode:()=>jb,base64encode:()=>Lb,binarySearch:()=>Ae,binarySearchKey:()=>Ie,bindSourceFile:()=>IR,breakIntoCharacterSpans:()=>Y0,breakIntoWordSpans:()=>Z0,buildLinkParts:()=>mY,buildOpts:()=>AO,buildOverload:()=>Lpe,bundlerModuleNameResolver:()=>wj,canBeConvertedToAsync:()=>k1,canHaveDecorators:()=>lI,canHaveExportModifier:()=>ZT,canHaveFlowNode:()=>jg,canHaveIllegalDecorators:()=>MA,canHaveIllegalModifiers:()=>LA,canHaveIllegalType:()=>IA,canHaveIllegalTypeParameters:()=>OA,canHaveJSDoc:()=>Rg,canHaveLocals:()=>f_,canHaveModifiers:()=>cI,canHaveSymbol:()=>p_,canIncludeBindAndCheckDiagnsotics:()=>vT,canJsonReportNoInputFiles:()=>tL,canProduceDiagnostics:()=>o$,canUsePropertyAccess:()=>tC,canWatchAffectingLocation:()=>hU,canWatchAtTypes:()=>fU,canWatchDirectoryOrFile:()=>pU,cartesianProduct:()=>gn,cast:()=>ut,chainBundle:()=>CJ,chainDiagnosticMessages:()=>uS,changeAnyExtension:()=>na,changeCompilerHostLikeToUseCache:()=>Dq,changeExtension:()=>tT,changeFullExtension:()=>ra,changesAffectModuleResolution:()=>id,changesAffectingProgramStructure:()=>ad,characterToRegularExpressionFlag:()=>$a,childIsDecorated:()=>vm,classElementOrClassElementParameterIsDecorated:()=>xm,classHasClassThisAssignment:()=>mz,classHasDeclaredOrExplicitlyAssignedName:()=>Sz,classHasExplicitlyAssignedName:()=>xz,classOrConstructorParameterIsDecorated:()=>bm,classPrivateFieldGetHelper:()=>gD,classPrivateFieldInHelper:()=>yD,classPrivateFieldSetHelper:()=>hD,classicNameResolver:()=>vR,classifier:()=>i8,cleanExtendedConfigCache:()=>_q,clear:()=>I,clearMap:()=>xx,clearSharedExtendedConfigFileWatcher:()=>uq,climbPastPropertyAccess:()=>NG,climbPastPropertyOrElementAccess:()=>FG,clone:()=>Xe,cloneCompilerOptions:()=>eQ,closeFileWatcher:()=>dx,closeFileWatcherOf:()=>vq,codefix:()=>a8,collapseTextChangeRangesAcrossMultipleVersions:()=>tc,collectExternalModuleInfo:()=>PJ,combine:()=>_e,combinePaths:()=>Ko,commandLineOptionOfCustomType:()=>NO,commentPragmas:()=>Ki,commonOptionsWithBuild:()=>gO,commonPackageFolders:()=>_k,compact:()=>ce,compareBooleans:()=>Vt,compareDataObjects:()=>bx,compareDiagnostics:()=>pS,compareDiagnosticsSkipRelatedInformation:()=>fS,compareEmitHelpers:()=>qw,compareNumberOfDirectorySeparators:()=>Xk,comparePaths:()=>ca,comparePathsCaseInsensitive:()=>sa,comparePathsCaseSensitive:()=>aa,comparePatternKeys:()=>rR,compareProperties:()=>qt,compareStringsCaseInsensitive:()=>It,compareStringsCaseInsensitiveEslintCompatible:()=>Ot,compareStringsCaseSensitive:()=>Mt,compareStringsCaseSensitiveUI:()=>$t,compareTextSpans:()=>Ft,compareValues:()=>Nt,compileOnSaveCommandLineOption:()=>lO,compilerOptionsAffectDeclarationPath:()=>YS,compilerOptionsAffectEmit:()=>QS,compilerOptionsAffectSemanticDiagnostics:()=>XS,compilerOptionsDidYouMeanDiagnostics:()=>WO,compilerOptionsIndicateEsModules:()=>TQ,compose:()=>Tt,computeCommonSourceDirectoryOfFilenames:()=>Sq,computeLineAndCharacterOfPosition:()=>Wa,computeLineOfPosition:()=>Ha,computeLineStarts:()=>qa,computePositionOfLineAndCharacter:()=>Ua,computeSignature:()=>ZV,computeSignatureWithDiagnostics:()=>YV,computeSuggestionDiagnostics:()=>p1,computedOptions:()=>CS,concatenate:()=>Z,concatenateDiagnosticMessageChains:()=>_S,configDirTemplateSubstitutionOptions:()=>EO,configDirTemplateSubstitutionWatchOptions:()=>PO,consumesNodeCoreModules:()=>xZ,contains:()=>D,containsIgnoredPath:()=>JT,containsObjectRestOrSpread:()=>aI,containsParseError:()=>xd,containsPath:()=>la,convertCompilerOptionsForTelemetry:()=>IL,convertCompilerOptionsFromJson:()=>aL,convertJsonOption:()=>fL,convertToBase64:()=>Mb,convertToJson:()=>TM,convertToObject:()=>kM,convertToOptionsWithAbsolutePaths:()=>jM,convertToRelativePath:()=>pa,convertToTSConfig:()=>DM,convertTypeAcquisitionFromJson:()=>sL,copyComments:()=>RY,copyEntries:()=>_d,copyLeadingComments:()=>qY,copyProperties:()=>Ye,copyTrailingAsLeadingComments:()=>UY,copyTrailingComments:()=>VY,couldStartTrivia:()=>os,countWhere:()=>N,createAbstractBuilder:()=>uU,createAccessorPropertyBackingField:()=>eI,createAccessorPropertyGetRedirector:()=>tI,createAccessorPropertySetRedirector:()=>nI,createBaseNodeFactory:()=>NC,createBinaryExpressionTrampoline:()=>KA,createBindingHelper:()=>_D,createBuildInfo:()=>G$,createBuilderProgram:()=>eU,createBuilderProgramUsingProgramBuildInfo:()=>oU,createBuilderStatusReporter:()=>kK,createCacheWithRedirects:()=>uj,createCacheableExportInfoMap:()=>e0,createCachedDirectoryStructureHost:()=>sq,createClassNamedEvaluationHelperBlock:()=>vz,createClassThisAssignmentBlock:()=>pz,createClassifier:()=>c0,createCommentDirectivesMap:()=>qd,createCompilerDiagnostic:()=>cS,createCompilerDiagnosticForInvalidCustomType:()=>RO,createCompilerDiagnosticFromMessageChain:()=>lS,createCompilerHost:()=>kq,createCompilerHostFromProgramHost:()=>tK,createCompilerHostWorker:()=>wq,createDetachedDiagnostic:()=>nS,createDiagnosticCollection:()=>by,createDiagnosticForFileFromMessageChain:()=>Up,createDiagnosticForNode:()=>Rp,createDiagnosticForNodeArray:()=>Bp,createDiagnosticForNodeArrayFromMessageChain:()=>$p,createDiagnosticForNodeFromMessageChain:()=>zp,createDiagnosticForNodeInSourceFile:()=>Jp,createDiagnosticForRange:()=>Wp,createDiagnosticMessageChainFromDiagnostic:()=>Kp,createDiagnosticReporter:()=>PU,createDocumentPositionMapper:()=>bJ,createDocumentRegistry:()=>T0,createDocumentRegistryInternal:()=>C0,createEmitAndSemanticDiagnosticsBuilderProgram:()=>lU,createEmitHelperFactory:()=>$w,createEmptyExports:()=>VF,createEvaluator:()=>kC,createExpressionForJsxElement:()=>GF,createExpressionForJsxFragment:()=>XF,createExpressionForObjectLiteralElementLike:()=>tA,createExpressionForPropertyName:()=>eA,createExpressionFromEntityName:()=>ZF,createExternalHelpersImportDeclarationIfNeeded:()=>bA,createFileDiagnostic:()=>aS,createFileDiagnosticFromMessageChain:()=>Vp,createFlowNode:()=>FR,createForOfBindingStatement:()=>QF,createFutureSourceFile:()=>QZ,createGetCanonicalFileName:()=>tn,createGetIsolatedDeclarationErrors:()=>c$,createGetSourceFile:()=>Tq,createGetSymbolAccessibilityDiagnosticForNode:()=>s$,createGetSymbolAccessibilityDiagnosticForNodeName:()=>a$,createGetSymbolWalker:()=>BR,createIncrementalCompilerHost:()=>_K,createIncrementalProgram:()=>dK,createJsxFactoryExpression:()=>HF,createLanguageService:()=>A7,createLanguageServiceSourceFile:()=>w7,createMemberAccessForPropertyName:()=>UF,createModeAwareCache:()=>pj,createModeAwareCacheKey:()=>dj,createModuleNotFoundChain:()=>gd,createModuleResolutionCache:()=>hj,createModuleResolutionLoader:()=>Xq,createModuleResolutionLoaderUsingGlobalCache:()=>CU,createModuleSpecifierResolutionHost:()=>CQ,createMultiMap:()=>et,createNameResolver:()=>wC,createNodeConverters:()=>IC,createNodeFactory:()=>JC,createOptionNameMap:()=>OO,createOverload:()=>Mpe,createPackageJsonImportFilter:()=>bZ,createPackageJsonInfo:()=>vZ,createParenthesizerRules:()=>FC,createPatternMatcher:()=>R0,createPrinter:()=>rq,createPrinterWithDefaults:()=>Z$,createPrinterWithRemoveComments:()=>eq,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>tq,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>nq,createProgram:()=>gV,createProgramHost:()=>iK,createPropertyNameNodeForIdentifierOrLiteral:()=>HT,createQueue:()=>rt,createRange:()=>qb,createRedirectedBuilderProgram:()=>sU,createResolutionCache:()=>wU,createRuntimeTypeSerializer:()=>Iz,createScanner:()=>Cs,createSemanticDiagnosticsBuilderProgram:()=>cU,createSet:()=>it,createSolutionBuilder:()=>DK,createSolutionBuilderHost:()=>CK,createSolutionBuilderWithWatch:()=>EK,createSolutionBuilderWithWatchHost:()=>wK,createSortedArray:()=>re,createSourceFile:()=>JI,createSourceMapGenerator:()=>nJ,createSourceMapSource:()=>ZC,createSuperAccessVariableStatement:()=>jz,createSymbolTable:()=>ed,createSymlinkCache:()=>ik,createSyntacticTypeNodeBuilder:()=>pH,createSystemWatchFunctions:()=>ho,createTextChange:()=>dQ,createTextChangeFromStartLength:()=>_Q,createTextChangeRange:()=>Zs,createTextRangeFromNode:()=>cQ,createTextRangeFromSpan:()=>uQ,createTextSpan:()=>Gs,createTextSpanFromBounds:()=>Xs,createTextSpanFromNode:()=>aQ,createTextSpanFromRange:()=>lQ,createTextSpanFromStringLiteralLikeContent:()=>sQ,createTextWriter:()=>Vy,createTokenRange:()=>Gb,createTypeChecker:()=>LB,createTypeReferenceDirectiveResolutionCache:()=>yj,createTypeReferenceResolutionLoader:()=>Zq,createWatchCompilerHost:()=>pK,createWatchCompilerHostOfConfigFile:()=>sK,createWatchCompilerHostOfFilesAndCompilerOptions:()=>cK,createWatchFactory:()=>eK,createWatchHost:()=>YU,createWatchProgram:()=>fK,createWatchStatusReporter:()=>IU,createWriteFileMeasuringIO:()=>Cq,declarationNameToString:()=>Ap,decodeMappings:()=>_J,decodedTextSpanIntersectsWith:()=>Ks,decorateHelper:()=>Uw,deduplicate:()=>ne,defaultIncludeSpec:()=>VM,defaultInitCompilerOptions:()=>jO,defaultMaximumTruncationLength:()=>X_,diagnosticCategoryName:()=>vi,diagnosticToString:()=>VZ,diagnosticsEqualityComparer:()=>hS,directoryProbablyExists:()=>zb,directorySeparator:()=>xo,displayPart:()=>tY,displayPartsToString:()=>S7,disposeEmitNodes:()=>nw,disposeResourcesHelper:()=>bD,documentSpansEqual:()=>UQ,dumpTracingLegend:()=>Cr,elementAt:()=>xe,elideNodes:()=>XA,emitComments:()=>Fv,emitDetachedComments:()=>Av,emitFiles:()=>H$,emitFilesAndReportErrors:()=>HU,emitFilesAndReportErrorsAndGetExitStatus:()=>GU,emitModuleKindIsNonNodeESM:()=>$S,emitNewLineBeforeLeadingCommentOfPosition:()=>Nv,emitNewLineBeforeLeadingComments:()=>Ev,emitNewLineBeforeLeadingCommentsOfPosition:()=>Pv,emitResolverSkipsTypeChecking:()=>W$,emitSkippedWithNoDiagnostics:()=>hV,emptyArray:()=>u,emptyFileSystemEntries:()=>_T,emptyMap:()=>_,emptyOptions:()=>GH,emptySet:()=>d,endsWith:()=>Wt,ensurePathIsNonModuleName:()=>ta,ensureScriptKind:()=>Ek,ensureTrailingDirectorySeparator:()=>ea,entityNameToString:()=>jp,enumerateInsertsAndDeletes:()=>mn,equalOwnProperties:()=>Ve,equateStringsCaseInsensitive:()=>Dt,equateStringsCaseSensitive:()=>Et,equateValues:()=>wt,esDecorateHelper:()=>Hw,escapeJsxAttributeString:()=>Ry,escapeLeadingUnderscores:()=>yc,escapeNonAsciiString:()=>Iy,escapeSnippetText:()=>KT,escapeString:()=>Fy,escapeTemplateSubstitution:()=>Sy,evaluatorResult:()=>SC,every:()=>x,executeCommandLine:()=>HW,expandPreOrPostfixIncrementOrDecrementExpression:()=>nA,explainFiles:()=>$U,explainIfFileIsRedirectAndImpliedFormat:()=>qU,exportAssignmentIsAlias:()=>vh,exportStarHelper:()=>mD,expressionResultIsUnused:()=>BT,extend:()=>Qe,extendsHelper:()=>rD,extensionFromPath:()=>sT,extensionIsTS:()=>oT,extensionsNotSupportingExtensionlessResolution:()=>Jk,externalHelpersModuleNameText:()=>G_,factory:()=>YC,fileExtensionIs:()=>Ao,fileExtensionIsOneOf:()=>Io,fileIncludeReasonToDiagnostics:()=>KU,fileShouldUseJavaScriptRequire:()=>GZ,filter:()=>F,filterMutate:()=>A,filterSemanticDiagnostics:()=>vV,find:()=>S,findAncestor:()=>mc,findBestPatternMatch:()=>on,findChildOfKind:()=>uX,findComputedPropertyNameCacheAssignment:()=>rI,findConfigFile:()=>bq,findConstructorDeclaration:()=>CC,findContainingList:()=>_X,findDiagnosticForNode:()=>TZ,findFirstNonJsxWhitespaceToken:()=>CX,findIndex:()=>T,findLast:()=>k,findLastIndex:()=>C,findListItemInfo:()=>cX,findMap:()=>w,findModifier:()=>zQ,findNextToken:()=>DX,findPackageJson:()=>hZ,findPackageJsons:()=>gZ,findPrecedingMatchingToken:()=>RX,findPrecedingToken:()=>EX,findSuperStatementIndexPath:()=>JJ,findTokenOnLeftOfPosition:()=>wX,findUseStrictPrologue:()=>sA,first:()=>Te,firstDefined:()=>g,firstDefinedIterator:()=>h,firstIterator:()=>Ce,firstOrOnly:()=>PZ,firstOrUndefined:()=>Se,firstOrUndefinedIterator:()=>ke,fixupCompilerOptions:()=>A1,flatMap:()=>R,flatMapIterator:()=>J,flatMapToMutable:()=>B,flatten:()=>j,flattenCommaList:()=>oI,flattenDestructuringAssignment:()=>iz,flattenDestructuringBinding:()=>sz,flattenDiagnosticMessageText:()=>Jq,forEach:()=>f,forEachAncestor:()=>cd,forEachAncestorDirectory:()=>ga,forEachChild:()=>LI,forEachChildRecursively:()=>jI,forEachEmittedFile:()=>E$,forEachEnclosingBlockScopeContainer:()=>Fp,forEachEntry:()=>ld,forEachExternalModuleToImportFrom:()=>n0,forEachImportClauseDeclaration:()=>Eg,forEachKey:()=>ud,forEachLeadingCommentRange:()=>fs,forEachNameInAccessChainWalkingLeft:()=>Rx,forEachNameOfDefaultExport:()=>s0,forEachPropertyAssignment:()=>Kf,forEachResolvedProjectReference:()=>tV,forEachReturnStatement:()=>Pf,forEachRight:()=>m,forEachTrailingCommentRange:()=>ms,forEachTsConfigPropArray:()=>Xf,forEachUnique:()=>WQ,forEachYieldExpression:()=>Nf,forSomeAncestorDirectory:()=>Dx,formatColorAndReset:()=>Lq,formatDiagnostic:()=>Nq,formatDiagnostics:()=>Pq,formatDiagnosticsWithColorAndContext:()=>Bq,formatGeneratedName:()=>ZA,formatGeneratedNamePart:()=>YA,formatLocation:()=>Rq,formatMessage:()=>sS,formatStringFromArgs:()=>Yx,formatting:()=>A_e,fullTripleSlashAMDReferencePathRegEx:()=>kf,fullTripleSlashReferencePathRegEx:()=>bf,generateDjb2Hash:()=>Hi,generateTSConfig:()=>LM,generatorHelper:()=>uD,getAdjustedReferenceLocation:()=>vX,getAdjustedRenameLocation:()=>bX,getAliasDeclarationFromName:()=>hh,getAllAccessorDeclarations:()=>Sv,getAllDecoratorsOfClass:()=>WJ,getAllDecoratorsOfClassElement:()=>HJ,getAllJSDocTags:()=>dl,getAllJSDocTagsOfKind:()=>pl,getAllKeys:()=>Be,getAllProjectOutputs:()=>V$,getAllSuperTypeNodes:()=>Ch,getAllowJSCompilerOption:()=>JS,getAllowSyntheticDefaultImports:()=>AS,getAncestor:()=>Eh,getAnyExtensionFromPath:()=>zo,getAreDeclarationMapsEnabled:()=>BS,getAssignedExpandoInitializer:()=>Qm,getAssignedName:()=>Nc,getAssignedNameOfIdentifier:()=>hz,getAssignmentDeclarationKind:()=>ag,getAssignmentDeclarationPropertyAccessKind:()=>gg,getAssignmentTargetKind:()=>Zg,getAutomaticTypeDirectiveNames:()=>oj,getBaseFileName:()=>Bo,getBinaryOperatorPrecedence:()=>yy,getBuildInfo:()=>Q$,getBuildInfoFileVersionMap:()=>aU,getBuildInfoText:()=>X$,getBuildOrderFromAnyBuildOrder:()=>SK,getBuilderCreationParameters:()=>XV,getBuilderFileEmit:()=>PV,getCanonicalDiagnostic:()=>Hp,getCheckFlags:()=>px,getClassExtendsHeritageElement:()=>kh,getClassLikeDeclarationOfSymbol:()=>Cx,getCombinedLocalAndExportSymbolFlags:()=>gx,getCombinedModifierFlags:()=>cc,getCombinedNodeFlags:()=>uc,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>lc,getCommentRange:()=>fw,getCommonSourceDirectory:()=>$$,getCommonSourceDirectoryOfConfig:()=>q$,getCompilerOptionValue:()=>ZS,getCompilerOptionsDiffValue:()=>OM,getConditions:()=>rj,getConfigFileParsingDiagnostics:()=>dV,getConstantValue:()=>kw,getContainerFlags:()=>jR,getContainerNode:()=>UG,getContainingClass:()=>Zf,getContainingClassExcludingClassDecorators:()=>nm,getContainingClassStaticBlock:()=>em,getContainingFunction:()=>Qf,getContainingFunctionDeclaration:()=>Yf,getContainingFunctionOrClassStaticBlock:()=>tm,getContainingNodeArray:()=>zT,getContainingObjectLiteralElement:()=>O7,getContextualTypeFromParent:()=>GY,getContextualTypeFromParentOrAncestorTypeNode:()=>mX,getCurrentTime:()=>bK,getDeclarationDiagnostics:()=>l$,getDeclarationEmitExtensionForPath:()=>tv,getDeclarationEmitOutputFilePath:()=>Zy,getDeclarationEmitOutputFilePathWorker:()=>ev,getDeclarationFileExtension:()=>YI,getDeclarationFromName:()=>ph,getDeclarationModifierFlagsFromSymbol:()=>fx,getDeclarationOfKind:()=>Y_,getDeclarationsOfKind:()=>Z_,getDeclaredExpandoInitializer:()=>Xm,getDecorators:()=>Fc,getDefaultCompilerOptions:()=>k7,getDefaultFormatCodeSettings:()=>rG,getDefaultLibFileName:()=>Ls,getDefaultLibFilePath:()=>L7,getDefaultLikeExportInfo:()=>o0,getDefaultLikeExportNameFromDeclaration:()=>IZ,getDiagnosticText:()=>eM,getDiagnosticsWithinSpan:()=>CZ,getDirectoryPath:()=>Ro,getDirectoryToWatchFailedLookupLocation:()=>yU,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>xU,getDocumentPositionMapper:()=>u1,getDocumentSpansEqualityComparer:()=>KQ,getESModuleInterop:()=>FS,getEditsForFileRename:()=>E0,getEffectiveBaseTypeNode:()=>Sh,getEffectiveConstraintOfTypeParameter:()=>gl,getEffectiveContainerForJSDocTemplateTag:()=>qg,getEffectiveImplementsTypeNodes:()=>Th,getEffectiveInitializer:()=>Gm,getEffectiveJSDocHost:()=>Kg,getEffectiveModifierFlags:()=>Qv,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>Yv,getEffectiveModifierFlagsNoCache:()=>nb,getEffectiveReturnTypeNode:()=>Cv,getEffectiveSetAccessorTypeAnnotationNode:()=>Dv,getEffectiveTypeAnnotationNode:()=>kv,getEffectiveTypeParameterDeclarations:()=>ml,getEffectiveTypeRoots:()=>QL,getElementOrPropertyAccessArgumentExpressionOrName:()=>fg,getElementOrPropertyAccessName:()=>mg,getElementsOfBindingOrAssignmentPattern:()=>FA,getEmitDeclarations:()=>LS,getEmitFlags:()=>Yd,getEmitHelpers:()=>Ew,getEmitModuleDetectionKind:()=>PS,getEmitModuleKind:()=>DS,getEmitModuleResolutionKind:()=>ES,getEmitScriptTarget:()=>wS,getEmitStandardClassFields:()=>GS,getEnclosingBlockScopeContainer:()=>Np,getEnclosingContainer:()=>Pp,getEncodedSemanticClassifications:()=>h0,getEncodedSyntacticClassifications:()=>S0,getEndLinePosition:()=>Ed,getEntityNameFromTypeNode:()=>fm,getEntrypointsFromPackageJsonInfo:()=>Uj,getErrorCountForSummary:()=>MU,getErrorSpanForNode:()=>Qp,getErrorSummaryText:()=>BU,getEscapedTextOfIdentifierOrLiteral:()=>Gh,getEscapedTextOfJsxAttributeName:()=>lC,getEscapedTextOfJsxNamespacedName:()=>dC,getExpandoInitializer:()=>Ym,getExportAssignmentExpression:()=>bh,getExportInfoMap:()=>i0,getExportNeedsImportStarHelper:()=>wJ,getExpressionAssociativity:()=>dy,getExpressionPrecedence:()=>fy,getExternalHelpersModuleName:()=>yA,getExternalModuleImportEqualsDeclarationExpression:()=>Pm,getExternalModuleName:()=>Cg,getExternalModuleNameFromDeclaration:()=>Xy,getExternalModuleNameFromPath:()=>Qy,getExternalModuleNameLiteral:()=>kA,getExternalModuleRequireArgument:()=>Nm,getFallbackOptions:()=>yq,getFileEmitOutput:()=>CV,getFileMatcherPatterns:()=>kk,getFileNamesFromConfigSpecs:()=>xL,getFileWatcherEventKind:()=>so,getFilesInErrorForSummary:()=>LU,getFirstConstructorWithBody:()=>pv,getFirstIdentifier:()=>bb,getFirstNonSpaceCharacterPosition:()=>EY,getFirstProjectOutput:()=>K$,getFixableErrorSpanExpression:()=>DZ,getFormatCodeSettingsForWriting:()=>UZ,getFullWidth:()=>pd,getFunctionFlags:()=>Jh,getHeritageClause:()=>Dh,getHostSignatureFromJSDoc:()=>Ug,getIdentifierAutoGenerate:()=>Rw,getIdentifierGeneratedImportReference:()=>Jw,getIdentifierTypeArguments:()=>Lw,getImmediatelyInvokedFunctionExpression:()=>cm,getImpliedNodeFormatForFile:()=>pV,getImpliedNodeFormatForFileWorker:()=>fV,getImportNeedsImportDefaultHelper:()=>EJ,getImportNeedsImportStarHelper:()=>DJ,getIndentSize:()=>qy,getIndentString:()=>$y,getInferredLibraryNameResolveFrom:()=>iV,getInitializedVariables:()=>lx,getInitializerOfBinaryExpression:()=>hg,getInitializerOfBindingOrAssignmentElement:()=>CA,getInterfaceBaseTypeNodes:()=>wh,getInternalEmitFlags:()=>Zd,getInvokedExpression:()=>mm,getIsolatedModules:()=>NS,getJSDocAugmentsTag:()=>Jc,getJSDocClassTag:()=>$c,getJSDocCommentRanges:()=>vf,getJSDocCommentsAndTags:()=>Bg,getJSDocDeprecatedTag:()=>Yc,getJSDocDeprecatedTagNoCache:()=>Zc,getJSDocEnumTag:()=>el,getJSDocHost:()=>Wg,getJSDocImplementsTags:()=>zc,getJSDocOverloadTags:()=>Vg,getJSDocOverrideTagNoCache:()=>Qc,getJSDocParameterTags:()=>Oc,getJSDocParameterTagsNoCache:()=>Mc,getJSDocPrivateTag:()=>Uc,getJSDocPrivateTagNoCache:()=>Kc,getJSDocProtectedTag:()=>Wc,getJSDocProtectedTagNoCache:()=>Hc,getJSDocPublicTag:()=>qc,getJSDocPublicTagNoCache:()=>Vc,getJSDocReadonlyTag:()=>Gc,getJSDocReadonlyTagNoCache:()=>Xc,getJSDocReturnTag:()=>nl,getJSDocReturnType:()=>sl,getJSDocRoot:()=>Hg,getJSDocSatisfiesExpressionType:()=>sC,getJSDocSatisfiesTag:()=>il,getJSDocTags:()=>ll,getJSDocTagsNoCache:()=>ul,getJSDocTemplateTag:()=>rl,getJSDocThisTag:()=>tl,getJSDocType:()=>al,getJSDocTypeAliasName:()=>AA,getJSDocTypeAssertionType:()=>dA,getJSDocTypeParameterDeclarations:()=>wv,getJSDocTypeParameterTags:()=>jc,getJSDocTypeParameterTagsNoCache:()=>Rc,getJSDocTypeTag:()=>ol,getJSXImplicitImportBase:()=>tk,getJSXRuntimeImport:()=>nk,getJSXTransformEnabled:()=>ek,getKeyForCompilerOptions:()=>lj,getLanguageVariant:()=>bS,getLastChild:()=>Nx,getLeadingCommentRanges:()=>vs,getLeadingCommentRangesOfNode:()=>yf,getLeftmostAccessExpression:()=>jx,getLeftmostExpression:()=>Bx,getLibraryNameFromLibFileName:()=>oV,getLineAndCharacterOfPosition:()=>Xa,getLineInfo:()=>aJ,getLineOfLocalPosition:()=>_v,getLineOfLocalPositionFromLineMap:()=>dv,getLineStartPositionForPosition:()=>GG,getLineStarts:()=>Ka,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>sx,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>ax,getLinesBetweenPositions:()=>Ga,getLinesBetweenRangeEndAndRangeStart:()=>tx,getLinesBetweenRangeEndPositions:()=>nx,getLiteralText:()=>np,getLocalNameForExternalImport:()=>SA,getLocalSymbolForExportDefault:()=>Ab,getLocaleSpecificMessage:()=>tS,getLocaleTimeString:()=>AU,getMappedContextSpan:()=>QQ,getMappedDocumentSpan:()=>XQ,getMappedLocation:()=>GQ,getMatchedFileSpec:()=>VU,getMatchedIncludeSpec:()=>UU,getMeaningFromDeclaration:()=>hG,getMeaningFromLocation:()=>yG,getMembersOfDeclaration:()=>Af,getModeForFileReference:()=>zq,getModeForResolutionAtIndex:()=>$q,getModeForUsageLocation:()=>Vq,getModifiedTime:()=>Zi,getModifiers:()=>Ac,getModuleInstanceState:()=>DR,getModuleNameStringLiteralAt:()=>TV,getModuleSpecifierEndingPreference:()=>Wk,getModuleSpecifierResolverHost:()=>wQ,getNameForExportedSymbol:()=>FZ,getNameFromImportAttribute:()=>xC,getNameFromIndexInfo:()=>Ip,getNameFromPropertyName:()=>xQ,getNameOfAccessExpression:()=>Mx,getNameOfCompilerOptionValue:()=>FM,getNameOfDeclaration:()=>Pc,getNameOfExpando:()=>eg,getNameOfJSDocTypedef:()=>wc,getNameOfScriptTarget:()=>HS,getNameOrArgument:()=>pg,getNameTable:()=>I7,getNamesForExportedSymbol:()=>NZ,getNamespaceDeclarationNode:()=>wg,getNewLineCharacter:()=>$b,getNewLineKind:()=>qZ,getNewLineOrDefaultFromHost:()=>gY,getNewTargetContainer:()=>am,getNextJSDocCommentLocation:()=>zg,getNodeChildren:()=>zF,getNodeForGeneratedName:()=>QA,getNodeId:()=>IB,getNodeKind:()=>KG,getNodeModifiers:()=>KX,getNodeModulePathParts:()=>XT,getNonAssignedNameOfDeclaration:()=>Ec,getNonAssignmentOperatorForCompoundAssignment:()=>jJ,getNonAugmentationDeclaration:()=>gp,getNonDecoratorTokenPosOfNode:()=>Ud,getNormalizedAbsolutePath:()=>Go,getNormalizedAbsolutePathWithoutRoot:()=>Qo,getNormalizedPathComponents:()=>Ho,getObjectFlags:()=>wx,getOperator:()=>my,getOperatorAssociativity:()=>py,getOperatorPrecedence:()=>hy,getOptionFromName:()=>GO,getOptionsForLibraryResolution:()=>vj,getOptionsNameMap:()=>MO,getOrCreateEmitNode:()=>tw,getOrCreateExternalHelpersModuleNameIfNeeded:()=>xA,getOrUpdate:()=>K,getOriginalNode:()=>fc,getOriginalNodeId:()=>SJ,getOriginalSourceFile:()=>uy,getOutputDeclarationFileName:()=>M$,getOutputDeclarationFileNameWorker:()=>L$,getOutputExtension:()=>I$,getOutputFileNames:()=>U$,getOutputJSFileNameWorker:()=>R$,getOutputPathsFor:()=>F$,getOutputPathsForBundle:()=>N$,getOwnEmitOutputFilePath:()=>Yy,getOwnKeys:()=>Re,getOwnValues:()=>Je,getPackageJsonInfo:()=>Qj,getPackageJsonTypesVersionsPaths:()=>XL,getPackageJsonsVisibleToFile:()=>yZ,getPackageNameFromTypesPackageName:()=>gR,getPackageScopeForPath:()=>Hj,getParameterSymbolFromJSDoc:()=>$g,getParameterTypeNode:()=>QT,getParentNodeInSpan:()=>BQ,getParseTreeNode:()=>hc,getParsedCommandLineOfConfigFile:()=>tM,getPathComponents:()=>$o,getPathComponentsRelativeTo:()=>_a,getPathFromPathComponents:()=>qo,getPathUpdater:()=>P0,getPathsBasePath:()=>rv,getPatternFromSpec:()=>bk,getPendingEmitKind:()=>NV,getPositionOfLineAndCharacter:()=>Va,getPossibleGenericSignatures:()=>zX,getPossibleOriginalInputExtensionForExtension:()=>nv,getPossibleTypeArgumentsInfo:()=>$X,getPreEmitDiagnostics:()=>Eq,getPrecedingNonSpaceCharacterPosition:()=>PY,getPrivateIdentifier:()=>YJ,getProperties:()=>zJ,getProperty:()=>je,getPropertyArrayElementValue:()=>Wf,getPropertyAssignmentAliasLikeExpression:()=>xh,getPropertyNameForPropertyNameNode:()=>Kh,getPropertyNameForUniqueESSymbol:()=>Xh,getPropertyNameFromType:()=>gC,getPropertyNameOfBindingOrAssignmentElement:()=>EA,getPropertySymbolFromBindingElement:()=>RQ,getPropertySymbolsFromContextualType:()=>M7,getQuoteFromPreference:()=>IQ,getQuotePreference:()=>AQ,getRangesWhere:()=>Y,getRefactorContextSpan:()=>wZ,getReferencedFileLocation:()=>uV,getRegexFromPattern:()=>Tk,getRegularExpressionForWildcard:()=>hk,getRegularExpressionsForWildcards:()=>yk,getRelativePathFromDirectory:()=>da,getRelativePathFromFile:()=>fa,getRelativePathToDirectoryOrUrl:()=>ma,getRenameLocation:()=>$Y,getReplacementSpanForContextToken:()=>oQ,getResolutionDiagnostic:()=>SV,getResolutionModeOverride:()=>Kq,getResolveJsonModule:()=>MS,getResolvePackageJsonExports:()=>IS,getResolvePackageJsonImports:()=>OS,getResolvedExternalModuleName:()=>Hy,getRestIndicatorOfBindingOrAssignmentElement:()=>DA,getRestParameterElementType:()=>Ff,getRightMostAssignedExpression:()=>ng,getRootDeclaration:()=>sy,getRootDirectoryOfResolutionCache:()=>SU,getRootLength:()=>jo,getRootPathSplitLength:()=>kU,getScriptKind:()=>TY,getScriptKindFromFileName:()=>Pk,getScriptTargetFeatures:()=>ep,getSelectedEffectiveModifierFlags:()=>Hv,getSelectedSyntacticModifierFlags:()=>Gv,getSemanticClassifications:()=>m0,getSemanticJsxChildren:()=>vy,getSetAccessorTypeAnnotationNode:()=>mv,getSetAccessorValueParameter:()=>fv,getSetExternalModuleIndicator:()=>TS,getShebang:()=>xs,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>Og,getSingleVariableOfVariableStatement:()=>Mg,getSnapshotText:()=>yQ,getSnippetElement:()=>Nw,getSourceFileOfModule:()=>kd,getSourceFileOfNode:()=>Sd,getSourceFilePathInNewDir:()=>av,getSourceFilePathInNewDirWorker:()=>sv,getSourceFileVersionAsHashFromText:()=>nK,getSourceFilesToEmit:()=>iv,getSourceMapRange:()=>cw,getSourceMapper:()=>l1,getSourceTextOfNodeFromSourceFile:()=>Kd,getSpanOfTokenAtPosition:()=>Gp,getSpellingSuggestion:()=>Ut,getStartPositionOfLine:()=>wd,getStartPositionOfRange:()=>ox,getStartsOnNewLine:()=>dw,getStaticPropertiesAndClassStaticBlock:()=>qJ,getStrictOptionValue:()=>WS,getStringComparer:()=>Lt,getSubPatternFromSpec:()=>xk,getSuperCallFromStatement:()=>RJ,getSuperContainer:()=>sm,getSupportedCodeFixes:()=>T7,getSupportedExtensions:()=>zk,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>$k,getSwitchedType:()=>eZ,getSymbolId:()=>OB,getSymbolNameForPrivateIdentifier:()=>Qh,getSymbolParentOrFail:()=>OZ,getSymbolTarget:()=>CY,getSyntacticClassifications:()=>x0,getSyntacticModifierFlags:()=>Zv,getSyntacticModifierFlagsNoCache:()=>rb,getSynthesizedDeepClone:()=>NY,getSynthesizedDeepCloneWithReplacements:()=>FY,getSynthesizedDeepClones:()=>IY,getSynthesizedDeepClonesWithReplacements:()=>OY,getSyntheticLeadingComments:()=>gw,getSyntheticTrailingComments:()=>vw,getTargetLabel:()=>AG,getTargetOfBindingOrAssignmentElement:()=>wA,getTemporaryModuleResolutionState:()=>Wj,getTextOfConstantValue:()=>rp,getTextOfIdentifierOrLiteral:()=>Hh,getTextOfJSDocComment:()=>fl,getTextOfJsxAttributeName:()=>uC,getTextOfJsxNamespacedName:()=>pC,getTextOfNode:()=>Gd,getTextOfNodeFromSourceText:()=>Hd,getTextOfPropertyName:()=>Lp,getThisContainer:()=>rm,getThisParameter:()=>gv,getTokenAtPosition:()=>kX,getTokenPosOfNode:()=>Vd,getTokenSourceMapRange:()=>uw,getTouchingPropertyName:()=>xX,getTouchingToken:()=>SX,getTrailingCommentRanges:()=>bs,getTrailingSemicolonDeferringWriter:()=>Uy,getTransformFlagsSubtreeExclusions:()=>HC,getTransformers:()=>g$,getTsBuildInfoEmitOutputFilePath:()=>P$,getTsConfigObjectLiteralExpression:()=>Hf,getTsConfigPropArrayElementValue:()=>Gf,getTypeAnnotationNode:()=>Tv,getTypeArgumentOrTypeParameterList:()=>WX,getTypeKeywordOfTypeOnlyImport:()=>qQ,getTypeNode:()=>Ow,getTypeNodeIfAccessible:()=>nZ,getTypeParameterFromJsDoc:()=>Gg,getTypeParameterOwner:()=>nc,getTypesPackageName:()=>fR,getUILocale:()=>Jt,getUniqueName:()=>zY,getUniqueSymbolId:()=>DY,getUseDefineForClassFields:()=>zS,getWatchErrorSummaryDiagnosticMessage:()=>jU,getWatchFactory:()=>hq,group:()=>He,groupBy:()=>Ge,guessIndentation:()=>z_,handleNoEmitOptions:()=>yV,handleWatchOptionsConfigDirTemplateSubstitution:()=>KM,hasAbstractModifier:()=>qv,hasAccessorModifier:()=>Uv,hasAmbientModifier:()=>Vv,hasChangesInResolutions:()=>bd,hasChildOfKind:()=>lX,hasContextSensitiveParameters:()=>$T,hasDecorators:()=>Wv,hasDocComment:()=>VX,hasDynamicName:()=>Vh,hasEffectiveModifier:()=>Rv,hasEffectiveModifiers:()=>Lv,hasEffectiveReadonlyModifier:()=>Kv,hasExtension:()=>Fo,hasIndexSignature:()=>ZY,hasInferredType:()=>PC,hasInitializer:()=>L_,hasInvalidEscape:()=>Ty,hasJSDocNodes:()=>O_,hasJSDocParameterTags:()=>Bc,hasJSFileExtension:()=>qk,hasJsonModuleEmitEnabled:()=>qS,hasOnlyExpressionInitializer:()=>j_,hasOverrideModifier:()=>$v,hasPossibleExternalModuleReference:()=>Dp,hasProperty:()=>Le,hasPropertyAccessExpressionWithName:()=>IG,hasQuestionToken:()=>Pg,hasRecordedExternalHelpers:()=>vA,hasResolutionModeOverride:()=>yC,hasRestParameter:()=>V_,hasScopeMarker:()=>t_,hasStaticModifier:()=>zv,hasSyntacticModifier:()=>Bv,hasSyntacticModifiers:()=>jv,hasTSFileExtension:()=>Vk,hasTabstop:()=>nC,hasTrailingDirectorySeparator:()=>Oo,hasType:()=>M_,hasTypeArguments:()=>Xg,hasZeroOrOneAsteriskCharacter:()=>rk,helperString:()=>Vw,hostGetCanonicalFileName:()=>Wy,hostUsesCaseSensitiveFileNames:()=>Ky,idText:()=>bc,identifierIsThisKeyword:()=>xv,identifierToKeywordKind:()=>xc,identity:()=>mt,identitySourceMapConsumer:()=>xJ,ignoreSourceNewlines:()=>Aw,ignoredPaths:()=>co,importDefaultHelper:()=>fD,importFromModuleSpecifier:()=>kg,importStarHelper:()=>pD,indexOfAnyCharCode:()=>P,indexOfNode:()=>Qd,indicesOf:()=>te,inferredTypesContainingFile:()=>rV,injectClassNamedEvaluationHelperBlockIfMissing:()=>kz,injectClassThisAssignmentIfMissing:()=>gz,insertImports:()=>$Q,insertLeadingStatement:()=>YF,insertSorted:()=>ie,insertStatementAfterCustomPrologue:()=>Jd,insertStatementAfterStandardPrologue:()=>Bd,insertStatementsAfterCustomPrologue:()=>Rd,insertStatementsAfterStandardPrologue:()=>jd,intersperse:()=>b,intrinsicTagNameToString:()=>fC,introducesArgumentsExoticObject:()=>Bf,inverseJsxOptionMap:()=>_O,isAbstractConstructorSymbol:()=>Tx,isAbstractModifier:()=>YD,isAccessExpression:()=>Ox,isAccessibilityModifier:()=>ZX,isAccessor:()=>hu,isAccessorModifier:()=>eE,isAliasSymbolDeclaration:()=>gh,isAliasableExpression:()=>yh,isAmbientModule:()=>sp,isAmbientPropertyDeclaration:()=>vp,isAnonymousFunctionDefinition:()=>ny,isAnyDirectorySeparator:()=>To,isAnyImportOrBareOrAccessedRequire:()=>Tp,isAnyImportOrReExport:()=>Ep,isAnyImportOrRequireStatement:()=>Cp,isAnyImportSyntax:()=>kp,isAnySupportedFileExtension:()=>cT,isApplicableVersionedTypesKey:()=>aR,isArgumentExpressionOfElementAccess:()=>JG,isArray:()=>ot,isArrayBindingElement:()=>Nu,isArrayBindingOrAssignmentElement:()=>ju,isArrayBindingOrAssignmentPattern:()=>Lu,isArrayBindingPattern:()=>UE,isArrayLiteralExpression:()=>WE,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>tQ,isArrayTypeNode:()=>wE,isArrowFunction:()=>rP,isAsExpression:()=>yP,isAssertClause:()=>sN,isAssertEntry:()=>cN,isAssertionExpression:()=>Qu,isAssertsKeyword:()=>HD,isAssignmentDeclaration:()=>Hm,isAssignmentExpression:()=>mb,isAssignmentOperator:()=>db,isAssignmentPattern:()=>Pu,isAssignmentTarget:()=>eh,isAsteriskToken:()=>jD,isAsyncFunction:()=>zh,isAsyncModifier:()=>WD,isAutoAccessorPropertyDeclaration:()=>yu,isAwaitExpression:()=>sP,isAwaitKeyword:()=>GD,isBigIntLiteral:()=>CD,isBinaryExpression:()=>uP,isBinaryOperatorToken:()=>UA,isBindableObjectDefinePropertyCall:()=>sg,isBindableStaticAccessExpression:()=>ug,isBindableStaticElementAccessExpression:()=>_g,isBindableStaticNameExpression:()=>dg,isBindingElement:()=>KE,isBindingElementOfBareOrAccessedRequire:()=>qm,isBindingName:()=>su,isBindingOrAssignmentElement:()=>Au,isBindingOrAssignmentPattern:()=>Iu,isBindingPattern:()=>Eu,isBlock:()=>DP,isBlockLike:()=>XZ,isBlockOrCatchScoped:()=>op,isBlockScope:()=>bp,isBlockScopedContainerTopLevel:()=>dp,isBooleanLiteral:()=>_u,isBreakOrContinueStatement:()=>Nl,isBreakStatement:()=>RP,isBuild:()=>WW,isBuildInfoFile:()=>D$,isBuilderProgram:()=>JU,isBundle:()=>VN,isCallChain:()=>xl,isCallExpression:()=>QE,isCallExpressionTarget:()=>bG,isCallLikeExpression:()=>zu,isCallLikeOrFunctionLikeExpression:()=>Ju,isCallOrNewExpression:()=>$u,isCallOrNewExpressionTarget:()=>SG,isCallSignatureDeclaration:()=>hE,isCallToHelper:()=>kD,isCaseBlock:()=>tN,isCaseClause:()=>MN,isCaseKeyword:()=>rE,isCaseOrDefaultClause:()=>E_,isCatchClause:()=>RN,isCatchClauseVariableDeclaration:()=>VT,isCatchClauseVariableDeclarationOrBindingElement:()=>ap,isCheckJsEnabledForFile:()=>uT,isChildOfNodeWithKind:()=>Ef,isCircularBuildOrder:()=>xK,isClassDeclaration:()=>GP,isClassElement:()=>mu,isClassExpression:()=>mP,isClassInstanceProperty:()=>vu,isClassLike:()=>gu,isClassMemberModifier:()=>ru,isClassNamedEvaluationHelperBlock:()=>bz,isClassOrTypeElement:()=>Tu,isClassStaticBlockDeclaration:()=>pE,isClassThisAssignmentBlock:()=>fz,isCollapsedRange:()=>Hb,isColonToken:()=>JD,isCommaExpression:()=>lA,isCommaListExpression:()=>TP,isCommaSequence:()=>uA,isCommaToken:()=>OD,isComment:()=>HX,isCommonJsExportPropertyAssignment:()=>jf,isCommonJsExportedExpression:()=>Lf,isCompoundAssignment:()=>LJ,isComputedNonLiteralName:()=>Op,isComputedPropertyName:()=>oE,isConciseBody:()=>o_,isConditionalExpression:()=>_P,isConditionalTypeNode:()=>IE,isConstAssertion:()=>TC,isConstTypeReference:()=>Dl,isConstructSignatureDeclaration:()=>yE,isConstructorDeclaration:()=>fE,isConstructorTypeNode:()=>kE,isContextualKeyword:()=>Ah,isContinueStatement:()=>jP,isCustomPrologue:()=>ff,isDebuggerStatement:()=>UP,isDeclaration:()=>h_,isDeclarationBindingElement:()=>Fu,isDeclarationFileName:()=>QI,isDeclarationName:()=>dh,isDeclarationNameOfEnumOrNamespace:()=>cx,isDeclarationReadonly:()=>nf,isDeclarationStatement:()=>y_,isDeclarationWithTypeParameterChildren:()=>Sp,isDeclarationWithTypeParameters:()=>xp,isDecorator:()=>cE,isDecoratorTarget:()=>TG,isDefaultClause:()=>LN,isDefaultImport:()=>Dg,isDefaultModifier:()=>KD,isDefaultedExpandoInitializer:()=>Zm,isDeleteExpression:()=>iP,isDeleteTarget:()=>uh,isDeprecatedDeclaration:()=>zZ,isDestructuringAssignment:()=>hb,isDiagnosticWithLocation:()=>kZ,isDiskPathRoot:()=>Do,isDoStatement:()=>AP,isDocumentRegistryEntry:()=>k0,isDotDotDotToken:()=>ID,isDottedName:()=>xb,isDynamicName:()=>Uh,isESSymbolIdentifier:()=>ey,isEffectiveExternalModule:()=>hp,isEffectiveModuleDeclaration:()=>up,isEffectiveStrictModeSourceFile:()=>yp,isElementAccessChain:()=>bl,isElementAccessExpression:()=>XE,isEmittedFileOfProgram:()=>mq,isEmptyArrayLiteral:()=>Fb,isEmptyBindingElement:()=>oc,isEmptyBindingPattern:()=>ic,isEmptyObjectLiteral:()=>Nb,isEmptyStatement:()=>PP,isEmptyStringLiteral:()=>Sm,isEntityName:()=>ou,isEntityNameExpression:()=>vb,isEnumConst:()=>tf,isEnumDeclaration:()=>YP,isEnumMember:()=>$N,isEqualityOperatorKind:()=>QY,isEqualsGreaterThanToken:()=>$D,isExclamationToken:()=>RD,isExcludedFile:()=>SL,isExclusivelyTypeOnlyImportOrExport:()=>qq,isExpandoPropertyDeclaration:()=>hC,isExportAssignment:()=>mN,isExportDeclaration:()=>gN,isExportModifier:()=>UD,isExportName:()=>oA,isExportNamespaceAsDefaultDeclaration:()=>Wd,isExportOrDefaultModifier:()=>HA,isExportSpecifier:()=>yN,isExportsIdentifier:()=>rg,isExportsOrModuleExportsOrAlias:()=>LR,isExpression:()=>Xu,isExpressionNode:()=>Tm,isExpressionOfExternalModuleImportEqualsDeclaration:()=>VG,isExpressionOfOptionalChainRoot:()=>Tl,isExpressionStatement:()=>NP,isExpressionWithTypeArguments:()=>hP,isExpressionWithTypeArgumentsInClassExtendsClause:()=>yb,isExternalModule:()=>qI,isExternalModuleAugmentation:()=>fp,isExternalModuleImportEqualsDeclaration:()=>Em,isExternalModuleIndicator:()=>r_,isExternalModuleNameRelative:()=>Os,isExternalModuleReference:()=>SN,isExternalModuleSymbol:()=>nd,isExternalOrCommonJsModule:()=>Zp,isFileLevelReservedGeneratedIdentifier:()=>Yl,isFileLevelUniqueName:()=>Pd,isFileProbablyExternalModule:()=>mI,isFirstDeclarationOfSymbolParameter:()=>YQ,isFixablePromiseHandler:()=>y1,isForInOrOfStatement:()=>i_,isForInStatement:()=>MP,isForInitializer:()=>s_,isForOfStatement:()=>LP,isForStatement:()=>OP,isFullSourceFile:()=>Am,isFunctionBlock:()=>zf,isFunctionBody:()=>a_,isFunctionDeclaration:()=>HP,isFunctionExpression:()=>nP,isFunctionExpressionOrArrowFunction:()=>UT,isFunctionLike:()=>cu,isFunctionLikeDeclaration:()=>uu,isFunctionLikeKind:()=>pu,isFunctionLikeOrClassStaticBlockDeclaration:()=>lu,isFunctionOrConstructorTypeNode:()=>Du,isFunctionOrModuleBlock:()=>fu,isFunctionSymbol:()=>xg,isFunctionTypeNode:()=>SE,isFutureReservedKeyword:()=>Oh,isGeneratedIdentifier:()=>Xl,isGeneratedPrivateIdentifier:()=>Ql,isGetAccessor:()=>I_,isGetAccessorDeclaration:()=>mE,isGetOrSetAccessorDeclaration:()=>yl,isGlobalDeclaration:()=>BZ,isGlobalScopeAugmentation:()=>pp,isGlobalSourceFile:()=>Yp,isGrammarError:()=>Ad,isHeritageClause:()=>jN,isHoistedFunction:()=>mf,isHoistedVariableStatement:()=>hf,isIdentifier:()=>qD,isIdentifierANonContextualKeyword:()=>jh,isIdentifierName:()=>mh,isIdentifierOrThisTypeNode:()=>RA,isIdentifierPart:()=>ks,isIdentifierStart:()=>Ss,isIdentifierText:()=>Ts,isIdentifierTypePredicate:()=>Vf,isIdentifierTypeReference:()=>DT,isIfStatement:()=>FP,isIgnoredFileFromWildCardWatching:()=>fq,isImplicitGlob:()=>vk,isImportAttribute:()=>uN,isImportAttributeName:()=>Gl,isImportAttributes:()=>lN,isImportCall:()=>uf,isImportClause:()=>oN,isImportDeclaration:()=>iN,isImportEqualsDeclaration:()=>rN,isImportKeyword:()=>nE,isImportMeta:()=>_f,isImportOrExportSpecifier:()=>Vl,isImportOrExportSpecifierName:()=>kY,isImportSpecifier:()=>fN,isImportTypeAssertionContainer:()=>aN,isImportTypeNode:()=>zE,isImportableFile:()=>t0,isInComment:()=>qX,isInCompoundLikeAssignment:()=>th,isInExpressionContext:()=>Cm,isInJSDoc:()=>Rm,isInJSFile:()=>Mm,isInJSXText:()=>LX,isInJsonFile:()=>Lm,isInNonReferenceComment:()=>rQ,isInReferenceComment:()=>nQ,isInRightSideOfInternalImportEqualsDeclaration:()=>vG,isInString:()=>AX,isInTemplateString:()=>MX,isInTopLevelContext:()=>om,isInTypeQuery:()=>vv,isIncrementalCompilation:()=>RS,isIndexSignatureDeclaration:()=>vE,isIndexedAccessTypeNode:()=>RE,isInferTypeNode:()=>OE,isInfinityOrNaNString:()=>qT,isInitializedProperty:()=>VJ,isInitializedVariable:()=>ux,isInsideJsxElement:()=>jX,isInsideJsxElementOrAttribute:()=>IX,isInsideNodeModules:()=>SZ,isInsideTemplateLiteral:()=>YX,isInstanceOfExpression:()=>Eb,isInstantiatedModule:()=>MB,isInterfaceDeclaration:()=>XP,isInternalDeclaration:()=>W_,isInternalModuleImportEqualsDeclaration:()=>Fm,isInternalName:()=>rA,isIntersectionTypeNode:()=>AE,isIntrinsicJsxName:()=>Jy,isIterationStatement:()=>Zu,isJSDoc:()=>oF,isJSDocAllType:()=>QN,isJSDocAugmentsTag:()=>cF,isJSDocAuthorTag:()=>lF,isJSDocCallbackTag:()=>_F,isJSDocClassTag:()=>uF,isJSDocCommentContainingNode:()=>N_,isJSDocConstructSignature:()=>Ng,isJSDocDeprecatedTag:()=>yF,isJSDocEnumTag:()=>bF,isJSDocFunctionType:()=>nF,isJSDocImplementsTag:()=>PF,isJSDocImportTag:()=>AF,isJSDocIndexSignature:()=>Bm,isJSDocLikeText:()=>fI,isJSDocLink:()=>HN,isJSDocLinkCode:()=>GN,isJSDocLinkLike:()=>q_,isJSDocLinkPlain:()=>XN,isJSDocMemberName:()=>WN,isJSDocNameReference:()=>KN,isJSDocNamepathType:()=>iF,isJSDocNamespaceBody:()=>u_,isJSDocNode:()=>P_,isJSDocNonNullableType:()=>eF,isJSDocNullableType:()=>ZN,isJSDocOptionalParameter:()=>rC,isJSDocOptionalType:()=>tF,isJSDocOverloadTag:()=>hF,isJSDocOverrideTag:()=>gF,isJSDocParameterTag:()=>xF,isJSDocPrivateTag:()=>pF,isJSDocPropertyLikeTag:()=>Al,isJSDocPropertyTag:()=>EF,isJSDocProtectedTag:()=>fF,isJSDocPublicTag:()=>dF,isJSDocReadonlyTag:()=>mF,isJSDocReturnTag:()=>SF,isJSDocSatisfiesExpression:()=>aC,isJSDocSatisfiesTag:()=>NF,isJSDocSeeTag:()=>vF,isJSDocSignature:()=>sF,isJSDocTag:()=>F_,isJSDocTemplateTag:()=>CF,isJSDocThisTag:()=>kF,isJSDocThrowsTag:()=>FF,isJSDocTypeAlias:()=>Fg,isJSDocTypeAssertion:()=>_A,isJSDocTypeExpression:()=>UN,isJSDocTypeLiteral:()=>aF,isJSDocTypeTag:()=>TF,isJSDocTypedefTag:()=>wF,isJSDocUnknownTag:()=>DF,isJSDocUnknownType:()=>YN,isJSDocVariadicType:()=>rF,isJSXTagName:()=>km,isJsonEqual:()=>bT,isJsonSourceFile:()=>ef,isJsxAttribute:()=>NN,isJsxAttributeLike:()=>C_,isJsxAttributeName:()=>_C,isJsxAttributes:()=>FN,isJsxChild:()=>T_,isJsxClosingElement:()=>wN,isJsxClosingFragment:()=>PN,isJsxElement:()=>kN,isJsxExpression:()=>IN,isJsxFragment:()=>DN,isJsxNamespacedName:()=>ON,isJsxOpeningElement:()=>CN,isJsxOpeningFragment:()=>EN,isJsxOpeningLikeElement:()=>D_,isJsxOpeningLikeElementTagName:()=>CG,isJsxSelfClosingElement:()=>TN,isJsxSpreadAttribute:()=>AN,isJsxTagNameExpression:()=>k_,isJsxText:()=>DD,isJumpStatementTarget:()=>OG,isKeyword:()=>Ph,isKeywordOrPunctuation:()=>Fh,isKnownSymbol:()=>Yh,isLabelName:()=>LG,isLabelOfLabeledStatement:()=>MG,isLabeledStatement:()=>$P,isLateVisibilityPaintedStatement:()=>wp,isLeftHandSideExpression:()=>Vu,isLeftHandSideOfAssignment:()=>gb,isLet:()=>cf,isLineBreak:()=>Za,isLiteralComputedPropertyDeclarationName:()=>fh,isLiteralExpression:()=>Bl,isLiteralExpressionOfObject:()=>Jl,isLiteralImportTypeNode:()=>df,isLiteralKind:()=>Rl,isLiteralLikeAccess:()=>cg,isLiteralLikeElementAccess:()=>lg,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>qG,isLiteralTypeLikeExpression:()=>$A,isLiteralTypeLiteral:()=>Gu,isLiteralTypeNode:()=>JE,isLocalName:()=>iA,isLogicalOperator:()=>sb,isLogicalOrCoalescingAssignmentExpression:()=>lb,isLogicalOrCoalescingAssignmentOperator:()=>cb,isLogicalOrCoalescingBinaryExpression:()=>_b,isLogicalOrCoalescingBinaryOperator:()=>ub,isMappedTypeNode:()=>BE,isMemberName:()=>hl,isMetaProperty:()=>xP,isMethodDeclaration:()=>dE,isMethodOrAccessor:()=>bu,isMethodSignature:()=>_E,isMinusToken:()=>LD,isMissingDeclaration:()=>vN,isMissingPackageJsonInfo:()=>sj,isModifier:()=>iu,isModifierKind:()=>tu,isModifierLike:()=>Su,isModuleAugmentationExternal:()=>mp,isModuleBlock:()=>eN,isModuleBody:()=>c_,isModuleDeclaration:()=>ZP,isModuleExportsAccessExpression:()=>og,isModuleIdentifier:()=>ig,isModuleName:()=>zA,isModuleOrEnumDeclaration:()=>d_,isModuleReference:()=>S_,isModuleSpecifierLike:()=>LQ,isModuleWithStringLiteralName:()=>cp,isNameOfFunctionDeclaration:()=>$G,isNameOfModuleDeclaration:()=>zG,isNamedClassElement:()=>xu,isNamedDeclaration:()=>Dc,isNamedEvaluation:()=>iy,isNamedEvaluationSource:()=>ry,isNamedExportBindings:()=>Fl,isNamedExports:()=>hN,isNamedImportBindings:()=>__,isNamedImports:()=>pN,isNamedImportsOrExports:()=>Lx,isNamedTupleMember:()=>EE,isNamespaceBody:()=>l_,isNamespaceExport:()=>dN,isNamespaceExportDeclaration:()=>nN,isNamespaceImport:()=>_N,isNamespaceReexportDeclaration:()=>Dm,isNewExpression:()=>YE,isNewExpressionTarget:()=>xG,isNoSubstitutionTemplateLiteral:()=>PD,isNode:()=>Il,isNodeArray:()=>jl,isNodeArrayMultiLine:()=>rx,isNodeDescendantOf:()=>_h,isNodeKind:()=>Ol,isNodeLikeSystem:()=>bn,isNodeModulesDirectory:()=>ha,isNodeWithPossibleHoistedDeclaration:()=>nh,isNonContextualKeyword:()=>Ih,isNonExportDefaultModifier:()=>GA,isNonGlobalAmbientModule:()=>lp,isNonGlobalDeclaration:()=>JZ,isNonNullAccess:()=>oC,isNonNullChain:()=>Pl,isNonNullExpression:()=>bP,isNonStaticMethodOrAccessorWithPrivateName:()=>UJ,isNotEmittedOrPartiallyEmittedNode:()=>Yu,isNotEmittedStatement:()=>bN,isNullishCoalesce:()=>wl,isNumber:()=>ct,isNumericLiteral:()=>TD,isNumericLiteralName:()=>WT,isObjectBindingElementWithoutPropertyName:()=>jQ,isObjectBindingOrAssignmentElement:()=>Mu,isObjectBindingOrAssignmentPattern:()=>Ou,isObjectBindingPattern:()=>VE,isObjectLiteralElement:()=>R_,isObjectLiteralElementLike:()=>Cu,isObjectLiteralExpression:()=>HE,isObjectLiteralMethod:()=>$f,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>qf,isObjectTypeDeclaration:()=>Ax,isOctalDigit:()=>is,isOmittedExpression:()=>gP,isOptionalChain:()=>Sl,isOptionalChainRoot:()=>kl,isOptionalDeclaration:()=>iC,isOptionalJSDocPropertyLikeTag:()=>eC,isOptionalTypeNode:()=>PE,isOuterExpression:()=>pA,isOutermostOptionalChain:()=>Cl,isOverrideModifier:()=>ZD,isPackageJsonInfo:()=>aj,isPackedArrayLiteral:()=>RT,isParameter:()=>sE,isParameterPropertyDeclaration:()=>rc,isParameterPropertyModifier:()=>nu,isParenthesizedExpression:()=>tP,isParenthesizedTypeNode:()=>ME,isParseTreeNode:()=>gc,isPartOfParameterDeclaration:()=>ay,isPartOfTypeNode:()=>wf,isPartOfTypeQuery:()=>wm,isPartiallyEmittedExpression:()=>kP,isPatternMatch:()=>ln,isPinnedComment:()=>$d,isPlainJsFile:()=>Td,isPlusToken:()=>MD,isPossiblyTypeArgumentPosition:()=>JX,isPostfixUnaryExpression:()=>lP,isPrefixUnaryExpression:()=>cP,isPrimitiveLiteralValue:()=>DC,isPrivateIdentifier:()=>VD,isPrivateIdentifierClassElementDeclaration:()=>Zl,isPrivateIdentifierPropertyAccessExpression:()=>eu,isPrivateIdentifierSymbol:()=>Zh,isProgramBundleEmitBuildInfo:()=>HV,isProgramUptoDate:()=>_V,isPrologueDirective:()=>pf,isPropertyAccessChain:()=>vl,isPropertyAccessEntityNameExpression:()=>Sb,isPropertyAccessExpression:()=>GE,isPropertyAccessOrQualifiedName:()=>Bu,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>Ru,isPropertyAssignment:()=>BN,isPropertyDeclaration:()=>uE,isPropertyName:()=>au,isPropertyNameLiteral:()=>Wh,isPropertySignature:()=>lE,isProtoSetter:()=>ty,isPrototypeAccess:()=>Tb,isPrototypePropertyAssignment:()=>yg,isPunctuation:()=>Nh,isPushOrUnshiftIdentifier:()=>oy,isQualifiedName:()=>iE,isQuestionDotToken:()=>zD,isQuestionOrExclamationToken:()=>jA,isQuestionOrPlusOrMinusToken:()=>JA,isQuestionToken:()=>BD,isRawSourceMap:()=>lJ,isReadonlyKeyword:()=>XD,isReadonlyKeywordOrPlusOrMinusToken:()=>BA,isRecognizedTripleSlashComment:()=>zd,isReferenceFileLocation:()=>lV,isReferencedFile:()=>cV,isRegularExpressionLiteral:()=>ED,isRequireCall:()=>Jm,isRequireVariableStatement:()=>Um,isRestParameter:()=>U_,isRestTypeNode:()=>NE,isReturnStatement:()=>BP,isReturnStatementWithFixablePromiseHandler:()=>h1,isRightSideOfAccessExpression:()=>wb,isRightSideOfInstanceofExpression:()=>Pb,isRightSideOfPropertyAccess:()=>BG,isRightSideOfQualifiedName:()=>RG,isRightSideOfQualifiedNameOrPropertyAccess:()=>Cb,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>Db,isRootedDiskPath:()=>wo,isSameEntityName:()=>tg,isSatisfiesExpression:()=>vP,isScopeMarker:()=>e_,isSemicolonClassElement:()=>wP,isSetAccessor:()=>A_,isSetAccessorDeclaration:()=>gE,isShebangTrivia:()=>_s,isShiftOperatorOrHigher:()=>qA,isShorthandAmbientModuleSymbol:()=>_p,isShorthandPropertyAssignment:()=>JN,isSignedNumericLiteral:()=>qh,isSimpleCopiableExpression:()=>OJ,isSimpleInlineableExpression:()=>MJ,isSimpleParameter:()=>tz,isSimpleParameterList:()=>nz,isSingleOrDoubleQuote:()=>Km,isSourceFile:()=>qN,isSourceFileFromLibrary:()=>WZ,isSourceFileJS:()=>Im,isSourceFileNotJS:()=>Om,isSourceFileNotJson:()=>jm,isSourceMapping:()=>pJ,isSpecialPropertyDeclaration:()=>vg,isSpreadAssignment:()=>zN,isSpreadElement:()=>fP,isStatement:()=>b_,isStatementButNotDeclaration:()=>v_,isStatementOrBlock:()=>x_,isStatementWithLocals:()=>Cd,isStatic:()=>Jv,isStaticModifier:()=>QD,isString:()=>st,isStringAKeyword:()=>Lh,isStringANonContextualKeyword:()=>Mh,isStringAndEmptyAnonymousObjectIntersection:()=>QX,isStringDoubleQuoted:()=>Wm,isStringLiteral:()=>wD,isStringLiteralLike:()=>$_,isStringLiteralOrJsxExpression:()=>w_,isStringLiteralOrTemplate:()=>YY,isStringOrNumericLiteralLike:()=>$h,isStringOrRegularExpressionOrTemplateLiteral:()=>GX,isStringTextContainingNode:()=>Hl,isSuperCall:()=>lf,isSuperKeyword:()=>tE,isSuperOrSuperProperty:()=>lm,isSuperProperty:()=>um,isSupportedSourceFileName:()=>Hk,isSwitchStatement:()=>zP,isSyntaxList:()=>IF,isSyntheticExpression:()=>SP,isSyntheticReference:()=>xN,isTagName:()=>jG,isTaggedTemplateExpression:()=>ZE,isTaggedTemplateTag:()=>kG,isTemplateExpression:()=>dP,isTemplateHead:()=>ND,isTemplateLiteral:()=>qu,isTemplateLiteralKind:()=>zl,isTemplateLiteralToken:()=>$l,isTemplateLiteralTypeNode:()=>qE,isTemplateLiteralTypeSpan:()=>$E,isTemplateMiddle:()=>FD,isTemplateMiddleOrTemplateTail:()=>ql,isTemplateSpan:()=>CP,isTemplateTail:()=>AD,isTextWhiteSpaceLike:()=>HQ,isThis:()=>WG,isThisContainerOrFunctionBlock:()=>im,isThisIdentifier:()=>yv,isThisInTypeQuery:()=>bv,isThisInitializedDeclaration:()=>dm,isThisInitializedObjectBindingExpression:()=>pm,isThisProperty:()=>_m,isThisTypeNode:()=>LE,isThisTypeParameter:()=>GT,isThisTypePredicate:()=>Uf,isThrowStatement:()=>qP,isToken:()=>Ll,isTokenKind:()=>Ml,isTraceEnabled:()=>jL,isTransientSymbol:()=>td,isTrivia:()=>Rh,isTryStatement:()=>VP,isTupleTypeNode:()=>DE,isTypeAlias:()=>Ag,isTypeAliasDeclaration:()=>QP,isTypeAssertionExpression:()=>eP,isTypeDeclaration:()=>YT,isTypeElement:()=>ku,isTypeKeyword:()=>fQ,isTypeKeywordToken:()=>mQ,isTypeKeywordTokenOrIdentifier:()=>gQ,isTypeLiteralNode:()=>CE,isTypeNode:()=>wu,isTypeNodeKind:()=>Ix,isTypeOfExpression:()=>oP,isTypeOnlyExportDeclaration:()=>Kl,isTypeOnlyImportDeclaration:()=>Ul,isTypeOnlyImportOrExportDeclaration:()=>Wl,isTypeOperatorNode:()=>jE,isTypeParameterDeclaration:()=>aE,isTypePredicateNode:()=>bE,isTypeQueryNode:()=>TE,isTypeReferenceNode:()=>xE,isTypeReferenceType:()=>B_,isTypeUsableAsPropertyName:()=>mC,isUMDExportSymbol:()=>Ex,isUnaryExpression:()=>Ku,isUnaryExpressionWithWrite:()=>Hu,isUnicodeIdentifierStart:()=>Ma,isUnionTypeNode:()=>FE,isUrl:()=>Co,isValidBigIntString:()=>CT,isValidESSymbolDeclaration:()=>Rf,isValidTypeOnlyAliasUseSite:()=>wT,isValueSignatureDeclaration:()=>rh,isVarAwaitUsing:()=>rf,isVarConst:()=>af,isVarConstLike:()=>sf,isVarUsing:()=>of,isVariableDeclaration:()=>KP,isVariableDeclarationInVariableStatement:()=>Mf,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>$m,isVariableDeclarationInitializedToRequire:()=>zm,isVariableDeclarationList:()=>WP,isVariableLike:()=>If,isVariableLikeOrAccessor:()=>Of,isVariableStatement:()=>EP,isVoidExpression:()=>aP,isWatchSet:()=>_x,isWhileStatement:()=>IP,isWhiteSpaceLike:()=>Qa,isWhiteSpaceSingleLine:()=>Ya,isWithStatement:()=>JP,isWriteAccess:()=>yx,isWriteOnlyAccess:()=>hx,isYieldExpression:()=>pP,jsxModeNeedsExplicitImport:()=>KZ,keywordPart:()=>rY,last:()=>De,lastOrUndefined:()=>we,length:()=>p,libMap:()=>fO,libs:()=>pO,lineBreakPart:()=>hY,linkNamePart:()=>pY,linkPart:()=>fY,linkTextPart:()=>dY,listFiles:()=>zU,loadModuleFromGlobalCache:()=>SR,loadWithModeAwareCache:()=>eV,makeIdentifierFromModuleName:()=>ip,makeImport:()=>EQ,makeStringLiteral:()=>PQ,mangleScopedPackageName:()=>mR,map:()=>O,mapAllOrFail:()=>$,mapDefined:()=>q,mapDefinedEntries:()=>U,mapDefinedIterator:()=>V,mapEntries:()=>X,mapIterator:()=>M,mapOneOrMany:()=>EZ,mapToDisplayParts:()=>yY,matchFiles:()=>Ck,matchPatternOrExact:()=>dT,matchedText:()=>rn,matchesExclude:()=>TL,maybeBind:()=>Ze,maybeSetLocalizedDiagnosticMessages:()=>eS,memoize:()=>bt,memoizeCached:()=>kt,memoizeOne:()=>xt,memoizeWeak:()=>St,metadataHelper:()=>Kw,min:()=>At,minAndMax:()=>mT,missingFileModifiedTime:()=>Yi,modifierToFlag:()=>ob,modifiersToFlags:()=>ib,moduleOptionDeclaration:()=>yO,moduleResolutionIsEqualTo:()=>md,moduleResolutionNameAndModeGetter:()=>Gq,moduleResolutionOptionDeclarations:()=>TO,moduleResolutionSupportsPackageJsonExportsAndImports:()=>KS,moduleResolutionUsesNodeModules:()=>DQ,moduleSpecifierToValidIdentifier:()=>LZ,moduleSpecifiers:()=>JR,moduleSymbolToValidIdentifier:()=>MZ,moveEmitHelpers:()=>Pw,moveRangeEnd:()=>Vb,moveRangePastDecorators:()=>Kb,moveRangePastModifiers:()=>Wb,moveRangePos:()=>Ub,moveSyntheticComments:()=>Sw,mutateMap:()=>kx,mutateMapSkippingNewValues:()=>Sx,needsParentheses:()=>HY,needsScopeMarker:()=>n_,newCaseClauseTracker:()=>HZ,newPrivateEnvironment:()=>QJ,noEmitNotification:()=>k$,noEmitSubstitution:()=>S$,noTransformers:()=>m$,noTruncationMaximumTruncationLength:()=>Q_,nodeCanBeDecorated:()=>gm,nodeHasName:()=>Cc,nodeIsDecorated:()=>hm,nodeIsMissing:()=>Nd,nodeIsPresent:()=>Fd,nodeIsSynthesized:()=>ly,nodeModuleNameResolver:()=>Dj,nodeModulesPathPart:()=>Ij,nodeNextJsonConfigResolver:()=>Ej,nodeOrChildIsDecorated:()=>ym,nodeOverlapsWithStartEnd:()=>rX,nodePosToString:()=>Dd,nodeSeenTracker:()=>hQ,nodeStartsNewLexicalEnvironment:()=>cy,nodeToDisplayParts:()=>SY,noop:()=>_t,noopFileWatcher:()=>XU,normalizePath:()=>Xo,normalizeSlashes:()=>Vo,not:()=>dn,notImplemented:()=>vt,notImplementedResolver:()=>Y$,nullNodeConverters:()=>MC,nullParenthesizerRules:()=>AC,nullTransformationContext:()=>C$,objectAllocator:()=>Hx,operatorPart:()=>oY,optionDeclarations:()=>bO,optionMapToObject:()=>EM,optionsAffectingProgramStructure:()=>wO,optionsForBuild:()=>FO,optionsForWatch:()=>mO,optionsHaveChanges:()=>sd,optionsHaveModuleResolutionChanges:()=>od,or:()=>_n,orderedRemoveItem:()=>Qt,orderedRemoveItemAt:()=>Yt,packageIdToPackageName:()=>hd,packageIdToString:()=>yd,paramHelper:()=>Ww,parameterIsThisKeyword:()=>hv,parameterNamePart:()=>aY,parseBaseNodeFactory:()=>uI,parseBigInt:()=>kT,parseBuildCommand:()=>ZO,parseCommandLine:()=>HO,parseCommandLineWorker:()=>VO,parseConfigFileTextToJson:()=>rM,parseConfigFileWithSystem:()=>OU,parseConfigHostFromCompilerHostLike:()=>bV,parseCustomTypeOption:()=>JO,parseIsolatedEntityName:()=>zI,parseIsolatedJSDocComment:()=>UI,parseJSDocTypeExpressionForTests:()=>KI,parseJsonConfigFileContent:()=>BM,parseJsonSourceFileConfigFileContent:()=>JM,parseJsonText:()=>$I,parseListTypeOption:()=>zO,parseNodeFactory:()=>_I,parseNodeModuleFromPath:()=>Mj,parsePackageName:()=>eR,parsePseudoBigInt:()=>xT,parseValidBigInt:()=>TT,pasteEdits:()=>Ppe,patchWriteFileEnsuringDirectory:()=>yo,pathContainsNodeModules:()=>Oj,pathIsAbsolute:()=>Eo,pathIsBareSpecifier:()=>No,pathIsRelative:()=>Po,patternText:()=>nn,perfLogger:()=>tr,performIncrementalCompilation:()=>lK,performance:()=>nr,plainJSErrors:()=>mV,positionBelongsToNode:()=>oX,positionIsASICandidate:()=>cZ,positionIsSynthesized:()=>iT,positionsAreOnSameLine:()=>ix,preProcessFile:()=>s1,probablyUsesSemicolons:()=>lZ,processCommentPragmas:()=>ZI,processPragmasIntoFields:()=>eO,processTaggedTemplateExpression:()=>Dz,programContainsEsModules:()=>kQ,programContainsModules:()=>SQ,projectReferenceIsEqualTo:()=>fd,propKeyHelper:()=>sD,propertyNamePart:()=>sY,pseudoBigIntToString:()=>ST,punctuationPart:()=>iY,pushIfUnique:()=>fe,quote:()=>XY,quotePreferenceFromString:()=>FQ,rangeContainsPosition:()=>YG,rangeContainsPositionExclusive:()=>ZG,rangeContainsRange:()=>XG,rangeContainsRangeExclusive:()=>QG,rangeContainsStartEnd:()=>tX,rangeEndIsOnSameLineAsRangeStart:()=>ex,rangeEndPositionsAreOnSameLine:()=>Yb,rangeEquals:()=>be,rangeIsOnSingleLine:()=>Xb,rangeOfNode:()=>gT,rangeOfTypeParameters:()=>hT,rangeOverlapsWithStartEnd:()=>nX,rangeStartIsOnSameLineAsRangeEnd:()=>Zb,rangeStartPositionsAreOnSameLine:()=>Qb,readBuilderProgram:()=>uK,readConfigFile:()=>nM,readHelper:()=>oD,readJson:()=>Bb,readJsonConfigFile:()=>iM,readJsonOrUndefined:()=>Rb,reduceEachLeadingCommentRange:()=>gs,reduceEachTrailingCommentRange:()=>hs,reduceLeft:()=>Oe,reduceLeftIterator:()=>y,reducePathComponents:()=>Uo,refactor:()=>B2,regExpEscape:()=>ck,regularExpressionFlagToCharacter:()=>za,relativeComplement:()=>le,removeAllComments:()=>rw,removeEmitHelper:()=>Dw,removeExtension:()=>eT,removeFileExtension:()=>Yk,removeIgnoredPath:()=>_U,removeMinAndVersionNumbers:()=>Xt,removeOptionality:()=>BX,removePrefix:()=>sn,removeSuffix:()=>Ht,removeTrailingDirectorySeparator:()=>Zo,repeatString:()=>vQ,replaceElement:()=>Fe,replaceFirstStar:()=>bC,resolutionExtensionIsTSOrJson:()=>aT,resolveConfigFileProjectName:()=>gK,resolveJSModule:()=>Tj,resolveLibrary:()=>bj,resolveModuleName:()=>Sj,resolveModuleNameFromCache:()=>xj,resolvePackageNameToPackageJson:()=>ij,resolvePath:()=>Wo,resolveProjectReferencePath:()=>xV,resolveTripleslashReference:()=>xq,resolveTypeReferenceDirective:()=>tj,resolvingEmptyArray:()=>H_,restHelper:()=>tD,returnFalse:()=>dt,returnNoopFileWatcher:()=>QU,returnTrue:()=>pt,returnUndefined:()=>ft,returnsPromise:()=>g1,runInitializersHelper:()=>Gw,sameFlatMap:()=>z,sameMap:()=>L,sameMapping:()=>dJ,scanShebangTrivia:()=>ds,scanTokenAtPosition:()=>Xp,scanner:()=>mG,screenStartingMessageCodes:()=>FU,semanticDiagnosticsOptionDeclarations:()=>xO,serializeCompilerOptions:()=>AM,server:()=>jpe,servicesVersion:()=>s7,setCommentRange:()=>mw,setConfigFileInOptions:()=>zM,setConstantValue:()=>Tw,setEachParent:()=>MT,setEmitFlags:()=>iw,setFunctionNameHelper:()=>cD,setGetSourceFileAsHashVersioned:()=>rK,setIdentifierAutoGenerate:()=>jw,setIdentifierGeneratedImportReference:()=>Bw,setIdentifierTypeArguments:()=>Mw,setInternalEmitFlags:()=>aw,setLocalizedDiagnosticMessages:()=>Zx,setModuleDefaultHelper:()=>dD,setNodeChildren:()=>$F,setNodeFlags:()=>IT,setObjectAllocator:()=>Qx,setOriginalNode:()=>ew,setParent:()=>OT,setParentRecursive:()=>LT,setPrivateIdentifier:()=>ZJ,setSnippetElement:()=>Fw,setSourceMapRange:()=>lw,setStackTraceLimit:()=>Gi,setStartsOnNewLine:()=>pw,setSyntheticLeadingComments:()=>hw,setSyntheticTrailingComments:()=>bw,setSys:()=>bo,setSysLog:()=>_o,setTextRange:()=>sI,setTextRangeEnd:()=>NT,setTextRangePos:()=>PT,setTextRangePosEnd:()=>FT,setTextRangePosWidth:()=>AT,setTokenSourceMapRange:()=>_w,setTypeNode:()=>Iw,setUILocale:()=>zt,setValueDeclaration:()=>bg,shouldAllowImportingTsExtension:()=>xR,shouldPreserveConstEnums:()=>jS,shouldUseUriStyleNodeCoreModules:()=>$Z,showModuleSpecifier:()=>Px,signatureHasLiteralTypes:()=>zB,signatureHasRestParameter:()=>JB,signatureToDisplayParts:()=>xY,single:()=>Pe,singleElementArray:()=>fn,singleIterator:()=>H,singleOrMany:()=>Ne,singleOrUndefined:()=>Ee,skipAlias:()=>mx,skipAssertions:()=>gA,skipConstraint:()=>bQ,skipOuterExpressions:()=>fA,skipParentheses:()=>lh,skipPartiallyEmittedExpressions:()=>El,skipTrivia:()=>as,skipTypeChecking:()=>yT,skipTypeParentheses:()=>ch,skipWhile:()=>vn,sliceAfter:()=>pT,some:()=>Q,sort:()=>he,sortAndDeduplicate:()=>oe,sortAndDeduplicateDiagnostics:()=>Ms,sourceFileAffectingCompilerOptions:()=>CO,sourceFileMayBeEmitted:()=>ov,sourceMapCommentRegExp:()=>iJ,sourceMapCommentRegExpDontCareLineStart:()=>rJ,spacePart:()=>nY,spanMap:()=>G,spreadArrayHelper:()=>aD,stableSort:()=>ve,startEndContainsRange:()=>eX,startEndOverlapsWithStartEnd:()=>iX,startOnNewLine:()=>hA,startTracing:()=>Tr,startsWith:()=>an,startsWithDirectory:()=>ua,startsWithUnderscore:()=>RZ,startsWithUseStrict:()=>cA,stringContainsAt:()=>jZ,stringToToken:()=>Ba,stripQuotes:()=>By,supportedDeclarationExtensions:()=>Rk,supportedJSExtensions:()=>Ok,supportedJSExtensionsFlat:()=>Mk,supportedLocaleDirectories:()=>dc,supportedTSExtensions:()=>Nk,supportedTSExtensionsFlat:()=>Fk,supportedTSImplementationExtensions:()=>Bk,suppressLeadingAndTrailingTrivia:()=>MY,suppressLeadingTrivia:()=>LY,suppressTrailingTrivia:()=>jY,symbolEscapedNameNoDefault:()=>MQ,symbolName:()=>Sc,symbolNameNoDefault:()=>OQ,symbolPart:()=>eY,symbolToDisplayParts:()=>bY,syntaxMayBeASICandidate:()=>sZ,syntaxRequiresTrailingSemicolonOrASI:()=>aZ,sys:()=>vo,sysLog:()=>uo,tagNamesAreEquivalent:()=>sO,takeWhile:()=>yn,targetOptionDeclaration:()=>hO,templateObjectHelper:()=>iD,testFormatSettings:()=>iG,textChangeRangeIsUnchanged:()=>Ys,textChangeRangeNewSpan:()=>Qs,textChanges:()=>r_e,textOrKeywordPart:()=>cY,textPart:()=>lY,textRangeContainsPositionInclusive:()=>Js,textSpanContainsPosition:()=>Bs,textSpanContainsTextSpan:()=>zs,textSpanEnd:()=>js,textSpanIntersection:()=>Hs,textSpanIntersectsWith:()=>Us,textSpanIntersectsWithPosition:()=>Ws,textSpanIntersectsWithTextSpan:()=>Vs,textSpanIsEmpty:()=>Rs,textSpanOverlap:()=>qs,textSpanOverlapsWith:()=>$s,textSpansEqual:()=>VQ,textToKeywordObj:()=>Sa,timestamp:()=>Yn,toArray:()=>at,toBuilderFileEmit:()=>rU,toBuilderStateFileInfoForMultiEmit:()=>nU,toEditorSettings:()=>b7,toFileNameLowerCase:()=>yt,toLowerCase:()=>gt,toPath:()=>Yo,toProgramEmitPending:()=>iU,tokenIsIdentifierOrKeyword:()=>ba,tokenIsIdentifierOrKeywordOrGreaterThan:()=>xa,tokenToString:()=>Ra,trace:()=>LL,tracing:()=>or,tracingEnabled:()=>ar,transform:()=>j7,transformClassFields:()=>Fz,transformDeclarations:()=>_$,transformECMAScriptModule:()=>r$,transformES2015:()=>Yz,transformES2016:()=>Xz,transformES2017:()=>Lz,transformES2018:()=>Rz,transformES2019:()=>Bz,transformES2020:()=>Jz,transformES2021:()=>zz,transformESDecorators:()=>Mz,transformESNext:()=>$z,transformGenerators:()=>Zz,transformJsx:()=>Hz,transformLegacyDecorators:()=>Oz,transformModule:()=>e$,transformNamedEvaluation:()=>Cz,transformNodeModule:()=>i$,transformNodes:()=>T$,transformSystemModule:()=>n$,transformTypeScript:()=>Nz,transpile:()=>F1,transpileDeclaration:()=>w1,transpileModule:()=>C1,transpileOptionValueCompilerOptions:()=>DO,tryAddToSet:()=>W,tryAndIgnoreErrors:()=>fZ,tryCast:()=>lt,tryDirectoryExists:()=>pZ,tryExtractTSExtension:()=>Ib,tryFileExists:()=>dZ,tryGetClassExtendingExpressionWithTypeArguments:()=>pb,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>fb,tryGetDirectories:()=>uZ,tryGetExtensionFromPath:()=>lT,tryGetImportFromModuleSpecifier:()=>Tg,tryGetJSDocSatisfiesTypeNode:()=>cC,tryGetModuleNameFromFile:()=>TA,tryGetModuleSpecifierFromDeclaration:()=>Sg,tryGetNativePerformanceHooks:()=>Xn,tryGetPropertyAccessOrIdentifierToString:()=>kb,tryGetPropertyNameOfBindingOrAssignmentElement:()=>PA,tryGetSourceMappingURL:()=>sJ,tryGetTextOfPropertyName:()=>Mp,tryIOAndConsumeErrors:()=>mZ,tryParseJson:()=>Jb,tryParsePattern:()=>nT,tryParsePatterns:()=>rT,tryParseRawSourceMap:()=>uJ,tryReadDirectory:()=>_Z,tryReadFile:()=>oM,tryRemoveDirectoryPrefix:()=>ak,tryRemoveExtension:()=>Zk,tryRemovePrefix:()=>cn,tryRemoveSuffix:()=>Gt,typeAcquisitionDeclarations:()=>IO,typeAliasNamePart:()=>uY,typeDirectiveIsEqualTo:()=>vd,typeKeywords:()=>pQ,typeParameterNamePart:()=>_Y,typeToDisplayParts:()=>vY,unchangedPollThresholds:()=>ro,unchangedTextChangeRange:()=>ec,unescapeLeadingUnderscores:()=>vc,unmangleScopedPackageName:()=>hR,unorderedRemoveItem:()=>en,unorderedRemoveItemAt:()=>Zt,unreachableCodeIsError:()=>VS,unsetNodeChildren:()=>qF,unusedLabelIsError:()=>US,unwrapInnermostStatementOfLabel:()=>Jf,unwrapParenthesizedExpression:()=>EC,updateErrorForNoInputFiles:()=>nL,updateLanguageServiceSourceFile:()=>D7,updateMissingFilePathsWatch:()=>dq,updateResolutionField:()=>KL,updateSharedExtendedConfigFileWatcher:()=>lq,updateSourceFile:()=>VI,updateWatchingWildcardDirectories:()=>pq,usesExtensionsOnImports:()=>Kk,usingSingleLineStringWriter:()=>dd,utf16EncodeAsString:()=>Ps,validateLocaleAndSetLanguage:()=>pc,valuesHelper:()=>lD,version:()=>c,versionMajorMinor:()=>s,visitArray:()=>UB,visitCommaListElements:()=>YB,visitEachChild:()=>ZB,visitFunctionBody:()=>XB,visitIterationBody:()=>QB,visitLexicalEnvironment:()=>WB,visitNode:()=>qB,visitNodes:()=>VB,visitParameterList:()=>HB,walkUpBindingElementsAndPatterns:()=>ac,walkUpLexicalEnvironments:()=>XJ,walkUpOuterExpressions:()=>mA,walkUpParenthesizedExpressions:()=>ah,walkUpParenthesizedTypes:()=>oh,walkUpParenthesizedTypesAndGetParentAndChild:()=>sh,whitespaceOrMapCommentRegExp:()=>oJ,writeCommentRange:()=>Iv,writeFile:()=>cv,writeFileEnsuringDirectories:()=>uv,zipWith:()=>v});var jpe={};o(jpe,{ActionInvalidate:()=>yH,ActionPackageInstalled:()=>vH,ActionSet:()=>hH,ActionWatchTypingLocations:()=>TH,Arguments:()=>mH,AutoImportProviderProject:()=>jfe,AuxiliaryProject:()=>Mfe,CharRangeSection:()=>vge,CloseFileWatcherEvent:()=>rme,CommandNames:()=>Qme,ConfigFileDiagEvent:()=>Qfe,ConfiguredProject:()=>Rfe,ConfiguredProjectLoadKind:()=>kme,CreateDirectoryWatcherEvent:()=>nme,CreateFileWatcherEvent:()=>tme,Errors:()=>Upe,EventBeginInstallTypes:()=>xH,EventEndInstallTypes:()=>SH,EventInitializationFailed:()=>kH,EventTypesRegistry:()=>bH,ExternalProject:()=>Bfe,GcTimer:()=>sfe,InferredProject:()=>Ofe,LargeFileReferencedEvent:()=>Xfe,LineIndex:()=>kge,LineLeaf:()=>Cge,LineNode:()=>Tge,LogLevel:()=>Wpe,Msg:()=>Gpe,OpenFileInfoTelemetryEvent:()=>eme,Project:()=>Ife,ProjectInfoTelemetryEvent:()=>Zfe,ProjectKind:()=>Dfe,ProjectLanguageServiceStateEvent:()=>Yfe,ProjectLoadingFinishEvent:()=>Gfe,ProjectLoadingStartEvent:()=>Hfe,ProjectService:()=>Jme,ProjectsUpdatedInBackgroundEvent:()=>Wfe,ScriptInfo:()=>kfe,ScriptVersionCache:()=>xge,Session:()=>dge,TextStorage:()=>xfe,ThrottledOperations:()=>afe,TypingsCache:()=>wfe,TypingsInstallerAdapter:()=>Dge,allFilesAreJsOrDts:()=>Nfe,allRootFilesAreJsOrDts:()=>Pfe,asNormalizedPath:()=>Zpe,convertCompilerOptions:()=>_me,convertFormatOptions:()=>ume,convertScriptKindName:()=>mme,convertTypeAcquisition:()=>pme,convertUserPreferences:()=>gme,convertWatchOptions:()=>dme,countEachFileTypes:()=>Efe,createInstallTypingsRequest:()=>Xpe,createModuleSpecifierCache:()=>qme,createNormalizedPathMap:()=>efe,createPackageJsonCache:()=>Vme,createSortedArray:()=>ofe,emptyArray:()=>Hpe,findArgument:()=>wH,forEachResolvedProjectReferenceProject:()=>Tme,formatDiagnosticToProtocol:()=>Xme,formatMessage:()=>Yme,getBaseConfigFileName:()=>cfe,getLocationInNewDocument:()=>gge,hasArgument:()=>CH,hasNoTypeScriptSource:()=>Ffe,indent:()=>PH,isBackgroundProject:()=>qfe,isConfigFile:()=>zme,isConfiguredProject:()=>zfe,isDynamicFileName:()=>Sfe,isExternalProject:()=>$fe,isInferredProject:()=>Jfe,isInferredProjectName:()=>tfe,isProjectDeferredClose:()=>Vfe,makeAutoImportProviderProjectName:()=>rfe,makeAuxiliaryProjectName:()=>ife,makeInferredProjectName:()=>nfe,maxFileSize:()=>Kfe,maxProgramSizeForNonTsFiles:()=>Ufe,normalizedPathToPath:()=>Ype,nowString:()=>DH,nullCancellationToken:()=>Ume,nullTypingsInstaller:()=>Tfe,protocol:()=>ufe,removeSorted:()=>lfe,stringifyIndented:()=>NH,toEvent:()=>Zme,toNormalizedPath:()=>Qpe,tryConvertScriptKindName:()=>fme,typingsInstaller:()=>Rpe,updateProjectIfDirty:()=>Fme});var Rpe={};o(Rpe,{TypingsInstaller:()=>qpe,getNpmCommandForInstallation:()=>$pe,installNpmPackages:()=>zpe,typingsName:()=>Vpe});var Bpe={isEnabled:()=>!1,writeLine:_t};function Jpe(e,t,n,r){try{const r=Sj(t,Ko(e,"index.d.ts"),{moduleResolution:2},n);return r.resolvedModule&&r.resolvedModule.resolvedFileName}catch(n){return void(r.isEnabled()&&r.writeLine(`Failed to resolve ${t} in folder '${e}': ${n.message}`))}}function zpe(e,t,n,r){let i=!1;for(let o=n.length;o>0;){const a=$pe(e,t,n,o);o=a.remaining,i=r(a.command)||i}return i}function $pe(e,t,n,r){const i=n.length-r;let o,a=r;for(;o=`${e} install --ignore-scripts ${(a===n.length?n:n.slice(i,i+a)).join(" ")} --save-dev --user-agent="typesInstaller/${t}"`,!(o.length<8e3);)a-=Math.floor(a/2);return{command:o,remaining:r-a}}var qpe=class{constructor(e,t,n,r,i,o=Bpe){this.installTypingHost=e,this.globalCachePath=t,this.safeListPath=n,this.typesMapLocation=r,this.throttleLimit=i,this.log=o,this.packageNameToTypingLocation=new Map,this.missingTypingsSet=new Set,this.knownCachesSet=new Set,this.projectWatchers=new Map,this.pendingRunRequests=[],this.installRunCount=1,this.inFlightRequestCount=0,this.latestDistTag="latest",this.log.isEnabled()&&this.log.writeLine(`Global cache location '${t}', safe file path '${n}', types map path ${r}`),this.processCacheLocation(this.globalCachePath)}handleRequest(e){switch(e.kind){case"discover":this.install(e);break;case"closeProject":this.closeProject(e);break;case"typesRegistry":{const e={};this.typesRegistry.forEach(((t,n)=>{e[n]=t}));const t={kind:bH,typesRegistry:e};this.sendResponse(t);break}case"installPackage":this.installPackage(e);break;default:xn.assertNever(e)}}closeProject(e){this.closeWatchers(e.projectName)}closeWatchers(e){this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}'`),this.projectWatchers.get(e)?(this.projectWatchers.delete(e),this.sendResponse({kind:TH,projectName:e,files:[]}),this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}' - done.`)):this.log.isEnabled()&&this.log.writeLine(`No watchers are registered for project '${e}'`)}install(e){this.log.isEnabled()&&this.log.writeLine(`Got install request${NH(e)}`),e.cachePath&&(this.log.isEnabled()&&this.log.writeLine(`Request specifies cache path '${e.cachePath}', loading cached information...`),this.processCacheLocation(e.cachePath)),void 0===this.safeList&&this.initializeSafeList();const t=fH.discoverTypings(this.installTypingHost,this.log.isEnabled()?e=>this.log.writeLine(e):void 0,e.fileNames,e.projectRootPath,this.safeList,this.packageNameToTypingLocation,e.typeAcquisition,e.unresolvedImports,this.typesRegistry,e.compilerOptions);this.watchFiles(e.projectName,t.filesToWatch),t.newTypingNames.length?this.installTypings(e,e.cachePath||this.globalCachePath,t.cachedTypingPaths,t.newTypingNames):(this.sendResponse(this.createSetTypings(e,t.cachedTypingPaths)),this.log.isEnabled()&&this.log.writeLine("No new typings were requested as a result of typings discovery"))}installPackage(e){const{fileName:t,packageName:n,projectName:r,projectRootPath:i,id:o}=e,a=ga(Ro(t),(e=>{if(this.installTypingHost.fileExists(Ko(e,"package.json")))return e}))||i;if(a)this.installWorker(-1,[n],a,(e=>{const t={kind:vH,projectName:r,id:o,success:e,message:e?`Package ${n} installed.`:`There was an error installing ${n}.`};this.sendResponse(t)}));else{const e={kind:vH,projectName:r,id:o,success:!1,message:"Could not determine a project root path."};this.sendResponse(e)}}initializeSafeList(){if(this.typesMapLocation){const e=fH.loadTypesMap(this.installTypingHost,this.typesMapLocation);if(e)return this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`),void(this.safeList=e);this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`)}this.safeList=fH.loadSafeList(this.installTypingHost,this.safeListPath)}processCacheLocation(e){if(this.log.isEnabled()&&this.log.writeLine(`Processing cache location '${e}'`),this.knownCachesSet.has(e))return void(this.log.isEnabled()&&this.log.writeLine("Cache location was already processed..."));const t=Ko(e,"package.json"),n=Ko(e,"package-lock.json");if(this.log.isEnabled()&&this.log.writeLine(`Trying to find '${t}'...`),this.installTypingHost.fileExists(t)&&this.installTypingHost.fileExists(n)){const r=JSON.parse(this.installTypingHost.readFile(t)),i=JSON.parse(this.installTypingHost.readFile(n));if(this.log.isEnabled()&&(this.log.writeLine(`Loaded content of '${t}':${NH(r)}`),this.log.writeLine(`Loaded content of '${n}':${NH(i)}`)),r.devDependencies&&i.dependencies)for(const t in r.devDependencies){if(!Le(i.dependencies,t))continue;const n=Bo(t);if(!n)continue;const r=Jpe(e,n,this.installTypingHost,this.log);if(!r){this.missingTypingsSet.add(n);continue}const o=this.packageNameToTypingLocation.get(n);if(o){if(o.typingLocation===r)continue;this.log.isEnabled()&&this.log.writeLine(`New typing for package ${n} from '${r}' conflicts with existing typing file '${o}'`)}this.log.isEnabled()&&this.log.writeLine(`Adding entry into typings cache: '${n}' => '${r}'`);const a=je(i.dependencies,t),s=a&&a.version;if(!s)continue;const c={typingLocation:r,version:new Nn(s)};this.packageNameToTypingLocation.set(n,c)}}this.log.isEnabled()&&this.log.writeLine(`Finished processing cache location '${e}'`),this.knownCachesSet.add(e)}filterTypings(e){return q(e,(e=>{const t=mR(e);if(this.missingTypingsSet.has(t))return void(this.log.isEnabled()&&this.log.writeLine(`'${e}':: '${t}' is in missingTypingsSet - skipping...`));const n=fH.validatePackageName(e);if(n!==fH.NameValidationResult.Ok)return this.missingTypingsSet.add(t),void(this.log.isEnabled()&&this.log.writeLine(fH.renderPackageNameValidationFailure(n,e)));if(this.typesRegistry.has(t)){if(!this.packageNameToTypingLocation.get(t)||!fH.isTypingUpToDate(this.packageNameToTypingLocation.get(t),this.typesRegistry.get(t)))return t;this.log.isEnabled()&&this.log.writeLine(`'${e}':: '${t}' already has an up-to-date typing - skipping...`)}else this.log.isEnabled()&&this.log.writeLine(`'${e}':: Entry for package '${t}' does not exist in local types registry - skipping...`)}))}ensurePackageDirectoryExists(e){const t=Ko(e,"package.json");this.log.isEnabled()&&this.log.writeLine(`Npm config file: ${t}`),this.installTypingHost.fileExists(t)||(this.log.isEnabled()&&this.log.writeLine(`Npm config file: '${t}' is missing, creating new one...`),this.ensureDirectoryExists(e,this.installTypingHost),this.installTypingHost.writeFile(t,'{ "private": true }'))}installTypings(e,t,n,r){this.log.isEnabled()&&this.log.writeLine(`Installing typings ${JSON.stringify(r)}`);const i=this.filterTypings(r);if(0===i.length)return this.log.isEnabled()&&this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"),void this.sendResponse(this.createSetTypings(e,n));this.ensurePackageDirectoryExists(t);const o=this.installRunCount;this.installRunCount++,this.sendResponse({kind:xH,eventId:o,typingsInstallerVersion:c,projectName:e.projectName});const a=i.map(Vpe);this.installTypingsAsync(o,a,t,(r=>{try{if(!r){this.log.isEnabled()&&this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(i)}`);for(const e of i)this.missingTypingsSet.add(e);return}this.log.isEnabled()&&this.log.writeLine(`Installed typings ${JSON.stringify(a)}`);const l=[];for(const e of i){const n=Jpe(t,e,this.installTypingHost,this.log);if(!n){this.missingTypingsSet.add(e);continue}const r=this.typesRegistry.get(e),i={typingLocation:n,version:new Nn(r[`ts${s}`]||r[this.latestDistTag])};this.packageNameToTypingLocation.set(e,i),l.push(n)}this.log.isEnabled()&&this.log.writeLine(`Installed typing files ${JSON.stringify(l)}`),this.sendResponse(this.createSetTypings(e,n.concat(l)))}finally{const t={kind:SH,eventId:o,projectName:e.projectName,packagesToInstall:a,installSuccess:r,typingsInstallerVersion:c};this.sendResponse(t)}}))}ensureDirectoryExists(e,t){const n=Ro(e);t.directoryExists(n)||this.ensureDirectoryExists(n,t),t.directoryExists(e)||t.createDirectory(e)}watchFiles(e,t){if(!t.length)return void this.closeWatchers(e);const n=this.projectWatchers.get(e),r=new Set(t);!n||ud(r,(e=>!n.has(e)))||ud(n,(e=>!r.has(e)))?(this.projectWatchers.set(e,r),this.sendResponse({kind:TH,projectName:e,files:t})):this.sendResponse({kind:TH,projectName:e,files:void 0})}createSetTypings(e,t){return{projectName:e.projectName,typeAcquisition:e.typeAcquisition,compilerOptions:e.compilerOptions,typings:t,unresolvedImports:e.unresolvedImports,kind:hH}}installTypingsAsync(e,t,n,r){this.pendingRunRequests.unshift({requestId:e,packageNames:t,cwd:n,onRequestCompleted:r}),this.executeWithThrottling()}executeWithThrottling(){for(;this.inFlightRequestCount{this.inFlightRequestCount--,e.onRequestCompleted(t),this.executeWithThrottling()}))}}};function Vpe(e){return`@types/${e}@ts${s}`}var Upe,Kpe,Wpe=(e=>(e[e.terse=0]="terse",e[e.normal=1]="normal",e[e.requestTime=2]="requestTime",e[e.verbose=3]="verbose",e))(Wpe||{}),Hpe=[],Gpe=(e=>(e.Err="Err",e.Info="Info",e.Perf="Perf",e))(Gpe||{});function Xpe(e,t,n,r){return{projectName:e.getProjectName(),fileNames:e.getFileNames(!0,!0).concat(e.getExcludedFiles()),compilerOptions:e.getCompilationSettings(),typeAcquisition:t,unresolvedImports:n,projectRootPath:e.getCurrentDirectory(),cachePath:r,kind:"discover"}}function Qpe(e){return Xo(e)}function Ype(e,t,n){return n(wo(e)?e:Go(e,t))}function Zpe(e){return e}function efe(){const e=new Map;return{get:t=>e.get(t),set(t,n){e.set(t,n)},contains:t=>e.has(t),remove(t){e.delete(t)}}}function tfe(e){return/dev\/null\/inferredProject\d+\*/.test(e)}function nfe(e){return`/dev/null/inferredProject${e}*`}function rfe(e){return`/dev/null/autoImportProviderProject${e}*`}function ife(e){return`/dev/null/auxiliaryProject${e}*`}function ofe(){return[]}(Kpe=Upe||(Upe={})).ThrowNoProject=function(){throw new Error("No Project.")},Kpe.ThrowProjectLanguageServiceDisabled=function(){throw new Error("The project's language service is disabled.")},Kpe.ThrowProjectDoesNotContainDocument=function(e,t){throw new Error(`Project '${t.getProjectName()}' does not contain document '${e}'`)};var afe=class e{constructor(e,t){this.host=e,this.pendingTimeouts=new Map,this.logger=t.hasLevel(3)?t:void 0}schedule(t,n,r){const i=this.pendingTimeouts.get(t);i&&this.host.clearTimeout(i),this.pendingTimeouts.set(t,this.host.setTimeout(e.run,n,t,this,r)),this.logger&&this.logger.info(`Scheduled: ${t}${i?", Cancelled earlier one":""}`)}cancel(e){const t=this.pendingTimeouts.get(e);return!!t&&(this.host.clearTimeout(t),this.pendingTimeouts.delete(e))}static run(e,t,n){var r,i;null==(r=tr)||r.logStartScheduledOperation(e),t.pendingTimeouts.delete(e),t.logger&&t.logger.info(`Running: ${e}`),n(),null==(i=tr)||i.logStopScheduledOperation()}},sfe=class e{constructor(e,t,n){this.host=e,this.delay=t,this.logger=n}scheduleCollect(){this.host.gc&&void 0===this.timerId&&(this.timerId=this.host.setTimeout(e.run,this.delay,this))}static run(e){var t,n;e.timerId=void 0,null==(t=tr)||t.logStartScheduledOperation("GC collect");const r=e.logger.hasLevel(2),i=r&&e.host.getMemoryUsage();if(e.host.gc(),r){const t=e.host.getMemoryUsage();e.logger.perftrc(`GC::before ${i}, after ${t}`)}null==(n=tr)||n.logStopScheduledOperation()}};function cfe(e){const t=Bo(e);return"tsconfig.json"===t||"jsconfig.json"===t?t:void 0}function lfe(e,t,n){if(!e||0===e.length)return;if(e[0]===t)return void e.splice(0,1);const r=Ae(e,t,mt,n);r>=0&&e.splice(r,1)}var ufe={};o(ufe,{ClassificationType:()=>fG,CommandTypes:()=>_fe,CompletionTriggerKind:()=>YH,IndentStyle:()=>mfe,JsxEmit:()=>gfe,ModuleKind:()=>hfe,ModuleResolutionKind:()=>yfe,NewLineKind:()=>vfe,OrganizeImportsMode:()=>QH,PollingWatchKind:()=>ffe,ScriptTarget:()=>bfe,SemicolonPreference:()=>nG,WatchDirectoryKind:()=>pfe,WatchFileKind:()=>dfe});var _fe=(e=>(e.JsxClosingTag="jsxClosingTag",e.LinkedEditingRange="linkedEditingRange",e.Brace="brace",e.BraceFull="brace-full",e.BraceCompletion="braceCompletion",e.GetSpanOfEnclosingComment="getSpanOfEnclosingComment",e.Change="change",e.Close="close",e.Completions="completions",e.CompletionInfo="completionInfo",e.CompletionsFull="completions-full",e.CompletionDetails="completionEntryDetails",e.CompletionDetailsFull="completionEntryDetails-full",e.CompileOnSaveAffectedFileList="compileOnSaveAffectedFileList",e.CompileOnSaveEmitFile="compileOnSaveEmitFile",e.Configure="configure",e.Definition="definition",e.DefinitionFull="definition-full",e.DefinitionAndBoundSpan="definitionAndBoundSpan",e.DefinitionAndBoundSpanFull="definitionAndBoundSpan-full",e.Implementation="implementation",e.ImplementationFull="implementation-full",e.EmitOutput="emit-output",e.Exit="exit",e.FileReferences="fileReferences",e.FileReferencesFull="fileReferences-full",e.Format="format",e.Formatonkey="formatonkey",e.FormatFull="format-full",e.FormatonkeyFull="formatonkey-full",e.FormatRangeFull="formatRange-full",e.Geterr="geterr",e.GeterrForProject="geterrForProject",e.SemanticDiagnosticsSync="semanticDiagnosticsSync",e.SyntacticDiagnosticsSync="syntacticDiagnosticsSync",e.SuggestionDiagnosticsSync="suggestionDiagnosticsSync",e.NavBar="navbar",e.NavBarFull="navbar-full",e.Navto="navto",e.NavtoFull="navto-full",e.NavTree="navtree",e.NavTreeFull="navtree-full",e.DocumentHighlights="documentHighlights",e.DocumentHighlightsFull="documentHighlights-full",e.Open="open",e.Quickinfo="quickinfo",e.QuickinfoFull="quickinfo-full",e.References="references",e.ReferencesFull="references-full",e.Reload="reload",e.Rename="rename",e.RenameInfoFull="rename-full",e.RenameLocationsFull="renameLocations-full",e.Saveto="saveto",e.SignatureHelp="signatureHelp",e.SignatureHelpFull="signatureHelp-full",e.FindSourceDefinition="findSourceDefinition",e.Status="status",e.TypeDefinition="typeDefinition",e.ProjectInfo="projectInfo",e.ReloadProjects="reloadProjects",e.Unknown="unknown",e.OpenExternalProject="openExternalProject",e.OpenExternalProjects="openExternalProjects",e.CloseExternalProject="closeExternalProject",e.SynchronizeProjectList="synchronizeProjectList",e.ApplyChangedToOpenFiles="applyChangedToOpenFiles",e.UpdateOpen="updateOpen",e.EncodedSyntacticClassificationsFull="encodedSyntacticClassifications-full",e.EncodedSemanticClassificationsFull="encodedSemanticClassifications-full",e.Cleanup="cleanup",e.GetOutliningSpans="getOutliningSpans",e.GetOutliningSpansFull="outliningSpans",e.TodoComments="todoComments",e.Indentation="indentation",e.DocCommentTemplate="docCommentTemplate",e.CompilerOptionsDiagnosticsFull="compilerOptionsDiagnostics-full",e.NameOrDottedNameSpan="nameOrDottedNameSpan",e.BreakpointStatement="breakpointStatement",e.CompilerOptionsForInferredProjects="compilerOptionsForInferredProjects",e.GetCodeFixes="getCodeFixes",e.GetCodeFixesFull="getCodeFixes-full",e.GetCombinedCodeFix="getCombinedCodeFix",e.GetCombinedCodeFixFull="getCombinedCodeFix-full",e.ApplyCodeActionCommand="applyCodeActionCommand",e.GetSupportedCodeFixes="getSupportedCodeFixes",e.GetApplicableRefactors="getApplicableRefactors",e.GetEditsForRefactor="getEditsForRefactor",e.GetMoveToRefactoringFileSuggestions="getMoveToRefactoringFileSuggestions",e.GetPasteEdits="getPasteEdits",e.GetEditsForRefactorFull="getEditsForRefactor-full",e.OrganizeImports="organizeImports",e.OrganizeImportsFull="organizeImports-full",e.GetEditsForFileRename="getEditsForFileRename",e.GetEditsForFileRenameFull="getEditsForFileRename-full",e.ConfigurePlugin="configurePlugin",e.SelectionRange="selectionRange",e.SelectionRangeFull="selectionRange-full",e.ToggleLineComment="toggleLineComment",e.ToggleLineCommentFull="toggleLineComment-full",e.ToggleMultilineComment="toggleMultilineComment",e.ToggleMultilineCommentFull="toggleMultilineComment-full",e.CommentSelection="commentSelection",e.CommentSelectionFull="commentSelection-full",e.UncommentSelection="uncommentSelection",e.UncommentSelectionFull="uncommentSelection-full",e.PrepareCallHierarchy="prepareCallHierarchy",e.ProvideCallHierarchyIncomingCalls="provideCallHierarchyIncomingCalls",e.ProvideCallHierarchyOutgoingCalls="provideCallHierarchyOutgoingCalls",e.ProvideInlayHints="provideInlayHints",e.WatchChange="watchChange",e.MapCode="mapCode",e))(_fe||{}),dfe=(e=>(e.FixedPollingInterval="FixedPollingInterval",e.PriorityPollingInterval="PriorityPollingInterval",e.DynamicPriorityPolling="DynamicPriorityPolling",e.FixedChunkSizePolling="FixedChunkSizePolling",e.UseFsEvents="UseFsEvents",e.UseFsEventsOnParentDirectory="UseFsEventsOnParentDirectory",e))(dfe||{}),pfe=(e=>(e.UseFsEvents="UseFsEvents",e.FixedPollingInterval="FixedPollingInterval",e.DynamicPriorityPolling="DynamicPriorityPolling",e.FixedChunkSizePolling="FixedChunkSizePolling",e))(pfe||{}),ffe=(e=>(e.FixedInterval="FixedInterval",e.PriorityInterval="PriorityInterval",e.DynamicPriority="DynamicPriority",e.FixedChunkSize="FixedChunkSize",e))(ffe||{}),mfe=(e=>(e.None="None",e.Block="Block",e.Smart="Smart",e))(mfe||{}),gfe=(e=>(e.None="none",e.Preserve="preserve",e.ReactNative="react-native",e.React="react",e.ReactJSX="react-jsx",e.ReactJSXDev="react-jsxdev",e))(gfe||{}),hfe=(e=>(e.None="none",e.CommonJS="commonjs",e.AMD="amd",e.UMD="umd",e.System="system",e.ES6="es6",e.ES2015="es2015",e.ES2020="es2020",e.ES2022="es2022",e.ESNext="esnext",e.Node16="node16",e.NodeNext="nodenext",e.Preserve="preserve",e))(hfe||{}),yfe=(e=>(e.Classic="classic",e.Node="node",e.NodeJs="node",e.Node10="node10",e.Node16="node16",e.NodeNext="nodenext",e.Bundler="bundler",e))(yfe||{}),vfe=(e=>(e.Crlf="Crlf",e.Lf="Lf",e))(vfe||{}),bfe=(e=>(e.ES3="es3",e.ES5="es5",e.ES6="es6",e.ES2015="es2015",e.ES2016="es2016",e.ES2017="es2017",e.ES2018="es2018",e.ES2019="es2019",e.ES2020="es2020",e.ES2021="es2021",e.ES2022="es2022",e.ES2023="es2023",e.ESNext="esnext",e.JSON="json",e.Latest="esnext",e))(bfe||{}),xfe=class{constructor(e,t,n){this.host=e,this.info=t,this.isOpen=!1,this.ownFileText=!1,this.pendingReloadFromDisk=!1,this.version=n||0}getVersion(){return this.svc?`SVC-${this.version}-${this.svc.getSnapshotVersion()}`:`Text-${this.version}`}hasScriptVersionCache_TestOnly(){return void 0!==this.svc}resetSourceMapInfo(){this.info.sourceFileLike=void 0,this.info.closeSourceMapFileWatcher(),this.info.sourceMapFilePath=void 0,this.info.declarationInfoPath=void 0,this.info.sourceInfos=void 0,this.info.documentPositionMapper=void 0}useText(e){this.svc=void 0,this.text=e,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo(),this.version++}edit(e,t,n){this.switchToScriptVersionCache().edit(e,t-e,n),this.ownFileText=!1,this.text=void 0,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo()}reload(e){return xn.assert(void 0!==e),this.pendingReloadFromDisk=!1,!this.text&&this.svc&&(this.text=yQ(this.svc.getSnapshot())),this.text!==e&&(this.useText(e),this.ownFileText=!1,!0)}reloadWithFileText(e){const{text:t,fileSize:n}=e||!this.info.isDynamicOrHasMixedContent()?this.getFileTextAndSize(e):{text:"",fileSize:void 0},r=this.reload(t);return this.fileSize=n,this.ownFileText=!e||e===this.info.fileName,this.ownFileText&&this.info.mTime===Yi.getTime()&&(this.info.mTime=(this.host.getModifiedTime(this.info.fileName)||Yi).getTime()),r}scheduleReloadIfNeeded(){return!this.pendingReloadFromDisk&&!this.ownFileText&&(this.pendingReloadFromDisk=!0)}delayReloadFromFileIntoText(){this.pendingReloadFromDisk=!0}getTelemetryFileSize(){return this.fileSize?this.fileSize:this.text?this.text.length:this.svc?this.svc.getSnapshot().getLength():this.getSnapshot().getLength()}getSnapshot(){var e;return(null==(e=this.tryUseScriptVersionCache())?void 0:e.getSnapshot())||(this.textSnapshot??(this.textSnapshot=JH.fromString(xn.checkDefined(this.text))))}getAbsolutePositionAndLineText(e){const t=this.tryUseScriptVersionCache();if(t)return t.getAbsolutePositionAndLineText(e);const n=this.getLineMap();return e<=n.length?{absolutePosition:n[e-1],lineText:this.text.substring(n[e-1],n[e])}:{absolutePosition:this.text.length,lineText:void 0}}lineToTextSpan(e){const t=this.tryUseScriptVersionCache();if(t)return t.lineToTextSpan(e);const n=this.getLineMap();return Xs(n[e],e+1void 0===t?t=this.host.readFile(n)||"":t;if(!Vk(this.info.fileName)){const e=this.host.getFileSize?this.host.getFileSize(n):r().length;if(e>Kfe)return xn.assert(!!this.info.containingProjects.length),this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${n} for info ${this.info.fileName}: fileSize: ${e}`),this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(n,e),{text:"",fileSize:e}}return{text:r()}}switchToScriptVersionCache(){return this.svc&&!this.pendingReloadFromDisk||(this.svc=xge.fromString(this.getOrLoadText()),this.textSnapshot=void 0,this.version++),this.svc}tryUseScriptVersionCache(){return this.svc&&!this.pendingReloadFromDisk||this.getOrLoadText(),this.isOpen?(this.svc||this.textSnapshot||(this.svc=xge.fromString(xn.checkDefined(this.text)),this.textSnapshot=void 0),this.svc):this.svc}getOrLoadText(){return(void 0===this.text||this.pendingReloadFromDisk)&&(xn.assert(!this.svc||this.pendingReloadFromDisk,"ScriptVersionCache should not be set when reloading from disk"),this.reloadWithFileText()),this.text}getLineMap(){return xn.assert(!this.svc,"ScriptVersionCache should not be set"),this.lineMap||(this.lineMap=qa(xn.checkDefined(this.text)))}getLineInfo(){const e=this.tryUseScriptVersionCache();if(e)return{getLineCount:()=>e.getLineCount(),getLineText:t=>e.getAbsolutePositionAndLineText(t+1).lineText};const t=this.getLineMap();return aJ(this.text,t)}};function Sfe(e){return"^"===e[0]||(e.includes("walkThroughSnippet:/")||e.includes("untitled:/"))&&"^"===Bo(e)[0]||e.includes(":^")&&!e.includes(xo)}var kfe=class{constructor(e,t,n,r,i,o){this.host=e,this.fileName=t,this.scriptKind=n,this.hasMixedContent=r,this.path=i,this.containingProjects=[],this.isDynamic=Sfe(t),this.textStorage=new xfe(e,this,o),(r||this.isDynamic)&&(this.realpath=this.path),this.scriptKind=n||Pk(t)}isDynamicOrHasMixedContent(){return this.hasMixedContent||this.isDynamic}isScriptOpen(){return this.textStorage.isOpen}open(e){this.textStorage.isOpen=!0,void 0!==e&&this.textStorage.reload(e)&&this.markContainingProjectsAsDirty()}close(e=!0){this.textStorage.isOpen=!1,e&&this.textStorage.scheduleReloadIfNeeded()&&this.markContainingProjectsAsDirty()}getSnapshot(){return this.textStorage.getSnapshot()}ensureRealPath(){if(void 0===this.realpath&&(this.realpath=this.path,this.host.realpath)){xn.assert(!!this.containingProjects.length);const e=this.containingProjects[0],t=this.host.realpath(this.path);t&&(this.realpath=e.toPath(t),this.realpath!==this.path&&e.projectService.realpathToScriptInfos.add(this.realpath,this))}}getRealpathIfDifferent(){return this.realpath&&this.realpath!==this.path?this.realpath:void 0}isSymlink(){return this.realpath&&this.realpath!==this.path}getFormatCodeSettings(){return this.formatSettings}getPreferences(){return this.preferences}attachToProject(e){const t=!this.isAttached(e);return t&&(this.containingProjects.push(e),e.getCompilerOptions().preserveSymlinks||this.ensureRealPath(),e.onFileAddedOrRemoved(this.isSymlink())),t}isAttached(e){switch(this.containingProjects.length){case 0:return!1;case 1:return this.containingProjects[0]===e;case 2:return this.containingProjects[0]===e||this.containingProjects[1]===e;default:return D(this.containingProjects,e)}}detachFromProject(e){switch(this.containingProjects.length){case 0:return;case 1:this.containingProjects[0]===e&&(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;case 2:this.containingProjects[0]===e?(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects[0]=this.containingProjects.pop()):this.containingProjects[1]===e&&(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;default:Qt(this.containingProjects,e)&&e.onFileAddedOrRemoved(this.isSymlink())}}detachAllProjects(){for(const e of this.containingProjects){zfe(e)&&e.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName,this.path,2);const t=e.getRootFilesMap().get(this.path);e.removeFile(this,!1,!1),e.onFileAddedOrRemoved(this.isSymlink()),t&&!Jfe(e)&&e.addMissingFileRoot(t.fileName)}I(this.containingProjects)}getDefaultProject(){switch(this.containingProjects.length){case 0:return Upe.ThrowNoProject();case 1:return Vfe(this.containingProjects[0])||qfe(this.containingProjects[0])?Upe.ThrowNoProject():this.containingProjects[0];default:let e,t,n,r;for(let i=0;i!e.isOrphan()))}isContainedByBackgroundProject(){return Q(this.containingProjects,qfe)}lineToTextSpan(e){return this.textStorage.lineToTextSpan(e)}lineOffsetToPosition(e,t,n){return this.textStorage.lineOffsetToPosition(e,t,n)}positionToLineOffset(e){!function(e){xn.assert("number"==typeof e,`Expected position ${e} to be a number.`),xn.assert(e>=0,"Expected position to be non-negative.")}(e);const t=this.textStorage.positionToLineOffset(e);return function(e){xn.assert("number"==typeof e.line,`Expected line ${e.line} to be a number.`),xn.assert("number"==typeof e.offset,`Expected offset ${e.offset} to be a number.`),xn.assert(e.line>0,"Expected line to be non-"+(0===e.line?"zero":"negative")),xn.assert(e.offset>0,"Expected offset to be non-"+(0===e.offset?"zero":"negative"))}(t),t}isJavaScript(){return 1===this.scriptKind||2===this.scriptKind}closeSourceMapFileWatcher(){this.sourceMapFilePath&&!st(this.sourceMapFilePath)&&(vq(this.sourceMapFilePath),this.sourceMapFilePath=void 0)}},Tfe={isKnownTypesPackageName:dt,installPackage:vt,enqueueInstallTypingsRequest:_t,attach:_t,onProjectClosed:_t,globalTypingsCacheLocation:void 0};function Cfe(e,t){if(e===t)return!0;if(0===(e||Hpe).length&&0===(t||Hpe).length)return!0;const n=new Map;let r=0;for(const t of e)!0!==n.get(t)&&(n.set(t,!0),r++);for(const e of t){const t=n.get(e);if(void 0===t)return!1;!0===t&&(n.set(e,!1),r--)}return 0===r}var wfe=class{constructor(e){this.installer=e,this.perProjectCache=new Map}isKnownTypesPackageName(e){return this.installer.isKnownTypesPackageName(e)}installPackage(e){return this.installer.installPackage(e)}enqueueInstallTypingsForProject(e,t,n){const r=e.getTypeAcquisition();if(!r||!r.enable)return;const i=this.perProjectCache.get(e.getProjectName());var o,a,s,c;!n&&i&&(s=r,c=i.typeAcquisition,s.enable===c.enable&&Cfe(s.include,c.include)&&Cfe(s.exclude,c.exclude))&&!function(e,t){return JS(e)!==JS(t)}(e.getCompilationSettings(),i.compilerOptions)&&((o=t)===(a=i.unresolvedImports)||se(o,a))||(this.perProjectCache.set(e.getProjectName(),{compilerOptions:e.getCompilationSettings(),typeAcquisition:r,typings:i?i.typings:Hpe,unresolvedImports:t,poisoned:!0}),this.installer.enqueueInstallTypingsRequest(e,r,t))}updateTypingsForProject(e,t,n,r,i){const o=he(i);return this.perProjectCache.set(e,{compilerOptions:t,typeAcquisition:n,typings:o,unresolvedImports:r,poisoned:!1}),n&&n.enable?o:Hpe}onProjectClosed(e){this.perProjectCache.delete(e.getProjectName())&&this.installer.onProjectClosed(e)}},Dfe=(e=>(e[e.Inferred=0]="Inferred",e[e.Configured=1]="Configured",e[e.External=2]="External",e[e.AutoImportProvider=3]="AutoImportProvider",e[e.Auxiliary=4]="Auxiliary",e))(Dfe||{});function Efe(e,t=!1){const n={js:0,jsSize:0,jsx:0,jsxSize:0,ts:0,tsSize:0,tsx:0,tsxSize:0,dts:0,dtsSize:0,deferred:0,deferredSize:0};for(const r of e){const e=t?r.textStorage.getTelemetryFileSize():0;switch(r.scriptKind){case 1:n.js+=1,n.jsSize+=e;break;case 2:n.jsx+=1,n.jsxSize+=e;break;case 3:QI(r.fileName)?(n.dts+=1,n.dtsSize+=e):(n.ts+=1,n.tsSize+=e);break;case 4:n.tsx+=1,n.tsxSize+=e;break;case 7:n.deferred+=1,n.deferredSize+=e}}return n}function Pfe(e){const t=Efe(e.getRootScriptInfos());return 0===t.ts&&0===t.tsx}function Nfe(e){const t=Efe(e.getScriptInfos());return 0===t.ts&&0===t.tsx}function Ffe(e){return!e.some((e=>Ao(e,".ts")&&!QI(e)||Ao(e,".tsx")))}function Afe(e){return void 0!==e.generatedFilePath}var Ife=class e{constructor(e,t,n,r,i,o,a,s,c,l,u){switch(this.projectKind=t,this.projectService=n,this.documentRegistry=r,this.compilerOptions=a,this.compileOnSaveEnabled=s,this.watchOptions=c,this.rootFilesMap=new Map,this.plugins=[],this.cachedUnresolvedImportsPerFile=new Map,this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1,this.lastReportedVersion=0,this.projectProgramVersion=0,this.projectStateVersion=0,this.isInitialLoadPending=dt,this.dirty=!1,this.typingFiles=Hpe,this.moduleSpecifierCache=qme(this),this.createHash=Ze(this.projectService.host,this.projectService.host.createHash),this.globalCacheResolutionModuleName=fH.nonRelativeModuleNameForTypingCache,this.updateFromProjectInProgress=!1,this.projectName=e,this.directoryStructureHost=l,this.currentDirectory=this.projectService.getNormalizedAbsolutePath(u),this.getCanonicalFileName=this.projectService.toCanonicalFileName,this.jsDocParsingMode=this.projectService.jsDocParsingMode,this.cancellationToken=new P7(this.projectService.cancellationToken,this.projectService.throttleWaitMilliseconds),this.compilerOptions?(i||JS(this.compilerOptions)||this.projectService.hasDeferredExtension())&&(this.compilerOptions.allowNonTsExtensions=!0):(this.compilerOptions={target:1,jsx:1},this.compilerOptions.allowNonTsExtensions=!0,this.compilerOptions.allowJs=!0),n.serverMode){case 0:this.languageServiceEnabled=!0;break;case 1:this.languageServiceEnabled=!0,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;case 2:this.languageServiceEnabled=!1,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;default:xn.assertNever(n.serverMode)}this.setInternalCompilerOptionsForEmittingJsFiles();const _=this.projectService.host;this.projectService.logger.loggingEnabled()?this.trace=e=>this.writeLog(e):_.trace&&(this.trace=e=>_.trace(e)),this.realpath=Ze(_,_.realpath),this.resolutionCache=wU(this,this.currentDirectory,!0),this.languageService=A7(this,this.documentRegistry,this.projectService.serverMode),o&&this.disableLanguageService(o),this.markAsDirty(),qfe(this)||(this.projectService.pendingEnsureProjectForOpenFiles=!0),this.projectService.onProjectCreation(this)}getResolvedProjectReferenceToRedirect(e){}isNonTsProject(){return Fme(this),Nfe(this)}isJsOnlyProject(){return Fme(this),function(e){const t=Efe(e.getScriptInfos());return t.js>0&&0===t.ts&&0===t.tsx}(this)}static resolveModule(t,n,r,i){return e.importServicePluginSync({name:t},[n],r,i).resolvedModule}static importServicePluginSync(e,t,n,r){let i,o;xn.assertIsDefined(n.require);for(const a of t){const t=Vo(n.resolvePath(Ko(a,"node_modules")));r(`Loading ${e.name} from ${a} (resolved to ${t})`);const s=n.require(t,e.name);if(!s.error){o=s.module;break}const c=s.error.stack||s.error.message||JSON.stringify(s.error);(i??(i=[])).push(`Failed to load module '${e.name}' from ${t}: ${c}`)}return{pluginConfigEntry:e,resolvedModule:o,errorLogs:i}}static async importServicePluginAsync(e,t,n,r){let i,o;xn.assertIsDefined(n.importPlugin);for(const a of t){const t=Ko(a,"node_modules");let s;r(`Dynamically importing ${e.name} from ${a} (resolved to ${t})`);try{s=await n.importPlugin(t,e.name)}catch(e){s={module:void 0,error:e}}if(!s.error){o=s.module;break}const c=s.error.stack||s.error.message||JSON.stringify(s.error);(i??(i=[])).push(`Failed to dynamically import module '${e.name}' from ${t}: ${c}`)}return{pluginConfigEntry:e,resolvedModule:o,errorLogs:i}}isKnownTypesPackageName(e){return this.typingsCache.isKnownTypesPackageName(e)}installPackage(e){return this.typingsCache.installPackage({...e,projectName:this.projectName,projectRootPath:this.toPath(this.currentDirectory)})}getGlobalTypingsCacheLocation(){return this.getGlobalCache()}get typingsCache(){return this.projectService.typingsCache}getSymlinkCache(){return this.symlinks||(this.symlinks=ik(this.getCurrentDirectory(),this.getCanonicalFileName)),this.program&&!this.symlinks.hasProcessedResolutions()&&this.symlinks.setSymlinksFromResolutions(this.program.forEachResolvedModule,this.program.forEachResolvedTypeReferenceDirective,this.program.getAutomaticTypeDirectiveResolutions()),this.symlinks}getCompilationSettings(){return this.compilerOptions}getCompilerOptions(){return this.getCompilationSettings()}getNewLine(){return this.projectService.host.newLine}getProjectVersion(){return this.projectStateVersion.toString()}getProjectReferences(){}getScriptFileNames(){if(!this.rootFilesMap.size)return u;let e;return this.rootFilesMap.forEach((t=>{(this.languageServiceEnabled||t.info&&t.info.isScriptOpen())&&(e||(e=[])).push(t.fileName)})),pe(e,this.typingFiles)||u}getOrCreateScriptInfoAndAttachToProject(e){const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);if(t){const e=this.rootFilesMap.get(t.path);e&&e.info!==t&&(e.info=t),t.attachToProject(this)}return t}getScriptKind(e){const t=this.projectService.getScriptInfoForPath(this.toPath(e));return t&&t.scriptKind}getScriptVersion(e){const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);return t&&t.getLatestVersion()}getScriptSnapshot(e){const t=this.getOrCreateScriptInfoAndAttachToProject(e);if(t)return t.getSnapshot()}getCancellationToken(){return this.cancellationToken}getCurrentDirectory(){return this.currentDirectory}getDefaultLibFileName(){return Ko(Ro(Xo(this.projectService.getExecutingFilePath())),Ls(this.compilerOptions))}useCaseSensitiveFileNames(){return this.projectService.host.useCaseSensitiveFileNames}readDirectory(e,t,n,r,i){return this.directoryStructureHost.readDirectory(e,t,n,r,i)}readFile(e){return this.projectService.host.readFile(e)}writeFile(e,t){return this.projectService.host.writeFile(e,t)}fileExists(e){const t=this.toPath(e);return!this.isWatchedMissingFile(t)&&this.directoryStructureHost.fileExists(e)}resolveModuleNameLiterals(e,t,n,r,i,o){return this.resolutionCache.resolveModuleNameLiterals(e,t,n,r,i,o)}getModuleResolutionCache(){return this.resolutionCache.getModuleResolutionCache()}resolveTypeReferenceDirectiveReferences(e,t,n,r,i,o){return this.resolutionCache.resolveTypeReferenceDirectiveReferences(e,t,n,r,i,o)}resolveLibrary(e,t,n,r){return this.resolutionCache.resolveLibrary(e,t,n,r)}directoryExists(e){return this.directoryStructureHost.directoryExists(e)}getDirectories(e){return this.directoryStructureHost.getDirectories(e)}getCachedDirectoryStructureHost(){}toPath(e){return Yo(e,this.currentDirectory,this.projectService.toCanonicalFileName)}watchDirectoryOfFailedLookupLocation(e,t,n){return this.projectService.watchFactory.watchDirectory(e,t,n,this.projectService.getWatchOptions(this),ZU.FailedLookupLocations,this)}watchAffectingFileLocation(e,t){return this.projectService.watchFactory.watchFile(e,t,2e3,this.projectService.getWatchOptions(this),ZU.AffectingFileLocation,this)}clearInvalidateResolutionOfFailedLookupTimer(){return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`)}scheduleInvalidateResolutionsOfFailedLookupLocations(){this.projectService.throttledOperations.schedule(`${this.getProjectName()}FailedLookupInvalidation`,1e3,(()=>{this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}))}invalidateResolutionsOfFailedLookupLocations(){this.clearInvalidateResolutionOfFailedLookupTimer()&&this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&(this.markAsDirty(),this.projectService.delayEnsureProjectForOpenFiles())}onInvalidatedResolution(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}watchTypeRootsDirectory(e,t,n){return this.projectService.watchFactory.watchDirectory(e,t,n,this.projectService.getWatchOptions(this),ZU.TypeRoots,this)}hasChangedAutomaticTypeDirectiveNames(){return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames()}onChangedAutomaticTypeDirectiveNames(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}getGlobalCache(){return this.getTypeAcquisition().enable?this.projectService.typingsInstaller.globalTypingsCacheLocation:void 0}fileIsOpen(e){return this.projectService.openFiles.has(e)}writeLog(e){this.projectService.logger.info(e)}log(e){this.writeLog(e)}error(e){this.projectService.logger.msg(e,"Err")}setInternalCompilerOptionsForEmittingJsFiles(){0!==this.projectKind&&2!==this.projectKind||(this.compilerOptions.noEmitForJsFiles=!0)}getGlobalProjectErrors(){return F(this.projectErrors,(e=>!e.file))||Hpe}getAllProjectErrors(){return this.projectErrors||Hpe}setProjectErrors(e){this.projectErrors=e}getLanguageService(e=!0){return e&&Fme(this),this.languageService}getSourceMapper(){return this.getLanguageService().getSourceMapper()}clearSourceMapperCache(){this.languageService.clearSourceMapperCache()}getDocumentPositionMapper(e,t){return this.projectService.getDocumentPositionMapper(this,e,t)}getSourceFileLike(e){return this.projectService.getSourceFileLike(e,this)}shouldEmitFile(e){return e&&!e.isDynamicOrHasMixedContent()&&!this.program.isSourceOfProjectReferenceRedirect(e.path)}getCompileOnSaveAffectedFileList(e){return this.languageServiceEnabled?(Fme(this),this.builderState=wV.create(this.program,this.builderState,!0),q(wV.getFilesAffectedBy(this.builderState,this.program,e.path,this.cancellationToken,this.projectService.host),(e=>this.shouldEmitFile(this.projectService.getScriptInfoForPath(e.path))?e.fileName:void 0))):[]}emitFile(e,t){if(!this.languageServiceEnabled||!this.shouldEmitFile(e))return{emitSkipped:!0,diagnostics:Hpe};const{emitSkipped:n,diagnostics:r,outputFiles:i}=this.getLanguageService().getEmitOutput(e.fileName);if(!n){for(const e of i)t(Go(e.name,this.currentDirectory),e.text,e.writeByteOrderMark);if(this.builderState&&LS(this.compilerOptions)){const t=i.filter((e=>QI(e.name)));if(1===t.length){const n=this.program.getSourceFile(e.fileName),r=this.projectService.host.createHash?this.projectService.host.createHash(t[0].text):Hi(t[0].text);wV.updateSignatureOfFile(this.builderState,r,n.resolvedPath)}}}return{emitSkipped:n,diagnostics:r}}enableLanguageService(){this.languageServiceEnabled||2===this.projectService.serverMode||(this.languageServiceEnabled=!0,this.lastFileExceededProgramSize=void 0,this.projectService.onUpdateLanguageServiceStateForProject(this,!0))}cleanupProgram(){if(this.program){for(const e of this.program.getSourceFiles())this.detachScriptInfoIfNotRoot(e.fileName);this.program.forEachResolvedProjectReference((e=>this.detachScriptInfoFromProject(e.sourceFile.fileName))),this.program=void 0}}disableLanguageService(e){this.languageServiceEnabled&&(xn.assert(2!==this.projectService.serverMode),this.languageService.cleanupSemanticCache(),this.languageServiceEnabled=!1,this.cleanupProgram(),this.lastFileExceededProgramSize=e,this.builderState=void 0,this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.resolutionCache.closeTypeRootsWatch(),this.clearGeneratedFileWatch(),this.projectService.verifyDocumentRegistry(),this.projectService.onUpdateLanguageServiceStateForProject(this,!1))}getProjectName(){return this.projectName}removeLocalTypingsFromTypeAcquisition(e){return e&&e.include?{...e,include:this.removeExistingTypings(e.include)}:e}getExternalFiles(e){return he(R(this.plugins,(t=>{if("function"==typeof t.module.getExternalFiles)try{return t.module.getExternalFiles(this,e||0)}catch(e){this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`),e.stack&&this.projectService.logger.info(e.stack)}})))}getSourceFile(e){if(this.program)return this.program.getSourceFileByPath(e)}getSourceFileOrConfigFile(e){const t=this.program.getCompilerOptions();return e===t.configFilePath?t.configFile:this.getSourceFile(e)}close(){var e;this.projectService.typingsCache.onProjectClosed(this),this.closeWatchingTypingLocations(),this.cleanupProgram(),f(this.externalFiles,(e=>this.detachScriptInfoIfNotRoot(e))),this.rootFilesMap.forEach((e=>{var t;return null==(t=e.info)?void 0:t.detachFromProject(this)})),this.projectService.pendingEnsureProjectForOpenFiles=!0,this.rootFilesMap=void 0,this.externalFiles=void 0,this.program=void 0,this.builderState=void 0,this.resolutionCache.clear(),this.resolutionCache=void 0,this.cachedUnresolvedImportsPerFile=void 0,null==(e=this.packageJsonWatches)||e.forEach((e=>{e.projects.delete(this),e.close()})),this.packageJsonWatches=void 0,this.moduleSpecifierCache.clear(),this.moduleSpecifierCache=void 0,this.directoryStructureHost=void 0,this.exportMapCache=void 0,this.projectErrors=void 0,this.plugins.length=0,this.missingFilesMap&&(xx(this.missingFilesMap,dx),this.missingFilesMap=void 0),this.clearGeneratedFileWatch(),this.clearInvalidateResolutionOfFailedLookupTimer(),this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.noDtsResolutionProject&&this.noDtsResolutionProject.close(),this.noDtsResolutionProject=void 0,this.languageService.dispose(),this.languageService=void 0}detachScriptInfoIfNotRoot(e){const t=this.projectService.getScriptInfo(e);t&&!this.isRoot(t)&&t.detachFromProject(this)}isClosed(){return void 0===this.rootFilesMap}hasRoots(){var e;return!!(null==(e=this.rootFilesMap)?void 0:e.size)}isOrphan(){return!1}getRootFiles(){return this.rootFilesMap&&$e(V(this.rootFilesMap.values(),(e=>{var t;return null==(t=e.info)?void 0:t.fileName})))}getRootFilesMap(){return this.rootFilesMap}getRootScriptInfos(){return $e(V(this.rootFilesMap.values(),(e=>e.info)))}getScriptInfos(){return this.languageServiceEnabled?O(this.program.getSourceFiles(),(e=>{const t=this.projectService.getScriptInfoForPath(e.resolvedPath);return xn.assert(!!t,"getScriptInfo",(()=>`scriptInfo for a file '${e.fileName}' Path: '${e.path}' / '${e.resolvedPath}' is missing.`)),t})):this.getRootScriptInfos()}getExcludedFiles(){return Hpe}getFileNames(e,t){if(!this.program)return[];if(!this.languageServiceEnabled){let e=this.getRootFiles();if(this.compilerOptions){const t=L7(this.compilerOptions);t&&(e||(e=[])).push(t)}return e}const n=[];for(const t of this.program.getSourceFiles())e&&this.program.isSourceFileFromExternalLibrary(t)||n.push(t.fileName);if(!t){const e=this.program.getCompilerOptions().configFile;if(e&&(n.push(e.fileName),e.extendedSourceFiles))for(const t of e.extendedSourceFiles)n.push(t)}return n}getFileNamesWithRedirectInfo(e){return this.getFileNames().map((t=>({fileName:t,isSourceOfProjectReferenceRedirect:e&&this.isSourceOfProjectReferenceRedirect(t)})))}hasConfigFile(e){if(this.program&&this.languageServiceEnabled){const t=this.program.getCompilerOptions().configFile;if(t){if(e===t.fileName)return!0;if(t.extendedSourceFiles)for(const n of t.extendedSourceFiles)if(e===n)return!0}}return!1}containsScriptInfo(e){if(this.isRoot(e))return!0;if(!this.program)return!1;const t=this.program.getSourceFileByPath(e.path);return!!t&&t.resolvedPath===e.path}containsFile(e,t){const n=this.projectService.getScriptInfoForNormalizedPath(e);return!(!n||!n.isScriptOpen()&&t)&&this.containsScriptInfo(n)}isRoot(e){var t,n;return(null==(n=null==(t=this.rootFilesMap)?void 0:t.get(e.path))?void 0:n.info)===e}addRoot(e,t){xn.assert(!this.isRoot(e)),this.rootFilesMap.set(e.path,{fileName:t||e.fileName,info:e}),e.attachToProject(this),this.markAsDirty()}addMissingFileRoot(e){const t=this.projectService.toPath(e);this.rootFilesMap.set(t,{fileName:e}),this.markAsDirty()}removeFile(e,t,n){this.isRoot(e)&&this.removeRoot(e),t?this.resolutionCache.removeResolutionsOfFile(e.path):this.resolutionCache.invalidateResolutionOfFile(e.path),this.cachedUnresolvedImportsPerFile.delete(e.path),n&&e.detachFromProject(this),this.markAsDirty()}registerFileUpdate(e){(this.updatedFileNames||(this.updatedFileNames=new Set)).add(e)}markFileAsDirty(e){this.markAsDirty(),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.changedFilesForExportMapCache||(this.changedFilesForExportMapCache=new Set)).add(e)}markAsDirty(){this.dirty||(this.projectStateVersion++,this.dirty=!0)}markAutoImportProviderAsDirty(){var e;this.autoImportProviderHost||(this.autoImportProviderHost=void 0),null==(e=this.autoImportProviderHost)||e.markAsDirty()}onAutoImportProviderSettingsChanged(){var e;!1===this.autoImportProviderHost?this.autoImportProviderHost=void 0:null==(e=this.autoImportProviderHost)||e.markAsDirty()}onPackageJsonChange(){this.moduleSpecifierCache.clear(),this.autoImportProviderHost&&this.autoImportProviderHost.markAsDirty()}onFileAddedOrRemoved(e){this.hasAddedorRemovedFiles=!0,e&&(this.hasAddedOrRemovedSymlinks=!0)}onDiscoveredSymlink(){this.hasAddedOrRemovedSymlinks=!0}updateFromProject(){Fme(this)}updateGraph(){var e,t,n,r;null==(e=or)||e.push(or.Phase.Session,"updateGraph",{name:this.projectName,kind:Dfe[this.projectKind]}),null==(t=tr)||t.logStartUpdateGraph(),this.resolutionCache.startRecordingFilesWithChangedResolutions();const i=this.updateGraphWorker(),o=this.hasAddedorRemovedFiles;this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1;const a=this.resolutionCache.finishRecordingFilesWithChangedResolutions()||Hpe;for(const e of a)this.cachedUnresolvedImportsPerFile.delete(e);this.languageServiceEnabled&&0===this.projectService.serverMode&&!this.isOrphan()?((i||a.length)&&(this.lastCachedUnresolvedImportsList=function(e,t){var n,r;const i=e.getSourceFiles();null==(n=or)||n.push(or.Phase.Session,"getUnresolvedImports",{count:i.length});const o=e.getTypeChecker().getAmbientModules().map((e=>By(e.getName()))),a=oe(R(i,(n=>function(e,t,n,r){return K(r,t.path,(()=>{let r;return e.forEachResolvedModule((({resolvedModule:e},t)=>{e&&aT(e.extension)||Os(t)||n.some((e=>e===t))||(r=ue(r,eR(t).packageName))}),t),r||Hpe}))}(e,n,o,t))));return null==(r=or)||r.pop(),a}(this.program,this.cachedUnresolvedImportsPerFile)),this.projectService.typingsCache.enqueueInstallTypingsForProject(this,this.lastCachedUnresolvedImportsList,o)):this.lastCachedUnresolvedImportsList=void 0;const s=0===this.projectProgramVersion&&i;return i&&this.projectProgramVersion++,o&&this.markAutoImportProviderAsDirty(),s&&this.getPackageJsonAutoImportProvider(),null==(n=tr)||n.logStopUpdateGraph(),null==(r=or)||r.pop(),!i}updateTypingFiles(e){mn(e,this.typingFiles,Lt(!this.useCaseSensitiveFileNames()),_t,(e=>this.detachScriptInfoFromProject(e)))&&(this.typingFiles=e,this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))}closeWatchingTypingLocations(){this.typingWatchers&&xx(this.typingWatchers,dx),this.typingWatchers=void 0}onTypingInstallerWatchInvoke(){this.typingWatchers.isInvoked=!0,this.projectService.updateTypingsForProject({projectName:this.getProjectName(),kind:yH})}watchTypingLocations(e){if(!e)return void(this.typingWatchers.isInvoked=!1);if(!e.length)return void this.closeWatchingTypingLocations();const t=new Map(this.typingWatchers);this.typingWatchers||(this.typingWatchers=new Map),this.typingWatchers.isInvoked=!1;const n=(e,n)=>{const r=this.toPath(e);t.delete(r),this.typingWatchers.has(r)||this.typingWatchers.set(r,"FileWatcher"===n?this.projectService.watchFactory.watchFile(e,(()=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):this.onTypingInstallerWatchInvoke()),2e3,this.projectService.getWatchOptions(this),ZU.TypingInstallerLocationFile,this):this.projectService.watchFactory.watchDirectory(e,(e=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):Ao(e,".json")?ca(e,Ko(this.projectService.typingsInstaller.globalTypingsCacheLocation,"package.json"),!this.useCaseSensitiveFileNames())?this.writeLog("Ignoring package.json change at global typings location"):void this.onTypingInstallerWatchInvoke():this.writeLog("Ignoring files that are not *.json")),1,this.projectService.getWatchOptions(this),ZU.TypingInstallerLocationDirectory,this))};for(const t of e){const e=Bo(t);if("package.json"!==e&&"bower.json"!==e)if(la(this.currentDirectory,t,this.currentDirectory,!this.useCaseSensitiveFileNames())){const e=t.indexOf(xo,this.currentDirectory.length+1);n(-1!==e?t.substr(0,e):t,"DirectoryWatcher")}else la(this.projectService.typingsInstaller.globalTypingsCacheLocation,t,this.currentDirectory,!this.useCaseSensitiveFileNames())?n(this.projectService.typingsInstaller.globalTypingsCacheLocation,"DirectoryWatcher"):n(t,"DirectoryWatcher");else n(t,"FileWatcher")}t.forEach(((e,t)=>{e.close(),this.typingWatchers.delete(t)}))}getCurrentProgram(){return this.program}removeExistingTypings(e){const t=oj(this.getCompilerOptions(),this.directoryStructureHost);return e.filter((e=>!t.includes(e)))}updateGraphWorker(){var e,t;const n=this.languageService.getCurrentProgram();xn.assert(n===this.program),xn.assert(!this.isClosed(),"Called update graph worker of closed project"),this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`);const r=Yn(),{hasInvalidatedResolutions:i,hasInvalidatedLibResolutions:o}=this.resolutionCache.createHasInvalidatedResolutions(dt,dt);this.hasInvalidatedResolutions=i,this.hasInvalidatedLibResolutions=o,this.resolutionCache.startCachingPerDirectoryResolution(),this.dirty=!1,this.updateFromProjectInProgress=!0,this.program=this.languageService.getProgram(),this.updateFromProjectInProgress=!1,null==(e=or)||e.push(or.Phase.Session,"finishCachingPerDirectoryResolution"),this.resolutionCache.finishCachingPerDirectoryResolution(this.program,n),null==(t=or)||t.pop(),xn.assert(void 0===n||void 0!==this.program);let a=!1;if(this.program&&(!n||this.program!==n&&2!==this.program.structureIsReused)){if(a=!0,n){for(const e of n.getSourceFiles()){const t=this.program.getSourceFileByPath(e.resolvedPath);(!t||e.resolvedPath===e.path&&t.resolvedPath!==e.path)&&this.detachScriptInfoFromProject(e.fileName,!!this.program.getSourceFileByPath(e.path),!0)}n.forEachResolvedProjectReference((e=>{this.program.getResolvedProjectReferenceByPath(e.sourceFile.path)||this.detachScriptInfoFromProject(e.sourceFile.fileName,void 0,!0)}))}if(this.rootFilesMap.forEach(((e,t)=>{var n;const r=this.program.getSourceFileByPath(t),i=e.info;r&&(null==(n=e.info)?void 0:n.path)!==r.resolvedPath&&(e.info=this.projectService.getScriptInfo(r.fileName),xn.assert(e.info.isAttached(this)),null==i||i.detachFromProject(this))})),dq(this.program,this.missingFilesMap||(this.missingFilesMap=new Map),((e,t)=>this.addMissingFileWatcher(e,t))),this.generatedFilesMap){const e=this.compilerOptions.outFile;Afe(this.generatedFilesMap)?e&&this.isValidGeneratedFileWatcher(Yk(e)+".d.ts",this.generatedFilesMap)||this.clearGeneratedFileWatch():e?this.clearGeneratedFileWatch():this.generatedFilesMap.forEach(((e,t)=>{const n=this.program.getSourceFileByPath(t);n&&n.resolvedPath===t&&this.isValidGeneratedFileWatcher(ev(n.fileName,this.compilerOptions,this.currentDirectory,this.program.getCommonSourceDirectory(),this.getCanonicalFileName),e)||(vq(e),this.generatedFilesMap.delete(t))}))}this.languageServiceEnabled&&0===this.projectService.serverMode&&this.resolutionCache.updateTypeRootsWatch()}this.projectService.verifyProgram(this),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.exportMapCache.releaseSymbols(),this.hasAddedorRemovedFiles||n&&!this.program.structureIsReused?this.exportMapCache.clear():this.changedFilesForExportMapCache&&n&&this.program&&ud(this.changedFilesForExportMapCache,(e=>{const t=n.getSourceFileByPath(e),r=this.program.getSourceFileByPath(e);return t&&r?this.exportMapCache.onFileChanged(t,r,!!this.getTypeAcquisition().enable):(this.exportMapCache.clear(),!0)}))),this.changedFilesForExportMapCache&&this.changedFilesForExportMapCache.clear(),(this.hasAddedOrRemovedSymlinks||this.program&&!this.program.structureIsReused&&this.getCompilerOptions().preserveSymlinks)&&(this.symlinks=void 0,this.moduleSpecifierCache.clear());const s=this.externalFiles||Hpe;this.externalFiles=this.getExternalFiles(),mn(this.externalFiles,s,Lt(!this.useCaseSensitiveFileNames()),(e=>{const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);null==t||t.attachToProject(this)}),(e=>this.detachScriptInfoFromProject(e)));const c=Yn()-r;return this.sendPerformanceEvent("UpdateGraph",c),this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${a}${this.program?` structureIsReused:: ${Jr[this.program.structureIsReused]}`:""} Elapsed: ${c}ms`),this.projectService.logger.isTestLogger?this.program!==n?this.print(!0,this.hasAddedorRemovedFiles,!0):this.writeLog("Same program as before"):this.hasAddedorRemovedFiles?this.print(!0,!0,!1):this.program!==n&&this.writeLog("Different program with same set of files"),this.projectService.verifyDocumentRegistry(),a}sendPerformanceEvent(e,t){this.projectService.sendPerformanceEvent(e,t)}detachScriptInfoFromProject(e,t,n){const r=this.projectService.getScriptInfo(e);r&&(r.detachFromProject(this),t||this.resolutionCache.removeResolutionsOfFile(r.path,n))}addMissingFileWatcher(e,t){var n;if(zfe(this)){const t=this.projectService.configFileExistenceInfoCache.get(e);if(null==(n=null==t?void 0:t.config)?void 0:n.projects.has(this.canonicalConfigFilePath))return XU}const r=this.projectService.watchFactory.watchFile(Go(t,this.currentDirectory),((t,n)=>{zfe(this)&&this.getCachedDirectoryStructureHost().addOrDeleteFile(t,e,n),0===n&&this.missingFilesMap.has(e)&&(this.missingFilesMap.delete(e),r.close(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))}),500,this.projectService.getWatchOptions(this),ZU.MissingFile,this);return r}isWatchedMissingFile(e){return!!this.missingFilesMap&&this.missingFilesMap.has(e)}addGeneratedFileWatch(e,t){if(this.compilerOptions.outFile)this.generatedFilesMap||(this.generatedFilesMap=this.createGeneratedFileWatcher(e));else{const n=this.toPath(t);if(this.generatedFilesMap){if(Afe(this.generatedFilesMap))return void xn.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);if(this.generatedFilesMap.has(n))return}else this.generatedFilesMap=new Map;this.generatedFilesMap.set(n,this.createGeneratedFileWatcher(e))}}createGeneratedFileWatcher(e){return{generatedFilePath:this.toPath(e),watcher:this.projectService.watchFactory.watchFile(e,(()=>{this.clearSourceMapperCache(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}),2e3,this.projectService.getWatchOptions(this),ZU.MissingGeneratedFile,this)}}isValidGeneratedFileWatcher(e,t){return this.toPath(e)===t.generatedFilePath}clearGeneratedFileWatch(){this.generatedFilesMap&&(Afe(this.generatedFilesMap)?vq(this.generatedFilesMap):xx(this.generatedFilesMap,vq),this.generatedFilesMap=void 0)}getScriptInfoForNormalizedPath(e){const t=this.projectService.getScriptInfoForPath(this.toPath(e));return t&&!t.isAttached(this)?Upe.ThrowProjectDoesNotContainDocument(e,this):t}getScriptInfo(e){return this.projectService.getScriptInfo(e)}filesToString(e){return this.filesToStringWorker(e,!0,!1)}filesToStringWorker(e,t,n){if(this.isInitialLoadPending())return"\tFiles (0) InitialLoadPending\n";if(!this.program)return"\tFiles (0) NoProgram\n";const r=this.program.getSourceFiles();let i=`\tFiles (${r.length})\n`;if(e){for(const e of r)i+=`\t${e.fileName}${n?` ${e.version} ${JSON.stringify(e.text)}`:""}\n`;t&&(i+="\n\n",$U(this.program,(e=>i+=`\t${e}\n`)))}return i}print(e,t,n){var r;this.writeLog(`Project '${this.projectName}' (${Dfe[this.projectKind]})`),this.writeLog(this.filesToStringWorker(e&&this.projectService.logger.hasLevel(3),t&&this.projectService.logger.hasLevel(3),n&&this.projectService.logger.hasLevel(3))),this.writeLog("-----------------------------------------------"),this.autoImportProviderHost&&this.autoImportProviderHost.print(!1,!1,!1),null==(r=this.noDtsResolutionProject)||r.print(!1,!1,!1)}setCompilerOptions(e){var t;if(e){e.allowNonTsExtensions=!0;const n=this.compilerOptions;this.compilerOptions=e,this.setInternalCompilerOptionsForEmittingJsFiles(),null==(t=this.noDtsResolutionProject)||t.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()),id(n,e)&&(this.cachedUnresolvedImportsPerFile.clear(),this.lastCachedUnresolvedImportsList=void 0,this.resolutionCache.onChangesAffectModuleResolution(),this.moduleSpecifierCache.clear()),this.markAsDirty()}}setWatchOptions(e){this.watchOptions=e}getWatchOptions(){return this.watchOptions}setTypeAcquisition(e){e&&(this.typeAcquisition=this.removeLocalTypingsFromTypeAcquisition(e))}getTypeAcquisition(){return this.typeAcquisition||{}}getChangesSinceVersion(e,t){var n,r;const i=t?e=>$e(e.entries(),(([e,t])=>({fileName:e,isSourceOfProjectReferenceRedirect:t}))):e=>$e(e.keys());this.isInitialLoadPending()||Fme(this);const o={projectName:this.getProjectName(),version:this.projectProgramVersion,isInferred:Jfe(this),options:this.getCompilationSettings(),languageServiceDisabled:!this.languageServiceEnabled,lastFileExceededProgramSize:this.lastFileExceededProgramSize},a=this.updatedFileNames;if(this.updatedFileNames=void 0,this.lastReportedFileNames&&e===this.lastReportedVersion){if(this.projectProgramVersion===this.lastReportedVersion&&!a)return{info:o,projectErrors:this.getGlobalProjectErrors()};const e=this.lastReportedFileNames,r=(null==(n=this.externalFiles)?void 0:n.map((e=>({fileName:Qpe(e),isSourceOfProjectReferenceRedirect:!1}))))||Hpe,s=Ue(this.getFileNamesWithRedirectInfo(!!t).concat(r),(e=>e.fileName),(e=>e.isSourceOfProjectReferenceRedirect)),c=new Map,l=new Map,u=a?$e(a.keys()):[],_=[];return ld(s,((n,r)=>{e.has(r)?t&&n!==e.get(r)&&_.push({fileName:r,isSourceOfProjectReferenceRedirect:n}):c.set(r,n)})),ld(e,((e,t)=>{s.has(t)||l.set(t,e)})),this.lastReportedFileNames=s,this.lastReportedVersion=this.projectProgramVersion,{info:o,changes:{added:i(c),removed:i(l),updated:t?u.map((e=>({fileName:e,isSourceOfProjectReferenceRedirect:this.isSourceOfProjectReferenceRedirect(e)}))):u,updatedRedirects:t?_:void 0},projectErrors:this.getGlobalProjectErrors()}}{const e=this.getFileNamesWithRedirectInfo(!!t),n=(null==(r=this.externalFiles)?void 0:r.map((e=>({fileName:Qpe(e),isSourceOfProjectReferenceRedirect:!1}))))||Hpe,i=e.concat(n);return this.lastReportedFileNames=Ue(i,(e=>e.fileName),(e=>e.isSourceOfProjectReferenceRedirect)),this.lastReportedVersion=this.projectProgramVersion,{info:o,files:t?i:i.map((e=>e.fileName)),projectErrors:this.getGlobalProjectErrors()}}}removeRoot(e){this.rootFilesMap.delete(e.path)}isSourceOfProjectReferenceRedirect(e){return!!this.program&&this.program.isSourceOfProjectReferenceRedirect(e)}getGlobalPluginSearchPaths(){return[...this.projectService.pluginProbeLocations,Ko(this.projectService.getExecutingFilePath(),"../../..")]}enableGlobalPlugins(e){if(!this.projectService.globalPlugins.length)return;const t=this.projectService.host;if(!t.require&&!t.importPlugin)return void this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");const n=this.getGlobalPluginSearchPaths();for(const t of this.projectService.globalPlugins)t&&(e.plugins&&e.plugins.some((e=>e.name===t))||(this.projectService.logger.info(`Loading global plugin ${t}`),this.enablePlugin({name:t,global:!0},n)))}enablePlugin(e,t){this.projectService.requestEnablePlugin(this,e,t)}enableProxy(e,t){try{if("function"!=typeof e)return void this.projectService.logger.info(`Skipped loading plugin ${t.name} because it did not expose a proper factory function`);const n={config:t,project:this,languageService:this.languageService,languageServiceHost:this,serverHost:this.projectService.host,session:this.projectService.session},r=e({typescript:Ape}),i=r.create(n);for(const e of Object.keys(this.languageService))e in i||(this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${e} in created LS. Patching.`),i[e]=this.languageService[e]);this.projectService.logger.info("Plugin validation succeeded"),this.languageService=i,this.plugins.push({name:t.name,module:r})}catch(e){this.projectService.logger.info(`Plugin activation failed: ${e}`)}}onPluginConfigurationChanged(e,t){this.plugins.filter((t=>t.name===e)).forEach((e=>{e.module.onConfigurationChanged&&e.module.onConfigurationChanged(t)}))}refreshDiagnostics(){this.projectService.sendProjectsUpdatedInBackgroundEvent()}getPackageJsonsVisibleToFile(e,t){return 0!==this.projectService.serverMode?Hpe:this.projectService.getPackageJsonsVisibleToFile(e,this,t)}getNearestAncestorDirectoryWithPackageJson(e){return this.projectService.getNearestAncestorDirectoryWithPackageJson(e)}getPackageJsonsForAutoImport(e){return this.getPackageJsonsVisibleToFile(Ko(this.currentDirectory,rV),e)}getPackageJsonCache(){return this.projectService.packageJsonCache}getCachedExportInfoMap(){return this.exportMapCache||(this.exportMapCache=e0(this))}clearCachedExportInfoMap(){var e;null==(e=this.exportMapCache)||e.clear()}getModuleSpecifierCache(){return this.moduleSpecifierCache}includePackageJsonAutoImports(){return 0!==this.projectService.includePackageJsonAutoImports()&&this.languageServiceEnabled&&!SZ(this.currentDirectory)&&this.isDefaultProjectForOpenFiles()?this.projectService.includePackageJsonAutoImports():0}getHostForAutoImportProvider(){var e,t;return this.program?{fileExists:this.program.fileExists,directoryExists:this.program.directoryExists,realpath:this.program.realpath||(null==(e=this.projectService.host.realpath)?void 0:e.bind(this.projectService.host)),getCurrentDirectory:this.getCurrentDirectory.bind(this),readFile:this.projectService.host.readFile.bind(this.projectService.host),getDirectories:this.projectService.host.getDirectories.bind(this.projectService.host),trace:null==(t=this.projectService.host.trace)?void 0:t.bind(this.projectService.host),useCaseSensitiveFileNames:this.program.useCaseSensitiveFileNames(),readDirectory:this.projectService.host.readDirectory.bind(this.projectService.host)}:this.projectService.host}getPackageJsonAutoImportProvider(){var e,t,n;if(!1===this.autoImportProviderHost)return;if(0!==this.projectService.serverMode)return void(this.autoImportProviderHost=!1);if(this.autoImportProviderHost)return Fme(this.autoImportProviderHost),this.autoImportProviderHost.isEmpty()?(this.autoImportProviderHost.close(),void(this.autoImportProviderHost=void 0)):this.autoImportProviderHost.getCurrentProgram();const r=this.includePackageJsonAutoImports();if(r){null==(e=or)||e.push(or.Phase.Session,"getPackageJsonAutoImportProvider");const i=Yn();if(this.autoImportProviderHost=jfe.create(r,this,this.getHostForAutoImportProvider(),this.documentRegistry),this.autoImportProviderHost)return Fme(this.autoImportProviderHost),this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider",Yn()-i),null==(t=or)||t.pop(),this.autoImportProviderHost.getCurrentProgram();null==(n=or)||n.pop()}}isDefaultProjectForOpenFiles(){return!!ld(this.projectService.openFiles,((e,t)=>this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(t))===this))}watchNodeModulesForPackageJsonChanges(e){return this.projectService.watchPackageJsonsInNodeModules(e,this)}getIncompleteCompletionsCache(){return this.projectService.getIncompleteCompletionsCache()}getNoDtsResolutionProject(e){return xn.assert(0===this.projectService.serverMode),this.noDtsResolutionProject||(this.noDtsResolutionProject=new Mfe(this.projectService,this.documentRegistry,this.getCompilerOptionsForNoDtsResolutionProject(),this.currentDirectory)),this.noDtsResolutionProject.rootFile!==e&&(this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject,[e]),this.noDtsResolutionProject.rootFile=e),this.noDtsResolutionProject}runWithTemporaryFileUpdate(e,t,n){var r,i,o,a;const s=this.program,c=xn.checkDefined(null==(r=this.program)?void 0:r.getSourceFile(e),"Expected file to be part of program"),l=xn.checkDefined(c.getText());null==(i=this.getScriptInfo(e))||i.editContent(0,l.length,t),this.updateGraph();try{n(this.program,s,null==(o=this.program)?void 0:o.getSourceFile(e))}finally{null==(a=this.getScriptInfo(e))||a.editContent(0,this.program.getSourceFile(e).getText().length,l)}}getCompilerOptionsForNoDtsResolutionProject(){return{...this.getCompilerOptions(),noDtsResolution:!0,allowJs:!0,maxNodeModuleJsDepth:3,diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:u,lib:u,noLib:!0}}},Ofe=class extends Ife{constructor(e,t,n,r,i,o,a){super(e.newInferredProjectName(),0,e,t,void 0,void 0,n,!1,r,e.host,o),this._isJsInferredProject=!1,this.typeAcquisition=a,this.projectRootPath=i&&e.toCanonicalFileName(i),i||e.useSingleInferredProject||(this.canonicalCurrentDirectory=e.toCanonicalFileName(this.currentDirectory)),this.enableGlobalPlugins(this.getCompilerOptions())}toggleJsInferredProject(e){e!==this._isJsInferredProject&&(this._isJsInferredProject=e,this.setCompilerOptions())}setCompilerOptions(e){if(!e&&!this.getCompilationSettings())return;const t=eQ(e||this.getCompilationSettings());this._isJsInferredProject&&"number"!=typeof t.maxNodeModuleJsDepth?t.maxNodeModuleJsDepth=2:this._isJsInferredProject||(t.maxNodeModuleJsDepth=void 0),t.allowJs=!0,super.setCompilerOptions(t)}addRoot(e){xn.assert(e.isScriptOpen()),this.projectService.startWatchingConfigFilesForInferredProjectRoot(e),!this._isJsInferredProject&&e.isJavaScript()?this.toggleJsInferredProject(!0):this.isOrphan()&&this._isJsInferredProject&&!e.isJavaScript()&&this.toggleJsInferredProject(!1),super.addRoot(e)}removeRoot(e){this.projectService.stopWatchingConfigFilesForScriptInfo(e),super.removeRoot(e),!this.isOrphan()&&this._isJsInferredProject&&e.isJavaScript()&&x(this.getRootScriptInfos(),(e=>!e.isJavaScript()))&&this.toggleJsInferredProject(!1)}isOrphan(){return!this.hasRoots()}isProjectWithSingleRoot(){return!this.projectRootPath&&!this.projectService.useSingleInferredProject||1===this.getRootScriptInfos().length}close(){f(this.getRootScriptInfos(),(e=>this.projectService.stopWatchingConfigFilesForScriptInfo(e))),super.close()}getTypeAcquisition(){return this.typeAcquisition||{enable:Pfe(this),include:u,exclude:u}}},Mfe=class extends Ife{constructor(e,t,n,r){super(e.newAuxiliaryProjectName(),4,e,t,!1,void 0,n,!1,void 0,e.host,r)}isOrphan(){return!0}scheduleInvalidateResolutionsOfFailedLookupLocations(){}},Lfe=class e extends Ife{constructor(e,t,n,r){super(e.projectService.newAutoImportProviderProjectName(),3,e.projectService,n,!1,void 0,r,!1,e.getWatchOptions(),e.projectService.host,e.currentDirectory),this.hostProject=e,this.rootFileNames=t,this.useSourceOfProjectReferenceRedirect=Ze(this.hostProject,this.hostProject.useSourceOfProjectReferenceRedirect),this.getParsedCommandLine=Ze(this.hostProject,this.hostProject.getParsedCommandLine)}static getRootFileNames(e,t,n,r){var i,o;if(!e)return u;const a=t.getCurrentProgram();if(!a)return u;const s=Yn();let c,l;const _=Ko(t.currentDirectory,rV),d=t.getPackageJsonsForAutoImport(Ko(t.currentDirectory,_));for(const e of d)null==(i=e.dependencies)||i.forEach(((e,t)=>y(t))),null==(o=e.peerDependencies)||o.forEach(((e,t)=>y(t)));let p=0;if(c){const i=t.getSymlinkCache();for(const o of $e(c.keys())){if(2===e&&p>this.maxDependencies)return t.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`),u;const s=ij(o,t.currentDirectory,r,n,a.getModuleResolutionCache());if(s){const e=v(s,a,i);if(e){p+=h(e);continue}}if(!f([t.currentDirectory,t.getGlobalTypingsCacheLocation()],(e=>{if(e){const t=ij(`@types/${o}`,e,r,n,a.getModuleResolutionCache());if(t){const e=v(t,a,i);return p+=h(e),!0}}}))&&s&&r.allowJs&&r.maxNodeModuleJsDepth){const e=v(s,a,i,!0);p+=h(e)}}}const m=a.getResolvedProjectReferences();let g=0;return(null==m?void 0:m.length)&&t.projectService.getHostPreferences().includeCompletionsForModuleExports&&m.forEach((e=>{if(null==e?void 0:e.commandLine.options.outFile)g+=h(b([tT(e.commandLine.options.outFile,".d.ts")]));else if(e){const n=bt((()=>q$(e.commandLine,!t.useCaseSensitiveFileNames())));g+=h(b(q(e.commandLine.fileNames,(r=>QI(r)||Ao(r,".json")||a.getSourceFile(r)?void 0:M$(r,e.commandLine,!t.useCaseSensitiveFileNames(),n)))))}})),(null==l?void 0:l.size)&&t.log(`AutoImportProviderProject: found ${l.size} root files in ${p} dependencies ${g} referenced projects in ${Yn()-s} ms`),l?$e(l.values()):u;function h(e){return(null==e?void 0:e.length)?(l??(l=new Set),e.forEach((e=>l.add(e))),1):0}function y(e){an(e,"@types/")||(c||(c=new Set)).add(e)}function v(e,i,o,a){var s;const c=Uj(e,r,n,i.getModuleResolutionCache(),a);if(c){const r=null==(s=n.realpath)?void 0:s.call(n,e.packageDirectory),i=r?t.toPath(r):void 0,a=i&&i!==t.toPath(e.packageDirectory);return a&&o.setSymlinkedDirectory(e.packageDirectory,{real:ea(r),realPath:ea(i)}),b(c,a?t=>t.replace(e.packageDirectory,r):void 0)}}function b(e,t){return q(e,(e=>{const n=t?t(e):e;if(!(a.getSourceFile(n)||t&&a.getSourceFile(e)))return n}))}}static create(t,n,r,i){if(0===t)return;const o={...n.getCompilerOptions(),...this.compilerOptionsOverrides},a=this.getRootFileNames(t,n,r,o);return a.length?new e(n,a,i,o):void 0}isEmpty(){return!Q(this.rootFileNames)}isOrphan(){return!0}updateGraph(){let t=this.rootFileNames;t||(t=e.getRootFileNames(this.hostProject.includePackageJsonAutoImports(),this.hostProject,this.hostProject.getHostForAutoImportProvider(),this.getCompilationSettings())),this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this,t),this.rootFileNames=t;const n=this.getCurrentProgram(),r=super.updateGraph();return n&&n!==this.getCurrentProgram()&&this.hostProject.clearCachedExportInfoMap(),r}scheduleInvalidateResolutionsOfFailedLookupLocations(){}hasRoots(){var e;return!!(null==(e=this.rootFileNames)?void 0:e.length)}markAsDirty(){this.rootFileNames=void 0,super.markAsDirty()}getScriptFileNames(){return this.rootFileNames||u}getLanguageService(){throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`.")}onAutoImportProviderSettingsChanged(){throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead.")}onPackageJsonChange(){throw new Error("package.json changes should be notified on an AutoImportProvider's host project")}getHostForAutoImportProvider(){throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.")}getProjectReferences(){return this.hostProject.getProjectReferences()}includePackageJsonAutoImports(){return 0}getSymlinkCache(){return this.hostProject.getSymlinkCache()}getModuleResolutionCache(){var e;return null==(e=this.hostProject.getCurrentProgram())?void 0:e.getModuleResolutionCache()}};Lfe.maxDependencies=10,Lfe.compilerOptionsOverrides={diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:u,lib:u,noLib:!0};var jfe=Lfe,Rfe=class extends Ife{constructor(e,t,n,r,i,o){super(e,1,n,r,!1,void 0,{},!1,void 0,i,Ro(e)),this.canonicalConfigFilePath=t,this.openFileWatchTriggered=new Map,this.canConfigFileJsonReportNoInputFiles=!1,this.isInitialLoadPending=pt,this.sendLoadingProjectFinish=!1,this.pendingUpdateLevel=2,this.pendingUpdateReason=o}setCompilerHost(e){this.compilerHost=e}getCompilerHost(){return this.compilerHost}useSourceOfProjectReferenceRedirect(){return this.languageServiceEnabled}getParsedCommandLine(e){const t=Xo(e),n=this.projectService.toCanonicalFileName(t);let r=this.projectService.configFileExistenceInfoCache.get(n);return r||this.projectService.configFileExistenceInfoCache.set(n,r={exists:this.projectService.host.fileExists(t)}),this.projectService.ensureParsedConfigUptoDate(t,n,r,this),this.languageServiceEnabled&&0===this.projectService.serverMode&&this.projectService.watchWildcards(t,r,this),r.exists?r.config.parsedCommandLine:void 0}onReleaseParsedCommandLine(e){this.releaseParsedConfig(this.projectService.toCanonicalFileName(Xo(e)))}releaseParsedConfig(e){this.projectService.stopWatchingWildCards(e,this),this.projectService.releaseParsedConfig(e,this)}updateGraph(){if(this.deferredClose)return!1;const e=this.dirty;this.isInitialLoadPending=dt;const t=this.pendingUpdateLevel;let n;switch(this.pendingUpdateLevel=0,t){case 1:this.openFileWatchTriggered.clear(),n=this.projectService.reloadFileNamesOfConfiguredProject(this);break;case 2:this.openFileWatchTriggered.clear();const e=xn.checkDefined(this.pendingUpdateReason);this.projectService.reloadConfiguredProject(this,e),n=!0;break;default:n=super.updateGraph()}return this.compilerHost=void 0,this.projectService.sendProjectLoadingFinishEvent(this),this.projectService.sendProjectTelemetry(this),2!==t&&(!n||e&&this.triggerFileForConfigFileDiag&&2!==this.getCurrentProgram().structureIsReused)?this.triggerFileForConfigFileDiag||this.projectService.sendConfigFileDiagEvent(this,void 0,!1):this.triggerFileForConfigFileDiag=void 0,n}getCachedDirectoryStructureHost(){return this.directoryStructureHost}getConfigFilePath(){return this.getProjectName()}getProjectReferences(){return this.projectReferences}updateReferences(e){this.projectReferences=e,this.potentialProjectReferences=void 0}setPotentialProjectReference(e){xn.assert(this.isInitialLoadPending()),(this.potentialProjectReferences||(this.potentialProjectReferences=new Set)).add(e)}getResolvedProjectReferenceToRedirect(e){const t=this.getCurrentProgram();return t&&t.getResolvedProjectReferenceToRedirect(e)}forEachResolvedProjectReference(e){var t;return null==(t=this.getCurrentProgram())?void 0:t.forEachResolvedProjectReference(e)}enablePluginsWithOptions(e){var t;if(this.plugins.length=0,!(null==(t=e.plugins)?void 0:t.length)&&!this.projectService.globalPlugins.length)return;const n=this.projectService.host;if(!n.require&&!n.importPlugin)return void this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");const r=this.getGlobalPluginSearchPaths();if(this.projectService.allowLocalPluginLoads){const e=Ro(this.canonicalConfigFilePath);this.projectService.logger.info(`Local plugin loading enabled; adding ${e} to search paths`),r.unshift(e)}if(e.plugins)for(const t of e.plugins)this.enablePlugin(t,r);return this.enableGlobalPlugins(e)}getGlobalProjectErrors(){return F(this.projectErrors,(e=>!e.file))||Hpe}getAllProjectErrors(){return this.projectErrors||Hpe}setProjectErrors(e){this.projectErrors=e}close(){this.projectService.configFileExistenceInfoCache.forEach(((e,t)=>this.releaseParsedConfig(t))),this.projectErrors=void 0,this.openFileWatchTriggered.clear(),this.compilerHost=void 0,super.close()}markAsDirty(){this.deferredClose||super.markAsDirty()}isSolution(){return 0===this.getRootFilesMap().size&&!this.canConfigFileJsonReportNoInputFiles}isOrphan(){return!!this.deferredClose}getEffectiveTypeRoots(){return QL(this.getCompilationSettings(),this)||[]}updateErrorOnNoInputFiles(e){nL(e,this.getConfigFilePath(),this.getCompilerOptions().configFile.configFileSpecs,this.projectErrors,this.canConfigFileJsonReportNoInputFiles)}},Bfe=class extends Ife{constructor(e,t,n,r,i,o,a,s){super(e,2,t,n,!0,i,r,o,s,t.host,Ro(a||Vo(e))),this.externalProjectName=e,this.compileOnSaveEnabled=o,this.excludedFiles=[],this.enableGlobalPlugins(this.getCompilerOptions())}updateGraph(){const e=super.updateGraph();return this.projectService.sendProjectTelemetry(this),e}getExcludedFiles(){return this.excludedFiles}};function Jfe(e){return 0===e.projectKind}function zfe(e){return 1===e.projectKind}function $fe(e){return 2===e.projectKind}function qfe(e){return 3===e.projectKind||4===e.projectKind}function Vfe(e){return zfe(e)&&!!e.deferredClose}var Ufe=20971520,Kfe=4194304,Wfe="projectsUpdatedInBackground",Hfe="projectLoadingStart",Gfe="projectLoadingFinish",Xfe="largeFileReferenced",Qfe="configFileDiag",Yfe="projectLanguageServiceState",Zfe="projectInfo",eme="openFileInfo",tme="createFileWatcher",nme="createDirectoryWatcher",rme="closeFileWatcher",ime="*ensureProjectForOpenFiles*";function ome(e){const t=new Map;for(const n of e)if("object"==typeof n.type){const e=n.type;e.forEach((e=>{xn.assert("number"==typeof e)})),t.set(n.name,e)}return t}var ame=ome(bO),sme=ome(mO),cme=new Map(Object.entries({none:0,block:1,smart:2})),lme={jquery:{match:/jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i,types:["jquery"]},WinJS:{match:/^(.*\/winjs-[.\d]+)\/js\/base\.js$/i,exclude:[["^",1,"/.*"]],types:["winjs"]},Kendo:{match:/^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i,exclude:[["^",1,"/.*"]],types:["kendo-ui"]},"Office Nuget":{match:/^(.*\/office\/1)\/excel-\d+\.debug\.js$/i,exclude:[["^",1,"/.*"]],types:["office"]},References:{match:/^(.*\/_references\.js)$/i,exclude:[["^",1,"$"]]}};function ume(e){return st(e.indentStyle)&&(e.indentStyle=cme.get(e.indentStyle.toLowerCase()),xn.assert(void 0!==e.indentStyle)),e}function _me(e){return ame.forEach(((t,n)=>{const r=e[n];st(r)&&(e[n]=t.get(r.toLowerCase()))})),e}function dme(e,t){let n,r;return mO.forEach((i=>{const o=e[i.name];if(void 0===o)return;const a=sme.get(i.name);(n||(n={}))[i.name]=a?st(o)?a.get(o.toLowerCase()):o:fL(i,o,t||"",r||(r=[]))})),n&&{watchOptions:n,errors:r}}function pme(e){let t;return IO.forEach((n=>{const r=e[n.name];void 0!==r&&((t||(t={}))[n.name]=r)})),t}function fme(e){return st(e)?mme(e):e}function mme(e){switch(e){case"JS":return 1;case"JSX":return 2;case"TS":return 3;case"TSX":return 4;default:return 0}}function gme(e){const{lazyConfiguredProjectsFromExternalProject:t,...n}=e;return n}var hme={getFileName:e=>e,getScriptKind:(e,t)=>{let n;if(t){const r=zo(e);r&&Q(t,(e=>e.extension===r&&(n=e.scriptKind,!0)))}return n},hasMixedContent:(e,t)=>Q(t,(t=>t.isMixedContent&&Ao(e,t.extension)))},yme={getFileName:e=>e.fileName,getScriptKind:e=>fme(e.scriptKind),hasMixedContent:e=>!!e.hasMixedContent};function vme(e,t){for(const n of t)if(n.getProjectName()===e)return n}var bme={close:_t};function xme(e,t){if(t&&!Sme(e))return t.get(e.path)}function Sme(e){return!!e.configFileInfo}var kme=(e=>(e[e.Find=0]="Find",e[e.Create=1]="Create",e[e.Reload=2]="Reload",e))(kme||{});function Tme(e,t,n,r,i,o,a,s){var c;const l=null==(c=e.getCurrentProgram())?void 0:c.getResolvedProjectReferences();if(!l)return;const u=t?e.getResolvedProjectReferenceToRedirect(t):void 0;if(u){const t=Qpe(u.sourceFile.fileName),n=e.projectService.findConfiguredProjectByProjectName(t,o);if(n){const e=d(n);if(e)return e}else if(0!==r){const t=Cme(l,e.getCompilerOptions(),((e,t)=>u===e?_(e,t):void 0),r,e.projectService);if(t)return t}}return Cme(l,e.getCompilerOptions(),((e,t)=>u!==e?_(e,t):void 0),r,e.projectService);function _(t,c){const l=e.projectService.findCreateOrReloadConfiguredProject(Qpe(t.sourceFile.fileName),c,i,o,a,s);return l&&(c===r?n(l.project,l.sentConfigFileDiag):d(l.project))}function d(e){let t=!1;switch(r){case 1:t=Ime(e,a);break;case 2:t=e.projectService.reloadConfiguredProjectClearingSemanticCache(e,i,s);break;case 0:break;default:xn.assertNever(r)}const o=n(e,t);if(o)return o}}function Cme(e,t,n,r,i,o){const a=t.disableReferencedProjectLoad?0:r;return f(e,(e=>{if(!e)return;const t=Qpe(e.sourceFile.fileName),r=i.toCanonicalFileName(t),s=null==o?void 0:o.get(r);if(void 0!==s&&s>=a)return;return n(e,a)||((o||(o=new Map)).set(r,a),e.references&&Cme(e.references,e.commandLine.options,n,a,i,o))}))}function wme(e,t){return e.potentialProjectReferences&&ud(e.potentialProjectReferences,t)}function Dme(e,t,n){const r=n&&e.projectService.configuredProjects.get(n);return r&&t(r)}function Eme(e,t){return function(e,t,n,r){return e.getCurrentProgram()?e.forEachResolvedProjectReference(t):e.isInitialLoadPending()?wme(e,r):f(e.getProjectReferences(),n)}(e,(n=>Dme(e,t,n.sourceFile.path)),(n=>Dme(e,t,e.toPath(xV(n)))),(n=>Dme(e,t,n)))}function Pme(e,t){return`${st(t)?`Config: ${t} `:t?`Project: ${t.getProjectName()} `:""}WatchType: ${e}`}function Nme(e){return!e.isScriptOpen()&&void 0!==e.mTime}function Fme(e){return e.invalidateResolutionsOfFailedLookupLocations(),e.dirty&&!e.updateGraph()}function Ame(e,t,n){if(!n&&(e.invalidateResolutionsOfFailedLookupLocations(),!e.dirty))return!1;e.triggerFileForConfigFileDiag=t;const r=e.pendingUpdateLevel;if(e.updateGraph(),!e.triggerFileForConfigFileDiag&&!n)return 2===r;const i=e.projectService.sendConfigFileDiagEvent(e,t,n);return e.triggerFileForConfigFileDiag=void 0,i}function Ime(e,t){if(t){if(Ame(e,t,!1))return!0}else Fme(e);return!1}function Ome(e){return`Creating possible configured project for ${e.fileName} to open`}function Mme(e){return`User requested reload projects: ${e}`}function Lme(e){zfe(e)&&(e.projectOptions=!0)}function jme(e){let t=1;return()=>e(t++)}function Rme(){return{idToCallbacks:new Map,pathToId:new Map}}var Bme=class e{constructor(e){var t;this.filenameToScriptInfo=new Map,this.nodeModulesWatchers=new Map,this.filenameToScriptInfoVersion=new Map,this.allJsFilesForOpenFileTelemetry=new Map,this.externalProjectToConfiguredProjectMap=new Map,this.externalProjects=[],this.inferredProjects=[],this.configuredProjects=new Map,this.newInferredProjectName=jme(nfe),this.newAutoImportProviderProjectName=jme(rfe),this.newAuxiliaryProjectName=jme(ife),this.openFiles=new Map,this.configFileForOpenFiles=new Map,this.rootOfInferredProjects=new Set,this.openFilesWithNonRootedDiskPath=new Map,this.compilerOptionsForInferredProjectsPerProjectRoot=new Map,this.watchOptionsForInferredProjectsPerProjectRoot=new Map,this.typeAcquisitionForInferredProjectsPerProjectRoot=new Map,this.projectToSizeMap=new Map,this.configFileExistenceInfoCache=new Map,this.safelist=lme,this.legacySafelist=new Map,this.pendingProjectUpdates=new Map,this.pendingEnsureProjectForOpenFiles=!1,this.seenProjects=new Map,this.sharedExtendedConfigFileWatchers=new Map,this.extendedConfigCache=new Map,this.baseline=_t,this.verifyDocumentRegistry=_t,this.verifyProgram=_t,this.onProjectCreation=_t,this.host=e.host,this.logger=e.logger,this.cancellationToken=e.cancellationToken,this.useSingleInferredProject=e.useSingleInferredProject,this.useInferredProjectPerProjectRoot=e.useInferredProjectPerProjectRoot,this.typingsInstaller=e.typingsInstaller||Tfe,this.throttleWaitMilliseconds=e.throttleWaitMilliseconds,this.eventHandler=e.eventHandler,this.suppressDiagnosticEvents=e.suppressDiagnosticEvents,this.globalPlugins=e.globalPlugins||Hpe,this.pluginProbeLocations=e.pluginProbeLocations||Hpe,this.allowLocalPluginLoads=!!e.allowLocalPluginLoads,this.typesMapLocation=void 0===e.typesMapLocation?Ko(Ro(this.getExecutingFilePath()),"typesMap.json"):e.typesMapLocation,this.session=e.session,this.jsDocParsingMode=e.jsDocParsingMode,void 0!==e.serverMode?this.serverMode=e.serverMode:this.serverMode=0,this.host.realpath&&(this.realpathToScriptInfos=et()),this.currentDirectory=Qpe(this.host.getCurrentDirectory()),this.toCanonicalFileName=tn(this.host.useCaseSensitiveFileNames),this.globalCacheLocationDirectoryPath=this.typingsInstaller.globalTypingsCacheLocation?ea(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)):void 0,this.throttledOperations=new afe(this.host,this.logger),this.typesMapLocation?this.loadTypesMap():this.logger.info("No types map provided; using the default"),this.typingsInstaller.attach(this),this.typingsCache=new wfe(this.typingsInstaller),this.hostConfiguration={formatCodeOptions:rG(this.host.newLine),preferences:GH,hostInfo:"Unknown host",extraFileExtensions:[]},this.documentRegistry=C0(this.host.useCaseSensitiveFileNames,this.currentDirectory,this.jsDocParsingMode,this);const n=this.logger.hasLevel(3)?2:this.logger.loggingEnabled()?1:0,r=0!==n?e=>this.logger.info(e):_t;this.packageJsonCache=Vme(this),this.watchFactory=0!==this.serverMode?{watchFile:QU,watchDirectory:QU}:hq(function(e,t){if(!t||!e.eventHandler||!e.session)return;const n=Rme(),r=Rme(),i=Rme();let o=1;return e.session.addProtocolHandler("watchChange",(e=>{var t;return ot(t=e.arguments)?t.forEach(s):s(t),{responseRequired:!1}})),{watchFile:function(e,t){return a(n,e,t,(t=>({eventName:tme,data:{id:t,path:e}})))},watchDirectory:function(e,t,n){return a(n?i:r,e,t,(t=>({eventName:nme,data:{id:t,path:e,recursive:!!n,ignoreUpdate:!e.endsWith("/node_modules")||void 0}})))},getCurrentDirectory:()=>e.host.getCurrentDirectory(),useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames};function a({pathToId:t,idToCallbacks:n},r,i,a){const s=e.toPath(r);let c=t.get(s);c||t.set(s,c=o++);let l=n.get(c);return l||(n.set(c,l=new Set),e.eventHandler(a(c))),l.add(i),{close(){const r=n.get(c);(null==r?void 0:r.delete(i))&&(r.size||(n.delete(c),t.delete(s),e.eventHandler({eventName:rme,data:{id:c}})))}}}function s({id:e,created:t,deleted:n,updated:r}){c(e,t,0),c(e,n,2),c(e,r,1)}function c(e,t,o){(null==t?void 0:t.length)&&(l(n,e,t,((e,t)=>e(t,o))),l(r,e,t,((e,t)=>e(t))),l(i,e,t,((e,t)=>e(t))))}function l(e,t,n,r){var i;null==(i=e.idToCallbacks.get(t))||i.forEach((e=>{n.forEach((t=>r(e,Vo(t))))}))}}(this,e.canUseWatchEvents)||this.host,n,r,Pme),null==(t=e.incrementalVerifier)||t.call(e,this)}toPath(e){return Yo(e,this.currentDirectory,this.toCanonicalFileName)}getExecutingFilePath(){return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath())}getNormalizedAbsolutePath(e){return Go(e,this.host.getCurrentDirectory())}setDocument(e,t,n){xn.checkDefined(this.getScriptInfoForPath(t)).cacheSourceFile={key:e,sourceFile:n}}getDocument(e,t){const n=this.getScriptInfoForPath(t);return n&&n.cacheSourceFile&&n.cacheSourceFile.key===e?n.cacheSourceFile.sourceFile:void 0}ensureInferredProjectsUpToDate_TestOnly(){this.ensureProjectStructuresUptoDate()}getCompilerOptionsForInferredProjects(){return this.compilerOptionsForInferredProjects}onUpdateLanguageServiceStateForProject(e,t){if(!this.eventHandler)return;const n={eventName:Yfe,data:{project:e,languageServiceEnabled:t}};this.eventHandler(n)}loadTypesMap(){try{const e=this.host.readFile(this.typesMapLocation);if(void 0===e)return void this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`);const t=JSON.parse(e);for(const e of Object.keys(t.typesMap))t.typesMap[e].match=new RegExp(t.typesMap[e].match,"i");this.safelist=t.typesMap;for(const e in t.simpleMap)Le(t.simpleMap,e)&&this.legacySafelist.set(e,t.simpleMap[e].toLowerCase())}catch(e){this.logger.info(`Error loading types map: ${e}`),this.safelist=lme,this.legacySafelist.clear()}}updateTypingsForProject(e){const t=this.findProject(e.projectName);if(t)switch(e.kind){case hH:return void t.updateTypingFiles(this.typingsCache.updateTypingsForProject(e.projectName,e.compilerOptions,e.typeAcquisition,e.unresolvedImports,e.typings));case yH:return void this.typingsCache.enqueueInstallTypingsForProject(t,t.lastCachedUnresolvedImportsList,!0)}}watchTypingLocations(e){var t;null==(t=this.findProject(e.projectName))||t.watchTypingLocations(e.files)}delayEnsureProjectForOpenFiles(){this.openFiles.size&&(this.pendingEnsureProjectForOpenFiles=!0,this.throttledOperations.schedule(ime,2500,(()=>{0!==this.pendingProjectUpdates.size?this.delayEnsureProjectForOpenFiles():this.pendingEnsureProjectForOpenFiles&&(this.ensureProjectForOpenFiles(),this.sendProjectsUpdatedInBackgroundEvent())})))}delayUpdateProjectGraph(e){if(Vfe(e))return;if(e.markAsDirty(),qfe(e))return;const t=e.getProjectName();this.pendingProjectUpdates.set(t,e),this.throttledOperations.schedule(t,250,(()=>{this.pendingProjectUpdates.delete(t)&&Fme(e)}))}hasPendingProjectUpdate(e){return this.pendingProjectUpdates.has(e.getProjectName())}sendProjectsUpdatedInBackgroundEvent(){if(!this.eventHandler)return;const e={eventName:Wfe,data:{openFiles:$e(this.openFiles.keys(),(e=>this.getScriptInfoForPath(e).fileName))}};this.eventHandler(e)}sendLargeFileReferencedEvent(e,t){if(!this.eventHandler)return;const n={eventName:Xfe,data:{file:e,fileSize:t,maxFileSize:Kfe}};this.eventHandler(n)}sendProjectLoadingStartEvent(e,t){if(!this.eventHandler)return;e.sendLoadingProjectFinish=!0;const n={eventName:Hfe,data:{project:e,reason:t}};this.eventHandler(n)}sendProjectLoadingFinishEvent(e){if(!this.eventHandler||!e.sendLoadingProjectFinish)return;e.sendLoadingProjectFinish=!1;const t={eventName:Gfe,data:{project:e}};this.eventHandler(t)}sendPerformanceEvent(e,t){this.performanceEventHandler&&this.performanceEventHandler({kind:e,durationMs:t})}delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(e){this.delayUpdateProjectGraph(e),this.delayEnsureProjectForOpenFiles()}delayUpdateProjectGraphs(e,t){if(e.length){for(const n of e)t&&n.clearSourceMapperCache(),this.delayUpdateProjectGraph(n);this.delayEnsureProjectForOpenFiles()}}setCompilerOptionsForInferredProjects(e,t){xn.assert(void 0===t||this.useInferredProjectPerProjectRoot,"Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled");const n=_me(e),r=dme(e,t),i=pme(e);n.allowNonTsExtensions=!0;const o=t&&this.toCanonicalFileName(t);o?(this.compilerOptionsForInferredProjectsPerProjectRoot.set(o,n),this.watchOptionsForInferredProjectsPerProjectRoot.set(o,r||!1),this.typeAcquisitionForInferredProjectsPerProjectRoot.set(o,i)):(this.compilerOptionsForInferredProjects=n,this.watchOptionsForInferredProjects=r,this.typeAcquisitionForInferredProjects=i);for(const e of this.inferredProjects)(o?e.projectRootPath!==o:e.projectRootPath&&this.compilerOptionsForInferredProjectsPerProjectRoot.has(e.projectRootPath))||(e.setCompilerOptions(n),e.setTypeAcquisition(i),e.setWatchOptions(null==r?void 0:r.watchOptions),e.setProjectErrors(null==r?void 0:r.errors),e.compileOnSaveEnabled=n.compileOnSave,e.markAsDirty(),this.delayUpdateProjectGraph(e));this.delayEnsureProjectForOpenFiles()}findProject(e){if(void 0!==e)return tfe(e)?vme(e,this.inferredProjects):this.findExternalProjectByProjectName(e)||this.findConfiguredProjectByProjectName(Qpe(e))}forEachProject(e){this.externalProjects.forEach(e),this.configuredProjects.forEach(e),this.inferredProjects.forEach(e)}forEachEnabledProject(e){this.forEachProject((t=>{!t.isOrphan()&&t.languageServiceEnabled&&e(t)}))}getDefaultProjectForFile(e,t){return t?this.ensureDefaultProjectForFile(e):this.tryGetDefaultProjectForFile(e)}tryGetDefaultProjectForFile(e){const t=st(e)?this.getScriptInfoForNormalizedPath(e):e;return t&&!t.isOrphan()?t.getDefaultProject():void 0}tryGetDefaultProjectForEnsuringConfiguredProjectForFile(e){var t;const n=st(e)?this.getScriptInfoForNormalizedPath(e):e;if(n)return(null==(t=this.pendingOpenFileProjectUpdates)?void 0:t.delete(n.path))&&(this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(n,1),n.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(n,this.openFiles.get(n.path))),this.tryGetDefaultProjectForFile(n)}ensureDefaultProjectForFile(e){return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(e)||this.doEnsureDefaultProjectForFile(e)}doEnsureDefaultProjectForFile(e){this.ensureProjectStructuresUptoDate();const t=st(e)?this.getScriptInfoForNormalizedPath(e):e;return t?t.getDefaultProject():(this.logErrorForScriptInfoNotFound(st(e)?e:e.fileName),Upe.ThrowNoProject())}getScriptInfoEnsuringProjectsUptoDate(e){return this.ensureProjectStructuresUptoDate(),this.getScriptInfo(e)}ensureProjectStructuresUptoDate(){let e=this.pendingEnsureProjectForOpenFiles;this.pendingProjectUpdates.clear();const t=t=>{e=Fme(t)||e};this.externalProjects.forEach(t),this.configuredProjects.forEach(t),this.inferredProjects.forEach(t),e&&this.ensureProjectForOpenFiles()}getFormatCodeOptions(e){const t=this.getScriptInfoForNormalizedPath(e);return t&&t.getFormatCodeSettings()||this.hostConfiguration.formatCodeOptions}getPreferences(e){const t=this.getScriptInfoForNormalizedPath(e);return{...this.hostConfiguration.preferences,...t&&t.getPreferences()}}getHostFormatCodeOptions(){return this.hostConfiguration.formatCodeOptions}getHostPreferences(){return this.hostConfiguration.preferences}onSourceFileChanged(e,t){xn.assert(!e.isScriptOpen()),2===t?this.handleDeletedFile(e,!0):(e.deferredDelete&&(e.deferredDelete=void 0),e.delayReloadNonMixedContentFile(),this.delayUpdateProjectGraphs(e.containingProjects,!1),this.handleSourceMapProjects(e))}handleSourceMapProjects(e){if(e.sourceMapFilePath)if(st(e.sourceMapFilePath)){const t=this.getScriptInfoForPath(e.sourceMapFilePath);this.delayUpdateSourceInfoProjects(null==t?void 0:t.sourceInfos)}else this.delayUpdateSourceInfoProjects(e.sourceMapFilePath.sourceInfos);this.delayUpdateSourceInfoProjects(e.sourceInfos),e.declarationInfoPath&&this.delayUpdateProjectsOfScriptInfoPath(e.declarationInfoPath)}delayUpdateSourceInfoProjects(e){e&&e.forEach(((e,t)=>this.delayUpdateProjectsOfScriptInfoPath(t)))}delayUpdateProjectsOfScriptInfoPath(e){const t=this.getScriptInfoForPath(e);t&&this.delayUpdateProjectGraphs(t.containingProjects,!0)}handleDeletedFile(e,t){xn.assert(!e.isScriptOpen()),this.delayUpdateProjectGraphs(e.containingProjects,!1),this.handleSourceMapProjects(e),e.detachAllProjects(),t?(e.delayReloadNonMixedContentFile(),e.deferredDelete=!0):this.deleteScriptInfo(e)}watchWildcardDirectory(e,t,n,r){let i=this.watchFactory.watchDirectory(e,(t=>{const i=this.toPath(t),a=r.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(t,i);if("package.json"===Bo(i)&&!SZ(i)&&(a&&a.fileExists||!a&&this.host.fileExists(t))){const e=this.getNormalizedAbsolutePath(t);this.logger.info(`Config: ${n} Detected new package.json: ${e}`),this.packageJsonCache.addOrUpdate(e,i),this.watchPackageJsonFile(e,i,o)}const s=this.findConfiguredProjectByProjectName(n);fq({watchedDirPath:this.toPath(e),fileOrDirectory:t,fileOrDirectoryPath:i,configFileName:n,extraFileExtensions:this.hostConfiguration.extraFileExtensions,currentDirectory:this.currentDirectory,options:r.parsedCommandLine.options,program:(null==s?void 0:s.getCurrentProgram())||r.parsedCommandLine.fileNames,useCaseSensitiveFileNames:this.host.useCaseSensitiveFileNames,writeLog:e=>this.logger.info(e),toPath:e=>this.toPath(e),getScriptKind:s?e=>s.getScriptKind(e):void 0})||(2!==r.updateLevel&&(r.updateLevel=1),r.projects.forEach(((e,t)=>{var r;if(!e)return;const o=this.getConfiguredProjectByCanonicalConfigFilePath(t);if(!o)return;if(s!==o&&this.getHostPreferences().includeCompletionsForModuleExports){const e=this.toPath(n);S(null==(r=o.getCurrentProgram())?void 0:r.getResolvedProjectReferences(),(t=>(null==t?void 0:t.sourceFile.path)===e))&&o.markAutoImportProviderAsDirty()}const a=s===o?1:0;if(!(o.pendingUpdateLevel>a))if(this.openFiles.has(i))if(xn.checkDefined(this.getScriptInfoForPath(i)).isAttached(o)){const e=Math.max(a,o.openFileWatchTriggered.get(i)||0);o.openFileWatchTriggered.set(i,e)}else o.pendingUpdateLevel=a,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(o);else o.pendingUpdateLevel=a,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(o)})))}),t,this.getWatchOptionsFromProjectWatchOptions(r.parsedCommandLine.watchOptions,Ro(n)),ZU.WildcardDirectory,n);const o={packageJsonWatches:void 0,close(){var e;i&&(i.close(),i=void 0,null==(e=o.packageJsonWatches)||e.forEach((e=>{e.projects.delete(o),e.close()})),o.packageJsonWatches=void 0)}};return o}delayUpdateProjectsFromParsedConfigOnConfigFileChange(e,t){const n=this.configFileExistenceInfoCache.get(e);if(!(null==n?void 0:n.config))return!1;let r=!1;return n.config.updateLevel=2,n.config.projects.forEach(((n,i)=>{var o;const a=this.getConfiguredProjectByCanonicalConfigFilePath(i);if(a)if(r=!0,i===e){if(a.isInitialLoadPending())return;a.pendingUpdateLevel=2,a.pendingUpdateReason=t,this.delayUpdateProjectGraph(a),a.markAutoImportProviderAsDirty()}else{const t=this.toPath(e);a.resolutionCache.removeResolutionsFromProjectReferenceRedirects(t),this.delayUpdateProjectGraph(a),this.getHostPreferences().includeCompletionsForModuleExports&&S(null==(o=a.getCurrentProgram())?void 0:o.getResolvedProjectReferences(),(e=>(null==e?void 0:e.sourceFile.path)===t))&&a.markAutoImportProviderAsDirty()}})),r}onConfigFileChanged(e,t,n){const r=this.configFileExistenceInfoCache.get(t),i=this.getConfiguredProjectByCanonicalConfigFilePath(t),o=null==i?void 0:i.deferredClose;2===n?(r.exists=!1,i&&(i.deferredClose=!0)):(r.exists=!0,o&&(i.deferredClose=void 0,i.markAsDirty())),this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(t,"Change in config file detected");const a=new Set(i?[i]:void 0);this.openFiles.forEach(((t,n)=>{var i,o;const s=this.configFileForOpenFiles.get(n);if(!(null==(i=r.openFilesImpactedByConfigFile)?void 0:i.has(n)))return;this.configFileForOpenFiles.delete(n);const c=this.getScriptInfoForPath(n),l=this.getConfigFileNameForFile(c,!1);if(!l)return;const u=this.findConfiguredProjectByProjectName(l)??this.createConfiguredProject(l,`Change in config file ${e} detected, ${Ome(c)}`);(null==(o=this.pendingOpenFileProjectUpdates)?void 0:o.has(n))||(this.pendingOpenFileProjectUpdates??(this.pendingOpenFileProjectUpdates=new Map)).set(n,s),W(a,u)&&u.isInitialLoadPending()&&this.delayUpdateProjectGraph(u)})),this.delayEnsureProjectForOpenFiles()}removeProject(e){switch(this.logger.info("`remove Project::"),e.print(!0,!0,!1),e.close(),xn.shouldAssert(1)&&this.filenameToScriptInfo.forEach((t=>xn.assert(!t.isAttached(e),"Found script Info still attached to project",(()=>`${e.projectName}: ScriptInfos still attached: ${JSON.stringify($e(V(this.filenameToScriptInfo.values(),(t=>t.isAttached(e)?{fileName:t.fileName,projects:t.containingProjects.map((e=>e.projectName)),hasMixedContent:t.hasMixedContent}:void 0))),void 0," ")}`)))),this.pendingProjectUpdates.delete(e.getProjectName()),e.projectKind){case 2:en(this.externalProjects,e),this.projectToSizeMap.delete(e.getProjectName());break;case 1:this.configuredProjects.delete(e.canonicalConfigFilePath),this.projectToSizeMap.delete(e.canonicalConfigFilePath);break;case 0:en(this.inferredProjects,e)}}assignOrphanScriptInfoToInferredProject(e,t){xn.assert(e.isOrphan());const n=this.getOrCreateInferredProjectForProjectRootPathIfEnabled(e,t)||this.getOrCreateSingleInferredProjectIfEnabled()||this.getOrCreateSingleInferredWithoutProjectRoot(e.isDynamic?t||this.currentDirectory:Ro(wo(e.fileName)?e.fileName:Go(e.fileName,t?this.getNormalizedAbsolutePath(t):this.currentDirectory)));if(n.addRoot(e),e.containingProjects[0]!==n&&(Qt(e.containingProjects,n),e.containingProjects.unshift(n)),n.updateGraph(),!this.useSingleInferredProject&&!n.projectRootPath)for(const e of this.inferredProjects){if(e===n||e.isOrphan())continue;const t=e.getRootScriptInfos();xn.assert(1===t.length||!!e.projectRootPath),1===t.length&&f(t[0].containingProjects,(e=>e!==t[0].containingProjects[0]&&!e.isOrphan()))&&e.removeFile(t[0],!0,!0)}return n}assignOrphanScriptInfosToInferredProject(){this.openFiles.forEach(((e,t)=>{const n=this.getScriptInfoForPath(t);n.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(n,e)}))}closeOpenFile(e,t){var n;const r=!e.isDynamic&&this.host.fileExists(e.fileName);e.close(r),this.stopWatchingConfigFilesForScriptInfo(e);const i=this.toCanonicalFileName(e.fileName);this.openFilesWithNonRootedDiskPath.get(i)===e&&this.openFilesWithNonRootedDiskPath.delete(i);let o=!1;for(const t of e.containingProjects){if(zfe(t)){e.hasMixedContent&&e.registerFileUpdate();const n=t.openFileWatchTriggered.get(e.path);void 0!==n&&(t.openFileWatchTriggered.delete(e.path),t.pendingUpdateLevelthis.onConfigFileChanged(e,t,r)),2e3,this.getWatchOptionsFromProjectWatchOptions(null==(i=null==(r=null==o?void 0:o.config)?void 0:r.parsedCommandLine)?void 0:i.watchOptions,Ro(e)),ZU.ConfigFile,n));const a=o.config.projects;a.set(n.canonicalConfigFilePath,a.get(n.canonicalConfigFilePath)||!1)}releaseParsedConfig(e,t){var n,r,i;const o=this.configFileExistenceInfoCache.get(e);(null==(n=o.config)?void 0:n.projects.delete(t.canonicalConfigFilePath))&&((null==(r=o.config)?void 0:r.projects.size)||(o.config=void 0,uq(e,this.sharedExtendedConfigFileWatchers),xn.checkDefined(o.watcher),(null==(i=o.openFilesImpactedByConfigFile)?void 0:i.size)?o.inferredProjectRoots?pU($o(Ro(e)))||(o.watcher.close(),o.watcher=bme):(o.watcher.close(),o.watcher=void 0):(o.watcher.close(),this.configFileExistenceInfoCache.delete(e))))}stopWatchingConfigFilesForScriptInfo(e){if(0!==this.serverMode)return;const t=this.rootOfInferredProjects.delete(e),n=e.isScriptOpen();n&&!t||this.forEachConfigFileLocation(e,(r=>{var i,o,a;const s=this.configFileExistenceInfoCache.get(r);if(s){if(n){if(!(null==(i=null==s?void 0:s.openFilesImpactedByConfigFile)?void 0:i.has(e.path)))return}else if(!(null==(o=s.openFilesImpactedByConfigFile)?void 0:o.delete(e.path)))return;t&&(s.inferredProjectRoots--,!s.watcher||s.config||s.inferredProjectRoots||(s.watcher.close(),s.watcher=void 0)),(null==(a=s.openFilesImpactedByConfigFile)?void 0:a.size)||s.config||(xn.assert(!s.watcher),this.configFileExistenceInfoCache.delete(r))}}))}startWatchingConfigFilesForInferredProjectRoot(e){0===this.serverMode&&(xn.assert(e.isScriptOpen()),this.rootOfInferredProjects.add(e),this.forEachConfigFileLocation(e,((t,n)=>{let r=this.configFileExistenceInfoCache.get(t);r?r.inferredProjectRoots=(r.inferredProjectRoots??0)+1:(r={exists:this.host.fileExists(n),inferredProjectRoots:1},this.configFileExistenceInfoCache.set(t,r)),(r.openFilesImpactedByConfigFile??(r.openFilesImpactedByConfigFile=new Set)).add(e.path),r.watcher||(r.watcher=pU($o(Ro(t)))?this.watchFactory.watchFile(n,((e,r)=>this.onConfigFileChanged(n,t,r)),2e3,this.hostConfiguration.watchOptions,ZU.ConfigFileForInferredRoot):bme)})))}forEachConfigFileLocation(e,t){if(0!==this.serverMode)return;xn.assert(!e.containingProjects||this.openFiles.has(e.path));const n=this.openFiles.get(e.path);if(xn.checkDefined(this.getScriptInfo(e.path)).isDynamic)return;let r=Ro(e.fileName);const i=()=>la(n,r,this.currentDirectory,!this.host.useCaseSensitiveFileNames),o=!n||!i();let a=!Sme(e);do{if(a){const e=Ype(r,this.currentDirectory,this.toCanonicalFileName),n=Ko(r,"tsconfig.json");let i=t(Ko(e,"tsconfig.json"),n);if(i)return n;const o=Ko(r,"jsconfig.json");if(i=t(Ko(e,"jsconfig.json"),o),i)return o;if(ha(e))break}const e=Ro(r);if(e===r)break;r=e,a=!0}while(o||i())}findDefaultConfiguredProject(e){var t;return e.isScriptOpen()?null==(t=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(e,0))?void 0:t.defaultProject:void 0}getConfigFileNameForFileFromCache(e,t){if(t){const t=xme(e,this.pendingOpenFileProjectUpdates);if(void 0!==t)return t}return xme(e,this.configFileForOpenFiles)}setConfigFileNameForFileInCache(e,t){this.openFiles.has(e.path)&&(Sme(e)||this.configFileForOpenFiles.set(e.path,t||!1))}getConfigFileNameForFile(e,t){const n=this.getConfigFileNameForFileFromCache(e,t);if(void 0!==n)return n||void 0;if(t)return;const r=this.forEachConfigFileLocation(e,((t,n)=>this.configFileExists(n,t,e)));return this.logger.info(`getConfigFileNameForFile:: File: ${e.fileName} ProjectRootPath: ${this.openFiles.get(e.path)}:: Result: ${r}`),this.setConfigFileNameForFileInCache(e,r),r}printProjects(){this.logger.hasLevel(1)&&(this.logger.startGroup(),this.externalProjects.forEach($me),this.configuredProjects.forEach($me),this.inferredProjects.forEach($me),this.logger.info("Open files: "),this.openFiles.forEach(((e,t)=>{const n=this.getScriptInfoForPath(t);this.logger.info(`\tFileName: ${n.fileName} ProjectRootPath: ${e}`),this.logger.info(`\t\tProjects: ${n.containingProjects.map((e=>e.getProjectName()))}`)})),this.logger.endGroup())}findConfiguredProjectByProjectName(e,t){const n=this.toCanonicalFileName(e),r=this.getConfiguredProjectByCanonicalConfigFilePath(n);return t?r:(null==r?void 0:r.deferredClose)?void 0:r}getConfiguredProjectByCanonicalConfigFilePath(e){return this.configuredProjects.get(e)}findExternalProjectByProjectName(e){return vme(e,this.externalProjects)}getFilenameForExceededTotalSizeLimitForNonTsFiles(e,t,n,r){if(t&&t.disableSizeLimit||!this.host.getFileSize)return;let i=Ufe;this.projectToSizeMap.set(e,0),this.projectToSizeMap.forEach((e=>i-=e||0));let o=0;for(const e of n){const t=r.getFileName(e);if(!Vk(t)&&(o+=this.host.getFileSize(t),o>Ufe||o>i)){const e=n.map((e=>r.getFileName(e))).filter((e=>!Vk(e))).map((e=>({name:e,size:this.host.getFileSize(e)}))).sort(((e,t)=>t.size-e.size)).slice(0,5);return this.logger.info(`Non TS file size exceeded limit (${o}). Largest files: ${e.map((e=>`${e.name}:${e.size}`)).join(", ")}`),t}}this.projectToSizeMap.set(e,o)}createExternalProject(e,t,n,r,i){const o=_me(n),a=dme(n,Ro(Vo(e))),s=new Bfe(e,this,this.documentRegistry,o,this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e,o,t,yme),void 0===n.compileOnSave||n.compileOnSave,void 0,null==a?void 0:a.watchOptions);return s.setProjectErrors(null==a?void 0:a.errors),s.excludedFiles=i,this.addFilesToNonInferredProject(s,t,yme,r),this.externalProjects.push(s),s}sendProjectTelemetry(e){if(this.seenProjects.has(e.projectName))return void Lme(e);if(this.seenProjects.set(e.projectName,!0),!this.eventHandler||!this.host.createSHA256Hash)return void Lme(e);const t=zfe(e)?e.projectOptions:void 0;Lme(e);const n={projectId:this.host.createSHA256Hash(e.projectName),fileStats:Efe(e.getScriptInfos(),!0),compilerOptions:IL(e.getCompilationSettings()),typeAcquisition:function({enable:e,include:t,exclude:n}){return{enable:e,include:void 0!==t&&0!==t.length,exclude:void 0!==n&&0!==n.length}}(e.getTypeAcquisition()),extends:t&&t.configHasExtendsProperty,files:t&&t.configHasFilesProperty,include:t&&t.configHasIncludeProperty,exclude:t&&t.configHasExcludeProperty,compileOnSave:e.compileOnSaveEnabled,configFileName:zfe(e)&&cfe(e.getConfigFilePath())||"other",projectType:e instanceof Bfe?"external":"configured",languageServiceEnabled:e.languageServiceEnabled,version:c};this.eventHandler({eventName:Zfe,data:n})}addFilesToNonInferredProject(e,t,n,r){this.updateNonInferredProjectFiles(e,t,n),e.setTypeAcquisition(r),e.markAsDirty()}createConfiguredProject(e,t){var n;null==(n=or)||n.instant(or.Phase.Session,"createConfiguredProject",{configFilePath:e}),this.logger.info(`Creating configuration project ${e}`);const r=this.toCanonicalFileName(e);let i=this.configFileExistenceInfoCache.get(r);i?i.exists=!0:this.configFileExistenceInfoCache.set(r,i={exists:!0}),i.config||(i.config={cachedDirectoryStructureHost:sq(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),projects:new Map,updateLevel:2});const o=new Rfe(e,r,this,this.documentRegistry,i.config.cachedDirectoryStructureHost,t);return xn.assert(!this.configuredProjects.has(r)),this.configuredProjects.set(r,o),this.createConfigFileWatcherForParsedConfig(e,r,o),o}loadConfiguredProject(e,t){var n,r;null==(n=or)||n.push(or.Phase.Session,"loadConfiguredProject",{configFilePath:e.canonicalConfigFilePath}),this.sendProjectLoadingStartEvent(e,t);const i=Xo(e.getConfigFilePath()),o=this.ensureParsedConfigUptoDate(i,e.canonicalConfigFilePath,this.configFileExistenceInfoCache.get(e.canonicalConfigFilePath),e),a=o.config.parsedCommandLine;xn.assert(!!a.fileNames);const s=a.options;e.projectOptions||(e.projectOptions={configHasExtendsProperty:void 0!==a.raw.extends,configHasFilesProperty:void 0!==a.raw.files,configHasIncludeProperty:void 0!==a.raw.include,configHasExcludeProperty:void 0!==a.raw.exclude}),e.canConfigFileJsonReportNoInputFiles=tL(a.raw),e.setProjectErrors(a.options.configFile.parseDiagnostics),e.updateReferences(a.projectReferences);const c=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e.canonicalConfigFilePath,s,a.fileNames,hme);c?(e.disableLanguageService(c),this.configFileExistenceInfoCache.forEach(((t,n)=>this.stopWatchingWildCards(n,e)))):(e.setCompilerOptions(s),e.setWatchOptions(a.watchOptions),e.enableLanguageService(),this.watchWildcards(i,o,e)),e.enablePluginsWithOptions(s);const l=a.fileNames.concat(e.getExternalFiles(2));this.updateRootAndOptionsOfNonInferredProject(e,l,hme,s,a.typeAcquisition,a.compileOnSave,a.watchOptions),null==(r=or)||r.pop()}ensureParsedConfigUptoDate(e,t,n,r){var i,o,a;if(n.config){if(!n.config.updateLevel)return n;if(1===n.config.updateLevel)return this.reloadFileNamesOfParsedConfig(e,n.config),n}const s=(null==(i=n.config)?void 0:i.cachedDirectoryStructureHost)||sq(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),c=oM(e,(e=>this.host.readFile(e))),l=$I(e,st(c)?c:""),u=l.parseDiagnostics;st(c)||u.push(c);const _=Ro(e),d=JM(l,s,_,void 0,e,void 0,this.hostConfiguration.extraFileExtensions,this.extendedConfigCache);d.errors.length&&u.push(...d.errors),this.logger.info(`Config: ${e} : ${JSON.stringify({rootNames:d.fileNames,options:d.options,watchOptions:d.watchOptions,projectReferences:d.projectReferences},void 0," ")}`);const p=null==(o=n.config)?void 0:o.parsedCommandLine;return n.config?(n.config.parsedCommandLine=d,n.config.watchedDirectoriesStale=!0,n.config.updateLevel=void 0):n.config={parsedCommandLine:d,cachedDirectoryStructureHost:s,projects:new Map},p||bT(this.getWatchOptionsFromProjectWatchOptions(void 0,_),this.getWatchOptionsFromProjectWatchOptions(d.watchOptions,_))||(null==(a=n.watcher)||a.close(),n.watcher=void 0),this.createConfigFileWatcherForParsedConfig(e,t,r),lq(t,d.options,this.sharedExtendedConfigFileWatchers,((t,n)=>this.watchFactory.watchFile(t,(()=>{var e;_q(this.extendedConfigCache,n,(e=>this.toPath(e)));let r=!1;null==(e=this.sharedExtendedConfigFileWatchers.get(n))||e.projects.forEach((e=>{r=this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(e,`Change in extended config file ${t} detected`)||r})),r&&this.delayEnsureProjectForOpenFiles()}),2e3,this.hostConfiguration.watchOptions,ZU.ExtendedConfigFile,e)),(e=>this.toPath(e))),n}watchWildcards(e,{exists:t,config:n},r){if(n.projects.set(r.canonicalConfigFilePath,!0),t){if(n.watchedDirectories&&!n.watchedDirectoriesStale)return;n.watchedDirectoriesStale=!1,pq(n.watchedDirectories||(n.watchedDirectories=new Map),n.parsedCommandLine.wildcardDirectories,((t,r)=>this.watchWildcardDirectory(t,r,e,n)))}else{if(n.watchedDirectoriesStale=!1,!n.watchedDirectories)return;xx(n.watchedDirectories,vq),n.watchedDirectories=void 0}}stopWatchingWildCards(e,t){const n=this.configFileExistenceInfoCache.get(e);n.config&&n.config.projects.get(t.canonicalConfigFilePath)&&(n.config.projects.set(t.canonicalConfigFilePath,!1),ld(n.config.projects,mt)||(n.config.watchedDirectories&&(xx(n.config.watchedDirectories,vq),n.config.watchedDirectories=void 0),n.config.watchedDirectoriesStale=void 0))}updateNonInferredProjectFiles(e,t,n){var r;const i=e.getRootFilesMap(),o=new Map;for(const a of t){const t=n.getFileName(a),s=Qpe(t);let c;if(Sfe(s)||e.fileExists(t)){const t=n.getScriptKind(a,this.hostConfiguration.extraFileExtensions),r=n.hasMixedContent(a,this.hostConfiguration.extraFileExtensions),o=xn.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(s,e.currentDirectory,t,r,e.directoryStructureHost,!1));c=o.path;const l=i.get(c);l&&l.info===o?l.fileName=s:(e.addRoot(o,s),o.isScriptOpen()&&this.removeRootOfInferredProjectIfNowPartOfOtherProject(o))}else{c=Ype(s,this.currentDirectory,this.toCanonicalFileName);const t=i.get(c);t?((null==(r=t.info)?void 0:r.path)===c&&(e.removeFile(t.info,!1,!0),t.info=void 0),t.fileName=s):i.set(c,{fileName:s})}o.set(c,!0)}i.size>o.size&&i.forEach(((t,n)=>{o.has(n)||(t.info?e.removeFile(t.info,e.fileExists(t.info.fileName),!0):i.delete(n))}))}updateRootAndOptionsOfNonInferredProject(e,t,n,r,i,o,a){e.setCompilerOptions(r),e.setWatchOptions(a),void 0!==o&&(e.compileOnSaveEnabled=o),this.addFilesToNonInferredProject(e,t,n,i)}reloadFileNamesOfConfiguredProject(e){const t=this.reloadFileNamesOfParsedConfig(e.getConfigFilePath(),this.configFileExistenceInfoCache.get(e.canonicalConfigFilePath).config);return e.updateErrorOnNoInputFiles(t),this.updateNonInferredProjectFiles(e,t.concat(e.getExternalFiles(1)),hme),e.markAsDirty(),e.updateGraph()}reloadFileNamesOfParsedConfig(e,t){if(void 0===t.updateLevel)return t.parsedCommandLine.fileNames;xn.assert(1===t.updateLevel);const n=xL(t.parsedCommandLine.options.configFile.configFileSpecs,Ro(e),t.parsedCommandLine.options,t.cachedDirectoryStructureHost,this.hostConfiguration.extraFileExtensions);return t.parsedCommandLine={...t.parsedCommandLine,fileNames:n},n}setFileNamesOfAutpImportProviderOrAuxillaryProject(e,t){this.updateNonInferredProjectFiles(e,t,hme)}reloadConfiguredProjectClearingSemanticCache(e,t,n){return!!W(n,e)&&(this.clearSemanticCache(e),this.reloadConfiguredProject(e,Mme(t)),!0)}reloadConfiguredProject(e,t){e.isInitialLoadPending=dt,e.pendingUpdateReason=void 0,e.pendingUpdateLevel=0,e.getCachedDirectoryStructureHost().clearCache(),this.loadConfiguredProject(e,t),Ame(e,e.triggerFileForConfigFileDiag??e.getConfigFilePath(),!0)}clearSemanticCache(e){e.originalConfiguredProjects=void 0,e.resolutionCache.clear(),e.getLanguageService(!1).cleanupSemanticCache(),e.cleanupProgram(),e.markAsDirty()}sendConfigFileDiagEvent(e,t,n){if(!this.eventHandler||this.suppressDiagnosticEvents)return!1;const r=e.getLanguageService().getCompilerOptionsDiagnostics();return r.push(...e.getAllProjectErrors()),!(!n&&r.length===(e.configDiagDiagnosticsReported??0)||(e.configDiagDiagnosticsReported=r.length,this.eventHandler({eventName:Qfe,data:{configFileName:e.getConfigFilePath(),diagnostics:r,triggerFile:t??e.getConfigFilePath()}}),0))}getOrCreateInferredProjectForProjectRootPathIfEnabled(e,t){if(!this.useInferredProjectPerProjectRoot||e.isDynamic&&void 0===t)return;if(t){const e=this.toCanonicalFileName(t);for(const t of this.inferredProjects)if(t.projectRootPath===e)return t;return this.createInferredProject(t,!1,t)}let n;for(const t of this.inferredProjects)t.projectRootPath&&la(t.projectRootPath,e.path,this.host.getCurrentDirectory(),!this.host.useCaseSensitiveFileNames)&&(n&&n.projectRootPath.length>t.projectRootPath.length||(n=t));return n}getOrCreateSingleInferredProjectIfEnabled(){if(this.useSingleInferredProject)return this.inferredProjects.length>0&&void 0===this.inferredProjects[0].projectRootPath?this.inferredProjects[0]:this.createInferredProject("",!0)}getOrCreateSingleInferredWithoutProjectRoot(e){xn.assert(!this.useSingleInferredProject);const t=this.toCanonicalFileName(this.getNormalizedAbsolutePath(e));for(const e of this.inferredProjects)if(!e.projectRootPath&&e.isOrphan()&&e.canonicalCurrentDirectory===t)return e;return this.createInferredProject(e)}createInferredProject(e,t,n){const r=n&&this.compilerOptionsForInferredProjectsPerProjectRoot.get(n)||this.compilerOptionsForInferredProjects;let i,o;n&&(i=this.watchOptionsForInferredProjectsPerProjectRoot.get(n),o=this.typeAcquisitionForInferredProjectsPerProjectRoot.get(n)),void 0===i&&(i=this.watchOptionsForInferredProjects),void 0===o&&(o=this.typeAcquisitionForInferredProjects),i=i||void 0;const a=new Ofe(this,this.documentRegistry,r,null==i?void 0:i.watchOptions,n,e,o);return a.setProjectErrors(null==i?void 0:i.errors),t?this.inferredProjects.unshift(a):this.inferredProjects.push(a),a}getOrCreateScriptInfoNotOpenedByClient(e,t,n,r){return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(Qpe(e),t,void 0,void 0,n,r)}getScriptInfo(e){return this.getScriptInfoForNormalizedPath(Qpe(e))}getScriptInfoOrConfig(e){const t=Qpe(e),n=this.getScriptInfoForNormalizedPath(t);if(n)return n;const r=this.configuredProjects.get(this.toPath(e));return r&&r.getCompilerOptions().configFile}logErrorForScriptInfoNotFound(e){const t=$e(V(this.filenameToScriptInfo.entries(),(e=>e[1].deferredDelete?void 0:e)),(([e,t])=>({path:e,fileName:t.fileName})));this.logger.msg(`Could not find file ${JSON.stringify(e)}.\nAll files are: ${JSON.stringify(t)}`,"Err")}getSymlinkedProjects(e){let t;if(this.realpathToScriptInfos){const t=e.getRealpathIfDifferent();t&&f(this.realpathToScriptInfos.get(t),n),f(this.realpathToScriptInfos.get(e.path),n)}return t;function n(n){if(n!==e)for(const r of n.containingProjects)!r.languageServiceEnabled||r.isOrphan()||r.getCompilerOptions().preserveSymlinks||e.isAttached(r)||(t?ld(t,((e,t)=>t!==n.path&&D(e,r)))||t.add(n.path,r):(t=et(),t.add(n.path,r)))}}watchClosedScriptInfo(e){if(xn.assert(!e.fileWatcher),!(e.isDynamicOrHasMixedContent()||this.globalCacheLocationDirectoryPath&&an(e.path,this.globalCacheLocationDirectoryPath))){const t=e.fileName.indexOf("/node_modules/");this.host.getModifiedTime&&-1!==t?(e.mTime=this.getModifiedTime(e),e.fileWatcher=this.watchClosedScriptInfoInNodeModules(e.fileName.substring(0,t))):e.fileWatcher=this.watchFactory.watchFile(e.fileName,((t,n)=>this.onSourceFileChanged(e,n)),500,this.hostConfiguration.watchOptions,ZU.ClosedScriptInfo)}}createNodeModulesWatcher(e,t){let n=this.watchFactory.watchDirectory(e,(e=>{var n;const i=_U(this.toPath(e));if(!i)return;const o=Bo(i);if(!(null==(n=r.affectedModuleSpecifierCacheProjects)?void 0:n.size)||"package.json"!==o&&"node_modules"!==o||r.affectedModuleSpecifierCacheProjects.forEach((e=>{var t;null==(t=e.getModuleSpecifierCache())||t.clear()})),r.refreshScriptInfoRefCount)if(t===i)this.refreshScriptInfosInDirectory(t);else{const e=this.filenameToScriptInfo.get(i);e?Nme(e)&&this.refreshScriptInfo(e):Fo(i)||this.refreshScriptInfosInDirectory(i)}}),1,this.hostConfiguration.watchOptions,ZU.NodeModules);const r={refreshScriptInfoRefCount:0,affectedModuleSpecifierCacheProjects:void 0,close:()=>{var e;!n||r.refreshScriptInfoRefCount||(null==(e=r.affectedModuleSpecifierCacheProjects)?void 0:e.size)||(n.close(),n=void 0,this.nodeModulesWatchers.delete(t))}};return this.nodeModulesWatchers.set(t,r),r}watchPackageJsonsInNodeModules(e,t){var n;const r=this.toPath(e),i=this.nodeModulesWatchers.get(r)||this.createNodeModulesWatcher(e,r);return xn.assert(!(null==(n=i.affectedModuleSpecifierCacheProjects)?void 0:n.has(t))),(i.affectedModuleSpecifierCacheProjects||(i.affectedModuleSpecifierCacheProjects=new Set)).add(t),{close:()=>{var e;null==(e=i.affectedModuleSpecifierCacheProjects)||e.delete(t),i.close()}}}watchClosedScriptInfoInNodeModules(e){const t=e+"/node_modules",n=this.toPath(t),r=this.nodeModulesWatchers.get(n)||this.createNodeModulesWatcher(t,n);return r.refreshScriptInfoRefCount++,{close:()=>{r.refreshScriptInfoRefCount--,r.close()}}}getModifiedTime(e){return(this.host.getModifiedTime(e.fileName)||Yi).getTime()}refreshScriptInfo(e){const t=this.getModifiedTime(e);if(t!==e.mTime){const n=so(e.mTime,t);e.mTime=t,this.onSourceFileChanged(e,n)}}refreshScriptInfosInDirectory(e){e+=xo,this.filenameToScriptInfo.forEach((t=>{Nme(t)&&an(t.path,e)&&this.refreshScriptInfo(t)}))}stopWatchingScriptInfo(e){e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)}getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(e,t,n,r,i,o){if(wo(e)||Sfe(e))return this.getOrCreateScriptInfoWorker(e,t,!1,void 0,n,!!r,i,o);return this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(e))||void 0}getOrCreateScriptInfoForNormalizedPath(e,t,n,r,i,o){return this.getOrCreateScriptInfoWorker(e,this.currentDirectory,t,n,r,!!i,o,!1)}getOrCreateScriptInfoWorker(e,t,n,r,i,o,a,s){xn.assert(void 0===r||n,"ScriptInfo needs to be opened by client to be able to set its user defined content");const c=Ype(e,t,this.toCanonicalFileName);let l=this.filenameToScriptInfo.get(c);if(l){if(l.deferredDelete){if(xn.assert(!l.isDynamic),!n&&!(a||this.host).fileExists(e))return s?l:void 0;l.deferredDelete=void 0}}else{const r=Sfe(e);if(xn.assert(wo(e)||r||n,"",(()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:$e(this.openFilesWithNonRootedDiskPath.keys())})}\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`)),xn.assert(!wo(e)||this.currentDirectory===t||!this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(e)),"",(()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:$e(this.openFilesWithNonRootedDiskPath.keys())})}\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names`)),xn.assert(!r||this.currentDirectory===t||this.useInferredProjectPerProjectRoot,"",(()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:$e(this.openFilesWithNonRootedDiskPath.keys())})}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`)),!n&&!r&&!(a||this.host).fileExists(e))return;l=new kfe(this.host,e,i,o,c,this.filenameToScriptInfoVersion.get(c)),this.filenameToScriptInfo.set(l.path,l),this.filenameToScriptInfoVersion.delete(l.path),n?wo(e)||r&&this.currentDirectory===t||this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(e),l):this.watchClosedScriptInfo(l)}return n&&(this.stopWatchingScriptInfo(l),l.open(r),o&&l.registerFileUpdate()),l}getScriptInfoForNormalizedPath(e){return!wo(e)&&this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(e))||this.getScriptInfoForPath(Ype(e,this.currentDirectory,this.toCanonicalFileName))}getScriptInfoForPath(e){const t=this.filenameToScriptInfo.get(e);return t&&t.deferredDelete?void 0:t}getDocumentPositionMapper(e,t,n){const r=this.getOrCreateScriptInfoNotOpenedByClient(t,e.currentDirectory,this.host,!1);if(!r)return void(n&&e.addGeneratedFileWatch(t,n));if(r.getSnapshot(),st(r.sourceMapFilePath)){const t=this.getScriptInfoForPath(r.sourceMapFilePath);if(t&&(t.getSnapshot(),void 0!==t.documentPositionMapper))return t.sourceInfos=this.addSourceInfoToSourceMap(n,e,t.sourceInfos),t.documentPositionMapper?t.documentPositionMapper:void 0;r.sourceMapFilePath=void 0}else{if(r.sourceMapFilePath)return void(r.sourceMapFilePath.sourceInfos=this.addSourceInfoToSourceMap(n,e,r.sourceMapFilePath.sourceInfos));if(void 0!==r.sourceMapFilePath)return}let i,o=(t,n)=>{const r=this.getOrCreateScriptInfoNotOpenedByClient(t,e.currentDirectory,this.host,!0);if(i=r||n,!r||r.deferredDelete)return;const o=r.getSnapshot();return void 0!==r.documentPositionMapper?r.documentPositionMapper:yQ(o)};const a=e.projectName,s=u1({getCanonicalFileName:this.toCanonicalFileName,log:e=>this.logger.info(e),getSourceFileLike:e=>this.getSourceFileLike(e,a,r)},r.fileName,r.textStorage.getLineInfo(),o);return o=void 0,i?st(i)?r.sourceMapFilePath={watcher:this.addMissingSourceMapFile(e.currentDirectory===this.currentDirectory?i:Go(i,e.currentDirectory),r.path),sourceInfos:this.addSourceInfoToSourceMap(n,e)}:(r.sourceMapFilePath=i.path,i.declarationInfoPath=r.path,i.deferredDelete||(i.documentPositionMapper=s||!1),i.sourceInfos=this.addSourceInfoToSourceMap(n,e,i.sourceInfos)):r.sourceMapFilePath=!1,s}addSourceInfoToSourceMap(e,t,n){if(e){const r=this.getOrCreateScriptInfoNotOpenedByClient(e,t.currentDirectory,t.directoryStructureHost,!1);(n||(n=new Set)).add(r.path)}return n}addMissingSourceMapFile(e,t){return this.watchFactory.watchFile(e,(()=>{const e=this.getScriptInfoForPath(t);e&&e.sourceMapFilePath&&!st(e.sourceMapFilePath)&&(this.delayUpdateProjectGraphs(e.containingProjects,!0),this.delayUpdateSourceInfoProjects(e.sourceMapFilePath.sourceInfos),e.closeSourceMapFileWatcher())}),2e3,this.hostConfiguration.watchOptions,ZU.MissingSourceMapFile)}getSourceFileLike(e,t,n){const r=t.projectName?t:this.findProject(t);if(r){const t=r.toPath(e),n=r.getSourceFile(t);if(n&&n.resolvedPath===t)return n}const i=this.getOrCreateScriptInfoNotOpenedByClient(e,(r||this).currentDirectory,r?r.directoryStructureHost:this.host,!1);if(i){if(n&&st(n.sourceMapFilePath)&&i!==n){const e=this.getScriptInfoForPath(n.sourceMapFilePath);e&&(e.sourceInfos??(e.sourceInfos=new Set)).add(i.path)}return i.cacheSourceFile?i.cacheSourceFile.sourceFile:(i.sourceFileLike||(i.sourceFileLike={get text(){return xn.fail("shouldnt need text"),""},getLineAndCharacterOfPosition:e=>{const t=i.positionToLineOffset(e);return{line:t.line-1,character:t.offset-1}},getPositionOfLineAndCharacter:(e,t,n)=>i.lineOffsetToPosition(e+1,t+1,n)}),i.sourceFileLike)}}setPerformanceEventHandler(e){this.performanceEventHandler=e}setHostConfiguration(e){var t;if(e.file){const t=this.getScriptInfoForNormalizedPath(Qpe(e.file));t&&(t.setOptions(ume(e.formatOptions),e.preferences),this.logger.info(`Host configuration update for file ${e.file}`))}else{if(void 0!==e.hostInfo&&(this.hostConfiguration.hostInfo=e.hostInfo,this.logger.info(`Host information ${e.hostInfo}`)),e.formatOptions&&(this.hostConfiguration.formatCodeOptions={...this.hostConfiguration.formatCodeOptions,...ume(e.formatOptions)},this.logger.info("Format host information updated")),e.preferences){const{lazyConfiguredProjectsFromExternalProject:t,includePackageJsonAutoImports:n,includeCompletionsForModuleExports:r}=this.hostConfiguration.preferences;this.hostConfiguration.preferences={...this.hostConfiguration.preferences,...e.preferences},t&&!this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject&&this.externalProjectToConfiguredProjectMap.forEach((e=>e.forEach((e=>{e.deferredClose||e.isClosed()||2!==e.pendingUpdateLevel||this.hasPendingProjectUpdate(e)||e.updateGraph()})))),n===e.preferences.includePackageJsonAutoImports&&!!r==!!e.preferences.includeCompletionsForModuleExports||this.forEachProject((e=>{e.onAutoImportProviderSettingsChanged()}))}if(e.extraFileExtensions&&(this.hostConfiguration.extraFileExtensions=e.extraFileExtensions,this.reloadProjects(),this.logger.info("Host file extension mappings updated")),e.watchOptions){const n=null==(t=dme(e.watchOptions))?void 0:t.watchOptions,r=KM(n,this.currentDirectory);this.hostConfiguration.watchOptions=r,this.hostConfiguration.beforeSubstitution=r===n?void 0:n,this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`)}}}getWatchOptions(e){return this.getWatchOptionsFromProjectWatchOptions(e.getWatchOptions(),e.getCurrentDirectory())}getWatchOptionsFromProjectWatchOptions(e,t){const n=this.hostConfiguration.beforeSubstitution?KM(this.hostConfiguration.beforeSubstitution,t):this.hostConfiguration.watchOptions;return e&&n?{...n,...e}:e||n}closeLog(){this.logger.close()}reloadProjects(){this.logger.info("reload projects."),this.filenameToScriptInfo.forEach((e=>{this.openFiles.has(e.path)||e.fileWatcher&&this.onSourceFileChanged(e,this.host.fileExists(e.fileName)?e.deferredDelete?0:1:2)})),this.pendingProjectUpdates.forEach(((e,t)=>{this.throttledOperations.cancel(t),this.pendingProjectUpdates.delete(t)})),this.throttledOperations.cancel(ime),this.pendingOpenFileProjectUpdates=void 0,this.pendingEnsureProjectForOpenFiles=!1,this.configFileExistenceInfoCache.forEach((e=>{e.config&&(e.config.updateLevel=2)})),this.configFileForOpenFiles.clear(),this.externalProjects.forEach((e=>{this.clearSemanticCache(e),e.updateGraph()}));const e=new Set,t=new Set;this.externalProjectToConfiguredProjectMap.forEach(((n,r)=>{const i=`Reloading configured project in external project: ${r}`;n.forEach((n=>{this.getHostPreferences().lazyConfiguredProjectsFromExternalProject?(n.isInitialLoadPending()||(this.clearSemanticCache(n),n.pendingUpdateLevel=2,n.pendingUpdateReason=Mme(i)),t.add(n)):this.reloadConfiguredProjectClearingSemanticCache(n,i,e)}))})),this.openFiles.forEach(((n,r)=>{const i=this.getScriptInfoForPath(r);S(i.containingProjects,$fe)||this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(i,2,e,t)})),t.forEach((t=>e.add(t))),this.inferredProjects.forEach((e=>this.clearSemanticCache(e))),this.ensureProjectForOpenFiles(),this.cleanupProjectsAndScriptInfos(e,new Set(this.openFiles.keys()),new Set(this.externalProjectToConfiguredProjectMap.keys())),this.logger.info("After reloading projects.."),this.printProjects()}removeRootOfInferredProjectIfNowPartOfOtherProject(e){xn.assert(e.containingProjects.length>0);const t=e.containingProjects[0];!t.isOrphan()&&Jfe(t)&&t.isRoot(e)&&f(e.containingProjects,(e=>e!==t&&!e.isOrphan()))&&t.removeFile(e,!0,!0)}ensureProjectForOpenFiles(){this.logger.info("Before ensureProjectForOpenFiles:"),this.printProjects();const e=this.pendingOpenFileProjectUpdates;this.pendingOpenFileProjectUpdates=void 0,null==e||e.forEach(((e,t)=>this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(t),1))),this.openFiles.forEach(((e,t)=>{const n=this.getScriptInfoForPath(t);n.isOrphan()?this.assignOrphanScriptInfoToInferredProject(n,e):this.removeRootOfInferredProjectIfNowPartOfOtherProject(n)})),this.pendingEnsureProjectForOpenFiles=!1,this.inferredProjects.forEach(Fme),this.logger.info("After ensureProjectForOpenFiles:"),this.printProjects()}openClientFile(e,t,n,r){return this.openClientFileWithNormalizedPath(Qpe(e),t,n,!1,r?Qpe(r):void 0)}getOriginalLocationEnsuringConfiguredProject(e,t){const n=e.isSourceOfProjectReferenceRedirect(t.fileName),r=n?t:e.getSourceMapper().tryGetSourcePosition(t);if(!r)return;const{fileName:i}=r,o=this.getScriptInfo(i);if(!o&&!this.host.fileExists(i))return;const a={fileName:Qpe(i),path:this.toPath(i)},s=this.getConfigFileNameForFile(a,!1);if(!s)return;let c=this.findConfiguredProjectByProjectName(s);if(!c){if(e.getCompilerOptions().disableReferencedProjectLoad)return n?t:(null==o?void 0:o.containingProjects.length)?r:t;c=this.createConfiguredProject(s,`Creating project for original file: ${a.fileName}${t!==r?" for location: "+t.fileName:""}`)}Fme(c);const l=e=>{const t=this.getScriptInfo(i);return t&&e.containsScriptInfo(t)&&!e.isSourceOfProjectReferenceRedirect(t.path)};if(c.isSolution()||!l(c)){if(c=Tme(c,i,(e=>l(e)?e:void 0),1,`Creating project referenced in solution ${c.projectName} to find possible configured project for original file: ${a.fileName}${t!==r?" for location: "+t.fileName:""}`),!c)return;if(c===e)return r}_(c);const u=this.getScriptInfo(i);if(u&&u.containingProjects.length)return u.containingProjects.forEach((e=>{zfe(e)&&_(e)})),r;function _(t){(e.originalConfiguredProjects??(e.originalConfiguredProjects=new Set)).add(t.canonicalConfigFilePath)}}fileExists(e){return!!this.getScriptInfoForNormalizedPath(e)||this.host.fileExists(e)}findExternalProjectContainingOpenScriptInfo(e){return S(this.externalProjects,(t=>(Fme(t),t.containsScriptInfo(e))))}getOrCreateOpenScriptInfo(e,t,n,r,i){const o=this.getOrCreateScriptInfoWorker(e,i?this.getNormalizedAbsolutePath(i):this.currentDirectory,!0,t,n,!!r,void 0,!0);return this.openFiles.set(o.path,i),o}assignProjectToOpenedScriptInfo(e){let t,n,r,i;if(!this.findExternalProjectContainingOpenScriptInfo(e)&&0===this.serverMode){const o=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(e,1);o&&(r=o.seenProjects,i=o.sentConfigDiag,o.defaultProject&&(t=o.defaultProject.getConfigFilePath(),n=o.defaultProject.getAllProjectErrors()))}return e.containingProjects.forEach(Fme),e.isOrphan()&&(null==r||r.forEach((t=>{i.has(t)||this.sendConfigFileDiagEvent(t,e.fileName,!0)})),xn.assert(this.openFiles.has(e.path)),this.assignOrphanScriptInfoToInferredProject(e,this.openFiles.get(e.path))),xn.assert(!e.isOrphan()),{configFileName:t,configFileErrors:n,retainProjects:r}}findCreateOrReloadConfiguredProject(e,t,n,r,i,o,a,s){let c=this.findConfiguredProjectByProjectName(e,r),l=!1;switch(t){case 0:if(!c)return;break;case 1:c??(c=this.createConfiguredProject(e,n)),l=!a&&Ime(c,i);break;case 2:c??(c=this.createConfiguredProject(e,Mme(n))),l=!s&&this.reloadConfiguredProjectClearingSemanticCache(c,n,o),!s||s.has(c)||o.has(c)||(c.pendingUpdateLevel=2,c.pendingUpdateReason=Mme(n),s.add(c));break;default:xn.assertNever(t)}return{project:c,sentConfigFileDiag:l}}tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t,n,r){const i=this.getConfigFileNameForFile(e,0===t);if(!i)return;const o=this.findCreateOrReloadConfiguredProject(i,t,Ome(e),n,e.fileName,r);if(!o)return;const a=new Set,s=new Set(o.sentConfigFileDiag?[o.project]:void 0);let c,l;var u;return _(u=o.project)||function(i){Tme(i,e.path,((e,t)=>(t&&s.add(e),_(e))),t,`Creating project referenced in solution ${i.projectName} to find possible configured project for ${e.fileName} to open`,n,e.fileName,r)}(u),{defaultProject:c??l,sentConfigDiag:s,seenProjects:a};function _(t){if(!W(a,t))return;const n=t.containsScriptInfo(e);if(n&&!t.isSourceOfProjectReferenceRedirect(e.path))return c=t;l??(l=n?t:void 0)}}tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(e,t,n,r){const i=0===t,o=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t,i,n);if(!o)return;const{defaultProject:a,seenProjects:s}=o;return a&&function(e,t,n,r,i,o,a,s){for(;;){if(!t.isInitialLoadPending()&&(!t.getCompilerOptions().composite||t.getCompilerOptions().disableSolutionSearching))return;const c=t.projectService.getConfigFileNameForFile({fileName:t.getConfigFilePath(),path:e.path,configFileInfo:!0},0===r);if(!c)return;const l=t.projectService.findCreateOrReloadConfiguredProject(c,r,i,o,void 0,a,!0,s);if(!l)return;l.project.isInitialLoadPending()&&t.getCompilerOptions().composite&&l.project.setPotentialProjectReference(t.canonicalConfigFilePath);const u=n(l.project);if(u)return u;t=l.project}}(e,a,(e=>{s.add(e)}),t,`Creating project possibly referencing default composite project ${a.getProjectName()} of open file ${e.fileName}`,i,n,r),o}loadAncestorProjectTree(e){e=e||U(this.configuredProjects,((e,t)=>t.isInitialLoadPending()?void 0:[e,!0]));const t=new Set;for(const n of $e(this.configuredProjects.values()))wme(n,(t=>e.has(t)))&&Fme(n),this.ensureProjectChildren(n,e,t)}ensureProjectChildren(e,t,n){var r;if(!W(n,e.canonicalConfigFilePath))return;if(e.getCompilerOptions().disableReferencedProjectLoad)return;const i=null==(r=e.getCurrentProgram())?void 0:r.getResolvedProjectReferences();if(i)for(const r of i){if(!r)continue;const i=tV(r.references,(e=>t.has(e.sourceFile.path)?e:void 0));if(!i)continue;const o=Qpe(r.sourceFile.fileName),a=this.findConfiguredProjectByProjectName(o)??this.createConfiguredProject(o,`Creating project referenced by : ${e.projectName} as it references project ${i.sourceFile.fileName}`);Fme(a),this.ensureProjectChildren(a,t,n)}}cleanupConfiguredProjects(e,t,n){this.getOrphanConfiguredProjects(e,n,t).forEach((e=>this.removeProject(e)))}cleanupProjectsAndScriptInfos(e,t,n){this.cleanupConfiguredProjects(e,n,t);for(const e of this.inferredProjects.slice())e.isOrphan()&&this.removeProject(e);this.removeOrphanScriptInfos()}openClientFileWithNormalizedPath(e,t,n,r,i){const o=this.getOrCreateOpenScriptInfo(e,t,n,r,i),{retainProjects:a,...s}=this.assignProjectToOpenedScriptInfo(o);return this.cleanupProjectsAndScriptInfos(a,new Set([o.path]),void 0),this.telemetryOnOpenFile(o),this.printProjects(),s}getOrphanConfiguredProjects(e,t,n){const r=new Set(this.configuredProjects.values()),i=e=>{!e.originalConfiguredProjects||!zfe(e)&&e.isOrphan()||e.originalConfiguredProjects.forEach(((e,t)=>{const n=this.getConfiguredProjectByCanonicalConfigFilePath(t);return n&&s(n)}))};return null==e||e.forEach(s),this.inferredProjects.forEach(i),this.externalProjects.forEach(i),this.externalProjectToConfiguredProjectMap.forEach(((e,t)=>{(null==n?void 0:n.has(t))||e.forEach(s)})),this.openFiles.forEach(((e,n)=>{if(null==t?void 0:t.has(n))return;const r=this.getScriptInfoForPath(n);if(S(r.containingProjects,$fe))return;const i=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(r,0);(null==i?void 0:i.defaultProject)&&(null==i||i.seenProjects.forEach(s))})),this.configuredProjects.forEach((e=>{r.has(e)&&(a(e)||Eme(e,o))&&s(e)})),r;function o(e){return!r.has(e)||a(e)}function a(e){var t,n;return(e.deferredClose||e.projectService.hasPendingProjectUpdate(e))&&!!(null==(n=null==(t=e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath))?void 0:t.openFilesImpactedByConfigFile)?void 0:n.size)}function s(e){r.delete(e)&&(i(e),Eme(e,s))}}removeOrphanScriptInfos(){const e=new Map(this.filenameToScriptInfo);this.filenameToScriptInfo.forEach((t=>{if(!t.deferredDelete){if(!t.isScriptOpen()&&t.isOrphan()&&!t.isContainedByBackgroundProject()){if(!t.sourceMapFilePath)return;let e;if(st(t.sourceMapFilePath)){const n=this.filenameToScriptInfo.get(t.sourceMapFilePath);e=null==n?void 0:n.sourceInfos}else e=t.sourceMapFilePath.sourceInfos;if(!e)return;if(!ud(e,(e=>{const t=this.getScriptInfoForPath(e);return!!t&&(t.isScriptOpen()||!t.isOrphan())})))return}if(e.delete(t.path),t.sourceMapFilePath){let n;if(st(t.sourceMapFilePath)){const r=this.filenameToScriptInfo.get(t.sourceMapFilePath);(null==r?void 0:r.deferredDelete)?t.sourceMapFilePath={watcher:this.addMissingSourceMapFile(r.fileName,t.path),sourceInfos:r.sourceInfos}:e.delete(t.sourceMapFilePath),n=null==r?void 0:r.sourceInfos}else n=t.sourceMapFilePath.sourceInfos;n&&n.forEach(((t,n)=>e.delete(n)))}}})),e.forEach((e=>this.deleteScriptInfo(e)))}telemetryOnOpenFile(e){if(0!==this.serverMode||!this.eventHandler||!e.isJavaScript()||!Fx(this.allJsFilesForOpenFileTelemetry,e.path))return;const t=this.ensureDefaultProjectForFile(e);if(!t.languageServiceEnabled)return;const n=t.getSourceFile(e.path),r=!!n&&!!n.checkJsDirective;this.eventHandler({eventName:eme,data:{info:{checkJs:r}}})}closeClientFile(e,t){const n=this.getScriptInfoForNormalizedPath(Qpe(e)),r=!!n&&this.closeOpenFile(n,t);return t||this.printProjects(),r}collectChanges(e,t,n,r){for(const i of t){const t=S(e,(e=>e.projectName===i.getProjectName()));r.push(i.getChangesSinceVersion(t&&t.version,n))}}synchronizeProjectList(e,t){const n=[];return this.collectChanges(e,this.externalProjects,t,n),this.collectChanges(e,V(this.configuredProjects.values(),(e=>e.deferredClose?void 0:e)),t,n),this.collectChanges(e,this.inferredProjects,t,n),n}applyChangesInOpenFiles(e,t,n){let r,i,o=!1;if(e)for(const t of e){const e=this.getOrCreateOpenScriptInfo(Qpe(t.fileName),t.content,fme(t.scriptKind),t.hasMixedContent,t.projectRootPath?Qpe(t.projectRootPath):void 0);(r||(r=[])).push(e)}if(t)for(const e of t){const t=this.getScriptInfo(e.fileName);xn.assert(!!t),this.applyChangesToFile(t,e.changes)}if(n)for(const e of n)o=this.closeClientFile(e,!0)||o;null==r||r.forEach((e=>{var t;return null==(t=this.assignProjectToOpenedScriptInfo(e).retainProjects)?void 0:t.forEach((e=>(i??(i=new Set)).add(e)))})),o&&this.assignOrphanScriptInfosToInferredProject(),r?(this.cleanupProjectsAndScriptInfos(i,new Set(r.map((e=>e.path))),void 0),r.forEach((e=>this.telemetryOnOpenFile(e))),this.printProjects()):p(n)&&this.printProjects()}applyChangesToFile(e,t){for(const n of t)e.editContent(n.span.start,n.span.start+n.span.length,n.newText)}closeExternalProject(e,t){const n=Qpe(e);if(this.externalProjectToConfiguredProjectMap.get(n))this.externalProjectToConfiguredProjectMap.delete(n);else{const t=this.findExternalProjectByProjectName(e);t&&this.removeProject(t)}t&&(this.cleanupConfiguredProjects(),this.printProjects())}openExternalProjects(e){const t=new Set(this.externalProjects.map((e=>e.getProjectName())));this.externalProjectToConfiguredProjectMap.forEach(((e,n)=>t.add(n)));for(const n of e)this.openExternalProject(n,!1),t.delete(n.projectFileName);t.forEach((e=>this.closeExternalProject(e,!1))),this.cleanupConfiguredProjects(),this.printProjects()}static escapeFilenameForRegex(e){return e.replace(this.filenameEscapeRegexp,"\\$&")}resetSafeList(){this.safelist=lme}applySafeList(e){const t=e.typeAcquisition;xn.assert(!!t,"proj.typeAcquisition should be set by now");const n=this.applySafeListWorker(e,e.rootFiles,t);return(null==n?void 0:n.excludedFiles)??[]}applySafeListWorker(t,n,r){if(!1===r.enable||r.disableFilenameBasedTypeAcquisition)return;const i=r.include||(r.include=[]),o=[],a=n.map((e=>Vo(e.fileName)));for(const t of Object.keys(this.safelist)){const n=this.safelist[t];for(const r of a)if(n.match.test(r)){if(this.logger.info(`Excluding files based on rule ${t} matching file '${r}'`),n.types)for(const e of n.types)i.includes(e)||i.push(e);if(n.exclude)for(const i of n.exclude){const a=r.replace(n.match,((...n)=>i.map((r=>"number"==typeof r?st(n[r])?e.escapeFilenameForRegex(n[r]):(this.logger.info(`Incorrect RegExp specification in safelist rule ${t} - not enough groups`),"\\*"):r)).join("")));o.includes(a)||o.push(a)}else{const t=e.escapeFilenameForRegex(r);o.includes(t)||o.push(t)}}}const s=o.map((e=>new RegExp(e,"i")));let c,l;for(let e=0;et.test(a[e]))))u(e);else{if(r.enable){const t=Bo(yt(a[e]));if(Ao(t,"js")){const n=Xt(Yk(t)),r=this.legacySafelist.get(n);if(void 0!==r){this.logger.info(`Excluded '${a[e]}' because it matched ${n} from the legacy safelist`),u(e),i.includes(r)||i.push(r);continue}}}/^.+[.-]min\.js$/.test(a[e])?u(e):null==c||c.push(n[e])}return l?{rootFiles:c,excludedFiles:l}:void 0;function u(e){l||(xn.assert(!c),c=n.slice(0,e),l=[]),l.push(a[e])}}openExternalProject(e,t){const n=this.findExternalProjectByProjectName(e.projectFileName);let r,i=[];for(const t of e.rootFiles){const n=Qpe(t.fileName);if(cfe(n)){if(0===this.serverMode&&this.host.fileExists(n)){let t=this.findConfiguredProjectByProjectName(n);t||(t=this.createConfiguredProject(n,`Creating configured project in external project: ${e.projectFileName}`),this.getHostPreferences().lazyConfiguredProjectsFromExternalProject||t.updateGraph()),(r??(r=new Set)).add(t),xn.assert(!t.isClosed())}}else i.push(t)}if(r)this.externalProjectToConfiguredProjectMap.set(e.projectFileName,r),n&&this.removeProject(n);else{this.externalProjectToConfiguredProjectMap.delete(e.projectFileName);const t=e.typeAcquisition||{};t.include=t.include||[],t.exclude=t.exclude||[],void 0===t.enable&&(t.enable=Ffe(i.map((e=>e.fileName))));const r=this.applySafeListWorker(e,i,t),o=(null==r?void 0:r.excludedFiles)??[];if(i=(null==r?void 0:r.rootFiles)??i,n){n.excludedFiles=o;const r=_me(e.options),a=dme(e.options,n.getCurrentDirectory()),s=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e.projectFileName,r,i,yme);s?n.disableLanguageService(s):n.enableLanguageService(),n.setProjectErrors(null==a?void 0:a.errors),this.updateRootAndOptionsOfNonInferredProject(n,i,yme,r,t,e.options.compileOnSave,null==a?void 0:a.watchOptions),n.updateGraph()}else this.createExternalProject(e.projectFileName,i,e.options,t,o).updateGraph()}t&&(this.cleanupConfiguredProjects(r,new Set(e.projectFileName)),this.printProjects())}hasDeferredExtension(){for(const e of this.hostConfiguration.extraFileExtensions)if(7===e.scriptKind)return!0;return!1}requestEnablePlugin(e,t,n){if(this.host.importPlugin||this.host.require)if(this.logger.info(`Enabling plugin ${t.name} from candidate paths: ${n.join(",")}`),!t.name||Os(t.name)||/[\\/]\.\.?($|[\\/])/.test(t.name))this.logger.info(`Skipped loading plugin ${t.name||JSON.stringify(t)} because only package name is allowed plugin name`);else{if(this.host.importPlugin){const r=Ife.importServicePluginAsync(t,n,this.host,(e=>this.logger.info(e)));this.pendingPluginEnablements??(this.pendingPluginEnablements=new Map);let i=this.pendingPluginEnablements.get(e);return i||this.pendingPluginEnablements.set(e,i=[]),void i.push(r)}this.endEnablePlugin(e,Ife.importServicePluginSync(t,n,this.host,(e=>this.logger.info(e))))}else this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded")}endEnablePlugin(e,{pluginConfigEntry:t,resolvedModule:n,errorLogs:r}){var i;if(n){const r=null==(i=this.currentPluginConfigOverrides)?void 0:i.get(t.name);if(r){const e=t.name;(t=r).name=e}e.enableProxy(n,t)}else f(r,(e=>this.logger.info(e))),this.logger.info(`Couldn't find ${t.name}`)}hasNewPluginEnablementRequests(){return!!this.pendingPluginEnablements}hasPendingPluginEnablements(){return!!this.currentPluginEnablementPromise}async waitForPendingPlugins(){for(;this.currentPluginEnablementPromise;)await this.currentPluginEnablementPromise}enableRequestedPlugins(){this.pendingPluginEnablements&&this.enableRequestedPluginsAsync()}async enableRequestedPluginsAsync(){if(this.currentPluginEnablementPromise&&await this.waitForPendingPlugins(),!this.pendingPluginEnablements)return;const e=$e(this.pendingPluginEnablements.entries());this.pendingPluginEnablements=void 0,this.currentPluginEnablementPromise=this.enableRequestedPluginsWorker(e),await this.currentPluginEnablementPromise}async enableRequestedPluginsWorker(e){xn.assert(void 0===this.currentPluginEnablementPromise);let t=!1;await Promise.all(O(e,(async([e,n])=>{const r=await Promise.all(n);if(e.isClosed()||Vfe(e))this.logger.info(`Cancelling plugin enabling for ${e.getProjectName()} as it is ${e.isClosed()?"closed":"deferred close"}`);else{t=!0;for(const t of r)this.endEnablePlugin(e,t);this.delayUpdateProjectGraph(e)}}))),this.currentPluginEnablementPromise=void 0,t&&this.sendProjectsUpdatedInBackgroundEvent()}configurePlugin(e){this.forEachEnabledProject((t=>t.onPluginConfigurationChanged(e.pluginName,e.configuration))),this.currentPluginConfigOverrides=this.currentPluginConfigOverrides||new Map,this.currentPluginConfigOverrides.set(e.pluginName,e.configuration)}getPackageJsonsVisibleToFile(e,t,n){const r=this.packageJsonCache,i=n&&this.toPath(n),o=[],a=e=>{switch(r.directoryHasPackageJson(e)){case 3:return r.searchDirectoryAndAncestors(e),a(e);case-1:const n=Ko(e,"package.json");this.watchPackageJsonFile(n,this.toPath(n),t);const i=r.getInDirectory(e);i&&o.push(i)}if(i&&i===e)return!0};return ga(Ro(e),a),o}getNearestAncestorDirectoryWithPackageJson(e){return ga(e,(e=>{switch(this.packageJsonCache.directoryHasPackageJson(e)){case-1:return e;case 0:return;case 3:return this.host.fileExists(Ko(e,"package.json"))?e:void 0}}))}watchPackageJsonFile(e,t,n){xn.assert(void 0!==n);let r=(this.packageJsonFilesMap??(this.packageJsonFilesMap=new Map)).get(t);if(!r){let n=this.watchFactory.watchFile(e,((e,n)=>{switch(n){case 0:case 1:this.packageJsonCache.addOrUpdate(e,t),this.onPackageJsonChange(r);break;case 2:this.packageJsonCache.delete(t),this.onPackageJsonChange(r),r.projects.clear(),r.close()}}),250,this.hostConfiguration.watchOptions,ZU.PackageJson);r={projects:new Set,close:()=>{var e;!r.projects.size&&n&&(n.close(),n=void 0,null==(e=this.packageJsonFilesMap)||e.delete(t),this.packageJsonCache.invalidate(t))}},this.packageJsonFilesMap.set(t,r)}r.projects.add(n),(n.packageJsonWatches??(n.packageJsonWatches=new Set)).add(r)}onPackageJsonChange(e){e.projects.forEach((e=>{var t;return null==(t=e.onPackageJsonChange)?void 0:t.call(e)}))}includePackageJsonAutoImports(){switch(this.hostConfiguration.preferences.includePackageJsonAutoImports){case"on":return 1;case"off":return 0;default:return 2}}getIncompleteCompletionsCache(){return this.incompleteCompletionsCache||(this.incompleteCompletionsCache=function(){let e;return{get:()=>e,set(t){e=t},clear(){e=void 0}}}())}};Bme.filenameEscapeRegexp=/[-/\\^$*+?.()|[\]{}]/g;var Jme=Bme;function zme(e){return void 0!==e.kind}function $me(e){e.print(!1,!1,!1)}function qme(e){let t,n,r;const i={get(e,t,i,o){if(n&&r===a(e,i,o))return n.get(t)},set(n,r,i,a,c,l,u){if(o(n,i,a).set(r,s(c,l,u,!1)),u)for(const n of l)if(n.isInNodeModules){const r=n.path.substring(0,n.path.indexOf(Ij)+Ij.length-1),i=e.toPath(r);(null==t?void 0:t.has(i))||(t||(t=new Map)).set(i,e.watchNodeModulesForPackageJsonChanges(r))}},setModulePaths(e,t,n,r,i){const a=o(e,n,r),c=a.get(t);c?c.modulePaths=i:a.set(t,s(void 0,i,void 0,void 0))},setBlockedByPackageJsonDependencies(e,t,n,r,i){const a=o(e,n,r),c=a.get(t);c?c.isBlockedByPackageJsonDependencies=i:a.set(t,s(void 0,void 0,void 0,i))},clear(){null==t||t.forEach(dx),null==n||n.clear(),null==t||t.clear(),r=void 0},count:()=>n?n.size:0};return xn.isDebugging&&Object.defineProperty(i,"__cache",{get:()=>n}),i;function o(e,t,o){const s=a(e,t,o);return n&&r!==s&&i.clear(),r=s,n||(n=new Map)}function a(e,t,n){return`${e},${t.importModuleSpecifierEnding},${t.importModuleSpecifierPreference},${n.overrideImportMode}`}function s(e,t,n,r){return{kind:e,modulePaths:t,moduleSpecifiers:n,isBlockedByPackageJsonDependencies:r}}}function Vme(e){const t=new Map,n=new Map;return{addOrUpdate:r,invalidate:function(e){t.delete(e),n.delete(Ro(e))},delete:e=>{t.delete(e),n.set(Ro(e),!0)},getInDirectory:n=>t.get(e.toPath(Ko(n,"package.json")))||void 0,directoryHasPackageJson:t=>i(e.toPath(t)),searchDirectoryAndAncestors:t=>{ga(t,(t=>{const o=e.toPath(t);if(3!==i(o))return!0;const a=Ko(t,"package.json");dZ(e,a)?r(a,Ko(o,"package.json")):n.set(o,!0)}))}};function r(r,i){const o=xn.checkDefined(vZ(r,e.host));t.set(i,o),n.delete(Ro(i))}function i(e){return t.has(Ko(e,"package.json"))?-1:n.has(e)?0:3}}var Ume={isCancellationRequested:()=>!1,setRequest:()=>{},resetRequest:()=>{}};function Kme(e,t){if((Jfe(e)||$fe(e))&&e.isJsOnlyProject()){const n=e.getScriptInfoForNormalizedPath(t);return n&&!n.isJavaScript()}return!1}function Wme(e,t,n){const r=t.getScriptInfoForNormalizedPath(e);return{start:r.positionToLineOffset(n.start),end:r.positionToLineOffset(n.start+n.length),text:Jq(n.messageText,"\n"),code:n.code,category:vi(n),reportsUnnecessary:n.reportsUnnecessary,reportsDeprecated:n.reportsDeprecated,source:n.source,relatedInformation:O(n.relatedInformation,Hme)}}function Hme(e){return e.file?{span:{start:Gme(Xa(e.file,e.start)),end:Gme(Xa(e.file,e.start+e.length)),file:e.file.fileName},message:Jq(e.messageText,"\n"),category:vi(e),code:e.code}:{message:Jq(e.messageText,"\n"),category:vi(e),code:e.code}}function Gme(e){return{line:e.line+1,offset:e.character+1}}function Xme(e,t){const n=e.file&&Gme(Xa(e.file,e.start)),r=e.file&&Gme(Xa(e.file,e.start+e.length)),i=Jq(e.messageText,"\n"),{code:o,source:a}=e,s={start:n,end:r,text:i,code:o,category:vi(e),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,source:a,relatedInformation:O(e.relatedInformation,Hme)};return t?{...s,fileName:e.file&&e.file.fileName}:s}var Qme=_fe;function Yme(e,t,n,r){const i=t.hasLevel(3),o=JSON.stringify(e);return i&&t.info(`${e.type}:${NH(e)}`),`Content-Length: ${1+n(o,"utf8")}\r\n\r\n${o}${r}`}function Zme(e,t){return{seq:0,type:"event",event:e,body:t}}function ege(e){return it((({textSpan:e})=>e.start+100003*e.length),KQ(e))}function tge(e,t,n){for(const r of ot(e)?e:e.projects)n(r,t);!ot(e)&&e.symLinkedProjects&&e.symLinkedProjects.forEach(((e,t)=>{for(const r of e)n(r,t)}))}function nge(e,t,n,r,i,o){const a=new Map,s=rt();s.enqueue({project:t,location:n}),tge(e,n.fileName,((e,t)=>{const r={fileName:t,pos:n.pos};s.enqueue({project:e,location:r})}));const c=t.projectService,l=t.getCancellationToken(),u=function(e,t,n){const r=e.getLanguageService().getDefinitionAtPosition(t.fileName,t.pos,!1,n),i=r&&Se(r);return i&&!i.isLocal?{fileName:i.fileName,pos:i.textSpan.start}:void 0}(t,n,r),_=bt((()=>t.isSourceOfProjectReferenceRedirect(u.fileName)?u:t.getLanguageService().getSourceMapper().tryGetGeneratedPosition(u))),d=bt((()=>t.isSourceOfProjectReferenceRedirect(u.fileName)?u:t.getLanguageService().getSourceMapper().tryGetSourcePosition(u))),p=new Set;e:for(;!s.isEmpty();){for(;!s.isEmpty();){if(l.isCancellationRequested())break e;const{project:e,location:t}=s.dequeue();if(a.has(e))continue;if(ige(e,t))continue;if(Fme(e),!e.containsFile(Qpe(t.fileName)))continue;const n=f(e,t);a.set(e,n??Hpe),p.add(oge(e))}u&&(c.loadAncestorProjectTree(p),c.forEachEnabledProject((e=>{if(l.isCancellationRequested())return;if(a.has(e))return;const t=rge(u,e,_,d);t&&s.enqueue({project:e,location:t})})))}return 1===a.size?Ce(a.values()):a;function f(e,t){const n=i(e,t);if(n){for(const t of n)o(t,(t=>{const n=c.getOriginalLocationEnsuringConfiguredProject(e,t);if(!n)return;const r=c.getScriptInfo(n.fileName);for(const e of r.containingProjects)e.isOrphan()||a.has(e)||s.enqueue({project:e,location:n});const i=c.getSymlinkedProjects(r);i&&i.forEach(((e,t)=>{for(const r of e)r.isOrphan()||a.has(r)||s.enqueue({project:r,location:{fileName:t,pos:n.pos}})}))}));return n}}}function rge(e,t,n,r){if(t.containsFile(Qpe(e.fileName))&&!ige(t,e))return e;const i=n();if(i&&t.containsFile(Qpe(i.fileName)))return i;const o=r();return o&&t.containsFile(Qpe(o.fileName))?o:void 0}function ige(e,t){if(!t)return!1;const n=e.getLanguageService().getProgram();if(!n)return!1;const r=n.getSourceFile(t.fileName);return!!r&&r.resolvedPath!==r.path&&r.resolvedPath!==e.toPath(t.fileName)}function oge(e){return zfe(e)?e.canonicalConfigFilePath:e.getProjectName()}function age({fileName:e,textSpan:t}){return{fileName:e,pos:t.start}}function sge(e,t){return GQ(e,t.getSourceMapper(),(e=>t.projectService.fileExists(e)))}function cge(e,t){return XQ(e,t.getSourceMapper(),(e=>t.projectService.fileExists(e)))}function lge(e,t){return QQ(e,t.getSourceMapper(),(e=>t.projectService.fileExists(e)))}var uge=["openExternalProject","openExternalProjects","closeExternalProject","synchronizeProjectList","emit-output","compileOnSaveAffectedFileList","compileOnSaveEmitFile","compilerOptionsDiagnostics-full","encodedSemanticClassifications-full","semanticDiagnosticsSync","suggestionDiagnosticsSync","geterrForProject","reload","reloadProjects","getCodeFixes","getCodeFixes-full","getCombinedCodeFix","getCombinedCodeFix-full","applyCodeActionCommand","getSupportedCodeFixes","getApplicableRefactors","getMoveToRefactoringFileSuggestions","getEditsForRefactor","getEditsForRefactor-full","organizeImports","organizeImports-full","getEditsForFileRename","getEditsForFileRename-full","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","getPasteEdits"],_ge=[...uge,"definition","definition-full","definitionAndBoundSpan","definitionAndBoundSpan-full","typeDefinition","implementation","implementation-full","references","references-full","rename","renameLocations-full","rename-full","quickinfo","quickinfo-full","completionInfo","completions","completions-full","completionEntryDetails","completionEntryDetails-full","signatureHelp","signatureHelp-full","navto","navto-full","documentHighlights","documentHighlights-full"],dge=class e{constructor(e){this.changeSeq=0,this.handlers=new Map(Object.entries({status:()=>{const e={version:c};return this.requiredResponse(e)},openExternalProject:e=>(this.projectService.openExternalProject(e.arguments,!0),this.requiredResponse(!0)),openExternalProjects:e=>(this.projectService.openExternalProjects(e.arguments.projects),this.requiredResponse(!0)),closeExternalProject:e=>(this.projectService.closeExternalProject(e.arguments.projectFileName,!0),this.requiredResponse(!0)),synchronizeProjectList:e=>{const t=this.projectService.synchronizeProjectList(e.arguments.knownProjects,e.arguments.includeProjectReferenceRedirectInfo);if(!t.some((e=>e.projectErrors&&0!==e.projectErrors.length)))return this.requiredResponse(t);const n=O(t,(e=>e.projectErrors&&0!==e.projectErrors.length?{info:e.info,changes:e.changes,files:e.files,projectErrors:this.convertToDiagnosticsWithLinePosition(e.projectErrors,void 0)}:e));return this.requiredResponse(n)},updateOpen:e=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(e.arguments.openFiles&&M(e.arguments.openFiles,(e=>({fileName:e.file,content:e.fileContent,scriptKind:e.scriptKindName,projectRootPath:e.projectRootPath}))),e.arguments.changedFiles&&M(e.arguments.changedFiles,(e=>({fileName:e.fileName,changes:V(ye(e.textChanges),(t=>{const n=xn.checkDefined(this.projectService.getScriptInfo(e.fileName)),r=n.lineOffsetToPosition(t.start.line,t.start.offset),i=n.lineOffsetToPosition(t.end.line,t.end.offset);return r>=0?{span:{start:r,length:i-r},newText:t.newText}:void 0}))}))),e.arguments.closedFiles),this.requiredResponse(!0)),applyChangedToOpenFiles:e=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(e.arguments.openFiles,e.arguments.changedFiles&&M(e.arguments.changedFiles,(e=>({fileName:e.fileName,changes:ye(e.changes)}))),e.arguments.closedFiles),this.requiredResponse(!0)),exit:()=>(this.exit(),this.notRequired()),definition:e=>this.requiredResponse(this.getDefinition(e.arguments,!0)),"definition-full":e=>this.requiredResponse(this.getDefinition(e.arguments,!1)),definitionAndBoundSpan:e=>this.requiredResponse(this.getDefinitionAndBoundSpan(e.arguments,!0)),"definitionAndBoundSpan-full":e=>this.requiredResponse(this.getDefinitionAndBoundSpan(e.arguments,!1)),findSourceDefinition:e=>this.requiredResponse(this.findSourceDefinition(e.arguments)),"emit-output":e=>this.requiredResponse(this.getEmitOutput(e.arguments)),typeDefinition:e=>this.requiredResponse(this.getTypeDefinition(e.arguments)),implementation:e=>this.requiredResponse(this.getImplementation(e.arguments,!0)),"implementation-full":e=>this.requiredResponse(this.getImplementation(e.arguments,!1)),references:e=>this.requiredResponse(this.getReferences(e.arguments,!0)),"references-full":e=>this.requiredResponse(this.getReferences(e.arguments,!1)),rename:e=>this.requiredResponse(this.getRenameLocations(e.arguments,!0)),"renameLocations-full":e=>this.requiredResponse(this.getRenameLocations(e.arguments,!1)),"rename-full":e=>this.requiredResponse(this.getRenameInfo(e.arguments)),open:e=>(this.openClientFile(Qpe(e.arguments.file),e.arguments.fileContent,mme(e.arguments.scriptKindName),e.arguments.projectRootPath?Qpe(e.arguments.projectRootPath):void 0),this.notRequired()),quickinfo:e=>this.requiredResponse(this.getQuickInfoWorker(e.arguments,!0)),"quickinfo-full":e=>this.requiredResponse(this.getQuickInfoWorker(e.arguments,!1)),getOutliningSpans:e=>this.requiredResponse(this.getOutliningSpans(e.arguments,!0)),outliningSpans:e=>this.requiredResponse(this.getOutliningSpans(e.arguments,!1)),todoComments:e=>this.requiredResponse(this.getTodoComments(e.arguments)),indentation:e=>this.requiredResponse(this.getIndentation(e.arguments)),nameOrDottedNameSpan:e=>this.requiredResponse(this.getNameOrDottedNameSpan(e.arguments)),breakpointStatement:e=>this.requiredResponse(this.getBreakpointStatement(e.arguments)),braceCompletion:e=>this.requiredResponse(this.isValidBraceCompletion(e.arguments)),docCommentTemplate:e=>this.requiredResponse(this.getDocCommentTemplate(e.arguments)),getSpanOfEnclosingComment:e=>this.requiredResponse(this.getSpanOfEnclosingComment(e.arguments)),fileReferences:e=>this.requiredResponse(this.getFileReferences(e.arguments,!0)),"fileReferences-full":e=>this.requiredResponse(this.getFileReferences(e.arguments,!1)),format:e=>this.requiredResponse(this.getFormattingEditsForRange(e.arguments)),formatonkey:e=>this.requiredResponse(this.getFormattingEditsAfterKeystroke(e.arguments)),"format-full":e=>this.requiredResponse(this.getFormattingEditsForDocumentFull(e.arguments)),"formatonkey-full":e=>this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(e.arguments)),"formatRange-full":e=>this.requiredResponse(this.getFormattingEditsForRangeFull(e.arguments)),completionInfo:e=>this.requiredResponse(this.getCompletions(e.arguments,"completionInfo")),completions:e=>this.requiredResponse(this.getCompletions(e.arguments,"completions")),"completions-full":e=>this.requiredResponse(this.getCompletions(e.arguments,"completions-full")),completionEntryDetails:e=>this.requiredResponse(this.getCompletionEntryDetails(e.arguments,!1)),"completionEntryDetails-full":e=>this.requiredResponse(this.getCompletionEntryDetails(e.arguments,!0)),compileOnSaveAffectedFileList:e=>this.requiredResponse(this.getCompileOnSaveAffectedFileList(e.arguments)),compileOnSaveEmitFile:e=>this.requiredResponse(this.emitFile(e.arguments)),signatureHelp:e=>this.requiredResponse(this.getSignatureHelpItems(e.arguments,!0)),"signatureHelp-full":e=>this.requiredResponse(this.getSignatureHelpItems(e.arguments,!1)),"compilerOptionsDiagnostics-full":e=>this.requiredResponse(this.getCompilerOptionsDiagnostics(e.arguments)),"encodedSyntacticClassifications-full":e=>this.requiredResponse(this.getEncodedSyntacticClassifications(e.arguments)),"encodedSemanticClassifications-full":e=>this.requiredResponse(this.getEncodedSemanticClassifications(e.arguments)),cleanup:()=>(this.cleanup(),this.requiredResponse(!0)),semanticDiagnosticsSync:e=>this.requiredResponse(this.getSemanticDiagnosticsSync(e.arguments)),syntacticDiagnosticsSync:e=>this.requiredResponse(this.getSyntacticDiagnosticsSync(e.arguments)),suggestionDiagnosticsSync:e=>this.requiredResponse(this.getSuggestionDiagnosticsSync(e.arguments)),geterr:e=>(this.errorCheck.startNew((t=>this.getDiagnostics(t,e.arguments.delay,e.arguments.files))),this.notRequired()),geterrForProject:e=>(this.errorCheck.startNew((t=>this.getDiagnosticsForProject(t,e.arguments.delay,e.arguments.file))),this.notRequired()),change:e=>(this.change(e.arguments),this.notRequired()),configure:e=>(this.projectService.setHostConfiguration(e.arguments),this.doOutput(void 0,"configure",e.seq,!0),this.notRequired()),reload:e=>(this.reload(e.arguments,e.seq),this.requiredResponse({reloadFinished:!0})),saveto:e=>{const t=e.arguments;return this.saveToTmp(t.file,t.tmpfile),this.notRequired()},close:e=>{const t=e.arguments;return this.closeClientFile(t.file),this.notRequired()},navto:e=>this.requiredResponse(this.getNavigateToItems(e.arguments,!0)),"navto-full":e=>this.requiredResponse(this.getNavigateToItems(e.arguments,!1)),brace:e=>this.requiredResponse(this.getBraceMatching(e.arguments,!0)),"brace-full":e=>this.requiredResponse(this.getBraceMatching(e.arguments,!1)),navbar:e=>this.requiredResponse(this.getNavigationBarItems(e.arguments,!0)),"navbar-full":e=>this.requiredResponse(this.getNavigationBarItems(e.arguments,!1)),navtree:e=>this.requiredResponse(this.getNavigationTree(e.arguments,!0)),"navtree-full":e=>this.requiredResponse(this.getNavigationTree(e.arguments,!1)),documentHighlights:e=>this.requiredResponse(this.getDocumentHighlights(e.arguments,!0)),"documentHighlights-full":e=>this.requiredResponse(this.getDocumentHighlights(e.arguments,!1)),compilerOptionsForInferredProjects:e=>(this.setCompilerOptionsForInferredProjects(e.arguments),this.requiredResponse(!0)),projectInfo:e=>this.requiredResponse(this.getProjectInfo(e.arguments)),reloadProjects:()=>(this.projectService.reloadProjects(),this.notRequired()),jsxClosingTag:e=>this.requiredResponse(this.getJsxClosingTag(e.arguments)),linkedEditingRange:e=>this.requiredResponse(this.getLinkedEditingRange(e.arguments)),getCodeFixes:e=>this.requiredResponse(this.getCodeFixes(e.arguments,!0)),"getCodeFixes-full":e=>this.requiredResponse(this.getCodeFixes(e.arguments,!1)),getCombinedCodeFix:e=>this.requiredResponse(this.getCombinedCodeFix(e.arguments,!0)),"getCombinedCodeFix-full":e=>this.requiredResponse(this.getCombinedCodeFix(e.arguments,!1)),applyCodeActionCommand:e=>this.requiredResponse(this.applyCodeActionCommand(e.arguments)),getSupportedCodeFixes:e=>this.requiredResponse(this.getSupportedCodeFixes(e.arguments)),getApplicableRefactors:e=>this.requiredResponse(this.getApplicableRefactors(e.arguments)),getEditsForRefactor:e=>this.requiredResponse(this.getEditsForRefactor(e.arguments,!0)),getMoveToRefactoringFileSuggestions:e=>this.requiredResponse(this.getMoveToRefactoringFileSuggestions(e.arguments)),getPasteEdits:e=>this.requiredResponse(this.getPasteEdits(e.arguments)),"getEditsForRefactor-full":e=>this.requiredResponse(this.getEditsForRefactor(e.arguments,!1)),organizeImports:e=>this.requiredResponse(this.organizeImports(e.arguments,!0)),"organizeImports-full":e=>this.requiredResponse(this.organizeImports(e.arguments,!1)),getEditsForFileRename:e=>this.requiredResponse(this.getEditsForFileRename(e.arguments,!0)),"getEditsForFileRename-full":e=>this.requiredResponse(this.getEditsForFileRename(e.arguments,!1)),configurePlugin:e=>(this.configurePlugin(e.arguments),this.doOutput(void 0,"configurePlugin",e.seq,!0),this.notRequired()),selectionRange:e=>this.requiredResponse(this.getSmartSelectionRange(e.arguments,!0)),"selectionRange-full":e=>this.requiredResponse(this.getSmartSelectionRange(e.arguments,!1)),prepareCallHierarchy:e=>this.requiredResponse(this.prepareCallHierarchy(e.arguments)),provideCallHierarchyIncomingCalls:e=>this.requiredResponse(this.provideCallHierarchyIncomingCalls(e.arguments)),provideCallHierarchyOutgoingCalls:e=>this.requiredResponse(this.provideCallHierarchyOutgoingCalls(e.arguments)),toggleLineComment:e=>this.requiredResponse(this.toggleLineComment(e.arguments,!0)),"toggleLineComment-full":e=>this.requiredResponse(this.toggleLineComment(e.arguments,!1)),toggleMultilineComment:e=>this.requiredResponse(this.toggleMultilineComment(e.arguments,!0)),"toggleMultilineComment-full":e=>this.requiredResponse(this.toggleMultilineComment(e.arguments,!1)),commentSelection:e=>this.requiredResponse(this.commentSelection(e.arguments,!0)),"commentSelection-full":e=>this.requiredResponse(this.commentSelection(e.arguments,!1)),uncommentSelection:e=>this.requiredResponse(this.uncommentSelection(e.arguments,!0)),"uncommentSelection-full":e=>this.requiredResponse(this.uncommentSelection(e.arguments,!1)),provideInlayHints:e=>this.requiredResponse(this.provideInlayHints(e.arguments)),mapCode:e=>this.requiredResponse(this.mapCode(e.arguments))})),this.host=e.host,this.cancellationToken=e.cancellationToken,this.typingsInstaller=e.typingsInstaller||Tfe,this.byteLength=e.byteLength,this.hrtime=e.hrtime,this.logger=e.logger,this.canUseEvents=e.canUseEvents,this.suppressDiagnosticEvents=e.suppressDiagnosticEvents,this.noGetErrOnBackgroundUpdate=e.noGetErrOnBackgroundUpdate;const{throttleWaitMilliseconds:t}=e;this.eventHandler=this.canUseEvents?e.eventHandler||(e=>this.defaultEventHandler(e)):void 0;const n={executeWithRequestId:(e,t)=>this.executeWithRequestId(e,t),getCurrentRequestId:()=>this.currentRequestId,getServerHost:()=>this.host,logError:(e,t)=>this.logError(e,t),sendRequestCompletedEvent:e=>this.sendRequestCompletedEvent(e),isCancellationRequested:()=>this.cancellationToken.isCancellationRequested()};this.errorCheck=new class{constructor(e){this.operationHost=e}startNew(e){this.complete(),this.requestId=this.operationHost.getCurrentRequestId(),this.executeAction(e)}complete(){void 0!==this.requestId&&(this.operationHost.sendRequestCompletedEvent(this.requestId),this.requestId=void 0),this.setTimerHandle(void 0),this.setImmediateId(void 0)}immediate(e,t){const n=this.requestId;xn.assert(n===this.operationHost.getCurrentRequestId(),"immediate: incorrect request id"),this.setImmediateId(this.operationHost.getServerHost().setImmediate((()=>{this.immediateId=void 0,this.operationHost.executeWithRequestId(n,(()=>this.executeAction(t)))}),e))}delay(e,t,n){const r=this.requestId;xn.assert(r===this.operationHost.getCurrentRequestId(),"delay: incorrect request id"),this.setTimerHandle(this.operationHost.getServerHost().setTimeout((()=>{this.timerHandle=void 0,this.operationHost.executeWithRequestId(r,(()=>this.executeAction(n)))}),t,e))}executeAction(e){var t,n,r,i,o,a;let s=!1;try{this.operationHost.isCancellationRequested()?(s=!0,null==(t=or)||t.instant(or.Phase.Session,"stepCanceled",{seq:this.requestId,early:!0})):(null==(n=or)||n.push(or.Phase.Session,"stepAction",{seq:this.requestId}),e(this),null==(r=or)||r.pop())}catch(e){null==(i=or)||i.popAll(),s=!0,e instanceof Lr?null==(o=or)||o.instant(or.Phase.Session,"stepCanceled",{seq:this.requestId}):(null==(a=or)||a.instant(or.Phase.Session,"stepError",{seq:this.requestId,message:e.message}),this.operationHost.logError(e,`delayed processing of request ${this.requestId}`))}!s&&this.hasPendingWork()||this.complete()}setTimerHandle(e){void 0!==this.timerHandle&&this.operationHost.getServerHost().clearTimeout(this.timerHandle),this.timerHandle=e}setImmediateId(e){void 0!==this.immediateId&&this.operationHost.getServerHost().clearImmediate(this.immediateId),this.immediateId=e}hasPendingWork(){return!!this.timerHandle||!!this.immediateId}}(n);const r={host:this.host,logger:this.logger,cancellationToken:this.cancellationToken,useSingleInferredProject:e.useSingleInferredProject,useInferredProjectPerProjectRoot:e.useInferredProjectPerProjectRoot,typingsInstaller:this.typingsInstaller,throttleWaitMilliseconds:t,eventHandler:this.eventHandler,suppressDiagnosticEvents:this.suppressDiagnosticEvents,globalPlugins:e.globalPlugins,pluginProbeLocations:e.pluginProbeLocations,allowLocalPluginLoads:e.allowLocalPluginLoads,typesMapLocation:e.typesMapLocation,serverMode:e.serverMode,session:this,canUseWatchEvents:e.canUseWatchEvents,incrementalVerifier:e.incrementalVerifier};switch(this.projectService=new Jme(r),this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)),this.gcTimer=new sfe(this.host,7e3,this.logger),this.projectService.serverMode){case 0:break;case 1:uge.forEach((e=>this.handlers.set(e,(e=>{throw new Error(`Request: ${e.command} not allowed in LanguageServiceMode.PartialSemantic`)}))));break;case 2:_ge.forEach((e=>this.handlers.set(e,(e=>{throw new Error(`Request: ${e.command} not allowed in LanguageServiceMode.Syntactic`)}))));break;default:xn.assertNever(this.projectService.serverMode)}}sendRequestCompletedEvent(e){this.event({request_seq:e},"requestCompleted")}addPerformanceData(e,t){this.performanceData||(this.performanceData={}),this.performanceData[e]=(this.performanceData[e]??0)+t}performanceEventHandler(e){switch(e.kind){case"UpdateGraph":this.addPerformanceData("updateGraphDurationMs",e.durationMs);break;case"CreatePackageJsonAutoImportProvider":this.addPerformanceData("createAutoImportProviderProgramDurationMs",e.durationMs)}}defaultEventHandler(e){switch(e.eventName){case Wfe:this.projectsUpdatedInBackgroundEvent(e.data.openFiles);break;case Hfe:this.event({projectName:e.data.project.getProjectName(),reason:e.data.reason},e.eventName);break;case Gfe:this.event({projectName:e.data.project.getProjectName()},e.eventName);break;case Xfe:case tme:case nme:case rme:this.event(e.data,e.eventName);break;case Qfe:this.event({triggerFile:e.data.triggerFile,configFile:e.data.configFileName,diagnostics:O(e.data.diagnostics,(e=>Xme(e,!0)))},e.eventName);break;case Yfe:this.event({projectName:e.data.project.getProjectName(),languageServiceEnabled:e.data.languageServiceEnabled},e.eventName);break;case Zfe:{const t="telemetry";this.event({telemetryEventName:e.eventName,payload:e.data},t);break}}}projectsUpdatedInBackgroundEvent(e){this.projectService.logger.info(`got projects updated in background ${e}`),e.length&&(this.suppressDiagnosticEvents||this.noGetErrOnBackgroundUpdate||(this.projectService.logger.info(`Queueing diagnostics update for ${e}`),this.errorCheck.startNew((t=>this.updateErrorCheck(t,e,100,!0)))),this.event({openFiles:e},Wfe))}logError(e,t){this.logErrorWorker(e,t)}logErrorWorker(e,t,n){let r="Exception on executing command "+t;if(e.message&&(r+=":\n"+PH(e.message),e.stack&&(r+="\n"+PH(e.stack))),this.logger.hasLevel(3)){if(n)try{const{file:e,project:t}=this.getFileAndProject(n),i=t.getScriptInfoForNormalizedPath(e);if(i){const e=yQ(i.getSnapshot());r+=`\n\nFile text of ${n.file}:${PH(e)}\n`}}catch{}if(e.ProgramFiles){r+=`\n\nProgram files: ${JSON.stringify(e.ProgramFiles)}\n`,r+="\n\nProjects::\n";let t=0;const n=e=>{r+=`\nProject '${e.projectName}' (${Dfe[e.projectKind]}) ${t}\n`,r+=e.filesToString(!0),r+="\n-----------------------------------------------\n",t++};this.projectService.externalProjects.forEach(n),this.projectService.configuredProjects.forEach(n),this.projectService.inferredProjects.forEach(n)}}this.logger.msg(r,"Err")}send(e){"event"!==e.type||this.canUseEvents?this.writeMessage(e):this.logger.hasLevel(3)&&this.logger.info(`Session does not support events: ignored event: ${NH(e)}`)}writeMessage(e){var t;const n=Yme(e,this.logger,this.byteLength,this.host.newLine);null==(t=tr)||t.logEvent(`Response message size: ${n.length}`),this.host.write(n)}event(e,t){this.send(Zme(t,e))}doOutput(e,t,n,r,i){const o={seq:0,type:"response",command:t,request_seq:n,success:r,performanceData:this.performanceData};if(r){let t;if(ot(e))o.body=e,t=e.metadata,delete e.metadata;else if("object"==typeof e)if(e.metadata){const{metadata:n,...r}=e;o.body=r,t=n}else o.body=e;else o.body=e;t&&(o.metadata=t)}else xn.assert(void 0===e);i&&(o.message=i),this.send(o)}semanticCheck(e,t){var n,r;null==(n=or)||n.push(or.Phase.Session,"semanticCheck",{file:e,configFilePath:t.canonicalConfigFilePath});const i=Kme(t,e)?Hpe:t.getLanguageService().getSemanticDiagnostics(e).filter((e=>!!e.file));this.sendDiagnosticsEvent(e,t,i,"semanticDiag"),null==(r=or)||r.pop()}syntacticCheck(e,t){var n,r;null==(n=or)||n.push(or.Phase.Session,"syntacticCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.sendDiagnosticsEvent(e,t,t.getLanguageService().getSyntacticDiagnostics(e),"syntaxDiag"),null==(r=or)||r.pop()}suggestionCheck(e,t){var n,r;null==(n=or)||n.push(or.Phase.Session,"suggestionCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.sendDiagnosticsEvent(e,t,t.getLanguageService().getSuggestionDiagnostics(e),"suggestionDiag"),null==(r=or)||r.pop()}sendDiagnosticsEvent(e,t,n,r){try{this.event({file:e,diagnostics:n.map((n=>Wme(e,t,n)))},r)}catch(e){this.logError(e,r)}}updateErrorCheck(e,t,n,r=!0){xn.assert(!this.suppressDiagnosticEvents);const i=this.changeSeq,o=Math.min(n,200);let a=0;const s=()=>{a++,t.length>a&&e.delay("checkOne",o,c)},c=()=>{if(this.changeSeq!==i)return;let n=t[a];if(st(n)&&(n=this.toPendingErrorCheck(n),!n))return void s();const{fileName:o,project:c}=n;Fme(c),c.containsFile(o,r)&&(this.syntacticCheck(o,c),this.changeSeq===i&&(0===c.projectService.serverMode?e.immediate("semanticCheck",(()=>{this.semanticCheck(o,c),this.changeSeq===i&&(this.getPreferences(o).disableSuggestions?s():e.immediate("suggestionCheck",(()=>{this.suggestionCheck(o,c),s()})))})):s()))};t.length>a&&this.changeSeq===i&&e.delay("checkOne",n,c)}cleanProjects(e,t){if(t){this.logger.info(`cleaning ${e}`);for(const e of t)e.getLanguageService(!1).cleanupSemanticCache(),e.cleanupProgram()}}cleanup(){this.cleanProjects("inferred projects",this.projectService.inferredProjects),this.cleanProjects("configured projects",$e(this.projectService.configuredProjects.values())),this.cleanProjects("external projects",this.projectService.externalProjects),this.host.gc&&(this.logger.info("host.gc()"),this.host.gc())}getEncodedSyntacticClassifications(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e);return n.getEncodedSyntacticClassifications(t,e)}getEncodedSemanticClassifications(e){const{file:t,project:n}=this.getFileAndProject(e),r="2020"===e.format?"2020":"original";return n.getLanguageService().getEncodedSemanticClassifications(t,e,r)}getProject(e){return void 0===e?void 0:this.projectService.findProject(e)}getConfigFileAndProject(e){const t=this.getProject(e.projectFileName),n=Qpe(e.file);return{configFile:t&&t.hasConfigFile(n)?n:void 0,project:t}}getConfigFileDiagnostics(e,t,n){const r=F(Z(t.getAllProjectErrors(),t.getLanguageService().getCompilerOptionsDiagnostics()),(t=>!!t.file&&t.file.fileName===e));return n?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(r):O(r,(e=>Xme(e,!1)))}convertToDiagnosticsWithLinePositionFromDiagnosticFile(e){return e.map((e=>({message:Jq(e.messageText,this.host.newLine),start:e.start,length:e.length,category:vi(e),code:e.code,source:e.source,startLocation:e.file&&Gme(Xa(e.file,e.start)),endLocation:e.file&&Gme(Xa(e.file,e.start+e.length)),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,relatedInformation:O(e.relatedInformation,Hme)})))}getCompilerOptionsDiagnostics(e){const t=this.getProject(e.projectFileName);return this.convertToDiagnosticsWithLinePosition(F(t.getLanguageService().getCompilerOptionsDiagnostics(),(e=>!e.file)),void 0)}convertToDiagnosticsWithLinePosition(e,t){return e.map((e=>({message:Jq(e.messageText,this.host.newLine),start:e.start,length:e.length,category:vi(e),code:e.code,source:e.source,startLocation:t&&t.positionToLineOffset(e.start),endLocation:t&&t.positionToLineOffset(e.start+e.length),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,relatedInformation:O(e.relatedInformation,Hme)})))}getDiagnosticsWorker(e,t,n,r){const{project:i,file:o}=this.getFileAndProject(e);if(t&&Kme(i,o))return Hpe;const a=i.getScriptInfoForNormalizedPath(o),s=n(i,o);return r?this.convertToDiagnosticsWithLinePosition(s,a):s.map((e=>Wme(o,i,e)))}getDefinition(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=this.mapDefinitionInfoLocations(i.getLanguageService().getDefinitionAtPosition(r,o)||Hpe,i);return n?this.mapDefinitionInfo(a,i):a.map(e.mapToOriginalLocation)}mapDefinitionInfoLocations(e,t){return e.map((e=>{const n=cge(e,t);return n?{...n,containerKind:e.containerKind,containerName:e.containerName,kind:e.kind,name:e.name,failedAliasResolution:e.failedAliasResolution,...e.unverified&&{unverified:e.unverified}}:e}))}getDefinitionAndBoundSpan(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=xn.checkDefined(i.getScriptInfo(r)),s=i.getLanguageService().getDefinitionAndBoundSpan(r,o);if(!s||!s.definitions)return{definitions:Hpe,textSpan:void 0};const c=this.mapDefinitionInfoLocations(s.definitions,i),{textSpan:l}=s;return n?{definitions:this.mapDefinitionInfo(c,i),textSpan:pge(l,a)}:{definitions:c.map(e.mapToOriginalLocation),textSpan:l}}findSourceDefinition(e){var t;const{file:n,project:r}=this.getFileAndProject(e),i=this.getPositionInFile(e,n),o=r.getLanguageService().getDefinitionAtPosition(n,i);let a=this.mapDefinitionInfoLocations(o||Hpe,r).slice();if(0===this.projectService.serverMode&&(!Q(a,(e=>Qpe(e.fileName)!==n&&!e.isAmbient))||Q(a,(e=>!!e.failedAliasResolution)))){const e=it((e=>e.textSpan.start),KQ(this.host.useCaseSensitiveFileNames));null==a||a.forEach((t=>e.add(t)));const o=r.getNoDtsResolutionProject(n),u=o.getLanguageService(),_=null==(t=u.getDefinitionAtPosition(n,i,!0,!1))?void 0:t.filter((e=>Qpe(e.fileName)!==n));if(Q(_))for(const t of _){if(t.unverified){const n=c(t,r.getLanguageService().getProgram(),u.getProgram());if(Q(n)){for(const t of n)e.add(t);continue}}e.add(t)}else{const t=a.filter((e=>Qpe(e.fileName)!==n&&e.isAmbient));for(const a of Q(t)?t:function(){const e=r.getLanguageService(),t=xX(e.getProgram().getSourceFile(n),i);return($_(t)||qD(t))&&Ox(t.parent)&&Rx(t,(r=>{var i;if(r===t)return;const o=null==(i=e.getDefinitionAtPosition(n,r.getStart(),!0,!1))?void 0:i.filter((e=>Qpe(e.fileName)!==n&&e.isAmbient)).map((e=>({fileName:e.fileName,name:Hh(t)})));return Q(o)?o:void 0}))||Hpe}()){const t=s(a.fileName,n,o);if(!t)continue;const r=this.projectService.getOrCreateScriptInfoNotOpenedByClient(t,o.currentDirectory,o.directoryStructureHost,!1);if(!r)continue;o.containsScriptInfo(r)||(o.addRoot(r),o.updateGraph());const i=u.getProgram(),c=xn.checkDefined(i.getSourceFile(t));for(const t of l(a.name,c,i))e.add(t)}}a=$e(e.values())}return a=a.filter((e=>!e.isAmbient&&!e.failedAliasResolution)),this.mapDefinitionInfo(a,r);function s(e,t,n){var i,o,a;const s=XT(e);if(s&&e.lastIndexOf(Ij)===s.topLevelNodeModulesIndex){const c=e.substring(0,s.packageRootIndex),l=null==(i=r.getModuleResolutionCache())?void 0:i.getPackageJsonInfoCache(),u=r.getCompilationSettings(),_=Hj(Go(c+"/package.json",r.getCurrentDirectory()),Wj(l,r,u));if(!_)return;const d=Uj(_,{moduleResolution:2},r,r.getModuleResolutionCache()),p=gR(hR(e.substring(s.topLevelPackageNameIndex+1,s.packageRootIndex))),f=r.toPath(e);if(d&&Q(d,(e=>r.toPath(e)===f)))return null==(o=n.resolutionCache.resolveSingleModuleNameWithoutWatching(p,t).resolvedModule)?void 0:o.resolvedFileName;{const r=`${p}/${Yk(e.substring(s.packageRootIndex+1))}`;return null==(a=n.resolutionCache.resolveSingleModuleNameWithoutWatching(r,t).resolvedModule)?void 0:a.resolvedFileName}}}function c(e,t,r){var o;const a=r.getSourceFile(e.fileName);if(!a)return;const s=xX(t.getSourceFile(n),i),c=t.getTypeChecker().getSymbolAtLocation(s),u=c&&Y_(c,276);return u?l((null==(o=u.propertyName)?void 0:o.text)||u.name.text,a,r):void 0}function l(e,t,n){return q(Rse.Core.getTopMostDeclarationNamesInFile(e,t),(e=>{const t=n.getTypeChecker().getSymbolAtLocation(e),r=ph(e);if(t&&r)return Cce.createDefinitionInfo(r,n.getTypeChecker(),t,r,!0)}))}}getEmitOutput(e){const{file:t,project:n}=this.getFileAndProject(e);if(!n.shouldEmitFile(n.getScriptInfo(t)))return{emitSkipped:!0,outputFiles:[],diagnostics:[]};const r=n.getLanguageService().getEmitOutput(t);return e.richResponse?{...r,diagnostics:e.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(r.diagnostics):r.diagnostics.map((e=>Xme(e,!0)))}:r}mapJSDocTagInfo(e,t,n){return e?e.map((e=>{var r;return{...e,text:n?this.mapDisplayParts(e.text,t):null==(r=e.text)?void 0:r.map((e=>e.text)).join("")}})):[]}mapDisplayParts(e,t){return e?e.map((e=>"linkName"!==e.kind?e:{...e,target:this.toFileSpan(e.target.fileName,e.target.textSpan,t)})):[]}mapSignatureHelpItems(e,t,n){return e.map((e=>({...e,documentation:this.mapDisplayParts(e.documentation,t),parameters:e.parameters.map((e=>({...e,documentation:this.mapDisplayParts(e.documentation,t)}))),tags:this.mapJSDocTagInfo(e.tags,t,n)})))}mapDefinitionInfo(e,t){return e.map((e=>({...this.toFileSpanWithContext(e.fileName,e.textSpan,e.contextSpan,t),...e.unverified&&{unverified:e.unverified}})))}static mapToOriginalLocation(e){return e.originalFileName?(xn.assert(void 0!==e.originalTextSpan,"originalTextSpan should be present if originalFileName is"),{...e,fileName:e.originalFileName,textSpan:e.originalTextSpan,targetFileName:e.fileName,targetTextSpan:e.textSpan,contextSpan:e.originalContextSpan,targetContextSpan:e.contextSpan}):e}toFileSpan(e,t,n){const r=n.getLanguageService(),i=r.toLineColumnOffset(e,t.start),o=r.toLineColumnOffset(e,js(t));return{file:e,start:{line:i.line+1,offset:i.character+1},end:{line:o.line+1,offset:o.character+1}}}toFileSpanWithContext(e,t,n,r){const i=this.toFileSpan(e,t,r),o=n&&this.toFileSpan(e,n,r);return o?{...i,contextStart:o.start,contextEnd:o.end}:i}getTypeDefinition(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getPositionInFile(e,t),i=this.mapDefinitionInfoLocations(n.getLanguageService().getTypeDefinitionAtPosition(t,r)||Hpe,n);return this.mapDefinitionInfo(i,n)}mapImplementationLocations(e,t){return e.map((e=>{const n=cge(e,t);return n?{...n,kind:e.kind,displayParts:e.displayParts}:e}))}getImplementation(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=this.mapImplementationLocations(i.getLanguageService().getImplementationAtPosition(r,o)||Hpe,i);return n?a.map((({fileName:e,textSpan:t,contextSpan:n})=>this.toFileSpanWithContext(e,t,n,i))):a.map(e.mapToOriginalLocation)}getSyntacticDiagnosticsSync(e){const{configFile:t}=this.getConfigFileAndProject(e);return t?Hpe:this.getDiagnosticsWorker(e,!1,((e,t)=>e.getLanguageService().getSyntacticDiagnostics(t)),!!e.includeLinePosition)}getSemanticDiagnosticsSync(e){const{configFile:t,project:n}=this.getConfigFileAndProject(e);return t?this.getConfigFileDiagnostics(t,n,!!e.includeLinePosition):this.getDiagnosticsWorker(e,!0,((e,t)=>e.getLanguageService().getSemanticDiagnostics(t).filter((e=>!!e.file))),!!e.includeLinePosition)}getSuggestionDiagnosticsSync(e){const{configFile:t}=this.getConfigFileAndProject(e);return t?Hpe:this.getDiagnosticsWorker(e,!0,((e,t)=>e.getLanguageService().getSuggestionDiagnostics(t)),!!e.includeLinePosition)}getJsxClosingTag(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=n.getJsxClosingTagAtPosition(t,r);return void 0===i?void 0:{newText:i.newText,caretOffset:0}}getLinkedEditingRange(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=n.getLinkedEditingRangeAtPosition(t,r),o=this.projectService.getScriptInfoForNormalizedPath(t);if(void 0!==o&&void 0!==i)return function(e,t){const n=e.ranges.map((e=>({start:t.positionToLineOffset(e.start),end:t.positionToLineOffset(e.start+e.length)})));return e.wordPattern?{ranges:n,wordPattern:e.wordPattern}:{ranges:n}}(i,o)}getDocumentHighlights(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.getPositionInFile(e,n),o=r.getLanguageService().getDocumentHighlights(n,i,e.filesToSearch);return o?t?o.map((({fileName:e,highlightSpans:t})=>{const n=r.getScriptInfo(e);return{file:e,highlightSpans:t.map((({textSpan:e,kind:t,contextSpan:r})=>({...fge(e,r,n),kind:t})))}})):o:Hpe}provideInlayHints(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.projectService.getScriptInfoForNormalizedPath(t);return n.getLanguageService().provideInlayHints(t,e,this.getPreferences(t)).map((e=>{const{position:t,displayParts:n}=e;return{...e,position:r.positionToLineOffset(t),displayParts:null==n?void 0:n.map((({text:e,span:t,file:n})=>{if(t){xn.assertIsDefined(n,"Target file should be defined together with its span.");const r=this.projectService.getScriptInfo(n);return{text:e,span:{start:r.positionToLineOffset(t.start),end:r.positionToLineOffset(t.start+t.length),file:n}}}return{text:e}}))}}))}mapCode(e){var t;const n=this.getHostFormatOptions(),r=this.getHostPreferences(),{file:i,languageService:o}=this.getFileAndLanguageServiceForSyntacticOperation(e),a=this.projectService.getScriptInfoForNormalizedPath(i),s=null==(t=e.mapping.focusLocations)?void 0:t.map((e=>e.map((e=>{const t=a.lineOffsetToPosition(e.start.line,e.start.offset);return{start:t,length:a.lineOffsetToPosition(e.end.line,e.end.offset)-t}})))),c=o.mapCode(i,e.mapping.contents,s,n,r);return this.mapTextChangesToCodeEdits(c)}setCompilerOptionsForInferredProjects(e){this.projectService.setCompilerOptionsForInferredProjects(e.options,e.projectRootPath)}getProjectInfo(e){return this.getProjectInfoWorker(e.file,e.projectFileName,e.needFileNameList,!1)}getProjectInfoWorker(e,t,n,r){const{project:i}=this.getFileAndProjectWorker(e,t);return Fme(i),{configFileName:i.getProjectName(),languageServiceDisabled:!i.languageServiceEnabled,fileNames:n?i.getFileNames(!1,r):void 0}}getRenameInfo(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getPositionInFile(e,t),i=this.getPreferences(t);return n.getLanguageService().getRenameInfo(t,r,i)}getProjects(e,t,n){let r,i;if(e.projectFileName){const t=this.getProject(e.projectFileName);t&&(r=[t])}else{const o=t?this.projectService.getScriptInfoEnsuringProjectsUptoDate(e.file):this.projectService.getScriptInfo(e.file);if(!o)return n?Hpe:(this.projectService.logErrorForScriptInfoNotFound(e.file),Upe.ThrowNoProject());t||this.projectService.ensureDefaultProjectForFile(o),r=o.containingProjects,i=this.projectService.getSymlinkedProjects(o)}return r=F(r,(e=>e.languageServiceEnabled&&!e.isOrphan())),n||r&&r.length||i?i?{projects:r,symLinkedProjects:i}:r:(this.projectService.logErrorForScriptInfoNotFound(e.file??e.projectFileName),Upe.ThrowNoProject())}getDefaultProject(e){if(e.projectFileName){const t=this.getProject(e.projectFileName);if(t)return t;if(!e.file)return Upe.ThrowNoProject()}return this.projectService.getScriptInfo(e.file).getDefaultProject()}getRenameLocations(e,t){const n=Qpe(e.file),r=this.getPositionInFile(e,n),i=this.getProjects(e),o=this.getDefaultProject(e),a=this.getPreferences(n),s=this.mapRenameInfo(o.getLanguageService().getRenameInfo(n,r,a),xn.checkDefined(this.projectService.getScriptInfo(n)));if(!s.canRename)return t?{info:s,locs:[]}:[];const c=function(e,t,n,r,i,o,a){const s=nge(e,t,n,!0,((e,t)=>e.getLanguageService().findRenameLocations(t.fileName,t.pos,r,i,o)),((e,t)=>t(age(e))));if(ot(s))return s;const c=[],l=ege(a);return s.forEach(((e,t)=>{for(const n of e)l.has(n)||sge(age(n),t)||(c.push(n),l.add(n))})),c}(i,o,{fileName:e.file,pos:r},!!e.findInStrings,!!e.findInComments,a,this.host.useCaseSensitiveFileNames);return t?{info:s,locs:this.toSpanGroups(c)}:c}mapRenameInfo(e,t){if(e.canRename){const{canRename:n,fileToRename:r,displayName:i,fullDisplayName:o,kind:a,kindModifiers:s,triggerSpan:c}=e;return{canRename:n,fileToRename:r,displayName:i,fullDisplayName:o,kind:a,kindModifiers:s,triggerSpan:pge(c,t)}}return e}toSpanGroups(e){const t=new Map;for(const{fileName:n,textSpan:r,contextSpan:i,originalContextSpan:o,originalTextSpan:a,originalFileName:s,...c}of e){let e=t.get(n);e||t.set(n,e={file:n,locs:[]});const o=xn.checkDefined(this.projectService.getScriptInfo(n));e.locs.push({...fge(r,i,o),...c})}return $e(t.values())}getReferences(e,t){const n=Qpe(e.file),r=this.getProjects(e),i=this.getPositionInFile(e,n),o=function(e,t,n,r,i){var o,a;const s=nge(e,t,n,!1,((e,t)=>(i.info(`Finding references to ${t.fileName} position ${t.pos} in project ${e.getProjectName()}`),e.getLanguageService().findReferences(t.fileName,t.pos))),((e,t)=>{t(age(e.definition));for(const n of e.references)t(age(n))}));if(ot(s))return s;const c=s.get(t);if(void 0===(null==(a=null==(o=null==c?void 0:c[0])?void 0:o.references[0])?void 0:a.isDefinition))s.forEach((e=>{for(const t of e)for(const e of t.references)delete e.isDefinition}));else{const e=ege(r);for(const t of c)for(const n of t.references)if(n.isDefinition){e.add(n);break}const t=new Set;for(;;){let n=!1;if(s.forEach(((r,i)=>{t.has(i)||i.getLanguageService().updateIsDefinitionOfReferencedSymbols(r,e)&&(t.add(i),n=!0)})),!n)break}s.forEach(((e,n)=>{if(!t.has(n))for(const t of e)for(const e of t.references)e.isDefinition=!1}))}const l=[],u=ege(r);return s.forEach(((e,t)=>{for(const n of e){const e=sge(age(n.definition),t),i=void 0===e?n.definition:{...n.definition,textSpan:Gs(e.pos,n.definition.textSpan.length),fileName:e.fileName,contextSpan:lge(n.definition,t)};let o=S(l,(e=>UQ(e.definition,i,r)));o||(o={definition:i,references:[]},l.push(o));for(const e of n.references)u.has(e)||sge(age(e),t)||(u.add(e),o.references.push(e))}})),l.filter((e=>0!==e.references.length))}(r,this.getDefaultProject(e),{fileName:e.file,pos:i},this.host.useCaseSensitiveFileNames,this.logger);if(!t)return o;const a=this.getPreferences(n),s=this.getDefaultProject(e),c=s.getScriptInfoForNormalizedPath(n),l=s.getLanguageService().getQuickInfoAtPosition(n,i),u=l?S7(l.displayParts):"",_=l&&l.textSpan,d=_?c.positionToLineOffset(_.start).offset:0,p=_?c.getSnapshot().getText(_.start,js(_)):"";return{refs:R(o,(e=>e.references.map((e=>hge(this.projectService,e,a))))),symbolName:p,symbolStartOffset:d,symbolDisplayString:u}}getFileReferences(e,t){const n=this.getProjects(e),r=e.file,i=this.getPreferences(Qpe(r)),o=[],a=ege(this.host.useCaseSensitiveFileNames);return tge(n,void 0,(e=>{if(e.getCancellationToken().isCancellationRequested())return;const t=e.getLanguageService().getFileReferences(r);if(t)for(const e of t)a.has(e)||(o.push(e),a.add(e))})),t?{refs:o.map((e=>hge(this.projectService,e,i))),symbolName:`"${e.file}"`}:o}openClientFile(e,t,n,r){this.projectService.openClientFileWithNormalizedPath(e,t,n,!1,r)}getPosition(e,t){return void 0!==e.position?e.position:t.lineOffsetToPosition(e.line,e.offset)}getPositionInFile(e,t){const n=this.projectService.getScriptInfoForNormalizedPath(t);return this.getPosition(e,n)}getFileAndProject(e){return this.getFileAndProjectWorker(e.file,e.projectFileName)}getFileAndLanguageServiceForSyntacticOperation(e){const{file:t,project:n}=this.getFileAndProject(e);return{file:t,languageService:n.getLanguageService(!1)}}getFileAndProjectWorker(e,t){const n=Qpe(e);return{file:n,project:this.getProject(t)||this.projectService.ensureDefaultProjectForFile(n)}}getOutliningSpans(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getOutliningSpans(n);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return i.map((t=>({textSpan:pge(t.textSpan,e),hintSpan:pge(t.hintSpan,e),bannerText:t.bannerText,autoCollapse:t.autoCollapse,kind:t.kind})))}return i}getTodoComments(e){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().getTodoComments(t,e.descriptors)}getDocCommentTemplate(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getDocCommentTemplateAtPosition(t,r,this.getPreferences(t),this.getFormatOptions(t))}getSpanOfEnclosingComment(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.onlyMultiLine,i=this.getPositionInFile(e,t);return n.getSpanOfEnclosingComment(t,i,r)}getIndentation(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=e.options?ume(e.options):this.getFormatOptions(t);return{position:r,indentation:n.getIndentationAtPosition(t,r,i)}}getBreakpointStatement(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getBreakpointStatementAtPosition(t,r)}getNameOrDottedNameSpan(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getNameOrDottedNameSpan(t,r,r)}isValidBraceCompletion(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.isValidBraceCompletionAtPosition(t,r,e.openingBrace.charCodeAt(0))}getQuickInfoWorker(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=r.getLanguageService().getQuickInfoAtPosition(n,this.getPosition(e,i));if(!o)return;const a=!!this.getPreferences(n).displayPartsForJSDoc;if(t){const e=S7(o.displayParts);return{kind:o.kind,kindModifiers:o.kindModifiers,start:i.positionToLineOffset(o.textSpan.start),end:i.positionToLineOffset(js(o.textSpan)),displayString:e,documentation:a?this.mapDisplayParts(o.documentation,r):S7(o.documentation),tags:this.mapJSDocTagInfo(o.tags,r,a)}}return a?o:{...o,tags:this.mapJSDocTagInfo(o.tags,r,!1)}}getFormattingEditsForRange(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.projectService.getScriptInfoForNormalizedPath(t),i=r.lineOffsetToPosition(e.line,e.offset),o=r.lineOffsetToPosition(e.endLine,e.endOffset),a=n.getFormattingEditsForRange(t,i,o,this.getFormatOptions(t));if(a)return a.map((e=>this.convertTextChangeToCodeEdit(e,r)))}getFormattingEditsForRangeFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?ume(e.options):this.getFormatOptions(t);return n.getFormattingEditsForRange(t,e.position,e.endPosition,r)}getFormattingEditsForDocumentFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?ume(e.options):this.getFormatOptions(t);return n.getFormattingEditsForDocument(t,r)}getFormattingEditsAfterKeystrokeFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?ume(e.options):this.getFormatOptions(t);return n.getFormattingEditsAfterKeystroke(t,e.position,e.key,r)}getFormattingEditsAfterKeystroke(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.projectService.getScriptInfoForNormalizedPath(t),i=r.lineOffsetToPosition(e.line,e.offset),o=this.getFormatOptions(t),a=n.getFormattingEditsAfterKeystroke(t,i,e.key,o);if("\n"===e.key&&(!a||0===a.length||function(e,t){return e.every((e=>js(e.span)({start:r.positionToLineOffset(e.span.start),end:r.positionToLineOffset(js(e.span)),newText:e.newText?e.newText:""})))}getCompletions(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getLanguageService().getCompletionsAtPosition(n,o,{...gme(this.getPreferences(n)),triggerCharacter:e.triggerCharacter,triggerKind:e.triggerKind,includeExternalModuleExports:e.includeExternalModuleExports,includeInsertTextCompletions:e.includeInsertTextCompletions},r.projectService.getFormatCodeOptions(n));if(void 0===a)return;if("completions-full"===t)return a;const s=e.prefix||"",c=q(a.entries,(e=>{if(a.isMemberCompletion||an(e.name.toLowerCase(),s.toLowerCase())){const{name:t,kind:n,kindModifiers:r,sortText:o,insertText:a,filterText:s,replacementSpan:c,hasAction:l,source:u,sourceDisplay:_,labelDetails:d,isSnippet:p,isRecommended:f,isPackageJsonImport:m,isImportStatementCompletion:g,data:h}=e;return{name:t,kind:n,kindModifiers:r,sortText:o,insertText:a,filterText:s,replacementSpan:c?pge(c,i):void 0,isSnippet:p,hasAction:l||void 0,source:u,sourceDisplay:_,labelDetails:d,isRecommended:f,isPackageJsonImport:m,isImportStatementCompletion:g,data:h}}}));return"completions"===t?(a.metadata&&(c.metadata=a.metadata),c):{...a,optionalReplacementSpan:a.optionalReplacementSpan&&pge(a.optionalReplacementSpan,i),entries:c}}getCompletionEntryDetails(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.projectService.getFormatCodeOptions(n),s=!!this.getPreferences(n).displayPartsForJSDoc,c=q(e.entryNames,(e=>{const{name:t,source:i,data:s}="string"==typeof e?{name:e,source:void 0,data:void 0}:e;return r.getLanguageService().getCompletionEntryDetails(n,o,t,a,i,this.getPreferences(n),s?ut(s,yge):void 0)}));return t?s?c:c.map((e=>({...e,tags:this.mapJSDocTagInfo(e.tags,r,!1)}))):c.map((e=>({...e,codeActions:O(e.codeActions,(e=>this.mapCodeAction(e))),documentation:this.mapDisplayParts(e.documentation,r),tags:this.mapJSDocTagInfo(e.tags,r,s)})))}getCompileOnSaveAffectedFileList(e){const t=this.getProjects(e,!0,!0),n=this.projectService.getScriptInfo(e.file);return n?function(e,t,n,r){const i=B(ot(n)?n:n.projects,(t=>r(t,e)));return!ot(n)&&n.symLinkedProjects&&n.symLinkedProjects.forEach(((e,n)=>{const o=t(n);i.push(...R(e,(e=>r(e,o))))})),ne(i,wt)}(n,(e=>this.projectService.getScriptInfoForPath(e)),t,((e,t)=>{if(!e.compileOnSaveEnabled||!e.languageServiceEnabled||e.isOrphan())return;const n=e.getCompilationSettings();return n.noEmit||QI(t.fileName)&&!function(e){return LS(e)||!!e.emitDecoratorMetadata}(n)?void 0:{projectFileName:e.getProjectName(),fileNames:e.getCompileOnSaveAffectedFileList(t),projectUsesOutFile:!!n.outFile}})):Hpe}emitFile(e){const{file:t,project:n}=this.getFileAndProject(e);if(n||Upe.ThrowNoProject(),!n.languageServiceEnabled)return!!e.richResponse&&{emitSkipped:!0,diagnostics:[]};const r=n.getScriptInfo(t),{emitSkipped:i,diagnostics:o}=n.emitFile(r,((e,t,n)=>this.host.writeFile(e,t,n)));return e.richResponse?{emitSkipped:i,diagnostics:e.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(o):o.map((e=>Xme(e,!0)))}:!i}getSignatureHelpItems(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getLanguageService().getSignatureHelpItems(n,o,e),s=!!this.getPreferences(n).displayPartsForJSDoc;if(a&&t){const e=a.applicableSpan;return{...a,applicableSpan:{start:i.positionToLineOffset(e.start),end:i.positionToLineOffset(e.start+e.length)},items:this.mapSignatureHelpItems(a.items,r,s)}}return s||!a?a:{...a,items:a.items.map((e=>({...e,tags:this.mapJSDocTagInfo(e.tags,r,!1)})))}}toPendingErrorCheck(e){const t=Qpe(e),n=this.projectService.tryGetDefaultProjectForFile(t);return n&&{fileName:t,project:n}}getDiagnostics(e,t,n){this.suppressDiagnosticEvents||n.length>0&&this.updateErrorCheck(e,n,t)}change(e){const t=this.projectService.getScriptInfo(e.file);xn.assert(!!t),t.textStorage.switchToScriptVersionCache();const n=t.lineOffsetToPosition(e.line,e.offset),r=t.lineOffsetToPosition(e.endLine,e.endOffset);n>=0&&(this.changeSeq++,this.projectService.applyChangesToFile(t,H({span:{start:n,length:r-n},newText:e.insertString})))}reload(e,t){const n=Qpe(e.file),r=void 0===e.tmpfile?void 0:Qpe(e.tmpfile),i=this.projectService.getScriptInfoForNormalizedPath(n);i&&(this.changeSeq++,i.reloadFromFile(r)&&this.doOutput(void 0,"reload",t,!0))}saveToTmp(e,t){const n=this.projectService.getScriptInfo(e);n&&n.saveTo(t)}closeClientFile(e){if(!e)return;const t=Xo(e);this.projectService.closeClientFile(t)}mapLocationNavigationBarItems(e,t){return O(e,(e=>({text:e.text,kind:e.kind,kindModifiers:e.kindModifiers,spans:e.spans.map((e=>pge(e,t))),childItems:this.mapLocationNavigationBarItems(e.childItems,t),indent:e.indent})))}getNavigationBarItems(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getNavigationBarItems(n);return i?t?this.mapLocationNavigationBarItems(i,this.projectService.getScriptInfoForNormalizedPath(n)):i:void 0}toLocationNavigationTree(e,t){return{text:e.text,kind:e.kind,kindModifiers:e.kindModifiers,spans:e.spans.map((e=>pge(e,t))),nameSpan:e.nameSpan&&pge(e.nameSpan,t),childItems:O(e.childItems,(e=>this.toLocationNavigationTree(e,t)))}}getNavigationTree(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getNavigationTree(n);return i?t?this.toLocationNavigationTree(i,this.projectService.getScriptInfoForNormalizedPath(n)):i:void 0}getNavigateToItems(e,t){return R(this.getFullNavigateToItems(e),t?({project:e,navigateToItems:t})=>t.map((t=>{const n=e.getScriptInfo(t.fileName),r={name:t.name,kind:t.kind,kindModifiers:t.kindModifiers,isCaseSensitive:t.isCaseSensitive,matchKind:t.matchKind,file:t.fileName,start:n.positionToLineOffset(t.textSpan.start),end:n.positionToLineOffset(js(t.textSpan))};return t.kindModifiers&&""!==t.kindModifiers&&(r.kindModifiers=t.kindModifiers),t.containerName&&t.containerName.length>0&&(r.containerName=t.containerName),t.containerKind&&t.containerKind.length>0&&(r.containerKind=t.containerKind),r})):({navigateToItems:e})=>e)}getFullNavigateToItems(e){const{currentFileOnly:t,searchValue:n,maxResultCount:r,projectFileName:i}=e;if(t){xn.assertIsDefined(e.file);const{file:t,project:i}=this.getFileAndProject(e);return[{project:i,navigateToItems:i.getLanguageService().getNavigateToItems(n,r,t)}]}const o=this.getHostPreferences(),a=[],s=new Map;return e.file||i?tge(this.getProjects(e),void 0,(e=>c(e))):(this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject((e=>c(e)))),a;function c(e){const t=F(e.getLanguageService().getNavigateToItems(n,r,void 0,e.isNonTsProject(),o.excludeLibrarySymbolsInNavTo),(t=>function(e){const t=e.name;if(!s.has(t))return s.set(t,[e]),!0;const n=s.get(t);for(const t of n)if((r=t)===(i=e)||r&&i&&r.containerKind===i.containerKind&&r.containerName===i.containerName&&r.fileName===i.fileName&&r.isCaseSensitive===i.isCaseSensitive&&r.kind===i.kind&&r.kindModifiers===i.kindModifiers&&r.matchKind===i.matchKind&&r.name===i.name&&r.textSpan.start===i.textSpan.start&&r.textSpan.length===i.textSpan.length)return!1;var r,i;return n.push(e),!0}(t)&&!sge(age(t),e)));t.length&&a.push({project:e,navigateToItems:t})}}getSupportedCodeFixes(e){if(!e)return T7();if(e.file){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().getSupportedCodeFixes(t)}const t=this.getProject(e.projectFileName);return t||Upe.ThrowNoProject(),t.getLanguageService().getSupportedCodeFixes()}isLocation(e){return void 0!==e.line}extractPositionOrRange(e,t){let n,r;var i;return this.isLocation(e)?n=void 0!==(i=e).position?i.position:t.lineOffsetToPosition(i.line,i.offset):r=this.getRange(e,t),xn.checkDefined(void 0===n?r:n)}getRange(e,t){const{startPosition:n,endPosition:r}=this.getStartAndEndPosition(e,t);return{pos:n,end:r}}getApplicableRefactors(e){const{file:t,project:n}=this.getFileAndProject(e),r=n.getScriptInfoForNormalizedPath(t);return n.getLanguageService().getApplicableRefactors(t,this.extractPositionOrRange(e,r),this.getPreferences(t),e.triggerReason,e.kind,e.includeInteractiveActions).map((e=>({...e,actions:e.actions.map((e=>({...e,range:e.range?{start:Gme({line:e.range.start.line,character:e.range.start.offset}),end:Gme({line:e.range.end.line,character:e.range.end.offset})}:void 0})))})))}getEditsForRefactor(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=r.getScriptInfoForNormalizedPath(n),o=r.getLanguageService().getEditsForRefactor(n,this.getFormatOptions(n),this.extractPositionOrRange(e,i),e.refactor,e.action,this.getPreferences(n),e.interactiveRefactorArguments);if(void 0===o)return{edits:[]};if(t){const{renameFilename:e,renameLocation:t,edits:n}=o;let i;return void 0!==e&&void 0!==t&&(i=gge(yQ(r.getScriptInfoForNormalizedPath(Qpe(e)).getSnapshot()),e,t,n)),{renameLocation:i,renameFilename:e,edits:this.mapTextChangesToCodeEdits(n),notApplicableReason:o.notApplicableReason}}return o}getMoveToRefactoringFileSuggestions(e){const{file:t,project:n}=this.getFileAndProject(e),r=n.getScriptInfoForNormalizedPath(t);return n.getLanguageService().getMoveToRefactoringFileSuggestions(t,this.extractPositionOrRange(e,r),this.getPreferences(t))}getPasteEdits(e){const{file:t,project:n}=this.getFileAndProject(e),r=e.copiedFrom?{file:e.copiedFrom.file,range:e.copiedFrom.spans.map((t=>this.getRange({file:e.copiedFrom.file,startLine:t.start.line,startOffset:t.start.offset,endLine:t.end.line,endOffset:t.end.offset},n.getScriptInfoForNormalizedPath(Qpe(e.copiedFrom.file)))))}:void 0,i=n.getLanguageService().getPasteEdits({targetFile:t,pastedText:e.pastedText,pasteLocations:e.pasteLocations.map((e=>this.getRange({file:t,startLine:e.start.line,startOffset:e.start.offset,endLine:e.end.line,endOffset:e.end.offset},n.getScriptInfoForNormalizedPath(t)))),copiedFrom:r,preferences:this.getPreferences(t)},this.getFormatOptions(t));return i&&this.mapPasteEditsAction(i)}organizeImports(e,t){xn.assert("file"===e.scope.type);const{file:n,project:r}=this.getFileAndProject(e.scope.args),i=r.getLanguageService().organizeImports({fileName:n,mode:e.mode??(e.skipDestructiveCodeActions?"SortAndCombine":void 0),type:"file"},this.getFormatOptions(n),this.getPreferences(n));return t?this.mapTextChangesToCodeEdits(i):i}getEditsForFileRename(e,t){const n=Qpe(e.oldFilePath),r=Qpe(e.newFilePath),i=this.getHostFormatOptions(),o=this.getHostPreferences(),a=new Set,s=[];return this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject((e=>{const t=e.getLanguageService().getEditsForFileRename(n,r,i,o),c=[];for(const e of t)a.has(e.fileName)||(s.push(e),c.push(e.fileName));for(const e of c)a.add(e)})),t?s.map((e=>this.mapTextChangeToCodeEdit(e))):s}getCodeFixes(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=r.getScriptInfoForNormalizedPath(n),{startPosition:o,endPosition:a}=this.getStartAndEndPosition(e,i);let s;try{s=r.getLanguageService().getCodeFixesAtPosition(n,o,a,e.errorCodes,this.getFormatOptions(n),this.getPreferences(n))}catch(t){const i=r.getLanguageService(),s=[...i.getSyntacticDiagnostics(n),...i.getSemanticDiagnostics(n),...i.getSuggestionDiagnostics(n)].map((e=>Ks(o,a-o,e.start,e.length)&&e.code)),c=e.errorCodes.find((e=>!s.includes(e)));throw void 0!==c&&(t.message=`BADCLIENT: Bad error code, ${c} not found in range ${o}..${a} (found: ${s.join(", ")}); could have caused this error:\n${t.message}`),t}return t?s.map((e=>this.mapCodeFixAction(e))):s}getCombinedCodeFix({scope:e,fixId:t},n){xn.assert("file"===e.type);const{file:r,project:i}=this.getFileAndProject(e.args),o=i.getLanguageService().getCombinedCodeFix({type:"file",fileName:r},t,this.getFormatOptions(r),this.getPreferences(r));return n?{changes:this.mapTextChangesToCodeEdits(o.changes),commands:o.commands}:o}applyCodeActionCommand(e){const t=e.command;for(const e of at(t)){const{file:t,project:n}=this.getFileAndProject(e);n.getLanguageService().applyCodeActionCommand(e,this.getFormatOptions(t)).then((e=>{}),(e=>{}))}return{}}getStartAndEndPosition(e,t){let n,r;return void 0!==e.startPosition?n=e.startPosition:(n=t.lineOffsetToPosition(e.startLine,e.startOffset),e.startPosition=n),void 0!==e.endPosition?r=e.endPosition:(r=t.lineOffsetToPosition(e.endLine,e.endOffset),e.endPosition=r),{startPosition:n,endPosition:r}}mapCodeAction({description:e,changes:t,commands:n}){return{description:e,changes:this.mapTextChangesToCodeEdits(t),commands:n}}mapCodeFixAction({fixName:e,description:t,changes:n,commands:r,fixId:i,fixAllDescription:o}){return{fixName:e,description:t,changes:this.mapTextChangesToCodeEdits(n),commands:r,fixId:i,fixAllDescription:o}}mapPasteEditsAction({edits:e,fixId:t}){return{edits:this.mapTextChangesToCodeEdits(e),fixId:t}}mapTextChangesToCodeEdits(e){return e.map((e=>this.mapTextChangeToCodeEdit(e)))}mapTextChangeToCodeEdit(e){const t=this.projectService.getScriptInfoOrConfig(e.fileName);return!!e.isNewFile==!!t&&(t||this.projectService.logErrorForScriptInfoNotFound(e.fileName),xn.fail("Expected isNewFile for (only) new files. "+JSON.stringify({isNewFile:!!e.isNewFile,hasScriptInfo:!!t}))),t?{fileName:e.fileName,textChanges:e.textChanges.map((e=>function(e,t){return{start:mge(t,e.span.start),end:mge(t,js(e.span)),newText:e.newText}}(e,t)))}:function(e){xn.assert(1===e.textChanges.length);const t=Te(e.textChanges);return xn.assert(0===t.span.start&&0===t.span.length),{fileName:e.fileName,textChanges:[{start:{line:0,offset:0},end:{line:0,offset:0},newText:t.newText}]}}(e)}convertTextChangeToCodeEdit(e,t){return{start:t.positionToLineOffset(e.span.start),end:t.positionToLineOffset(e.span.start+e.span.length),newText:e.newText?e.newText:""}}getBraceMatching(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getBraceMatchingAtPosition(n,o);return a?t?a.map((e=>pge(e,i))):a:void 0}getDiagnosticsForProject(e,t,n){if(this.suppressDiagnosticEvents)return;const{fileNames:r,languageServiceDisabled:i}=this.getProjectInfoWorker(n,void 0,!0,!0);if(i)return;const o=r.filter((e=>!e.includes("lib.d.ts")));if(0===o.length)return;const a=[],s=[],c=[],l=[],u=Qpe(n),_=this.projectService.ensureDefaultProjectForFile(u);for(const e of o)this.getCanonicalFileName(e)===this.getCanonicalFileName(n)?a.push(e):this.projectService.getScriptInfo(e).isScriptOpen()?s.push(e):QI(e)?l.push(e):c.push(e);const d=[...a,...s,...c,...l].map((e=>({fileName:e,project:_})));this.updateErrorCheck(e,d,t,!1)}configurePlugin(e){this.projectService.configurePlugin(e)}getSmartSelectionRange(e,t){const{locations:n}=e,{file:r,languageService:i}=this.getFileAndLanguageServiceForSyntacticOperation(e),o=xn.checkDefined(this.projectService.getScriptInfo(r));return O(n,(e=>{const n=this.getPosition(e,o),a=i.getSmartSelectionRange(r,n);return t?this.mapSelectionRange(a,o):a}))}toggleLineComment(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfo(n),o=this.getRange(e,i),a=r.toggleLineComment(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map((t=>this.convertTextChangeToCodeEdit(t,e)))}return a}toggleMultilineComment(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.toggleMultilineComment(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map((t=>this.convertTextChangeToCodeEdit(t,e)))}return a}commentSelection(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.commentSelection(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map((t=>this.convertTextChangeToCodeEdit(t,e)))}return a}uncommentSelection(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.uncommentSelection(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map((t=>this.convertTextChangeToCodeEdit(t,e)))}return a}mapSelectionRange(e,t){const n={textSpan:pge(e.textSpan,t)};return e.parent&&(n.parent=this.mapSelectionRange(e.parent,t)),n}getScriptInfoFromProjectService(e){const t=Qpe(e);return this.projectService.getScriptInfoForNormalizedPath(t)||(this.projectService.logErrorForScriptInfoNotFound(t),Upe.ThrowNoProject())}toProtocolCallHierarchyItem(e){const t=this.getScriptInfoFromProjectService(e.file);return{name:e.name,kind:e.kind,kindModifiers:e.kindModifiers,file:e.file,containerName:e.containerName,span:pge(e.span,t),selectionSpan:pge(e.selectionSpan,t)}}toProtocolCallHierarchyIncomingCall(e){const t=this.getScriptInfoFromProjectService(e.from.file);return{from:this.toProtocolCallHierarchyItem(e.from),fromSpans:e.fromSpans.map((e=>pge(e,t)))}}toProtocolCallHierarchyOutgoingCall(e,t){return{to:this.toProtocolCallHierarchyItem(e.to),fromSpans:e.fromSpans.map((e=>pge(e,t)))}}prepareCallHierarchy(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.projectService.getScriptInfoForNormalizedPath(t);if(r){const i=this.getPosition(e,r),o=n.getLanguageService().prepareCallHierarchy(t,i);return o&&EZ(o,(e=>this.toProtocolCallHierarchyItem(e)))}}provideCallHierarchyIncomingCalls(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getScriptInfoFromProjectService(t);return n.getLanguageService().provideCallHierarchyIncomingCalls(t,this.getPosition(e,r)).map((e=>this.toProtocolCallHierarchyIncomingCall(e)))}provideCallHierarchyOutgoingCalls(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getScriptInfoFromProjectService(t);return n.getLanguageService().provideCallHierarchyOutgoingCalls(t,this.getPosition(e,r)).map((e=>this.toProtocolCallHierarchyOutgoingCall(e,r)))}getCanonicalFileName(e){return Xo(this.host.useCaseSensitiveFileNames?e:yt(e))}exit(){}notRequired(){return{responseRequired:!1}}requiredResponse(e){return{response:e,responseRequired:!0}}addProtocolHandler(e,t){if(this.handlers.has(e))throw new Error(`Protocol handler already exists for command "${e}"`);this.handlers.set(e,t)}setCurrentRequest(e){xn.assert(void 0===this.currentRequestId),this.currentRequestId=e,this.cancellationToken.setRequest(e)}resetCurrentRequest(e){xn.assert(this.currentRequestId===e),this.currentRequestId=void 0,this.cancellationToken.resetRequest(e)}executeWithRequestId(e,t){try{return this.setCurrentRequest(e),t()}finally{this.resetCurrentRequest(e)}}executeCommand(e){const t=this.handlers.get(e.command);if(t){const n=this.executeWithRequestId(e.seq,(()=>t(e)));return this.projectService.enableRequestedPlugins(),n}return this.logger.msg(`Unrecognized JSON command:${NH(e)}`,"Err"),this.doOutput(void 0,"unknown",e.seq,!1,`Unrecognized JSON command: ${e.command}`),{responseRequired:!1}}onMessage(e){var t,n,r,i,o,a,s,c,l,u,_;let d,p,f;this.gcTimer.scheduleCollect(),this.performanceData=void 0,this.logger.hasLevel(2)&&(d=this.hrtime(),this.logger.hasLevel(3)&&this.logger.info(`request:${PH(this.toStringMessage(e))}`));try{p=this.parseMessage(e),f=p.arguments&&p.arguments.file?p.arguments:void 0,null==(t=or)||t.instant(or.Phase.Session,"request",{seq:p.seq,command:p.command}),null==(n=tr)||n.logStartCommand(""+p.command,this.toStringMessage(e).substring(0,100)),null==(r=or)||r.push(or.Phase.Session,"executeCommand",{seq:p.seq,command:p.command},!0);const{response:s,responseRequired:c}=this.executeCommand(p);if(null==(i=or)||i.pop(),this.logger.hasLevel(2)){const e=(m=this.hrtime(d),(1e9*m[0]+m[1])/1e6).toFixed(4);c?this.logger.perftrc(`${p.seq}::${p.command}: elapsed time (in milliseconds) ${e}`):this.logger.perftrc(`${p.seq}::${p.command}: async elapsed time (in milliseconds) ${e}`)}null==(o=tr)||o.logStopCommand(""+p.command,"Success"),null==(a=or)||a.instant(or.Phase.Session,"response",{seq:p.seq,command:p.command,success:!!s}),s?this.doOutput(s,p.command,p.seq,!0):c&&this.doOutput(void 0,p.command,p.seq,!1,"No content available.")}catch(t){if(null==(s=or)||s.popAll(),t instanceof Lr)return null==(c=tr)||c.logStopCommand(""+(p&&p.command),"Canceled: "+t),null==(l=or)||l.instant(or.Phase.Session,"commandCanceled",{seq:null==p?void 0:p.seq,command:null==p?void 0:p.command}),void this.doOutput({canceled:!0},p.command,p.seq,!0);this.logErrorWorker(t,this.toStringMessage(e),f),null==(u=tr)||u.logStopCommand(""+(p&&p.command),"Error: "+t),null==(_=or)||_.instant(or.Phase.Session,"commandError",{seq:null==p?void 0:p.seq,command:null==p?void 0:p.command,message:t.message}),this.doOutput(void 0,p?p.command:"unknown",p?p.seq:0,!1,"Error processing request. "+t.message+"\n"+t.stack)}var m}parseMessage(e){return JSON.parse(e)}toStringMessage(e){return e}getFormatOptions(e){return this.projectService.getFormatCodeOptions(e)}getPreferences(e){return this.projectService.getPreferences(e)}getHostFormatOptions(){return this.projectService.getHostFormatCodeOptions()}getHostPreferences(){return this.projectService.getHostPreferences()}};function pge(e,t){return{start:t.positionToLineOffset(e.start),end:t.positionToLineOffset(js(e))}}function fge(e,t,n){const r=pge(e,n),i=t&&pge(t,n);return i?{...r,contextStart:i.start,contextEnd:i.end}:r}function mge(e,t){return zme(e)?{line:(n=e.getLineAndCharacterOfPosition(t)).line+1,offset:n.character+1}:e.positionToLineOffset(t);var n}function gge(e,t,n,r){const i=function(e,t,n){for(const{fileName:r,textChanges:i}of n)if(r===t)for(let t=i.length-1;t>=0;t--){const{newText:n,span:{start:r,length:o}}=i[t];e=e.slice(0,r)+n+e.slice(r+o)}return e}(e,t,r),{line:o,character:a}=Wa(qa(i),n);return{line:o+1,offset:a+1}}function hge(e,{fileName:t,textSpan:n,contextSpan:r,isWriteAccess:i,isDefinition:o},{disableLineTextInReferences:a}){const s=xn.checkDefined(e.getScriptInfo(t)),c=fge(n,r,s),l=a?void 0:function(e,t){const n=e.lineToTextSpan(t.start.line-1);return e.getSnapshot().getText(n.start,js(n)).replace(/\r|\n/g,"")}(s,c);return{file:t,...c,lineText:l,isWriteAccess:i,isDefinition:o}}function yge(e){return void 0===e||e&&"object"==typeof e&&"string"==typeof e.exportName&&(void 0===e.fileName||"string"==typeof e.fileName)&&(void 0===e.ambientModuleName||"string"==typeof e.ambientModuleName&&(void 0===e.isPackageJsonImport||"boolean"==typeof e.isPackageJsonImport))}var vge=(e=>(e[e.PreStart=0]="PreStart",e[e.Start=1]="Start",e[e.Entire=2]="Entire",e[e.Mid=3]="Mid",e[e.End=4]="End",e[e.PostEnd=5]="PostEnd",e))(vge||{}),bge=class e{constructor(){this.changes=[],this.versions=new Array(e.maxVersions),this.minVersion=0,this.currentVersion=0}versionToIndex(t){if(!(tthis.currentVersion))return t%e.maxVersions}currentVersionToIndex(){return this.currentVersion%e.maxVersions}edit(t,n,r){this.changes.push(new class{constructor(e,t,n){this.pos=e,this.deleteLen=t,this.insertedText=n}getTextChangeRange(){return Zs(Gs(this.pos,this.deleteLen),this.insertedText?this.insertedText.length:0)}}(t,n,r)),(this.changes.length>e.changeNumberThreshold||n>e.changeLengthThreshold||r&&r.length>e.changeLengthThreshold)&&this.getSnapshot()}getSnapshot(){return this._getSnapshot()}_getSnapshot(){let t=this.versions[this.currentVersionToIndex()];if(this.changes.length>0){let n=t.index;for(const e of this.changes)n=n.edit(e.pos,e.deleteLen,e.insertedText);t=new Sge(this.currentVersion+1,this,n,this.changes),this.currentVersion=t.version,this.versions[this.currentVersionToIndex()]=t,this.changes=[],this.currentVersion-this.minVersion>=e.maxVersions&&(this.minVersion=this.currentVersion-e.maxVersions+1)}return t}getSnapshotVersion(){return this._getSnapshot().version}getAbsolutePositionAndLineText(e){return this._getSnapshot().index.lineNumberToInfo(e)}lineOffsetToPosition(e,t){return this._getSnapshot().index.absolutePositionOfStartOfLine(e)+(t-1)}positionToLineOffset(e){return this._getSnapshot().index.positionToLineOffset(e)}lineToTextSpan(e){const t=this._getSnapshot().index,{lineText:n,absolutePosition:r}=t.lineNumberToInfo(e+1);return Gs(r,void 0!==n?n.length:t.absolutePositionOfStartOfLine(e+2)-r)}getTextChangesBetweenVersions(e,t){if(!(e=this.minVersion){const n=[];for(let r=e+1;r<=t;r++){const e=this.versions[this.versionToIndex(r)];for(const t of e.changesSincePreviousVersion)n.push(t.getTextChangeRange())}return tc(n)}}getLineCount(){return this._getSnapshot().index.getLineCount()}static fromString(t){const n=new e,r=new Sge(0,n,new kge);n.versions[n.currentVersion]=r;const i=kge.linesFromText(t);return r.index.load(i.lines),n}};bge.changeNumberThreshold=8,bge.changeLengthThreshold=256,bge.maxVersions=8;var xge=bge,Sge=class e{constructor(e,t,n,r=Hpe){this.version=e,this.cache=t,this.index=n,this.changesSincePreviousVersion=r}getText(e,t){return this.index.getText(e,t-e)}getLength(){return this.index.getLength()}getChangeRange(t){if(t instanceof e&&this.cache===t.cache)return this.version<=t.version?ec:this.cache.getTextChangesBetweenVersions(t.version,this.version)}},kge=class e{constructor(){this.checkEdits=!1}absolutePositionOfStartOfLine(e){return this.lineNumberToInfo(e).absolutePosition}positionToLineOffset(e){const{oneBasedLine:t,zeroBasedColumn:n}=this.root.charOffsetToLineInfo(1,e);return{line:t,offset:n+1}}positionToColumnAndLineText(e){return this.root.charOffsetToLineInfo(1,e)}getLineCount(){return this.root.lineCount()}lineNumberToInfo(e){if(e<=this.getLineCount()){const{position:t,leaf:n}=this.root.lineNumberToInfo(e,0);return{absolutePosition:t,lineText:n&&n.text}}return{absolutePosition:this.root.charCount(),lineText:void 0}}load(t){if(t.length>0){const n=[];for(let e=0;e0&&e{n=n.concat(r.text.substring(e,e+t))}}),n}getLength(){return this.root.charCount()}every(e,t,n){n||(n=this.root.charCount());const r={goSubtree:!0,done:!1,leaf(t,n,r){e(r,t,n)||(this.done=!0)}};return this.walk(t,n-t,r),!r.done}edit(t,n,r){if(0===this.root.charCount())return xn.assert(0===n),void 0!==r?(this.load(e.linesFromText(r).lines),this):void 0;{let e;if(this.checkEdits){const i=this.getText(0,this.root.charCount());e=i.slice(0,t)+r+i.slice(t+n)}const i=new class{constructor(){this.goSubtree=!0,this.lineIndex=new kge,this.endBranch=[],this.state=2,this.initialText="",this.trailingText="",this.lineIndex.root=new Tge,this.startPath=[this.lineIndex.root],this.stack=[this.lineIndex.root]}get done(){return!1}insertLines(e,t){t&&(this.trailingText=""),e=e?this.initialText+e+this.trailingText:this.initialText+this.trailingText;const n=kge.linesFromText(e).lines;let r,i;n.length>1&&""===n[n.length-1]&&n.pop();for(let e=this.endBranch.length-1;e>=0;e--)this.endBranch[e].updateCounts(),0===this.endBranch[e].charCount()&&(i=this.endBranch[e],r=e>0?this.endBranch[e-1]:this.branchNode);i&&r.remove(i);const o=this.startPath[this.startPath.length-1];if(n.length>0)if(o.text=n[0],n.length>1){let e=new Array(n.length-1),t=o;for(let t=1;t=0;){const n=this.startPath[r];e=n.insertAt(t,e),r--,t=n}let i=e.length;for(;i>0;){const t=new Tge;t.add(this.lineIndex.root),e=t.insertAt(this.lineIndex.root,e),i=e.length,this.lineIndex.root=t}this.lineIndex.root.updateCounts()}else for(let e=this.startPath.length-2;e>=0;e--)this.startPath[e].updateCounts();else{this.startPath[this.startPath.length-2].remove(o);for(let e=this.startPath.length-2;e>=0;e--)this.startPath[e].updateCounts()}return this.lineIndex}post(e,t,n){n===this.lineCollectionAtBranch&&(this.state=4),this.stack.pop()}pre(e,t,n,r,i){const o=this.stack[this.stack.length-1];let a;function s(e){return e.isLeaf()?new Cge(""):new Tge}switch(2===this.state&&1===i&&(this.state=1,this.branchNode=o,this.lineCollectionAtBranch=n),i){case 0:this.goSubtree=!1,4!==this.state&&o.add(n);break;case 1:4===this.state?this.goSubtree=!1:(a=s(n),o.add(a),this.startPath.push(a));break;case 2:4!==this.state?(a=s(n),o.add(a),this.startPath.push(a)):n.isLeaf()||(a=s(n),o.add(a),this.endBranch.push(a));break;case 3:this.goSubtree=!1;break;case 4:4!==this.state?this.goSubtree=!1:n.isLeaf()||(a=s(n),o.add(a),this.endBranch.push(a));break;case 5:this.goSubtree=!1,1!==this.state&&o.add(n)}this.goSubtree&&this.stack.push(a)}leaf(e,t,n){1===this.state?this.initialText=n.text.substring(0,e):2===this.state?(this.initialText=n.text.substring(0,e),this.trailingText=n.text.substring(e+t)):this.trailingText=n.text.substring(e+t)}};let o=!1;if(t>=this.root.charCount()){t=this.root.charCount()-1;const e=this.getText(t,1);r=r?e+r:e,n=0,o=!0}else if(n>0){const e=t+n,{zeroBasedColumn:i,lineText:o}=this.positionToColumnAndLineText(e);0===i&&(n+=o.length,r=r?r+o:o)}if(this.root.walk(t,n,i),i.insertLines(r,o),this.checkEdits){const t=i.lineIndex.getText(0,i.lineIndex.getLength());xn.assert(e===t,"buffer edit mismatch")}return i.lineIndex}}static buildTreeFromBottom(e){if(e.length<4)return new Tge(e);const t=new Array(Math.ceil(e.length/4));let n=0;for(let r=0;r0?n[r]=i:n.pop(),{lines:n,lineMap:t}}},Tge=class e{constructor(e=[]){this.children=e,this.totalChars=0,this.totalLines=0,e.length&&this.updateCounts()}isLeaf(){return!1}updateCounts(){this.totalChars=0,this.totalLines=0;for(const e of this.children)this.totalChars+=e.charCount(),this.totalLines+=e.lineCount()}execWalk(e,t,n,r,i){return n.pre&&n.pre(e,t,this.children[r],this,i),n.goSubtree?(this.children[r].walk(e,t,n),n.post&&n.post(e,t,this.children[r],this,i)):n.goSubtree=!0,n.done}skipChild(e,t,n,r,i){r.pre&&!r.done&&(r.pre(e,t,this.children[n],this,i),r.goSubtree=!0)}walk(e,t,n){let r=0,i=this.children[r].charCount(),o=e;for(;o>=i;)this.skipChild(o,t,r,n,0),o-=i,r++,i=this.children[r].charCount();if(o+t<=i){if(this.execWalk(o,t,n,r,2))return}else{if(this.execWalk(o,i-o,n,r,1))return;let e=t-(i-o);for(r++,i=this.children[r].charCount();e>i;){if(this.execWalk(0,i,n,r,3))return;e-=i,r++,i=this.children[r].charCount()}if(e>0&&this.execWalk(0,e,n,r,4))return}if(n.pre){const e=this.children.length;if(rt)return n.isLeaf()?{oneBasedLine:e,zeroBasedColumn:t,lineText:n.text}:n.charOffsetToLineInfo(e,t);t-=n.charCount(),e+=n.lineCount()}const n=this.lineCount();return 0===n?{oneBasedLine:1,zeroBasedColumn:0,lineText:void 0}:{oneBasedLine:n,zeroBasedColumn:xn.checkDefined(this.lineNumberToInfo(n,0).leaf).charCount(),lineText:void 0}}lineNumberToInfo(e,t){for(const n of this.children){const r=n.lineCount();if(r>=e)return n.isLeaf()?{position:t,leaf:n}:n.lineNumberToInfo(e,t);e-=r,t+=n.charCount()}return{position:t,leaf:void 0}}splitAfter(t){let n;const r=this.children.length,i=++t;if(t=0;e--)0===a[e].children.length&&a.pop()}t&&a.push(t),this.updateCounts();for(let e=0;e{(this.packageInstalledPromise??(this.packageInstalledPromise=new Map)).set(this.packageInstallId,{resolve:e,reject:t})}));return this.installer.send(t),n}attach(e){this.projectService=e,this.installer=this.createInstallerProcess()}onProjectClosed(e){this.installer.send({projectName:e.getProjectName(),kind:"closeProject"})}enqueueInstallTypingsRequest(e,t,n){const r=Xpe(e,t,n);this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling throttled operation:${NH(r)}`),this.activeRequestCount0?this.activeRequestCount--:xn.fail("TIAdapter:: Received too many responses");!this.requestQueue.isEmpty();){const e=this.requestQueue.dequeue();if(this.requestMap.get(e.projectName)===e){this.requestMap.delete(e.projectName),this.scheduleRequest(e);break}this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Skipping defunct request for: ${e.projectName}`)}this.projectService.updateTypingsForProject(e),this.event(e,"setTypings");break;case TH:this.projectService.watchTypingLocations(e)}}scheduleRequest(t){this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling request for: ${t.projectName}`),this.activeRequestCount++,this.host.setTimeout((()=>{this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Sending request:${NH(t)}`),this.installer.send(t)}),e.requestDelayMillis,`${t.projectName}::${t.kind}`)}};wge.requestDelayMillis=100;var Dge=wge,Ege={};o(Ege,{ActionInvalidate:()=>yH,ActionPackageInstalled:()=>vH,ActionSet:()=>hH,ActionWatchTypingLocations:()=>TH,Arguments:()=>mH,AutoImportProviderProject:()=>jfe,AuxiliaryProject:()=>Mfe,CharRangeSection:()=>vge,CloseFileWatcherEvent:()=>rme,CommandNames:()=>Qme,ConfigFileDiagEvent:()=>Qfe,ConfiguredProject:()=>Rfe,ConfiguredProjectLoadKind:()=>kme,CreateDirectoryWatcherEvent:()=>nme,CreateFileWatcherEvent:()=>tme,Errors:()=>Upe,EventBeginInstallTypes:()=>xH,EventEndInstallTypes:()=>SH,EventInitializationFailed:()=>kH,EventTypesRegistry:()=>bH,ExternalProject:()=>Bfe,GcTimer:()=>sfe,InferredProject:()=>Ofe,LargeFileReferencedEvent:()=>Xfe,LineIndex:()=>kge,LineLeaf:()=>Cge,LineNode:()=>Tge,LogLevel:()=>Wpe,Msg:()=>Gpe,OpenFileInfoTelemetryEvent:()=>eme,Project:()=>Ife,ProjectInfoTelemetryEvent:()=>Zfe,ProjectKind:()=>Dfe,ProjectLanguageServiceStateEvent:()=>Yfe,ProjectLoadingFinishEvent:()=>Gfe,ProjectLoadingStartEvent:()=>Hfe,ProjectService:()=>Jme,ProjectsUpdatedInBackgroundEvent:()=>Wfe,ScriptInfo:()=>kfe,ScriptVersionCache:()=>xge,Session:()=>dge,TextStorage:()=>xfe,ThrottledOperations:()=>afe,TypingsCache:()=>wfe,TypingsInstallerAdapter:()=>Dge,allFilesAreJsOrDts:()=>Nfe,allRootFilesAreJsOrDts:()=>Pfe,asNormalizedPath:()=>Zpe,convertCompilerOptions:()=>_me,convertFormatOptions:()=>ume,convertScriptKindName:()=>mme,convertTypeAcquisition:()=>pme,convertUserPreferences:()=>gme,convertWatchOptions:()=>dme,countEachFileTypes:()=>Efe,createInstallTypingsRequest:()=>Xpe,createModuleSpecifierCache:()=>qme,createNormalizedPathMap:()=>efe,createPackageJsonCache:()=>Vme,createSortedArray:()=>ofe,emptyArray:()=>Hpe,findArgument:()=>wH,forEachResolvedProjectReferenceProject:()=>Tme,formatDiagnosticToProtocol:()=>Xme,formatMessage:()=>Yme,getBaseConfigFileName:()=>cfe,getLocationInNewDocument:()=>gge,hasArgument:()=>CH,hasNoTypeScriptSource:()=>Ffe,indent:()=>PH,isBackgroundProject:()=>qfe,isConfigFile:()=>zme,isConfiguredProject:()=>zfe,isDynamicFileName:()=>Sfe,isExternalProject:()=>$fe,isInferredProject:()=>Jfe,isInferredProjectName:()=>tfe,isProjectDeferredClose:()=>Vfe,makeAutoImportProviderProjectName:()=>rfe,makeAuxiliaryProjectName:()=>ife,makeInferredProjectName:()=>nfe,maxFileSize:()=>Kfe,maxProgramSizeForNonTsFiles:()=>Ufe,normalizedPathToPath:()=>Ype,nowString:()=>DH,nullCancellationToken:()=>Ume,nullTypingsInstaller:()=>Tfe,protocol:()=>ufe,removeSorted:()=>lfe,stringifyIndented:()=>NH,toEvent:()=>Zme,toNormalizedPath:()=>Qpe,tryConvertScriptKindName:()=>fme,typingsInstaller:()=>Rpe,updateProjectIfDirty:()=>Fme}),"undefined"!=typeof console&&(xn.loggingHost={log(e,t){switch(e){case 1:return console.error(t);case 2:return console.warn(t);case 3:case 4:return console.log(t)}}})})({get exports(){return o},set exports(t){o=t,e.exports&&(e.exports=t)}})},8911:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=8911,e.exports=t},2266:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.COMPILER_VERSION=void 0,i(n(6581),t);var o=n(6258);Object.defineProperty(t,"COMPILER_VERSION",{enumerable:!0,get:function(){return o.COMPILER_VERSION}}),n(7696)},7696:function(e,t,n){"use strict";var r,i,o,a,s,c,l,u,_,d,p,f,m,g,h,y,v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const b=v(n(651)),x=()=>{},S=async()=>{};null!==(r=b.default.copy)&&void 0!==r||(b.default.copy=S),null!==(i=b.default.copySync)&&void 0!==i||(b.default.copySync=x),null!==(o=b.default.existsSync)&&void 0!==o||(b.default.existsSync=()=>!1),null!==(a=b.default.outputFile)&&void 0!==a||(b.default.outputFile=S),null!==(s=b.default.outputFileSync)&&void 0!==s||(b.default.outputFileSync=x),null!==(c=b.default.pathExists)&&void 0!==c||(b.default.pathExists=async()=>!1),null!==(l=b.default.pathExistsSync)&&void 0!==l||(b.default.pathExistsSync=()=>!1),null!==(u=b.default.readdir)&&void 0!==u||(b.default.readdir=async()=>[]),null!==(_=b.default.readdirSync)&&void 0!==_||(b.default.readdirSync=()=>[]),null!==(d=b.default.readFileSync)&&void 0!==d||(b.default.readFileSync=()=>Buffer.from("")),null!==(p=b.default.readJson)&&void 0!==p||(b.default.readJson=S),null!==(f=b.default.readJSONSync)&&void 0!==f||(b.default.readJSONSync=x),null!==(m=b.default.realpathSync)&&void 0!==m||(b.default.realpathSync=e=>e),null!==(g=b.default.removeSync)&&void 0!==g||(b.default.removeSync=x),null!==(h=b.default.stat)&&void 0!==h||(b.default.stat=()=>({})),null!==(y=b.default.statSync)&&void 0!==y||(b.default.statSync=()=>({}))},440:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualFileSystem=t.PATH_SEP=void 0,t.pathJoin=o;const r=n(2287),i=n(2991);function o(...e){let n=e[0];for(let r=1;re.length>0))}writeFile(e,t){const n=this.getPathParts(e),o=n.pop();let a=this.root;for(const e of n){const t=(0,i.getOrSetDefault)(a.children,e,(()=>({name:e,children:new Map})));(0,r.assert)("children"in t),a=t}a.children.set(o,{name:o,content:t})}get(e){const t=this.getPathParts(e),n=t.pop();let r=this.root;for(const e of t){const t=r.children.get(e);if(!t)return;if(!("children"in t))return;r=t}return r.children.get(n)}readFile(e){const t=this.get(e);if(t&&"content"in t)return t.content}fileExists(e){const t=this.get(e);return void 0!==t&&"content"in t}directoryExists(e){const t=this.get(e);return void 0!==t&&"children"in t}getDirectories(e){const t=new Array,n=this.get(e);if(n&&"children"in n)for(const[r,i]of n.children)"children"in i&&t.push(o(e,r));return t}getFilePaths(){const e=new Array,t=(n,r="")=>{for(const[i,o]of n.children)"children"in o?t(o,`${r}/${i}`):e.push(`${r}/${i}`)};return t(this.root),e}}},1614:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualProject=void 0;const i=n(9861),o=n(4744),a=n(1979),s=n(440),c=n(9665),l=n(2179),u=n(6258),_=n(7783),d=n(2287),p=n(7856),f=n(3115),m=n(4502),g=n(4567),h=r(n(2137)),y=s.PATH_SEP,v=(0,s.pathJoin)(y,"src"),b=(0,s.pathJoin)(y,"out"),x=(0,s.pathJoin)(v,"playground.tsx"),S=(0,s.pathJoin)(y,u.NODE_MODULES),k=(0,s.pathJoin)(S,u.RBXTS_SCOPE),T=(0,s.pathJoin)(y,"include");t.VirtualProject=class{constructor(){this.nodeModulesPathMapping=new Map,this.data={isPackage:!1,nodeModulesPath:S,projectOptions:Object.assign({},u.DEFAULT_PROJECT_OPTIONS,{rojo:"",type:u.ProjectType.Model,optimizedLoops:!0}),projectPath:y,rojoConfigPath:void 0,tsConfigPath:""},this.compilerOptions={allowSyntheticDefaultImports:!0,downlevelIteration:!0,noLib:!0,strict:!0,target:h.default.ScriptTarget.ESNext,module:h.default.ModuleKind.CommonJS,moduleResolution:h.default.ModuleResolutionKind.Node10,moduleDetection:h.default.ModuleDetectionKind.Force,typeRoots:[k],resolveJsonModule:!0,experimentalDecorators:!0,rootDir:v,outDir:b,jsx:h.default.JsxEmit.React,jsxFactory:"React.createElement",jsxFragmentFactory:"React.Fragment"},(0,c.validateCompilerOptions)(this.compilerOptions,this.data.projectPath),this.vfs=new s.VirtualFileSystem;this.compilerHost=h.default.createCompilerHostWorker(this.compilerOptions,void 0,{getExecutingFilePath:()=>"/index.js",getCurrentDirectory:()=>"/"}),this.compilerHost.readFile=e=>this.vfs.readFile(e),this.compilerHost.fileExists=e=>this.vfs.fileExists(e),this.compilerHost.directoryExists=e=>this.vfs.directoryExists(e),this.compilerHost.getDirectories=e=>this.vfs.getDirectories(e),this.compilerHost.useCaseSensitiveFileNames=()=>!0,this.compilerHost.getCurrentDirectory=()=>s.PATH_SEP,this.rojoResolver=a.RojoResolver.fromTree(y,{$path:b,include:{$path:T,node_modules:{$className:"Folder","@rbxts":{$path:k}}}}),this.pkgRojoResolvers=this.compilerOptions.typeRoots.map(a.RojoResolver.synthetic)}compileSource(e){this.vfs.writeFile(x,e);const t=this.vfs.getFilePaths().filter((e=>e.endsWith(h.default.Extension.Ts)||e.endsWith(h.default.Extension.Tsx)||e.endsWith(h.default.Extension.Dts)));this.program=h.default.createProgram(t,this.compilerOptions,this.compilerHost,this.program),this.typeChecker=this.program.getTypeChecker();const n=(0,g.createTransformServices)(this.typeChecker),r=new o.PathTranslator(v,b,void 0,!1,this.data.projectOptions.luau),a=this.program.getSourceFile(x);(0,d.assert)(a);const s=new Array;if(s.push(...h.default.getPreEmitDiagnostics(this.program,a)),s.push(...(0,l.getCustomPreEmitDiagnostics)(this.data,a)),(0,p.hasErrors)(s))throw new _.DiagnosticError(s);const c=new f.MultiTransformState,u=this.data.projectOptions.type,y=new f.TransformState(this.program,this.data,n,r,c,this.compilerOptions,this.rojoResolver,this.pkgRojoResolvers,this.nodeModulesPathMapping,void 0,this.typeChecker,u,a),S=(0,f.transformSourceFile)(y,a);if(s.push(...m.DiagnosticService.flush()),(0,p.hasErrors)(s))throw new _.DiagnosticError(s);return(0,i.renderAST)(S)}setMapping(e,t){this.nodeModulesPathMapping.set(e,t)}}},4141:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cleanup=function(e){const t=e.outDir;i.default.pathExistsSync(t)&&s(e,t)};const i=r(n(651)),o=r(n(6470)),a=n(3710);function s(e,t){if(i.default.pathExistsSync(t))for(const n of i.default.readdirSync(t)){const r=o.default.join(t,n);if(i.default.statSync(r).isDirectory()){if(".git"===n)continue;s(e,r)}(0,a.tryRemoveOutput)(e,r)}}},648:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProgramFactory=function(e,t){return(n,r=t,l=function(e,t){var n;const r=c.default.createIncrementalCompilerHost(t);let o="";o+=`version=${a.COMPILER_VERSION},`,o+=`type=${String(e.projectOptions.type)},`,o+=`isPackage=${String(e.isPackage)},`,o+=`plugins=${JSON.stringify(null!==(n=t.plugins)&&void 0!==n?n:[])},`,e.rojoConfigPath&&i.default.existsSync(e.rojoConfigPath)&&(o+=i.default.readFileSync(e.rojoConfigPath).toString()),(0,s.assert)(r.createHash);const l=r.createHash;return r.createHash=e=>l(o+e),r}(e,t),u=c.default.readBuilderProgram(t,(0,o.createReadBuildProgramHost)()))=>c.default.createEmitAndSemanticDiagnosticsBuilderProgram(n,r,l,u)};const i=r(n(651)),o=n(1627),a=n(6258),s=n(2287),c=r(n(2137))},2230:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProjectData=function(e,t){var n;const r=a.default.dirname(e),d=u.default.findPackageJson(r,u.default.sys);if(!d)throw new l.ProjectError("Unable to find package.json");let p=!1;try{const e=JSON.parse(o.default.readFileSync(d).toString());p=_.test(null!==(n=e.name)&&void 0!==n?n:"")}catch{}t.includePath=a.default.resolve(t.includePath||a.default.join(r,"include"));const f=a.default.join(a.default.dirname(d),c.NODE_MODULES);let m;if(t.rojo)m=a.default.resolve(t.rojo);else{const{path:e,warnings:t}=i.RojoResolver.findRojoConfigFilePath(r);m=e;for(const e of t)s.LogService.warn(e)}return{tsConfigPath:e,isPackage:p,nodeModulesPath:f,projectOptions:t,projectPath:r,rojoConfigPath:m}};const i=n(1979),o=r(n(651)),a=r(n(6470)),s=n(761),c=n(6258),l=n(3333),u=r(n(2137)),_=/^@[a-z0-9-]*\//},6020:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProjectProgram=function(e,t){const{fileNames:n,options:o}=(0,i.getParsedCommandLine)(e);return(0,r.createProgramFactory)(e,o)(n,o,t)};const r=n(648),i=n(5607)},5607:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedCommandLine=function(e){const t=c.default.getParsedCommandLineOfConfigFile(e.tsConfigPath,{},{fileExists:c.default.sys.fileExists,getCurrentDirectory:c.default.sys.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:e=>{throw new a.DiagnosticError([e])},readDirectory:c.default.sys.readDirectory,readFile:c.default.sys.readFile,useCaseSensitiveFileNames:c.default.sys.useCaseSensitiveFileNames});if(void 0===t)throw new s.ProjectError("Unable to load TS program!");if(t.errors.length>0)throw new a.DiagnosticError(t.errors);return(globalThis.RBXTSC_DEV||void 0!==i.default.url())&&(t.options.incremental=!1,t.options.tsBuildInfoFile=void 0),(0,o.validateCompilerOptions)(t.options,e.projectPath),t};const i=r(n(651)),o=n(9665),a=n(7783),s=n(3333),c=r(n(2137))},3710:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.tryRemoveOutput=function(e,t){(function(e,t){if(t.endsWith(a.DTS_EXT)&&!e.declaration)return!0;for(const n of e.getInputPaths(t))if(i.default.pathExistsSync(n))return!1;return e.buildInfoOutputPath!==t})(e,t)&&(i.default.removeSync(t),o.LogService.writeLineIfVerbose(`remove ${t}`))};const i=r(n(651)),o=n(761),a=n(6258)},9665:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateCompilerOptions=function(e,t){var n,r;const o=new Array;e.noLib!==p&&o.push(`${g('"noLib"')} must be ${g("true")}`),e.strict!==f&&o.push(`${g('"strict"')} must be ${g("true")}`),e.target,e.module!==u&&o.push(`${g('"module"')} must be ${g("commonjs")}`),e.moduleDetection!==_&&o.push(`${g('"moduleDetection"')} must be ${g('"force"')}`),e.moduleResolution!==d&&o.push(`${g('"moduleResolution"')} must be ${g('"Node"')}`),e.allowSyntheticDefaultImports!==m&&o.push(`${g('"allowSyntheticDefaultImports"')} must be ${g("true")}`);const h=a.default.join(t,s.NODE_MODULES,s.RBXTS_SCOPE);void 0!==e.typeRoots&&function(e,t){const n=a.default.resolve(e);for(const e of t)if(a.default.resolve(e)===n)return!0;return!1}(h,e.typeRoots)||o.push(`${g('"typeRoots"')} must contain ${g(h)}`);for(const c of null!==(n=e.types)&&void 0!==n?n:[])(null!==(r=e.typeRoots)&&void 0!==r?r:["node_modules/@rbxts"]).some((e=>{const n=a.default.resolve(t,e,c);return i.default.existsSync(n)||i.default.existsSync(n+s.DTS_EXT)}))||o.push(`${g('"types"')} ${g(c)} were not found. Make sure the path is relative to \`typeRoots\``);if(void 0===e.rootDir&&void 0===e.rootDirs&&o.push(`${g('"rootDir"')} or ${g('"rootDirs"')} must be defined`),void 0===e.outDir&&o.push(`${g('"outDir"')} must be defined`),void 0!==e.importsNotUsedAsValues){const t=e.importsNotUsedAsValues===l.default.ImportsNotUsedAsValues.Preserve?"true":"false";o.push(`${g('"importsNotUsedAsValues"')} is no longer supported, use ${g(`"verbatimModuleSyntax": ${t}`)} instead`)}if(o.length>0)throw new c.ProjectError(['Invalid "tsconfig.json" configuration!',"https://roblox-ts.com/docs/quick-start#project-folder-setup",o.map((e=>`- ${e}\n`)).join("")].join("\n"))};const i=r(n(651)),o=r(n(1391)),a=r(n(6470)),s=n(6258),c=n(3333),l=r(n(2137)),u=(l.default.ScriptTarget.ESNext,l.default.ModuleKind.CommonJS),_=l.default.ModuleDetectionKind.Force,d=l.default.ModuleResolutionKind.Node10,p=!0,f=!0,m=!0;function g(e){return o.default.yellow(e)}},6581:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1614),t),i(n(4141),t),i(n(2230),t),i(n(6020),t)},8405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileUsesCommentDirectives=function(e,t){var n;if(e.projectOptions.allowCommentDirectives)return[];const i=new Array;for(const e of null!==(n=t.commentDirectives)&&void 0!==n?n:[])i.push(r.errors.noCommentDirectives({sourceFile:t,range:e.range}));const o=t.pragmas.get("ts-nocheck");if(o)for(const e of Array.isArray(o)?o:[o])i.push(r.errors.noCommentDirectives({sourceFile:t,range:e.range}));return i};const r=n(7370)},1627:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createReadBuildProgramHost=function(){return{getCurrentDirectory:i.default.sys.getCurrentDirectory,readFile:i.default.sys.readFile,useCaseSensitiveFileNames:()=>i.default.sys.useCaseSensitiveFileNames}};const i=r(n(2137))},2179:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCustomPreEmitDiagnostics=function(e,t){const n=new Array;for(const i of r)n.push(...i(e,t));return n};const r=[n(8405).fileUsesCommentDirectives]},1164:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lazy=void 0,t.Lazy=class{constructor(e){this.getValue=e,this.isInitialized=!1}get(){return this.isInitialized||(this.isInitialized=!0,this.value=this.getValue()),this.value}set(e){this.isInitialized=!0,this.value=e}}},761:function(e,t,n){"use strict";var r=n(4155),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;const o=i(n(1391));class a{static write(e){this.partial=!e.endsWith("\n"),r.stdout.write(e)}static writeLine(...e){this.partial&&this.write("\n");for(const t of e)this.write(t+"\n")}static writeLineIfVerbose(...e){this.verbose&&this.writeLine(...e)}static warn(e){this.writeLine(`${o.default.yellow("Compiler Warning:")} ${e}`)}static fatal(e){this.writeLine(e),r.exit(1)}}t.LogService=a,a.verbose=!1,a.partial=!1},6258:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PROJECT_OPTIONS=t.ProjectType=t.PARENT_FIELD=t.FILENAME_WARNINGS=t.MODULE_SUBEXT=t.CLIENT_SUBEXT=t.SERVER_SUBEXT=t.INIT_NAME=t.INDEX_NAME=t.DTS_EXT=t.D_EXT=t.TSX_EXT=t.TS_EXT=t.RBXTS_SCOPE=t.NODE_MODULES=t.COMPILER_VERSION=t.INCLUDE_PATH=t.PACKAGE_ROOT=void 0;const i=r(n(6470));t.PACKAGE_ROOT=i.default.join("/","..",".."),t.INCLUDE_PATH=i.default.join(t.PACKAGE_ROOT,"include"),t.COMPILER_VERSION=n(5402).version,t.NODE_MODULES="node_modules",t.RBXTS_SCOPE="@rbxts",t.TS_EXT=".ts",t.TSX_EXT=".tsx",t.D_EXT=".d",t.DTS_EXT=t.D_EXT+t.TS_EXT,t.INDEX_NAME="index",t.INIT_NAME="init",t.SERVER_SUBEXT=".server",t.CLIENT_SUBEXT=".client",t.MODULE_SUBEXT="",t.FILENAME_WARNINGS=new Map;for(const e of[t.SERVER_SUBEXT,t.CLIENT_SUBEXT,t.MODULE_SUBEXT])for(const n of[t.TS_EXT,t.TSX_EXT,t.DTS_EXT])t.FILENAME_WARNINGS.set(t.INIT_NAME+e+n,t.INDEX_NAME+e+n);var o;t.PARENT_FIELD="Parent",function(e){e.Game="game",e.Model="model",e.Package="package"}(o||(t.ProjectType=o={})),t.DEFAULT_PROJECT_OPTIONS={includePath:"",rojo:void 0,type:void 0,watch:!1,usePolling:!1,verbose:!1,noInclude:!1,logTruthyChanges:!1,writeOnlyChanged:!1,writeTransformedFiles:!1,optimizedLoops:!0,allowCommentDirectives:!1,luau:!0}},7370:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.warnings=t.errors=void 0,t.getDiagnosticId=function(e){return e.id};const i=r(n(1391)),o=n(8597),a=n(7253),s=n(9889),c=r(n(2137));function l(e){return"Suggestion: "+i.default.yellow(e)}let u=0;function _(e,...t){return d(e,void 0,...t)}function d(e,t,...n){const r=(i,...a)=>(c.default.DiagnosticCategory.Error,t&&n.push(...t(...a)),(0,o.createDiagnosticWithLocation)(r.id,n.filter((e=>!1!==e)).join("\n"),e,i));return r.id=u++,r}function p(e,...t){return(0,s.createTextDiagnostic)(t.filter((e=>!1!==e)).join("\n"),e)}function f(...e){return _(c.default.DiagnosticCategory.Error,...e)}function m(e,...t){return d(c.default.DiagnosticCategory.Error,e,...t)}function g(...e){return p(c.default.DiagnosticCategory.Error,...e)}function h(...e){return _(c.default.DiagnosticCategory.Warning,...e)}t.errors={noInvalidIdentifier:f("Invalid Luau identifier!","Luau identifiers must start with a letter and only contain letters, numbers, and underscores.","Reserved Luau keywords cannot be used as identifiers."),noReservedIdentifier:f("Cannot use identifier reserved for compiler internal usage."),noReservedClassFields:f("Cannot use class field reserved for compiler internal usage."),noClassMetamethods:f("Metamethods cannot be used in class definitions!"),noForInStatement:f("for-in loop statements are not supported!"),noLabeledStatement:f("labels are not supported!"),noDebuggerStatement:f("`debugger` is not supported!"),noNullLiteral:f("`null` is not supported!",l("Use `undefined` instead.")),noPrivateIdentifier:f("Private identifiers are not supported!"),noTypeOfExpression:f("`typeof` operator is not supported!",l("Use `typeIs(value, type)` or `typeOf(value)` instead.")),noRegex:f("Regular expressions are not supported!"),noBigInt:f("BigInt literals are not supported!"),noAny:f("Using values of type `any` is not supported!",l("Use `unknown` instead.")),noVar:f("`var` keyword is not supported!",l("Use `let` or `const` instead.")),noGetterSetter:f("Getters and Setters are not supported!",(0,a.issue)(457)),noAutoAccessorModifiers:f("Getters and Setters are not supported!","The `accessor` keyword requires generating get/set accessors",(0,a.issue)(457)),noEqualsEquals:f("operator `==` is not supported!",l("Use `===` instead.")),noExclamationEquals:f("operator `!=` is not supported!",l("Use `!==` instead.")),noEnumMerging:f("Enum merging is not supported!"),noNamespaceMerging:f("Namespace merging is not supported!"),noSpreadDestructuring:f("Operator `...` is not supported for destructuring!"),noFunctionExpressionName:f("Function expression names are not supported!"),noPrecedingSpreadElement:f("Spread element must come last in a list of arguments!"),noLuaTupleDestructureAssignmentExpression:f("Cannot destructure LuaTuple expression outside of an ExpressionStatement!"),noExportAssignmentLet:f("Cannot use `export =` on a `let` variable!",l("Use `const` instead.")),noGlobalThis:f("`globalThis` is not supported!"),noArguments:f("`arguments` is not supported!"),noPrototype:f("`prototype` is not supported!"),noRobloxSymbolInstanceof:f("The `instanceof` operator can only be used on roblox-ts classes!",l('Use `typeIs(myThing, "TypeToCheck") instead')),noNonNumberStringRelationOperator:f("Relation operators can only be used on number or string types!"),noInstanceMethodCollisions:f("Static methods cannot use the same name as instance methods!"),noStaticMethodCollisions:f("Instance methods cannot use the same name as static methods!"),noUnaryPlus:f("Unary `+` is not supported!",l("Use `tonumber(x)` instead.")),noNonNumberUnaryMinus:f("Unary `-` is only supported for number types!"),noAwaitForOf:f("`await` is not supported in for-of loops!"),noAsyncGeneratorFunctions:f("Async generator functions are not supported!"),noNonStringModuleSpecifier:f("Module specifiers must be a string literal."),noIterableIteration:f("Iterating on Iterable is not supported! You must use a more specific type."),noMixedTypeCall:f("Attempted to call a function with mixed types! All definitions must either be a method or a callback."),noIndexWithoutCall:f("Cannot index a method without calling it!",l("Use the form `() => a.b()` instead of `a.b`.")),noCommentDirectives:f("Usage of `@ts-ignore`, `@ts-expect-error`, and `@ts-nocheck` are not supported!","roblox-ts needs type and symbol info to compile correctly.",l("Consider using type assertions or `declare` statements.")),noOptionalMacroCall:f("Macro methods can not be optionally called!",l("Macros always exist. Use a normal call.")),noConstructorMacroWithoutNew:f("Cannot index a constructor macro without using the `new` operator!"),noMacroExtends:f("Cannot extend from a macro class!",l("Store an instance of the macro class in a property.")),noMacroUnion:f("Macro cannot be applied to a union type!"),noMacroObjectSpread:f("Macro classes cannot be used in an object spread!",l("Did you mean to use an array spread? `[ ...exp ]`")),noVarArgsMacroSpread:f("Macros which use variadic arguments do not support spread expressions!",(0,a.issue)(1149)),noRangeMacroOutsideForOf:f("$range() macro is only valid as an expression of a for-of loop!"),noTupleMacroOutsideReturn:f("$tuple() macro is only valid as an expression of a return statement!"),noModuleSpecifierFile:f("Could not find file for import. Did you forget to `npm install`?"),noInvalidModule:f("You can only use npm scopes that are listed in your typeRoots."),noUnscopedModule:f("You cannot use modules directly under node_modules."),noNonModuleImport:f("Cannot import a non-ModuleScript!"),noIsolatedImport:f("Attempted to import a file inside of an isolated container from outside!"),noServerImport:f("Cannot import a server file from a shared or client location!",l("Move the file you want to import to a shared location.")),noPrecedingJsxSpreadElement:f("JSX spread expression must come last in children!"),expectedMethodGotFunction:f("Attempted to assign non-method where method was expected."),expectedFunctionGotMethod:f("Attempted to assign method where non-method was expected."),noRojoData:m(((e,t)=>[`Could not find Rojo data. There is no $path in your Rojo config that covers ${e}`,t&&l("Did you forget to add a custom npm scope to your default.project.json?")])),noPackageImportWithoutScope:m(((e,t)=>["Imported package Roblox path is missing an npm scope!",`Package path: ${e}`,`Roblox path: ${t.join(".")}`,l('You might need to update your "node_modules" in default.project.json to match:\n"node_modules": {\n\t"$className": "Folder",\n\t"@rbxts": {\n\t\t"$path": "node_modules/@rbxts"\n\t}\n}')])),incorrectFileName:(e,t,n)=>g(`Incorrect file name: \`${e}\`!`,`Full path: ${n}`,l(`Change \`${e}\` to \`${t}\`.`)),rojoPathInSrc:(e,t)=>g("Invalid Rojo configuration. $path fields should be relative to out directory.",l(`Change the value of $path from "${e}" to "${t}".`))},t.warnings={truthyChange:e=>h(`Value will be checked against ${e}`),stringOffsetChange:e=>h(`String macros no longer offset inputs: ${e}`),transformerNotFound:(e,t)=>function(...e){return p(c.default.DiagnosticCategory.Warning,...e)}(`Transformer \`${e}\` was not found!`,"More info: "+t,l("Did you forget to install the package?")),runtimeLibUsedInReplicatedFirst:h("This statement would generate a call to the runtime library. The runtime library should not be used from ReplicatedFirst.")}},7783:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticError=void 0;const r=n(779),i=n(8301);class o extends r.LoggableError{constructor(e){super(),this.diagnostics=e}toString(){return(0,i.formatDiagnostics)(this.diagnostics)}}t.DiagnosticError=o},779:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggableError=void 0;const r=n(761);t.LoggableError=class{constructor(){}log(){r.LogService.writeLine(this.toString())}}},3333:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectError=void 0;const r=n(7783),i=n(9889);class o extends r.DiagnosticError{constructor(e){super([(0,i.createTextDiagnostic)(e)])}}t.ProjectError=o},2287:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error(`Assertion Failed! ${null!=t?t:""}\nThis is a compiler bug! Please submit a bug report here:\nhttps://github.com/roblox-ts/roblox-ts/issues`)}},8597:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDiagnosticWithLocation=function(e,t,n,r){const i=" roblox-ts";return"kind"in r?{category:n,code:i,messageText:t,id:e,file:r.getSourceFile(),start:r.getStart(),length:r.getWidth()}:{category:n,code:i,messageText:t,id:e,file:r.sourceFile,start:r.range.pos,length:r.range.end}}},7253:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.issue=function(e){return"More information: "+i.default.grey(`https://github.com/roblox-ts/roblox-ts/issues/${e}`)};const i=r(n(1391))},9889:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createTextDiagnostic=function(e,t=i.default.DiagnosticCategory.Error){return{category:t,code:" roblox-ts",file:void 0,messageText:e,start:void 0,length:void 0}};const i=r(n(2137))},2532:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findLastIndex=function(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}},8301:function(e,t,n){"use strict";var r=n(4155),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.formatDiagnostics=function(e){return a.default.formatDiagnosticsWithColorAndContext(e,{getCurrentDirectory:()=>r.cwd(),getCanonicalFileName:e=>e,getNewLine:()=>o.EOL})};const o=n(7435),a=i(n(2137))},4998:function(e,t,n){"use strict";var r,i,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getCanonicalFileName=void 0;const a=o(n(2137));t.getCanonicalFileName=a.default.createGetCanonicalFileName(null===(i=null===(r=a.default.sys)||void 0===r?void 0:r.useCaseSensitiveFileNames)||void 0===i||i)},2991:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOrSetDefault=function(e,t,n){let r=e.get(t);return void 0===r&&(r=n(),e.set(t,r)),r}},7856:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hasErrors=function(e){return e.some((e=>e.category===i.default.DiagnosticCategory.Error))};const i=r(n(2137))},2420:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isPathDescendantOf=function(e,t){return t===e||!i.default.relative(t,e).startsWith("..")};const i=r(n(6470))},4502:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticService=void 0;const r=n(7856);class i{static addSingleDiagnostic(e){this.singleDiagnostics.has(e.code)||(this.singleDiagnostics.add(e.code),this.addDiagnostic(e))}static addDiagnostic(e){this.diagnostics.push(e)}static addDiagnostics(e){this.diagnostics.push(...e)}static addDiagnosticWithCache(e,t,n){n.has(e)||(n.add(e),this.addDiagnostic(t))}static flush(){const e=this.diagnostics;return this.diagnostics=[],this.singleDiagnostics.clear(),e}static hasErrors(){return(0,r.hasErrors)(this.diagnostics)}}t.DiagnosticService=i,i.diagnostics=new Array,i.singleDiagnostics=new Set},1677:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MacroManager=t.NOMINAL_LUA_TUPLE_NAME=t.SYMBOL_NAMES=void 0;const i=n(3333),o=n(2287),a=n(6662),s=n(8221),c=n(8503),l=n(153),u=n(6219),_=r(n(2137));function d(e,t){return e.getTypeAtLocation((0,u.skipUpwards)(t))}t.SYMBOL_NAMES={globalThis:"globalThis",ArrayConstructor:"ArrayConstructor",SetConstructor:"SetConstructor",MapConstructor:"MapConstructor",WeakSetConstructor:"WeakSetConstructor",WeakMapConstructor:"WeakMapConstructor",ReadonlyMapConstructor:"ReadonlyMapConstructor",ReadonlySetConstructor:"ReadonlySetConstructor",Array:"Array",Generator:"Generator",IterableFunction:"IterableFunction",LuaTuple:"LuaTuple",Map:"Map",Object:"Object",ReadonlyArray:"ReadonlyArray",ReadonlyMap:"ReadonlyMap",ReadonlySet:"ReadonlySet",ReadVoxelsArray:"ReadVoxelsArray",Set:"Set",String:"String",TemplateStringsArray:"TemplateStringsArray",WeakMap:"WeakMap",WeakSet:"WeakSet",Iterable:"Iterable",$range:"$range",$tuple:"$tuple"},t.NOMINAL_LUA_TUPLE_NAME="_nominal_LuaTuple";const p=new Set([t.SYMBOL_NAMES.ReadonlyArray,t.SYMBOL_NAMES.Array,t.SYMBOL_NAMES.ReadonlyMap,t.SYMBOL_NAMES.WeakMap,t.SYMBOL_NAMES.Map,t.SYMBOL_NAMES.ReadonlySet,t.SYMBOL_NAMES.WeakSet,t.SYMBOL_NAMES.Set,t.SYMBOL_NAMES.String]);function f(e,t){var n;for(const r of null!==(n=e.declarations)&&void 0!==n?n:[])if(t(r))return r;throw new i.ProjectError("")}function m(e,t,n){const r=e.resolveName(t,void 0,n,!1);if(r)return r;throw new i.ProjectError(`MacroManager could not find symbol for ${t}\nYou may need to update your @rbxts/compiler-types!`)}function g(e){for(const t of e.members)if(_.default.isConstructSignatureDeclaration(t))return(0,o.assert)(t.symbol),t.symbol;throw new i.ProjectError(`MacroManager could not find constructor for ${e.name.text}\nYou may need to update your @rbxts/compiler-types!`)}t.MacroManager=class{constructor(e){var n,r,u;this.symbols=new Map,this.identifierMacros=new Map,this.callMacros=new Map,this.constructorMacros=new Map,this.propertyCallMacros=new Map;for(const[t,n]of Object.entries(c.IDENTIFIER_MACROS)){const r=m(e,t,_.default.SymbolFlags.Variable);this.identifierMacros.set(r,n)}for(const[t,n]of Object.entries(a.CALL_MACROS)){const r=m(e,t,_.default.SymbolFlags.Function);this.callMacros.set(r,n)}for(const[t,n]of Object.entries(s.CONSTRUCTOR_MACROS)){const r=g(f(m(e,t,_.default.SymbolFlags.Interface),_.default.isInterfaceDeclaration));this.constructorMacros.set(r,n)}for(const[t,r]of Object.entries(l.PROPERTY_CALL_MACROS)){const a=m(e,t,_.default.SymbolFlags.Interface),s=new Map;for(const t of null!==(n=a.declarations)&&void 0!==n?n:[])if(_.default.isInterfaceDeclaration(t))for(const n of t.members)if(_.default.isMethodSignature(n)&&_.default.isIdentifier(n.name)){const t=d(e,n).symbol;(0,o.assert)(t),s.set(n.name.text,t)}for(const[e,n]of Object.entries(r)){const r=s.get(e);if(!r)throw new i.ProjectError(`MacroManager could not find method for ${t}.${e}\nYou may need to update your @rbxts/compiler-types!`);this.propertyCallMacros.set(r,n)}}for(const n of Object.values(t.SYMBOL_NAMES)){const t=e.resolveName(n,void 0,_.default.SymbolFlags.All,!1);if(!t)throw new i.ProjectError(`MacroManager could not find symbol for ${n}\nYou may need to update your @rbxts/compiler-types!`);this.symbols.set(n,t)}const p=null===(u=null===(r=this.symbols.get(t.SYMBOL_NAMES.LuaTuple))||void 0===r?void 0:r.declarations)||void 0===u?void 0:u.find((e=>_.default.isTypeAliasDeclaration(e)));if(p){const n=e.getTypeAtLocation(p).getProperty(t.NOMINAL_LUA_TUPLE_NAME);n&&this.symbols.set(t.NOMINAL_LUA_TUPLE_NAME,n)}}getSymbolOrThrow(e){const t=this.symbols.get(e);return(0,o.assert)(t),t}isMacroOnlyClass(e){return this.symbols.get(e.name)===e&&p.has(e.name)}getIdentifierMacro(e){return this.identifierMacros.get(e)}getCallMacro(e){return this.callMacros.get(e)}getConstructorMacro(e){return this.constructorMacros.get(e)}getPropertyCallMacro(e){const t=this.propertyCallMacros.get(e);return!t&&e.parent&&this.symbols.get(e.parent.name)===e.parent&&this.isMacroOnlyClass(e.parent)&&(0,o.assert)(!1,`Macro ${e.parent.name}.${e.name}() is not implemented!`),t}}},8570:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiTransformState=void 0,t.MultiTransformState=class{constructor(){this.isMethodCache=new Map,this.isDefinedAsLetCache=new Map,this.isReportedByNoAnyCache=new Set,this.isReportedByMultipleDefinitionsCache=new Set,this.getModuleExportsCache=new Map,this.getModuleExportsAliasMapCache=new Map}}},7196:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransformState=void 0;const s=o(n(9861)),c=n(1979),l=a(n(6470)),u=n(6258),_=n(7370),d=n(2287),p=n(4998),f=n(2991),m=n(4502),g=n(8446),h=n(4160),y=n(6219),v=n(2161),b=a(n(2137));t.TransformState=class{debugRender(e){const t=new s.RenderState;return(0,s.solveTempIds)(t,e),(0,s.render)(t,e)}debugRenderList(e){const t=new s.RenderState;return(0,s.solveTempIds)(t,e),(0,s.renderStatements)(t,e)}constructor(e,t,n,r,i,o,a,s,c,l,u,_,d){this.program=e,this.data=t,this.services=n,this.pathTranslator=r,this.multiTransformState=i,this.compilerOptions=o,this.rojoResolver=a,this.pkgRojoResolvers=s,this.nodeModulesPathMapping=c,this.runtimeLibRbxPath=l,this.typeChecker=u,this.projectType=_,this.hasExportEquals=!1,this.hasExportFrom=!1,this.classIdentifierMap=new Map,this.tryUsesStack=new Array,this.prereqStatementsStack=new Array,this.hoistsByStatement=new Map,this.isHoisted=new Map,this.getTypeCache=new Map,this.usesRuntimeLib=!1,this.moduleIdBySymbol=new Map,this.symbolToIdMap=new Map,this.classElementToObjectKeyMap=new Map,this.sourceFileText=d.getFullText(),this.resolver=u.getEmitResolver(d);const p=this.pathTranslator.getOutputPath(d.fileName),f=this.rojoResolver.getRbxPathFromFilePath(p);this.isInReplicatedFirst=void 0!==f&&"ReplicatedFirst"===f[0]}pushTryUsesStack(){const e={usesReturn:!1,usesBreak:!1,usesContinue:!1};return this.tryUsesStack.push(e),e}markTryUses(e){0!==this.tryUsesStack.length&&(this.tryUsesStack[this.tryUsesStack.length-1][e]=!0)}popTryUsesStack(){this.tryUsesStack.pop()}prereq(e){s.default.list.push(this.prereqStatementsStack[this.prereqStatementsStack.length-1],e)}prereqList(e){s.default.list.pushList(this.prereqStatementsStack[this.prereqStatementsStack.length-1],e)}pushPrereqStatementsStack(){const e=s.default.list.make();return this.prereqStatementsStack.push(e),e}popPrereqStatementsStack(){const e=this.prereqStatementsStack.pop();return(0,d.assert)(e),e}getLeadingComments(e){var t;const n=null!==(t=b.default.getLeadingCommentRanges(this.sourceFileText,e.pos))&&void 0!==t?t:[];return s.default.list.make(...n.map((e=>s.default.comment(this.sourceFileText.substring(e.pos+2,e.kind===b.default.SyntaxKind.SingleLineCommentTrivia?e.end:e.end-2)))))}capturePrereqs(e){return this.pushPrereqStatementsStack(),e(),this.popPrereqStatementsStack()}capture(e){let t;const n=this.capturePrereqs((()=>t=e()));return[t,n]}noPrereqs(e){let t;const n=this.capturePrereqs((()=>t=e()));return(0,d.assert)(s.default.list.isEmpty(n)),t}getType(e){return(0,f.getOrSetDefault)(this.getTypeCache,e,(()=>this.typeChecker.getTypeAtLocation((0,y.skipUpwards)(e))))}TS(e,t){return this.usesRuntimeLib=!0,this.projectType===u.ProjectType.Game&&this.isInReplicatedFirst&&m.DiagnosticService.addDiagnostic(_.warnings.runtimeLibUsedInReplicatedFirst(e)),s.default.property(s.default.globals.TS,t)}createRuntimeLibImport(e){if(this.runtimeLibRbxPath){if(this.projectType===u.ProjectType.Game){const e=this.runtimeLibRbxPath[0];(0,d.assert)(e);let t=(0,g.createGetService)(e);for(let e=1;ee===c.RbxPathParent?u.PARENT_FIELD:e)))])}):(m.DiagnosticService.addDiagnostic(_.errors.noRojoData(e,l.default.relative(this.data.projectPath,t),!1)),s.default.create(s.default.SyntaxKind.VariableDeclaration,{left:s.default.globals.TS,right:s.default.none()}))}}return s.default.create(s.default.SyntaxKind.VariableDeclaration,{left:s.default.globals.TS,right:s.default.create(s.default.SyntaxKind.ComputedIndexExpression,{expression:s.default.globals._G,index:s.default.globals.script})})}pushToVar(e,t){const n=s.default.tempId(t||e&&(0,v.valueToIdStr)(e));return this.prereq(s.default.create(s.default.SyntaxKind.VariableDeclaration,{left:n,right:e})),n}pushToVarIfComplex(e,t){return s.default.isSimple(e)?e:this.pushToVar(e,t)}pushToVarIfNonId(e,t){return s.default.isAnyIdentifier(e)?e:this.pushToVar(e,t)}getModuleExports(e){return(0,f.getOrSetDefault)(this.multiTransformState.getModuleExportsCache,e,(()=>this.typeChecker.getExportsOfModule(e)))}getModuleExportsAliasMap(e){return(0,f.getOrSetDefault)(this.multiTransformState.getModuleExportsAliasMapCache,e,(()=>{var t;const n=new Map;for(const r of this.getModuleExports(e)){const e=b.default.skipAlias(r,this.typeChecker),i=null===(t=r.getDeclarations())||void 0===t?void 0:t[0];i&&b.default.isExportSpecifier(i)?n.set(e,i.name.text):n.set(e,r.name)}return n}))}getModuleSymbolFromNode(e){const t=(0,y.getModuleAncestor)(e),n=this.typeChecker.getSymbolAtLocation(b.default.isSourceFile(t)?t:t.name);return(0,d.assert)(n),n}getModuleIdFromSymbol(e){const t=this.moduleIdBySymbol.get(e);return(0,d.assert)(t),t}setModuleIdBySymbol(e,t){this.moduleIdBySymbol.set(e,t)}getModuleIdFromNode(e){const t=this.getModuleSymbolFromNode(e);return this.getModuleIdFromSymbol(t)}getModuleIdPropertyAccess(e){if(e.valueDeclaration){const t=this.getModuleSymbolFromNode(e.valueDeclaration),n=this.getModuleExportsAliasMap(t).get(e);if(n)return s.default.property(this.getModuleIdFromSymbol(t),n)}}guessVirtualPath(e){var t,n,r;const i=null===(n=(t=this.program).getSymlinkCache)||void 0===n?void 0:n.call(t).getSymlinkedDirectoriesByRealpath();if(!i)return;const o=e;for(;;){const t=b.default.ensureTrailingDirectorySeparator(l.default.dirname(e));if(e===t)break;e=t;const n=null===(r=i.get(b.default.toPath(e,this.program.getCurrentDirectory(),p.getCanonicalFileName)))||void 0===r?void 0:r[0];if(n)return l.default.join(n,l.default.relative(e,o))}}setClassElementObjectKey(e,t){(0,d.assert)(!this.classElementToObjectKeyMap.has(e)),this.classElementToObjectKeyMap.set(e,t)}getClassElementObjectKey(e){return this.classElementToObjectKeyMap.get(e)}}},3115:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSourceFile=void 0,i(n(1677),t),i(n(8570),t),i(n(7196),t);var o=n(8228);Object.defineProperty(t,"transformSourceFile",{enumerable:!0,get:function(){return o.transformSourceFile}})},6662:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CALL_MACROS=void 0;const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6453),c=n(3842),l=n(410),u=new Set(["nil","boolean","string","number","table","userdata","function","thread","vector","buffer"]);t.CALL_MACROS={assert:(e,t,n,r)=>(r[0]=(0,l.createTruthinessChecks)(e,r[0],t.arguments[0]),i.default.call(i.default.globals.assert,r)),typeOf:(e,t,n,r)=>i.default.call(i.default.globals.typeof,r),typeIs:(e,t,n,r)=>{const[o,a]=r,s=i.default.isStringLiteral(a)&&u.has(a.value)?i.default.globals.type:i.default.globals.typeof;return i.default.binary(i.default.call(s,[o]),"==",a)},classIs:(e,t,n,r)=>{const[o,a]=r;return i.default.binary(i.default.property((0,s.convertToIndexableExpression)(o),"ClassName"),"==",a)},identity:(e,t,n,r)=>r[0],$range:(e,t)=>(a.DiagnosticService.addDiagnostic(o.errors.noRangeMacroOutsideForOf(t.expression)),i.default.none()),$tuple:(e,t)=>(a.DiagnosticService.addDiagnostic(o.errors.noTupleMacroOutsideReturn(t)),i.default.none()),$getModuleTree:(e,t)=>{const n=(0,c.getImportParts)(e,t.getSourceFile(),t.arguments[0]);return i.default.array([n.shift(),i.default.array(n)])}}},8221:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTRUCTOR_MACROS=void 0;const i=r(n(9861)),o=n(2287),a=n(6671),s=n(7034),c=r(n(2137));function l(e,t,n){return i.default.call(i.default.globals.setmetatable,[n(e,t),i.default.map([[i.default.strings.__mode,i.default.strings.k]])])}const u=(e,t)=>{if(!t.arguments||0===t.arguments.length)return i.default.set();const n=t.arguments[0];if(c.default.isArrayLiteralExpression(n)&&!n.elements.some(c.default.isSpreadElement))return i.default.set((0,s.ensureTransformOrder)(e,n.elements));{const t=e.pushToVar(i.default.set(),"set"),r=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(i.default.tempId(),r),expression:(0,a.transformExpression)(e,n),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:r}),operator:"=",right:i.default.bool(!0)}))})),t}},_=(e,t)=>{if(!t.arguments||0===t.arguments.length)return i.default.map();const n=t.arguments[0],r=(0,a.transformExpression)(e,n);if(i.default.isArray(r)&&i.default.list.every(r.members,(e=>i.default.isArray(e)))){const e=i.default.list.toArray(r.members).map((e=>((0,o.assert)(i.default.isArray(e)&&i.default.list.isNonEmpty(e.members)),[e.members.head.value,e.members.head.next.value])));return i.default.map(e)}{const t=e.pushToVar(i.default.map(),"map"),n=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(i.default.tempId(),n),expression:r,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:i.default.number(1)})}),operator:"=",right:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:i.default.number(2)})}))})),t}};t.CONSTRUCTOR_MACROS={ArrayConstructor:(e,t)=>{if(t.arguments&&t.arguments.length>0){const n=(0,s.ensureTransformOrder)(e,t.arguments);return i.default.call(i.default.globals.table.create,n)}return i.default.array()},SetConstructor:u,MapConstructor:_,WeakSetConstructor:(e,t)=>l(e,t,u),WeakMapConstructor:(e,t)=>l(e,t,_),ReadonlyMapConstructor:_,ReadonlySetConstructor:u}},8503:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDENTIFIER_MACROS=void 0,t.IDENTIFIER_MACROS={Promise:(e,t)=>e.TS(t,"Promise")}},153:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY_CALL_MACROS=void 0;const i=r(n(9861)),o=n(2287),a=n(6453),s=n(6409),c=n(9582),l=n(1915),u=n(2161),_=r(n(2137));function d(e){return(t,n,r,o)=>{let a=o[0];return i.default.isSimple(a)||(a=i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:a})),i.default.binary(r,e,a)}}const p=new Map([["+","add"],["-","sub"],["*","mul"],["/","div"],["//","idiv"]]);function f(...e){const t={};for(const n of e){const e=p.get(n);(0,o.assert)(e),t[e]=d(n)}return t}function m(e){return(t,n,r,o)=>i.default.call(e,[r,...o])}const g={size:(e,t,n)=>i.default.unary("#",n),byte:m(i.default.globals.string.byte),find:m(i.default.globals.string.find),format:m(i.default.globals.string.format),gmatch:m(i.default.globals.string.gmatch),gsub:m(i.default.globals.string.gsub),lower:m(i.default.globals.string.lower),match:m(i.default.globals.string.match),rep:m(i.default.globals.string.rep),reverse:m(i.default.globals.string.reverse),split:m(i.default.globals.string.split),sub:m(i.default.globals.string.sub),upper:m(i.default.globals.string.upper)};function h(e,t){return(n,r,o,a)=>{o=n.pushToVarIfComplex(o,"exp");const s=n.pushToVar(i.default.bool(t),"result"),c=n.pushToVarIfNonId(a[0],"callback"),l=i.default.tempId("k"),u=i.default.tempId("v"),_=i.default.call(c,e(l,u,o));return n.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(l,u),expression:o,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:t?i.default.unary("not",_):_,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:s,operator:"=",right:i.default.bool(!t)}),i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}))})),s}}const y={size:(e,t,n)=>i.default.unary("#",n)},v={isEmpty:(e,t,n)=>i.default.binary(i.default.unary("#",n),"==",i.default.number(0)),join:(e,t,n,r)=>{r=function(e,t,n){for(let r=0;r{const o=[n,(0,c.offset)(r[0],1),(0,c.offset)(r[1],1),(0,c.offset)(r[2],1)];return r[3]&&o.push(r[3]),i.default.call(i.default.globals.table.move,o)},includes:(e,t,n,r)=>{const o=[n,r[0]];return r[1]&&o.push((0,c.offset)(r[1],1)),i.default.binary(i.default.call(i.default.globals.table.find,o),"~=",i.default.nil())},indexOf:(e,t,n,r)=>{const o=[n,r[0]];return r.length>1&&o.push((0,c.offset)(r[1],1)),(0,c.offset)(i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.call(i.default.globals.table.find,o),operator:"or",right:i.default.number(0)}),-1)},every:(b=(e,t,n)=>[t,(0,c.offset)(e,-1),n],h(b,!0)),some:h(((e,t,n)=>[t,(0,c.offset)(e,-1),n]),!1),forEach:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("k"),l=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(a,l),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(o,[l,(0,c.offset)(a,-1),n])}))})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil()},map:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVar(i.default.call(i.default.globals.table.create,[i.default.unary("#",n)]),"newValue"),a=e.pushToVarIfNonId(r[0],"callback"),s=i.default.tempId("k"),l=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s,l),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:o,index:s}),operator:"=",right:i.default.call(a,[l,(0,c.offset)(s,-1),n])}))})),o},mapFiltered:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVar(i.default.array(),"newValue"),a=e.pushToVarIfNonId(r[0],"callback"),s=e.pushToVar(i.default.number(0),"length"),l=i.default.tempId("k"),u=i.default.tempId("v"),_=i.default.tempId("result");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(l,u),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:_,right:i.default.call(a,[u,(0,c.offset)(l,-1),n])}),i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(_,"~=",i.default.nil()),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:s,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:o,index:s}),operator:"=",right:_})),elseBody:i.default.list.make()}))})),o},filterUndefined:(e,t,n)=>{n=e.pushToVarIfComplex(n,"exp");const r=e.pushToVar(i.default.number(0),"length"),o=i.default.tempId("i");e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(o),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(o,">",r),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:o})),elseBody:i.default.list.make()}))}));const s=e.pushToVar(i.default.array(),"result"),c=e.pushToVar(i.default.number(0),"resultLength"),l=i.default.tempId("i"),u=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.NumericForStatement,{id:l,start:i.default.number(1),end:r,step:void 0,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:u,right:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:l})}),i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(u,"~=",i.default.nil()),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:c,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:s,index:c}),operator:"=",right:u})),elseBody:i.default.list.make()}))})),s},filter:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVar(i.default.array(),"newValue"),a=e.pushToVarIfNonId(r[0],"callback"),s=e.pushToVar(i.default.number(0),"length"),l=i.default.tempId("k"),u=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(l,u),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.call(a,[u,(0,c.offset)(l,-1),n]),operator:"==",right:i.default.bool(!0)}),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:s,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:o,index:s}),operator:"=",right:u})),elseBody:i.default.list.make()}))})),o},reduce:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");let o=i.default.number(1);const s=i.default.unary("#",n),l=i.default.unary("#",n);let u;r.length<2?(e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(l,"==",i.default.number(0)),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.error,[i.default.string("Attempted to call `ReadonlyArray.reduce()` on an empty array without an initialValue.")])})),elseBody:i.default.list.make()})),u=e.pushToVar(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),"result"),o=(0,c.offset)(o,1)):u=e.pushToVar(r[1],"result");const _=e.pushToVar(r[0],"callback"),d=i.default.tempId("i");return e.prereq(i.default.create(i.default.SyntaxKind.NumericForStatement,{id:d,start:o,end:s,step:void 0,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:u,operator:"=",right:i.default.call(_,[u,i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:d}),(0,c.offset)(d,-1),n])}))})),u},find:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("i"),s=i.default.tempId("v"),l=e.pushToVar(void 0,"result");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{expression:n,ids:i.default.list.make(a,s),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.call(o,[s,(0,c.offset)(a,-1),n]),operator:"==",right:i.default.bool(!0)}),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:l,operator:"=",right:s}),i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}))})),l},findIndex:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("i"),s=i.default.tempId("v"),l=e.pushToVar(i.default.number(-1),"result");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{expression:n,ids:i.default.list.make(a,s),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.call(o,[s,(0,c.offset)(a,-1),n]),operator:"==",right:i.default.bool(!0)}),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:l,operator:"=",right:(0,c.offset)(a,-1)}),i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}))})),l}};var b;const x={push:(e,t,n,r)=>{if(0===r.length)return i.default.unary("#",n);n=e.pushToVarIfComplex(n,"exp");for(let t=0;t{n=e.pushToVarIfComplex(n,"exp");let r=i.default.unary("#",n);const o=!(0,s.isUsedAsStatement)(t);let c;return o&&(r=e.pushToVar(r,"length"),c=e.pushToVar(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r}),"result")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r}),operator:"=",right:i.default.nil()})),o?c:i.default.none()},shift:(e,t,n)=>i.default.call(i.default.globals.table.remove,[n,i.default.number(1)]),unshift:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");for(let t=r.length-1;t>=0;t--){const o=r[t];e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.insert,[n,i.default.number(1),o])}))}return(0,s.isUsedAsStatement)(t)?i.default.none():i.default.unary("#",n)},insert:(e,t,n,r)=>i.default.call(i.default.globals.table.insert,[n,(0,c.offset)(r[0],1),r[1]]),remove:(e,t,n,r)=>i.default.call(i.default.globals.table.remove,[n,(0,c.offset)(r[0],1)]),unorderedRemove:(e,t,n,r)=>{const o=e.pushToVarIfComplex((0,c.offset)(r[0],1),"index");n=e.pushToVarIfComplex(n,"exp");const l=e.pushToVar(i.default.unary("#",n),"length"),u=!(0,s.isUsedAsStatement)(t),_=e.pushToVar(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),"value");return e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(_,"~=",i.default.nil()),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),operator:"=",right:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:l})}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:l}),operator:"=",right:i.default.nil()})),elseBody:i.default.list.make()})),u?_:i.default.none()},sort:(e,t,n,r)=>{const o=!(0,s.isUsedAsStatement)(t);return o&&(n=e.pushToVarIfComplex(n,"exp")),r.unshift(n),e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.sort,r)})),o?n:i.default.none()},clear:(e,t,n)=>(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.clear,[n])})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil())},S={isEmpty:(e,t,n)=>i.default.binary(i.default.call(i.default.globals.next,[n]),"==",i.default.nil()),size:(e,t,n)=>{const r=e.pushToVar(i.default.number(0),"size");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(i.default.tempId()),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}))})),r},has:(e,t,n,r)=>{const o=i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r[0]});return i.default.binary(o,"~=",i.default.nil())}},k={delete:(e,t,n,r)=>{const o=e.pushToVarIfComplex(r[0],"value"),c=!(0,s.isUsedAsStatement)(t);let l;return c&&(n=e.pushToVarIfNonId(n,"exp"),l=e.pushToVar(i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:o}),operator:"~=",right:i.default.nil()}),"valueExisted")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),operator:"=",right:i.default.nil()})),c?l:i.default.none()},clear:(e,t,n)=>(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.clear,[n])})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil())},T={...S,forEach:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(a),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(o,[a,a,n])}))})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil()}},C={...k,add:(e,t,n,r)=>{const o=!(0,s.isUsedAsStatement)(t);return o&&(n=e.pushToVarIfComplex(n,"exp")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r[0]}),operator:"=",right:i.default.bool(!0)})),o?n:i.default.none()}},w={...S,forEach:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("k"),c=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(a,c),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(o,[c,a,n])}))})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil()},get:(e,t,n,r)=>i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r[0]})},D={...k,set:(e,t,n,r)=>{const[o,c]=r,l=!(0,s.isUsedAsStatement)(t);return l&&(n=e.pushToVarIfComplex(n,"exp")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),operator:"=",right:c})),l?n:i.default.none()}},E={then:(e,t,n,r)=>i.default.create(i.default.SyntaxKind.MethodCallExpression,{expression:(0,a.convertToIndexableExpression)(n),name:"andThen",args:i.default.list.make(...r)})};function P(e,t){return(n,r,o,a)=>{const[s,c]=n.capture((()=>t(n,r,o,a)));let l=i.default.list.size(c);if(l>0){const t=function(e,t){if(i.default.list.isNonEmpty(e)){const n=e.head.value;if(i.default.isVariableDeclaration(n)&&!i.default.list.isList(n.left)&&i.default.isTemporaryIdentifier(n.left)&&n.right===t)return!0}return!1}(c,o);let n;t&&(n=i.default.list.shift(c),l--),l>1?(i.default.list.unshift(c,(u=e,i.default.comment(` â–¼ ${u} â–¼`))),t&&n&&i.default.list.unshift(c,n),i.default.list.push(c,function(e){return i.default.comment(` â–² ${e} â–²`)}(e))):t&&n&&i.default.list.unshift(c,n)}var u;return n.prereqList(c),s}}t.PROPERTY_CALL_MACROS={CFrame:f("+","-","*"),UDim:f("+","-"),UDim2:f("+","-"),Vector2:f("+","-","*","/","//"),Vector2int16:f("+","-","*","/"),Vector3:f("+","-","*","/","//"),Vector3int16:f("+","-","*","/"),Number:f("//"),String:g,ArrayLike:y,ReadonlyArray:v,Array:x,ReadonlySet:T,Set:C,ReadonlyMap:w,Map:D,Promise:E};for(const[e,n]of Object.entries(t.PROPERTY_CALL_MACROS))for(const[t,r]of Object.entries(n))n[t]=P(`${e}.${t}`,r)},7598:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformArrayAssignmentPattern=function e(t,n,r){let m=0;const g=new Array,h=(0,_.getAccessorForBindingType)(t,n,t.typeChecker.getTypeOfAssignmentPattern(n));for(let _ of n.elements){if(f.default.isOmittedExpression(_))h(t,r,m,g,!0);else if(f.default.isSpreadElement(_))s.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(_));else{let n;f.default.isBinaryExpression(_)&&(n=(0,p.skipDownwards)(_.right),_=(0,p.skipDownwards)(_.left));const o=h(t,r,m,g,!1);if(f.default.isIdentifier(_)||f.default.isElementAccessExpression(_)||f.default.isPropertyAccessExpression(_)){const e=(0,u.transformWritableExpression)(t,_,void 0!==n);t.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:e,operator:"=",right:o})),n&&t.prereq((0,l.transformInitializer)(t,e,n))}else if(f.default.isArrayLiteralExpression(_)){const r=t.pushToVar(o,"binding");n&&t.prereq((0,l.transformInitializer)(t,r,n)),e(t,_,r)}else if(f.default.isObjectLiteralExpression(_)){const e=t.pushToVar(o,"binding");n&&t.prereq((0,l.transformInitializer)(t,e,n)),(0,c.transformObjectAssignmentPattern)(t,_,e)}else(0,a.assert)(!1,`transformArrayAssignmentPattern invalid element: ${(0,d.getKindName)(_.kind)}`)}m++}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(2865),l=n(1782),u=n(7010),_=n(3550),d=n(2036),p=n(6219),f=r(n(2137))},2396:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformArrayBindingPattern=function e(t,n,r){(0,u.validateNotAnyType)(t,n);let d=0;const p=new Array,f=(0,l.getAccessorForBindingType)(t,n,t.getType(n));for(const l of n.elements){if(_.default.isOmittedExpression(l))f(t,r,d,p,!0);else{if(l.dotDotDotToken)return void o.DiagnosticService.addDiagnostic(i.errors.noSpreadDestructuring(l));const n=l.name,u=f(t,r,d,p,!1);if(_.default.isIdentifier(n)){const e=(0,s.transformVariable)(t,n,u);l.initializer&&t.prereq((0,c.transformInitializer)(t,e,l.initializer))}else{const r=t.pushToVar(u,"binding");l.initializer&&t.prereq((0,c.transformInitializer)(t,r,l.initializer)),_.default.isArrayBindingPattern(n)?e(t,n,r):(0,a.transformObjectBindingPattern)(t,n,r)}}d++}};const i=n(7370),o=n(4502),a=n(5235),s=n(8007),c=n(1782),l=n(3550),u=n(3972),_=r(n(2137))},1822:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformBindingName=function(e,t,n){let r;return c.default.isIdentifier(t)?r=(0,s.transformIdentifierDefined)(e,t):(r=i.default.tempId("binding"),i.default.list.pushList(n,e.capturePrereqs((()=>{c.default.isArrayBindingPattern(t)?(0,o.transformArrayBindingPattern)(e,t,r):(0,a.transformObjectBindingPattern)(e,t,r)})))),r};const i=r(n(9861)),o=n(2396),a=n(5235),s=n(6848),c=r(n(2137))},2865:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformObjectAssignmentPattern=function e(t,n,r){for(const m of n.properties)if(f.default.isShorthandPropertyAssignment(m)){const e=m.name,o=(0,_.objectAccessor)(t,r,t.typeChecker.getTypeOfAssignmentPattern(n),e),s=(0,u.transformWritableExpression)(t,e,void 0!==m.objectAssignmentInitializer);t.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:s,operator:"=",right:o})),(0,a.assert)(i.default.isAnyIdentifier(s)),m.objectAssignmentInitializer&&t.prereq((0,l.transformInitializer)(t,s,m.objectAssignmentInitializer))}else{if(f.default.isSpreadAssignment(m))return void s.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(m));if(f.default.isPropertyAssignment(m)){const o=m.name;let s,g=m.initializer;f.default.isBinaryExpression(m.initializer)&&(s=(0,p.skipDownwards)(m.initializer.right),g=(0,p.skipDownwards)(m.initializer.left));const h=(0,_.objectAccessor)(t,r,t.typeChecker.getTypeOfAssignmentPattern(n),o);if(f.default.isIdentifier(g)||f.default.isElementAccessExpression(g)||f.default.isPropertyAccessExpression(g)){const e=(0,u.transformWritableExpression)(t,g,void 0!==s);t.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:e,operator:"=",right:h})),s&&t.prereq((0,l.transformInitializer)(t,e,s))}else if(f.default.isArrayLiteralExpression(g)){const e=t.pushToVar(h,"binding");s&&t.prereq((0,l.transformInitializer)(t,e,s)),(0,a.assert)(f.default.isIdentifier(o)),(0,c.transformArrayAssignmentPattern)(t,g,e)}else if(f.default.isObjectLiteralExpression(g)){const n=t.pushToVar(h,"binding");s&&t.prereq((0,l.transformInitializer)(t,n,s)),e(t,g,n)}else(0,a.assert)(!1,`transformObjectAssignmentPattern invalid initializer: ${(0,d.getKindName)(g.kind)}`)}else(0,a.assert)(!1,`transformObjectAssignmentPattern invalid property: ${(0,d.getKindName)(m.kind)}`)}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(7598),l=n(1782),u=n(7010),_=n(529),d=n(2036),p=n(6219),f=r(n(2137))},5235:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformObjectBindingPattern=function e(t,n,r){(0,_.validateNotAnyType)(t,n);for(const _ of n.elements){if(_.dotDotDotToken)return void a.DiagnosticService.addDiagnostic(i.errors.noSpreadDestructuring(_));const p=_.name,f=_.propertyName;if(d.default.isIdentifier(p)){const e=(0,u.objectAccessor)(t,r,t.getType(n),null!=f?f:p),i=(0,c.transformVariable)(t,p,e);_.initializer&&t.prereq((0,l.transformInitializer)(t,i,_.initializer))}else{(0,o.assert)(f);const i=(0,u.objectAccessor)(t,r,t.getType(n),f),a=t.pushToVar(i,"binding");_.initializer&&t.prereq((0,l.transformInitializer)(t,a,_.initializer)),d.default.isArrayBindingPattern(p)?(0,s.transformArrayBindingPattern)(t,p,a):e(t,p,a)}}};const i=n(7370),o=n(2287),a=n(4502),s=n(2396),c=n(8007),l=n(1782),u=n(529),_=n(3972),d=r(n(2137))},7759:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformImplicitClassConstructor=function(e,t,n){const r=i.default.list.make();let o=!1;return(0,d.getExtendsNode)(t)&&(o=!0,i.default.list.push(r,i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.property(i.default.globals.super,m),[i.default.globals.self,i.default.create(i.default.SyntaxKind.VarArgsLiteral,{})])}))),i.default.list.pushList(r,g(e,t)),i.default.list.make(i.default.create(i.default.SyntaxKind.MethodDeclaration,{expression:n,name:m,statements:r,parameters:i.default.list.make(),hasDotDotDot:o}))},t.transformClassConstructor=function(e,t,n){const{statements:r,parameters:o,hasDotDotDot:a}=(0,l.transformParameters)(e,t),s=(0,p.getStatements)(t.body),u=s.findIndex((e=>f.default.isExpressionStatement(e)&&f.default.isSuperCall(e.expression)));i.default.list.pushList(r,(0,_.transformStatementList)(e,t.body,s.slice(0,u+1)));for(const n of t.parameters)if(f.default.isParameterPropertyDeclaration(n,n.parent)){const t=(0,c.transformIdentifierDefined)(e,n.name);i.default.list.push(r,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(i.default.globals.self,t.name),operator:"=",right:t}))}return i.default.list.pushList(r,g(e,t.parent)),i.default.list.pushList(r,(0,_.transformStatementList)(e,t.body,s.slice(u+1))),i.default.list.make(i.default.create(i.default.SyntaxKind.MethodDeclaration,{expression:n,name:m,statements:r,parameters:o,hasDotDotDot:a}))};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(6848),l=n(7937),u=n(5671),_=n(8043),d=n(9655),p=n(1441),f=r(n(2137)),m="constructor";function g(e,t){const n=i.default.list.make();for(const r of t.members){if(!f.default.isPropertyDeclaration(r))continue;if(f.default.hasStaticModifier(r))continue;const c=r.name;if(f.default.isPrivateIdentifier(c)){a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(t));continue}const l=r.initializer;if(!l)continue;const[_,d]=e.capture((()=>(0,u.transformPropertyName)(e,c)));i.default.list.pushList(n,d);const[p,m]=e.capture((()=>(0,s.transformExpression)(e,l)));i.default.list.pushList(n,m),i.default.list.push(n,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:i.default.globals.self,index:_}),operator:"=",right:p}))}return n}},5082:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformClassLikeDeclaration=function(e,t){const n=b.default.isClassExpression(t),r=i.default.list.make(),S=b.default.hasSyntacticModifier(t,b.default.ModifierFlags.ExportDefault);t.name&&(0,y.validateIdentifier)(e,t.name);const k=n&&void 0!==t.name;let T,C;T=k?i.default.tempId("class"):t.name?(0,d.transformIdentifierDefined)(e,t.name):S?i.default.id("default"):i.default.tempId("class"),C=k?(0,d.transformIdentifierDefined)(e,t.name):T,e.classIdentifierMap.set(t,C),function(e,t){if(t.name){const n=e.typeChecker.getSymbolAtLocation(t.name);return(0,a.assert)(n),!0===e.isHoisted.get(n)}return!1}(e,t)||i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:T,right:void 0}));const w=i.default.list.make();i.default.list.pushList(w,function(e,t,n,r){const o=b.default.hasAbstractModifier(t),a=i.default.list.make(),s=(0,g.getExtendsNode)(t);if(o&&!s)i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:i.default.map()}));else{const o=i.default.list.make();if(i.default.list.push(o,i.default.create(i.default.SyntaxKind.MapField,{index:i.default.strings.__tostring,value:(c=i.default.isTemporaryIdentifier(n)?"Anonymous":n.name,i.default.create(i.default.SyntaxKind.FunctionExpression,{statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.string(c)})),parameters:i.default.list.make(),hasDotDotDot:!1}))})),s){const[t,n]=e.capture((()=>(0,_.transformExpression)(e,s.expression))),r=i.default.id("super");i.default.list.pushList(a,n),i.default.list.push(a,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:t})),i.default.list.push(o,i.default.create(i.default.SyntaxKind.MapField,{index:i.default.strings.__index,value:r}))}const l=i.default.call(i.default.globals.setmetatable,[i.default.map(),i.default.create(i.default.SyntaxKind.Map,{fields:o})]);r&&t.name?i.default.list.push(a,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:(0,d.transformIdentifierDefined)(e,t.name),right:l})):i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:l})),i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(n,"__index"),operator:"=",right:n}))}var c;if(!o){const e=i.default.list.make();i.default.list.push(e,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.globals.self,right:i.default.call(i.default.globals.setmetatable,[i.default.map(),n])})),i.default.list.push(e,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.binary(i.default.create(i.default.SyntaxKind.MethodCallExpression,{expression:i.default.globals.self,name:"constructor",args:i.default.list.make(i.default.create(i.default.SyntaxKind.VarArgsLiteral,{}))}),"or",i.default.globals.self)})),i.default.list.push(a,i.default.create(i.default.SyntaxKind.FunctionDeclaration,{name:i.default.property(n,"new"),parameters:i.default.list.make(),hasDotDotDot:!0,statements:e,localize:!1}))}return a}(e,t,C,n));const D=(0,m.findConstructor)(t);D?i.default.list.pushList(w,(0,c.transformClassConstructor)(e,D,C)):i.default.list.pushList(w,(0,c.transformImplicitClassConstructor)(e,t,C));for(const e of t.members)if((b.default.isPropertyDeclaration(e)||b.default.isMethodDeclaration(e))&&(b.default.isIdentifier(e.name)||b.default.isStringLiteral(e.name))&&i.default.isReservedClassField(e.name.text)&&s.DiagnosticService.addDiagnostic(o.errors.noReservedClassFields(e.name)),b.default.isAutoAccessorPropertyDeclaration(e)){const t=b.default.getModifiers(e).find((e=>e.kind===b.default.SyntaxKind.AccessorKeyword));s.DiagnosticService.addDiagnostic(o.errors.noAutoAccessorModifiers(t))}const E=new Array,P=new Array;for(const n of t.members)if((0,v.validateMethodAssignment)(e,n),!(b.default.isConstructorDeclaration(n)||b.default.isIndexSignatureDeclaration(n)||b.default.isSemicolonClassElement(n)))if(b.default.isMethodDeclaration(n))E.push(n);else if(b.default.isPropertyDeclaration(n)){if(!b.default.hasStaticModifier(n))continue;P.push(n)}else b.default.isAccessor(n)?s.DiagnosticService.addDiagnostic(o.errors.noGetterSetter(n)):b.default.isClassStaticBlockDeclaration(n)?P.push(n):(0,a.assert)(!1,`ClassMember kind not implemented: ${(0,h.getKindName)(n.kind)}`);const N=e.typeChecker.getTypeOfSymbolAtLocation(t.symbol,t),F=e.typeChecker.getDeclaredTypeOfSymbol(t.symbol);for(const t of E){(b.default.isIdentifier(t.name)||b.default.isStringLiteral(t.name))&&(i.default.isMetamethod(t.name.text)&&s.DiagnosticService.addDiagnostic(o.errors.noClassMetamethods(t.name)),b.default.hasStaticModifier(t)?void 0!==F.getProperty(t.name.text)&&s.DiagnosticService.addDiagnostic(o.errors.noInstanceMethodCollisions(t)):void 0!==N.getProperty(t.name.text)&&s.DiagnosticService.addDiagnostic(o.errors.noStaticMethodCollisions(t)));const[n,r]=e.capture((()=>(0,f.transformMethodDeclaration)(e,t,{name:"name",value:C})));i.default.list.pushList(w,r),i.default.list.pushList(w,n)}const A=F.getProperty(x);A&&A.flags&b.default.SymbolFlags.Method&&i.default.list.push(w,i.default.create(i.default.SyntaxKind.MethodDeclaration,{expression:C,name:"__tostring",hasDotDotDot:!1,parameters:i.default.list.make(),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.create(i.default.SyntaxKind.MethodCallExpression,{expression:i.default.globals.self,name:x,args:i.default.list.make()})}))}));for(const t of P)if(b.default.isClassStaticBlockDeclaration(t))i.default.list.pushList(w,(0,p.transformBlock)(e,t.body));else{const[n,r]=e.capture((()=>(0,u.transformPropertyDeclaration)(e,t,C)));i.default.list.pushList(w,r),i.default.list.pushList(w,n)}return k&&i.default.list.push(w,i.default.create(i.default.SyntaxKind.Assignment,{left:T,operator:"=",right:C})),i.default.list.pushList(w,(0,l.transformDecorators)(e,t,T)),i.default.list.push(r,i.default.create(i.default.SyntaxKind.DoStatement,{statements:w})),{statements:r,name:T}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(7759),l=n(4541),u=n(5616),_=n(6671),d=n(6848),p=n(2852),f=n(8111),m=n(9564),g=n(9655),h=n(2036),y=n(837),v=n(4735),b=r(n(2137)),x="toString"},4541:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformDecorators=function(e,t,n){const r=i.default.list.make();for(const o of t.members)_.default.hasStaticModifier(o)||(_.default.isMethodDeclaration(o)&&o.body?i.default.list.pushList(r,m(e,o,n)):_.default.isPropertyDeclaration(o)&&i.default.list.pushList(r,g(e,o,n)));for(const o of t.members)_.default.hasStaticModifier(o)&&(_.default.isMethodDeclaration(o)&&o.body?i.default.list.pushList(r,m(e,o,n)):_.default.isPropertyDeclaration(o)&&i.default.list.pushList(r,g(e,o,n)));return i.default.list.pushList(r,function(e,t,n){const[r,o]=f(e,t,(e=>i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:i.default.binary(i.default.call(e,[n]),"or",n)})))),a=i.default.list.make();i.default.list.pushList(a,r);const s=(0,u.findConstructor)(t);return s&&i.default.list.pushList(a,h(e,s,n)),i.default.list.pushList(a,o),a}(e,t,n)),r};const i=r(n(9861)),o=n(2287),a=n(6671),s=n(5671),c=n(6453),l=n(5708),u=n(9564),_=r(n(2137));function d(e){var t,n;return null!==(n=null===(t=_.default.getDecorators(e))||void 0===t?void 0:t.length)&&void 0!==n?n:0}function p(e,t,n,r){if(!(0,l.expressionMightMutate)(e,r,n.expression))return!0;if(!t)return!1;const i=n.parent;if(_.default.isMethodDeclaration(i)&&i.parameters.some((e=>d(e)>0)))return!1;if(_.default.isClassLike(i)){const e=(0,u.findConstructor)(i);if(e&&e.parameters.some((e=>d(e)>0)))return!1}if(_.default.isParameter(i)){const e=i.parent.parameters;for(let t=e.findIndex((e=>e===i))+1;t0)return!1}return!0}function f(e,t,n){var r;const o=i.default.list.make(),s=i.default.list.make(),l=null!==(r=_.default.getDecorators(t))&&void 0!==r?r:[];for(let t=0;t(0,a.transformExpression)(e,r.expression)));i.default.list.pushList(o,_);const d=t===l.length-1;if(!p(e,d,r,u)){const e=i.default.tempId("decorator");i.default.list.push(o,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:e,right:u})),u=e}i.default.list.unshiftList(s,n((0,c.convertToIndexableExpression)(u)))}return[o,s]}function m(e,t,n){const[r,a]=f(e,t,(r=>{const a=i.default.list.make(),s=i.default.tempId("descriptor"),c=e.getClassElementObjectKey(t);return(0,o.assert)(c,"Did not find method key for method decorator"),i.default.list.push(a,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:s,right:i.default.call(r,[n,c,i.default.map([[i.default.string("value"),i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:c})]])])})),i.default.list.push(a,i.default.create(i.default.SyntaxKind.IfStatement,{condition:s,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:c}),operator:"=",right:i.default.property(s,"value")})),elseBody:i.default.list.make()})),a})),s=i.default.list.make();return i.default.list.pushList(s,r),i.default.list.pushList(s,h(e,t,n)),i.default.list.pushList(s,a),s}function g(e,t,n){const[r,o]=f(e,t,(r=>{const o=e.noPrereqs((()=>(0,s.transformPropertyName)(e,t.name)));return i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(r,[n,o])}))})),a=i.default.list.make();return i.default.list.pushList(a,r),i.default.list.pushList(a,o),a}function h(e,t,n){const r=i.default.list.make(),a=i.default.list.make();for(let s=0;s{const a=t.name?e.getClassElementObjectKey(t):i.default.nil();return(0,o.assert)(a,"Did not find method key for parameter decorator"),i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(r,[n,a,i.default.number(s)])}))}));i.default.list.pushList(r,l),i.default.list.unshiftList(a,u)}const s=i.default.list.make();return i.default.list.pushList(s,r),i.default.list.pushList(s,a),s}},5616:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPropertyDeclaration=function(e,t,n){return l.default.hasStaticModifier(t)?l.default.isPrivateIdentifier(t.name)?(a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(t)),i.default.list.make()):t.initializer?i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:(0,c.transformPropertyName)(e,t.name)}),operator:"=",right:(0,s.transformExpression)(e,t.initializer)})):i.default.list.make():i.default.list.make()};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(5671),l=r(n(2137))},250:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformArrayLiteralExpression=function(e,t){if(!t.elements.find((e=>u.default.isSpreadElement(e))))return i.default.array((0,s.ensureTransformOrder)(e,t.elements));const n=(0,l.createArrayPointer)("array"),r=i.default.tempId("length");let _=!1,d=0;function p(){const t=i.default.unary("#",n.value);_?e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:t})):(e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:t})),_=!0),d=0}for(let s=0;s(0,a.transformExpression)(e,_)));i.default.isArray(n.value)&&!i.default.list.isEmpty(o)&&((0,l.disableArrayInline)(e,n),p()),i.default.isArray(n.value)?i.default.list.push(n.value.members,t):(e.prereqList(o),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n.value,index:i.default.binary(r,"+",i.default.number(d+1))}),operator:"=",right:t}))),d++}}return n.value};const i=r(n(9861)),o=n(2287),a=n(6671),s=n(7034),c=n(3901),l=n(274),u=r(n(2137))},7075:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformAwaitExpression=function(e,t){return i.default.call(e.TS(t,"await"),[(0,o.transformExpression)(e,(0,a.skipDownwards)(t.expression))])};const i=r(n(9861)),o=n(6671),a=n(6219)},8e3:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformBinaryExpression=function(e,t){const n=t.operatorToken.kind;if((0,T.validateNotAnyType)(e,t.left),(0,T.validateNotAnyType)(e,t.right),n===C.default.SyntaxKind.EqualsEqualsToken)return s.DiagnosticService.addDiagnostic(o.errors.noEqualsEquals(t)),i.default.none();if(n===C.default.SyntaxKind.ExclamationEqualsToken)return s.DiagnosticService.addDiagnostic(o.errors.noExclamationEquals(t)),i.default.none();if(n===C.default.SyntaxKind.AmpersandAmpersandToken||n===C.default.SyntaxKind.BarBarToken||n===C.default.SyntaxKind.QuestionQuestionToken)return(0,d.transformLogical)(e,t);if(C.default.isLogicalOrCoalescingAssignmentExpression(t))return(0,p.transformLogicalOrCoalescingAssignmentExpression)(e,t);if(C.default.isAssignmentOperator(n)){if(C.default.isArrayLiteralExpression(t.left)){const n=(0,u.transformExpression)(e,t.right);if(0===t.left.elements.length)return(0,x.isUsedAsStatement)(t)&&i.default.isArray(n)&&i.default.list.isEmpty(n.members)?i.default.none():n;if(i.default.isCall(n)&&(0,k.isLuaTupleType)(e)(e.getType(t.right)))return w(e,t.left,n),(0,x.isUsedAsStatement)(t)||s.DiagnosticService.addDiagnostic(o.errors.noLuaTupleDestructureAssignmentExpression(t)),i.default.none();if(i.default.isArray(n)&&!i.default.list.isEmpty(n.members)&&(0,x.isUsedAsStatement)(t))return w(e,t.left,n.members),i.default.none();const r=e.pushToVar(n,"binding");return(0,c.transformArrayAssignmentPattern)(e,t.left,r),r}if(C.default.isObjectLiteralExpression(t.left)){const n=(0,u.transformExpression)(e,t.right);if(0===t.left.properties.length)return(0,x.isUsedAsStatement)(t)&&i.default.isMap(n)&&i.default.list.isEmpty(n.fields)?i.default.none():n;const r=e.pushToVar(n,"binding");return(0,l.transformObjectAssignmentPattern)(e,t.left,r),r}const r=e.getType(t.left),a=e.getType(t.right),_=(0,m.getSimpleAssignmentOperator)(r,n,a),{writable:d,readable:p,value:g}=(0,f.transformWritableAssignment)(e,t.left,t.right,!0,void 0===_);return void 0!==_?(0,m.createAssignmentExpression)(e,d,_,(0,v.getAssignableValue)(_,g,a)):(0,m.createCompoundAssignmentExpression)(e,t,d,r,p,n,g,a)}const[r,a]=(0,y.ensureTransformOrder)(e,[t.left,t.right]);if(n===C.default.SyntaxKind.InKeyword)return i.default.binary(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,g.convertToIndexableExpression)(a),index:r}),"~=",i.default.nil());if(n===C.default.SyntaxKind.InstanceOfKeyword)return(0,k.isPossiblyType)(e.getType(t.right),(0,k.isRobloxType)(e))&&s.DiagnosticService.addDiagnostic(o.errors.noRobloxSymbolInstanceof(t.right)),i.default.call(e.TS(t,"instanceof"),[r,a]);const _=e.getType(t.left),b=e.getType(t.right);return n!==C.default.SyntaxKind.LessThanToken&&n!==C.default.SyntaxKind.LessThanEqualsToken&&n!==C.default.SyntaxKind.GreaterThanToken&&n!==C.default.SyntaxKind.GreaterThanEqualsToken||((0,k.isDefinitelyType)(_,k.isStringType)||(0,k.isDefinitelyType)(_,k.isNumberType))&&((0,k.isDefinitelyType)(b,k.isStringType)||(0,k.isDefinitelyType)(_,k.isNumberType))||s.DiagnosticService.addDiagnostic(o.errors.noNonNumberStringRelationOperator(t)),(0,h.createBinaryFromOperator)(e,t,r,_,n,a,b)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(7598),l=n(2865),u=n(6671),_=n(1782),d=n(5741),p=n(5260),f=n(7010),m=n(6614),g=n(6453),h=n(3262),y=n(7034),v=n(9957),b=n(2036),x=n(6409),S=n(6219),k=n(1915),T=n(3972),C=r(n(2137));function w(e,t,n){const r=i.default.list.make(),u=i.default.list.make(),d=i.default.list.make(),p=e.capturePrereqs((()=>{for(let n of t.elements)if(C.default.isOmittedExpression(n))i.default.list.push(u,i.default.tempId());else if(C.default.isSpreadElement(n))s.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(n));else{let t;if(C.default.isBinaryExpression(n)&&(t=(0,S.skipDownwards)(n.right),n=(0,S.skipDownwards)(n.left)),C.default.isIdentifier(n)||C.default.isElementAccessExpression(n)||C.default.isPropertyAccessExpression(n)){const[r,o]=e.capture((()=>(0,f.transformWritableExpression)(e,n,!0)));i.default.list.pushList(d,o),i.default.list.push(u,r),t&&e.prereq((0,_.transformInitializer)(e,r,t))}else if(C.default.isArrayLiteralExpression(n)){const o=i.default.tempId("binding");i.default.list.push(r,o),i.default.list.push(u,o),t&&e.prereq((0,_.transformInitializer)(e,o,t)),(0,c.transformArrayAssignmentPattern)(e,n,o)}else if(C.default.isObjectLiteralExpression(n)){const o=i.default.tempId("binding");i.default.list.push(r,o),i.default.list.push(u,o),t&&e.prereq((0,_.transformInitializer)(e,o,t)),(0,l.transformObjectAssignmentPattern)(e,n,o)}else(0,a.assert)(!1,`transformOptimizedArrayAssignmentPattern invalid element: ${(0,b.getKindName)(n.kind)}`)}}));i.default.list.isEmpty(r)||e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:void 0})),e.prereqList(d),(0,a.assert)(!i.default.list.isEmpty(u)),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:u,operator:"=",right:n})),e.prereqList(p)}},2157:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformTrueKeyword=function(){return i.default.create(i.default.SyntaxKind.TrueLiteral,{})},t.transformFalseKeyword=function(){return i.default.create(i.default.SyntaxKind.FalseLiteral,{})};const i=r(n(9861))},4698:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformCallExpressionInner=function(e,t,n,r){if(b.default.isImportCall(t))return(0,l.transformImportExpression)(e,t);if((0,h.validateNotAnyType)(e,t.expression),b.default.isSuperCall(t))return i.default.call(i.default.property((0,d.convertToIndexableExpression)(n),"constructor"),[i.default.globals.self,...(0,p.ensureTransformOrder)(e,t.arguments)]);const o=e.typeChecker.getNonOptionalType(e.getType(t.expression)),a=(0,g.getFirstDefinedSymbol)(e,o);if(a){const i=e.services.macroManager.getCallMacro(a);if(i)return x(i,e,t,n,r)}const[s,c]=e.capture((()=>(0,p.ensureTransformOrder)(e,r)));S(e,o,s,r),!i.default.list.isEmpty(c)&&(0,f.expressionMightMutate)(e,n,t.expression)&&(n=e.pushToVar(n,"fn")),e.prereqList(c);const u=i.default.call((0,d.convertToIndexableExpression)(n),s);return(0,v.wrapReturnIfLuaTuple)(e,t,u)},t.transformPropertyCallExpressionInner=function(e,t,n,r,o,a){if((0,h.validateNotAnyType)(e,n.expression),(0,h.validateNotAnyType)(e,t.expression),b.default.isSuperProperty(n))return i.default.call(i.default.property((0,d.convertToIndexableExpression)(r),n.name.text),[i.default.globals.self,...(0,p.ensureTransformOrder)(e,t.arguments)]);const s=e.typeChecker.getNonOptionalType(e.getType(t.expression)),c=(0,g.getFirstDefinedSymbol)(e,s);if(c){const n=e.services.macroManager.getPropertyCallMacro(c);if(n)return x(n,e,t,r,a)}const[l,u]=e.capture((()=>(0,p.ensureTransformOrder)(e,a)));let _;return S(e,s,l,a),!i.default.list.isEmpty(u)&&(0,f.expressionMightMutate)(e,r,n.expression)&&(r=e.pushToVar(r)),e.prereqList(u),(0,m.isMethod)(e,n)?i.default.isValidIdentifier(o)?_=i.default.create(i.default.SyntaxKind.MethodCallExpression,{name:o,expression:(0,d.convertToIndexableExpression)(r),args:i.default.list.make(...l)}):(r=e.pushToVarIfComplex(r),l.unshift(r),_=i.default.call(i.default.property((0,d.convertToIndexableExpression)(r),o),l)):_=i.default.call(i.default.property((0,d.convertToIndexableExpression)(r),o),l),(0,v.wrapReturnIfLuaTuple)(e,t,_)},t.transformElementCallExpressionInner=function(e,t,n,r,o,a){if((0,h.validateNotAnyType)(e,n.expression),(0,h.validateNotAnyType)(e,n.argumentExpression),(0,h.validateNotAnyType)(e,t.expression),b.default.isSuperProperty(n))return i.default.call(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,d.convertToIndexableExpression)(r),index:(0,c.transformExpression)(e,n.argumentExpression)}),[i.default.globals.self,...(0,p.ensureTransformOrder)(e,t.arguments)]);const s=e.typeChecker.getNonOptionalType(e.getType(t.expression)),l=(0,g.getFirstDefinedSymbol)(e,s);if(l){const n=e.services.macroManager.getPropertyCallMacro(l);if(n)return x(n,e,t,r,a)}const[[u,...y],k]=e.capture((()=>(0,p.ensureTransformOrder)(e,[o,...a])));S(e,s,y,a),!i.default.list.isEmpty(k)&&(0,f.expressionMightMutate)(e,r,n.expression)&&(r=e.pushToVar(r)),e.prereqList(k),(0,m.isMethod)(e,n)&&(r=e.pushToVarIfComplex(r),y.unshift(r));const T=i.default.call(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,d.convertToIndexableExpression)(r),index:(0,_.addOneIfArrayType)(e,e.typeChecker.getNonOptionalType(e.getType(n.expression)),u)}),y);return(0,v.wrapReturnIfLuaTuple)(e,t,T)},t.transformCallExpression=function(e,t){return(0,u.transformOptionalChain)(e,t)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(7637),u=n(8087),_=n(8576),d=n(6453),p=n(7034),f=n(5708),m=n(833),g=n(1915),h=n(3972),y=n(2161),v=n(1511),b=r(n(2137));function x(e,t,n,r,c){let l;const u=t.capturePrereqs((()=>{l=(0,p.ensureTransformOrder)(t,c);const e=c[c.length-1];if(e&&b.default.isSpreadElement(e)){const r=t.typeChecker.getSignaturesOfType(t.getType(n.expression),b.default.SignatureKind.Call)[0],c=r.parameters[r.parameters.length-1].valueDeclaration;if(c&&b.default.isParameter(c)&&c.dotDotDotToken)return void s.DiagnosticService.addDiagnostic(o.errors.noVarArgsMacroSpread(e));const u=t.getType(e.expression);(0,a.assert)(t.typeChecker.isTupleType(u));const _=u.target.elementFlags.length,d=l.pop(),p=i.default.list.make();for(let e=l.length;e<_;e++){const t=i.default.tempId(`spread${e}`);l.push(t),i.default.list.push(p,t)}t.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:p,right:d}))}for(let e=0;e(0,o.transformExpression)(e,t.whenTrue))),[u,_]=e.capture((()=>(0,o.transformExpression)(e,t.whenFalse)));if((0,s.isUsedAsStatement)(t))return i.default.list.pushList(l,(0,c.wrapExpressionStatement)(r)),i.default.list.pushList(_,(0,c.wrapExpressionStatement)(u)),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,a.createTruthinessChecks)(e,n,t.condition),statements:l,elseBody:_})),i.default.none();if(i.default.list.isEmpty(l)&&i.default.list.isEmpty(_))return i.default.create(i.default.SyntaxKind.IfExpression,{condition:(0,a.createTruthinessChecks)(e,n,t.condition),expression:r,alternative:u});const d=i.default.tempId("result");return e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:d,right:void 0})),i.default.list.push(l,i.default.create(i.default.SyntaxKind.Assignment,{left:d,operator:"=",right:r})),i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:d,operator:"=",right:u})),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,a.createTruthinessChecks)(e,n,t.condition),statements:l,elseBody:_})),d};const i=r(n(9861)),o=n(6671),a=n(410),s=n(6409),c=n(6837)},7484:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformDeleteExpression=function(e,t){return(0,o.transformExpression)(e,t.expression),(0,a.isUsedAsStatement)(t)?i.default.none():i.default.bool(!0)};const i=r(n(9861)),o=n(6671),a=n(6409)},8010:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformElementAccessExpressionInner=function(e,t,n,r){(0,f.validateNotAnyType)(e,t.expression),(0,f.validateNotAnyType)(e,t.argumentExpression);const a=e.typeChecker.getNonOptionalType(e.getType(t.expression));(0,s.addIndexDiagnostics)(e,t,a);const[u,g]=e.capture((()=>(0,o.transformExpression)(e,r)));return i.default.list.isEmpty(g)||((0,p.isLuaTupleType)(e)(a)&&(n=i.default.array([n])),n=e.pushToVar(n,"exp"),e.prereqList(g)),i.default.isCall(n)&&(0,p.isLuaTupleType)(e)(a)?(i.default.isNumberLiteral(u)&&0===Number(u.value)||(n=i.default.call(i.default.globals.select,[(0,_.offset)(u,1),n])),i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:n})):m.default.isDeleteExpression((0,d.skipUpwards)(t).parent)?(e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,l.convertToIndexableExpression)(n),index:(0,c.addOneIfArrayType)(e,a,u)}),operator:"=",right:i.default.nil()})),i.default.none()):i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,l.convertToIndexableExpression)(n),index:(0,c.addOneIfArrayType)(e,a,u)})},t.transformElementAccessExpression=function(e,t){const n=(0,u.getConstantValueLiteral)(e,t);return n||(0,a.transformOptionalChain)(e,t)};const i=r(n(9861)),o=n(6671),a=n(8087),s=n(5949),c=n(8576),l=n(6453),u=n(835),_=n(9582),d=n(6219),p=n(1915),f=n(3972),m=r(n(2137))},6671:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformExpression=function(e,t){const n=V.get(t.kind);if(n)return n(e,t);(0,a.assert)(!1,`Unknown expression: ${(0,J.getKindName)(t.kind)}`)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(250),l=n(7075),u=n(8e3),_=n(2157),d=n(4698),p=n(9365),f=n(1392),m=n(7484),g=n(8010),h=n(8998),y=n(6848),v=n(8279),b=n(7441),x=n(650),S=n(1406),k=n(7517),T=n(8732),C=n(2572),w=n(2578),D=n(4104),E=n(6484),P=n(8685),N=n(9760),F=n(7480),A=n(4379),I=n(8946),O=n(8141),M=n(8652),L=n(2772),j=n(1471),R=n(1475),B=n(7895),J=n(2036),z=r(n(2137)),$=()=>i.default.none(),q=e=>(t,n)=>(s.DiagnosticService.addDiagnostic(e(n)),$()),V=(U=[[z.default.SyntaxKind.BigIntLiteral,q(o.errors.noBigInt)],[z.default.SyntaxKind.NullKeyword,q(o.errors.noNullLiteral)],[z.default.SyntaxKind.PrivateIdentifier,q(o.errors.noPrivateIdentifier)],[z.default.SyntaxKind.RegularExpressionLiteral,q(o.errors.noRegex)],[z.default.SyntaxKind.TypeOfExpression,q(o.errors.noTypeOfExpression)],[z.default.SyntaxKind.ImportKeyword,$],[z.default.SyntaxKind.ArrayLiteralExpression,c.transformArrayLiteralExpression],[z.default.SyntaxKind.ArrowFunction,h.transformFunctionExpression],[z.default.SyntaxKind.AsExpression,L.transformTypeExpression],[z.default.SyntaxKind.AwaitExpression,l.transformAwaitExpression],[z.default.SyntaxKind.BinaryExpression,u.transformBinaryExpression],[z.default.SyntaxKind.CallExpression,d.transformCallExpression],[z.default.SyntaxKind.ClassExpression,p.transformClassExpression],[z.default.SyntaxKind.ConditionalExpression,f.transformConditionalExpression],[z.default.SyntaxKind.DeleteExpression,m.transformDeleteExpression],[z.default.SyntaxKind.ElementAccessExpression,g.transformElementAccessExpression],[z.default.SyntaxKind.ExpressionWithTypeArguments,L.transformTypeExpression],[z.default.SyntaxKind.FalseKeyword,_.transformFalseKeyword],[z.default.SyntaxKind.FunctionExpression,h.transformFunctionExpression],[z.default.SyntaxKind.Identifier,y.transformIdentifier],[z.default.SyntaxKind.JsxElement,v.transformJsxElement],[z.default.SyntaxKind.JsxExpression,b.transformJsxExpression],[z.default.SyntaxKind.JsxFragment,x.transformJsxFragment],[z.default.SyntaxKind.JsxSelfClosingElement,S.transformJsxSelfClosingElement],[z.default.SyntaxKind.NewExpression,k.transformNewExpression],[z.default.SyntaxKind.NonNullExpression,L.transformTypeExpression],[z.default.SyntaxKind.NoSubstitutionTemplateLiteral,T.transformNoSubstitutionTemplateLiteral],[z.default.SyntaxKind.NumericLiteral,C.transformNumericLiteral],[z.default.SyntaxKind.ObjectLiteralExpression,w.transformObjectLiteralExpression],[z.default.SyntaxKind.OmittedExpression,D.transformOmittedExpression],[z.default.SyntaxKind.ParenthesizedExpression,E.transformParenthesizedExpression],[z.default.SyntaxKind.PostfixUnaryExpression,j.transformPostfixUnaryExpression],[z.default.SyntaxKind.PrefixUnaryExpression,j.transformPrefixUnaryExpression],[z.default.SyntaxKind.PropertyAccessExpression,P.transformPropertyAccessExpression],[z.default.SyntaxKind.SatisfiesExpression,L.transformTypeExpression],[z.default.SyntaxKind.SpreadElement,N.transformSpreadElement],[z.default.SyntaxKind.StringLiteral,F.transformStringLiteral],[z.default.SyntaxKind.SuperKeyword,A.transformSuperKeyword],[z.default.SyntaxKind.TaggedTemplateExpression,I.transformTaggedTemplateExpression],[z.default.SyntaxKind.TemplateExpression,O.transformTemplateExpression],[z.default.SyntaxKind.ThisKeyword,M.transformThisExpression],[z.default.SyntaxKind.TrueKeyword,_.transformTrueKeyword],[z.default.SyntaxKind.TypeAssertionExpression,L.transformTypeExpression],[z.default.SyntaxKind.VoidExpression,R.transformVoidExpression],[z.default.SyntaxKind.YieldExpression,B.transformYieldExpression]],new Map(U));var U},8998:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformFunctionExpression=function(e,t){t.name&&a.DiagnosticService.addDiagnostic(o.errors.noFunctionExpressionName(t.name));let{statements:n,parameters:r,hasDotDotDot:d}=(0,c.transformParameters)(e,t);const p=t.body;if(_.default.isFunctionBody(p))i.default.list.pushList(n,(0,l.transformStatementList)(e,p,p.statements));else{const[t,r]=e.capture((()=>(0,s.transformReturnStatementInner)(e,p)));i.default.list.pushList(n,r),i.default.list.pushList(n,t)}const f=_.default.hasSyntacticModifier(t,_.default.ModifierFlags.Async);t.asteriskToken&&(f&&a.DiagnosticService.addDiagnostic(o.errors.noAsyncGeneratorFunctions(t)),n=(0,u.wrapStatementsAsGenerator)(e,t,n));let m=i.default.create(i.default.SyntaxKind.FunctionExpression,{hasDotDotDot:d,parameters:r,statements:n});return f&&(m=i.default.call(e.TS(t,"async"),[m])),m};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(5807),c=n(7937),l=n(8043),u=n(6442),_=r(n(2137))},6848:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformIdentifierDefined=g,t.transformIdentifier=function(e,t){var n;if(!t.parent||m.default.positionIsSynthesized(t.pos))return i.default.create(i.default.SyntaxKind.Identifier,{name:t.text});const r=m.default.isShorthandPropertyAssignment(t.parent)?e.typeChecker.getShorthandAssignmentValueSymbol(t.parent):e.typeChecker.getSymbolAtLocation(t);if((0,a.assert)(r),e.typeChecker.isUndefinedSymbol(r))return i.default.nil();e.typeChecker.isArgumentsSymbol(r)?l.DiagnosticService.addDiagnostic(o.errors.noArguments(t)):r===e.services.macroManager.getSymbolOrThrow(c.SYMBOL_NAMES.globalThis)&&l.DiagnosticService.addDiagnostic(o.errors.noGlobalThis(t));const h=e.services.macroManager.getIdentifierMacro(r);if(h)return h(e,t);const y=(0,f.getFirstConstructSymbol)(e,t);y&&e.services.macroManager.getConstructorMacro(y)&&(m.default.isClassLike(t.parent.parent.parent)&&(null===(n=(0,_.getExtendsNode)(t.parent.parent.parent))||void 0===n?void 0:n.expression)===t?l.DiagnosticService.addDiagnostic(o.errors.noMacroExtends(t)):l.DiagnosticService.addDiagnostic(o.errors.noConstructorMacroWithoutNew(t)));const v=(0,p.skipUpwards)(t).parent;if((!m.default.isCallExpression(v)||(0,p.skipDownwards)(v.expression)!=t)&&e.services.macroManager.getCallMacro(r))return l.DiagnosticService.addDiagnostic(o.errors.noIndexWithoutCall(t)),i.default.none();if(r.valueDeclaration&&r.valueDeclaration.getSourceFile()===t.getSourceFile()&&void 0===(0,p.getAncestor)(r.valueDeclaration,(e=>m.default.isModuleDeclaration(e)&&!(0,u.isNamespace)(e)))){const t=e.getModuleIdPropertyAccess(r);if(t&&(0,d.isSymbolMutable)(e,r))return t}return function(e,t,n){var r;if(void 0!==e.isHoisted.get(n))return;const i=null!==(r=n.valueDeclaration)&&void 0!==r?r:function(e){var t;for(const n of null!==(t=e.declarations)&&void 0!==t?t:[])if((0,p.getAncestor)(n,m.default.isAnyImportSyntax))return n}(n);if(!i||(0,p.getAncestor)(i,m.default.isParameter)||m.default.isShorthandPropertyAssignment(i))return;if(m.default.isClassLike(i)&&(0,p.isAncestorOf)(i,t))return;const o=(0,p.getAncestor)(i,m.default.isStatement);if(!o||m.default.isForStatement(o)||m.default.isForOfStatement(o)||m.default.isTryStatement(o))return;const a=o.parent;if(!a||!(0,u.isBlockLike)(a))return;const c=function(e,t){for(;t.parent&&t.parent!==e;)t=t.parent;return t.parent?t:void 0}(a,t);if(!c||!m.default.isStatement(c))return;const l=a.statements.indexOf(o),_=a.statements.indexOf(c);_>l||_===l&&(m.default.isFunctionDeclaration(o)&&!m.default.hasSyntacticModifier(o,m.default.ModifierFlags.Async)||m.default.isClassDeclaration(o)||m.default.isVariableStatement(o)&&(0,p.getAncestor)(t,(e=>m.default.isStatement(e)||m.default.isFunctionLikeDeclaration(e)))===o)||((0,s.getOrSetDefault)(e.hoistsByStatement,c,(()=>new Array)).push(t),e.isHoisted.set(n,!0))}(e,t,r),g(e,t)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(2991),c=n(3115),l=n(4502),u=n(226),_=n(9655),d=n(3527),p=n(6219),f=n(1915),m=r(n(2137));function g(e,t){const n=m.default.isShorthandPropertyAssignment(t.parent)?e.typeChecker.getShorthandAssignmentValueSymbol(t.parent):e.typeChecker.getSymbolAtLocation(t);(0,a.assert)(n);return e.symbolToIdMap.get(n)||i.default.create(i.default.SyntaxKind.Identifier,{name:t.text})}},7637:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformImportExpression=function(e,t){const n=t.arguments[0];if(!n||!c.default.isStringLiteral(n))return a.DiagnosticService.addDiagnostic(o.errors.noNonStringModuleSpecifier(t)),i.default.none();const r=(0,s.createImportExpression)(e,t.getSourceFile(),n),l=i.default.id("resolve");return i.default.call(i.default.property(e.TS(t,"Promise"),"new"),[i.default.create(i.default.SyntaxKind.FunctionExpression,{hasDotDotDot:!1,parameters:i.default.list.make(l),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(l,[r])}))})])};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(3842),c=r(n(2137))},8279:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxElement=function(e,t){return(0,r.transformJsx)(e,t,t.openingElement.tagName,t.openingElement.attributes,t.children)};const r=n(4487)},7441:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxExpression=function(e,t){if(t.expression){const n=(0,o.transformExpression)(e,t.expression);return t.dotDotDotToken?i.default.call(i.default.globals.unpack,[n]):n}return i.default.none()};const i=r(n(9861)),o=n(6671)},650:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxFragment=function(e,t){var n;const r=e.resolver.getJsxFactoryEntity(t);(0,o.assert)(r,"Expected jsxFactoryEntity to be defined");const u=(0,c.convertToIndexableExpression)((0,s.transformEntityName)(e,r)),_=null!==(n=e.resolver.getJsxFragmentFactoryEntity(t))&&void 0!==n?n:l.default.parseIsolatedEntityName("Fragment",l.default.ScriptTarget.ESNext);(0,o.assert)(_,"Unable to find valid jsxFragmentFactoryEntity");const d=[(0,s.transformEntityName)(e,_)],p=(0,a.transformJsxChildren)(e,t.children);return p.length>0&&d.push(i.default.nil()),d.push(...p),i.default.call(u,d)};const i=r(n(9861)),o=n(2287),a=n(3340),s=n(2583),c=n(6453),l=r(n(2137))},1406:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxSelfClosingElement=function(e,t){return(0,r.transformJsx)(e,t,t.tagName,t.attributes,[])};const r=n(4487)},7517:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformNewExpression=function(e,t){(0,l.validateNotAnyType)(e,t.expression);const n=(0,c.getFirstConstructSymbol)(e,t.expression);if(n){const r=e.services.macroManager.getConstructorMacro(n);if(r)return r(e,t)}const r=(0,a.convertToIndexableExpression)((0,o.transformExpression)(e,t.expression)),u=t.arguments?(0,s.ensureTransformOrder)(e,t.arguments):[];return i.default.call(i.default.property(r,"new"),u)};const i=r(n(9861)),o=n(6671),a=n(6453),s=n(7034),c=n(1915),l=n(3972)},8732:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformNoSubstitutionTemplateLiteral=function(e,t){return i.default.create(i.default.SyntaxKind.InterpolatedString,{parts:i.default.list.make((0,o.transformInterpolatedStringPart)(t))})};const i=r(n(9861)),o=n(1993)},2572:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformNumericLiteral=function(e,t){return i.default.create(i.default.SyntaxKind.NumberLiteral,{value:t.getText()})};const i=r(n(9861))},2578:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformObjectLiteralExpression=function(e,t){const n=(0,_.createMapPointer)("object");for(const r of t.properties)if((0,p.validateMethodAssignment)(e,r),f.default.isPropertyAssignment(r)){if(f.default.isPrivateIdentifier(r.name)){a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(r.name));continue}m(e,n,r.name,r.initializer)}else f.default.isShorthandPropertyAssignment(r)?m(e,n,r.name,r.name):f.default.isSpreadAssignment(r)?g(e,n,r):f.default.isMethodDeclaration(r)?e.prereqList((0,c.transformMethodDeclaration)(e,r,n)):a.DiagnosticService.addDiagnostic(o.errors.noGetterSetter(r));return n.value};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(8111),l=n(5671),u=n(410),_=n(274),d=n(1915),p=n(4735),f=r(n(2137));function m(e,t,n,r){let[o,a]=e.capture((()=>(0,l.transformPropertyName)(e,n)));const[c,u]=e.capture((()=>(0,s.transformExpression)(e,r)));i.default.list.isEmpty(a)&&i.default.list.isEmpty(u)||((0,_.disableMapInline)(e,t),e.prereqList(a),o=e.pushToVar(o,"left")),e.prereqList(u),(0,_.assignToMapPointer)(e,t,o,c)}function g(e,t,n){const r=e.typeChecker.getNonOptionalType(e.getType(n.expression)),c=(0,d.getFirstDefinedSymbol)(e,r);c&&e.services.macroManager.isMacroOnlyClass(c)&&a.DiagnosticService.addDiagnostic(o.errors.noMacroObjectSpread(n));const l=e.getType(n.expression),p=(0,d.isDefinitelyType)(l,d.isObjectType);if(p&&i.default.isMap(t.value)&&i.default.list.isEmpty(t.value.fields))return t.value=e.pushToVar(i.default.call(i.default.globals.table.clone,[(0,s.transformExpression)(e,n.expression)]),t.name),void e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.setmetatable,[t.value,i.default.nil()])}));(0,_.disableMapInline)(e,t);let f=(0,s.transformExpression)(e,n.expression);p||(f=e.pushToVarIfComplex(f,"spread"));const m=i.default.tempId("k"),g=i.default.tempId("v");let h=i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(m,g),expression:f,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t.value,index:m}),operator:"=",right:g}))});p||(h=i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,u.createTruthinessChecks)(e,f,n.expression),statements:i.default.list.make(h),elseBody:i.default.list.make()})),e.prereq(h)}},4104:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformOmittedExpression=function(){return i.default.nil()};const i=r(n(9861))},6484:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformParenthesizedExpression=function(e,t){const n=(0,o.transformExpression)(e,(0,a.skipDownwards)(t.expression));return i.default.isSimple(n)?n:i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:n})};const i=r(n(9861)),o=n(6671),a=n(6219)},8685:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPropertyAccessExpressionInner=function(e,t,n,r){return(0,u.validateNotAnyType)(e,t.expression),(0,a.addIndexDiagnostics)(e,t,e.typeChecker.getNonOptionalType(e.getType(t))),_.default.isDeleteExpression((0,l.skipUpwards)(t).parent)?(e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property((0,s.convertToIndexableExpression)(n),r),operator:"=",right:i.default.nil()})),i.default.none()):i.default.property((0,s.convertToIndexableExpression)(n),r)},t.transformPropertyAccessExpression=function(e,t){const n=(0,c.getConstantValueLiteral)(e,t);return n||(0,o.transformOptionalChain)(e,t)};const i=r(n(9861)),o=n(8087),a=n(5949),s=n(6453),c=n(835),l=n(6219),u=n(3972),_=r(n(2137))},9760:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSpreadElement=function(e,t){(0,_.validateNotAnyType)(e,t.expression),(0,a.assert)(!d.default.isArrayLiteralExpression(t.parent)&&t.parent.arguments),t.parent.arguments[t.parent.arguments.length-1]!==t&&s.DiagnosticService.addDiagnostic(o.errors.noPrecedingSpreadElement(t));const n=(0,c.transformExpression)(e,t.expression),r=e.getType(t.expression);if((0,u.isDefinitelyType)(r,(0,u.isArrayType)(e)))return i.default.call(i.default.globals.unpack,[n]);{const o=(0,l.getAddIterableToArrayBuilder)(e,t.expression,r),a=e.pushToVar(i.default.array(),"array"),s=e.pushToVar(i.default.number(0),"length");return e.prereqList(o(e,n,a,s,0,!1)),i.default.call(i.default.globals.unpack,[a])}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(3901),u=n(1915),_=n(3972),d=r(n(2137))},7480:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformStringLiteral=function(e,t){return i.default.string((0,o.createStringFromLiteral)(t))};const i=r(n(9861)),o=n(4397)},4379:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSuperKeyword=function(){return i.default.globals.super};const i=r(n(9861))},8946:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformTaggedTemplateExpression=function(e,t){const n=(0,o.transformExpression)(e,t.tag);if(c.default.isTemplateExpression(t.template)){const r=new Array;r.push(i.default.string(t.template.head.text));for(const e of t.template.templateSpans)r.push(i.default.string(e.literal.text));const o=(0,s.ensureTransformOrder)(e,t.template.templateSpans.map((e=>e.expression)));return i.default.call((0,a.convertToIndexableExpression)(n),[i.default.array(r),...o])}return i.default.call((0,a.convertToIndexableExpression)(n),[i.default.array([i.default.string(t.template.text)])])};const i=r(n(9861)),o=n(6671),a=n(6453),s=n(7034),c=r(n(2137))},8141:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformTemplateExpression=function(e,t){const n=i.default.list.make();t.head.text.length>0&&i.default.list.push(n,(0,o.transformInterpolatedStringPart)(t.head));const r=(0,a.ensureTransformOrder)(e,t.templateSpans.map((e=>e.expression)));for(let e=0;e0&&i.default.list.push(n,(0,o.transformInterpolatedStringPart)(a.literal))}return i.default.create(i.default.SyntaxKind.InterpolatedString,{parts:n})};const i=r(n(9861)),o=n(1993),a=n(7034)},8652:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformThisExpression=function(e,t){const n=e.typeChecker.getSymbolAtLocation(t);if(n===e.services.macroManager.getSymbolOrThrow(a.SYMBOL_NAMES.globalThis)&&s.DiagnosticService.addDiagnostic(o.errors.noGlobalThis(t)),n){const n=c.default.getThisContainer(t,!1,!1);if((c.default.hasStaticModifier(n)||c.default.isClassStaticBlockDeclaration(n))&&!c.default.isMethodDeclaration(n)&&c.default.isClassLike(n.parent)){const t=e.classIdentifierMap.get(n.parent);if(t)return t}}return i.default.globals.self};const i=r(n(9861)),o=n(7370),a=n(3115),s=n(4502),c=r(n(2137))},2772:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformTypeExpression=function(e,t){return(0,r.transformExpression)(e,t.expression)};const r=n(6671)},1471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPostfixUnaryExpression=function(e,t){(0,d.validateNotAnyType)(e,t.operand);const n=(0,c.transformWritableExpression)(e,t.operand,!0),r=i.default.tempId("original");return e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:n})),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:t.operator===p.default.SyntaxKind.PlusPlusToken?"+=":t.operator===p.default.SyntaxKind.MinusMinusToken?"-=":(0,l.assertNever)(t.operator,"transformPostfixUnaryExpression"),right:i.default.number(1)})),r},t.transformPrefixUnaryExpression=function(e,t){if((0,d.validateNotAnyType)(e,t.operand),t.operator===p.default.SyntaxKind.PlusPlusToken||t.operator===p.default.SyntaxKind.MinusMinusToken){const n=(0,c.transformWritableExpression)(e,t.operand,!0),r=t.operator===p.default.SyntaxKind.PlusPlusToken?"+=":"-=";return e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:r,right:i.default.number(1)})),n}if(t.operator===p.default.SyntaxKind.PlusToken)return a.DiagnosticService.addDiagnostic(o.errors.noUnaryPlus(t)),(0,s.transformExpression)(e,t.operand);if(t.operator===p.default.SyntaxKind.MinusToken)return(0,_.isDefinitelyType)(e.getType(t.operand),_.isNumberType)||a.DiagnosticService.addDiagnostic(o.errors.noNonNumberUnaryMinus(t)),i.default.unary("-",(0,s.transformExpression)(e,t.operand));if(t.operator===p.default.SyntaxKind.ExclamationToken){const n=(0,u.createTruthinessChecks)(e,(0,s.transformExpression)(e,t.operand),t.operand);return i.default.unary("not",n)}return t.operator===p.default.SyntaxKind.TildeToken?i.default.call(i.default.property(i.default.globals.bit32,"bnot"),[(0,s.transformExpression)(e,t.operand)]):(0,l.assertNever)(t.operator,"transformPrefixUnaryExpression")};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(7010),l=n(9225),u=n(410),_=n(1915),d=n(3972),p=r(n(2137))},1475:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformVoidExpression=function(e,t){return e.prereqList((0,o.transformExpressionStatementInner)(e,(0,a.skipDownwards)(t.expression))),i.default.create(i.default.SyntaxKind.NilLiteral,{})};const i=r(n(9861)),o=n(7858),a=n(6219)},7895:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformYieldExpression=function(e,t){if(!t.expression)return i.default.call(i.default.globals.coroutine.yield,[]);const n=(0,o.transformExpression)(e,t.expression);if(t.asteriskToken){const r=i.default.tempId("result"),o=i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{}));let c=i.default.none();if(!(0,s.isUsedAsStatement)(t)){const t=e.pushToVar(void 0,"returnValue");i.default.list.unshift(o,i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:i.default.property(r,"value")})),c=t}return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(r),expression:i.default.property((0,a.convertToIndexableExpression)(n),"next"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.property(r,"done"),statements:o,elseBody:i.default.list.make()}),i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.coroutine.yield,[i.default.property(r,"value")])}))})),c}return i.default.call(i.default.globals.coroutine.yield,[n])};const i=r(n(9861)),o=n(6671),a=n(6453),s=n(6409)},4487:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsx=function(e,t,n,r,d){const p=e.resolver.getJsxFactoryEntity(t);(0,o.assert)(p,"Expected jsxFactoryEntity to be defined");const f=(0,u.convertToIndexableExpression)((0,l.transformEntityName)(e,p)),m=(0,c.transformJsxTagName)(e,n);let g;r.properties.length>0&&(g=(0,_.createMapPointer)("attributes"),(0,a.transformJsxAttributes)(e,r,g));const h=(0,s.transformJsxChildren)(e,d),y=[m];return g?y.push(g.value):h.length>0&&y.push(i.default.nil()),y.push(...h),i.default.call(f,y)};const i=r(n(9861)),o=n(2287),a=n(1472),s=n(3340),c=n(1974),l=n(2583),u=n(6453),_=n(274)},1472:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxAttributes=function(e,t,n){for(const r of t.properties)if(_.default.isJsxAttribute(r))p(e,r,n);else{const c=e.typeChecker.getNonOptionalType(e.getType(r.expression)),_=(0,u.getFirstDefinedSymbol)(e,c);_&&e.services.macroManager.isMacroOnlyClass(_)&&a.DiagnosticService.addDiagnostic(o.errors.noMacroObjectSpread(r));const p=(0,s.transformExpression)(e,r.expression);if(r===t.properties[0]&&(0,u.isDefinitelyType)(c,u.isObjectType)){n.value=e.pushToVar(i.default.call(i.default.globals.table.clone,[p]),n.name),e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.setmetatable,[n.value,i.default.nil()])}));continue}(0,l.disableMapInline)(e,n),e.prereq(d(e,n.value,p,r.expression))}};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(410),l=n(274),u=n(1915),_=r(n(2137));function d(e,t,n,r){const o=(0,u.isDefinitelyType)(e.getType(r),u.isObjectType);o||(n=e.pushToVarIfComplex(n,"attribute"));const a=i.default.tempId("k"),s=i.default.tempId("v");let l=i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(a,s),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:a}),operator:"=",right:s}))});return o||(l=i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,c.createTruthinessChecks)(e,n,r),statements:i.default.list.make(l),elseBody:i.default.list.make()})),l}function p(e,t,n){let r=t.initializer;r&&_.default.isJsxExpression(r)&&(r=r.expression);const[o,a]=r?e.capture((()=>(0,s.transformExpression)(e,r))):[i.default.bool(!0),i.default.list.make()];i.default.list.isEmpty(a)||((0,l.disableMapInline)(e,n),e.prereqList(a));const c=_.default.isIdentifier(t.name)?t.name.text:_.default.getTextOfJsxNamespacedName(t.name),u=i.default.string(c);(0,l.assignToMapPointer)(e,n,u,o)}},3340:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxChildren=function(e,t){const n=(0,a.findLastIndex)(t,(e=>!_.default.isJsxText(e)||!e.containsOnlyTriviaWhiteSpaces));for(let e=0;e!_.default.isJsxText(e)||!e.containsOnlyTriviaWhiteSpaces)).filter((e=>!_.default.isJsxExpression(e)||void 0!==e.expression)),((e,t)=>{var n;if(_.default.isJsxText(t)){const e=null!==(n=(0,u.fixupWhitespaceAndDecodeEntities)(t.text))&&void 0!==n?n:"";return i.default.string(e.replace(/\\/g,"\\\\"))}return(0,c.transformExpression)(e,t)}))};const i=r(n(9861)),o=n(7370),a=n(2532),s=n(4502),c=n(6671),l=n(7034),u=n(6226),_=r(n(2137))},1974:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxTagName=function(e,t){const[n,r]=e.capture((()=>function(e,t){if(l.default.isIdentifier(t)){const e=t.text[0];if(e===e.toLowerCase())return i.default.string(t.text)}return l.default.isPropertyAccessExpression(t)?(l.default.isPrivateIdentifier(t.name)&&a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(t.name)),i.default.property((0,c.convertToIndexableExpression)((0,s.transformExpression)(e,t.expression)),t.name.text)):l.default.isJsxNamespacedName(t)?i.default.string(l.default.getTextOfJsxNamespacedName(t)):(0,s.transformExpression)(e,t)}(e,t)));let u=n;return i.default.list.isEmpty(r)||(e.prereqList(r),u=e.pushToVarIfComplex(u,"tagName")),u};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(6453),l=r(n(2137))},2852:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformBlock=function(e,t){return i.default.list.make(i.default.create(i.default.SyntaxKind.DoStatement,{statements:(0,o.transformStatementList)(e,t,t.statements)}))};const i=r(n(9861)),o=n(8043)},3489:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformBreakStatement=function(e,t){return t.label?(a.DiagnosticService.addDiagnostic(o.errors.noLabeledStatement(t.label)),i.default.list.make()):(0,s.isBreakBlockedByTryStatement)(t)?(e.markTryUses("usesBreak"),i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:e.TS(t,"TRY_BREAK")}))):i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{}))};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(965)},9015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformClassDeclaration=function(e,t){return(0,r.transformClassLikeDeclaration)(e,t).statements};const r=n(5082)},254:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformContinueStatement=function(e,t){return t.label?(a.DiagnosticService.addDiagnostic(o.errors.noLabeledStatement(t.label)),i.default.list.make()):(0,s.isBreakBlockedByTryStatement)(t)?(e.markTryUses("usesContinue"),i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:e.TS(t,"TRY_CONTINUE")}))):i.default.list.make(i.default.create(i.default.SyntaxKind.ContinueStatement,{}))};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(965)},299:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformDoStatement=function(e,{expression:t,statement:n}){const r=(0,a.transformStatementList)(e,n,(0,c.getStatements)(n));let u=!0;l.default.isPrefixUnaryExpression(t)&&t.operator===l.default.SyntaxKind.ExclamationToken&&(t=t.operand,u=!1);const[_,d]=e.capture((()=>(0,s.createTruthinessChecks)(e,(0,o.transformExpression)(e,t),t))),p=i.default.list.make();return i.default.list.push(p,i.default.create(i.default.SyntaxKind.DoStatement,{statements:r})),i.default.list.pushList(p,d),i.default.list.make(i.default.create(i.default.SyntaxKind.RepeatStatement,{statements:p,condition:u?i.default.unary("not",_):_}))};const i=r(n(9861)),o=n(6671),a=n(8043),s=n(410),c=n(1441),l=r(n(2137))},9915:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformEnumDeclaration=function(e,t){if(f.default.hasSyntacticModifier(t,f.default.ModifierFlags.Const)&&!0!==e.compilerOptions.preserveConstEnums)return i.default.list.make();const n=e.typeChecker.getSymbolAtLocation(t.name);if(n&&(0,d.hasMultipleDefinitions)(n,(e=>f.default.isEnumDeclaration(e)&&!f.default.hasSyntacticModifier(e,f.default.ModifierFlags.Const))))return s.DiagnosticService.addDiagnosticWithCache(n,o.errors.noEnumMerging(t),e.multiTransformState.isReportedByMultipleDefinitionsCache),i.default.list.make();(0,p.validateIdentifier)(e,t.name);const r=(0,l.transformIdentifierDefined)(e,t.name),g=void 0!==n&&!0===e.isHoisted.get(n);if(t.members.every((t=>!m(e,t)))){const n=i.default.map(t.members.map((t=>[e.pushToVarIfComplex((0,u.transformPropertyName)(e,t.name)),i.default.string(e.typeChecker.getConstantValue(t))])));return i.default.list.make(g?i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:n}):i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:n}))}const h=e.capturePrereqs((()=>{const n=e.pushToVar(i.default.map(),"inverse");e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:i.default.call(i.default.globals.setmetatable,[i.default.map(),i.default.map([[i.default.strings.__index,n]])])}));for(const o of t.members){const t=(0,u.transformPropertyName)(e,o.name),s=(0,_.expressionMightMutate)(e,t,f.default.isComputedPropertyName(o.name)?o.name.expression:o.name)?e.pushToVar(t):t,l=e.typeChecker.getConstantValue(o);let d;"string"==typeof l?d=i.default.string(l):"number"==typeof l?d=i.default.number(l):((0,a.assert)(o.initializer),d=e.pushToVarIfComplex((0,c.transformExpression)(e,o.initializer),"value")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:r,index:s}),operator:"=",right:d})),m(e,o)&&e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:d}),operator:"=",right:s}))}})),y=i.default.list.make(i.default.create(i.default.SyntaxKind.DoStatement,{statements:h}));return g||i.default.list.unshift(y,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:void 0})),y};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(6848),u=n(5671),_=n(5708),d=n(1871),p=n(837),f=r(n(2137));function m(e,t){return"string"!=typeof e.typeChecker.getConstantValue(t)}},6602:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformExportAssignment=function(e,t){const n=e.typeChecker.getSymbolAtLocation(t.expression);return n&&(0,c.isSymbolMutable)(e,n)&&a.DiagnosticService.addDiagnostic(o.errors.noExportAssignmentLet(t)),n&&!(0,l.isSymbolOfValue)(u.default.skipAlias(n,e.typeChecker))?i.default.list.make():t.isExportEquals?function(e,t){e.hasExportEquals=!0;const n=t.getSourceFile();return n.statements[n.statements.length-1]===t?i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:(0,s.transformExpression)(e,t.expression)})):i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:e.getModuleIdFromNode(t),right:(0,s.transformExpression)(e,t.expression)}))}(e,t):function(e,t){const n=i.default.list.make(),[r,o]=e.capture((()=>(0,s.transformExpression)(e,t.expression)));return i.default.list.pushList(n,o),i.default.list.push(n,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.id("default"),right:r})),n}(e,t)};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(3527),l=n(1205),u=r(n(2137))},9337:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformExportDeclaration=function(e,t){return t.isTypeOnly?i.default.list.make():t.moduleSpecifier?function(e,t){var n;(0,o.assert)(t.moduleSpecifier&&l.default.isStringLiteral(t.moduleSpecifier));const r=i.default.list.make();let c;const _=t.exportClause,d=function(e,t){let n=0;if(t&&l.default.isNamedExports(t))for(const r of t.elements)u(e,r)&&n++;else n++;return n}(e,_);if(1===d)c=(0,s.createImportExpression)(e,t.getSourceFile(),t.moduleSpecifier);else if(d>1){const n=t.moduleSpecifier.text.split("/");c=i.default.tempId((0,a.cleanModuleName)(n[n.length-1])),i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:c,right:(0,s.createImportExpression)(e,t.getSourceFile(),t.moduleSpecifier)}))}if(!c)return r;const p=e.getModuleIdFromNode(t);if(_)if(l.default.isNamedExports(_))for(const t of _.elements)u(e,t)&&i.default.list.push(r,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(p,t.name.text),operator:"=",right:i.default.property(c,(null!==(n=t.propertyName)&&void 0!==n?n:t.name).text)}));else i.default.list.push(r,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(p,_.name.text),operator:"=",right:c}));else{const e=i.default.tempId("k"),t=i.default.tempId("v");i.default.list.push(r,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(e,t),expression:i.default.binary(c,"or",i.default.map()),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:p,index:e}),operator:"=",right:t}))}))}return e.hasExportFrom=!0,r}(e,t):i.default.list.make()};const i=r(n(9861)),o=n(2287),a=n(6073),s=n(3842),c=n(1205),l=r(n(2137));function u(e,t){if(t.isTypeOnly)return!1;if(e.resolver.isReferencedAliasDeclaration(t))return!0;const n=e.typeChecker.getSymbolAtLocation(t.name);return!(!n||!(0,c.isSymbolOfValue)(l.default.skipAlias(n,e.typeChecker)))}},7858:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformExpressionStatementInner=f,t.transformExpressionStatement=function(e,t){return f(e,(0,_.skipDownwards)(t.expression))};const i=r(n(9861)),o=n(6671),a=n(5260),s=n(7010),c=n(226),l=n(6614),u=n(9957),_=n(6219),d=n(6837),p=r(n(2137));function f(e,t){if(p.default.isBinaryExpression(t)){const n=t.operatorToken.kind;if(p.default.isLogicalOrCoalescingAssignmentExpression(t))return(0,a.transformLogicalOrCoalescingAssignmentExpressionStatement)(e,t);if(p.default.isAssignmentOperator(n)&&!p.default.isArrayLiteralExpression(t.left)&&!p.default.isObjectLiteralExpression(t.left)){const r=e.getType(t.left),o=e.getType(t.right),a=(0,l.getSimpleAssignmentOperator)(r,n,o),{writable:c,readable:_,value:d}=(0,s.transformWritableAssignment)(e,t.left,t.right,void 0===a,void 0===a);return void 0!==a?i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:c,operator:a,right:(0,u.getAssignableValue)(a,d,o)})):i.default.list.make((0,l.createCompoundAssignmentStatement)(e,t,c,r,_,n,d,o))}}else if((p.default.isPrefixUnaryExpression(t)||p.default.isPostfixUnaryExpression(t))&&(0,c.isUnaryAssignmentOperator)(t.operator))return i.default.list.make(function(e,t){const n=(0,s.transformWritableExpression)(e,t.operand,!1),r=t.operator===p.default.SyntaxKind.PlusPlusToken?"+=":"-=";return i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:r,right:i.default.number(1)})}(e,t));return(0,d.wrapExpressionStatement)((0,o.transformExpression)(e,t))}},5869:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformForOfRangeMacro=j,t.transformForOfStatement=function(e,t){if(t.awaitModifier&&c.DiagnosticService.addDiagnostic(o.errors.noAwaitForOf(t)),T.default.isVariableDeclarationList(t.initializer)){const n=t.initializer.declarations[0].name;T.default.isIdentifier(n)&&(0,S.validateIdentifier)(e,n)}const n=function(e,t){const n=(0,b.skipDownwards)(t.expression);if(T.default.isCallExpression(n)){const t=(0,x.getFirstDefinedSymbol)(e,e.getType(n.expression));if(t&&t===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.$range))return n}}(e,t);if(n)return j(e,t,n);const r=i.default.list.make(),[l,u]=e.capture((()=>(0,d.transformExpression)(e,t.expression)));i.default.list.pushList(r,u);const _=e.getType(t.expression),p=(0,f.transformStatementList)(e,t.statement,(0,v.getStatements)(t.statement)),m=function(e,t,n){return(0,x.isDefinitelyType)(n,(0,x.isArrayType)(e))?E:(0,x.isDefinitelyType)(n,(0,x.isSetType)(e))?P:(0,x.isDefinitelyType)(n,(0,x.isMapType)(e))?A:(0,x.isDefinitelyType)(n,x.isStringType)?I:(0,x.isDefinitelyType)(n,(0,x.isIterableFunctionLuaTupleType)(e))?(e=>(t,n,r,o)=>{if(T.default.isVariableDeclarationList(r)){const e=r.declarations[0].name;if(T.default.isArrayBindingPattern(e))return M(t,e,n,o)}else if(T.default.isArrayLiteralExpression(r))return M(t,r,n,o);const s=new Array,c=e.getCallSignatures()[0].getReturnType();(0,a.assert)(c&&c.aliasTypeArguments&&1===c.aliasTypeArguments.length,"Incorrect LuaTuple type arguments");const l=c.aliasTypeArguments[0];if(!T.default.isVariableDeclarationList(r)||!t.typeChecker.isTupleType(l)||l.target.combinedFlags&T.default.ElementFlags.Rest){const e=t.pushToVar(o,(0,k.valueToIdStr)(o)||"iterFunc"),a=i.default.list.make(),s=i.default.list.make(),c=D(t,r,s);return i.default.list.push(a,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:c,right:i.default.array([i.default.call(e)])})),i.default.list.push(a,i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(i.default.unary("#",c),"==",i.default.number(0)),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()})),i.default.list.pushList(a,s),i.default.list.pushList(a,n),i.default.list.make(i.default.create(i.default.SyntaxKind.WhileStatement,{condition:i.default.bool(!0),statements:a}))}{const e=l.target;for(let t=0;t{for(const e of s)i.default.list.push(r,e);return i.default.list.push(o,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:u,right:i.default.array(s)})),n}));return _(t,n,r,o)})(n):(0,x.isDefinitelyType)(n,(0,x.isIterableFunctionType)(e))?O:(0,x.isDefinitelyType)(n,(0,x.isGeneratorType)(e))?L:(0,x.isDefinitelyType)(n,(0,x.isIterableType)(e))?(c.DiagnosticService.addDiagnostic(o.errors.noIterableIteration(t)),()=>i.default.list.make()):n.isUnion()?(c.DiagnosticService.addDiagnostic(o.errors.noMacroUnion(t)),()=>i.default.list.make()):void(0,a.assert)(!1,`ForOf iteration type not implemented: ${e.typeChecker.typeToString(n)}`)}(e,t.expression,_);return i.default.list.pushList(r,m(e,p,t.initializer,l)),r};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(3115),c=n(4502),l=n(7598),u=n(1822),_=n(2865),d=n(6671),p=n(1782),f=n(8043),m=n(7010),g=n(6453),h=n(7034),y=n(2036),v=n(1441),b=n(6219),x=n(1915),S=n(837),k=n(2161),T=r(n(2137));function C(e){return(t,n,r,o)=>{const a=i.default.list.make(),s=i.default.list.make(),c=e(t,r,o,a,s);return i.default.list.unshiftList(n,s),i.default.list.make(i.default.create(i.default.SyntaxKind.ForStatement,{ids:a,expression:c,statements:n}))}}function w(e,t,n,r){if(T.default.isArrayLiteralExpression(t)){const[o,a]=e.capture((()=>{const n=e.pushToVar(r,"binding");return(0,l.transformArrayAssignmentPattern)(e,t,n),n}));return i.default.list.pushList(n,a),o}if(T.default.isObjectLiteralExpression(t)){const[o,a]=e.capture((()=>{const n=e.pushToVar(r,"binding");return(0,_.transformObjectAssignmentPattern)(e,t,n),n}));return i.default.list.pushList(n,a),o}{const o=(0,m.transformWritableExpression)(e,t,!1);i.default.list.push(n,i.default.create(i.default.SyntaxKind.Assignment,{left:o,operator:"=",right:r}))}}function D(e,t,n){if(T.default.isVariableDeclarationList(t))return(0,u.transformBindingName)(e,t.declarations[0].name,n);if(T.default.isArrayLiteralExpression(t)){const r=i.default.tempId("binding");return i.default.list.pushList(n,e.capturePrereqs((()=>(0,l.transformArrayAssignmentPattern)(e,t,r)))),r}if(T.default.isObjectLiteralExpression(t)){const r=i.default.tempId("binding");return i.default.list.pushList(n,e.capturePrereqs((()=>(0,_.transformObjectAssignmentPattern)(e,t,r)))),r}{const r=i.default.tempId("v"),o=(0,m.transformWritableExpression)(e,t,!1);return i.default.list.push(n,i.default.create(i.default.SyntaxKind.Assignment,{left:o,operator:"=",right:r})),r}}const E=C(((e,t,n,r,o)=>(i.default.list.push(r,i.default.tempId()),i.default.list.push(r,D(e,t,o)),n))),P=C(((e,t,n,r,o)=>(i.default.list.push(r,D(e,t,o)),n)));function N(e,t,n,r){for(const a of t.elements)if(T.default.isOmittedExpression(a))i.default.list.push(n,i.default.tempId());else if(T.default.isSpreadElement(a))c.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(a));else{const t=(0,u.transformBindingName)(e,a.name,r);a.initializer&&i.default.list.push(r,(0,p.transformInitializer)(e,t,a.initializer)),i.default.list.push(n,t)}}function F(e,t,n,r){i.default.list.pushList(r,e.capturePrereqs((()=>{for(let r of t.elements)if(T.default.isOmittedExpression(r))i.default.list.push(n,i.default.tempId());else if(T.default.isSpreadElement(r))c.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(r));else{let t;T.default.isBinaryExpression(r)&&(t=(0,b.skipDownwards)(r.right),r=(0,b.skipDownwards)(r.left));const o=i.default.tempId("binding");if(T.default.isIdentifier(r)||T.default.isElementAccessExpression(r)||T.default.isPropertyAccessExpression(r)){const n=(0,m.transformWritableExpression)(e,r,void 0!==t);e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:o})),t&&e.prereq((0,p.transformInitializer)(e,n,t))}else T.default.isArrayLiteralExpression(r)?(t&&e.prereq((0,p.transformInitializer)(e,o,t)),(0,l.transformArrayAssignmentPattern)(e,r,o)):T.default.isObjectLiteralExpression(r)?(t&&e.prereq((0,p.transformInitializer)(e,o,t)),(0,_.transformObjectAssignmentPattern)(e,r,o)):(0,a.assert)(!1,`transformInLineArrayAssignmentPattern invalid element: ${(0,y.getKindName)(r.kind)}`);i.default.list.push(n,o)}})))}const A=C(((e,t,n,r,o)=>{if(T.default.isVariableDeclarationList(t)){const i=t.declarations[0].name;if(T.default.isArrayBindingPattern(i))return N(e,i,r,o),n}else if(T.default.isArrayLiteralExpression(t))return F(e,t,r,o),n;const a=i.default.tempId("k"),s=i.default.tempId("v");if(i.default.list.push(r,a),i.default.list.push(r,s),T.default.isVariableDeclarationList(t)){const n=i.default.list.make();i.default.list.push(o,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:D(e,t,n),right:i.default.array([a,s])})),i.default.list.pushList(o,n)}else w(e,t,o,i.default.array([a,s]));return n})),I=C(((e,t,n,r,o)=>(i.default.list.push(r,D(e,t,o)),i.default.call(i.default.globals.string.gmatch,[n,i.default.globals.utf8.charpattern])))),O=C(((e,t,n,r,o)=>(i.default.list.push(r,D(e,t,o)),n)));function M(e,t,n,r){const o=i.default.list.make(),a=i.default.list.make();return T.default.isArrayBindingPattern(t)?N(e,t,o,a):F(e,t,o,a),i.default.list.unshiftList(n,a),i.default.list.make(i.default.create(i.default.SyntaxKind.ForStatement,{ids:o,expression:r,statements:n}))}const L=C(((e,t,n,r,o)=>{const a=i.default.tempId("result");if(i.default.list.push(r,a),i.default.list.push(o,i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.property(a,"done"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()})),T.default.isVariableDeclarationList(t)){const n=i.default.list.make();i.default.list.push(o,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:D(e,t,n),right:i.default.property(a,"value")})),i.default.list.pushList(o,n)}else w(e,t,o,i.default.property(a,"value"));return i.default.property((0,g.convertToIndexableExpression)(n),"next")}));function j(e,t,n){const r=i.default.list.make(),o=i.default.list.make(),a=D(e,t.initializer,o),[[s,c,l],u]=e.capture((()=>(0,h.ensureTransformOrder)(e,n.arguments)));return i.default.list.pushList(r,u),i.default.list.pushList(o,(0,f.transformStatementList)(e,t.statement,(0,v.getStatements)(t.statement))),i.default.list.push(r,i.default.create(i.default.SyntaxKind.NumericForStatement,{id:a,start:s,end:c,step:void 0===l||i.default.isNumberLiteral(l)?l:i.default.binary(l,"or",i.default.number(1)),statements:o})),r}},9430:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformForStatement=function(e,t){if(e.data.projectOptions.optimizedLoops){const n=function(e,t){const{initializer:n,condition:r,incrementor:o,statement:a}=t;if(!n||!v.default.isVariableDeclarationList(n)||1!==n.declarations.length)return;const{name:s,initializer:u}=n.declarations[0];if(!v.default.isIdentifier(s)||void 0===u)return;const _=e.typeChecker.getSymbolAtLocation(s);if(!_)return;if(!T(e,u))return;if(!o)return;const p=function(e,t,n){return v.default.isBinaryExpression(t)&&v.default.isIdentifier(t.left)&&e.typeChecker.getSymbolAtLocation(t.left)===n&&t.operatorToken.kind===v.default.SyntaxKind.PlusEqualsToken&&v.default.isNumericLiteral(t.right)&&T(e,t.right)?Number(t.right.getText()):v.default.isBinaryExpression(t)&&t.operatorToken.kind===v.default.SyntaxKind.MinusEqualsToken&&v.default.isNumericLiteral(t.right)&&T(e,t.right)?-Number(t.right.getText()):(v.default.isPostfixUnaryExpression(t)||v.default.isPrefixUnaryExpression(t))&&v.default.isIdentifier(t.operand)&&e.typeChecker.getSymbolAtLocation(t.operand)===n&&t.operator===v.default.SyntaxKind.PlusPlusToken?1:(v.default.isPostfixUnaryExpression(t)||v.default.isPrefixUnaryExpression(t))&&v.default.isIdentifier(t.operand)&&e.typeChecker.getSymbolAtLocation(t.operand)===n&&t.operator===v.default.SyntaxKind.MinusMinusToken?-1:void 0}(e,o,_);if(void 0===p)return;if(!r||!v.default.isBinaryExpression(r))return;if(r.operatorToken.kind===v.default.SyntaxKind.LessThanToken||r.operatorToken.kind===v.default.SyntaxKind.LessThanEqualsToken){if(p<0)return}else{if(r.operatorToken.kind!==v.default.SyntaxKind.GreaterThanToken&&r.operatorToken.kind!==v.default.SyntaxKind.GreaterThanEqualsToken)return;if(p>0)return}if(!T(e,r.right))return;if(function(e,t,n){return!0===v.default.FindAllReferences.Core.eachSymbolReferenceInFile(t,e.typeChecker,t.getSourceFile(),(e=>{const t=(0,h.skipUpwards)(e).parent;return!(!v.default.isAssignmentExpression(t)||(0,h.skipDownwards)(t.left)!==e)||!(!v.default.isUnaryExpressionWithWrite(t)||(0,h.skipDownwards)(t.operand)!==e)}),n)}(e,s,a))return;const f=i.default.list.make(),y=(0,l.transformIdentifierDefined)(e,s),[b,x]=e.capture((()=>(0,c.transformExpression)(e,u)));i.default.list.pushList(f,x);let[S,k]=e.capture((()=>(0,c.transformExpression)(e,r.right)));i.default.list.pushList(f,k);const C=i.default.number(p),w=(0,d.transformStatementList)(e,a,(0,m.getStatements)(a));return r.operatorToken.kind===v.default.SyntaxKind.LessThanToken?S=(0,g.offset)(S,-1):r.operatorToken.kind===v.default.SyntaxKind.GreaterThanToken&&(S=(0,g.offset)(S,1)),i.default.list.push(f,i.default.create(i.default.SyntaxKind.NumericForStatement,{id:y,start:b,end:S,step:C,statements:w})),f}(e,t);if(n)return n}return function(e,t){const{initializer:n,condition:r,incrementor:g,statement:h}=t,y=i.default.list.make(),b=i.default.list.make(),T=i.default.list.make(),C=n&&v.default.isVariableDeclarationList(n)?(0,f.getDeclaredVariables)(n):[],w=new Set,D=new Set;if(n&&v.default.isVariableDeclarationList(n))for(const r of C){const i=e.typeChecker.getSymbolAtLocation(r);(0,a.assert)(i),k(e,t,r)&&w.add(i),S(e,n,r)&&D.add(i)}if(n)if(v.default.isVariableDeclarationList(n)){(0,_.isVarDeclaration)(n)&&s.DiagnosticService.addDiagnostic(o.errors.noVar(t));for(const t of C){const n=e.typeChecker.getSymbolAtLocation(t);if((0,a.assert)(n),w.has(n))if(D.has(n))e.symbolToIdMap.set(n,i.default.tempId(t.getText()));else{const r=i.default.tempId(`${t.getText()}Copy`);e.symbolToIdMap.set(n,r)}}for(const t of n.declarations){const[n,r]=e.capture((()=>{const n=i.default.list.make(),[r,o]=e.capture((()=>(0,_.transformVariableDeclaration)(e,t)));return i.default.list.pushList(n,o),i.default.list.pushList(n,r),n}));i.default.list.pushList(y,r),i.default.list.pushList(y,n)}for(const t of C){const n=e.typeChecker.getSymbolAtLocation(t);if((0,a.assert)(n),w.has(n)){let r;if(D.has(n))r=e.symbolToIdMap.get(n),(0,a.assert)(r);else{r=i.default.tempId(t.getText());const o=e.symbolToIdMap.get(n);(0,a.assert)(o),i.default.list.push(y,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:o}))}e.symbolToIdMap.delete(n);const o=(0,l.transformIdentifierDefined)(e,t);i.default.list.push(b,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:o,right:r})),i.default.list.push(T,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:o}))}}}else{const[t,r]=e.capture((()=>(0,u.transformExpressionStatementInner)(e,n)));i.default.list.pushList(y,r),i.default.list.pushList(y,t)}if(g){const t=i.default.tempId("shouldIncrement");i.default.list.push(y,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:t,right:i.default.bool(!1)}));const n=i.default.list.make(),[r,o]=e.capture((()=>(0,u.transformExpressionStatementInner)(e,g)));i.default.list.pushList(n,o),i.default.list.pushList(n,r),i.default.list.push(b,i.default.create(i.default.SyntaxKind.IfStatement,{condition:t,statements:n,elseBody:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:i.default.bool(!0)}))}))}let[E,P]=e.capture((()=>r?(0,p.createTruthinessChecks)(e,(0,c.transformExpression)(e,r),r):i.default.bool(!0)));return i.default.list.pushList(b,P),i.default.list.isEmpty(b)||(r&&i.default.list.push(b,i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.unary("not",E),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()})),E=i.default.bool(!0)),i.default.list.pushList(b,(0,d.transformStatementList)(e,h,(0,m.getStatements)(h))),i.default.list.isNonEmpty(b)&&i.default.list.isNonEmpty(T)&&x(b,b.head,T),b.tail&&i.default.isFinalStatement(b.tail.value)||i.default.list.pushList(b,T),i.default.list.push(y,i.default.create(i.default.SyntaxKind.WhileStatement,{condition:E,statements:b})),y.head===y.tail?y:i.default.list.make(i.default.create(i.default.SyntaxKind.DoStatement,{statements:y}))}(e,t)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(6848),u=n(7858),_=n(8007),d=n(8043),p=n(410),f=n(6117),m=n(1441),g=n(9582),h=n(6219),y=n(1915),v=r(n(2137));function b(e,t){i.default.list.isNonEmpty(e.statements)&&x(e.statements,e.statements.head,t),i.default.list.isList(e.elseBody)?i.default.list.isNonEmpty(e.elseBody)&&x(e.elseBody,e.elseBody.head,t):b(e.elseBody,t)}function x(e,t,n){(0,a.assert)(!i.default.list.isEmpty(e));const r=t.value;if(i.default.isContinueStatement(r)){const o=i.default.list.clone(n);i.default.list.forEach(o,(e=>e.parent=r.parent)),t.prev?t.prev.next=o.head:t===e.head&&(e.head=o.head),t.prev=o.tail,o.tail.next=t}i.default.isDoStatement(r)?i.default.list.isNonEmpty(r.statements)&&x(r.statements,r.statements.head,n):i.default.isIfStatement(r)&&b(r,n),t.next&&x(e,t.next,n)}function S(e,t,n){return!v.default.FindAllReferences.Core.isSymbolReferencedInFile(n,e.typeChecker,n.getSourceFile(),t)}function k(e,t,n){return v.default.FindAllReferences.Core.eachSymbolReferenceInFile(n,e.typeChecker,n.getSourceFile(),(e=>{if(v.default.isWriteAccess(e)&&(!t.incrementor||!(0,h.isAncestorOf)(t.incrementor,e)))return!0;const n=(0,h.getAncestor)(e,(e=>e===t||v.default.isFunctionLike(e)));return!(!n||n===t)||void 0}),t)}function T(e,t){if(v.default.isNumericLiteral(t))return Number.isInteger(Number(t.getText()));if(v.default.isBinaryExpression(t)){if(t.operatorToken.kind===v.default.SyntaxKind.PlusToken||t.operatorToken.kind===v.default.SyntaxKind.MinusToken||t.operatorToken.kind===v.default.SyntaxKind.AsteriskToken||t.operatorToken.kind===v.default.SyntaxKind.AsteriskAsteriskToken)return T(e,t.left)&&T(e,t.right)}else if(v.default.isPrefixUnaryExpression(t)){if(t.operator===v.default.SyntaxKind.PlusToken||t.operator===v.default.SyntaxKind.MinusToken)return T(e,t.operand)}else{if(function(e,t){if(v.default.isCallExpression(t)){const n=e.typeChecker.getNonOptionalType(e.getType(t.expression)),r=(0,y.getFirstDefinedSymbol)(e,n);if(r&&e.services.macroManager.getPropertyCallMacro(r)&&"size"===r.name)return!0}return!1}(e,t))return!0;if((0,y.isDefinitelyType)(e.getType(t),(e=>e.isNumberLiteral()&&Number.isInteger(e.value))))return!0}return!1}},2797:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformFunctionDeclaration=function(e,t){if(!t.body)return i.default.list.make();const n=p.default.hasSyntacticModifier(t,p.default.ModifierFlags.ExportDefault);(0,a.assert)(t.name||n),t.name&&(0,_.validateIdentifier)(e,t.name);const r=t.name?(0,c.transformIdentifierDefined)(e,t.name):i.default.id("default");let{statements:f,parameters:m,hasDotDotDot:g}=(0,l.transformParameters)(e,t);i.default.list.pushList(f,(0,u.transformStatementList)(e,t.body,t.body.statements));let h=n;if(t.name){const n=e.typeChecker.getSymbolAtLocation(t.name);(0,a.assert)(n),h=!0!==e.isHoisted.get(n)}const y=p.default.hasSyntacticModifier(t,p.default.ModifierFlags.Async);if(t.asteriskToken&&(y&&s.DiagnosticService.addDiagnostic(o.errors.noAsyncGeneratorFunctions(t)),f=(0,d.wrapStatementsAsGenerator)(e,t,f)),y){const n=i.default.call(e.TS(t,"async"),[i.default.create(i.default.SyntaxKind.FunctionExpression,{hasDotDotDot:g,parameters:m,statements:f})]);return h?i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:n})):i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:n}))}return i.default.list.make(i.default.create(i.default.SyntaxKind.FunctionDeclaration,{localize:h,name:r,statements:f,parameters:m,hasDotDotDot:g}))};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6848),l=n(7937),u=n(8043),_=n(837),d=n(6442),p=r(n(2137))},9770:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformIfStatementInner=u,t.transformIfStatement=function(e,t){return i.default.list.make(u(e,t))};const i=r(n(9861)),o=n(6671),a=n(8043),s=n(410),c=n(1441),l=r(n(2137));function u(e,t){const n=(0,s.createTruthinessChecks)(e,(0,o.transformExpression)(e,t.expression),t.expression),r=(0,a.transformStatementList)(e,t.thenStatement,(0,c.getStatements)(t.thenStatement)),_=t.elseStatement;let d;if(void 0===_)d=i.default.list.make();else if(l.default.isIfStatement(_)){const[t,n]=e.capture((()=>u(e,_)));if(i.default.list.isEmpty(n))d=t;else{const e=i.default.list.make();i.default.list.pushList(e,n),i.default.list.push(e,t),d=e}}else d=(0,a.transformStatementList)(e,_,(0,c.getStatements)(_));return i.default.create(i.default.SyntaxKind.IfStatement,{condition:n,statements:r,elseBody:d})}},8677:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformImportDeclaration=function(e,t){const n=t.importClause;if(n&&n.isTypeOnly)return i.default.list.make();const r=i.default.list.make();(0,a.assert)(p.default.isStringLiteral(t.moduleSpecifier));const f=new o.Lazy((()=>(0,l.createImportExpression)(e,t.getSourceFile(),t.moduleSpecifier)));if(n){const o=function(e,t){let n=0;if(t.name){const r=(0,u.getOriginalSymbolOfNode)(e.typeChecker,t.name);!e.resolver.isReferencedAliasDeclaration(t)||r&&!(0,d.isSymbolOfValue)(r)||n++}if(t.namedBindings)if(p.default.isNamespaceImport(t.namedBindings))n++;else for(const r of t.namedBindings.elements){const t=(0,u.getOriginalSymbolOfNode)(e.typeChecker,r.name);!e.resolver.isReferencedAliasDeclaration(r)||t&&!(0,d.isSymbolOfValue)(t)||n++}return n}(e,n);if(o>1){const e=t.moduleSpecifier.text.split("/"),n=i.default.tempId((0,c.cleanModuleName)(e[e.length-1]));i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:n,right:f.get()})),f.set(n)}const a=n.name;if(a){const o=(0,u.getOriginalSymbolOfNode)(e.typeChecker,a);if(e.resolver.isReferencedAliasDeclaration(n)&&(!o||(0,d.isSymbolOfValue)(o))){const n=(0,_.getSourceFileFromModuleSpecifier)(e,t.moduleSpecifier),o=n&&e.typeChecker.getSymbolAtLocation(n);o&&e.getModuleExports(o).some((e=>"default"===e.name))?i.default.list.pushList(r,e.capturePrereqs((()=>(0,s.transformVariable)(e,a,i.default.property(f.get(),"default"))))):i.default.list.pushList(r,e.capturePrereqs((()=>(0,s.transformVariable)(e,a,f.get()))))}}const l=n.namedBindings;if(l)if(p.default.isNamespaceImport(l))i.default.list.pushList(r,e.capturePrereqs((()=>(0,s.transformVariable)(e,l.name,f.get()))));else for(const t of l.elements){const n=(0,u.getOriginalSymbolOfNode)(e.typeChecker,t.name);!e.resolver.isReferencedAliasDeclaration(t)||n&&!(0,d.isSymbolOfValue)(n)||i.default.list.pushList(r,e.capturePrereqs((()=>{var n;return(0,s.transformVariable)(e,t.name,i.default.property(f.get(),(null!==(n=t.propertyName)&&void 0!==n?n:t.name).text))})))}}if(!n||e.compilerOptions.verbatimModuleSyntax&&i.default.list.isEmpty(r)){const e=f.get();i.default.isCallExpression(e)&&i.default.list.push(r,i.default.create(i.default.SyntaxKind.CallStatement,{expression:e}))}return r};const i=r(n(9861)),o=n(1164),a=n(2287),s=n(8007),c=n(6073),l=n(3842),u=n(9525),_=n(4164),d=n(1205),p=r(n(2137))},4789:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformImportEqualsDeclaration=function(e,t){const{moduleReference:n}=t;if(u.default.isExternalModuleReference(n)){(0,o.assert)(u.default.isStringLiteral(n.expression));const r=(0,c.createImportExpression)(e,t.getSourceFile(),n.expression),s=i.default.list.make(),_=e.typeChecker.getSymbolAtLocation(t.name);return(0,o.assert)(_),(0,l.isSymbolOfValue)(u.default.skipAlias(_,e.typeChecker))&&i.default.list.pushList(s,e.capturePrereqs((()=>(0,a.transformVariable)(e,t.name,r)))),e.compilerOptions.verbatimModuleSyntax&&i.default.list.isEmpty(s)&&i.default.isCallExpression(r)&&i.default.list.push(s,i.default.create(i.default.SyntaxKind.CallStatement,{expression:r})),s}return e.capturePrereqs((()=>(0,a.transformVariable)(e,t.name,(0,s.transformEntityName)(e,n))))};const i=r(n(9861)),o=n(2287),a=n(8007),s=n(2583),c=n(3842),l=n(1205),u=r(n(2137))},6389:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformModuleDeclaration=function(e,t){if(!g.default.isInstantiatedModule(t,!1))return i.default.list.make();const n=e.typeChecker.getSymbolAtLocation(t.name);return n&&(0,_.hasMultipleDefinitions)(n,(e=>function(e){const t=g.default.canHaveModifiers(e)?g.default.getModifiers(e):void 0;return!(null==t?void 0:t.some((e=>e.kind===g.default.SyntaxKind.DeclareKeyword)))&&(!(!g.default.isModuleDeclaration(e)||!g.default.isInstantiatedModule(e,!1))||(!(!g.default.isFunctionDeclaration(e)||!e.body)||!!g.default.isClassDeclaration(e)))}(e)))?(c.DiagnosticService.addDiagnosticWithCache(n,o.errors.noNamespaceMerging(t),e.multiTransformState.isReportedByMultipleDefinitionsCache),i.default.list.make()):((0,a.assert)(!g.default.isStringLiteral(t.name)),(0,a.assert)(t.body&&!g.default.isIdentifier(t.body)),y(e,t.name,t.body))};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(2991),c=n(4502),l=n(6848),u=n(8043),_=n(1871),d=n(3527),p=n(1205),f=n(6219),m=n(837),g=r(n(2137));function h(e){var t;for(const n of null!==(t=e.getDeclarations())&&void 0!==t?t:[]){const e=(0,f.getAncestor)(n,g.default.isStatement);if(e){const t=g.default.canHaveModifiers(e)?g.default.getModifiers(e):void 0;if(g.default.isFunctionDeclaration(e)&&!e.body)continue;if(g.default.isTypeAliasDeclaration(e))continue;if(g.default.isInterfaceDeclaration(e))continue;if(null==t?void 0:t.some((e=>e.kind===g.default.SyntaxKind.DeclareKeyword)))continue;return e}}}function y(e,t,n){const r=e.typeChecker.getSymbolAtLocation(t);(0,a.assert)(r),(0,m.validateIdentifier)(e,t);const o=(0,l.transformIdentifierDefined)(e,t),c=i.default.list.make(),_=i.default.list.make(),f=i.default.tempId("container");e.setModuleIdBySymbol(r,f),e.isHoisted.get(r)?i.default.list.push(c,i.default.create(i.default.SyntaxKind.Assignment,{left:o,operator:"=",right:i.default.map()})):i.default.list.push(c,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:o,right:i.default.map()}));const v=e.getModuleExports(r);if(v.length>0&&i.default.list.push(_,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:f,right:o})),g.default.isModuleBlock(n)){const t=new Map;if(v.length>0)for(const n of v){const r=g.default.skipAlias(n,e.typeChecker);if((0,p.isSymbolOfValue)(r)&&!(0,d.isSymbolMutable)(e,r)){const e=h(n);e&&(0,s.getOrSetDefault)(t,e,(()=>[])).push(n.name)}}i.default.list.pushList(_,(0,u.transformStatementList)(e,n,n.statements,{id:f,mapping:t}))}else i.default.list.pushList(_,y(e,n.name,n.body)),i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(f,n.name.text),operator:"=",right:(0,l.transformIdentifierDefined)(e,n.name)}));return i.default.list.push(c,i.default.create(i.default.SyntaxKind.DoStatement,{statements:_})),c}},5807:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformReturnStatementInner=d,t.transformReturnStatement=function(e,t){return t.expression?d(e,t.expression):(0,c.isReturnBlockedByTryStatement)(t)?(e.markTryUses("usesReturn"),i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.list.make(e.TS(t,"TRY_RETURN"),i.default.array())}))):i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.nil()}))};const i=r(n(9861)),o=n(3115),a=n(6671),s=n(7034),c=n(965),l=n(6219),u=n(1915),_=r(n(2137));function d(e,t){const n=i.default.list.make();let r;if(_.default.isCallExpression(t)&&function(e,t){if(_.default.isCallExpression(t)){const n=(0,u.getFirstDefinedSymbol)(e,e.getType(t.expression));if(n&&n===e.services.macroManager.getSymbolOrThrow(o.SYMBOL_NAMES.$tuple))return!0}return!1}(e,t)){const[o,a]=e.capture((()=>(0,s.ensureTransformOrder)(e,t.arguments)));i.default.list.pushList(n,a),r=i.default.list.make(...o)}else r=(0,a.transformExpression)(e,(0,l.skipDownwards)(t)),(0,u.isLuaTupleType)(e)(e.getType(t))&&!function(e,t,n){return i.default.isCall(n)&&(0,u.isLuaTupleType)(e)(e.typeChecker.getTypeAtLocation((0,l.skipDownwards)(t)))}(e,t,r)&&(r=i.default.isArray(r)?r.members:i.default.call(i.default.globals.unpack,[r]));return(0,c.isReturnBlockedByTryStatement)(t)?(e.markTryUses("usesReturn"),i.default.list.push(n,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.list.make(e.TS(t,"TRY_RETURN"),i.default.create(i.default.SyntaxKind.Array,{members:i.default.list.isList(r)?r:i.default.list.make(r)}))}))):i.default.list.push(n,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:r})),n}},4318:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformStatement=function(e,t){const n=F.default.canHaveModifiers(t)?F.default.getModifiers(t):void 0;if(null==n?void 0:n.some((e=>e.kind===F.default.SyntaxKind.DeclareKeyword)))return A();const r=O.get(t.kind);if(r)return r(e,t);(0,a.assert)(!1,`Unknown statement: ${(0,N.getKindName)(t.kind)}`)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(2852),l=n(3489),u=n(9015),_=n(254),d=n(299),p=n(9915),f=n(6602),m=n(9337),g=n(7858),h=n(5869),y=n(9430),v=n(2797),b=n(9770),x=n(8677),S=n(4789),k=n(6389),T=n(5807),C=n(9753),w=n(6518),D=n(3785),E=n(8007),P=n(3847),N=n(2036),F=r(n(2137)),A=()=>i.default.list.make(),I=e=>(t,n)=>(s.DiagnosticService.addDiagnostic(e(n)),A()),O=(M=[[F.default.SyntaxKind.InterfaceDeclaration,A],[F.default.SyntaxKind.TypeAliasDeclaration,A],[F.default.SyntaxKind.EmptyStatement,A],[F.default.SyntaxKind.ForInStatement,I(o.errors.noForInStatement)],[F.default.SyntaxKind.LabeledStatement,I(o.errors.noLabeledStatement)],[F.default.SyntaxKind.DebuggerStatement,I(o.errors.noDebuggerStatement)],[F.default.SyntaxKind.Block,c.transformBlock],[F.default.SyntaxKind.BreakStatement,l.transformBreakStatement],[F.default.SyntaxKind.ClassDeclaration,u.transformClassDeclaration],[F.default.SyntaxKind.ContinueStatement,_.transformContinueStatement],[F.default.SyntaxKind.DoStatement,d.transformDoStatement],[F.default.SyntaxKind.EnumDeclaration,p.transformEnumDeclaration],[F.default.SyntaxKind.ExportAssignment,f.transformExportAssignment],[F.default.SyntaxKind.ExportDeclaration,m.transformExportDeclaration],[F.default.SyntaxKind.ExpressionStatement,g.transformExpressionStatement],[F.default.SyntaxKind.ForOfStatement,h.transformForOfStatement],[F.default.SyntaxKind.ForStatement,y.transformForStatement],[F.default.SyntaxKind.FunctionDeclaration,v.transformFunctionDeclaration],[F.default.SyntaxKind.IfStatement,b.transformIfStatement],[F.default.SyntaxKind.ImportDeclaration,x.transformImportDeclaration],[F.default.SyntaxKind.ImportEqualsDeclaration,S.transformImportEqualsDeclaration],[F.default.SyntaxKind.ModuleDeclaration,k.transformModuleDeclaration],[F.default.SyntaxKind.ReturnStatement,T.transformReturnStatement],[F.default.SyntaxKind.SwitchStatement,C.transformSwitchStatement],[F.default.SyntaxKind.ThrowStatement,w.transformThrowStatement],[F.default.SyntaxKind.TryStatement,D.transformTryStatement],[F.default.SyntaxKind.VariableStatement,E.transformVariableStatement],[F.default.SyntaxKind.WhileStatement,P.transformWhileStatement]],new Map(M));var M},9753:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSwitchStatement=function(e,t){const n=e.pushToVarIfComplex((0,o.transformExpression)(e,t.expression),"exp"),r=i.default.tempId("fallthrough");let s=!1;const u=i.default.list.make();let _=!1;for(let o=0;o(0,o.transformExpression)(e,t)));s=i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:s});let l=i.default.binary(n,"==",s);if(a)if(i.default.list.isEmpty(c))l=i.default.binary(r,"or",l);else{const e=i.default.unary("not",r);i.default.list.push(c,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:l})),c=i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:e,statements:c,elseBody:i.default.list.make()})),l=r}return{condition:l,prereqStatements:c}}(e,t.expression,n,r,l),p=t.statements.filter((e=>!c.default.isEmptyStatement(e))),f=p[0],m=1===p.length&&c.default.isBlock(f)?(0,a.transformStatementList)(e,f,f.statements):(0,a.transformStatementList)(e,t,t.statements),g=void 0===m.tail||!i.default.isFinalStatement(m.tail.value);g&&u&&i.default.list.push(m,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:i.default.bool(!0)}));const h=i.default.list.make(),y=(0,s.createHoistDeclaration)(e,t);return y&&i.default.list.push(h,y),i.default.list.push(h,i.default.create(i.default.SyntaxKind.IfStatement,{condition:_,statements:m,elseBody:i.default.list.make()})),{canFallThroughFrom:g,prereqs:d,clauseStatements:h}}},6518:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformThrowStatement=function(e,t){const n=new Array;return void 0!==t.expression&&n.push((0,o.transformExpression)(e,t.expression)),i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.error,n)}))};const i=r(n(9861)),o=n(6671)},3785:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformTryStatement=function(e,t){const n=i.default.list.make(),r=i.default.tempId("exitType"),_=i.default.tempId("returns"),d=e.pushTryUsesStack();return i.default.list.push(n,function(e,t,n,r,c){const l=new Array;return l.push(i.default.create(i.default.SyntaxKind.FunctionExpression,{parameters:i.default.list.make(),hasDotDotDot:!1,statements:(0,s.transformStatementList)(e,t.tryBlock,t.tryBlock.statements)})),t.catchClause?l.push(function(e,t){const n=i.default.list.make(),r=i.default.list.make();return t.variableDeclaration&&i.default.list.push(n,(0,a.transformBindingName)(e,t.variableDeclaration.name,r)),i.default.list.pushList(r,(0,s.transformStatementList)(e,t.block,t.block.statements)),i.default.create(i.default.SyntaxKind.FunctionExpression,{parameters:n,hasDotDotDot:!1,statements:r})}(e,t.catchClause)):((0,o.assert)(t.finallyBlock),l.push(i.default.nil())),t.finallyBlock&&l.push(i.default.create(i.default.SyntaxKind.FunctionExpression,{parameters:i.default.list.make(),hasDotDotDot:!1,statements:(0,s.transformStatementList)(e,t.finallyBlock,t.finallyBlock.statements)})),c.usesReturn||c.usesBreak||c.usesContinue?i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.list.make(n,r),right:i.default.call(e.TS(t,"try"),l)}):i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(e.TS(t,"try"),l)})}(e,t,r,_,d)),e.popTryUsesStack(),i.default.list.pushList(n,function(e,t,n,r,o){const a=new Array;if(!o.usesReturn&&!o.usesBreak&&!o.usesContinue)return i.default.list.make();const s=(0,c.isReturnBlockedByTryStatement)(t.parent),_=(0,c.isBreakBlockedByTryStatement)(t.parent);if(o.usesReturn&&s&&e.markTryUses("usesReturn"),o.usesBreak&&_&&e.markTryUses("usesBreak"),o.usesContinue&&_&&e.markTryUses("usesContinue"),o.usesReturn)if(s){if(a.push({condition:l(e,t,n,"TRY_RETURN"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.list.make(n,r)}))}),_)return u(n,a)}else a.push({condition:l(e,t,n,"TRY_RETURN"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.call(i.default.globals.unpack,[r])}))});return(o.usesBreak||o.usesContinue)&&(_?a.push({statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:n}))}):(o.usesBreak&&a.push({condition:l(e,t,n,"TRY_BREAK"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{}))}),o.usesContinue&&a.push({condition:l(e,t,n,"TRY_CONTINUE"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ContinueStatement,{}))}))),u(n,a)}(e,t,r,_,d)),n};const i=r(n(9861)),o=n(2287),a=n(1822),s=n(8043),c=n(965);function l(e,t,n,r){return i.default.binary(n,"==",e.TS(t,r))}function u(e,t){(0,o.assert)(t.length>0);let n=i.default.create(i.default.SyntaxKind.IfStatement,{condition:e,statements:t[t.length-1].statements,elseBody:i.default.list.make()});for(let r=t.length-2;r>=0;r--)n=i.default.create(i.default.SyntaxKind.IfStatement,{condition:t[r].condition||e,statements:t[r].statements,elseBody:n});return i.default.list.make(n)}},8007:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformVariable=b,t.transformVariableDeclaration=S,t.isVarDeclaration=k,t.transformVariableDeclarationList=T,t.transformVariableStatement=function(e,t){return T(e,t.declarationList)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(2396),l=n(5235),u=n(6671),_=n(6848),d=n(1782),p=n(9254),f=n(4953),m=n(3527),g=n(1915),h=n(837),y=n(6837),v=r(n(2137));function b(e,t,n){(0,h.validateIdentifier)(e,t);const r=e.typeChecker.getSymbolAtLocation(t);if((0,a.assert)(r),(0,m.isSymbolMutable)(e,r)){const t=e.getModuleIdPropertyAccess(r);if(t)return n&&e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:n})),t}const o=(0,_.transformIdentifierDefined)(e,t);return(0,f.checkVariableHoist)(e,t,r),!0===e.isHoisted.get(r)?n&&e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:o,operator:"=",right:n})):e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:o,right:n})),o}function x(e,t,n){return e.capturePrereqs((()=>{const r=i.default.list.make(),u=e.capturePrereqs((()=>{for(const n of t.elements)if(v.default.isOmittedExpression(n))i.default.list.push(r,i.default.tempId());else{if(n.dotDotDotToken)return void s.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(n));if(v.default.isIdentifier(n.name)){(0,h.validateIdentifier)(e,n.name);const t=(0,_.transformIdentifierDefined)(e,n.name);i.default.list.push(r,t),n.initializer&&e.prereq((0,d.transformInitializer)(e,t,n.initializer))}else{const t=i.default.tempId("binding");i.default.list.push(r,t),n.initializer&&e.prereq((0,d.transformInitializer)(e,t,n.initializer)),v.default.isArrayBindingPattern(n.name)?(0,c.transformArrayBindingPattern)(e,n.name,t):(0,l.transformObjectBindingPattern)(e,n.name,t)}}}));(0,a.assert)(!i.default.list.isEmpty(r)),e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:n})),e.prereqList(u)}))}function S(e,t){const n=i.default.list.make();let r;t.initializer&&i.default.list.pushList(n,e.capturePrereqs((()=>r=(0,u.transformExpression)(e,t.initializer))));const o=t.name;if(v.default.isIdentifier(o))i.default.list.pushList(n,e.capturePrereqs((()=>b(e,o,r))));else{if((0,a.assert)(t.initializer&&r),0===o.elements.length)return i.default.isArray(r)&&i.default.list.isEmpty(r.members)||i.default.list.pushList(n,(0,y.wrapExpressionStatement)(r)),n;v.default.isArrayBindingPattern(o)?i.default.isCall(r)&&(0,g.isLuaTupleType)(e)(e.getType(t.initializer))&&!(0,p.arrayBindingPatternContainsHoists)(e,o)?i.default.list.pushList(n,x(e,o,r)):!i.default.isArray(r)||i.default.list.isEmpty(r.members)||(0,p.arrayBindingPatternContainsHoists)(e,o)?i.default.list.pushList(n,e.capturePrereqs((()=>(0,c.transformArrayBindingPattern)(e,o,e.pushToVar(r,"binding"))))):i.default.list.pushList(n,x(e,o,r.members)):i.default.list.pushList(n,e.capturePrereqs((()=>(0,l.transformObjectBindingPattern)(e,o,e.pushToVar(r,"binding")))))}return n}function k(e){return!(e.flags&v.default.NodeFlags.Const||e.flags&v.default.NodeFlags.Let)}function T(e,t){k(t)&&s.DiagnosticService.addDiagnostic(o.errors.noVar(t));const n=i.default.list.make();for(const r of t.declarations){const[t,o]=e.capture((()=>S(e,r)));i.default.list.pushList(n,o),i.default.list.pushList(n,t)}return n}},3847:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformWhileStatement=function(e,t){const n=i.default.list.make();let[r,l]=e.capture((()=>(0,s.createTruthinessChecks)(e,(0,o.transformExpression)(e,t.expression),t.expression)));return i.default.list.isEmpty(l)||(i.default.list.pushList(n,l),i.default.list.push(n,i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.unary("not",r),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()})),r=i.default.bool(!0)),i.default.list.pushList(n,(0,a.transformStatementList)(e,t.statement,(0,c.getStatements)(t.statement))),i.default.list.make(i.default.create(i.default.SyntaxKind.WhileStatement,{condition:r,statements:n}))};const i=r(n(9861)),o=n(6671),a=n(8043),s=n(410),c=n(1441)},2583:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformEntityName=function e(t,n){return c.default.isIdentifier(n)?((0,s.validateIdentifier)(t,n),(0,o.transformIdentifier)(t,n)):function(t,n){return i.default.property((0,a.convertToIndexableExpression)(e(t,n.left)),n.right.text)}(t,n)};const i=r(n(9861)),o=n(6848),a=n(6453),s=n(837),c=r(n(2137))},1782:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformInitializer=function(e,t,n){return i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(t,"==",i.default.nil()),elseBody:i.default.list.make(),statements:e.capturePrereqs((()=>{e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:(0,o.transformExpression)(e,n)}))}))})};const i=r(n(9861)),o=n(6671)},1993:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformInterpolatedStringPart=function(e){return i.default.create(i.default.SyntaxKind.InterpolatedStringPart,{text:(0,o.createStringFromLiteral)(e)})};const i=r(n(9861)),o=n(4397)},5741:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformLogical=function(e,t){if(t.operatorToken.kind===_.default.SyntaxKind.AmpersandAmpersandToken)return f(e,t,t.operatorToken.kind,"and",((t,n)=>(0,s.createTruthinessChecks)(e,t,n)));if(t.operatorToken.kind===_.default.SyntaxKind.BarBarToken)return f(e,t,t.operatorToken.kind,"or",((t,n)=>i.default.unary("not",(0,s.createTruthinessChecks)(e,t,n))));if(t.operatorToken.kind===_.default.SyntaxKind.QuestionQuestionToken){const n=e=>i.default.binary(e,"==",i.default.nil());if(!(0,u.isPossiblyType)(e.getType(t),(0,u.isBooleanLiteralType)(e,!1)))return f(e,t,t.operatorToken.kind,"or",n);const r=d(e,t,_.default.SyntaxKind.QuestionQuestionToken,!1),o=i.default.tempId("condition");return p(e,r,o,n),o}(0,o.assert)(!1,`Operator not implemented: ${(0,l.getKindName)(t.operatorToken.kind)}`)};const i=r(n(9861)),o=n(2287),a=n(6671),s=n(410),c=n(4160),l=n(2036),u=n(1915),_=r(n(2137));function d(e,t,n,r){return function(e,t){const n=new Array;for(;_.default.isBinaryExpression(e)&&e.operatorToken.kind===t;)n.unshift(e.right),e=e.left;return n.unshift(e),n}(t,n).map(((t,n,o)=>{const c=e.getType(t),[l,u]=e.capture((()=>(0,a.transformExpression)(e,t)));let _=!1;if(r){const e=np(e,t,n,r,o+1))),elseBody:i.default.list.make()}))}function f(e,t,n,r,o){const a=d(e,t,n,!0);if(function(e,t){for(let n=0;nl(e,t)))};const i=r(n(9861)),o=n(6671),a=n(7010),s=n(410),c=r(n(2137));function l(e,t){const n=t.operatorToken.kind;return n===c.default.SyntaxKind.QuestionQuestionEqualsToken?function(e,t,n){const r=(0,a.transformWritableExpression)(e,t,!0),[s,c]=e.capture((()=>(0,o.transformExpression)(e,n))),l=i.default.list.make();return i.default.list.pushList(l,c),i.default.list.push(l,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:s})),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(r,"==",i.default.nil()),statements:l,elseBody:i.default.list.make()})),r}(e,t.left,t.right):n===c.default.SyntaxKind.AmpersandAmpersandEqualsToken?function(e,t,n){const r=(0,a.transformWritableExpression)(e,t,!0),[c,l]=e.capture((()=>(0,o.transformExpression)(e,n))),u=e.pushToVar(r,"condition"),_=i.default.list.make();return i.default.list.pushList(_,l),i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:u,operator:"=",right:c})),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,s.createTruthinessChecks)(e,r,t),statements:_,elseBody:i.default.list.make()})),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:u})),r}(e,t.left,t.right):function(e,t,n){const r=(0,a.transformWritableExpression)(e,t,!0),[c,l]=e.capture((()=>(0,o.transformExpression)(e,n))),u=e.pushToVar(r,"condition"),_=i.default.list.make();return i.default.list.pushList(_,l),i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:u,operator:"=",right:c})),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.unary("not",(0,s.createTruthinessChecks)(e,r,t)),statements:_,elseBody:i.default.list.make()})),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:u})),r}(e,t.left,t.right)}},8111:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformMethodDeclaration=function(e,t,n){const r=i.default.list.make();if(!t.body)return i.default.list.make();if((0,a.assert)(t.name),f.default.isPrivateIdentifier(t.name))return s.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(t.name)),i.default.list.make();let{statements:m,parameters:g,hasDotDotDot:h}=(0,c.transformParameters)(e,t);i.default.list.pushList(m,(0,u.transformStatementList)(e,t.body,t.body.statements));let y=(0,l.transformPropertyName)(e,t.name);if(f.default.hasDecorators(t)||t.parameters.some((e=>f.default.hasDecorators(e)))){if(!i.default.isSimplePrimitive(y)){const e=i.default.tempId("key");i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:e,right:y})),y=e}e.setClassElementObjectKey(t,y)}const v=f.default.hasSyntacticModifier(t,f.default.ModifierFlags.Async);if(t.asteriskToken&&(v&&s.DiagnosticService.addDiagnostic(o.errors.noAsyncGeneratorFunctions(t)),m=(0,p.wrapStatementsAsGenerator)(e,t,m)),!v&&i.default.isStringLiteral(y)&&!i.default.isMap(n.value)&&i.default.isValidIdentifier(y.value))return(0,_.isMethod)(e,t)?(i.default.list.shift(g),i.default.list.push(r,i.default.create(i.default.SyntaxKind.MethodDeclaration,{expression:n.value,name:y.value,statements:m,parameters:g,hasDotDotDot:h}))):i.default.list.push(r,i.default.create(i.default.SyntaxKind.FunctionDeclaration,{name:i.default.property(n.value,y.value),localize:!1,statements:m,parameters:g,hasDotDotDot:h})),r;let b=i.default.create(i.default.SyntaxKind.FunctionExpression,{statements:m,parameters:g,hasDotDotDot:h});return v&&(b=i.default.call(e.TS(t,"async"),[b])),i.default.list.pushList(r,e.capturePrereqs((()=>(0,d.assignToMapPointer)(e,n,y,b)))),r};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(7937),l=n(5671),u=n(8043),_=n(833),d=n(274),p=n(6442),f=r(n(2137))},8087:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.flattenOptionalChain=w,t.transformOptionalChain=function(e,t){const{chain:n,expression:r}=w(e,t);return F(e,n,(0,l.transformExpression)(e,r))};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(4698),c=n(8010),l=n(6671),u=n(8685),_=n(8576),d=n(6453),p=n(7034),f=n(833),m=n(6409),g=n(6219),h=n(1915),y=n(1511),v=r(n(2137));var b;function x(e,t){return{node:t,kind:b.PropertyAccess,optional:void 0!==t.questionDotToken,type:e.getType(t.expression),name:t.name.text}}function S(e,t){return{node:t,kind:b.ElementAccess,optional:void 0!==t.questionDotToken,type:e.getType(t.expression),expression:t.argumentExpression}}function k(e,t){return{node:t,kind:b.Call,optional:void 0!==t.questionDotToken,type:e.getType(t.expression),args:t.arguments}}function T(e,t,n){return{node:t,expression:n,kind:b.PropertyCall,optional:void 0!==n.questionDotToken,type:e.getType(t.expression),name:n.name.text,callType:e.getType(t),callOptional:void 0!==t.questionDotToken,args:t.arguments}}function C(e,t,n){return{node:t,expression:n,kind:b.ElementCall,optional:void 0!==n.questionDotToken,type:e.getType(n),argumentExpression:n.argumentExpression,callType:e.getType(t),callOptional:void 0!==t.questionDotToken,args:t.arguments}}function w(e,t){const n=new Array;for(;;)if(v.default.isPropertyAccessExpression(t))n.unshift(x(e,t)),t=t.expression;else if(v.default.isElementAccessExpression(t))n.unshift(S(e,t)),t=t.expression;else{if(!v.default.isCallExpression(t))break;{const r=(0,g.skipDownwards)(t.expression);v.default.isPropertyAccessExpression(r)?(n.unshift(T(e,t,r)),t=r.expression):v.default.isElementAccessExpression(r)?(n.unshift(C(e,t,r)),t=r.expression):(n.unshift(k(e,t)),t=r)}}return{chain:n,expression:t}}function D(e,t,n){return n.kind===b.PropertyAccess?(0,u.transformPropertyAccessExpressionInner)(e,n.node,t,n.name):n.kind===b.ElementAccess?(0,c.transformElementAccessExpressionInner)(e,n.node,t,n.expression):n.kind===b.Call?(0,s.transformCallExpressionInner)(e,n.node,t,n.args):n.kind===b.PropertyCall?(0,s.transformPropertyCallExpressionInner)(e,n.node,n.expression,t,n.name,n.args):(0,s.transformElementCallExpressionInner)(e,n.node,n.expression,t,n.argumentExpression,n.args)}function E(e,t,n,r){return void 0===t?t=e.pushToVar(n,r.parent&&v.default.isVariableDeclaration(r.parent)&&v.default.isIdentifier(r.parent.name)?r.parent.name.text:"result"):t!==n&&e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:n})),t}function P(e,t){return i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(e,"~=",i.default.nil()),statements:t,elseBody:i.default.list.make()})}function N(e){return e.kind===b.PropertyCall||e.kind===b.ElementCall}function F(e,t,n,r,s=0){if(s>=t.length)return n;const c=t[s];if(c.optional||N(c)&&c.callOptional){let u,g=!1,x=!1;if(N(c)&&(g=(0,f.isMethod)(e,c.expression),x=v.default.isSuperProperty(c.expression),c.callOptional&&g&&!x&&(u=e.pushToVar(n,"self"),n=u),c.optional&&(r=E(e,r,n,t[t.length-1].node),n=r),c.callOptional))if(c.kind===b.PropertyCall)n=i.default.property((0,d.convertToIndexableExpression)(n),c.name);else{const t=e.getType(c.expression.expression);n=i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,d.convertToIndexableExpression)(n),index:(0,_.addOneIfArrayType)(e,t,(0,l.transformExpression)(e,c.argumentExpression))})}const[S,k]=e.capture((()=>{r=E(e,r,n,t[t.length-1].node);const[l,_]=e.capture((()=>{let n;if(N(c)&&c.callOptional){const t=e.typeChecker.getNonOptionalType(e.getType(c.node.expression)),s=(0,h.getFirstDefinedSymbol)(e,t);if(s&&e.services.macroManager.getPropertyCallMacro(s))return a.DiagnosticService.addDiagnostic(o.errors.noOptionalMacroCall(c.node)),i.default.none();const l=(0,p.ensureTransformOrder)(e,c.args);g&&(x?l.unshift(i.default.globals.self):l.unshift(u)),n=(0,y.wrapReturnIfLuaTuple)(e,c.node,i.default.call(r,l))}else n=D(e,r,c);return F(e,t,n,r,s+1)})),d=!i.default.isNone(l)&&!(0,m.isUsedAsStatement)(c.node);return r!==l&&d?i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:l})):i.default.isCall(l)&&i.default.list.push(_,i.default.create(i.default.SyntaxKind.CallStatement,{expression:l})),e.prereq(P(r,_)),d?r:i.default.none()}));return N(c)&&c.optional&&c.callOptional?e.prereq(P(r,k)):e.prereqList(k),S}return F(e,t,D(e,n,c),r,s+1)}!function(e){e[e.PropertyAccess=0]="PropertyAccess",e[e.ElementAccess=1]="ElementAccess",e[e.Call=2]="Call",e[e.PropertyCall=3]="PropertyCall",e[e.ElementCall=4]="ElementCall"}(b||(b={}))},7937:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformParameters=function(e,t){const n=i.default.list.make(),r=i.default.list.make();let o=!1;(0,_.isMethod)(e,t)&&i.default.list.push(n,i.default.globals.self);for(const a of t.parameters){if(p.default.isThisIdentifier(a.name))continue;if(a.dotDotDotToken&&p.default.isArrayBindingPattern(a.name)){const t=e.capturePrereqs((()=>f(e,n,a.name)));i.default.list.pushList(r,t);continue}let t;if(p.default.isIdentifier(a.name)?(t=(0,l.transformIdentifierDefined)(e,a.name),(0,d.validateIdentifier)(e,a.name)):t=i.default.tempId("param"),a.dotDotDotToken?(o=!0,i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:t,right:i.default.create(i.default.SyntaxKind.Array,{members:i.default.list.make(i.default.create(i.default.SyntaxKind.VarArgsLiteral,{}))})}))):i.default.list.push(n,t),a.initializer&&i.default.list.push(r,(0,u.transformInitializer)(e,t,a.initializer)),!p.default.isIdentifier(a.name)){const n=a.name;p.default.isArrayBindingPattern(n)?i.default.list.pushList(r,e.capturePrereqs((()=>(0,s.transformArrayBindingPattern)(e,n,t)))):i.default.list.pushList(r,e.capturePrereqs((()=>(0,c.transformObjectBindingPattern)(e,n,t))))}}return{parameters:n,statements:r,hasDotDotDot:o}};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(2396),c=n(5235),l=n(6848),u=n(1782),_=n(833),d=n(837),p=r(n(2137));function f(e,t,n){for(const r of n.elements)if(p.default.isOmittedExpression(r))i.default.list.push(t,i.default.tempId());else{if(r.dotDotDotToken)return void a.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(r));const n=r.name;if(p.default.isIdentifier(n)){const o=(0,l.transformIdentifierDefined)(e,n);(0,d.validateIdentifier)(e,n),i.default.list.push(t,o),r.initializer&&e.prereq((0,u.transformInitializer)(e,o,r.initializer))}else{const o=i.default.tempId("param");i.default.list.push(t,o),r.initializer&&e.prereq((0,u.transformInitializer)(e,o,r.initializer)),p.default.isArrayBindingPattern(n)?(0,s.transformArrayBindingPattern)(e,n,o):(0,c.transformObjectBindingPattern)(e,n,o)}}}},5671:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPropertyName=function(e,t){return a.default.isIdentifier(t)?i.default.string(t.text):(0,o.transformExpression)(e,a.default.isComputedPropertyName(t)?t.expression:t)};const i=r(n(9861)),o=n(6671),a=r(n(2137))},8228:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSourceFile=function(e,t){const n=e.typeChecker.getSymbolAtLocation(t);(0,s.assert)(n),e.setModuleIdBySymbol(n,i.default.globals.exports);const r=(0,l.transformStatementList)(e,t,t.statements,void 0);!function(e,t,n,r){const o=function(e,t){const n=new Set;for(const r of t.statements)if(f.default.isExportDeclaration(r)&&r.moduleSpecifier)if(r.exportClause){if(f.default.isNamespaceExport(r.exportClause)){const t=e.typeChecker.getSymbolAtLocation(r.exportClause.name);t&&n.add(t)}}else{const t=(0,u.getOriginalSymbolOfNode)(e.typeChecker,r.moduleSpecifier);t&&e.getModuleExports(t).forEach((e=>n.add(e)))}return n}(e,t);let a=e.hasExportFrom;const s=new Array;if(!e.hasExportEquals)for(const t of e.getModuleExports(n)){if(o.has(t))continue;if(t.flags&f.default.SymbolFlags.Prototype)continue;if(g(t))continue;const n=f.default.skipAlias(t,e.typeChecker);(0,d.isSymbolOfValue)(n)&&((0,_.isSymbolMutable)(e,n)?a=!0:h(t)||s.push(m(e,t)))}if(e.hasExportEquals){const e=t.statements[t.statements.length-1];f.default.isExportAssignment(e)&&e.isExportEquals||i.default.list.push(r,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.globals.exports}))}else if(a){i.default.list.unshift(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.globals.exports,right:i.default.map()}));for(const[e,t]of s)i.default.list.push(r,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(i.default.globals.exports,e),operator:"=",right:t}));i.default.list.push(r,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.globals.exports}))}else if(s.length>0){const e=i.default.list.make();for(const[t,n]of s)i.default.list.push(e,i.default.create(i.default.SyntaxKind.MapField,{index:i.default.string(t),value:n}));i.default.list.push(r,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.create(i.default.SyntaxKind.Map,{fields:e})}))}}(e,t,n,r);const c=function(e){for(;e&&i.default.isComment(e.value);)e=e.prev;return e}(r.tail);if(!c||!i.default.isReturnStatement(c.value)){const n=e.pathTranslator.getOutputPath(t.fileName);e.rojoResolver.getRbxTypeFromFilePath(n)===o.RbxType.ModuleScript&&i.default.list.push(r,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.nil()}))}const p=i.default.list.make();i.default.list.push(p,i.default.comment(` Compiled with roblox-ts v${a.COMPILER_VERSION}`)),e.usesRuntimeLib&&i.default.list.push(p,e.createRuntimeLibImport(t));const y=i.default.list.make();for(;r.head&&i.default.isComment(r.head.value)&&r.head.value.text.startsWith("!");)i.default.list.push(y,i.default.list.shift(r));return i.default.list.unshiftList(r,p),i.default.list.unshiftList(r,y),r};const i=r(n(9861)),o=n(1979),a=n(6258),s=n(2287),c=n(6848),l=n(8043),u=n(9525),_=n(3527),d=n(1205),p=n(6219),f=r(n(2137));function m(e,t){var n,r;const o=null===(n=t.getDeclarations())||void 0===n?void 0:n[0];if(o&&f.default.isExportSpecifier(o))return[o.name.text,(0,c.transformIdentifierDefined)(e,null!==(r=o.propertyName)&&void 0!==r?r:o.name)];{let e=t.name;return"default"===t.name&&o&&(f.default.isFunctionDeclaration(o)||f.default.isClassDeclaration(o))&&o.name&&(e=o.name.text),[t.name,i.default.id(e)]}}function g(e){if(e.declarations)for(const t of e.declarations)if(f.default.isExportSpecifier(t)){const e=t.parent.parent;if(f.default.isExportDeclaration(e)&&e.moduleSpecifier)return!0}return!1}function h(e){var t,n;return null!==(n=null===(t=e.declarations)||void 0===t?void 0:t.every((e=>{const t=(0,p.getAncestor)(e,f.default.isStatement),n=t&&f.default.canHaveModifiers(t)?f.default.getModifiers(t):void 0;return null==n?void 0:n.some((e=>e.kind===f.default.SyntaxKind.DeclareKeyword))})))&&void 0!==n&&n}},8043:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformStatementList=function(e,t,n,r){var c;const l=i.default.list.make();for(const t of n){const[n,s]=e.capture((()=>(0,o.transformStatement)(e,t)));!0!==e.compilerOptions.removeComments&&i.default.list.pushList(l,e.getLeadingComments(t));const u=(0,a.createHoistDeclaration)(e,t);u&&i.default.list.push(l,u),i.default.list.pushList(l,s),i.default.list.pushList(l,n);const _=null===(c=n.tail)||void 0===c?void 0:c.value;if(_&&i.default.isFinalStatement(_))break;if(r){const e=r.id,n=r.mapping.get(t);if(void 0!==n)for(const t of n)i.default.list.push(l,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(e,t),operator:"=",right:i.default.id(t)}))}}if(!0!==e.compilerOptions.removeComments){const r=function(e,t){if(t.length>0){const e=t[t.length-1],n=e.parent.getLastToken();if(n&&!s.default.isNodeDescendantOf(n,e))return n}else if(e)return e.getLastToken()}(t,n);r&&i.default.list.pushList(l,e.getLeadingComments(r))}return l};const i=r(n(9861)),o=n(4318),a=n(6749),s=r(n(2137))},7010:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformWritableExpression=f,t.transformWritableAssignment=function(e,t,n,r=!1,o=!1){const a=f(e,t,r),[s,l]=e.capture((()=>(0,c.transformExpression)(e,n))),u=!o||i.default.list.isEmpty(l)?a:e.pushToVar(a,"readable");return e.prereqList(l),{writable:a,readable:u,value:s}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(8576),u=n(6453),_=n(7034),d=n(6219),p=r(n(2137));function f(e,t,n){if(p.default.isPrototypeAccess(t)&&s.DiagnosticService.addDiagnostic(o.errors.noPrototype(t)),p.default.isPropertyAccessExpression(t)){const r=(0,c.transformExpression)(e,t.expression);return i.default.property(n?e.pushToVarIfNonId(r,"exp"):(0,u.convertToIndexableExpression)(r),t.name.text)}if(p.default.isElementAccessExpression(t)){const[r,o]=(0,_.ensureTransformOrder)(e,[t.expression,t.argumentExpression]),a=(0,l.addOneIfArrayType)(e,e.getType(t.expression),o);return i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n?e.pushToVarIfNonId(r,"exp"):(0,u.convertToIndexableExpression)(r),index:n?e.pushToVarIfComplex(a,"index"):a})}{const n=(0,c.transformExpression)(e,(0,d.skipDownwards)(t));return(0,a.assert)(i.default.isWritableExpression(n)),n}}},226:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isBlockLike=function(e){return e.kind===i.default.SyntaxKind.SourceFile||e.kind===i.default.SyntaxKind.Block||e.kind===i.default.SyntaxKind.ModuleBlock||e.kind===i.default.SyntaxKind.CaseClause||e.kind===i.default.SyntaxKind.DefaultClause},t.isUnaryAssignmentOperator=function(e){return e===i.default.SyntaxKind.PlusPlusToken||e===i.default.SyntaxKind.MinusMinusToken},t.isTemplateLiteralType=function(e){return"texts"in e&&"types"in e&&!!(e.flags&i.default.TypeFlags.TemplateLiteral)},t.isNamespace=function(e){return i.default.isModuleDeclaration(e)&&!!(e.flags&i.default.NodeFlags.Namespace)};const i=r(n(2137))},5949:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.addIndexDiagnostics=function(e,t,n){const r=(0,l.getFirstDefinedSymbol)(e,n);(r&&e.services.macroManager.getPropertyCallMacro(r)||!(0,s.isValidMethodIndexWithoutCall)(e,(0,c.skipUpwards)(t))&&(0,a.isMethod)(e,t))&&o.DiagnosticService.addDiagnostic(i.errors.noIndexWithoutCall(t)),u.default.isPrototypeAccess(t)&&o.DiagnosticService.addDiagnostic(i.errors.noPrototype(t))};const i=n(7370),o=n(4502),a=n(833),s=n(7011),c=n(6219),l=n(1915),u=r(n(2137))},8576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addOneIfArrayType=function(e,t,n){return(0,i.isDefinitelyType)(t,(0,i.isArrayType)(e),i.isUndefinedType)?(0,r.offset)(n,1):n};const r=n(9582),i=n(1915)},9254:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.arrayBindingPatternContainsHoists=function(e,t){for(const n of t.elements)if(o.default.isBindingElement(n)&&o.default.isIdentifier(n.name)){const t=e.typeChecker.getSymbolAtLocation(n.name);if(t&&((0,i.checkVariableHoist)(e,n.name,t),e.isHoisted.get(t)))return!0}return!1};const i=n(4953),o=r(n(2137))},9225:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.assertNever=function(e,t){!function(e){const t=u(JSON.parse((0,i.spawnSync)("npm ls typescript --json").stdout.toString()));a.LogService.fatal(o.default.red(`Exhaustive assertion failed! ${e}`)+o.default.yellow("\nThis is usually caused by a TypeScript version mismatch.")+o.default.yellow("\nMake sure that all TS versions in your project are the same.")+o.default.yellow("\nYou can check the list of installed versions with `npm list typescript`")+(t?o.default.yellow(`\nTry running \`npm install typescript@=${t}\``):""))}(`${t}, value was ${"object"==typeof e&&"kind"in e&&c.default.isNode(e)?`a TS node of kind ${(0,s.getKindName)(e.kind)}`:l.default.inspect(e)}`)};const i=n(651),o=r(n(1391)),a=n(761),s=n(2036),c=r(n(2137)),l=r(n(651));function u(e){if("roblox-ts"===e.name&&e.dependencies.typescript)return e.dependencies.typescript.version;for(const[,t]of Object.entries(e.dependencies)){const e=u(t);if(e)return e}}},6614:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSimpleAssignmentOperator=function(e,t,n){return t===s.default.SyntaxKind.PlusEqualsToken?(0,a.isDefinitelyType)(e,a.isStringType)||(0,a.isDefinitelyType)(n,a.isStringType)?"..=":"+=":c.get(t)},t.createAssignmentExpression=l,t.createCompoundAssignmentStatement=function(e,t,n,r,a,s,c,l){return i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:(0,o.createBinaryFromOperator)(e,t,a,r,s,c,l)})},t.createCompoundAssignmentExpression=function(e,t,n,r,i,a,s,c){return l(e,n,"=",(0,o.createBinaryFromOperator)(e,t,i,r,a,s,c))};const i=r(n(9861)),o=n(3262),a=n(1915),s=r(n(2137)),c=new Map([[s.default.SyntaxKind.MinusEqualsToken,"-="],[s.default.SyntaxKind.AsteriskEqualsToken,"*="],[s.default.SyntaxKind.SlashEqualsToken,"/="],[s.default.SyntaxKind.AsteriskAsteriskEqualsToken,"^="],[s.default.SyntaxKind.PercentEqualsToken,"%="],[s.default.SyntaxKind.PlusPlusToken,"+="],[s.default.SyntaxKind.MinusMinusToken,"-="],[s.default.SyntaxKind.EqualsToken,"="]]);function l(e,t,n,r){return e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:n,right:r})),t}},3550:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAccessorForBindingType=function(e,t,n){return(0,c.isDefinitelyType)(n,(0,c.isArrayType)(e))?_:(0,c.isDefinitelyType)(n,c.isStringType)?d:(0,c.isDefinitelyType)(n,(0,c.isSetType)(e))?p:(0,c.isDefinitelyType)(n,(0,c.isMapType)(e))?f:(0,c.isDefinitelyType)(n,(0,c.isIterableFunctionLuaTupleType)(e))?m:(0,c.isDefinitelyType)(n,(0,c.isIterableFunctionType)(e))?g:(0,c.isDefinitelyType)(n,(0,c.isIterableType)(e))?(s.DiagnosticService.addDiagnostic(o.errors.noIterableIteration(t)),()=>i.default.none()):(0,c.isDefinitelyType)(n,(0,c.isGeneratorType)(e))||(0,c.isDefinitelyType)(n,c.isObjectType)||l.default.isThis(t)?h:void(0,a.assert)(!1,`Destructuring not supported for type: ${e.typeChecker.typeToString(n)}`)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(1915),l=r(n(2137));function u(e){return e[e.length-1]}const _=(e,t,n)=>i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:i.default.number(n+1)}),d=(e,t,n,r,o)=>{let a;0===r.length?(a=e.pushToVar(i.default.call(i.default.globals.string.gmatch,[t,i.default.globals.utf8.charpattern]),"matcher"),r.push(a)):a=r[0];const s=i.default.call(a);return o?(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:s})),i.default.none()):s},p=(e,t,n,r,o)=>{const a=[t],s=u(r);s&&a.push(s);const c=i.default.call(i.default.globals.next,a);if(o)return e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:c})),i.default.none();{const t=e.pushToVar(c,"value");return r.push(t),t}},f=(e,t,n,r)=>{const o=[t],a=u(r);a&&o.push(a);const s=i.default.tempId("k"),c=i.default.tempId("v"),l=i.default.list.make(s,c);return e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:l,right:i.default.call(i.default.globals.next,o)})),r.push(s),i.default.create(i.default.SyntaxKind.Array,{members:l})},m=(e,t,n,r,o)=>{const a=i.default.call(t);return o?(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:a})),i.default.none()):i.default.array([a])},g=(e,t,n,r,o)=>{const a=i.default.call(t);return o?(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:a})),i.default.none()):a},h=(e,t,n,r,o)=>{const a=i.default.call(i.default.property(t,"next"));return o?(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:a})),i.default.none()):i.default.property(a,"value")}},529:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.objectAccessor=void 0;const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(5949),l=n(8576),u=n(9225),_=r(n(2137));t.objectAccessor=(e,t,n,r)=>((0,c.addIndexDiagnostics)(e,r,e.getType(r)),_.default.isIdentifier(r)?i.default.property(t,r.text):_.default.isComputedPropertyName(r)?i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:(0,l.addOneIfArrayType)(e,n,(0,s.transformExpression)(e,r.expression))}):_.default.isNumericLiteral(r)||_.default.isStringLiteral(r)||_.default.isNoSubstitutionTemplateLiteral(r)?i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:(0,s.transformExpression)(e,r)}):_.default.isPrivateIdentifier(r)?(a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(r)),i.default.none()):(0,u.assertNever)(r,"objectAccessor"))},4953:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkVariableHoist=function(e,t,n){if(void 0!==e.isHoisted.get(n))return;const r=(0,o.getAncestor)(t,a.default.isStatement);if(!r)return;const s=r.parent;if(!a.default.isCaseClause(s))return;const c=s.parent;!0===a.default.FindAllReferences.Core.eachSymbolReferenceInFile(t,e.typeChecker,t.getSourceFile(),(e=>{if(!(0,o.isAncestorOf)(s,e))return!0}),c)&&((0,i.getOrSetDefault)(e.hoistsByStatement,r.parent,(()=>new Array)).push(t),e.isHoisted.set(n,!0))};const i=n(2991),o=n(6219),a=r(n(2137))},6073:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanModuleName=function(e){return e.replace(/\W/g,"_")}},6453:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.convertToIndexableExpression=function(e){return i.default.isIndexableExpression(e)?e:i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:e})};const i=r(n(9861))},3262:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createBinaryFromOperator=function(e,t,n,r,d,p,f){const m=u.get(d);if(void 0!==m)return i.default.binary(n,m,p);if(d===l.default.SyntaxKind.PlusToken||d===l.default.SyntaxKind.PlusEqualsToken)return function(e,t,n,r){const o=(0,s.isDefinitelyType)(t,s.isStringType),a=(0,s.isDefinitelyType)(r,s.isStringType);return o||a?i.default.binary(o?e:i.default.call(i.default.globals.tostring,[e]),"..",a?n:i.default.call(i.default.globals.tostring,[n])):i.default.binary(e,"+",n)}(n,r,p,f);const g=_.get(d);return void 0!==g?i.default.call(i.default.property(i.default.globals.bit32,g),[n,p]):d===l.default.SyntaxKind.CommaToken?(e.prereqList((0,c.wrapExpressionStatement)(n)),p):void(0,o.assert)(!1,`createBinaryFromOperator unknown operator: ${(0,a.getKindName)(d)}`)};const i=r(n(9861)),o=n(2287),a=n(2036),s=n(1915),c=n(6837),l=r(n(2137)),u=new Map([[l.default.SyntaxKind.LessThanToken,"<"],[l.default.SyntaxKind.GreaterThanToken,">"],[l.default.SyntaxKind.LessThanEqualsToken,"<="],[l.default.SyntaxKind.GreaterThanEqualsToken,">="],[l.default.SyntaxKind.EqualsEqualsEqualsToken,"=="],[l.default.SyntaxKind.ExclamationEqualsEqualsToken,"~="],[l.default.SyntaxKind.MinusToken,"-"],[l.default.SyntaxKind.AsteriskToken,"*"],[l.default.SyntaxKind.SlashToken,"/"],[l.default.SyntaxKind.AsteriskAsteriskToken,"^"],[l.default.SyntaxKind.PercentToken,"%"]]),_=new Map([[l.default.SyntaxKind.AmpersandToken,"band"],[l.default.SyntaxKind.BarToken,"bor"],[l.default.SyntaxKind.CaretToken,"bxor"],[l.default.SyntaxKind.LessThanLessThanToken,"lshift"],[l.default.SyntaxKind.GreaterThanGreaterThanGreaterThanToken,"rshift"],[l.default.SyntaxKind.GreaterThanGreaterThanToken,"arshift"],[l.default.SyntaxKind.AmpersandEqualsToken,"band"],[l.default.SyntaxKind.BarEqualsToken,"bor"],[l.default.SyntaxKind.CaretEqualsToken,"bxor"],[l.default.SyntaxKind.LessThanLessThanEqualsToken,"lshift"],[l.default.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken,"rshift"],[l.default.SyntaxKind.GreaterThanGreaterThanEqualsToken,"arshift"]])},8446:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createGetService=function(e){return i.default.create(i.default.SyntaxKind.MethodCallExpression,{expression:i.default.globals.game,name:"GetService",args:i.default.list.make(i.default.string(e))})};const i=r(n(9861))},6749:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createHoistDeclaration=function(e,t){const n=e.hoistsByStatement.get(t);if(n&&n.length>0)return n.forEach((t=>(0,a.validateIdentifier)(e,t))),i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.list.make(...n.map((t=>(0,o.transformIdentifierDefined)(e,t)))),right:void 0})};const i=r(n(9861)),o=n(6848),a=n(837)},3842:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getImportParts=y,t.createImportExpression=function(e,t,n){const r=y(e,t,n);return r.unshift(i.default.globals.script),i.default.call(e.TS(n.parent,"import"),r)};const i=r(n(9861)),o=n(1979),a=r(n(6470)),s=n(6258),c=n(7370),l=n(2287),u=n(4998),_=n(4502),d=n(8446),p=n(4160),f=n(4164),m=r(n(2137));function g(e,t){const n=o.RojoResolver.relative(e,t),r=new Array;let a=0;for(;n[a]===o.RbxPathParent;)r.push(s.PARENT_FIELD),a++;const c=[(0,p.propertyAccessExpressionChain)(i.default.globals.script,r)];for(;ae.capture((()=>n(e,t))))),l=(0,o.findLastIndex)(r,(([,e])=>!i.default.list.isEmpty(e))),u=new Array;for(let n=0;ni.default.binary(e,t,n)))},t.propertyAccessExpressionChain=function(e,t){return t.reduce(((e,t)=>i.default.property(e,t)),(0,o.convertToIndexableExpression)(e))};const i=r(n(9861)),o=n(6453)},5708:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.expressionMightMutate=function e(t,n,r){if(i.default.isTemporaryIdentifier(n))return!1;if(i.default.isParenthesizedExpression(n))return e(t,n.expression);if(i.default.isSimplePrimitive(n))return!1;if(i.default.isFunctionExpression(n))return!1;if(i.default.isVarArgsLiteral(n))return!1;if(i.default.isIfExpression(n))return e(t,n.condition)||e(t,n.expression)||e(t,n.alternative);if(i.default.isBinaryExpression(n))return e(t,n.left)||e(t,n.right);if(i.default.isUnaryExpression(n))return e(t,n.expression);if(i.default.isArray(n)||i.default.isSet(n))return i.default.list.some(n.members,(n=>e(t,n)));if(i.default.isMap(n))return i.default.list.some(n.fields,(n=>e(t,n.index)||e(t,n.value)));if(r&&(r=(0,a.skipDownwards)(r),s.default.isIdentifier(r))){const e=t.typeChecker.getSymbolAtLocation(r);if(e&&!(0,o.isSymbolMutable)(t,e))return!1}return!0};const i=r(n(9861)),o=n(3527),a=n(6219),s=r(n(2137))},9564:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findConstructor=function(e){return e.members.find((e=>i.default.isConstructorDeclaration(e)&&void 0!==e.body))};const i=r(n(2137))},6226:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixupWhitespaceAndDecodeEntities=function(e){let t,n=0,r=-1;for(let a=0;a{if(o)return i.default.utf16EncodeAsString(parseInt(o,10));if(s)return i.default.utf16EncodeAsString(parseInt(s,16));{const t=a.get(c);return t?i.default.utf16EncodeAsString(t):e}}));return void 0===e?n:e+" "+n}const a=new Map(Object.entries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}))},3901:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAddIterableToArrayBuilder=function(e,t,n){return(0,l.isDefinitelyType)(n,(0,l.isArrayType)(e))?_:(0,l.isDefinitelyType)(n,l.isStringType)?d:(0,l.isDefinitelyType)(n,(0,l.isSetType)(e))?p:(0,l.isDefinitelyType)(n,(0,l.isMapType)(e))?f:(0,l.isDefinitelyType)(n,(0,l.isIterableFunctionLuaTupleType)(e))?g:(0,l.isDefinitelyType)(n,(0,l.isIterableFunctionType)(e))?m:(0,l.isDefinitelyType)(n,(0,l.isGeneratorType)(e))?h:(0,l.isDefinitelyType)(n,(0,l.isIterableType)(e))?(s.DiagnosticService.addDiagnostic(o.errors.noIterableIteration(t)),()=>i.default.list.make()):n.isUnion()?(s.DiagnosticService.addDiagnostic(o.errors.noMacroUnion(t)),()=>i.default.list.make()):void(0,a.assert)(!1,`Iteration type not implemented: ${e.typeChecker.typeToString(n)}`)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6453),l=n(1915),u=n(2161),_=(e,t,n,r,o,a)=>{const s=i.default.list.make(),c=e.pushToVarIfNonId(t,"array");let l=i.default.unary("#",c);return a&&(l=e.pushToVar(l,(0,u.valueToIdStr)(c)+"Length")),i.default.list.push(s,i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.move,[c,i.default.number(1),l,i.default.binary(r,"+",i.default.number(o+1)),n])})),a&&i.default.list.push(s,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:l})),s},d=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("char");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s),expression:i.default.call(i.default.globals.string.gmatch,[t,i.default.globals.utf8.charpattern]),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:s}))})),a},p=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("v");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s),expression:t,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:s}))})),a},f=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("k"),c=i.default.tempId("v");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s,c),expression:t,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:i.default.array([s,c])}))})),a},m=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("result");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s),expression:t,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:s}))})),a},g=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=e.pushToVar(t,"iterFunc"),c=i.default.tempId("results");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.WhileStatement,{condition:i.default.bool(!0),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:c,right:i.default.array([i.default.call(s)])}),i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(i.default.unary("#",c),"==",i.default.number(0)),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}),i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:c}))})),a},h=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("result");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s),expression:i.default.property((0,c.convertToIndexableExpression)(t),"next"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.property(s,"done"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}),i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:i.default.property(s,"value")}))})),a}},9957:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAssignableValue=function(e,t,n){return"..="!==e||(0,o.isDefinitelyType)(n,o.isStringType)?t:i.default.call(i.default.globals.tostring,[t])};const i=r(n(9861)),o=n(1915)},835:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getConstantValueLiteral=function(e,t){const n=e.typeChecker.getConstantValue(t);if(void 0!==n)return"string"==typeof n?i.default.string(n):i.default.number(n)};const i=r(n(9861))},6117:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getDeclaredVariables=function(e){const t=new Array;if(i.default.isVariableDeclarationList(e))for(const n of e.declarations)o(n.name,t);else o(e.name,t);return t};const i=r(n(2137));function o(e,t){if(i.default.isIdentifier(e))t.push(e);else if(i.default.isObjectBindingPattern(e))for(const n of e.elements)o(n.name,t);else if(i.default.isArrayBindingPattern(e))for(const n of e.elements)i.default.isOmittedExpression(n)||o(n.name,t)}},9655:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getExtendsNode=function(e){var t;for(const n of null!==(t=e.heritageClauses)&&void 0!==t?t:[])if(n.token===i.default.SyntaxKind.ExtendsKeyword)return n.types[0]};const i=r(n(2137))},2036:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getKindName=function(e){return e===i.default.SyntaxKind.FirstAssignment?"EqualsToken":e===i.default.SyntaxKind.FirstCompoundAssignment?"PlusEqualsToken":e===i.default.SyntaxKind.LastReservedWord?"WithKeyword":e===i.default.SyntaxKind.FirstKeyword?"BreakKeyword":e===i.default.SyntaxKind.FirstFutureReservedWord?"ImplementsKeyword":e===i.default.SyntaxKind.LastFutureReservedWord?"YieldKeyword":e===i.default.SyntaxKind.FirstTypeNode?"TypePredicate":e===i.default.SyntaxKind.LastTypeNode?"ImportType":e===i.default.SyntaxKind.FirstPunctuation?"OpenBraceToken":e===i.default.SyntaxKind.FirstToken?"Unknown":e===i.default.SyntaxKind.FirstTriviaToken?"SingleLineCommentTrivia":e===i.default.SyntaxKind.LastTriviaToken?"ConflictMarkerTrivia":e===i.default.SyntaxKind.FirstLiteralToken?"NumericLiteral":e===i.default.SyntaxKind.FirstTemplateToken?"NoSubstitutionTemplateLiteral":e===i.default.SyntaxKind.LastTemplateToken?"TemplateTail":e===i.default.SyntaxKind.FirstBinaryOperator?"LessThanToken":e===i.default.SyntaxKind.LastBinaryOperator?"CaretEqualsToken":e===i.default.SyntaxKind.FirstStatement?"VariableStatement":e===i.default.SyntaxKind.LastStatement?"DebuggerStatement":e===i.default.SyntaxKind.FirstNode?"QualifiedName":e===i.default.SyntaxKind.FirstJSDocNode?"JSDocTypeExpression":e===i.default.SyntaxKind.FirstJSDocTagNode?"JSDocTag":e===i.default.SyntaxKind.LastJSDocTagNode?"JSDocPropertyTag":e===i.default.SyntaxKind.FirstContextualKeyword?"AbstractKeyword":e===i.default.SyntaxKind.LastContextualKeyword?"OfKeyword":i.default.SyntaxKind[e]};const i=r(n(2137))},9525:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getOriginalSymbolOfNode=function(e,t){const n=e.getSymbolAtLocation(t);return n?i.default.skipAlias(n,e):n};const i=r(n(2137))},4164:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceFileFromModuleSpecifier=function(e,t){var n;const r=null!==(n=e.typeChecker.getSymbolAtLocation(t))&&void 0!==n?n:e.typeChecker.resolveExternalModuleName(t);if(r){const n=r.valueDeclaration;if(n&&i.default.isModuleDeclaration(n)&&i.default.isStringLiteralLike(n.name)){const r=t.getSourceFile(),i=e.program.getModeForUsageLocation(r,n.name),o=e.program.getResolvedModule(r,n.name.text,i);if(o&&o.resolvedModule)return e.program.getSourceFile(o.resolvedModule.resolvedFileName)}if(n&&i.default.isSourceFile(n))return n}if(i.default.isStringLiteralLike(t)){const n=t.getSourceFile(),r=i.default.resolveModuleName(t.text,n.path,e.compilerOptions,i.default.sys);if(r.resolvedModule)return e.program.getSourceFile(r.resolvedModule.resolvedFileName)}};const i=r(n(2137))},1441:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getStatements=function(e){return i.default.isBlock(e)?e.statements:[e]};const i=r(n(2137))},1871:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasMultipleDefinitions=function(e,t){var n;let r=0;for(const i of null!==(n=e.getDeclarations())&&void 0!==n?n:[])if(t(i)&&(r++,r>1))return!0;return!1}},965:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReturnBlockedByTryStatement=function(e){const t=i.default.findAncestor(e,(e=>i.default.isTryStatement(e)||i.default.isFunctionLikeDeclaration(e)));return void 0!==t&&i.default.isTryStatement(t)},t.isBreakBlockedByTryStatement=function(e){const t=i.default.findAncestor(e,(e=>i.default.isTryStatement(e)||i.default.isIterationStatement(e,!1)||i.default.isSwitchStatement(e)));return void 0!==t&&i.default.isTryStatement(t)};const i=r(n(2137))},833:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isMethodFromType=_,t.isMethod=function(e,t){return _(e,t,e.getType(t))};const i=n(7370),o=n(2991),a=n(4502),s=n(6219),c=n(1915),l=r(n(2137));function u(e,t){if(l.default.isFunctionLike(t)){const n=function(e){const t=e[0];if(t){const e=t.name;if(l.default.isIdentifier(e)&&l.default.isThisIdentifier(e))return e}}(t.parameters);if(n)return!(e.getType(n).flags&l.default.TypeFlags.Void);if(l.default.isFunctionDeclaration(t))return!1;if(l.default.isMethodDeclaration(t)||l.default.isMethodSignature(t))return!0;if(l.default.isFunctionExpression(t)){const e=(0,s.skipUpwards)(t).parent;if(l.default.isPropertyAssignment(e)){const t=(0,s.skipUpwards)(e).parent;if(l.default.isObjectLiteralExpression(t))return!0}}return!1}return!1}function _(e,t,n){let r=!1;return(0,c.walkTypes)(n,(n=>{n.symbol&&(r||(r=(0,o.getOrSetDefault)(e.multiTransformState.isMethodCache,n.symbol,(()=>function(e,t,n){var r;let o=!1,s=!1;for(const t of n.getCallSignatures()){const n=null===(r=t.thisParameter)||void 0===r?void 0:r.valueDeclaration;n?e.getType(n).flags&l.default.TypeFlags.Void?s=!0:o=!0:t.declaration&&(u(e,t.declaration)?o=!0:s=!0)}return o&&s&&a.DiagnosticService.addDiagnostic(i.errors.noMixedTypeCall(t)),o}(e,t,n)))))})),r}},3527:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isSymbolMutable=function(e,t){return(0,i.getOrSetDefault)(e.multiTransformState.isDefinedAsLetCache,t,(()=>{if(t.valueDeclaration){if(a.default.isParameter(t.valueDeclaration))return!0;const e=(0,o.getAncestor)(t.valueDeclaration,a.default.isVariableDeclarationList);if(e)return!!(e.flags&a.default.NodeFlags.Let)}return!1}))};const i=n(2991),o=n(6219),a=r(n(2137))},1205:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isSymbolOfValue=function(e){return!(!(e.flags&i.default.SymbolFlags.Value)||e.flags&i.default.SymbolFlags.ConstEnum)};const i=r(n(2137))},6409:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isUsedAsStatement=function e(t){const n=(0,i.skipUpwards)(t),r=n.parent;return!!o.default.isExpressionStatement(r)||(!(!o.default.isForStatement(r)||r.condition===n)||!(!o.default.isDeleteExpression(r)||!e(r)))};const i=n(6219),o=r(n(2137))},7011:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidMethodIndexWithoutCall=function(e,t){const{parent:n}=t;if(a.default.isBinaryExpression(n))return!0;if(a.default.isPrefixUnaryExpression(n))return!0;if(a.default.isCallExpression(n)){const t=e.typeChecker.getNonOptionalType(e.getType(n.expression)),r=(0,o.getFirstDefinedSymbol)(e,t);if(r){const t=e.services.macroManager.getCallMacro(r);if(t===i.CALL_MACROS.typeIs||t===i.CALL_MACROS.typeOf)return!0}}return!1};const i=n(6662),o=n(1915),a=r(n(2137))},9582:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.offset=function(e,t){if(0===t)return e;if(i.default.isBinaryExpression(e)&&("+"===e.operator||"-"===e.operator)){const n=o(e.right);if(void 0!==n){const r=n+t*("-"===e.operator?-1:1);return 0===r?e.left:i.default.binary(e.left,e.operator,i.default.number(r))}}const n=o(e);return void 0!==n?i.default.number(n+t):i.default.binary(e,t>0?"+":"-",i.default.number(Math.abs(t)))};const i=r(n(9861));function o(e){if(i.default.isNumberLiteral(e))return Number(e.value);if(i.default.isUnaryExpression(e)&&"-"===e.operator){const t=o(e.expression);if(void 0!==t)return-t}}},274:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createMapPointer=function(e){return{name:e,value:i.default.map()}},t.createArrayPointer=function(e){return{name:e,value:i.default.array()}},t.assignToMapPointer=function(e,t,n,r){i.default.isMap(t.value)?i.default.list.push(t.value.fields,i.default.create(i.default.SyntaxKind.MapField,{index:n,value:r})):e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t.value,index:n}),operator:"=",right:r}))},t.disableMapInline=function(e,t){i.default.isMap(t.value)&&(t.value=e.pushToVar(t.value,t.name))},t.disableArrayInline=function(e,t){i.default.isArray(t.value)&&(t.value=e.pushToVar(t.value,t.name))};const i=r(n(9861))},6219:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAncestorOf=function(e,t){do{if(e===t)return!0;t=t.parent}while(t);return!1},t.skipDownwards=function(e){for(;i.default.isNonNullExpression(e)||i.default.isParenthesizedExpression(e)||i.default.isAsExpression(e)||i.default.isTypeAssertionExpression(e)||i.default.isSatisfiesExpression(e);)e=e.expression;return e},t.skipUpwards=function(e){let t=e.parent;for(;t&&(i.default.isNonNullExpression(t)||i.default.isParenthesizedExpression(t)||i.default.isAsExpression(t)||i.default.isTypeAssertionExpression(t)||i.default.isSatisfiesExpression(t));)t=(e=t).parent;return e},t.getAncestor=o,t.getModuleAncestor=function(e){return o(e,a)};const i=r(n(2137));function o(e,t){let n=e;for(;n&&!t(n);)n=n.parent;return n}function a(e){return i.default.isSourceFile(e)||i.default.isModuleDeclaration(e)}},1915:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isDefinitelyType=function(e,...t){var n;return p(null!==(n=e.getConstraint())&&void 0!==n?n:e,t)},t.isPossiblyType=function(e,...t){var n;return f(null!==(n=e.getConstraint())&&void 0!==n?n:e,t)},t.isDefinedType=m,t.isAnyType=function(e){return t=>t===e.typeChecker.getAnyType()},t.isBooleanType=g,t.isBooleanLiteralType=function(e,t){return n=>n.flags&u.default.TypeFlags.BooleanLiteral?n===(t?e.typeChecker.getTrueType():e.typeChecker.getFalseType()):g(n)},t.isNumberType=h,t.isNumberLiteralType=function(e){return t=>t.isNumberLiteral()?t.value===e:h(t)},t.isNaNType=function(e){return h(e)&&!e.isNumberLiteral()},t.isStringType=y,t.isArrayType=function(e){return t=>!(t.flags&u.default.TypeFlags.Any)&&(e.typeChecker.isTupleType(t)||e.typeChecker.isArrayLikeType(t)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.ReadonlyArray)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Array)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.ReadVoxelsArray)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.TemplateStringsArray))},t.isSetType=function(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Set)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.ReadonlySet)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.WeakSet)},t.isMapType=function(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Map)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.ReadonlyMap)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.WeakMap)},t.isGeneratorType=function(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Generator)},t.isIterableFunctionType=v,t.isLuaTupleType=b,t.isIterableFunctionLuaTupleType=function(e){return t=>{if(v(e)(t)){const n=S(e,t)[0];return void 0!==n&&b(e)(n)}return!1}},t.isIterableType=function(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Iterable)},t.isObjectType=function(e){return!!(e.flags&u.default.TypeFlags.Object)},t.isUndefinedType=x,t.isEmptyStringType=function(e){return e.isStringLiteral()?""===e.value:(0,l.isTemplateLiteralType)(e)?0===e.texts.length||e.texts.every((e=>0===e.length)):y(e)},t.isRobloxType=function(e){const t=i.default.join(e.data.nodeModulesPath,o.RBXTS_SCOPE,"types");return e=>{var n,r,i;return null!==(i=null===(r=null===(n=e.symbol)||void 0===n?void 0:n.declarations)||void 0===r?void 0:r.some((e=>{var n;const r=null===(n=e.getSourceFile())||void 0===n?void 0:n.fileName;return void 0!==r&&(0,a.isPathDescendantOf)(r,t)})))&&void 0!==i&&i}},t.walkTypes=function e(t,n){if(t.isUnionOrIntersection())for(const r of t.types)e(r,n);else{const r=t.getConstraint();r&&r!==t?e(r,n):n(t)}},t.getFirstConstructSymbol=function(e,t){const n=e.getType(t);if(n.symbol){const e=n.symbol.getDeclarations();if(e)for(const t of e)if(u.default.isInterfaceDeclaration(t))for(const e of t.members)if(u.default.isConstructSignatureDeclaration(e))return e.symbol}},t.getFirstDefinedSymbol=function(e,t){if(!t.isUnionOrIntersection())return t.symbol;for(const n of t.types)if(n.symbol&&!e.typeChecker.isUndefinedSymbol(n.symbol))return n.symbol},t.getTypeArguments=S;const i=r(n(6470)),o=n(6258),a=n(2420),s=n(3115),c=n(1677),l=n(226),u=r(n(2137));function _(e,t){var n;for(const r of null!==(n=t.getBaseTypes())&&void 0!==n?n:[])e.push(r),r.isClassOrInterface()&&_(e,r)}function d(e){const t=new Array;return _(t,e),t}function p(e,t){return e.isUnion()?e.types.every((e=>p(e,t))):e.isIntersection()?e.types.some((e=>p(e,t))):!(!e.isClassOrInterface()||!d(e).some((e=>p(e,t))))||t.some((t=>t(e)))}function f(e,t){return e.isUnionOrIntersection()?e.types.some((e=>f(e,t))):!(!e.isClassOrInterface()||!d(e).some((e=>f(e,t))))||!!(e.flags&(u.default.TypeFlags.TypeVariable|u.default.TypeFlags.AnyOrUnknown))||(m(e)?1!==t.length||t[0]!==x:t.some((t=>t(e))))}function m(e){return e.flags===u.default.TypeFlags.Object&&0===e.getProperties().length&&0===e.getCallSignatures().length&&0===e.getConstructSignatures().length&&void 0===e.getNumberIndexType()&&void 0===e.getStringIndexType()}function g(e){return!!(e.flags&(u.default.TypeFlags.Boolean|u.default.TypeFlags.BooleanLiteral))}function h(e){return!!(e.flags&(u.default.TypeFlags.Number|u.default.TypeFlags.NumberLike|u.default.TypeFlags.NumberLiteral))}function y(e){return!!(e.flags&(u.default.TypeFlags.String|u.default.TypeFlags.StringLike|u.default.TypeFlags.StringLiteral))}function v(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.IterableFunction)}function b(e){return t=>t.getProperty(c.NOMINAL_LUA_TUPLE_NAME)===e.services.macroManager.getSymbolOrThrow(c.NOMINAL_LUA_TUPLE_NAME)}function x(e){return!!(e.flags&(u.default.TypeFlags.Undefined|u.default.TypeFlags.Void))}function S(e,t){var n;return null!==(n=e.typeChecker.getTypeArguments(t))&&void 0!==n?n:[]}},837:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateIdentifier=function(e,t){i.default.isValidIdentifier(t.text)?i.default.isReservedIdentifier(t.text)&&a.DiagnosticService.addDiagnostic(o.errors.noReservedIdentifier(t)):a.DiagnosticService.addDiagnostic(o.errors.noInvalidIdentifier(t))};const i=r(n(9861)),o=n(7370),a=n(4502)},4735:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateMethodAssignment=function(e,t){if(c.default.isClassElement(t)&&c.default.isClassLike(t.parent)&&t.name)for(const n of c.default.getAllSuperTypeNodes(t.parent))_(e,t,n);else c.default.isObjectLiteralElementLike(t)&&(c.default.isSpreadAssignment(t)?c.default.isObjectLiteralExpression(t.expression)||function(e,t){const n=e.getType(t.expression),r=e.typeChecker.getContextualType(t.expression);if(r)for(const i of n.getProperties()){const o=e.typeChecker.getTypeOfPropertyOfType(n,i.name),a=e.typeChecker.getTypeOfPropertyOfType(r,i.name);o&&a&&u(e,t,o,a)}}(e,t):function(e,t){const n=e.getType(t),r=e.typeChecker.getContextualTypeForObjectLiteralElement(t);r&&r!==n&&u(e,t,n,r)}(e,t))};const i=n(7370),o=n(4502),a=n(833),s=n(1915),c=r(n(2137));function l(e){let t=!1;return(0,s.walkTypes)(e,(e=>{t||(t=e.getCallSignatures().length>0)})),t}function u(e,t,n,r){if(l(n)&&l(r)){const s=(0,a.isMethodFromType)(e,t,r);(0,a.isMethodFromType)(e,t,n)!==s&&(s?o.DiagnosticService.addDiagnostic(i.errors.expectedMethodGotFunction(t)):o.DiagnosticService.addDiagnostic(i.errors.expectedFunctionGotMethod(t)))}}function _(e,t,n){const r=c.default.getPropertyNameForPropertyNameNode(t.name);if(!r)return;const i=e.getType(t),o=e.typeChecker.getTypeOfPropertyOfType(e.getType(n),r);o&&u(e,t,i,o)}},3972:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateNotAnyType=function(e,t){l.default.isSpreadElement(t)&&(t=(0,s.skipDownwards)(t.expression));let n=e.getType(t);if((0,c.isDefinitelyType)(n,(0,c.isArrayType)(e))){const t=e.typeChecker.getIndexTypeOfType(n,l.default.IndexKind.Number);t&&(n=t)}if((0,c.isDefinitelyType)(n,(0,c.isAnyType)(e))){const n=(0,a.getOriginalSymbolOfNode)(e.typeChecker,t);n?e.multiTransformState.isReportedByNoAnyCache.has(n)||(e.multiTransformState.isReportedByNoAnyCache.add(n),o.DiagnosticService.addDiagnostic(i.errors.noAny(t))):o.DiagnosticService.addDiagnostic(i.errors.noAny(t))}};const i=n(7370),o=n(4502),a=n(9525),s=n(6219),c=n(1915),l=r(n(2137))},2161:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.valueToIdStr=function(e){const t=o(e);return void 0!==t&&i.default.isValidIdentifier(t)?(n=t).charAt(0).toLowerCase()+n.slice(1):"";var n};const i=r(n(9861));function o(e){return i.default.isIdentifier(e)||i.default.isPropertyAccessExpression(e)?e.name:i.default.isCallExpression(e)&&i.default.isPropertyAccessExpression(e.expression)&&"new"===e.expression.name?o(e.expression.expression):void 0}},6837:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapExpressionStatement=function(e){return i.default.isTemporaryIdentifier(e)||i.default.isNone(e)?i.default.list.make():i.default.isCall(e)?i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:e})):i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.tempId(),right:e}))};const i=r(n(9861))},1511:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapReturnIfLuaTuple=function(e,t,n){return(0,s.isLuaTupleType)(e)(e.getType(t))&&function(e,t,n){if(!i.default.isCall(n))return!0;const r=(0,a.skipUpwards)(t),s=r.parent;return!c.default.isExpressionStatement(s)&&((!c.default.isForStatement(s)||s.condition===r)&&(!(c.default.isVariableDeclaration(s)&&c.default.isArrayBindingPattern(s.name)&&!(0,o.arrayBindingPatternContainsHoists)(e,s.name))&&((!c.default.isAssignmentExpression(s)||!c.default.isArrayLiteralExpression(s.left))&&(!c.default.isElementAccessExpression(s)&&(!c.default.isReturnStatement(s)&&!c.default.isVoidExpression(s))))))}(e,t,n)?i.default.array([n]):n};const i=r(n(9861)),o=n(9254),a=n(6219),s=n(1915),c=r(n(2137))},6442:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapStatementsAsGenerator=function(e,t,n){return i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.call(e.TS(t,"generator"),[i.default.create(i.default.SyntaxKind.FunctionExpression,{hasDotDotDot:!1,parameters:i.default.list.make(),statements:n})])}))};const i=r(n(9861))},651:function(e){"use strict";e.exports={}},1199:function(){},1551:function(){},1586:function(){},1744:function(){},4562:function(e,t,n){"use strict";const{normalizeIPv6:r,normalizeIPv4:i,removeDotSegments:o,recomposeAuthority:a,normalizeComponentEncoding:s}=n(9316),c=n(7732);function l(e,t,n,r){const i={};return r||(e=p(u(e,n),n),t=p(u(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=o(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=o(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=o(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=o(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function u(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),i=[],s=c[(r.scheme||n.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(n,r),void 0!==n.path&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),void 0!==n.scheme&&(n.path=n.path.split("%3A").join(":")))),"suffix"!==r.reference&&n.scheme&&(i.push(n.scheme),i.push(":"));const l=a(n,r);if(void 0!==l&&("suffix"!==r.reference&&i.push("//"),i.push(l),n.path&&"/"!==n.path.charAt(0)&&i.push("/")),void 0!==n.path){let e=n.path;r.absolutePath||s&&s.absolutePath||(e=o(e)),void 0===l&&(e=e.replace(/^\/\//u,"/%2F")),i.push(e)}return void 0!==n.query&&(i.push("?"),i.push(n.query)),void 0!==n.fragment&&(i.push("#"),i.push(n.fragment)),i.join("")}const _=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(e,t){const n=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=-1!==e.indexOf("%");let s=!1;"suffix"===n.reference&&(e=(n.scheme?n.scheme+":":"")+"//"+e);const l=e.match(d);if(l){if(o.scheme=l[1],o.userinfo=l[3],o.host=l[4],o.port=parseInt(l[5],10),o.path=l[6]||"",o.query=l[7],o.fragment=l[8],isNaN(o.port)&&(o.port=l[5]),o.host){const e=i(o.host);if(!1===e.isIPV4){const t=r(e.host,{isIPV4:!1});o.host=t.host.toLowerCase(),s=t.isIPV6}else o.host=e.host,s=!0}void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||o.path||void 0!==o.query?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==o.reference&&(o.error=o.error||"URI is not a "+n.reference+" reference.");const e=c[(n.scheme||o.scheme||"").toLowerCase()];if(!(n.unicodeSupport||e&&e.unicodeSupport)&&o.host&&(n.domainHost||e&&e.domainHost)&&!1===s&&function(e){let t=0;for(let n=0,r=e.length;n126||_[t])return!0;return!1}(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(a&&void 0!==o.scheme&&(o.scheme=unescape(o.scheme)),a&&void 0!==o.userinfo&&(o.userinfo=unescape(o.userinfo)),a&&void 0!==o.host&&(o.host=unescape(o.host)),void 0!==o.path&&o.path.length&&(o.path=escape(unescape(o.path))),void 0!==o.fragment&&o.fragment.length&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),e&&e.parse&&e.parse(o,n)}else o.error=o.error||"URI can not be parsed.";return o}const f={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=u(p(e,t),t):"object"==typeof e&&(e=p(u(e,t),t)),e},resolve:function(e,t,n){const r=Object.assign({scheme:"null"},n);return u(l(p(e,r),p(t,r),r,!0),{...r,skipEscape:!0})},resolveComponents:l,equal:function(e,t,n){return"string"==typeof e?(e=unescape(e),e=u(s(p(e,n),!0),{...n,skipEscape:!0})):"object"==typeof e&&(e=u(s(e,!0),{...n,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=u(s(p(t,n),!0),{...n,skipEscape:!0})):"object"==typeof t&&(t=u(s(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:u,parse:p};e.exports=f,e.exports.default=f,e.exports.fastUri=f},7732:function(e){"use strict";const t=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function i(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function o(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const a={scheme:"http",domainHost:!0,parse:i,serialize:o},s={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=r(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(r(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){const[t,n]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:a,https:{scheme:"https",domainHost:a.domainHost,parse:i,serialize:o},ws:s,wss:{scheme:"wss",domainHost:s.domainHost,parse:s.parse,serialize:s.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(n);if(r){const n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const i=`${n}:${t.nid||e.nid}`,o=c[i];e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),i=`${n}:${t.nid||r}`,o=c[i];o&&(e=o.serialize(e,t));const a=e,s=e.nss;return a.path=`${r||t.nid}:${s}`,t.skipEscape=!0,a},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,n){const r=e;return r.uuid=r.nss,r.nss=void 0,n.tolerant||r.uuid&&t.test(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=c},2039:function(e){"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},9316:function(e,t,n){"use strict";const{HEX:r}=n(2039);function i(e){if(c(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[n]=t;return n?{host:s(n,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function o(e,t=!1){let n="",i=!0;for(const t of e){if(void 0===r[t])return;"0"!==t&&!0===i&&(i=!1),i||(n+=t)}return t&&0===n.length&&(n="0"),n}function a(e,t={}){if(c(e,":")<2)return{host:e,isIPV6:!1};const n=function(e){let t=0;const n={error:!1,address:"",zone:""},r=[],i=[];let a=!1,s=!1,c=!1;function l(){if(i.length){if(!1===a){const e=o(i);if(void 0===e)return n.error=!0,!1;r.push(e)}i.length=0}return!0}for(let o=0;o7){n.error=!0;break}o-1>=0&&":"===e[o-1]&&(s=!0)}}return i.length&&(a?n.zone=i.join(""):c?r.push(i.join("")):r.push(o(i))),n.address=r.join(""),n}(e);if(n.error)return{host:e,isIPV6:!1};{let e=n.address,t=n.address;return n.zone&&(e+="%"+n.zone,t+="%25"+n.zone),{host:e,escapedHost:t,isIPV6:!0}}}function s(e,t){let n="",r=!0;const i=e.length;for(let o=0;o0})).map((function(e){return"-- ".concat(e)})).join("\n")}postMessage({source:n})}else"writeFile"===e.data.type?t.vfs.writeFile(e.data.filePath,e.data.content):"setMapping"===e.data.type&&t.setMapping(e.data.typingsPath,e.data.mainPath)})),console.log("roblox-ts@".concat(e.COMPILER_VERSION))}()}(); \ No newline at end of file + })(name => super[name], (name, value) => super[name] = value);`};function kD(e,t){return QE(e)&&qD(e.expression)&&0!=(8192&Yd(e.expression))&&e.expression.escapedText===t}function TD(e){return 9===e.kind}function CD(e){return 10===e.kind}function wD(e){return 11===e.kind}function DD(e){return 12===e.kind}function ED(e){return 14===e.kind}function PD(e){return 15===e.kind}function ND(e){return 16===e.kind}function FD(e){return 17===e.kind}function AD(e){return 18===e.kind}function ID(e){return 26===e.kind}function OD(e){return 28===e.kind}function MD(e){return 40===e.kind}function LD(e){return 41===e.kind}function jD(e){return 42===e.kind}function RD(e){return 54===e.kind}function BD(e){return 58===e.kind}function JD(e){return 59===e.kind}function zD(e){return 29===e.kind}function $D(e){return 39===e.kind}function qD(e){return 80===e.kind}function VD(e){return 81===e.kind}function UD(e){return 95===e.kind}function KD(e){return 90===e.kind}function WD(e){return 134===e.kind}function HD(e){return 131===e.kind}function GD(e){return 135===e.kind}function XD(e){return 148===e.kind}function QD(e){return 126===e.kind}function YD(e){return 128===e.kind}function ZD(e){return 164===e.kind}function eE(e){return 129===e.kind}function tE(e){return 108===e.kind}function nE(e){return 102===e.kind}function rE(e){return 84===e.kind}function iE(e){return 166===e.kind}function oE(e){return 167===e.kind}function aE(e){return 168===e.kind}function sE(e){return 169===e.kind}function cE(e){return 170===e.kind}function lE(e){return 171===e.kind}function uE(e){return 172===e.kind}function _E(e){return 173===e.kind}function dE(e){return 174===e.kind}function pE(e){return 175===e.kind}function fE(e){return 176===e.kind}function mE(e){return 177===e.kind}function gE(e){return 178===e.kind}function hE(e){return 179===e.kind}function yE(e){return 180===e.kind}function vE(e){return 181===e.kind}function bE(e){return 182===e.kind}function xE(e){return 183===e.kind}function SE(e){return 184===e.kind}function kE(e){return 185===e.kind}function TE(e){return 186===e.kind}function CE(e){return 187===e.kind}function wE(e){return 188===e.kind}function DE(e){return 189===e.kind}function EE(e){return 202===e.kind}function PE(e){return 190===e.kind}function NE(e){return 191===e.kind}function FE(e){return 192===e.kind}function AE(e){return 193===e.kind}function IE(e){return 194===e.kind}function OE(e){return 195===e.kind}function ME(e){return 196===e.kind}function LE(e){return 197===e.kind}function jE(e){return 198===e.kind}function RE(e){return 199===e.kind}function BE(e){return 200===e.kind}function JE(e){return 201===e.kind}function zE(e){return 205===e.kind}function $E(e){return 204===e.kind}function qE(e){return 203===e.kind}function VE(e){return 206===e.kind}function UE(e){return 207===e.kind}function KE(e){return 208===e.kind}function WE(e){return 209===e.kind}function HE(e){return 210===e.kind}function GE(e){return 211===e.kind}function XE(e){return 212===e.kind}function QE(e){return 213===e.kind}function YE(e){return 214===e.kind}function ZE(e){return 215===e.kind}function eP(e){return 216===e.kind}function tP(e){return 217===e.kind}function nP(e){return 218===e.kind}function rP(e){return 219===e.kind}function iP(e){return 220===e.kind}function oP(e){return 221===e.kind}function aP(e){return 222===e.kind}function sP(e){return 223===e.kind}function cP(e){return 224===e.kind}function lP(e){return 225===e.kind}function uP(e){return 226===e.kind}function _P(e){return 227===e.kind}function dP(e){return 228===e.kind}function pP(e){return 229===e.kind}function fP(e){return 230===e.kind}function mP(e){return 231===e.kind}function gP(e){return 232===e.kind}function hP(e){return 233===e.kind}function yP(e){return 234===e.kind}function vP(e){return 238===e.kind}function bP(e){return 235===e.kind}function xP(e){return 236===e.kind}function SP(e){return 237===e.kind}function kP(e){return 354===e.kind}function TP(e){return 355===e.kind}function CP(e){return 239===e.kind}function wP(e){return 240===e.kind}function DP(e){return 241===e.kind}function EP(e){return 243===e.kind}function PP(e){return 242===e.kind}function NP(e){return 244===e.kind}function FP(e){return 245===e.kind}function AP(e){return 246===e.kind}function IP(e){return 247===e.kind}function OP(e){return 248===e.kind}function MP(e){return 249===e.kind}function LP(e){return 250===e.kind}function jP(e){return 251===e.kind}function RP(e){return 252===e.kind}function BP(e){return 253===e.kind}function JP(e){return 254===e.kind}function zP(e){return 255===e.kind}function $P(e){return 256===e.kind}function qP(e){return 257===e.kind}function VP(e){return 258===e.kind}function UP(e){return 259===e.kind}function KP(e){return 260===e.kind}function WP(e){return 261===e.kind}function HP(e){return 262===e.kind}function GP(e){return 263===e.kind}function XP(e){return 264===e.kind}function QP(e){return 265===e.kind}function YP(e){return 266===e.kind}function ZP(e){return 267===e.kind}function eN(e){return 268===e.kind}function tN(e){return 269===e.kind}function nN(e){return 270===e.kind}function rN(e){return 271===e.kind}function iN(e){return 272===e.kind}function oN(e){return 273===e.kind}function aN(e){return 302===e.kind}function sN(e){return 300===e.kind}function cN(e){return 301===e.kind}function lN(e){return 300===e.kind}function uN(e){return 301===e.kind}function _N(e){return 274===e.kind}function dN(e){return 280===e.kind}function pN(e){return 275===e.kind}function fN(e){return 276===e.kind}function mN(e){return 277===e.kind}function gN(e){return 278===e.kind}function hN(e){return 279===e.kind}function yN(e){return 281===e.kind}function vN(e){return 282===e.kind}function bN(e){return 353===e.kind}function xN(e){return 356===e.kind}function SN(e){return 283===e.kind}function kN(e){return 284===e.kind}function TN(e){return 285===e.kind}function CN(e){return 286===e.kind}function wN(e){return 287===e.kind}function DN(e){return 288===e.kind}function EN(e){return 289===e.kind}function PN(e){return 290===e.kind}function NN(e){return 291===e.kind}function FN(e){return 292===e.kind}function AN(e){return 293===e.kind}function IN(e){return 294===e.kind}function ON(e){return 295===e.kind}function MN(e){return 296===e.kind}function LN(e){return 297===e.kind}function jN(e){return 298===e.kind}function RN(e){return 299===e.kind}function BN(e){return 303===e.kind}function JN(e){return 304===e.kind}function zN(e){return 305===e.kind}function $N(e){return 306===e.kind}function qN(e){return 307===e.kind}function VN(e){return 308===e.kind}function UN(e){return 309===e.kind}function KN(e){return 310===e.kind}function WN(e){return 311===e.kind}function HN(e){return 324===e.kind}function GN(e){return 325===e.kind}function XN(e){return 326===e.kind}function QN(e){return 312===e.kind}function YN(e){return 313===e.kind}function ZN(e){return 314===e.kind}function eF(e){return 315===e.kind}function tF(e){return 316===e.kind}function nF(e){return 317===e.kind}function rF(e){return 318===e.kind}function iF(e){return 319===e.kind}function oF(e){return 320===e.kind}function aF(e){return 322===e.kind}function sF(e){return 323===e.kind}function cF(e){return 328===e.kind}function lF(e){return 330===e.kind}function uF(e){return 332===e.kind}function _F(e){return 338===e.kind}function dF(e){return 333===e.kind}function pF(e){return 334===e.kind}function fF(e){return 335===e.kind}function mF(e){return 336===e.kind}function gF(e){return 337===e.kind}function hF(e){return 339===e.kind}function yF(e){return 331===e.kind}function vF(e){return 347===e.kind}function bF(e){return 340===e.kind}function xF(e){return 341===e.kind}function SF(e){return 342===e.kind}function kF(e){return 343===e.kind}function TF(e){return 344===e.kind}function CF(e){return 345===e.kind}function wF(e){return 346===e.kind}function DF(e){return 327===e.kind}function EF(e){return 348===e.kind}function PF(e){return 329===e.kind}function NF(e){return 350===e.kind}function FF(e){return 349===e.kind}function AF(e){return 351===e.kind}function IF(e){return 352===e.kind}var OF,MF,LF,jF,RF,BF,JF=new WeakMap;function zF(e){return Ol(e.kind)?JF.get(e):u}function $F(e,t){return JF.set(e,t),t}function qF(e){JF.delete(e)}function VF(e){return e.createExportDeclaration(void 0,!1,e.createNamedExports([]),void 0)}function UF(e,t,n,r){if(oE(n))return sI(e.createElementAccessExpression(t,n.expression),r);{const r=sI(hl(n)?e.createPropertyAccessExpression(t,n):e.createElementAccessExpression(t,n),n);return ow(r,128),r}}function KF(e,t){const n=_I.createIdentifier(e||"React");return OT(n,hc(t)),n}function WF(e,t,n){if(iE(t)){const r=WF(e,t.left,n),i=e.createIdentifier(bc(t.right));return i.escapedText=t.right.escapedText,e.createPropertyAccessExpression(r,i)}return KF(bc(t),n)}function HF(e,t,n,r){return t?WF(e,t,r):e.createPropertyAccessExpression(KF(n,r),"createElement")}function GF(e,t,n,r,i,o){const a=[n];if(r&&a.push(r),i&&i.length>0)if(r||a.push(e.createNull()),i.length>1)for(const e of i)hA(e),a.push(e);else a.push(i[0]);return sI(e.createCallExpression(t,void 0,a),o)}function XF(e,t,n,r,i,o,a){const s=function(e,t,n,r){return t?WF(e,t,r):e.createPropertyAccessExpression(KF(n,r),"Fragment")}(e,n,r,o),c=[s,e.createNull()];if(i&&i.length>0)if(i.length>1)for(const e of i)hA(e),c.push(e);else c.push(i[0]);return sI(e.createCallExpression(HF(e,t,r,o),void 0,c),a)}function QF(e,t,n){if(WP(t)){const r=Te(t.declarations),i=e.updateVariableDeclaration(r,r.name,void 0,void 0,n);return sI(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}{const r=sI(e.createAssignment(t,n),t);return sI(e.createExpressionStatement(r),t)}}function YF(e,t,n){return DP(t)?e.updateBlock(t,sI(e.createNodeArray([n,...t.statements]),t.statements)):e.createBlock(e.createNodeArray([t,n]),!0)}function ZF(e,t){if(iE(t)){const n=ZF(e,t.left),r=OT(sI(e.cloneNode(t.right),t.right),t.right.parent);return sI(e.createPropertyAccessExpression(n,r),t)}return OT(sI(e.cloneNode(t),t),t.parent)}function eA(e,t){return qD(t)?e.createStringLiteralFromNode(t):oE(t)?OT(sI(e.cloneNode(t.expression),t.expression),t.expression.parent):OT(sI(e.cloneNode(t),t),t.parent)}function tA(e,t,n,r){switch(n.name&&VD(n.name)&&xn.failBadSyntaxKind(n.name,"Private identifiers are not allowed in object literals."),n.kind){case 177:case 178:return function(e,t,n,r,i){const{firstAccessor:o,getAccessor:a,setAccessor:s}=Sv(t,n);if(n===o)return sI(e.createObjectDefinePropertyCall(r,eA(e,n.name),e.createPropertyDescriptor({enumerable:e.createFalse(),configurable:!0,get:a&&sI(ew(e.createFunctionExpression(Ac(a),void 0,void 0,void 0,a.parameters,void 0,a.body),a),a),set:s&&sI(ew(e.createFunctionExpression(Ac(s),void 0,void 0,void 0,s.parameters,void 0,s.body),s),s)},!i)),o)}(e,t.properties,n,r,!!t.multiLine);case 303:return function(e,t,n){return ew(sI(e.createAssignment(UF(e,n,t.name,t.name),t.initializer),t),t)}(e,n,r);case 304:return function(e,t,n){return ew(sI(e.createAssignment(UF(e,n,t.name,t.name),e.cloneNode(t.name)),t),t)}(e,n,r);case 174:return function(e,t,n){return ew(sI(e.createAssignment(UF(e,n,t.name,t.name),ew(sI(e.createFunctionExpression(Ac(t),t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t)}(e,n,r)}}function nA(e,t,n,r,i){const o=t.operator;xn.assert(46===o||47===o,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");const a=e.createTempVariable(r);sI(n=e.createAssignment(a,n),t.operand);let s=cP(t)?e.createPrefixUnaryExpression(o,a):e.createPostfixUnaryExpression(a,o);return sI(s,t),i&&(s=e.createAssignment(i,s),sI(s,t)),sI(n=e.createComma(n,s),t),lP(t)&&sI(n=e.createComma(n,a),t),n}function rA(e){return 0!=(65536&Yd(e))}function iA(e){return 0!=(32768&Yd(e))}function oA(e){return 0!=(16384&Yd(e))}function aA(e){return wD(e.expression)&&"use strict"===e.expression.text}function sA(e){for(const t of e){if(!pf(t))break;if(aA(t))return t}}function cA(e){const t=Se(e);return void 0!==t&&pf(t)&&aA(t)}function lA(e){return 226===e.kind&&28===e.operatorToken.kind}function uA(e){return lA(e)||TP(e)}function _A(e){return tP(e)&&Mm(e)&&!!ol(e)}function dA(e){const t=al(e);return xn.assertIsDefined(t),t}function pA(e,t=15){switch(e.kind){case 217:return!(16&t&&_A(e))&&0!=(1&t);case 216:case 234:case 233:case 238:return 0!=(2&t);case 235:return 0!=(4&t);case 354:return 0!=(8&t)}return!1}function fA(e,t=15){for(;pA(e,t);)e=e.expression;return e}function mA(e,t=15){let n=e.parent;for(;pA(n,t);)n=n.parent,xn.assert(n);return n}function gA(e){return fA(e,6)}function hA(e){return pw(e,!0)}function yA(e){const t=fc(e,qN),n=t&&t.emitNode;return n&&n.externalHelpersModuleName}function vA(e){const t=fc(e,qN),n=t&&t.emitNode;return!(!n||!n.externalHelpersModuleName&&!n.externalHelpers)}function bA(e,t,n,r,i,o,a){if(r.importHelpers&&hp(n,r)){let s;const c=DS(r);if(c>=5&&c<=99||99===n.impliedNodeFormat){const r=Ew(n);if(r){const i=[];for(const e of r)if(!e.scoped){const t=e.importName;t&&fe(i,t)}Q(i)&&(i.sort(Mt),s=e.createNamedImports(O(i,(r=>Pd(n,r)?e.createImportSpecifier(!1,void 0,e.createIdentifier(r)):e.createImportSpecifier(!1,e.createIdentifier(r),t.getUnscopedHelperName(r))))),tw(fc(n,qN)).externalHelpers=!0)}}else{const t=xA(e,n,r,i,o||a);t&&(s=e.createNamespaceImport(t))}if(s){const t=e.createImportDeclaration(void 0,e.createImportClause(!1,void 0,s),e.createStringLiteral(G_),void 0);return sw(t,2),t}}}function xA(e,t,n,r,i){if(n.importHelpers&&hp(t,n)){const o=yA(t);if(o)return o;const a=DS(n);let s=(r||FS(n)&&i)&&4!==a&&(a<5||1===t.impliedNodeFormat);if(!s){const e=Ew(t);if(e)for(const t of e)if(!t.scoped){s=!0;break}}if(s){const n=tw(fc(t,qN));return n.externalHelpersModuleName||(n.externalHelpersModuleName=e.createUniqueName(G_))}}}function SA(e,t,n){const r=wg(t);if(r&&!Dg(t)&&!Wd(t)){const t=r.name;return Xl(t)?t:e.createIdentifier(Kd(n,t)||bc(t))}return 272===t.kind&&t.importClause||278===t.kind&&t.moduleSpecifier?e.getGeneratedNameForNode(t):void 0}function kA(e,t,n,r,i,o){const a=Cg(t);if(a&&wD(a))return function(e,t,n,r,i){return TA(n,r.getExternalModuleFileFromDeclaration(e),t,i)}(t,r,e,i,o)||function(e,t,n){const r=n.renamedDependencies&&n.renamedDependencies.get(t.text);return r?e.createStringLiteral(r):void 0}(e,a,n)||e.cloneNode(a)}function TA(e,t,n,r){if(t)return t.moduleName?e.createStringLiteral(t.moduleName):!t.isDeclarationFile&&r.outFile?e.createStringLiteral(Qy(n,t.fileName)):void 0}function CA(e){if(Fu(e))return e.initializer;if(BN(e)){const t=e.initializer;return mb(t,!0)?t.right:void 0}return JN(e)?e.objectAssignmentInitializer:mb(e,!0)?e.right:fP(e)?CA(e.expression):void 0}function wA(e){if(Fu(e))return e.name;if(!Cu(e))return mb(e,!0)?wA(e.left):fP(e)?wA(e.expression):e;switch(e.kind){case 303:return wA(e.initializer);case 304:return e.name;case 305:return wA(e.expression)}}function DA(e){switch(e.kind){case 169:case 208:return e.dotDotDotToken;case 230:case 305:return e}}function EA(e){const t=PA(e);return xn.assert(!!t||zN(e),"Invalid property name for binding element."),t}function PA(e){switch(e.kind){case 208:if(e.propertyName){const t=e.propertyName;return VD(t)?xn.failBadSyntaxKind(t):oE(t)&&NA(t.expression)?t.expression:t}break;case 303:if(e.name){const t=e.name;return VD(t)?xn.failBadSyntaxKind(t):oE(t)&&NA(t.expression)?t.expression:t}break;case 305:return e.name&&VD(e.name)?xn.failBadSyntaxKind(e.name):e.name}const t=wA(e);if(t&&au(t))return t}function NA(e){const t=e.kind;return 11===t||9===t}function FA(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function AA(e){if(e){let t=e;for(;;){if(qD(t)||!t.body)return qD(t)?t:t.name;t=t.body}}}function IA(e){const t=e.kind;return 176===t||178===t}function OA(e){const t=e.kind;return 176===t||177===t||178===t}function MA(e){const t=e.kind;return 303===t||304===t||262===t||176===t||181===t||175===t||282===t||243===t||264===t||265===t||266===t||267===t||271===t||272===t||270===t||278===t||277===t}function LA(e){const t=e.kind;return 175===t||303===t||304===t||282===t||270===t}function jA(e){return BD(e)||RD(e)}function RA(e){return qD(e)||LE(e)}function BA(e){return XD(e)||MD(e)||LD(e)}function JA(e){return BD(e)||MD(e)||LD(e)}function zA(e){return qD(e)||wD(e)}function $A(e){const t=e.kind;return 106===t||112===t||97===t||Bl(e)||cP(e)}function qA(e){return function(e){return 48===e||49===e||50===e}(e)||function(e){return function(e){return 40===e||41===e}(e)||function(e){return function(e){return 43===e}(e)||function(e){return 42===e||44===e||45===e}(e)}(e)}(e)}function VA(e){return function(e){return 56===e||57===e}(e)||function(e){return function(e){return 51===e||52===e||53===e}(e)||function(e){return function(e){return 35===e||37===e||36===e||38===e}(e)||function(e){return function(e){return 30===e||33===e||32===e||34===e||104===e||103===e}(e)||qA(e)}(e)}(e)}(e)}function UA(e){return function(e){return 61===e||VA(e)||db(e)}(t=e.kind)||28===t;var t}function KA(e,t,n,r,i,o){const a=new class{constructor(e,t,n,r,i,o){this.onEnter=e,this.onLeft=t,this.onOperator=n,this.onRight=r,this.onExit=i,this.foldState=o}}(e,t,n,r,i,o);return function(e,t){const n={value:void 0},r=[OF.enter],i=[e],o=[void 0];let s=0;for(;r[s]!==OF.done;)s=r[s](a,s,r,i,o,n,t);return xn.assertEqual(s,0),n.value}}function WA(e){return 95===e||90===e}function HA(e){return WA(e.kind)}function GA(e){const t=e.kind;return tu(t)&&!WA(t)}function XA(e,t){if(void 0!==t)return 0===t.length?t:sI(e.createNodeArray([],t.hasTrailingComma),t)}function QA(e){var t;const n=e.emitNode.autoGenerate;if(4&n.flags){const r=n.id;let i=e,o=i.original;for(;o;){i=o;const e=null==(t=i.emitNode)?void 0:t.autoGenerate;if(hl(i)&&(void 0===e||4&e.flags&&e.id!==r))break;o=i.original}return i}return e}function YA(e,t){return"object"==typeof e?ZA(!1,e.prefix,e.node,e.suffix,t):"string"==typeof e?e.length>0&&35===e.charCodeAt(0)?e.slice(1):e:""}function ZA(e,t,n,r,i){return t=YA(t,i),r=YA(r,i),`${e?"#":""}${t}${n=function(e,t){return"string"==typeof e?e:function(e,t){return Ql(e)?t(e).slice(1):Xl(e)?t(e):VD(e)?e.escapedText.slice(1):bc(e)}(e,xn.checkDefined(t))}(n,i)}${r}`}function eI(e,t,n,r){return e.updatePropertyDeclaration(t,n,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage"),void 0,void 0,r)}function tI(e,t,n,r,i=e.createThis()){return e.createGetAccessorDeclaration(n,r,[],void 0,e.createBlock([e.createReturnStatement(e.createPropertyAccessExpression(i,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")))]))}function nI(e,t,n,r,i=e.createThis()){return e.createSetAccessorDeclaration(n,r,[e.createParameterDeclaration(void 0,void 0,"value")],e.createBlock([e.createExpressionStatement(e.createAssignment(e.createPropertyAccessExpression(i,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")),e.createIdentifier("value")))]))}function rI(e){let t=e.expression;for(;;)if(t=fA(t),TP(t))t=De(t.elements);else{if(!lA(t)){if(mb(t,!0)&&Xl(t.left))return t;break}t=t.right}}function iI(e,t){if(function(e){return tP(e)&&ly(e)&&!e.emitNode}(e))iI(e.expression,t);else if(lA(e))iI(e.left,t),iI(e.right,t);else if(TP(e))for(const n of e.elements)iI(n,t);else t.push(e)}function oI(e){const t=[];return iI(e,t),t}function aI(e){if(65536&e.transformFlags)return!0;if(128&e.transformFlags)for(const t of FA(e)){const e=wA(t);if(e&&Pu(e)){if(65536&e.transformFlags)return!0;if(128&e.transformFlags&&aI(e))return!0}}return!1}function sI(e,t){return t?FT(e,t.pos,t.end):e}function cI(e){const t=e.kind;return 168===t||169===t||171===t||172===t||173===t||174===t||176===t||177===t||178===t||181===t||185===t||218===t||219===t||231===t||243===t||262===t||263===t||264===t||265===t||266===t||267===t||271===t||272===t||277===t||278===t}function lI(e){const t=e.kind;return 169===t||172===t||174===t||177===t||178===t||231===t||263===t}(e=>{function t(e,n,r,i,o,a,c){const l=n>0?o[n-1]:void 0;return xn.assertEqual(r[n],t),o[n]=e.onEnter(i[n],l,c),r[n]=s(e,t),n}function n(e,t,r,i,o,a,u){xn.assertEqual(r[t],n),xn.assertIsDefined(e.onLeft),r[t]=s(e,n);const _=e.onLeft(i[t].left,o[t],i[t]);return _?(l(t,i,_),c(t,r,i,o,_)):t}function r(e,t,n,i,o,a,c){return xn.assertEqual(n[t],r),xn.assertIsDefined(e.onOperator),n[t]=s(e,r),e.onOperator(i[t].operatorToken,o[t],i[t]),t}function i(e,t,n,r,o,a,u){xn.assertEqual(n[t],i),xn.assertIsDefined(e.onRight),n[t]=s(e,i);const _=e.onRight(r[t].right,o[t],r[t]);return _?(l(t,r,_),c(t,n,r,o,_)):t}function o(e,t,n,r,i,a,c){xn.assertEqual(n[t],o),n[t]=s(e,o);const l=e.onExit(r[t],i[t]);if(t>0){if(t--,e.foldState){const r=n[t]===o?"right":"left";i[t]=e.foldState(i[t],l,r)}}else a.value=l;return t}function a(e,t,n,r,i,o,s){return xn.assertEqual(n[t],a),t}function s(e,s){switch(s){case t:if(e.onLeft)return n;case n:if(e.onOperator)return r;case r:if(e.onRight)return i;case i:return o;case o:case a:return a;default:xn.fail("Invalid state")}}function c(e,n,r,i,o){return n[++e]=t,r[e]=o,i[e]=void 0,e}function l(e,t,n){if(xn.shouldAssert(2))for(;e>=0;)xn.assert(t[e]!==n,"Circular traversal detected."),e--}e.enter=t,e.left=n,e.operator=r,e.right=i,e.exit=o,e.done=a,e.nextState=s})(OF||(OF={}));var uI={createBaseSourceFileNode:e=>new(BF||(BF=Hx.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(jF||(jF=Hx.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(RF||(RF=Hx.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(LF||(LF=Hx.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(MF||(MF=Hx.getNodeConstructor()))(e,-1,-1)},_I=JC(1,uI);function dI(e,t){return t&&e(t)}function pI(e,t,n){if(n){if(t)return t(n);for(const t of n){const n=e(t);if(n)return n}}}function fI(e,t){return 42===e.charCodeAt(t+1)&&42===e.charCodeAt(t+2)&&47!==e.charCodeAt(t+3)}function mI(e){return f(e.statements,gI)||function(e){return 8388608&e.flags?hI(e):void 0}(e)}function gI(e){return cI(e)&&function(e,t){return Q(e.modifiers,(e=>95===e.kind))}(e)||rN(e)&&SN(e.moduleReference)||iN(e)||mN(e)||gN(e)?e:void 0}function hI(e){return function(e){return xP(e)&&102===e.keywordToken&&"meta"===e.name.escapedText}(e)?e:LI(e,hI)}var yI,vI={166:function(e,t,n){return dI(t,e.left)||dI(t,e.right)},168:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.constraint)||dI(t,e.default)||dI(t,e.expression)},304:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.exclamationToken)||dI(t,e.equalsToken)||dI(t,e.objectAssignmentInitializer)},305:function(e,t,n){return dI(t,e.expression)},169:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.dotDotDotToken)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.type)||dI(t,e.initializer)},172:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.exclamationToken)||dI(t,e.type)||dI(t,e.initializer)},171:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.type)||dI(t,e.initializer)},303:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.exclamationToken)||dI(t,e.initializer)},260:function(e,t,n){return dI(t,e.name)||dI(t,e.exclamationToken)||dI(t,e.type)||dI(t,e.initializer)},208:function(e,t,n){return dI(t,e.dotDotDotToken)||dI(t,e.propertyName)||dI(t,e.name)||dI(t,e.initializer)},181:function(e,t,n){return pI(t,n,e.modifiers)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)},185:function(e,t,n){return pI(t,n,e.modifiers)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)},184:function(e,t,n){return pI(t,n,e.modifiers)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)},179:bI,180:bI,174:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.asteriskToken)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.exclamationToken)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},173:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.questionToken)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)},176:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},177:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},178:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},262:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.asteriskToken)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},218:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.asteriskToken)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.body)},219:function(e,t,n){return pI(t,n,e.modifiers)||pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)||dI(t,e.equalsGreaterThanToken)||dI(t,e.body)},175:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.body)},183:function(e,t,n){return dI(t,e.typeName)||pI(t,n,e.typeArguments)},182:function(e,t,n){return dI(t,e.assertsModifier)||dI(t,e.parameterName)||dI(t,e.type)},186:function(e,t,n){return dI(t,e.exprName)||pI(t,n,e.typeArguments)},187:function(e,t,n){return pI(t,n,e.members)},188:function(e,t,n){return dI(t,e.elementType)},189:function(e,t,n){return pI(t,n,e.elements)},192:xI,193:xI,194:function(e,t,n){return dI(t,e.checkType)||dI(t,e.extendsType)||dI(t,e.trueType)||dI(t,e.falseType)},195:function(e,t,n){return dI(t,e.typeParameter)},205:function(e,t,n){return dI(t,e.argument)||dI(t,e.attributes)||dI(t,e.qualifier)||pI(t,n,e.typeArguments)},302:function(e,t,n){return dI(t,e.assertClause)},196:SI,198:SI,199:function(e,t,n){return dI(t,e.objectType)||dI(t,e.indexType)},200:function(e,t,n){return dI(t,e.readonlyToken)||dI(t,e.typeParameter)||dI(t,e.nameType)||dI(t,e.questionToken)||dI(t,e.type)||pI(t,n,e.members)},201:function(e,t,n){return dI(t,e.literal)},202:function(e,t,n){return dI(t,e.dotDotDotToken)||dI(t,e.name)||dI(t,e.questionToken)||dI(t,e.type)},206:kI,207:kI,209:function(e,t,n){return pI(t,n,e.elements)},210:function(e,t,n){return pI(t,n,e.properties)},211:function(e,t,n){return dI(t,e.expression)||dI(t,e.questionDotToken)||dI(t,e.name)},212:function(e,t,n){return dI(t,e.expression)||dI(t,e.questionDotToken)||dI(t,e.argumentExpression)},213:TI,214:TI,215:function(e,t,n){return dI(t,e.tag)||dI(t,e.questionDotToken)||pI(t,n,e.typeArguments)||dI(t,e.template)},216:function(e,t,n){return dI(t,e.type)||dI(t,e.expression)},217:function(e,t,n){return dI(t,e.expression)},220:function(e,t,n){return dI(t,e.expression)},221:function(e,t,n){return dI(t,e.expression)},222:function(e,t,n){return dI(t,e.expression)},224:function(e,t,n){return dI(t,e.operand)},229:function(e,t,n){return dI(t,e.asteriskToken)||dI(t,e.expression)},223:function(e,t,n){return dI(t,e.expression)},225:function(e,t,n){return dI(t,e.operand)},226:function(e,t,n){return dI(t,e.left)||dI(t,e.operatorToken)||dI(t,e.right)},234:function(e,t,n){return dI(t,e.expression)||dI(t,e.type)},235:function(e,t,n){return dI(t,e.expression)},238:function(e,t,n){return dI(t,e.expression)||dI(t,e.type)},236:function(e,t,n){return dI(t,e.name)},227:function(e,t,n){return dI(t,e.condition)||dI(t,e.questionToken)||dI(t,e.whenTrue)||dI(t,e.colonToken)||dI(t,e.whenFalse)},230:function(e,t,n){return dI(t,e.expression)},241:CI,268:CI,307:function(e,t,n){return pI(t,n,e.statements)||dI(t,e.endOfFileToken)},243:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.declarationList)},261:function(e,t,n){return pI(t,n,e.declarations)},244:function(e,t,n){return dI(t,e.expression)},245:function(e,t,n){return dI(t,e.expression)||dI(t,e.thenStatement)||dI(t,e.elseStatement)},246:function(e,t,n){return dI(t,e.statement)||dI(t,e.expression)},247:function(e,t,n){return dI(t,e.expression)||dI(t,e.statement)},248:function(e,t,n){return dI(t,e.initializer)||dI(t,e.condition)||dI(t,e.incrementor)||dI(t,e.statement)},249:function(e,t,n){return dI(t,e.initializer)||dI(t,e.expression)||dI(t,e.statement)},250:function(e,t,n){return dI(t,e.awaitModifier)||dI(t,e.initializer)||dI(t,e.expression)||dI(t,e.statement)},251:wI,252:wI,253:function(e,t,n){return dI(t,e.expression)},254:function(e,t,n){return dI(t,e.expression)||dI(t,e.statement)},255:function(e,t,n){return dI(t,e.expression)||dI(t,e.caseBlock)},269:function(e,t,n){return pI(t,n,e.clauses)},296:function(e,t,n){return dI(t,e.expression)||pI(t,n,e.statements)},297:function(e,t,n){return pI(t,n,e.statements)},256:function(e,t,n){return dI(t,e.label)||dI(t,e.statement)},257:function(e,t,n){return dI(t,e.expression)},258:function(e,t,n){return dI(t,e.tryBlock)||dI(t,e.catchClause)||dI(t,e.finallyBlock)},299:function(e,t,n){return dI(t,e.variableDeclaration)||dI(t,e.block)},170:function(e,t,n){return dI(t,e.expression)},263:DI,231:DI,264:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.heritageClauses)||pI(t,n,e.members)},265:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||dI(t,e.type)},266:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.members)},306:function(e,t,n){return dI(t,e.name)||dI(t,e.initializer)},267:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.body)},271:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||dI(t,e.moduleReference)},272:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.importClause)||dI(t,e.moduleSpecifier)||dI(t,e.attributes)},273:function(e,t,n){return dI(t,e.name)||dI(t,e.namedBindings)},300:function(e,t,n){return pI(t,n,e.elements)},301:function(e,t,n){return dI(t,e.name)||dI(t,e.value)},270:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)},274:function(e,t,n){return dI(t,e.name)},280:function(e,t,n){return dI(t,e.name)},275:EI,279:EI,278:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.exportClause)||dI(t,e.moduleSpecifier)||dI(t,e.attributes)},276:PI,281:PI,277:function(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.expression)},228:function(e,t,n){return dI(t,e.head)||pI(t,n,e.templateSpans)},239:function(e,t,n){return dI(t,e.expression)||dI(t,e.literal)},203:function(e,t,n){return dI(t,e.head)||pI(t,n,e.templateSpans)},204:function(e,t,n){return dI(t,e.type)||dI(t,e.literal)},167:function(e,t,n){return dI(t,e.expression)},298:function(e,t,n){return pI(t,n,e.types)},233:function(e,t,n){return dI(t,e.expression)||pI(t,n,e.typeArguments)},283:function(e,t,n){return dI(t,e.expression)},282:function(e,t,n){return pI(t,n,e.modifiers)},355:function(e,t,n){return pI(t,n,e.elements)},284:function(e,t,n){return dI(t,e.openingElement)||pI(t,n,e.children)||dI(t,e.closingElement)},288:function(e,t,n){return dI(t,e.openingFragment)||pI(t,n,e.children)||dI(t,e.closingFragment)},285:NI,286:NI,292:function(e,t,n){return pI(t,n,e.properties)},291:function(e,t,n){return dI(t,e.name)||dI(t,e.initializer)},293:function(e,t,n){return dI(t,e.expression)},294:function(e,t,n){return dI(t,e.dotDotDotToken)||dI(t,e.expression)},287:function(e,t,n){return dI(t,e.tagName)},295:function(e,t,n){return dI(t,e.namespace)||dI(t,e.name)},190:FI,191:FI,309:FI,315:FI,314:FI,316:FI,318:FI,317:function(e,t,n){return pI(t,n,e.parameters)||dI(t,e.type)},320:function(e,t,n){return("string"==typeof e.comment?void 0:pI(t,n,e.comment))||pI(t,n,e.tags)},347:function(e,t,n){return dI(t,e.tagName)||dI(t,e.name)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},310:function(e,t,n){return dI(t,e.name)},311:function(e,t,n){return dI(t,e.left)||dI(t,e.right)},341:AI,348:AI,330:function(e,t,n){return dI(t,e.tagName)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},329:function(e,t,n){return dI(t,e.tagName)||dI(t,e.class)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},328:function(e,t,n){return dI(t,e.tagName)||dI(t,e.class)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},345:function(e,t,n){return dI(t,e.tagName)||dI(t,e.constraint)||pI(t,n,e.typeParameters)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},346:function(e,t,n){return dI(t,e.tagName)||(e.typeExpression&&309===e.typeExpression.kind?dI(t,e.typeExpression)||dI(t,e.fullName)||("string"==typeof e.comment?void 0:pI(t,n,e.comment)):dI(t,e.fullName)||dI(t,e.typeExpression)||("string"==typeof e.comment?void 0:pI(t,n,e.comment)))},338:function(e,t,n){return dI(t,e.tagName)||dI(t,e.fullName)||dI(t,e.typeExpression)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},342:II,344:II,343:II,340:II,350:II,349:II,339:II,323:function(e,t,n){return f(e.typeParameters,t)||f(e.parameters,t)||dI(t,e.type)},324:OI,325:OI,326:OI,322:function(e,t,n){return f(e.jsDocPropertyTags,t)},327:MI,332:MI,333:MI,334:MI,335:MI,336:MI,331:MI,337:MI,351:function(e,t,n){return dI(t,e.tagName)||dI(t,e.importClause)||dI(t,e.moduleSpecifier)||dI(t,e.attributes)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))},354:function(e,t,n){return dI(t,e.expression)}};function bI(e,t,n){return pI(t,n,e.typeParameters)||pI(t,n,e.parameters)||dI(t,e.type)}function xI(e,t,n){return pI(t,n,e.types)}function SI(e,t,n){return dI(t,e.type)}function kI(e,t,n){return pI(t,n,e.elements)}function TI(e,t,n){return dI(t,e.expression)||dI(t,e.questionDotToken)||pI(t,n,e.typeArguments)||pI(t,n,e.arguments)}function CI(e,t,n){return pI(t,n,e.statements)}function wI(e,t,n){return dI(t,e.label)}function DI(e,t,n){return pI(t,n,e.modifiers)||dI(t,e.name)||pI(t,n,e.typeParameters)||pI(t,n,e.heritageClauses)||pI(t,n,e.members)}function EI(e,t,n){return pI(t,n,e.elements)}function PI(e,t,n){return dI(t,e.propertyName)||dI(t,e.name)}function NI(e,t,n){return dI(t,e.tagName)||pI(t,n,e.typeArguments)||dI(t,e.attributes)}function FI(e,t,n){return dI(t,e.type)}function AI(e,t,n){return dI(t,e.tagName)||(e.isNameFirst?dI(t,e.name)||dI(t,e.typeExpression):dI(t,e.typeExpression)||dI(t,e.name))||("string"==typeof e.comment?void 0:pI(t,n,e.comment))}function II(e,t,n){return dI(t,e.tagName)||dI(t,e.typeExpression)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))}function OI(e,t,n){return dI(t,e.name)}function MI(e,t,n){return dI(t,e.tagName)||("string"==typeof e.comment?void 0:pI(t,n,e.comment))}function LI(e,t,n){if(void 0===e||e.kind<=165)return;const r=vI[e.kind];return void 0===r?void 0:r(e,t,n)}function jI(e,t,n){const r=RI(e),i=[];for(;i.length=0;--t)r.push(e[t]),i.push(o)}else{const n=t(e,o);if(n){if("skip"===n)continue;return n}if(e.kind>=166)for(const t of RI(e))r.push(t),i.push(e)}}}function RI(e){const t=[];return LI(e,n,n),t;function n(e){t.unshift(e)}}function BI(e){e.externalModuleIndicator=mI(e)}function JI(e,t,n,r=!1,i){var o,a,s,c;let l;null==(o=or)||o.push(or.Phase.Parse,"createSourceFile",{path:e},!0),pr("beforeParse"),null==(a=tr)||a.logStartParseSourceFile(e);const{languageVersion:u,setExternalModuleIndicator:_,impliedNodeFormat:d,jsDocParsingMode:p}="object"==typeof n?n:{languageVersion:n};if(100===u)l=yI.parseSourceFile(e,t,u,void 0,r,6,_t,p);else{const n=void 0===d?_:e=>(e.impliedNodeFormat=d,(_||BI)(e));l=yI.parseSourceFile(e,t,u,void 0,r,i,n,p)}return null==(s=tr)||s.logStopParseSourceFile(),pr("afterParse"),fr("Parse","beforeParse","afterParse"),null==(c=or)||c.pop(),l}function zI(e,t){return yI.parseIsolatedEntityName(e,t)}function $I(e,t){return yI.parseJsonText(e,t)}function qI(e){return void 0!==e.externalModuleIndicator}function VI(e,t,n,r=!1){const i=WI.updateSourceFile(e,t,n,r);return i.flags|=12582912&e.flags,i}function UI(e,t,n){const r=yI.JSDocParser.parseIsolatedJSDocComment(e,t,n);return r&&r.jsDoc&&yI.fixupParentReferences(r.jsDoc),r}function KI(e,t,n){return yI.JSDocParser.parseJSDocTypeExpressionForTests(e,t,n)}(e=>{var t,n,r,i,o,a=Cs(99,!0);function s(e){return b++,e}var c,l,d,p,f,m,g,h,y,v,b,x,S,k,C,w,D=JC(11,{createBaseSourceFileNode:e=>s(new o(e,0,0)),createBaseIdentifierNode:e=>s(new r(e,0,0)),createBasePrivateIdentifierNode:e=>s(new i(e,0,0)),createBaseTokenNode:e=>s(new n(e,0,0)),createBaseNode:e=>s(new t(e,0,0))}),{createNodeArray:E,createNumericLiteral:P,createStringLiteral:N,createLiteralLikeNode:F,createIdentifier:A,createPrivateIdentifier:I,createToken:O,createArrayLiteralExpression:M,createObjectLiteralExpression:L,createPropertyAccessExpression:j,createPropertyAccessChain:R,createElementAccessExpression:B,createElementAccessChain:J,createCallExpression:z,createCallChain:$,createNewExpression:V,createParenthesizedExpression:U,createBlock:K,createVariableStatement:W,createExpressionStatement:H,createIfStatement:G,createWhileStatement:X,createForStatement:Y,createForOfStatement:ee,createVariableDeclaration:te,createVariableDeclarationList:ne}=D,re=!0,ie=!1;function oe(e,t,n=2,r,i=!1){ae(e,t,n,r,6,0),l=w,Ve();const o=Be();let a,s;if(1===ze())a=bt([],o,o),s=gt();else{let e;for(;1!==ze();){let t;switch(ze()){case 23:t=ri();break;case 112:case 97:case 106:t=gt();break;case 41:t=et((()=>9===Ve()&&59!==Ve()))?Ar():oi();break;case 9:case 11:if(et((()=>59!==Ve()))){t=pn();break}default:t=oi()}e&&ot(e)?e.push(t):e?e=[e,t]:(e=t,1!==ze()&&Oe(va.Unexpected_token))}const t=ot(e)?xt(M(e),o):xn.checkDefined(e),n=H(t);xt(n,o),a=bt([n],o),s=ft(1,va.Unexpected_token)}const c=de(e,2,6,!1,a,s,l,_t);i&&_e(c),c.nodeCount=b,c.identifierCount=S,c.identifiers=x,c.parseDiagnostics=oS(g,c),h&&(c.jsDocDiagnostics=oS(h,c));const u=c;return se(),u}function ae(e,s,u,_,h,v){switch(t=Hx.getNodeConstructor(),n=Hx.getTokenConstructor(),r=Hx.getIdentifierConstructor(),i=Hx.getPrivateIdentifierConstructor(),o=Hx.getSourceFileConstructor(),c=Xo(e),d=s,p=u,y=_,f=h,m=bS(h),g=[],k=0,x=new Map,S=0,b=0,l=0,re=!0,f){case 1:case 2:w=524288;break;case 6:w=134742016;break;default:w=0}ie=!1,a.setText(d),a.setOnError(Re),a.setScriptTarget(p),a.setLanguageVariant(m),a.setScriptKind(f),a.setJSDocParsingMode(v)}function se(){a.clearCommentDirectives(),a.setText(""),a.setOnError(void 0),a.setScriptKind(0),a.setJSDocParsingMode(0),d=void 0,p=void 0,y=void 0,f=void 0,m=void 0,l=0,g=void 0,h=void 0,k=0,x=void 0,C=void 0,re=!0}e.parseSourceFile=function(e,t,n,r,i=!1,o,s,p=0){var f;if(6===(o=Ek(e,o))){const o=oe(e,t,n,r,i);return TM(o,null==(f=o.statements[0])?void 0:f.expression,o.parseDiagnostics,!1,void 0),o.referencedFiles=u,o.typeReferenceDirectives=u,o.libReferenceDirectives=u,o.amdDependencies=u,o.hasNoDefaultLib=!1,o.pragmas=_,o}ae(e,t,n,r,o,p);const m=function(e,t,n,r,i){const o=QI(c);o&&(w|=33554432),l=w,Ve();const s=Gt(0,Ci);xn.assert(1===ze());const u=Je(),_=le(gt(),u),p=de(c,e,n,o,s,_,l,r);return ZI(p,d),eO(p,(function(e,t,n){g.push(nS(c,d,e,t,n))})),p.commentDirectives=a.getCommentDirectives(),p.nodeCount=b,p.identifierCount=S,p.identifiers=x,p.parseDiagnostics=oS(g,p),p.jsDocParsingMode=i,h&&(p.jsDocDiagnostics=oS(h,p)),t&&_e(p),p}(n,i,o,s||BI,p);return se(),m},e.parseIsolatedEntityName=function(e,t){ae("",e,t,void 0,1,0),Ve();const n=on(!0),r=1===ze()&&!g.length;return se(),r?n:void 0},e.parseJsonText=oe;let ce=!1;function le(e,t){if(!t)return e;xn.assert(!e.jsDoc);const n=q(vf(e,d),(t=>Do.parseJSDocComment(e,t.pos,t.end-t.pos)));return n.length&&(e.jsDoc=n),ce&&(ce=!1,e.flags|=536870912),e}function _e(e){LT(e,!0)}function de(e,t,n,r,i,o,s,c){let l=D.createSourceFile(i,o,s);if(AT(l,0,d.length),u(l),!r&&qI(l)&&67108864&l.transformFlags){const e=l;l=function(e){const t=y,n=WI.createSyntaxCursor(e);y={currentNode:function(e){const t=n.currentNode(e);return re&&t&&c(t)&&XI(t),t}};const r=[],i=g;g=[];let o=0,s=l(e.statements,0);for(;-1!==s;){const t=e.statements[o],n=e.statements[s];pe(r,e.statements,o,s),o=u(e.statements,s);const c=T(i,(e=>e.start>=t.pos)),_=c>=0?T(i,(e=>e.start>=n.pos),c):-1;c>=0&&pe(g,i,c,_>=0?_:void 0),Ze((()=>{const t=w;for(w|=65536,a.resetTokenState(n.pos),Ve();1!==ze();){const t=a.getTokenFullStart(),n=Xt(0,Ci);if(r.push(n),t===a.getTokenFullStart()&&Ve(),o>=0){const t=e.statements[o];if(n.end===t.pos)break;n.end>t.pos&&(o=u(e.statements,o+1))}}w=t}),2),s=o>=0?l(e.statements,o):-1}if(o>=0){const t=e.statements[o];pe(r,e.statements,o);const n=T(i,(e=>e.start>=t.pos));n>=0&&pe(g,i,n)}return y=t,D.updateSourceFile(e,sI(E(r),e.statements));function c(e){return!(65536&e.flags||!(67108864&e.transformFlags))}function l(e,t){for(let n=t;n118}function rt(){return 80===ze()||(127!==ze()||!Pe())&&(135!==ze()||!Ie())&&ze()>118}function it(e,t,n=!0){return ze()===e?(n&&Ve(),!0):(t?Oe(t):Oe(va._0_expected,Ra(e)),!1)}e.fixupParentReferences=_e;const at=Object.keys(Sa).filter((e=>e.length>2));function st(e){if(ZE(e))return void Le(as(d,e.template.pos),e.template.end,va.Module_declaration_names_may_only_use_or_quoted_strings);const t=qD(e)?bc(e):void 0;if(!t||!Ts(t,p))return void Oe(va._0_expected,Ra(27));const n=as(d,e.pos);switch(t){case"const":case"let":case"var":return void Le(n,e.end,va.Variable_declaration_not_allowed_at_this_location);case"declare":return;case"interface":return void ct(va.Interface_name_cannot_be_0,va.Interface_must_be_given_a_name,19);case"is":return void Le(n,a.getTokenStart(),va.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);case"module":case"namespace":return void ct(va.Namespace_name_cannot_be_0,va.Namespace_must_be_given_a_name,19);case"type":return void ct(va.Type_alias_name_cannot_be_0,va.Type_alias_must_be_given_a_name,64)}const r=Ut(t,at,mt)??function(e){for(const t of at)if(e.length>t.length+2&&an(e,t))return`${t} ${e.slice(t.length)}`}(t);r?Le(n,e.end,va.Unknown_keyword_or_identifier_Did_you_mean_0,r):0!==ze()&&Le(n,e.end,va.Unexpected_keyword_or_identifier)}function ct(e,t,n){ze()===n?Oe(t):Oe(e,a.getTokenValue())}function lt(e){return ze()===e?(Ue(),!0):(xn.assert(Fh(e)),Oe(va._0_expected,Ra(e)),!1)}function ut(e,t,n,r){if(ze()===t)return void Ve();const i=Oe(va._0_expected,Ra(t));n&&i&&fT(i,nS(c,d,r,1,va.The_parser_expected_to_find_a_1_to_match_the_0_token_here,Ra(e),Ra(t)))}function dt(e){return ze()===e&&(Ve(),!0)}function pt(e){if(ze()===e)return gt()}function ft(e,t,n){return pt(e)||St(e,!1,t||va._0_expected,n||Ra(e))}function gt(){const e=Be(),t=ze();return Ve(),xt(O(t),e)}function ht(){return 27===ze()||20===ze()||1===ze()||a.hasPrecedingLineBreak()}function yt(){return!!ht()&&(27===ze()&&Ve(),!0)}function vt(){return yt()||it(27)}function bt(e,t,n,r){const i=E(e,r);return FT(i,t,n??a.getTokenFullStart()),i}function xt(e,t,n){return FT(e,t,n??a.getTokenFullStart()),w&&(e.flags|=w),ie&&(ie=!1,e.flags|=262144),e}function St(e,t,n,...r){t?Me(a.getTokenFullStart(),0,n,...r):n&&Oe(n,...r);const i=Be();return xt(80===e?A("",void 0):zl(e)?D.createTemplateLiteralLikeNode(e,"","",void 0):9===e?P("",void 0):11===e?N("",void 0):282===e?D.createMissingDeclaration():O(e),i)}function kt(e){let t=x.get(e);return void 0===t&&x.set(e,t=e),t}function Tt(e,t,n){if(e){S++;const e=Be(),t=ze(),n=kt(a.getTokenValue()),r=a.hasExtendedUnicodeEscape();return $e(),xt(A(n,t,r),e)}if(81===ze())return Oe(n||va.Private_identifiers_are_not_allowed_outside_class_bodies),Tt(!0);if(0===ze()&&a.tryScan((()=>80===a.reScanInvalidIdentifier())))return Tt(!0);S++;const r=1===ze(),i=a.isReservedWord(),o=a.getTokenText(),s=i?va.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:va.Identifier_expected;return St(80,r,t||s,o)}function Ct(e){return Tt(nt(),void 0,e)}function wt(e,t){return Tt(rt(),e,t)}function Dt(e){return Tt(ba(ze()),e)}function Et(){return(a.hasUnicodeEscape()||a.hasExtendedUnicodeEscape())&&Oe(va.Unicode_escape_sequence_cannot_appear_here),Tt(ba(ze()))}function Pt(){return ba(ze())||11===ze()||9===ze()}function Nt(){return function(e){if(11===ze()||9===ze()){const e=pn();return e.text=kt(e.text),e}return e&&23===ze()?function(){const e=Be();it(23);const t=xe(yr);return it(24),xt(D.createComputedPropertyName(t),e)}():81===ze()?Ft():Dt()}(!0)}function Ft(){const e=Be(),t=I(kt(a.getTokenValue()));return Ve(),xt(t,e)}function At(e){return ze()===e&&tt(Ot)}function It(){return Ve(),!a.hasPrecedingLineBreak()&&jt()}function Ot(){switch(ze()){case 87:return 94===Ve();case 95:return Ve(),90===ze()?et(Rt):156===ze()?et(Lt):Mt();case 90:return Rt();case 126:case 139:case 153:return Ve(),jt();default:return It()}}function Mt(){return 60===ze()||42!==ze()&&130!==ze()&&19!==ze()&&jt()}function Lt(){return Ve(),Mt()}function jt(){return 23===ze()||19===ze()||42===ze()||26===ze()||Pt()}function Rt(){return Ve(),86===ze()||100===ze()||120===ze()||60===ze()||128===ze()&&et(pi)||134===ze()&&et(fi)}function Bt(e,t){if(Qt(e))return!0;switch(e){case 0:case 1:case 3:return!(27===ze()&&t)&&yi();case 2:return 84===ze()||90===ze();case 4:return et(jn);case 5:return et(Ki)||27===ze()&&!t;case 6:return 23===ze()||Pt();case 12:switch(ze()){case 23:case 42:case 26:case 25:return!0;default:return Pt()}case 18:return Pt();case 9:return 23===ze()||26===ze()||Pt();case 24:return ba(ze())||11===ze();case 7:return 19===ze()?et(Jt):t?rt()&&!Vt():gr()&&!Vt();case 8:return Oi();case 10:return 28===ze()||26===ze()||Oi();case 19:return 103===ze()||87===ze()||rt();case 15:switch(ze()){case 28:case 25:return!0}case 11:return 26===ze()||hr();case 16:return wn(!1);case 17:return wn(!0);case 20:case 21:return 28===ze()||tr();case 22:return oo();case 23:return(161!==ze()||!et(Pi))&&ba(ze());case 13:return ba(ze())||19===ze();case 14:case 25:return!0;case 26:return xn.fail("ParsingContext.Count used as a context");default:xn.assertNever(e,"Non-exhaustive case in 'isListElement'.")}}function Jt(){if(xn.assert(19===ze()),20===Ve()){const e=Ve();return 28===e||19===e||96===e||119===e}return!0}function zt(){return Ve(),rt()}function $t(){return Ve(),ba(ze())}function qt(){return Ve(),xa(ze())}function Vt(){return(119===ze()||96===ze())&&et(Kt)}function Kt(){return Ve(),hr()}function Wt(){return Ve(),tr()}function Ht(e){if(1===ze())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return 20===ze();case 3:return 20===ze()||84===ze()||90===ze();case 7:return 19===ze()||96===ze()||119===ze();case 8:return!!ht()||!!Dr(ze())||39===ze();case 19:return 32===ze()||21===ze()||19===ze()||96===ze()||119===ze();case 11:return 22===ze()||27===ze();case 15:case 21:case 10:return 24===ze();case 17:case 16:case 18:return 22===ze()||24===ze();case 20:return 28!==ze();case 22:return 19===ze()||20===ze();case 13:return 32===ze()||44===ze();case 14:return 30===ze()&&et(po);default:return!1}}function Gt(e,t){const n=k;k|=1<=0)}function tn(e){return 6===e?va.An_enum_member_name_must_be_followed_by_a_or:void 0}function nn(){const e=bt([],Be());return e.isMissingList=!0,e}function rn(e,t,n,r){if(it(n)){const n=en(e,t);return it(r),n}return nn()}function on(e,t){const n=Be();let r=e?Dt(t):wt(t);for(;dt(25)&&30!==ze();)r=xt(D.createQualifiedName(r,cn(e,!1,!0)),n);return r}function sn(e,t){return xt(D.createQualifiedName(e,t),e.pos)}function cn(e,t,n){if(a.hasPrecedingLineBreak()&&ba(ze())&&et(di))return St(80,!0,va.Identifier_expected);if(81===ze()){const e=Ft();return t?e:St(80,!0,va.Identifier_expected)}return e?n?Dt():Et():wt()}function ln(e){const t=Be();return xt(D.createTemplateExpression(fn(e),function(e){const t=Be(),n=[];let r;do{r=dn(e),n.push(r)}while(17===r.literal.kind);return bt(n,t)}(e)),t)}function un(){const e=Be();return xt(D.createTemplateLiteralTypeSpan(fr(),_n(!1)),e)}function _n(e){return 20===ze()?(He(e),function(){const e=mn(ze());return xn.assert(17===e.kind||18===e.kind,"Template fragment has wrong token kind"),e}()):ft(18,va._0_expected,Ra(20))}function dn(e){const t=Be();return xt(D.createTemplateSpan(xe(yr),_n(e)),t)}function pn(){return mn(ze())}function fn(e){!e&&26656&a.getTokenFlags()&&He(!1);const t=mn(ze());return xn.assert(16===t.kind,"Template head has wrong token kind"),t}function mn(e){const t=Be(),n=zl(e)?D.createTemplateLiteralLikeNode(e,a.getTokenValue(),function(e){const t=15===e||18===e,n=a.getTokenText();return n.substring(1,n.length-(a.isUnterminated()?0:t?1:2))}(e),7176&a.getTokenFlags()):9===e?P(a.getTokenValue(),a.getNumericLiteralFlags()):11===e?N(a.getTokenValue(),void 0,a.hasExtendedUnicodeEscape()):Rl(e)?F(e,a.getTokenValue()):xn.fail();return a.hasExtendedUnicodeEscape()&&(n.hasExtendedUnicodeEscape=!0),a.isUnterminated()&&(n.isUnterminated=!0),Ve(),xt(n,t)}function gn(){return on(!0,va.Type_expected)}function hn(){if(!a.hasPrecedingLineBreak()&&30===Ge())return rn(20,fr,30,32)}function yn(){const e=Be();return xt(D.createTypeReferenceNode(gn(),hn()),e)}function vn(e){switch(e.kind){case 183:return Nd(e.typeName);case 184:case 185:{const{parameters:t,type:n}=e;return!!t.isMissingList||vn(n)}case 196:return vn(e.type);default:return!1}}function bn(){const e=Be();return Ve(),xt(D.createThisTypeNode(),e)}function Sn(){const e=Be();let t;return 110!==ze()&&105!==ze()||(t=Dt(),it(59)),xt(D.createParameterDeclaration(void 0,void 0,t,void 0,kn(),void 0),e)}function kn(){a.setSkipJsDocLeadingAsterisks(!0);const e=Be();if(dt(144)){const t=D.createJSDocNamepathType(void 0);e:for(;;)switch(ze()){case 20:case 1:case 28:case 5:break e;default:Ue()}return a.setSkipJsDocLeadingAsterisks(!1),xt(t,e)}const t=dt(26);let n=dr();return a.setSkipJsDocLeadingAsterisks(!1),t&&(n=xt(D.createJSDocVariadicType(n),e)),64===ze()?(Ve(),xt(D.createJSDocOptionalType(n),e)):n}function Tn(){const e=Be(),t=Xi(!1,!0),n=wt();let r,i;dt(96)&&(tr()||!hr()?r=fr():i=Ir());const o=dt(64)?fr():void 0,a=D.createTypeParameterDeclaration(t,n,r,o);return a.expression=i,xt(a,e)}function Cn(){if(30===ze())return rn(19,Tn,30,32)}function wn(e){return 26===ze()||Oi()||tu(ze())||60===ze()||tr(!e)}function Dn(e){return En(e)}function En(e,t=!0){const n=Be(),r=Je(),i=e?Ce((()=>Xi(!0))):De((()=>Xi(!0)));if(110===ze()){const e=D.createParameterDeclaration(i,void 0,Tt(!0),void 0,mr(),void 0),t=Se(i);return t&&je(t,va.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),le(xt(e,n),r)}const o=re;re=!1;const a=pt(26);if(!t&&!nt()&&23!==ze()&&19!==ze())return;const s=le(xt(D.createParameterDeclaration(i,a,function(e){const t=Mi(va.Private_identifiers_cannot_be_used_as_parameters);return 0===pd(t)&&!Q(e)&&tu(ze())&&Ve(),t}(i),pt(58),mr(),vr()),n),r);return re=o,s}function Pn(e,t){if(function(e,t){return 39===e?(it(e),!0):!!dt(59)||!(!t||39!==ze())&&(Oe(va._0_expected,Ra(59)),Ve(),!0)}(e,t))return ke(dr)}function Nn(e,t){const n=Pe(),r=Ie();ge(!!(1&e)),ye(!!(2&e));const i=32&e?en(17,Sn):en(16,(()=>t?Dn(r):En(r,!1)));return ge(n),ye(r),i}function Fn(e){if(!it(21))return nn();const t=Nn(e,!0);return it(22),t}function An(){dt(28)||vt()}function In(e){const t=Be(),n=Je();180===e&&it(105);const r=Cn(),i=Fn(4),o=Pn(59,!0);return An(),le(xt(179===e?D.createCallSignature(r,i,o):D.createConstructSignature(r,i,o),t),n)}function On(){return 23===ze()&&et(Mn)}function Mn(){if(Ve(),26===ze()||24===ze())return!0;if(tu(ze())){if(Ve(),rt())return!0}else{if(!rt())return!1;Ve()}return 59===ze()||28===ze()||58===ze()&&(Ve(),59===ze()||28===ze()||24===ze())}function Ln(e,t,n){const r=rn(16,(()=>Dn(!1)),23,24),i=mr();return An(),le(xt(D.createIndexSignature(n,r,i),e),t)}function jn(){if(21===ze()||30===ze()||139===ze()||153===ze())return!0;let e=!1;for(;tu(ze());)e=!0,Ve();return 23===ze()||(Pt()&&(e=!0,Ve()),!!e&&(21===ze()||30===ze()||58===ze()||59===ze()||28===ze()||ht()))}function Rn(){if(21===ze()||30===ze())return In(179);if(105===ze()&&et(Bn))return In(180);const e=Be(),t=Je(),n=Xi(!1);return At(139)?Ui(e,t,n,177,4):At(153)?Ui(e,t,n,178,4):On()?Ln(e,t,n):function(e,t,n){const r=Nt(),i=pt(58);let o;if(21===ze()||30===ze()){const e=Cn(),t=Fn(4),a=Pn(59,!0);o=D.createMethodSignature(n,r,i,e,t,a)}else{const e=mr();o=D.createPropertySignature(n,r,i,e),64===ze()&&(o.initializer=vr())}return An(),le(xt(o,e),t)}(e,t,n)}function Bn(){return Ve(),21===ze()||30===ze()}function Jn(){return 25===Ve()}function zn(){switch(Ve()){case 21:case 30:case 25:return!0}return!1}function $n(){let e;return it(19)?(e=Gt(4,Rn),it(20)):e=nn(),e}function qn(){return Ve(),40===ze()||41===ze()?148===Ve():(148===ze()&&Ve(),23===ze()&&zt()&&103===Ve())}function Vn(){const e=Be();if(dt(26))return xt(D.createRestTypeNode(fr()),e);const t=fr();if(ZN(t)&&t.pos===t.type.pos){const e=D.createOptionalTypeNode(t.type);return sI(e,t),e.flags=t.flags,e}return t}function Un(){return 59===Ve()||58===ze()&&59===Ve()}function Kn(){return 26===ze()?ba(Ve())&&Un():ba(ze())&&Un()}function Wn(){if(et(Kn)){const e=Be(),t=Je(),n=pt(26),r=Dt(),i=pt(58);it(59);const o=Vn();return le(xt(D.createNamedTupleMember(n,r,i,o),e),t)}return Vn()}function Hn(){const e=Be(),t=Je(),n=function(){let e;if(128===ze()){const t=Be();Ve(),e=bt([xt(O(128),t)],t)}return e}(),r=dt(105);xn.assert(!n||r,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");const i=Cn(),o=Fn(4),a=Pn(39,!1);return le(xt(r?D.createConstructorTypeNode(n,i,o,a):D.createFunctionTypeNode(i,o,a),e),t)}function Gn(){const e=gt();return 25===ze()?void 0:e}function Xn(e){const t=Be();e&&Ve();let n=112===ze()||97===ze()||106===ze()?gt():mn(ze());return e&&(n=xt(D.createPrefixUnaryExpression(41,n),t)),xt(D.createLiteralTypeNode(n),t)}function Qn(){return Ve(),102===ze()}function Yn(){l|=4194304;const e=Be(),t=dt(114);it(102),it(21);const n=fr();let r;if(dt(28)){const e=a.getTokenStart();it(19);const t=ze();if(118===t||132===t?Ve():Oe(va._0_expected,Ra(118)),it(59),r=ho(t,!0),!it(20)){const t=we(g);t&&t.code===va._0_expected.code&&fT(t,nS(c,d,e,1,va.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}it(22);const i=dt(25)?gn():void 0,o=hn();return xt(D.createImportTypeNode(n,r,i,o,t),e)}function Zn(){return Ve(),9===ze()||10===ze()}function er(){switch(ze()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return tt(Gn)||yn();case 67:a.reScanAsteriskEqualsToken();case 42:return function(){const e=Be();return Ve(),xt(D.createJSDocAllType(),e)}();case 61:a.reScanQuestionToken();case 58:return function(){const e=Be();return Ve(),28===ze()||20===ze()||22===ze()||32===ze()||64===ze()||52===ze()?xt(D.createJSDocUnknownType(),e):xt(D.createJSDocNullableType(fr(),!1),e)}();case 100:return function(){const e=Be(),t=Je();if(tt(uo)){const n=Fn(36),r=Pn(59,!1);return le(xt(D.createJSDocFunctionType(n,r),e),t)}return xt(D.createTypeReferenceNode(Dt(),void 0),e)}();case 54:return function(){const e=Be();return Ve(),xt(D.createJSDocNonNullableType(er(),!1),e)}();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return Xn();case 41:return et(Zn)?Xn(!0):yn();case 116:return gt();case 110:{const t=bn();return 142!==ze()||a.hasPrecedingLineBreak()?t:(e=t,Ve(),xt(D.createTypePredicateNode(void 0,e,fr()),e.pos))}case 114:return et(Qn)?Yn():function(){const e=Be();it(114);const t=on(!0),n=a.hasPrecedingLineBreak()?void 0:io();return xt(D.createTypeQueryNode(t,n),e)}();case 19:return et(qn)?function(){const e=Be();let t;it(19),148!==ze()&&40!==ze()&&41!==ze()||(t=gt(),148!==t.kind&&it(148)),it(23);const n=function(){const e=Be(),t=Dt();it(103);const n=fr();return xt(D.createTypeParameterDeclaration(void 0,t,n,void 0),e)}(),r=dt(130)?fr():void 0;let i;it(24),58!==ze()&&40!==ze()&&41!==ze()||(i=gt(),58!==i.kind&&it(58));const o=mr();vt();const a=Gt(4,Rn);return it(20),xt(D.createMappedTypeNode(t,n,r,i,o,a),e)}():function(){const e=Be();return xt(D.createTypeLiteralNode($n()),e)}();case 23:return function(){const e=Be();return xt(D.createTupleTypeNode(rn(21,Wn,23,24)),e)}();case 21:return function(){const e=Be();it(21);const t=fr();return it(22),xt(D.createParenthesizedType(t),e)}();case 102:return Yn();case 131:return et(di)?function(){const e=Be(),t=ft(131),n=110===ze()?bn():wt(),r=dt(142)?fr():void 0;return xt(D.createTypePredicateNode(t,n,r),e)}():yn();case 16:return function(){const e=Be();return xt(D.createTemplateLiteralType(fn(!1),function(){const e=Be(),t=[];let n;do{n=un(),t.push(n)}while(17===n.literal.kind);return bt(t,e)}()),e)}();default:return yn()}var e}function tr(e){switch(ze()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!e;case 41:return!e&&et(Zn);case 21:return!e&&et(nr);default:return rt()}}function nr(){return Ve(),22===ze()||wn(!1)||tr()}function rr(){const e=Be();let t=er();for(;!a.hasPrecedingLineBreak();)switch(ze()){case 54:Ve(),t=xt(D.createJSDocNonNullableType(t,!0),e);break;case 58:if(et(Wt))return t;Ve(),t=xt(D.createJSDocNullableType(t,!0),e);break;case 23:if(it(23),tr()){const n=fr();it(24),t=xt(D.createIndexedAccessTypeNode(t,n),e)}else it(24),t=xt(D.createArrayTypeNode(t),e);break;default:return t}return t}function ir(){if(dt(96)){const e=Te(fr);if(Fe()||58!==ze())return e}}function or(){const e=ze();switch(e){case 143:case 158:case 148:return function(e){const t=Be();return it(e),xt(D.createTypeOperatorNode(e,or()),t)}(e);case 140:return function(){const e=Be();return it(140),xt(D.createInferTypeNode(function(){const e=Be(),t=wt(),n=tt(ir);return xt(D.createTypeParameterDeclaration(void 0,t,n),e)}()),e)}()}return ke(rr)}function ar(e){if(ur()){const t=Hn();let n;return n=SE(t)?e?va.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:va.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:e?va.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:va.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,je(t,n),t}}function sr(e,t,n){const r=Be(),i=52===e,o=dt(e);let a=o&&ar(i)||t();if(ze()===e||o){const o=[a];for(;dt(e);)o.push(ar(i)||t());a=xt(n(bt(o,r)),r)}return a}function cr(){return sr(51,or,D.createIntersectionTypeNode)}function lr(){return Ve(),105===ze()}function ur(){return 30===ze()||!(21!==ze()||!et(_r))||105===ze()||128===ze()&&et(lr)}function _r(){if(Ve(),22===ze()||26===ze())return!0;if(function(){if(tu(ze())&&Xi(!1),rt()||110===ze())return Ve(),!0;if(23===ze()||19===ze()){const e=g.length;return Mi(),e===g.length}return!1}()){if(59===ze()||28===ze()||58===ze()||64===ze())return!0;if(22===ze()&&(Ve(),39===ze()))return!0}return!1}function dr(){const e=Be(),t=rt()&&tt(pr),n=fr();return t?xt(D.createTypePredicateNode(void 0,t,n),e):n}function pr(){const e=wt();if(142===ze()&&!a.hasPrecedingLineBreak())return Ve(),e}function fr(){if(81920&w)return ve(81920,fr);if(ur())return Hn();const e=Be(),t=sr(52,cr,D.createUnionTypeNode);if(!Fe()&&!a.hasPrecedingLineBreak()&&dt(96)){const n=Te(fr);it(58);const r=ke(fr);it(59);const i=ke(fr);return xt(D.createConditionalTypeNode(t,n,r,i),e)}return t}function mr(){return dt(59)?fr():void 0}function gr(){switch(ze()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return et(zn);default:return rt()}}function hr(){if(gr())return!0;switch(ze()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return!!Pr()||rt()}}function yr(){const e=Ae();e&&he(!1);const t=Be();let n,r=br(!0);for(;n=pt(28);)r=Nr(r,n,br(!0),t);return e&&he(!0),r}function vr(){return dt(64)?br(!0):void 0}function br(e){if(127===ze()&&(Pe()||et(mi)))return function(){const e=Be();return Ve(),a.hasPrecedingLineBreak()||42!==ze()&&!hr()?xt(D.createYieldExpression(void 0,void 0),e):xt(D.createYieldExpression(pt(42),br(!0)),e)}();const t=function(e){const t=21===ze()||30===ze()||134===ze()?et(Sr):39===ze()?1:0;if(0!==t)return 1===t?Tr(!0,!0):tt((()=>function(e){const t=a.getTokenStart();if(null==C?void 0:C.has(t))return;const n=Tr(!1,e);return n||(C||(C=new Set)).add(t),n}(e)))}(e)||function(e){if(134===ze()&&1===et(kr)){const t=Be(),n=Je(),r=Qi();return xr(t,wr(0),e,n,r)}}(e);if(t)return t;const n=Be(),r=Je(),i=wr(0);return 80===i.kind&&39===ze()?xr(n,i,e,r,void 0):Vu(i)&&db(We())?Nr(i,gt(),br(e),n):function(e,t,n){const r=pt(58);if(!r)return e;let i;return xt(D.createConditionalExpression(e,r,ve(40960,(()=>br(!1))),i=ft(59),Fd(i)?br(n):St(80,!1,va._0_expected,Ra(59))),t)}(i,n,e)}function xr(e,t,n,r,i){xn.assert(39===ze(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>");const o=D.createParameterDeclaration(void 0,void 0,t,void 0,void 0,void 0);xt(o,t.pos);const a=bt([o],o.pos,o.end),s=ft(39),c=Cr(!!i,n);return le(xt(D.createArrowFunction(i,void 0,a,void 0,s,c),e),r)}function Sr(){if(134===ze()){if(Ve(),a.hasPrecedingLineBreak())return 0;if(21!==ze()&&30!==ze())return 0}const e=ze(),t=Ve();if(21===e){if(22===t)switch(Ve()){case 39:case 59:case 19:return 1;default:return 0}if(23===t||19===t)return 2;if(26===t)return 1;if(tu(t)&&134!==t&&et(zt))return 130===Ve()?0:1;if(!rt()&&110!==t)return 0;switch(Ve()){case 59:return 1;case 58:return Ve(),59===ze()||28===ze()||64===ze()||22===ze()?1:0;case 28:case 64:case 22:return 2}return 0}return xn.assert(30===e),rt()||87===ze()?1===m?et((()=>{dt(87);const e=Ve();if(96===e)switch(Ve()){case 64:case 32:case 44:return!1;default:return!0}else if(28===e||64===e)return!0;return!1}))?1:0:2:0}function kr(){if(134===ze()){if(Ve(),a.hasPrecedingLineBreak()||39===ze())return 0;const e=wr(0);if(!a.hasPrecedingLineBreak()&&80===e.kind&&39===ze())return 1}return 0}function Tr(e,t){const n=Be(),r=Je(),i=Qi(),o=Q(i,WD)?2:0,a=Cn();let s;if(it(21)){if(e)s=Nn(o,e);else{const t=Nn(o,e);if(!t)return;s=t}if(!it(22)&&!e)return}else{if(!e)return;s=nn()}const c=59===ze(),l=Pn(59,!1);if(l&&!e&&vn(l))return;let u=l;for(;196===(null==u?void 0:u.kind);)u=u.type;const _=u&&nF(u);if(!e&&39!==ze()&&(_||19!==ze()))return;const d=ze(),p=ft(39),f=39===d||19===d?Cr(Q(i,WD),t):wt();return t||!c||59===ze()?le(xt(D.createArrowFunction(i,a,s,l,p,f),n),r):void 0}function Cr(e,t){if(19===ze())return li(e?2:0);if(27!==ze()&&100!==ze()&&86!==ze()&&yi()&&(19===ze()||100===ze()||86===ze()||60===ze()||!hr()))return li(16|(e?2:0));const n=re;re=!1;const r=e?Ce((()=>br(t))):De((()=>br(t)));return re=n,r}function wr(e){const t=Be();return Er(e,Ir(),t)}function Dr(e){return 103===e||165===e}function Er(e,t,n){for(;;){We();const o=yy(ze());if(!(43===ze()?o>=e:o>e))break;if(103===ze()&&Ne())break;if(130===ze()||152===ze()){if(a.hasPrecedingLineBreak())break;{const e=ze();Ve(),t=152===e?(r=t,i=fr(),xt(D.createSatisfiesExpression(r,i),r.pos)):Fr(t,fr())}}else t=Nr(t,gt(),wr(o),n)}var r,i;return t}function Pr(){return(!Ne()||103!==ze())&&yy(ze())>0}function Nr(e,t,n,r){return xt(D.createBinaryExpression(e,t,n),r)}function Fr(e,t){return xt(D.createAsExpression(e,t),e.pos)}function Ar(){const e=Be();return xt(D.createPrefixUnaryExpression(ze(),qe(Or)),e)}function Ir(){if(function(){switch(ze()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(1!==m)return!1;default:return!0}}()){const e=Be(),t=Mr();return 43===ze()?Er(yy(ze()),t,e):t}const e=ze(),t=Or();if(43===ze()){const n=as(d,t.pos),{end:r}=t;216===t.kind?Le(n,r,va.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(xn.assert(Fh(e)),Le(n,r,va.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,Ra(e)))}return t}function Or(){switch(ze()){case 40:case 41:case 55:case 54:return Ar();case 91:return function(){const e=Be();return xt(D.createDeleteExpression(qe(Or)),e)}();case 114:return function(){const e=Be();return xt(D.createTypeOfExpression(qe(Or)),e)}();case 116:return function(){const e=Be();return xt(D.createVoidExpression(qe(Or)),e)}();case 30:return 1===m?Rr(!0,void 0,void 0,!0):function(){xn.assert(1!==m,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");const e=Be();it(30);const t=fr();it(32);const n=Or();return xt(D.createTypeAssertion(t,n),e)}();case 135:if(135===ze()&&(Ie()||et(mi)))return function(){const e=Be();return xt(D.createAwaitExpression(qe(Or)),e)}();default:return Mr()}}function Mr(){if(46===ze()||47===ze()){const e=Be();return xt(D.createPrefixUnaryExpression(ze(),qe(Lr)),e)}if(1===m&&30===ze()&&et(qt))return Rr(!0);const e=Lr();if(xn.assert(Vu(e)),(46===ze()||47===ze())&&!a.hasPrecedingLineBreak()){const t=ze();return Ve(),xt(D.createPostfixUnaryExpression(e,t),e.pos)}return e}function Lr(){const e=Be();let t;return 102===ze()?et(Bn)?(l|=4194304,t=gt()):et(Jn)?(Ve(),Ve(),t=xt(D.createMetaProperty(102,Dt()),e),l|=8388608):t=jr():t=108===ze()?function(){const e=Be();let t=gt();if(30===ze()){const e=Be(),n=tt(Zr);void 0!==n&&(Le(e,Be(),va.super_may_not_use_type_arguments),Gr()||(t=D.createExpressionWithTypeArguments(t,n)))}return 21===ze()||25===ze()||23===ze()?t:(ft(25,va.super_must_be_followed_by_an_argument_list_or_member_access),xt(j(t,cn(!0,!0,!0)),e))}():jr(),Qr(e,t)}function jr(){return Hr(Be(),ei(),!0)}function Rr(e,t,n,r=!1){const i=Be(),o=function(e){const t=Be();if(it(30),32===ze())return Ye(),xt(D.createJsxOpeningFragment(),t);const n=zr(),r=0==(524288&w)?io():void 0,i=function(){const e=Be();return xt(D.createJsxAttributes(Gt(13,qr)),e)}();let o;return 32===ze()?(Ye(),o=D.createJsxOpeningElement(n,r,i)):(it(44),it(32,void 0,!1)&&(e?Ve():Ye()),o=D.createJsxSelfClosingElement(n,r,i)),xt(o,t)}(e);let a;if(286===o.kind){let t,r=Jr(o);const s=r[r.length-1];if(284===(null==s?void 0:s.kind)&&!sO(s.openingElement.tagName,s.closingElement.tagName)&&sO(o.tagName,s.closingElement.tagName)){const e=s.children.end,n=xt(D.createJsxElement(s.openingElement,s.children,xt(D.createJsxClosingElement(xt(A(""),e,e)),e,e)),s.openingElement.pos,e);r=bt([...r.slice(0,r.length-1),n],r.pos,e),t=s.closingElement}else t=function(e,t){const n=Be();it(31);const r=zr();return it(32,void 0,!1)&&(t||!sO(e.tagName,r)?Ve():Ye()),xt(D.createJsxClosingElement(r),n)}(o,e),sO(o.tagName,t.tagName)||(n&&CN(n)&&sO(t.tagName,n.tagName)?je(o.tagName,va.JSX_element_0_has_no_corresponding_closing_tag,Hd(d,o.tagName)):je(t.tagName,va.Expected_corresponding_JSX_closing_tag_for_0,Hd(d,o.tagName)));a=xt(D.createJsxElement(o,r,t),i)}else 289===o.kind?a=xt(D.createJsxFragment(o,Jr(o),function(e){const t=Be();return it(31),it(32,va.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(e?Ve():Ye()),xt(D.createJsxJsxClosingFragment(),t)}(e)),i):(xn.assert(285===o.kind),a=o);if(!r&&e&&30===ze()){const e=void 0===t?a.pos:t,n=tt((()=>Rr(!0,e)));if(n){const t=St(28,!1);return AT(t,n.pos,0),Le(as(d,e),n.end,va.JSX_expressions_must_have_one_parent_element),xt(D.createBinaryExpression(a,t,n),i)}}return a}function Br(e,t){switch(t){case 1:if(EN(e))je(e,va.JSX_fragment_has_no_corresponding_closing_tag);else{const t=e.tagName;Le(Math.min(as(d,t.pos),t.end),t.end,va.JSX_element_0_has_no_corresponding_closing_tag,Hd(d,e.tagName))}return;case 31:case 7:return;case 12:case 13:return function(){const e=Be(),t=D.createJsxText(a.getTokenValue(),13===v);return v=a.scanJsxToken(),xt(t,e)}();case 19:return $r(!1);case 30:return Rr(!1,void 0,e);default:return xn.assertNever(t)}}function Jr(e){const t=[],n=Be(),r=k;for(k|=16384;;){const n=Br(e,v=a.reScanJsxToken());if(!n)break;if(t.push(n),CN(e)&&284===(null==n?void 0:n.kind)&&!sO(n.openingElement.tagName,n.closingElement.tagName)&&sO(e.tagName,n.closingElement.tagName))break}return k=r,bt(t,n)}function zr(){const e=Be(),t=function(){const e=Be();Qe();const t=110===ze(),n=Et();return dt(59)?(Qe(),xt(D.createJsxNamespacedName(n,Et()),e)):t?xt(D.createToken(110),e):n}();if(ON(t))return t;let n=t;for(;dt(25);)n=xt(j(n,cn(!0,!1,!1)),e);return n}function $r(e){const t=Be();if(!it(19))return;let n,r;return 20!==ze()&&(e||(n=pt(26)),r=yr()),e?it(20):it(20,void 0,!1)&&Ye(),xt(D.createJsxExpression(n,r),t)}function qr(){if(19===ze())return function(){const e=Be();it(19),it(26);const t=yr();return it(20),xt(D.createJsxSpreadAttribute(t),e)}();const e=Be();return xt(D.createJsxAttribute(function(){const e=Be();Qe();const t=Et();return dt(59)?(Qe(),xt(D.createJsxNamespacedName(t,Et()),e)):t}(),function(){if(64===ze()){if(11===(v=a.scanJsxAttributeValue()))return pn();if(19===ze())return $r(!0);if(30===ze())return Rr(!0);Oe(va.or_JSX_element_expected)}}()),e)}function Vr(){return Ve(),ba(ze())||23===ze()||Gr()}function Ur(e){if(64&e.flags)return!0;if(bP(e)){let t=e.expression;for(;bP(t)&&!(64&t.flags);)t=t.expression;if(64&t.flags){for(;bP(e);)e.flags|=64,e=e.expression;return!0}}return!1}function Kr(e,t,n){const r=cn(!0,!0,!0),i=n||Ur(t),o=i?R(t,n,r):j(t,r);return i&&VD(o.name)&&je(o.name,va.An_optional_chain_cannot_contain_private_identifiers),hP(t)&&t.typeArguments&&Le(t.typeArguments.pos-1,as(d,t.typeArguments.end)+1,va.An_instantiation_expression_cannot_be_followed_by_a_property_access),xt(o,e)}function Wr(e,t,n){let r;if(24===ze())r=St(80,!0,va.An_element_access_expression_should_take_an_argument);else{const e=xe(yr);$h(e)&&(e.text=kt(e.text)),r=e}return it(24),xt(n||Ur(t)?J(t,n,r):B(t,r),e)}function Hr(e,t,n){for(;;){let r,i=!1;if(n&&29===ze()&&et(Vr)?(r=ft(29),i=ba(ze())):i=dt(25),i)t=Kr(e,t,r);else if(!r&&Ae()||!dt(23)){if(!Gr()){if(!r){if(54===ze()&&!a.hasPrecedingLineBreak()){Ve(),t=xt(D.createNonNullExpression(t),e);continue}const n=tt(Zr);if(n){t=xt(D.createExpressionWithTypeArguments(t,n),e);continue}}return t}t=r||233!==t.kind?Xr(e,t,r,void 0):Xr(e,t.expression,r,t.typeArguments)}else t=Wr(e,t,r)}}function Gr(){return 15===ze()||16===ze()}function Xr(e,t,n,r){const i=D.createTaggedTemplateExpression(t,r,15===ze()?(He(!0),pn()):ln(!0));return(n||64&t.flags)&&(i.flags|=64),i.questionDotToken=n,xt(i,e)}function Qr(e,t){for(;;){let n;t=Hr(e,t,!0);const r=pt(29);if(r&&(n=tt(Zr),Gr()))t=Xr(e,t,r,n);else{if(!n&&21!==ze()){if(r){const n=St(80,!1,va.Identifier_expected);t=xt(R(t,r,n),e)}break}{r||233!==t.kind||(n=t.typeArguments,t=t.expression);const i=Yr();t=xt(r||Ur(t)?$(t,r,n,i):z(t,n,i),e)}}}return t}function Yr(){it(21);const e=en(11,ni);return it(22),e}function Zr(){if(0!=(524288&w))return;if(30!==Ge())return;Ve();const e=en(20,fr);return 32===We()?(Ve(),e&&function(){switch(ze()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return a.hasPrecedingLineBreak()||Pr()||!hr()}()?e:void 0):void 0}function ei(){switch(ze()){case 15:26656&a.getTokenFlags()&&He(!1);case 9:case 10:case 11:return pn();case 110:case 108:case 106:case 112:case 97:return gt();case 21:return function(){const e=Be(),t=Je();it(21);const n=xe(yr);return it(22),le(xt(U(n),e),t)}();case 23:return ri();case 19:return oi();case 134:if(!et(fi))break;return ai();case 60:return function(){const e=Be(),t=Je(),n=Xi(!0);if(86===ze())return eo(e,t,n,231);const r=St(282,!0,va.Expression_expected);return PT(r,e),r.modifiers=n,r}();case 86:return eo(Be(),Je(),void 0,231);case 100:return ai();case 105:return function(){const e=Be();if(it(105),dt(25)){const t=Dt();return xt(D.createMetaProperty(105,t),e)}let t,n=Hr(Be(),ei(),!1);233===n.kind&&(t=n.typeArguments,n=n.expression),29===ze()&&Oe(va.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,Hd(d,n));const r=21===ze()?Yr():void 0;return xt(V(n,t,r),e)}();case 44:case 69:if(14===(v=a.reScanSlashToken()))return pn();break;case 16:return ln(!1);case 81:return Ft()}return wt(va.Expression_expected)}function ti(){return 26===ze()?function(){const e=Be();it(26);const t=br(!0);return xt(D.createSpreadElement(t),e)}():28===ze()?xt(D.createOmittedExpression(),Be()):br(!0)}function ni(){return ve(40960,ti)}function ri(){const e=Be(),t=a.getTokenStart(),n=it(23),r=a.hasPrecedingLineBreak(),i=en(15,ti);return ut(23,24,n,t),xt(M(i,r),e)}function ii(){const e=Be(),t=Je();if(pt(26)){const n=br(!0);return le(xt(D.createSpreadAssignment(n),e),t)}const n=Xi(!0);if(At(139))return Ui(e,t,n,177,0);if(At(153))return Ui(e,t,n,178,0);const r=pt(42),i=rt(),o=Nt(),a=pt(58),s=pt(54);if(r||21===ze()||30===ze())return $i(e,t,n,r,o,a,s);let c;if(i&&59!==ze()){const e=pt(64),t=e?xe((()=>br(!0))):void 0;c=D.createShorthandPropertyAssignment(o,t),c.equalsToken=e}else{it(59);const e=xe((()=>br(!0)));c=D.createPropertyAssignment(o,e)}return c.modifiers=n,c.questionToken=a,c.exclamationToken=s,le(xt(c,e),t)}function oi(){const e=Be(),t=a.getTokenStart(),n=it(19),r=a.hasPrecedingLineBreak(),i=en(12,ii,!0);return ut(19,20,n,t),xt(L(i,r),e)}function ai(){const e=Ae();he(!1);const t=Be(),n=Je(),r=Xi(!1);it(100);const i=pt(42),o=i?1:0,a=Q(r,WD)?2:0,s=o&&a?be(81920,si):o?be(16384,si):a?Ce(si):si();const c=Cn(),l=Fn(o|a),u=Pn(59,!1),_=li(o|a);return he(e),le(xt(D.createFunctionExpression(r,i,s,c,l,u,_),t),n)}function si(){return nt()?Ct():void 0}function ci(e,t){const n=Be(),r=Je(),i=a.getTokenStart(),o=it(19,t);if(o||e){const e=a.hasPrecedingLineBreak(),t=Gt(1,Ci);ut(19,20,o,i);const s=le(xt(K(t,e),n),r);return 64===ze()&&(Oe(va.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),Ve()),s}{const e=nn();return le(xt(K(e,void 0),n),r)}}function li(e,t){const n=Pe();ge(!!(1&e));const r=Ie();ye(!!(2&e));const i=re;re=!1;const o=Ae();o&&he(!1);const a=ci(!!(16&e),t);return o&&he(!0),re=i,ge(n),ye(r),a}function ui(e){const t=Be(),n=Je();it(252===e?83:88);const r=ht()?void 0:wt();return vt(),le(xt(252===e?D.createBreakStatement(r):D.createContinueStatement(r),t),n)}function _i(){return 84===ze()?function(){const e=Be(),t=Je();it(84);const n=xe(yr);it(59);const r=Gt(3,Ci);return le(xt(D.createCaseClause(n,r),e),t)}():function(){const e=Be();it(90),it(59);const t=Gt(3,Ci);return xt(D.createDefaultClause(t),e)}()}function di(){return Ve(),ba(ze())&&!a.hasPrecedingLineBreak()}function pi(){return Ve(),86===ze()&&!a.hasPrecedingLineBreak()}function fi(){return Ve(),100===ze()&&!a.hasPrecedingLineBreak()}function mi(){return Ve(),(ba(ze())||9===ze()||10===ze()||11===ze())&&!a.hasPrecedingLineBreak()}function gi(){for(;;)switch(ze()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Si();case 135:return Ti();case 120:case 156:return Ve(),!a.hasPrecedingLineBreak()&&rt();case 144:case 145:return Ve(),!a.hasPrecedingLineBreak()&&(rt()||11===ze());case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:const e=ze();if(Ve(),a.hasPrecedingLineBreak())return!1;if(138===e&&156===ze())return!0;continue;case 162:return Ve(),19===ze()||80===ze()||95===ze();case 102:return Ve(),11===ze()||42===ze()||19===ze()||ba(ze());case 95:let t=Ve();if(156===t&&(t=et(Ve)),64===t||42===t||19===t||90===t||130===t||60===t)return!0;continue;case 126:Ve();continue;default:return!1}}function hi(){return et(gi)}function yi(){switch(ze()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 102:return hi()||et(zn);case 87:case 95:return hi();case 129:case 125:case 123:case 124:case 126:case 148:return hi()||!et(di);default:return hr()}}function vi(){return Ve(),nt()||19===ze()||23===ze()}function bi(){return xi(!0)}function xi(e){return Ve(),(!e||165!==ze())&&(nt()||19===ze())&&!a.hasPrecedingLineBreak()}function Si(){return et(xi)}function ki(e){return 160===Ve()&&xi(e)}function Ti(){return et(ki)}function Ci(){switch(ze()){case 27:return function(){const e=Be(),t=Je();return it(27),le(xt(D.createEmptyStatement(),e),t)}();case 19:return ci(!1);case 115:return Ji(Be(),Je(),void 0);case 121:if(et(vi))return Ji(Be(),Je(),void 0);break;case 135:if(Ti())return Ji(Be(),Je(),void 0);break;case 160:if(Si())return Ji(Be(),Je(),void 0);break;case 100:return zi(Be(),Je(),void 0);case 86:return Zi(Be(),Je(),void 0);case 101:return function(){const e=Be(),t=Je();it(101);const n=a.getTokenStart(),r=it(21),i=xe(yr);ut(21,22,r,n);const o=Ci(),s=dt(93)?Ci():void 0;return le(xt(G(i,o,s),e),t)}();case 92:return function(){const e=Be(),t=Je();it(92);const n=Ci();it(117);const r=a.getTokenStart(),i=it(21),o=xe(yr);return ut(21,22,i,r),dt(27),le(xt(D.createDoStatement(n,o),e),t)}();case 117:return function(){const e=Be(),t=Je();it(117);const n=a.getTokenStart(),r=it(21),i=xe(yr);ut(21,22,r,n);const o=Ci();return le(xt(X(i,o),e),t)}();case 99:return function(){const e=Be(),t=Je();it(99);const n=pt(135);let r,i;if(it(21),27!==ze()&&(r=115===ze()||121===ze()||87===ze()||160===ze()&&et(bi)||135===ze()&&et(ki)?Ri(!0):be(8192,yr)),n?it(165):dt(165)){const e=xe((()=>br(!0)));it(22),i=ee(n,r,e,Ci())}else if(dt(103)){const e=xe(yr);it(22),i=D.createForInStatement(r,e,Ci())}else{it(27);const e=27!==ze()&&22!==ze()?xe(yr):void 0;it(27);const t=22!==ze()?xe(yr):void 0;it(22),i=Y(r,e,t,Ci())}return le(xt(i,e),t)}();case 88:return ui(251);case 83:return ui(252);case 107:return function(){const e=Be(),t=Je();it(107);const n=ht()?void 0:xe(yr);return vt(),le(xt(D.createReturnStatement(n),e),t)}();case 118:return function(){const e=Be(),t=Je();it(118);const n=a.getTokenStart(),r=it(21),i=xe(yr);ut(21,22,r,n);const o=be(67108864,Ci);return le(xt(D.createWithStatement(i,o),e),t)}();case 109:return function(){const e=Be(),t=Je();it(109),it(21);const n=xe(yr);it(22);const r=function(){const e=Be();it(19);const t=Gt(2,_i);return it(20),xt(D.createCaseBlock(t),e)}();return le(xt(D.createSwitchStatement(n,r),e),t)}();case 111:return function(){const e=Be(),t=Je();it(111);let n=a.hasPrecedingLineBreak()?void 0:xe(yr);return void 0===n&&(S++,n=xt(A(""),Be())),yt()||st(n),le(xt(D.createThrowStatement(n),e),t)}();case 113:case 85:case 98:return function(){const e=Be(),t=Je();it(113);const n=ci(!1),r=85===ze()?function(){const e=Be();let t;it(85),dt(21)?(t=ji(),it(22)):t=void 0;const n=ci(!1);return xt(D.createCatchClause(t,n),e)}():void 0;let i;return r&&98!==ze()||(it(98,va.catch_or_finally_expected),i=ci(!1)),le(xt(D.createTryStatement(n,r,i),e),t)}();case 89:return function(){const e=Be(),t=Je();return it(89),vt(),le(xt(D.createDebuggerStatement(),e),t)}();case 60:return Di();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(hi())return Di()}return function(){const e=Be();let t,n=Je();const r=21===ze(),i=xe(yr);return qD(i)&&dt(59)?t=D.createLabeledStatement(i,Ci()):(yt()||st(i),t=H(i),r&&(n=!1)),le(xt(t,e),n)}()}function wi(e){return 138===e.kind}function Di(){const e=Be(),t=Je(),n=Xi(!0);if(Q(n,wi)){const r=function(e){return be(33554432,(()=>{const t=Qt(k,e);if(t)return Yt(t)}))}(e);if(r)return r;for(const e of n)e.flags|=33554432;return be(33554432,(()=>Ei(e,t,n)))}return Ei(e,t,n)}function Ei(e,t,n){switch(ze()){case 115:case 121:case 87:case 160:case 135:return Ji(e,t,n);case 100:return zi(e,t,n);case 86:return Zi(e,t,n);case 120:return function(e,t,n){it(120);const r=wt(),i=Cn(),o=to(),a=$n();return le(xt(D.createInterfaceDeclaration(n,r,i,o,a),e),t)}(e,t,n);case 156:return function(e,t,n){it(156),a.hasPrecedingLineBreak()&&Oe(va.Line_break_not_permitted_here);const r=wt(),i=Cn();it(64);const o=141===ze()&&tt(Gn)||fr();return vt(),le(xt(D.createTypeAliasDeclaration(n,r,i,o),e),t)}(e,t,n);case 94:return function(e,t,n){it(94);const r=wt();let i;return it(19)?(i=ve(81920,(()=>en(6,ao))),it(20)):i=nn(),le(xt(D.createEnumDeclaration(n,r,i),e),t)}(e,t,n);case 162:case 144:case 145:return function(e,t,n){let r=0;if(162===ze())return lo(e,t,n);if(dt(145))r|=32;else if(it(144),11===ze())return lo(e,t,n);return co(e,t,n,r)}(e,t,n);case 102:return function(e,t,n){it(102);const r=a.getTokenFullStart();let i;rt()&&(i=wt());let o=!1;if("type"===(null==i?void 0:i.escapedText)&&(161!==ze()||rt()&&et(Ni))&&(rt()||42===ze()||19===ze())&&(o=!0,i=rt()?wt():void 0),i&&28!==ze()&&161!==ze())return function(e,t,n,r,i){it(64);const o=149===ze()&&et(uo)?function(){const e=Be();it(149),it(21);const t=yo();return it(22),xt(D.createExternalModuleReference(t),e)}():on(!1);vt();return le(xt(D.createImportEqualsDeclaration(n,i,r,o),e),t)}(e,t,n,i,o);const s=fo(i,r,o),c=yo(),l=mo();return vt(),le(xt(D.createImportDeclaration(n,s,c,l),e),t)}(e,t,n);case 95:switch(Ve(),ze()){case 90:case 64:return function(e,t,n){const r=Ie();let i;ye(!0),dt(64)?i=!0:it(90);const o=br(!0);return vt(),ye(r),le(xt(D.createExportAssignment(n,i,o),e),t)}(e,t,n);case 130:return function(e,t,n){it(130),it(145);const r=wt();vt();const i=D.createNamespaceExportDeclaration(r);return i.modifiers=n,le(xt(i,e),t)}(e,t,n);default:return function(e,t,n){const r=Ie();let i,o,s;ye(!0);const c=dt(156),l=Be();dt(42)?(dt(130)&&(i=function(e){return xt(D.createNamespaceExport(Dt()),e)}(l)),it(161),o=yo()):(i=vo(279),(161===ze()||11===ze()&&!a.hasPrecedingLineBreak())&&(it(161),o=yo()));const u=ze();return!o||118!==u&&132!==u||a.hasPrecedingLineBreak()||(s=ho(u)),vt(),ye(r),le(xt(D.createExportDeclaration(n,c,i,o,s),e),t)}(e,t,n)}default:if(n){const t=St(282,!0,va.Declaration_expected);return PT(t,e),t.modifiers=n,t}return}}function Pi(){return 11===Ve()}function Ni(){return Ve(),161===ze()||64===ze()}function Fi(e,t){if(19!==ze()){if(4&e)return void An();if(ht())return void vt()}return li(e,t)}function Ai(){const e=Be();if(28===ze())return xt(D.createOmittedExpression(),e);const t=pt(26),n=Mi(),r=vr();return xt(D.createBindingElement(t,void 0,n,r),e)}function Ii(){const e=Be(),t=pt(26),n=nt();let r,i=Nt();n&&59!==ze()?(r=i,i=void 0):(it(59),r=Mi());const o=vr();return xt(D.createBindingElement(t,i,r,o),e)}function Oi(){return 19===ze()||23===ze()||81===ze()||nt()}function Mi(e){return 23===ze()?function(){const e=Be();it(23);const t=xe((()=>en(10,Ai)));return it(24),xt(D.createArrayBindingPattern(t),e)}():19===ze()?function(){const e=Be();it(19);const t=xe((()=>en(9,Ii)));return it(20),xt(D.createObjectBindingPattern(t),e)}():Ct(e)}function Li(){return ji(!0)}function ji(e){const t=Be(),n=Je(),r=Mi(va.Private_identifiers_are_not_allowed_in_variable_declarations);let i;e&&80===r.kind&&54===ze()&&!a.hasPrecedingLineBreak()&&(i=gt());const o=mr(),s=Dr(ze())?void 0:vr();return le(xt(te(r,i,o,s),t),n)}function Ri(e){const t=Be();let n,r=0;switch(ze()){case 115:break;case 121:r|=1;break;case 87:r|=2;break;case 160:r|=4;break;case 135:xn.assert(Ti()),r|=6,Ve();break;default:xn.fail()}if(Ve(),165===ze()&&et(Bi))n=nn();else{const t=Ne();me(e),n=en(8,e?ji:Li),me(t)}return xt(ne(n,r),t)}function Bi(){return zt()&&22===Ve()}function Ji(e,t,n){const r=Ri(!1);return vt(),le(xt(W(n,r),e),t)}function zi(e,t,n){const r=Ie(),i=ib(n);it(100);const o=pt(42),a=2048&i?si():Ct(),s=o?1:0,c=1024&i?2:0,l=Cn();32&i&&ye(!0);const u=Fn(s|c),_=Pn(59,!1),d=Fi(s|c,va.or_expected);return ye(r),le(xt(D.createFunctionDeclaration(n,o,a,l,u,_,d),e),t)}function $i(e,t,n,r,i,o,a,s){const c=r?1:0,l=Q(n,WD)?2:0,u=Cn(),_=Fn(c|l),d=Pn(59,!1),p=Fi(c|l,s),f=D.createMethodDeclaration(n,r,i,o,u,_,d,p);return f.exclamationToken=a,le(xt(f,e),t)}function qi(e,t,n,r,i){const o=i||a.hasPrecedingLineBreak()?void 0:pt(54),s=mr(),c=ve(90112,vr);return function(e,t,n){if(60!==ze()||a.hasPrecedingLineBreak())return 21===ze()?(Oe(va.Cannot_start_a_function_call_in_a_type_annotation),void Ve()):void(!t||ht()?yt()||(n?Oe(va._0_expected,Ra(27)):st(e)):n?Oe(va._0_expected,Ra(27)):Oe(va.Expected_for_property_initializer));Oe(va.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations)}(r,s,c),le(xt(D.createPropertyDeclaration(n,r,i||o,s,c),e),t)}function Vi(e,t,n){const r=pt(42),i=Nt(),o=pt(58);return r||21===ze()||30===ze()?$i(e,t,n,r,i,o,void 0,va.or_expected):qi(e,t,n,i,o)}function Ui(e,t,n,r,i){const o=Nt(),a=Cn(),s=Fn(0),c=Pn(59,!1),l=Fi(i),u=177===r?D.createGetAccessorDeclaration(n,o,s,c,l):D.createSetAccessorDeclaration(n,o,s,l);return u.typeParameters=a,gE(u)&&(u.type=c),le(xt(u,e),t)}function Ki(){let e;if(60===ze())return!0;for(;tu(ze());){if(e=ze(),ru(e))return!0;Ve()}if(42===ze())return!0;if(Pt()&&(e=ze(),Ve()),23===ze())return!0;if(void 0!==e){if(!Ph(e)||153===e||139===e)return!0;switch(ze()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return ht()}}return!1}function Wi(){if(Ie()&&135===ze()){const e=Be(),t=wt(va.Expression_expected);return Ve(),Qr(e,Hr(e,t,!0))}return Lr()}function Hi(){const e=Be();if(!dt(60))return;const t=be(32768,Wi);return xt(D.createDecorator(t),e)}function Gi(e,t,n){const r=Be(),i=ze();if(87===ze()&&t){if(!tt(It))return}else{if(n&&126===ze()&&et(_o))return;if(e&&126===ze())return;if(!tu(ze())||!tt(Ot))return}return xt(O(i),r)}function Xi(e,t,n){const r=Be();let i,o,a,s=!1,c=!1,l=!1;if(e&&60===ze())for(;o=Hi();)i=ue(i,o);for(;a=Gi(s,t,n);)126===a.kind&&(s=!0),i=ue(i,a),c=!0;if(c&&e&&60===ze())for(;o=Hi();)i=ue(i,o),l=!0;if(l)for(;a=Gi(s,t,n);)126===a.kind&&(s=!0),i=ue(i,a);return i&&bt(i,r)}function Qi(){let e;if(134===ze()){const t=Be();Ve(),e=bt([xt(O(134),t)],t)}return e}function Yi(){const e=Be(),t=Je();if(27===ze())return Ve(),le(xt(D.createSemicolonClassElement(),e),t);const n=Xi(!0,!0,!0);if(126===ze()&&et(_o))return function(e,t,n){ft(126);const r=function(){const e=Pe(),t=Ie();ge(!1),ye(!0);const n=ci(!1);return ge(e),ye(t),n}(),i=le(xt(D.createClassStaticBlockDeclaration(r),e),t);return i.modifiers=n,i}(e,t,n);if(At(139))return Ui(e,t,n,177,0);if(At(153))return Ui(e,t,n,178,0);if(137===ze()||11===ze()){const r=function(e,t,n){return tt((()=>{if(137===ze()?it(137):11===ze()&&21===et(Ve)?tt((()=>{const e=pn();return"constructor"===e.text?e:void 0})):void 0){const r=Cn(),i=Fn(0),o=Pn(59,!1),a=Fi(0,va.or_expected),s=D.createConstructorDeclaration(n,i,a);return s.typeParameters=r,s.type=o,le(xt(s,e),t)}}))}(e,t,n);if(r)return r}if(On())return Ln(e,t,n);if(ba(ze())||11===ze()||9===ze()||42===ze()||23===ze()){if(Q(n,wi)){for(const e of n)e.flags|=33554432;return be(33554432,(()=>Vi(e,t,n)))}return Vi(e,t,n)}if(n){const r=St(80,!0,va.Declaration_expected);return qi(e,t,n,r,void 0)}return xn.fail("Should not have attempted to parse class member declaration.")}function Zi(e,t,n){return eo(e,t,n,263)}function eo(e,t,n,r){const i=Ie();it(86);const o=!nt()||119===ze()&&et($t)?void 0:Tt(nt()),a=Cn();Q(n,UD)&&ye(!0);const s=to();let c;return it(19)?(c=Gt(5,Yi),it(20)):c=nn(),ye(i),le(xt(263===r?D.createClassDeclaration(n,o,a,s,c):D.createClassExpression(n,o,a,s,c),e),t)}function to(){if(oo())return Gt(22,no)}function no(){const e=Be(),t=ze();xn.assert(96===t||119===t),Ve();const n=en(7,ro);return xt(D.createHeritageClause(t,n),e)}function ro(){const e=Be(),t=Lr();if(233===t.kind)return t;const n=io();return xt(D.createExpressionWithTypeArguments(t,n),e)}function io(){return 30===ze()?rn(20,fr,30,32):void 0}function oo(){return 96===ze()||119===ze()}function ao(){const e=Be(),t=Je(),n=Nt(),r=xe(vr);return le(xt(D.createEnumMember(n,r),e),t)}function so(){const e=Be();let t;return it(19)?(t=Gt(1,Ci),it(20)):t=nn(),xt(D.createModuleBlock(t),e)}function co(e,t,n,r){const i=32&r,o=8&r?Dt():wt(),a=dt(25)?co(Be(),!1,void 0,8|i):so();return le(xt(D.createModuleDeclaration(n,o,a,r),e),t)}function lo(e,t,n){let r,i,o=0;return 162===ze()?(r=wt(),o|=2048):(r=pn(),r.text=kt(r.text)),19===ze()?i=so():vt(),le(xt(D.createModuleDeclaration(n,r,i,o),e),t)}function uo(){return 21===Ve()}function _o(){return 19===Ve()}function po(){return 44===Ve()}function fo(e,t,n,r=!1){let i;return(e||42===ze()||19===ze())&&(i=function(e,t,n,r){let i;return e&&!dt(28)||(r&&a.setSkipJsDocLeadingAsterisks(!0),i=42===ze()?function(){const e=Be();it(42),it(130);const t=wt();return xt(D.createNamespaceImport(t),e)}():vo(275),r&&a.setSkipJsDocLeadingAsterisks(!1)),xt(D.createImportClause(n,e,i),t)}(e,t,n,r),it(161)),i}function mo(){const e=ze();if((118===e||132===e)&&!a.hasPrecedingLineBreak())return ho(e)}function go(){const e=Be(),t=ba(ze())?Dt():mn(11);it(59);const n=br(!0);return xt(D.createImportAttribute(t,n),e)}function ho(e,t){const n=Be();t||it(e);const r=a.getTokenStart();if(it(19)){const t=a.hasPrecedingLineBreak(),i=en(24,go,!0);if(!it(20)){const e=we(g);e&&e.code===va._0_expected.code&&fT(e,nS(c,d,r,1,va.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return xt(D.createImportAttributes(i,t,e),n)}{const t=bt([],Be(),void 0,!1);return xt(D.createImportAttributes(t,!1,e),n)}}function yo(){if(11===ze()){const e=pn();return e.text=kt(e.text),e}return yr()}function vo(e){const t=Be();return xt(275===e?D.createNamedImports(rn(23,xo,19,20)):D.createNamedExports(rn(23,bo,19,20)),t)}function bo(){const e=Je();return le(So(281),e)}function xo(){return So(276)}function So(e){const t=Be();let n,r=Ph(ze())&&!rt(),i=a.getTokenStart(),o=a.getTokenEnd(),s=!1,c=!0,l=Dt();if("type"===l.escapedText)if(130===ze()){const e=Dt();if(130===ze()){const t=Dt();ba(ze())?(s=!0,n=e,l=u(),c=!1):(n=l,l=t,c=!1)}else ba(ze())?(n=l,c=!1,l=u()):(s=!0,l=e)}else ba(ze())&&(s=!0,l=u());return c&&130===ze()&&(n=l,it(130),l=u()),276===e&&r&&Le(i,o,va.Identifier_expected),xt(276===e?D.createImportSpecifier(s,n,l):D.createExportSpecifier(s,n,l),t);function u(){return r=Ph(ze())&&!rt(),i=a.getTokenStart(),o=a.getTokenEnd(),Dt()}}let ko;var To;let Co;var wo;let Do;(To=ko||(ko={}))[To.SourceElements=0]="SourceElements",To[To.BlockStatements=1]="BlockStatements",To[To.SwitchClauses=2]="SwitchClauses",To[To.SwitchClauseStatements=3]="SwitchClauseStatements",To[To.TypeMembers=4]="TypeMembers",To[To.ClassMembers=5]="ClassMembers",To[To.EnumMembers=6]="EnumMembers",To[To.HeritageClauseElement=7]="HeritageClauseElement",To[To.VariableDeclarations=8]="VariableDeclarations",To[To.ObjectBindingElements=9]="ObjectBindingElements",To[To.ArrayBindingElements=10]="ArrayBindingElements",To[To.ArgumentExpressions=11]="ArgumentExpressions",To[To.ObjectLiteralMembers=12]="ObjectLiteralMembers",To[To.JsxAttributes=13]="JsxAttributes",To[To.JsxChildren=14]="JsxChildren",To[To.ArrayLiteralMembers=15]="ArrayLiteralMembers",To[To.Parameters=16]="Parameters",To[To.JSDocParameters=17]="JSDocParameters",To[To.RestProperties=18]="RestProperties",To[To.TypeParameters=19]="TypeParameters",To[To.TypeArguments=20]="TypeArguments",To[To.TupleElementTypes=21]="TupleElementTypes",To[To.HeritageClauses=22]="HeritageClauses",To[To.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",To[To.ImportAttributes=24]="ImportAttributes",To[To.JSDocComment=25]="JSDocComment",To[To.Count=26]="Count",(wo=Co||(Co={}))[wo.False=0]="False",wo[wo.True=1]="True",wo[wo.Unknown=2]="Unknown",(e=>{function t(e){const t=Be(),n=(e?dt:it)(19),r=be(16777216,kn);e&&!n||lt(20);const i=D.createJSDocTypeExpression(r);return _e(i),xt(i,t)}function n(){const e=Be(),t=dt(19),n=Be();let r=on(!1);for(;81===ze();)Xe(),Ue(),r=xt(D.createJSDocMemberName(r,wt()),n);t&<(20);const i=D.createJSDocNameReference(r);return _e(i),xt(i,e)}let r;var i;let o;var s;function l(e=0,r){const i=d,o=void 0===r?i.length:e+r;if(r=o-e,xn.assert(e>=0),xn.assert(e<=o),xn.assert(o<=i.length),!fI(i,e))return;let s,l,u,_,p,f=[];const m=[],g=k;k|=1<<25;const h=a.scanRange(e+3,r-5,(function(){let t,n=1,r=e-(i.lastIndexOf("\n",e)+1)+4;function c(e){t||(t=r),f.push(e),r+=e.length}for(Ue();Y(5););Y(4)&&(n=0,r=0);e:for(;;){switch(ze()){case 60:v(f),p||(p=Be()),(d=C(r))&&(s?s.push(d):(s=[d],l=d.pos),u=d.end),n=0,t=void 0;break;case 4:f.push(a.getTokenText()),n=0,r=0;break;case 42:const i=a.getTokenText();1===n?(n=2,c(i)):(xn.assert(0===n),n=1,r+=i.length);break;case 5:xn.assert(2!==n,"whitespace shouldn't come from the scanner while saving top-level comment text");const o=a.getTokenText();void 0!==t&&r+o.length>t&&f.push(o.slice(t-r)),r+=o.length;break;case 1:break e;case 82:n=2,c(a.getTokenValue());break;case 19:n=2;const g=a.getTokenFullStart(),h=P(a.getTokenEnd()-1);if(h){_||y(f),m.push(xt(D.createJSDocText(f.join("")),_??e,g)),m.push(h),f=[],_=a.getTokenEnd();break}default:n=2,c(a.getTokenText())}2===n?Ke(!1):Ue()}var d;const g=f.join("").trimEnd();m.length&&g.length&&m.push(xt(D.createJSDocText(g),_??e,p)),m.length&&s&&xn.assertIsDefined(p,"having parsed tags implies that the end of the comment span should be set");const h=s&&bt(s,l,u);return xt(D.createJSDocComment(m.length?bt(m,e,p):g.length?g:void 0,h),e,o)}));return k=g,h;function y(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function v(e){for(;e.length;){const t=e[e.length-1].trimEnd();if(""!==t){if(t.lengthK(n))))&&345!==t.kind;)if(s=!0,344===t.kind){if(r){const e=Oe(va.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);e&&fT(e,nS(c,d,0,0,va.The_tag_was_first_specified_here));break}r=t}else o=ue(o,t);if(s){const t=i&&188===i.type.kind,n=D.createJSDocTypeLiteral(o,t);i=r&&r.typeExpression&&!L(r.typeExpression.type)?r.typeExpression:xt(n,e),a=i.end}}return a=a||void 0!==s?Be():(o??i??t).end,s||(s=w(e,a,n,r)),xt(D.createJSDocTypedefTag(t,i,o,s),e,a)}(r,i,e,o);break;case"callback":l=function(e,t,n,r){const i=q();x();let o=E(n);const a=V(e,n);o||(o=w(e,Be(),n,r));const s=void 0!==o?Be():a.end;return xt(D.createJSDocCallbackTag(t,a,i,o),e,s)}(r,i,e,o);break;case"overload":l=function(e,t,n,r){x();let i=E(n);const o=V(e,n);i||(i=w(e,Be(),n,r));const a=void 0!==i?Be():o.end;return xt(D.createJSDocOverloadTag(t,o,i),e,a)}(r,i,e,o);break;case"satisfies":l=function(e,n,r,i){const o=t(!1),a=void 0!==r&&void 0!==i?w(e,Be(),r,i):void 0;return xt(D.createJSDocSatisfiesTag(n,o,a),e)}(r,i,e,o);break;case"see":l=function(e,t,r,i){const o=23===ze()||et((()=>60===Ue()&&ba(Ue())&&F(a.getTokenValue())))?void 0:n(),s=void 0!==r&&void 0!==i?w(e,Be(),r,i):void 0;return xt(D.createJSDocSeeTag(t,o,s),e)}(r,i,e,o);break;case"exception":case"throws":l=function(e,t,n,r){const i=I(),o=w(e,Be(),n,r);return xt(D.createJSDocThrowsTag(t,i,o),e)}(r,i,e,o);break;case"import":l=function(e,t,n,r){const i=a.getTokenFullStart();let o;rt()&&(o=wt());const s=fo(o,i,!0,!0),c=yo(),l=mo(),u=void 0!==n&&void 0!==r?w(e,Be(),n,r):void 0;return xt(D.createJSDocImportTag(t,s,c,l,u),e)}(r,i,e,o);break;default:l=function(e,t,n,r){return xt(D.createJSDocUnknownTag(t,w(e,Be(),n,r)),e)}(r,i,e,o)}return l}function w(e,t,n,r){return r||(n+=t-e),E(n,r.slice(n))}function E(e,t){const n=Be();let r=[];const i=[];let o,s,c=0;function l(t){s||(s=e),r.push(t),e+=t.length}void 0!==t&&(""!==t&&l(t),c=1);let u=ze();e:for(;;){switch(u){case 4:c=0,r.push(a.getTokenText()),e=0;break;case 60:a.resetTokenState(a.getTokenEnd()-1);break e;case 1:break e;case 5:xn.assert(2!==c&&3!==c,"whitespace shouldn't come from the scanner while saving comment text");const t=a.getTokenText();void 0!==s&&e+t.length>s&&(r.push(t.slice(s-e)),c=2),e+=t.length;break;case 19:c=2;const u=a.getTokenFullStart(),_=P(a.getTokenEnd()-1);_?(i.push(xt(D.createJSDocText(r.join("")),o??n,u)),i.push(_),r=[],o=a.getTokenEnd()):l(a.getTokenText());break;case 62:c=3===c?2:3,l(a.getTokenText());break;case 82:3!==c&&(c=2),l(a.getTokenValue());break;case 42:if(0===c){c=1,e+=1;break}default:3!==c&&(c=2),l(a.getTokenText())}u=2===c||3===c?Ke(3===c):Ue()}y(r);const _=r.join("").trimEnd();return i.length?(_.length&&i.push(xt(D.createJSDocText(_),o??n)),bt(i,n,a.getTokenEnd())):_.length?_:void 0}function P(e){const t=tt(N);if(!t)return;Ue(),x();const n=function(){if(ba(ze())){const e=Be();let t=Dt();for(;dt(25);)t=xt(D.createQualifiedName(t,81===ze()?St(80,!1):Dt()),e);for(;81===ze();)Xe(),Ue(),t=xt(D.createJSDocMemberName(t,wt()),e);return t}}(),r=[];for(;20!==ze()&&4!==ze()&&1!==ze();)r.push(a.getTokenText()),Ue();return xt(("link"===t?D.createJSDocLink:"linkcode"===t?D.createJSDocLinkCode:D.createJSDocLinkPlain)(n,r.join("")),e,a.getTokenEnd())}function N(){if(T(),19===ze()&&60===Ue()&&ba(Ue())){const e=a.getTokenValue();if(F(e))return e}}function F(e){return"link"===e||"linkcode"===e||"linkplain"===e}function I(){return T(),19===ze()?t():void 0}function M(){const e=Y(23);e&&x();const t=Y(62),n=function(){let e=ee();for(dt(23)&&it(24);dt(25);){const t=ee();dt(23)&&it(24),e=sn(e,t)}return e}();return t&&(function(e){if(ze()===e)return function(){const e=Be(),t=ze();return Ue(),xt(O(t),e)}()}(62)||(xn.assert(Fh(62)),St(62,!1,va._0_expected,Ra(62)))),e&&(x(),pt(64)&&yr(),it(24)),{name:n,isBracketed:e}}function L(e){switch(e.kind){case 151:return!0;case 188:return L(e.elementType);default:return xE(e)&&qD(e.typeName)&&"Object"===e.typeName.escapedText&&!e.typeArguments}}function R(e,t,n,r){let i=I(),o=!i;T();const{name:a,isBracketed:s}=M(),c=T();o&&!et(N)&&(i=I());const l=w(e,Be(),r,c),u=function(e,t,n,r){if(e&&L(e.type)){const i=Be();let o,a;for(;o=tt((()=>W(n,r,t)));)341===o.kind||348===o.kind?a=ue(a,o):345===o.kind&&je(o.tagName,va.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(a){const t=xt(D.createJSDocTypeLiteral(a,188===e.type.kind),i);return xt(D.createJSDocTypeExpression(t),i)}}}(i,a,n,r);return u&&(i=u,o=!0),xt(1===n?D.createJSDocPropertyTag(t,a,s,i,o,l):D.createJSDocParameterTag(t,a,s,i,o,l),e)}function B(e,n,r,i){Q(s,TF)&&Le(n.pos,a.getTokenStart(),va._0_tag_already_specified,vc(n.escapedText));const o=t(!0),c=void 0!==r&&void 0!==i?w(e,Be(),r,i):void 0;return xt(D.createJSDocTypeTag(n,o,c),e)}function J(){const e=dt(19),t=Be(),n=function(){const e=Be();let t=ee();for(;dt(25);){const n=ee();t=xt(j(t,n),e)}return t}();a.setSkipJsDocLeadingAsterisks(!0);const r=io();a.setSkipJsDocLeadingAsterisks(!1);const i=xt(D.createExpressionWithTypeArguments(n,r),t);return e&&it(20),i}function z(e,t,n,r,i){return xt(t(n,w(e,Be(),r,i)),e)}function $(e,n,r,i){const o=t(!0);return x(),xt(D.createJSDocThisTag(n,o,w(e,Be(),r,i)),e)}function q(e){const t=a.getTokenStart();if(!ba(ze()))return;const n=ee();if(dt(25)){const r=q(!0);return xt(D.createModuleDeclaration(void 0,n,r,e?8:void 0),t)}return e&&(n.flags|=4096),n}function V(e,t){const n=function(e){const t=Be();let n,r;for(;n=tt((()=>W(4,e)));){if(345===n.kind){je(n.tagName,va.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}r=ue(r,n)}return bt(r||[],t)}(t),r=tt((()=>{if(Y(60)){const e=C(t);if(e&&342===e.kind)return e}}));return xt(D.createJSDocSignature(void 0,n,r),e)}function U(e,t){for(;!qD(e)||!qD(t);){if(qD(e)||qD(t)||e.right.escapedText!==t.right.escapedText)return!1;e=e.left,t=t.left}return e.escapedText===t.escapedText}function K(e){return W(1,e)}function W(e,t,n){let r=!0,i=!1;for(;;)switch(Ue()){case 60:if(r){const r=H(e,t);return!(r&&(341===r.kind||348===r.kind)&&n&&(qD(r.name)||!U(n,r.name.left)))&&r}i=!1;break;case 4:r=!0,i=!1;break;case 42:i&&(r=!1),i=!0;break;case 80:r=!1;break;case 1:return!1}}function H(e,t){xn.assert(60===ze());const n=a.getTokenFullStart();Ue();const r=ee(),i=T();let o;switch(r.escapedText){case"type":return 1===e&&B(n,r);case"prop":case"property":o=1;break;case"arg":case"argument":case"param":o=6;break;case"template":return X(n,r,t,i);case"this":return $(n,r,t,i);default:return!1}return!!(e&o)&&R(n,r,e,t)}function G(){const e=Be(),t=Y(23);t&&x();const n=Xi(!1,!0),r=ee(va.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);let i;if(t&&(x(),it(64),i=be(16777216,kn),it(24)),!Nd(r))return xt(D.createTypeParameterDeclaration(n,r,void 0,i),e)}function X(e,n,r,i){const o=19===ze()?t():void 0,a=function(){const e=Be(),t=[];do{x();const e=G();void 0!==e&&t.push(e),T()}while(Y(28));return bt(t,e)}();return xt(D.createJSDocTemplateTag(n,o,a,w(e,Be(),r,i)),e)}function Y(e){return ze()===e&&(Ue(),!0)}function ee(e){if(!ba(ze()))return St(80,!e,e||va.Identifier_expected);S++;const t=a.getTokenStart(),n=a.getTokenEnd(),r=ze(),i=kt(a.getTokenValue()),o=xt(A(i,r),t,n);return Ue(),o}}e.parseJSDocTypeExpressionForTests=function(e,n,r){ae("file.js",e,99,void 0,1,0),a.setText(e,n,r),v=a.scan();const i=t(),o=de("file.js",99,1,!1,[],O(1),0,_t),s=oS(g,o);return h&&(o.jsDocDiagnostics=oS(h,o)),se(),i?{jsDocTypeExpression:i,diagnostics:s}:void 0},e.parseJSDocTypeExpression=t,e.parseJSDocNameReference=n,e.parseIsolatedJSDocComment=function(e,t,n){ae("",e,99,void 0,1,0);const r=be(16777216,(()=>l(t,n))),i=oS(g,{languageVariant:0,text:e});return se(),r?{jsDoc:r,diagnostics:i}:void 0},e.parseJSDocComment=function(e,t,n){const r=v,i=g.length,o=ie,a=be(16777216,(()=>l(t,n)));return OT(a,e),524288&w&&(h||(h=[]),pe(h,g,i)),v=r,g.length=i,ie=o,a},(i=r||(r={}))[i.BeginningOfLine=0]="BeginningOfLine",i[i.SawAsterisk=1]="SawAsterisk",i[i.SavingComments=2]="SavingComments",i[i.SavingBackticks=3]="SavingBackticks",(s=o||(o={}))[s.Property=1]="Property",s[s.Parameter=2]="Parameter",s[s.CallbackParameter=4]="CallbackParameter"})(Do=e.JSDocParser||(e.JSDocParser={}))})(yI||(yI={}));var WI,HI=new WeakSet,GI=new WeakSet;function XI(e){GI.add(e)}function QI(e){return void 0!==YI(e)}function YI(e){const t=zo(e,Rk,!1);if(t)return t;if(Ao(e,".ts")){const t=Bo(e).lastIndexOf(".d.");if(t>=0)return e.substring(t)}}function ZI(e,t){const n=[];for(const e of vs(t,0)||u)oO(n,e,t.substring(e.pos,e.end));e.pragmas=new Map;for(const t of n)if(e.pragmas.has(t.name)){const n=e.pragmas.get(t.name);n instanceof Array?n.push(t.args):e.pragmas.set(t.name,[n,t.args])}else e.pragmas.set(t.name,t.args)}function eO(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach(((n,r)=>{switch(r){case"reference":{const r=e.referencedFiles,i=e.typeReferenceDirectives,o=e.libReferenceDirectives;f(at(n),(n=>{const{types:a,lib:s,path:c,"resolution-mode":l,preserve:u}=n.arguments,_="true"===u||void 0;if("true"===n.arguments["no-default-lib"])e.hasNoDefaultLib=!0;else if(a){const e=function(e,t,n,r){if(e)return"import"===e?99:"require"===e?1:void r(t,n-t,va.resolution_mode_should_be_either_require_or_import)}(l,a.pos,a.end,t);i.push({pos:a.pos,end:a.end,fileName:a.value,...e?{resolutionMode:e}:{},..._?{preserve:_}:{}})}else s?o.push({pos:s.pos,end:s.end,fileName:s.value,..._?{preserve:_}:{}}):c?r.push({pos:c.pos,end:c.end,fileName:c.value,..._?{preserve:_}:{}}):t(n.range.pos,n.range.end-n.range.pos,va.Invalid_reference_directive_syntax)}));break}case"amd-dependency":e.amdDependencies=O(at(n),(e=>({name:e.arguments.name,path:e.arguments.path})));break;case"amd-module":if(n instanceof Array)for(const r of n)e.moduleName&&t(r.range.pos,r.range.end-r.range.pos,va.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=r.arguments.name;else e.moduleName=n.arguments.name;break;case"ts-nocheck":case"ts-check":f(at(n),(t=>{(!e.checkJsDirective||t.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:"ts-check"===r,end:t.range.end,pos:t.range.pos})}));break;case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:xn.fail("Unhandled pragma kind")}}))}(e=>{function t(e,t,r,o,a,s){return void(t?l(e):c(e));function c(e){let t="";if(s&&n(e)&&(t=o.substring(e.pos,e.end)),qF(e),FT(e,e.pos+r,e.end+r),s&&n(e)&&xn.assert(t===a.substring(e.pos,e.end)),LI(e,c,l),O_(e))for(const t of e.jsDoc)c(t);i(e,s)}function l(e){FT(e,e.pos+r,e.end+r);for(const t of e)c(t)}}function n(e){switch(e.kind){case 11:case 9:case 80:return!0}return!1}function r(e,t,n,r,i){xn.assert(e.end>=t,"Adjusting an element that was entirely before the change range"),xn.assert(e.pos<=n,"Adjusting an element that was entirely after the change range"),xn.assert(e.pos<=e.end);const o=Math.min(e.pos,r),a=e.end>=n?e.end+i:Math.min(e.end,r);if(xn.assert(o<=a),e.parent){const t=e.parent;xn.assertGreaterThanOrEqual(o,t.pos),xn.assertLessThanOrEqual(a,t.end)}FT(e,o,a)}function i(e,t){if(t){let t=e.pos;const n=e=>{xn.assert(e.pos>=t),t=e.end};if(O_(e))for(const t of e.jsDoc)n(t);LI(e,n),xn.assert(t<=e.end)}}function o(e,t){let n,r=e;if(LI(e,(function e(i){if(!Nd(i))return i.pos<=t?(i.pos>=r.pos&&(r=i),tt),!0)})),n){const e=function(e){for(;;){const t=Nx(e);if(!t)return e;e=t}}(n);e.pos>r.pos&&(r=e)}return r}function a(e,t,n,r){const i=e.text;if(n&&(xn.assert(i.length-n.span.length+n.newLength===t.length),r||xn.shouldAssert(3))){const e=i.substr(0,n.span.start),r=t.substr(0,n.span.start);xn.assert(e===r);const o=i.substring(js(n.span),i.length),a=t.substring(js(Qs(n)),t.length);xn.assert(o===a)}}function s(e){let t=e.statements,n=0;xn.assert(n(o!==i&&(r&&r.end===o&&n=e.pos&&i=e.pos&&i0&&t<=1;t++){const t=o(e,n);xn.assert(t.pos<=n);const r=t.pos;n=Math.max(0,r-1)}return Zs(Xs(n,js(t.span)),t.newLength+(t.span.start-n))}(e,c);a(e,n,d,l),xn.assert(d.span.start<=c.span.start),xn.assert(js(d.span)===js(c.span)),xn.assert(js(Qs(d))===js(Qs(c)));const p=Qs(d).length-d.span.length;!function(e,n,o,a,s,c,l,u){return void _(e);function _(e){if(xn.assert(e.pos<=e.end),e.pos>o)return void t(e,!1,s,c,l,u);const p=e.end;if(p>=n){if(XI(e),qF(e),r(e,n,o,a,s),LI(e,_,d),O_(e))for(const t of e.jsDoc)_(t);i(e,u)}else xn.assert(po)return void t(e,!0,s,c,l,u);const i=e.end;if(i>=n){XI(e),r(e,n,o,a,s);for(const t of e)_(t)}else xn.assert(ir){u();const t={range:{pos:e.pos+i,end:e.end+i},type:l};c=ue(c,t),s&&xn.assert(o.substring(e.pos,e.end)===a.substring(t.range.pos,t.range.end))}}return u(),c;function u(){l||(l=!0,c?t&&c.push(...t):c=t)}}(e.commentDirectives,f.commentDirectives,d.span.start,js(d.span),p,u,n,l),f.impliedNodeFormat=e.impliedNodeFormat,f},e.createSyntaxCursor=s,(l=c||(c={}))[l.Value=-1]="Value"})(WI||(WI={}));var tO=new Map;function nO(e){if(tO.has(e))return tO.get(e);const t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return tO.set(e,t),t}var rO=/^\/\/\/\s*<(\S+)\s.*?\/>/im,iO=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im;function oO(e,t,n){const r=2===t.kind&&rO.exec(n);if(r){const i=r[1].toLowerCase(),o=Ki[i];if(!(o&&1&o.kind))return;if(o.args){const r={};for(const e of o.args){const i=nO(e.name).exec(n);if(!i&&!e.optional)return;if(i){const n=i[2]||i[3];if(e.captureSpan){const o=t.pos+i.index+i[1].length+1;r[e.name]={value:n,pos:o,end:o+n.length}}else r[e.name]=n}}e.push({name:i,args:{arguments:r,range:t}})}else e.push({name:i,args:{arguments:{},range:t}});return}const i=2===t.kind&&iO.exec(n);if(i)return aO(e,t,2,i);if(3===t.kind){const r=/@(\S+)(\s+.*)?$/gim;let i;for(;i=r.exec(n);)aO(e,t,4,i)}}function aO(e,t,n,r){if(!r)return;const i=r[1].toLowerCase(),o=Ki[i];if(!(o&&o.kind&n))return;const a=function(e,t){if(!t)return{};if(!e.args)return{};const n=t.trim().split(/\s+/),r={};for(let t=0;t[""+t,e]))),dO=[["es5","lib.es5.d.ts"],["es6","lib.es2015.d.ts"],["es2015","lib.es2015.d.ts"],["es7","lib.es2016.d.ts"],["es2016","lib.es2016.d.ts"],["es2017","lib.es2017.d.ts"],["es2018","lib.es2018.d.ts"],["es2019","lib.es2019.d.ts"],["es2020","lib.es2020.d.ts"],["es2021","lib.es2021.d.ts"],["es2022","lib.es2022.d.ts"],["es2023","lib.es2023.d.ts"],["esnext","lib.esnext.d.ts"],["dom","lib.dom.d.ts"],["dom.iterable","lib.dom.iterable.d.ts"],["dom.asynciterable","lib.dom.asynciterable.d.ts"],["webworker","lib.webworker.d.ts"],["webworker.importscripts","lib.webworker.importscripts.d.ts"],["webworker.iterable","lib.webworker.iterable.d.ts"],["webworker.asynciterable","lib.webworker.asynciterable.d.ts"],["scripthost","lib.scripthost.d.ts"],["es2015.core","lib.es2015.core.d.ts"],["es2015.collection","lib.es2015.collection.d.ts"],["es2015.generator","lib.es2015.generator.d.ts"],["es2015.iterable","lib.es2015.iterable.d.ts"],["es2015.promise","lib.es2015.promise.d.ts"],["es2015.proxy","lib.es2015.proxy.d.ts"],["es2015.reflect","lib.es2015.reflect.d.ts"],["es2015.symbol","lib.es2015.symbol.d.ts"],["es2015.symbol.wellknown","lib.es2015.symbol.wellknown.d.ts"],["es2016.array.include","lib.es2016.array.include.d.ts"],["es2016.intl","lib.es2016.intl.d.ts"],["es2017.date","lib.es2017.date.d.ts"],["es2017.object","lib.es2017.object.d.ts"],["es2017.sharedmemory","lib.es2017.sharedmemory.d.ts"],["es2017.string","lib.es2017.string.d.ts"],["es2017.intl","lib.es2017.intl.d.ts"],["es2017.typedarrays","lib.es2017.typedarrays.d.ts"],["es2018.asyncgenerator","lib.es2018.asyncgenerator.d.ts"],["es2018.asynciterable","lib.es2018.asynciterable.d.ts"],["es2018.intl","lib.es2018.intl.d.ts"],["es2018.promise","lib.es2018.promise.d.ts"],["es2018.regexp","lib.es2018.regexp.d.ts"],["es2019.array","lib.es2019.array.d.ts"],["es2019.object","lib.es2019.object.d.ts"],["es2019.string","lib.es2019.string.d.ts"],["es2019.symbol","lib.es2019.symbol.d.ts"],["es2019.intl","lib.es2019.intl.d.ts"],["es2020.bigint","lib.es2020.bigint.d.ts"],["es2020.date","lib.es2020.date.d.ts"],["es2020.promise","lib.es2020.promise.d.ts"],["es2020.sharedmemory","lib.es2020.sharedmemory.d.ts"],["es2020.string","lib.es2020.string.d.ts"],["es2020.symbol.wellknown","lib.es2020.symbol.wellknown.d.ts"],["es2020.intl","lib.es2020.intl.d.ts"],["es2020.number","lib.es2020.number.d.ts"],["es2021.promise","lib.es2021.promise.d.ts"],["es2021.string","lib.es2021.string.d.ts"],["es2021.weakref","lib.es2021.weakref.d.ts"],["es2021.intl","lib.es2021.intl.d.ts"],["es2022.array","lib.es2022.array.d.ts"],["es2022.error","lib.es2022.error.d.ts"],["es2022.intl","lib.es2022.intl.d.ts"],["es2022.object","lib.es2022.object.d.ts"],["es2022.sharedmemory","lib.es2022.sharedmemory.d.ts"],["es2022.string","lib.es2022.string.d.ts"],["es2022.regexp","lib.es2022.regexp.d.ts"],["es2023.array","lib.es2023.array.d.ts"],["es2023.collection","lib.es2023.collection.d.ts"],["es2023.intl","lib.es2023.intl.d.ts"],["esnext.array","lib.es2023.array.d.ts"],["esnext.collection","lib.esnext.collection.d.ts"],["esnext.symbol","lib.es2019.symbol.d.ts"],["esnext.asynciterable","lib.es2018.asynciterable.d.ts"],["esnext.intl","lib.esnext.intl.d.ts"],["esnext.disposable","lib.esnext.disposable.d.ts"],["esnext.bigint","lib.es2020.bigint.d.ts"],["esnext.string","lib.es2022.string.d.ts"],["esnext.promise","lib.esnext.promise.d.ts"],["esnext.weakref","lib.es2021.weakref.d.ts"],["esnext.decorators","lib.esnext.decorators.d.ts"],["esnext.object","lib.esnext.object.d.ts"],["esnext.array","lib.esnext.array.d.ts"],["esnext.regexp","lib.esnext.regexp.d.ts"],["esnext.string","lib.esnext.string.d.ts"],["decorators","lib.decorators.d.ts"],["decorators.legacy","lib.decorators.legacy.d.ts"]],pO=dO.map((e=>e[0])),fO=new Map(dO),mO=[{name:"watchFile",type:new Map(Object.entries({fixedpollinginterval:0,prioritypollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3,usefsevents:4,usefseventsonparentdirectory:5})),category:va.Watch_and_Build_Modes,description:va.Specify_how_the_TypeScript_watch_mode_works,defaultValueDescription:4},{name:"watchDirectory",type:new Map(Object.entries({usefsevents:0,fixedpollinginterval:1,dynamicprioritypolling:2,fixedchunksizepolling:3})),category:va.Watch_and_Build_Modes,description:va.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,defaultValueDescription:0},{name:"fallbackPolling",type:new Map(Object.entries({fixedinterval:0,priorityinterval:1,dynamicpriority:2,fixedchunksize:3})),category:va.Watch_and_Build_Modes,description:va.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,defaultValueDescription:1},{name:"synchronousWatchDirectory",type:"boolean",category:va.Watch_and_Build_Modes,description:va.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,defaultValueDescription:!1},{name:"excludeDirectories",type:"list",element:{name:"excludeDirectory",type:"string",isFilePath:!0,extraValidation:DL},allowConfigDirTemplateSubstitution:!0,category:va.Watch_and_Build_Modes,description:va.Remove_a_list_of_directories_from_the_watch_process},{name:"excludeFiles",type:"list",element:{name:"excludeFile",type:"string",isFilePath:!0,extraValidation:DL},allowConfigDirTemplateSubstitution:!0,category:va.Watch_and_Build_Modes,description:va.Remove_a_list_of_files_from_the_watch_mode_s_processing}],gO=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:va.Command_line_Options,description:va.Print_this_message,defaultValueDescription:!1},{name:"help",shortName:"?",type:"boolean",isCommandLineOnly:!0,category:va.Command_line_Options,defaultValueDescription:!1},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:va.Command_line_Options,description:va.Watch_input_files,defaultValueDescription:!1},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:va.Output_Formatting,description:va.Disable_wiping_the_console_in_watch_mode,defaultValueDescription:!1},{name:"listFiles",type:"boolean",category:va.Compiler_Diagnostics,description:va.Print_all_of_the_files_read_during_the_compilation,defaultValueDescription:!1},{name:"explainFiles",type:"boolean",category:va.Compiler_Diagnostics,description:va.Print_files_read_during_the_compilation_including_why_it_was_included,defaultValueDescription:!1},{name:"listEmittedFiles",type:"boolean",category:va.Compiler_Diagnostics,description:va.Print_the_names_of_emitted_files_after_a_compilation,defaultValueDescription:!1},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:va.Output_Formatting,description:va.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,defaultValueDescription:!0},{name:"traceResolution",type:"boolean",category:va.Compiler_Diagnostics,description:va.Log_paths_used_during_the_moduleResolution_process,defaultValueDescription:!1},{name:"diagnostics",type:"boolean",category:va.Compiler_Diagnostics,description:va.Output_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"extendedDiagnostics",type:"boolean",category:va.Compiler_Diagnostics,description:va.Output_more_detailed_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:va.FILE_OR_DIRECTORY,category:va.Compiler_Diagnostics,description:va.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,defaultValueDescription:"profile.cpuprofile"},{name:"generateTrace",type:"string",isFilePath:!0,isCommandLineOnly:!0,paramType:va.DIRECTORY,category:va.Compiler_Diagnostics,description:va.Generates_an_event_trace_and_a_list_of_types},{name:"incremental",shortName:"i",type:"boolean",category:va.Projects,description:va.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,transpileOptionValue:void 0,defaultValueDescription:va.false_unless_composite_is_set},{name:"declaration",shortName:"d",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,transpileOptionValue:void 0,description:va.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,defaultValueDescription:va.false_unless_composite_is_set},{name:"declarationMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,transpileOptionValue:void 0,defaultValueDescription:!1,description:va.Create_sourcemaps_for_d_ts_files},{name:"emitDeclarationOnly",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,description:va.Only_output_d_ts_files_and_not_JavaScript_files,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"sourceMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,defaultValueDescription:!1,description:va.Create_source_map_files_for_emitted_JavaScript_files},{name:"inlineSourceMap",type:"boolean",affectsBuildInfo:!0,category:va.Emit,description:va.Include_sourcemap_files_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"assumeChangesOnlyAffectDirectDependencies",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:va.Watch_and_Build_Modes,description:va.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,defaultValueDescription:!1},{name:"locale",type:"string",category:va.Command_line_Options,isCommandLineOnly:!0,description:va.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,defaultValueDescription:va.Platform_specific}],hO={name:"target",shortName:"t",type:new Map(Object.entries({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,es2021:8,es2022:9,es2023:10,esnext:99})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,deprecatedKeys:new Set(["es3"]),paramType:va.VERSION,showInSimplifiedHelpView:!0,category:va.Language_and_Environment,description:va.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,defaultValueDescription:1},yO={name:"module",shortName:"m",type:new Map(Object.entries({none:0,commonjs:1,amd:2,system:4,umd:3,es6:5,es2015:5,es2020:6,es2022:7,esnext:99,node16:100,nodenext:199,preserve:200})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,affectsBuildInfo:!0,paramType:va.KIND,showInSimplifiedHelpView:!0,category:va.Modules,description:va.Specify_what_module_code_is_generated,defaultValueDescription:void 0},vO=[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:va.Command_line_Options,description:va.Show_all_compiler_options,defaultValueDescription:!1},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:va.Command_line_Options,description:va.Print_the_compiler_s_version,defaultValueDescription:!1},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:va.Command_line_Options,description:va.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,defaultValueDescription:!1},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:va.Command_line_Options,paramType:va.FILE_OR_DIRECTORY,description:va.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:va.Command_line_Options,description:va.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,defaultValueDescription:!1},{name:"showConfig",type:"boolean",showInSimplifiedHelpView:!0,category:va.Command_line_Options,isCommandLineOnly:!0,description:va.Print_the_final_configuration_instead_of_building,defaultValueDescription:!1},{name:"listFilesOnly",type:"boolean",category:va.Command_line_Options,isCommandLineOnly:!0,description:va.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,defaultValueDescription:!1},hO,yO,{name:"lib",type:"list",element:{name:"lib",type:fO,defaultValueDescription:void 0},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:va.Language_and_Environment,description:va.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",allowJsFlag:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.JavaScript_Support,description:va.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,defaultValueDescription:!1},{name:"checkJs",type:"boolean",affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.JavaScript_Support,description:va.Enable_error_reporting_in_type_checked_JavaScript_files,defaultValueDescription:!1},{name:"jsx",type:uO,affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,affectsSemanticDiagnostics:!0,paramType:va.KIND,showInSimplifiedHelpView:!0,category:va.Language_and_Environment,description:va.Specify_what_JSX_code_is_generated,defaultValueDescription:void 0},{name:"outFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:va.FILE,showInSimplifiedHelpView:!0,category:va.Emit,description:va.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:va.DIRECTORY,showInSimplifiedHelpView:!0,category:va.Emit,description:va.Specify_an_output_folder_for_all_emitted_files},{name:"rootDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:va.LOCATION,category:va.Modules,description:va.Specify_the_root_folder_within_your_source_files,defaultValueDescription:va.Computed_from_the_list_of_input_files},{name:"composite",type:"boolean",affectsBuildInfo:!0,isTSConfigOnly:!0,category:va.Projects,transpileOptionValue:void 0,defaultValueDescription:!1,description:va.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,affectsBuildInfo:!0,isFilePath:!0,paramType:va.FILE,category:va.Projects,transpileOptionValue:void 0,defaultValueDescription:".tsbuildinfo",description:va.Specify_the_path_to_tsbuildinfo_incremental_compilation_file},{name:"removeComments",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Emit,defaultValueDescription:!1,description:va.Disable_emitting_comments},{name:"noCheck",type:"boolean",showInSimplifiedHelpView:!1,category:va.Compiler_Diagnostics,description:va.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,transpileOptionValue:!0,defaultValueDescription:!1,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,extraValidation:()=>[va.Unknown_compiler_option_0,"noCheck"]},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:va.Emit,description:va.Disable_emitting_files_from_a_compilation,transpileOptionValue:void 0,defaultValueDescription:!1},{name:"importHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,defaultValueDescription:!1},{name:"importsNotUsedAsValues",type:new Map(Object.entries({remove:0,preserve:1,error:2})),affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,defaultValueDescription:0},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,defaultValueDescription:!1},{name:"isolatedModules",type:"boolean",category:va.Interop_Constraints,description:va.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,transpileOptionValue:!0,defaultValueDescription:!1},{name:"verbatimModuleSyntax",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Interop_Constraints,description:va.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting,defaultValueDescription:!1},{name:"isolatedDeclarations",type:"boolean",category:va.Interop_Constraints,description:va.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files,defaultValueDescription:!1,affectsBuildInfo:!0,affectsSemanticDiagnostics:!0},{name:"strict",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Type_Checking,description:va.Enable_all_strict_type_checking_options,defaultValueDescription:!1},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,defaultValueDescription:va.false_unless_strict_is_set},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.When_type_checking_take_into_account_null_and_undefined,defaultValueDescription:va.false_unless_strict_is_set},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,defaultValueDescription:va.false_unless_strict_is_set},{name:"strictBindCallApply",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,defaultValueDescription:va.false_unless_strict_is_set},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,defaultValueDescription:va.false_unless_strict_is_set},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Enable_error_reporting_when_this_is_given_the_type_any,defaultValueDescription:va.false_unless_strict_is_set},{name:"useUnknownInCatchVariables",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Default_catch_clause_variables_as_unknown_instead_of_any,defaultValueDescription:va.false_unless_strict_is_set},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,affectsEmit:!0,affectsBuildInfo:!0,strictFlag:!0,category:va.Type_Checking,description:va.Ensure_use_strict_is_always_emitted,defaultValueDescription:va.false_unless_strict_is_set},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Enable_error_reporting_when_local_variables_aren_t_read,defaultValueDescription:!1},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Raise_an_error_when_a_function_parameter_isn_t_read,defaultValueDescription:!1},{name:"exactOptionalPropertyTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Interpret_optional_property_types_as_written_rather_than_adding_undefined,defaultValueDescription:!1},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,defaultValueDescription:!1},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,defaultValueDescription:!1},{name:"noUncheckedIndexedAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Add_undefined_to_a_type_when_accessed_using_an_index,defaultValueDescription:!1},{name:"noImplicitOverride",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,defaultValueDescription:!1},{name:"noPropertyAccessFromIndexSignature",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!1,category:va.Type_Checking,description:va.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,defaultValueDescription:!1},{name:"moduleResolution",type:new Map(Object.entries({node10:2,node:2,classic:1,node16:3,nodenext:99,bundler:100})),deprecatedKeys:new Set(["node"]),affectsSourceFile:!0,affectsModuleResolution:!0,paramType:va.STRATEGY,category:va.Modules,description:va.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,defaultValueDescription:va.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:va.Modules,description:va.Specify_the_base_directory_to_resolve_non_relative_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,isTSConfigOnly:!0,category:va.Modules,description:va.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:va.Modules,description:va.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules,transpileOptionValue:void 0,defaultValueDescription:va.Computed_from_the_list_of_input_files},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,allowConfigDirTemplateSubstitution:!0,category:va.Modules,description:va.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types},{name:"types",type:"list",element:{name:"types",type:"string"},affectsProgramStructure:!0,showInSimplifiedHelpView:!0,category:va.Modules,description:va.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Interop_Constraints,description:va.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,defaultValueDescription:va.module_system_or_esModuleInterop},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:va.Interop_Constraints,description:va.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,defaultValueDescription:!1},{name:"preserveSymlinks",type:"boolean",category:va.Interop_Constraints,description:va.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,defaultValueDescription:!1},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Modules,description:va.Allow_accessing_UMD_globals_from_modules,defaultValueDescription:!1},{name:"moduleSuffixes",type:"list",element:{name:"suffix",type:"string"},listPreserveFalsyValues:!0,affectsModuleResolution:!0,category:va.Modules,description:va.List_of_file_name_suffixes_to_search_when_resolving_a_module},{name:"allowImportingTsExtensions",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Modules,description:va.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,defaultValueDescription:!1,transpileOptionValue:void 0},{name:"resolvePackageJsonExports",type:"boolean",affectsModuleResolution:!0,category:va.Modules,description:va.Use_the_package_json_exports_field_when_resolving_package_imports,defaultValueDescription:va.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"resolvePackageJsonImports",type:"boolean",affectsModuleResolution:!0,category:va.Modules,description:va.Use_the_package_json_imports_field_when_resolving_imports,defaultValueDescription:va.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false},{name:"customConditions",type:"list",element:{name:"condition",type:"string"},affectsModuleResolution:!0,category:va.Modules,description:va.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports},{name:"sourceRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:va.LOCATION,category:va.Emit,description:va.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code},{name:"mapRoot",type:"string",affectsEmit:!0,affectsBuildInfo:!0,paramType:va.LOCATION,category:va.Emit,description:va.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSources",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,defaultValueDescription:!1},{name:"experimentalDecorators",type:"boolean",affectsEmit:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Language_and_Environment,description:va.Enable_experimental_support_for_legacy_experimental_decorators,defaultValueDescription:!1},{name:"emitDecoratorMetadata",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:va.Language_and_Environment,description:va.Emit_design_type_metadata_for_decorated_declarations_in_source_files,defaultValueDescription:!1},{name:"jsxFactory",type:"string",category:va.Language_and_Environment,description:va.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h,defaultValueDescription:"`React.createElement`"},{name:"jsxFragmentFactory",type:"string",category:va.Language_and_Environment,description:va.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment,defaultValueDescription:"React.Fragment"},{name:"jsxImportSource",type:"string",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,affectsModuleResolution:!0,category:va.Language_and_Environment,description:va.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,defaultValueDescription:"react"},{name:"resolveJsonModule",type:"boolean",affectsModuleResolution:!0,category:va.Modules,description:va.Enable_importing_json_files,defaultValueDescription:!1},{name:"allowArbitraryExtensions",type:"boolean",affectsProgramStructure:!0,category:va.Modules,description:va.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present,defaultValueDescription:!1},{name:"out",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!1,category:va.Backwards_Compatibility,paramType:va.FILE,transpileOptionValue:void 0,description:va.Deprecated_setting_Use_outFile_instead},{name:"reactNamespace",type:"string",affectsEmit:!0,affectsBuildInfo:!0,category:va.Language_and_Environment,description:va.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,defaultValueDescription:"`React`"},{name:"skipDefaultLibCheck",type:"boolean",affectsBuildInfo:!0,category:va.Completeness,description:va.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,defaultValueDescription:!1},{name:"charset",type:"string",category:va.Backwards_Compatibility,description:va.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files,defaultValueDescription:"utf8"},{name:"emitBOM",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,defaultValueDescription:!1},{name:"newLine",type:new Map(Object.entries({crlf:0,lf:1})),affectsEmit:!0,affectsBuildInfo:!0,paramType:va.NEWLINE,category:va.Emit,description:va.Set_the_newline_character_for_emitting_files,defaultValueDescription:"lf"},{name:"noErrorTruncation",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Output_Formatting,description:va.Disable_truncating_types_in_error_messages,defaultValueDescription:!1},{name:"noLib",type:"boolean",category:va.Language_and_Environment,affectsProgramStructure:!0,description:va.Disable_including_any_library_files_including_the_default_lib_d_ts,transpileOptionValue:!0,defaultValueDescription:!1},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:va.Modules,description:va.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project,transpileOptionValue:!0,defaultValueDescription:!1},{name:"stripInternal",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,defaultValueDescription:!1},{name:"disableSizeLimit",type:"boolean",affectsProgramStructure:!0,category:va.Editor_Support,description:va.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,defaultValueDescription:!1},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",isTSConfigOnly:!0,category:va.Projects,description:va.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,defaultValueDescription:!1},{name:"disableSolutionSearching",type:"boolean",isTSConfigOnly:!0,category:va.Projects,description:va.Opt_a_project_out_of_multi_project_reference_checking_when_editing,defaultValueDescription:!1},{name:"disableReferencedProjectLoad",type:"boolean",isTSConfigOnly:!0,category:va.Projects,description:va.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,defaultValueDescription:!1},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,defaultValueDescription:!1},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,defaultValueDescription:!1},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,transpileOptionValue:void 0,description:va.Disable_emitting_files_if_any_type_checking_errors_are_reported,defaultValueDescription:!1},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Emit,description:va.Disable_erasing_const_enum_declarations_in_generated_code,defaultValueDescription:!1},{name:"declarationDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:va.DIRECTORY,category:va.Emit,transpileOptionValue:void 0,description:va.Specify_the_output_directory_for_generated_declaration_files},{name:"skipLibCheck",type:"boolean",affectsBuildInfo:!0,category:va.Completeness,description:va.Skip_type_checking_all_d_ts_files,defaultValueDescription:!1},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Disable_error_reporting_for_unused_labels,defaultValueDescription:void 0},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Type_Checking,description:va.Disable_error_reporting_for_unreachable_code,defaultValueDescription:void 0},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,defaultValueDescription:!1},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,defaultValueDescription:!1},{name:"forceConsistentCasingInFileNames",type:"boolean",affectsModuleResolution:!0,category:va.Interop_Constraints,description:va.Ensure_that_casing_is_correct_in_imports,defaultValueDescription:!0},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:va.JavaScript_Support,description:va.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,defaultValueDescription:0},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Disable_strict_checking_of_generic_signatures_in_function_types,defaultValueDescription:!1},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:va.Language_and_Environment,description:va.Emit_ECMAScript_standard_compliant_class_fields,defaultValueDescription:va.true_for_ES2022_and_above_including_ESNext},{name:"preserveValueImports",type:"boolean",affectsEmit:!0,affectsBuildInfo:!0,category:va.Backwards_Compatibility,description:va.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,defaultValueDescription:!1},{name:"keyofStringsOnly",type:"boolean",category:va.Backwards_Compatibility,description:va.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,defaultValueDescription:!1},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:va.Specify_a_list_of_language_service_plugins_to_include,category:va.Editor_Support},{name:"moduleDetection",type:new Map(Object.entries({auto:2,legacy:1,force:3})),affectsSourceFile:!0,affectsModuleResolution:!0,description:va.Control_what_method_is_used_to_detect_module_format_JS_files,category:va.Language_and_Environment,defaultValueDescription:va.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules},{name:"ignoreDeprecations",type:"string",defaultValueDescription:void 0}],bO=[...gO,...vO],xO=bO.filter((e=>!!e.affectsSemanticDiagnostics)),SO=bO.filter((e=>!!e.affectsEmit)),kO=bO.filter((e=>!!e.affectsDeclarationPath)),TO=bO.filter((e=>!!e.affectsModuleResolution)),CO=bO.filter((e=>!!e.affectsSourceFile||!!e.affectsBindDiagnostics)),wO=bO.filter((e=>!!e.affectsProgramStructure)),DO=bO.filter((e=>Le(e,"transpileOptionValue"))),EO=bO.filter((e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath)),PO=mO.filter((e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath)),NO=bO.filter((function(e){return!st(e.type)})),FO=[{name:"verbose",shortName:"v",category:va.Command_line_Options,description:va.Enable_verbose_logging,type:"boolean",defaultValueDescription:!1},{name:"dry",shortName:"d",category:va.Command_line_Options,description:va.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean",defaultValueDescription:!1},{name:"force",shortName:"f",category:va.Command_line_Options,description:va.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean",defaultValueDescription:!1},{name:"clean",category:va.Command_line_Options,description:va.Delete_the_outputs_of_all_projects,type:"boolean",defaultValueDescription:!1}],AO=[...gO,...FO],IO=[{name:"enable",type:"boolean",defaultValueDescription:!1},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},{name:"disableFilenameBasedTypeAcquisition",type:"boolean",defaultValueDescription:!1}];function OO(e){const t=new Map,n=new Map;return f(e,(e=>{t.set(e.name.toLowerCase(),e),e.shortName&&n.set(e.shortName,e.name)})),{optionsNameMap:t,shortOptionNames:n}}function MO(){return cO||(cO=OO(bO))}var LO={diagnostic:va.Compiler_option_0_may_only_be_used_with_build,getOptionsNameMap:QO},jO={module:1,target:3,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0,skipLibCheck:!0};function RO(e){return BO(e,cS)}function BO(e,t){const n=$e(e.type.keys()),r=(e.deprecatedKeys?n.filter((t=>!e.deprecatedKeys.has(t))):n).map((e=>`'${e}'`)).join(", ");return t(va.Argument_for_0_option_must_be_Colon_1,`--${e.name}`,r)}function JO(e,t,n){return gL(e,(t??"").trim(),n)}function zO(e,t="",n){if(an(t=t.trim(),"-"))return;if("listOrElement"===e.type&&!t.includes(","))return mL(e,t,n);if(""===t)return[];const r=t.split(",");switch(e.element.type){case"number":return q(r,(t=>mL(e.element,parseInt(t),n)));case"string":return q(r,(t=>mL(e.element,t||"",n)));case"boolean":case"object":return xn.fail(`List of ${e.element.type} is not yet supported.`);default:return q(r,(t=>JO(e.element,t,n)))}}function $O(e){return e.name}function qO(e,t,n,r,i){var o;if(null==(o=t.alternateMode)?void 0:o.getOptionsNameMap().optionsNameMap.has(e.toLowerCase()))return pL(i,r,t.alternateMode.diagnostic,e);const a=Ut(e,t.optionDeclarations,$O);return a?pL(i,r,t.unknownDidYouMeanDiagnostic,n||e,a.name):pL(i,r,t.unknownOptionDiagnostic,n||e)}function VO(e,t,n){const r={};let i;const o=[],a=[];return s(t),{options:r,watchOptions:i,fileNames:o,errors:a};function s(t){let n=0;for(;nvo.readFile(e)));if(!st(t))return void a.push(t);const r=[];let i=0;for(;;){for(;i=t.length)break;const n=i;if(34===t.charCodeAt(n)){for(i++;i32;)i++;r.push(t.substring(n,i))}}s(r)}}function UO(e,t,n,r,i,o){if(r.isTSConfigOnly){const n=e[t];"null"===n?(i[r.name]=void 0,t++):"boolean"===r.type?"false"===n?(i[r.name]=mL(r,!1,o),t++):("true"===n&&t++,o.push(cS(va.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line,r.name))):(o.push(cS(va.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line,r.name)),n&&!an(n,"-")&&t++)}else if(e[t]||"boolean"===r.type||o.push(cS(n.optionTypeMismatchDiagnostic,r.name,CM(r))),"null"!==e[t])switch(r.type){case"number":i[r.name]=mL(r,parseInt(e[t]),o),t++;break;case"boolean":const n=e[t];i[r.name]=mL(r,"false"!==n,o),"false"!==n&&"true"!==n||t++;break;case"string":i[r.name]=mL(r,e[t]||"",o),t++;break;case"list":const a=zO(r,e[t],o);i[r.name]=a||[],a&&t++;break;case"listOrElement":xn.fail("listOrElement not supported here");break;default:i[r.name]=JO(r,e[t],o),t++}else i[r.name]=void 0,t++;return t}var KO,WO={alternateMode:LO,getOptionsNameMap:MO,optionDeclarations:bO,unknownOptionDiagnostic:va.Unknown_compiler_option_0,unknownDidYouMeanDiagnostic:va.Unknown_compiler_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:va.Compiler_option_0_expects_an_argument};function HO(e,t){return VO(WO,e,t)}function GO(e,t){return XO(MO,e,t)}function XO(e,t,n=!1){t=t.toLowerCase();const{optionsNameMap:r,shortOptionNames:i}=e();if(n){const e=i.get(t);void 0!==e&&(t=e)}return r.get(t)}function QO(){return KO||(KO=OO(AO))}var YO={alternateMode:{diagnostic:va.Compiler_option_0_may_not_be_used_with_build,getOptionsNameMap:MO},getOptionsNameMap:QO,optionDeclarations:AO,unknownOptionDiagnostic:va.Unknown_build_option_0,unknownDidYouMeanDiagnostic:va.Unknown_build_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:va.Build_option_0_requires_a_value_of_type_1};function ZO(e){const{options:t,watchOptions:n,fileNames:r,errors:i}=VO(YO,e),o=t;return 0===r.length&&r.push("."),o.clean&&o.force&&i.push(cS(va.Options_0_and_1_cannot_be_combined,"clean","force")),o.clean&&o.verbose&&i.push(cS(va.Options_0_and_1_cannot_be_combined,"clean","verbose")),o.clean&&o.watch&&i.push(cS(va.Options_0_and_1_cannot_be_combined,"clean","watch")),o.watch&&o.dry&&i.push(cS(va.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:o,watchOptions:n,projects:r,errors:i}}function eM(e,...t){return ut(cS(e,...t).messageText,st)}function tM(e,t,n,r,i,o){const a=oM(e,(e=>n.readFile(e)));if(!st(a))return void n.onUnRecoverableConfigFileDiagnostic(a);const s=$I(e,a),c=n.getCurrentDirectory();return s.path=Yo(e,c,tn(n.useCaseSensitiveFileNames)),s.resolvedPath=s.path,s.originalFileName=s.fileName,JM(s,n,Go(Ro(e),c),t,Go(e,c),void 0,o,r,i)}function nM(e,t){const n=oM(e,t);return st(n)?rM(e,n):{config:{},error:n}}function rM(e,t){const n=$I(e,t);return{config:SM(n,n.parseDiagnostics,void 0),error:n.parseDiagnostics.length?n.parseDiagnostics[0]:void 0}}function iM(e,t){const n=oM(e,t);return st(n)?$I(e,n):{fileName:e,parseDiagnostics:[n]}}function oM(e,t){let n;try{n=t(e)}catch(t){return cS(va.Cannot_read_file_0_Colon_1,e,t.message)}return void 0===n?cS(va.Cannot_read_file_0,e):n}function aM(e){return Ue(e,$O)}var sM,cM={optionDeclarations:IO,unknownOptionDiagnostic:va.Unknown_type_acquisition_option_0,unknownDidYouMeanDiagnostic:va.Unknown_type_acquisition_option_0_Did_you_mean_1};function lM(){return sM||(sM=OO(mO))}var uM,_M,dM,pM={getOptionsNameMap:lM,optionDeclarations:mO,unknownOptionDiagnostic:va.Unknown_watch_option_0,unknownDidYouMeanDiagnostic:va.Unknown_watch_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:va.Watch_option_0_requires_a_value_of_type_1};function fM(){return uM||(uM=aM(bO))}function mM(){return _M||(_M=aM(mO))}function gM(){return dM||(dM=aM(IO))}var hM,yM={name:"extends",type:"listOrElement",element:{name:"extends",type:"string"},category:va.File_Management,disallowNullOrUndefined:!0},vM={name:"compilerOptions",type:"object",elementOptions:fM(),extraKeyDiagnostics:WO},bM={name:"watchOptions",type:"object",elementOptions:mM(),extraKeyDiagnostics:pM},xM={name:"typeAcquisition",type:"object",elementOptions:gM(),extraKeyDiagnostics:cM};function SM(e,t,n){var r;const i=null==(r=e.statements[0])?void 0:r.expression;if(i&&210!==i.kind){if(t.push(Jp(e,i,va.The_root_value_of_a_0_file_must_be_an_object,"jsconfig.json"===Bo(e.fileName)?"jsconfig.json":"tsconfig.json")),WE(i)){const r=S(i.elements,HE);if(r)return TM(e,r,t,!0,n)}return{}}return TM(e,i,t,!0,n)}function kM(e,t){var n;return TM(e,null==(n=e.statements[0])?void 0:n.expression,t,!0,void 0)}function TM(e,t,n,r,i){return t?function t(a,s){switch(a.kind){case 112:return!0;case 97:return!1;case 106:return null;case 11:return o(a)||n.push(Jp(e,a,va.String_literal_with_double_quotes_expected)),a.text;case 9:return Number(a.text);case 224:if(41!==a.operator||9!==a.operand.kind)break;return-Number(a.operand.text);case 210:return function(a,s){var c;const l=r?{}:void 0;for(const u of a.properties){if(303!==u.kind){n.push(Jp(e,u,va.Property_assignment_expected));continue}u.questionToken&&n.push(Jp(e,u.questionToken,va.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),o(u.name)||n.push(Jp(e,u.name,va.String_literal_with_double_quotes_expected));const a=Op(u.name)?void 0:Lp(u.name),_=a&&vc(a),d=_?null==(c=null==s?void 0:s.elementOptions)?void 0:c.get(_):void 0,p=t(u.initializer,d);void 0!==_&&(r&&(l[_]=p),null==i||i.onPropertySet(_,p,u,s,d))}return l}(a,s);case 209:return function(e,n){if(r)return F(e.map((e=>t(e,n))),(e=>void 0!==e));e.forEach((e=>t(e,n)))}(a.elements,s&&s.element)}s?n.push(Jp(e,a,va.Compiler_option_0_requires_a_value_of_type_1,s.name,CM(s))):n.push(Jp(e,a,va.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal))}(t,null==i?void 0:i.rootOptions):r?{}:void 0;function o(t){return wD(t)&&Wm(t,e)}}function CM(e){return"listOrElement"===e.type?`${CM(e.element)} or Array`:"list"===e.type?"Array":st(e.type)?e.type:"string"}function wM(e,t){return!!e&&($M(t)?!e.disallowNullOrUndefined:"list"===e.type?ot(t):"listOrElement"===e.type?ot(t)||wM(e.element,t):typeof t===(st(e.type)?e.type:"string"))}function DM(e,t,n){var r,i,o;const a=tn(n.useCaseSensitiveFileNames),s=O(F(e.fileNames,(null==(i=null==(r=e.options.configFile)?void 0:r.configFileSpecs)?void 0:i.validatedIncludeSpecs)?function(e,t,n,r){if(!t)return pt;const i=kk(e,n,t,r.useCaseSensitiveFileNames,r.getCurrentDirectory()),o=i.excludePattern&&Tk(i.excludePattern,r.useCaseSensitiveFileNames),a=i.includeFilePattern&&Tk(i.includeFilePattern,r.useCaseSensitiveFileNames);return a?o?e=>!(a.test(e)&&!o.test(e)):e=>!a.test(e):o?e=>o.test(e):pt}(t,e.options.configFile.configFileSpecs.validatedIncludeSpecs,e.options.configFile.configFileSpecs.validatedExcludeSpecs,n):pt),(e=>fa(Go(t,n.getCurrentDirectory()),Go(e,n.getCurrentDirectory()),a))),c={configFilePath:Go(t,n.getCurrentDirectory()),useCaseSensitiveFileNames:n.useCaseSensitiveFileNames},l=AM(e.options,c),u=e.watchOptions&&IM(e.watchOptions,lM()),_={compilerOptions:{...EM(l),showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0},watchOptions:u&&EM(u),references:O(e.projectReferences,(e=>({...e,path:e.originalPath?e.originalPath:"",originalPath:void 0}))),files:p(s)?s:void 0,...(null==(o=e.options.configFile)?void 0:o.configFileSpecs)?{include:PM(e.options.configFile.configFileSpecs.validatedIncludeSpecs),exclude:e.options.configFile.configFileSpecs.validatedExcludeSpecs}:{},compileOnSave:!!e.compileOnSave||void 0},d=new Set(l.keys()),f={};for(const t in CS)!d.has(t)&&Q(CS[t].dependencies,(e=>d.has(e)))&&CS[t].computeValue(e.options)!==CS[t].computeValue({})&&(f[t]=CS[t].computeValue(e.options));return qe(_.compilerOptions,EM(AM(f,c))),_}function EM(e){return{...$e(e.entries()).reduce(((e,t)=>({...e,[t[0]]:t[1]})),{})}}function PM(e){if(p(e)){if(1!==p(e))return e;if(e[0]!==VM)return e}}function NM(e){switch(e.type){case"string":case"number":case"boolean":case"object":return;case"list":case"listOrElement":return NM(e.element);default:return e.type}}function FM(e,t){return ld(t,((t,n)=>{if(t===e)return n}))}function AM(e,t){return IM(e,MO(),t)}function IM(e,{optionsNameMap:t},n){const r=new Map,i=n&&tn(n.useCaseSensitiveFileNames);for(const o in e)if(Le(e,o)){if(t.has(o)&&(t.get(o).category===va.Command_line_Options||t.get(o).category===va.Output_Formatting))continue;const a=e[o],s=t.get(o.toLowerCase());if(s){xn.assert("listOrElement"!==s.type);const e=NM(s);e?"list"===s.type?r.set(o,a.map((t=>FM(t,e)))):r.set(o,FM(a,e)):n&&s.isFilePath?r.set(o,fa(n.configFilePath,Go(a,Ro(n.configFilePath)),i)):n&&"list"===s.type&&s.element.isFilePath?r.set(o,a.map((e=>fa(n.configFilePath,Go(e,Ro(n.configFilePath)),i)))):r.set(o,a)}}return r}function OM(e,t){const n=MM(e);return function(){const e=[],r=(2,Array(3).join(" "));return vO.forEach((t=>{if(!n.has(t.name))return;const i=n.get(t.name),o=ML(t);i!==o?e.push(`${r}${t.name}: ${i}`):Le(jO,t.name)&&e.push(`${r}${t.name}: ${o}`)})),e.join(t)+t}()}function MM(e){return AM(Qe(e,jO))}function LM(e,t,n){const r=MM(e);return function(){const e=new Map;e.set(va.Projects,[]),e.set(va.Language_and_Environment,[]),e.set(va.Modules,[]),e.set(va.JavaScript_Support,[]),e.set(va.Emit,[]),e.set(va.Interop_Constraints,[]),e.set(va.Type_Checking,[]),e.set(va.Completeness,[]);for(const t of bO)if(o(t)){let n=e.get(t.category);n||e.set(t.category,n=[]),n.push(t)}let a=0,s=0;const c=[];e.forEach(((e,t)=>{0!==c.length&&c.push({value:""}),c.push({value:`/* ${tS(t)} */`});for(const t of e){let e;e=r.has(t.name)?`"${t.name}": ${JSON.stringify(r.get(t.name))}${(s+=1)===r.size?"":","}`:`// "${t.name}": ${JSON.stringify(ML(t))},`,c.push({value:e,description:`/* ${t.description&&tS(t.description)||t.name} */`}),a=Math.max(e.length,a)}}));const l=i(2),u=[];u.push("{"),u.push(`${l}"compilerOptions": {`),u.push(`${l}${l}/* ${tS(va.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`),u.push("");for(const e of c){const{value:t,description:n=""}=e;u.push(t&&`${l}${l}${t}${n&&i(a-t.length+2)+n}`)}if(t.length){u.push(`${l}},`),u.push(`${l}"files": [`);for(let e=0;e"object"==typeof e),"object"),n=h(y("files"));if(n){const r="no-prop"===e||ot(e)&&0===e.length,i=Le(d,"extends");if(0===n.length&&r&&!i)if(t){const e=a||"tsconfig.json",n=va.The_files_list_in_config_file_0_is_empty,r=Xf(t,"files",(e=>e.initializer)),i=pL(t,r,n,e);u.push(i)}else b(va.The_files_list_in_config_file_0_is_empty,a||"tsconfig.json")}let r=h(y("include"));const i=y("exclude");let o,s,c,l,_=!1,f=h(i);if("no-prop"===i){const e=p.outDir,t=p.declarationDir;(e||t)&&(f=F([e,t],(e=>!!e)))}void 0===n&&void 0===r&&(r=[VM],_=!0),r&&(o=wL(r,u,!0,t,"include"),c=QM(o,m)||o),f&&(s=wL(f,u,!1,t,"exclude"),l=QM(s,m)||s);const g=F(n,st);return{filesSpecs:n,includeSpecs:r,excludeSpecs:f,validatedFilesSpec:QM(g,m)||g,validatedIncludeSpecs:c,validatedExcludeSpecs:l,validatedFilesSpecBeforeSubstitution:g,validatedIncludeSpecsBeforeSubstitution:o,validatedExcludeSpecsBeforeSubstitution:s,pathPatterns:void 0,isDefaultIncludeSpec:_}}();return t&&(t.configFileSpecs=g),zM(p,t),{options:p,watchOptions:f,fileNames:function(e){const t=xL(g,e,p,n,c);return eL(t,tL(d),s)&&u.push(ZM(g,a)),t}(m),projectReferences:function(e){let t;const n=v("references",(e=>"object"==typeof e),"object");if(ot(n))for(const r of n)"string"!=typeof r.path?b(va.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(t||(t=[])).push({path:Go(r.path,e),originalPath:r.path,prepend:r.prepend,circular:r.circular});return t}(m),typeAcquisition:_.typeAcquisition||uL(),raw:d,errors:u,wildcardDirectories:EL(g,m,n.useCaseSensitiveFileNames),compileOnSave:!!d.compileOnSave};function h(e){return ot(e)?e:void 0}function y(e){return v(e,st,"string")}function v(e,n,r){if(Le(d,e)&&!$M(d[e])){if(ot(d[e])){const i=d[e];return t||x(i,n)||u.push(cS(va.Compiler_option_0_requires_a_value_of_type_1,e,r)),i}return b(va.Compiler_option_0_requires_a_value_of_type_1,e,"Array"),"not-array"}return"no-prop"}function b(e,...n){t||u.push(cS(e,...n))}}function KM(e,t){return WM(e,PO,t)}function WM(e,t,n){if(!e)return e;let r;for(const r of t)if(void 0!==e[r.name]){const t=e[r.name];switch(r.type){case"string":xn.assert(r.isFilePath),GM(t)&&i(r,XM(t,n));break;case"list":xn.assert(r.element.isFilePath);const e=QM(t,n);e&&i(r,e);break;case"object":xn.assert("paths"===r.name);const o=YM(t,n);o&&i(r,o);break;default:xn.fail("option type not supported")}}return r||e;function i(t,n){(r??(r=qe({},e)))[t.name]=n}}var HM="${configDir}";function GM(e){return st(e)&&an(e,HM,!0)}function XM(e,t){return Go(e.replace(HM,"./"),t)}function QM(e,t){if(!e)return e;let n;return e.forEach(((r,i)=>{GM(r)&&((n??(n=e.slice()))[i]=XM(r,t))})),n}function YM(e,t){let n;return Re(e).forEach((r=>{if(!ot(e[r]))return;const i=QM(e[r],t);i&&((n??(n=qe({},e)))[r]=i)})),n}function ZM({includeSpecs:e,excludeSpecs:t},n){return cS(va.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,n||"tsconfig.json",JSON.stringify(e||[]),JSON.stringify(t||[]))}function eL(e,t,n){return 0===e.length&&t&&(!n||0===n.length)}function tL(e){return!Le(e,"files")&&!Le(e,"references")}function nL(e,t,n,r,i){const o=r.length;return eL(e,i)?r.push(ZM(n,t)):A(r,(e=>!function(e){return e.code===va.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}(e))),o!==r.length}function rL(e,t,n,r,i,o,a,s){var c;const l=Go(i||"",r=Vo(r));if(o.includes(l))return a.push(cS(va.Circularity_detected_while_resolving_configuration_Colon_0,[...o,l].join(" -> "))),{raw:e||kM(t,a)};const u=e?function(e,t,n,r,i){Le(e,"excludes")&&i.push(cS(va.Unknown_option_excludes_Did_you_mean_exclude));const o=lL(e.compilerOptions,n,i,r),a=_L(e.typeAcquisition,n,i,r),s=function(e,t,n){return dL(mM(),e,t,void 0,pM,n)}(e.watchOptions,n,i);e.compileOnSave=function(e,t,n){if(!Le(e,lO.name))return!1;const r=fL(lO,e.compileOnSave,t,n);return"boolean"==typeof r&&r}(e,n,i);return{raw:e,options:o,watchOptions:s,typeAcquisition:a,extendedConfigPath:e.extends||""===e.extends?iL(e.extends,t,n,r,i):void 0}}(e,n,r,i,a):function(e,t,n,r,i){const o=cL(r);let a,s,c,l;const u=(void 0===hM&&(hM={name:void 0,type:"object",elementOptions:aM([vM,bM,xM,yM,{name:"references",type:"list",element:{name:"references",type:"object"},category:va.Projects},{name:"files",type:"list",element:{name:"files",type:"string"},category:va.File_Management},{name:"include",type:"list",element:{name:"include",type:"string"},category:va.File_Management,defaultValueDescription:va.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk},{name:"exclude",type:"list",element:{name:"exclude",type:"string"},category:va.File_Management,defaultValueDescription:va.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified},lO])}),hM),_=SM(e,i,{rootOptions:u,onPropertySet:function(_,d,p,f,m){if(m&&m!==yM&&(d=fL(m,d,n,i,p,p.initializer,e)),null==f?void 0:f.name)if(m){let e;f===vM?e=o:f===bM?e=s??(s={}):f===xM?e=a??(a=uL(r)):xn.fail("Unknown option"),e[m.name]=d}else _&&(null==f?void 0:f.extraKeyDiagnostics)&&(f.elementOptions?i.push(qO(_,f.extraKeyDiagnostics,void 0,p.name,e)):i.push(Jp(e,p.name,f.extraKeyDiagnostics.unknownOptionDiagnostic,_)));else f===u&&(m===yM?c=iL(d,t,n,r,i,p,p.initializer,e):m||("excludes"===_&&i.push(Jp(e,p.name,va.Unknown_option_excludes_Did_you_mean_exclude)),S(vO,(e=>e.name===_))&&(l=ue(l,p.name))))}});return a||(a=uL(r)),l&&_&&void 0===_.compilerOptions&&i.push(Jp(e,l[0],va._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file,Lp(l[0]))),{raw:_,options:o,watchOptions:s,typeAcquisition:a,extendedConfigPath:c}}(t,n,r,i,a);if((null==(c=u.options)?void 0:c.paths)&&(u.options.pathsBasePath=r),u.extendedConfigPath){o=o.concat([l]);const e={options:{}};st(u.extendedConfigPath)?_(e,u.extendedConfigPath):u.extendedConfigPath.forEach((t=>_(e,t))),e.include&&(u.raw.include=e.include),e.exclude&&(u.raw.exclude=e.exclude),e.files&&(u.raw.files=e.files),void 0===u.raw.compileOnSave&&e.compileOnSave&&(u.raw.compileOnSave=e.compileOnSave),t&&e.extendedSourceFiles&&(t.extendedSourceFiles=$e(e.extendedSourceFiles.keys())),u.options=qe(e.options,u.options),u.watchOptions=u.watchOptions&&e.watchOptions?qe(e.watchOptions,u.watchOptions):u.watchOptions||e.watchOptions}return u;function _(e,i){const c=function(e,t,n,r,i,o,a){const s=n.useCaseSensitiveFileNames?t:yt(t);let c,l,u;if(o&&(c=o.get(s))?({extendedResult:l,extendedConfig:u}=c):(l=iM(t,(e=>n.readFile(e))),l.parseDiagnostics.length||(u=rL(void 0,l,n,Ro(t),Bo(t),r,i,o)),o&&o.set(s,{extendedResult:l,extendedConfig:u})),e&&((a.extendedSourceFiles??(a.extendedSourceFiles=new Set)).add(l.fileName),l.extendedSourceFiles))for(const e of l.extendedSourceFiles)a.extendedSourceFiles.add(e);if(!l.parseDiagnostics.length)return u;i.push(...l.parseDiagnostics)}(t,i,n,o,a,s,e);if(c&&c.options){const t=c.raw;let o;const a=a=>{u.raw[a]||t[a]&&(e[a]=O(t[a],(e=>GM(e)||wo(e)?e:Ko(o||(o=pa(Ro(i),r,tn(n.useCaseSensitiveFileNames))),e))))};a("include"),a("exclude"),a("files"),void 0!==t.compileOnSave&&(e.compileOnSave=t.compileOnSave),qe(e.options,c.options),e.watchOptions=e.watchOptions&&c.watchOptions?qe({},e.watchOptions,c.watchOptions):e.watchOptions||c.watchOptions}}}function iL(e,t,n,r,i,o,a,s){let c;const l=r?qM(r,n):n;if(st(e))c=oL(e,t,l,i,a,s);else if(ot(e)){c=[];for(let r=0;rpL(i,r,e,...t))))}function hL(e,t,n,r,i,o,a){return F(O(t,((t,s)=>fL(e.element,t,n,r,i,null==o?void 0:o.elements[s],a))),(t=>!!e.listPreserveFalsyValues||!!t))}var yL,vL=/(^|\/)\*\*\/?$/,bL=/^[^*?]*(?=\/[^/]*[*?])/;function xL(e,t,n,r,i=u){t=Xo(t);const o=tn(r.useCaseSensitiveFileNames),a=new Map,s=new Map,c=new Map,{validatedFilesSpec:l,validatedIncludeSpecs:_,validatedExcludeSpecs:d}=e,p=zk(n,i),f=$k(n,p);if(l)for(const e of l){const n=Go(e,t);a.set(o(n),n)}let m;if(_&&_.length>0)for(const e of r.readDirectory(t,j(f),d,_,void 0)){if(Ao(e,".json")){if(!m){const e=O(yk(_.filter((e=>Wt(e,".json"))),t,"files"),(e=>`^${e}$`));m=e?e.map((e=>Tk(e,r.useCaseSensitiveFileNames))):u}if(-1!==T(m,(t=>t.test(e)))){const t=o(e);a.has(t)||c.has(t)||c.set(t,e)}continue}if(FL(e,a,s,p,o))continue;AL(e,s,p,o);const n=o(e);a.has(n)||s.has(n)||s.set(n,e)}const g=$e(a.values()),h=$e(s.values());return g.concat(h,$e(c.values()))}function SL(e,t,n,r,i){const{validatedFilesSpec:o,validatedIncludeSpecs:a,validatedExcludeSpecs:s}=t;if(!p(a)||!p(s))return!1;n=Xo(n);const c=tn(r);if(o)for(const t of o)if(c(Go(t,n))===e)return!1;return CL(e,s,r,i,n)}function kL(e){const t=an(e,"**/")?0:e.indexOf("/**/");return-1!==t&&(Wt(e,"/..")?e.length:e.lastIndexOf("/../"))>t}function TL(e,t,n,r){return CL(e,F(t,(e=>!kL(e))),n,r)}function CL(e,t,n,r,i){const o=hk(t,Ko(Xo(r),i),"exclude"),a=o&&Tk(o,n);return!!a&&(!!a.test(e)||!Fo(e)&&a.test(ea(e)))}function wL(e,t,n,r,i){return e.filter((e=>{if(!st(e))return!1;const o=DL(e,n);return void 0!==o&&t.push(function(e,t){const n=Gf(r,i,t);return pL(r,n,e,t)}(...o)),void 0===o}))}function DL(e,t){return xn.assert("string"==typeof e),t&&vL.test(e)?[va.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]:kL(e)?[va.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]:void 0}function EL({validatedIncludeSpecs:e,validatedExcludeSpecs:t},n,r){const i=hk(t,n,"exclude"),o=i&&new RegExp(i,r?"":"i"),a={},s=new Map;if(void 0!==e){const t=[];for(const i of e){const e=Xo(Ko(n,i));if(o&&o.test(e))continue;const c=NL(e,r);if(c){const{key:e,path:n,flags:r}=c,i=s.get(e),o=void 0!==i?a[i]:void 0;(void 0===o||oIo(e,t)?t:void 0));if(!o)return!1;for(const r of o){if(Ao(e,r)&&(".ts"!==r||!Ao(e,".d.ts")))return!1;const o=i(tT(e,r));if(t.has(o)||n.has(o)){if(".d.ts"===r&&(Ao(e,".js")||Ao(e,".jsx")))continue;return!0}}return!1}function AL(e,t,n,r){const i=f(n,(t=>Io(e,t)?t:void 0));if(i)for(let n=i.length-1;n>=0;n--){const o=i[n];if(Ao(e,o))return;const a=r(tT(e,o));t.delete(a)}}function IL(e){const t={};for(const n in e)if(Le(e,n)){const r=GO(n);void 0!==r&&(t[n]=OL(e[n],r))}return t}function OL(e,t){if(void 0===e)return e;switch(t.type){case"object":case"string":return"";case"number":return"number"==typeof e?e:"";case"boolean":return"boolean"==typeof e?e:"";case"listOrElement":if(!ot(e))return OL(e,t.element);case"list":const n=t.element;return ot(e)?q(e,(e=>OL(e,n))):"";default:return ld(t.type,((t,n)=>{if(t===e)return n}))}}function ML(e){switch(e.type){case"number":return 1;case"boolean":return!0;case"string":const t=e.defaultValueDescription;return e.isFilePath?`./${t&&"string"==typeof t?t:""}`:"";case"list":return[];case"listOrElement":return ML(e.element);case"object":return{};default:const n=ke(e.type.keys());return void 0!==n?n:xn.fail("Expected 'option.type' to have entries.")}}function LL(e,t,...n){e.trace(sS(t,...n))}function jL(e,t){return!!e.traceResolution&&void 0!==t.trace}function RL(e,t,n){let r;if(t&&e){const i=e.contents.packageJsonContent;"string"==typeof i.name&&"string"==typeof i.version&&(r={name:i.name,subModuleName:t.path.slice(e.packageDirectory.length+xo.length),version:i.version,peerDependencies:Xj(e,n)})}return t&&{path:t.path,extension:t.ext,packageId:r,resolvedUsingTsExtension:t.resolvedUsingTsExtension}}function BL(e){return RL(void 0,e,void 0)}function JL(e){if(e)return xn.assert(void 0===e.packageId),{path:e.path,ext:e.extension,resolvedUsingTsExtension:e.resolvedUsingTsExtension}}function zL(e){const t=[];return 1&e&&t.push("TypeScript"),2&e&&t.push("JavaScript"),4&e&&t.push("Declaration"),8&e&&t.push("JSON"),t.join(", ")}function $L(e){if(e)return xn.assert(oT(e.extension)),{fileName:e.path,packageId:e.packageId}}function qL(e,t,n,r,i,o,a,s,c){if(!a.resultFromCache&&!a.compilerOptions.preserveSymlinks&&t&&n&&!t.originalPath&&!Os(e)){const{resolvedFileName:e,originalPath:n}=ZL(t.path,a.host,a.traceEnabled);n&&(t={...t,path:e,originalPath:n})}return VL(t,n,r,i,o,a.resultFromCache,s,c)}function VL(e,t,n,r,i,o,a,s){return o?(null==a?void 0:a.isReadonly)?{...o,failedLookupLocations:WL(o.failedLookupLocations,n),affectingLocations:WL(o.affectingLocations,r),resolutionDiagnostics:WL(o.resolutionDiagnostics,i)}:(o.failedLookupLocations=KL(o.failedLookupLocations,n),o.affectingLocations=KL(o.affectingLocations,r),o.resolutionDiagnostics=KL(o.resolutionDiagnostics,i),o):{resolvedModule:e&&{resolvedFileName:e.path,originalPath:!0===e.originalPath?void 0:e.originalPath,extension:e.extension,isExternalLibraryImport:t,packageId:e.packageId,resolvedUsingTsExtension:!!e.resolvedUsingTsExtension},failedLookupLocations:UL(n),affectingLocations:UL(r),resolutionDiagnostics:UL(i),alternateResult:s}}function UL(e){return e.length?e:void 0}function KL(e,t){return(null==t?void 0:t.length)?(null==e?void 0:e.length)?(e.push(...t),e):t:e}function WL(e,t){return(null==e?void 0:e.length)?t.length?[...e,...t]:e.slice():UL(t)}function HL(e,t,n,r){if(!Le(e,t))return void(r.traceEnabled&&LL(r.host,va.package_json_does_not_have_a_0_field,t));const i=e[t];if(typeof i===n&&null!==i)return i;r.traceEnabled&&LL(r.host,va.Expected_type_of_0_field_in_package_json_to_be_1_got_2,t,n,null===i?"null":typeof i)}function GL(e,t,n,r){const i=HL(e,t,"string",r);if(void 0===i)return;if(!i)return void(r.traceEnabled&&LL(r.host,va.package_json_had_a_falsy_0_field,t));const o=Xo(Ko(n,i));return r.traceEnabled&&LL(r.host,va.package_json_has_0_field_1_that_references_2,t,i,o),o}function XL(e){yL||(yL=new Nn(c));for(const t in e){if(!Le(e,t))continue;const n=An.tryParse(t);if(void 0!==n&&n.test(yL))return{version:t,paths:e[t]}}}function QL(e,t){if(e.typeRoots)return e.typeRoots;let n;return e.configFilePath?n=Ro(e.configFilePath):t.getCurrentDirectory&&(n=t.getCurrentDirectory()),void 0!==n?function(e){let t;return ga(Xo(e),(e=>{const n=Ko(e,YL);(t??(t=[])).push(n)})),t}(n):void 0}var YL=Ko("node_modules","@types");function ZL(e,t,n){const r=Fj(e,t,n),i=function(e,t,n){return 0===ca(e,t,!("function"==typeof n.useCaseSensitiveFileNames?n.useCaseSensitiveFileNames():n.useCaseSensitiveFileNames))}(e,r,t);return{resolvedFileName:i?e:r,originalPath:i?void 0:e}}function ej(e,t,n){return Ko(e,Wt(e,"/node_modules/@types")||Wt(e,"/node_modules/@types/")?pR(t,n):t)}function tj(e,t,n,r,i,o,a){xn.assert("string"==typeof e,"Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself.");const s=jL(n,r);i&&(n=i.commandLine.options);const c=t?Ro(t):void 0;let l=c?null==o?void 0:o.getFromDirectoryCache(e,a,c,i):void 0;if(l||!c||Os(e)||(l=null==o?void 0:o.getFromNonRelativeNameCache(e,a,c,i)),l)return s&&(LL(r,va.Resolving_type_reference_directive_0_containing_file_1,e,t),i&&LL(r,va.Using_compiler_options_of_project_reference_redirect_0,i.sourceFile.fileName),LL(r,va.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1,e,c),S(l)),l;const u=QL(n,r);s&&(void 0===t?void 0===u?LL(r,va.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set,e):LL(r,va.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1,e,u):void 0===u?LL(r,va.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set,e,t):LL(r,va.Resolving_type_reference_directive_0_containing_file_1_root_directory_2,e,t,u),i&&LL(r,va.Using_compiler_options_of_project_reference_redirect_0,i.sourceFile.fileName));const _=[],d=[];let p=nj(n);void 0!==a&&(p|=30);const f=ES(n);99===a&&3<=f&&f<=99&&(p|=32);const m=8&p?rj(n,a):[],h=[],y={compilerOptions:n,host:r,traceEnabled:s,failedLookupLocations:_,affectingLocations:d,packageJsonInfoCache:o,features:p,conditions:m,requestContainingDirectory:c,reportDiagnostic:e=>{h.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let v,b=function(){if(u&&u.length)return s&&LL(r,va.Resolving_with_primary_search_path_0,u.join(", ")),g(u,(t=>{const i=ej(t,e,y),o=zb(t,r);if(!o&&s&&LL(r,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,t),n.typeRoots){const e=Rj(4,i,!o,y);if(e){const t=Mj(e.path);return $L(RL(t?Qj(t,!1,y):void 0,e,y))}}return $L(Vj(4,i,!o,y))}));s&&LL(r,va.Root_directory_cannot_be_determined_skipping_primary_search_paths)}(),x=!0;if(b||(b=function(){const i=t&&Ro(t);if(void 0!==i){let o;if(n.typeRoots&&Wt(t,rV))s&&LL(r,va.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder);else if(s&&LL(r,va.Looking_up_in_node_modules_folder_initial_location_0,i),Os(e)){const{path:t}=Nj(i,e);o=Aj(4,t,!1,y,!0)}else{const t=sR(4,e,i,y,void 0,void 0);o=t&&t.value}return $L(o)}s&&LL(r,va.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder)}(),x=!1),b){const{fileName:e,packageId:t}=b;let i,o=e;n.preserveSymlinks||({resolvedFileName:o,originalPath:i}=ZL(e,r,s)),v={primary:x,resolvedFileName:o,originalPath:i,packageId:t,isExternalLibraryImport:Oj(e)}}return l={resolvedTypeReferenceDirective:v,failedLookupLocations:UL(_),affectingLocations:UL(d),resolutionDiagnostics:UL(h)},c&&o&&!o.isReadonly&&(o.getOrCreateCacheForDirectory(c,i).set(e,a,l),Os(e)||o.getOrCreateCacheForNonRelativeName(e,a,i).set(c,l)),s&&S(l),l;function S(t){var n;(null==(n=t.resolvedTypeReferenceDirective)?void 0:n.resolvedFileName)?t.resolvedTypeReferenceDirective.packageId?LL(r,va.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3,e,t.resolvedTypeReferenceDirective.resolvedFileName,yd(t.resolvedTypeReferenceDirective.packageId),t.resolvedTypeReferenceDirective.primary):LL(r,va.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2,e,t.resolvedTypeReferenceDirective.resolvedFileName,t.resolvedTypeReferenceDirective.primary):LL(r,va.Type_reference_directive_0_was_not_resolved,e)}}function nj(e){let t=0;switch(ES(e)){case 3:case 99:case 100:t=30}return e.resolvePackageJsonExports?t|=8:!1===e.resolvePackageJsonExports&&(t&=-9),e.resolvePackageJsonImports?t|=2:!1===e.resolvePackageJsonImports&&(t&=-3),t}function rj(e,t){const n=ES(e);if(void 0===t)if(100===n)t=99;else if(2===n)return[];const r=99===t?["import"]:["require"];return e.noDtsResolution||r.push("types"),100!==n&&r.push("node"),Z(r,e.customConditions)}function ij(e,t,n,r,i){const o=Wj(null==i?void 0:i.getPackageJsonInfoCache(),r,n);return ga(t,(t=>{if("node_modules"!==Bo(t)){const n=Ko(t,"node_modules");return Qj(Ko(n,e),!1,o)}}))}function oj(e,t){if(e.types)return e.types;const n=[];if(t.directoryExists&&t.getDirectories){const r=QL(e,t);if(r)for(const e of r)if(t.directoryExists(e))for(const r of t.getDirectories(e)){const i=Xo(r),o=Ko(e,i,"package.json");if(!t.fileExists(o)||null!==Bb(o,t).typings){const e=Bo(i);46!==e.charCodeAt(0)&&n.push(e)}}}return n}function aj(e){return!!(null==e?void 0:e.contents)}function sj(e){return!!e&&!e.contents}function cj(e){var t;if(null===e||"object"!=typeof e)return""+e;if(ot(e))return`[${null==(t=e.map((e=>cj(e))))?void 0:t.join(",")}]`;let n="{";for(const t in e)Le(e,t)&&(n+=`${t}: ${cj(e[t])}`);return n+"}"}function lj(e,t){return t.map((t=>cj(ZS(e,t)))).join("|")+`|${e.pathsBasePath}`}function uj(e,t){const n=new Map,r=new Map;let i=new Map;return e&&n.set(e,i),{getMapOfCacheRedirects:function(e){return e?o(e.commandLine.options,!1):i},getOrCreateMapOfCacheRedirects:function(e){return e?o(e.commandLine.options,!0):i},update:function(t){e!==t&&(e?i=o(t,!0):n.set(t,i),e=t)},clear:function(){const o=e&&t.get(e);i.clear(),n.clear(),t.clear(),r.clear(),e&&(o&&t.set(e,o),n.set(e,i))},getOwnMap:()=>i};function o(t,o){let s=n.get(t);if(s)return s;const c=a(t);if(s=r.get(c),!s){if(e){const t=a(e);t===c?s=i:r.has(t)||r.set(t,i)}o&&(s??(s=new Map)),s&&r.set(c,s)}return s&&n.set(t,s),s}function a(e){let n=t.get(e);return n||t.set(e,n=lj(e,TO)),n}}function _j(e,t,n,r){const i=e.getOrCreateMapOfCacheRedirects(t);let o=i.get(n);return o||(o=r(),i.set(n,o)),o}function dj(e,t){return void 0===t?e:`${t}|${e}`}function pj(){const e=new Map,t=new Map,n={get:(t,n)=>e.get(r(t,n)),set:(t,i,o)=>(e.set(r(t,i),o),n),delete:(t,i)=>(e.delete(r(t,i)),n),has:(t,n)=>e.has(r(t,n)),forEach:n=>e.forEach(((e,r)=>{const[i,o]=t.get(r);return n(e,i,o)})),size:()=>e.size};return n;function r(e,n){const r=dj(e,n);return t.set(r,[e,n]),r}}function fj(e){return e.resolvedModule&&(e.resolvedModule.originalPath||e.resolvedModule.resolvedFileName)}function mj(e){return e.resolvedTypeReferenceDirective&&(e.resolvedTypeReferenceDirective.originalPath||e.resolvedTypeReferenceDirective.resolvedFileName)}function gj(e,t,n,r,i,o){o??(o=new Map);const a=function(e,t,n,r){const i=uj(n,r);return{getFromDirectoryCache:function(n,r,o,a){var s,c;const l=Yo(o,e,t);return null==(c=null==(s=i.getMapOfCacheRedirects(a))?void 0:s.get(l))?void 0:c.get(n,r)},getOrCreateCacheForDirectory:function(n,r){const o=Yo(n,e,t);return _j(i,r,o,(()=>pj()))},clear:function(){i.clear()},update:function(e){i.update(e)},directoryToModuleNameMap:i}}(e,t,n,o),s=function(e,t,n,r,i){const o=uj(n,i);return{getFromNonRelativeNameCache:function(e,t,n,r){var i,a;return xn.assert(!Os(e)),null==(a=null==(i=o.getMapOfCacheRedirects(r))?void 0:i.get(dj(e,t)))?void 0:a.get(n)},getOrCreateCacheForNonRelativeName:function(e,t,n){return xn.assert(!Os(e)),_j(o,n,dj(e,t),a)},clear:function(){o.clear()},update:function(e){o.update(e)}};function a(){const n=new Map;return{get:function(r){return n.get(Yo(r,e,t))},set:function(i,o){const a=Yo(i,e,t);if(n.has(a))return;n.set(a,o);const s=r(o),c=s&&function(n,r){const i=Yo(Ro(r),e,t);let o=0;const a=Math.min(n.length,i.length);for(;or,clearAllExceptPackageJsonInfoCache:c,optionsToRedirectsKey:o};function c(){a.clear(),s.clear()}}function hj(e,t,n,r,i){const o=gj(e,t,n,r,fj,i);return o.getOrCreateCacheForModuleName=(e,t,n)=>o.getOrCreateCacheForNonRelativeName(e,t,n),o}function yj(e,t,n,r,i){return gj(e,t,n,r,mj,i)}function vj(e){return{moduleResolution:2,traceResolution:e.traceResolution}}function bj(e,t,n,r,i){return Sj(e,t,vj(n),r,i)}function xj(e,t,n,r){const i=Ro(t);return n.getFromDirectoryCache(e,r,i,void 0)}function Sj(e,t,n,r,i,o,a){var s,c,l;const u=jL(n,r);o&&(n=o.commandLine.options),u&&(LL(r,va.Resolving_module_0_from_1,e,t),o&&LL(r,va.Using_compiler_options_of_project_reference_redirect_0,o.sourceFile.fileName));const _=Ro(t);let d=null==i?void 0:i.getFromDirectoryCache(e,a,_,o);if(d)u&&LL(r,va.Resolution_for_module_0_was_found_in_cache_from_location_1,e,_);else{let p=n.moduleResolution;switch(void 0===p?(p=ES(n),u&&LL(r,va.Module_resolution_kind_is_not_specified_using_0,bi[p])):u&&LL(r,va.Explicitly_specified_module_resolution_kind_Colon_0,bi[p]),null==(s=tr)||s.logStartResolveModule(e),p){case 3:case 99:d=function(e,t,n,r,i,o,a){return function(e,t,n,r,i,o,a,s,c){const l=Ro(n),u=99===s?32:0;let _=r.noDtsResolution?3:7;return MS(r)&&(_|=8),Pj(e|u,t,l,r,i,o,_,!1,a,c)}(30,e,t,n,r,i,o,a)}(e,t,n,r,i,o,a);break;case 2:d=Dj(e,t,n,r,i,o,a?rj(n,a):void 0);break;case 1:d=vR(e,t,n,r,i,o);break;case 100:d=wj(e,t,n,r,i,o,a?rj(n,a):void 0);break;default:return xn.fail(`Unexpected moduleResolution: ${p}`)}d&&d.resolvedModule&&(null==(c=tr)||c.logInfoEvent(`Module "${e}" resolved to "${d.resolvedModule.resolvedFileName}"`)),null==(l=tr)||l.logStopResolveModule(d&&d.resolvedModule?""+d.resolvedModule.resolvedFileName:"null"),i&&!i.isReadonly&&(i.getOrCreateCacheForDirectory(_,o).set(e,a,d),Os(e)||i.getOrCreateCacheForNonRelativeName(e,a,o).set(_,d))}return u&&(d.resolvedModule?d.resolvedModule.packageId?LL(r,va.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2,e,d.resolvedModule.resolvedFileName,yd(d.resolvedModule.packageId)):LL(r,va.Module_name_0_was_successfully_resolved_to_1,e,d.resolvedModule.resolvedFileName):LL(r,va.Module_name_0_was_not_resolved,e)),d}function kj(e,t,n,r,i){const o=function(e,t,n,r){var i;const{baseUrl:o,paths:a,configFile:s}=r.compilerOptions;if(a&&!Po(t))return r.traceEnabled&&(o&&LL(r.host,va.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1,o,t),LL(r.host,va.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0,t)),_R(e,t,rv(r.compilerOptions,r.host),a,(null==s?void 0:s.configFileSpecs)?(i=s.configFileSpecs).pathPatterns||(i.pathPatterns=rT(a)):void 0,n,!1,r)}(e,t,r,i);return o?o.value:Os(t)?function(e,t,n,r,i){if(!i.compilerOptions.rootDirs)return;i.traceEnabled&&LL(i.host,va.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,t);const o=Xo(Ko(n,t));let a,s;for(const e of i.compilerOptions.rootDirs){let t=Xo(e);Wt(t,xo)||(t+=xo);const n=an(o,t)&&(void 0===s||s.length(e[e.None=0]="None",e[e.Imports=2]="Imports",e[e.SelfName=4]="SelfName",e[e.Exports=8]="Exports",e[e.ExportsPatternTrailers=16]="ExportsPatternTrailers",e[e.AllFeatures=30]="AllFeatures",e[e.Node16Default=30]="Node16Default",e[e.NodeNextDefault=30]="NodeNextDefault",e[e.BundlerDefault=30]="BundlerDefault",e[e.EsmMode=32]="EsmMode",e))(Cj||{});function wj(e,t,n,r,i,o,a){const s=Ro(t);let c=n.noDtsResolution?3:7;return MS(n)&&(c|=8),Pj(nj(n),e,s,n,r,i,c,!1,o,a)}function Dj(e,t,n,r,i,o,a,s){let c;return s?c=8:n.noDtsResolution?(c=3,MS(n)&&(c|=8)):c=MS(n)?15:7,Pj(a?30:0,e,Ro(t),n,r,i,c,!!s,o,a)}function Ej(e,t,n){return Pj(30,e,Ro(t),{moduleResolution:99},n,void 0,8,!0,void 0,void 0)}function Pj(e,t,n,r,i,o,a,s,c,l){var _,d,f,m,g;const h=jL(r,i),y=[],v=[],b=ES(r);l??(l=rj(r,100===b||2===b?void 0:32&e?99:1));const S=[],k={compilerOptions:r,host:i,traceEnabled:h,failedLookupLocations:y,affectingLocations:v,packageJsonInfoCache:o,features:e,conditions:l??u,requestContainingDirectory:n,reportDiagnostic:e=>{S.push(e)},isConfigLookup:s,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};let T,C;if(h&&KS(b)&&LL(i,va.Resolving_in_0_mode_with_conditions_1,32&e?"ESM":"CJS",k.conditions.map((e=>`'${e}'`)).join(", ")),2===b){const e=5&a,t=-6&a;T=e&&w(e,k)||t&&w(t,k)||void 0}else T=w(a,k);if(k.resolvedPackageDirectory&&!s&&!Os(t)){const t=(null==T?void 0:T.value)&&5&a&&!Zj(5,T.value.resolved.extension);if((null==(_=null==T?void 0:T.value)?void 0:_.isExternalLibraryImport)&&t&&8&e&&(null==l?void 0:l.includes("import"))){TR(k,va.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);const e=w(5&a,{...k,features:-9&k.features,reportDiagnostic:_t});(null==(d=null==e?void 0:e.value)?void 0:d.isExternalLibraryImport)&&(C=e.value.resolved.path)}else if((!(null==T?void 0:T.value)||t)&&2===b){TR(k,va.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update);const e={...k.compilerOptions,moduleResolution:100},t=w(5&a,{...k,compilerOptions:e,features:30,conditions:rj(e),reportDiagnostic:_t});(null==(f=null==t?void 0:t.value)?void 0:f.isExternalLibraryImport)&&(C=t.value.resolved.path)}}return qL(t,null==(m=null==T?void 0:T.value)?void 0:m.resolved,null==(g=null==T?void 0:T.value)?void 0:g.isExternalLibraryImport,y,v,S,k,o,C);function w(r,a){const s=kj(r,t,n,((e,t,n,r)=>Aj(e,t,n,r,!0)),a);if(s)return kR({resolved:s,isExternalLibraryImport:Oj(s.path)});if(Os(t)){const{path:e,parts:i}=Nj(n,t),o=Aj(r,e,!1,a,!0);return o&&kR({resolved:o,isExternalLibraryImport:D(i,"node_modules")})}{let s;if(2&e&&an(t,"#")&&(s=function(e,t,n,r,i,o){var a,s;if("#"===t||an(t,"#/"))return r.traceEnabled&&LL(r.host,va.Invalid_import_specifier_0_has_no_possible_resolutions,t),kR(void 0);const c=Go(Ko(n,"dummy"),null==(s=(a=r.host).getCurrentDirectory)?void 0:s.call(a)),l=Hj(c,r);if(!l)return r.traceEnabled&&LL(r.host,va.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve,c),kR(void 0);if(!l.contents.packageJsonContent.imports)return r.traceEnabled&&LL(r.host,va.package_json_scope_0_has_no_imports_defined,l.packageDirectory),kR(void 0);const u=iR(e,r,i,o,t,l.contents.packageJsonContent.imports,l,!0);return u||(r.traceEnabled&&LL(r.host,va.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1,t,l.packageDirectory),kR(void 0))}(r,t,n,a,o,c)),!s&&4&e&&(s=function(e,t,n,r,i,o){var a,s;const c=Hj(Go(Ko(n,"dummy"),null==(s=(a=r.host).getCurrentDirectory)?void 0:s.call(a)),r);if(!c||!c.contents.packageJsonContent.exports)return;if("string"!=typeof c.contents.packageJsonContent.name)return;const l=$o(t),u=$o(c.contents.packageJsonContent.name);if(!x(u,((e,t)=>l[t]===e)))return;const _=l.slice(u.length),d=p(_)?`.${xo}${_.join(xo)}`:".";if(JS(r.compilerOptions)&&!Oj(n))return nR(c,e,d,r,i,o);const f=-6&e;return nR(c,5&e,d,r,i,o)||nR(c,f,d,r,i,o)}(r,t,n,a,o,c)),!s){if(t.includes(":"))return void(h&&LL(i,va.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1,t,zL(r)));h&&LL(i,va.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1,t,zL(r)),s=sR(r,t,n,a,o,c)}return 4&r&&(s??(s=bR(t,a))),s&&{value:s.value&&{resolved:s.value,isExternalLibraryImport:!0}}}}}function Nj(e,t){const n=Ko(e,t),r=$o(n),i=we(r);return{path:"."===i||".."===i?ea(Xo(n)):Xo(n),parts:r}}function Fj(e,t,n){if(!t.realpath)return e;const r=Xo(t.realpath(e));return n&&LL(t,va.Resolving_real_path_for_0_result_1,e,r),r}function Aj(e,t,n,r,i){if(r.traceEnabled&&LL(r.host,va.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1,t,zL(e)),!Oo(t)){if(!n){const e=Ro(t);zb(e,r.host)||(r.traceEnabled&&LL(r.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,e),n=!0)}const o=Rj(e,t,n,r);if(o){const e=i?Mj(o.path):void 0;return RL(e?Qj(e,!1,r):void 0,o,r)}}if(n||zb(t,r.host)||(r.traceEnabled&&LL(r.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,t),n=!0),!(32&r.features))return Vj(e,t,n,r,i)}var Ij="/node_modules/";function Oj(e){return e.includes(Ij)}function Mj(e,t){const n=Xo(e),r=n.lastIndexOf(Ij);if(-1===r)return;const i=r+Ij.length;let o=Lj(n,i,t);return 64===n.charCodeAt(i)&&(o=Lj(n,o,t)),n.slice(0,o)}function Lj(e,t,n){const r=e.indexOf(xo,t+1);return-1===r?n?e.length:t:r}function jj(e,t,n,r){return BL(Rj(e,t,n,r))}function Rj(e,t,n,r){const i=Bj(e,t,n,r);if(i)return i;if(!(32&r.features)){const i=zj(t,e,"",n,r);if(i)return i}}function Bj(e,t,n,r){if(!Bo(t).includes("."))return;let i=Yk(t);i===t&&(i=t.substring(0,t.lastIndexOf(".")));const o=t.substring(i.length);return r.traceEnabled&&LL(r.host,va.File_name_0_has_a_1_extension_stripping_it,t,o),zj(i,e,o,n,r)}function Jj(e,t,n,r){return 1&e&&Io(t,Bk)||4&e&&Io(t,Rk)?void 0!==$j(t,n,r)?{path:t,ext:Ib(t),resolvedUsingTsExtension:void 0}:void 0:r.isConfigLookup&&8===e&&Ao(t,".json")?void 0!==$j(t,n,r)?{path:t,ext:".json",resolvedUsingTsExtension:void 0}:void 0:Bj(e,t,n,r)}function zj(e,t,n,r,i){if(!r){const t=Ro(e);t&&(r=!zb(t,i.host))}switch(n){case".mjs":case".mts":case".d.mts":return 1&t&&o(".mts",".mts"===n||".d.mts"===n)||4&t&&o(".d.mts",".mts"===n||".d.mts"===n)||2&t&&o(".mjs")||void 0;case".cjs":case".cts":case".d.cts":return 1&t&&o(".cts",".cts"===n||".d.cts"===n)||4&t&&o(".d.cts",".cts"===n||".d.cts"===n)||2&t&&o(".cjs")||void 0;case".json":return 4&t&&o(".d.json.ts")||8&t&&o(".json")||void 0;case".tsx":case".jsx":return 1&t&&(o(".tsx",".tsx"===n)||o(".ts",".tsx"===n))||4&t&&o(".d.ts",".tsx"===n)||2&t&&(o(".jsx")||o(".js"))||void 0;case".ts":case".d.ts":case".js":case"":return 1&t&&(o(".ts",".ts"===n||".d.ts"===n)||o(".tsx",".ts"===n||".d.ts"===n))||4&t&&o(".d.ts",".ts"===n||".d.ts"===n)||2&t&&(o(".js")||o(".jsx"))||i.isConfigLookup&&o(".json")||void 0;default:return 4&t&&!QI(e+n)&&o(`.d${n}.ts`)||void 0}function o(t,n){const o=$j(e+t,r,i);return void 0===o?void 0:{path:o,ext:t,resolvedUsingTsExtension:!i.candidateIsFromPackageJsonField&&n}}}function $j(e,t,n){var r;if(!(null==(r=n.compilerOptions.moduleSuffixes)?void 0:r.length))return qj(e,t,n);const i=lT(e)??"",o=i?eT(e,i):e;return f(n.compilerOptions.moduleSuffixes,(e=>qj(o+e+i,t,n)))}function qj(e,t,n){var r;if(!t){if(n.host.fileExists(e))return n.traceEnabled&&LL(n.host,va.File_0_exists_use_it_as_a_name_resolution_result,e),e;n.traceEnabled&&LL(n.host,va.File_0_does_not_exist,e)}null==(r=n.failedLookupLocations)||r.push(e)}function Vj(e,t,n,r,i=!0){const o=i?Qj(t,n,r):void 0;return RL(o,Yj(e,t,n,r,o&&o.contents.packageJsonContent,o&&Gj(o,r)),r)}function Uj(e,t,n,r,i){if(!i&&void 0!==e.contents.resolvedEntrypoints)return e.contents.resolvedEntrypoints;let o;const a=5|(i?2:0),s=nj(t),c=Wj(null==r?void 0:r.getPackageJsonInfoCache(),n,t);c.conditions=rj(t),c.requestContainingDirectory=e.packageDirectory;const l=Yj(a,e.packageDirectory,!1,c,e.contents.packageJsonContent,Gj(e,c));if(o=ue(o,null==l?void 0:l.path),8&s&&e.contents.packageJsonContent.exports){const r=ne([rj(t,99),rj(t,1)],se);for(const t of r){const r={...c,failedLookupLocations:[],conditions:t,host:n},i=Kj(e,e.contents.packageJsonContent.exports,r,a);if(i)for(const e of i)o=me(o,e.path)}}return e.contents.resolvedEntrypoints=o||!1}function Kj(e,t,n,r){let i;if(ot(t))for(const e of t)o(e);else if("object"==typeof t&&null!==t&&tR(t))for(const e in t)o(t[e]);else o(t);return i;function o(t){var a,s;if("string"==typeof t&&an(t,"./"))if(t.includes("*")&&n.host.readDirectory){if(t.indexOf("*")!==t.lastIndexOf("*"))return!1;n.host.readDirectory(e.packageDirectory,function(e){const t=[];return 1&e&&t.push(...Bk),2&e&&t.push(...Mk),4&e&&t.push(...Rk),8&e&&t.push(".json"),t}(r),void 0,[ra(bC(t,"**/*"),".*")]).forEach((e=>{i=me(i,{path:e,ext:zo(e),resolvedUsingTsExtension:void 0})}))}else{const o=$o(t).slice(2);if(o.includes("..")||o.includes(".")||o.includes("node_modules"))return!1;const c=Go(Ko(e.packageDirectory,t),null==(s=(a=n.host).getCurrentDirectory)?void 0:s.call(a)),l=Jj(r,c,!1,n);if(l)return i=me(i,l,((e,t)=>e.path===t.path)),!0}else if(Array.isArray(t)){for(const e of t)if(o(e))return!0}else if("object"==typeof t&&null!==t)return f(Re(t),(e=>{if("default"===e||D(n.conditions,e)||aR(n.conditions,e))return o(t[e]),!0}))}}function Wj(e,t,n){return{host:t,compilerOptions:n,traceEnabled:jL(n,t),failedLookupLocations:void 0,affectingLocations:void 0,packageJsonInfoCache:e,features:0,conditions:u,requestContainingDirectory:void 0,reportDiagnostic:_t,isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1}}function Hj(e,t){const n=$o(e);for(n.pop();n.length>0;){const e=Qj(qo(n),!1,t);if(e)return e;n.pop()}}function Gj(e,t){return void 0===e.contents.versionPaths&&(e.contents.versionPaths=function(e,t){const n=function(e,t){const n=HL(e,"typesVersions","object",t);if(void 0!==n)return t.traceEnabled&&LL(t.host,va.package_json_has_a_typesVersions_field_with_version_specific_path_mappings),n}(e,t);if(void 0===n)return;if(t.traceEnabled)for(const e in n)Le(n,e)&&!An.tryParse(e)&&LL(t.host,va.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,e);const r=XL(n);if(!r)return void(t.traceEnabled&&LL(t.host,va.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0,s));const{version:i,paths:o}=r;if("object"==typeof o)return r;t.traceEnabled&&LL(t.host,va.Expected_type_of_0_field_in_package_json_to_be_1_got_2,`typesVersions['${i}']`,"object",typeof o)}(e.contents.packageJsonContent,t)||!1),e.contents.versionPaths||void 0}function Xj(e,t){return void 0===e.contents.peerDependencies&&(e.contents.peerDependencies=function(e,t){const n=HL(e.contents.packageJsonContent,"peerDependencies","object",t);if(void 0===n)return;t.traceEnabled&&LL(t.host,va.package_json_has_a_peerDependencies_field);const r=Fj(e.packageDirectory,t.host,t.traceEnabled),i=r.substring(0,r.lastIndexOf("node_modules")+"node_modules".length)+xo;let o="";for(const e in n)if(Le(n,e)){const n=Qj(i+e,!1,t);if(n){const r=n.contents.packageJsonContent.version;o+=`+${e}@${r}`,t.traceEnabled&&LL(t.host,va.Found_peerDependency_0_with_1_version,e,r)}else t.traceEnabled&&LL(t.host,va.Failed_to_find_peerDependency_0,e)}return o}(e,t)||!1),e.contents.peerDependencies||void 0}function Qj(e,t,n){var r,i,o,a,s,c;const{host:l,traceEnabled:u}=n,_=Ko(e,"package.json");if(t)return void(null==(r=n.failedLookupLocations)||r.push(_));const d=null==(i=n.packageJsonInfoCache)?void 0:i.getPackageJsonInfo(_);if(void 0!==d)return aj(d)?(u&&LL(l,va.File_0_exists_according_to_earlier_cached_lookups,_),null==(o=n.affectingLocations)||o.push(_),d.packageDirectory===e?d:{packageDirectory:e,contents:d.contents}):(d.directoryExists&&u&&LL(l,va.File_0_does_not_exist_according_to_earlier_cached_lookups,_),void(null==(a=n.failedLookupLocations)||a.push(_)));const p=zb(e,l);if(p&&l.fileExists(_)){const t=Bb(_,l);u&&LL(l,va.Found_package_json_at_0,_);const r={packageDirectory:e,contents:{packageJsonContent:t,versionPaths:void 0,resolvedEntrypoints:void 0,peerDependencies:void 0}};return n.packageJsonInfoCache&&!n.packageJsonInfoCache.isReadonly&&n.packageJsonInfoCache.setPackageJsonInfo(_,r),null==(s=n.affectingLocations)||s.push(_),r}p&&u&&LL(l,va.File_0_does_not_exist,_),n.packageJsonInfoCache&&!n.packageJsonInfoCache.isReadonly&&n.packageJsonInfoCache.setPackageJsonInfo(_,{packageDirectory:e,directoryExists:p}),null==(c=n.failedLookupLocations)||c.push(_)}function Yj(e,t,n,r,i,o){let a;i&&(a=r.isConfigLookup?function(e,t,n){return GL(e,"tsconfig",t,n)}(i,t,r):4&e&&function(e,t,n){return GL(e,"typings",t,n)||GL(e,"types",t,n)}(i,t,r)||7&e&&function(e,t,n){return GL(e,"main",t,n)}(i,t,r)||void 0);const s=(e,t,n,r)=>{const o=Jj(e,t,n,r);if(o)return BL(o);const a=4===e?5:e,s=r.features,c=r.candidateIsFromPackageJsonField;r.candidateIsFromPackageJsonField=!0,"module"!==(null==i?void 0:i.type)&&(r.features&=-33);const l=Aj(a,t,n,r,!1);return r.features=s,r.candidateIsFromPackageJsonField=c,l},l=a?!zb(Ro(a),r.host):void 0,u=n||!zb(t,r.host),_=Ko(t,r.isConfigLookup?"tsconfig":"index");if(o&&(!a||la(t,a))){const n=da(t,a||_,!1);r.traceEnabled&&LL(r.host,va.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,o.version,c,n);const i=_R(e,n,t,o.paths,void 0,s,l||u,r);if(i)return JL(i.value)}return a&&JL(s(e,a,l,r))||(32&r.features?void 0:Rj(e,_,u,r))}function Zj(e,t){return 2&e&&(".js"===t||".jsx"===t||".mjs"===t||".cjs"===t)||1&e&&(".ts"===t||".tsx"===t||".mts"===t||".cts"===t)||4&e&&(".d.ts"===t||".d.mts"===t||".d.cts"===t)||8&e&&".json"===t||!1}function eR(e){let t=e.indexOf(xo);return"@"===e[0]&&(t=e.indexOf(xo,t+1)),-1===t?{packageName:e,rest:""}:{packageName:e.slice(0,t),rest:e.slice(t+1)}}function tR(e){return x(Re(e),(e=>an(e,".")))}function nR(e,t,n,r,i,o){if(e.contents.packageJsonContent.exports){if("."===n){let a;if("string"==typeof e.contents.packageJsonContent.exports||Array.isArray(e.contents.packageJsonContent.exports)||"object"==typeof e.contents.packageJsonContent.exports&&!Q(Re(e.contents.packageJsonContent.exports),(e=>an(e,".")))?a=e.contents.packageJsonContent.exports:Le(e.contents.packageJsonContent.exports,".")&&(a=e.contents.packageJsonContent.exports["."]),a)return oR(t,r,i,o,n,e,!1)(a,"",!1,".")}else if(tR(e.contents.packageJsonContent.exports)){if("object"!=typeof e.contents.packageJsonContent.exports)return r.traceEnabled&&LL(r.host,va.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,n,e.packageDirectory),kR(void 0);const a=iR(t,r,i,o,n,e.contents.packageJsonContent.exports,e,!1);if(a)return a}return r.traceEnabled&&LL(r.host,va.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1,n,e.packageDirectory),kR(void 0)}}function rR(e,t){const n=e.indexOf("*"),r=t.indexOf("*"),i=-1===n?e.length:n+1,o=-1===r?t.length:r+1;return i>o?-1:o>i||-1===n?1:-1===r||e.length>t.length?-1:t.length>e.length?1:0}function iR(e,t,n,r,i,o,a,s){const c=oR(e,t,n,r,i,a,s);if(!Wt(i,xo)&&!i.includes("*")&&Le(o,i))return c(o[i],"",!1,i);const l=he(F(Re(o),(e=>function(e){const t=e.indexOf("*");return-1!==t&&t===e.lastIndexOf("*")}(e)||Wt(e,"/"))),rR);for(const e of l){if(16&t.features&&u(e,i)){const t=o[e],n=e.indexOf("*");return c(t,i.substring(e.substring(0,n).length,i.length-(e.length-1-n)),!0,e)}if(Wt(e,"*")&&an(i,e.substring(0,e.length-1)))return c(o[e],i.substring(e.length-1),!0,e);if(an(i,e))return c(o[e],i.substring(e.length),!1,e)}function u(e,t){if(Wt(e,"*"))return!1;const n=e.indexOf("*");return-1!==n&&an(t,e.substring(0,n))&&Wt(t,e.substring(n+1))}}function oR(e,t,n,r,i,o,a){return function s(c,l,u,_){if("string"==typeof c){if(!u&&l.length>0&&!Wt(c,"/"))return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);if(!an(c,"./")){if(a&&!an(c,"../")&&!an(c,"/")&&!wo(c)){const i=u?c.replace(/\*/g,l):c+l;TR(t,va.Using_0_subpath_1_with_target_2,"imports",_,i),TR(t,va.Resolving_module_0_from_1,i,o.packageDirectory+"/");const a=Pj(t.features,i,o.packageDirectory+"/",t.compilerOptions,t.host,n,e,!1,r,t.conditions);return kR(a.resolvedModule?{path:a.resolvedModule.resolvedFileName,extension:a.resolvedModule.extension,packageId:a.resolvedModule.packageId,originalPath:a.resolvedModule.originalPath,resolvedUsingTsExtension:a.resolvedModule.resolvedUsingTsExtension}:void 0)}return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0)}const s=(Po(c)?$o(c).slice(1):$o(c)).slice(1);if(s.includes("..")||s.includes(".")||s.includes("node_modules"))return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);const p=Ko(o.packageDirectory,c),m=$o(l);if(m.includes("..")||m.includes(".")||m.includes("node_modules"))return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);t.traceEnabled&&LL(t.host,va.Using_0_subpath_1_with_target_2,a?"imports":"exports",_,u?c.replace(/\*/g,l):c+l);const g=d(u?p.replace(/\*/g,l):p+l),h=function(n,r,i,a){var s,c,l,u;if(!t.isConfigLookup&&(t.compilerOptions.declarationDir||t.compilerOptions.outDir)&&!n.includes("/node_modules/")&&(!t.compilerOptions.configFile||la(o.packageDirectory,d(t.compilerOptions.configFile.fileName),!CR(t)))){const p=Wy({useCaseSensitiveFileNames:()=>CR(t)}),f=[];if(t.compilerOptions.rootDir||t.compilerOptions.composite&&t.compilerOptions.configFilePath){const e=d($$(t.compilerOptions,(()=>[]),(null==(c=(s=t.host).getCurrentDirectory)?void 0:c.call(s))||"",p));f.push(e)}else if(t.requestContainingDirectory){const e=d(Ko(t.requestContainingDirectory,"index.ts")),n=d($$(t.compilerOptions,(()=>[e,d(i)]),(null==(u=(l=t.host).getCurrentDirectory)?void 0:u.call(l))||"",p));f.push(n);let r=ea(n);for(;r&&r.length>1;){const e=$o(r);e.pop();const t=qo(e);f.unshift(t),r=ea(t)}}f.length>1&&t.reportDiagnostic(cS(a?va.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:va.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate,""===r?".":r,i));for(const r of f){const i=_(r);for(const a of i)if(la(a,n,!CR(t))){const i=Ko(r,n.slice(a.length+1)),s=[".mjs",".cjs",".js",".json",".d.mts",".d.cts",".d.ts"];for(const n of s)if(Ao(i,n)){const r=nv(i);for(const a of r){if(!Zj(e,a))continue;const r=na(i,a,n,!CR(t));if(t.host.fileExists(r))return kR(RL(o,Jj(e,r,!1,t),t))}}}}}return;function _(e){var n,r;const i=t.compilerOptions.configFile?(null==(r=(n=t.host).getCurrentDirectory)?void 0:r.call(n))||"":e,o=[];return t.compilerOptions.declarationDir&&o.push(d(f(i,t.compilerOptions.declarationDir))),t.compilerOptions.outDir&&t.compilerOptions.outDir!==t.compilerOptions.declarationDir&&o.push(d(f(i,t.compilerOptions.outDir))),o}}(g,l,Ko(o.packageDirectory,"package.json"),a);return h||kR(RL(o,Jj(e,g,!1,t),t))}if("object"==typeof c&&null!==c){if(!Array.isArray(c)){TR(t,va.Entering_conditional_exports);for(const e of Re(c))if("default"===e||t.conditions.includes(e)||aR(t.conditions,e)){TR(t,va.Matched_0_condition_1,a?"imports":"exports",e);const n=s(c[e],l,u,_);if(n)return TR(t,va.Resolved_under_condition_0,e),TR(t,va.Exiting_conditional_exports),n;TR(t,va.Failed_to_resolve_under_condition_0,e)}else TR(t,va.Saw_non_matching_condition_0,e);return void TR(t,va.Exiting_conditional_exports)}if(!p(c))return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);for(const e of c){const t=s(e,l,u,_);if(t)return t}}else if(null===c)return t.traceEnabled&&LL(t.host,va.package_json_scope_0_explicitly_maps_specifier_1_to_null,o.packageDirectory,i),kR(void 0);return t.traceEnabled&&LL(t.host,va.package_json_scope_0_has_invalid_type_for_target_of_specifier_1,o.packageDirectory,i),kR(void 0);function d(e){var n,r;return void 0===e?e:Go(e,null==(r=(n=t.host).getCurrentDirectory)?void 0:r.call(n))}function f(e,t){return ea(Ko(e,t))}}}function aR(e,t){if(!e.includes("types"))return!1;if(!an(t,"types@"))return!1;const n=An.tryParse(t.substring("types@".length));return!!n&&n.test(c)}function sR(e,t,n,r,i,o){return cR(e,t,n,r,!1,i,o)}function cR(e,t,n,r,i,o,a){const s=0===r.features?void 0:32&r.features?99:1,c=5&e,l=-6&e;if(c){TR(r,va.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0,zL(c));const e=u(c);if(e)return e}if(l&&!i)return TR(r,va.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0,zL(l)),u(l);function u(e){return ga(Vo(n),(n=>{if("node_modules"!==Bo(n)){return yR(o,t,s,n,a,r)||kR(lR(e,t,n,r,i,o,a))}}))}}function lR(e,t,n,r,i,o,a){const s=Ko(n,"node_modules"),c=zb(s,r.host);if(!c&&r.traceEnabled&&LL(r.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,s),!i){const n=uR(e,t,s,c,r,o,a);if(n)return n}if(4&e){const e=Ko(s,"@types");let n=c;return c&&!zb(e,r.host)&&(r.traceEnabled&&LL(r.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,e),n=!1),uR(4,pR(t,r),e,n,r,o,a)}}function uR(e,t,n,r,i,o,a){var s,l;const _=Xo(Ko(n,t)),{packageName:d,rest:p}=eR(t),f=Ko(n,d);let m,g=Qj(_,!r,i);if(""!==p&&g&&(!(8&i.features)||!Le((null==(s=m=Qj(f,!r,i))?void 0:s.contents.packageJsonContent)??u,"exports"))){const t=Rj(e,_,!r,i);if(t)return BL(t);const n=Yj(e,_,!r,i,g.contents.packageJsonContent,Gj(g,i));return RL(g,n,i)}const h=(e,t,n,r)=>{let i=(p||!(32&r.features))&&Rj(e,t,n,r)||Yj(e,t,n,r,g&&g.contents.packageJsonContent,g&&Gj(g,r));return!i&&g&&(void 0===g.contents.packageJsonContent.exports||null===g.contents.packageJsonContent.exports)&&32&r.features&&(i=Rj(e,Ko(t,"index.js"),n,r)),RL(g,i,r)};if(""!==p&&(g=m??Qj(f,!r,i)),g&&(i.resolvedPackageDirectory=!0),g&&g.contents.packageJsonContent.exports&&8&i.features)return null==(l=nR(g,e,Ko(".",p),i,o,a))?void 0:l.value;const y=""!==p&&g?Gj(g,i):void 0;if(y){i.traceEnabled&&LL(i.host,va.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2,y.version,c,p);const t=r&&zb(f,i.host),n=_R(e,p,f,y.paths,void 0,h,!t,i);if(n)return n.value}return h(e,_,!r,i)}function _R(e,t,n,r,i,o,a,s){i||(i=rT(r));const c=dT(i,t);if(c){const i=st(c)?void 0:rn(c,t),l=st(c)?c:nn(c);return s.traceEnabled&&LL(s.host,va.Module_name_0_matched_pattern_1,t,l),{value:f(r[l],(t=>{const r=i?bC(t,i):t,c=Xo(Ko(n,r));s.traceEnabled&&LL(s.host,va.Trying_substitution_0_candidate_module_location_Colon_1,t,r);const l=lT(t);if(void 0!==l){const e=$j(c,a,s);if(void 0!==e)return BL({path:e,ext:l,resolvedUsingTsExtension:void 0})}return o(e,c,a||!zb(Ro(c),s.host),s)}))}}}var dR="__";function pR(e,t){const n=mR(e);return t.traceEnabled&&n!==e&&LL(t.host,va.Scoped_package_detected_looking_in_0,n),n}function fR(e){return`@types/${mR(e)}`}function mR(e){if(an(e,"@")){const t=e.replace(xo,dR);if(t!==e)return t.slice(1)}return e}function gR(e){const t=sn(e,"@types/");return t!==e?hR(t):e}function hR(e){return e.includes(dR)?"@"+e.replace(dR,xo):e}function yR(e,t,n,r,i,o){const a=e&&e.getFromNonRelativeNameCache(t,n,r,i);if(a)return o.traceEnabled&&LL(o.host,va.Resolution_for_module_0_was_found_in_cache_from_location_1,t,r),o.resultFromCache=a,{value:a.resolvedModule&&{path:a.resolvedModule.resolvedFileName,originalPath:a.resolvedModule.originalPath||!0,extension:a.resolvedModule.extension,packageId:a.resolvedModule.packageId,resolvedUsingTsExtension:a.resolvedModule.resolvedUsingTsExtension}}}function vR(e,t,n,r,i,o){const a=jL(n,r),s=[],c=[],l=Ro(t),u=[],_={compilerOptions:n,host:r,traceEnabled:a,failedLookupLocations:s,affectingLocations:c,packageJsonInfoCache:i,features:0,conditions:[],requestContainingDirectory:l,reportDiagnostic:e=>{u.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},d=p(5)||p(2|(n.resolveJsonModule?8:0));return qL(e,d&&d.value,(null==d?void 0:d.value)&&Oj(d.value.path),s,c,u,_,i);function p(t){const n=kj(t,e,l,jj,_);if(n)return{value:n};if(Os(e)){const n=Xo(Ko(l,e));return kR(jj(t,n,!1,_))}{const n=ga(l,(n=>{const r=yR(i,e,void 0,n,o,_);if(r)return r;const a=Xo(Ko(n,e));return kR(jj(t,a,!1,_))}));if(n)return n;if(5&t){let n=function(e,t,n){return cR(4,e,t,n,!0,void 0,void 0)}(e,l,_);return 4&t&&(n??(n=bR(e,_))),n}}}}function bR(e,t){if(t.compilerOptions.typeRoots)for(const n of t.compilerOptions.typeRoots){const r=ej(n,e,t),i=zb(n,t.host);!i&&t.traceEnabled&&LL(t.host,va.Directory_0_does_not_exist_skipping_all_lookups_in_it,n);const o=Rj(4,r,!i,t);if(o){const e=Mj(o.path);return kR(RL(e?Qj(e,!1,t):void 0,o,t))}const a=Vj(4,r,!i,t);if(a)return kR(a)}}function xR(e,t){return!!e.allowImportingTsExtensions||t&&QI(t)}function SR(e,t,n,r,i,o){const a=jL(n,r);a&&LL(r,va.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,t,e,i);const s=[],c=[],l=[],u={compilerOptions:n,host:r,traceEnabled:a,failedLookupLocations:s,affectingLocations:c,packageJsonInfoCache:o,features:0,conditions:[],requestContainingDirectory:void 0,reportDiagnostic:e=>{l.push(e)},isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1};return VL(lR(4,e,i,u,!1,void 0,void 0),!0,s,c,l,u.resultFromCache,void 0)}function kR(e){return void 0!==e?{value:e}:void 0}function TR(e,t,...n){e.traceEnabled&&LL(e.host,t,...n)}function CR(e){return!e.host.useCaseSensitiveFileNames||("boolean"==typeof e.host.useCaseSensitiveFileNames?e.host.useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames())}var wR=(e=>(e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly",e))(wR||{});function DR(e,t){return e.body&&!e.body.parent&&(OT(e.body,e),LT(e.body,!1)),e.body?ER(e.body,t):1}function ER(e,t=new Map){const n=IB(e);if(t.has(n))return t.get(n)||0;t.set(n,void 0);const r=function(e,t){switch(e.kind){case 264:case 265:return 0;case 266:if(tf(e))return 2;break;case 272:case 271:if(!Bv(e,32))return 0;break;case 278:const n=e;if(!n.moduleSpecifier&&n.exportClause&&279===n.exportClause.kind){let e=0;for(const r of n.exportClause.elements){const n=PR(r,t);if(n>e&&(e=n),1===e)return e}return e}break;case 268:{let n=0;return LI(e,(e=>{const r=ER(e,t);switch(r){case 0:return;case 2:return void(n=2);case 1:return n=1,!0;default:xn.assertNever(r)}})),n}case 267:return DR(e,t);case 80:if(4096&e.flags)return 0}return 1}(e,t);return t.set(n,r),r}function PR(e,t){const n=e.propertyName||e.name;let r=e.parent;for(;r;){if(DP(r)||eN(r)||qN(r)){const e=r.statements;let i;for(const o of e)if(Cc(o,n)){o.parent||(OT(o,r),LT(o,!1));const e=ER(o,t);if((void 0===i||e>i)&&(i=e),1===i)return i;271===o.kind&&(i=1)}if(void 0!==i)return i}r=r.parent}return 1}var NR=(e=>(e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethodOrAccessor=128]="IsObjectLiteralOrClassExpressionMethodOrAccessor",e))(NR||{});function FR(e,t,n){return xn.attachFlowNodeDebugInfo({flags:e,id:0,node:t,antecedent:n})}var AR=OR();function IR(e,t){var n,r;pr("beforeBind"),null==(n=tr)||n.logStartBindFile(""+e.fileName),AR(e,t),null==(r=tr)||r.logStopBindFile(),pr("afterBind"),fr("Bind","beforeBind","afterBind")}function OR(){var e,t,n,r,i,o,a,s,c,l,u,_,d,m,g,h,y,v,b,S,k,T,C,w,E,P,N=!1,F=0,A=FR(1,void 0,void 0),I=FR(1,void 0,void 0),O=function(){return KA((function(e,t){if(t){t.stackIndex++,OT(e,r);const n=w;$e(e);const i=r;r=e,t.skip=!1,t.inStrictModeStack[t.stackIndex]=n,t.parentStack[t.stackIndex]=i}else t={stackIndex:0,skip:!1,inStrictModeStack:[void 0],parentStack:[void 0]};const n=e.operatorToken.kind;if(ub(n)||cb(n)){if(de(e)){const t=ee(),n=_,r=T;T=!1,Se(e,t,t),_=T?le(t):n,T||(T=r)}else Se(e,h,y);t.skip=!0}return t}),(function(t,n,r){if(!n.skip){const n=e(t);return 28===r.operatorToken.kind&&ve(t),n}}),(function(e,t,n){t.skip||Re(e)}),(function(t,n,r){if(!n.skip){const n=e(t);return 28===r.operatorToken.kind&&ve(t),n}}),(function(e,t){if(!t.skip){const t=e.operatorToken.kind;db(t)&&!eh(e)&&(xe(e.left),64===t&&212===e.left.kind)&&X(e.left.expression)&&(_=se(256,_,e))}const n=t.inStrictModeStack[t.stackIndex],i=t.parentStack[t.stackIndex];void 0!==n&&(w=n),void 0!==i&&(r=i),t.skip=!1,t.stackIndex--}),void 0);function e(e){if(e&&uP(e)&&!hb(e))return e;Re(e)}}();return function(p,f){var b,x;e=p,n=wS(t=f),w=function(e,t){return!(!WS(t,"alwaysStrict")||e.isDeclarationFile)||!!e.externalModuleIndicator}(e,f),P=new Set,F=0,E=Hx.getSymbolConstructor(),xn.attachFlowNodeDebugInfo(A),xn.attachFlowNodeDebugInfo(I),e.locals||(null==(b=or)||b.push(or.Phase.Bind,"bindSourceFile",{path:e.path},!0),Re(e),null==(x=or)||x.pop(),e.symbolCount=F,e.classifiableNames=P,function(){if(!c)return;const t=i,n=s,o=a,l=r,u=_;for(const t of c){const n=t.parent.parent;i=Pp(n)||e,a=Np(n)||e,_=FR(2,void 0,void 0),r=t,Re(t.typeExpression);const o=Pc(t);if((bF(t)||!t.fullName)&&o&&Sb(o.parent)){const n=et(o.parent);if(n){Ye(e.symbol,o.parent,n,!!mc(o,(e=>GE(e)&&"prototype"===e.name.escapedText)),!1);const r=i;switch(gg(o.parent)){case 1:case 2:i=Zp(e)?e:void 0;break;case 4:i=o.parent.expression;break;case 3:i=o.parent.expression.name;break;case 5:i=LR(e,o.parent.expression)?e:GE(o.parent.expression)?o.parent.expression.name:o.parent.expression;break;case 0:return xn.fail("Shouldn't have detected typedef or enum on non-assignment declaration")}i&&z(t,524288,788968),i=r}}else bF(t)||!t.fullName||80===t.fullName.kind?(r=t.parent,Ie(t,524288,788968)):Re(t.fullName)}i=t,s=n,a=o,r=l,_=u}(),function(){if(void 0===u)return;const t=i,n=s,o=a,c=r,l=_;for(const t of u){const n=Wg(t),o=n?Pp(n):void 0,s=n?Np(n):void 0;i=o||e,a=s||e,_=FR(2,void 0,void 0),r=t,Re(t.importClause)}i=t,s=n,a=o,r=c,_=l}()),e=void 0,t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,c=void 0,u=void 0,l=!1,_=void 0,d=void 0,m=void 0,g=void 0,h=void 0,y=void 0,v=void 0,S=void 0,k=!1,T=!1,N=!1,C=0};function M(t,n,...r){return Jp(Sd(t)||e,t,n,...r)}function L(e,t){return F++,new E(e,t)}function j(e,t,n){e.flags|=n,t.symbol=e,e.declarations=me(e.declarations,t),1955&n&&!e.exports&&(e.exports=ed()),6240&n&&!e.members&&(e.members=ed()),e.constEnumOnlyModule&&304&e.flags&&(e.constEnumOnlyModule=!1),111551&n&&bg(e,t)}function R(e){if(277===e.kind)return e.isExportEquals?"export=":"default";const t=Pc(e);if(t){if(sp(e)){const n=Hh(t);return pp(e)?"__global":`"${n}"`}if(167===t.kind){const e=t.expression;if($h(e))return yc(e.text);if(qh(e))return Ra(e.operator)+e.operand.text;xn.fail("Only computed properties with literal names have declaration names")}if(VD(t)){const n=Zf(e);if(!n)return;return Qh(n.symbol,t.escapedText)}return ON(t)?dC(t):Wh(t)?Gh(t):void 0}switch(e.kind){case 176:return"__constructor";case 184:case 179:case 323:return"__call";case 185:case 180:return"__new";case 181:return"__index";case 278:return"__export";case 307:return"export=";case 226:if(2===ag(e))return"export=";xn.fail("Unknown binary declaration kind");break;case 317:return Ng(e)?"__new":"__call";case 169:return xn.assert(317===e.parent.kind,"Impossible parameter parent kind",(()=>`parent is: ${xn.formatSyntaxKind(e.parent.kind)}, expected JSDocFunctionType`)),"arg"+e.parent.parameters.indexOf(e)}}function B(e){return Dc(e)?Ap(e.name):vc(xn.checkDefined(R(e)))}function J(t,n,r,i,o,a,s){xn.assert(s||!Vh(r));const c=Bv(r,2048)||yN(r)&&"default"===r.name.escapedText,l=s?"__computed":c&&n?"default":R(r);let u;if(void 0===l)u=L(0,"__missing");else if(u=t.get(l),2885600&i&&P.add(l),u){if(a&&!u.isReplaceableByMethod)return u;if(u.flags&o)if(u.isReplaceableByMethod)t.set(l,u=L(0,l));else if(!(3&i&&67108864&u.flags)){Dc(r)&&OT(r.name,r);let t=2&u.flags?va.Cannot_redeclare_block_scoped_variable_0:va.Duplicate_identifier_0,n=!0;(384&u.flags||384&i)&&(t=va.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations,n=!1);let o=!1;p(u.declarations)&&(c||u.declarations&&u.declarations.length&&277===r.kind&&!r.isExportEquals)&&(t=va.A_module_cannot_have_multiple_default_exports,n=!1,o=!0);const a=[];QP(r)&&Nd(r.type)&&Bv(r,32)&&2887656&u.flags&&a.push(M(r,va.Did_you_mean_0,`export type { ${vc(r.name.escapedText)} }`));const s=Pc(r)||r;f(u.declarations,((r,i)=>{const c=Pc(r)||r,l=n?M(c,t,B(r)):M(c,t);e.bindDiagnostics.push(o?fT(l,M(s,0===i?va.Another_export_default_is_here:va.and_here)):l),o&&a.push(M(c,va.The_first_export_default_is_here))}));const _=n?M(s,t,B(r)):M(s,t);e.bindDiagnostics.push(fT(_,...a)),u=L(0,l)}}else t.set(l,u=L(0,l)),a&&(u.isReplaceableByMethod=!0);return j(u,r,i),u.parent?xn.assert(u.parent===n,"Existing symbol parent should match new one"):u.parent=n,u}function z(e,t,n){const r=!!(32&cc(e))||function(e){if(e.parent&&ZP(e)&&(e=e.parent),!Fg(e))return!1;if(!bF(e)&&e.fullName)return!0;const t=Pc(e);return!!(t&&(Sb(t.parent)&&et(t.parent)||h_(t.parent)&&32&cc(t.parent)))}(e);if(2097152&t)return 281===e.kind||271===e.kind&&r?J(i.symbol.exports,i.symbol,e,t,n):(xn.assertNode(i,f_),J(i.locals,void 0,e,t,n));if(Fg(e)&&xn.assert(Mm(e)),!sp(e)&&(r||128&i.flags)){if(!f_(i)||!i.locals||Bv(e,2048)&&!R(e))return J(i.symbol.exports,i.symbol,e,t,n);const r=111551&t?1048576:0,o=J(i.locals,void 0,e,r,n);return o.exportSymbol=J(i.symbol.exports,i.symbol,e,t,n),e.localSymbol=o,o}return xn.assertNode(i,f_),J(i.locals,void 0,e,t,n)}function $(e){q(e,(e=>262===e.kind?Re(e):void 0)),q(e,(e=>262!==e.kind?Re(e):void 0))}function q(e,t=Re){void 0!==e&&f(e,t)}function V(e){LI(e,Re,q)}function U(e){const n=N;if(N=!1,function(e){if(!(1&_.flags))return!1;if(_===A){const n=v_(e)&&242!==e.kind||263===e.kind||267===e.kind&&function(e){const n=DR(e);return 1===n||2===n&&jS(t)}(e);if(n&&(_=I,!t.allowUnreachableCode)){const n=VS(t)&&!(33554432&e.flags)&&(!EP(e)||!!(7&uc(e.declarationList))||e.declarationList.declarations.some((e=>!!e.initializer)));!function(e,t){if(b_(e)&&MR(e)&&DP(e.parent)){const{statements:n}=e.parent,r=pT(n,e);Y(r,MR,((e,n)=>t(r[e],r[n-1])))}else t(e,e)}(e,((e,t)=>je(n,e,t,va.Unreachable_code_detected)))}}return!0}(e))return V(e),Be(e),void(N=n);switch(e.kind>=243&&e.kind<=259&&(!t.allowUnreachableCode||253===e.kind)&&(e.flowNode=_),e.kind){case 247:!function(e){const t=he(e,te()),n=ee(),r=ee();ie(t,_),_=t,fe(e.expression,n,r),_=le(n),ge(e.statement,r,t),ie(t,_),_=le(r)}(e);break;case 246:!function(e){const t=te(),n=he(e,ee()),r=ee();ie(t,_),_=t,ge(e.statement,r,n),ie(n,_),_=le(n),fe(e.expression,t,r),_=le(r)}(e);break;case 248:!function(e){const t=he(e,te()),n=ee(),r=ee();Re(e.initializer),ie(t,_),_=t,fe(e.condition,n,r),_=le(n),ge(e.statement,r,t),Re(e.incrementor),ie(t,_),_=le(r)}(e);break;case 249:case 250:!function(e){const t=he(e,te()),n=ee();Re(e.expression),ie(t,_),_=t,250===e.kind&&Re(e.awaitModifier),ie(n,_),Re(e.initializer),261!==e.initializer.kind&&xe(e.initializer),ge(e.statement,n,t),ie(t,_),_=le(n)}(e);break;case 245:!function(e){const t=ee(),n=ee(),r=ee();fe(e.expression,t,n),_=le(t),Re(e.thenStatement),ie(r,_),_=le(n),Re(e.elseStatement),ie(r,_),_=le(r)}(e);break;case 253:case 257:!function(e){Re(e.expression),253===e.kind&&(k=!0,g&&ie(g,_)),_=A,T=!0}(e);break;case 252:case 251:!function(e){if(Re(e.label),e.label){const t=function(e){for(let t=S;t;t=t.next)if(t.name===e)return t}(e.label.escapedText);t&&(t.referenced=!0,ye(e,t.breakTarget,t.continueTarget))}else ye(e,d,m)}(e);break;case 258:!function(e){const t=g,n=v,r=ee(),i=ee();let o=ee();if(e.finallyBlock&&(g=i),ie(o,_),v=o,Re(e.tryBlock),ie(r,_),e.catchClause&&(_=le(o),o=ee(),ie(o,_),v=o,Re(e.catchClause),ie(r,_)),g=t,v=n,e.finallyBlock){const t=ee();t.antecedent=Z(Z(r.antecedent,o.antecedent),i.antecedent),_=t,Re(e.finallyBlock),1&_.flags?_=A:(g&&i.antecedent&&ie(g,ne(t,i.antecedent,_)),v&&o.antecedent&&ie(v,ne(t,o.antecedent,_)),_=r.antecedent?ne(t,r.antecedent,_):A)}else _=le(r)}(e);break;case 255:!function(e){const t=ee();Re(e.expression);const n=d,r=b;d=t,b=_,Re(e.caseBlock),ie(t,_);const i=f(e.caseBlock.clauses,(e=>297===e.kind));e.possiblyExhaustive=!i&&!t.antecedent,i||ie(t,ae(b,e,0,0)),d=n,b=r,_=le(t)}(e);break;case 269:!function(e){const n=e.clauses,r=112===e.parent.expression.kind||K(e.parent.expression);let i=A;for(let o=0;ogN(e)||mN(e)))}(e)?e.flags|=128:e.flags&=-129}function Fe(e){const t=DR(e),n=0!==t;return Pe(e,n?512:1024,n?110735:0),t}function Ae(e,t,n){const r=L(t,n);return 106508&t&&(r.parent=i.symbol),j(r,e,t),r}function Ie(e,t,n){switch(a.kind){case 267:z(e,t,n);break;case 307:if(Zp(i)){z(e,t,n);break}default:xn.assertNode(a,f_),a.locals||(a.locals=ed(),Ee(a)),J(a.locals,void 0,e,t,n)}}function Oe(t,n){if(n&&80===n.kind){const i=n;if(qD(r=i)&&("eval"===r.escapedText||"arguments"===r.escapedText)){const r=Qp(e,n);e.bindDiagnostics.push(aS(e,r.start,r.length,function(t){return Zf(t)?va.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:e.externalModuleIndicator?va.Invalid_use_of_0_Modules_are_automatically_in_strict_mode:va.Invalid_use_of_0_in_strict_mode}(t),bc(i)))}}var r}function Me(e){!w||33554432&e.flags||Oe(e,e.name)}function Le(t,n,...r){const i=Gp(e,t.pos);e.bindDiagnostics.push(aS(e,i.start,i.length,n,...r))}function je(t,n,r,i){!function(t,n,r){const i=aS(e,n.pos,n.end-n.pos,r);t?e.bindDiagnostics.push(i):e.bindSuggestionDiagnostics=ue(e.bindSuggestionDiagnostics,{...i,category:2})}(t,{pos:Vd(n,e),end:r.end},i)}function Re(t){if(!t)return;OT(t,r),or&&(t.tracingPath=e.path);const n=w;if($e(t),t.kind>165){const e=r;r=t;const n=jR(t);0===n?U(t):function(e,t){const n=i,r=o,s=a;if(1&t?(219!==e.kind&&(o=i),i=a=e,32&t&&(i.locals=ed(),Ee(i))):2&t&&(a=e,32&t&&(a.locals=void 0)),4&t){const n=_,r=d,i=m,o=g,a=v,s=S,c=k,l=16&t&&!Bv(e,1024)&&!e.asteriskToken&&!!cm(e)||175===e.kind;l||(_=FR(2,void 0,void 0),144&t&&(_.node=e)),g=l||176===e.kind||Mm(e)&&(262===e.kind||218===e.kind)?ee():void 0,v=void 0,d=void 0,m=void 0,S=void 0,k=!1,U(e),e.flags&=-5633,!(1&_.flags)&&8&t&&Fd(e.body)&&(e.flags|=512,k&&(e.flags|=1024),e.endFlowNode=_),307===e.kind&&(e.flags|=C,e.endFlowNode=_),g&&(ie(g,_),_=le(g),(176===e.kind||175===e.kind||Mm(e)&&(262===e.kind||218===e.kind))&&(e.returnFlowNode=_)),l||(_=n),d=r,m=i,g=o,v=a,S=s,k=c}else 64&t?(l=!1,U(e),xn.assertNotNode(e,qD),e.flags=l?256|e.flags:-257&e.flags):U(e);i=n,o=r,a=s}(t,n),r=e}else{const e=r;1===t.kind&&(r=t),Be(t),r=e}w=n}function Be(e){if(O_(e))if(Mm(e))for(const t of e.jsDoc)Re(t);else for(const t of e.jsDoc)OT(t,e),LT(t,!1)}function Je(e){if(!w)for(const t of e){if(!pf(t))return;if(ze(t))return void(w=!0)}}function ze(t){const n=Kd(e,t.expression);return'"use strict"'===n||"'use strict'"===n}function $e(o){switch(o.kind){case 80:if(4096&o.flags){let e=o.parent;for(;e&&!Fg(e);)e=e.parent;Ie(e,524288,788968);break}case 110:return _&&(Xu(o)||304===r.kind)&&(o.flowNode=_),function(t){if(!(e.parseDiagnostics.length||33554432&t.flags||16777216&t.flags||mh(t))){const n=xc(t);if(void 0===n)return;w&&n>=119&&n<=127?e.bindDiagnostics.push(M(t,function(t){return Zf(t)?va.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:e.externalModuleIndicator?va.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:va.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(t),Ap(t))):135===n?qI(e)&&om(t)?e.bindDiagnostics.push(M(t,va.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,Ap(t))):65536&t.flags&&e.bindDiagnostics.push(M(t,va.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,Ap(t))):127===n&&16384&t.flags&&e.bindDiagnostics.push(M(t,va.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,Ap(t)))}}(o);case 166:_&&wm(o)&&(o.flowNode=_);break;case 236:case 108:o.flowNode=_;break;case 81:return function(t){"#constructor"===t.escapedText&&(e.parseDiagnostics.length||e.bindDiagnostics.push(M(t,va.constructor_is_a_reserved_word,Ap(t))))}(o);case 211:case 212:const s=o;_&&W(s)&&(s.flowNode=_),vg(s)&&function(e){110===e.expression.kind?We(e):ug(e)&&307===e.parent.parent.kind&&(Tb(e.expression)?Xe(e,e.parent):Qe(e))}(s),Mm(s)&&e.commonJsModuleIndicator&&og(s)&&!RR(a,"module")&&J(e.locals,void 0,s.expression,134217729,111550);break;case 226:switch(ag(o)){case 1:Ue(o);break;case 2:!function(t){if(!Ve(t))return;const n=ng(t.right);if(Nb(n)||i===e&&LR(e,n))return;if(HE(n)&&x(n.properties,JN))return void f(n.properties,Ke);const r=vh(t)?2097152:1049092;bg(J(e.symbol.exports,e.symbol,t,67108864|r,0),t)}(o);break;case 3:Xe(o.left,o);break;case 6:!function(e){OT(e.left,e),OT(e.right,e),tt(e.left.expression,e.left,!1,!0)}(o);break;case 4:We(o);break;case 5:const t=o.left.expression;if(Mm(o)&&qD(t)){const e=RR(a,t.escapedText);if(dm(null==e?void 0:e.valueDeclaration)){We(o);break}}!function(t){var n;const r=nt(t.left.expression,a)||nt(t.left.expression,i);if(!Mm(t)&&!xg(r))return;const o=jx(t.left);qD(o)&&2097152&(null==(n=RR(i,o.escapedText))?void 0:n.flags)||(OT(t.left,t),OT(t.right,t),qD(t.left.expression)&&i===e&&LR(e,t.left.expression)?Ue(t):Vh(t)?(Ae(t,67108868,"__computed"),Ge(t,Ye(r,t.left.expression,et(t.left),!1,!1))):Qe(ut(t.left,dg)))}(o);break;case 0:break;default:xn.fail("Unknown binary expression special property assignment kind")}return function(e){w&&Vu(e.left)&&db(e.operatorToken.kind)&&Oe(e,e.left)}(o);case 299:return function(e){w&&e.variableDeclaration&&Oe(e,e.variableDeclaration.name)}(o);case 220:return function(t){if(w&&80===t.expression.kind){const n=Qp(e,t.expression);e.bindDiagnostics.push(aS(e,n.start,n.length,va.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}(o);case 225:return function(e){w&&Oe(e,e.operand)}(o);case 224:return function(e){w&&(46!==e.operator&&47!==e.operator||Oe(e,e.operand))}(o);case 254:return function(e){w&&Le(e,va.with_statements_are_not_allowed_in_strict_mode)}(o);case 256:return function(e){w&&wS(t)>=2&&(y_(e.statement)||EP(e.statement))&&Le(e.label,va.A_label_is_not_allowed_here)}(o);case 197:return void(l=!0);case 182:break;case 168:return function(e){if(CF(e.parent)){const t=qg(e.parent);t?(xn.assertNode(t,f_),t.locals??(t.locals=ed()),J(t.locals,void 0,e,262144,526824)):Pe(e,262144,526824)}else if(195===e.parent.kind){const t=function(e){const t=mc(e,(e=>e.parent&&IE(e.parent)&&e.parent.extendsType===e));return t&&t.parent}(e.parent);t?(xn.assertNode(t,f_),t.locals??(t.locals=ed()),J(t.locals,void 0,e,262144,526824)):Ae(e,262144,R(e))}else Pe(e,262144,526824)}(o);case 169:return ot(o);case 260:return it(o);case 208:return o.flowNode=_,it(o);case 172:case 171:return function(e){const t=yu(e),n=t?13247:0;return at(e,(t?98304:4)|(e.questionToken?16777216:0),n)}(o);case 303:case 304:return at(o,4,0);case 306:return at(o,8,900095);case 179:case 180:case 181:return Pe(o,131072,0);case 174:case 173:return at(o,8192|(o.questionToken?16777216:0),$f(o)?0:103359);case 262:return function(t){e.isDeclarationFile||33554432&t.flags||zh(t)&&(C|=4096),Me(t),w?(function(t){if(n<2&&307!==a.kind&&267!==a.kind&&!lu(a)){const n=Qp(e,t);e.bindDiagnostics.push(aS(e,n.start,n.length,function(t){return Zf(t)?va.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode:e.externalModuleIndicator?va.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode:va.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5}(t)))}}(t),Ie(t,16,110991)):Pe(t,16,110991)}(o);case 176:return Pe(o,16384,0);case 177:return at(o,32768,46015);case 178:return at(o,65536,78783);case 184:case 317:case 323:case 185:return function(e){const t=L(131072,R(e));j(t,e,131072);const n=L(2048,"__type");j(n,e,2048),n.members=ed(),n.members.set(t.escapedName,t)}(o);case 187:case 322:case 200:return function(e){return Ae(e,2048,"__type")}(o);case 332:return function(e){V(e);const t=Ug(e);t&&174!==t.kind&&j(t.symbol,t,32)}(o);case 210:return function(e){return Ae(e,4096,"__object")}(o);case 218:case 219:return function(t){e.isDeclarationFile||33554432&t.flags||zh(t)&&(C|=4096),_&&(t.flowNode=_),Me(t);return Ae(t,16,t.name?t.name.escapedText:"__function")}(o);case 213:switch(ag(o)){case 7:return function(e){let t=nt(e.arguments[0]);const n=307===e.parent.parent.kind;t=Ye(t,e.arguments[0],n,!1,!1),Ze(e,t,!1)}(o);case 8:return function(e){if(!Ve(e))return;const t=rt(e.arguments[0],void 0,((e,t)=>(t&&j(t,e,67110400),t)));if(t){const n=1048580;J(t.exports,t,e,n,0)}}(o);case 9:return function(e){const t=nt(e.arguments[0].expression);t&&t.valueDeclaration&&j(t,t.valueDeclaration,32),Ze(e,t,!0)}(o);case 0:break;default:return xn.fail("Unknown call expression assignment declaration kind")}Mm(o)&&function(t){!e.commonJsModuleIndicator&&Jm(t,!1)&&Ve(t)}(o);break;case 231:case 263:return w=!0,function(t){263===t.kind?Ie(t,32,899503):(Ae(t,32,t.name?t.name.escapedText:"__class"),t.name&&P.add(t.name.escapedText));const{symbol:n}=t,r=L(4194308,"prototype"),i=n.exports.get(r.escapedName);i&&(t.name&&OT(t.name,t),e.bindDiagnostics.push(M(i.declarations[0],va.Duplicate_identifier_0,Sc(r)))),n.exports.set(r.escapedName,r),r.parent=n}(o);case 264:return Ie(o,64,788872);case 265:return Ie(o,524288,788968);case 266:return function(e){return tf(e)?Ie(e,128,899967):Ie(e,256,899327)}(o);case 267:return function(t){if(Ne(t),sp(t))if(Bv(t,32)&&Le(t,va.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),mp(t))Fe(t);else{let n;if(11===t.name.kind){const{text:e}=t.name;n=nT(e),void 0===n&&Le(t.name,va.Pattern_0_can_have_at_most_one_Asterisk_character,e)}const r=Pe(t,512,110735);e.patternAmbientModules=ue(e.patternAmbientModules,n&&!st(n)?{pattern:n,symbol:r}:void 0)}else{const e=Fe(t);if(0!==e){const{symbol:n}=t;n.constEnumOnlyModule=!(304&n.flags)&&2===e&&!1!==n.constEnumOnlyModule}}}(o);case 292:return function(e){return Ae(e,4096,"__jsxAttributes")}(o);case 291:return function(e,t,n){return Pe(e,4,0)}(o);case 271:case 274:case 276:case 281:return Pe(o,2097152,2097152);case 270:return function(t){Q(t.modifiers)&&e.bindDiagnostics.push(M(t,va.Modifiers_cannot_appear_here));const n=qN(t.parent)?qI(t.parent)?t.parent.isDeclarationFile?void 0:va.Global_module_exports_may_only_appear_in_declaration_files:va.Global_module_exports_may_only_appear_in_module_files:va.Global_module_exports_may_only_appear_at_top_level;n?e.bindDiagnostics.push(M(t,n)):(e.symbol.globalExports=e.symbol.globalExports||ed(),J(e.symbol.globalExports,e.symbol,t,2097152,2097152))}(o);case 273:return function(e){e.name&&Pe(e,2097152,2097152)}(o);case 278:return function(e){i.symbol&&i.symbol.exports?e.exportClause?dN(e.exportClause)&&(OT(e.exportClause,e),J(i.symbol.exports,i.symbol,e.exportClause,2097152,2097152)):J(i.symbol.exports,i.symbol,e,8388608,0):Ae(e,8388608,R(e))}(o);case 277:return function(e){if(i.symbol&&i.symbol.exports){const t=vh(e)?2097152:4,n=J(i.symbol.exports,i.symbol,e,t,-1);e.isExportEquals&&bg(n,e)}else Ae(e,111551,R(e))}(o);case 307:return Je(o.statements),function(){if(Ne(e),qI(e))qe();else if(ef(e)){qe();const t=e.symbol;J(e.symbol.exports,e.symbol,e,4,-1),e.symbol=t}}();case 241:if(!lu(o.parent))return;case 268:return Je(o.statements);case 341:if(323===o.parent.kind)return ot(o);if(322!==o.parent.kind)break;case 348:const d=o;return Pe(d,d.isBracketed||d.typeExpression&&316===d.typeExpression.type.kind?16777220:4,0);case 346:case 338:case 340:return(c||(c=[])).push(o);case 339:return Re(o.typeExpression);case 351:return(u||(u=[])).push(o)}}function qe(){Ae(e,512,`"${Yk(e.fileName)}"`)}function Ve(t){return!(e.externalModuleIndicator&&!0!==e.externalModuleIndicator||(e.commonJsModuleIndicator||(e.commonJsModuleIndicator=t,e.externalModuleIndicator||qe()),0))}function Ue(e){if(!Ve(e))return;const t=rt(e.left.expression,void 0,((e,t)=>(t&&j(t,e,67110400),t)));if(t){const n=yh(e.right)&&(rg(e.left.expression)||og(e.left.expression))?2097152:1048580;OT(e.left,e),J(t.exports,t,e.left,n,0)}}function Ke(t){J(e.symbol.exports,e.symbol,t,69206016,0)}function We(e){if(xn.assert(Mm(e)),uP(e)&&GE(e.left)&&VD(e.left.name)||GE(e)&&VD(e.name))return;const t=rm(e,!1,!1);switch(t.kind){case 262:case 218:let n=t.symbol;if(uP(t.parent)&&64===t.parent.operatorToken.kind){const e=t.parent.left;ug(e)&&Tb(e.expression)&&(n=nt(e.expression.expression,o))}n&&n.valueDeclaration&&(n.members=n.members||ed(),Vh(e)?He(e,n,n.members):J(n.members,n,e,67108868,0),j(n,n.valueDeclaration,32));break;case 176:case 172:case 174:case 177:case 178:case 175:const r=t.parent,i=Jv(t)?r.symbol.exports:r.symbol.members;Vh(e)?He(e,r.symbol,i):J(i,r.symbol,e,67108868,0,!0);break;case 307:if(Vh(e))break;t.commonJsModuleIndicator?J(t.symbol.exports,t.symbol,e,1048580,0):Pe(e,1,111550);break;case 267:break;default:xn.failBadSyntaxKind(t)}}function He(e,t,n){J(n,t,e,4,0,!0,!0),Ge(e,t)}function Ge(e,t){t&&(t.assignmentDeclarationMembers||(t.assignmentDeclarationMembers=new Map)).set(IB(e),e)}function Xe(e,t){const n=e.expression,r=n.expression;OT(r,n),OT(n,e),OT(e,t),tt(r,e,!0,!0)}function Qe(e){xn.assert(!qD(e)),OT(e.expression,e),tt(e.expression,e,!1,!1)}function Ye(t,n,r,i,o){if(2097152&(null==t?void 0:t.flags))return t;if(r&&!i){const r=67110400,i=110735;t=rt(n,t,((t,n,o)=>n?(j(n,t,r),n):J(o?o.exports:e.jsGlobalAugmentations||(e.jsGlobalAugmentations=ed()),o,t,r,i)))}return o&&t&&t.valueDeclaration&&j(t,t.valueDeclaration,32),t}function Ze(e,t,n){if(!t||!function(e){if(1072&e.flags)return!0;const t=e.valueDeclaration;if(t&&QE(t))return!!Qm(t);let n=t?KP(t)?t.initializer:uP(t)?t.right:GE(t)&&uP(t.parent)?t.parent.right:void 0:void 0;if(n=n&&ng(n),n){const e=Tb(KP(t)?t.name:uP(t)?t.left:t);return!!Ym(!uP(n)||57!==n.operatorToken.kind&&61!==n.operatorToken.kind?n:n.right,e)}return!1}(t))return;const r=n?t.members||(t.members=ed()):t.exports||(t.exports=ed());let i=0,o=0;uu(Qm(e))?(i=8192,o=103359):QE(e)&&sg(e)&&(Q(e.arguments[2].properties,(e=>{const t=Pc(e);return!!t&&qD(t)&&"set"===bc(t)}))&&(i|=65540,o|=78783),Q(e.arguments[2].properties,(e=>{const t=Pc(e);return!!t&&qD(t)&&"get"===bc(t)}))&&(i|=32772,o|=46015)),0===i&&(i=4,o=0),J(r,t,e,67108864|i,-67108865&o)}function et(e){return uP(e.parent)?307===function(e){for(;uP(e.parent);)e=e.parent;return e.parent}(e.parent).parent.kind:307===e.parent.parent.kind}function tt(e,t,n,r){let o=nt(e,a)||nt(e,i);const s=et(t);o=Ye(o,t.expression,s,n,r),Ze(t,o,n)}function nt(e,t=i){if(qD(e))return RR(t,e.escapedText);{const t=nt(e.expression);return t&&t.exports&&t.exports.get(mg(e))}}function rt(t,n,r){if(LR(e,t))return e.symbol;if(qD(t))return r(t,nt(t),n);{const e=rt(t.expression,n,r),i=pg(t);return VD(i)&&xn.fail("unexpected PrivateIdentifier"),r(i,e&&e.exports&&e.exports.get(mg(t)),e)}}function it(e){if(w&&Oe(e,e.name),!Eu(e.name)){const t=260===e.kind?e:e.parent.parent;!Mm(e)||!$m(t)||ol(e)||32&cc(e)?op(e)?Ie(e,2,111551):ay(e)?Pe(e,1,111551):Pe(e,1,111550):Pe(e,2097152,2097152)}}function ot(e){if((341!==e.kind||323===i.kind)&&(!w||33554432&e.flags||Oe(e,e.name),Eu(e.name)?Ae(e,1,"__"+e.parent.parameters.indexOf(e)):Pe(e,1,111551),rc(e,e.parent))){const t=e.parent.parent;J(t.symbol.members,t.symbol,e,4|(e.questionToken?16777216:0),0)}}function at(t,n,r){return e.isDeclarationFile||33554432&t.flags||!zh(t)||(C|=4096),_&&qf(t)&&(t.flowNode=_),Vh(t)?Ae(t,n,"__computed"):Pe(t,n,r)}}function MR(e){return!(HP(e)||function(e){switch(e.kind){case 264:case 265:return!0;case 267:return 1!==DR(e);case 266:return Bv(e,4096);default:return!1}}(e)||YP(e)||EP(e)&&!(7&uc(e))&&e.declarationList.declarations.some((e=>!e.initializer)))}function LR(e,t){let n=0;const r=rt();for(r.enqueue(t);!r.isEmpty()&&n<100;){if(n++,rg(t=r.dequeue())||og(t))return!0;if(qD(t)){const n=RR(e,t.escapedText);if(n&&n.valueDeclaration&&KP(n.valueDeclaration)&&n.valueDeclaration.initializer){const e=n.valueDeclaration.initializer;r.enqueue(e),mb(e,!0)&&(r.enqueue(e.left),r.enqueue(e.right))}}}return!1}function jR(e){switch(e.kind){case 231:case 263:case 266:case 210:case 187:case 322:case 292:return 1;case 264:return 65;case 267:case 265:case 200:case 181:return 33;case 307:return 37;case 177:case 178:case 174:if(qf(e))return 173;case 176:case 262:case 173:case 179:case 323:case 317:case 184:case 180:case 185:case 175:return 45;case 218:case 219:return 61;case 268:return 4;case 172:return e.initializer?4:0;case 299:case 248:case 249:case 250:case 269:return 34;case 241:return cu(e.parent)||pE(e.parent)?0:34}return 0}function RR(e,t){var n,r,i,o;const a=null==(r=null==(n=lt(e,f_))?void 0:n.locals)?void 0:r.get(t);return a?a.exportSymbol??a:qN(e)&&e.jsGlobalAugmentations&&e.jsGlobalAugmentations.has(t)?e.jsGlobalAugmentations.get(t):p_(e)?null==(o=null==(i=e.symbol)?void 0:i.exports)?void 0:o.get(t):void 0}function BR(e,t,n,r,i,o,a,s,c,l){return function(u=(()=>!0)){const _=[],d=[];return{walkType:e=>{try{return p(e),{visitedTypes:Je(_),visitedSymbols:Je(d)}}finally{I(_),I(d)}},walkSymbol:e=>{try{return h(e),{visitedTypes:Je(_),visitedSymbols:Je(d)}}finally{I(_),I(d)}}};function p(e){if(e&&!_[e.id]&&(_[e.id]=e,!h(e.symbol))){if(524288&e.flags){const n=e,i=n.objectFlags;4&i&&function(e){p(e.target),f(l(e),p)}(e),32&i&&function(e){p(e.typeParameter),p(e.constraintType),p(e.templateType),p(e.modifiersType)}(e),3&i&&(g(t=e),f(t.typeParameters,p),f(r(t),p),p(t.thisType)),24&i&&g(n)}var t;262144&e.flags&&function(e){p(s(e))}(e),3145728&e.flags&&function(e){f(e.types,p)}(e),4194304&e.flags&&function(e){p(e.type)}(e),8388608&e.flags&&function(e){p(e.objectType),p(e.indexType),p(e.constraint)}(e)}}function m(r){const i=t(r);i&&p(i.type),f(r.typeParameters,p);for(const e of r.parameters)h(e);p(e(r)),p(n(r))}function g(e){const t=i(e);for(const e of t.indexInfos)p(e.keyType),p(e.type);for(const e of t.callSignatures)m(e);for(const e of t.constructSignatures)m(e);for(const e of t.properties)h(e)}function h(e){if(!e)return!1;const t=OB(e);return!d[t]&&(d[t]=e,!u(e)||(p(o(e)),e.exports&&e.exports.forEach(h),f(e.declarations,(e=>{if(e.type&&186===e.type.kind){const t=e.type;h(a(c(t.exprName)))}})),!1))}}}var JR={};o(JR,{RelativePreference:()=>zR,countPathComponents:()=>eB,forEachFileNameOfModule:()=>rB,getLocalModuleSpecifierBetweenFileNames:()=>QR,getModuleSpecifier:()=>VR,getModuleSpecifierPreferences:()=>$R,getModuleSpecifiers:()=>GR,getModuleSpecifiersWithCacheInfo:()=>XR,getNodeModulesPackageName:()=>UR,tryGetJSExtensionForFile:()=>fB,tryGetModuleSpecifiersFromCache:()=>WR,tryGetRealFileNameForNonJsDeclarationFileName:()=>dB,updateModuleSpecifier:()=>qR});var zR=(e=>(e[e.Relative=0]="Relative",e[e.NonRelative=1]="NonRelative",e[e.Shortest=2]="Shortest",e[e.ExternalNonRelative=3]="ExternalNonRelative",e))(zR||{});function $R({importModuleSpecifierPreference:e,importModuleSpecifierEnding:t},n,r,i){const o=a();return{relativePreference:void 0!==i?Os(i)?0:1:"relative"===e?0:"non-relative"===e?1:"project-relative"===e?3:2,getAllowedEndingsInPreferredOrder:e=>{const t=e!==r.impliedNodeFormat?a(e):o;if(99===(e??r.impliedNodeFormat))return xR(n,r.fileName)?[3,2]:[2];if(1===ES(n))return 2===t?[2,1]:[1,2];const i=xR(n,r.fileName);switch(t){case 2:return i?[2,3,0,1]:[2,0,1];case 3:return[3,0,2,1];case 1:return i?[1,0,3,2]:[1,0,2];case 0:return i?[0,1,3,2]:[0,1,2];default:xn.assertNever(t)}}};function a(e){if(void 0!==i){if(qk(i))return 2;if(Wt(i,"/index"))return 1}return Wk(t,e??r.impliedNodeFormat,n,Am(r)?r:void 0)}}function qR(e,t,n,r,i,o,a={}){const s=KR(e,t,n,r,i,$R({},e,t,o),{},a);if(s!==o)return s}function VR(e,t,n,r,i,o={}){return KR(e,t,n,r,i,$R({},e,t),{},o)}function UR(e,t,n,r,i,o={}){const a=YR(t.fileName,r);return g(iB(a,n,r,i,e,o),(n=>lB(n,a,t,r,e,i,!0,o.overrideImportMode)))}function KR(e,t,n,r,i,o,a,s={}){const c=YR(n,i);return g(iB(c,r,i,a,e,s),(n=>lB(n,c,t,i,e,a,void 0,s.overrideImportMode)))||ZR(r,c,e,i,s.overrideImportMode||t.impliedNodeFormat,o)}function WR(e,t,n,r,i={}){const o=HR(e,t,n,r,i);return o[1]&&{kind:o[0],moduleSpecifiers:o[1],computedWithoutCache:!1}}function HR(e,t,n,r,i={}){var o;const a=kd(e);if(!a)return u;const s=null==(o=n.getModuleSpecifierCache)?void 0:o.call(n),c=null==s?void 0:s.get(t.path,a.path,r,i);return[null==c?void 0:c.kind,null==c?void 0:c.moduleSpecifiers,a,null==c?void 0:c.modulePaths,s]}function GR(e,t,n,r,i,o,a={}){return XR(e,t,n,r,i,o,a,!1).moduleSpecifiers}function XR(e,t,n,r,i,o,a={},s){let c=!1;const l=function(e,t){var n;const r=null==(n=e.declarations)?void 0:n.find((e=>lp(e)&&(!fp(e)||!Os(Hh(e.name)))));if(r)return r.name.text;const i=q(e.declarations,(e=>{var n,r,i,o;if(!ZP(e))return;const a=function(e){for(;8&e.flags;)e=e.parent;return e}(e);if(!((null==(n=null==a?void 0:a.parent)?void 0:n.parent)&&eN(a.parent)&&sp(a.parent.parent)&&qN(a.parent.parent.parent)))return;const s=null==(o=null==(i=null==(r=a.parent.parent.symbol.exports)?void 0:r.get("export="))?void 0:i.valueDeclaration)?void 0:o.expression;if(!s)return;const c=t.getSymbolAtLocation(s);if(c&&(2097152&(null==c?void 0:c.flags)?t.getAliasedSymbol(c):c)===e.symbol)return a.parent.parent}))[0];return i?i.name.text:void 0}(e,t);if(l)return{kind:"ambient",moduleSpecifiers:[l],computedWithoutCache:c};let[_,d,p,m,g]=HR(e,r,i,o,a);if(d)return{kind:_,moduleSpecifiers:d,computedWithoutCache:c};if(!p)return{kind:void 0,moduleSpecifiers:u,computedWithoutCache:c};c=!0,m||(m=aB(YR(r.fileName,i),p.originalFileName,i,n,a));const h=function(e,t,n,r,i,o={},a){const s=YR(n.fileName,r),c=$R(i,t,n),l=Am(n)&&f(e,(e=>f(r.getFileIncludeReasons().get(Yo(e.path,r.getCurrentDirectory(),s.getCanonicalFileName)),(e=>{if(3!==e.kind||e.file!==n.path)return;if(n.impliedNodeFormat&&n.impliedNodeFormat!==$q(n,e.index,t))return;const r=TV(n,e.index).text;return 1===c.relativePreference&&Po(r)?void 0:r}))));if(l)return{kind:void 0,moduleSpecifiers:[l],computedWithoutCache:!0};const u=Q(e,(e=>e.isInNodeModules));let _,d,p,m;for(const l of e){const e=l.isInNodeModules?lB(l,s,n,r,t,i,void 0,o.overrideImportMode):void 0;if(_=ue(_,e),e&&l.isRedirect)return{kind:"node_modules",moduleSpecifiers:_,computedWithoutCache:!0};if(!e){const e=ZR(l.path,s,t,r,o.overrideImportMode||n.impliedNodeFormat,c,l.isRedirect);if(!e)continue;l.isRedirect?p=ue(p,e):No(e)?Oj(e)?m=ue(m,e):d=ue(d,e):(a||!u||l.isInNodeModules)&&(m=ue(m,e))}}return(null==d?void 0:d.length)?{kind:"paths",moduleSpecifiers:d,computedWithoutCache:!0}:(null==p?void 0:p.length)?{kind:"redirect",moduleSpecifiers:p,computedWithoutCache:!0}:(null==_?void 0:_.length)?{kind:"node_modules",moduleSpecifiers:_,computedWithoutCache:!0}:{kind:"relative",moduleSpecifiers:xn.checkDefined(m),computedWithoutCache:!0}}(m,n,r,i,o,a,s);return null==g||g.set(r.path,p.path,o,a,h.kind,m,h.moduleSpecifiers),h}function QR(e,t,n,r,i={}){return ZR(t,YR(e.fileName,r),n,r,i.overrideImportMode??e.impliedNodeFormat,$R({},n,e))}function YR(e,t){e=Go(e,t.getCurrentDirectory());const n=tn(!t.useCaseSensitiveFileNames||t.useCaseSensitiveFileNames()),r=Ro(e);return{getCanonicalFileName:n,importingSourceFileName:e,sourceDirectory:r,canonicalSourceDirectory:n(r)}}function ZR(e,t,n,r,i,{getAllowedEndingsInPreferredOrder:o,relativePreference:a},s){const{baseUrl:c,paths:l,rootDirs:u}=n;if(s&&!l)return;const{sourceDirectory:_,canonicalSourceDirectory:d,getCanonicalFileName:p}=t,m=o(i),g=u&&function(e,t,n,r,i,o){const a=uB(t,e,r);if(void 0===a)return;const s=At(R(uB(n,e,r),(e=>O(a,(t=>ta(da(e,t,r)))))),Xk);return s?_B(s,i,o):void 0}(u,e,_,p,m,n)||_B(ta(da(_,e,p)),m,n);if(!c&&!l&&!OS(n)||0===a)return s?void 0:g;const h=mB(e,Go(rv(n,r)||c,r.getCurrentDirectory()),p);if(!h)return s?void 0:g;const y=s?void 0:function(e,t,n,r,i){var o,a,s;if(!r.readFile||!OS(n))return;const c=nB(r,t);if(!c)return;const l=Ko(c,"package.json"),u=null==(a=null==(o=r.getPackageJsonInfoCache)?void 0:o.call(r))?void 0:a.getPackageJsonInfo(l);if(sj(u)||!r.fileExists(l))return;const _=(null==u?void 0:u.contents.packageJsonContent)||Jb(r.readFile(l)),d=null==_?void 0:_.imports;if(!d)return;const p=rj(n,i);return null==(s=f(Re(d),(t=>{if(!an(t,"#")||"#"===t||an(t,"#/"))return;const i=Wt(t,"/")?1:t.includes("*")?2:0;return cB(n,r,e,c,t,d[t],p,i,!0)})))?void 0:s.moduleFileToTry}(e,_,n,r,i),v=s||void 0===y?l&&sB(h,l,m,r,n):void 0;if(s)return v;const b=y??(void 0===v&&void 0!==c?_B(h,m,n):v);if(!b)return g;if(1===a&&!Po(b))return b;if(3===a&&!Po(b)){const i=n.configFilePath?Yo(Ro(n.configFilePath),r.getCurrentDirectory(),t.getCanonicalFileName):t.getCanonicalFileName(r.getCurrentDirectory()),o=Yo(e,i,p),a=an(d,i),s=an(o,i);return a&&!s||!a&&s?b:(x=nB(r,Ro(o)),S=nB(r,_),k=!Ky(r),x===S||void 0!==x&&void 0!==S&&0===ca(x,S,k)?g:b)}var x,S,k;return gB(b)||eB(g)e.fileExists(Ko(t,"package.json"))?t:void 0))}function rB(e,t,n,r,i){var o;const a=Wy(n),s=n.getCurrentDirectory(),c=n.isSourceOfProjectReferenceRedirect(t)?n.getProjectReferenceRedirect(t):void 0,l=Yo(t,s,a),_=n.redirectTargetsMap.get(l)||u,d=[...c?[c]:u,t,..._].map((e=>Go(e,s)));let p=!x(d,JT);if(!r){const e=f(d,(e=>!(p&&JT(e))&&i(e,c===e)));if(e)return e}const m=null==(o=n.getSymlinkCache)?void 0:o.call(n).getSymlinkedDirectoriesByRealpath(),g=Go(t,s);return m&&ga(Ro(g),(t=>{const n=m.get(ea(Yo(t,s,a)));if(n)return!ua(e,t,a)&&f(d,(e=>{if(!ua(e,t,a))return;const r=da(t,e,a);for(const t of n){const n=Wo(t,r),o=i(n,e===c);if(p=!0,o)return o}}))}))||(r?f(d,(e=>p&&JT(e)?void 0:i(e,e===c))):void 0)}function iB(e,t,n,r,i,o={}){var a;const s=Yo(e.importingSourceFileName,n.getCurrentDirectory(),Wy(n)),c=Yo(t,n.getCurrentDirectory(),Wy(n)),l=null==(a=n.getModuleSpecifierCache)?void 0:a.call(n);if(l){const e=l.get(s,c,r,o);if(null==e?void 0:e.modulePaths)return e.modulePaths}const u=aB(e,t,n,i,o);return l&&l.setModulePaths(s,c,r,o,u),u}var oB=["dependencies","peerDependencies","optionalDependencies"];function aB(e,t,n,r,i){var o,a;const s=null==(o=n.getModuleResolutionCache)?void 0:o.call(n),c=null==(a=n.getSymlinkCache)?void 0:a.call(n);if(s&&c&&n.readFile&&!Oj(e.importingSourceFileName)){xn.type(n);const t=Wj(s.getPackageJsonInfoCache(),n,{}),o=Hj(e.importingSourceFileName,t);if(o){const e=function(e){let t;for(const n of oB){const r=e[n];r&&"object"==typeof r&&(t=Z(t,Re(r)))}return t}(o.contents.packageJsonContent);for(const t of e||u){const e=Sj(t,Ko(o.packageDirectory,"package.json"),r,n,s,void 0,i.overrideImportMode);c.setSymlinksFromResolution(e.resolvedModule)}}}const l=new Map;let _=!1;rB(e.importingSourceFileName,t,n,!0,((t,n)=>{const r=Oj(t);l.set(t,{path:e.getCanonicalFileName(t),isRedirect:n,isInNodeModules:r}),_=_||r}));const d=[];for(let t=e.canonicalSourceDirectory;0!==l.size;){const e=ea(t);let n;l.forEach((({path:t,isRedirect:r,isInNodeModules:i},o)=>{an(t,e)&&((n||(n=[])).push({path:o,isRedirect:r,isInNodeModules:i}),l.delete(o))})),n&&(n.length>1&&n.sort(tB),d.push(...n));const r=Ro(t);if(r===t)break;t=r}if(l.size){const e=$e(l.entries(),(([e,{isRedirect:t,isInNodeModules:n}])=>({path:e,isRedirect:t,isInNodeModules:n})));e.length>1&&e.sort(tB),d.push(...e)}return d}function sB(e,t,n,r,i){for(const r in t)for(const a of t[r]){const t=Xo(a),s=t.indexOf("*"),c=n.map((t=>({ending:t,value:_B(e,[t],i)})));if(lT(t)&&c.push({ending:void 0,value:e}),-1!==s){const e=t.substring(0,s),n=t.substring(s+1);for(const{ending:t,value:i}of c)if(i.length>=e.length+n.length&&an(i,e)&&Wt(i,n)&&o({ending:t,value:i})){const t=i.substring(e.length,i.length-n.length);if(!Po(t))return bC(r,t)}}else if(Q(c,(e=>0!==e.ending&&t===e.value))||Q(c,(e=>0===e.ending&&t===e.value&&o(e))))return r}function o({ending:t,value:n}){return 0!==t||n===_B(e,[t],i,r)}}function cB(e,t,n,r,i,o,a,s,c){if("string"==typeof o){const a=!Ky(t),l=()=>t.getCommonSourceDirectory(),u=c&&R$(n,e,a,l),_=c&&L$(n,e,a,l),d=Go(Ko(r,o),void 0),p=Vk(n)?Yk(n)+fB(n,e):void 0;switch(s){case 0:if(p&&0===ca(p,d,a)||0===ca(n,d,a)||u&&0===ca(u,d,a)||_&&0===ca(_,d,a))return{moduleFileToTry:i};break;case 1:if(p&&la(d,p,a)){const e=da(d,p,!1);return{moduleFileToTry:Go(Ko(Ko(i,o),e),void 0)}}if(la(d,n,a)){const e=da(d,n,!1);return{moduleFileToTry:Go(Ko(Ko(i,o),e),void 0)}}if(u&&la(d,u,a)){const e=da(d,u,!1);return{moduleFileToTry:Ko(i,e)}}if(_&&la(d,_,a)){const e=da(d,_,!1);return{moduleFileToTry:Ko(i,e)}}break;case 2:const e=d.indexOf("*"),t=d.slice(0,e),r=d.slice(e+1);if(p&&an(p,t,a)&&Wt(p,r,a)){const e=p.slice(t.length,p.length-r.length);return{moduleFileToTry:bC(i,e)}}if(an(n,t,a)&&Wt(n,r,a)){const e=n.slice(t.length,n.length-r.length);return{moduleFileToTry:bC(i,e)}}if(u&&an(u,t,a)&&Wt(u,r,a)){const e=u.slice(t.length,u.length-r.length);return{moduleFileToTry:bC(i,e)}}if(_&&an(_,t,a)&&Wt(_,r,a)){const e=_.slice(t.length,_.length-r.length);return{moduleFileToTry:bC(i,e)}}}}else{if(Array.isArray(o))return f(o,(o=>cB(e,t,n,r,i,o,a,s,c)));if("object"==typeof o&&null!==o)for(const l of Re(o))if("default"===l||a.indexOf(l)>=0||aR(a,l)){const u=o[l],_=cB(e,t,n,r,i,u,a,s,c);if(_)return _}}}function lB({path:e,isRedirect:t},{getCanonicalFileName:n,canonicalSourceDirectory:r},i,o,a,s,c,l){if(!o.fileExists||!o.readFile)return;const u=XT(e);if(!u)return;const _=$R(s,a,i).getAllowedEndingsInPreferredOrder();let d=e,p=!1;if(!c){let t,n=u.packageRootIndex;for(;;){const{moduleFileToTry:r,packageRootPath:i,blockedByExports:s,verbatimFromExports:c}=v(n);if(1!==ES(a)){if(s)return;if(c)return r}if(i){d=i,p=!0;break}if(t||(t=r),n=e.indexOf(xo,n+1),-1===n){d=_B(t,_,a,o);break}}}if(t&&!p)return;const m=o.getGlobalTypingsCacheLocation&&o.getGlobalTypingsCacheLocation(),g=n(d.substring(0,u.topLevelNodeModulesIndex));if(!(an(r,g)||m&&an(n(m),g)))return;const h=d.substring(u.topLevelPackageNameIndex+1),y=gR(h);return 1===ES(a)&&y===h?void 0:y;function v(t){var r,s;const c=e.substring(0,t),d=Ko(c,"package.json");let p=e,m=!1;const g=null==(s=null==(r=o.getPackageJsonInfoCache)?void 0:r.call(o))?void 0:s.getPackageJsonInfo(d);if(aj(g)||void 0===g&&o.fileExists(d)){const t=(null==g?void 0:g.contents.packageJsonContent)||Jb(o.readFile(d)),r=l||i.impliedNodeFormat;if(IS(a)){const n=gR(c.substring(u.topLevelPackageNameIndex+1)),i=rj(a,r),s=(null==t?void 0:t.exports)?function(e,t,n,r,i,o,a){return"object"==typeof o&&null!==o&&!Array.isArray(o)&&tR(o)?f(Re(o),(s=>{const c=Go(Ko(i,s),void 0),l=Wt(s,"/")?1:s.includes("*")?2:0;return cB(e,t,n,r,c,o[s],a,l,!1)})):cB(e,t,n,r,i,o,a,0,!1)}(a,o,e,c,n,t.exports,i):void 0;if(s)return{...s,verbatimFromExports:!0};if(null==t?void 0:t.exports)return{moduleFileToTry:e,blockedByExports:!0}}const s=(null==t?void 0:t.typesVersions)?XL(t.typesVersions):void 0;if(s){const t=sB(e.slice(c.length+1),s.paths,_,o,a);void 0===t?m=!0:p=Ko(c,t)}const h=(null==t?void 0:t.typings)||(null==t?void 0:t.types)||(null==t?void 0:t.main)||"index.js";if(st(h)&&(!m||!dT(rT(s.paths),h))){const e=Yo(h,c,n),r=n(p);if(Yk(e)===Yk(r))return{packageRootPath:c,moduleFileToTry:p};if("module"!==(null==t?void 0:t.type)&&!Io(r,Jk)&&an(r,e)&&Ro(r)===Zo(e)&&"index"===Yk(Bo(r)))return{packageRootPath:c,moduleFileToTry:p}}}else{const e=n(p.substring(u.packageRootIndex+1));if("index.d.ts"===e||"index.js"===e||"index.ts"===e||"index.tsx"===e)return{moduleFileToTry:p,packageRootPath:c}}return{moduleFileToTry:p}}}function uB(e,t,n){return q(t,(t=>{const r=mB(e,t,n);return void 0!==r&&gB(r)?void 0:r}))}function _B(e,t,n,r){if(Io(e,[".json",".mjs",".cjs"]))return e;const i=Yk(e);if(e===i)return e;const o=t.indexOf(2),a=t.indexOf(3);if(Io(e,[".mts",".cts"])&&-1!==a&&a0===e||1===e));return-1!==r&&r(e[e.None=0]="None",e[e.TypeofEQString=1]="TypeofEQString",e[e.TypeofEQNumber=2]="TypeofEQNumber",e[e.TypeofEQBigInt=4]="TypeofEQBigInt",e[e.TypeofEQBoolean=8]="TypeofEQBoolean",e[e.TypeofEQSymbol=16]="TypeofEQSymbol",e[e.TypeofEQObject=32]="TypeofEQObject",e[e.TypeofEQFunction=64]="TypeofEQFunction",e[e.TypeofEQHostObject=128]="TypeofEQHostObject",e[e.TypeofNEString=256]="TypeofNEString",e[e.TypeofNENumber=512]="TypeofNENumber",e[e.TypeofNEBigInt=1024]="TypeofNEBigInt",e[e.TypeofNEBoolean=2048]="TypeofNEBoolean",e[e.TypeofNESymbol=4096]="TypeofNESymbol",e[e.TypeofNEObject=8192]="TypeofNEObject",e[e.TypeofNEFunction=16384]="TypeofNEFunction",e[e.TypeofNEHostObject=32768]="TypeofNEHostObject",e[e.EQUndefined=65536]="EQUndefined",e[e.EQNull=131072]="EQNull",e[e.EQUndefinedOrNull=262144]="EQUndefinedOrNull",e[e.NEUndefined=524288]="NEUndefined",e[e.NENull=1048576]="NENull",e[e.NEUndefinedOrNull=2097152]="NEUndefinedOrNull",e[e.Truthy=4194304]="Truthy",e[e.Falsy=8388608]="Falsy",e[e.IsUndefined=16777216]="IsUndefined",e[e.IsNull=33554432]="IsNull",e[e.IsUndefinedOrNull=50331648]="IsUndefinedOrNull",e[e.All=134217727]="All",e[e.BaseStringStrictFacts=3735041]="BaseStringStrictFacts",e[e.BaseStringFacts=12582401]="BaseStringFacts",e[e.StringStrictFacts=16317953]="StringStrictFacts",e[e.StringFacts=16776705]="StringFacts",e[e.EmptyStringStrictFacts=12123649]="EmptyStringStrictFacts",e[e.EmptyStringFacts=12582401]="EmptyStringFacts",e[e.NonEmptyStringStrictFacts=7929345]="NonEmptyStringStrictFacts",e[e.NonEmptyStringFacts=16776705]="NonEmptyStringFacts",e[e.BaseNumberStrictFacts=3734786]="BaseNumberStrictFacts",e[e.BaseNumberFacts=12582146]="BaseNumberFacts",e[e.NumberStrictFacts=16317698]="NumberStrictFacts",e[e.NumberFacts=16776450]="NumberFacts",e[e.ZeroNumberStrictFacts=12123394]="ZeroNumberStrictFacts",e[e.ZeroNumberFacts=12582146]="ZeroNumberFacts",e[e.NonZeroNumberStrictFacts=7929090]="NonZeroNumberStrictFacts",e[e.NonZeroNumberFacts=16776450]="NonZeroNumberFacts",e[e.BaseBigIntStrictFacts=3734276]="BaseBigIntStrictFacts",e[e.BaseBigIntFacts=12581636]="BaseBigIntFacts",e[e.BigIntStrictFacts=16317188]="BigIntStrictFacts",e[e.BigIntFacts=16775940]="BigIntFacts",e[e.ZeroBigIntStrictFacts=12122884]="ZeroBigIntStrictFacts",e[e.ZeroBigIntFacts=12581636]="ZeroBigIntFacts",e[e.NonZeroBigIntStrictFacts=7928580]="NonZeroBigIntStrictFacts",e[e.NonZeroBigIntFacts=16775940]="NonZeroBigIntFacts",e[e.BaseBooleanStrictFacts=3733256]="BaseBooleanStrictFacts",e[e.BaseBooleanFacts=12580616]="BaseBooleanFacts",e[e.BooleanStrictFacts=16316168]="BooleanStrictFacts",e[e.BooleanFacts=16774920]="BooleanFacts",e[e.FalseStrictFacts=12121864]="FalseStrictFacts",e[e.FalseFacts=12580616]="FalseFacts",e[e.TrueStrictFacts=7927560]="TrueStrictFacts",e[e.TrueFacts=16774920]="TrueFacts",e[e.SymbolStrictFacts=7925520]="SymbolStrictFacts",e[e.SymbolFacts=16772880]="SymbolFacts",e[e.ObjectStrictFacts=7888800]="ObjectStrictFacts",e[e.ObjectFacts=16736160]="ObjectFacts",e[e.FunctionStrictFacts=7880640]="FunctionStrictFacts",e[e.FunctionFacts=16728e3]="FunctionFacts",e[e.VoidFacts=9830144]="VoidFacts",e[e.UndefinedFacts=26607360]="UndefinedFacts",e[e.NullFacts=42917664]="NullFacts",e[e.EmptyObjectStrictFacts=83427327]="EmptyObjectStrictFacts",e[e.EmptyObjectFacts=83886079]="EmptyObjectFacts",e[e.UnknownFacts=83886079]="UnknownFacts",e[e.AllTypeofNE=556800]="AllTypeofNE",e[e.OrFactsMask=8256]="OrFactsMask",e[e.AndFactsMask=134209471]="AndFactsMask",e))(CB||{}),wB=new Map(Object.entries({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384})),DB=(e=>(e[e.Normal=0]="Normal",e[e.Contextual=1]="Contextual",e[e.Inferential=2]="Inferential",e[e.SkipContextSensitive=4]="SkipContextSensitive",e[e.SkipGenericFunctions=8]="SkipGenericFunctions",e[e.IsForSignatureHelp=16]="IsForSignatureHelp",e[e.RestBindingElement=32]="RestBindingElement",e[e.TypeOnly=64]="TypeOnly",e))(DB||{}),EB=(e=>(e[e.None=0]="None",e[e.BivariantCallback=1]="BivariantCallback",e[e.StrictCallback=2]="StrictCallback",e[e.IgnoreReturnTypes=4]="IgnoreReturnTypes",e[e.StrictArity=8]="StrictArity",e[e.StrictTopSignature=16]="StrictTopSignature",e[e.Callback=3]="Callback",e))(EB||{}),PB=un(jB,(function(e){return!hu(e)})),NB=new Map(Object.entries({Uppercase:0,Lowercase:1,Capitalize:2,Uncapitalize:3,NoInfer:4})),FB=class{};function AB(){this.flags=0}function IB(e){return e.id||(e.id=SB,SB++),e.id}function OB(e){return e.id||(e.id=xB,xB++),e.id}function MB(e,t){const n=DR(e);return 1===n||t&&2===n}function LB(e){var t,n,r,i,o=[],a=e=>{o.push(e)},s=Hx.getSymbolConstructor(),c=Hx.getTypeConstructor(),l=Hx.getSignatureConstructor(),_=0,d=0,m=0,h=0,y=0,v=0,b=!1,w=ed(),P=[1],A=e.getCompilerOptions(),M=wS(A),B=DS(A),J=!!A.experimentalDecorators,z=zS(A),$=GS(A),V=AS(A),U=WS(A,"strictNullChecks"),H=WS(A,"strictFunctionTypes"),G=WS(A,"strictBindCallApply"),X=WS(A,"strictPropertyInitialization"),Y=WS(A,"noImplicitAny"),ee=WS(A,"noImplicitThis"),re=WS(A,"useUnknownInCatchVariables"),ie=A.exactOptionalPropertyTypes,oe=function(){const e=KA((function(e,t,r){return t?(t.stackIndex++,t.skip=!1,n(t,void 0),i(t,void 0)):t={checkMode:r,skip:!1,stackIndex:0,typeStack:[void 0,void 0]},Mm(e)&&Qm(e)?(t.skip=!0,i(t,KM(e.right,r)),t):(function(e){const{left:t,operatorToken:n,right:r}=e;61===n.kind&&(!uP(t)||57!==t.operatorToken.kind&&56!==t.operatorToken.kind||pJ(t,va._0_and_1_operations_cannot_be_mixed_without_parentheses,Ra(t.operatorToken.kind),Ra(n.kind)),!uP(r)||57!==r.operatorToken.kind&&56!==r.operatorToken.kind||pJ(r,va._0_and_1_operations_cannot_be_mixed_without_parentheses,Ra(r.operatorToken.kind),Ra(n.kind)))}(e),64!==e.operatorToken.kind||210!==e.left.kind&&209!==e.left.kind||(t.skip=!0,i(t,vM(e.left,KM(e.right,r),r,110===e.right.kind))),t)}),(function(e,n,r){if(!n.skip)return t(n,e)}),(function(e,t,o){if(!t.skip){const a=r(t);xn.assertIsDefined(a),n(t,a),i(t,void 0);const s=e.kind;if(ub(s)){let e=o.parent;for(;217===e.kind||_b(e);)e=e.parent;(56===s||FP(e))&&lj(o.left,a,FP(e)?e.thenStatement:void 0),uj(a,o.left)}}}),(function(e,n,r){if(!n.skip)return t(n,e)}),(function(e,t){let o;if(t.skip)o=r(t);else{const n=function(e){return e.typeStack[e.stackIndex]}(t);xn.assertIsDefined(n);const i=r(t);xn.assertIsDefined(i),o=SM(e.left,e.operatorToken,e.right,n,i,t.checkMode,e)}return t.skip=!1,n(t,void 0),i(t,void 0),t.stackIndex--,o}),(function(e,t,n){return i(e,t),e}));return(t,n)=>{const r=e(t,n);return xn.assertIsDefined(r),r};function t(e,t){if(uP(t))return t;i(e,KM(t,e.checkMode))}function n(e,t){e.typeStack[e.stackIndex]=t}function r(e){return e.typeStack[e.stackIndex+1]}function i(e,t){e.typeStack[e.stackIndex+1]=t}}(),ae={getReferencedExportContainer:function(e,t){var n;const r=hc(e,qD);if(r){let e=pB(r,function(e){return d_(e.parent)&&e===e.parent.name}(r));if(e){if(1048576&e.flags){const n=ts(e.exportSymbol);if(!t&&944&n.flags&&!(3&n.flags))return;e=n}const i=is(e);if(i){if(512&i.flags&&307===(null==(n=i.valueDeclaration)?void 0:n.kind)){const e=i.valueDeclaration;return e!==Sd(r)?void 0:e}return mc(r.parent,(e=>d_(e)&&ns(e)===i))}}}},getReferencedImportDeclaration:function(e){const t=Jw(e);if(t)return t;const n=hc(e,qD);if(n){const e=function(e){const t=Wo(e).resolvedSymbol;return t&&t!==ht?t:je(e,e.escapedText,3257279,void 0,!0,void 0)}(n);if(wa(e,111551)&&!Aa(e,111551))return sa(e)}},getReferencedDeclarationWithCollidingName:function(e){if(!Xl(e)){const t=hc(e,qD);if(t){const e=pB(t);if(e&&HR(e))return e.valueDeclaration}}},isDeclarationWithCollidingName:function(e){const t=hc(e,h_);if(t){const e=ns(t);if(e)return HR(e)}return!1},isValueAliasDeclaration:e=>{const t=hc(e);return!t||!Ie||XR(t)},hasGlobalName:function(e){return de.has(yc(e))},isReferencedAliasDeclaration:(e,t)=>{const n=hc(e);return!n||!Ie||ZR(n,t)},hasNodeCheckFlag:(e,t)=>{const n=hc(e);return!!n&&oB(n,t)},isTopLevelValueImportEqualsWithEntityName:function(e){const t=hc(e,rN);return!(void 0===t||307!==t.parent.kind||!Fm(t))&&(QR(ns(t))&&t.moduleReference&&!Nd(t.moduleReference))},isDeclarationVisible:sc,isImplementationOfOverload:tB,requiresAddingImplicitUndefined:nB,isExpandoFunctionDeclaration:rB,getPropertiesOfContainerFunction:function(e){const t=hc(e,HP);if(!t)return u;const n=ns(t);return n&&Rd($l(n))||u},createTypeOfDeclaration:function(e,t,n,r){const i=hc(e,Of);if(!i)return YC.createToken(133);const o=ns(i),a=!o||133120&o.flags?Dt:dT($l(o));return se.serializeTypeForDeclaration(i,a,o,t,1024|n,r)},createReturnTypeOfSignatureDeclaration:function(e,t,n,r){const i=hc(e,cu);return i?se.serializeReturnTypeForSignature(Cf(i),t,1024|n,r):YC.createToken(133)},createTypeOfExpression:function(e,t,n,r){const i=hc(e,Xu);if(!i)return YC.createToken(133);const o=RC(qR(i));return se.expressionOrTypeToTypeNode(i,o,void 0,t,1024|n,r)},createLiteralConstValue:function(e,t){return function(e,t,n){const r=1056&e.flags?se.symbolToExpression(e.symbol,111551,t,void 0,n):e===Kt?YC.createTrue():e===qt&&YC.createFalse();if(r)return r;const i=e.value;return"object"==typeof i?YC.createBigIntLiteral(i):"string"==typeof i?YC.createStringLiteral(i):i<0?YC.createPrefixUnaryExpression(41,YC.createNumericLiteral(-i)):YC.createNumericLiteral(i)}($l(ns(e)),e,t)},isSymbolAccessible:Is,isEntityNameVisible:Vs,getConstantValue:e=>{const t=hc(e,sB);return t?cB(t):void 0},getEnumMemberValue:e=>{const t=hc(e,$N);return t?aB(t):void 0},collectLinkedAliases:lc,markLinkedReferences:e=>{const t=hc(e);return t&&eP(t,0)},getReferencedValueDeclaration:function(e){if(!Xl(e)){const t=hc(e,qD);if(t){const e=pB(t);if(e)return _s(e).valueDeclaration}}},getReferencedValueDeclarations:function(e){if(!Xl(e)){const t=hc(e,qD);if(t){const e=pB(t);if(e)return F(_s(e).declarations,(e=>{switch(e.kind){case 260:case 169:case 208:case 172:case 303:case 304:case 306:case 210:case 262:case 218:case 219:case 263:case 231:case 266:case 174:case 177:case 178:case 267:return!0}return!1}))}}},getTypeReferenceSerializationKind:function(e,t){var n;const r=hc(e,ou);if(!r)return 0;if(t&&!(t=hc(t)))return 0;let i=!1;if(iE(r)){const e=Ma(bb(r),111551,!0,!0,t);i=!!(null==(n=null==e?void 0:e.declarations)?void 0:n.every(Wl))}const o=Ma(r,111551,!0,!0,t),a=o&&2097152&o.flags?Ea(o):o;i||(i=!(!o||!Aa(o,111551)));const s=Ma(r,788968,!0,!0,t),c=s&&2097152&s.flags?Ea(s):s;if(o||i||(i=!(!s||!Aa(s,788968))),a&&a===c){const e=py(!1);if(e&&a===e)return 9;const t=$l(a);if(t&&su(t))return i?10:1}if(!c)return i?11:0;const l=ju(c);return Nc(l)?i?11:0:3&l.flags?11:dM(l,245760)?2:dM(l,528)?6:dM(l,296)?3:dM(l,2112)?4:dM(l,402653316)?5:PT(l)?7:dM(l,12288)?8:lB(l)?10:qk(l)?7:11},isOptionalParameter:xf,isArgumentsLocalBinding:function(e){if(Xl(e))return!1;const t=hc(e,qD);if(!t)return!1;const n=t.parent;return!!n&&(!((GE(n)||BN(n))&&n.name===t)&&pB(t)===Ee)},getExternalModuleFileFromDeclaration:e=>{const t=hc(e,Dp);return t&&yB(t)},isLiteralConstDeclaration:function(e){return!!(nf(e)||KP(e)&&SJ(e))&&cx($l(ns(e)))},isLateBound:e=>{const t=hc(e,h_),n=t&&ns(t);return!!(n&&4096&px(n))},getJsxFactoryEntity:fB,getJsxFragmentFactoryEntity:mB,isBindingCapturedByNode:(e,t)=>{const n=hc(e),r=hc(t);return!!n&&!!r&&(KP(r)||KE(r))&&function(e,t){const n=Wo(e);return!!n&&D(n.capturedBlockScopeBindings,ns(t))}(n,r)},getDeclarationStatementsForSourceFile:(e,t,n)=>{const r=hc(e);xn.assert(r&&307===r.kind,"Non-sourcefile node passed into getDeclarationsForSourceFile");const i=ns(e);return i?($a(i),i.exports?se.symbolTableToDeclarationStatements(i.exports,e,t,n):[]):e.locals?se.symbolTableToDeclarationStatements(e.locals,e,t,n):[]},isImportRequiredByAugmentation:function(e){const t=Sd(e);if(!t.symbol)return!1;const n=yB(e);if(!n)return!1;if(n===t)return!1;const r=Qa(t.symbol);for(const e of $e(r.values()))if(e.mergeId){const t=ts(e);if(t.declarations)for(const e of t.declarations)if(Sd(e)===n)return!0}return!1}},se=function(){return{typeToTypeNode:(e,t,n,r)=>c(t,n,r,(t=>_(e,t))),typePredicateToTypePredicateNode:(e,t,n,r)=>c(t,n,r,(t=>P(e,t))),expressionOrTypeToTypeNode:(e,t,n,r,i,a)=>c(r,i,a,(r=>o(r,e,t,n))),serializeTypeForDeclaration:(e,t,n,r,i,o)=>c(r,i,o,(r=>de(r,e,t,n))),serializeReturnTypeForSignature:(e,t,n,r)=>c(t,n,r,(t=>pe(t,e))),indexInfoToIndexSignatureDeclaration:(e,t,n,r)=>c(t,n,r,(t=>b(e,t,void 0))),signatureToSignatureDeclaration:(e,t,n,r,i)=>c(n,r,i,(n=>k(e,t,n))),symbolToEntityName:(e,t,n,r,i)=>c(n,r,i,(n=>ne(e,n,t,!1))),symbolToExpression:(e,t,n,r,i)=>c(n,r,i,(n=>re(e,n,t))),symbolToTypeParameterDeclarations:(e,t,n,r)=>c(t,n,r,(t=>U(e,t))),symbolToParameterDeclaration:(e,t,n,r)=>c(t,n,r,(t=>j(e,t))),typeParameterToDeclaration:(e,t,n,r)=>c(t,n,r,(t=>E(e,t))),symbolTableToDeclarationStatements:(e,t,i,o)=>c(t,i,o,(t=>function(e,t){var i;const o=oe(YC.createPropertyDeclaration,174,!0),a=oe(((e,t,n,r)=>YC.createPropertySignature(e,t,n,r)),173,!1),c=t.enclosingDeclaration;let l=[];const d=new Set,m=[],h=t;t={...h,usedSymbolNames:new Set(h.usedSymbolNames),remappedSymbolNames:new Map,remappedSymbolReferences:new Map(null==(i=h.remappedSymbolReferences)?void 0:i.entries()),tracker:void 0};const y={...h.tracker.inner,trackSymbol:(e,n,r)=>{var i,o;if(null==(i=t.remappedSymbolNames)?void 0:i.has(OB(e)))return!1;if(0===Is(e,n,r,!1).accessibility){const n=$(e,t,r);if(!(4&e.flags)){const e=n[0],t=Sd(h.enclosingDeclaration);Q(e.declarations,(e=>Sd(e)===t))&&J(e)}}else if(null==(o=h.tracker.inner)?void 0:o.trackSymbol)return h.tracker.inner.trackSymbol(e,n,r);return!1}};t.tracker=new $B(t,y,h.tracker.moduleResolverHost),ld(e,((e,t)=>{he(e,vc(t))}));let v=!t.bundled;const C=e.get("export=");return C&&e.size>1&&2098688&C.flags&&(e=ed()).set("export=",C),A(e),w=function(e){const t=T(e,(e=>gN(e)&&!e.moduleSpecifier&&!e.attributes&&!!e.exportClause&&hN(e.exportClause)));if(t>=0){const n=e[t],r=q(n.exportClause.elements,(t=>{if(!t.propertyName){const n=F(te(e),(n=>Cc(e[n],t.name)));if(p(n)&&x(n,(t=>ZT(e[t])))){for(const t of n)e[t]=P(e[t]);return}}return t}));p(r)?e[t]=YC.updateExportDeclaration(n,n.modifiers,n.isTypeOnly,YC.updateNamedExports(n.exportClause,r),n.moduleSpecifier,n.attributes):Yt(e,t)}return e}(w=function(e){const t=F(e,(e=>gN(e)&&!e.moduleSpecifier&&!!e.exportClause&&hN(e.exportClause)));p(t)>1&&(e=[...F(e,(e=>!gN(e)||!!e.moduleSpecifier||!e.exportClause)),YC.createExportDeclaration(void 0,!1,YC.createNamedExports(R(t,(e=>ut(e.exportClause,hN).elements))),void 0)]);const n=F(e,(e=>gN(e)&&!!e.moduleSpecifier&&!!e.exportClause&&hN(e.exportClause)));if(p(n)>1){const t=He(n,(e=>wD(e.moduleSpecifier)?">"+e.moduleSpecifier.text:">"));if(t.length!==n.length)for(const n of t)n.length>1&&(e=[...F(e,(e=>!n.includes(e))),YC.createExportDeclaration(void 0,!1,YC.createNamedExports(R(n,(e=>ut(e.exportClause,hN).elements))),n[0].moduleSpecifier)])}return e}(w=function(e){const t=S(e,mN),n=T(e,ZP);let r=-1!==n?e[n]:void 0;if(r&&t&&t.isExportEquals&&qD(t.expression)&&qD(r.name)&&bc(r.name)===bc(t.expression)&&r.body&&eN(r.body)){const i=F(e,(e=>!!(32&Qv(e)))),o=r.name;let a=r.body;if(p(i)&&(r=YC.updateModuleDeclaration(r,r.modifiers,r.name,a=YC.updateModuleBlock(a,YC.createNodeArray([...r.body.statements,YC.createExportDeclaration(void 0,!1,YC.createNamedExports(O(R(i,(e=>{return EP(t=e)?F(O(t.declarationList.declarations,Pc),D):F([Pc(t)],D);var t})),(e=>YC.createExportSpecifier(!1,void 0,e)))),void 0)]))),e=[...e.slice(0,n),r,...e.slice(n+1)]),!S(e,(e=>e!==r&&Cc(e,o)))){l=[];const n=!Q(a.statements,(e=>Bv(e,32)||mN(e)||gN(e)));f(a.statements,(e=>{z(e,n?32:0)})),e=[...F(e,(e=>e!==r&&e!==t)),...l]}}return e}(w=l))),c&&(qN(c)&&Zp(c)||ZP(c))&&(!Q(w,r_)||!t_(w)&&Q(w,n_))&&w.push(VF(YC)),w;var w;function D(e){return!!e&&80===e.kind}function P(e){const t=-129&(32|Qv(e));return YC.replaceModifiers(e,t)}function N(e){const t=-33&Qv(e);return YC.replaceModifiers(e,t)}function A(e,t,n){t||m.push(new Map),e.forEach((e=>{L(e,!1,!!n)})),t||(m[m.length-1].forEach((e=>{L(e,!0,!!n)})),m.pop())}function L(e,n,r){Rd($l(e));const i=ts(e);if(!d.has(OB(i))&&(d.add(OB(i)),!n||p(e.declarations)&&Q(e.declarations,(e=>!!mc(e,(e=>e===c)))))){const i=se(t);j(e,n,r),i()}}function j(e,i,c,l=e.escapedName){var d,m,g,h,y,v;const b=vc(l),k="default"===l;if(i&&!(131072&t.flags)&&Mh(b)&&!k)return void(t.encounteredError=!0);let T=k&&!!(-113&e.flags||16&e.flags&&p(Rd($l(e))))&&!(2097152&e.flags),C=!T&&!i&&Mh(b)&&!k;(T||C)&&(i=!0);const w=(i?0:32)|(k&&!T?2048:0),D=1536&e.flags&&7&e.flags&&"export="!==l,P=D&&ie($l(e),e);if((8208&e.flags||P)&&K($l(e),e,he(e,b),w),524288&e.flags&&function(e,n,r){var i;const o=Fu(e),a=O(Uo(e).typeParameters,(e=>E(e,t))),c=null==(i=e.declarations)?void 0:i.find(Fg),l=fl(c?c.comment||c.parent.comment:void 0),u=t.flags;t.flags|=8388608;const d=t.enclosingDeclaration;t.enclosingDeclaration=c;const p=c&&c.typeExpression&&UN(c.typeExpression)&&s(t,c.typeExpression.type,o,void 0)||_(o,t);z(hw(YC.createTypeAliasDeclaration(void 0,he(e,n),a,p),l?[{kind:3,text:"*\n * "+l.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}]:[]),r),t.flags=u,t.enclosingDeclaration=d}(e,b,w),98311&e.flags&&"export="!==l&&!(4194304&e.flags)&&!(32&e.flags)&&!(8192&e.flags)&&!P)if(c)ee(e)&&(C=!1,T=!1);else{const n=$l(e),o=he(e,b);if(n.symbol&&n.symbol!==e&&16&n.symbol.flags&&Q(n.symbol.declarations,UT)&&((null==(d=n.symbol.members)?void 0:d.size)||(null==(m=n.symbol.exports)?void 0:m.size)))t.remappedSymbolReferences||(t.remappedSymbolReferences=new Map),t.remappedSymbolReferences.set(OB(n.symbol),e),j(n.symbol,i,c,l),t.remappedSymbolReferences.delete(OB(n.symbol));else if(16&e.flags||!ie(n,e)){const a=2&e.flags?wE(e)?2:1:(null==(g=e.parent)?void 0:g.valueDeclaration)&&qN(null==(h=e.parent)?void 0:h.valueDeclaration)?2:void 0,s=!T&&4&e.flags?me(o,e):o;let c=e.declarations&&S(e.declarations,(e=>KP(e)));c&&WP(c.parent)&&1===c.parent.declarations.length&&(c=c.parent.parent);const l=null==(y=e.declarations)?void 0:y.find(GE);if(l&&uP(l.parent)&&qD(l.parent.right)&&(null==(v=n.symbol)?void 0:v.valueDeclaration)&&qN(n.symbol.valueDeclaration)){const e=o===l.parent.right.escapedText?void 0:l.parent.right;z(YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,e,o)])),0),t.tracker.trackSymbol(n.symbol,t.enclosingDeclaration,111551)}else z(r(t,YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(s,void 0,de(t,void 0,n,e))],a)),c),s!==o?-33&w:w),s===o||i||(z(YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,s,o)])),0),C=!1,T=!1)}else K(n,e,o,w)}if(384&e.flags&&function(e,t,n){z(YC.createEnumDeclaration(YC.createModifiersFromModifierFlags(mM(e)?4096:0),he(e,t),O(F(Rd($l(e)),(e=>!!(8&e.flags))),(e=>{const t=e.declarations&&e.declarations[0]&&$N(e.declarations[0])?cB(e.declarations[0]):void 0;return YC.createEnumMember(vc(e.escapedName),void 0===t?void 0:"string"==typeof t?YC.createStringLiteral(t):YC.createNumericLiteral(t))}))),n)}(e,b,w),32&e.flags&&(4&e.flags&&e.valueDeclaration&&uP(e.valueDeclaration.parent)&&mP(e.valueDeclaration.parent.right)?Y(e,he(e,b),w):function(e,i,a){var c,l;const d=null==(c=e.declarations)?void 0:c.find(gu),m=t.enclosingDeclaration;t.enclosingDeclaration=d||m;const g=O(nu(e),(e=>E(e,t))),h=y_(Nu(e)),y=ku(h),v=d&&Th(d),b=v&&function(e){const r=q(e,(e=>{const r=t.enclosingDeclaration;t.enclosingDeclaration=e;let i=e.expression;if(vb(i)){if(qD(i)&&""===bc(i))return o(void 0);let e;if(({introducesError:e,node:i}=fe(i,t)),e)return o(void 0)}return o(YC.createExpressionWithTypeArguments(i,O(e.typeArguments,(e=>s(t,e,n(t,e))||_(n(t,e),t)))));function o(e){return t.enclosingDeclaration=r,e}}));if(r.length===e.length)return r}(v)||q(function(e){let t=u;if(e.symbol.declarations)for(const n of e.symbol.declarations){const e=Th(n);if(e)for(const n of e){const e=Sx(n);Nc(e)||(t===u?t=[e]:t.push(e))}}return t}(h),pe),x=$l(e),S=!!(null==(l=x.symbol)?void 0:l.valueDeclaration)&&gu(x.symbol.valueDeclaration),k=S?xu(x):St,T=[...p(y)?[YC.createHeritageClause(96,O(y,(e=>function(e,n,r){const i=_e(e,111551);if(i)return i;const o=me(`${r}_base`);return z(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(o,void 0,_(n,t))],2)),0),YC.createExpressionWithTypeArguments(YC.createIdentifier(o),void 0)}(e,k,i))))]:[],...p(b)?[YC.createHeritageClause(119,b)]:[]],C=function(e,t,n){if(!p(t))return n;const r=new Map;f(n,(e=>{r.set(e.escapedName,e)}));for(const n of t){const t=Rd(y_(n,e.thisType));for(const e of t){const t=r.get(e.escapedName);t&&e.parent===t.parent&&r.delete(e.escapedName)}}return $e(r.values())}(h,y,Rd(h)),w=F(C,(e=>{const t=e.valueDeclaration;return!(!t||Dc(t)&&VD(t.name))})),D=Q(C,(e=>{const t=e.valueDeclaration;return!!t&&Dc(t)&&VD(t.name)}))?[YC.createPropertyDeclaration(void 0,YC.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:u,P=R(w,(e=>o(e,!1,y[0]))),N=R(F(Rd(x),(e=>!(4194304&e.flags||"prototype"===e.escapedName||X(e)))),(e=>o(e,!0,k))),A=!S&&e.valueDeclaration&&Mm(e.valueDeclaration)&&!Q(Vp(x,1))?[YC.createConstructorDeclaration(YC.createModifiersFromModifierFlags(2),[],void 0)]:ce(1,x,k,176),I=ue(h,y[0]);t.enclosingDeclaration=m,z(r(t,YC.createClassDeclaration(void 0,i,g,T,[...I,...N,...A,...P,...D]),e.declarations&&F(e.declarations,(e=>GP(e)||mP(e)))[0]),a)}(e,he(e,b),w)),(1536&e.flags&&(!D||function(e){return x(U(e),(e=>!(111551&Pa(Da(e)))))}(e))||P)&&function(e,n,r){const i=We(U(e),(t=>t.parent&&t.parent===e?"real":"merged")),o=i.get("real")||u,a=i.get("merged")||u;p(o)&&G(o,he(e,n),r,!!(67108880&e.flags));if(p(a)){const r=Sd(t.enclosingDeclaration),i=he(e,n),o=YC.createModuleBlock([YC.createExportDeclaration(void 0,!1,YC.createNamedExports(q(F(a,(e=>"export="!==e.escapedName)),(n=>{var i,o;const a=vc(n.escapedName),s=he(n,a),c=n.declarations&&sa(n);if(r&&(c?r!==Sd(c):!Q(n.declarations,(e=>Sd(e)===r))))return void(null==(o=null==(i=t.tracker)?void 0:i.reportNonlocalAugmentation)||o.call(i,r,e,n));const l=c&&Ca(c,!0);J(l||n);const u=l?he(l,vc(l.escapedName)):s;return YC.createExportSpecifier(!1,a===u?void 0:u,a)}))))]);z(YC.createModuleDeclaration(void 0,YC.createIdentifier(i),o,32),0)}}(e,b,w),64&e.flags&&!(32&e.flags)&&function(e,n,r){const i=Nu(e),o=O(nu(e),(e=>E(e,t))),s=ku(i),c=p(s)?cv(s):void 0,l=R(Rd(i),(e=>function(e,t){return a(e,!1,t)}(e,c))),u=ce(0,i,c,179),_=ce(1,i,c,180),d=ue(i,c),f=p(s)?[YC.createHeritageClause(96,q(s,(e=>_e(e,111551))))]:void 0;z(YC.createInterfaceDeclaration(void 0,he(e,n),o,f,[...d,..._,...u,...l]),r)}(e,b,w),2097152&e.flags&&Y(e,he(e,b),w),4&e.flags&&"export="===e.escapedName&&ee(e),8388608&e.flags&&e.declarations)for(const n of e.declarations){const e=ja(n,n.moduleSpecifier);e&&z(YC.createExportDeclaration(void 0,n.isTypeOnly,void 0,YC.createStringLiteral(H(e,t))),0)}T?z(YC.createExportAssignment(void 0,!1,YC.createIdentifier(he(e,b))),0):C&&z(YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,he(e,b),b)])),0)}function J(e){if(Q(e.declarations,ay))return;xn.assertIsDefined(m[m.length-1]),me(vc(e.escapedName),e);const t=!!(2097152&e.flags)&&!Q(e.declarations,(e=>!!mc(e,gN)||dN(e)||rN(e)&&!SN(e.moduleReference)));m[t?0:m.length-1].set(OB(e),e)}function z(e,n){if(cI(e)){let r=0;const i=t.enclosingDeclaration&&(Fg(t.enclosingDeclaration)?Sd(t.enclosingDeclaration):t.enclosingDeclaration);32&n&&i&&(function(e){return qN(e)&&(Zp(e)||ef(e))||sp(e)&&!pp(e)}(i)||ZP(i))&&ZT(e)&&(r|=32),!v||32&r||i&&33554432&i.flags||!(YP(e)||EP(e)||HP(e)||GP(e)||ZP(e))||(r|=128),2048&n&&(GP(e)||XP(e)||HP(e))&&(r|=2048),r&&(e=YC.replaceModifiers(e,r|Qv(e)))}l.push(e)}function U(e){let t=$e(Ga(e).values());const n=ts(e);if(n!==e){const e=new Set(t);for(const t of Ga(n).values())111551&Pa(Da(t))||e.add(t);t=$e(e)}return F(t,(e=>X(e)&&Ts(e.escapedName,99)))}function K(e,n,i,o){const a=Vp(e,0);for(const e of a){const n=k(e,262,t,{name:YC.createIdentifier(i)});z(r(t,n,W(e)),o)}1536&n.flags&&n.exports&&n.exports.size||G(F(Rd(e),X),i,o,!0)}function W(e){if(e.declaration&&e.declaration.parent){if(uP(e.declaration.parent)&&5===ag(e.declaration.parent))return e.declaration.parent;if(KP(e.declaration.parent)&&e.declaration.parent.parent)return e.declaration.parent.parent}return e.declaration}function G(e,n,r,i){if(p(e)){const o=We(e,(e=>!p(e.declarations)||Q(e.declarations,(e=>Sd(e)===Sd(t.enclosingDeclaration)))?"local":"remote")).get("local")||u;let a=_I.createModuleDeclaration(void 0,YC.createIdentifier(n),YC.createModuleBlock([]),32);OT(a,c),a.locals=ed(e),a.symbol=e[0].parent;const s=l;l=[];const _=v;v=!1;const d={...t,enclosingDeclaration:a},f=t;t=d,A(ed(o),i,!0),t=f,v=_;const m=l;l=s;const g=O(m,(e=>mN(e)&&!e.isExportEquals&&qD(e.expression)?YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,e.expression,YC.createIdentifier("default"))])):e)),h=x(g,(e=>Bv(e,32)))?O(g,N):g;a=YC.updateModuleDeclaration(a,a.modifiers,a.name,YC.createModuleBlock(h)),z(a,r)}}function X(e){return!!(2887656&e.flags)||!(4194304&e.flags||"prototype"===e.escapedName||e.valueDeclaration&&Jv(e.valueDeclaration)&&gu(e.valueDeclaration.parent))}function Y(e,n,r){var i,o,a,s,c,l;const u=sa(e);if(!u)return xn.fail();const _=ts(Ca(u,!0));if(!_)return;let d=_p(_)&&g(e.declarations,(e=>{if(fN(e)||yN(e))return bc(e.propertyName||e.name);if(uP(e)||mN(e)){const t=mN(e)?e.expression:e.right;if(GE(t))return bc(t.name)}if(la(e)){const t=Pc(e);if(t&&qD(t))return bc(t)}}))||vc(_.escapedName);"export="===d&&V&&(d="default");const p=he(_,d);switch(J(_),u.kind){case 208:if(260===(null==(o=null==(i=u.parent)?void 0:i.parent)?void 0:o.kind)){const e=H(_.parent||_,t),{propertyName:r}=u;z(YC.createImportDeclaration(void 0,YC.createImportClause(!1,void 0,YC.createNamedImports([YC.createImportSpecifier(!1,r&&qD(r)?YC.createIdentifier(bc(r)):void 0,YC.createIdentifier(n))])),YC.createStringLiteral(e),void 0),0);break}xn.failBadSyntaxKind((null==(a=u.parent)?void 0:a.parent)||u,"Unhandled binding element grandparent kind in declaration serialization");break;case 304:226===(null==(c=null==(s=u.parent)?void 0:s.parent)?void 0:c.kind)&&Z(vc(e.escapedName),p);break;case 260:if(GE(u.initializer)){const e=u.initializer,i=YC.createUniqueName(n),o=H(_.parent||_,t);z(YC.createImportEqualsDeclaration(void 0,!1,i,YC.createExternalModuleReference(YC.createStringLiteral(o))),0),z(YC.createImportEqualsDeclaration(void 0,!1,YC.createIdentifier(n),YC.createQualifiedName(i,e.name)),r);break}case 271:if("export="===_.escapedName&&Q(_.declarations,(e=>qN(e)&&ef(e)))){ee(e);break}const f=!(512&_.flags||KP(u));z(YC.createImportEqualsDeclaration(void 0,!1,YC.createIdentifier(n),f?ne(_,t,-1,!1):YC.createExternalModuleReference(YC.createStringLiteral(H(_,t)))),f?r:0);break;case 270:z(YC.createNamespaceExportDeclaration(bc(u.name)),0);break;case 273:{const e=H(_.parent||_,t),r=t.bundled?YC.createStringLiteral(e):u.parent.moduleSpecifier,i=iN(u.parent)?u.parent.attributes:void 0,o=AF(u.parent);z(YC.createImportDeclaration(void 0,YC.createImportClause(o,YC.createIdentifier(n),void 0),r,i),0);break}case 274:{const e=H(_.parent||_,t),r=t.bundled?YC.createStringLiteral(e):u.parent.parent.moduleSpecifier,i=AF(u.parent.parent);z(YC.createImportDeclaration(void 0,YC.createImportClause(i,void 0,YC.createNamespaceImport(YC.createIdentifier(n))),r,u.parent.attributes),0);break}case 280:z(YC.createExportDeclaration(void 0,!1,YC.createNamespaceExport(YC.createIdentifier(n)),YC.createStringLiteral(H(_,t))),0);break;case 276:{const e=H(_.parent||_,t),r=t.bundled?YC.createStringLiteral(e):u.parent.parent.parent.moduleSpecifier,i=AF(u.parent.parent.parent);z(YC.createImportDeclaration(void 0,YC.createImportClause(i,void 0,YC.createNamedImports([YC.createImportSpecifier(!1,n!==d?YC.createIdentifier(d):void 0,YC.createIdentifier(n))])),r,u.parent.parent.parent.attributes),0);break}case 281:const m=u.parent.parent.moduleSpecifier;m&&"default"===(null==(l=u.propertyName)?void 0:l.escapedText)&&(d="default"),Z(vc(e.escapedName),m?d:p,m&&$_(m)?YC.createStringLiteral(m.text):void 0);break;case 277:ee(e);break;case 226:case 211:case 212:"default"===e.escapedName||"export="===e.escapedName?ee(e):Z(n,p);break;default:return xn.failBadSyntaxKind(u,"Unhandled alias declaration kind in symbol serializer!")}}function Z(e,t,n){z(YC.createExportDeclaration(void 0,!1,YC.createNamedExports([YC.createExportSpecifier(!1,e!==t?t:void 0,e)]),n),0)}function ee(e){var n;if(4194304&e.flags)return!1;const r=vc(e.escapedName),i="export="===r,o=i||"default"===r,a=e.declarations&&sa(e),s=a&&Ca(a,!0);if(s&&p(s.declarations)&&Q(s.declarations,(e=>Sd(e)===Sd(c)))){const n=a&&(mN(a)||uP(a)?bh(a):xh(a)),u=n&&vb(n)?function(e){switch(e.kind){case 80:return e;case 166:do{e=e.left}while(80!==e.kind);return e;case 211:do{if(og(e.expression)&&!VD(e.name))return e.name;e=e.expression}while(80!==e.kind);return e}}(n):void 0,_=u&&Ma(u,-1,!0,!0,c);(_||s)&&J(_||s);const d=t.tracker.disableTrackSymbol;if(t.tracker.disableTrackSymbol=!0,o)l.push(YC.createExportAssignment(void 0,i,re(s,t,-1)));else if(u===n&&u)Z(r,bc(u));else if(n&&mP(n))Z(r,he(s,Sc(s)));else{const n=me(r,e);z(YC.createImportEqualsDeclaration(void 0,!1,YC.createIdentifier(n),ne(s,t,-1,!1)),0),Z(r,n)}return t.tracker.disableTrackSymbol=d,!0}{const a=me(r,e),c=RC($l(ts(e)));if(ie(c,e))K(c,e,a,o?0:32);else{const i=267!==(null==(n=t.enclosingDeclaration)?void 0:n.kind)||98304&e.flags&&!(65536&e.flags)?2:1;z(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(a,void 0,de(t,void 0,c,e))],i)),s&&4&s.flags&&"export="===s.escapedName?128:r===a?32:0)}return o?(l.push(YC.createExportAssignment(void 0,i,YC.createIdentifier(a))),!0):r!==a&&(Z(r,a),!0)}}function ie(e,n){var r;const i=Sd(t.enclosingDeclaration);return 48&wx(e)&&!Q(null==(r=e.symbol)?void 0:r.declarations,wu)&&!p(cf(e))&&!Ys(e)&&!(!p(F(Rd(e),X))&&!p(Vp(e,0)))&&!p(Vp(e,1))&&!le(n,c)&&!(e.symbol&&Q(e.symbol.declarations,(e=>Sd(e)!==i)))&&!Q(Rd(e),(e=>s_(e.escapedName)))&&!Q(Rd(e),(e=>Q(e.declarations,(e=>Sd(e)!==i))))&&x(Rd(e),(e=>!(!Ts(Sc(e),M)||98304&e.flags&&ql(e)!==zl(e))))}function oe(e,n,i){return function(o,a,s){var c,l,u,_,d;const p=fx(o),m=!!(2&p);if(a&&2887656&o.flags)return[];if(4194304&o.flags||"constructor"===o.escapedName||s&&Jp(s,o.escapedName)&&oM(Jp(s,o.escapedName))===oM(o)&&(16777216&o.flags)==(16777216&Jp(s,o.escapedName).flags)&&gS($l(o),Tc(s,o.escapedName)))return[];const g=-1025&p|(a?256:0),h=ae(o,t),y=null==(c=o.declarations)?void 0:c.find(_n(uE,hu,KP,lE,uP,GE));if(98304&o.flags&&i){const e=[];if(65536&o.flags){const n=o.declarations&&f(o.declarations,(e=>178===e.kind?e:QE(e)&&sg(e)?f(e.arguments[2].properties,(e=>{const t=Pc(e);if(t&&qD(t)&&"set"===bc(t))return e})):void 0));xn.assert(!!n);const i=uu(n)?Cf(n).parameters[0]:void 0;e.push(r(t,YC.createSetAccessorDeclaration(YC.createModifiersFromModifierFlags(g),h,[YC.createParameterDeclaration(void 0,void 0,i?B(i,I(i),t):"value",void 0,m?void 0:de(t,void 0,zl(o),o))],void 0),(null==(l=o.declarations)?void 0:l.find(A_))||y))}if(32768&o.flags){const n=2&p;e.push(r(t,YC.createGetAccessorDeclaration(YC.createModifiersFromModifierFlags(g),h,[],n?void 0:de(t,void 0,$l(o),o),void 0),(null==(u=o.declarations)?void 0:u.find(I_))||y))}return e}if(98311&o.flags)return r(t,e(YC.createModifiersFromModifierFlags((oM(o)?8:0)|g),h,16777216&o.flags?YC.createToken(58):void 0,m?void 0:de(t,void 0,zl(o),o),void 0),(null==(_=o.declarations)?void 0:_.find(_n(uE,KP)))||y);if(8208&o.flags){const i=Vp($l(o),0);if(2&g)return r(t,e(YC.createModifiersFromModifierFlags((oM(o)?8:0)|g),h,16777216&o.flags?YC.createToken(58):void 0,void 0,void 0),(null==(d=o.declarations)?void 0:d.find(uu))||i[0]&&i[0].declaration||o.declarations&&o.declarations[0]);const a=[];for(const e of i){const i=k(e,n,t,{name:h,questionToken:16777216&o.flags?YC.createToken(58):void 0,modifiers:g?YC.createModifiersFromModifierFlags(g):void 0}),s=e.declaration&&yg(e.declaration.parent)?e.declaration.parent:e.declaration;a.push(r(t,i,s))}return a}return xn.fail(`Unhandled class member kind! ${o.__debugFlags||o.flags}`)}}function ce(e,n,i,o){const a=Vp(n,e);if(1===e){if(!i&&x(a,(e=>0===p(e.parameters))))return[];if(i){const e=Vp(i,1);if(!p(e)&&x(a,(e=>0===p(e.parameters))))return[];if(e.length===a.length){let t=!1;for(let n=0;n_(e,t))),i=re(e.target.symbol,t,788968)):e.symbol&&Fs(e.symbol,c,n)&&(i=re(e.symbol,t,788968)),i)return YC.createExpressionWithTypeArguments(i,r)}function pe(e){return _e(e,788968)||(e.symbol?YC.createExpressionWithTypeArguments(re(e.symbol,t,788968),void 0):void 0)}function me(e,n){var r,i;const o=n?OB(n):void 0;if(o&&t.remappedSymbolNames.has(o))return t.remappedSymbolNames.get(o);n&&(e=ge(n,e));let a=0;const s=e;for(;null==(r=t.usedSymbolNames)?void 0:r.has(e);)a++,e=`${s}_${a}`;return null==(i=t.usedSymbolNames)||i.add(e),o&&t.remappedSymbolNames.set(o,e),e}function ge(e,n){if("default"===n||"__class"===n||"__function"===n){const r=t.flags;t.flags|=16777216;const i=oc(e,t);t.flags=r,n=i.length>0&&Km(i.charCodeAt(0))?By(i):i}return"default"===n?n="_default":"export="===n&&(n="_exports"),Ts(n,M)&&!Mh(n)?n:"_"+n.replace(/[^a-zA-Z0-9]/g,"_")}function he(e,n){const r=OB(e);return t.remappedSymbolNames.has(r)?t.remappedSymbolNames.get(r):(n=ge(e,n),t.remappedSymbolNames.set(r,n),n)}}(e,t))),symbolToNode:(e,t,n,r,i)=>c(n,r,i,(n=>function(e,t,n){if(1073741824&t.flags){if(e.valueDeclaration){const t=Pc(e.valueDeclaration);if(t&&oE(t))return t}const r=Uo(e).nameType;if(r&&9216&r.flags)return t.enclosingDeclaration=r.symbol.valueDeclaration,YC.createComputedPropertyName(re(r.symbol,t,n))}return re(e,t,n)}(e,n,t)))};function n(e,t,n){const r=function(e){return Sx(e)}(t);if(!e.mapper)return r;const i=eS(r,e.mapper);return n&&i!==r?void 0:i}function r(e,t,n){return ly(t)&&16&t.flags&&e.enclosingFile&&e.enclosingFile===Sd(fc(t))||(t=YC.cloneNode(t)),t===n?t:n?e.enclosingFile&&e.enclosingFile===Sd(fc(n))?sI(ew(t,n),n):ew(t,n):t}function o(e,t,n,r){const i=e.flags;!t||-2147483648&e.flags||ce.serializeTypeOfExpression(t,e,r),e.flags|=-2147483648;const o=function(e,t,n,r){if(t){const i=Qu(t)?t.type:_A(t)?dA(t):void 0;if(i&&!Dl(i)){const o=a(e,i,n,t.parent,r);if(o)return o}}return r&&(n=XT(n)),_(n,e)}(e,t,n,r);return e.flags=i,o}function a(e,t,r,i,o){const a=r;o&&(r=XT(r));const c=s(e,t,r,i);if(c)return o&&!bD(n(e,t),(e=>!!(32768&e.flags)))?YC.createUnionTypeNode([c,YC.createKeywordTypeNode(157)]):c;if(o&&a!==r){const n=s(e,t,a,i);if(n)return YC.createUnionTypeNode([n,YC.createKeywordTypeNode(157)])}}function s(e,t,r,i=e.enclosingDeclaration,o=n(e,t,!0)){if(o&&function(e,t,n){return n===t||!!(e&&(sE(e)||lE(e)||uE(e))&&e.questionToken)&&Zw(t,524288)===n}(i,r,o)&&_e(t,r)){const n=he(e,t);if(n)return n}}function c(t,n,r,i){const o=(null==r?void 0:r.trackSymbol)?r.moduleResolverHost:134217728&n?function(e){return{getCommonSourceDirectory:e.getCommonSourceDirectory?()=>e.getCommonSourceDirectory():()=>"",getCurrentDirectory:()=>e.getCurrentDirectory(),getSymlinkCache:Ze(e,e.getSymlinkCache),getPackageJsonInfoCache:()=>{var t;return null==(t=e.getPackageJsonInfoCache)?void 0:t.call(e)},useCaseSensitiveFileNames:Ze(e,e.useCaseSensitiveFileNames),redirectTargetsMap:e.redirectTargetsMap,getProjectReferenceRedirect:t=>e.getProjectReferenceRedirect(t),isSourceOfProjectReferenceRedirect:t=>e.isSourceOfProjectReferenceRedirect(t),fileExists:t=>e.fileExists(t),getFileIncludeReasons:()=>e.getFileIncludeReasons(),readFile:e.readFile?t=>e.readFile(t):void 0}}(e):void 0,a={enclosingDeclaration:t,enclosingFile:t&&Sd(t),flags:n||0,tracker:void 0,encounteredError:!1,reportedDiagnostic:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0,trackedSymbols:void 0,bundled:!!A.outFile&&!!t&&Zp(Sd(t)),truncating:!1,usedSymbolNames:void 0,remappedSymbolNames:void 0,remappedSymbolReferences:void 0,reverseMappedStack:void 0,mustCreateTypeParameterSymbolList:!0,typeParameterSymbolList:void 0,mustCreateTypeParametersNamesLookups:!0,typeParameterNames:void 0,typeParameterNamesByText:void 0,typeParameterNamesByTextNextNameCount:void 0,mapper:void 0};a.tracker=new $B(a,r,o);const s=i(a);return a.truncating&&1&a.flags&&a.tracker.reportTruncationError(),a.encounteredError?void 0:s}function l(e){return e.truncating?e.truncating:e.truncating=e.approximateLength>(1&e.flags?Q_:X_)}function _(e,o){const a=o.flags,c=function(e,o){var a,c;t&&t.throwIfCancellationRequested&&t.throwIfCancellationRequested();const m=8388608&o.flags;if(o.flags&=-8388609,!e)return 262144&o.flags?(o.approximateLength+=3,YC.createKeywordTypeNode(133)):void(o.encounteredError=!0);if(536870912&o.flags||(e=Sp(e)),1&e.flags)return e.aliasSymbol?YC.createTypeReferenceNode(G(e.aliasSymbol),v(e.aliasTypeArguments,o)):e===Et?yw(YC.createKeywordTypeNode(133),3,"unresolved"):(o.approximateLength+=3,YC.createKeywordTypeNode(e===Ft?141:133));if(2&e.flags)return YC.createKeywordTypeNode(159);if(4&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(154);if(8&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(150);if(64&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(163);if(16&e.flags&&!e.aliasSymbol)return o.approximateLength+=7,YC.createKeywordTypeNode(136);if(1056&e.flags){if(8&e.symbol.flags){const t=is(e.symbol),n=X(t,o,788968);if(ju(t)===e)return n;const r=Sc(e.symbol);return Ts(r,1)?A(n,YC.createTypeReferenceNode(r,void 0)):zE(n)?(n.isTypeOf=!0,YC.createIndexedAccessTypeNode(n,YC.createLiteralTypeNode(YC.createStringLiteral(r)))):xE(n)?YC.createIndexedAccessTypeNode(YC.createTypeQueryNode(n.typeName),YC.createLiteralTypeNode(YC.createStringLiteral(r))):xn.fail("Unhandled type node kind returned from `symbolToTypeNode`.")}return X(e.symbol,o,788968)}if(128&e.flags)return o.approximateLength+=e.value.length+2,YC.createLiteralTypeNode(iw(YC.createStringLiteral(e.value,!!(268435456&o.flags)),16777216));if(256&e.flags){const t=e.value;return o.approximateLength+=(""+t).length,YC.createLiteralTypeNode(t<0?YC.createPrefixUnaryExpression(41,YC.createNumericLiteral(-t)):YC.createNumericLiteral(t))}if(2048&e.flags)return o.approximateLength+=ST(e.value).length+1,YC.createLiteralTypeNode(YC.createBigIntLiteral(e.value));if(512&e.flags)return o.approximateLength+=e.intrinsicName.length,YC.createLiteralTypeNode("true"===e.intrinsicName?YC.createTrue():YC.createFalse());if(8192&e.flags){if(!(1048576&o.flags)){if(Ns(e.symbol,o.enclosingDeclaration))return o.approximateLength+=6,X(e.symbol,o,111551);o.tracker.reportInaccessibleUniqueSymbolError&&o.tracker.reportInaccessibleUniqueSymbolError()}return o.approximateLength+=13,YC.createTypeOperatorNode(158,YC.createKeywordTypeNode(155))}if(16384&e.flags)return o.approximateLength+=4,YC.createKeywordTypeNode(116);if(32768&e.flags)return o.approximateLength+=9,YC.createKeywordTypeNode(157);if(65536&e.flags)return o.approximateLength+=4,YC.createLiteralTypeNode(YC.createNull());if(131072&e.flags)return o.approximateLength+=5,YC.createKeywordTypeNode(146);if(4096&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(155);if(67108864&e.flags)return o.approximateLength+=6,YC.createKeywordTypeNode(151);if(GT(e))return 4194304&o.flags&&(o.encounteredError||32768&o.flags||(o.encounteredError=!0),null==(c=(a=o.tracker).reportInaccessibleThisError)||c.call(a)),o.approximateLength+=4,YC.createThisTypeNode();if(!m&&e.aliasSymbol&&(16384&o.flags||0===Ms(e.aliasSymbol,o.enclosingDeclaration,788968,!1,!0).accessibility)){const t=v(e.aliasTypeArguments,o);return!vs(e.aliasSymbol.escapedName)||32&e.aliasSymbol.flags?1===p(t)&&e.aliasSymbol===Xn.symbol?YC.createArrayTypeNode(t[0]):X(e.aliasSymbol,o,788968,t):YC.createTypeReferenceNode(YC.createIdentifier(""),t)}const g=wx(e);if(4&g)return xn.assert(!!(524288&e.flags)),e.node?C(e,P):P(e);if(262144&e.flags||3&g){if(262144&e.flags&&D(o.inferTypeParameters,e)){let t;o.approximateLength+=Sc(e.symbol).length+6;const n=Jd(e);if(n){const r=lg(e,!0);r&&gS(n,r)||(o.approximateLength+=9,t=n&&_(n,o))}return YC.createInferTypeNode(w(e,o,t))}if(4&o.flags&&262144&e.flags){const t=ee(e,o);return o.approximateLength+=bc(t).length,YC.createTypeReferenceNode(YC.createIdentifier(bc(t)),void 0)}if(e.symbol)return X(e.symbol,o,788968);const t=(e===Jn||e===zn)&&i&&i.symbol?(e===zn?"sub-":"super-")+Sc(i.symbol):"?";return YC.createTypeReferenceNode(YC.createIdentifier(t),void 0)}if(1048576&e.flags&&e.origin&&(e=e.origin),3145728&e.flags){const t=1048576&e.flags?function(e){const t=[];let n=0;for(let r=0;r0?1048576&e.flags?YC.createUnionTypeNode(n):YC.createIntersectionTypeNode(n):void(o.encounteredError||262144&o.flags||(o.encounteredError=!0))}if(48&g)return xn.assert(!!(524288&e.flags)),T(e);if(4194304&e.flags){const t=e.type;o.approximateLength+=6;const n=_(t,o);return YC.createTypeOperatorNode(143,n)}if(134217728&e.flags){const t=e.texts,n=e.types,r=YC.createTemplateHead(t[0]),i=YC.createNodeArray(O(n,((e,r)=>YC.createTemplateLiteralTypeSpan(_(e,o),(rfunction(e){const t=_(e.checkType,o);if(o.approximateLength+=15,4&o.flags&&e.root.isDistributive&&!(262144&e.checkType.flags)){const r=ys(No(262144,"T")),i=ee(r,o),a=YC.createTypeReferenceNode(i);o.approximateLength+=37;const s=$x(e.root.checkType,r,e.mapper),c=o.inferTypeParameters;o.inferTypeParameters=e.root.inferTypeParameters;const l=_(eS(e.root.extendsType,s),o);o.inferTypeParameters=c;const u=y(eS(n(o,e.root.node.trueType),s)),d=y(eS(n(o,e.root.node.falseType),s));return YC.createConditionalTypeNode(t,YC.createInferTypeNode(YC.createTypeParameterDeclaration(void 0,YC.cloneNode(a.typeName))),YC.createConditionalTypeNode(YC.createTypeReferenceNode(YC.cloneNode(i)),_(e.checkType,o),YC.createConditionalTypeNode(a,l,u,d),YC.createKeywordTypeNode(146)),YC.createKeywordTypeNode(146))}const r=o.inferTypeParameters;o.inferTypeParameters=e.root.inferTypeParameters;const i=_(e.extendsType,o);o.inferTypeParameters=r;const a=y(Vb(e)),s=y(Ub(e));return YC.createConditionalTypeNode(t,i,a,s)}(e)));if(33554432&e.flags){const t=_(e.baseType,o),n=ph(e)&&Bh("NoInfer",!1);return n?X(n,o,788968,[t]):t}return xn.fail("Should be unreachable.");function y(e){var t,n,r;return 1048576&e.flags?(null==(t=o.visitedTypes)?void 0:t.has(qy(e)))?(131072&o.flags||(o.encounteredError=!0,null==(r=null==(n=o.tracker)?void 0:n.reportCyclicStructureError)||r.call(n)),d(o)):C(e,(e=>_(e,o))):_(e,o)}function x(e){return!!Gx(e)}function S(e){return!!e.target&&x(e.target)&&!x(e)}function T(e){var t,n;const r=e.id,i=e.symbol;if(i){if(8388608&wx(e)){const n=e.node;if(TE(n)){const t=s(o,n,e);if(t)return t}return(null==(t=o.visitedTypes)?void 0:t.has(r))?d(o):C(e,E)}const a=Ys(e)?788968:111551;if(rO(i.valueDeclaration))return X(i,o,a);if(32&i.flags&&!Ol(i)&&(!(i.valueDeclaration&&gu(i.valueDeclaration)&&2048&o.flags)||GP(i.valueDeclaration)&&0===Is(i,o.enclosingDeclaration,a,!1).accessibility)||896&i.flags||function(){var e;const t=!!(8192&i.flags)&&Q(i.declarations,(e=>Jv(e))),n=!!(16&i.flags)&&(i.parent||f(i.declarations,(e=>307===e.parent.kind||268===e.parent.kind)));if(t||n)return(!!(4096&o.flags)||(null==(e=o.visitedTypes)?void 0:e.has(r)))&&(!(8&o.flags)||Ns(i,o.enclosingDeclaration))}())return X(i,o,a);if(null==(n=o.visitedTypes)?void 0:n.has(r)){const t=function(e){if(e.symbol&&2048&e.symbol.flags&&e.symbol.declarations){const t=oh(e.symbol.declarations[0].parent);if(QP(t))return ns(t)}}(e);return t?X(t,o,788968):d(o)}return C(e,E)}return E(e)}function C(e,t){var n,i,a;const s=e.id,c=16&wx(e)&&e.symbol&&32&e.symbol.flags,l=4&wx(e)&&e.node?"N"+IB(e.node):16777216&e.flags?"N"+IB(e.root.node):e.symbol?(c?"+":"")+OB(e.symbol):void 0;o.visitedTypes||(o.visitedTypes=new Set),l&&!o.symbolDepth&&(o.symbolDepth=new Map);const u=o.enclosingDeclaration&&Wo(o.enclosingDeclaration),_=`${qy(e)}|${o.flags}`;u&&(u.serializedTypes||(u.serializedTypes=new Map));const p=null==(n=null==u?void 0:u.serializedTypes)?void 0:n.get(_);if(p)return null==(i=p.trackedSymbols)||i.forEach((([e,t,n])=>o.tracker.trackSymbol(e,t,n))),p.truncating&&(o.truncating=!0),o.approximateLength+=p.addedLength,function e(t){return ly(t)||hc(t)!==t?r(o,YC.cloneNode(ZB(t,e,void 0,v,e)),t):t}(p.node);let f;if(l){if(f=o.symbolDepth.get(l)||0,f>10)return d(o);o.symbolDepth.set(l,f+1)}o.visitedTypes.add(s);const m=o.trackedSymbols;o.trackedSymbols=void 0;const g=o.approximateLength,h=t(e),y=o.approximateLength-g;return o.reportedDiagnostic||o.encounteredError||null==(a=null==u?void 0:u.serializedTypes)||a.set(_,{node:h,truncating:o.truncating,addedLength:y,trackedSymbols:o.trackedSymbols}),o.visitedTypes.delete(s),l&&o.symbolDepth.set(l,f),o.trackedSymbols=m,h;function v(e,t,n,r,i){return e&&0===e.length?sI(YC.createNodeArray(void 0,e.hasTrailingComma),e):VB(e,t,n,r,i)}}function E(e){if(Ad(e)||e.containsError)return function(e){var t;xn.assert(!!(524288&e.flags));const r=e.declaration.readonlyToken?YC.createToken(e.declaration.readonlyToken.kind):void 0,i=e.declaration.questionToken?YC.createToken(e.declaration.questionToken.kind):void 0;let a,s;const c=!bd(e)&&!(2&wd(e).flags)&&4&o.flags&&!(262144&md(e).flags&&4194304&(null==(t=Jd(md(e)))?void 0:t.flags));if(bd(e)){if(S(e)&&4&o.flags){const e=ee(ys(No(262144,"T")),o);s=YC.createTypeReferenceNode(e)}a=YC.createTypeOperatorNode(143,s||_(wd(e),o))}else if(c){const e=ee(ys(No(262144,"T")),o);s=YC.createTypeReferenceNode(e),a=s}else a=_(md(e),o);const l=w(fd(e),o,a),u=e.declaration.nameType?_(hd(e),o):void 0,d=_(bC(yd(e),!!(4&Dd(e))),o),p=YC.createMappedTypeNode(r,l,u,i,d,void 0);o.approximateLength+=10;const f=iw(p,1);if(S(e)&&4&o.flags){const t=eS(Jd(n(o,e.declaration.typeParameter.constraint.type))||At,e.mapper);return YC.createConditionalTypeNode(_(wd(e),o),YC.createInferTypeNode(YC.createTypeParameterDeclaration(void 0,YC.cloneNode(s.typeName),2&t.flags?void 0:_(t,o))),f,YC.createKeywordTypeNode(146))}return c?YC.createConditionalTypeNode(_(md(e),o),YC.createInferTypeNode(YC.createTypeParameterDeclaration(void 0,YC.cloneNode(s.typeName),YC.createTypeOperatorNode(143,_(wd(e),o)))),f,YC.createKeywordTypeNode(146)):f}(e);const t=Od(e);if(!t.properties.length&&!t.indexInfos.length){if(!t.callSignatures.length&&!t.constructSignatures.length)return o.approximateLength+=2,iw(YC.createTypeLiteralNode(void 0),1);if(1===t.callSignatures.length&&!t.constructSignatures.length)return k(t.callSignatures[0],184,o);if(1===t.constructSignatures.length&&!t.callSignatures.length)return k(t.constructSignatures[0],185,o)}const r=F(t.constructSignatures,(e=>!!(4&e.flags)));if(Q(r)){const e=O(r,(e=>Om(e)));return t.callSignatures.length+(t.constructSignatures.length-r.length)+t.indexInfos.length+(2048&o.flags?N(t.properties,(e=>!(4194304&e.flags))):p(t.properties))&&e.push(function(e){if(0===e.constructSignatures.length)return e;if(e.objectTypeWithoutAbstractConstructSignatures)return e.objectTypeWithoutAbstractConstructSignatures;const t=F(e.constructSignatures,(e=>!(4&e.flags)));if(e.constructSignatures===t)return e;const n=ks(e.symbol,e.members,e.callSignatures,Q(t)?t:u,e.indexInfos);return e.objectTypeWithoutAbstractConstructSignatures=n,n.objectTypeWithoutAbstractConstructSignatures=n,n}(t)),_(cv(e),o)}const i=o.flags;o.flags|=4194304;const a=function(e){if(l(o))return[YC.createPropertySignature(void 0,"...",void 0,void 0)];const t=[];for(const n of e.callSignatures)t.push(k(n,179,o));for(const n of e.constructSignatures)4&n.flags||t.push(k(n,180,o));for(const n of e.indexInfos)t.push(b(n,o,1024&e.objectFlags?d(o):void 0));const n=e.properties;if(!n)return t;let r=0;for(const e of n){if(r++,2048&o.flags){if(4194304&e.flags)continue;6&fx(e)&&o.tracker.reportPrivateInBaseOfClassExpression&&o.tracker.reportPrivateInBaseOfClassExpression(vc(e.escapedName))}if(l(o)&&r+20){const n=(e.target.typeParameters||u).length;i=v(t.slice(a,n),o)}const s=o.flags;o.flags|=16;const c=X(e.symbol,o,788968,i);return o.flags=s,r?A(r,c):c}}if(t=L(t,((t,n)=>bC(t,!!(2&e.target.elementFlags[n])))),t.length>0){const n=Og(e),r=v(t.slice(0,n),o);if(r){const{labeledElementDeclarations:t}=e.target;for(let n=0;n!(32768&e.flags))),0);for(const r of e){const e=k(r,173,t,{name:s,questionToken:c});n.push(p(e))}if(e.length||!c)return}let l;m(e,t)?l=d(t):(i&&(t.reverseMappedStack||(t.reverseMappedStack=[]),t.reverseMappedStack.push(e)),l=o?de(t,void 0,o,e):YC.createKeywordTypeNode(133),i&&t.reverseMappedStack.pop());const u=oM(e)?[YC.createToken(148)]:void 0;u&&(t.approximateLength+=9);const _=YC.createPropertySignature(u,s,c,l);function p(n){var r;const i=null==(r=e.declarations)?void 0:r.find((e=>348===e.kind));if(i){const e=fl(i.comment);e&&hw(n,[{kind:3,text:"*\n * "+e.replace(/\n/g,"\n * ")+"\n ",pos:-1,end:-1,hasTrailingNewLine:!0}])}else e.valueDeclaration&&y(t,n,e.valueDeclaration);return n}n.push(p(_))}function y(e,t,n){return e.enclosingFile&&e.enclosingFile===Sd(n)?mw(t,n):t}function v(e,t,n){if(Q(e)){if(l(t)){if(!n)return[YC.createTypeReferenceNode("...",void 0)];if(e.length>2)return[_(e[0],t),YC.createTypeReferenceNode(`... ${e.length-2} more ...`,void 0),_(e[e.length-1],t)]}const r=64&t.flags?void 0:et(),i=[];let o=0;for(const n of e){if(o++,l(t)&&o+2{if(!ET(e,(([e],[t])=>function(e,t){return e===t||!!e.symbol&&e.symbol===t.symbol||!!e.aliasSymbol&&e.aliasSymbol===t.aliasSymbol}(e,t))))for(const[n,r]of e)i[r]=_(n,t)})),t.flags=e}return i}}function b(e,t,n){const r=Ip(e)||"x",i=_(e.keyType,t),o=YC.createParameterDeclaration(void 0,void 0,r,void 0,i,void 0);return n||(n=_(e.type||St,t)),e.type||2097152&t.flags||(t.encounteredError=!0),t.approximateLength+=r.length+4,YC.createIndexSignature(e.isReadonly?[YC.createToken(148)]:void 0,[o],n)}function k(e,t,r,i){var o;let a,s;const c=w_(e,!0)[0],l=C(r,e.declaration,c,e.typeParameters,e.parameters,e.mapper);r.approximateLength+=3,32&r.flags&&e.target&&e.mapper&&e.target.typeParameters?s=e.target.typeParameters.map((t=>_(eS(t,e.mapper),r))):a=e.typeParameters&&e.typeParameters.map((e=>E(e,r)));const u=r.flags;r.flags&=-257;const d=(Q(c,(e=>e!==c[c.length-1]&&!!(32768&px(e))))?e.parameters:c).map((e=>j(e,r,176===t))),p=33554432&r.flags?void 0:function(e,t){if(e.thisParameter)return j(e.thisParameter,t);if(e.declaration&&Mm(e.declaration)){const r=tl(e.declaration);if(r&&r.typeExpression)return YC.createParameterDeclaration(void 0,void 0,"this",void 0,_(n(t,r.typeExpression),t))}}(e,r);p&&d.unshift(p),r.flags=u;const f=pe(r,e);let m=null==i?void 0:i.modifiers;if(185===t&&4&e.flags){const e=ib(m);m=YC.createModifiersFromModifierFlags(64|e)}const g=179===t?YC.createCallSignature(a,d,f):180===t?YC.createConstructSignature(a,d,f):173===t?YC.createMethodSignature(m,(null==i?void 0:i.name)??YC.createIdentifier(""),null==i?void 0:i.questionToken,a,d,f):174===t?YC.createMethodDeclaration(m,void 0,(null==i?void 0:i.name)??YC.createIdentifier(""),void 0,a,d,f,void 0):176===t?YC.createConstructorDeclaration(m,d,void 0):177===t?YC.createGetAccessorDeclaration(m,(null==i?void 0:i.name)??YC.createIdentifier(""),d,f,void 0):178===t?YC.createSetAccessorDeclaration(m,(null==i?void 0:i.name)??YC.createIdentifier(""),d,void 0):181===t?YC.createIndexSignature(m,d,f):317===t?YC.createJSDocFunctionType(d,f):184===t?YC.createFunctionTypeNode(a,d,f??YC.createTypeReferenceNode(YC.createIdentifier(""))):185===t?YC.createConstructorTypeNode(m,a,d,f??YC.createTypeReferenceNode(YC.createIdentifier(""))):262===t?YC.createFunctionDeclaration(m,void 0,(null==i?void 0:i.name)?ut(i.name,qD):YC.createIdentifier(""),a,d,f,void 0):218===t?YC.createFunctionExpression(m,void 0,(null==i?void 0:i.name)?ut(i.name,qD):YC.createIdentifier(""),a,d,f,YC.createBlock([])):219===t?YC.createArrowFunction(m,a,d,f,void 0,YC.createBlock([])):xn.assertNever(t);return s&&(g.typeArguments=YC.createNodeArray(s)),323===(null==(o=e.declaration)?void 0:o.kind)&&339===e.declaration.parent.kind&&yw(g,3,Gd(e.declaration.parent.parent,!0).slice(2,-2).split(/\r\n|\n|\r/).map((e=>e.replace(/^\s+/," "))).join("\n"),!0),null==l||l(),g}function C(e,t,n,r,i,o){const a=se(e);let s,c;const l=e.enclosingDeclaration,_=e.mapper;if(o&&(e.mapper=o),e.enclosingDeclaration&&t){let t=function(t,n){let r;xn.assert(e.enclosingDeclaration),Wo(e.enclosingDeclaration).fakeScopeForSignatureDeclaration===t?r=e.enclosingDeclaration:e.enclosingDeclaration.parent&&Wo(e.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration===t&&(r=e.enclosingDeclaration.parent),xn.assertOptionalNode(r,DP);const i=(null==r?void 0:r.locals)??ed();let o,a;if(n(((e,t)=>{if(r){const t=i.get(e);t?a=ue(a,{name:e,oldSymbol:t}):o=ue(o,e)}i.set(e,t)})),r)return function(){f(o,(e=>i.delete(e))),f(a,(e=>i.set(e.name,e.oldSymbol)))};{const n=YC.createBlock(u);Wo(n).fakeScopeForSignatureDeclaration=t,n.locals=i,OT(n,e.enclosingDeclaration),e.enclosingDeclaration=n}};s=Q(n)?t("params",(e=>{if(n)for(let t=0;tsE(t)&&Eu(t.name)?(function t(n){f(n.elements,(n=>{switch(n.kind){case 232:return;case 208:return function(n){if(Eu(n.name))return t(n.name);const r=ns(n);e(r.escapedName,r)}(n);default:return xn.assertNever(n)}}))}(t.name),!0):void 0))||e(r.escapedName,r)}})):void 0,4&e.flags&&Q(r)&&(c=t("typeParams",(t=>{for(const n of r??u)t(ee(n,e).escapedText,n.symbol)})))}return()=>{null==s||s(),null==c||c(),a(),e.enclosingDeclaration=l,e.mapper=_}}function w(e,t,n){const r=t.flags;t.flags&=-513;const i=YC.createModifiersFromModifierFlags(Dk(e)),o=ee(e,t),a=np(e),s=a&&_(a,t);return t.flags=r,YC.createTypeParameterDeclaration(i,o,n,s)}function E(e,t,n=Jd(e)){const r=n&&function(e,t,n){return t&&s(n,t,e)||_(e,n)}(n,cg(e),t);return w(e,t,r)}function P(e,t){const n=2===e.kind||3===e.kind?YC.createToken(131):void 0,r=1===e.kind||3===e.kind?iw(YC.createIdentifier(e.parameterName),16777216):YC.createThisTypeNode(),i=e.type&&_(e.type,t);return YC.createTypePredicateNode(n,r,i)}function I(e){return Y_(e,169)||(td(e)?void 0:Y_(e,341))}function j(e,t,n){const r=I(e),i=de(t,r,$l(e),e),o=!(8192&t.flags)&&n&&r&&cI(r)?O(Ac(r),YC.cloneNode):void 0,a=r&&U_(r)||32768&px(e)?YC.createToken(26):void 0,s=B(e,r,t),c=r&&xf(r)||16384&px(e)?YC.createToken(58):void 0,l=YC.createParameterDeclaration(o,a,s,c,i,void 0);return t.approximateLength+=Sc(e).length+3,l}function B(e,t,n){return t&&t.name?80===t.name.kind?iw(YC.cloneNode(t.name),16777216):166===t.name.kind?iw(YC.cloneNode(t.name.right),16777216):function e(t){n.tracker.canTrackSymbol&&oE(t)&&a_(t)&&J(t.expression,n.enclosingDeclaration,n);let r=ZB(t,e,void 0,void 0,e);return KE(r)&&(r=YC.updateBindingElement(r,r.dotDotDotToken,r.propertyName,r.name,void 0)),ly(r)||(r=YC.cloneNode(r)),iw(r,16777217)}(t.name):Sc(e)}function J(e,t,n){if(!n.tracker.canTrackSymbol)return;const r=bb(e),i=je(r,r.escapedText,1160127,void 0,!0);i&&n.tracker.trackSymbol(i,t,111551)}function z(e,t,n,r){return t.tracker.trackSymbol(e,t.enclosingDeclaration,n),$(e,t,n,r)}function $(e,t,n,r){let i;return 262144&e.flags||!(t.enclosingDeclaration||64&t.flags)||134217728&t.flags?i=[e]:(i=xn.checkDefined(function e(n,i,o){let a,s=Es(n,t.enclosingDeclaration,i,!!(128&t.flags));if(!s||Ps(s[0],t.enclosingDeclaration,1===s.length?i:Ds(i))){const r=ss(s?s[0]:n,t.enclosingDeclaration,i);if(p(r)){a=r.map((e=>Q(e.declarations,zs)?H(e,t):void 0));const o=r.map(((e,t)=>t));o.sort((function(e,t){const n=a[e],r=a[t];if(n&&r){const e=Po(r);return Po(n)===e?eB(n)-eB(r):e?-1:1}return 0}));const c=o.map((e=>r[e]));for(const t of c){const r=e(t,Ds(i),!1);if(r){if(t.exports&&t.exports.get("export=")&&us(t.exports.get("export="),n)){s=r;break}s=r.concat(s||[ls(t,n)||n]);break}}}}if(s)return s;if(o||!(6144&n.flags)){if(!o&&!r&&f(n.declarations,zs))return;return[n]}}(e,n,!0)),xn.assert(i&&i.length>0)),i}function U(e,t){let n;return 524384&Zj(e).flags&&(n=YC.createNodeArray(O(nu(e),(e=>E(e,t))))),n}function K(e,t,n){var r;xn.assert(e&&0<=t&&tAx(e,o.links.mapper))),n)}else a=U(i,n)}return a}function W(e){return RE(e.objectType)?W(e.objectType):e}function H(e,t,n){let r=Y_(e,307);if(!r){const t=g(e.declarations,(t=>cs(t,e)));t&&(r=Y_(t,307))}if(r&&void 0!==r.moduleName)return r.moduleName;if(!r&&vB.test(e.escapedName))return e.escapedName.substring(1,e.escapedName.length-1);if(!t.enclosingFile||!t.tracker.moduleResolverHost)return vB.test(e.escapedName)?e.escapedName.substring(1,e.escapedName.length-1):Sd(gp(e)).fileName;const i=t.enclosingFile,o=n||(null==i?void 0:i.impliedNodeFormat),a=dj(i.path,o),s=Uo(e);let c=s.specifierCache&&s.specifierCache.get(a);if(!c){const r=!!A.outFile,{moduleResolverHost:l}=t.tracker,u=r?{...A,baseUrl:l.getCommonSourceDirectory()}:A;c=Te(GR(e,Be,u,i,l,{importModuleSpecifierPreference:r?"non-relative":"project-relative",importModuleSpecifierEnding:r?"minimal":99===o?"js":void 0},{overrideImportMode:n})),s.specifierCache??(s.specifierCache=new Map),s.specifierCache.set(a,c)}return c}function G(e){const t=YC.createIdentifier(vc(e.escapedName));return e.parent?YC.createQualifiedName(G(e.parent),t):t}function X(e,t,n,r){const i=z(e,t,n,!(16384&t.flags)),o=111551===n;if(Q(i[0].declarations,zs)){const e=i.length>1?s(i,i.length-1,1):void 0,n=r||K(i,0,t),a=Sd(fc(t.enclosingDeclaration)),c=kd(i[0]);let l,u;if(3!==ES(A)&&99!==ES(A)||99===(null==c?void 0:c.impliedNodeFormat)&&c.impliedNodeFormat!==(null==a?void 0:a.impliedNodeFormat)&&(l=H(i[0],t,99),u=YC.createImportAttributes(YC.createNodeArray([YC.createImportAttribute(YC.createStringLiteral("resolution-mode"),YC.createStringLiteral("import"))]))),l||(l=H(i[0],t)),!(67108864&t.flags)&&1!==ES(A)&&l.includes("/node_modules/")){const e=l;if(3===ES(A)||99===ES(A)){const n=99===(null==a?void 0:a.impliedNodeFormat)?1:99;l=H(i[0],t,n),l.includes("/node_modules/")?l=e:u=YC.createImportAttributes(YC.createNodeArray([YC.createImportAttribute(YC.createStringLiteral("resolution-mode"),YC.createStringLiteral(99===n?"import":"require"))]))}u||(t.encounteredError=!0,t.tracker.reportLikelyUnsafeImportRequiredError&&t.tracker.reportLikelyUnsafeImportRequiredError(e))}const _=YC.createLiteralTypeNode(YC.createStringLiteral(l));if(t.approximateLength+=l.length+10,!e||ou(e))return e&&Mw(qD(e)?e:e.right,void 0),YC.createImportTypeNode(_,u,e,n,o);{const t=W(e),r=t.objectType.typeName;return YC.createIndexedAccessTypeNode(YC.createImportTypeNode(_,u,r,n,o),t.indexType)}}const a=s(i,i.length-1,0);if(RE(a))return a;if(o)return YC.createTypeQueryNode(a);{const e=qD(a)?a:a.right,t=Lw(e);return Mw(e,void 0),YC.createTypeReferenceNode(a,t)}function s(e,n,i){const o=n===e.length-1?r:K(e,n,t),a=e[n],c=e[n-1];let l;if(0===n?(t.flags|=16777216,l=oc(a,t),t.approximateLength+=(l?l.length:0)+1,t.flags^=16777216):c&&Ga(c)&&ld(Ga(c),((e,t)=>{if(us(e,a)&&!s_(t)&&"export="!==t)return l=vc(t),!0})),void 0===l){const r=g(a.declarations,Pc);if(r&&oE(r)&&ou(r.expression)){const t=s(e,n-1,i);return ou(t)?YC.createIndexedAccessTypeNode(YC.createParenthesizedType(YC.createTypeQueryNode(t)),YC.createTypeQueryNode(r.expression)):t}l=oc(a,t)}if(t.approximateLength+=l.length+1,!(16&t.flags)&&c&&m_(c)&&m_(c).get(a.escapedName)&&us(m_(c).get(a.escapedName),a)){const t=s(e,n-1,i);return RE(t)?YC.createIndexedAccessTypeNode(t,YC.createLiteralTypeNode(YC.createStringLiteral(l))):YC.createIndexedAccessTypeNode(YC.createTypeReferenceNode(t,o),YC.createLiteralTypeNode(YC.createStringLiteral(l)))}const u=iw(YC.createIdentifier(l),16777216);if(o&&Mw(u,YC.createNodeArray(o)),u.symbol=a,n>i){const t=s(e,n-1,i);return ou(t)?YC.createQualifiedName(t,u):xn.fail("Impossible construct - an export of an indexed access cannot be reachable")}return u}}function Y(e,t,n){const r=je(t.enclosingDeclaration,e,788968,void 0,!1);return!!(r&&262144&r.flags)&&r!==n.symbol}function ee(e,t){var n,i,o,a;if(4&t.flags&&t.typeParameterNames){const n=t.typeParameterNames.get(qy(e));if(n)return n}let s=ne(e.symbol,t,788968,!0);if(!(80&s.kind))return YC.createIdentifier("(Missing type parameter)");const c=null==(i=null==(n=e.symbol)?void 0:n.declarations)?void 0:i[0];if(c&&aE(c)&&(s=r(t,s,c.name)),4&t.flags){const n=s.escapedText;let r=(null==(o=t.typeParameterNamesByTextNextNameCount)?void 0:o.get(n))||0,i=n;for(;(null==(a=t.typeParameterNamesByText)?void 0:a.has(i))||Y(i,t,e);)r++,i=`${n}_${r}`;if(i!==n){const e=Lw(s);s=YC.createIdentifier(i),Mw(s,e)}t.mustCreateTypeParametersNamesLookups&&(t.mustCreateTypeParametersNamesLookups=!1,t.typeParameterNames=new Map(t.typeParameterNames),t.typeParameterNamesByTextNextNameCount=new Map(t.typeParameterNamesByTextNextNameCount),t.typeParameterNamesByText=new Set(t.typeParameterNamesByText)),t.typeParameterNamesByTextNextNameCount.set(n,r),t.typeParameterNames.set(qy(e),s),t.typeParameterNamesByText.add(i)}return s}function ne(e,t,n,r){const i=z(e,t,n);return!r||1===i.length||t.encounteredError||65536&t.flags||(t.encounteredError=!0),function e(n,r){const i=K(n,r,t),o=n[r];0===r&&(t.flags|=16777216);const a=oc(o,t);0===r&&(t.flags^=16777216);const s=iw(YC.createIdentifier(a),16777216);return i&&Mw(s,YC.createNodeArray(i)),s.symbol=o,r>0?YC.createQualifiedName(e(n,r-1),s):s}(i,i.length-1)}function re(e,t,n){const r=z(e,t,n);return function e(n,r){const i=K(n,r,t),o=n[r];0===r&&(t.flags|=16777216);let a=oc(o,t);0===r&&(t.flags^=16777216);let s=a.charCodeAt(0);if(Km(s)&&Q(o.declarations,zs))return YC.createStringLiteral(H(o,t));if(0===r||tC(a,M)){const t=iw(YC.createIdentifier(a),16777216);return i&&Mw(t,YC.createNodeArray(i)),t.symbol=o,r>0?YC.createPropertyAccessExpression(e(n,r-1),t):t}{let t;if(91===s&&(a=a.substring(1,a.length-1),s=a.charCodeAt(0)),!Km(s)||8&o.flags?""+ +a===a&&(t=YC.createNumericLiteral(+a)):t=YC.createStringLiteral(By(a).replace(/\\./g,(e=>e.substring(1))),39===s),!t){const e=iw(YC.createIdentifier(a),16777216);i&&Mw(e,YC.createNodeArray(i)),e.symbol=o,t=e}return YC.createElementAccessExpression(e(n,r-1),t)}}(r,r.length-1)}function ie(e){const t=Pc(e);return!!t&&(oE(t)?!!(402653316&KM(t.expression).flags):XE(t)?!!(402653316&KM(t.argumentExpression).flags):wD(t))}function oe(e){const t=Pc(e);return!!(t&&wD(t)&&(t.singleQuote||!ly(t)&&an(Gd(t,!1),"'")))}function ae(e,t){const n=!!p(e.declarations)&&x(e.declarations,ie),r=!!p(e.declarations)&&x(e.declarations,oe),i=!!(8192&e.flags),o=function(e,t,n,r,i){const o=Uo(e).nameType;if(o){if(384&o.flags){const e=""+o.value;return Ts(e,wS(A))||!r&&WT(e)?WT(e)&&an(e,"-")?YC.createComputedPropertyName(YC.createPrefixUnaryExpression(41,YC.createNumericLiteral(-e))):HT(e,wS(A),n,r,i):YC.createStringLiteral(e,!!n)}if(8192&o.flags)return YC.createComputedPropertyName(re(o.symbol,t,111551))}}(e,t,r,n,i);return o||HT(vc(e.escapedName),wS(A),r,n,i)}function se(e){const t=e.mustCreateTypeParameterSymbolList,n=e.mustCreateTypeParametersNamesLookups;e.mustCreateTypeParameterSymbolList=!0,e.mustCreateTypeParametersNamesLookups=!0;const r=e.typeParameterNames,i=e.typeParameterNamesByText,o=e.typeParameterNamesByTextNextNameCount,a=e.typeParameterSymbolList;return()=>{e.typeParameterNames=r,e.typeParameterNamesByText=i,e.typeParameterNamesByTextNextNameCount=o,e.typeParameterSymbolList=a,e.mustCreateTypeParameterSymbolList=t,e.mustCreateTypeParametersNamesLookups=n}}function le(e,t){return e.declarations&&S(e.declarations,(e=>!(!gB(e)||t&&!mc(e,(e=>e===t)))))}function _e(e,t){if(!(4&wx(t)))return!0;if(!xE(e))return!0;Ih(e);const n=Wo(e).resolvedSymbol,r=n&&ju(n);return!r||r!==t.target||p(e.typeArguments)>=kf(t.target.typeParameters)}function de(e,t,n,r){var i;const s=t&&(sE(t)||xF(t))&&nB(t),c=e.enclosingDeclaration,l=e.flags;if(!t||!PC(t)||-2147483648&e.flags||ce.serializeTypeOfDeclaration(t,e),e.flags|=-2147483648,c&&(!Nc(n)||1&e.flags)){const i=t&&gB(t)?t:le(r);if(i&&!uu(i)&&!mE(i)){const t=gB(i),r=!bE(t)&&a(e,t,n,i,s);if(r)return e.flags=l,r}}8192&n.flags&&n.symbol===r&&(!e.enclosingDeclaration||Q(r.declarations,(t=>Sd(t)===Sd(e.enclosingDeclaration))))&&(e.flags|=1048576);const u=t??r.valueDeclaration??(null==(i=r.declarations)?void 0:i[0]),_=u&&function(e){return cu(e)||mN(e)||If(e)}(u)?_B(u):void 0,d=o(e,_,n,s);return e.flags=l,d}function pe(e,t){const r=256&e.flags,i=e.flags;let a;r&&(e.flags&=-257);const s=Gf(t);return!s||r&&Ec(s)?r||(a=YC.createKeywordTypeNode(133)):(!t.declaration||-2147483648&e.flags||ce.serializeReturnTypeForSignature(t.declaration,e),e.flags|=-2147483648,a=function(e,t){const r=Wf(t),i=Gf(t);if(e.enclosingDeclaration&&(!Nc(i)||1&e.flags)&&t.declaration&&!ly(t.declaration)){const r=t.declaration&&function(e){const t=Cv(e);if(t)return t;if(177===e.kind){const t=uB(e).setAccessor;if(t){const e=fv(t);if(e)return kv(e)}}}(t.declaration);if(r&&n(e,r)===i){const t=he(e,r);if(t)return t}}if(r)return P(r,e);return o(e,t.declaration&&_B(t.declaration),i)}(e,t)),e.flags=i,a}function fe(e,t){let n=!1;const i=bb(e);if(Mm(e)&&(rg(i)||og(i.parent)||iE(i.parent)&&ig(i.parent.left)&&rg(i.parent.right)))return n=!0,{introducesError:n,node:e};const o=qs(e);let a;if(yv(i))return a=ns(rm(i,!1,!1)),0!==Is(a,i,o,!1).accessibility&&(n=!0,t.tracker.reportInaccessibleThisError()),{introducesError:n,node:s(e)};if(a=Ma(i,o,!0,!0),t.enclosingDeclaration&&!(a&&262144&a.flags)){a=_s(a);const r=Ma(i,o,!0,!0,t.enclosingDeclaration);if(r===ht||void 0===r&&void 0!==a||r&&a&&!us(_s(r),a))return r!==ht&&t.tracker.reportInferenceFallback(e),n=!0,{introducesError:n,node:e,sym:a}}return a?(1&a.flags&&a.valueDeclaration&&(ay(a.valueDeclaration)||xF(a.valueDeclaration))||(262144&a.flags||dh(e)||0===Is(a,t.enclosingDeclaration,o,!1).accessibility?t.tracker.trackSymbol(a,t.enclosingDeclaration,o):(t.tracker.reportInferenceFallback(e),n=!0)),{introducesError:n,node:s(e)}):{introducesError:n,node:e};function s(e){if(e===i){const n=ju(a),i=262144&a.flags?ee(n,t):YC.cloneNode(e);return i.symbol=a,r(t,iw(i,16777216),e)}const n=ZB(e,(e=>s(e)),void 0);return n!==e&&r(t,n,e),n}}function me(e,t,n,r){const i=n?111551:788968,o=Ma(t,i,!0);if(!o)return;const a=2097152&o.flags?Ea(o):o;return 0===Is(o,e.enclosingDeclaration,i,!1).accessibility?X(a,e,i,r):void 0}function ge(e,t){if(Mm(t)&&df(t)){Hb(t);const e=Wo(t).resolvedSymbol;return!e||!!((t.isTypeOf||788968&e.flags)&&p(t.typeArguments)>=kf(nu(e)))}if(LE(t))return void 0===e.mapper||!!n(e,t,!0);if(xE(t)){if(Dl(t))return!1;const n=Ih(t),r=Wo(t).resolvedSymbol;if(!r)return!1;if(262144&r.flags){const t=ju(r);if(e.mapper&&Ax(t,e.mapper)!==t)return!1}if(Rm(t))return _e(t,n)&&!Ah(t)&&788968&r.flags}if(jE(t)&&158===t.operator&&155===t.type.kind){const n=e.enclosingDeclaration&&function(e){for(;Wo(e).fakeScopeForSignatureDeclaration;)e=e.parent;return e}(e.enclosingDeclaration);return!!mc(t,(e=>e===n))}return!0}function he(e,i){t&&t.throwIfCancellationRequested&&t.throwIfCancellationRequested();let o=!1;const{finalizeBoundary:a,startRecoveryScope:s}=function(){let t,n;const r=e.tracker,i=e.trackedSymbols;e.trackedSymbols=void 0;const a=e.encounteredError;return e.tracker=new $B(e,{...r.inner,reportCyclicStructureError(){s((()=>r.reportCyclicStructureError()))},reportInaccessibleThisError(){s((()=>r.reportInaccessibleThisError()))},reportInaccessibleUniqueSymbolError(){s((()=>r.reportInaccessibleUniqueSymbolError()))},reportLikelyUnsafeImportRequiredError(e){s((()=>r.reportLikelyUnsafeImportRequiredError(e)))},reportNonSerializableProperty(e){s((()=>r.reportNonSerializableProperty(e)))},trackSymbol:(e,n,r)=>((t??(t=[])).push([e,n,r]),!1),moduleResolverHost:e.tracker.moduleResolverHost},e.tracker.moduleResolverHost),{startRecoveryScope:function(){const e=(null==t?void 0:t.length)??0,r=(null==n?void 0:n.length)??0;return()=>{o=!1,t&&(t.length=e),n&&(n.length=r)}},finalizeBoundary:function(){return e.tracker=r,e.trackedSymbols=i,e.encounteredError=a,null==n||n.forEach((e=>e())),!o&&(null==t||t.forEach((([t,n,r])=>e.tracker.trackSymbol(t,n,r))),!0)}};function s(e){o=!0,(n??(n=[])).push(e)}}(),c=qB(i,l,wu);if(a())return e.approximateLength+=i.end-i.pos,c;function l(t){if(o)return t;const i=s(),a=function(e){return cu(e)||sF(e)||BE(e)}(t)?u(t):void 0,c=function(t){if(UN(t))return qB(t.type,l,wu);if(QN(t)||319===t.kind)return YC.createKeywordTypeNode(133);if(YN(t))return YC.createKeywordTypeNode(159);if(ZN(t))return YC.createUnionTypeNode([qB(t.type,l,wu),YC.createLiteralTypeNode(YC.createNull())]);if(tF(t))return YC.createUnionTypeNode([qB(t.type,l,wu),YC.createKeywordTypeNode(157)]);if(eF(t))return qB(t.type,l);if(rF(t))return YC.createArrayTypeNode(qB(t.type,l,wu));if(aF(t))return YC.createTypeLiteralNode(O(t.jsDocPropertyTags,(r=>{const i=qB(qD(r.name)?r.name:r.name.right,l,qD),o=Tc(n(e,t),i.escapedText),a=o&&r.typeExpression&&n(e,r.typeExpression.type)!==o?_(o,e):void 0;return YC.createPropertySignature(void 0,i,r.isBracketed||r.typeExpression&&tF(r.typeExpression.type)?YC.createToken(58):void 0,a||r.typeExpression&&qB(r.typeExpression.type,l,wu)||YC.createKeywordTypeNode(133))})));if(xE(t)&&qD(t.typeName)&&""===t.typeName.escapedText)return ew(YC.createKeywordTypeNode(133),t);if((hP(t)||xE(t))&&Bm(t))return YC.createTypeLiteralNode([YC.createIndexSignature(void 0,[YC.createParameterDeclaration(void 0,void 0,"x",void 0,qB(t.typeArguments[0],l,wu))],qB(t.typeArguments[1],l,wu))]);if(nF(t)){if(Ng(t)){let n;return YC.createConstructorTypeNode(void 0,VB(t.typeParameters,l,aE),q(t.parameters,((t,i)=>t.name&&qD(t.name)&&"new"===t.name.escapedText?void(n=t.type):YC.createParameterDeclaration(void 0,s(t),r(e,YC.createIdentifier(c(t,i)),t),YC.cloneNode(t.questionToken),qB(t.type,l,wu),void 0))),qB(n||t.type,l,wu)||YC.createKeywordTypeNode(133))}return YC.createFunctionTypeNode(VB(t.typeParameters,l,aE),O(t.parameters,((t,n)=>YC.createParameterDeclaration(void 0,s(t),r(e,YC.createIdentifier(c(t,n)),t),YC.cloneNode(t.questionToken),qB(t.type,l,wu),void 0))),qB(t.type,l,wu)||YC.createKeywordTypeNode(133))}if(LE(t))return ge(e,t)||(o=!0),t;if(aE(t))return YC.updateTypeParameterDeclaration(t,VB(t.modifiers,l,iu),r(e,ee(ju(ns(t)),e),t),qB(t.constraint,l,wu),qB(t.default,l,wu));if(RE(t)){return f(t)||(o=!0,t)}if(xE(t)){return h(t)||(o=!0,t)}if(df(t)){const i=Wo(t).resolvedSymbol;return!Rm(t)||!i||(t.isTypeOf||788968&i.flags)&&p(t.typeArguments)>=kf(nu(i))?YC.updateImportTypeNode(t,YC.updateLiteralTypeNode(t.argument,function(n,r){if(e.bundled||e.enclosingFile!==Sd(r)){let i=r.text;const o=Wo(t).resolvedSymbol,a=n.isTypeOf?111551:788968,s=o&&0===Is(o,e.enclosingDeclaration,a,!1).accessibility&&z(o,e,a,!0)[0];if(s&&nd(s))i=H(s,e);else{const t=yB(n);t&&(i=H(t.symbol,e))}if(i.includes("/node_modules/")&&(e.encounteredError=!0,e.tracker.reportLikelyUnsafeImportRequiredError&&e.tracker.reportLikelyUnsafeImportRequiredError(i)),i!==r.text)return ew(YC.createStringLiteral(i),r)}return qB(r,l,wD)}(t,t.argument.literal)),qB(t.attributes,l,lN),qB(t.qualifier,l,ou),VB(t.typeArguments,l,wu),t.isTypeOf):r(e,_(n(e,t),e),t)}if(!Dc(t)||167!==t.name.kind||a_(t.name)||1&e.flags&&Vh(t)&&vb(t.name.expression)&&1&IF(t.name).flags){if(cu(t)&&!t.type||uE(t)&&!t.type&&!t.initializer||lE(t)&&!t.type&&!t.initializer||sE(t)&&!t.type&&!t.initializer){let n=i(t,l);return n===t&&(n=r(e,YC.cloneNode(t),t)),n.type=YC.createKeywordTypeNode(133),sE(t)&&(n.modifiers=void 0),n}if(TE(t)){return g(t)||(o=!0,t)}if(oE(t)&&vb(t.expression)){const{node:n,introducesError:r}=fe(t.expression,e);if(r){const n=_(RC(qR(t.expression)),e);let r;if(JE(n))r=n.literal;else{const i=oR(t.expression),o="string"==typeof i.value?YC.createStringLiteral(i.value,void 0):"number"==typeof i.value?YC.createNumericLiteral(i.value,0):void 0;if(!o)return zE(n)&&J(t.expression,e.enclosingDeclaration,e),t;r=o}return 11===r.kind&&Ts(r.text,wS(A))?YC.createIdentifier(r.text):9!==r.kind||r.text.startsWith("-")?YC.updateComputedPropertyName(t,r):r}return YC.updateComputedPropertyName(t,n)}if(bE(t)){let n;if(qD(t.parameterName)){const{node:r,introducesError:i}=fe(t.parameterName,e);o=o||i,n=r}else n=YC.cloneNode(t.parameterName);return YC.updateTypePredicateNode(t,YC.cloneNode(t.assertsModifier),n,qB(t.type,l,wu))}if(DE(t)||CE(t)||BE(t)){const n=i(t,l),o=r(e,n===t?YC.cloneNode(t):n,t);return iw(o,Yd(o)|(1024&e.flags&&CE(t)?0:1)),o}if(wD(t)&&268435456&e.flags&&!t.singleQuote){const e=YC.cloneNode(t);return e.singleQuote=!0,e}if(IE(t)){const e=qB(t.checkType,l,wu),n=u(t),r=qB(t.extendsType,l,wu),i=qB(t.trueType,l,wu);n();const o=qB(t.falseType,l,wu);return YC.updateConditionalTypeNode(t,e,r,i,o)}if(jE(t))if(158===t.operator&&155===t.type.kind){if(!ge(e,t))return o=!0,t}else if(143===t.operator){return m(t)||(o=!0,t)}return i(t,l)}function i(t,n){return ZB(t,n,void 0,e.enclosingFile&&e.enclosingFile===Sd(t)?void 0:a)}function a(e,t,n,r,i){let o=VB(e,t,n,r,i);return o&&(-1===o.pos&&-1===o.end||(o===e&&(o=YC.createNodeArray(e,e.hasTrailingComma)),FT(o,-1,-1))),o}function s(e){return e.dotDotDotToken||(e.type&&rF(e.type)?YC.createToken(26):void 0)}function c(e,t){return e.name&&qD(e.name)&&"this"===e.name.escapedText?"this":s(e)?"args":`arg${t}`}}(t);return null==a||a(),o?wu(t)&&!bE(t)?(i(),function(e,t){return _(n(e,t),e)}(e,t)):t:c?r(e,c,t):void 0}function u(t){return C(e,t,function(e){return cu(e)||sF(e)?Cf(e).parameters:void 0}(t),function(e){return cu(e)||sF(e)?Cf(e).typeParameters:IE(e)?Kb(e):[Lu(ns(e.typeParameter))]}(t))}function d(e){const t=ch(e);switch(t.kind){case 183:return h(t);case 186:return g(t);case 199:return f(t);case 198:const e=t;if(143===e.operator)return m(e)}return qB(e,l,wu)}function f(e){const t=d(e.objectType);if(void 0!==t)return YC.updateIndexedAccessTypeNode(e,t,qB(e.indexType,l,wu))}function m(e){xn.assertEqual(e.operator,143);const t=d(e.type);if(void 0!==t)return YC.updateTypeOperatorNode(e,t)}function g(t){const{introducesError:n,node:i}=fe(t.exprName,e);if(!n)return YC.updateTypeQueryNode(t,i,VB(t.typeArguments,l,wu));const o=me(e,t.exprName,!0);return o?r(e,o,t.exprName):void 0}function h(t){if(ge(e,t)){const{introducesError:n,node:i}=fe(t.typeName,e),o=VB(t.typeArguments,l,wu);if(!n){const n=YC.updateTypeReferenceNode(t,i,o);return r(e,n,t)}{const n=me(e,t.typeName,!1,o);if(n)return r(e,n,t.typeName)}}}}}(),ce=pH(A,{isEntityNameVisible:Vs,isExpandoFunctionDeclaration:rB,getAllAccessorDeclarations:uB,requiresAddingImplicitUndefined:nB,isUndefinedIdentifierExpression:e=>(xn.assert(Tm(e)),JR(e)===ge)}),_e=kC({evaluateElementAccessExpression:function(e,t){const n=e.expression;if(vb(n)&&$_(e.argumentExpression)){const r=Ma(n,111551,!0);if(r&&384&r.flags){const n=yc(e.argumentExpression.text),i=r.exports.get(n);if(i)return xn.assert(Sd(i.valueDeclaration)===Sd(r.valueDeclaration)),t?aR(e,i,t):aB(i.valueDeclaration)}}return SC(void 0)},evaluateEntityNameExpression:oR}),de=ed(),ge=No(4,"undefined");ge.declarations=[];var he=No(1536,"globalThis",8);he.exports=de,he.declarations=[],de.set(he.escapedName,he);var ye,ve,xe,Ee=No(4,"arguments"),Pe=No(4,"require"),Ne=A.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules",Ie=!A.verbatimModuleSyntax,Me=0,Le=0,je=wC({compilerOptions:A,requireSymbol:Pe,argumentsSymbol:Ee,globals:de,getSymbolOfDeclaration:ns,error:xo,getRequiresScopeChangeCache:Qo,setRequiresScopeChangeCache:Yo,lookup:Ho,onPropertyWithInvalidInitializer:function(e,t,n,r){return!$&&(e&&!r&&ta(e,t,t)||xo(e,e&&n.type&&Js(n.type,e.pos)?va.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:va.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,Ap(n.name),ea(t)),!0)},onFailedToResolveSymbol:function(e,t,n,r){const i=st(t)?t:t.escapedText;a((()=>{if(!e||!(324===e.parent.kind||ta(e,i,t)||na(e)||function(e,t,n){const r=1920|(Mm(e)?111551:0);if(n===r){const n=Da(je(e,t,788968&~r,void 0,!1)),i=e.parent;if(n){if(iE(i)){xn.assert(i.left===e,"Should only be resolving left side of qualified name as a namespace");const r=i.right.escapedText;if(Jp(ju(n),r))return xo(i,va.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,vc(t),vc(r)),!0}return xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,vc(t)),!0}}return!1}(e,i,n)||function(e,t){return!(!ia(t)||281!==e.parent.kind)&&(xo(e,va.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,t),!0)}(e,i)||function(e,t,n){if(111127&n){if(Da(je(e,t,1024,void 0,!1)))return xo(e,va.Cannot_use_namespace_0_as_a_value,vc(t)),!0}else if(788544&n&&Da(je(e,t,1536,void 0,!1)))return xo(e,va.Cannot_use_namespace_0_as_a_type,vc(t)),!0;return!1}(e,i,n)||function(e,t,n){if(111551&n){if(ia(t)){const n=e.parent.parent;if(n&&n.parent&&jN(n)){const r=n.token,i=n.parent.kind;264===i&&96===r?xo(e,va.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types,vc(t)):263===i&&96===r?xo(e,va.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values,vc(t)):263===i&&119===r&&xo(e,va.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types,vc(t))}else xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,vc(t));return!0}const n=Da(je(e,t,788544,void 0,!1)),r=n&&Pa(n);if(n&&void 0!==r&&!(111551&r)){const r=vc(t);return function(e){switch(e){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}(t)?xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later,r):function(e,t){const n=mc(e.parent,(e=>!oE(e)&&!lE(e)&&(CE(e)||"quit")));if(n&&1===n.members.length){const e=ju(t);return!!(1048576&e.flags)&&pM(e,384,!0)}return!1}(e,n)?xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0,r,"K"===r?"P":"K"):xo(e,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,r),!0}}return!1}(e,i,n)||function(e,t,n){if(788584&n){const n=Da(je(e,t,111127,void 0,!1));if(n&&!(1920&n.flags))return xo(e,va._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,vc(t)),!0}return!1}(e,i,n))){let o,a;if(t&&(a=function(e){const t=ea(e),n=ep().get(t);return n&&Ce(n.keys())}(t),a&&xo(e,r,ea(t),a)),!a&&Li<10&&(o=WA(e,i,n),(null==o?void 0:o.valueDeclaration)&&sp(o.valueDeclaration)&&pp(o.valueDeclaration)&&(o=void 0),o)){const i=Us(o),a=OA(e,o,!1),s=1920===n||t&&"string"!=typeof t&&ly(t)?va.Cannot_find_namespace_0_Did_you_mean_1:a?va.Could_not_find_name_0_Did_you_mean_1:va.Cannot_find_name_0_Did_you_mean_1,c=bo(e,s,ea(t),i);c.canonicalHead=Hp(r,ea(t)),So(!a,c),o.valueDeclaration&&fT(c,Rp(o.valueDeclaration,va._0_is_declared_here,i))}o||a||!t||xo(e,r,ea(t)),Li++}}))},onSuccessfullyResolvedSymbol:function(e,t,n,r,i,o){a((()=>{var a;const s=t.escapedName,c=r&&qN(r)&&Zp(r);if(e&&(2&n||(32&n||384&n)&&111551==(111551&n))){const n=_s(t);(2&n.flags||32&n.flags||384&n.flags)&&function(e,t){var n;if(xn.assert(!!(2&e.flags||32&e.flags||384&e.flags)),67108881&e.flags&&32&e.flags)return;const r=null==(n=e.declarations)?void 0:n.find((e=>op(e)||gu(e)||266===e.kind));if(void 0===r)return xn.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(33554432&r.flags||Xo(r,t))){let n;const i=Ap(Pc(r));2&e.flags?n=xo(t,va.Block_scoped_variable_0_used_before_its_declaration,i):32&e.flags?n=xo(t,va.Class_0_used_before_its_declaration,i):256&e.flags?n=xo(t,va.Enum_0_used_before_its_declaration,i):(xn.assert(!!(128&e.flags)),NS(A)&&(n=xo(t,va.Enum_0_used_before_its_declaration,i))),n&&fT(n,Rp(r,va._0_is_declared_here,i))}}(n,e)}if(c&&111551==(111551&n)&&!(16777216&e.flags)){const n=ts(t);p(n.declarations)&&x(n.declarations,(e=>nN(e)||qN(e)&&!!e.symbol.globalExports))&&ko(!A.allowUmdGlobalAccess,e,va._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,vc(s))}if(i&&!o&&111551==(111551&n)){const r=ts(g_(t)),o=sy(i);r===ns(i)?xo(e,va.Parameter_0_cannot_reference_itself,Ap(i.name)):r.valueDeclaration&&r.valueDeclaration.pos>i.pos&&o.parent.locals&&Ho(o.parent.locals,r.escapedName,n)===r&&xo(e,va.Parameter_0_cannot_reference_identifier_1_declared_after_it,Ap(i.name),Ap(e))}if(e&&111551&n&&2097152&t.flags&&!(111551&t.flags)&&!wT(e)){const n=Aa(t,111551);if(n){const t=281===n.kind||278===n.kind||280===n.kind?va._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:va._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type,r=vc(s);Zo(xo(e,t,r),n,r)}}if(A.isolatedModules&&t&&c&&111551==(111551&n)){const e=Ho(de,s,n)===t&&qN(r)&&r.locals&&Ho(r.locals,s,-111552);if(e){const t=null==(a=e.declarations)?void 0:a.find((e=>276===e.kind||273===e.kind||274===e.kind||271===e.kind));t&&!Ul(t)&&xo(t,va.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,vc(s))}}}))}}),Re=wC({compilerOptions:A,requireSymbol:Pe,argumentsSymbol:Ee,globals:de,getSymbolOfDeclaration:ns,error:xo,getRequiresScopeChangeCache:Qo,setRequiresScopeChangeCache:Yo,lookup:function(e,t,n){const r=Ho(e,t,n);if(r)return r;let i;if(e===de){i=q(["string","number","boolean","object","bigint","symbol"],(t=>e.has(t.charAt(0).toUpperCase()+t.slice(1))?No(524288,t):void 0)).concat($e(e.values()))}else i=$e(e.values());return GA(vc(t),i,n)}});const Be={getNodeCount:()=>Oe(e.getSourceFiles(),((e,t)=>e+t.nodeCount),0),getIdentifierCount:()=>Oe(e.getSourceFiles(),((e,t)=>e+t.identifierCount),0),getSymbolCount:()=>Oe(e.getSourceFiles(),((e,t)=>e+t.symbolCount),d),getTypeCount:()=>_,getInstantiationCount:()=>m,getRelationCacheSizes:()=>({assignable:co.size,identity:uo.size,subtype:ao.size,strictSubtype:so.size}),isUndefinedSymbol:e=>e===ge,isArgumentsSymbol:e=>e===Ee,isUnknownSymbol:e=>e===ht,getMergedSymbol:ts,symbolIsValue:ds,getDiagnostics:wR,getGlobalDiagnostics:function(){return ER(),ro.getGlobalDiagnostics()},getRecursionIdentity:Rk,getUnmatchedProperties:sw,getTypeOfSymbolAtLocation:(e,t)=>{const n=hc(t);return n?function(e,t){if(e=_s(e),(80===t.kind||81===t.kind)&&(Cb(t)&&(t=t.parent),Tm(t)&&(!eh(t)||yx(t)))){const n=_C(yx(t)&&211===t.kind?wA(t,void 0,!0):qM(t));if(_s(Wo(t).resolvedSymbol)===e)return n}return dh(t)&&A_(t.parent)&&Pl(t.parent)?Il(t.parent.symbol):wb(t)&&yx(t.parent)?zl(e):ql(e)}(e,n):Dt},getTypeOfSymbol:$l,getSymbolsOfParameterPropertyDeclaration:(e,t)=>{const n=hc(e,sE);return void 0===n?xn.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):(xn.assert(rc(n,n.parent)),function(e,t){const n=e.parent,r=e.parent.parent,i=Ho(n.locals,t,111551),o=Ho(m_(r.symbol),t,111551);return i&&o?[i,o]:xn.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(n,yc(t)))},getDeclaredTypeOfSymbol:ju,getPropertiesOfType:Rd,getPropertyOfType:(e,t)=>Jp(e,yc(t)),getPrivateIdentifierPropertyOfType:(e,t,n)=>{const r=hc(n);if(!r)return;const i=PA(yc(t),r);return i?FA(e,i):void 0},getTypeOfPropertyOfType:(e,t)=>Tc(e,yc(t)),getIndexInfoOfType:(e,t)=>_f(e,0===t?Jt:zt),getIndexInfosOfType:cf,getIndexInfosOfIndexSymbol:Wm,getSignaturesOfType:Vp,getIndexTypeOfType:(e,t)=>pf(e,0===t?Jt:zt),getIndexType:e=>Av(e),getBaseTypes:ku,getBaseTypeOfLiteralType:cT,getWidenedType:RC,getWidenedLiteralType:dT,getTypeFromTypeNode:e=>{const t=hc(e,wu);return t?Sx(t):Dt},getParameterType:DO,getParameterIdentifierInfoAtPosition:function(e,t){var n;if(317===(null==(n=e.declaration)?void 0:n.kind))return;const r=e.parameters.length-(JB(e)?1:0);if(tSL(e),getReturnTypeOfSignature:Gf,isNullableType:vA,getNullableType:KT,getNonNullableType:QT,getNonOptionalType:_C,getTypeArguments:Ig,typeToTypeNode:se.typeToTypeNode,indexInfoToIndexSignatureDeclaration:se.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:se.signatureToSignatureDeclaration,symbolToEntityName:se.symbolToEntityName,symbolToExpression:se.symbolToExpression,symbolToNode:se.symbolToNode,symbolToTypeParameterDeclarations:se.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:se.symbolToParameterDeclaration,typeParameterToDeclaration:se.typeParameterToDeclaration,getSymbolsInScope:(e,t)=>{const n=hc(e);return n?function(e,t){if(67108864&e.flags)return[];const n=ed();let r=!1;return function(){for(;e;){switch(f_(e)&&e.locals&&!Yp(e)&&o(e.locals,t),e.kind){case 307:if(!qI(e))break;case 267:a(ns(e).exports,2623475&t);break;case 266:o(ns(e).exports,8&t);break;case 231:e.name&&i(e.symbol,t);case 263:case 264:r||o(m_(ns(e)),788968&t);break;case 218:e.name&&i(e.symbol,t)}Bf(e)&&i(Ee,t),r=Jv(e),e=e.parent}o(de,t)}(),n.delete("this"),yf(n);function i(e,t){if(gx(e)&t){const t=e.escapedName;n.has(t)||n.set(t,e)}}function o(e,t){t&&e.forEach((e=>{i(e,t)}))}function a(e,t){t&&e.forEach((e=>{Y_(e,281)||Y_(e,280)||"default"===e.escapedName||i(e,t)}))}}(n,t):[]},getSymbolAtLocation:e=>{const t=hc(e);return t?JR(t,!0):void 0},getIndexInfosAtLocation:e=>{const t=hc(e);return t?function(e){if(qD(e)&&GE(e.parent)&&e.parent.name===e){const t=Tv(e),n=qM(e.parent.expression);return R(1048576&n.flags?n.types:[n],(e=>F(cf(e),(e=>af(t,e.keyType)))))}}(t):void 0},getShorthandAssignmentValueSymbol:e=>{const t=hc(e);return t?function(e){if(e&&304===e.kind)return Ma(e.name,2208703)}(t):void 0},getExportSpecifierLocalTargetSymbol:e=>{const t=hc(e,yN);return t?function(e){return yN(e)?e.parent.parent.moduleSpecifier?ba(e.parent.parent,e):Ma(e.propertyName||e.name,2998271):Ma(e,2998271)}(t):void 0},getExportSymbolOfSymbol:e=>ts(e.exportSymbol||e),getTypeAtLocation:e=>{const t=hc(e);return t?zR(t):Dt},getTypeOfAssignmentPattern:e=>{const t=hc(e,Pu);return t&&$R(t)||Dt},getPropertySymbolOfDestructuringAssignment:e=>{const t=hc(e,qD);return t?function(e){const t=$R(ut(e.parent.parent,Pu));return t&&Jp(t,e.escapedText)}(t):void 0},signatureToString:(e,t,n,r)=>Ks(e,hc(t),n,r),typeToString:(e,t,n)=>Ws(e,hc(t),n),symbolToString:(e,t,n,r)=>Us(e,hc(t),n,r),typePredicateToString:(e,t,n)=>Zs(e,hc(t),n),writeSignature:(e,t,n,r,i)=>Ks(e,hc(t),n,r,i),writeType:(e,t,n,r)=>Ws(e,hc(t),n,r),writeSymbol:(e,t,n,r,i)=>Us(e,hc(t),n,r,i),writeTypePredicate:(e,t,n,r)=>Zs(e,hc(t),n,r),getAugmentedPropertiesOfType:KR,getRootSymbols:function e(t){const n=function(e){if(6&px(e))return q(Uo(e).containingType.types,(t=>Jp(t,e.escapedName)));if(33554432&e.flags){const{links:{leftSpread:t,rightSpread:n,syntheticOrigin:r}}=e;return t?[t,n]:r?[r]:fn(function(e){let t,n=e;for(;n=Uo(n).target;)t=n;return t}(e))}}(t);return n?R(n,e):[t]},getSymbolOfExpando:oO,getContextualType:(e,t)=>{const n=hc(e,Xu);if(n)return 4&t?qe(n,(()=>dF(n,t))):dF(n,t)},getContextualTypeForObjectLiteralElement:e=>{const t=hc(e,Cu);return t?HN(t,void 0):void 0},getContextualTypeForArgumentAtIndex:(e,t)=>{const n=hc(e,zu);return n&&PN(n,t)},getContextualTypeForJsxAttribute:e=>{const t=hc(e,C_);return t&&XN(t,void 0)},isContextSensitive:lS,getTypeOfPropertyOfContextualType:LN,getFullyQualifiedName:Oa,getResolvedSignature:(e,t,n)=>Ve(e,t,n,0),getCandidateSignaturesForStringLiteralCompletions:function(e,t){const n=new Set,r=[];qe(t,(()=>Ve(e,r,void 0,0)));for(const e of r)n.add(e);r.length=0,Je(t,(()=>Ve(e,r,void 0,0)));for(const e of r)n.add(e);return $e(n)},getResolvedSignatureForSignatureHelp:(e,t,n)=>Je(e,(()=>Ve(e,t,n,16))),getExpandedParameters:w_,hasEffectiveRestParameter:IO,containsArgumentsReference:Ef,getConstantValue:e=>{const t=hc(e,sB);return t?cB(t):void 0},isValidPropertyAccess:(e,t)=>{const n=hc(e,Ru);return!!n&&function(e,t){switch(e.kind){case 211:return ZA(e,108===e.expression.kind,t,RC(KM(e.expression)));case 166:return ZA(e,!1,t,RC(KM(e.left)));case 205:return ZA(e,!1,t,Sx(e))}}(n,yc(t))},isValidPropertyAccessForCompletions:(e,t,n)=>{const r=hc(e,GE);return!!r&&YA(r,t,n)},getSignatureFromDeclaration:e=>{const t=hc(e,cu);return t?Cf(t):void 0},isImplementationOfOverload:e=>{const t=hc(e,cu);return t?tB(t):void 0},getImmediateAliasedSymbol:jF,getAliasedSymbol:Ea,getEmitResolver:function(e,t,n){return n||wR(e,t),ae},requiresAddingImplicitUndefined:nB,getExportsOfModule:Ka,getExportsAndPropertiesOfModule:function(e){const t=Ka(e),n=$a(e);if(n!==e){const e=$l(n);Ha(e)&&pe(t,Rd(e))}return t},forEachExportAndPropertyOfModule:function(e,t){Qa(e).forEach(((e,n)=>{vs(n)||t(e,n)}));const n=$a(e);if(n!==e){const e=$l(n);Ha(e)&&function(e,n){3670016&(e=yp(e)).flags&&Od(e).members.forEach(((e,n)=>{xs(e,n)&&((e,n)=>{t(e,n)})(e,n)}))}(e)}},getSymbolWalker:BR((function(e){return lm(e)||St}),Wf,Gf,ku,Od,$l,Nw,Jd,bb,Ig),getAmbientModules:function(){return qn||(qn=[],de.forEach(((e,t)=>{vB.test(t)&&qn.push(e)}))),qn},getJsxIntrinsicTagNamesAt:function(e){const t=UF(hB.IntrinsicElements,e);return t?Rd(t):u},isOptionalParameter:e=>{const t=hc(e,sE);return!!t&&xf(t)},tryGetMemberInModuleExports:(e,t)=>Wa(yc(e),t),tryGetMemberInModuleExportsAndProperties:(e,t)=>function(e,t){const n=Wa(e,t);if(n)return n;const r=$a(t);if(r===t)return;const i=$l(r);return Ha(i)?Jp(i,e):void 0}(yc(e),t),tryFindAmbientModule:e=>vf(e,!0),tryFindAmbientModuleWithoutAugmentations:e=>vf(e,!1),getApparentType:mp,getUnionType:ev,isTypeAssignableTo:SS,createAnonymousType:ks,createSignature:x_,createSymbol:No,createIndexInfo:Vm,getAnyType:()=>St,getStringType:()=>Jt,getStringLiteralType:lx,getNumberType:()=>zt,getNumberLiteralType:ux,getBigIntType:()=>$t,createPromiseType:UO,createArrayType:Ty,getElementTypeOfArrayType:Wk,getBooleanType:()=>Xt,getFalseType:e=>e?qt:Vt,getTrueType:e=>e?Kt:Ht,getVoidType:()=>Zt,getUndefinedType:()=>It,getNullType:()=>Rt,getESSymbolType:()=>Qt,getNeverType:()=>en,getOptionalType:()=>jt,getPromiseType:()=>_y(!1),getPromiseLikeType:()=>dy(!1),getAsyncIterableType:()=>{const e=fy(!1);if(e!==An)return e},isSymbolAccessible:Is,isArrayType:qk,isTupleType:PT,isArrayLikeType:Hk,isEmptyAnonymousObjectType:ok,isTypeInvalidDueToUnionDiscriminant:function(e,t){return t.properties.some((t=>{const n=t.name&&(ON(t.name)?lx(uC(t.name)):Tv(t.name)),r=n&&mC(n)?gC(n):void 0,i=void 0===r?void 0:Tc(e,r);return!!i&&sT(i)&&!SS(zR(t),i)}))},getExactOptionalProperties:function(e){return Rd(e).filter((e=>DC($l(e))))},getAllPossiblePropertiesOfTypes:function(e){const t=ev(e);if(!(1048576&t.flags))return KR(t);const n=ed();for(const r of e)for(const{escapedName:e}of KR(r))if(!n.has(e)){const r=vp(t,e);r&&n.set(e,r)}return $e(n.values())},getSuggestedSymbolForNonexistentProperty:qA,getSuggestedSymbolForNonexistentJSXAttribute:VA,getSuggestedSymbolForNonexistentSymbol:(e,t,n)=>WA(e,yc(t),n),getSuggestedSymbolForNonexistentModule:HA,getSuggestedSymbolForNonexistentClassMember:$A,getBaseConstraintOfType:Wd,getDefaultFromTypeParameter:e=>e&&262144&e.flags?np(e):void 0,resolveName:(e,t,n,r)=>je(t,yc(e),n,void 0,!1,r),getJsxNamespace:e=>vc(go(e)),getJsxFragmentFactory:e=>{const t=mB(e);return t&&vc(bb(t).escapedText)},getAccessibleSymbolChain:Es,getTypePredicateOfSignature:Wf,resolveExternalModuleName:e=>{const t=hc(e,Xu);return t&&ja(t,t,!0)},resolveExternalModuleSymbol:$a,tryGetThisTypeAt:(e,t,n)=>{const r=hc(e);return r&&UP(r,t,n)},getTypeArgumentConstraint:e=>{const t=hc(e,wu);return t&&function(e){const t=lt(e.parent,B_);if(!t)return;const n=sL(t);if(!n)return;const r=Jd(n[t.typeArguments.indexOf(e)]);return r&&eS(r,Fx(n,oL(t,n)))}(t)},getSuggestionDiagnostics:(n,r)=>{const i=hc(n,qN)||xn.fail("Could not determine parsed source file.");if(yT(i,A,e))return u;let o;try{return t=r,PR(i),xn.assert(!!(1&Wo(i).flags)),o=pe(o,io.getDiagnostics(i.fileName)),LL(CR(i),((e,t,n)=>{xd(e)||TR(t,!!(33554432&e.flags))||(o||(o=[])).push({...n,category:2})})),o||u}finally{t=void 0}},runWithCancellationToken:(e,n)=>{try{return t=e,n(Be)}finally{t=void 0}},getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:nu,isDeclarationVisible:sc,isPropertyAccessible:eI,getTypeOnlyAliasDeclaration:Aa,getMemberOverrideModifierStatus:function(e,t,n){if(!t.name)return 0;const r=ns(e),i=ju(r),o=y_(i),a=$l(r),s=Sh(e)&&ku(i),c=(null==s?void 0:s.length)?y_(Te(s),i.thisType):void 0;return Qj(e,a,xu(i),c,i,o,t.parent?$v(t):Bv(t,16),qv(t),Jv(t),!1,Sc(n))},isTypeParameterPossiblyReferenced:Wx,typeHasCallOrConstructSignatures:WR,getSymbolFlags:Pa};function Je(e,t){if(e=mc(e,Ju)){const n=[],r=[];for(;e;){const t=Wo(e);if(n.push([t,t.resolvedSignature]),t.resolvedSignature=void 0,UT(e)){const t=Uo(ns(e)),n=t.type;r.push([t,n]),t.type=void 0}e=mc(e.parent,Ju)}const i=t();for(const[e,t]of n)e.resolvedSignature=t;for(const[e,t]of r)e.type=t;return i}return t()}function qe(e,t){const n=mc(e,zu);if(n){let t=e;do{Wo(t).skipDirectInference=!0,t=t.parent}while(t&&t!==n)}b=!0;const r=Je(e,t);if(b=!1,n){let t=e;do{Wo(t).skipDirectInference=void 0,t=t.parent}while(t&&t!==n)}return r}function Ve(e,t,n,r){const i=hc(e,zu);ye=n;const o=i?nO(i,t,r):void 0;return ye=void 0,o}var Ue=new Map,Ke=new Map,Ge=new Map,Xe=new Map,Qe=new Map,Ye=new Map,tt=new Map,nt=new Map,rt=new Map,it=new Map,at=new Map,ct=new Map,_t=new Map,dt=new Map,pt=new Map,ft=[],mt=new Map,gt=new Set,ht=No(4,"unknown"),yt=No(0,"__resolving__"),vt=new Map,bt=new Map,xt=new Set,St=gs(1,"any"),kt=gs(1,"any",262144,"auto"),Tt=gs(1,"any",void 0,"wildcard"),Ct=gs(1,"any",void 0,"blocked string"),Dt=gs(1,"error"),Et=gs(1,"unresolved"),Pt=gs(1,"any",65536,"non-inferrable"),Ft=gs(1,"intrinsic"),At=gs(2,"unknown"),It=gs(32768,"undefined"),Ot=U?It:gs(32768,"undefined",65536,"widening"),Mt=gs(32768,"undefined",void 0,"missing"),Lt=ie?Mt:It,jt=gs(32768,"undefined",void 0,"optional"),Rt=gs(65536,"null"),Bt=U?Rt:gs(65536,"null",65536,"widening"),Jt=gs(4,"string"),zt=gs(8,"number"),$t=gs(64,"bigint"),qt=gs(512,"false",void 0,"fresh"),Vt=gs(512,"false"),Kt=gs(512,"true",void 0,"fresh"),Ht=gs(512,"true");Kt.regularType=Ht,Kt.freshType=Kt,Ht.regularType=Ht,Ht.freshType=Kt,qt.regularType=Vt,qt.freshType=qt,Vt.regularType=Vt,Vt.freshType=qt;var Gt,Xt=ev([Vt,Ht]),Qt=gs(4096,"symbol"),Zt=gs(16384,"void"),en=gs(131072,"never"),tn=gs(131072,"never",262144,"silent"),nn=gs(131072,"never",void 0,"implicit"),rn=gs(131072,"never",void 0,"unreachable"),cn=gs(67108864,"object"),ln=ev([Jt,zt]),pn=ev([Jt,zt,Qt]),mn=ev([zt,$t]),hn=ev([Jt,zt,Xt,$t,Rt,It]),yn=Ov(["",""],[zt]),vn=Lx((e=>{return 262144&e.flags?!(t=e).constraint&&!cg(t)||t.constraint===On?t:t.restrictiveInstantiation||(t.restrictiveInstantiation=ys(t.symbol),t.restrictiveInstantiation.constraint=On,t.restrictiveInstantiation):e;var t}),(()=>"(restrictive mapper)")),bn=Lx((e=>262144&e.flags?Tt:e),(()=>"(permissive mapper)")),Sn=gs(131072,"never",void 0,"unique literal"),kn=Lx((e=>262144&e.flags?Sn:e),(()=>"(unique literal mapper)")),Tn=Lx((e=>(!Gt||e!==jn&&e!==Rn&&e!==Bn||Gt(!0),e)),(()=>"(unmeasurable reporter)")),Cn=Lx((e=>(!Gt||e!==jn&&e!==Rn&&e!==Bn||Gt(!1),e)),(()=>"(unreliable reporter)")),wn=ks(void 0,w,u,u,u),Dn=ks(void 0,w,u,u,u);Dn.objectFlags|=2048;var En=No(2048,"__type");En.members=ed();var Pn=ks(En,w,u,u,u),Nn=ks(void 0,w,u,u,u),Fn=U?ev([It,Rt,Nn]):At,An=ks(void 0,w,u,u,u);An.instantiations=new Map;var In=ks(void 0,w,u,u,u);In.objectFlags|=262144;var On=ks(void 0,w,u,u,u),Mn=ks(void 0,w,u,u,u),Ln=ks(void 0,w,u,u,u),jn=ys(),Rn=ys();Rn.constraint=jn;var Bn=ys(),Jn=ys(),zn=ys();zn.constraint=Jn;var $n,qn,Vn,Un,Kn,Wn,Hn,Gn,Xn,Qn,Yn,Zn,er,tr,nr,rr,ir,ar,sr,cr,lr,ur,_r,dr,mr,gr,hr,yr,vr,br,xr,Sr,kr,Tr,Cr,wr,Dr,Er,Pr,Nr,Fr,Ar,Ir,Or,Mr,Lr,jr,Rr,Br,Jr,zr,$r,qr,Vr,Ur,Kr,Wr,Hr,Gr,Xr,Qr,Yr,Zr,ei=Sf(1,"<>",0,St),ti=x_(void 0,void 0,void 0,u,St,void 0,0,0),ni=x_(void 0,void 0,void 0,u,Dt,void 0,0,0),ri=x_(void 0,void 0,void 0,u,St,void 0,0,0),ii=x_(void 0,void 0,void 0,u,tn,void 0,0,0),oi=Vm(zt,Jt,!0),ai=new Map,si={get yieldType(){return xn.fail("Not supported")},get returnType(){return xn.fail("Not supported")},get nextType(){return xn.fail("Not supported")}},ci=hj(St,St,St),li=hj(St,St,At),ui=hj(en,St,It),_i={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:function(e){return Cr||(Cr=Xh("AsyncIterator",3,e))||An},getGlobalIterableType:fy,getGlobalIterableIteratorType:function(e){return wr||(wr=Xh("AsyncIterableIterator",1,e))||An},getGlobalGeneratorType:function(e){return Dr||(Dr=Xh("AsyncGenerator",3,e))||An},resolveIterationType:(e,t)=>SL(e,t,va.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),mustHaveANextMethodDiagnostic:va.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:va.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:va.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},di={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:function(e){return vr||(vr=Xh("Iterator",3,e))||An},getGlobalIterableType:my,getGlobalIterableIteratorType:function(e){return br||(br=Xh("IterableIterator",1,e))||An},getGlobalGeneratorType:function(e){return xr||(xr=Xh("Generator",3,e))||An},resolveIterationType:(e,t)=>e,mustHaveANextMethodDiagnostic:va.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:va.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:va.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},pi=new Map,fi=new Map,mi=0,gi=0,hi=0,yi=!1,vi=0,bi=[],xi=[],Si=[],ki=0,Ti=[],wi=[],Di=0,Ei=lx(""),Pi=ux(0),Ni=_x({negative:!1,base10Value:"0"}),Fi=[],Ai=[],Ii=[],Oi=0,Mi=!1,Li=0,ji=[],Ri=[],Bi=[],Ji=[],zi=[],$i=[],qi=[],Vi=[],Ui=[],Ki=[],Wi=[],Hi=[],Gi=[],Xi=[],Qi=[],Yi=[],Zi=[],eo=[],to=[],no=0,ro=by(),io=by(),oo=ev($e(wB.keys(),lx)),ao=new Map,so=new Map,co=new Map,lo=new Map,uo=new Map,_o=new Map,po=[[".mts",".mjs"],[".ts",".js"],[".cts",".cjs"],[".mjs",".mjs"],[".js",".js"],[".cjs",".cjs"],[".tsx",1===A.jsx?".jsx":".js"],[".jsx",".jsx"],[".json",".json"]];return function(){for(const t of e.getSourceFiles())IR(t,A);let t;$n=new Map;for(const n of e.getSourceFiles())if(!n.redirectInfo){if(!Zp(n)){const e=n.locals.get("globalThis");if(null==e?void 0:e.declarations)for(const t of e.declarations)ro.add(Rp(t,va.Declaration_name_conflicts_with_built_in_global_identifier_0,"globalThis"));qo(de,n.locals)}n.jsGlobalAugmentations&&qo(de,n.jsGlobalAugmentations),n.patternAmbientModules&&n.patternAmbientModules.length&&(Vn=Z(Vn,n.patternAmbientModules)),n.moduleAugmentations.length&&(t||(t=[])).push(n.moduleAugmentations),n.symbol&&n.symbol.globalExports&&n.symbol.globalExports.forEach(((e,t)=>{de.has(t)||de.set(t,e)}))}if(t)for(const e of t)for(const t of e)pp(t.parent)&&Vo(t);if(function(){const e=ge.escapedName,t=de.get(e);t?f(t.declarations,(t=>{YT(t)||ro.add(Rp(t,va.Declaration_name_conflicts_with_built_in_global_identifier_0,vc(e)))})):de.set(e,ge)}(),Uo(ge).type=Ot,Uo(Ee).type=Xh("IArguments",0,!0),Uo(ht).type=Dt,Uo(he).type=hs(16,he),Xn=Xh("Array",1,!0),Kn=Xh("Object",0,!0),Wn=Xh("Function",0,!0),Hn=G&&Xh("CallableFunction",0,!0)||Wn,Gn=G&&Xh("NewableFunction",0,!0)||Wn,Yn=Xh("String",0,!0),Zn=Xh("Number",0,!0),er=Xh("Boolean",0,!0),tr=Xh("RegExp",0,!0),rr=Ty(St),(ir=Ty(kt))===wn&&(ir=ks(void 0,w,u,u,u)),Qn=hy("ReadonlyArray",1)||Xn,ar=Qn?xy(Qn,[St]):rr,nr=hy("ThisType",1),t)for(const e of t)for(const t of e)pp(t.parent)||Vo(t);$n.forEach((({firstFile:e,secondFile:t,conflictingSymbols:n})=>{if(n.size<8)n.forEach((({isBlockScoped:e,firstFileLocations:t,secondFileLocations:n},r)=>{const i=e?va.Cannot_redeclare_block_scoped_variable_0:va.Duplicate_identifier_0;for(const e of t)$o(e,i,r,n);for(const e of n)$o(e,i,r,t)}));else{const r=$e(n.keys()).join(", ");ro.add(fT(Rp(e,va.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,r),Rp(t,va.Conflicts_are_in_this_file))),ro.add(fT(Rp(t,va.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0,r),Rp(e,va.Conflicts_are_in_this_file)))}})),$n=void 0}(),Be;function fo(e){return e?pt.get(e):void 0}function mo(e,t){return e&&pt.set(e,t),t}function go(e){if(e){const t=Sd(e);if(t)if(EN(e)){if(t.localJsxFragmentNamespace)return t.localJsxFragmentNamespace;const n=t.pragmas.get("jsxfrag");if(n){const e=ot(n)?n[0]:n;if(t.localJsxFragmentFactory=zI(e.arguments.factory,M),qB(t.localJsxFragmentFactory,yo,ou),t.localJsxFragmentFactory)return t.localJsxFragmentNamespace=bb(t.localJsxFragmentFactory).escapedText}const r=mB(e);if(r)return t.localJsxFragmentFactory=r,t.localJsxFragmentNamespace=bb(r).escapedText}else{const e=ho(t);if(e)return t.localJsxNamespace=e}}return Yr||(Yr="React",A.jsxFactory?(qB(Zr=zI(A.jsxFactory,M),yo),Zr&&(Yr=bb(Zr).escapedText)):A.reactNamespace&&(Yr=yc(A.reactNamespace))),Zr||(Zr=YC.createQualifiedName(YC.createIdentifier(vc(Yr)),"createElement")),Yr}function ho(e){if(e.localJsxNamespace)return e.localJsxNamespace;const t=e.pragmas.get("jsx");if(t){const n=ot(t)?t[0]:t;if(e.localJsxFactory=zI(n.arguments.factory,M),qB(e.localJsxFactory,yo,ou),e.localJsxFactory)return e.localJsxNamespace=bb(e.localJsxFactory).escapedText}}function yo(e){return FT(e,-1,-1),ZB(e,yo,void 0)}function vo(e,t,n,...r){const i=xo(t,n,...r);return i.skippedOn=e,i}function bo(e,t,...n){return e?Rp(e,t,...n):cS(t,...n)}function xo(e,t,...n){const r=bo(e,t,...n);return ro.add(r),r}function So(e,t){e?ro.add(t):io.add({...t,category:2})}function ko(e,t,n,...r){if(t.pos<0||t.end<0){if(!e)return;const i=Sd(t);So(e,"message"in n?aS(i,0,0,n,...r):Up(i,n))}else So(e,"message"in n?Rp(t,n,...r):zp(Sd(t),t,n))}function To(e,t,n,...r){const i=xo(e,n,...r);return t&&fT(i,Rp(e,va.Did_you_forget_to_use_await)),i}function Co(e,t){const n=Array.isArray(e)?f(e,Yc):Yc(e);return n&&fT(t,Rp(n,va.The_declaration_was_marked_as_deprecated_here)),io.add(t),t}function wo(e){const t=is(e);return t&&p(e.declarations)>1?64&t.flags?Q(e.declarations,Do):x(e.declarations,Do):!!e.valueDeclaration&&Do(e.valueDeclaration)||p(e.declarations)&&x(e.declarations,Do)}function Do(e){return!!(536870912&xJ(e))}function Eo(e,t,n){return Co(t,Rp(e,va._0_is_deprecated,n))}function No(e,t,n){d++;const r=new s(33554432|e,t);return r.links=new FB,r.links.checkFlags=n||0,r}function Oo(e,t){const n=No(1,e);return n.links.type=t,n}function Mo(e,t){const n=No(4,e);return n.links.type=t,n}function Lo(e){let t=0;return 2&e&&(t|=111551),1&e&&(t|=111550),4&e&&(t|=0),8&e&&(t|=900095),16&e&&(t|=110991),32&e&&(t|=899503),64&e&&(t|=788872),256&e&&(t|=899327),128&e&&(t|=899967),512&e&&(t|=110735),8192&e&&(t|=103359),32768&e&&(t|=46015),65536&e&&(t|=78783),262144&e&&(t|=526824),524288&e&&(t|=788968),2097152&e&&(t|=2097152),t}function jo(e,t){t.mergeId||(t.mergeId=kB,kB++),ji[t.mergeId]=e}function Bo(e){const t=No(e.flags,e.escapedName);return t.declarations=e.declarations?e.declarations.slice():[],t.parent=e.parent,e.valueDeclaration&&(t.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(t.constEnumOnlyModule=!0),e.members&&(t.members=new Map(e.members)),e.exports&&(t.exports=new Map(e.exports)),jo(t,e),t}function Jo(e,t,n=!1){if(!(e.flags&Lo(t.flags))||67108864&(t.flags|e.flags)){if(t===e)return e;if(!(33554432&e.flags)){const n=Da(e);if(n===ht)return t;if(n.flags&Lo(t.flags)&&!(67108864&(t.flags|n.flags)))return r(e,t),t;e=Bo(n)}512&t.flags&&512&e.flags&&e.constEnumOnlyModule&&!t.constEnumOnlyModule&&(e.constEnumOnlyModule=!1),e.flags|=t.flags,t.valueDeclaration&&bg(e,t.valueDeclaration),pe(e.declarations,t.declarations),t.members&&(e.members||(e.members=ed()),qo(e.members,t.members,n)),t.exports&&(e.exports||(e.exports=ed()),qo(e.exports,t.exports,n)),n||jo(e,t)}else 1024&e.flags?e!==he&&xo(t.declarations&&Pc(t.declarations[0]),va.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity,Us(e)):r(e,t);return e;function r(e,t){const n=!!(384&e.flags||384&t.flags),r=!!(2&e.flags||2&t.flags),o=n?va.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:r?va.Cannot_redeclare_block_scoped_variable_0:va.Duplicate_identifier_0,a=t.declarations&&Sd(t.declarations[0]),s=e.declarations&&Sd(e.declarations[0]),c=Td(a,A.checkJs),l=Td(s,A.checkJs),u=Us(t);if(a&&s&&$n&&!n&&a!==s){const n=-1===ca(a.path,s.path)?a:s,o=n===a?s:a,_=K($n,`${n.path}|${o.path}`,(()=>({firstFile:n,secondFile:o,conflictingSymbols:new Map}))),d=K(_.conflictingSymbols,u,(()=>({isBlockScoped:r,firstFileLocations:[],secondFileLocations:[]})));c||i(d.firstFileLocations,t),l||i(d.secondFileLocations,e)}else c||zo(t,o,u,e),l||zo(e,o,u,t)}function i(e,t){if(t.declarations)for(const n of t.declarations)fe(e,n)}}function zo(e,t,n,r){f(e.declarations,(e=>{$o(e,t,n,r.declarations)}))}function $o(e,t,n,r){const i=(Ym(e,!1)?eg(e):Pc(e))||e,o=function(e,t,...n){const r=e?Rp(e,t,...n):cS(t,...n);return ro.lookup(r)||(ro.add(r),r)}(i,t,n);for(const e of r||u){const t=(Ym(e,!1)?eg(e):Pc(e))||e;if(t===i)continue;o.relatedInformation=o.relatedInformation||[];const r=Rp(t,va._0_was_also_declared_here,n),a=Rp(t,va.and_here);p(o.relatedInformation)>=5||Q(o.relatedInformation,(e=>0===pS(e,a)||0===pS(e,r)))||fT(o,p(o.relatedInformation)?a:r)}}function qo(e,t,n=!1){t.forEach(((t,r)=>{const i=e.get(r);e.set(r,i?Jo(i,t,n):ts(t))}))}function Vo(e){var t,n,r;const i=e.parent;if((null==(t=i.symbol.declarations)?void 0:t[0])===i)if(pp(i))qo(de,i.symbol.exports);else{let t=Ba(e,e,33554432&e.parent.parent.flags?void 0:va.Invalid_module_name_in_augmentation_module_0_cannot_be_found,!0);if(!t)return;if(t=$a(t),1920&t.flags)if(Q(Vn,(e=>t===e.symbol))){const n=Jo(i.symbol,t,!0);Un||(Un=new Map),Un.set(e.text,n)}else{if((null==(n=t.exports)?void 0:n.get("__export"))&&(null==(r=i.symbol.exports)?void 0:r.size)){const e=__(t,"resolvedExports");for(const[n,r]of $e(i.symbol.exports.entries()))e.has(n)&&!t.exports.has(n)&&Jo(e.get(n),r)}Jo(t,i.symbol)}else xo(e,va.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,e.text)}else xn.assert(i.symbol.declarations.length>1)}function Uo(e){if(33554432&e.flags)return e.links;const t=OB(e);return Ri[t]??(Ri[t]=new FB)}function Wo(e){const t=IB(e);return Bi[t]||(Bi[t]=new AB)}function Ho(e,t,n){if(n){const r=ts(e.get(t));if(r){if(r.flags&n)return r;if(2097152&r.flags&&Pa(r)&n)return r}}}function Xo(t,n){const r=Sd(t),i=Sd(n),o=Np(t);if(r!==i){if(B&&(r.externalModuleIndicator||i.externalModuleIndicator)||!A.outFile||vv(n)||33554432&t.flags)return!0;if(a(n,t))return!0;const o=e.getSourceFiles();return o.indexOf(r)<=o.indexOf(i)}if(16777216&n.flags||vv(n)||Fw(n))return!0;if(t.pos<=n.pos&&(!uE(t)||!_m(n.parent)||t.initializer||t.exclamationToken)){if(208===t.kind){const e=Eh(n,208);return e?mc(e,KE)!==mc(t,KE)||t.pose===t?"quit":oE(e)?e.parent.parent===t:!J&&cE(e)&&(e.parent===t||dE(e.parent)&&e.parent.parent===t||yl(e.parent)&&e.parent.parent===t||uE(e.parent)&&e.parent.parent===t||sE(e.parent)&&e.parent.parent.parent===t)));return!e||!(J||!cE(e))&&!!mc(n,(t=>t===e?"quit":cu(t)&&!cm(t)))}return uE(t)?!s(t,n,!1):!rc(t,t.parent)||!($&&Zf(t)===Zf(n)&&a(n,t))}return!(!(281===n.parent.kind||277===n.parent.kind&&n.parent.isExportEquals)&&(277!==n.kind||!n.isExportEquals)&&(!a(n,t)||$&&Zf(t)&&(uE(t)||rc(t,t.parent))&&s(t,n,!0)));function a(e,t){return!!mc(e,(n=>{if(n===o)return"quit";if(cu(n))return!0;if(pE(n))return t.pos=r&&o.pos<=i){const n=YC.createPropertyAccessExpression(YC.createThis(),e);if(OT(n.expression,n),OT(n,o),n.flowNode=o.returnFlowNode,!ak(XD(n,t,XT(t))))return!0}return!1}(e,$l(ns(t)),F(t.parent.members,pE),t.parent.pos,n.pos))return!0}}else if(172!==t.kind||Jv(t)||Zf(e)!==Zf(t))return!0;return!1}))}function s(e,t,n){return!(t.end>e.end)&&void 0===mc(t,(t=>{if(t===e)return"quit";switch(t.kind){case 219:return!0;case 172:return!n||!(uE(e)&&t.parent===e.parent||rc(e,e.parent)&&t.parent===e.parent.parent)||"quit";case 241:switch(t.parent.kind){case 177:case 174:case 178:return!0;default:return!1}default:return!1}}))}}function Qo(e){return Wo(e).declarationRequiresScopeChange}function Yo(e,t){Wo(e).declarationRequiresScopeChange=t}function Zo(e,t,n){return t?fT(e,Rp(t,281===t.kind||278===t.kind||280===t.kind?va._0_was_exported_here:va._0_was_imported_here,n)):e}function ea(e){return st(e)?vc(e):Ap(e)}function ta(e,t,n){if(!qD(e)||e.escapedText!==t||NR(e)||vv(e))return!1;const r=rm(e,!1,!1);let i=r;for(;i;){if(gu(i.parent)){const o=ns(i.parent);if(!o)break;if(Jp($l(o),t))return xo(e,va.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,ea(n),Us(o)),!0;if(i===r&&!Jv(i)&&Jp(ju(o).thisType,t))return xo(e,va.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,ea(n)),!0}i=i.parent}return!1}function na(e){const t=ra(e);return!(!t||!Ma(t,64,!0)||(xo(e,va.Cannot_extend_an_interface_0_Did_you_mean_implements,Gd(t)),0))}function ra(e){switch(e.kind){case 80:case 211:return e.parent?ra(e.parent):void 0;case 233:if(vb(e.expression))return e.expression;default:return}}function ia(e){return"any"===e||"string"===e||"number"===e||"boolean"===e||"never"===e||"unknown"===e}function oa(e,t,n){return!!t&&!!mc(e,(e=>e===t||!!(e===n||cu(e)&&(!cm(e)||3&Jh(e)))&&"quit"))}function aa(e){switch(e.kind){case 271:return e;case 273:return e.parent;case 274:return e.parent.parent;case 276:return e.parent.parent.parent;default:return}}function sa(e){return e.declarations&&k(e.declarations,la)}function la(e){return 271===e.kind||270===e.kind||273===e.kind&&!!e.name||274===e.kind||280===e.kind||276===e.kind||281===e.kind||277===e.kind&&vh(e)||uP(e)&&2===ag(e)&&vh(e)||Ox(e)&&uP(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind&&ua(e.parent.right)||304===e.kind||303===e.kind&&ua(e.initializer)||260===e.kind&&$m(e)||208===e.kind&&$m(e.parent.parent)}function ua(e){return yh(e)||nP(e)&&rO(e)}function _a(e,t,n,r){const i=e.exports.get("export="),o=i?Jp($l(i),t,!0):e.exports.get(t),a=Da(o,r);return Na(n,o,a,!1),a}function da(e){return mN(e)&&!e.isExportEquals||Bv(e,2048)||yN(e)||dN(e)}function pa(t){return $_(t)?e.getModeForUsageLocation(Sd(t),t):void 0}function fa(e,t){return 99===e&&1===t}function ma(e){return 99===pa(e)&&Wt(e.text,".json")}function ga(e,t,n,r){const i=e&&pa(r);if(e&&void 0!==i&&100<=B&&B<=199){const t=fa(i,e.impliedNodeFormat);if(99===i||t)return t}if(!V)return!1;if(!e||e.isDeclarationFile){const e=_a(t,"default",void 0,!0);return!(e&&Q(e.declarations,da)||_a(t,yc("__esModule"),void 0,n))}return Im(e)?"object"!=typeof e.externalModuleIndicator&&!_a(t,yc("__esModule"),void 0,n):Ua(t)}function ha(e,t,n){var r;let i;i=_p(e)?e:_a(e,"default",t,n);const o=null==(r=e.declarations)?void 0:r.find(qN),a=ya(t);if(!a)return i;const s=ma(a),c=ga(o,e,n,a);if(i||c||s){if(c||s){const r=$a(e,n)||Da(e,n);return Na(t,e,r,!1),r}}else if(Ua(e)&&!V){const n=B>=5?"allowSyntheticDefaultImports":"esModuleInterop",r=e.exports.get("export=").valueDeclaration,i=xo(t.name,va.Module_0_can_only_be_default_imported_using_the_1_flag,Us(e),n);r&&fT(i,Rp(r,va.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,n))}else oN(t)?function(e,t){var n,r,i;if(null==(n=e.exports)?void 0:n.has(t.symbol.escapedName))xo(t.name,va.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,Us(e),Us(t.symbol));else{const n=xo(t.name,va.Module_0_has_no_default_export,Us(e)),o=null==(r=e.exports)?void 0:r.get("__export");if(o){const e=null==(i=o.declarations)?void 0:i.find((e=>{var t,n;return!!(gN(e)&&e.moduleSpecifier&&(null==(n=null==(t=ja(e,e.moduleSpecifier))?void 0:t.exports)?void 0:n.has("default")))}));e&&fT(n,Rp(e,va.export_Asterisk_does_not_re_export_a_default))}}}(e,t):xa(e,e,t,Vl(t)&&t.propertyName||t.name);return Na(t,i,void 0,!1),i}function ya(e){switch(e.kind){case 273:return e.parent.moduleSpecifier;case 271:return SN(e.moduleReference)?e.moduleReference.expression:void 0;case 274:case 281:return e.parent.parent.moduleSpecifier;case 276:return e.parent.parent.parent.moduleSpecifier;default:return xn.assertNever(e)}}function ba(e,t,n=!1){var r;const i=Nm(e)||e.moduleSpecifier,o=ja(e,i),a=!GE(t)&&t.propertyName||t.name;if(!qD(a))return;const s=qa(o,i,!1,"default"===a.escapedText&&V);if(s&&a.escapedText){if(_p(o))return o;let c;c=o&&o.exports&&o.exports.get("export=")?Jp($l(s),a.escapedText,!0):function(e,t){if(3&e.flags){const n=e.valueDeclaration.type;if(n)return Da(Jp(Sx(n),t))}}(s,a.escapedText),c=Da(c,n);let l=function(e,t,n,r){var i;if(1536&e.flags){const o=Ga(e).get(t.escapedText),a=Da(o,r);return Na(n,o,a,!1,null==(i=Uo(e).typeOnlyExportStarMap)?void 0:i.get(t.escapedText),t.escapedText),a}}(s,a,t,n);if(void 0===l&&"default"===a.escapedText){const e=null==(r=o.declarations)?void 0:r.find(qN);(ma(i)||ga(e,o,n,i))&&(l=$a(o,n)||Da(o,n))}const u=l&&c&&l!==c?function(e,t){if(e===ht&&t===ht)return ht;if(790504&e.flags)return e;const n=No(e.flags|t.flags,e.escapedName);return xn.assert(e.declarations||t.declarations),n.declarations=ne(Z(e.declarations,t.declarations),wt),n.parent=e.parent||t.parent,e.valueDeclaration&&(n.valueDeclaration=e.valueDeclaration),t.members&&(n.members=new Map(t.members)),e.exports&&(n.exports=new Map(e.exports)),n}(c,l):l||c;return u||xa(o,s,e,a),u}}function xa(e,t,n,r){var i;const o=Oa(e,n),a=Ap(r),s=HA(r,t);if(void 0!==s){const e=Us(s),t=xo(r,va._0_has_no_exported_member_named_1_Did_you_mean_2,o,a,e);s.valueDeclaration&&fT(t,Rp(s.valueDeclaration,va._0_is_declared_here,e))}else(null==(i=e.exports)?void 0:i.has("default"))?xo(r,va.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,o,a):function(e,t,n,r,i){var o,a;const s=null==(a=null==(o=lt(r.valueDeclaration,f_))?void 0:o.locals)?void 0:a.get(t.escapedText),c=r.exports;if(s){const r=null==c?void 0:c.get("export=");if(r)us(r,s)?function(e,t,n,r){B>=5?xo(t,FS(A)?va._0_can_only_be_imported_by_using_a_default_import:va._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n):Mm(e)?xo(t,FS(A)?va._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:va._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n):xo(t,FS(A)?va._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:va._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,n,n,r)}(e,t,n,i):xo(t,va.Module_0_has_no_exported_member_1,i,n);else{const e=c?S(yf(c),(e=>!!us(e,s))):void 0,r=e?xo(t,va.Module_0_declares_1_locally_but_it_is_exported_as_2,i,n,Us(e)):xo(t,va.Module_0_declares_1_locally_but_it_is_not_exported,i,n);s.declarations&&fT(r,...O(s.declarations,((e,t)=>Rp(e,0===t?va._0_is_declared_here:va.and_here,n))))}}else xo(t,va.Module_0_has_no_exported_member_1,i,n)}(n,r,a,e,o)}function Sa(e){if(KP(e)&&e.initializer&&GE(e.initializer))return e.initializer}function ka(e,t,n){if("default"===bc(e.propertyName||e.name)){const t=ya(e),r=t&&ja(e,t);if(r)return ha(r,e,!!n)}const r=e.parent.parent.moduleSpecifier?ba(e.parent.parent,e,n):Ma(e.propertyName||e.name,t,!1,n);return Na(e,void 0,r,!1),r}function Ta(e,t){if(mP(e))return DM(e).symbol;if(!ou(e)&&!vb(e))return;return Ma(e,901119,!0,t)||(DM(e),Wo(e).resolvedSymbol)}function Ca(e,t=!1){switch(e.kind){case 271:case 260:return function(e,t){const n=Sa(e);if(n){const e=jx(n.expression).arguments[0];return qD(n.name)?Da(Jp(zf(e),n.name.escapedText)):void 0}if(KP(e)||283===e.moduleReference.kind){const t=ja(e,Nm(e)||Pm(e)),n=$a(t);return Na(e,t,n,!1),n}const r=Ia(e.moduleReference,t);return function(e,t){if(Na(e,void 0,t,!1)&&!e.isTypeOnly){const t=Aa(ns(e)),n=281===t.kind||278===t.kind,r=n?va.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:va.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type,i=n?va._0_was_exported_here:va._0_was_imported_here,o=278===t.kind?"*":vc(t.name.escapedText);fT(xo(e.moduleReference,r),Rp(t,i,o))}}(e,r),r}(e,t);case 273:return function(e,t){const n=ja(e,e.parent.moduleSpecifier);if(n)return ha(n,e,t)}(e,t);case 274:return function(e,t){const n=e.parent.parent.moduleSpecifier,r=ja(e,n),i=qa(r,n,t,!1);return Na(e,r,i,!1),i}(e,t);case 280:return function(e,t){const n=e.parent.moduleSpecifier,r=n&&ja(e,n),i=n&&qa(r,n,t,!1);return Na(e,r,i,!1),i}(e,t);case 276:case 208:return function(e,t){if(fN(e)&&"default"===bc(e.propertyName||e.name)){const n=ya(e),r=n&&ja(e,n);if(r)return ha(r,e,t)}const n=KE(e)?sy(e):e.parent.parent.parent,r=Sa(n),i=ba(n,r||e,t),o=e.propertyName||e.name;return r&&i&&qD(o)?Da(Jp($l(i),o.escapedText),t):(Na(e,void 0,i,!1),i)}(e,t);case 281:return ka(e,901119,t);case 277:case 226:return function(e,t){const n=Ta(mN(e)?e.expression:e.right,t);return Na(e,void 0,n,!1),n}(e,t);case 270:return function(e,t){if(p_(e.parent)){const n=$a(e.parent.symbol,t);return Na(e,void 0,n,!1),n}}(e,t);case 304:return Ma(e.name,901119,!0,t);case 303:return Ta(e.initializer,t);case 212:case 211:return function(e,t){if(uP(e.parent)&&e.parent.left===e&&64===e.parent.operatorToken.kind)return Ta(e.parent.right,t)}(e,t);default:return xn.fail()}}function wa(e,t=901119){return!(!e||2097152!=(e.flags&(2097152|t))&&!(2097152&e.flags&&67108864&e.flags))}function Da(e,t){return!t&&wa(e)?Ea(e):e}function Ea(e){xn.assert(0!=(2097152&e.flags),"Should only get Alias here.");const t=Uo(e);if(t.aliasTarget)t.aliasTarget===yt&&(t.aliasTarget=ht);else{t.aliasTarget=yt;const n=sa(e);if(!n)return xn.fail();const r=Ca(n);t.aliasTarget===yt?t.aliasTarget=r||ht:xo(n,va.Circular_definition_of_import_alias_0,Us(e))}return t.aliasTarget}function Pa(e,t,n){const r=t&&Aa(e),i=r&&gN(r),o=r&&(i?ja(r.moduleSpecifier,r.moduleSpecifier,!0):Ea(r.symbol)),a=i&&o?Qa(o):void 0;let s,c=n?0:e.flags;for(;2097152&e.flags;){const t=_s(Ea(e));if(!i&&t===o||(null==a?void 0:a.get(t.escapedName))===t)break;if(t===ht)return-1;if(t===e||(null==s?void 0:s.has(t)))break;2097152&t.flags&&(s?s.add(t):s=new Set([e,t])),c|=t.flags,e=t}return c}function Na(e,t,n,r,i,o){if(!e||GE(e))return!1;const a=ns(e);if(Wl(e))return Uo(a).typeOnlyDeclaration=e,!0;if(i){const e=Uo(a);return e.typeOnlyDeclaration=i,a.escapedName!==o&&(e.typeOnlyExportStarName=o),!0}const s=Uo(a);return Fa(s,t,r)||Fa(s,n,r)}function Fa(e,t,n){var r;if(t&&(void 0===e.typeOnlyDeclaration||n&&!1===e.typeOnlyDeclaration)){const n=(null==(r=t.exports)?void 0:r.get("export="))??t,i=n.declarations&&S(n.declarations,Wl);e.typeOnlyDeclaration=i??Uo(n).typeOnlyDeclaration??!1}return!!e.typeOnlyDeclaration}function Aa(e,t){var n;if(!(2097152&e.flags))return;const r=Uo(e);if(void 0===r.typeOnlyDeclaration){r.typeOnlyDeclaration=!1;const t=Da(e);Na(null==(n=e.declarations)?void 0:n[0],sa(e)&&jF(e),t,!0)}return void 0===t?r.typeOnlyDeclaration||void 0:r.typeOnlyDeclaration&&Pa(278===r.typeOnlyDeclaration.kind?Da(Qa(r.typeOnlyDeclaration.symbol.parent).get(r.typeOnlyExportStarName||e.escapedName)):Ea(r.typeOnlyDeclaration.symbol))&t?r.typeOnlyDeclaration:void 0}function Ia(e,t){return 80===e.kind&&Cb(e)&&(e=e.parent),80===e.kind||166===e.parent.kind?Ma(e,1920,!1,t):(xn.assert(271===e.parent.kind),Ma(e,901119,!1,t))}function Oa(e,t){return e.parent?Oa(e.parent,t)+"."+Us(e):Us(e,t,void 0,36)}function Ma(e,t,n,r,i){if(Nd(e))return;const o=1920|(Mm(e)?111551&t:0);let a;if(80===e.kind){const r=t===o||ly(e)?va.Cannot_find_namespace_0:Pw(bb(e)),s=Mm(e)&&!ly(e)?function(e,t){if(Nh(e.parent)){const n=function(e){if(mc(e,(e=>P_(e)||16777216&e.flags?Fg(e):"quit")))return;const t=Wg(e);if(t&&NP(t)&&yg(t.expression)){const e=ns(t.expression.left);if(e)return La(e)}if(t&&nP(t)&&yg(t.parent)&&NP(t.parent.parent)){const e=ns(t.parent.left);if(e)return La(e)}if(t&&($f(t)||BN(t))&&uP(t.parent.parent)&&6===ag(t.parent.parent)){const e=ns(t.parent.parent.left);if(e)return La(e)}const n=Kg(e);if(n&&cu(n)){const e=ns(n);return e&&e.valueDeclaration}}(e.parent);if(n)return je(n,e,t,void 0,!0)}}(e,t):void 0;if(a=ts(je(i||e,e,t,n||s?void 0:r,!0,!1)),!a)return ts(s)}else if(166===e.kind||211===e.kind){const r=166===e.kind?e.left:e.expression,s=166===e.kind?e.right:e.name;let c=Ma(r,o,n,!1,i);if(!c||Nd(s))return;if(c===ht)return c;if(c.valueDeclaration&&Mm(c.valueDeclaration)&&100!==ES(A)&&KP(c.valueDeclaration)&&c.valueDeclaration.initializer&&dO(c.valueDeclaration.initializer)){const e=c.valueDeclaration.initializer.arguments[0],t=ja(e,e);if(t){const e=$a(t);e&&(c=e)}}if(a=ts(Ho(Ga(c),s.escapedText,t)),!a&&2097152&c.flags&&(a=ts(Ho(Ga(Ea(c)),s.escapedText,t))),!a){if(!n){const n=Oa(c),r=Ap(s),i=HA(s,c);if(i)return void xo(s,va._0_has_no_exported_member_named_1_Did_you_mean_2,n,r,Us(i));const o=iE(e)&&function(e){for(;iE(e.parent);)e=e.parent;return e}(e),a=Kn&&788968&t&&o&&!oP(o.parent)&&function(e){let t=bb(e),n=je(t,t,111551,void 0,!0);if(n){for(;iE(t.parent);){if(n=Jp($l(n),t.parent.right.escapedText),!n)return;t=t.parent}return n}}(o);if(a)return void xo(o,va._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,jp(o));if(1920&t&&iE(e.parent)){const t=ts(Ho(Ga(c),s.escapedText,788968));if(t)return void xo(e.parent.right,va.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,Us(t),vc(e.parent.right.escapedText))}xo(s,va.Namespace_0_has_no_exported_member_1,n,r)}return}}else xn.assertNever(e,"Unknown entity name kind.");return!ly(e)&&ou(e)&&(2097152&a.flags||277===e.parent.kind)&&Na(hh(e),a,void 0,!0),a.flags&t||r?a:Ea(a)}function La(e){const t=e.parent.valueDeclaration;if(t)return(Hm(t)?Qm(t):j_(t)?Xm(t):void 0)||t}function ja(e,t,n){const r=1===ES(A)?va.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option:va.Cannot_find_module_0_or_its_corresponding_type_declarations;return Ba(e,t,n?void 0:r)}function Ba(e,t,n,r=!1){return $_(t)?Ja(e,t.text,n,t,r):void 0}function Ja(t,n,r,i,o=!1){var a,s,c,l,u,_,d,p,f,m,g;an(n,"@types/")&&xo(i,va.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,sn(n,"@types/"),n);const h=vf(n,!0);if(h)return h;const y=Sd(t),v=$_(t)?t:(null==(a=ZP(t)?t:t.parent&&ZP(t.parent)&&t.parent.name===t?t.parent:void 0)?void 0:a.name)||(null==(s=df(t)?t:void 0)?void 0:s.argument.literal)||(Mm(t)&&AF(t)?t.moduleSpecifier:void 0)||(KP(t)&&t.initializer&&Jm(t.initializer,!0)?t.initializer.arguments[0]:void 0)||(null==(c=mc(t,uf))?void 0:c.arguments[0])||(null==(l=mc(t,iN))?void 0:l.moduleSpecifier)||(null==(u=mc(t,Em))?void 0:u.moduleReference.expression)||(null==(_=mc(t,gN))?void 0:_.moduleSpecifier),b=v&&$_(v)?e.getModeForUsageLocation(y,v):y.impliedNodeFormat,x=ES(A),S=null==(d=e.getResolvedModule(y,n,b))?void 0:d.resolvedModule,k=S&&SV(A,S,y),T=S&&(!k||k===va.Module_0_was_resolved_to_1_but_jsx_is_not_set)&&e.getSourceFile(S.resolvedFileName);if(T){if(k&&xo(i,k,n,S.resolvedFileName),S.resolvedUsingTsExtension&&QI(n)){const e=(null==(p=mc(t,iN))?void 0:p.importClause)||mc(t,_n(rN,gN));(e&&!e.isTypeOnly||mc(t,uf))&&xo(i,va.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead,function(e){const t=eT(n,e);if($S(B)||99===b){const r=QI(n)&&xR(A);return t+(".mts"===e||".d.mts"===e?r?".mts":".mjs":".cts"===e||".d.mts"===e?r?".cts":".cjs":r?".ts":".js")}return t}(xn.checkDefined(Ib(n))))}else if(S.resolvedUsingTsExtension&&!xR(A,y.fileName)){const e=(null==(f=mc(t,iN))?void 0:f.importClause)||mc(t,_n(rN,gN));if(!(null==e?void 0:e.isTypeOnly)&&!mc(t,zE)){const e=xn.checkDefined(Ib(n));xo(i,va.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled,e)}}if(T.symbol){if(S.isExternalLibraryImport&&!aT(S.extension)&&za(!1,i,y,b,S,n),3===x||99===x){const e=1===y.impliedNodeFormat&&!mc(t,uf)||!!mc(t,rN),r=mc(t,(e=>zE(e)||gN(e)||iN(e)||AF(e)));if(e&&99===T.impliedNodeFormat&&!yC(r))if(mc(t,rN))xo(i,va.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead,n);else{let e;const t=lT(y.fileName);if(".ts"===t||".js"===t||".tsx"===t||".jsx"===t){const n=y.packageJsonScope,r=".ts"===t?".mts":".js"===t?".mjs":void 0;e=n&&!n.contents.packageJsonContent.type?r?uS(void 0,va.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1,r,Ko(n.packageDirectory,"package.json")):uS(void 0,va.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0,Ko(n.packageDirectory,"package.json")):r?uS(void 0,va.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module,r):uS(void 0,va.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module)}ro.add(zp(Sd(i),i,uS(e,va.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead,n)))}}return ts(T.symbol)}r&&xo(i,va.File_0_is_not_a_module,T.fileName)}else{if(Vn){const e=on(Vn,(e=>e.pattern),n);if(e){const t=Un&&Un.get(n);return ts(t||e.symbol)}}if((!S||aT(S.extension)||void 0!==k)&&k!==va.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type){if(r){if(S){const t=e.getProjectReferenceRedirect(S.resolvedFileName);if(t)return void xo(i,va.Output_file_0_has_not_been_built_from_source_file_1,t,S.resolvedFileName)}if(k)xo(i,k,n,S.resolvedFileName);else{const t=Po(n)&&!Fo(n),o=3===x||99===x;if(!MS(A)&&Ao(n,".json")&&1!==x&&qS(A))xo(i,va.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,n);else if(99===b&&o&&t){const t=Go(n,Ro(y.path)),r=null==(m=po.find((([n,r])=>e.fileExists(t+n))))?void 0:m[1];r?xo(i,va.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0,n+r):xo(i,va.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path)}else(null==(g=e.getResolvedModule(y,n,b))?void 0:g.alternateResult)?ko(!0,i,uS(gd(y,e,n,b,n),r,n)):xo(i,r,n)}}return}o?xo(i,va.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented,n,S.resolvedFileName):za(Y&&!!r,i,y,b,S,n)}}function za(t,n,r,i,{packageId:o,resolvedFileName:a},s){let c;!Os(s)&&o&&(c=gd(r,e,s,i,o.name)),ko(t,n,uS(c,va.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,s,a))}function $a(e,t){if(null==e?void 0:e.exports){const n=function(e,t){if(!e||e===ht||e===t||1===t.exports.size||2097152&e.flags)return e;const n=Uo(e);if(n.cjsExportMerged)return n.cjsExportMerged;const r=33554432&e.flags?e:Bo(e);return r.flags=512|r.flags,void 0===r.exports&&(r.exports=ed()),t.exports.forEach(((e,t)=>{"export="!==t&&r.exports.set(t,r.exports.has(t)?Jo(r.exports.get(t),e):e)})),r===e&&(Uo(r).resolvedExports=void 0,Uo(r).resolvedMembers=void 0),Uo(r).cjsExportMerged=r,n.cjsExportMerged=r}(ts(Da(e.exports.get("export="),t)),ts(e));return ts(n)||e}}function qa(e,t,n,r){var i;const o=$a(e,n);if(!n&&o){if(!(r||1539&o.flags||Y_(o,307))){const e=B>=5?"allowSyntheticDefaultImports":"esModuleInterop";return xo(t,va.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,e),o}const n=t.parent;if(iN(n)&&wg(n)||uf(n)){const t=uf(n)?n.arguments[0]:n.moduleSpecifier,r=$l(o),a=uO(r,o,e,t);if(a)return Va(o,a,n);const s=null==(i=null==e?void 0:e.declarations)?void 0:i.find(qN),c=s&&fa(pa(t),s.impliedNodeFormat);if(FS(A)||c){let i=qp(r,0);if(i&&i.length||(i=qp(r,1)),i&&i.length||Jp(r,"default",!0)||c)return Va(o,3670016&r.flags?_O(r,o,e,t):lO(o,o.parent),n)}}}return o}function Va(e,t,n){const r=No(e.flags,e.escapedName);r.declarations=e.declarations?e.declarations.slice():[],r.parent=e.parent,r.links.target=e,r.links.originatingImport=n,e.valueDeclaration&&(r.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(r.constEnumOnlyModule=!0),e.members&&(r.members=new Map(e.members)),e.exports&&(r.exports=new Map(e.exports));const i=Od(t);return r.links.type=ks(r,i.members,u,u,i.indexInfos),r}function Ua(e){return void 0!==e.exports.get("export=")}function Ka(e){return yf(Qa(e))}function Wa(e,t){const n=Qa(t);if(n)return n.get(e)}function Ha(e){return!(402784252&e.flags||1&wx(e)||qk(e)||PT(e))}function Ga(e){return 6256&e.flags?__(e,"resolvedExports"):1536&e.flags?Qa(e):e.exports||w}function Qa(e){const t=Uo(e);if(!t.resolvedExports){const{exports:n,typeOnlyExportStarMap:r}=es(e);t.resolvedExports=n,t.typeOnlyExportStarMap=r}return t.resolvedExports}function Ya(e,t,n,r){t&&t.forEach(((t,i)=>{if("default"===i)return;const o=e.get(i);if(o){if(n&&r&&o&&Da(o)!==Da(t)){const e=n.get(i);e.exportsWithDuplicate?e.exportsWithDuplicate.push(r):e.exportsWithDuplicate=[r]}}else e.set(i,t),n&&r&&n.set(i,{specifierText:Gd(r.moduleSpecifier)})}))}function es(e){const t=[];let n;const r=new Set,i=function e(i,o,a){if(!a&&(null==i?void 0:i.exports)&&i.exports.forEach(((e,t)=>r.add(t))),!(i&&i.exports&&fe(t,i)))return;const s=new Map(i.exports),c=i.exports.get("__export");if(c){const t=ed(),n=new Map;if(c.declarations)for(const r of c.declarations){Ya(t,e(ja(r,r.moduleSpecifier),r,a||r.isTypeOnly),n,r)}n.forEach((({exportsWithDuplicate:e},t)=>{if("export="!==t&&e&&e.length&&!s.has(t))for(const r of e)ro.add(Rp(r,va.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,n.get(t).specifierText,vc(t)))})),Ya(s,t)}return(null==o?void 0:o.isTypeOnly)&&(n??(n=new Map),s.forEach(((e,t)=>n.set(t,o)))),s}(e=$a(e))||w;return n&&r.forEach((e=>n.delete(e))),{exports:i,typeOnlyExportStarMap:n}}function ts(e){let t;return e&&e.mergeId&&(t=ji[e.mergeId])?t:e}function ns(e){return ts(e.symbol&&g_(e.symbol))}function rs(e){return p_(e)?ns(e):void 0}function is(e){return ts(e.parent&&g_(e.parent))}function os(e){var t,n;return(219===(null==(t=e.valueDeclaration)?void 0:t.kind)||218===(null==(n=e.valueDeclaration)?void 0:n.kind))&&rs(e.valueDeclaration.parent)||e}function ss(t,n,r){const i=is(t);if(i&&!(262144&t.flags))return l(i);const o=q(t.declarations,(e=>{if(!sp(e)&&e.parent){if(zs(e.parent))return ns(e.parent);if(eN(e.parent)&&e.parent.parent&&$a(ns(e.parent.parent))===t)return ns(e.parent.parent)}if(mP(e)&&uP(e.parent)&&64===e.parent.operatorToken.kind&&Ox(e.parent.left)&&vb(e.parent.left.expression))return og(e.parent.left)||rg(e.parent.left.expression)?ns(Sd(e)):(DM(e.parent.left.expression),Wo(e.parent.left.expression).resolvedSymbol)}));if(!p(o))return;const a=q(o,(e=>ls(e,t)?e:void 0));let s=[],c=[];for(const e of a){const[t,...n]=l(e);s=ue(s,t),c=pe(c,n)}return Z(s,c);function l(i){const o=q(i.declarations,_),a=n&&function(t,n){const r=Sd(n),i=IB(r),o=Uo(t);let a;if(o.extendedContainersByFile&&(a=o.extendedContainersByFile.get(i)))return a;if(r&&r.imports){for(const e of r.imports){if(ly(e))continue;const r=ja(n,e,!0);r&&ls(r,t)&&(a=ue(a,r))}if(p(a))return(o.extendedContainersByFile||(o.extendedContainersByFile=new Map)).set(i,a),a}if(o.extendedContainers)return o.extendedContainers;const s=e.getSourceFiles();for(const e of s){if(!qI(e))continue;const n=ns(e);ls(n,t)&&(a=ue(a,n))}return o.extendedContainers=a||u}(t,n),s=function(e,t){const n=!!p(e.declarations)&&Te(e.declarations);if(111551&t&&n&&n.parent&&KP(n.parent)&&(HE(n)&&n===n.parent.initializer||CE(n)&&n===n.parent.type))return ns(n.parent)}(i,r);if(n&&i.flags&Ds(r)&&Es(i,n,1920,!1))return ue(Z(Z([i],o),a),s);const c=!(i.flags&Ds(r))&&788968&i.flags&&524288&ju(i).flags&&111551===r?ws(n,(e=>ld(e,(e=>{if(e.flags&Ds(r)&&$l(e)===ju(i))return e})))):void 0;let l=c?[c,...o,i]:[...o,i];return l=ue(l,s),l=pe(l,a),l}function _(e){return i&&cs(e,i)}}function cs(e,t){const n=Ls(e),r=n&&n.exports&&n.exports.get("export=");return r&&us(r,t)?n:void 0}function ls(e,t){if(e===is(t))return t;const n=e.exports&&e.exports.get("export=");if(n&&us(n,t))return e;const r=Ga(e),i=r.get(t.escapedName);return i&&us(i,t)?i:ld(r,(e=>{if(us(e,t))return e}))}function us(e,t){if(ts(Da(ts(e)))===ts(Da(ts(t))))return e}function _s(e){return ts(e&&0!=(1048576&e.flags)&&e.exportSymbol||e)}function ds(e,t){return!!(111551&e.flags||2097152&e.flags&&111551&Pa(e,!t))}function ps(e){var t;const n=new c(Be,e);return _++,n.id=_,null==(t=or)||t.recordType(n),n}function fs(e,t){const n=ps(e);return n.symbol=t,n}function ms(e){return new c(Be,e)}function gs(e,t,n=0,r){!function(e,t){const n=`${e},${t??""}`;xt.has(n)&&xn.fail(`Duplicate intrinsic type name ${e}${t?` (${t})`:""}; you may need to pass a name to createIntrinsicType.`),xt.add(n)}(t,r);const i=ps(e);return i.intrinsicName=t,i.debugIntrinsicName=r,i.objectFlags=52953088|n,i}function hs(e,t){const n=fs(524288,t);return n.objectFlags=e,n.members=void 0,n.properties=void 0,n.callSignatures=void 0,n.constructSignatures=void 0,n.indexInfos=void 0,n}function ys(e){return fs(262144,e)}function vs(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95!==e.charCodeAt(2)&&64!==e.charCodeAt(2)&&35!==e.charCodeAt(2)}function bs(e){let t;return e.forEach(((e,n)=>{xs(e,n)&&(t||(t=[])).push(e)})),t||u}function xs(e,t){return!vs(t)&&ds(e)}function Ss(e,t,n,r,i){const o=e;return o.members=t,o.properties=u,o.callSignatures=n,o.constructSignatures=r,o.indexInfos=i,t!==w&&(o.properties=bs(t)),o}function ks(e,t,n,r,i){return Ss(hs(16,e),t,n,r,i)}function ws(e,t){let n;for(let r=e;r;r=r.parent){if(f_(r)&&r.locals&&!Yp(r)&&(n=t(r.locals,void 0,!0,r)))return n;switch(r.kind){case 307:if(!Zp(r))break;case 267:const e=ns(r);if(n=t((null==e?void 0:e.exports)||w,void 0,!0,r))return n;break;case 263:case 231:case 264:let i;if((ns(r).members||w).forEach(((e,t)=>{788968&e.flags&&(i||(i=ed())).set(t,e)})),i&&(n=t(i,void 0,!1,r)))return n}}return t(de,void 0,!0)}function Ds(e){return 111551===e?111551:1920}function Es(e,t,n,r,i=new Map){if(!e||function(e){if(e.declarations&&e.declarations.length){for(const t of e.declarations)switch(t.kind){case 172:case 174:case 177:case 178:continue;default:return!1}return!0}return!1}(e))return;const o=Uo(e),a=o.accessibleChainCache||(o.accessibleChainCache=new Map),s=ws(t,((e,t,n,r)=>r)),c=`${r?0:1}|${s&&IB(s)}|${n}`;if(a.has(c))return a.get(c);const l=OB(e);let u=i.get(l);u||i.set(l,u=[]);const _=ws(t,d);return a.set(c,_),_;function d(n,i,o){if(!fe(u,n))return;const a=function(n,i,o){return f(n.get(e.escapedName),void 0,i)?[e]:ld(n,(n=>{if(2097152&n.flags&&"export="!==n.escapedName&&"default"!==n.escapedName&&!(Ex(n)&&t&&qI(Sd(t)))&&(!r||Q(n.declarations,Em))&&(!o||!Q(n.declarations,Dm))&&(i||!Y_(n,281))){const e=m(n,Ea(n),i);if(e)return e}if(n.escapedName===e.escapedName&&n.exportSymbol&&f(ts(n.exportSymbol),void 0,i))return[e]}))||(n===de?m(he,he,i):void 0)}(n,i,o);return u.pop(),a}function p(e,n){return!Ps(e,t,n)||!!Es(e.parent,t,Ds(n),r,i)}function f(t,r,i){return(e===(r||t)||ts(e)===ts(r||t))&&!Q(t.declarations,zs)&&(i||p(ts(t),n))}function m(e,t,r){if(f(e,t,r))return[e];const i=Ga(t),o=i&&d(i,!0);return o&&p(e,Ds(n))?[e].concat(o):void 0}}function Ps(e,t,n){let r=!1;return ws(t,(t=>{let i=ts(t.get(e.escapedName));if(!i)return!1;if(i===e)return!0;const o=2097152&i.flags&&!Y_(i,281);return i=o?Ea(i):i,!!((o?Pa(i):i.flags)&n)&&(r=!0,!0)})),r}function Ns(e,t){return 0===Ms(e,t,111551,!1,!0).accessibility}function Fs(e,t,n){return 0===Ms(e,t,n,!1,!1).accessibility}function As(e,t,n,r,i,o){if(!p(e))return;let a,s=!1;for(const c of e){const e=Es(c,t,r,!1);if(e){a=c;const t=$s(e[0],i);if(t)return t}if(o&&Q(c.declarations,zs)){if(i){s=!0;continue}return{accessibility:0}}const l=As(ss(c,t,r),t,n,n===c?Ds(r):r,i,o);if(l)return l}return s?{accessibility:0}:a?{accessibility:1,errorSymbolName:Us(n,t,r),errorModuleName:a!==n?Us(a,t,1920):void 0}:void 0}function Is(e,t,n,r){return Ms(e,t,n,r,!0)}function Ms(e,t,n,r,i){if(e&&t){const o=As([e],t,e,n,r,i);if(o)return o;const a=f(e.declarations,Ls);return a&&a!==Ls(t)?{accessibility:2,errorSymbolName:Us(e,t,n),errorModuleName:Us(a),errorNode:Mm(t)?t:void 0}:{accessibility:1,errorSymbolName:Us(e,t,n)}}return{accessibility:0}}function Ls(e){const t=mc(e,Rs);return t&&ns(t)}function Rs(e){return sp(e)||307===e.kind&&Zp(e)}function zs(e){return cp(e)||307===e.kind&&Zp(e)}function $s(e,t){let n;if(x(F(e.declarations,(e=>80!==e.kind)),(function(t){var n,i;if(!sc(t)){const o=aa(t);if(o&&!Bv(o,32)&&sc(o.parent))return r(t,o);if(KP(t)&&EP(t.parent.parent)&&!Bv(t.parent.parent,32)&&sc(t.parent.parent.parent))return r(t,t.parent.parent);if(wp(t)&&!Bv(t,32)&&sc(t.parent))return r(t,t);if(KE(t)){if(2097152&e.flags&&Mm(t)&&(null==(n=t.parent)?void 0:n.parent)&&KP(t.parent.parent)&&(null==(i=t.parent.parent.parent)?void 0:i.parent)&&EP(t.parent.parent.parent.parent)&&!Bv(t.parent.parent.parent.parent,32)&&t.parent.parent.parent.parent.parent&&sc(t.parent.parent.parent.parent.parent))return r(t,t.parent.parent.parent.parent);if(2&e.flags){const e=mc(t,EP);return!!Bv(e,32)||!!sc(e.parent)&&r(t,e)}}return!1}return!0})))return{accessibility:0,aliasesToMakeVisible:n};function r(e,r){return t&&(Wo(e).isVisible=!0,n=me(n,r)),!0}}function qs(e){let t;return t=186===e.parent.kind||233===e.parent.kind&&!wf(e.parent)||167===e.parent.kind||182===e.parent.kind&&e.parent.parameterName===e?1160127:166===e.kind||211===e.kind||271===e.parent.kind||166===e.parent.kind&&e.parent.left===e||211===e.parent.kind&&e.parent.expression===e||212===e.parent.kind&&e.parent.expression===e?1920:788968,t}function Vs(e,t,n=!0){const r=qs(e),i=bb(e),o=je(t,i.escapedText,r,void 0,!1);return o&&262144&o.flags&&788968&r||!o&&yv(i)&&0===Is(ns(rm(i,!1,!1)),i,r,!1).accessibility?{accessibility:0}:o?$s(o,n)||{accessibility:1,errorSymbolName:Gd(i),errorNode:i}:{accessibility:3,errorSymbolName:Gd(i),errorNode:i}}function Us(e,t,n,r=4,i){let o=70221824;2&r&&(o|=128),1&r&&(o|=512),8&r&&(o|=16384),32&r&&(o|=134217728),16&r&&(o|=1073741824);const a=4&r?se.symbolToNode:se.symbolToEntityName;return i?s(i).getText():dd(s);function s(r){const i=a(e,n,t,o),s=307===(null==t?void 0:t.kind)?tq():eq(),c=t&&Sd(t);return s.writeNode(4,i,c,r),r}}function Ks(e,t,n=0,r,i){return i?o(i).getText():dd(o);function o(i){let o;o=262144&n?1===r?185:184:1===r?180:179;const a=se.signatureToSignatureDeclaration(e,o,t,70222336|Qs(n)),s=nq(),c=t&&Sd(t);return s.writeNode(4,a,c,Uy(i)),i}}function Ws(e,t,n=1064960,r=Vy("")){const i=A.noErrorTruncation||1&n,o=se.typeToTypeNode(e,t,70221824|Qs(n)|(i?1:0));if(void 0===o)return xn.fail("should always get typenode");const a=e!==Et?eq():Z$(),s=t&&Sd(t);a.writeNode(4,o,s,r);const c=r.getText(),l=i?2*Q_:2*X_;return l&&c&&c.length>=l?c.substr(0,l-"...".length)+"...":c}function Hs(e,t){let n=Xs(e.symbol)?Ws(e,e.symbol.valueDeclaration):Ws(e),r=Xs(t.symbol)?Ws(t,t.symbol.valueDeclaration):Ws(t);return n===r&&(n=Gs(e),r=Gs(t)),[n,r]}function Gs(e){return Ws(e,void 0,64)}function Xs(e){return e&&!!e.valueDeclaration&&Xu(e.valueDeclaration)&&!lS(e.valueDeclaration)}function Qs(e=0){return 848330095&e}function Ys(e){return!!(e.symbol&&32&e.symbol.flags&&(e===Nu(e.symbol)||524288&e.flags&&16777216&wx(e)))}function Zs(e,t,n=16384,r){return r?i(r).getText():dd(i);function i(r){const i=70222336|Qs(n),o=se.typePredicateToTypePredicateNode(e,t,i),a=eq(),s=t&&Sd(t);return a.writeNode(4,o,s,r),r}}function ec(e){return 2===e?"private":4===e?"protected":"public"}function tc(e){return e&&e.parent&&268===e.parent.kind&&fp(e.parent.parent)}function nc(e){return 307===e.kind||sp(e)}function ic(e,t){const n=Uo(e).nameType;if(n){if(384&n.flags){const e=""+n.value;return Ts(e,wS(A))||WT(e)?WT(e)&&an(e,"-")?`[${e}]`:e:`"${Fy(e,34)}"`}if(8192&n.flags)return`[${oc(n.symbol,t)}]`}}function oc(e,t){var n;if((null==(n=null==t?void 0:t.remappedSymbolReferences)?void 0:n.has(OB(e)))&&(e=t.remappedSymbolReferences.get(OB(e))),t&&"default"===e.escapedName&&!(16384&t.flags)&&(!(16777216&t.flags)||!e.declarations||t.enclosingDeclaration&&mc(e.declarations[0],nc)!==mc(t.enclosingDeclaration,nc)))return"default";if(e.declarations&&e.declarations.length){let n=g(e.declarations,(e=>Pc(e)?e:void 0));const r=n&&Pc(n);if(n&&r){if(QE(n)&&sg(n))return Sc(e);if(oE(r)&&!(4096&px(e))){const n=Uo(e).nameType;if(n&&384&n.flags){const n=ic(e,t);if(void 0!==n)return n}}return Ap(r)}if(n||(n=e.declarations[0]),n.parent&&260===n.parent.kind)return Ap(n.parent.name);switch(n.kind){case 231:case 218:case 219:return!t||t.encounteredError||131072&t.flags||(t.encounteredError=!0),231===n.kind?"(Anonymous class)":"(Anonymous function)"}}const r=ic(e,t);return void 0!==r?r:Sc(e)}function sc(e){if(e){const t=Wo(e);return void 0===t.isVisible&&(t.isVisible=!!function(){switch(e.kind){case 338:case 346:case 340:return!!(e.parent&&e.parent.parent&&e.parent.parent.parent&&qN(e.parent.parent.parent));case 208:return sc(e.parent.parent);case 260:if(Eu(e.name)&&!e.name.elements.length)return!1;case 267:case 263:case 264:case 265:case 262:case 266:case 271:if(fp(e))return!0;const t=kc(e);return 32&bJ(e)||271!==e.kind&&307!==t.kind&&33554432&t.flags?sc(t):Yp(t);case 172:case 171:case 177:case 178:case 174:case 173:if(Rv(e,6))return!1;case 176:case 180:case 179:case 181:case 169:case 268:case 184:case 185:case 187:case 183:case 188:case 189:case 192:case 193:case 196:case 202:return sc(e.parent);case 273:case 274:case 276:return!1;case 168:case 307:case 270:return!0;default:return!1}}()),t.isVisible}return!1}function lc(e,t){let n,r,i;return e.parent&&277===e.parent.kind?n=je(e,e,2998271,void 0,!1):281===e.parent.kind&&(n=ka(e.parent,2998271)),n&&(i=new Set,i.add(OB(n)),function e(n){f(n,(n=>{const o=aa(n)||n;if(t?Wo(n).isVisible=!0:(r=r||[],fe(r,o)),Fm(n)){const t=bb(n.moduleReference),r=je(n,t.escapedText,901119,void 0,!1);r&&i&&W(i,OB(r))&&e(r.declarations)}}))}(n.declarations)),r}function _c(e,t){const n=dc(e,t);if(n>=0){const{length:e}=Fi;for(let t=n;t=Oi;n--){if(pc(Fi[n],Ii[n]))return-1;if(Fi[n]===e&&Ii[n]===t)return n}return-1}function pc(e,t){switch(t){case 0:return!!Uo(e).type;case 2:return!!Uo(e).declaredType;case 1:return!!e.resolvedBaseConstructorType;case 3:return!!e.resolvedReturnType;case 4:return!!e.immediateBaseConstraint;case 5:return!!e.resolvedTypeArguments;case 6:return!!e.baseTypesResolved;case 7:return!!Uo(e).writeType;case 8:return void 0!==Wo(e).parameterInitializerContainsUndefined}return xn.assertNever(t)}function gc(){return Fi.pop(),Ii.pop(),Ai.pop()}function kc(e){return mc(sy(e),(e=>{switch(e.kind){case 260:case 261:case 276:case 275:case 274:case 273:return!1;default:return!0}})).parent}function Tc(e,t){const n=Jp(e,t);return n?$l(n):void 0}function wc(e,t){var n;let r;return Tc(e,t)||(r=null==(n=gf(e,t))?void 0:n.type)&&Hc(r,!0,!0)}function Ec(e){return e&&0!=(1&e.flags)}function Nc(e){return e===Dt||!!(1&e.flags&&e.aliasSymbol)}function Ic(e,t){if(0!==t)return Gc(e,!1,t);const n=ns(e);return n&&Uo(n).type||Gc(e,!1,t)}function Mc(e,t,n){if(131072&(e=SD(e,(e=>!(98304&e.flags)))).flags)return wn;if(1048576&e.flags)return DD(e,(e=>Mc(e,t,n)));let r=ev(O(t,Tv));const i=[],o=[];for(const t of Rd(e)){const e=Ev(t,8576);SS(e,r)||6&fx(t)||!rx(t)?o.push(e):i.push(t)}if(pb(e)||gb(r)){if(o.length&&(r=ev([r,...o])),131072&r.flags)return e;const t=(Lr||(Lr=zh("Omit",2,!0)||ht),Lr===ht?void 0:Lr);return t?Bg(t,[e,r]):Dt}const a=ed();for(const e of i)a.set(e.escapedName,ix(e,!1));const s=ks(n,a,u,u,cf(e));return s.objectFlags|=4194304,s}function Lc(e){return!!(465829888&e.flags)&&_M(Wd(e)||At,32768)}function jc(e){return Zw(bD(e,Lc)?DD(e,(e=>465829888&e.flags?Hd(e):e)):e,524288)}function Rc(e,t){const n=Jc(e);return n?XD(n,t):t}function Jc(e){const t=function(e){const t=e.parent.parent;switch(t.kind){case 208:case 303:return Jc(t);case 209:return Jc(e.parent);case 260:return t.initializer;case 226:return t.right}}(e);if(t&&jg(t)&&t.flowNode){const n=zc(e);if(n){const r=sI(_I.createStringLiteral(n),e),i=Vu(t)?t:_I.createParenthesizedExpression(t),o=sI(_I.createElementAccessExpression(i,r),e);return OT(r,o),OT(o,e),i!==t&&OT(i,o),o.flowNode=t.flowNode,o}}}function zc(e){const t=e.parent;return 208===e.kind&&206===t.kind?qc(e.propertyName||e.name):303===e.kind||304===e.kind?qc(e.name):""+t.elements.indexOf(e)}function qc(e){const t=Tv(e);return 384&t.flags?""+t.value:void 0}function Vc(e){const t=e.dotDotDotToken?32:0,n=Ic(e.parent.parent,t);return n&&Uc(e,n,!1)}function Uc(e,t,n){if(Ec(t))return t;const r=e.parent;let i;if(U&&33554432&e.flags&&ay(e)?t=QT(t):U&&r.parent.initializer&&!Qw(_D(r.parent.initializer),65536)&&(t=Zw(t,524288)),206===r.kind)if(e.dotDotDotToken){if(2&(t=Sp(t)).flags||!RF(t))return xo(e,va.Rest_types_may_only_be_created_from_object_types),Dt;const n=[];for(const e of r.elements)e.dotDotDotToken||n.push(e.propertyName||e.name);i=Mc(t,n,e.symbol)}else{const n=e.propertyName||e.name;i=Rc(e,Mb(t,Tv(n),32,n))}else{const o=fj(65|(e.dotDotDotToken?0:128),t,It,r),a=r.elements.indexOf(e);if(e.dotDotDotToken){const e=DD(t,(e=>58982400&e.flags?Hd(e):e));i=xD(e,PT)?DD(e,(e=>Ly(e,a))):Ty(o)}else i=Hk(t)?Rc(e,jb(t,ux(a),32|(n||PF(e)?16:0),e.name)||Dt):o}return e.initializer?kv(ac(e))?U&&!Qw(PM(e,0),16777216)?jc(i):i:NM(e,ev([jc(i),PM(e,0)],2)):i}function Kc(e){const t=al(e);if(t)return Sx(t)}function Wc(e){const t=lh(e,!0);return 209===t.kind&&0===t.elements.length}function Hc(e,t=!1,n=!0){return U&&n?XT(e,t):e}function Gc(e,t,n){if(KP(e)&&249===e.parent.parent.kind){const t=Av(bA(KM(e.parent.parent.expression,n)));return 4456448&t.flags?Iv(t):Jt}if(KP(e)&&250===e.parent.parent.kind)return pj(e.parent.parent)||St;if(Eu(e.parent))return Vc(e);const r=uE(e)&&!Uv(e)||lE(e)||EF(e),i=t&&iC(e),o=El(e);if(ap(e))return o?Ec(o)||o===At?o:Dt:re?At:St;if(o)return Hc(o,r,i);if((Y||Mm(e))&&KP(e)&&!Eu(e.name)&&!(32&bJ(e))&&!(33554432&e.flags)){if(!(6&xJ(e))&&(!e.initializer||function(e){const t=lh(e,!0);return 106===t.kind||80===t.kind&&Nw(t)===ge}(e.initializer)))return kt;if(e.initializer&&Wc(e.initializer))return ir}if(sE(e)){if(!e.symbol)return;const t=e.parent;if(178===t.kind&&l_(t)){const n=Y_(ns(e.parent),177);if(n){const r=Cf(n),i=tJ(t);return i&&e===i?(xn.assert(!i.type),$l(r.thisParameter)):Gf(r)}}const n=function(e,t){const n=Df(e);if(!n)return;const r=e.parameters.indexOf(t);return t.dotDotDotToken?PO(n,r):DO(n,r)}(t,e);if(n)return n;const r="this"===e.symbol.escapedName?_N(t):pN(e);if(r)return Hc(r,!1,i)}if(j_(e)&&e.initializer){if(Mm(e)&&!sE(e)){const t=sl(e,ns(e),Xm(e));if(t)return t}return Hc(NM(e,PM(e,n)),r,i)}if(uE(e)&&(Y||Mm(e))){if(zv(e)){const t=F(e.parent.members,pE),n=t.length?function(e,t){const n=an(e.escapedName,"__#")?YC.createPrivateIdentifier(e.escapedName.split("@")[1]):vc(e.escapedName);for(const r of t){const t=YC.createPropertyAccessExpression(YC.createThis(),n);OT(t.expression,t),OT(t,r),t.flowNode=r.returnFlowNode;const i=rl(t,e);if(!Y||i!==kt&&i!==ir||xo(e.valueDeclaration,va.Member_0_implicitly_has_an_1_type,Us(e),Ws(i)),!xD(i,vA))return nj(i)}}(e.symbol,t):128&Qv(e)?Ik(e.symbol):void 0;return n&&Hc(n,!0,i)}{const t=CC(e.parent),n=t?nl(e.symbol,t):128&Qv(e)?Ik(e.symbol):void 0;return n&&Hc(n,!0,i)}}return NN(e)?Kt:Eu(e.name)?hl(e.name,!1,!0):void 0}function Xc(e){if(e.valueDeclaration&&uP(e.valueDeclaration)){const t=Uo(e);return void 0===t.isConstructorDeclaredProperty&&(t.isConstructorDeclaredProperty=!1,t.isConstructorDeclaredProperty=!!Zc(e)&&x(e.declarations,(t=>uP(t)&&IN(t)&&(212!==t.left.kind||$h(t.left.argumentExpression))&&!cl(void 0,t,e,t)))),t.isConstructorDeclaredProperty}return!1}function Qc(e){const t=e.valueDeclaration;return t&&uE(t)&&!kv(t)&&!t.initializer&&(Y||Mm(t))}function Zc(e){if(e.declarations)for(const t of e.declarations){const e=rm(t,!1,!1);if(e&&(176===e.kind||rO(e)))return e}}function nl(e,t){const n=an(e.escapedName,"__#")?YC.createPrivateIdentifier(e.escapedName.split("@")[1]):vc(e.escapedName),r=YC.createPropertyAccessExpression(YC.createThis(),n);OT(r.expression,r),OT(r,t),r.flowNode=t.returnFlowNode;const i=rl(r,e);return!Y||i!==kt&&i!==ir||xo(e.valueDeclaration,va.Member_0_implicitly_has_an_1_type,Us(e),Ws(i)),xD(i,vA)?void 0:nj(i)}function rl(e,t){const n=(null==t?void 0:t.valueDeclaration)&&(!Qc(t)||128&Qv(t.valueDeclaration))&&Ik(t)||It;return XD(e,kt,n)}function il(e,t){const n=Qm(e.valueDeclaration);if(n){const t=Mm(n)?ol(n):void 0;return t&&t.typeExpression?Sx(t.typeExpression):e.valueDeclaration&&sl(e.valueDeclaration,e,n)||dT(DM(n))}let r,i=!1,o=!1;if(Xc(e)&&(r=nl(e,Zc(e))),!r){let n;if(e.declarations){let a;for(const r of e.declarations){const s=uP(r)||QE(r)?r:Ox(r)?uP(r.parent)?r.parent:r:void 0;if(!s)continue;const c=Ox(s)?gg(s):ag(s);(4===c||uP(s)&&IN(s,c))&&(_l(s)?i=!0:o=!0),QE(s)||(a=cl(a,s,e,r)),a||(n||(n=[])).push(uP(s)||QE(s)?ul(e,t,s,c):en)}r=a}if(!r){if(!p(n))return Dt;let t=i&&e.declarations?function(e,t){return xn.assert(e.length===t.length),e.filter(((e,n)=>{const r=t[n],i=uP(r)?r:uP(r.parent)?r.parent:void 0;return i&&_l(i)}))}(n,e.declarations):void 0;if(o){const n=Ik(e);n&&((t||(t=[])).push(n),i=!0)}r=ev(Q(t,(e=>!!(-98305&e.flags)))?t:n)}}const a=RC(Hc(r,!1,o&&!i));return e.valueDeclaration&&Mm(e.valueDeclaration)&&SD(a,(e=>!!(-98305&e.flags)))===en?(zC(e.valueDeclaration,St),St):a}function sl(e,t,n){var r,i;if(!Mm(e)||!n||!HE(n)||n.properties.length)return;const o=ed();for(;uP(e)||GE(e);){const t=rs(e);(null==(r=null==t?void 0:t.exports)?void 0:r.size)&&qo(o,t.exports),e=uP(e)?e.parent:e.parent.parent}const a=rs(e);(null==(i=null==a?void 0:a.exports)?void 0:i.size)&&qo(o,a.exports);const s=ks(t,o,u,u,u);return s.objectFlags|=4096,s}function cl(e,t,n,r){var i;const o=kv(t.parent);if(o){const t=RC(Sx(o));if(!e)return t;Nc(e)||Nc(t)||gS(e,t)||ij(void 0,e,r,t)}if(null==(i=n.parent)?void 0:i.valueDeclaration){const e=os(n.parent);if(e.valueDeclaration){const t=kv(e.valueDeclaration);if(t){const e=Jp(Sx(t),n.escapedName);if(e)return ql(e)}}}return e}function ul(e,t,n,r){if(QE(n)){if(t)return $l(t);const e=DM(n.arguments[2]),r=Tc(e,"value");if(r)return r;const i=Tc(e,"get");if(i){const e=hI(i);if(e)return Gf(e)}const o=Tc(e,"set");if(o){const e=hI(o);if(e)return LO(e)}return St}if(function(e,t){return GE(e)&&110===e.expression.kind&&jI(t,(t=>Iw(e,t)))}(n.left,n.right))return St;const i=1===r&&(GE(n.left)||XE(n.left))&&(og(n.left.expression)||qD(n.left.expression)&&rg(n.left.expression)),o=t?$l(t):i?sx(DM(n.right)):dT(DM(n.right));if(524288&o.flags&&2===r&&"export="===e.escapedName){const n=Od(o),r=ed();_d(n.members,r);const i=r.size;t&&!t.exports&&(t.exports=ed()),(t||e).exports.forEach(((e,t)=>{var n;const i=r.get(t);if(!i||i===e||2097152&e.flags)r.set(t,e);else if(111551&e.flags&&111551&i.flags){if(e.valueDeclaration&&i.valueDeclaration&&Sd(e.valueDeclaration)!==Sd(i.valueDeclaration)){const t=vc(e.escapedName),r=(null==(n=lt(i.valueDeclaration,Dc))?void 0:n.name)||i.valueDeclaration;fT(xo(e.valueDeclaration,va.Duplicate_identifier_0,t),Rp(r,va._0_was_also_declared_here,t)),fT(xo(r,va.Duplicate_identifier_0,t),Rp(e.valueDeclaration,va._0_was_also_declared_here,t))}const o=No(e.flags|i.flags,t);o.links.type=ev([$l(e),$l(i)]),o.valueDeclaration=i.valueDeclaration,o.declarations=Z(i.declarations,e.declarations),r.set(t,o)}else r.set(t,Jo(e,i))}));const a=ks(i!==r.size?void 0:n.symbol,r,n.callSignatures,n.constructSignatures,n.indexInfos);if(i===r.size&&(o.aliasSymbol&&(a.aliasSymbol=o.aliasSymbol,a.aliasTypeArguments=o.aliasTypeArguments),4&wx(o))){a.aliasSymbol=o.symbol;const e=Ig(o);a.aliasTypeArguments=p(e)?e:void 0}return a.objectFlags|=xg([o])|20608&wx(o),a.symbol&&32&a.symbol.flags&&o===Nu(a.symbol)&&(a.objectFlags|=16777216),a}return Yk(o)?(zC(n,rr),rr):o}function _l(e){const t=rm(e,!1,!1);return 176===t.kind||262===t.kind||218===t.kind&&!yg(t.parent)}function pl(e,t,n){return e.initializer?Hc(NM(e,PM(e,n?0:1,Eu(e.name)?hl(e.name,!0,!1):At))):Eu(e.name)?hl(e.name,t,n):(n&&!wl(e)&&zC(e,St),t?Pt:St)}function hl(e,t=!1,n=!1){return 206===e.kind?function(e,t,n){const r=ed();let i,o=131200;f(e.elements,(e=>{const a=e.propertyName||e.name;if(e.dotDotDotToken)return void(i=Vm(Jt,St,!1));const s=Tv(a);if(!mC(s))return void(o|=512);const c=gC(s),l=No(4|(e.initializer?16777216:0),c);l.links.type=pl(e,t,n),l.links.bindingElement=e,r.set(l.escapedName,l)}));const a=ks(void 0,r,u,u,i?[i]:u);return a.objectFlags|=o,t&&(a.pattern=e,a.objectFlags|=131072),a}(e,t,n):function(e,t,n){const r=e.elements,i=we(r),o=i&&208===i.kind&&i.dotDotDotToken?i:void 0;if(0===r.length||1===r.length&&o)return M>=2?ky(St):rr;const a=O(r,(e=>gP(e)?St:pl(e,t,n))),s=C(r,(e=>!(e===o||gP(e)||PF(e))),r.length-1)+1;let c=Ay(a,O(r,((e,t)=>e===o?4:t>=s?2:1)));return t&&(c=Dg(c),c.pattern=e,c.objectFlags|=131072),c}(e,t,n)}function vl(e,t){return bl(Gc(e,!0,0),e,t)}function bl(e,t,n){return e?(4096&e.flags&&function(e){const t=rs(e),n=lr||(lr=Bh("SymbolConstructor",!1));return n&&t&&t===n}(t.parent)&&(e=mx(t)),n&&$C(t,e),8192&e.flags&&(KE(t)||!t.type)&&e.symbol!==ns(t)&&(e=Qt),RC(e)):(e=sE(t)&&t.dotDotDotToken?rr:St,n&&(wl(t)||zC(t,e)),e)}function wl(e){const t=sy(e);return _L(169===t.kind?t.parent:t)}function El(e){const t=kv(e);if(t)return Sx(t)}function Pl(e){if(e)switch(e.kind){case 177:return Cv(e);case 178:return Dv(e);case 172:return xn.assert(Uv(e)),kv(e)}}function Nl(e){const t=Pl(e);return t&&Sx(t)}function Fl(e){const t=Uo(e);if(!t.type){if(!_c(e,0))return Dt;const n=Y_(e,177),r=Y_(e,178),i=lt(Y_(e,172),yu);let o=n&&Mm(n)&&Kc(n)||Nl(n)||Nl(r)||Nl(i)||n&&n.body&&HO(n)||i&&i.initializer&&vl(i,!0);o||(r&&!_L(r)?ko(Y,r,va.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,Us(e)):n&&!_L(n)?ko(Y,n,va.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,Us(e)):i&&!_L(i)&&ko(Y,i,va.Member_0_implicitly_has_an_1_type,Us(e),"any"),o=St),gc()||(Pl(n)?xo(n,va._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Us(e)):Pl(r)||Pl(i)?xo(r,va._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Us(e)):n&&Y&&xo(n,va._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Us(e)),o=St),t.type??(t.type=o)}return t.type}function Il(e){const t=Uo(e);if(!t.writeType){if(!_c(e,7))return Dt;const n=Y_(e,178)??lt(Y_(e,172),yu);let r=Nl(n);gc()||(Pl(n)&&xo(n,va._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Us(e)),r=St),t.writeType??(t.writeType=r||Fl(e))}return t.writeType}function Ol(e){const t=xu(Nu(e));return 8650752&t.flags?t:2097152&t.flags?S(t.types,(e=>!!(8650752&e.flags))):void 0}function Ml(e){let t=Uo(e);const n=t;if(!t.type){const r=e.valueDeclaration&&oO(e.valueDeclaration,!1);if(r){const n=iO(e,r);n&&(e=n,t=n.links)}n.type=t.type=function(e){const t=e.valueDeclaration;if(1536&e.flags&&_p(e))return St;if(t&&(226===t.kind||Ox(t)&&226===t.parent.kind))return il(e);if(512&e.flags&&t&&qN(t)&&t.commonJsModuleIndicator){const t=$a(e);if(t!==e){if(!_c(e,0))return Dt;const n=ts(e.exports.get("export=")),r=il(n,n===t?void 0:t);return gc()?r:jl(e)}}const n=hs(16,e);if(32&e.flags){const t=Ol(e);return t?cv([n,t]):n}return U&&16777216&e.flags?XT(n,!0):n}(e)}return t.type}function Ll(e){const t=Uo(e);return t.type||(t.type=Mu(e))}function jl(e){const t=e.valueDeclaration;if(t){if(kv(t))return xo(e.valueDeclaration,va._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Us(e)),Dt;Y&&(169!==t.kind||t.initializer)&&xo(e.valueDeclaration,va._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,Us(e))}else if(2097152&e.flags){const t=sa(e);t&&xo(t,va.Circular_definition_of_import_alias_0,Us(e))}return St}function Rl(e){const t=Uo(e);return t.type||(xn.assertIsDefined(t.deferralParent),xn.assertIsDefined(t.deferralConstituents),t.type=1048576&t.deferralParent.flags?ev(t.deferralConstituents):cv(t.deferralConstituents)),t.type}function zl(e){const t=px(e);return 4&e.flags?2&t?65536&t?function(e){const t=Uo(e);return!t.writeType&&t.deferralWriteConstituents&&(xn.assertIsDefined(t.deferralParent),xn.assertIsDefined(t.deferralConstituents),t.writeType=1048576&t.deferralParent.flags?ev(t.deferralWriteConstituents):cv(t.deferralWriteConstituents)),t.writeType}(e)||Rl(e):e.links.writeType||e.links.type:bC($l(e),!!(16777216&e.flags)):98304&e.flags?1&t?function(e){const t=Uo(e);return t.writeType||(t.writeType=eS(zl(t.target),t.mapper))}(e):Il(e):$l(e)}function $l(e,t){const n=px(e);return 65536&n?Rl(e):1&n?function(e){const t=Uo(e);return t.type||(t.type=eS($l(t.target),t.mapper))}(e):262144&n?function(e){var t;if(!e.links.type){const n=e.links.mappedType;if(!_c(e,0))return n.containsError=!0,Dt;const i=eS(yd(n.target||n),qx(n.mapper,fd(n),e.links.keyType));let o=U&&16777216&e.flags&&!_M(i,49152)?XT(i,!0):524288&e.links.checkFlags?EC(i):i;gc()||(xo(r,va.Type_of_property_0_circularly_references_itself_in_mapped_type_1,Us(e),Ws(n)),o=Dt),(t=e.links).type??(t.type=o)}return e.links.type}(e):8192&n?function(e){const t=Uo(e);return t.type||(t.type=aw(e.links.propertyType,e.links.mappedType,e.links.constraintType)||At),t.type}(e):7&e.flags?function(e,t){const n=Uo(e);if(!n.type){const r=function(e,t){if(4194304&e.flags)return function(e){const t=ju(is(e));return t.typeParameters?Tg(t,O(t.typeParameters,(e=>St))):t}(e);if(e===Pe)return St;if(134217728&e.flags&&e.valueDeclaration){const t=ns(Sd(e.valueDeclaration)),n=No(t.flags,"exports");n.declarations=t.declarations?t.declarations.slice():[],n.parent=e,n.links.target=t,t.valueDeclaration&&(n.valueDeclaration=t.valueDeclaration),t.members&&(n.members=new Map(t.members)),t.exports&&(n.exports=new Map(t.exports));const r=ed();return r.set("exports",n),ks(e,r,u,u,u)}xn.assertIsDefined(e.valueDeclaration);const n=e.valueDeclaration;if(qN(n)&&ef(n))return n.statements.length?RC(dT(KM(n.statements[0].expression))):wn;if(hu(n))return Fl(e);if(!_c(e,0))return 512&e.flags&&!(67108864&e.flags)?Ml(e):KE(n)&&1===t?Dt:jl(e);let r;if(277===n.kind)r=bl(El(n)||DM(n.expression),n);else if(uP(n)||Mm(n)&&(QE(n)||(GE(n)||_g(n))&&uP(n.parent)))r=il(e);else if(GE(n)||XE(n)||qD(n)||$_(n)||TD(n)||GP(n)||HP(n)||dE(n)&&!$f(n)||_E(n)||qN(n)){if(9136&e.flags)return Ml(e);r=uP(n.parent)?il(e):El(n)||St}else if(BN(n))r=El(n)||OM(n);else if(NN(n))r=El(n)||zF(n);else if(JN(n))r=El(n)||IM(n.name,0);else if($f(n))r=El(n)||MM(n,0);else if(sE(n)||uE(n)||lE(n)||KP(n)||KE(n)||Al(n))r=vl(n,!0);else if(YP(n))r=Ml(e);else{if(!$N(n))return xn.fail("Unhandled declaration kind! "+xn.formatSyntaxKind(n.kind)+" for "+xn.formatSymbol(e));r=Ll(e)}return gc()?r:512&e.flags&&!(67108864&e.flags)?Ml(e):KE(n)&&1===t?r:jl(e)}(e,t);return n.type||function(e){let t=e.valueDeclaration;return!!t&&(KE(t)&&(t=ac(t)),!!sE(t)&&fS(t.parent))}(e)||t||(n.type=r),r}return n.type}(e,t):9136&e.flags?Ml(e):8&e.flags?Ll(e):98304&e.flags?Fl(e):2097152&e.flags?function(e){const t=Uo(e);if(!t.type){if(!_c(e,0))return Dt;const n=Ea(e),r=e.declarations&&Ca(sa(e),!0),i=g(null==r?void 0:r.declarations,(e=>mN(e)?El(e):void 0));if(t.type??(t.type=(null==r?void 0:r.declarations)&&hR(r.declarations)&&e.declarations.length?function(e){const t=Sd(e.declarations[0]),n=vc(e.escapedName),r=e.declarations.every((e=>Mm(e)&&Ox(e)&&og(e.expression))),i=r?YC.createPropertyAccessExpression(YC.createPropertyAccessExpression(YC.createIdentifier("module"),YC.createIdentifier("exports")),n):YC.createPropertyAccessExpression(YC.createIdentifier("exports"),n);return r&&OT(i.expression.expression,i.expression),OT(i.expression,i),OT(i,t),i.flowNode=t.endFlowNode,XD(i,kt,It)}(r):hR(e.declarations)?kt:i||(111551&Pa(n)?$l(n):Dt)),!gc())return jl(r??e),t.type??(t.type=Dt)}return t.type}(e):Dt}function ql(e){return bC($l(e),!!(16777216&e.flags))}function Kl(e,t){return void 0!==e&&void 0!==t&&0!=(4&wx(e))&&e.target===t}function Hl(e){return 4&wx(e)?e.target:e}function Gl(e,t){return function e(n){if(7&wx(n)){const r=Hl(n);return r===t||Q(ku(r),e)}return!!(2097152&n.flags)&&Q(n.types,e)}(e)}function Ql(e,t){for(const n of t)e=me(e,Lu(ns(n)));return e}function Yl(e,t){for(;;){if((e=e.parent)&&uP(e)){const t=ag(e);if(6===t||3===t){const t=ns(e.left);t&&t.parent&&!mc(t.parent.valueDeclaration,(t=>e===t))&&(e=t.parent.valueDeclaration)}}if(!e)return;switch(e.kind){case 263:case 231:case 264:case 179:case 180:case 173:case 184:case 185:case 317:case 262:case 174:case 218:case 219:case 265:case 345:case 346:case 340:case 338:case 200:case 194:{const n=Yl(e,t);if(200===e.kind)return ue(n,Lu(ns(e.typeParameter)));if(194===e.kind)return Z(n,Kb(e));const r=Ql(n,ml(e)),i=t&&(263===e.kind||231===e.kind||264===e.kind||rO(e))&&Nu(ns(e)).thisType;return i?ue(r,i):r}case 341:const n=$g(e);n&&(e=n.valueDeclaration);break;case 320:{const n=Yl(e,t);return e.tags?Ql(n,R(e.tags,(e=>CF(e)?e.typeParameters:void 0))):n}}}}function tu(e){var t;const n=32&e.flags||16&e.flags?e.valueDeclaration:null==(t=e.declarations)?void 0:t.find((e=>{if(264===e.kind)return!0;if(260!==e.kind)return!1;const t=e.initializer;return!!t&&(218===t.kind||219===t.kind)}));return xn.assert(!!n,"Class was missing valueDeclaration -OR- non-class had no interface declarations"),Yl(n)}function nu(e){if(!e.declarations)return;let t;for(const n of e.declarations)(264===n.kind||263===n.kind||231===n.kind||rO(n)||Ag(n))&&(t=Ql(t,ml(n)));return t}function ru(e){const t=Vp(e,1);if(1===t.length){const e=t[0];if(!e.typeParameters&&1===e.parameters.length&&JB(e)){const t=xO(e.parameters[0]);return Ec(t)||Wk(t)===St}}return!1}function su(e){if(Vp(e,1).length>0)return!0;if(8650752&e.flags){const t=Wd(e);return!!t&&ru(t)}return!1}function du(e){const t=Cx(e.symbol);return t&&Sh(t)}function pu(e,t,n){const r=p(t),i=Mm(n);return F(Vp(e,1),(e=>(i||r>=kf(e.typeParameters))&&r<=p(e.typeParameters)))}function bu(e,t,n){const r=pu(e,t,n),i=O(t,Sx);return L(r,(e=>Q(e.typeParameters)?hm(e,i,Mm(n)):e))}function xu(e){if(!e.resolvedBaseConstructorType){const t=Cx(e.symbol),n=t&&Sh(t),r=du(e);if(!r)return e.resolvedBaseConstructorType=It;if(!_c(e,1))return Dt;const i=KM(r.expression);if(n&&r!==n&&(xn.assert(!n.typeArguments),KM(n.expression)),2621440&i.flags&&Od(i),!gc())return xo(e.symbol.valueDeclaration,va._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,Us(e.symbol)),e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=Dt);if(!(1&i.flags||i===Bt||su(i))){const t=xo(r.expression,va.Type_0_is_not_a_constructor_function_type,Ws(i));if(262144&i.flags){const e=ug(i);let n=At;if(e){const t=Vp(e,1);t[0]&&(n=Gf(t[0]))}i.symbol.declarations&&fT(t,Rp(i.symbol.declarations[0],va.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,Us(i.symbol),Ws(n)))}return e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=Dt)}e.resolvedBaseConstructorType??(e.resolvedBaseConstructorType=i)}return e.resolvedBaseConstructorType}function Su(e,t){xo(e,va.Type_0_recursively_references_itself_as_a_base_type,Ws(t,void 0,2))}function ku(e){if(!e.baseTypesResolved){if(_c(e,6)&&(8&e.objectFlags?e.resolvedBaseTypes=[Tu(e)]:96&e.symbol.flags?(32&e.symbol.flags&&function(e){e.resolvedBaseTypes=H_;const t=mp(xu(e));if(!(2621441&t.flags))return e.resolvedBaseTypes=u;const n=du(e);let r;const i=t.symbol?ju(t.symbol):void 0;if(t.symbol&&32&t.symbol.flags&&function(e){const t=e.outerTypeParameters;if(t){const n=t.length-1,r=Ig(e);return t[n].symbol!==r[n].symbol}return!0}(i))r=Lg(n,t.symbol);else if(1&t.flags)r=t;else{const i=bu(t,n.typeArguments,n);if(!i.length)return xo(n.expression,va.No_base_constructor_has_the_specified_number_of_type_arguments),e.resolvedBaseTypes=u;r=Gf(i[0])}if(Nc(r))return e.resolvedBaseTypes=u;const o=Sp(r);if(!Du(o)){const t=uS(Mp(void 0,r),va.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,Ws(o));return ro.add(zp(Sd(n.expression),n.expression,t)),e.resolvedBaseTypes=u}if(e===o||Gl(o,e))return xo(e.symbol.valueDeclaration,va.Type_0_recursively_references_itself_as_a_base_type,Ws(e,void 0,2)),e.resolvedBaseTypes=u;e.resolvedBaseTypes===H_&&(e.members=void 0),e.resolvedBaseTypes=[o]}(e),64&e.symbol.flags&&function(e){if(e.resolvedBaseTypes=e.resolvedBaseTypes||u,e.symbol.declarations)for(const t of e.symbol.declarations)if(264===t.kind&&wh(t))for(const n of wh(t)){const r=Sp(Sx(n));Nc(r)||(Du(r)?e===r||Gl(r,e)?Su(t,e):e.resolvedBaseTypes===u?e.resolvedBaseTypes=[r]:e.resolvedBaseTypes.push(r):xo(n,va.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members))}}(e)):xn.fail("type must be class or interface"),!gc()&&e.symbol.declarations))for(const t of e.symbol.declarations)263!==t.kind&&264!==t.kind||Su(t,e);e.baseTypesResolved=!0}return e.resolvedBaseTypes}function Tu(e){return Ty(ev(L(e.typeParameters,((t,n)=>8&e.elementFlags[n]?Mb(t,zt):t))||u),e.readonly)}function Du(e){if(262144&e.flags){const t=Wd(e);if(t)return Du(t)}return!!(67633153&e.flags&&!Ad(e)||2097152&e.flags&&x(e.types,Du))}function Nu(e){let t=Uo(e);const n=t;if(!t.declaredType){const r=32&e.flags?1:2,i=iO(e,e.valueDeclaration&&function(e){var t;const n=e&&oO(e,!0),r=null==(t=null==n?void 0:n.exports)?void 0:t.get("prototype"),i=(null==r?void 0:r.valueDeclaration)&&function(e){if(!e.parent)return!1;let t=e.parent;for(;t&&211===t.kind;)t=t.parent;if(t&&uP(t)&&Tb(t.left)&&64===t.operatorToken.kind){const e=hg(t);return HE(e)&&e}}(r.valueDeclaration);return i?ns(i):void 0}(e.valueDeclaration));i&&(e=i,t=i.links);const o=n.declaredType=t.declaredType=hs(r,e),a=tu(e),s=nu(e);(a||s||1===r||!function(e){if(!e.declarations)return!0;for(const t of e.declarations)if(264===t.kind){if(256&t.flags)return!1;const e=wh(t);if(e)for(const t of e)if(vb(t.expression)){const e=Ma(t.expression,788968,!0);if(!e||!(64&e.flags)||Nu(e).thisType)return!1}}return!0}(e))&&(o.objectFlags|=4,o.typeParameters=Z(a,s),o.outerTypeParameters=a,o.localTypeParameters=s,o.instantiations=new Map,o.instantiations.set(fg(o.typeParameters),o),o.target=o,o.resolvedTypeArguments=o.typeParameters,o.thisType=ys(e),o.thisType.isThisType=!0,o.thisType.constraint=o)}return t.declaredType}function Fu(e){var t;const n=Uo(e);if(!n.declaredType){if(!_c(e,2))return Dt;const r=xn.checkDefined(null==(t=e.declarations)?void 0:t.find(Ag),"Type alias symbol with no valid declaration found"),i=Fg(r)?r.typeExpression:r.type;let o=i?Sx(i):Dt;if(gc()){const t=nu(e);t&&(n.typeParameters=t,n.instantiations=new Map,n.instantiations.set(fg(t),o))}else o=Dt,340===r.kind?xo(r.typeExpression.type,va.Type_alias_0_circularly_references_itself,Us(e)):xo(Dc(r)&&r.name||r,va.Type_alias_0_circularly_references_itself,Us(e));n.declaredType??(n.declaredType=o)}return n.declaredType}function Au(e){return 1056&e.flags&&8&e.symbol.flags?ju(is(e.symbol)):e}function Iu(e){const t=Uo(e);if(!t.declaredType){const n=[];if(e.declarations)for(const t of e.declarations)if(266===t.kind)for(const r of t.members)if(l_(r)){const t=ns(r),i=aB(r).value,o=ax(void 0!==i?dx(i,OB(e),t):Ou(t));Uo(t).declaredType=o,n.push(sx(o))}const r=n.length?ev(n,1,e,void 0):Ou(e);1048576&r.flags&&(r.flags|=1024,r.symbol=e),t.declaredType=r}return t.declaredType}function Ou(e){const t=fs(32,e),n=fs(32,e);return t.regularType=t,t.freshType=n,n.regularType=t,n.freshType=n,t}function Mu(e){const t=Uo(e);if(!t.declaredType){const n=Iu(is(e));t.declaredType||(t.declaredType=n)}return t.declaredType}function Lu(e){const t=Uo(e);return t.declaredType||(t.declaredType=ys(e))}function ju(e){return qu(e)||Dt}function qu(e){return 96&e.flags?Nu(e):524288&e.flags?Fu(e):262144&e.flags?Lu(e):384&e.flags?Iu(e):8&e.flags?Mu(e):2097152&e.flags?function(e){const t=Uo(e);return t.declaredType||(t.declaredType=ju(Ea(e)))}(e):void 0}function Uu(e){switch(e.kind){case 133:case 159:case 154:case 150:case 163:case 136:case 155:case 151:case 116:case 157:case 146:case 201:return!0;case 188:return Uu(e.elementType);case 183:return!e.typeArguments||e.typeArguments.every(Uu)}return!1}function Ku(e){const t=gl(e);return!t||Uu(t)}function Wu(e){const t=kv(e);return t?Uu(t):!L_(e)}function Hu(e){if(e.declarations&&1===e.declarations.length){const t=e.declarations[0];if(t)switch(t.kind){case 172:case 171:return Wu(t);case 174:case 173:case 176:case 177:case 178:return function(e){const t=Cv(e),n=ml(e);return(176===e.kind||!!t&&Uu(t))&&e.parameters.every(Wu)&&n.every(Ku)}(t)}}return!1}function Gu(e,t,n){const r=ed();for(const i of e)r.set(i.escapedName,n&&Hu(i)?i:Kx(i,t));return r}function Yu(e,t){for(const n of t){if(e_(n))continue;const t=e.get(n.escapedName);(!t||t.valueDeclaration&&uP(t.valueDeclaration)&&!Xc(t)&&!em(t.valueDeclaration))&&(e.set(n.escapedName,n),e.set(n.escapedName,n))}}function e_(e){return!!e.valueDeclaration&&Zl(e.valueDeclaration)&&Jv(e.valueDeclaration)}function o_(e){if(!e.declaredProperties){const t=e.symbol,n=m_(t);e.declaredProperties=bs(n),e.declaredCallSignatures=u,e.declaredConstructSignatures=u,e.declaredIndexInfos=u,e.declaredCallSignatures=Jf(n.get("__call")),e.declaredConstructSignatures=Jf(n.get("__new")),e.declaredIndexInfos=Um(t)}return e}function a_(e){if(!oE(e)&&!XE(e))return!1;const t=oE(e)?e.expression:e.argumentExpression;return vb(t)&&mC(oE(e)?IF(e):DM(t))}function s_(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&64===e.charCodeAt(2)}function c_(e){const t=Pc(e);return!!t&&a_(t)}function l_(e){return!Vh(e)||c_(e)}function u_(e,t,n,r){xn.assert(!!r.symbol,"The member is expected to have a symbol.");const i=Wo(r);if(!i.resolvedSymbol){i.resolvedSymbol=r.symbol;const o=uP(r)?r.left:r.name,a=XE(o)?DM(o.argumentExpression):IF(o);if(mC(a)){const s=gC(a),c=r.symbol.flags;let l=n.get(s);l||n.set(s,l=No(0,s,4096));const u=t&&t.get(s);if(!(32&e.flags)&&l.flags&Lo(c)){const e=u?Z(u.declarations,l.declarations):l.declarations,t=!(8192&a.flags)&&vc(s)||Ap(o);f(e,(e=>xo(Pc(e)||e,va.Property_0_was_also_declared_here,t))),xo(o||r,va.Duplicate_property_0,t),l=No(0,s,4096)}return l.links.nameType=a,function(e,t,n){xn.assert(!!(4096&px(e)),"Expected a late-bound symbol."),e.flags|=n,Uo(t.symbol).lateSymbol=e,e.declarations?t.symbol.isReplaceableByMethod||e.declarations.push(t):e.declarations=[t],111551&n&&(e.valueDeclaration&&e.valueDeclaration.kind===t.kind||(e.valueDeclaration=t))}(l,r,c),l.parent?xn.assert(l.parent===e,"Existing symbol parent should match new one"):l.parent=e,i.resolvedSymbol=l}}return i.resolvedSymbol}function __(e,t){const n=Uo(e);if(!n[t]){const r="resolvedExports"===t,i=r?1536&e.flags?es(e).exports:e.exports:e.members;n[t]=i||w;const o=ed();for(const t of e.declarations||u){const n=Af(t);if(n)for(const t of n)r===zv(t)&&c_(t)&&u_(e,i,o,t)}const a=os(e).assignmentDeclarationMembers;if(a){const t=$e(a.values());for(const n of t){const t=ag(n);r===!(3===t||uP(n)&&IN(n,t)||9===t||6===t)&&c_(n)&&u_(e,i,o,n)}}let s=function(e,t){if(!(null==e?void 0:e.size))return t;if(!(null==t?void 0:t.size))return e;const n=ed();return qo(n,e),qo(n,t),n}(i,o);if(33554432&e.flags&&n.cjsExportMerged&&e.declarations)for(const n of e.declarations){const e=Uo(n.symbol)[t];s?e&&e.forEach(((e,t)=>{const n=s.get(t);if(n){if(n===e)return;s.set(t,Jo(n,e))}else s.set(t,e)})):s=e}n[t]=s||w}return n[t]}function m_(e){return 6256&e.flags?__(e,"resolvedMembers"):e.members||w}function g_(e){if(106500&e.flags&&"__computed"===e.escapedName){const t=Uo(e);if(!t.lateSymbol&&Q(e.declarations,c_)){const t=ts(e.parent);Q(e.declarations,zv)?Ga(t):m_(t)}return t.lateSymbol||(t.lateSymbol=e)}return e}function y_(e,t,n){if(4&wx(e)){const n=e.target,r=Ig(e);return p(n.typeParameters)===p(r)?Tg(n,Z(r,[t||n.thisType])):e}if(2097152&e.flags){const r=L(e.types,(e=>y_(e,t,n)));return r!==e.types?cv(r):e}return n?mp(e):e}function v_(e,t,n,r){let i,o,a,s,c;be(n,r,0,n.length)?(o=t.symbol?m_(t.symbol):ed(t.declaredProperties),a=t.declaredCallSignatures,s=t.declaredConstructSignatures,c=t.declaredIndexInfos):(i=Fx(n,r),o=Gu(t.declaredProperties,i,1===n.length),a=Px(t.declaredCallSignatures,i),s=Px(t.declaredConstructSignatures,i),c=Nx(t.declaredIndexInfos,i));const l=ku(t);if(l.length){if(t.symbol&&o===m_(t.symbol)){const e=ed(t.declaredProperties),n=jm(t.symbol);n&&e.set("__index",n),o=e}Ss(e,o,a,s,c);const n=we(r);for(const e of l){const t=n?y_(eS(e,i),n):e;Yu(o,Rd(t)),a=Z(a,Vp(t,0)),s=Z(s,Vp(t,1));const r=t!==St?cf(t):[Vm(Jt,St,!1)];c=Z(c,F(r,(e=>!rf(c,e.keyType))))}}Ss(e,o,a,s,c)}function x_(e,t,n,r,i,o,a,s){const c=new l(Be,s);return c.declaration=e,c.typeParameters=t,c.parameters=r,c.thisParameter=n,c.resolvedReturnType=i,c.resolvedTypePredicate=o,c.minArgumentCount=a,c.resolvedMinArgumentCount=void 0,c.target=void 0,c.mapper=void 0,c.compositeSignatures=void 0,c.compositeKind=void 0,c}function S_(e){const t=x_(e.declaration,e.typeParameters,e.thisParameter,e.parameters,void 0,void 0,e.minArgumentCount,167&e.flags);return t.target=e.target,t.mapper=e.mapper,t.compositeSignatures=e.compositeSignatures,t.compositeKind=e.compositeKind,t}function k_(e,t){const n=S_(e);return n.compositeSignatures=t,n.compositeKind=1048576,n.target=void 0,n.mapper=void 0,n}function T_(e,t){if((24&e.flags)===t)return e;e.optionalCallSignatureCache||(e.optionalCallSignatureCache={});const n=8===t?"inner":"outer";return e.optionalCallSignatureCache[n]||(e.optionalCallSignatureCache[n]=function(e,t){xn.assert(8===t||16===t,"An optional call signature can either be for an inner call chain or an outer call chain, but not both.");const n=S_(e);return n.flags|=t,n}(e,t))}function w_(e,t){if(JB(e)){const r=e.parameters.length-1,i=e.parameters[r].escapedName,o=$l(e.parameters[r]);if(PT(o))return[n(o,r,i)];if(!t&&1048576&o.flags&&x(o.types,PT))return O(o.types,(e=>n(e,r,i)))}return[e.parameters];function n(t,n,r){const i=Ig(t),o=function(e,t){const n=new Map;return O(e.target.labeledElementDeclarations,((e,r)=>{const i=SO(e,r,t),o=n.get(i);return void 0===o?(n.set(i,1),i):(n.set(i,o+1),`${i}_${o}`)}))}(t,r),a=O(i,((r,i)=>{const a=o&&o[i]?o[i]:kO(e,n+i,t),s=t.target.elementFlags[i],c=No(1,a,12&s?32768:2&s?16384:0);return c.links.type=4&s?Ty(r):r,c}));return Z(e.parameters.slice(0,n),a)}}function E_(e,t,n,r,i){for(const o of e)if(Jk(o,t,n,r,i,n?vS:hS))return o}function N_(e,t,n){if(t.typeParameters){if(n>0)return;for(let n=1;n1&&(n=void 0===n?r:-1);for(const n of e[r])if(!t||!E_(t,n,!1,!1,!0)){const i=N_(e,n,r);if(i){let e=n;if(i.length>1){let t=n.thisParameter;const r=f(i,(e=>e.thisParameter));r&&(t=FC(r,cv(q(i,(e=>e.thisParameter&&$l(e.thisParameter)))))),e=k_(n,i),e.thisParameter=t}(t||(t=[])).push(e)}}}if(!p(t)&&-1!==n){const r=e[void 0!==n?n:0];let i=r.slice();for(const t of e)if(t!==r){const e=t[0];if(xn.assert(!!e,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),i=e.typeParameters&&Q(i,(t=>!!t.typeParameters&&!R_(e.typeParameters,t.typeParameters)))?void 0:O(i,(t=>J_(t,e))),!i)break}t=i}return t||u}function R_(e,t){if(p(e)!==p(t))return!1;if(!e||!t)return!0;const n=Fx(t,e);for(let r=0;r=i?e:t,a=o===e?t:e,s=o===e?r:i,c=IO(e)||IO(t),l=c&&!IO(o),u=new Array(s+(l?1:0));for(let _=0;_=AO(o)&&_>=AO(a),h=_>=r?void 0:kO(e,_),y=_>=i?void 0:kO(t,_),v=No(1|(g&&!m?16777216:0),(h===y?h:h?y?void 0:h:y)||`arg${_}`,m?32768:g?16384:0);v.links.type=m?Ty(f):f,u[_]=v}if(l){const e=No(1,"args",32768);e.links.type=Ty(DO(a,s)),a===t&&(e.links.type=eS(e.links.type,n)),u[s]=e}return u}(e,t,r),a=function(e,t,n){return e&&t?FC(e,cv([$l(e),eS($l(t),n)])):e||t}(e.thisParameter,t.thisParameter,r),s=x_(i,n,a,o,void 0,void 0,Math.max(e.minArgumentCount,t.minArgumentCount),167&(e.flags|t.flags));return s.compositeKind=1048576,s.compositeSignatures=Z(2097152!==e.compositeKind&&e.compositeSignatures||[e],[t]),r?s.mapper=2097152!==e.compositeKind&&e.mapper&&e.compositeSignatures?zx(e.mapper,r):r:2097152!==e.compositeKind&&e.mapper&&e.compositeSignatures&&(s.mapper=e.mapper),s}function z_(e){const t=cf(e[0]);if(t){const n=[];for(const r of t){const t=r.keyType;x(e,(e=>!!_f(e,t)))&&n.push(Vm(t,ev(O(e,(e=>pf(e,t)))),Q(e,(e=>_f(e,t).isReadonly))))}return n}return u}function K_(e,t){return e?t?cv([e,t]):e:t}function W_(e){const t=N(e,(e=>Vp(e,1).length>0)),n=O(e,ru);if(t>0&&t===N(n,(e=>e))){const e=n.indexOf(!0);n[e]=!1}return n}function rd(e,t,n,r){const i=[];for(let o=0;o!Jk(e,n,!1,!1,!1,hS)))||(e=ue(e,n));return e}function od(e,t,n){if(e)for(let r=0;r0===n||Pd(e)===t))?t:0}return 0}function Ad(e){if(32&wx(e)){const t=md(e);if(gb(t))return!0;const n=hd(e);if(n&&gb(eS(n,Mx(fd(e),t))))return!0}return!1}function Id(e){const t=hd(e);return t?SS(t,fd(e))?1:2:0}function Od(e){return e.members||(524288&e.flags?4&e.objectFlags?function(e){const t=o_(e.target),n=Z(t.typeParameters,[t.thisType]),r=Ig(e);v_(e,t,n,r.length===n.length?r:Z(r,[e]))}(e):3&e.objectFlags?function(e){v_(e,o_(e),u,u)}(e):1024&e.objectFlags?function(e){const t=_f(e.source,Jt),n=Dd(e.mappedType),r=!(1&n),i=4&n?0:16777216,o=t?[Vm(Jt,aw(t.type,e.mappedType,e.constraintType)||At,r&&t.isReadonly)]:u,a=ed(),s=function(e){const t=md(e.mappedType);if(!(1048576&t.flags||2097152&t.flags))return;const n=1048576&t.flags?t.origin:t;if(!(n&&2097152&n.flags))return;const r=cv(n.types.filter((t=>t!==e.constraintType)));return r!==en?r:void 0}(e);for(const t of Rd(e.source)){if(s&&!SS(Ev(t,8576),s))continue;const n=8192|(r&&oM(t)?8:0),o=No(4|t.flags&i,t.escapedName,n);if(o.declarations=t.declarations,o.links.nameType=Uo(t).nameType,o.links.propertyType=$l(t),8388608&e.constraintType.type.flags&&262144&e.constraintType.type.objectType.flags&&262144&e.constraintType.type.indexType.flags){const t=e.constraintType.type.objectType,n=ad(e.mappedType,e.constraintType.type,t);o.links.mappedType=n,o.links.constraintType=Av(t)}else o.links.mappedType=e.mappedType,o.links.constraintType=e.constraintType;a.set(t.escapedName,o)}Ss(e,a,u,u,o)}(e):16&e.objectFlags?function(e){if(e.target)return Ss(e,w,u,u,u),void Ss(e,Gu(Md(e.target),e.mapper,!1),Px(Vp(e.target,0),e.mapper),Px(Vp(e.target,1),e.mapper),Nx(cf(e.target),e.mapper));const t=ts(e.symbol);if(2048&t.flags){Ss(e,w,u,u,u);const n=m_(t),r=Jf(n.get("__call")),i=Jf(n.get("__new"));return void Ss(e,n,r,i,Um(t))}let n,r,i=Ga(t);if(t===he){const e=new Map;i.forEach((t=>{var n;418&t.flags||512&t.flags&&(null==(n=t.declarations)?void 0:n.length)&&x(t.declarations,sp)||e.set(t.escapedName,t)})),i=e}if(Ss(e,i,u,u,u),32&t.flags){const e=xu(Nu(t));11272192&e.flags?(i=ed(function(e){const t=bs(e),n=zm(e);return n?Z(t,[n]):t}(i)),Yu(i,Rd(e))):e===St&&(r=Vm(Jt,St,!1))}const o=zm(i);if(o?n=Wm(o):(r&&(n=ue(n,r)),384&t.flags&&(32&ju(t).flags||Q(e.properties,(e=>!!(296&$l(e).flags))))&&(n=ue(n,oi))),Ss(e,i,u,u,n||u),8208&t.flags&&(e.callSignatures=Jf(t)),32&t.flags){const n=Nu(t);let r=t.members?Jf(t.members.get("__constructor")):u;16&t.flags&&(r=pe(r.slice(),q(e.callSignatures,(e=>rO(e.declaration)?x_(e.declaration,e.typeParameters,e.thisParameter,e.parameters,n,void 0,e.minArgumentCount,167&e.flags):void 0)))),r.length||(r=function(e){const t=Vp(xu(e),1),n=Cx(e.symbol),r=!!n&&Bv(n,64);if(0===t.length)return[x_(void 0,e.localTypeParameters,void 0,u,e,void 0,0,r?4:0)];const i=du(e),o=Mm(i),a=Oh(i),s=p(a),c=[];for(const n of t){const t=kf(n.typeParameters),i=p(n.typeParameters);if(o||s>=t&&s<=i){const s=i?vm(n,Tf(a,n.typeParameters,t,o)):S_(n);s.typeParameters=e.localTypeParameters,s.resolvedReturnType=e,s.flags=r?4|s.flags:-5&s.flags,c.push(s)}}return c}(n)),e.constructSignatures=r}}(e):32&e.objectFlags?function(e){const t=ed();let n;Ss(e,w,u,u,u);const r=fd(e),i=md(e),o=e.target||e,a=hd(o),s=2!==Id(o),c=yd(o),l=mp(wd(e)),_=Dd(e);function d(i){vD(a?eS(a,qx(e.mapper,r,i)):i,(o=>function(i,o){if(mC(o)){const n=gC(o),r=t.get(n);if(r)r.links.nameType=ev([r.links.nameType,o]),r.links.keyType=ev([r.links.keyType,i]);else{const r=mC(i)?Jp(l,gC(i)):void 0,a=!!(4&_||!(8&_)&&r&&16777216&r.flags),c=!!(1&_||!(2&_)&&r&&oM(r)),u=U&&!a&&r&&16777216&r.flags,d=No(4|(a?16777216:0),n,262144|(r?cd(r):0)|(c?8:0)|(u?524288:0));d.links.mappedType=e,d.links.nameType=o,d.links.keyType=i,r&&(d.links.syntheticOrigin=r,d.declarations=s?r.declarations:void 0),t.set(n,d)}}else if(ng(o)||33&o.flags){const t=5&o.flags?Jt:40&o.flags?zt:o,a=eS(c,qx(e.mapper,r,i)),s=mf(l,o),u=Vm(t,a,!!(1&_||!(2&_)&&(null==s?void 0:s.isReadonly)));n=od(n,u,!0)}}(i,o)))}bd(e)?pd(l,8576,!1,d):vD(sd(i),d),Ss(e,t,u,u,n||u)}(e):xn.fail("Unhandled object type "+xn.formatObjectFlags(e.objectFlags)):1048576&e.flags?function(e){const t=F_(O(e.types,(e=>e===Wn?[ni]:Vp(e,0)))),n=F_(O(e.types,(e=>Vp(e,1)))),r=z_(e.types);Ss(e,w,t,n,r)}(e):2097152&e.flags?function(e){let t,n,r;const i=e.types,o=W_(i),a=N(o,(e=>e));for(let s=0;s0&&(e=O(e,(e=>{const t=S_(e);return t.resolvedReturnType=rd(Gf(e),i,o,s),t}))),n=id(n,e)}t=id(t,Vp(c,0)),r=Oe(cf(c),((e,t)=>od(e,t,!1)),r)}Ss(e,w,t||u,n||u,r||u)}(e):xn.fail("Unhandled type "+xn.formatTypeFlags(e.flags))),e}function Md(e){return 524288&e.flags?Od(e).properties:u}function Ld(e,t){if(524288&e.flags){const n=Od(e).members.get(t);if(n&&ds(n))return n}}function jd(e){if(!e.resolvedProperties){const t=ed();for(const n of e.types){for(const r of Rd(n))if(!t.has(r.escapedName)){const n=xp(e,r.escapedName,!!(2097152&e.flags));n&&t.set(r.escapedName,n)}if(1048576&e.flags&&0===cf(n).length)break}e.resolvedProperties=bs(t)}return e.resolvedProperties}function Rd(e){return 3145728&(e=yp(e)).flags?jd(e):Md(e)}function Bd(e){return 262144&e.flags?Jd(e):8388608&e.flags?function(e){return Xd(e)?function(e){if(up(e))return Ob(e.objectType,e.indexType);const t=$d(e.indexType);if(t&&t!==e.indexType){const n=jb(e.objectType,t,e.accessFlags);if(n)return n}const n=$d(e.objectType);return n&&n!==e.objectType?jb(n,e.indexType,e.accessFlags):void 0}(e):void 0}(e):16777216&e.flags?Kd(e):Wd(e)}function Jd(e){return Xd(e)?ug(e):void 0}function zd(e,t=0){var n;return t<5&&!(!e||!(262144&e.flags&&Q(null==(n=e.symbol)?void 0:n.declarations,(e=>Bv(e,4096)))||3145728&e.flags&&Q(e.types,(e=>zd(e,t)))||8388608&e.flags&&zd(e.objectType,t+1)||16777216&e.flags&&zd(Kd(e),t+1)||33554432&e.flags&&zd(e.baseType,t)||32&wx(e)&&function(e,t){const n=Gx(e);return!!n&&zd(n,t)}(e,t)||NT(e)&&T($y(e),((n,r)=>!!(8&e.target.elementFlags[r])&&zd(n,t)))>=0))}function $d(e){const t=Nb(e,!1);return t!==e?t:Bd(e)}function qd(e){if(!e.resolvedDefaultConstraint){const t=function(e){return e.resolvedInferredTrueType||(e.resolvedInferredTrueType=e.combinedMapper?eS(Sx(e.root.node.trueType),e.combinedMapper):Vb(e))}(e),n=Ub(e);e.resolvedDefaultConstraint=Ec(t)?n:Ec(n)?t:ev([t,n])}return e.resolvedDefaultConstraint}function Vd(e){if(void 0!==e.resolvedConstraintOfDistributive)return e.resolvedConstraintOfDistributive||void 0;if(e.root.isDistributive&&e.restrictiveInstantiation!==e){const t=Nb(e.checkType,!1),n=t===e.checkType?Bd(t):t;if(n&&n!==e.checkType){const t=Zx(e,$x(e.root.checkType,n,e.mapper),!0);if(!(131072&t.flags))return e.resolvedConstraintOfDistributive=t,t}}e.resolvedConstraintOfDistributive=!1}function Ud(e){return Vd(e)||qd(e)}function Kd(e){return Xd(e)?Ud(e):void 0}function Wd(e){if(464781312&e.flags||NT(e)){const t=Zd(e);return t!==On&&t!==Mn?t:void 0}return 4194304&e.flags?pn:void 0}function Hd(e){return Wd(e)||e}function Xd(e){return Zd(e)!==Mn}function Zd(e){if(e.resolvedBaseConstraint)return e.resolvedBaseConstraint;const t=[];return e.resolvedBaseConstraint=n(e);function n(e){if(!e.immediateBaseConstraint){if(!_c(e,4))return Mn;let n;const o=Rk(e);if((t.length<10||t.length<50&&!D(t,o))&&(t.push(o),n=function(e){if(262144&e.flags){const t=ug(e);return e.isThisType||!t?t:i(t)}if(3145728&e.flags){const t=e.types,n=[];let r=!1;for(const e of t){const t=i(e);t?(t!==e&&(r=!0),n.push(t)):r=!0}return r?1048576&e.flags&&n.length===t.length?ev(n):2097152&e.flags&&n.length?cv(n):void 0:e}if(4194304&e.flags)return pn;if(134217728&e.flags){const t=e.types,n=q(t,i);return n.length===t.length?Ov(e.texts,n):Jt}if(268435456&e.flags){const t=i(e.type);return t&&t!==e.type?Gv(e.symbol,t):Jt}if(8388608&e.flags){if(up(e))return i(Ob(e.objectType,e.indexType));const t=i(e.objectType),n=i(e.indexType),r=t&&n&&jb(t,n,e.accessFlags);return r&&i(r)}if(16777216&e.flags){const t=Ud(e);return t&&i(t)}return 33554432&e.flags?i(Ch(e)):NT(e)?Ay(O($y(e),((t,n)=>{const r=262144&t.flags&&8&e.target.elementFlags[n]&&i(t)||t;return r!==t&&xD(r,(e=>Uk(e)&&!NT(e)))?r:t})),e.target.elementFlags,e.target.readonly,e.target.labeledElementDeclarations):e}(Nb(e,!1)),t.pop()),!gc()){if(262144&e.flags){const t=cg(e);if(t){const n=xo(t,va.Type_parameter_0_has_a_circular_constraint,Ws(e));!r||_h(t,r)||_h(r,t)||fT(n,Rp(r,va.Circularity_originates_in_type_at_this_location))}}n=Mn}e.immediateBaseConstraint??(e.immediateBaseConstraint=n||On)}return e.immediateBaseConstraint}function i(e){const t=n(e);return t!==On&&t!==Mn?t:void 0}}function tp(e){if(e.default)e.default===Ln&&(e.default=Mn);else if(e.target){const t=tp(e.target);e.default=t?eS(t,e.mapper):On}else{e.default=Ln;const t=e.symbol&&f(e.symbol.declarations,(e=>aE(e)&&e.default)),n=t?Sx(t):On;e.default===Ln&&(e.default=n)}return e.default}function np(e){const t=tp(e);return t!==On&&t!==Mn?t:void 0}function rp(e){return!(!e.symbol||!f(e.symbol.declarations,(e=>aE(e)&&e.default)))}function ip(e){return e.resolvedApparentType||(e.resolvedApparentType=function(e){const t=e.target??e,n=Gx(t);if(n&&!t.declaration.nameType){const r=wd(e),i=Ad(r)?ip(r):Wd(r);if(i&&xD(i,(e=>Uk(e)||lp(e))))return eS(t,$x(n,i,e.mapper))}return e}(e))}function lp(e){return!!(2097152&e.flags)&&x(e.types,Uk)}function up(e){let t;return!(!(8388608&e.flags&&32&wx(t=e.objectType)&&!Ad(t)&&gb(e.indexType))||8&Dd(t)||t.declaration.nameType)}function mp(e){const t=465829888&e.flags?Wd(e)||At:e,n=wx(t);return 32&n?ip(t):4&n&&t!==e?y_(t,e):2097152&t.flags?function(e,t){if(e===t)return e.resolvedApparentType||(e.resolvedApparentType=y_(e,t,!0));const n=`I${qy(e)},${qy(t)}`;return fo(n)??mo(n,y_(e,t,!0))}(t,e):402653316&t.flags?Yn:296&t.flags?Zn:2112&t.flags?Rr||(Rr=Xh("BigInt",0,!1))||wn:528&t.flags?er:12288&t.flags?uy():67108864&t.flags?wn:4194304&t.flags?pn:2&t.flags&&!U?wn:t}function yp(e){return Sp(mp(Sp(e)))}function vp(e,t,n){var r,i,o;let a,s,c;const l=1048576&e.flags;let u,_=4,d=l?0:8,f=!1;for(const r of e.types){const e=mp(r);if(!(Nc(e)||131072&e.flags)){const r=Jp(e,t,n),i=r?fx(r):0;if(r){if(106500&r.flags&&(u??(u=l?0:16777216),l?u|=16777216&r.flags:u&=r.flags),a){if(r!==a)if((Zj(r)||r)===(Zj(a)||a)&&-1===Bk(a,r,((e,t)=>e===t?-1:0)))f=!!a.parent&&!!p(nu(a.parent));else{s||(s=new Map,s.set(OB(a),a));const e=OB(r);s.has(e)||s.set(e,r)}}else a=r;l&&oM(r)?d|=8:l||oM(r)||(d&=-9),d|=(6&i?0:256)|(4&i?512:0)|(2&i?1024:0)|(256&i?2048:0),lA(r)||(_=2)}else if(l){const n=!s_(t)&&gf(e,t);n?(d|=32|(n.isReadonly?8:0),c=ue(c,PT(e)?MT(e)||It:n.type)):!Tw(e)||2097152&wx(e)?d|=16:(d|=32,c=ue(c,It))}}}if(!a||l&&(s||48&d)&&1536&d&&(!s||!function(e){let t;for(const n of e){if(!n.declarations)return;if(t){if(t.forEach((e=>{D(n.declarations,e)||t.delete(e)})),0===t.size)return}else t=new Set(n.declarations)}return t}(s.values())))return;if(!(s||16&d||c)){if(f){const t=null==(r=lt(a,td))?void 0:r.links,n=FC(a,null==t?void 0:t.type);return n.parent=null==(o=null==(i=a.valueDeclaration)?void 0:i.symbol)?void 0:o.parent,n.links.containingType=e,n.links.mapper=null==t?void 0:t.mapper,n.links.writeType=zl(a),n}return a}const m=s?$e(s.values()):[a];let g,h,y;const v=[];let b,x,S=!1;for(const e of m){x?e.valueDeclaration&&e.valueDeclaration!==x&&(S=!0):x=e.valueDeclaration,g=pe(g,e.declarations);const t=$l(e);h||(h=t,y=Uo(e).nameType);const n=zl(e);(b||n!==t)&&(b=ue(b||v.slice(),n)),t!==h&&(d|=64),(sT(t)||sb(t))&&(d|=128),131072&t.flags&&t!==Sn&&(d|=131072),v.push(t)}pe(v,c);const k=No(4|(u??0),t,_|d);return k.links.containingType=e,!S&&x&&(k.valueDeclaration=x,x.symbol.parent&&(k.parent=x.symbol.parent)),k.declarations=g,k.links.nameType=y,v.length>2?(k.links.checkFlags|=65536,k.links.deferralParent=e,k.links.deferralConstituents=v,k.links.deferralWriteConstituents=b):(k.links.type=l?ev(v):cv(v),b&&(k.links.writeType=l?ev(b):cv(b))),k}function bp(e,t,n){var r,i,o;let a=n?null==(r=e.propertyCacheWithoutObjectFunctionPropertyAugment)?void 0:r.get(t):null==(i=e.propertyCache)?void 0:i.get(t);return!a&&(a=vp(e,t,n),a)&&((n?e.propertyCacheWithoutObjectFunctionPropertyAugment||(e.propertyCacheWithoutObjectFunctionPropertyAugment=ed()):e.propertyCache||(e.propertyCache=ed())).set(t,a),!n||48&px(a)||(null==(o=e.propertyCache)?void 0:o.get(t))||(e.propertyCache||(e.propertyCache=ed())).set(t,a)),a}function xp(e,t,n){const r=bp(e,t,n);return!r||16&px(r)?void 0:r}function Sp(e){return 1048576&e.flags&&16777216&e.objectFlags?e.resolvedReducedType||(e.resolvedReducedType=function(e){const t=L(e.types,Sp);if(t===e.types)return e;const n=ev(t);return 1048576&n.flags&&(n.resolvedReducedType=n),n}(e)):2097152&e.flags?(16777216&e.objectFlags||(e.objectFlags|=16777216|(Q(jd(e),kp)?33554432:0)),33554432&e.objectFlags?en:e):e}function kp(e){return Tp(e)||Cp(e)}function Tp(e){return!(16777216&e.flags||192!=(131264&px(e))||!(131072&$l(e).flags))}function Cp(e){return!e.valueDeclaration&&!!(1024&px(e))}function Ep(e){return!!(1048576&e.flags&&16777216&e.objectFlags&&Q(e.types,Ep)||2097152&e.flags&&function(e){const t=e.uniqueLiteralFilledInstantiation||(e.uniqueLiteralFilledInstantiation=eS(e,kn));return Sp(t)!==t}(e))}function Mp(e,t){if(2097152&t.flags&&33554432&wx(t)){const n=S(jd(t),Tp);if(n)return uS(e,va.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents,Ws(t,void 0,536870912),Us(n));const r=S(jd(t),Cp);if(r)return uS(e,va.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some,Ws(t,void 0,536870912),Us(r))}return e}function Jp(e,t,n,r){var i,o;if(524288&(e=yp(e)).flags){const a=Od(e),s=a.members.get(t);if(s&&!r&&512&(null==(i=e.symbol)?void 0:i.flags)&&(null==(o=Uo(e.symbol).typeOnlyExportStarMap)?void 0:o.has(t)))return;if(s&&ds(s,r))return s;if(n)return;const c=a===In?Wn:a.callSignatures.length?Hn:a.constructSignatures.length?Gn:void 0;if(c){const e=Ld(c,t);if(e)return e}return Ld(Kn,t)}if(2097152&e.flags){return xp(e,t,!0)||(n?void 0:xp(e,t,n))}if(1048576&e.flags)return xp(e,t,n)}function qp(e,t){if(3670016&e.flags){const n=Od(e);return 0===t?n.callSignatures:n.constructSignatures}return u}function Vp(e,t){const n=qp(yp(e),t);if(0===t&&!p(n)&&1048576&e.flags){if(e.arrayFallbackSignatures)return e.arrayFallbackSignatures;let r;if(xD(e,(e=>{var t,n;return!(!(null==(t=e.symbol)?void 0:t.parent)||(n=e.symbol.parent,!(n&&Xn.symbol&&Qn.symbol)||!us(n,Xn.symbol)&&!us(n,Qn.symbol))||(r?r!==e.symbol.escapedName:(r=e.symbol.escapedName,0)))}))){const n=Ty(DD(e,(e=>Ax((Wp(e.symbol.parent)?Qn:Xn).typeParameters[0],e.mapper))),bD(e,(e=>Wp(e.symbol.parent))));return e.arrayFallbackSignatures=Vp(Tc(n,r),t)}e.arrayFallbackSignatures=n}return n}function Wp(e){return!(!e||!Qn.symbol||!us(e,Qn.symbol))}function rf(e,t){return S(e,(e=>e.keyType===t))}function of(e,t){let n,r,i;for(const o of e)o.keyType===Jt?n=o:af(t,o.keyType)&&(r?(i||(i=[r])).push(o):r=o);return i?Vm(At,cv(O(i,(e=>e.type))),Oe(i,((e,t)=>e&&t.isReadonly),!0)):r||(n&&af(t,Jt)?n:void 0)}function af(e,t){return SS(e,t)||t===Jt&&SS(e,zt)||t===zt&&(e===yn||!!(128&e.flags)&&WT(e.value))}function sf(e){return 3670016&e.flags?Od(e).indexInfos:u}function cf(e){return sf(yp(e))}function _f(e,t){return rf(cf(e),t)}function pf(e,t){var n;return null==(n=_f(e,t))?void 0:n.type}function ff(e,t){return cf(e).filter((e=>af(t,e.keyType)))}function mf(e,t){return of(cf(e),t)}function gf(e,t){return mf(e,s_(t)?Qt:lx(vc(t)))}function hf(e){var t;let n;for(const t of ml(e))n=me(n,Lu(t.symbol));return(null==n?void 0:n.length)?n:HP(e)?null==(t=Df(e))?void 0:t.typeParameters:void 0}function yf(e){const t=[];return e.forEach(((e,n)=>{vs(n)||t.push(e)})),t}function vf(e,t){if(Os(e))return;const n=Ho(de,'"'+e+'"',512);return n&&t?ts(n):n}function bf(e){return Pg(e)||eC(e)||sE(e)&&rC(e)}function xf(e){if(bf(e))return!0;if(!sE(e))return!1;if(e.initializer){const t=Cf(e.parent),n=e.parent.parameters.indexOf(e);return xn.assert(n>=0),n>=AO(t,3)}const t=cm(e.parent);return!!t&&!e.type&&!e.dotDotDotToken&&e.parent.parameters.indexOf(e)>=FI(t).length}function Sf(e,t,n,r){return{kind:e,parameterName:t,parameterIndex:n,type:r}}function kf(e){let t=0;if(e)for(let n=0;n=n&&o<=i){const n=e?e.slice():[];for(let e=o;ec.arguments.length&&!_||(o=n.length)}if((177===e.kind||178===e.kind)&&l_(e)&&(!s||!r)){const t=177===e.kind?178:177,n=Y_(ns(e),t);n&&(r=function(e){const t=tJ(e);return t&&t.symbol}(n))}a&&a.typeExpression&&(r=FC(No(1,"this"),Sx(a.typeExpression)));const u=sF(e)?Kg(e):e,_=u&&fE(u)?Nu(ts(u.parent.symbol)):void 0,d=_?_.localTypeParameters:hf(e);(V_(e)||Mm(e)&&function(e,t){if(sF(e)||!Ef(e))return!1;const n=we(e.parameters),r=g(n?Oc(n):ll(e).filter(xF),(e=>e.typeExpression&&rF(e.typeExpression.type)?e.typeExpression.type:void 0)),i=No(3,"args",32768);return r?i.links.type=Ty(Sx(r.type)):(i.links.checkFlags|=65536,i.links.deferralParent=en,i.links.deferralConstituents=[rr],i.links.deferralWriteConstituents=[rr]),r&&t.pop(),t.push(i),!0}(e,n))&&(i|=1),(kE(e)&&Bv(e,64)||fE(e)&&Bv(e.parent,64))&&(i|=4),t.resolvedSignature=x_(e,d,r,n,void 0,void 0,o,i)}return t.resolvedSignature}function Df(e){if(!Mm(e)||!uu(e))return;const t=ol(e);return(null==t?void 0:t.typeExpression)&&hI(Sx(t.typeExpression))}function Ef(e){const t=Wo(e);return void 0===t.containsArgumentsReference&&(512&t.flags?t.containsArgumentsReference=!0:t.containsArgumentsReference=function e(t){if(!t)return!1;switch(t.kind){case 80:return t.escapedText===Ee.escapedName&&pB(t)===Ee;case 172:case 174:case 177:case 178:return 167===t.name.kind&&e(t.name);case 211:case 212:return e(t.expression);case 303:return e(t.initializer);default:return!cy(t)&&!wf(t)&&!!LI(t,e)}}(e.body)),t.containsArgumentsReference}function Jf(e){if(!e||!e.declarations)return u;const t=[];for(let n=0;n0&&r.body){const t=e.declarations[n-1];if(r.parent===t.parent&&r.kind===t.kind&&r.pos===t.end)continue}if(Mm(r)&&r.jsDoc){const e=Vg(r);if(p(e)){for(const n of e){const e=n.typeExpression;void 0!==e.type||fE(r)||zC(e,St),t.push(Cf(e))}continue}}t.push(!UT(r)&&!$f(r)&&Df(r)||Cf(r))}}return t}function zf(e){const t=ja(e,e);if(t){const e=$a(t);if(e)return $l(e)}return St}function Kf(e){if(e.thisParameter)return $l(e.thisParameter)}function Wf(e){if(!e.resolvedTypePredicate){if(e.target){const r=Wf(e.target);e.resolvedTypePredicate=r?(t=r,n=e.mapper,Sf(t.kind,t.parameterName,t.parameterIndex,eS(t.type,n))):ei}else if(e.compositeSignatures)e.resolvedTypePredicate=function(e,t){let n;const r=[];for(const i of e){const e=Wf(i);if(e){if(0!==e.kind&&1!==e.kind||n&&!nv(n,e))return;n=e,r.push(e.type)}else{const e=2097152!==t?Gf(i):void 0;if(e!==qt&&e!==Vt)return}}if(!n)return;const i=Hf(r,t);return Sf(n.kind,n.parameterName,n.parameterIndex,i)}(e.compositeSignatures,e.compositeKind)||ei;else{const t=e.declaration&&Cv(e.declaration);let n;if(!t){const t=Df(e.declaration);t&&e!==t&&(n=Wf(t))}if(t||n)e.resolvedTypePredicate=t&&bE(t)?function(e,t){const n=e.parameterName,r=e.type&&Sx(e.type);return 197===n.kind?Sf(e.assertsModifier?2:0,void 0,void 0,r):Sf(e.assertsModifier?3:1,n.escapedText,T(t.parameters,(e=>e.escapedName===n.escapedText)),r)}(t,e):n||ei;else if(e.declaration&&uu(e.declaration)&&(!e.resolvedReturnType||16&e.resolvedReturnType.flags)&&FO(e)>0){const{declaration:t}=e;e.resolvedTypePredicate=ei,e.resolvedTypePredicate=function(e){switch(e.kind){case 176:case 177:case 178:return}if(0!==Jh(e))return;let t;if(e.body&&241!==e.body.kind)t=e.body;else if(Pf(e.body,(e=>{if(t||!e.expression)return!0;t=e.expression}))||!t||ZO(e))return;return function(e,t){return 16&DM(t=lh(t,!0)).flags?f(e.parameters,((n,r)=>{const i=$l(n.symbol);if(!i||16&i.flags||!qD(n.name)||YD(n.symbol)||U_(n))return;const o=function(e,t,n,r){const i=t.flowNode||253===t.parent.kind&&t.parent.flowNode||FR(2,void 0,void 0),o=FR(32,t,i),a=XD(n.name,r,r,e,o);if(a===r)return;const s=FR(64,t,i);return 131072&XD(n.name,r,a,e,s).flags?a:void 0}(e,t,n,i);return o?Sf(1,vc(n.name.escapedText),r,o):void 0})):void 0}(e,t)}(t)||ei}else e.resolvedTypePredicate=ei}xn.assert(!!e.resolvedTypePredicate)}var t,n;return e.resolvedTypePredicate===ei?void 0:e.resolvedTypePredicate}function Hf(e,t,n){return 2097152!==t?ev(e,n):cv(e)}function Gf(e){if(!e.resolvedReturnType){if(!_c(e,3))return Dt;let t=e.target?eS(Gf(e.target),e.mapper):e.compositeSignatures?eS(Hf(O(e.compositeSignatures,Gf),e.compositeKind,2),e.mapper):Xf(e.declaration)||(Nd(e.declaration.body)?St:HO(e.declaration));if(8&e.flags?t=nC(t):16&e.flags&&(t=XT(t)),!gc()){if(e.declaration){const t=Cv(e.declaration);if(t)xo(t,va.Return_type_annotation_circularly_references_itself);else if(Y){const t=e.declaration,n=Pc(t);n?xo(n,va._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Ap(n)):xo(t,va.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}t=St}e.resolvedReturnType??(e.resolvedReturnType=t)}return e.resolvedReturnType}function Xf(e){if(176===e.kind)return Nu(ts(e.parent.symbol));const t=Cv(e);if(sF(e)){const n=Hg(e);if(n&&fE(n.parent)&&!t)return Nu(ts(n.parent.parent.symbol))}if(Ng(e))return Sx(e.parameters[0].type);if(t)return Sx(t);if(177===e.kind&&l_(e)){const t=Mm(e)&&Kc(e);if(t)return t;const n=Nl(Y_(ns(e),178));if(n)return n}return function(e){const t=Df(e);return t&&Gf(t)}(e)}function Yf(e){return e.compositeSignatures&&Q(e.compositeSignatures,Yf)||!e.resolvedReturnType&&dc(e,3)>=0}function lm(e){if(JB(e)){const t=$l(e.parameters[e.parameters.length-1]),n=PT(t)?MT(t):t;return n&&pf(n,zt)}}function hm(e,t,n,r){const i=ym(e,Tf(t,e.typeParameters,kf(e.typeParameters),n));if(r){const e=yI(Gf(i));if(e){const t=S_(e);t.typeParameters=r;const n=S_(i);return n.resolvedReturnType=Om(t),n}}return i}function ym(e,t){const n=e.instantiations||(e.instantiations=new Map),r=fg(t);let i=n.get(r);return i||n.set(r,i=vm(e,t)),i}function vm(e,t){return Ux(e,function(e,t){return Fx(e.typeParameters,t)}(e,t),!0)}function Sm(e){return e.typeParameters?e.erasedSignatureCache||(e.erasedSignatureCache=function(e){return Ux(e,Jx(e.typeParameters),!0)}(e)):e}function Am(e){const t=e.typeParameters;if(t){if(e.baseSignatureCache)return e.baseSignatureCache;const n=Jx(t),r=Fx(t,O(t,(e=>Jd(e)||At)));let i=O(t,(e=>eS(e,r)||At));for(let e=0;e{ng(e)&&!rf(t,e)&&t.push(Vm(e,n.type?Sx(n.type):St,Rv(n,8),n))}))}return t}return u}function ng(e){return!!(4108&e.flags)||sb(e)||!!(2097152&e.flags)&&!lb(e)&&Q(e.types,ng)}function cg(e){return q(F(e.symbol&&e.symbol.declarations,aE),gl)[0]}function lg(e,t){var n;let r;if(null==(n=e.symbol)?void 0:n.declarations)for(const n of e.symbol.declarations)if(195===n.parent.kind){const[i=n.parent,o]=sh(n.parent.parent);if(183!==o.kind||t){if(169===o.kind&&o.dotDotDotToken||191===o.kind||202===o.kind&&o.dotDotDotToken)r=ue(r,Ty(At));else if(204===o.kind)r=ue(r,Jt);else if(168===o.kind&&200===o.parent.kind)r=ue(r,pn);else if(200===o.kind&&o.type&&lh(o.type)===n.parent&&194===o.parent.kind&&o.parent.extendsType===o&&200===o.parent.checkType.kind&&o.parent.checkType.type){const e=o.parent.checkType;r=ue(r,eS(Sx(e.type),Mx(Lu(ns(e.typeParameter)),e.typeParameter.constraint?Sx(e.typeParameter.constraint):pn)))}}else{const t=o,n=sL(t);if(n){const o=t.typeArguments.indexOf(i);if(o()=>iL(t,n,r)))));o!==e&&(r=ue(r,o))}}}}}return r&&cv(r)}function ug(e){if(!e.constraint)if(e.target){const t=Jd(e.target);e.constraint=t?eS(t,e.mapper):On}else{const t=cg(e);if(t){let n=Sx(t);1&n.flags&&!Nc(n)&&(n=200===t.parent.parent.kind?pn:At),e.constraint=n}else e.constraint=lg(e)||On}return e.constraint===On?void 0:e.constraint}function pg(e){const t=Y_(e.symbol,168),n=CF(t.parent)?qg(t.parent):t.parent;return n&&rs(n)}function fg(e){let t="";if(e){const n=e.length;let r=0;for(;r1&&(t+=":"+o),r+=o}}return t}function vg(e,t){return e?`@${OB(e)}`+(t?`:${fg(t)}`:""):""}function xg(e,t){let n=0;for(const r of e)void 0!==t&&r.flags&t||(n|=wx(r));return 458752&n}function kg(e,t){return Q(t)&&e===An?At:Tg(e,t)}function Tg(e,t){const n=fg(t);let r=e.instantiations.get(n);return r||(r=hs(4,e.symbol),e.instantiations.set(n,r),r.objectFlags|=t?xg(t):0,r.target=e,r.resolvedTypeArguments=t),r}function Dg(e){const t=fs(e.flags,e.symbol);return t.objectFlags=e.objectFlags,t.target=e.target,t.resolvedTypeArguments=e.resolvedTypeArguments,t}function Eg(e,t,n,r,i){if(!r){const e=Yb(r=Qb(t));i=n?Dx(e,n):e}const o=hs(4,e.symbol);return o.target=e,o.node=t,o.mapper=n,o.aliasSymbol=r,o.aliasTypeArguments=i,o}function Ig(e){var t,n;if(!e.resolvedTypeArguments){if(!_c(e,5))return(null==(t=e.target.localTypeParameters)?void 0:t.map((()=>Dt)))||u;const i=e.node,o=i?183===i.kind?Z(e.target.outerTypeParameters,oL(i,e.target.localTypeParameters)):188===i.kind?[Sx(i.elementType)]:O(i.elements,Sx):u;gc()?e.resolvedTypeArguments??(e.resolvedTypeArguments=e.mapper?Dx(o,e.mapper):o):(e.resolvedTypeArguments??(e.resolvedTypeArguments=(null==(n=e.target.localTypeParameters)?void 0:n.map((()=>Dt)))||u),xo(e.node||r,e.target.symbol?va.Type_arguments_for_0_circularly_reference_themselves:va.Tuple_type_arguments_circularly_reference_themselves,e.target.symbol&&Us(e.target.symbol)))}return e.resolvedTypeArguments}function Og(e){return p(e.target.typeParameters)}function Lg(e,t){const n=ju(ts(t)),r=n.localTypeParameters;if(r){const t=p(e.typeArguments),i=kf(r),o=Mm(e);if((Y||!o)&&(tr.length)){const t=o&&hP(e)&&!cF(e.parent);if(xo(e,i===r.length?t?va.Expected_0_type_arguments_provide_these_with_an_extends_tag:va.Generic_type_0_requires_1_type_argument_s:t?va.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:va.Generic_type_0_requires_between_1_and_2_type_arguments,Ws(n,void 0,2),i,r.length),!o)return Dt}return 183===e.kind&&Ey(e,p(e.typeArguments)!==r.length)?Eg(n,e,void 0):Tg(n,Z(n.outerTypeParameters,Tf(Oh(e),r,i,o)))}return Fh(e,t)?n:Dt}function Bg(e,t,n,r){const i=ju(e);if(i===Ft){const n=NB.get(e.escapedName);if(void 0!==n&&t&&1===t.length)return 4===n?nh(t[0]):Gv(e,t[0])}const o=Uo(e),a=o.typeParameters,s=fg(t)+vg(n,r);let c=o.instantiations.get(s);return c||o.instantiations.set(s,c=tS(i,Fx(a,Tf(t,a,kf(a),Mm(e.valueDeclaration))),n,r)),c}function Jg(e){var t;const n=null==(t=e.declarations)?void 0:t.find(Ag);return!(!n||!Qf(n))}function zg(e){return e.parent?`${zg(e.parent)}.${e.escapedName}`:e.escapedName}function Xg(e){const t=(166===e.kind?e.right:211===e.kind?e.name:e).escapedText;if(t){const n=166===e.kind?Xg(e.left):211===e.kind?Xg(e.expression):void 0,r=n?`${zg(n)}.${t}`:t;let i=vt.get(r);return i||(vt.set(r,i=No(524288,t,1048576)),i.parent=n,i.links.declaredType=Et),i}return ht}function Qg(e,t,n){const r=function(e){switch(e.kind){case 183:return e.typeName;case 233:const t=e.expression;if(vb(t))return t}}(e);if(!r)return ht;const i=Ma(r,t,n);return i&&i!==ht?i:n?ht:Xg(r)}function Yg(e,t){if(t===ht)return Dt;if(96&(t=function(e){const t=e.valueDeclaration;if(!t||!Mm(t)||524288&e.flags||Ym(t,!1))return;const n=KP(t)?Xm(t):Qm(t);if(n){const t=rs(n);if(t)return iO(t,e)}}(t)||t).flags)return Lg(e,t);if(524288&t.flags)return function(e,t){if(1048576&px(t)){const n=Oh(e),r=vg(t,n);let i=bt.get(r);return i||(i=gs(1,"error",void 0,`alias ${r}`),i.aliasSymbol=t,i.aliasTypeArguments=n,bt.set(r,i)),i}const n=ju(t),r=Uo(t).typeParameters;if(r){const n=p(e.typeArguments),i=kf(r);if(nr.length)return xo(e,i===r.length?va.Generic_type_0_requires_1_type_argument_s:va.Generic_type_0_requires_between_1_and_2_type_arguments,Us(t),i,r.length),Dt;const o=Qb(e);let a,s=!o||!Jg(t)&&Jg(o)?void 0:o;if(s)a=Yb(s);else if(B_(e)){const t=Qg(e,2097152,!0);if(t&&t!==ht){const n=Ea(t);n&&524288&n.flags&&(s=n,a=Oh(e)||(r?[]:void 0))}}return Bg(t,Oh(e),s,a)}return Fh(e,t)?n:Dt}(e,t);const n=qu(t);if(n)return Fh(e,t)?sx(n):Dt;if(111551&t.flags&&Nh(e)){const n=function(e,t){const n=Wo(e);if(!n.resolvedJSDocType){const r=$l(t);let i=r;if(t.valueDeclaration){const n=205===e.kind&&e.qualifier;r.symbol&&r.symbol!==t&&n&&(i=Yg(e,r.symbol))}n.resolvedJSDocType=i}return n.resolvedJSDocType}(e,t);return n||(Qg(e,788968),$l(t))}return Dt}function nh(e){return ih(e)?gh(e,At):e}function ih(e){return!!(3145728&e.flags&&Q(e.types,ih)||33554432&e.flags&&!ph(e)&&ih(e.baseType)||524288&e.flags&&!ok(e)||432275456&e.flags&&!sb(e))}function ph(e){return!!(33554432&e.flags&&2&e.constraint.flags)}function mh(e,t){return 3&t.flags||t===e||1&e.flags?e:gh(e,t)}function gh(e,t){const n=`${qy(e)}>${qy(t)}`,r=ct.get(n);if(r)return r;const i=ps(33554432);return i.baseType=e,i.constraint=t,ct.set(n,i),i}function Ch(e){return ph(e)?e.baseType:cv([e.constraint,e.baseType])}function Dh(e){return 189===e.kind&&1===e.elements.length}function Ph(e,t,n){return Dh(t)&&Dh(n)?Ph(e,t.elements[0],n.elements[0]):Jb(Sx(t))===Jb(e)?Sx(n):void 0}function Nh(e){return!!(16777216&e.flags)&&(183===e.kind||205===e.kind)}function Fh(e,t){return!e.typeArguments||(xo(e,va.Type_0_is_not_generic,t?Us(t):e.typeName?Ap(e.typeName):bB),!1)}function Ah(e){if(qD(e.typeName)){const t=e.typeArguments;switch(e.typeName.escapedText){case"String":return Fh(e),Jt;case"Number":return Fh(e),zt;case"Boolean":return Fh(e),Xt;case"Void":return Fh(e),Zt;case"Undefined":return Fh(e),It;case"Null":return Fh(e),Rt;case"Function":case"function":return Fh(e),Wn;case"array":return t&&t.length||Y?void 0:rr;case"promise":return t&&t.length||Y?void 0:UO(St);case"Object":if(t&&2===t.length){if(Bm(e)){const e=Sx(t[0]),n=Sx(t[1]),r=e===Jt||e===zt?[Vm(e,n,!1)]:u;return ks(void 0,w,u,u,r)}return St}return Fh(e),Y?void 0:St}}}function Ih(e){const t=Wo(e);if(!t.resolvedType){if(Dl(e)&&Qu(e.parent))return t.resolvedSymbol=ht,t.resolvedType=DM(e.parent.expression);let n,r;const i=788968;Nh(e)&&(r=Ah(e),r||(n=Qg(e,i,!0),n===ht?n=Qg(e,111551|i):Qg(e,i),r=Yg(e,n))),r||(n=Qg(e,i),r=Yg(e,n)),t.resolvedSymbol=n,t.resolvedType=r}return t.resolvedType}function Oh(e){return O(e.typeArguments,Sx)}function Lh(e){const t=Wo(e);if(!t.resolvedType){const n=gO(e);t.resolvedType=sx(RC(n))}return t.resolvedType}function jh(e,t){function n(e){const t=e.declarations;if(t)for(const e of t)switch(e.kind){case 263:case 264:case 266:return e}}if(!e)return t?An:wn;const r=ju(e);return 524288&r.flags?p(r.typeParameters)!==t?(xo(n(e),va.Global_type_0_must_have_1_type_parameter_s,Sc(e),t),t?An:wn):r:(xo(n(e),va.Global_type_0_must_be_a_class_or_interface_type,Sc(e)),t?An:wn)}function Rh(e,t){return qh(e,111551,t?va.Cannot_find_global_value_0:void 0)}function Bh(e,t){return qh(e,788968,t?va.Cannot_find_global_type_0:void 0)}function zh(e,t,n){const r=qh(e,788968,n?va.Cannot_find_global_type_0:void 0);if(!r||(ju(r),p(Uo(r).typeParameters)===t))return r;xo(r.declarations&&S(r.declarations,QP),va.Global_type_0_must_have_1_type_parameter_s,Sc(r),t)}function qh(e,t,n){return je(void 0,e,t,n,!1,!1)}function Xh(e,t,n){const r=Bh(e,n);return r||n?jh(r,t):void 0}function Zh(){return Pr||(Pr=Xh("ImportMeta",0,!0)||wn)}function ey(){if(!Nr){const e=No(0,"ImportMetaExpression"),t=Zh(),n=No(4,"meta",8);n.parent=e,n.links.type=t;const r=ed([n]);e.members=r,Nr=ks(e,r,u,u,u)}return Nr}function ty(e){return Fr||(Fr=Xh("ImportCallOptions",0,e))||wn}function ny(e){return Ar||(Ar=Xh("ImportAttributes",0,e))||wn}function iy(e){return cr||(cr=Rh("Symbol",e))}function uy(){return ur||(ur=Xh("Symbol",0,!1))||wn}function _y(e){return dr||(dr=Xh("Promise",1,e))||An}function dy(e){return mr||(mr=Xh("PromiseLike",1,e))||An}function py(e){return gr||(gr=Rh("Promise",e))}function fy(e){return Tr||(Tr=Xh("AsyncIterable",1,e))||An}function my(e){return yr||(yr=Xh("Iterable",1,e))||An}function gy(e){return Ir||(Ir=Xh("Disposable",0,e))||wn}function hy(e,t=0){const n=qh(e,788968,void 0);return n&&jh(n,t)}function yy(e){return jr||(jr=zh("Awaited",1,e)||(e?ht:void 0)),jr===ht?void 0:jr}function xy(e,t){return e!==An?Tg(e,t):wn}function Sy(e){return xy(_r||(_r=Xh("TypedPropertyDescriptor",1,!0)||An),[e])}function ky(e){return xy(my(!0),[e])}function Ty(e,t){return xy(t?Qn:Xn,[e])}function Cy(e){switch(e.kind){case 190:return 2;case 191:return wy(e);case 202:return e.questionToken?2:e.dotDotDotToken?wy(e):1;default:return 1}}function wy(e){return xx(e.type)?4:8}function Dy(e){return EE(e)||sE(e)?e:void 0}function Ey(e,t){return!!Qb(e)||Py(e)&&(188===e.kind?Ny(e.elementType):189===e.kind?Q(e.elements,Ny):t||Q(e.typeArguments,Ny))}function Py(e){const t=e.parent;switch(t.kind){case 196:case 202:case 183:case 192:case 193:case 199:case 194:case 198:case 188:case 189:return Py(t);case 265:return!0}return!1}function Ny(e){switch(e.kind){case 183:return Nh(e)||!!(524288&Qg(e,788968).flags);case 186:return!0;case 198:return 158!==e.operator&&Ny(e.type);case 196:case 190:case 202:case 316:case 314:case 315:case 309:return Ny(e.type);case 191:return 188!==e.type.kind||Ny(e.type.elementType);case 192:case 193:return Q(e.types,Ny);case 199:return Ny(e.objectType)||Ny(e.indexType);case 194:return Ny(e.checkType)||Ny(e.extendsType)||Ny(e.trueType)||Ny(e.falseType)}return!1}function Ay(e,t,n=!1,r=[]){const i=Iy(t||O(e,(e=>1)),n,r);return i===An?wn:e.length?Oy(i,e):i}function Iy(e,t,n){if(1===e.length&&4&e[0])return t?Qn:Xn;const r=O(e,(e=>1&e?"#":2&e?"?":4&e?".":"*")).join()+(t?"R":"")+(Q(n,(e=>!!e))?","+O(n,(e=>e?IB(e):"_")).join(","):"");let i=Ue.get(r);return i||Ue.set(r,i=function(e,t,n){const r=e.length,i=N(e,(e=>!!(9&e)));let o;const a=[];let s=0;if(r){o=new Array(r);for(let i=0;i!!(8&e.elementFlags[n]&&1179648&t.flags)));if(n>=0)return uv(O(t,((t,n)=>8&e.elementFlags[n]?t:At)))?DD(t[n],(r=>My(e,Fe(t,n,r)))):Dt}const s=[],c=[],l=[];let u=-1,_=-1,d=-1;for(let c=0;c=1e4)return xo(r,wf(r)?va.Type_produces_a_tuple_type_that_is_too_large_to_represent:va.Expression_produces_a_tuple_type_that_is_too_large_to_represent),Dt;f(e,((e,t)=>{var n;return m(e,l.target.elementFlags[t],null==(n=l.target.labeledElementDeclarations)?void 0:n[t])}))}else m(Hk(l)&&pf(l,zt)||Dt,4,null==(o=e.labeledElementDeclarations)?void 0:o[c]);else m(l,u,null==(a=e.labeledElementDeclarations)?void 0:a[c])}for(let e=0;e=0&&_8&c[_+t]?Mb(e,zt):e))),s.splice(_+1,d-_),c.splice(_+1,d-_),l.splice(_+1,d-_));const p=Iy(c,e.readonly,l);return p===An?wn:c.length?Tg(p,s):p;function m(e,t,n){1&t&&(u=c.length),4&t&&_<0&&(_=c.length),6&t&&(d=c.length),s.push(2&t?Hc(e,!0):e),c.push(t),l.push(n)}}function Ly(e,t,n=0){const r=e.target,i=Og(e)-n;return t>r.fixedLength?function(e){const t=MT(e);return t&&Ty(t)}(e)||Ay(u):Ay(Ig(e).slice(t,i),r.elementFlags.slice(t,i),!1,r.labeledElementDeclarations&&r.labeledElementDeclarations.slice(t,i))}function jy(e){return ev(ue(ze(e.target.fixedLength,(e=>lx(""+e))),Av(e.target.readonly?Qn:Xn)))}function Ry(e,t){return e.elementFlags.length-C(e.elementFlags,(e=>!(e&t)))-1}function zy(e){return e.fixedLength+Ry(e,3)}function $y(e){const t=Ig(e),n=Og(e);return t.length===n?t:t.slice(0,n)}function qy(e){return e.id}function Ky(e,t){return Ae(e,t,qy,Nt)>=0}function Wy(e,t){const n=Ae(e,t,qy,Nt);return n<0&&(e.splice(~n,0,t),!0)}function Hy(e,t,n){const r=n.flags;if(!(131072&r))if(t|=473694207&r,465829888&r&&(t|=33554432),2097152&r&&67108864&wx(n)&&(t|=536870912),n===Tt&&(t|=8388608),Nc(n)&&(t|=1073741824),!U&&98304&r)65536&wx(n)||(t|=4194304);else{const t=e.length,r=t&&n.id>e[t-1].id?~t:Ae(e,n,qy,Nt);r<0&&e.splice(~r,0,n)}return t}function Gy(e,t,n){let r;for(const i of n)i!==r&&(t=1048576&i.flags?Gy(e,t|(Qy(i)?1048576:0),i.types):Hy(e,t,i),r=i);return t}function Xy(e,t){return 134217728&t.flags?vw(e,t):pw(e,t)}function Qy(e){return!!(1048576&e.flags&&(e.aliasSymbol||e.origin))}function Yy(e,t){for(const n of t)if(1048576&n.flags){const t=n.origin;n.aliasSymbol||t&&!(1048576&t.flags)?fe(e,n):t&&1048576&t.flags&&Yy(e,t.types)}}function Zy(e,t){const n=ms(e);return n.types=t,n}function ev(e,t=1,n,r,i){if(0===e.length)return en;if(1===e.length)return e[0];if(2===e.length&&!i&&(1048576&e[0].flags||1048576&e[1].flags)){const i=0===t?"N":2===t?"S":"L",o=e[0].id=2&&a[0]===It&&a[1]===Mt&&Yt(a,1),(402664352&s||16384&s&&32768&s)&&function(e,t,n){let r=e.length;for(;r>0;){r--;const i=e[r],o=i.flags;(402653312&o&&4&t||256&o&&8&t||2048&o&&64&t||8192&o&&4096&t||n&&32768&o&&16384&t||cx(i)&&Ky(e,i.regularType))&&Yt(e,r)}}(a,s,!!(2&t)),128&s&&402653184&s&&function(e){const t=F(e,sb);if(t.length){let n=e.length;for(;n>0;){n--;const r=e[n];128&r.flags&&Q(t,(e=>Xy(r,e)))&&Yt(e,n)}}}(a),536870912&s&&function(e){const t=[];for(const n of e)if(2097152&n.flags&&67108864&wx(n)){const e=8650752&n.types[0].flags?0:1;fe(t,n.types[e])}for(const n of t){const t=[];for(const r of e)if(2097152&r.flags&&67108864&wx(r)){const e=8650752&r.types[0].flags?0:1;r.types[e]===n&&Wy(t,r.types[1-e])}if(xD(Wd(n),(e=>Ky(t,e)))){let r=e.length;for(;r>0;){r--;const i=e[r];if(2097152&i.flags&&67108864&wx(i)){const o=8650752&i.types[0].flags?0:1;i.types[o]===n&&Ky(t,i.types[1-o])&&Yt(e,r)}}Wy(e,n)}}}(a),2===t&&(a=function(e,t){var n;if(e.length<2)return e;const i=fg(e),o=_t.get(i);if(o)return o;const a=t&&Q(e,(e=>!!(524288&e.flags)&&!Ad(e)&&rk(Od(e)))),s=e.length;let c=s,l=0;for(;c>0;){c--;const t=e[c];if(a||469499904&t.flags){if(262144&t.flags&&1048576&Hd(t).flags){uk(t,ev(O(e,(e=>e===t?en:e))),so)&&Yt(e,c);continue}const i=61603840&t.flags?S(Rd(t),(e=>iT($l(e)))):void 0,o=i&&sx($l(i));for(const a of e)if(t!==a){if(1e5===l&&l/(s-c)*s>1e6)return null==(n=or)||n.instant(or.Phase.CheckTypes,"removeSubtypes_DepthLimit",{typeIds:e.map((e=>e.id))}),void xo(r,va.Expression_produces_a_union_type_that_is_too_complex_to_represent);if(l++,i&&61603840&a.flags){const e=Tc(a,i.escapedName);if(e&&iT(e)&&sx(e)!==o)continue}if(uk(t,a,so)&&(!(1&wx(Hl(t)))||!(1&wx(Hl(a)))||kS(t,a))){Yt(e,c);break}}}}return _t.set(i,e),e}(a,!!(524288&s)),!a))return Dt;if(0===a.length)return 65536&s?4194304&s?Rt:Bt:32768&s?4194304&s?It:Ot:en}if(!o&&1048576&s){const t=[];Yy(t,e);const r=[];for(const e of a)Q(t,(t=>Ky(t.types,e)))||r.push(e);if(!n&&1===t.length&&0===r.length)return t[0];if(Oe(t,((e,t)=>e+t.types.length),0)+r.length===a.length){for(const e of t)Wy(r,e);o=Zy(1048576,r)}}return rv(a,(36323331&s?0:32768)|(2097152&s?16777216:0),n,i,o)}function nv(e,t){return e.kind===t.kind&&e.parameterIndex===t.parameterIndex}function rv(e,t,n,r,i){if(0===e.length)return en;if(1===e.length)return e[0];const o=(i?1048576&i.flags?`|${fg(i.types)}`:2097152&i.flags?`&${fg(i.types)}`:`#${i.type.id}|${fg(e)}`:fg(e))+vg(n,r);let a=Ke.get(o);return a||(a=ps(1048576),a.objectFlags=t|xg(e,98304),a.types=e,a.origin=i,a.aliasSymbol=n,a.aliasTypeArguments=r,2===e.length&&512&e[0].flags&&512&e[1].flags&&(a.flags|=16,a.intrinsicName="boolean"),Ke.set(o,a)),a}function iv(e,t,n){const r=n.flags;return 2097152&r?ov(e,t,n.types):(ok(n)?16777216&t||(t|=16777216,e.set(n.id.toString(),n)):(3&r?(n===Tt&&(t|=8388608),Nc(n)&&(t|=1073741824)):!U&&98304&r||(n===Mt&&(t|=262144,n=It),e.has(n.id.toString())||(109472&n.flags&&109472&t&&(t|=67108864),e.set(n.id.toString(),n))),t|=473694207&r),t)}function ov(e,t,n){for(const r of n)t=iv(e,t,sx(r));return t}function av(e,t){for(const n of e)if(!Ky(n.types,t)){const e=128&t.flags?Jt:288&t.flags?zt:2048&t.flags?$t:8192&t.flags?Qt:void 0;if(!e||!Ky(n.types,e))return!1}return!0}function sv(e,t){for(let n=0;n!(e.flags&t)))}function cv(e,t=0,n,r){const i=new Map,o=ov(i,0,e),a=$e(i.values());let s=0;if(131072&o)return D(a,tn)?tn:en;if(U&&98304&o&&84410368&o||67108864&o&&402783228&o||402653316&o&&67238776&o||296&o&&469891796&o||2112&o&&469889980&o||12288&o&&469879804&o||49152&o&&469842940&o)return en;if(402653184&o&&128&o&&function(e){let t=e.length;const n=F(e,(e=>!!(128&e.flags)));for(;t>0;){t--;const r=e[t];if(402653184&r.flags)for(const i of n){if(bS(i,r)){Yt(e,t);break}if(sb(r))return!0}}return!1}(a))return en;if(1&o)return 8388608&o?Tt:1073741824&o?Dt:St;if(!U&&98304&o)return 16777216&o?en:32768&o?It:Rt;if((4&o&&402653312&o||8&o&&256&o||64&o&&2048&o||4096&o&&8192&o||16384&o&&32768&o||16777216&o&&470302716&o)&&(1&t||function(e,t){let n=e.length;for(;n>0;){n--;const r=e[n];(4&r.flags&&402653312&t||8&r.flags&&256&t||64&r.flags&&2048&t||4096&r.flags&&8192&t||16384&r.flags&&32768&t||ok(r)&&470302716&t)&&Yt(e,n)}}(a,o)),262144&o&&(a[a.indexOf(It)]=Mt),0===a.length)return At;if(1===a.length)return a[0];if(2===a.length&&!(2&t)){const e=8650752&a[0].flags?0:1,t=a[e],n=a[1-e];if(8650752&t.flags&&(469893116&n.flags&&!cb(n)||16777216&o)){const e=Wd(t);if(e&&xD(e,(e=>!!(469893116&e.flags)||ok(e)))){if(xS(e,n))return t;if(!(1048576&e.flags&&bD(e,(e=>xS(e,n)))||xS(n,e)))return en;s=67108864}}}const c=fg(a)+(2&t?"*":vg(n,r));let l=Xe.get(c);if(!l){if(1048576&o)if(function(e){let t;const n=T(e,(e=>!!(32768&wx(e))));if(n<0)return!1;let r=n+1;for(;r!!(1048576&e.flags&&32768&e.types[0].flags)))){const e=Q(a,DC)?Mt:It;sv(a,32768),l=ev([cv(a,t),e],1,n,r)}else if(x(a,(e=>!!(1048576&e.flags&&(65536&e.types[0].flags||65536&e.types[1].flags)))))sv(a,65536),l=ev([cv(a,t),Rt],1,n,r);else if(a.length>=4){const e=Math.floor(a.length/2);l=cv([cv(a.slice(0,e),t),cv(a.slice(e),t)],t,n,r)}else{if(!uv(a))return Dt;const e=function(e,t){const n=lv(e),r=[];for(let i=0;i=0;t--)if(1048576&e[t].flags){const r=e[t].types,i=r.length;n[t]=r[o%i],o=Math.floor(o/i)}const a=cv(n,t);131072&a.flags||r.push(a)}return r}(a,t);l=ev(e,1,n,r,Q(e,(e=>!!(2097152&e.flags)))&&dv(e)>dv(a)?Zy(2097152,a):void 0)}else l=function(e,t,n,r){const i=ps(2097152);return i.objectFlags=t|xg(e,98304),i.types=e,i.aliasSymbol=n,i.aliasTypeArguments=r,i}(a,s,n,r);Xe.set(c,l)}return l}function lv(e){return Oe(e,((e,t)=>1048576&t.flags?e*t.types.length:131072&t.flags?0:e),1)}function uv(e){var t;const n=lv(e);return!(n>=1e5&&(null==(t=or)||t.instant(or.Phase.CheckTypes,"checkCrossProductUnion_DepthLimit",{typeIds:e.map((e=>e.id)),size:n}),xo(r,va.Expression_produces_a_union_type_that_is_too_complex_to_represent),1))}function _v(e){return 3145728&e.flags&&!e.aliasSymbol?1048576&e.flags&&e.origin?_v(e.origin):dv(e.types):1}function dv(e){return Oe(e,((e,t)=>e+_v(t)),0)}function mv(e,t){const n=ps(4194304);return n.type=e,n.indexFlags=t,n}function xv(e,t){return 1&t?e.resolvedStringIndexType||(e.resolvedStringIndexType=mv(e,1)):e.resolvedIndexType||(e.resolvedIndexType=mv(e,0))}function Sv(e,t){const n=fd(e),r=md(e),i=hd(e.target||e);if(!(i||2&t))return r;const o=[];if(gb(r)){if(bd(e))return xv(e,t);vD(r,s)}else bd(e)?pd(mp(wd(e)),8576,!!(1&t),s):vD(sd(r),s);const a=2&t?SD(ev(o),(e=>!(5&e.flags))):ev(o);return 1048576&a.flags&&1048576&r.flags&&fg(a.types)===fg(r.types)?r:a;function s(t){const r=i?eS(i,qx(e.mapper,n,t)):t;o.push(r===Jt?ln:r)}}function Tv(e){if(VD(e))return en;if(TD(e))return sx(KM(e));if(oE(e))return sx(IF(e));const t=Kh(e);return void 0!==t?lx(vc(t)):Xu(e)?sx(KM(e)):en}function Ev(e,t,n){if(n||!(6&fx(e))){let n=Uo(g_(e)).nameType;if(!n){const t=Pc(e.valueDeclaration);n="default"===e.escapedName?lx("default"):t&&Tv(t)||(Yh(e)?void 0:lx(Sc(e)))}if(n&&n.flags&t)return n}return en}function Pv(e,t){return!!(e.flags&t||2097152&e.flags&&Q(e.types,(e=>Pv(e,t))))}function Nv(e,t,n){const r=n&&(7&wx(e)||e.aliasSymbol)?function(e){const t=ms(4194304);return t.type=e,t}(e):void 0;return ev(Z(O(Rd(e),(e=>Ev(e,t))),O(cf(e),(e=>e!==oi&&Pv(e.keyType,t)?e.keyType===Jt&&8&t?ln:e.keyType:en))),1,void 0,void 0,r)}function Fv(e,t=0){return!!(58982400&e.flags||NT(e)||Ad(e)&&(!function(e){const t=fd(e);return function e(n){return!!(470810623&n.flags)||(16777216&n.flags?n.root.isDistributive&&n.checkType===t:137363456&n.flags?x(n.types,e):8388608&n.flags?e(n.objectType)&&e(n.indexType):33554432&n.flags?e(n.baseType)&&e(n.constraint):!!(268435456&n.flags)&&e(n.type))}(hd(e)||t)}(e)||2===Id(e))||1048576&e.flags&&!(4&t)&&Ep(e)||2097152&e.flags&&_M(e,465829888)&&Q(e.types,ok))}function Av(e,t=0){return ph(e=Sp(e))?nh(Av(e.baseType,t)):Fv(e,t)?xv(e,t):1048576&e.flags?cv(O(e.types,(e=>Av(e,t)))):2097152&e.flags?ev(O(e.types,(e=>Av(e,t)))):32&wx(e)?Sv(e,t):e===Tt?Tt:2&e.flags?en:131073&e.flags?pn:Nv(e,(2&t?128:402653316)|(1&t?0:12584),0===t)}function Iv(e){const t=(Mr||(Mr=zh("Extract",2,!0)||ht),Mr===ht?void 0:Mr);return t?Bg(t,[e,Jt]):Jt}function Ov(e,t){const n=T(t,(e=>!!(1179648&e.flags)));if(n>=0)return uv(t)?DD(t[n],(r=>Ov(e,Fe(t,n,r)))):Dt;if(D(t,Tt))return Tt;const r=[],i=[];let o=e[0];if(!function e(t,n){for(let a=0;a""===e))){if(x(r,(e=>!!(4&e.flags))))return Jt;if(1===r.length&&sb(r[0]))return r[0]}const a=`${fg(r)}|${O(i,(e=>e.length)).join(",")}|${i.join("")}`;let s=it.get(a);return s||it.set(a,s=function(e,t){const n=ps(134217728);return n.texts=e,n.types=t,n}(i,r)),s}function Mv(e){return 128&e.flags?e.value:256&e.flags?""+e.value:2048&e.flags?ST(e.value):98816&e.flags?e.intrinsicName:void 0}function Gv(e,t){return 1179648&t.flags?DD(t,(t=>Gv(e,t))):128&t.flags?lx(Xv(e,t.value)):134217728&t.flags?Ov(...function(e,t,n){switch(NB.get(e.escapedName)){case 0:return[t.map((e=>e.toUpperCase())),n.map((t=>Gv(e,t)))];case 1:return[t.map((e=>e.toLowerCase())),n.map((t=>Gv(e,t)))];case 2:return[""===t[0]?t:[t[0].charAt(0).toUpperCase()+t[0].slice(1),...t.slice(1)],""===t[0]?[Gv(e,n[0]),...n.slice(1)]:n];case 3:return[""===t[0]?t:[t[0].charAt(0).toLowerCase()+t[0].slice(1),...t.slice(1)],""===t[0]?[Gv(e,n[0]),...n.slice(1)]:n]}return[t,n]}(e,t.texts,t.types)):268435456&t.flags&&e===t.symbol?t:268435461&t.flags||gb(t)?Yv(e,t):ab(t)?Yv(e,Ov(["",""],[t])):t}function Xv(e,t){switch(NB.get(e.escapedName)){case 0:return t.toUpperCase();case 1:return t.toLowerCase();case 2:return t.charAt(0).toUpperCase()+t.slice(1);case 3:return t.charAt(0).toLowerCase()+t.slice(1)}return t}function Yv(e,t){const n=`${OB(e)},${qy(t)}`;let r=at.get(n);return r||at.set(n,r=function(e,t){const n=fs(268435456,e);return n.type=t,n}(e,t)),r}function Zv(e){if(Y)return!1;if(4096&wx(e))return!0;if(1048576&e.flags)return x(e.types,Zv);if(2097152&e.flags)return Q(e.types,Zv);if(465829888&e.flags){const t=Zd(e);return t!==e&&Zv(t)}return!1}function eb(e,t){return mC(e)?gC(e):t&&au(t)?Kh(t):void 0}function tb(e,t){if(8208&t.flags){const n=mc(e.parent,(e=>!Ox(e)))||e.parent;return zu(n)?$u(n)&&qD(e)&&Ww(n,e):x(t.declarations,(e=>!cu(e)||Do(e)))}return!0}function nb(e,t,n,r,i,o){const a=i&&212===i.kind?i:void 0,s=i&&VD(i)?void 0:eb(n,i);if(void 0!==s){if(256&o)return LN(t,s)||St;const e=Jp(t,s);if(e){if(64&o&&i&&e.declarations&&wo(e)&&tb(i,e)&&Eo((null==a?void 0:a.argumentExpression)??(RE(i)?i.indexType:i),e.declarations,s),a){if(XA(e,a,QA(a.expression,t.symbol)),aM(a,e,Zg(a)))return void xo(a.argumentExpression,va.Cannot_assign_to_0_because_it_is_a_read_only_property,Us(e));if(8&o&&(Wo(i).resolvedSymbol=e),AA(a,e))return kt}const n=4&o?zl(e):$l(e);return a&&1!==Zg(a)?XD(a,n):i&&RE(i)&&DC(n)?ev([n,It]):n}if(xD(t,PT)&&WT(s)){const e=+s;if(i&&xD(t,(e=>!e.target.hasRestElement))&&!(16&o)){const n=rb(i);if(PT(t)){if(e<0)return xo(n,va.A_tuple_type_cannot_be_indexed_with_a_negative_value),It;xo(n,va.Tuple_type_0_of_length_1_has_no_element_at_index_2,Ws(t),Og(t),vc(s))}else xo(n,va.Property_0_does_not_exist_on_type_1,vc(s),Ws(t))}if(e>=0)return c(_f(t,zt)),LT(t,e,1&o?Mt:void 0)}}if(!(98304&n.flags)&&dM(n,402665900)){if(131073&t.flags)return t;const l=mf(t,n)||_f(t,Jt);if(l)return 2&o&&l.keyType!==zt?void(a&&(4&o?xo(a,va.Type_0_is_generic_and_can_only_be_indexed_for_reading,Ws(e)):xo(a,va.Type_0_cannot_be_used_to_index_type_1,Ws(n),Ws(e)))):i&&l.keyType===Jt&&!dM(n,12)?(xo(rb(i),va.Type_0_cannot_be_used_as_an_index_type,Ws(n)),1&o?ev([l.type,Mt]):l.type):(c(l),1&o&&!(t.symbol&&384&t.symbol.flags&&n.symbol&&1024&n.flags&&is(n.symbol)===t.symbol)?ev([l.type,Mt]):l.type);if(131072&n.flags)return en;if(Zv(t))return St;if(a&&!fM(t)){if(Tw(t)){if(Y&&384&n.flags)return ro.add(Rp(a,va.Property_0_does_not_exist_on_type_1,n.value,Ws(t))),It;if(12&n.flags)return ev(ue(O(t.properties,(e=>$l(e))),It))}if(t.symbol===he&&void 0!==s&&he.exports.has(s)&&418&he.exports.get(s).flags)xo(a,va.Property_0_does_not_exist_on_type_1,vc(s),Ws(t));else if(Y&&!(128&o))if(void 0!==s&&zA(s,t)){const e=Ws(t);xo(a,va.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,s,e,e+"["+Gd(a.argumentExpression)+"]")}else if(pf(t,zt))xo(a.argumentExpression,va.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{let e;if(void 0!==s&&(e=UA(s,t)))void 0!==e&&xo(a.argumentExpression,va.Property_0_does_not_exist_on_type_1_Did_you_mean_2,s,Ws(t),e);else{const e=function(e,t,n){const r=eh(t)?"set":"get";if(!function(t){const r=Ld(e,t);if(r){const e=hI($l(r));return!!e&&AO(e)>=1&&SS(n,DO(e,0))}return!1}(r))return;let i=kb(t.expression);return void 0===i?i=r:i+="."+r,i}(t,a,n);if(void 0!==e)xo(a,va.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,Ws(t),e);else{let e;if(1024&n.flags)e=uS(void 0,va.Property_0_does_not_exist_on_type_1,"["+Ws(n)+"]",Ws(t));else if(8192&n.flags){const r=Oa(n.symbol,a);e=uS(void 0,va.Property_0_does_not_exist_on_type_1,"["+r+"]",Ws(t))}else 128&n.flags||256&n.flags?e=uS(void 0,va.Property_0_does_not_exist_on_type_1,n.value,Ws(t)):12&n.flags&&(e=uS(void 0,va.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,Ws(n),Ws(t)));e=uS(e,va.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,Ws(r),Ws(t)),ro.add(zp(Sd(a),a,e))}}}return}}if(Zv(t))return St;if(i){const e=rb(i);384&n.flags?xo(e,va.Property_0_does_not_exist_on_type_1,""+n.value,Ws(t)):12&n.flags?xo(e,va.Type_0_has_no_matching_index_signature_for_type_1,Ws(t),Ws(n)):xo(e,va.Type_0_cannot_be_used_as_an_index_type,Ws(n))}return Ec(n)?n:void 0;function c(e){e&&e.isReadonly&&a&&(eh(a)||uh(a))&&xo(a,va.Index_signature_in_type_0_only_permits_reading,Ws(t))}}function rb(e){return 212===e.kind?e.argumentExpression:199===e.kind?e.indexType:167===e.kind?e.expression:e}function ab(e){if(2097152&e.flags){let t=!1;for(const n of e.types)if(101248&n.flags||ab(n))t=!0;else if(!(524288&n.flags))return!1;return t}return!!(77&e.flags)||sb(e)}function sb(e){return!!(134217728&e.flags)&&x(e.types,ab)||!!(268435456&e.flags)&&ab(e.type)}function cb(e){return!!(402653184&e.flags)&&!sb(e)}function lb(e){return!!hb(e)}function pb(e){return!!(4194304&hb(e))}function gb(e){return!!(8388608&hb(e))}function hb(e){return 3145728&e.flags?(2097152&e.objectFlags||(e.objectFlags|=2097152|Oe(e.types,((e,t)=>e|hb(t)),0)),12582912&e.objectFlags):33554432&e.flags?(2097152&e.objectFlags||(e.objectFlags|=2097152|hb(e.baseType)|hb(e.constraint)),12582912&e.objectFlags):(58982400&e.flags||Ad(e)||NT(e)?4194304:0)|(63176704&e.flags||cb(e)?8388608:0)}function Nb(e,t){return 8388608&e.flags?function(e,t){const n=t?"simplifiedForWriting":"simplifiedForReading";if(e[n])return e[n]===Mn?e:e[n];e[n]=Mn;const r=Nb(e.objectType,t),i=Nb(e.indexType,t),o=function(e,t,n){if(1048576&t.flags){const r=O(t.types,(t=>Nb(Mb(e,t),n)));return n?cv(r):ev(r)}}(r,i,t);if(o)return e[n]=o;if(!(465829888&i.flags)){const o=Fb(r,i,t);if(o)return e[n]=o}if(NT(r)&&296&i.flags){const o=jT(r,8&i.flags?0:r.target.fixedLength,0,t);if(o)return e[n]=o}return Ad(r)&&2!==Id(r)?e[n]=DD(Ob(r,e.indexType),(e=>Nb(e,t))):e[n]=e}(e,t):16777216&e.flags?function(e,t){const n=e.checkType,r=e.extendsType,i=Vb(e),o=Ub(e);if(131072&o.flags&&Jb(i)===Jb(n)){if(1&n.flags||SS(iS(n),iS(r)))return Nb(i,t);if(Ab(n,r))return en}else if(131072&i.flags&&Jb(o)===Jb(n)){if(!(1&n.flags)&&SS(iS(n),iS(r)))return en;if(1&n.flags||Ab(n,r))return Nb(o,t)}return e}(e,t):e}function Fb(e,t,n){if(1048576&e.flags||2097152&e.flags&&!Fv(e)){const r=O(e.types,(e=>Nb(Mb(e,t),n)));return 2097152&e.flags||n?cv(r):ev(r)}}function Ab(e,t){return!!(131072&ev([K_(e,t),en]).flags)}function Ob(e,t){const n=Fx([fd(e)],[t]),r=zx(e.mapper,n),i=eS(yd(e.target||e),r),o=Ed(e)>0||(lb(e)?Pd(wd(e))>0:function(e,t){const n=Wd(t);return!!n&&Q(Rd(e),(e=>!!(16777216&e.flags)&&SS(Ev(e,8576),n)))}(e,t));return Hc(i,!0,o)}function Mb(e,t,n=0,r,i,o){return jb(e,t,n,r,i,o)||(r?Dt:At)}function Lb(e,t){return xD(e,(e=>{if(384&e.flags){const n=gC(e);if(WT(n)){const e=+n;return e>=0&&e0&&!Q(e.elements,(e=>PE(e)||NE(e)||EE(e)&&!(!e.questionToken&&!e.dotDotDotToken)))}function $b(e,t){return lb(e)||t&&PT(e)&&Q($y(e),lb)}function qb(e,t,n,i,o){let a,s,c=0;for(;;){if(1e3===c)return xo(r,va.Type_instantiation_is_excessively_deep_and_possibly_infinite),Dt;const u=eS(Jb(e.checkType),t),_=eS(e.extendsType,t);if(u===Dt||_===Dt)return Dt;if(u===Tt||_===Tt)return Tt;const d=ch(e.node.checkType),f=ch(e.node.extendsType),m=zb(d)&&zb(f)&&p(d.elements)===p(f.elements),g=$b(u,m);let h;if(e.inferTypeParameters){const n=UC(e.inferTypeParameters,void 0,0);t&&(n.nonFixingMapper=zx(n.nonFixingMapper,t)),g||xw(n.inferences,u,_,1536),h=t?zx(n.mapper,t):n.mapper}const y=h?eS(e.extendsType,h):_;if(!g&&!$b(y,m)){if(!(3&y.flags)&&(1&u.flags||!SS(rS(u),rS(y)))){(1&u.flags||n&&!(131072&y.flags)&&bD(rS(y),(e=>SS(e,rS(u)))))&&(s||(s=[])).push(eS(Sx(e.node.trueType),h||t));const r=Sx(e.node.falseType);if(16777216&r.flags){const n=r.root;if(n.node.parent===e.node&&(!n.isDistributive||n.checkType===e.checkType)){e=n;continue}if(l(r,t))continue}a=eS(r,t);break}if(3&y.flags||SS(iS(u),iS(y))){const n=Sx(e.node.trueType),r=h||t;if(l(n,r))continue;a=eS(n,r);break}}a=ps(16777216),a.root=e,a.checkType=eS(e.checkType,t),a.extendsType=eS(e.extendsType,t),a.mapper=t,a.combinedMapper=h,a.aliasSymbol=i||e.aliasSymbol,a.aliasTypeArguments=i?o:Dx(e.aliasTypeArguments,t);break}return s?ev(ue(s,a)):a;function l(n,r){if(16777216&n.flags&&r){const a=n.root;if(a.outerTypeParameters){const s=zx(n.mapper,r),l=O(a.outerTypeParameters,(e=>Ax(e,s))),u=Fx(a.outerTypeParameters,l),_=a.isDistributive?Ax(a.checkType,u):void 0;if(!(_&&_!==a.checkType&&1179648&_.flags))return e=a,t=u,i=void 0,o=void 0,a.aliasSymbol&&c++,!0}}return!1}}function Vb(e){return e.resolvedTrueType||(e.resolvedTrueType=eS(Sx(e.root.node.trueType),e.mapper))}function Ub(e){return e.resolvedFalseType||(e.resolvedFalseType=eS(Sx(e.root.node.falseType),e.mapper))}function Kb(e){let t;return e.locals&&e.locals.forEach((e=>{262144&e.flags&&(t=ue(t,ju(e)))})),t}function Wb(e){return qD(e)?[e]:ue(Wb(e.left),e.right)}function Hb(e){var t;const n=Wo(e);if(!n.resolvedType){if(!df(e))return xo(e.argument,va.String_literal_expected),n.resolvedSymbol=ht,n.resolvedType=Dt;const r=e.isTypeOf?111551:16777216&e.flags?900095:788968,i=ja(e,e.argument.literal);if(!i)return n.resolvedSymbol=ht,n.resolvedType=Dt;const o=!!(null==(t=i.exports)?void 0:t.get("export=")),a=$a(i,!1);if(Nd(e.qualifier))a.flags&r?n.resolvedType=Gb(e,n,a,r):(xo(e,111551===r?va.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:va.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0,e.argument.literal.text),n.resolvedSymbol=ht,n.resolvedType=Dt);else{const t=Wb(e.qualifier);let i,s=a;for(;i=t.shift();){const a=t.length?1920:r,c=ts(Da(s)),l=e.isTypeOf||Mm(e)&&o?Jp($l(c),i.escapedText,!1,!0):void 0,u=(e.isTypeOf?void 0:Ho(Ga(c),i.escapedText,a))??l;if(!u)return xo(i,va.Namespace_0_has_no_exported_member_1,Oa(s),Ap(i)),n.resolvedType=Dt;Wo(i).resolvedSymbol=u,Wo(i.parent).resolvedSymbol=u,s=u}n.resolvedType=Gb(e,n,s,r)}}return n.resolvedType}function Gb(e,t,n,r){const i=Da(n);return t.resolvedSymbol=i,111551===r?hO($l(n),e):Yg(e,i)}function Xb(e){const t=Wo(e);if(!t.resolvedType){const n=Qb(e);if(0!==m_(e.symbol).size||n){let r=hs(16,e.symbol);r.aliasSymbol=n,r.aliasTypeArguments=Yb(n),aF(e)&&e.isArrayType&&(r=Ty(r)),t.resolvedType=r}else t.resolvedType=Pn}return t.resolvedType}function Qb(e){let t=e.parent;for(;ME(t)||UN(t)||jE(t)&&148===t.operator;)t=t.parent;return Ag(t)?ns(t):void 0}function Yb(e){return e?nu(e):void 0}function Zb(e){return!!(524288&e.flags)&&!Ad(e)}function ex(e){return ik(e)||!!(474058748&e.flags)}function tx(e,t){if(!(1048576&e.flags))return e;if(x(e.types,ex))return S(e.types,ik)||wn;const n=S(e.types,(e=>!ex(e)));return n?S(e.types,(e=>e!==n&&!ex(e)))?e:function(e){const n=ed();for(const r of Rd(e))if(6&fx(r));else if(rx(r)){const e=65536&r.flags&&!(32768&r.flags),i=No(16777220,r.escapedName,cd(r)|(t?8:0));i.links.type=e?It:Hc($l(r),!0),i.declarations=r.declarations,i.links.nameType=Uo(r).nameType,i.links.syntheticOrigin=r,n.set(r.escapedName,i)}const r=ks(e.symbol,n,u,u,cf(e));return r.objectFlags|=131200,r}(n):e}function nx(e,t,n,r,i){if(1&e.flags||1&t.flags)return St;if(2&e.flags||2&t.flags)return At;if(131072&e.flags)return t;if(131072&t.flags)return e;if(1048576&(e=tx(e,i)).flags)return uv([e,t])?DD(e,(e=>nx(e,t,n,r,i))):Dt;if(1048576&(t=tx(t,i)).flags)return uv([e,t])?DD(t,(t=>nx(e,t,n,r,i))):Dt;if(473960444&t.flags)return e;if(pb(e)||pb(t)){if(ik(e))return t;if(2097152&e.flags){const o=e.types,a=o[o.length-1];if(Zb(a)&&Zb(t))return cv(Z(o.slice(0,o.length-1),[nx(a,t,n,r,i)]))}return cv([e,t])}const o=ed(),a=new Set,s=e===wn?cf(t):z_([e,t]);for(const e of Rd(t))6&fx(e)?a.add(e.escapedName):rx(e)&&o.set(e.escapedName,ix(e,i));for(const t of Rd(e))if(!a.has(t.escapedName)&&rx(t))if(o.has(t.escapedName)){const e=o.get(t.escapedName),n=$l(e);if(16777216&e.flags){const r=Z(t.declarations,e.declarations),i=No(4|16777216&t.flags,t.escapedName),a=$l(t),s=EC(a),c=EC(n);i.links.type=s===c?a:ev([a,c],2),i.links.leftSpread=t,i.links.rightSpread=e,i.declarations=r,i.links.nameType=Uo(t).nameType,o.set(t.escapedName,i)}}else o.set(t.escapedName,ix(t,i));const c=ks(n,o,u,u,L(s,(e=>function(e,t){return e.isReadonly!==t?Vm(e.keyType,e.type,t,e.declaration):e}(e,i))));return c.objectFlags|=2228352|r,c}function rx(e){var t;return!(Q(e.declarations,Zl)||106496&e.flags&&(null==(t=e.declarations)?void 0:t.some((e=>gu(e.parent)))))}function ix(e,t){const n=65536&e.flags&&!(32768&e.flags);if(!n&&t===oM(e))return e;const r=No(4|16777216&e.flags,e.escapedName,cd(e)|(t?8:0));return r.links.type=n?It:$l(e),r.declarations=e.declarations,r.links.nameType=Uo(e).nameType,r.links.syntheticOrigin=e,r}function ox(e,t,n,r){const i=fs(e,n);return i.value=t,i.regularType=r||i,i}function ax(e){if(2976&e.flags){if(!e.freshType){const t=ox(e.flags,e.value,e.symbol,e);t.freshType=t,e.freshType=t}return e.freshType}return e}function sx(e){return 2976&e.flags?e.regularType:1048576&e.flags?e.regularType||(e.regularType=DD(e,sx)):e}function cx(e){return!!(2976&e.flags)&&e.freshType===e}function lx(e){let t;return Qe.get(e)||(Qe.set(e,t=ox(128,e)),t)}function ux(e){let t;return Ye.get(e)||(Ye.set(e,t=ox(256,e)),t)}function _x(e){let t;const n=ST(e);return tt.get(n)||(tt.set(n,t=ox(2048,e)),t)}function dx(e,t,n){let r;const i=`${t}${"string"==typeof e?"@":"#"}${e}`,o=1024|("string"==typeof e?128:256);return nt.get(i)||(nt.set(i,r=ox(o,e,n)),r)}function mx(e){if(Mm(e)&&UN(e)){const t=Wg(e);t&&(e=Mg(t)||t)}if(Rf(e)){const t=jf(e)?rs(e.left):rs(e);if(t){const e=Uo(t);return e.uniqueESSymbolType||(e.uniqueESSymbolType=function(e){const t=fs(8192,e);return t.escapedName=`__@${t.symbol.escapedName}@${OB(t.symbol)}`,t}(t))}}return Qt}function vx(e){const t=Wo(e);return t.resolvedType||(t.resolvedType=function(e){const t=rm(e,!1,!1),n=t&&t.parent;if(n&&(gu(n)||264===n.kind)&&!Jv(t)&&(!fE(t)||_h(e,t.body)))return Nu(ns(n)).thisType;if(n&&HE(n)&&uP(n.parent)&&6===ag(n.parent))return Nu(rs(n.parent.left).parent).thisType;const r=16777216&e.flags?Ug(e):void 0;return r&&nP(r)&&uP(r.parent)&&3===ag(r.parent)?Nu(rs(r.parent.left).parent).thisType:rO(t)&&_h(e,t.body)?Nu(ns(t)).thisType:(xo(e,va.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),Dt)}(e)),t.resolvedType}function bx(e){return Sx(xx(e.type)||e.type)}function xx(e){switch(e.kind){case 196:return xx(e.type);case 189:if(1===e.elements.length&&(191===(e=e.elements[0]).kind||202===e.kind&&e.dotDotDotToken))return xx(e.type);break;case 188:return e.elementType}}function Sx(e){return function(e,t){let n,r=!0;for(;t&&!b_(t)&&320!==t.kind;){const i=t.parent;if(169===i.kind&&(r=!r),(r||8650752&e.flags)&&194===i.kind&&t===i.trueType){const t=Ph(e,i.checkType,i.extendsType);t&&(n=ue(n,t))}else if(262144&e.flags&&200===i.kind&&!i.nameType&&t===i.type){const t=Sx(i);if(fd(t)===Jb(e)){const e=Gx(t);if(e){const t=Jd(e);t&&xD(t,Uk)&&(n=ue(n,ev([zt,yn])))}}}t=i}return n?mh(e,cv(n)):e}(kx(e),e)}function kx(e){switch(e.kind){case 133:case 312:case 313:return St;case 159:return At;case 154:return Jt;case 150:return zt;case 163:return $t;case 136:return Xt;case 155:return Qt;case 116:return Zt;case 157:return It;case 106:return Rt;case 146:return en;case 151:return 524288&e.flags&&!Y?St:cn;case 141:return Ft;case 197:case 110:return vx(e);case 201:return function(e){if(106===e.literal.kind)return Rt;const t=Wo(e);return t.resolvedType||(t.resolvedType=sx(KM(e.literal))),t.resolvedType}(e);case 183:case 233:return Ih(e);case 182:return e.assertsModifier?Zt:Xt;case 186:return Lh(e);case 188:case 189:return function(e){const t=Wo(e);if(!t.resolvedType){const n=function(e){const t=function(e){return jE(e)&&148===e.operator}(e.parent);return xx(e)?t?Qn:Xn:Iy(O(e.elements,Cy),t,O(e.elements,Dy))}(e);if(n===An)t.resolvedType=wn;else if(189===e.kind&&Q(e.elements,(e=>!!(8&Cy(e))))||!Ey(e)){const r=188===e.kind?[Sx(e.elementType)]:O(e.elements,Sx);t.resolvedType=Oy(n,r)}else t.resolvedType=189===e.kind&&0===e.elements.length?n:Eg(n,e,void 0)}return t.resolvedType}(e);case 190:return function(e){return Hc(Sx(e.type),!0)}(e);case 192:return function(e){const t=Wo(e);if(!t.resolvedType){const n=Qb(e);t.resolvedType=ev(O(e.types,Sx),1,n,Yb(n))}return t.resolvedType}(e);case 193:return function(e){const t=Wo(e);if(!t.resolvedType){const n=Qb(e),r=O(e.types,Sx),i=2===r.length?r.indexOf(Pn):-1,o=i>=0?r[1-i]:At,a=!!(76&o.flags||134217728&o.flags&&sb(o));t.resolvedType=cv(r,a?1:0,n,Yb(n))}return t.resolvedType}(e);case 314:return function(e){const t=Sx(e.type);return U?KT(t,65536):t}(e);case 316:return Hc(Sx(e.type));case 202:return function(e){const t=Wo(e);return t.resolvedType||(t.resolvedType=e.dotDotDotToken?bx(e):Hc(Sx(e.type),!0,!!e.questionToken))}(e);case 196:case 315:case 309:return Sx(e.type);case 191:return bx(e);case 318:return function(e){const t=Sx(e.type),{parent:n}=e,r=e.parent.parent;if(UN(e.parent)&&xF(r)){const e=Ug(r),n=_F(r.parent.parent);if(e||n){const i=we(n?r.parent.parent.typeExpression.parameters:e.parameters),o=$g(r);if(!i||o&&i.symbol===o&&U_(i))return Ty(t)}}return sE(n)&&nF(n.parent)?Ty(t):Hc(t)}(e);case 184:case 185:case 187:case 322:case 317:case 323:return Xb(e);case 198:return function(e){const t=Wo(e);if(!t.resolvedType)switch(e.operator){case 143:t.resolvedType=Av(Sx(e.type));break;case 158:t.resolvedType=155===e.type.kind?mx(oh(e.parent)):Dt;break;case 148:t.resolvedType=Sx(e.type);break;default:xn.assertNever(e.operator)}return t.resolvedType}(e);case 199:return Rb(e);case 200:return Bb(e);case 194:return function(e){const t=Wo(e);if(!t.resolvedType){const n=Sx(e.checkType),r=Qb(e),i=Yb(r),o=Yl(e,!0),a=i?o:F(o,(t=>Wx(t,e))),s={node:e,checkType:n,extendsType:Sx(e.extendsType),isDistributive:!!(262144&n.flags),inferTypeParameters:Kb(e),outerTypeParameters:a,instantiations:void 0,aliasSymbol:r,aliasTypeArguments:i};t.resolvedType=qb(s,void 0,!1),a&&(s.instantiations=new Map,s.instantiations.set(fg(a),t.resolvedType))}return t.resolvedType}(e);case 195:return function(e){const t=Wo(e);return t.resolvedType||(t.resolvedType=Lu(ns(e.typeParameter))),t.resolvedType}(e);case 203:return function(e){const t=Wo(e);return t.resolvedType||(t.resolvedType=Ov([e.head.text,...O(e.templateSpans,(e=>e.literal.text))],O(e.templateSpans,(e=>Sx(e.type))))),t.resolvedType}(e);case 205:return Hb(e);case 80:case 166:case 211:const t=JR(e);return t?ju(t):Dt;default:return Dt}}function Tx(e,t,n){if(e&&e.length)for(let r=0;r_h(e,a)))||Q(t.typeArguments,n)}return!0;case 174:case 173:return!t.type&&!!t.body||Q(t.typeParameters,n)||Q(t.parameters,n)||!!t.type&&n(t.type)}return!!LI(t,n)}}function Gx(e){const t=md(e);if(4194304&t.flags){const e=Jb(t.type);if(262144&e.flags)return e}}function Xx(e,t){return!!(1&t)||!(2&t)&&e}function Qx(e,t,n,r){const i=qx(r,fd(e),t),o=eS(yd(e.target||e),i),a=Dd(e);return U&&4&a&&!_M(o,49152)?XT(o,!0):U&&8&a&&n?Zw(o,524288):o}function Yx(e,t,n,r){xn.assert(e.symbol,"anonymous type must have symbol to be instantiated");const i=hs(-1572865&e.objectFlags|64,e.symbol);if(32&e.objectFlags){i.declaration=e.declaration;const n=fd(e),r=Vx(n);i.typeParameter=r,t=zx(Mx(n,r),t),r.mapper=t}return 8388608&e.objectFlags&&(i.node=e.node),134217728&e.objectFlags&&(i.outerTypeParameters=e.outerTypeParameters),i.target=e,i.mapper=t,i.aliasSymbol=n||e.aliasSymbol,i.aliasTypeArguments=n?r:Dx(e.aliasTypeArguments,t),i.objectFlags|=i.aliasTypeArguments?xg(i.aliasTypeArguments):0,i}function Zx(e,t,n,r,i){const o=e.root;if(o.outerTypeParameters){const e=O(o.outerTypeParameters,(e=>Ax(e,t))),a=(n?"C":"")+fg(e)+vg(r,i);let s=o.instantiations.get(a);if(!s){const t=Fx(o.outerTypeParameters,e),c=o.checkType,l=o.isDistributive?Sp(Ax(c,t)):void 0;s=l&&c!==l&&1179648&l.flags?ED(l,(e=>qb(o,$x(c,e,t),n)),r,i):qb(o,t,n,r,i),o.instantiations.set(a,s)}return s}return e}function eS(e,t){return e&&t?tS(e,t,void 0,void 0):e}function tS(e,t,n,i){var o;if(!ZC(e))return e;if(100===y||h>=5e6)return null==(o=or)||o.instant(or.Phase.CheckTypes,"instantiateType_DepthLimit",{typeId:e.id,instantiationDepth:y,instantiationCount:h}),xo(r,va.Type_instantiation_is_excessively_deep_and_possibly_infinite),Dt;m++,h++,y++;const a=function(e,t,n,r){const i=e.flags;if(262144&i)return Ax(e,t);if(524288&i){const i=e.objectFlags;if(52&i){if(4&i&&!e.node){const n=e.resolvedTypeArguments,r=Dx(n,t);return r!==n?Oy(e.target,r):e}return 1024&i?function(e,t){const n=eS(e.mappedType,t);if(!(32&wx(n)))return e;const r=eS(e.constraintType,t);if(!(4194304&r.flags))return e;const i=rw(eS(e.source,t),n,r);return i||e}(e,t):function(e,t,n,r){const i=4&e.objectFlags||8388608&e.objectFlags?e.node:e.symbol.declarations[0],o=Wo(i),a=4&e.objectFlags?o.resolvedType:64&e.objectFlags?e.target:e;let s=134217728&e.objectFlags?e.outerTypeParameters:o.outerTypeParameters;if(!s){let t=Yl(i,!0);rO(i)&&(t=pe(t,hf(i))),s=t||u;const n=8388612&e.objectFlags?[i]:e.symbol.declarations;s=(8388612&a.objectFlags||8192&a.symbol.flags||2048&a.symbol.flags)&&!a.aliasTypeArguments?F(s,(e=>Q(n,(t=>Wx(e,t))))):s,o.outerTypeParameters=s}if(s.length){const i=zx(e.mapper,t),o=O(s,(e=>Ax(e,i))),c=n||e.aliasSymbol,l=n?r:Dx(e.aliasTypeArguments,t),u=(134217728&e.objectFlags?"S":"")+fg(o)+vg(c,l);a.instantiations||(a.instantiations=new Map,a.instantiations.set(fg(s)+vg(a.aliasSymbol,a.aliasTypeArguments),a));let _=a.instantiations.get(u);if(!_){if(134217728&e.objectFlags)return _=Yx(e,t),a.instantiations.set(u,_),_;const n=Fx(s,o);_=4&a.objectFlags?Eg(e.target,e.node,n,c,l):32&a.objectFlags?function(e,t,n,r){const i=Gx(e);if(i){const o=eS(i,t);if(i!==o)return ED(Sp(o),(function n(r){if(61603843&r.flags&&r!==Tt&&!Nc(r)){if(!e.declaration.nameType){let o;if(qk(r)||1&r.flags&&dc(i,4)<0&&(o=Jd(i))&&xD(o,Uk))return function(e,t,n){const r=Qx(t,zt,!0,n);return Nc(r)?Dt:Ty(r,Xx(Vk(e),Dd(t)))}(r,e,$x(i,r,t));if(PT(r))return function(e,t,n,r){const i=e.target.elementFlags,o=e.target.fixedLength,a=o?$x(n,e,r):r,s=O($y(e),((e,s)=>{const c=i[s];return s1&e?2:e)):8&c?O(i,(e=>2&e?1:e)):i,u=Xx(e.target.readonly,Dd(t));return D(s,Dt)?Dt:Ay(s,l,u,e.target.labeledElementDeclarations)}(r,e,i,t);if(lp(r))return cv(O(r.types,n))}return Yx(e,$x(i,r,t))}return r}),n,r)}return eS(md(e),t)===Tt?Tt:Yx(e,t,n,r)}(a,n,c,l):Yx(a,n,c,l),a.instantiations.set(u,_);const r=wx(_);if(3899393&_.flags&&!(524288&r)){const e=Q(o,ZC);524288&wx(_)||(_.objectFlags|=52&r?524288|(e?1048576:0):e?0:524288)}}return _}return e}(e,t,n,r)}return e}if(3145728&i){const o=1048576&e.flags?e.origin:void 0,a=o&&3145728&o.flags?o.types:e.types,s=Dx(a,t);if(s===a&&n===e.aliasSymbol)return e;const c=n||e.aliasSymbol,l=n?r:Dx(e.aliasTypeArguments,t);return 2097152&i||o&&2097152&o.flags?cv(s,0,c,l):ev(s,1,c,l)}if(4194304&i)return Av(eS(e.type,t));if(134217728&i)return Ov(e.texts,Dx(e.types,t));if(268435456&i)return Gv(e.symbol,eS(e.type,t));if(8388608&i){const i=n||e.aliasSymbol,o=n?r:Dx(e.aliasTypeArguments,t);return Mb(eS(e.objectType,t),eS(e.indexType,t),e.accessFlags,void 0,i,o)}if(16777216&i)return Zx(e,zx(e.mapper,t),!1,n,r);if(33554432&i){const n=eS(e.baseType,t);if(ph(e))return nh(n);const r=eS(e.constraint,t);return 8650752&n.flags&&lb(r)?mh(n,r):3&r.flags||SS(iS(n),iS(r))?n:8650752&n.flags?mh(n,r):cv([r,n])}return e}(e,t,n,i);return y--,a}function rS(e){return 402915327&e.flags?e:e.permissiveInstantiation||(e.permissiveInstantiation=eS(e,bn))}function iS(e){return 402915327&e.flags?e:(e.restrictiveInstantiation||(e.restrictiveInstantiation=eS(e,vn),e.restrictiveInstantiation.restrictiveInstantiation=e.restrictiveInstantiation),e.restrictiveInstantiation)}function oS(e,t){return Vm(e.keyType,eS(e.type,t),e.isReadonly,e.declaration)}function lS(e){switch(xn.assert(174!==e.kind||$f(e)),e.kind){case 218:case 219:case 174:case 262:return dS(e);case 210:return Q(e.properties,lS);case 209:return Q(e.elements,lS);case 227:return lS(e.whenTrue)||lS(e.whenFalse);case 226:return(57===e.operatorToken.kind||61===e.operatorToken.kind)&&(lS(e.left)||lS(e.right));case 303:return lS(e.initializer);case 217:return lS(e.expression);case 292:return Q(e.properties,lS)||CN(e.parent)&&Q(e.parent.parent.children,lS);case 291:{const{initializer:t}=e;return!!t&&lS(t)}case 294:{const{expression:t}=e;return!!t&&lS(t)}}return!1}function dS(e){return $T(e)||function(e){return!(e.typeParameters||Cv(e)||!e.body)&&(241!==e.body.kind?lS(e.body):!!Pf(e.body,(e=>!!e.expression&&lS(e.expression))))}(e)}function fS(e){return(UT(e)||$f(e))&&dS(e)}function mS(e){if(524288&e.flags){const t=Od(e);if(t.constructSignatures.length||t.callSignatures.length){const n=hs(16,e.symbol);return n.members=t.members,n.properties=t.properties,n.callSignatures=u,n.constructSignatures=u,n.indexInfos=u,n}}else if(2097152&e.flags)return cv(O(e.types,mS));return e}function gS(e,t){return uk(e,t,uo)}function hS(e,t){return uk(e,t,uo)?-1:0}function yS(e,t){return uk(e,t,co)?-1:0}function vS(e,t){return uk(e,t,ao)?-1:0}function bS(e,t){return uk(e,t,ao)}function xS(e,t){return uk(e,t,so)}function SS(e,t){return uk(e,t,co)}function kS(e,t){return 1048576&e.flags?x(e.types,(e=>kS(e,t))):1048576&t.flags?Q(t.types,(t=>kS(e,t))):2097152&e.flags?Q(e.types,(e=>kS(e,t))):58982400&e.flags?kS(Wd(e)||At,t):ok(t)?!!(67633152&e.flags):t===Kn?!!(67633152&e.flags)&&!ok(e):t===Wn?!!(524288&e.flags)&&Gw(e):Gl(e,Hl(t))||qk(t)&&!Vk(t)&&kS(e,Qn)}function TS(e,t){return uk(e,t,lo)}function CS(e,t){return TS(e,t)||TS(t,e)}function PS(e,t,n,r,i,o){return mk(e,t,co,n,r,i,o)}function IS(e,t,n,r,i,o){return OS(e,t,co,n,r,i,o,void 0)}function OS(e,t,n,r,i,o,a,s){return!!uk(e,t,n)||(!r||!BS(i,e,t,n,o,a,s))&&mk(e,t,n,r,o,a,s)}function RS(e){return!!(16777216&e.flags||2097152&e.flags&&Q(e.types,RS))}function BS(e,t,n,r,i,o,a){if(!e||RS(n))return!1;if(!mk(t,n,r,void 0)&&function(e,t,n,r,i,o,a){const s=Vp(t,0),c=Vp(t,1);for(const l of[c,s])if(Q(l,(e=>{const t=Gf(e);return!(131073&t.flags)&&mk(t,n,r,void 0)}))){const r=a||{};return PS(t,n,e,i,o,r),fT(r.errors[r.errors.length-1],Rp(e,l===c?va.Did_you_mean_to_use_new_with_this_expression:va.Did_you_mean_to_call_this_expression)),!0}return!1}(e,t,n,r,i,o,a))return!0;switch(e.kind){case 234:if(!TC(e))break;case 294:case 217:return BS(e.expression,t,n,r,i,o,a);case 226:switch(e.operatorToken.kind){case 64:case 28:return BS(e.right,t,n,r,i,o,a)}break;case 210:return function(e,t,n,r,i,o){return!(402915324&n.flags)&&US(function*(e){if(p(e.properties))for(const t of e.properties){if(zN(t))continue;const e=Ev(ns(t),8576);if(e&&!(131072&e.flags))switch(t.kind){case 178:case 177:case 174:case 304:yield{errorNode:t.name,innerExpression:void 0,nameType:e};break;case 303:yield{errorNode:t.name,innerExpression:t.initializer,nameType:e,errorMessage:Op(t.name)?va.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:void 0};break;default:xn.assertNever(t)}}}(e),t,n,r,i,o)}(e,t,n,r,o,a);case 209:return function(e,t,n,r,i,o){if(402915324&n.flags)return!1;if(Zk(t))return US(HS(e,n),t,n,r,i,o);fF(e,n,!1);const a=FF(e,1,!0);return mF(),!!Zk(a)&&US(HS(e,n),a,n,r,i,o)}(e,t,n,r,o,a);case 292:return function(e,t,n,r,i,o){let a,s=US(function*(e){if(p(e.properties))for(const t of e.properties)AN(t)||BF(uC(t.name))||(yield{errorNode:t.name,innerExpression:t.initializer,nameType:lx(uC(t.name))})}(e),t,n,r,i,o);if(CN(e.parent)&&kN(e.parent.parent)){const a=e.parent.parent,l=XF(HF(e)),u=void 0===l?"children":vc(l),_=lx(u),d=Mb(n,_),f=vy(a.children);if(!p(f))return s;const m=p(f)>1;let g,h;if(my(!1)!==An){const e=ky(St);g=SD(d,(t=>SS(t,e))),h=SD(d,(t=>!SS(t,e)))}else g=SD(d,tT),h=SD(d,(e=>!tT(e)));if(m){if(g!==en){const e=Ay($F(a,0)),t=function*(e,t){if(!p(e.children))return;let n=0;for(let r=0;r!tT(e))),c=s!==en?gj(13,0,s,void 0):void 0;let l=!1;for(let n=e.next();!n.done;n=e.next()){const{errorNode:e,innerExpression:s,nameType:u,errorMessage:_}=n.value;let d=c;const p=a!==en?JS(t,a,u):void 0;if(!p||8388608&p.flags||(d=c?ev([c,p]):p),!d)continue;let f=jb(t,u);if(!f)continue;const m=eb(u,void 0);if(!mk(f,d,r,void 0)&&(l=!0,!s||!BS(s,f,d,r,void 0,i,o))){const n=o||{},c=s?VS(s,f):f;if(ie&&yk(c,d)){const t=Rp(e,va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Ws(c),Ws(d));ro.add(t),n.errors=[t]}else{const o=!!(m&&16777216&(Jp(a,m)||ht).flags),s=!!(m&&16777216&(Jp(t,m)||ht).flags);d=bC(d,o),f=bC(f,o&&s),mk(c,d,r,e,_,i,n)&&c!==f&&mk(f,d,r,e,_,i,n)}}}return l}(t,e,g,r,i,o)||s}else if(!uk(Mb(t,_),d,r)){s=!0;const e=xo(a.openingElement.tagName,va.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided,u,Ws(d));o&&o.skipLogging&&(o.errors||(o.errors=[])).push(e)}}else if(h!==en){const e=KS(f[0],_,c);e&&(s=US(function*(){yield e}(),t,n,r,i,o)||s)}else if(!uk(Mb(t,_),d,r)){s=!0;const e=xo(a.openingElement.tagName,va.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided,u,Ws(d));o&&o.skipLogging&&(o.errors||(o.errors=[])).push(e)}}return s;function c(){if(!a){const t=Gd(e.parent.tagName),r=XF(HF(e)),i=void 0===r?"children":vc(r),o=Mb(n,lx(i)),s=va._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;a={...s,key:"!!ALREADY FORMATTED!!",message:sS(s,t,i,Ws(o))}}return a}}(e,t,n,r,o,a);case 219:return function(e,t,n,r,i,o){if(DP(e.body))return!1;if(Q(e.parameters,M_))return!1;const a=hI(t);if(!a)return!1;const s=Vp(n,0);if(!p(s))return!1;const c=e.body,l=Gf(a),u=ev(O(s,Gf));if(!mk(l,u,r,void 0)){const t=c&&BS(c,l,u,r,void 0,i,o);if(t)return t;const a=o||{};if(mk(l,u,r,c,void 0,i,a),a.errors)return n.symbol&&p(n.symbol.declarations)&&fT(a.errors[a.errors.length-1],Rp(n.symbol.declarations[0],va.The_expected_type_comes_from_the_return_type_of_this_signature)),0==(2&Jh(e))&&!Tc(l,"then")&&mk(UO(l),u,r,void 0)&&fT(a.errors[a.errors.length-1],Rp(e,va.Did_you_mean_to_mark_this_function_as_async)),!0}return!1}(e,t,n,r,o,a)}return!1}function JS(e,t,n){const r=jb(t,n);if(r)return r;if(1048576&t.flags){const r=vk(e,t);if(r)return jb(r,n)}}function VS(e,t){fF(e,t,!1);const n=IM(e,1);return mF(),n}function US(e,t,n,r,i,o){let a=!1;for(const s of e){const{errorNode:e,innerExpression:c,nameType:l,errorMessage:u}=s;let _=JS(t,n,l);if(!_||8388608&_.flags)continue;let d=jb(t,l);if(!d)continue;const f=eb(l,void 0);if(!mk(d,_,r,void 0)&&(a=!0,!c||!BS(c,d,_,r,void 0,i,o))){const a=o||{},s=c?VS(c,d):d;if(ie&&yk(s,_)){const t=Rp(e,va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target,Ws(s),Ws(_));ro.add(t),a.errors=[t]}else{const o=!!(f&&16777216&(Jp(n,f)||ht).flags),c=!!(f&&16777216&(Jp(t,f)||ht).flags);_=bC(_,o),d=bC(d,o&&c),mk(s,_,r,e,u,i,a)&&s!==d&&mk(d,_,r,e,u,i,a)}if(a.errors){const e=a.errors[a.errors.length-1],t=mC(l)?gC(l):void 0,r=void 0!==t?Jp(n,t):void 0;let i=!1;if(!r){const t=mf(n,l);t&&t.declaration&&!Sd(t.declaration).hasNoDefaultLib&&(i=!0,fT(e,Rp(t.declaration,va.The_expected_type_comes_from_this_index_signature)))}if(!i&&(r&&p(r.declarations)||n.symbol&&p(n.symbol.declarations))){const i=r&&p(r.declarations)?r.declarations[0]:n.symbol.declarations[0];Sd(i).hasNoDefaultLib||fT(e,Rp(i,va.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1,!t||8192&l.flags?Ws(l):vc(t),Ws(n)))}}}}return a}function KS(e,t,n){switch(e.kind){case 294:return{errorNode:e,innerExpression:e.expression,nameType:t};case 12:if(e.containsOnlyTriviaWhiteSpaces)break;return{errorNode:e,innerExpression:void 0,nameType:t,errorMessage:n()};case 284:case 285:case 288:return{errorNode:e,innerExpression:e,nameType:t};default:return xn.assertNever(e,"Found invalid jsx child")}}function*HS(e,t){const n=p(e.elements);if(n)for(let r=0;rc:AO(e)>c))return!r||8&n||i(va.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1,AO(e),c),0;var l;e.typeParameters&&e.typeParameters!==t.typeParameters&&(e=bI(e,t=(l=t).typeParameters?l.canonicalSignatureCache||(l.canonicalSignatureCache=function(e){return hm(e,O(e.typeParameters,(e=>e.target&&!Jd(e.target)?e.target:e)),Mm(e.declaration))}(l)):l,void 0,a));const u=FO(e),_=MO(e),d=MO(t);(_||d)&&eS(_||d,s);const p=t.declaration?t.declaration.kind:0,f=!(3&n)&&H&&174!==p&&173!==p&&176!==p;let m=-1;const g=Kf(e);if(g&&g!==Zt){const e=Kf(t);if(e){const t=!f&&a(g,e,!1)||a(e,g,r);if(!t)return r&&i(va.The_this_types_of_each_signature_are_incompatible),0;m&=t}}const h=_||d?Math.min(u,c):Math.max(u,c),y=_||d?h-1:-1;for(let c=0;c=AO(e)&&c=3&&32768&t[0].flags&&65536&t[1].flags&&Q(t,ok)?67108864:0)}return!!(67108864&e.objectFlags)}return!1}(t))return!0}return!1}function uk(e,t,n){if(cx(e)&&(e=e.regularType),cx(t)&&(t=t.regularType),e===t)return!0;if(n!==uo){if(n===lo&&!(131072&t.flags)&&lk(t,e,n)||lk(e,t,n))return!0}else if(!(61865984&(e.flags|t.flags))){if(e.flags!==t.flags)return!1;if(67358815&e.flags)return!0}if(524288&e.flags&&524288&t.flags){const r=n.get(Nk(e,t,0,n,!1));if(void 0!==r)return!!(1&r)}return!!(469499904&e.flags||469499904&t.flags)&&mk(e,t,n,void 0)}function _k(e,t){return 2048&wx(e)&&BF(t.escapedName)}function dk(e,t){for(;;){const n=cx(e)?e.regularType:NT(e)?fk(e,t):4&wx(e)?e.node?Tg(e.target,Ig(e)):Xk(e)||e:3145728&e.flags?pk(e,t):33554432&e.flags?t?e.baseType:Ch(e):25165824&e.flags?Nb(e,t):e;if(n===e)return n;e=n}}function pk(e,t){const n=Sp(e);if(n!==e)return n;if(2097152&e.flags&&function(e){let t=!1,n=!1;for(const r of e.types)if(t||(t=!!(465829888&r.flags)),n||(n=!!(98304&r.flags)||ok(r)),t&&n)return!0;return!1}(e)){const n=L(e.types,(e=>dk(e,t)));if(n!==e.types)return cv(n)}return e}function fk(e,t){const n=$y(e),r=L(n,(e=>25165824&e.flags?Nb(e,t):e));return n!==r?My(e.target,r):e}function mk(e,t,n,i,o,a,s){var c;let l,_,d,f,m,g,h,y,v=0,b=0,x=0,S=0,k=!1,C=0,w=0,E=16e6-n.size>>3;xn.assert(n!==uo||!i,"no error reporting in identity checking");const P=q(e,t,3,!!i,o);if(y&&M(),k){const o=Nk(e,t,0,n,!1);n.set(o,6),null==(c=or)||c.instant(or.Phase.CheckTypes,"checkTypeRelatedTo_DepthLimit",{sourceId:e.id,targetId:t.id,depth:b,targetDepth:x});const a=E<=0?va.Excessive_complexity_comparing_types_0_and_1:va.Excessive_stack_depth_comparing_types_0_and_1,l=xo(i||r,a,Ws(e),Ws(t));s&&(s.errors||(s.errors=[])).push(l)}else if(l){if(a){const e=a();e&&(_S(e,l),l=e)}let r;if(o&&i&&!P&&e.symbol){const i=Uo(e.symbol);i.originatingImport&&!uf(i.originatingImport)&&mk($l(i.target),t,n,void 0)&&(r=ue(r,Rp(i.originatingImport,va.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead)))}const c=zp(Sd(i),i,l,r);_&&fT(c,..._),s&&(s.errors||(s.errors=[])).push(c),s&&s.skipLogging||ro.add(c)}return i&&s&&s.skipLogging&&0===P&&xn.assert(!!s.errors,"missed opportunity to interact with error."),0!==P;function N(e){l=e.errorInfo,h=e.lastSkippedInfo,y=e.incompatibleStack,C=e.overrideNextErrorInfo,w=e.skipParentCounter,_=e.relatedInfo}function F(){return{errorInfo:l,lastSkippedInfo:h,incompatibleStack:null==y?void 0:y.slice(),overrideNextErrorInfo:C,skipParentCounter:w,relatedInfo:null==_?void 0:_.slice()}}function I(e,...t){C++,h=void 0,(y||(y=[])).push([e,...t])}function M(){const e=y||[];y=void 0;const t=h;if(h=void 0,1===e.length)return j(...e[0]),void(t&&J(void 0,...t));let n="";const r=[];for(;e.length;){const[t,...i]=e.pop();switch(t.code){case va.Types_of_property_0_are_incompatible.code:{0===n.indexOf("new ")&&(n=`(${n})`);const e=""+i[0];n=0===n.length?`${e}`:Ts(e,wS(A))?`${n}.${e}`:"["===e[0]&&"]"===e[e.length-1]?`${n}${e}`:`${n}[${e}]`;break}case va.Call_signature_return_types_0_and_1_are_incompatible.code:case va.Construct_signature_return_types_0_and_1_are_incompatible.code:case va.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:case va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:if(0===n.length){let e=t;t.code===va.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?e=va.Call_signature_return_types_0_and_1_are_incompatible:t.code===va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code&&(e=va.Construct_signature_return_types_0_and_1_are_incompatible),r.unshift([e,i[0],i[1]])}else n=`${t.code===va.Construct_signature_return_types_0_and_1_are_incompatible.code||t.code===va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"new ":""}${n}(${t.code===va.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code||t.code===va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code?"":"..."})`;break;case va.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code:r.unshift([va.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,i[0],i[1]]);break;case va.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code:r.unshift([va.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,i[0],i[1],i[2]]);break;default:return xn.fail(`Unhandled Diagnostic: ${t.code}`)}}n?j(")"===n[n.length-1]?va.The_types_returned_by_0_are_incompatible_between_these_types:va.The_types_of_0_are_incompatible_between_these_types,n):r.shift();for(const[e,...t]of r){const n=e.elidedInCompatabilityPyramid;e.elidedInCompatabilityPyramid=!1,j(e,...t),e.elidedInCompatabilityPyramid=n}t&&J(void 0,...t)}function j(e,...t){xn.assert(!!i),y&&M(),e.elidedInCompatabilityPyramid||(0===w?l=uS(l,e,...t):w--)}function R(e,...t){j(e,...t),w++}function B(e){xn.assert(!!l),_?_.push(e):_=[e]}function J(e,t,r){y&&M();const[i,o]=Hs(t,r);let a=t,s=i;if(sT(t)&&!gk(r)&&(a=cT(t),xn.assert(!SS(a,r),"generalized source shouldn't be assignable"),s=Gs(a)),262144&(8388608&r.flags&&!(8388608&t.flags)?r.objectType.flags:r.flags)&&r!==Jn&&r!==zn){const e=Wd(r);let n;e&&(SS(a,e)||(n=SS(t,e)))?j(va._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,n?i:s,o,Ws(e)):(l=void 0,j(va._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1,o,s))}if(e)e===va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1&&ie&&hk(t,r).length&&(e=va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties);else if(n===lo)e=va.Type_0_is_not_comparable_to_type_1;else if(i===o)e=va.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;else if(ie&&hk(t,r).length)e=va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;else{if(128&t.flags&&1048576&r.flags){const e=function(e,t){const n=t.types.filter((e=>!!(128&e.flags)));return Ut(e.value,n,(e=>e.value))}(t,r);if(e)return void j(va.Type_0_is_not_assignable_to_type_1_Did_you_mean_2,s,o,Ws(e))}e=va.Type_0_is_not_assignable_to_type_1}j(e,s,o)}function z(e,t,n){return PT(e)?e.target.readonly&&Kk(t)?(n&&j(va.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Ws(e),Ws(t)),!1):Uk(t):Vk(e)&&Kk(t)?(n&&j(va.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,Ws(e),Ws(t)),!1):!PT(t)||qk(e)}function $(e,t,n){return q(e,t,3,n)}function q(e,t,r=3,o=!1,a,s=0){if(e===t)return-1;if(524288&e.flags&&402784252&t.flags)return n===lo&&!(131072&t.flags)&&lk(t,e,n)||lk(e,t,n,o?j:void 0)?-1:(o&&V(e,t,e,t,a),0);const c=dk(e,!1);let l=dk(t,!0);if(c===l)return-1;if(n===uo)return c.flags!==l.flags?0:67358815&c.flags?-1:(K(c,l),te(c,l,!1,0,r));if(262144&c.flags&&Bd(c)===l)return-1;if(470302716&c.flags&&1048576&l.flags){const e=l.types,t=2===e.length&&98304&e[0].flags?e[1]:3===e.length&&98304&e[0].flags&&98304&e[1].flags?e[2]:void 0;if(t&&!(98304&t.flags)&&(l=dk(t,!0),c===l))return-1}if(n===lo&&!(131072&l.flags)&&lk(l,c,n)||lk(c,l,n,o?j:void 0))return-1;if(469499904&c.flags||469499904&l.flags){if(!(2&s)&&Tw(c)&&8192&wx(c)&&function(e,t,r){var o;if(!aA(t)||!Y&&4096&wx(t))return!1;const a=!!(2048&wx(e));if((n===co||n===lo)&&(yD(Kn,t)||!a&&ik(t)))return!1;let s,c=t;1048576&t.flags&&(c=yJ(e,t,q)||function(e){if(_M(e,67108864)){const t=SD(e,(e=>!(402784252&e.flags)));if(!(131072&t.flags))return t}return e}(t),s=1048576&c.flags?c.types:[c]);for(const t of Rd(e))if(H(t,e.symbol)&&!_k(e,t)){if(!oA(c,t.escapedName,a)){if(r){const n=SD(c,aA);if(!i)return xn.fail();if(FN(i)||D_(i)||D_(i.parent)){t.valueDeclaration&&NN(t.valueDeclaration)&&Sd(i)===Sd(t.valueDeclaration.name)&&(i=t.valueDeclaration.name);const e=Us(t),r=VA(e,n),o=r?Us(r):void 0;o?j(va.Property_0_does_not_exist_on_type_1_Did_you_mean_2,e,Ws(n),o):j(va.Property_0_does_not_exist_on_type_1,e,Ws(n))}else{const r=(null==(o=e.symbol)?void 0:o.declarations)&&Se(e.symbol.declarations);let a;if(t.valueDeclaration&&mc(t.valueDeclaration,(e=>e===r))&&Sd(r)===Sd(i)){const e=t.valueDeclaration;xn.assertNode(e,Cu);const r=e.name;i=r,qD(r)&&(a=UA(r,n))}void 0!==a?R(va.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,Us(t),Ws(n),a):R(va.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Us(t),Ws(n))}}return!0}if(s&&!q($l(t),W(s,t.escapedName),3,r))return r&&I(va.Types_of_property_0_are_incompatible,Us(t)),!0}return!1}(c,l,o))return o&&J(a,c,t.aliasSymbol?t:l),0;const u=(n!==lo||iT(c))&&!(2&s)&&405405692&c.flags&&c!==Kn&&2621440&l.flags&&xk(l)&&(Rd(c).length>0||WR(c)),_=!!(2048&wx(c));if(u&&!function(e,t,n){for(const r of Rd(e))if(oA(t,r.escapedName,n))return!0;return!1}(c,l,_)){if(o){const n=Ws(e.aliasSymbol?e:c),r=Ws(t.aliasSymbol?t:l),i=Vp(c,0),o=Vp(c,1);i.length>0&&q(Gf(i[0]),l,1,!1)||o.length>0&&q(Gf(o[0]),l,1,!1)?j(va.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,n,r):j(va.Type_0_has_no_properties_in_common_with_type_1,n,r)}return 0}K(c,l);const d=1048576&c.flags&&c.types.length<4&&!(1048576&l.flags)||1048576&l.flags&&l.types.length<4&&!(469499904&c.flags)?G(c,l,o,s):te(c,l,o,s,r);if(d)return d}return o&&V(e,t,c,l,a),0}function V(e,t,n,r,o){var a,s;const c=!!Xk(e),u=!!Xk(t);n=e.aliasSymbol||c?e:n,r=t.aliasSymbol||u?t:r;let _=C>0;if(_&&C--,524288&n.flags&&524288&r.flags){const e=l;z(n,r,!0),l!==e&&(_=!!l)}if(524288&n.flags&&402784252&r.flags)!function(e,t){const n=Xs(e.symbol)?Ws(e,e.symbol.valueDeclaration):Ws(e),r=Xs(t.symbol)?Ws(t,t.symbol.valueDeclaration):Ws(t);(Yn===e&&Jt===t||Zn===e&&zt===t||er===e&&Xt===t||uy()===e&&Qt===t)&&j(va._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,r,n)}(n,r);else if(n.symbol&&524288&n.flags&&Kn===n)j(va.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(2048&wx(n)&&2097152&r.flags){const e=r.types,t=UF(hB.IntrinsicAttributes,i),n=UF(hB.IntrinsicClassAttributes,i);if(!Nc(t)&&!Nc(n)&&(D(e,t)||D(e,n)))return}else l=Mp(l,t);if(!o&&_){const e=F();let t;return J(o,n,r),l&&l!==e.errorInfo&&(t={code:l.code,messageText:l.messageText}),N(e),t&&l&&(l.canonicalHead=t),void(h=[n,r])}if(J(o,n,r),262144&n.flags&&(null==(s=null==(a=n.symbol)?void 0:a.declarations)?void 0:s[0])&&!Bd(n)){const e=Vx(n);if(e.constraint=eS(r,Mx(n,e)),Xd(e)){const e=Ws(r,n.symbol.declarations[0]);B(Rp(n.symbol.declarations[0],va.This_type_parameter_might_need_an_extends_0_constraint,e))}}}function K(e,t){if(or&&3145728&e.flags&&3145728&t.flags){const n=e,r=t;if(n.objectFlags&r.objectFlags&32768)return;const o=n.types.length,a=r.types.length;o*a>1e6&&or.instant(or.Phase.CheckTypes,"traceUnionsOrIntersectionsTooLarge_DepthLimit",{sourceId:e.id,sourceSize:o,targetId:t.id,targetSize:a,pos:null==i?void 0:i.pos,end:null==i?void 0:i.end})}}function W(e,t){return ev(Oe(e,((e,n)=>{var r;const i=3145728&(n=mp(n)).flags?xp(n,t):Ld(n,t);return ue(e,i&&$l(i)||(null==(r=gf(n,t))?void 0:r.type)||It)}),void 0)||u)}function H(e,t){return e.valueDeclaration&&t.valueDeclaration&&e.valueDeclaration.parent===t.valueDeclaration}function G(e,t,r,i){if(1048576&e.flags){if(1048576&t.flags){const n=e.origin;if(n&&2097152&n.flags&&t.aliasSymbol&&D(n.types,t))return-1;const r=t.origin;if(r&&1048576&r.flags&&e.aliasSymbol&&D(r.types,e))return-1}return n===lo?ee(e,t,r&&!(402784252&e.flags),i):function(e,t,n,r){let i=-1;const o=e.types,a=function(e,t){return 1048576&e.flags&&1048576&t.flags&&!(32768&e.types[0].flags)&&32768&t.types[0].flags?PD(t,-32769):t}(e,t);for(let e=0;e=a.types.length&&o.length%a.types.length==0){const t=q(s,a.types[e%a.types.length],3,!1,void 0,r);if(t){i&=t;continue}}const c=q(s,t,1,n,void 0,r);if(!c)return 0;i&=c}return i}(e,t,r&&!(402784252&e.flags),i)}if(1048576&t.flags)return Z(AC(e),t,r&&!(402784252&e.flags)&&!(402784252&t.flags),i);if(2097152&t.flags)return function(e,t,n,r){let i=-1;const o=t.types;for(const t of o){const r=q(e,t,2,n,void 0,2);if(!r)return 0;i&=r}return i}(e,t,r);if(n===lo&&402784252&t.flags){const n=L(e.types,(e=>465829888&e.flags?Wd(e)||At:e));if(n!==e.types){if(131072&(e=cv(n)).flags)return 0;if(!(2097152&e.flags))return q(e,t,1,!1)||q(t,e,1,!1)}}return ee(e,t,!1,1)}function X(e,t){let n=-1;const r=e.types;for(const e of r){const r=Z(e,t,!1,0);if(!r)return 0;n&=r}return n}function Z(e,t,r,i){const o=t.types;if(1048576&t.flags){if(Ky(o,e))return-1;if(n!==lo&&32768&wx(t)&&!(1024&e.flags)&&(2688&e.flags||(n===ao||n===so)&&256&e.flags)){const t=e===e.regularType?e.freshType:e.regularType,n=128&e.flags?Jt:256&e.flags?zt:2048&e.flags?$t:void 0;return n&&Ky(o,n)||t&&Ky(o,t)?-1:0}const r=Uw(t,e);if(r){const t=q(e,r,2,!1,void 0,i);if(t)return t}}for(const t of o){const n=q(e,t,2,!1,void 0,i);if(n)return n}if(r){const n=vk(e,t,q);n&&q(e,n,2,!0,void 0,i)}return 0}function ee(e,t,n,r){const i=e.types;if(1048576&e.flags&&Ky(i,t))return-1;const o=i.length;for(let e=0;e(w|=e?16:8,T(e))),3===S?(null==(a=or)||a.instant(or.Phase.CheckTypes,"recursiveTypeRelatedTo_DepthLimit",{sourceId:e.id,sourceIdStack:m.map((e=>e.id)),targetId:t.id,targetIdStack:g.map((e=>e.id)),depth:b,targetDepth:x}),C=3):(null==(s=or)||s.push(or.Phase.CheckTypes,"structuredTypeRelatedTo",{sourceId:e.id,targetId:t.id}),C=function(e,t,r,i){const o=F();let a=function(e,t,r,i,o){let a,s,c=!1,_=e.flags;const d=t.flags;if(n===uo){if(3145728&_){let n=X(e,t);return n&&(n&=X(t,e)),n}if(4194304&_)return q(e.type,t.type,3,!1);if(8388608&_&&(a=q(e.objectType,t.objectType,3,!1))&&(a&=q(e.indexType,t.indexType,3,!1)))return a;if(16777216&_&&e.root.isDistributive===t.root.isDistributive&&(a=q(e.checkType,t.checkType,3,!1))&&(a&=q(e.extendsType,t.extendsType,3,!1))&&(a&=q(Vb(e),Vb(t),3,!1))&&(a&=q(Ub(e),Ub(t),3,!1)))return a;if(33554432&_&&(a=q(e.baseType,t.baseType,3,!1))&&(a&=q(e.constraint,t.constraint,3,!1)))return a;if(!(524288&_))return 0}else if(3145728&_||3145728&d){if(a=G(e,t,r,i))return a;if(!(465829888&_||524288&_&&1048576&d||2097152&_&&467402752&d))return 0}if(17301504&_&&e.aliasSymbol&&e.aliasTypeArguments&&e.aliasSymbol===t.aliasSymbol&&!wk(e)&&!wk(t)){const n=kk(e.aliasSymbol);if(n===u)return 1;const r=Uo(e.aliasSymbol).typeParameters,o=kf(r),a=y(Tf(e.aliasTypeArguments,r,o,Mm(e.aliasSymbol.valueDeclaration)),Tf(t.aliasTypeArguments,r,o,Mm(e.aliasSymbol.valueDeclaration)),n,i);if(void 0!==a)return a}if(AT(e)&&!e.target.readonly&&(a=q(Ig(e)[0],t,1))||AT(t)&&(t.target.readonly||Kk(Wd(e)||e))&&(a=q(e,Ig(t)[0],2)))return a;if(262144&d){if(32&wx(e)&&!e.declaration.nameType&&q(Av(t),md(e),3)&&!(4&Dd(e))){const n=yd(e),i=Mb(t,fd(e));if(a=q(n,i,3,r))return a}if(n===lo&&262144&_){let n=Jd(e);if(n)for(;n&&bD(n,(e=>!!(262144&e.flags)));){if(a=q(n,t,1,!1))return a;n=Jd(n)}return 0}}else if(4194304&d){const n=t.type;if(4194304&_&&(a=q(n,e.type,3,!1)))return a;if(PT(n)){if(a=q(e,jy(n),2,r))return a}else{const i=$d(n);if(i){if(-1===q(e,Av(i,4|t.indexFlags),2,r))return-1}else if(Ad(n)){const t=hd(n),i=md(n);let o;if(o=t&&bd(n)?ev([ne(t,n),t]):t||i,-1===q(e,o,2,r))return-1}}}else if(8388608&d){if(8388608&_){if((a=q(e.objectType,t.objectType,3,r))&&(a&=q(e.indexType,t.indexType,3,r)),a)return a;r&&(s=l)}if(n===co||n===lo){const n=t.objectType,c=t.indexType,u=Wd(n)||n,_=Wd(c)||c;if(!pb(u)&&!gb(_)){const t=jb(u,_,4|(u!==n?2:0));if(t){if(r&&s&&N(o),a=q(e,t,2,r,void 0,i))return a;r&&s&&l&&(l=h([s])<=h([l])?s:l)}}}r&&(s=void 0)}else if(Ad(t)&&n!==uo){const n=!!t.declaration.nameType,i=yd(t),c=Dd(t);if(!(8&c)){if(!n&&8388608&i.flags&&i.objectType===e&&i.indexType===fd(t))return-1;if(!Ad(e)){const i=n?hd(t):md(t),u=Av(e,2),_=4&c,d=_?K_(i,u):void 0;if(_?!(131072&d.flags):q(i,u,3)){const o=yd(t),s=fd(t),c=PD(o,-98305);if(!n&&8388608&c.flags&&c.indexType===s){if(a=q(e,c.objectType,2,r))return a}else{const t=Mb(e,n?d||i:d?cv([d,s]):s);if(a=q(t,o,3,r))return a}}s=l,N(o)}}}else if(16777216&d){if(Mk(t,g,x,10))return 3;const n=t;if(!(n.root.inferTypeParameters||(p=n.root,p.isDistributive&&(Wx(p.checkType,p.node.trueType)||Wx(p.checkType,p.node.falseType)))||16777216&e.flags&&e.root===n.root)){const t=!SS(rS(n.checkType),rS(n.extendsType)),r=!t&&SS(iS(n.checkType),iS(n.extendsType));if((a=t?-1:q(e,Vb(n),2,!1,void 0,i))&&(a&=r?-1:q(e,Ub(n),2,!1,void 0,i),a))return a}}else if(134217728&d){if(134217728&_){if(n===lo)return function(e,t){const n=e.texts[0],r=t.texts[0],i=e.texts[e.texts.length-1],o=t.texts[t.texts.length-1],a=Math.min(n.length,r.length),s=Math.min(i.length,o.length);return n.slice(0,a)!==r.slice(0,a)||i.slice(i.length-s)!==o.slice(o.length-s)}(e,t)?0:-1;eS(e,Tn)}if(vw(e,t))return-1}else if(268435456&t.flags&&!(268435456&e.flags)&&pw(e,t))return-1;var p,f;if(8650752&_){if(!(8388608&_&&8388608&d)){const n=Bd(e)||At;if(a=q(n,t,1,!1,void 0,i))return a;if(a=q(y_(n,e),t,1,r&&n!==At&&!(d&_&262144),void 0,i))return a;if(up(e)){const n=Bd(e.indexType);if(n&&(a=q(Mb(e.objectType,n),t,1,r)))return a}}}else if(4194304&_){const n=Fv(e.type,e.indexFlags)&&32&wx(e.type);if(a=q(pn,t,1,r&&!n))return a;if(n){const n=e.type,i=hd(n),o=i&&bd(n)?ne(i,n):i||md(n);if(a=q(o,t,1,r))return a}}else if(134217728&_&&!(524288&d)){if(!(134217728&d)){const n=Wd(e);if(n&&n!==e&&(a=q(n,t,1,r)))return a}}else if(268435456&_)if(268435456&d){if(e.symbol!==t.symbol)return 0;if(a=q(e.type,t.type,3,r))return a}else{const n=Wd(e);if(n&&(a=q(n,t,1,r)))return a}else if(16777216&_){if(Mk(e,m,b,10))return 3;if(16777216&d){const n=e.root.inferTypeParameters;let i,o=e.extendsType;if(n){const e=UC(n,void 0,0,$);xw(e.inferences,t.extendsType,o,1536),o=eS(o,e.mapper),i=e.mapper}if(gS(o,t.extendsType)&&(q(e.checkType,t.checkType,3)||q(t.checkType,e.checkType,3))&&((a=q(eS(Vb(e),i),Vb(t),3,r))&&(a&=q(Ub(e),Ub(t),3,r)),a))return a}const n=qd(e);if(n&&(a=q(n,t,1,r)))return a;const i=16777216&d||!Xd(e)?void 0:Vd(e);if(i&&(N(o),a=q(i,t,1,r)))return a}else{if(n!==ao&&n!==so&&32&wx(f=t)&&4&Dd(f)&&ik(e))return-1;if(Ad(t))return Ad(e)&&(a=function(e,t,r){if(n===lo||(n===uo?Dd(e)===Dd(t):Pd(e)<=Pd(t))){let n;if(n=q(md(t),eS(md(e),Pd(e)<0?Cn:Tn),3,r)){const i=Fx([fd(e)],[fd(t)]);if(eS(hd(e),i)===eS(hd(t),i))return n&q(eS(yd(e),i),yd(t),3,r)}}return 0}(e,t,r))?a:0;const p=!!(402784252&_);if(n!==uo)_=(e=mp(e)).flags;else if(Ad(e))return 0;if(4&wx(e)&&4&wx(t)&&e.target===t.target&&!PT(e)&&!wk(e)&&!wk(t)){if(Yk(e))return-1;const n=Sk(e.target);if(n===u)return 1;const r=y(Ig(e),Ig(t),n,i);if(void 0!==r)return r}else{if(Vk(t)?xD(e,Uk):qk(t)&&xD(e,(e=>PT(e)&&!e.target.readonly)))return n!==uo?q(pf(e,zt)||St,pf(t,zt)||St,3,r):0;if(NT(e)&&PT(t)&&!NT(t)){const n=Hd(e);if(n!==e)return q(n,t,1,r)}else if((n===ao||n===so)&&ik(t)&&8192&wx(t)&&!ik(e))return 0}if(2621440&_&&524288&d){const n=r&&l===o.errorInfo&&!p;if(a=ae(e,t,n,void 0,!1,i),a&&(a&=se(e,t,0,n,i),a&&(a&=se(e,t,1,n,i),a&&(a&=pe(e,t,p,n,i)))),c&&a)l=s||l||o.errorInfo;else if(a)return a}if(2621440&_&&1048576&d){const r=PD(t,36175872);if(1048576&r.flags){const t=function(e,t){var r;const i=$w(Rd(e),t);if(!i)return 0;let o=1;for(const n of i)if(o*=CD(ql(n)),o>25)return null==(r=or)||r.instant(or.Phase.CheckTypes,"typeRelatedToDiscriminatedType_DepthLimit",{sourceId:e.id,targetId:t.id,numCombinations:o}),0;const a=new Array(i.length),s=new Set;for(let e=0;er[o]),!1,0,U||n===lo))continue e}fe(l,a,wt),o=!0}if(!o)return 0}let u=-1;for(const t of l)if(u&=ae(e,t,!1,s,!1,0),u&&(u&=se(e,t,0,!1,0),u&&(u&=se(e,t,1,!1,0),!u||PT(e)&&PT(t)||(u&=pe(e,t,!1,!1,0)))),!u)return u;return u}(e,r);if(t)return t}}}return 0;function h(e){return e?Oe(e,((e,t)=>e+1+h(t.next)),0):0}function y(e,t,i,_){if(a=function(e=u,t=u,r=u,i,o){if(e.length!==t.length&&n===uo)return 0;const a=e.length<=t.length?e.length:t.length;let s=-1;for(let c=0;c!!(24&e))))return s=void 0,void N(o);const d=t&&function(e,t){for(let n=0;n0==(7&e)))))return 0;s=l,N(o)}}}(e,t,r,i,o);if(n!==uo){if(!a&&(2097152&e.flags||262144&e.flags&&1048576&t.flags)){const n=function(e,t){let n,r=!1;for(const i of e)if(465829888&i.flags){let e=Bd(i);for(;e&&21233664&e.flags;)e=Bd(e);e&&(n=ue(n,e),t&&(n=ue(n,i)))}else(469892092&i.flags||ok(i))&&(r=!0);if(n&&(t||r)){if(r)for(const t of e)(469892092&t.flags||ok(t))&&(n=ue(n,t));return dk(cv(n,2),!1)}}(2097152&e.flags?e.types:[e],!!(1048576&t.flags));n&&xD(n,(t=>t!==e))&&(a=q(n,t,1,!1,void 0,i))}a&&!(2&i)&&2097152&t.flags&&!pb(t)&&2621440&e.flags?(a&=ae(e,t,r,void 0,!1,0),a&&Tw(e)&&8192&wx(e)&&(a&=pe(e,t,!1,r,0))):a&&Zb(t)&&!Uk(t)&&2097152&e.flags&&3670016&mp(e).flags&&!Q(e.types,(e=>e===t||!!(262144&wx(e))))&&(a&=ae(e,t,r,void 0,!0,i))}return a&&N(o),a}(e,t,r,i),null==(c=or)||c.pop()),Gt&&(Gt=T),1&o&&b--,2&o&&x--,S=y,C?(-1===C||0===b&&0===x)&&D(-1===C||3===C):(n.set(_,2|(r?4:0)|w),E--,D(!1)),C;function D(e){for(let t=h;t{r.push(eS(e,qx(t.mapper,fd(t),n)))})),ev(r)}function re(e,t){if(!t||0===e.length)return e;let n;for(let r=0;r{return!!(4&fx(t))&&(n=e,r=Ak(t),!Fk(n,(e=>{const t=Ak(e);return!!t&&Gl(t,r)})));var n,r}))}(r,i))return a&&j(va.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,Us(i),Ws(Ak(r)||e),Ws(Ak(i)||t)),0}else if(4&l)return a&&j(va.Property_0_is_protected_in_type_1_but_public_in_type_2,Us(i),Ws(e),Ws(t)),0;if(n===so&&oM(r)&&!oM(i))return 0;const _=function(e,t,n,r,i){const o=U&&!!(48&px(t)),a=Hc(ql(t),!1,o);return q(n(e),a,3,r,void 0,i)}(r,i,o,a,s);return _?!c&&16777216&r.flags&&106500&i.flags&&!(16777216&i.flags)?(a&&j(va.Property_0_is_optional_in_type_1_but_required_in_type_2,Us(i),Ws(e),Ws(t)),0):_:(a&&I(va.Types_of_property_0_are_incompatible,Us(i)),0)}function ae(e,t,r,i,a,s){if(n===uo)return function(e,t,n){if(!(524288&e.flags&&524288&t.flags))return 0;const r=re(Md(e),n),i=re(Md(t),n);if(r.length!==i.length)return 0;let o=-1;for(const e of r){const n=Ld(t,e.escapedName);if(!n)return 0;const r=Bk(e,n,q);if(!r)return 0;o&=r}return o}(e,t,i);let c=-1;if(PT(t)){if(Uk(e)){if(!t.target.readonly&&(Vk(e)||PT(e)&&e.target.readonly))return 0;const n=Og(e),o=Og(t),a=PT(e)?4&e.target.combinedFlags:4,l=4&t.target.combinedFlags,u=PT(e)?e.target.minLength:0,_=t.target.minLength;if(!a&&n<_)return r&&j(va.Source_has_0_element_s_but_target_requires_1,n,_),0;if(!l&&o!(11&e)));return n>=0?n:e.elementFlags.length}(t.target),m=Ry(t.target,11),g=t.target.hasRestElement;let h=!!i;for(let a=0;a=f?o-1-Math.min(u,m):a,y=t.target.elementFlags[_];if(8&y&&!(8&l))return r&&j(va.Source_provides_no_match_for_variadic_element_at_position_0_in_target,_),0;if(8&l&&!(12&y))return r&&j(va.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target,a,_),0;if(1&y&&!(1&l))return r&&j(va.Source_provides_no_match_for_required_element_at_position_0_in_target,_),0;if(h&&((12&l||12&y)&&(h=!1),h&&(null==i?void 0:i.has(""+a))))continue;const v=bC(d[a],!!(l&y&2)),b=p[_],x=q(v,8&l&&4&y?Ty(b):bC(b,!!(2&y)),3,r,void 0,s);if(!x)return r&&(o>1||n>1)&&(g&&a>=f&&u>=m&&f!==n-m-1?I(va.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,f,n-m-1,_):I(va.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,a,_)),0;c&=x}return c}if(12&t.target.combinedFlags)return 0}const u=!(n!==ao&&n!==so||Tw(e)||Yk(e)||PT(e)),_=cw(e,t,u,!1);if(_)return r&&function(e,t){const n=qp(e,0),r=qp(e,1),i=Md(e);return!((n.length||r.length)&&!i.length)||!!(Vp(t,0).length&&n.length||Vp(t,1).length&&r.length)}(e,t)&&function(e,t,n,r){let i=!1;if(n.valueDeclaration&&Dc(n.valueDeclaration)&&VD(n.valueDeclaration.name)&&e.symbol&&32&e.symbol.flags){const r=n.valueDeclaration.name.escapedText,i=Qh(e.symbol,r);if(i&&Jp(e,i)){const n=YC.getDeclarationName(e.symbol.valueDeclaration),i=YC.getDeclarationName(t.symbol.valueDeclaration);return void j(va.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2,ea(r),ea(""===n.escapedText?bB:n),ea(""===i.escapedText?bB:i))}}const a=$e(sw(e,t,r,!1));if((!o||o.code!==va.Class_0_incorrectly_implements_interface_1.code&&o.code!==va.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code)&&(i=!0),1===a.length){const r=Us(n,void 0,0,20);j(va.Property_0_is_missing_in_type_1_but_required_in_type_2,r,...Hs(e,t)),p(n.declarations)&&B(Rp(n.declarations[0],va._0_is_declared_here,r)),i&&l&&C++}else z(e,t,!1)&&(a.length>5?j(va.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,Ws(e),Ws(t),O(a.slice(0,4),(e=>Us(e))).join(", "),a.length-4):j(va.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,Ws(e),Ws(t),O(a,(e=>Us(e))).join(", ")),i&&l&&C++)}(e,t,_,u),0;if(Tw(t))for(const n of re(Rd(e),i))if(!(Ld(t,n.escapedName)||32768&$l(n).flags))return r&&j(va.Property_0_does_not_exist_on_type_1,Us(n),Ws(t)),0;const d=Rd(t),f=PT(e)&&PT(t);for(const o of re(d,i)){const i=o.escapedName;if(!(4194304&o.flags)&&(!f||WT(i)||"length"===i)&&(!a||16777216&o.flags)){const a=Jp(e,i);if(a&&a!==o){const i=oe(e,t,a,o,ql,r,s,n===lo);if(!i)return 0;c&=i}}}return c}function se(e,t,r,i,o){var a,s;if(n===uo)return function(e,t,n){const r=Vp(e,n),i=Vp(t,n);if(r.length!==i.length)return 0;let o=-1;for(let e=0;eKs(e,void 0,262144,r);return j(va.Type_0_is_not_assignable_to_type_1,e(t),e(c)),j(va.Types_of_construct_signatures_are_incompatible),d}}else e:for(const t of _){const n=F();let a=i;for(const e of u){const r=_e(e,t,!0,a,o,p(e,t));if(r){d&=r,N(n);continue e}a=!1}return a&&j(va.Type_0_provides_no_match_for_the_signature_1,Ws(e),Ks(t,void 0,void 0,r)),0}return d}function ce(e,t){return 0===e.parameters.length&&0===t.parameters.length?(e,t)=>I(va.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Ws(e),Ws(t)):(e,t)=>I(va.Call_signature_return_types_0_and_1_are_incompatible,Ws(e),Ws(t))}function le(e,t){return 0===e.parameters.length&&0===t.parameters.length?(e,t)=>I(va.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,Ws(e),Ws(t)):(e,t)=>I(va.Construct_signature_return_types_0_and_1_are_incompatible,Ws(e),Ws(t))}function _e(e,t,r,i,o,a){const s=n===ao?16:n===so?24:0;return YS(r?Sm(e):e,r?Sm(t):t,s,i,j,a,(function(e,t,n){return q(e,t,3,n,void 0,o)}),Tn)}function de(e,t,n,r){const i=q(e.type,t.type,3,n,void 0,r);return!i&&n&&(e.keyType===t.keyType?j(va._0_index_signatures_are_incompatible,Ws(e.keyType)):j(va._0_and_1_index_signatures_are_incompatible,Ws(e.keyType),Ws(t.keyType))),i}function pe(e,t,r,i,o){if(n===uo)return function(e,t){const n=cf(e),r=cf(t);if(n.length!==r.length)return 0;for(const t of r){const n=_f(e,t.keyType);if(!n||!q(n.type,t.type,3)||n.isReadonly!==t.isReadonly)return 0}return-1}(e,t);const a=cf(t),s=Q(a,(e=>e.keyType===Jt));let c=-1;for(const t of a){const a=n!==so&&!r&&s&&1&t.type.flags?-1:Ad(e)&&s?q(yd(e),t.type,3,i):me(e,t,i,o);if(!a)return 0;c&=a}return c}function me(e,t,r,i){const o=mf(e,t.keyType);return o?de(o,t,r,i):1&i||!(n!==so||8192&wx(e))||!NC(e)?(r&&j(va.Index_signature_for_type_0_is_missing_in_type_1,Ws(t.keyType),Ws(e)),0):function(e,t,n,r){let i=-1;const o=t.keyType,a=2097152&e.flags?jd(e):Md(e);for(const s of a)if(!_k(e,s)&&af(Ev(s,8576),o)){const e=ql(s),a=q(ie||32768&e.flags||o===zt||!(16777216&s.flags)?e:Zw(e,524288),t.type,3,n,void 0,r);if(!a)return n&&j(va.Property_0_is_incompatible_with_index_signature,Us(s)),0;i&=a}for(const a of cf(e))if(af(a.keyType,o)){const e=de(a,t,n,r);if(!e)return 0;i&=e}return i}(e,t,r,i)}}function gk(e){if(16&e.flags)return!1;if(3145728&e.flags)return!!f(e.types,gk);if(465829888&e.flags){const t=Bd(e);if(t&&t!==e)return gk(t)}return iT(e)||!!(134217728&e.flags)||!!(268435456&e.flags)}function hk(e,t){return PT(e)&&PT(t)?u:Rd(t).filter((t=>yk(Tc(e,t.escapedName),$l(t))))}function yk(e,t){return!!e&&!!t&&_M(e,32768)&&!!DC(t)}function vk(e,t,n=yS){return yJ(e,t,n)||function(e,t){const n=wx(e);if(20&n&&1048576&t.flags)return S(t.types,(t=>{if(524288&t.flags){const r=n&wx(t);if(4&r)return e.target===t.target;if(16&r)return!!e.aliasSymbol&&e.aliasSymbol===t.aliasSymbol}return!1}))}(e,t)||function(e,t){if(128&wx(e)&&bD(t,Hk))return S(t.types,(e=>!Hk(e)))}(e,t)||function(e,t){let n=0;if(Vp(e,n).length>0||(n=1,Vp(e,n).length>0))return S(t.types,(e=>Vp(e,n).length>0))}(e,t)||function(e,t){let n;if(!(406978556&e.flags)){let r=0;for(const i of t.types)if(!(406978556&i.flags)){const t=cv([Av(e),Av(i)]);if(4194304&t.flags)return i;if(iT(t)||1048576&t.flags){const e=1048576&t.flags?N(t.types,iT):1;e>=r&&(n=i,r=e)}}}return n}(e,t)}function bk(e,t,n){const r=e.types,i=r.map((e=>402784252&e.flags?0:-1));for(const[e,o]of t){let t=!1;for(let a=0;ai[t])),0):e;return 131072&o.flags?e:o}function xk(e){if(524288&e.flags){const t=Od(e);return 0===t.callSignatures.length&&0===t.constructSignatures.length&&0===t.indexInfos.length&&t.properties.length>0&&x(t.properties,(e=>!!(16777216&e.flags)))}return 33554432&e.flags?xk(e.baseType):!!(2097152&e.flags)&&x(e.types,xk)}function Sk(e){return e===Xn||e===Qn||8&e.objectFlags?P:Tk(e.symbol,e.typeParameters)}function kk(e){return Tk(e,Uo(e).typeParameters)}function Tk(e,t=u){var n,r;const i=Uo(e);if(!i.variances){null==(n=or)||n.push(or.Phase.CheckTypes,"getVariancesWorker",{arity:t.length,id:qy(ju(e))});const o=Mi,a=Oi;Mi||(Mi=!0,Oi=Fi.length),i.variances=u;const s=[];for(const n of t){const t=Dk(n);let r=16384&t?8192&t?0:1:8192&t?2:void 0;if(void 0===r){let t=!1,i=!1;const o=Gt;Gt=e=>e?i=!0:t=!0;const a=Ck(e,n,jn),s=Ck(e,n,Rn);r=(SS(s,a)?1:0)|(SS(a,s)?2:0),3===r&&SS(Ck(e,n,Bn),a)&&(r=4),Gt=o,(t||i)&&(t&&(r|=8),i&&(r|=16))}s.push(r)}o||(Mi=!1,Oi=a),i.variances=s,null==(r=or)||r.pop({variances:s.map(xn.formatVariance)})}return i.variances}function Ck(e,t,n){const r=Mx(t,n),i=ju(e);if(Nc(i))return i;const o=524288&e.flags?Bg(e,Dx(Uo(e).typeParameters,r)):Tg(i,Dx(i.typeParameters,r));return gt.add(qy(o)),o}function wk(e){return gt.has(qy(e))}function Dk(e){var t;return 28672&Oe(null==(t=e.symbol)?void 0:t.declarations,((e,t)=>e|Qv(t)),0)}function Ek(e){return 262144&e.flags&&!Jd(e)}function Pk(e){return function(e){return!!(4&wx(e))&&!e.node}(e)&&Q(Ig(e),(e=>!!(262144&e.flags)||Pk(e)))}function Nk(e,t,n,r,i){if(r===uo&&e.id>t.id){const n=e;e=t,t=n}const o=n?":"+n:"";return Pk(e)&&Pk(t)?function(e,t,n,r){const i=[];let o="";const a=c(e,0),s=c(t,0);return`${o}${a},${s}${n}`;function c(e,t=0){let n=""+e.target.id;for(const a of Ig(e)){if(262144&a.flags){if(r||Ek(a)){let e=i.indexOf(a);e<0&&(e=i.length,i.push(a)),n+="="+e;continue}o="*"}else if(t<4&&Pk(a)){n+="<"+c(a,t+1)+">";continue}n+="-"+a.id}return n}}(e,t,o,i):`${e.id},${t.id}${o}`}function Fk(e,t){if(!(6&px(e)))return t(e);for(const n of e.links.containingType.types){const r=Jp(n,e.escapedName),i=r&&Fk(r,t);if(i)return i}}function Ak(e){return e.parent&&32&e.parent.flags?ju(is(e)):void 0}function Ik(e){const t=Ak(e),n=t&&ku(t)[0];return n&&Tc(n,e.escapedName)}function Ok(e,t,n){return Fk(t,(t=>!!(4&fx(t,n))&&!Gl(e,Ak(t))))?void 0:e}function Mk(e,t,n,r=3){if(n>=r){if(96==(96&wx(e))&&(e=Lk(e)),2097152&e.flags)return Q(e.types,(e=>Mk(e,t,n,r)));const i=Rk(e);let o=0,a=0;for(let e=0;e=a&&(o++,o>=r))return!0;a=n.id}}}return!1}function Lk(e){let t;for(;96==(96&wx(e))&&(t=wd(e))&&(t.symbol||2097152&t.flags&&Q(t.types,(e=>!!e.symbol)));)e=t;return e}function jk(e,t){return 96==(96&wx(e))&&(e=Lk(e)),2097152&e.flags?Q(e.types,(e=>jk(e,t))):Rk(e)===t}function Rk(e){if(524288&e.flags&&!Cw(e)){if(4&wx(e)&&e.node)return e.node;if(e.symbol&&!(16&wx(e)&&32&e.symbol.flags))return e.symbol;if(PT(e))return e.target}if(262144&e.flags)return e.symbol;if(8388608&e.flags){do{e=e.objectType}while(8388608&e.flags);return e}return 16777216&e.flags?e.root:e}function Bk(e,t,n){if(e===t)return-1;const r=6&fx(e);if(r!==(6&fx(t)))return 0;if(r){if(Zj(e)!==Zj(t))return 0}else if((16777216&e.flags)!=(16777216&t.flags))return 0;return oM(e)!==oM(t)?0:n($l(e),$l(t))}function Jk(e,t,n,r,i,o){if(e===t)return-1;if(!function(e,t,n){const r=FO(e),i=FO(t),o=AO(e),a=AO(t),s=IO(e),c=IO(t);return r===i&&o===a&&s===c||!!(n&&o<=a)}(e,t,n))return 0;if(p(e.typeParameters)!==p(t.typeParameters))return 0;if(t.typeParameters){const n=Fx(e.typeParameters,t.typeParameters);for(let r=0;re|(1048576&t.flags?zk(t.types):t.flags)),0)}function $k(e){if(1===e.length)return e[0];const t=U?L(e,(e=>SD(e,(e=>!(98304&e.flags))))):e,n=function(e){let t;for(const n of e)if(!(131072&n.flags)){const e=cT(n);if(t??(t=e),e===n||e!==t)return!1}return!0}(t)?ev(t):Oe(t,((e,t)=>bS(e,t)?t:e));return t===e?n:KT(n,98304&zk(e))}function qk(e){return!!(4&wx(e))&&(e.target===Xn||e.target===Qn)}function Vk(e){return!!(4&wx(e))&&e.target===Qn}function Uk(e){return qk(e)||PT(e)}function Kk(e){return qk(e)&&!Vk(e)||PT(e)&&!e.target.readonly}function Wk(e){return qk(e)?Ig(e)[0]:void 0}function Hk(e){return qk(e)||!(98304&e.flags)&&SS(e,ar)}function Gk(e){return Kk(e)||!(98305&e.flags)&&SS(e,rr)}function Xk(e){if(!(4&wx(e)&&3&wx(e.target)))return;if(33554432&wx(e))return 67108864&wx(e)?e.cachedEquivalentBaseType:void 0;e.objectFlags|=33554432;const t=e.target;if(1&wx(t)){const e=du(t);if(e&&80!==e.expression.kind&&211!==e.expression.kind)return}const n=ku(t);if(1!==n.length)return;if(m_(e.symbol).size)return;let r=p(t.typeParameters)?eS(n[0],Fx(t.typeParameters,Ig(e).slice(0,t.typeParameters.length))):n[0];return p(Ig(e))>p(t.typeParameters)&&(r=y_(r,De(Ig(e)))),e.objectFlags|=67108864,e.cachedEquivalentBaseType=r}function Qk(e){return U?e===nn:e===Ot}function Yk(e){const t=Wk(e);return!!t&&Qk(t)}function Zk(e){let t;return PT(e)||!!Jp(e,"0")||Hk(e)&&!!(t=Tc(e,"length"))&&xD(t,(e=>!!(256&e.flags)))}function tT(e){return Hk(e)||Zk(e)}function nT(e,t){return Tc(e,""+t)||(xD(e,PT)?LT(e,t,A.noUncheckedIndexedAccess?It:void 0):void 0)}function rT(e){return!(240544&e.flags)}function iT(e){return!!(109472&e.flags)}function oT(e){const t=Hd(e);return 2097152&t.flags?Q(t.types,iT):iT(t)}function sT(e){return!!(16&e.flags)||(1048576&e.flags?!!(1024&e.flags)||x(e.types,iT):iT(e))}function cT(e){return 1056&e.flags?Au(e):402653312&e.flags?Jt:256&e.flags?zt:2048&e.flags?$t:512&e.flags?Xt:1048576&e.flags?function(e){const t=`B${qy(e)}`;return fo(t)??mo(t,DD(e,cT))}(e):e}function _T(e){return 402653312&e.flags?Jt:288&e.flags?zt:2048&e.flags?$t:512&e.flags?Xt:1048576&e.flags?DD(e,_T):e}function dT(e){return 1056&e.flags&&cx(e)?Au(e):128&e.flags&&cx(e)?Jt:256&e.flags&&cx(e)?zt:2048&e.flags&&cx(e)?$t:512&e.flags&&cx(e)?Xt:1048576&e.flags?DD(e,dT):e}function pT(e){return 8192&e.flags?Qt:1048576&e.flags?DD(e,pT):e}function bT(e,t){return FM(e,t)||(e=pT(dT(e))),sx(e)}function kT(e,t,n,r){return e&&iT(e)&&(e=bT(e,t?jj(n,t,r):void 0)),e}function PT(e){return!!(4&wx(e)&&8&e.target.objectFlags)}function NT(e){return PT(e)&&!!(8&e.target.combinedFlags)}function AT(e){return NT(e)&&1===e.target.elementFlags.length}function MT(e){return jT(e,e.target.fixedLength)}function LT(e,t,n){return DD(e,(e=>{const r=e,i=MT(r);return i?n&&t>=zy(r.target)?ev([i,n]):i:It}))}function jT(e,t,n=0,r=!1,i=!1){const o=Og(e)-n;if(tQw(e,4194304)))}function zT(e){return 4&e.flags?Ei:8&e.flags?Pi:64&e.flags?Ni:e===Vt||e===qt||114691&e.flags||128&e.flags&&""===e.value||256&e.flags&&0===e.value||2048&e.flags&&RT(e)?e:en}function KT(e,t){const n=t&~e.flags&98304;return 0===n?e:ev(32768===n?[e,It]:65536===n?[e,Rt]:[e,It,Rt])}function XT(e,t=!1){xn.assert(U);const n=t?Lt:It;return e===n||1048576&e.flags&&e.types[0]===n?e:ev([e,n])}function QT(e){return U?eD(e,2097152):e}function nC(e){return U?ev([e,jt]):e}function _C(e){return U?kD(e,jt):e}function pC(e,t,n){return n?Cl(t)?XT(e):nC(e):e}function vC(e,t){return Tl(t)?QT(e):Sl(t)?_C(e):e}function bC(e,t){return ie&&t?kD(e,Mt):e}function DC(e){return e===Mt||!!(1048576&e.flags)&&e.types[0]===Mt}function EC(e){return ie?kD(e,Mt):Zw(e,524288)}function NC(e){const t=wx(e);return 2097152&e.flags?x(e.types,NC):!(!e.symbol||0==(7040&e.symbol.flags)||32&e.symbol.flags||WR(e))||!!(4194304&t)||!!(1024&t&&NC(e.source))}function FC(e,t){const n=No(e.flags,e.escapedName,8&px(e));n.declarations=e.declarations,n.parent=e.parent,n.links.type=t,n.links.target=e,e.valueDeclaration&&(n.valueDeclaration=e.valueDeclaration);const r=Uo(e).nameType;return r&&(n.links.nameType=r),n}function AC(e){if(!(Tw(e)&&8192&wx(e)))return e;const t=e.regularType;if(t)return t;const n=e,r=function(e,t){const n=ed();for(const r of Md(e)){const e=$l(r),i=t(e);n.set(r.escapedName,i===e?r:FC(r,i))}return n}(e,AC),i=ks(n.symbol,r,n.callSignatures,n.constructSignatures,n.indexInfos);return i.flags=n.flags,i.objectFlags|=-8193&n.objectFlags,e.regularType=i,i}function IC(e,t,n){return{parent:e,propertyName:t,siblings:n,resolvedProperties:void 0}}function OC(e){if(!e.siblings){const t=[];for(const n of OC(e.parent))if(Tw(n)){const r=Ld(n,e.propertyName);r&&vD($l(r),(e=>{t.push(e)}))}e.siblings=t}return e.siblings}function MC(e){if(!e.resolvedProperties){const t=new Map;for(const n of OC(e))if(Tw(n)&&!(2097152&wx(n)))for(const e of Rd(n))t.set(e.escapedName,e);e.resolvedProperties=$e(t.values())}return e.resolvedProperties}function LC(e,t){if(!(4&e.flags))return e;const n=$l(e),r=BC(n,t&&IC(t,e.escapedName,void 0));return r===n?e:FC(e,r)}function jC(e){const t=mt.get(e.escapedName);if(t)return t;const n=FC(e,Lt);return n.flags|=16777216,mt.set(e.escapedName,n),n}function RC(e){return BC(e,void 0)}function BC(e,t){if(196608&wx(e)){if(void 0===t&&e.widened)return e.widened;let n;if(98305&e.flags)n=St;else if(Tw(e))n=function(e,t){const n=ed();for(const r of Md(e))n.set(r.escapedName,LC(r,t));if(t)for(const e of MC(t))n.has(e.escapedName)||n.set(e.escapedName,jC(e));const r=ks(e.symbol,n,u,u,L(cf(e),(e=>Vm(e.keyType,RC(e.type),e.isReadonly))));return r.objectFlags|=266240&wx(e),r}(e,t);else if(1048576&e.flags){const r=t||IC(void 0,void 0,e.types),i=L(e.types,(e=>98304&e.flags?e:BC(e,r)));n=ev(i,Q(i,ik)?2:1)}else 2097152&e.flags?n=cv(L(e.types,RC)):Uk(e)&&(n=Tg(e.target,L(Ig(e),RC)));return n&&void 0===t&&(e.widened=n),n||e}return e}function JC(e){let t=!1;if(65536&wx(e)){if(1048576&e.flags)if(Q(e.types,ik))t=!0;else for(const n of e.types)JC(n)&&(t=!0);if(Uk(e))for(const n of Ig(e))JC(n)&&(t=!0);if(Tw(e))for(const n of Md(e)){const e=$l(n);65536&wx(e)&&(JC(e)||xo(n.valueDeclaration,va.Object_literal_s_property_0_implicitly_has_an_1_type,Us(n),Ws(RC(e))),t=!0)}}return t}function zC(e,t,n){const r=Ws(RC(t));if(Mm(e)&&!uT(Sd(e),A))return;let i;switch(e.kind){case 226:case 172:case 171:i=Y?va.Member_0_implicitly_has_an_1_type:va.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 169:const t=e;if(qD(t.name)){const n=xc(t.name);if((hE(t.parent)||_E(t.parent)||SE(t.parent))&&t.parent.parameters.includes(t)&&(je(t,t.name.escapedText,788968,void 0,!0)||n&&Ix(n))){const n="arg"+t.parent.parameters.indexOf(t),r=Ap(t.name)+(t.dotDotDotToken?"[]":"");return void ko(Y,e,va.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,n,r)}}i=e.dotDotDotToken?Y?va.Rest_parameter_0_implicitly_has_an_any_type:va.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:Y?va.Parameter_0_implicitly_has_an_1_type:va.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 208:if(i=va.Binding_element_0_implicitly_has_an_1_type,!Y)return;break;case 317:return void xo(e,va.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,r);case 323:return void(Y&&hF(e.parent)&&xo(e.parent.tagName,va.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation,r));case 262:case 174:case 173:case 177:case 178:case 218:case 219:if(Y&&!e.name)return void xo(e,3===n?va.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:va.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,r);i=Y?3===n?va._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:va._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:va._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 200:return void(Y&&xo(e,va.Mapped_object_type_implicitly_has_an_any_template_type));default:i=Y?va.Variable_0_implicitly_has_an_1_type:va.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}ko(Y,e,i,Ap(Pc(e)),r)}function $C(e,t,n){a((()=>{!(Y&&65536&wx(t))||n&&TF(e)||JC(t)||zC(e,t,n)}))}function qC(e,t,n){const r=FO(e),i=FO(t),o=OO(e),a=OO(t),s=a?i-1:i,c=o?s:Math.min(r,s),l=Kf(e);if(l){const e=Kf(t);e&&n(l,e)}for(let r=0;re.typeParameter)),O(e.inferences,((t,n)=>()=>(t.isFixed||(function(e){if(e.intraExpressionInferenceSites){for(const{node:t,type:n}of e.intraExpressionInferenceSites){const r=174===t.kind?VN(t,2):dF(t,2);r&&xw(e.inferences,n,r)}e.intraExpressionInferenceSites=void 0}}(e),WC(e.inferences),t.isFixed=!0),ww(e,n)))))}(i),i.nonFixingMapper=function(e){return Rx(O(e.inferences,(e=>e.typeParameter)),O(e.inferences,((t,n)=>()=>ww(e,n))))}(i),i}function WC(e){for(const t of e)t.isFixed||(t.inferredType=void 0)}function HC(e,t,n){(e.intraExpressionInferenceSites??(e.intraExpressionInferenceSites=[])).push({node:t,type:n})}function GC(e){return{typeParameter:e,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1,impliedArity:void 0}}function XC(e){return{typeParameter:e.typeParameter,candidates:e.candidates&&e.candidates.slice(),contraCandidates:e.contraCandidates&&e.contraCandidates.slice(),inferredType:e.inferredType,priority:e.priority,topLevel:e.topLevel,isFixed:e.isFixed,impliedArity:e.impliedArity}}function QC(e){return e&&e.mapper}function ZC(e){const t=wx(e);if(524288&t)return!!(1048576&t);const n=!!(465829888&e.flags||524288&e.flags&&!tw(e)&&(4&t&&(e.node||Q(Ig(e),ZC))||134217728&t&&p(e.outerTypeParameters)||16&t&&e.symbol&&14384&e.symbol.flags&&e.symbol.declarations||12583968&t)||3145728&e.flags&&!(1024&e.flags)&&!tw(e)&&Q(e.types,ZC));return 3899393&e.flags&&(e.objectFlags|=524288|(n?1048576:0)),n}function tw(e){if(e.aliasSymbol&&!e.aliasTypeArguments){const t=Y_(e.aliasSymbol,265);return!(!t||!mc(t.parent,(e=>307===e.kind||267!==e.kind&&"quit")))}return!1}function nw(e,t,n=0){return!!(e===t||3145728&e.flags&&Q(e.types,(e=>nw(e,t,n)))||n<3&&16777216&e.flags&&(nw(Vb(e),t,n+1)||nw(Ub(e),t,n+1)))}function rw(e,t,n){const r=e.id+","+t.id+","+n.id;if(pi.has(r))return pi.get(r);const i=function(e,t,n){if(!(_f(e,Jt)||0!==Rd(e).length&&ow(e)))return;if(qk(e)){const r=aw(Ig(e)[0],t,n);if(!r)return;return Ty(r,Vk(e))}if(PT(e)){const r=O($y(e),(e=>aw(e,t,n)));if(!x(r,(e=>!!e)))return;return Ay(r,4&Dd(t)?L(e.target.elementFlags,(e=>2&e?1:e)):e.target.elementFlags,e.target.readonly,e.target.labeledElementDeclarations)}const r=hs(1040,void 0);return r.source=e,r.mappedType=t,r.constraintType=n,r}(e,t,n);return pi.set(r,i),i}function ow(e){return!(262144&wx(e))||Tw(e)&&Q(Rd(e),(e=>ow($l(e))))||PT(e)&&Q($y(e),ow)}function aw(e,t,n){const r=e.id+","+t.id+","+n.id;if(pi.has(r))return pi.get(r)||At;eo.push(e),to.push(t);const i=no;let o;return Mk(e,eo,eo.length,2)&&(no|=1),Mk(t,to,to.length,2)&&(no|=2),3!==no&&(o=function(e,t,n){const r=Mb(n.type,fd(t)),i=yd(t),o=GC(r);return xw([o],e,i),lw(o)||At}(e,t,n)),eo.pop(),to.pop(),no=i,pi.set(r,o),o}function*sw(e,t,n,r){const i=Rd(t);for(const t of i)if(!e_(t)&&(n||!(16777216&t.flags||48&px(t)))){const n=Jp(e,t.escapedName);if(n){if(r){const e=$l(t);if(109472&e.flags){const r=$l(n);1&r.flags||sx(r)===sx(e)||(yield t)}}}else yield t}}function cw(e,t,n,r){return ke(sw(e,t,n,r))}function lw(e){return e.candidates?ev(e.candidates,2):e.contraCandidates?cv(e.contraCandidates):void 0}function uw(e){return!!Wo(e).skipDirectInference}function _w(e){return!(!e.symbol||!Q(e.symbol.declarations,uw))}function dw(e,t){if(""===e)return!1;const n=+e;return isFinite(n)&&(!t||""+n===e)}function pw(e,t){if(1&t.flags)return!0;if(134217732&t.flags)return SS(e,t);if(268435456&t.flags){const n=[];for(;268435456&t.flags;)n.unshift(t.symbol),t=t.type;return Oe(n,((e,t)=>Gv(t,e)),e)===e&&pw(e,t)}return!1}function fw(e,t){if(2097152&t.flags)return x(t.types,(t=>t===Pn||fw(e,t)));if(4&t.flags||SS(e,t))return!0;if(128&e.flags){const n=e.value;return!!(8&t.flags&&dw(n,!1)||64&t.flags&&CT(n,!1)||98816&t.flags&&n===t.intrinsicName||268435456&t.flags&&pw(lx(n),t)||134217728&t.flags&&vw(e,t))}if(134217728&e.flags){const n=e.texts;return 2===n.length&&""===n[0]&&""===n[1]&&SS(e.types[0],t)}return!1}function gw(e,t){return 128&e.flags?bw([e.value],u,t):134217728&e.flags?E(e.texts,t.texts)?O(e.types,((e,n)=>{return SS(Hd(e),Hd(t.types[n]))?e:402653317&(r=e).flags?r:Ov(["",""],[r]);var r})):bw(e.texts,e.types,t):void 0}function vw(e,t){const n=gw(e,t);return!!n&&x(n,((e,n)=>fw(e,t.types[n])))}function bw(e,t,n){const r=e.length-1,i=e[0],o=e[r],a=n.texts,s=a.length-1,c=a[0],l=a[s];if(0===r&&i.length0){let t=d,r=p;for(;r=f(t).indexOf(n,r),!(r>=0);){if(t++,t===e.length)return;r=0}m(t,r),p+=n.length}else if(p{if(!(128&e.flags))return;const n=yc(e.value),r=No(4,n);r.links.type=St,e.symbol&&(r.declarations=e.symbol.declarations,r.valueDeclaration=e.symbol.valueDeclaration),t.set(n,r)}));const n=4&e.flags?[Vm(Jt,wn,!1)]:u;return ks(void 0,t,u,u,n)}(t);!function(e,t,n){const i=r;r|=256,y(e,t),r=i}(e,a.type)}else if(8388608&t.flags&&8388608&a.flags)p(t.objectType,a.objectType),p(t.indexType,a.indexType);else if(268435456&t.flags&&268435456&a.flags)t.symbol===a.symbol&&p(t.type,a.type);else if(33554432&t.flags)p(t.baseType,a),f(Ch(t),a,4);else if(16777216&a.flags)m(t,a,C);else if(3145728&a.flags)k(t,a.types,a.flags);else if(1048576&t.flags){const e=t.types;for(const t of e)p(t,a)}else if(134217728&a.flags)!function(e,t){const n=gw(e,t),r=t.types;if(n||x(t.texts,(e=>0===e.length)))for(let e=0;ee|t.flags),0);if(!(4&r)){const n=t.value;296&r&&!dw(n,!0)&&(r&=-297),2112&r&&!CT(n,!0)&&(r&=-2113);const o=Oe(e,((e,i)=>i.flags&r?4&e.flags?e:4&i.flags?t:134217728&e.flags?e:134217728&i.flags&&vw(t,i)?t:268435456&e.flags?e:268435456&i.flags&&n===Xv(i.symbol,n)?t:128&e.flags?e:128&i.flags&&i.value===n?i:8&e.flags?e:8&i.flags?ux(+n):32&e.flags?e:32&i.flags?ux(+n):256&e.flags?e:256&i.flags&&i.value===+n?i:64&e.flags?e:64&i.flags?_x(TT(n)):2048&e.flags?e:2048&i.flags&&ST(i.value)===n?i:16&e.flags?e:16&i.flags?"true"===n?Kt:"false"===n?qt:Xt:512&e.flags?e:512&i.flags&&i.intrinsicName===n?i:32768&e.flags?e:32768&i.flags&&i.intrinsicName===n?i:65536&e.flags?e:65536&i.flags&&i.intrinsicName===n?i:e:e),en);if(!(131072&o.flags)){p(o,i);continue}}}}p(t,i)}}(t,a);else{if(Ad(t=Sp(t))&&Ad(a)&&m(t,a,w),!(512&r&&467927040&t.flags)){const e=mp(t);if(e!==t&&!(2621440&e.flags))return p(e,a);t=e}2621440&t.flags&&m(t,a,E)}else h(Ig(t),Ig(a),Sk(t.target))}}}function f(e,t,n){const i=r;r|=n,p(e,t),r=i}function m(e,t,n){const r=e.id+","+t.id,i=a&&a.get(r);if(void 0!==i)return void(_=Math.min(_,i));(a||(a=new Map)).set(r,-1);const o=_;_=2048;const l=d;(s??(s=[])).push(e),(c??(c=[])).push(t),Mk(e,s,s.length,2)&&(d|=1),Mk(t,c,c.length,2)&&(d|=2),3!==d?n(e,t):_=-1,c.pop(),s.pop(),d=l,a.set(r,_),_=Math.min(_,o)}function g(e,t,n){let r,i;for(const o of t)for(const t of e)n(t,o)&&(p(t,o),r=me(r,t),i=me(i,o));return[r?F(e,(e=>!D(r,e))):e,i?F(t,(e=>!D(i,e))):t]}function h(e,t,n){const r=e.length!!b(e)));if(!e||t&&e!==t)return;t=e}return t}(t);return void(n&&f(e,n,1))}if(1===i&&!s){const e=R(o,((e,t)=>a[t]?void 0:e));if(e.length)return void p(ev(e),n)}}else for(const n of t)b(n)?i++:p(e,n);if(2097152&n?1===i:i>0)for(const n of t)b(n)&&f(e,n,1)}function T(e,t,n){if(1048576&n.flags||2097152&n.flags){let r=!1;for(const i of n.types)r=T(e,t,i)||r;return r}if(4194304&n.flags){const r=b(n.type);if(r&&!r.isFixed&&!_w(e)){const i=rw(e,t,n);i&&f(i,r.typeParameter,262144&wx(e)?16:8)}return!0}if(262144&n.flags){f(Av(e,e.pattern?2:0),n,32);const r=Bd(n);return r&&T(e,t,r)||p(ev(Z(O(Rd(e),$l),O(cf(e),(e=>e!==oi?e.type:en)))),yd(t)),!0}return!1}function C(e,t){16777216&e.flags?(p(e.checkType,t.checkType),p(e.extendsType,t.extendsType),p(Vb(e),Vb(t)),p(Ub(e),Ub(t))):function(e,t,n,i){const o=r;r|=i,k(e,t,n),r=o}(e,[Vb(t),Ub(t)],t.flags,i?64:0)}function w(e,t){p(md(e),md(t)),p(yd(e),yd(t));const n=hd(e),r=hd(t);n&&r&&p(n,r)}function E(e,t){var n,r;if(4&wx(e)&&4&wx(t)&&(e.target===t.target||qk(e)&&qk(t)))h(Ig(e),Ig(t),Sk(e.target));else{if(Ad(e)&&Ad(t)&&w(e,t),32&wx(t)&&!t.declaration.nameType&&T(e,t,md(t)))return;if(!function(e,t){return PT(e)&&PT(t)?function(e,t){return!(8&t.target.combinedFlags)&&t.target.minLength>e.target.minLength||!t.target.hasRestElement&&(e.target.hasRestElement||t.target.fixedLength(12&e)==(12&o.target.elementFlags[t]))))){for(let t=0;t0){const e=Vp(t,n),o=e.length;for(let t=0;t1){const t=F(e,Cw);if(t.length){const n=ev(t,2);return Z(F(e,(e=>!Cw(e))),[n])}}return e}(e.candidates),r=function(e){const t=Jd(e);return!!t&&_M(16777216&t.flags?qd(t):t,406978556)}(e.typeParameter)||zd(e.typeParameter),i=!r&&e.topLevel&&(e.isFixed||!function(e,t){const n=Wf(e);return n?!!n.type&&nw(n.type,t):nw(Gf(e),t)}(t,e.typeParameter)),o=r?L(n,sx):i?L(n,dT):n;return RC(416&e.priority?ev(o,2):$k(o))}(n,e.signature):void 0,c=n.contraCandidates?function(e){return 416&e.priority?cv(e.contraCandidates):Oe(e.contraCandidates,((e,t)=>bS(t,e)?t:e))}(n):void 0;if(s||c){const t=s&&(!c||!(131072&s.flags)&&Q(n.contraCandidates,(e=>bS(s,e)))&&x(e.inferences,(e=>e!==n&&Jd(e.typeParameter)!==n.typeParameter||x(e.candidates,(e=>bS(e,s))))));o=t?s:c,a=t?c:s}else if(1&e.flags)o=tn;else{const a=np(n.typeParameter);a&&(o=eS(a,(r=function(e,t){const n=e.inferences.slice(t);return Fx(O(n,(e=>e.typeParameter)),O(n,(()=>At)))}(e,t),i=e.nonFixingMapper,r?Bx(5,r,i):i)))}}else o=lw(n);n.inferredType=o||Dw(!!(2&e.flags));const s=Jd(n.typeParameter);if(s){const t=eS(s,e.nonFixingMapper);o&&e.compareTypes(o,y_(t,o))||(n.inferredType=a&&e.compareTypes(a,y_(t,a))?a:t)}}var r,i;return n.inferredType}function Dw(e){return e?St:At}function Ew(e){const t=[];for(let n=0;nXP(e)||QP(e)||CE(e))))}function Aw(e,t,n,r){switch(e.kind){case 80:if(!bv(e)){const i=Nw(e);return i!==ht?`${r?IB(r):"-1"}|${qy(t)}|${qy(n)}|${OB(i)}`:void 0}case 110:return`0|${r?IB(r):"-1"}|${qy(t)}|${qy(n)}`;case 235:case 217:return Aw(e.expression,t,n,r);case 166:const i=Aw(e.left,t,n,r);return i&&`${i}.${e.right.escapedText}`;case 211:case 212:const o=Ow(e);if(void 0!==o){const i=Aw(e.expression,t,n,r);return i&&`${i}.${o}`}if(XE(e)&&qD(e.argumentExpression)){const i=Nw(e.argumentExpression);if(wE(i)||FE(i)&&!YD(i)){const o=Aw(e.expression,t,n,r);return o&&`${o}.@${OB(i)}`}}break;case 206:case 207:case 262:case 218:case 219:case 174:return`${IB(e)}#${qy(t)}`}}function Iw(e,t){switch(t.kind){case 217:case 235:return Iw(e,t.expression);case 226:return mb(t)&&Iw(e,t.left)||uP(t)&&28===t.operatorToken.kind&&Iw(e,t.right)}switch(e.kind){case 236:return 236===t.kind&&e.keywordToken===t.keywordToken&&e.name.escapedText===t.name.escapedText;case 80:case 81:return bv(e)?110===t.kind:80===t.kind&&Nw(e)===Nw(t)||(KP(t)||KE(t))&&_s(Nw(e))===ns(t);case 110:return 110===t.kind;case 108:return 108===t.kind;case 235:case 217:return Iw(e.expression,t);case 211:case 212:const n=Ow(e);if(void 0!==n){const r=Ox(t)?Ow(t):void 0;if(void 0!==r)return r===n&&Iw(e.expression,t.expression)}if(XE(e)&&XE(t)&&qD(e.argumentExpression)&&qD(t.argumentExpression)){const n=Nw(e.argumentExpression);if(n===Nw(t.argumentExpression)&&(wE(n)||FE(n)&&!YD(n)))return Iw(e.expression,t.expression)}break;case 166:return Ox(t)&&e.right.escapedText===Ow(t)&&Iw(e.left,t.expression);case 226:return uP(e)&&28===e.operatorToken.kind&&Iw(e.right,t)}return!1}function Ow(e){if(GE(e))return e.name.escapedText;if(XE(e))return $h((t=e).argumentExpression)?yc(t.argumentExpression.text):vb(t.argumentExpression)?function(e){const t=Ma(e,111551,!0);if(!t||!(wE(t)||8&t.flags))return;const n=t.valueDeclaration;if(void 0===n)return;const r=El(n);if(r){const e=jw(r);if(void 0!==e)return e}if(j_(n)&&Xo(n,e)){const e=Gm(n);if(e){const t=Eu(n.parent)?Vc(n):qM(e);return t&&jw(t)}if($N(n))return Lp(n.name)}}(t.argumentExpression):void 0;var t;if(KE(e)){const t=zc(e);return t?yc(t):void 0}return sE(e)?""+e.parent.parameters.indexOf(e):void 0}function jw(e){return 8192&e.flags?e.escapedName:384&e.flags?yc(""+e.value):void 0}function Rw(e,t){for(;Ox(e);)if(Iw(e=e.expression,t))return!0;return!1}function Bw(e,t){for(;Sl(e);)if(Iw(e=e.expression,t))return!0;return!1}function zw(e,t){if(e&&1048576&e.flags){const n=bp(e,t);if(n&&2&px(n))return void 0===n.links.isDiscriminantProperty&&(n.links.isDiscriminantProperty=192==(192&n.links.checkFlags)&&!lb($l(n))),!!n.links.isDiscriminantProperty}return!1}function $w(e,t){let n;for(const r of e)if(zw(t,r.escapedName)){if(n){n.push(r);continue}n=[r]}return n}function qw(e){const t=e.types;if(!(t.length<10||32768&wx(e)||N(t,(e=>!!(59506688&e.flags)))<10)){if(void 0===e.keyPropertyName){const n=f(t,(e=>59506688&e.flags?f(Rd(e),(e=>iT($l(e))?e.escapedName:void 0)):void 0)),r=n&&function(e,t){const n=new Map;let r=0;for(const i of e)if(61603840&i.flags){const e=Tc(i,t);if(e){if(!sT(e))return;let t=!1;vD(e,(e=>{const r=qy(sx(e)),o=n.get(r);o?o!==At&&(n.set(r,At),t=!0):n.set(r,i)})),t||r++}}return r>=10&&2*r>=e.length?n:void 0}(t,n);e.keyPropertyName=r?n:"",e.constituentMap=r}return e.keyPropertyName.length?e.keyPropertyName:void 0}}function Vw(e,t){var n;const r=null==(n=e.constituentMap)?void 0:n.get(qy(sx(t)));return r!==At?r:void 0}function Uw(e,t){const n=qw(e),r=n&&Tc(t,n);return r&&Vw(e,r)}function Kw(e,t){return Iw(e,t)||Rw(e,t)}function Ww(e,t){if(e.arguments)for(const n of e.arguments)if(Kw(t,n)||Bw(n,t))return!0;return!(211!==e.expression.kind||!Kw(t,e.expression.expression))}function Hw(e){return e.id<=0&&(e.id=TB,TB++),e.id}function Gw(e){const t=Od(e);return!!(t.callSignatures.length||t.constructSignatures.length||t.members.get("bind")&&bS(e,Wn))}function Xw(e,t){return Yw(e,t)&t}function Qw(e,t){return 0!==Xw(e,t)}function Yw(e,t){467927040&e.flags&&(e=Wd(e)||At);const n=e.flags;if(268435460&n)return U?16317953:16776705;if(134217856&n){const t=128&n&&""===e.value;return U?t?12123649:7929345:t?12582401:16776705}if(40&n)return U?16317698:16776450;if(256&n){const t=0===e.value;return U?t?12123394:7929090:t?12582146:16776450}if(64&n)return U?16317188:16775940;if(2048&n){const t=RT(e);return U?t?12122884:7928580:t?12581636:16775940}return 16&n?U?16316168:16774920:528&n?U?e===qt||e===Vt?12121864:7927560:e===qt||e===Vt?12580616:16774920:524288&n?0==(t&(U?83427327:83886079))?0:16&wx(e)&&ik(e)?U?83427327:83886079:Gw(e)?U?7880640:16728e3:U?7888800:16736160:16384&n?9830144:32768&n?26607360:65536&n?42917664:12288&n?U?7925520:16772880:67108864&n?U?7888800:16736160:131072&n?0:1048576&n?Oe(e.types,((e,n)=>e|Yw(n,t)),0):2097152&n?function(e,t){const n=_M(e,402784252);let r=0,i=134217727;for(const o of e.types)if(!(n&&524288&o.flags)){const e=Yw(o,t);r|=e,i&=e}return 8256&r|134209471&i}(e,t):83886079}function Zw(e,t){return SD(e,(e=>Qw(e,t)))}function eD(e,t){const n=nD(Zw(U&&2&e.flags?Fn:e,t));if(U)switch(t){case 524288:return tD(n,65536,131072,33554432,Rt);case 1048576:return tD(n,131072,65536,16777216,It);case 2097152:case 4194304:return DD(n,(e=>Qw(e,262144)?function(e){return sr||(sr=qh("NonNullable",524288,void 0)||ht),sr!==ht?Bg(sr,[e]):cv([e,wn])}(e):e))}return n}function tD(e,t,n,r,i){const o=Xw(e,50528256);if(!(o&t))return e;const a=ev([wn,i]);return DD(e,(e=>Qw(e,t)?cv([e,o&r||!Qw(e,n)?wn:a]):e))}function nD(e){return e===Fn?At:e}function rD(e,t){return t?ev([jc(e),qM(t)]):e}function iD(e,t){var n;const r=Tv(t);if(!mC(r))return Dt;const i=gC(r);return Tc(e,i)||aD(null==(n=gf(e,i))?void 0:n.type)||Dt}function oD(e,t){return xD(e,Zk)&&nT(e,t)||aD(fj(65,e,It,void 0))||Dt}function aD(e){return e&&A.noUncheckedIndexedAccess?ev([e,Mt]):e}function sD(e){return Ty(fj(65,e,It,void 0)||Dt)}function cD(e){return 226===e.parent.kind&&e.parent.left===e||250===e.parent.kind&&e.parent.initializer===e}function lD(e){return iD(uD(e.parent),e.name)}function uD(e){const{parent:t}=e;switch(t.kind){case 249:return Jt;case 250:return pj(t)||Dt;case 226:return function(e){return 209===e.parent.kind&&cD(e.parent)||303===e.parent.kind&&cD(e.parent.parent)?rD(uD(e),e.right):qM(e.right)}(t);case 220:return It;case 209:return function(e,t){return oD(uD(e),e.elements.indexOf(t))}(t,e);case 230:return function(e){return sD(uD(e.parent))}(t);case 303:return lD(t);case 304:return function(e){return rD(lD(e),e.objectAssignmentInitializer)}(t)}return Dt}function _D(e){return Wo(e).resolvedType||qM(e)}function dD(e){return 260===e.kind?function(e){return e.initializer?_D(e.initializer):249===e.parent.parent.kind?Jt:250===e.parent.parent.kind&&pj(e.parent.parent)||Dt}(e):function(e){const t=e.parent,n=dD(t.parent);return rD(206===t.kind?iD(n,e.propertyName||e.name):e.dotDotDotToken?sD(n):oD(n,t.elements.indexOf(e)),e.initializer)}(e)}function pD(e){switch(e.kind){case 217:return pD(e.expression);case 226:switch(e.operatorToken.kind){case 64:case 76:case 77:case 78:return pD(e.left);case 28:return pD(e.right)}}return e}function fD(e){const{parent:t}=e;return 217===t.kind||226===t.kind&&64===t.operatorToken.kind&&t.left===e||226===t.kind&&28===t.operatorToken.kind&&t.right===e?fD(t):e}function mD(e){return 296===e.kind?sx(qM(e.expression)):en}function gD(e){const t=Wo(e);if(!t.switchTypes){t.switchTypes=[];for(const n of e.caseBlock.clauses)t.switchTypes.push(mD(n))}return t.switchTypes}function hD(e){if(Q(e.caseBlock.clauses,(e=>296===e.kind&&!$_(e.expression))))return;const t=[];for(const n of e.caseBlock.clauses){const e=296===n.kind?n.expression.text:void 0;t.push(e&&!D(t,e)?e:void 0)}return t}function yD(e,t){return!!(e===t||131072&e.flags||1048576&t.flags&&function(e,t){if(1048576&e.flags){for(const n of e.types)if(!Ky(t.types,n))return!1;return!0}return!!(1056&e.flags&&Au(e)===t)||Ky(t.types,e)}(e,t))}function vD(e,t){return 1048576&e.flags?f(e.types,t):t(e)}function bD(e,t){return 1048576&e.flags?Q(e.types,t):t(e)}function xD(e,t){return 1048576&e.flags?x(e.types,t):t(e)}function SD(e,t){if(1048576&e.flags){const n=e.types,r=F(n,t);if(r===n)return e;const i=e.origin;let o;if(i&&1048576&i.flags){const e=i.types,a=F(e,(e=>!!(1048576&e.flags)||t(e)));if(e.length-a.length==n.length-r.length){if(1===a.length)return a[0];o=Zy(1048576,a)}}return rv(r,16809984&e.objectFlags,void 0,void 0,o)}return 131072&e.flags||t(e)?e:en}function kD(e,t){return SD(e,(e=>e!==t))}function CD(e){return 1048576&e.flags?e.types.length:1}function DD(e,t,n){if(131072&e.flags)return e;if(!(1048576&e.flags))return t(e);const r=e.origin,i=r&&1048576&r.flags?r.types:e.types;let o,a=!1;for(const e of i){const r=1048576&e.flags?DD(e,t,n):t(e);a||(a=e!==r),r&&(o?o.push(r):o=[r])}return a?o&&ev(o,n?0:1):e}function ED(e,t,n,r){return 1048576&e.flags&&n?ev(O(e.types,t),1,n,r):DD(e,t)}function PD(e,t){return SD(e,(e=>0!=(e.flags&t)))}function ND(e,t){return _M(e,134217804)&&_M(t,402655616)?DD(e,(e=>4&e.flags?PD(t,402653316):sb(e)&&!_M(t,402653188)?PD(t,128):8&e.flags?PD(t,264):64&e.flags?PD(t,2112):e)):e}function FD(e){return 0===e.flags}function AD(e){return 0===e.flags?e.type:e}function ID(e,t){return t?{flags:0,type:131072&e.flags?tn:e}:e}function OD(e){return ft[e.id]||(ft[e.id]=function(e){const t=hs(256);return t.elementType=e,t}(e))}function MD(e,t){const n=AC(cT(UM(t)));return yD(n,e.elementType)?e:OD(ev([e.elementType,n]))}function LD(e){return 256&wx(e)?(t=e).finalArrayType||(t.finalArrayType=131072&(n=t.elementType).flags?ir:Ty(1048576&n.flags?ev(n.types,2):n)):e;var t,n}function jD(e){return 256&wx(e)?e.elementType:en}function RD(e){const t=fD(e),n=t.parent,r=GE(n)&&("length"===n.name.escapedText||213===n.parent.kind&&qD(n.name)&&oy(n.name)),i=212===n.kind&&n.expression===t&&226===n.parent.kind&&64===n.parent.operatorToken.kind&&n.parent.left===n&&!eh(n.parent)&&dM(qM(n.argumentExpression),296);return r||i}function BD(e,t){if(8752&(e=Da(e)).flags)return $l(e);if(7&e.flags){if(262144&px(e)){const t=e.links.syntheticOrigin;if(t&&BD(t))return $l(e)}const r=e.valueDeclaration;if(r){if((KP(n=r)||uE(n)||lE(n)||sE(n))&&(kv(n)||Mm(n)&&L_(n)&&n.initializer&&UT(n.initializer)&&Cv(n.initializer)))return $l(e);if(KP(r)&&250===r.parent.parent.kind){const e=r.parent.parent,t=JD(e.expression,void 0);if(t)return fj(e.awaitModifier?15:13,t,It,void 0)}t&&fT(t,Rp(r,va._0_needs_an_explicit_type_annotation,Us(e)))}}var n}function JD(e,t){if(!(67108864&e.flags))switch(e.kind){case 80:return BD(_s(Nw(e)),t);case 110:return function(e){const t=rm(e,!1,!1);if(cu(t)){const e=Cf(t);if(e.thisParameter)return BD(e.thisParameter)}if(gu(t.parent)){const e=ns(t.parent);return Jv(t)?$l(e):ju(e).thisType}}(e);case 108:return tN(e);case 211:{const n=JD(e.expression,t);if(n){const r=e.name;let i;if(VD(r)){if(!n.symbol)return;i=Jp(n,Qh(n.symbol,r.escapedText))}else i=Jp(n,r.escapedText);return i&&BD(i,t)}return}case 217:return JD(e.expression,t)}}function zD(e){const t=Wo(e);let n=t.effectsSignature;if(void 0===n){let r;uP(e)?r=gM(yA(e.right)):244===e.parent.kind?r=JD(e.expression,void 0):108!==e.expression.kind&&(r=Sl(e)?TA(vC(KM(e.expression),e.expression),e.expression):yA(e.expression));const i=Vp(r&&mp(r)||At,0),o=1!==i.length||i[0].typeParameters?Q(i,$D)?nO(e):void 0:i[0];n=t.effectsSignature=o&&$D(o)?o:ni}return n===ni?void 0:n}function $D(e){return!!(Wf(e)||e.declaration&&131072&(Xf(e.declaration)||At).flags)}function UD(e){const t=WD(e,!1);return Gr=e,Xr=t,t}function KD(e){const t=lh(e,!0);return 97===t.kind||226===t.kind&&(56===t.operatorToken.kind&&(KD(t.left)||KD(t.right))||57===t.operatorToken.kind&&KD(t.left)&&KD(t.right))}function WD(e,t){for(;;){if(e===Gr)return Xr;const n=e.flags;if(4096&n){if(!t){const t=Hw(e),n=Ki[t];return void 0!==n?n:Ki[t]=WD(e,!0)}t=!1}if(368&n)e=e.antecedent;else if(512&n){const t=zD(e.node);if(t){const n=Wf(t);if(n&&3===n.kind&&!n.type){const t=e.node.arguments[n.parameterIndex];if(t&&KD(t))return!1}if(131072&Gf(t).flags)return!1}e=e.antecedent}else{if(4&n)return Q(e.antecedent,(e=>WD(e,!1)));if(8&n){const t=e.antecedent;if(void 0===t||0===t.length)return!1;e=t[0]}else{if(!(128&n)){if(1024&n){Gr=void 0;const t=e.node.target,n=t.antecedent;t.antecedent=e.node.antecedents;const r=WD(e.antecedent,!1);return t.antecedent=n,r}return!(1&n)}{const t=e.node;if(t.clauseStart===t.clauseEnd&&YO(t.switchStatement))return!1;e=e.antecedent}}}}}function HD(e,t){for(;;){const n=e.flags;if(4096&n){if(!t){const t=Hw(e),n=Wi[t];return void 0!==n?n:Wi[t]=HD(e,!0)}t=!1}if(496&n)e=e.antecedent;else if(512&n){if(108===e.node.expression.kind)return!0;e=e.antecedent}else{if(4&n)return x(e.antecedent,(e=>HD(e,!1)));if(!(8&n)){if(1024&n){const t=e.node.target,n=t.antecedent;t.antecedent=e.node.antecedents;const r=HD(e.antecedent,!1);return t.antecedent=n,r}return!!(1&n)}e=e.antecedent[0]}}}function GD(e){switch(e.kind){case 110:return!0;case 80:if(!bv(e)){const t=Nw(e);return wE(t)||FE(t)&&!YD(t)||!!t.valueDeclaration&&nP(t.valueDeclaration)}break;case 211:case 212:return GD(e.expression)&&oM(Wo(e).resolvedSymbol||ht);case 206:case 207:const t=sy(e.parent);return sE(t)||VT(t)?!eE(t):KP(t)&&SJ(t)}return!1}function XD(e,t,n=t,r,i=(t=>null==(t=lt(e,jg))?void 0:t.flowNode)()){let o,a=!1,s=0;if(yi)return Dt;if(!i)return t;vi++;const c=hi,l=AD(d(i));hi=c;const u=256&wx(l)&&RD(e)?ir:LD(l);return u===rn||e.parent&&235===e.parent.kind&&!(131072&u.flags)&&131072&Zw(u,2097152).flags?t:u;function _(){return a?o:(a=!0,o=Aw(e,t,n,r))}function d(i){var o;if(2e3===s)return null==(o=or)||o.instant(or.Phase.CheckTypes,"getTypeAtFlowNode_DepthLimit",{flowId:i.id}),yi=!0,function(e){const t=mc(e,fu),n=Sd(e),r=Gp(n,t.statements.pos);ro.add(aS(n,r.start,r.length,va.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis))}(e),Dt;let a;for(s++;;){const o=i.flags;if(4096&o){for(let e=c;efunction(e,t){if(!(1048576&e.flags))return SS(e,t);for(const n of e.types)if(SS(n,t))return!0;return!1}(t,e))),r=512&t.flags&&cx(t)?DD(n,ax):n;return SS(t,r)?r:e}(e,t))}(e,p(n)):e}if(Rw(e,r)){if(!UD(n))return rn;if(KP(r)&&(Mm(r)||SJ(r))){const e=Xm(r);if(e&&(218===e.kind||219===e.kind))return d(n.antecedent)}return t}if(KP(r)&&249===r.parent.parent.kind&&(Iw(e,r.parent.parent.expression)||Bw(r.parent.parent.expression,e)))return bA(LD(AD(d(n.antecedent))))}function m(e,t){const n=lh(t,!0);if(97===n.kind)return rn;if(226===n.kind){if(56===n.operatorToken.kind)return m(m(e,n.left),n.right);if(57===n.operatorToken.kind)return ev([m(e,n.left),m(e,n.right)])}return Y(e,n,!0)}function g(e){const t=zD(e.node);if(t){const n=Wf(t);if(n&&(2===n.kind||3===n.kind)){const t=d(e.antecedent),r=LD(AD(t)),i=n.type?Q(r,n,e.node,!0):3===n.kind&&n.parameterIndex>=0&&n.parameterIndex297===e.kind));if(n===r||o>=n&&oXw(e,t)===t))}return ev(O(i.slice(n,r),(t=>t?V(e,t):en)))}(i,t.node);else if(112===n.kind)i=function(e,{switchStatement:t,clauseStart:n,clauseEnd:r}){const i=T(t.caseBlock.clauses,(e=>297===e.kind)),o=n===r||i>=n&&i296===t.kind?Y(e,t.expression,!0):en)))}(i,t.node);else{U&&(Bw(n,e)?i=$(i,t.node,(e=>!(163840&e.flags))):221===n.kind&&Bw(n.expression,e)&&(i=$(i,t.node,(e=>!(131072&e.flags||128&e.flags&&"undefined"===e.value)))));const r=P(n,i);r&&(i=function(e,t,n){if(n.clauseStartVw(e,t)||At)));if(t!==At)return t}return N(e,t,(e=>q(e,n)))}(i,r,t.node))}return ID(i,FD(r))}function k(e){const r=[];let i,o=!1,a=!1;for(const s of e.antecedent){if(!i&&128&s.flags&&s.node.clauseStart===s.node.clauseEnd){i=s;continue}const e=d(s),c=AD(e);if(c===t&&t===n)return c;fe(r,c),yD(c,n)||(o=!0),FD(e)&&(a=!0)}if(i){const e=d(i),s=AD(e);if(!(131072&s.flags||D(r,s)||YO(i.node.switchStatement))){if(s===t&&t===n)return s;r.push(s),yD(s,n)||(o=!0),FD(e)&&(a=!0)}}return ID(w(r,o?2:1),a)}function C(e){const r=Hw(e),i=Ji[r]||(Ji[r]=new Map),o=_();if(!o)return t;const a=i.get(o);if(a)return a;for(let t=mi;t{const t=wc(e,r)||At;return!(131072&t.flags)&&!(131072&s.flags)&&CS(s,t)}))}function F(e,t,n,r,i){if((37===n||38===n)&&1048576&e.flags){const o=qw(e);if(o&&o===Ow(t)){const t=Vw(e,qM(r));if(t)return n===(i?37:38)?t:iT(Tc(t,o)||At)?kD(e,t):e}}return N(e,t,(e=>B(e,n,r,i)))}function A(t,n,r){if(Iw(e,n))return eD(t,r?4194304:8388608);U&&r&&Bw(n,e)&&(t=eD(t,2097152));const i=P(n,t);return i?N(t,i,(e=>Zw(e,r?4194304:8388608))):t}function I(e,t,n){const r=Jp(e,t);return r?!!(16777216&r.flags||48&px(r))||n:!!gf(e,t)||!n}function M(e,t,n,r,i){return Y(e,t,i=i!==(112===n.kind)!=(38!==r&&36!==r))}function j(t,n,r){switch(n.operatorToken.kind){case 64:case 76:case 77:case 78:return A(Y(t,n.right,r),n.left,r);case 35:case 36:case 37:case 38:const i=n.operatorToken.kind,o=pD(n.left),a=pD(n.right);if(221===o.kind&&$_(a))return J(t,o,i,a,r);if(221===a.kind&&$_(o))return J(t,a,i,o,r);if(Iw(e,o))return B(t,i,a,r);if(Iw(e,a))return B(t,i,o,r);U&&(Bw(o,e)?t=R(t,i,a,r):Bw(a,e)&&(t=R(t,i,o,r)));const s=P(o,t);if(s)return F(t,s,i,a,r);const c=P(a,t);if(c)return F(t,c,i,o,r);if(W(o))return H(t,i,a,r);if(W(a))return H(t,i,o,r);if(_u(a)&&!Ox(o))return M(t,o,a,i,r);if(_u(o)&&!Ox(a))return M(t,a,o,i,r);break;case 104:return function(t,n,r){const i=pD(n.left);if(!Iw(e,i))return r&&U&&Bw(i,e)?eD(t,2097152):t;const o=qM(n.right);if(!kS(o,Kn))return t;const a=zD(n),s=a&&Wf(a);if(s&&1===s.kind&&0===s.parameterIndex)return X(t,s.type,r,!0);if(!kS(o,Wn))return t;const c=DD(o,G);return(!Ec(t)||c!==Kn&&c!==Wn)&&(r||524288&c.flags&&!ok(c))?X(t,c,r,!0):t}(t,n,r);case 103:if(VD(n.left))return function(t,n,r){const i=pD(n.right);if(!Iw(e,i))return t;xn.assertNode(n.left,VD);const o=NA(n.left);if(void 0===o)return t;const a=o.parent;return X(t,zv(xn.checkDefined(o.valueDeclaration,"should always have a declaration"))?$l(a):ju(a),r,!0)}(t,n,r);const l=pD(n.right);if(DC(t)&&Ox(e)&&Iw(e.expression,l)){const i=qM(n.left);if(mC(i)&&Ow(e)===gC(i))return Zw(t,r?524288:65536)}if(Iw(e,l)){const e=qM(n.left);if(mC(e))return function(e,t,n){const r=gC(t);if(bD(e,(e=>I(e,r,!0))))return SD(e,(e=>I(e,r,n)));if(n){const n=(Jr||(Jr=zh("Record",2,!0)||ht),Jr===ht?void 0:Jr);if(n)return cv([e,Bg(n,[t,At])])}return e}(t,e,r)}break;case 28:return Y(t,n.right,r);case 56:return r?Y(Y(t,n.left,!0),n.right,!0):ev([Y(t,n.left,!1),Y(t,n.right,!1)]);case 57:return r?ev([Y(t,n.left,!0),Y(t,n.right,!0)]):Y(Y(t,n.left,!1),n.right,!1)}return t}function R(e,t,n,r){const i=35===t||37===t,o=35===t||36===t?98304:32768,a=qM(n);return i!==r&&xD(a,(e=>!!(e.flags&o)))||i===r&&xD(a,(e=>!(e.flags&(3|o))))?eD(e,2097152):e}function B(e,t,n,r){if(1&e.flags)return e;36!==t&&38!==t||(r=!r);const i=qM(n),o=35===t||36===t;if(98304&i.flags)return U?eD(e,o?r?262144:2097152:65536&i.flags?r?131072:1048576:r?65536:524288):e;if(r){if(!o&&(2&e.flags||bD(e,ok))){if(469893116&i.flags||ok(i))return i;if(524288&i.flags)return cn}return ND(SD(e,(e=>{return CS(e,i)||o&&(t=i,0!=(524&e.flags)&&0!=(28&t.flags));var t})),i)}return iT(i)?SD(e,(e=>!(oT(e)&&CS(e,i)))):e}function J(t,n,r,i,o){36!==r&&38!==r||(o=!o);const a=pD(n.expression);if(!Iw(e,a)){U&&Bw(a,e)&&o===("undefined"!==i.text)&&(t=eD(t,2097152));const n=P(a,t);return n?N(t,n,(e=>z(e,i,o))):t}return z(t,i,o)}function z(e,t,n){return n?V(e,t.text):eD(e,wB.get(t.text)||32768)}function $(e,{switchStatement:t,clauseStart:n,clauseEnd:r},i){return n!==r&&x(gD(t).slice(n,r),i)?Zw(e,2097152):e}function q(e,{switchStatement:t,clauseStart:n,clauseEnd:r}){const i=gD(t);if(!i.length)return e;const o=i.slice(n,r),a=n===r||D(o,en);if(2&e.flags&&!a){let t;for(let n=0;nCS(s,e))),s);if(!a)return c;const l=SD(e,(e=>!(oT(e)&&D(i,32768&e.flags?It:sx(function(e){return 2097152&e.flags&&S(e.types,iT)||e}(e))))));return 131072&c.flags?l:ev([c,l])}function V(e,t){switch(t){case"string":return K(e,Jt,1);case"number":return K(e,zt,2);case"bigint":return K(e,$t,4);case"boolean":return K(e,Xt,8);case"symbol":return K(e,Qt,16);case"object":return 1&e.flags?e:ev([K(e,cn,32),K(e,Rt,131072)]);case"function":return 1&e.flags?e:K(e,Wn,64);case"undefined":return K(e,It,65536)}return K(e,cn,128)}function K(e,t,n){return DD(e,(e=>uk(e,t,so)?Qw(e,n)?e:en:bS(t,e)?t:Qw(e,n)?cv([e,t]):en))}function W(t){return(GE(t)&&"constructor"===bc(t.name)||XE(t)&&$_(t.argumentExpression)&&"constructor"===t.argumentExpression.text)&&Iw(e,t.expression)}function H(e,t,n,r){if(r?35!==t&&37!==t:36!==t&&38!==t)return e;const i=qM(n);if(!lB(i)&&!su(i))return e;const o=Jp(i,"prototype");if(!o)return e;const a=$l(o),s=Ec(a)?void 0:a;return s&&s!==Kn&&s!==Wn?Ec(e)?s:SD(e,(e=>{return n=s,524288&(t=e).flags&&1&wx(t)||524288&n.flags&&1&wx(n)?t.symbol===n.symbol:bS(t,n);var t,n})):e}function G(e){const t=Tc(e,"prototype");if(t&&!Ec(t))return t;const n=Vp(e,1);return n.length?ev(O(n,(e=>Gf(Sm(e))))):wn}function X(e,t,n,r){const i=1048576&e.flags?`N${qy(e)},${qy(t)},${(n?1:0)|(r?2:0)}`:void 0;return fo(i)??mo(i,function(e,t,n,r){if(!n){if(e===t)return en;if(r)return SD(e,(e=>!kS(e,t)));const n=X(e,t,!0,!1);return SD(e,(e=>!yD(e,n)))}if(3&e.flags)return t;if(e===t)return t;const i=r?kS:bS,o=1048576&e.flags?qw(e):void 0,a=DD(t,(t=>{const n=o&&Tc(t,o),a=DD(n&&Vw(e,n)||e,r?e=>kS(e,t)?e:kS(t,e)?t:en:e=>xS(e,t)?e:xS(t,e)?t:bS(e,t)?e:bS(t,e)?t:en);return 131072&a.flags?DD(e,(e=>_M(e,465829888)&&i(t,Wd(e)||At)?cv([e,t]):en)):a}));return 131072&a.flags?bS(t,e)?t:SS(e,t)?e:SS(t,e)?t:cv([e,t]):a}(e,t,n,r))}function Q(t,n,r,i){if(n.type&&(!Ec(t)||n.type!==Kn&&n.type!==Wn)){const o=function(e,t){if(1===e.kind||3===e.kind)return t.arguments[e.parameterIndex];const n=lh(t.expression);return Ox(n)?lh(n.expression):void 0}(n,r);if(o){if(Iw(e,o))return X(t,n.type,i,!1);U&&Bw(o,e)&&(i&&!Qw(n.type,65536)||!i&&xD(n.type,vA))&&(t=eD(t,2097152));const r=P(o,t);if(r)return N(t,r,(e=>X(e,n.type,i,!1)))}}return t}function Y(t,n,r){if(Tl(n)||uP(n.parent)&&(61===n.parent.operatorToken.kind||78===n.parent.operatorToken.kind)&&n.parent.left===n)return function(t,n,r){if(Iw(e,n))return eD(t,r?2097152:262144);const i=P(n,t);return i?N(t,i,(e=>Zw(e,r?2097152:262144))):t}(t,n,r);switch(n.kind){case 80:if(!Iw(e,n)&&v<5){const i=Nw(n);if(wE(i)){const n=i.valueDeclaration;if(n&&KP(n)&&!n.type&&n.initializer&&GD(e)){v++;const e=Y(t,n.initializer,r);return v--,e}}}case 110:case 108:case 211:case 212:return A(t,n,r);case 213:return function(t,n,r){if(Ww(n,e)){const e=r||!xl(n)?zD(n):void 0,i=e&&Wf(e);if(i&&(0===i.kind||1===i.kind))return Q(t,i,n,r)}if(DC(t)&&Ox(e)&&GE(n.expression)){const i=n.expression;if(Iw(e.expression,pD(i.expression))&&qD(i.name)&&"hasOwnProperty"===i.name.escapedText&&1===n.arguments.length){const i=n.arguments[0];if($_(i)&&Ow(e)===yc(i.text))return Zw(t,r?524288:65536)}}return t}(t,n,r);case 217:case 235:return Y(t,n.expression,r);case 226:return j(t,n,r);case 224:if(54===n.operator)return Y(t,n.operand,!r)}return t}}function QD(e){return mc(e.parent,(e=>cu(e)&&!cm(e)||268===e.kind||307===e.kind||172===e.kind))}function YD(e){return!ZD(e,void 0)}function ZD(e,t){const n=mc(e.valueDeclaration,rE);if(!n)return!1;const r=Wo(n);return 131072&r.flags||(r.flags|=131072,mc(n.parent,(e=>rE(e)&&!!(131072&Wo(e).flags)))||vE(n)),!e.lastAssignmentPos||t&&e.lastAssignmentPos232!==e.kind&&tE(e.name)))}function rE(e){return uu(e)||qN(e)}function vE(e){switch(e.kind){case 80:if(eh(e)){const t=Nw(e);if(FE(t)&&t.lastAssignmentPos!==Number.MAX_VALUE){const n=mc(e,rE),r=mc(t.valueDeclaration,rE);t.lastAssignmentPos=n===r?function(e,t){let n=e.pos;for(;e&&e.pos>t.pos;){switch(e.kind){case 243:case 244:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 258:case 263:n=e.end}e=e.parent}return n}(e,t.valueDeclaration):Number.MAX_VALUE}}return;case 281:const t=e.parent.parent;if(!e.isTypeOnly&&!t.isTypeOnly&&!t.moduleSpecifier){const t=Ma(e.propertyName||e.name,111551,!0,!0);t&&FE(t)&&(t.lastAssignmentPos=Number.MAX_VALUE)}return;case 264:case 265:case 266:return}wu(e)||LI(e,vE)}function wE(e){return 3&e.flags&&0!=(6&cA(e))}function FE(e){const t=e.valueDeclaration&&sy(e.valueDeclaration);return!!t&&(sE(t)||KP(t)&&(RN(t.parent)||function(e){return!!(1&e.parent.flags)&&!(32&cc(e)||243===e.parent.parent.kind&&Yp(e.parent.parent.parent))}(t)))}function AE(e){return 2097152&e.flags?Q(e.types,AE):!!(465829888&e.flags&&1146880&Hd(e).flags)}function OE(e){return 2097152&e.flags?Q(e.types,OE):!(!(465829888&e.flags)||_M(Hd(e),98304))}function $E(e,t,n){ph(e)&&(e=e.baseType);const r=!(n&&2&n)&&bD(e,AE)&&(function(e,t){const n=t.parent;return 211===n.kind||166===n.kind||213===n.kind&&n.expression===t||214===n.kind&&n.expression===t||212===n.kind&&n.expression===t&&!(bD(e,OE)&&gb(qM(n.argumentExpression)))}(e,t)||function(e,t){const n=(qD(e)||GE(e)||XE(e))&&!((CN(e.parent)||TN(e.parent))&&e.parent.tagName===e)&&dF(e,t&&32&t?8:void 0);return n&&!lb(n)}(t,n));return r?DD(e,Hd):e}function qE(e){return!!mc(e,(e=>{const t=e.parent;return void 0===t?"quit":mN(t)?t.expression===e&&vb(e):!!yN(t)&&(t.name===e||t.propertyName===e)}))}function eP(e,t,n,r){if(Ie&&!(33554432&e.flags))switch(t){case 1:return iP(e);case 2:return aP(e,n,r);case 3:return lP(e);case 4:return _P(e);case 5:return dP(e);case 6:return pP(e);case 7:return yP(e);case 8:return SP(e);case 0:if(qD(e)&&(Tm(e)||JN(e.parent)||rN(e.parent)&&e.parent.moduleReference===e)&&RP(e)){if(Bu(e.parent)&&(GE(e.parent)?e.parent.expression:e.parent.left)!==e)return;return void iP(e)}if(Bu(e)){let t=e;for(;Bu(t);){if(wf(t))return;t=t.parent}return aP(e)}if(mN(e))return lP(e);if(D_(e)||EN(e))return _P(e);if(rN(e))return Fm(e)||lR(e)?pP(e):void 0;if(yN(e))return yP(e);if((uu(e)||_E(e))&&dP(e),!A.emitDecoratorMetadata)return;if(!(lI(e)&&Wv(e)&&e.modifiers&&gm(J,e,e.parent,e.parent.parent)))return;return SP(e);default:xn.assertNever(t,`Unhandled reference hint: ${t}`)}}function iP(e){const t=Nw(e);t&&t!==Ee&&t!==ht&&!bv(e)&&kP(t,e)}function aP(e,t,n){const r=GE(e)?e.expression:e.left;if(yv(r)||!qD(r))return;const i=Nw(r);if(!i||i===ht)return;if(NS(A)||jS(A)&&qE(e))return void kP(i,e);const o=n||DM(r);if(Ec(o)||o===tn)return void kP(i,e);let a=t;if(!a&&!n){const t=GE(e)?e.name:e.right,n=VD(t)&&PA(t.escapedText,t),r=mp(0!==Zg(e)||EA(e)?RC(o):o);a=VD(t)?n&&FA(r,n)||void 0:Jp(r,t.escapedText)}a&&(YR(a)||8&a.flags&&306===e.parent.kind)||kP(i,e)}function lP(e){if(qD(e.expression)){const t=e.expression,n=_s(Ma(t,-1,!0,!0,e));n&&kP(n,t)}}function _P(e){if(!WF(e)){const t=ro&&2===A.jsx?va.Cannot_find_name_0:void 0,n=go(e),r=D_(e)?e.tagName:e;let i;if(EN(e)&&"null"===n||(i=je(r,n,111551,t,!0)),i&&(i.isReferenced=-1,Ie&&2097152&i.flags&&!Aa(i)&&TP(i)),EN(e)){const n=ho(Sd(e));n&&je(r,n,111551,t,!0)}}}function dP(e){if(M<2&&2&Jh(e)){PP((t=Cv(e))&&fm(t),!1)}var t}function pP(e){Bv(e,32)&&wP(e)}function yP(e){if(e.parent.parent.moduleSpecifier||e.isTypeOnly||e.parent.parent.isTypeOnly);else{const t=e.propertyName||e.name,n=je(t,t.escapedText,2998271,void 0,!0);if(n&&(n===ge||n===he||n.declarations&&Yp(kc(n.declarations[0]))));else{const t=n&&(2097152&n.flags?Ea(n):n);(!t||111551&Pa(t))&&(wP(e),iP(e.propertyName||e.name))}}}function SP(e){if(A.emitDecoratorMetadata){const t=S(e.modifiers,cE);if(!t)return;switch(xB(t,16),e.kind){case 263:const t=pv(e);if(t)for(const e of t.parameters)AP(FL(e));break;case 177:case 178:const n=177===e.kind?178:177,r=Y_(ns(e),n);AP(Pl(e)||r&&Pl(r));break;case 174:for(const t of e.parameters)AP(FL(t));AP(Cv(e));break;case 172:AP(kv(e));break;case 169:AP(FL(e));const i=e.parent;for(const e of i.parameters)AP(FL(e));AP(Cv(i))}}}function kP(e,t){if(Ie&&wa(e,111551)&&!vv(t)){const n=Ea(e);1160127&Pa(e,!0)&&(NS(A)||jS(A)&&qE(t)||!YR(_s(n)))&&TP(e)}}function TP(e){xn.assert(Ie);const t=Uo(e);if(!t.referenced){t.referenced=!0;const n=sa(e);if(!n)return xn.fail();Fm(n)&&111551&Pa(Da(e))&&iP(bb(n.moduleReference))}}function wP(e){const t=ns(e),n=Ea(t);n&&(n===ht||111551&Pa(t,!0)&&!YR(n))&&TP(t)}function PP(e,t){if(!e)return;const n=bb(e),r=2097152|(80===e.kind?788968:1920),i=je(n,n.escapedText,r,void 0,!0);if(i&&2097152&i.flags)if(Ie&&ds(i)&&!YR(Ea(i))&&!Aa(i))TP(i);else if(t&&NS(A)&&DS(A)>=5&&!ds(i)&&!Q(i.declarations,Wl)){const t=xo(e,va.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled),r=S(i.declarations||u,la);r&&fT(t,Rp(r,va._0_was_imported_here,bc(n)))}}function AP(e){const t=PL(e);t&&ou(t)&&PP(t,!0)}function IP(e,t){if(bv(e))return;if(t===Ee){if(RA(e))return void xo(e,va.arguments_cannot_be_referenced_in_property_initializers);let t=Qf(e);if(t)for(M<2&&(219===t.kind?xo(e,va.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression):Bv(t,1024)&&xo(e,va.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method)),Wo(t).flags|=512;t&&rP(t);)t=Qf(t),t&&(Wo(t).flags|=512);return}const n=_s(t),r=_R(n,e);wo(r)&&tb(e,r)&&r.declarations&&Eo(e,r.declarations,e.escapedText);const i=n.valueDeclaration;if(i&&32&n.flags&&gu(i)&&i.name!==e){let t=rm(e,!1,!1);for(;307!==t.kind&&t.parent!==i;)t=rm(t,!1,!1);307!==t.kind&&(Wo(i).flags|=262144,Wo(t).flags|=262144,Wo(e).flags|=536870912)}!function(e,t){if(M>=2||0==(34&t.flags)||!t.valueDeclaration||qN(t.valueDeclaration)||299===t.valueDeclaration.parent.kind)return;const n=Np(t.valueDeclaration),r=function(e,t){return!!mc(e,(e=>e===t?"quit":cu(e)||e.parent&&uE(e.parent)&&!zv(e.parent)&&e.parent.initializer===e))}(e,n),i=BP(n);if(i){if(r){let r=!0;if(OP(n)){const i=Eh(t.valueDeclaration,261);if(i&&i.parent===n){const i=function(e,t){return mc(e,(e=>e===t?"quit":e===t.initializer||e===t.condition||e===t.incrementor||e===t.statement))}(e.parent,n);if(i){const e=Wo(i);e.flags|=8192,fe(e.capturedBlockScopeBindings||(e.capturedBlockScopeBindings=[]),t),i===n.initializer&&(r=!1)}}}r&&(Wo(i).flags|=4096)}if(OP(n)){const r=Eh(t.valueDeclaration,261);r&&r.parent===n&&function(e,t){let n=e;for(;217===n.parent.kind;)n=n.parent;let r=!1;if(eh(n))r=!0;else if(224===n.parent.kind||225===n.parent.kind){const e=n.parent;r=46===e.operator||47===e.operator}return!!r&&!!mc(n,(e=>e===t?"quit":e===t.statement))}(e,n)&&(Wo(t.valueDeclaration).flags|=65536)}Wo(t.valueDeclaration).flags|=32768}r&&(Wo(t.valueDeclaration).flags|=16384)}(e,t)}function jP(e,t){if(bv(e))return VP(e);const n=Nw(e);if(n===ht)return Dt;if(IP(e,n),n===Ee)return RA(e)?Dt:$l(n);RP(e)&&eP(e,1);const r=_s(n);let i=r.valueDeclaration,o=function(e,t,n){var r;const i=$l(e,n),o=e.valueDeclaration;if(o){if(KE(o)&&!o.initializer&&!o.dotDotDotToken&&o.parent.elements.length>=2){const e=o.parent.parent,n=sy(e);if(260===n.kind&&6&xJ(n)||169===n.kind){const r=Wo(e);if(!(4194304&r.flags)){r.flags|=4194304;const i=Ic(e,0),a=i&&DD(i,Hd);if(r.flags&=-4194305,a&&1048576&a.flags&&(169!==n.kind||!eE(n))){const e=XD(o.parent,a,a,void 0,t.flowNode);return 131072&e.flags?en:Uc(o,e,!0)}}}}if(sE(o)&&!o.type&&!o.initializer&&!o.dotDotDotToken){const e=o.parent;if(e.parameters.length>=2&&fS(e)){const n=DF(e);if(n&&1===n.parameters.length&&JB(n)){const i=yp(eS($l(n.parameters[0]),null==(r=yF(e))?void 0:r.nonFixingMapper));if(1048576&i.flags&&xD(i,PT)&&!Q(e.parameters,eE))return Mb(XD(e,i,i,void 0,t.flowNode),ux(e.parameters.indexOf(o)-(gv(e)?1:0)))}}}}return i}(r,e,t);const a=Zg(e);if(a){if(!(3&r.flags||Mm(e)&&512&r.flags))return xo(e,384&r.flags?va.Cannot_assign_to_0_because_it_is_an_enum:32&r.flags?va.Cannot_assign_to_0_because_it_is_a_class:1536&r.flags?va.Cannot_assign_to_0_because_it_is_a_namespace:16&r.flags?va.Cannot_assign_to_0_because_it_is_a_function:2097152&r.flags?va.Cannot_assign_to_0_because_it_is_an_import:va.Cannot_assign_to_0_because_it_is_not_a_variable,Us(n)),Dt;if(oM(r))return 3&r.flags?xo(e,va.Cannot_assign_to_0_because_it_is_a_constant,Us(n)):xo(e,va.Cannot_assign_to_0_because_it_is_a_read_only_property,Us(n)),Dt}const s=2097152&r.flags;if(3&r.flags){if(1===a)return th(e)?cT(o):o}else{if(!s)return o;i=sa(n)}if(!i)return o;o=$E(o,e,t);const c=169===sy(i).kind,l=QD(i);let u=QD(e);const _=u!==l,d=e.parent&&e.parent.parent&&zN(e.parent)&&cD(e.parent.parent),p=134217728&n.flags,f=o===kt||o===ir,m=f&&235===e.parent.kind;for(;u!==l&&(218===u.kind||219===u.kind||qf(u))&&(wE(r)&&o!==ir||FE(r)&&ZD(r,e));)u=QD(u);const g=c||s||_||d||p||function(e,t){if(KE(t)){const n=mc(e,KE);return n&&sy(n)===sy(t)}}(e,i)||o!==kt&&o!==ir&&(!U||0!=(16387&o.flags)||vv(e)||Fw(e)||281===e.parent.kind)||235===e.parent.kind||260===i.kind&&i.exclamationToken||33554432&i.flags,h=m?It:g?c?function(e,t){const n=U&&169===t.kind&&t.initializer&&Qw(e,16777216)&&!function(e){const t=Wo(e);if(void 0===t.parameterInitializerContainsUndefined){if(!_c(e,8))return jl(e.symbol),!0;const n=!!Qw(PM(e,0),16777216);if(!gc())return jl(e.symbol),!0;t.parameterInitializerContainsUndefined??(t.parameterInitializerContainsUndefined=n)}return t.parameterInitializerContainsUndefined}(t);return n?Zw(e,524288):e}(o,i):o:f?It:XT(o),y=m?QT(XD(e,o,h,u)):XD(e,o,h,u);if(RD(e)||o!==kt&&o!==ir){if(!g&&!ak(o)&&ak(y))return xo(e,va.Variable_0_is_used_before_being_assigned,Us(n)),o}else if(y===kt||y===ir)return Y&&(xo(Pc(i),va.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,Us(n),Ws(y)),xo(e,va.Variable_0_implicitly_has_an_1_type,Us(n),Ws(y))),nj(y);return a?cT(y):y}function RP(e){var t;const n=e.parent;if(n){if(GE(n)&&n.expression===e)return!1;if(yN(n)&&n.isTypeOnly)return!1;const r=null==(t=n.parent)?void 0:t.parent;if(r&&gN(r)&&r.isTypeOnly)return!1}return!0}function BP(e){return mc(e,(e=>!e||cy(e)?"quit":Zu(e,!1)))}function JP(e,t){Wo(e).flags|=2,172===t.kind||176===t.kind?Wo(t.parent).flags|=4:Wo(t).flags|=4}function zP(e){return lf(e)?e:cu(e)?void 0:LI(e,zP)}function $P(e){return xu(ju(ns(e)))===Bt}function qP(e,t,n){const r=t.parent;kh(r)&&!$P(r)&&jg(e)&&e.flowNode&&!HD(e.flowNode,!1)&&xo(e,n)}function VP(e){const t=vv(e);let n=rm(e,!0,!0),r=!1,i=!1;for(176===n.kind&&qP(e,n,va.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);219===n.kind&&(n=rm(n,!1,!i),r=!0),167===n.kind;)n=rm(n,!r,!1),i=!0;if(function(e,t){uE(t)&&zv(t)&&J&&t.initializer&&Js(t.initializer,e.pos)&&Wv(t.parent)&&xo(e,va.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class)}(e,n),i)xo(e,va.this_cannot_be_referenced_in_a_computed_property_name);else switch(n.kind){case 267:xo(e,va.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 266:xo(e,va.this_cannot_be_referenced_in_current_location)}!t&&r&&M<2&&JP(e,n);const o=UP(e,!0,n);if(ee){const t=$l(he);if(o===t&&r)xo(e,va.The_containing_arrow_function_captures_the_global_value_of_this);else if(!o){const r=xo(e,va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!qN(n)){const e=UP(n);e&&e!==t&&fT(r,Rp(n,va.An_outer_value_of_this_is_shadowed_by_this_container))}}}return o||St}function UP(e,t=!0,n=rm(e,!1,!1)){const r=Mm(e);if(cu(n)&&(!bN(e)||gv(n))){let t=Kf(Cf(n))||r&&function(e){const t=tl(e);if(t&&t.typeExpression)return Sx(t.typeExpression);const n=Df(e);return n?Kf(n):void 0}(n);if(!t){const e=function(e){return 218===e.kind&&uP(e.parent)&&3===ag(e.parent)?e.parent.left.expression.expression:174===e.kind&&210===e.parent.kind&&uP(e.parent.parent)&&6===ag(e.parent.parent)?e.parent.parent.left.expression:218===e.kind&&303===e.parent.kind&&210===e.parent.parent.kind&&uP(e.parent.parent.parent)&&6===ag(e.parent.parent.parent)?e.parent.parent.parent.left.expression:218===e.kind&&BN(e.parent)&&qD(e.parent.name)&&("value"===e.parent.name.escapedText||"get"===e.parent.name.escapedText||"set"===e.parent.name.escapedText)&&HE(e.parent.parent)&&QE(e.parent.parent.parent)&&e.parent.parent.parent.arguments[2]===e.parent.parent&&9===ag(e.parent.parent.parent)?e.parent.parent.parent.arguments[0].expression:dE(e)&&qD(e.name)&&("value"===e.name.escapedText||"get"===e.name.escapedText||"set"===e.name.escapedText)&&HE(e.parent)&&QE(e.parent.parent)&&e.parent.parent.arguments[2]===e.parent&&9===ag(e.parent.parent)?e.parent.parent.arguments[0].expression:void 0}(n);if(r&&e){const n=KM(e).symbol;n&&n.members&&16&n.flags&&(t=ju(n).thisType)}else rO(n)&&(t=ju(ts(n.symbol)).thisType);t||(t=_N(n))}if(t)return XD(e,t)}if(gu(n.parent)){const t=ns(n.parent);return XD(e,Jv(n)?$l(t):ju(t).thisType)}if(qN(n)){if(n.commonJsModuleIndicator){const e=ns(n);return e&&$l(e)}if(n.externalModuleIndicator)return It;if(t)return $l(he)}}function tN(e){const t=213===e.parent.kind&&e.parent.expression===e,n=sm(e,!0);let r=n,i=!1,o=!1;if(!t){for(;r&&219===r.kind;)Bv(r,1024)&&(o=!0),r=sm(r,!0),i=M<2;r&&Bv(r,1024)&&(o=!0)}let a=0;if(!r||(s=r,!(t?176===s.kind:(gu(s.parent)||210===s.parent.kind)&&(Jv(s)?174===s.kind||173===s.kind||177===s.kind||178===s.kind||172===s.kind||175===s.kind:174===s.kind||173===s.kind||177===s.kind||178===s.kind||172===s.kind||171===s.kind||176===s.kind)))){const n=mc(e,(e=>e===r?"quit":167===e.kind));return n&&167===n.kind?xo(e,va.super_cannot_be_referenced_in_a_computed_property_name):t?xo(e,va.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):r&&r.parent&&(gu(r.parent)||210===r.parent.kind)?xo(e,va.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):xo(e,va.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),Dt}var s;if(t||176!==n.kind||qP(e,r,va.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),Jv(r)||t?(a=32,!t&&M>=2&&M<=8&&(uE(r)||pE(r))&&Fp(e.parent,(e=>{qN(e)&&!Zp(e)||(Wo(e).flags|=2097152)}))):a=16,Wo(e).flags|=a,174===r.kind&&o&&(um(e.parent)&&eh(e.parent)?Wo(r).flags|=256:Wo(r).flags|=128),i&&JP(e.parent,r),210===r.parent.kind)return M<2?(xo(e,va.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),Dt):St;const c=r.parent;if(!kh(c))return xo(e,va.super_can_only_be_referenced_in_a_derived_class),Dt;if($P(c))return t?Dt:Bt;const l=ju(ns(c)),u=l&&ku(l)[0];return u?176===r.kind&&function(e,t){return!!mc(e,(e=>uu(e)?"quit":169===e.kind&&e.parent===t))}(e,r)?(xo(e,va.super_cannot_be_referenced_in_constructor_arguments),Dt):32===a?xu(l):y_(u,l.thisType):Dt}function aN(e){return 174!==e.kind&&177!==e.kind&&178!==e.kind||210!==e.parent.kind?218===e.kind&&303===e.parent.kind?e.parent.parent:void 0:e.parent}function sN(e){return 4&wx(e)&&e.target===nr?Ig(e)[0]:void 0}function cN(e){return DD(e,(e=>2097152&e.flags?f(e.types,sN):sN(e)))}function uN(e,t){let n=e,r=t;for(;r;){const e=cN(r);if(e)return e;if(303!==n.parent.kind)break;n=n.parent.parent,r=oF(n,void 0)}}function _N(e){if(219===e.kind)return;if(fS(e)){const t=DF(e);if(t){const e=t.thisParameter;if(e)return $l(e)}}const t=Mm(e);if(ee||t){const n=aN(e);if(n){const e=oF(n,void 0),t=uN(n,e);return t?eS(t,QC(yF(n))):RC(e?QT(e):DM(n))}const r=ah(e.parent);if(mb(r)){const e=r.left;if(Ox(e)){const{expression:n}=e;if(t&&qD(n)){const e=Sd(r);if(e.commonJsModuleIndicator&&Nw(n)===e.symbol)return}return RC(DM(n))}}}}function pN(e){const t=e.parent;if(!fS(t))return;const n=cm(t);if(n&&n.arguments){const r=FI(n),i=t.parameters.indexOf(e);if(e.dotDotDotToken)return TI(r,i,r.length,St,void 0,0);const o=Wo(n),a=o.resolvedSignature;o.resolvedSignature=ti;const s=i!!(58998787&e.flags)||QM(e,n,void 0))):2&n?SD(t,(e=>!!(58998787&e.flags)||!!mL(e))):t}const i=cm(e);return i?dF(i,t):void 0}function DN(e,t){const n=FI(e).indexOf(t);return-1===n?void 0:PN(e,n)}function PN(e,t){if(uf(e))return 0===t?Jt:1===t?ty(!1):St;const n=Wo(e).resolvedSignature===ri?ri:nO(e);if(D_(e)&&0===t)return vF(n,e);const r=n.parameters.length-1;return JB(n)&&t>=r?Mb($l(n.parameters[r]),ux(t-r),256):DO(n,t)}function IN(e,t=ag(e)){if(4===t)return!0;if(!Mm(e)||5!==t||!qD(e.left.expression))return!1;const n=e.left.expression.escapedText,r=je(e.left,n,111551,void 0,!0,!0);return dm(null==r?void 0:r.valueDeclaration)}function MN(e){if(!e.symbol)return qM(e.left);if(e.symbol.valueDeclaration){const t=kv(e.symbol.valueDeclaration);if(t){const e=Sx(t);if(e)return e}}const t=ut(e.left,Ox);if(!$f(rm(t.expression,!1,!1)))return;const n=VP(t.expression),r=mg(t);return void 0!==r&&LN(n,r)||void 0}function LN(e,t,n){return DD(e,(e=>{var r,i;if(Ad(e)&&!e.declaration.nameType){const r=md(e),i=Wd(r)||r,o=n||lx(vc(t));if(SS(o,i))return Ob(e,o)}else if(3670016&e.flags){const o=Jp(e,t);if(o)return 262144&px(i=o)&&!i.links.type&&dc(i,0)>=0?void 0:bC($l(o),!!(16777216&o.flags));if(PT(e)&&WT(t)&&+t>=0){const t=jT(e,e.target.fixedLength,0,!1,!0);if(t)return t}return null==(r=of(sf(e),n||lx(vc(t))))?void 0:r.type}}),!0)}function VN(e,t){if(xn.assert($f(e)),!(67108864&e.flags))return HN(e,t)}function HN(e,t){const n=e.parent,r=BN(e)&&vN(e,t);if(r)return r;const i=oF(n,t);if(i){if(l_(e)){const t=ns(e);return LN(i,t.escapedName,Uo(t).nameType)}if(Vh(e)){const t=Pc(e);if(t&&oE(t)){const e=KM(t.expression),n=mC(e)&&LN(i,gC(e));if(n)return n}}if(e.name){const t=Tv(e.name);return DD(i,(e=>{var n;return null==(n=of(sf(e),t))?void 0:n.type}),!0)}}}function GN(e,t,n,r,i){return e&&DD(e,(e=>{if(PT(e)){if((void 0===r||ti)?n-t:0,a=o>0&&e.target.hasRestElement?Ry(e.target,3):0;return o>0&&o<=a?Ig(e)[Og(e)-o]:jT(e,void 0===r?e.target.fixedLength:Math.min(e.target.fixedLength,r),void 0===n||void 0===i?a:Math.min(a,n-i),!1,!0)}return(!r||t32&wx(e)?e:mp(e)),!0);return 1048576&t.flags&&HE(e)?function(e,t){const n=`D${IB(e)},${qy(t)}`;return fo(n)??mo(n,function(e,t){const n=qw(e),r=n&&S(t.properties,(e=>e.symbol&&303===e.kind&&e.symbol.escapedName===n&&iF(e.initializer))),i=r&&UM(r.initializer);return i&&Vw(e,i)}(t,e)??bk(t,Z(O(F(e.properties,(e=>!!e.symbol&&(303===e.kind?iF(e.initializer)&&zw(t,e.symbol.escapedName):304===e.kind&&zw(t,e.symbol.escapedName)))),(e=>[()=>UM(303===e.kind?e.initializer:e.name),e.symbol.escapedName])),O(F(Rd(t),(n=>{var r;return!!(16777216&n.flags)&&!!(null==(r=null==e?void 0:e.symbol)?void 0:r.members)&&!e.symbol.members.has(n.escapedName)&&zw(t,n.escapedName)})),(e=>[()=>It,e.escapedName]))),SS))}(e,t):1048576&t.flags&&FN(e)?function(e,t){const n=`D${IB(e)},${qy(t)}`,r=fo(n);if(r)return r;const i=XF(HF(e));return mo(n,bk(t,Z(O(F(e.properties,(e=>!!e.symbol&&291===e.kind&&zw(t,e.symbol.escapedName)&&(!e.initializer||iF(e.initializer)))),(e=>[e.initializer?()=>UM(e.initializer):()=>Kt,e.symbol.escapedName])),O(F(Rd(t),(n=>{var r;if(!(16777216&n.flags&&(null==(r=null==e?void 0:e.symbol)?void 0:r.members)))return!1;const o=e.parent.parent;return(n.escapedName!==i||!kN(o)||!vy(o.children).length)&&!e.symbol.members.has(n.escapedName)&&zw(t,n.escapedName)})),(e=>[()=>It,e.escapedName]))),SS))}(e,t):t}}function lF(e,t,n){if(e&&_M(e,465829888)){const r=yF(t);if(r&&1&n&&Q(r.inferences,BM))return uF(e,r.nonFixingMapper);if(null==r?void 0:r.returnMapper){const t=uF(e,r.returnMapper);return 1048576&t.flags&&Ky(t.types,Vt)&&Ky(t.types,Ht)?SD(t,(e=>e!==Vt&&e!==Ht)):t}}return e}function uF(e,t){return 465829888&e.flags?eS(e,t):1048576&e.flags?ev(O(e.types,(e=>uF(e,t))),0):2097152&e.flags?cv(O(e.types,(e=>uF(e,t)))):e}function dF(e,t){var n;if(67108864&e.flags)return;const r=gF(e,!t);if(r>=0)return xi[r];const{parent:i}=e;switch(i.kind){case 260:case 169:case 172:case 171:case 208:return function(e,t){const n=e.parent;if(L_(n)&&e===n.initializer){const e=vN(n,t);if(e)return e;if(!(8&t)&&Eu(n.name)&&n.name.elements.length>0)return hl(n.name,!0,!1)}}(e,t);case 219:case 253:return function(e,t){const n=Qf(e);if(n){let e=wN(n,t);if(e){const t=Jh(n);if(1&t){const n=0!=(2&t);1048576&e.flags&&(e=SD(e,(e=>!!jj(1,e,n))));const r=jj(1,e,0!=(2&t));if(!r)return;e=r}if(2&t){const t=DD(e,kL);return t&&ev([t,KO(t)])}return e}}}(e,t);case 229:return function(e,t){const n=Qf(e);if(n){const r=Jh(n);let i=wN(n,t);if(i){const n=0!=(2&r);if(!e.asteriskToken&&1048576&i.flags&&(i=SD(i,(e=>!!jj(1,e,n)))),e.asteriskToken){const r=Rj(i,n),o=(null==r?void 0:r.yieldType)??tn,a=dF(e,t)??tn,s=(null==r?void 0:r.nextType)??At,c=GO(o,a,s,!1);return n?ev([c,GO(o,a,s,!0)]):c}return jj(0,i,n)}}}(i,t);case 223:return function(e,t){const n=dF(e,t);if(n){const e=kL(n);return e&&ev([e,KO(e)])}}(i,t);case 213:case 214:return DN(i,e);case 170:return function(e){const t=VO(e);return t?Om(t):void 0}(i);case 216:case 234:return Dl(i.type)?dF(i,t):Sx(i.type);case 226:return function(e,t){const n=e.parent,{left:r,operatorToken:i,right:o}=n;switch(i.kind){case 64:case 77:case 76:case 78:return e===o?function(e){var t,n;const r=ag(e);switch(r){case 0:case 4:const i=function(e){if(p_(e)&&e.symbol)return e.symbol;if(qD(e))return Nw(e);if(GE(e)){const t=qM(e.expression);return VD(e.name)?function(e,t){const n=PA(t.escapedText,t);return n&&FA(e,n)}(t,e.name):Jp(t,e.name.escapedText)}if(XE(e)){const t=DM(e.argumentExpression);if(!mC(t))return;return Jp(qM(e.expression),gC(t))}}(e.left),o=i&&i.valueDeclaration;if(o&&(uE(o)||lE(o))){const t=kv(o);return t&&eS(Sx(t),Uo(i).mapper)||(uE(o)?o.initializer&&qM(e.left):void 0)}return 0===r?qM(e.left):MN(e);case 5:if(IN(e,r))return MN(e);if(p_(e.left)&&e.left.symbol){const t=e.left.symbol.valueDeclaration;if(!t)return;const n=ut(e.left,Ox),r=kv(t);if(r)return Sx(r);if(qD(n.expression)){const e=n.expression,t=je(e,e.escapedText,111551,void 0,!0);if(t){const e=t.valueDeclaration&&kv(t.valueDeclaration);if(e){const t=mg(n);if(void 0!==t)return LN(Sx(e),t)}return}}return Mm(t)||t===e.left?void 0:qM(e.left)}return qM(e.left);case 1:case 6:case 3:case 2:let a;2!==r&&(a=p_(e.left)?null==(t=e.left.symbol)?void 0:t.valueDeclaration:void 0),a||(a=null==(n=e.symbol)?void 0:n.valueDeclaration);const s=a&&kv(a);return s?Sx(s):void 0;case 7:case 8:case 9:return xn.fail("Does not apply");default:return xn.assertNever(r)}}(n):void 0;case 57:case 61:const i=dF(n,t);return e===o&&(i&&i.pattern||!i&&!Zm(n))?qM(r):i;case 56:case 28:return e===o?dF(n,t):void 0;default:return}}(e,t);case 303:case 304:return HN(i,t);case 305:return dF(i.parent,t);case 209:{const r=i,o=oF(r,t),a=Qd(r.elements,e),s=(n=Wo(r)).spreadIndices??(n.spreadIndices=function(e){let t,n;for(let r=0;rHk(e)?Mb(e,ux(a)):e),!0))}(n,e,t):void 0}(i,t);case 291:case 293:return XN(i,t);case 286:case 285:return function(e,t){if(CN(e)&&4!==t){const n=gF(e.parent,!t);if(n>=0)return xi[n]}return PN(e,0)}(i,t);case 301:return function(e){return LN(ny(!1),xC(e))}(i)}}function pF(e){fF(e,dF(e,void 0),!0)}function fF(e,t,n){bi[ki]=e,xi[ki]=t,Si[ki]=n,ki++}function mF(){ki--}function gF(e,t){for(let n=ki-1;n>=0;n--)if(e===bi[n]&&(t||!Si[n]))return n;return-1}function yF(e){for(let t=Di-1;t>=0;t--)if(_h(e,Ti[t]))return wi[t]}function vF(e,t){return 0!==wI(t)?function(e,t){let n=jO(e,At);n=bF(t,HF(t),n);const r=UF(hB.IntrinsicAttributes,t);return Nc(r)||(n=K_(r,n)),n}(e,t):function(e,t){const n=HF(t),r=(i=n,GF(hB.ElementAttributesPropertyNameContainer,i));var i;let o=void 0===r?jO(e,At):""===r?Gf(e):function(e,t){if(e.compositeSignatures){const n=[];for(const r of e.compositeSignatures){const e=Gf(r);if(Ec(e))return e;const i=Tc(e,t);if(!i)return;n.push(i)}return cv(n)}const n=Gf(e);return Ec(n)?n:Tc(n,t)}(e,r);if(!o)return r&&p(t.attributes.properties)&&xo(t,va.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,vc(r)),At;if(o=bF(t,n,o),Ec(o))return o;{let n=o;const r=UF(hB.IntrinsicClassAttributes,t);if(!Nc(r)){const i=nu(r.symbol),o=Gf(e);let a;a=i?eS(r,Fx(i,Tf([o],i,kf(i),Mm(t)))):r,n=K_(a,n)}const i=UF(hB.IntrinsicAttributes,t);return Nc(i)||(n=K_(i,n)),n}}(e,t)}function bF(e,t,n){const r=(i=t)&&Ho(i.exports,hB.LibraryManagedAttributes,788968);var i;if(r){const t=function(e){if(JF(e.tagName))return Om(ZI(e,ZF(e)));const t=DM(e.tagName);if(128&t.flags){const n=YF(t,e);return n?Om(ZI(e,n)):Dt}return t}(e),i=rA(r,Mm(e),t,n);if(i)return i}return n}function SF(e,t){const n=F(Vp(e,0),(e=>!function(e,t){let n=0;for(;ne!==t&&e?R_(e.typeParameters,t.typeParameters)?function(e,t){const n=e.typeParameters||t.typeParameters;let r;e.typeParameters&&t.typeParameters&&(r=Fx(t.typeParameters,e.typeParameters));const i=e.declaration,o=function(e,t,n){const r=FO(e),i=FO(t),o=r>=i?e:t,a=o===e?t:e,s=o===e?r:i,c=IO(e)||IO(t),l=c&&!IO(o),u=new Array(s+(l?1:0));for(let _=0;_=AO(o)&&_>=AO(a),h=_>=r?void 0:kO(e,_),y=_>=i?void 0:kO(t,_),v=No(1|(g&&!m?16777216:0),(h===y?h:h?y?void 0:h:y)||`arg${_}`);v.links.type=m?Ty(f):f,u[_]=v}if(l){const e=No(1,"args");e.links.type=Ty(DO(a,s)),a===t&&(e.links.type=eS(e.links.type,n)),u[s]=e}return u}(e,t,r),a=function(e,t,n){return e&&t?FC(e,ev([$l(e),eS($l(t),n)])):e||t}(e.thisParameter,t.thisParameter,r),s=x_(i,n,a,o,void 0,void 0,Math.max(e.minArgumentCount,t.minArgumentCount),167&(e.flags|t.flags));return s.compositeKind=2097152,s.compositeSignatures=Z(2097152===e.compositeKind&&e.compositeSignatures||[e],[t]),r&&(s.mapper=2097152===e.compositeKind&&e.mapper&&e.compositeSignatures?zx(e.mapper,r):r),s}(e,t):void 0:e)):void 0);var r}function TF(e){return UT(e)||$f(e)?DF(e):void 0}function DF(e){xn.assert(174!==e.kind||$f(e));const t=Df(e);if(t)return t;const n=oF(e,1);if(!n)return;if(!(1048576&n.flags))return SF(n,e);let r;const i=n.types;for(const t of i){const n=SF(t,e);if(n)if(r){if(!Jk(r[0],n,!1,!0,!0,hS))return;r.push(n)}else r=[n]}return r?1===r.length?r[0]:k_(r[0],r):void 0}function PF(e){return 208===e.kind&&!!e.initializer||226===e.kind&&64===e.operatorToken.kind}function FF(e,t,n){const r=e.elements,i=r.length,o=[],a=[];pF(e);const s=eh(e),c=AM(e),l=oF(e,void 0),u=function(e){const t=ah(e.parent);return fP(t)&&$u(t.parent)}(e)||!!l&&bD(l,(e=>Zk(e)||Ad(e)&&!e.nameType&&!!Gx(e.target||e)));let _=!1;for(let c=0;c8&a[t]?jb(e,zt)||St:e)),2):U?nn:Ot,c))}function IF(e){const t=Wo(e.expression);if(!t.resolvedType){if((CE(e.parent.parent)||gu(e.parent.parent)||XP(e.parent.parent))&&uP(e.expression)&&103===e.expression.operatorToken.kind&&177!==e.parent.kind&&178!==e.parent.kind)return t.resolvedType=Dt;if(t.resolvedType=KM(e.expression),uE(e.parent)&&!zv(e.parent)&&mP(e.parent.parent)){const t=BP(Np(e.parent.parent));t&&(Wo(t).flags|=4096,Wo(e).flags|=32768,Wo(e.parent.parent).flags|=32768)}(98304&t.resolvedType.flags||!dM(t.resolvedType,402665900)&&!SS(t.resolvedType,pn))&&xo(e,va.A_computed_property_name_must_be_of_type_string_number_symbol_or_any)}return t.resolvedType}function OF(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return WT(e.escapedName)||n&&Dc(n)&&function(e){switch(e.kind){case 167:return function(e){return dM(IF(e),296)}(e);case 80:return WT(e.escapedText);case 9:case 11:return WT(e.text);default:return!1}}(n.name)}function MF(e){var t;const n=null==(t=e.declarations)?void 0:t[0];return Yh(e)||n&&Dc(n)&&oE(n.name)&&dM(IF(n.name),4096)}function LF(e,t,n,r){const i=[];for(let e=t;e1&&n.declarations&&xo(n.declarations[0],va.The_global_type_JSX_0_may_not_have_more_than_one_property,vc(e))}}function XF(e){return GF(hB.ElementChildrenAttributeNameContainer,e)}function QF(e,t){if(4&e.flags)return[ti];if(128&e.flags){const n=YF(e,t);return n?[ZI(t,n)]:(xo(t,va.Property_0_does_not_exist_on_type_1,e.value,"JSX."+hB.IntrinsicElements),u)}const n=mp(e);let r=Vp(n,1);return 0===r.length&&(r=Vp(n,0)),0===r.length&&1048576&n.flags&&(r=F_(O(n.types,(e=>QF(e,t))))),r}function YF(e,t){const n=UF(hB.IntrinsicElements,t);if(!Nc(n)){const t=Jp(n,yc(e.value));if(t)return $l(t);return pf(n,Jt)||void 0}return St}function ZF(e){var t;xn.assert(JF(e.tagName));const n=Wo(e);if(!n.resolvedJsxElementAttributesType){const r=KF(e);if(1&n.jsxFlags)return n.resolvedJsxElementAttributesType=$l(r)||Dt;if(2&n.jsxFlags){const r=ON(e.tagName)?dC(e.tagName):e.tagName.escapedText;return n.resolvedJsxElementAttributesType=(null==(t=gf(UF(hB.IntrinsicElements,e),r))?void 0:t.type)||Dt}return n.resolvedJsxElementAttributesType=Dt}return n.resolvedJsxElementAttributesType}function eA(e){const t=UF(hB.ElementClass,e);if(!Nc(t))return t}function tA(e){return UF(hB.Element,e)}function nA(e){const t=tA(e);if(t)return ev([t,Rt])}function rA(e,t,...n){const r=ju(e);if(524288&e.flags){const i=Uo(e).typeParameters;if(p(i)>=n.length){const o=Tf(n,i,n.length,t);return 0===p(o)?r:Bg(e,o)}}if(p(r.typeParameters)>=n.length)return Tg(r,Tf(n,r.typeParameters,n.length,t))}function iA(e){const t=D_(e);var n;if(t&&function(e){(function(e){if(GE(e)&&ON(e.expression))return pJ(e.expression,va.JSX_property_access_expressions_cannot_include_JSX_namespace_names);ON(e)&&ek(A)&&!Jy(e.namespace.escapedText)&&pJ(e,va.React_components_cannot_include_JSX_namespace_names)})(e.tagName),KB(e,e.typeArguments);const t=new Map;for(const n of e.attributes.properties){if(293===n.kind)continue;const{name:e,initializer:r}=n,i=lC(e);if(t.get(i))return pJ(e,va.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);if(t.set(i,!0),r&&294===r.kind&&!r.expression)return pJ(r,va.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}(e),n=e,0===(A.jsx||0)&&xo(n,va.Cannot_use_JSX_unless_the_jsx_flag_is_provided),void 0===tA(n)&&Y&&xo(n,va.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist),eP(e,4),t){const t=e,n=nO(t);aO(n,e);const r=function(e){const t=HF(e);if(!t)return;const n=(r=t)&&Ho(r.exports,hB.ElementType,788968);var r;if(!n)return;const i=rA(n,Mm(e));return i&&!Nc(i)?i:void 0}(t);if(void 0!==r){const e=t.tagName;mk(JF(e)?lx(fC(e)):KM(e),r,co,e,va.Its_type_0_is_not_a_valid_JSX_element_type,(()=>{const t=Gd(e);return uS(void 0,va._0_cannot_be_used_as_a_JSX_component,t)}))}else!function(e,t,n){if(1===e){const e=nA(n);e&&mk(t,e,co,n.tagName,va.Its_return_type_0_is_not_a_valid_JSX_element,r)}else if(0===e){const e=eA(n);e&&mk(t,e,co,n.tagName,va.Its_instance_type_0_is_not_a_valid_JSX_element,r)}else{const e=nA(n),i=eA(n);if(!e||!i)return;mk(t,ev([e,i]),co,n.tagName,va.Its_element_type_0_is_not_a_valid_JSX_element,r)}function r(){const e=Gd(n.tagName);return uS(void 0,va._0_cannot_be_used_as_a_JSX_component,e)}}(wI(t),Gf(n),t)}}function oA(e,t,n){if(524288&e.flags&&(Ld(e,t)||gf(e,t)||s_(t)&&_f(e,Jt)||n&&BF(t)))return!0;if(33554432&e.flags)return oA(e.baseType,t,n);if(3145728&e.flags&&aA(e))for(const r of e.types)if(oA(r,t,n))return!0;return!1}function aA(e){return!!(524288&e.flags&&!(512&wx(e))||67108864&e.flags||33554432&e.flags&&aA(e.baseType)||1048576&e.flags&&Q(e.types,aA)||2097152&e.flags&&x(e.types,aA))}function cA(e){return e.valueDeclaration?xJ(e.valueDeclaration):0}function lA(e){if(8192&e.flags||4&px(e))return!0;if(Mm(e.valueDeclaration)){const t=e.valueDeclaration.parent;return t&&uP(t)&&3===ag(t)}}function pA(e,t,n,r,i,o=!0){return gA(e,t,n,r,i,o?166===e.kind?e.right:205===e.kind?e:208===e.kind&&e.propertyName?e.propertyName:e.name:void 0)}function gA(e,t,n,r,i,o){var a;const s=fx(i,n);if(t){if(M<2&&hA(i))return o&&xo(o,va.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(64&s)return o&&xo(o,va.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,Us(i),Ws(Ak(i))),!1;if(!(256&s)&&(null==(a=i.declarations)?void 0:a.some(vu)))return o&&xo(o,va.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super,Us(i)),!1}if(64&s&&hA(i)&&(_m(e)||pm(e)||VE(e.parent)&&dm(e.parent.parent))){const t=Cx(is(i));if(t&&mc(e,(e=>!!(fE(e)&&Fd(e.body)||uE(e))||!(!gu(e)&&!uu(e))&&"quit")))return o&&xo(o,va.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor,Us(i),Hh(t.name)),!1}if(!(6&s))return!0;if(2&s)return!!OR(e,Cx(is(i)))||(o&&xo(o,va.Property_0_is_private_and_only_accessible_within_class_1,Us(i),Ws(Ak(i))),!1);if(t)return!0;let c=AR(e,(e=>Ok(ju(ns(e)),i,n)));return!c&&(c=function(e){const t=function(e){const t=rm(e,!1,!1);return t&&cu(t)?gv(t):void 0}(e);let n=(null==t?void 0:t.type)&&Sx(t.type);if(n&&262144&n.flags&&(n=Jd(n)),n&&7&wx(n))return Hl(n)}(e),c=c&&Ok(c,i,n),256&s||!c)?(o&&xo(o,va.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,Us(i),Ws(Ak(i)||r)),!1):!!(256&s)||(262144&r.flags&&(r=r.isThisType?Jd(r):Wd(r)),!(!r||!Gl(r,c))||(o&&xo(o,va.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2,Us(i),Ws(c),Ws(r)),!1))}function hA(e){return!!Fk(e,(e=>!(8192&e.flags)))}function yA(e){return TA(KM(e),e)}function vA(e){return Qw(e,50331648)}function bA(e){return vA(e)?QT(e):e}function xA(e,t){const n=vb(e)?jp(e):void 0;if(106!==e.kind)if(void 0!==n&&n.length<100){if(qD(e)&&"undefined"===n)return void xo(e,va.The_value_0_cannot_be_used_here,"undefined");xo(e,16777216&t?33554432&t?va._0_is_possibly_null_or_undefined:va._0_is_possibly_undefined:va._0_is_possibly_null,n)}else xo(e,16777216&t?33554432&t?va.Object_is_possibly_null_or_undefined:va.Object_is_possibly_undefined:va.Object_is_possibly_null);else xo(e,va.The_value_0_cannot_be_used_here,"null")}function SA(e,t){xo(e,16777216&t?33554432&t?va.Cannot_invoke_an_object_which_is_possibly_null_or_undefined:va.Cannot_invoke_an_object_which_is_possibly_undefined:va.Cannot_invoke_an_object_which_is_possibly_null)}function kA(e,t,n){if(U&&2&e.flags){if(vb(t)){const e=jp(t);if(e.length<100)return xo(t,va._0_is_of_type_unknown,e),Dt}return xo(t,va.Object_is_of_type_unknown),Dt}const r=Xw(e,50331648);if(50331648&r){n(t,r);const i=QT(e);return 229376&i.flags?Dt:i}return e}function TA(e,t){return kA(e,t,xA)}function CA(e,t){const n=TA(e,t);if(16384&n.flags){if(vb(t)){const e=jp(t);if(qD(t)&&"undefined"===e)return xo(t,va.The_value_0_cannot_be_used_here,e),n;if(e.length<100)return xo(t,va._0_is_possibly_undefined,e),n}xo(t,va.Object_is_possibly_undefined)}return n}function wA(e,t,n){return 64&e.flags?function(e,t){const n=KM(e.expression),r=vC(n,e.expression);return pC(IA(e,e.expression,TA(r,e.expression),e.name,t),e,r!==n)}(e,t):IA(e,e.expression,yA(e.expression),e.name,t,n)}function DA(e,t){const n=wm(e)&&yv(e.left)?TA(VP(e.left),e.left):yA(e.left);return IA(e,e.left,n,e.right,t)}function EA(e){for(;217===e.parent.kind;)e=e.parent;return $u(e.parent)&&e.parent.expression===e}function PA(e,t){for(let n=nm(t);n;n=Zf(n)){const{symbol:t}=n,r=Qh(t,e),i=t.members&&t.members.get(r)||t.exports&&t.exports.get(r);if(i)return i}}function NA(e){if(!Tm(e))return;const t=Wo(e);return void 0===t.resolvedSymbol&&(t.resolvedSymbol=PA(e.escapedText,e)),t.resolvedSymbol}function FA(e,t){return Jp(e,t.escapedName)}function AA(e,t){return(Xc(t)||_m(e)&&Qc(t))&&rm(e,!0,!1)===Zc(t)}function IA(e,t,n,r,i,o){const a=Wo(t).resolvedSymbol,s=Zg(e),c=mp(0!==s||EA(e)?RC(n):n),l=Ec(c)||c===tn;let u,_;if(VD(r)){(M<9||M<99||!z)&&(0!==s&&xB(e,1048576),1!==s&&xB(e,524288));const t=PA(r.escapedText,r);if(s&&t&&t.valueDeclaration&&dE(t.valueDeclaration)&&pJ(r,va.Cannot_assign_to_private_method_0_Private_methods_are_not_writable,bc(r)),l){if(t)return Nc(c)?Dt:c;if(void 0===nm(r))return pJ(r,va.Private_identifiers_are_not_allowed_outside_class_bodies),St}if(u=t&&FA(n,t),void 0===u){if(function(e,t,n){let r;const i=Rd(e);i&&f(i,(e=>{const n=e.valueDeclaration;if(n&&Dc(n)&&VD(n.name)&&n.name.escapedText===t.escapedText)return r=e,!0}));const o=ea(t);if(r){const i=xn.checkDefined(r.valueDeclaration),a=xn.checkDefined(Zf(i));if(null==n?void 0:n.valueDeclaration){const r=n.valueDeclaration,s=Zf(r);if(xn.assert(!!s),mc(s,(e=>a===e)))return fT(xo(t,va.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling,o,Ws(e)),Rp(r,va.The_shadowing_declaration_of_0_is_defined_here,o),Rp(i,va.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here,o)),!0}return xo(t,va.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier,o,ea(a.name||bB)),!0}return!1}(n,r,t))return Dt;const e=nm(r);e&&Td(Sd(e),A.checkJs)&&pJ(r,va.Private_field_0_must_be_declared_in_an_enclosing_class,bc(r))}else 65536&u.flags&&!(32768&u.flags)&&1!==s&&xo(e,va.Private_accessor_was_defined_without_a_getter)}else{if(l)return qD(t)&&a&&eP(e,2,void 0,n),Nc(c)?Dt:c;u=Jp(c,r.escapedText,fM(c),166===e.kind)}if(eP(e,2,u,n),u){const n=_R(u,r);if(wo(n)&&tb(e,n)&&n.declarations&&Eo(r,n.declarations,r.escapedText),function(e,t,n){const{valueDeclaration:r}=e;if(!r||Sd(t).isDeclarationFile)return;let i;const o=bc(n);!RA(t)||function(e){return uE(e)&&!Uv(e)&&e.questionToken}(r)||Ox(t)&&Ox(t.expression)||Xo(r,n)||dE(r)&&256&bJ(r)||!z&&function(e){if(!(32&e.parent.flags))return!1;let t=$l(e.parent);for(;;){if(t=t.symbol&&BA(t),!t)return!1;const n=Jp(t,e.escapedName);if(n&&n.valueDeclaration)return!0}}(e)?263!==r.kind||183===t.parent.kind||33554432&r.flags||Xo(r,n)||(i=xo(n,va.Class_0_used_before_its_declaration,o)):i=xo(n,va.Property_0_is_used_before_its_initialization,o),i&&fT(i,Rp(r,va._0_is_declared_here,o))}(u,e,r),XA(u,e,QA(t,a)),Wo(e).resolvedSymbol=u,pA(e,108===t.kind,yx(e),c,u),aM(e,u,s))return xo(r,va.Cannot_assign_to_0_because_it_is_a_read_only_property,bc(r)),Dt;_=AA(e,u)?kt:o||hx(e)?zl(u):$l(u)}else{const t=VD(r)||0!==s&&pb(n)&&!GT(n)?void 0:gf(c,r.escapedText);if(!t||!t.type){const t=OA(e,n.symbol,!0);return!t&&Zv(n)?St:n.symbol===he?(he.exports.has(r.escapedText)&&418&he.exports.get(r.escapedText).flags?xo(r,va.Property_0_does_not_exist_on_type_1,vc(r.escapedText),Ws(n)):Y&&xo(r,va.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature,Ws(n)),St):(r.escapedText&&!na(e)&&JA(r,GT(n)?c:n,t),Dt)}t.isReadonly&&(eh(e)||uh(e))&&xo(e,va.Index_signature_in_type_0_only_permits_reading,Ws(c)),_=t.type,A.noUncheckedIndexedAccess&&1!==Zg(e)&&(_=ev([_,Mt])),A.noPropertyAccessFromIndexSignature&&GE(e)&&xo(r,va.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0,vc(r.escapedText)),t.declaration&&Do(t.declaration)&&Eo(r,[t.declaration],r.escapedText)}return jA(e,u,_,r,i)}function OA(e,t,n){var r;const i=Sd(e);if(i&&void 0===A.checkJs&&void 0===i.checkJsDirective&&(1===i.scriptKind||2===i.scriptKind)){const o=f(null==t?void 0:t.declarations,Sd),a=!(null==t?void 0:t.valueDeclaration)||!gu(t.valueDeclaration)||(null==(r=t.valueDeclaration.heritageClauses)?void 0:r.length)||bm(!1,t.valueDeclaration);return!(i!==o&&o&&Yp(o)||n&&t&&32&t.flags&&a||e&&n&&GE(e)&&110===e.expression.kind&&a)}return!1}function jA(e,t,n,r,i){const o=Zg(e);if(1===o)return bC(n,!!(t&&16777216&t.flags));if(t&&!(98311&t.flags)&&!(8192&t.flags&&1048576&n.flags)&&!hR(t.declarations))return n;if(n===kt)return rl(e,t);n=$E(n,e,i);let a=!1;if(U&&X&&Ox(e)&&110===e.expression.kind){const n=t&&t.valueDeclaration;if(n&&tR(n)&&!Jv(n)){const t=QD(e);176!==t.kind||t.parent!==n.parent||33554432&n.flags||(a=!0)}}else U&&t&&t.valueDeclaration&&GE(t.valueDeclaration)&&gg(t.valueDeclaration)&&QD(e)===QD(t.valueDeclaration)&&(a=!0);const s=XD(e,n,a?XT(n):n);return a&&!ak(n)&&ak(s)?(xo(r,va.Property_0_is_used_before_being_assigned,Us(t)),n):o?cT(s):s}function RA(e){return!!mc(e,(e=>{switch(e.kind){case 172:return!0;case 303:case 174:case 177:case 178:case 305:case 167:case 239:case 294:case 291:case 292:case 293:case 286:case 233:case 298:return!1;case 219:case 244:return!(!DP(e.parent)||!pE(e.parent.parent))||"quit";default:return!Tm(e)&&"quit"}}))}function BA(e){const t=ku(e);if(0!==t.length)return cv(t)}function JA(e,t,n){let r,i;if(!VD(e)&&1048576&t.flags&&!(402784252&t.flags))for(const n of t.types)if(!Jp(n,e.escapedText)&&!gf(n,e.escapedText)){r=uS(r,va.Property_0_does_not_exist_on_type_1,Ap(e),Ws(n));break}if(zA(e.escapedText,t)){const n=Ap(e),i=Ws(t);r=uS(r,va.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead,n,i,i+"."+n)}else{const o=gL(t);if(o&&Jp(o,e.escapedText))r=uS(r,va.Property_0_does_not_exist_on_type_1,Ap(e),Ws(t)),i=Rp(e,va.Did_you_forget_to_use_await);else{const o=Ap(e),a=Ws(t),s=function(e,t){const n=mp(t).symbol;if(!n)return;const r=Sc(n),i=ep().get(r);if(i)for(const[t,n]of i)if(D(n,e))return t}(o,t);if(void 0!==s)r=uS(r,va.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later,o,a,s);else{const s=qA(e,t);if(void 0!==s){const e=Sc(s);r=uS(r,n?va.Property_0_may_not_exist_on_type_1_Did_you_mean_2:va.Property_0_does_not_exist_on_type_1_Did_you_mean_2,o,a,e),i=s.valueDeclaration&&Rp(s.valueDeclaration,va._0_is_declared_here,e)}else{const e=function(e){return A.lib&&!A.lib.includes("dom")&&(n=e=>e.symbol&&/^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(vc(e.symbol.escapedName)),3145728&(t=e).flags?x(t.types,n):n(t))&&ik(e);var t,n}(t)?va.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:va.Property_0_does_not_exist_on_type_1;r=uS(Mp(r,t),e,o,a)}}}}const o=zp(Sd(e),e,r);i&&fT(o,i),So(!n||r.code!==va.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,o)}function zA(e,t){const n=t.symbol&&Jp($l(t.symbol),e);return void 0!==n&&!!n.valueDeclaration&&Jv(n.valueDeclaration)}function $A(e,t){return GA(e,Rd(t),106500)}function qA(e,t){let n=Rd(t);if("string"!=typeof e){const r=e.parent;GE(r)&&(n=F(n,(e=>YA(r,t,e)))),e=bc(e)}return GA(e,n,111551)}function VA(e,t){const n=st(e)?e:bc(e),r=Rd(t);return("for"===n?S(r,(e=>"htmlFor"===Sc(e))):"class"===n?S(r,(e=>"className"===Sc(e))):void 0)??GA(n,r,111551)}function UA(e,t){const n=qA(e,t);return n&&Sc(n)}function WA(e,t,n){return xn.assert(void 0!==t,"outername should always be defined"),Re(e,t,n,void 0,!1,!1)}function HA(e,t){return t.exports&&GA(bc(e),Ka(t),2623475)}function GA(e,t,n){return Ut(e,t,(function(e){const t=Sc(e);if(!an(t,'"')){if(e.flags&n)return t;if(2097152&e.flags){const r=function(e){if(Uo(e).aliasTarget!==yt)return Ea(e)}(e);if(r&&r.flags&n)return t}}}))}function XA(e,t,n){const r=e&&106500&e.flags&&e.valueDeclaration;if(!r)return;const i=Rv(r,2),o=e.valueDeclaration&&Dc(e.valueDeclaration)&&VD(e.valueDeclaration.name);if((i||o)&&(!t||!hx(t)||65536&e.flags)){if(n){const n=mc(t,uu);if(n&&n.symbol===e)return}(1&px(e)?Uo(e).target:e).isReferenced=-1}}function QA(e,t){return 110===e.kind||!!t&&vb(e)&&t===Nw(bb(e))}function YA(e,t,n){return eI(e,211===e.kind&&108===e.expression.kind,!1,t,n)}function ZA(e,t,n,r){if(Ec(r))return!0;const i=Jp(r,n);return!!i&&eI(e,t,!1,r,i)}function eI(e,t,n,r,i){if(Ec(r))return!0;if(i.valueDeclaration&&Zl(i.valueDeclaration)){const t=Zf(i.valueDeclaration);return!Sl(e)&&!!mc(e,(e=>e===t))}return gA(e,t,n,r,i)}function tI(e){const t=e.initializer;if(261===t.kind){const e=t.declarations[0];if(e&&!Eu(e.name))return ns(e)}else if(80===t.kind)return Nw(t)}function nI(e,t,n){const r=0!==Zg(e)||EA(e)?RC(t):t,i=e.argumentExpression,o=KM(i);if(Nc(r)||r===tn)return r;if(fM(r)&&!$_(i))return xo(i,va.A_const_enum_member_can_only_be_accessed_using_a_string_literal),Dt;const a=function(e){const t=lh(e);if(80===t.kind){const r=Nw(t);if(3&r.flags){let t=e,i=e.parent;for(;i;){if(249===i.kind&&t===i.statement&&tI(i)===r&&1===cf(n=qM(i.expression)).length&&_f(n,zt))return!0;t=i,i=i.parent}}}var n;return!1}(i)?zt:o,s=Zg(e);let c;0===s?c=32:(c=4|(pb(r)&&!GT(r)?2:0),2===s&&(c|=32));const l=jb(r,a,c,e)||Dt;return uL(jA(e,Wo(e).resolvedSymbol,l,i,n),e)}function rI(e){return $u(e)||ZE(e)||D_(e)}function iI(e){return rI(e)&&f(e.typeArguments,yR),215===e.kind?KM(e.template):D_(e)?KM(e.attributes):uP(e)?KM(e.left):$u(e)&&f(e.arguments,(e=>{KM(e)})),ti}function oI(e){return iI(e),ni}function aI(e){return!!e&&(230===e.kind||237===e.kind&&e.isSpread)}function uI(e){return T(e,aI)}function dI(e){return!!(16384&e.flags)}function pI(e){return!!(49155&e.flags)}function fI(e,t,n,r=!1){let i,o=!1,a=FO(n),s=AO(n);if(215===e.kind)if(i=t.length,228===e.template.kind){const t=De(e.template.templateSpans);o=Nd(t.literal)||!!t.literal.isUnterminated}else{const t=e.template;xn.assert(15===t.kind),o=!!t.isUnterminated}else if(170===e.kind)i=AI(e,n);else if(226===e.kind)i=1;else if(D_(e)){if(o=e.attributes.end===e.end,o)return!0;i=0===s?t.length:1,a=0===t.length?a:1,s=Math.min(s,1)}else{if(!e.arguments)return xn.assert(214===e.kind),0===AO(n);{i=r?t.length+1:t.length,o=e.arguments.end===e.end;const a=uI(t);if(a>=0)return a>=AO(n)&&(IO(n)||aa)return!1;if(o||i>=s)return!0;for(let t=i;t=r&&t.length<=n}function gI(e,t){let n;return!!(e.target&&(n=EO(e.target,t))&&lb(n))}function hI(e){return vI(e,0,!1)}function yI(e){return vI(e,0,!1)||vI(e,1,!1)}function vI(e,t,n){if(524288&e.flags){const r=Od(e);if(n||0===r.properties.length&&0===r.indexInfos.length){if(0===t&&1===r.callSignatures.length&&0===r.constructSignatures.length)return r.callSignatures[0];if(1===t&&1===r.constructSignatures.length&&0===r.callSignatures.length)return r.constructSignatures[0]}}}function bI(e,t,n,r){const i=UC(e.typeParameters,e,0,r),o=OO(t),a=n&&(o&&262144&o.flags?n.nonFixingMapper:n.mapper);return qC(a?Ux(t,a):t,e,((e,t)=>{xw(i.inferences,e,t)})),n||VC(t,e,((e,t)=>{xw(i.inferences,e,t,128)})),hm(e,Ew(i),Mm(t.declaration))}function xI(e){if(!e)return Zt;const t=KM(e);return Pb(e)?t:kl(e.parent)?QT(t):Sl(e.parent)?_C(t):t}function SI(e,t,n,r,i){if(D_(e))return function(e,t,n,r){const i=vF(t,e),o=wM(e.attributes,i,r,n);return xw(r.inferences,o,i),Ew(r)}(e,t,r,i);if(170!==e.kind&&226!==e.kind){const n=x(t.typeParameters,(e=>!!np(e))),r=dF(e,n?8:0);if(r){const o=Gf(t);if(ZC(o)){const a=yF(e);if(n||dF(e,8)===r){const e=QC(function(e,t=0){return e&&KC(O(e.inferences,XC),e.signature,e.flags|t,e.compareTypes)}(a,1)),t=eS(r,e),n=hI(t),s=n&&n.typeParameters?Om(ym(n,n.typeParameters)):t;xw(i.inferences,s,o,128)}const s=UC(t.typeParameters,t,i.flags),c=eS(r,a&&a.returnMapper);xw(s.inferences,c,o),i.returnMapper=Q(s.inferences,RM)?QC(function(e){const t=F(e.inferences,RM);return t.length?KC(O(t,XC),e.signature,e.flags,e.compareTypes):void 0}(s)):void 0}}}const o=MO(t),a=o?Math.min(FO(t)-1,n.length):n.length;if(o&&262144&o.flags){const e=S(i.inferences,(e=>e.typeParameter===o));e&&(e.impliedArity=T(n,aI,a)<0?n.length-a:void 0)}const s=Kf(t);if(s&&ZC(s)){const t=PI(e);xw(i.inferences,xI(t),s)}for(let e=0;e=n-1){const t=e[n-1];if(aI(t)){const e=237===t.kind?t.type:wM(t.expression,r,i,o);return Hk(e)?kI(e):Ty(fj(33,e,It,230===t.kind?t.expression:t),a)}}const s=[],c=[],l=[];for(let u=t;uuS(void 0,va.Type_0_does_not_satisfy_the_constraint_1):void 0,l=r||va.Type_0_does_not_satisfy_the_constraint_1;s||(s=Fx(o,a));const u=a[e];if(!PS(u,y_(eS(i,s),u),n?t[e]:void 0,l,c))return}}return a}function wI(e){if(JF(e.tagName))return 2;const t=mp(KM(e.tagName));return p(Vp(t,1))?0:p(Vp(t,0))?1:2}function DI(e){return vP(e=lh(e))?lh(e.expression):e}function EI(e,t,n,r,i,o,a,s){const c={errors:void 0,skipLogging:!0};if(D_(e))return function(e,t,n,r,i,o,a){const s=vF(t,e),c=wM(e.attributes,s,void 0,r),l=4&r?AC(c):c;return function(){var t;if(WF(e))return!0;const n=!CN(e)&&!TN(e)||JF(e.tagName)||ON(e.tagName)?void 0:KM(e.tagName);if(!n)return!0;const r=Vp(n,0);if(!p(r))return!0;const o=fB(e);if(!o)return!0;const s=Ma(o,111551,!0,!1,e);if(!s)return!0;const c=Vp($l(s),0);if(!p(c))return!0;let l=!1,u=0;for(const e of c){const t=Vp(DO(e,0),0);if(p(t))for(const e of t){if(l=!0,IO(e))return!0;const t=FO(e);t>u&&(u=t)}}if(!l)return!0;let _=1/0;for(const e of r){const t=AO(e);t<_&&(_=t)}if(_<=u)return!0;if(i){const n=Rp(e.tagName,va.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3,jp(e.tagName),_,jp(o),u),r=null==(t=JR(e.tagName))?void 0:t.valueDeclaration;r&&fT(n,Rp(r,va._0_is_declared_here,jp(e.tagName))),a&&a.skipLogging&&(a.errors||(a.errors=[])).push(n),a.skipLogging||ro.add(n)}return!1}()&&OS(l,s,n,i?e.tagName:void 0,e.attributes,void 0,o,a)}(e,n,r,i,o,a,c)?void 0:(xn.assert(!o||!!c.errors,"jsx should have errors when reporting errors"),c.errors||u);const l=Kf(n);if(l&&l!==Zt&&!(YE(e)||QE(e)&&um(e.expression))){const t=PI(e),n=xI(t),i=o?t||e:void 0,s=va.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1;if(!mk(n,l,r,i,s,a,c))return xn.assert(!o||!!c.errors,"this parameter should have errors when reporting errors"),c.errors||u}const _=va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1,d=MO(n),f=d?Math.min(FO(n)-1,t.length):t.length;for(let e=0;e{n.push(e.expression)})),n}if(170===e.kind)return function(e){const t=e.expression,n=VO(e);if(n){const e=[];for(const r of n.parameters){const n=$l(r);e.push(NI(t,n))}return e}return xn.fail()}(e);if(226===e.kind)return[e.left];if(D_(e))return e.attributes.properties.length>0||CN(e)&&e.parent.children.length>0?[e.attributes]:u;const t=e.arguments||u,n=uI(t);if(n>=0){const e=t.slice(0,n);for(let r=n;r{var o;const a=i.target.elementFlags[r],s=NI(n,4&a?Ty(t):t,!!(12&a),null==(o=i.target.labeledElementDeclarations)?void 0:o[r]);e.push(s)})):e.push(n)}return e}return t}function AI(e,t){return A.experimentalDecorators?function(e,t){switch(e.parent.kind){case 263:case 231:return 1;case 172:return Uv(e.parent)?3:2;case 174:case 177:case 178:return t.parameters.length<=2?2:3;case 169:return 3;default:return xn.fail()}}(e,t):Math.min(Math.max(FO(t),1),2)}function II(e){const t=Sd(e),{start:n,length:r}=Qp(t,GE(e.expression)?e.expression.name:e.expression);return{start:n,length:r,sourceFile:t}}function OI(e,t,...n){if(QE(e)){const{sourceFile:r,start:i,length:o}=II(e);return"message"in t?aS(r,i,o,t,...n):Up(r,t)}return"message"in t?Rp(e,t,...n):zp(Sd(e),e,t)}function MI(e,t,n,r){var i;const o=uI(n);if(o>-1)return Rp(n[o],va.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);let a,s=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;for(const e of t){const t=AO(e),r=FO(e);tl&&(l=t),n.length1&&(T=P(m,ao,h,w)),T||(T=P(m,co,h,w)),T)return T;if(T=function(e,t,n,r,i){return xn.assert(t.length>0),SR(e),r||1===t.length||t.some((e=>!!e.typeParameters))?function(e,t,n,r){const i=function(e,t){let n=-1,r=-1;for(let i=0;i=t)return i;a>r&&(r=a,n=i)}return n}(t,void 0===ye?n.length:ye),o=t[i],{typeParameters:a}=o;if(!a)return o;const s=rI(e)?e.typeArguments:void 0,c=s?vm(o,function(e,t,n){const r=e.map(zR);for(;r.length>t.length;)r.pop();for(;r.lengthe.thisParameter));let n;t.length&&(n=JI(t,t.map(xO)));const{min:r,max:i}=mT(e,BI),o=[];for(let t=0;tJB(e)?tEO(e,t)))))}const a=q(e,(e=>JB(e)?De(e.parameters):void 0));let s=128;if(0!==a.length){const t=Ty(ev(q(e,lm),2));o.push($I(a,t)),s|=1}return e.some(zB)&&(s|=2),x_(e[0].declaration,void 0,n,o,cv(e.map(Gf)),void 0,r,s)}(t)}(e,m,g,!!n,r),Wo(e).resolvedSignature=T,_)if(!o&&l&&(o=va.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method),y)if(1===y.length||y.length>3){const t=y[y.length-1];let n;y.length>3&&(n=uS(n,va.The_last_overload_gave_the_following_error),n=uS(n,va.No_overload_matches_this_call)),o&&(n=uS(n,o));const r=EI(e,g,t,co,0,!0,(()=>n),void 0);if(r)for(const e of r)t.declaration&&y.length>3&&fT(e,Rp(t.declaration,va.The_last_overload_is_declared_here)),E(t,e),ro.add(e);else xn.fail("No error for last overload signature")}else{const t=[];let n=0,r=Number.MAX_VALUE,i=0,a=0;for(const o of y){const s=EI(e,g,o,co,0,!0,(()=>uS(void 0,va.Overload_0_of_1_2_gave_the_following_error,a+1,m.length,Ks(o))),void 0);s?(s.length<=r&&(r=s.length,i=a),n=Math.max(n,s.length),t.push(s)):xn.fail("No error for 3 or fewer overload signatures"),a++}const s=n>1?t[i]:j(t);xn.assert(s.length>0,"No errors reported for 3 or fewer overload signatures");let c=uS(O(s,Kp),va.No_overload_matches_this_call);o&&(c=uS(c,o));const l=[...R(s,(e=>e.relatedInformation))];let u;if(x(s,(e=>e.start===s[0].start&&e.length===s[0].length&&e.file===s[0].file))){const{file:e,start:t,length:n}=s[0];u={file:e,start:t,length:n,code:c.code,category:c.category,messageText:c,relatedInformation:l}}else u=zp(Sd(e),$u(D=e)?GE(D.expression)?D.expression.name:D.expression:ZE(D)?GE(D.tag)?D.tag.name:D.tag:D_(D)?D.tagName:D,c,l);E(y[0],u),ro.add(u)}else if(v)ro.add(MI(e,[v],g,o));else if(k)CI(k,e.typeArguments,!0,o);else{const n=F(t,(e=>mI(e,d)));0===n.length?ro.add(function(e,t,n,r){const i=n.length;if(1===t.length){const o=t[0],a=kf(o.typeParameters),s=p(o.typeParameters);if(r){let t=uS(void 0,va.Expected_0_type_arguments_but_got_1,ai?a=Math.min(a,t):n1?S(s,(e=>uu(e)&&Fd(e.body))):void 0;if(c){const e=Cf(c),n=!e.typeParameters;P([e],co,n)&&fT(t,Rp(c,va.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible))}y=i,v=o,k=a}function P(t,n,r,i=!1){var o,a,s;if(y=void 0,v=void 0,k=void 0,r){const r=t[0];if(Q(d)||!fI(e,g,r,i))return;return EI(e,g,r,n,0,!1,void 0,void 0)?void(y=[r]):r}for(let r=0;re===t))&&(u=(s=u).typeParameters?s.implementationSignatureCache||(s.implementationSignatureCache=function(e){return e.typeParameters?Ux(e,Fx([],[])):e}(s)):s),Q(d)){if(n=CI(u,d,!1),!n){k=u;continue}}else l=UC(u.typeParameters,u,Mm(e)?2:0),n=Dx(SI(e,u,g,8|C,l),l.nonFixingMapper),C|=4&l.flags?8:0;if(c=hm(u,n,Mm(u.declaration),l&&l.inferredTypeParameters),MO(u)&&!fI(e,g,c,i)){v=c;continue}}else c=u;if(!EI(e,g,c,n,C,!1,void 0,l)){if(C){if(C=0,l&&(c=hm(u,Dx(SI(e,u,g,C,l),l.mapper),Mm(u.declaration),l.inferredTypeParameters),MO(u)&&!fI(e,g,c,i))){v=c;continue}if(EI(e,g,c,n,C,!1,void 0,l)){(y||(y=[])).push(c);continue}}return t[r]=c,c}(y||(y=[])).push(c)}}}}function BI(e){const t=e.parameters.length;return JB(e)?t-1:t}function JI(e,t){return $I(e,ev(t,2))}function $I(e,t){return FC(Te(e),t)}function VI(e){return!(!e.typeParameters||!lB(Gf(e)))}function UI(e,t,n,r){return Ec(e)||Ec(t)&&!!(262144&e.flags)||!n&&!r&&!(1048576&t.flags)&&!(131072&Sp(t).flags)&&SS(e,Wn)}function KI(e,t,n){let r=yA(e.expression);if(r===tn)return ii;if(r=mp(r),Nc(r))return oI(e);if(Ec(r))return e.typeArguments&&xo(e,va.Untyped_function_calls_may_not_accept_type_arguments),iI(e);const i=Vp(r,1);if(i.length){if(!function(e,t){if(!t||!t.declaration)return!0;const n=t.declaration,r=Hv(n,6);if(!r||176!==n.kind)return!0;const i=Cx(n.parent.symbol),o=ju(n.parent.symbol);if(!OR(e,i)){const t=Zf(e);if(t&&4&r){const e=zR(t);if(HI(n.parent.symbol,e))return!0}return 2&r&&xo(e,va.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,Ws(o)),4&r&&xo(e,va.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,Ws(o)),!1}return!0}(e,i[0]))return oI(e);if(WI(i,(e=>!!(4&e.flags))))return xo(e,va.Cannot_create_an_instance_of_an_abstract_class),oI(e);const o=r.symbol&&Cx(r.symbol);return o&&Bv(o,64)?(xo(e,va.Cannot_create_an_instance_of_an_abstract_class),oI(e)):RI(e,i,t,n,0)}const o=Vp(r,0);if(o.length){const r=RI(e,o,t,n,0);return Y||(r.declaration&&!rO(r.declaration)&&Gf(r)!==Zt&&xo(e,va.Only_a_void_function_can_be_called_with_the_new_keyword),Kf(r)===Zt&&xo(e,va.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),r}return XI(e.expression,r,1),oI(e)}function WI(e,t){return ot(e)?Q(e,(e=>WI(e,t))):1048576===e.compositeKind?Q(e.compositeSignatures,t):t(e)}function HI(e,t){const n=ku(t);if(!p(n))return!1;const r=n[0];if(2097152&r.flags){const t=W_(r.types);let n=0;for(const i of r.types){if(!t[n]&&3&wx(i)){if(i.symbol===e)return!0;if(HI(e,i))return!0}n++}return!1}return r.symbol===e||HI(e,r)}function GI(e,t,n){let r;const i=0===n,o=SL(t),a=o&&Vp(o,n).length>0;if(1048576&t.flags){const e=t.types;let o=!1;for(const a of e)if(0!==Vp(a,n).length){if(o=!0,r)break}else if(r||(r=uS(r,i?va.Type_0_has_no_call_signatures:va.Type_0_has_no_construct_signatures,Ws(a)),r=uS(r,i?va.Not_all_constituents_of_type_0_are_callable:va.Not_all_constituents_of_type_0_are_constructable,Ws(t))),o)break;o||(r=uS(void 0,i?va.No_constituent_of_type_0_is_callable:va.No_constituent_of_type_0_is_constructable,Ws(t))),r||(r=uS(r,i?va.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:va.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,Ws(t)))}else r=uS(r,i?va.Type_0_has_no_call_signatures:va.Type_0_has_no_construct_signatures,Ws(t));let s=i?va.This_expression_is_not_callable:va.This_expression_is_not_constructable;if(QE(e.parent)&&0===e.parent.arguments.length){const{resolvedSymbol:t}=Wo(e);t&&32768&t.flags&&(s=va.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without)}return{messageChain:uS(r,s),relatedMessage:a?va.Did_you_forget_to_use_await:void 0}}function XI(e,t,n,r){const{messageChain:i,relatedMessage:o}=GI(e,t,n),a=zp(Sd(e),e,i);if(o&&fT(a,Rp(e,o)),QE(e.parent)){const{start:t,length:n}=II(e.parent);a.start=t,a.length=n}ro.add(a),YI(t,n,r?fT(a,r):a)}function YI(e,t,n){if(!e.symbol)return;const r=Uo(e.symbol).originatingImport;if(r&&!uf(r)){const i=Vp($l(Uo(e.symbol).target),t);if(!i||!i.length)return;fT(n,Rp(r,va.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead))}}function ZI(e,t){const n=HF(e),r=n&&Ga(n),i=r&&Ho(r,hB.Element,788968),o=i&&se.symbolToEntityName(i,788968,e),a=YC.createFunctionTypeNode(void 0,[YC.createParameterDeclaration(void 0,void 0,"props",void 0,se.typeToTypeNode(t,e))],o?YC.createTypeReferenceNode(o,void 0):YC.createKeywordTypeNode(133)),s=No(1,"props");return s.links.type=t,x_(a,void 0,void 0,[s],i?ju(i):Dt,void 0,1,0)}function eO(e,t,n){if(JF(e.tagName)){const t=ZF(e),n=ZI(e,t);return IS(wM(e.attributes,vF(n,e),void 0,0),t,e.tagName,e.attributes),p(e.typeArguments)&&(f(e.typeArguments,yR),ro.add(Bp(Sd(e),e.typeArguments,va.Expected_0_type_arguments_but_got_1,0,p(e.typeArguments)))),n}const r=KM(e.tagName),i=mp(r);if(Nc(i))return oI(e);const o=QF(r,e);return UI(r,i,o.length,0)?iI(e):0===o.length?(xo(e.tagName,va.JSX_element_type_0_does_not_have_any_construct_or_call_signatures,Gd(e.tagName)),oI(e)):RI(e,o,t,n,0)}function tO(e,t,n){switch(e.kind){case 213:return function(e,t,n){if(108===e.expression.kind){const r=tN(e.expression);if(Ec(r)){for(const t of e.arguments)KM(t);return ti}if(!Nc(r)){const i=Sh(Zf(e));if(i)return RI(e,bu(r,i.typeArguments,i),t,n,0)}return iI(e)}let r,i=KM(e.expression);if(xl(e)){const t=vC(i,e.expression);r=t===i?0:Cl(e)?16:8,i=t}else r=0;if(i=kA(i,e.expression,SA),i===tn)return ii;const o=mp(i);if(Nc(o))return oI(e);const a=Vp(o,0),s=Vp(o,1).length;if(UI(i,o,a.length,s))return!Nc(i)&&e.typeArguments&&xo(e,va.Untyped_function_calls_may_not_accept_type_arguments),iI(e);if(!a.length){if(s)xo(e,va.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Ws(i));else{let t;if(1===e.arguments.length){const n=Sd(e).text;Za(n.charCodeAt(as(n,e.expression.end,!0)-1))&&(t=Rp(e.expression,va.Are_you_missing_a_semicolon))}XI(e.expression,o,0,t)}return oI(e)}return 8&n&&!e.typeArguments&&a.some(VI)?(jM(e,n),ri):a.some((e=>Mm(e.declaration)&&!!$c(e.declaration)))?(xo(e,va.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,Ws(i)),oI(e)):RI(e,a,t,n,r)}(e,t,n);case 214:return KI(e,t,n);case 215:return function(e,t,n){const r=KM(e.tag),i=mp(r);if(Nc(i))return oI(e);const o=Vp(i,0),a=Vp(i,1).length;if(UI(r,i,o.length,a))return iI(e);if(!o.length){if(WE(e.parent)){const t=Rp(e.tag,va.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked);return ro.add(t),oI(e)}return XI(e.tag,i,0),oI(e)}return RI(e,o,t,n,0)}(e,t,n);case 170:return function(e,t,n){const r=KM(e.expression),i=mp(r);if(Nc(i))return oI(e);const o=Vp(i,0),a=Vp(i,1).length;if(UI(r,i,o.length,a))return iI(e);if(s=e,(c=o).length&&x(c,(e=>0===e.minArgumentCount&&!JB(e)&&e.parameters.length!!e.typeParameters&&mI(e,n))),(e=>{const t=CI(e,n,!0);return t?hm(e,t,Mm(e.declaration)):e}))}}function yO(e,t,n){const r=KM(e,n),i=Sx(t);return Nc(i)?i:(IS(r,i,mc(t.parent,(e=>238===e.kind||350===e.kind)),e,va.Type_0_does_not_satisfy_the_expected_type_1),r)}function vO(e){switch(e.keywordToken){case 102:return ey();case 105:const t=bO(e);return Nc(t)?Dt:function(e){const t=No(0,"NewTargetExpression"),n=No(4,"target",8);n.parent=t,n.links.type=e;const r=ed([n]);return t.members=r,ks(t,r,u,u,u)}(t);default:xn.assertNever(e.keywordToken)}}function bO(e){const t=am(e);return t?176===t.kind?$l(ns(t.parent)):$l(ns(t)):(xo(e,va.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,"new.target"),Dt)}function xO(e){const t=e.valueDeclaration;return Hc($l(e),!1,!!t&&(L_(t)||iC(t)))}function SO(e,t,n="arg"){return e?(xn.assert(qD(e.name)),e.name.escapedText):`${n}_${t}`}function kO(e,t,n){const r=e.parameters.length-(JB(e)?1:0);if(t=r-1)return t===r-1?o:Ty(Mb(o,zt));const a=[],s=[],c=[];for(let n=t;n!(1&e))),i=r<0?n.target.fixedLength:r;i>0&&(t=e.parameters.length-1+i)}}if(void 0===t){if(!n&&32&e.flags)return 0;t=e.minArgumentCount}if(r)return t;for(let n=t-1;n>=0&&!(131072&SD(DO(e,n),dI).flags);n--)t=n;e.resolvedMinArgumentCount=t}return e.resolvedMinArgumentCount}function IO(e){if(JB(e)){const t=$l(e.parameters[e.parameters.length-1]);return!PT(t)||t.target.hasRestElement}return!1}function OO(e){if(JB(e)){const t=$l(e.parameters[e.parameters.length-1]);if(!PT(t))return Ec(t)?rr:t;if(t.target.hasRestElement)return Ly(t,t.target.fixedLength)}}function MO(e){const t=OO(e);return!t||qk(t)||Ec(t)?void 0:t}function LO(e){return jO(e,en)}function jO(e,t){return e.parameters.length>0?DO(e,0):t}function RO(e,t,n){const r=e.parameters.length-(JB(e)?1:0);for(let i=0;i=0);const i=fE(e.parent)?$l(ns(e.parent.parent)):VR(e.parent),o=fE(e.parent)?It:UR(e.parent),a=ux(r),s=Oo("target",i),c=Oo("propertyKey",o),l=Oo("parameterIndex",a);n.decoratorSignature=CL(void 0,void 0,[s,c,l],Zt);break}case 174:case 177:case 178:case 172:{const e=t;if(!gu(e.parent))break;const r=Oo("target",VR(e)),i=Oo("propertyKey",UR(e)),o=uE(e)?Zt:Sy(zR(e));if(!uE(t)||Uv(t)){const t=Oo("descriptor",Sy(zR(e)));n.decoratorSignature=CL(void 0,void 0,[r,i,t],ev([o,Zt]))}else n.decoratorSignature=CL(void 0,void 0,[r,i],ev([o,Zt]));break}}return n.decoratorSignature===ti?void 0:n.decoratorSignature}(e):qO(e)}function UO(e){const t=_y(!0);return t!==An?Tg(t,[e=kL(bL(e))||At]):At}function KO(e){const t=dy(!0);return t!==An?Tg(t,[e=kL(bL(e))||At]):At}function WO(e,t){const n=UO(t);return n===At?(xo(e,uf(e)?va.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:va.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option),Dt):(py(!0)||xo(e,uf(e)?va.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:va.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option),n)}function HO(e,t){if(!e.body)return Dt;const n=Jh(e),r=0!=(2&n),i=0!=(1&n);let o,a,s,c=Zt;if(241!==e.body.kind)o=DM(e.body,t&&-9&t),r&&(o=bL(hL(o,!1,e,va.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)));else if(i){const n=eM(e,t);n?n.length>0&&(o=ev(n,2)):c=en;const{yieldTypes:r,nextTypes:i}=function(e,t){const n=[],r=[],i=0!=(2&Jh(e));return Nf(e.body,(e=>{const o=e.expression?KM(e.expression,t):Ot;let a;if(fe(n,XO(e,o,St,i)),e.asteriskToken){const t=xj(o,i?19:17,e.expression);a=t&&t.nextType}else a=dF(e,void 0);a&&fe(r,a)})),{yieldTypes:n,nextTypes:r}}(e,t);a=Q(r)?ev(r,2):void 0,s=Q(i)?cv(i):void 0}else{const r=eM(e,t);if(!r)return 2&n?WO(e,en):en;if(0===r.length){const t=wN(e,void 0),r=t&&32768&(Bj(t,n)||Zt).flags?It:Zt;return 2&n?WO(e,r):r}o=ev(r,2)}if(o||a||s){if(a&&$C(e,a,3),o&&$C(e,o,1),s&&$C(e,s,2),o&&iT(o)||a&&iT(a)||s&&iT(s)){const t=TF(e),n=t?t===Cf(e)?i?void 0:o:lF(Gf(t),e,void 0):void 0;i?(a=kT(a,n,0,r),o=kT(o,n,1,r),s=kT(s,n,2,r)):o=function(e,t,n){return e&&iT(e)&&(e=bT(e,t?n?gL(t):t:void 0)),e}(o,n,r)}a&&(a=RC(a)),o&&(o=RC(o)),s&&(s=RC(s))}return i?GO(a||en,o||c,s||xN(2,e)||At,r):r?UO(o||c):o||c}function GO(e,t,n,r){const i=r?_i:di,o=i.getGlobalGeneratorType(!1);if(e=i.resolveIterationType(e,void 0)||At,t=i.resolveIterationType(t,void 0)||At,n=i.resolveIterationType(n,void 0)||At,o===An){const r=i.getGlobalIterableIteratorType(!1),o=r!==An?Cj(r,i):void 0,a=o?o.returnType:St,s=o?o.nextType:It;return SS(t,a)&&SS(s,n)?r!==An?xy(r,[e]):(i.getGlobalIterableIteratorType(!0),wn):(i.getGlobalGeneratorType(!0),wn)}return xy(o,[e,t,n])}function XO(e,t,n,r){const i=e.expression||e,o=e.asteriskToken?fj(r?19:17,t,n,i):t;return r?SL(o,i,e.asteriskToken?va.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:va.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):o}function QO(e,t,n){let r=0;for(let i=0;i=t?n[i]:void 0;r|=void 0!==o?wB.get(o)||32768:0}return r}function YO(e){const t=Wo(e);if(void 0===t.isExhaustive){t.isExhaustive=0;const n=function(e){if(221===e.expression.kind){const t=hD(e);if(!t)return!1;const n=Hd(DM(e.expression.expression)),r=QO(0,0,t);return 3&n.flags?556800==(556800&r):!bD(n,(e=>Xw(e,r)===r))}const t=DM(e.expression);if(!sT(t))return!1;const n=gD(e);return!(!n.length||Q(n,rT))&&(r=DD(t,sx),i=n,1048576&r.flags?!f(r.types,(e=>!D(i,e))):D(i,r));var r,i}(e);0===t.isExhaustive&&(t.isExhaustive=n)}else 0===t.isExhaustive&&(t.isExhaustive=!1);return t.isExhaustive}function ZO(e){return e.endFlowNode&&UD(e.endFlowNode)}function eM(e,t){const n=Jh(e),r=[];let i=ZO(e),o=!1;if(Pf(e.body,(a=>{let s=a.expression;if(s){if(s=lh(s,!0),2&n&&223===s.kind&&(s=lh(s.expression,!0)),213===s.kind&&80===s.expression.kind&&DM(s.expression).symbol===ts(e.symbol)&&(!UT(e.symbol.valueDeclaration)||GD(s.expression)))return void(o=!0);let i=DM(s,t&&-9&t);2&n&&(i=bL(hL(i,!1,e,va.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member))),131072&i.flags&&(o=!0),fe(r,i)}else i=!0})),0!==r.length||i||!o&&!function(e){switch(e.kind){case 218:case 219:return!0;case 174:return 210===e.parent.kind;default:return!1}}(e))return!(U&&r.length&&i)||rO(e)&&r.some((t=>t.symbol===e.symbol))||fe(r,It),r}function tM(e,t){a((function(){const n=Jh(e),r=t&&Bj(t,n);if(r&&(_M(r,16384)||32769&r.flags))return;if(173===e.kind||Nd(e.body)||241!==e.body.kind||!ZO(e))return;const i=1024&e.flags,o=Cv(e)||e;if(r&&131072&r.flags)xo(o,va.A_function_returning_never_cannot_have_a_reachable_end_point);else if(r&&!i)xo(o,va.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value);else if(r&&U&&!SS(It,r))xo(o,va.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(A.noImplicitReturns){if(!r){if(!i)return;const t=Gf(Cf(e));if(Jj(e,t))return}xo(o,va.Not_all_code_paths_return_a_value)}}))}function nM(e,t){if(xn.assert(174!==e.kind||$f(e)),SR(e),nP(e)&&tj(e,e.name),t&&4&t&&lS(e)){if(!Cv(e)&&!$T(e)){const n=DF(e);if(n&&ZC(Gf(n))){const n=Wo(e);if(n.contextFreeType)return n.contextFreeType;const r=HO(e,t),i=x_(void 0,void 0,void 0,u,r,void 0,0,64),o=ks(e.symbol,w,[i],u,u);return o.objectFlags|=262144,n.contextFreeType=o}}return In}return UB(e)||218!==e.kind||XB(e),function(e,t){const n=Wo(e);if(!(64&n.flags)){const r=DF(e);if(!(64&n.flags)){n.flags|=64;const i=Se(Vp($l(ns(e)),0));if(!i)return;if(lS(e))if(r){const n=yF(e);let o;if(t&&2&t){RO(i,r,n);const e=OO(r);e&&262144&e.flags&&(o=Ux(r,n.nonFixingMapper))}o||(o=n?Ux(r,n.mapper):r),function(e,t){if(t.typeParameters){if(e.typeParameters)return;e.typeParameters=t.typeParameters}if(t.thisParameter){const n=e.thisParameter;(!n||n.valueDeclaration&&!n.valueDeclaration.type)&&(n||(e.thisParameter=FC(t.thisParameter,void 0)),BO(e.thisParameter,$l(t.thisParameter)))}const n=e.parameters.length-(JB(e)?1:0);for(let r=0;re.parameters.length){const n=yF(e);t&&2&t&&RO(i,r,n)}if(r&&!Xf(e)&&!i.resolvedReturnType){const n=HO(e,t);i.resolvedReturnType||(i.resolvedReturnType=n)}XM(e)}}}(e,t),$l(ns(e))}function rM(e,t,n,r=!1){if(!SS(t,mn)){const i=r&&mL(t);return To(e,!!i&&SS(i,mn),n),!1}return!0}function iM(e){if(!QE(e))return!1;if(!sg(e))return!1;const t=DM(e.arguments[2]);if(Tc(t,"value")){const e=Jp(t,"writable"),n=e&&$l(e);if(!n||n===qt||n===Vt)return!0;if(e&&e.valueDeclaration&&BN(e.valueDeclaration)){const t=KM(e.valueDeclaration.initializer);if(t===qt||t===Vt)return!0}return!1}return!Jp(t,"set")}function oM(e){return!!(8&px(e)||4&e.flags&&8&fx(e)||3&e.flags&&6&cA(e)||98304&e.flags&&!(65536&e.flags)||8&e.flags||Q(e.declarations,iM))}function aM(e,t,n){var r,i;if(0===n)return!1;if(oM(t)){if(4&t.flags&&Ox(e)&&110===e.expression.kind){const n=Qf(e);if(!n||176!==n.kind&&!rO(n))return!0;if(t.valueDeclaration){const e=uP(t.valueDeclaration),o=n.parent===t.valueDeclaration.parent,a=n===t.valueDeclaration.parent,s=e&&(null==(r=t.parent)?void 0:r.valueDeclaration)===n.parent,c=e&&(null==(i=t.parent)?void 0:i.valueDeclaration)===n;return!(o||a||s||c)}}return!0}if(Ox(e)){const t=lh(e.expression);if(80===t.kind){const e=Wo(t).resolvedSymbol;if(2097152&e.flags){const t=sa(e);return!!t&&274===t.kind}}}return!1}function sM(e,t,n){const r=fA(e,7);return 80===r.kind||Ox(r)?!(64&r.flags&&(xo(e,n),1)):(xo(e,t),!1)}function cM(e){let t=!1;const n=tm(e);if(n&&pE(n))xo(e,sP(e)?va.await_expression_cannot_be_used_inside_a_class_static_block:va.await_using_statements_cannot_be_used_inside_a_class_static_block),t=!0;else if(!(65536&e.flags))if(om(e)){const n=Sd(e);if(!uJ(n)){let r;if(!hp(n,A)){r??(r=Gp(n,e.pos));const i=sP(e)?va.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:va.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module,o=aS(n,r.start,r.length,i);ro.add(o),t=!0}switch(B){case 100:case 199:if(1===n.impliedNodeFormat){r??(r=Gp(n,e.pos)),ro.add(aS(n,r.start,r.length,va.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level)),t=!0;break}case 7:case 99:case 200:case 4:if(M>=4)break;default:r??(r=Gp(n,e.pos));const i=sP(e)?va.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher:va.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;ro.add(aS(n,r.start,r.length,i)),t=!0}}}else{const r=Sd(e);if(!uJ(r)){const i=Gp(r,e.pos),o=sP(e)?va.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:va.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules,a=aS(r,i.start,i.length,o);n&&176!==n.kind&&0==(2&Jh(n))&&fT(a,Rp(n,va.Did_you_mean_to_mark_this_function_as_async)),ro.add(a),t=!0}}return sP(e)&&bN(e)&&(xo(e,va.await_expressions_cannot_be_used_in_a_parameter_initializer),t=!0),t}function lM(e){return _M(e,2112)?dM(e,3)||_M(e,296)?mn:$t:zt}function uM(e,t){if(_M(e,t))return!0;const n=Hd(e);return!!n&&_M(n,t)}function _M(e,t){if(e.flags&t)return!0;if(3145728&e.flags){const n=e.types;for(const e of n)if(_M(e,t))return!0}return!1}function dM(e,t,n){return!!(e.flags&t)||!(n&&114691&e.flags)&&(!!(296&t)&&SS(e,zt)||!!(2112&t)&&SS(e,$t)||!!(402653316&t)&&SS(e,Jt)||!!(528&t)&&SS(e,Xt)||!!(16384&t)&&SS(e,Zt)||!!(131072&t)&&SS(e,en)||!!(65536&t)&&SS(e,Rt)||!!(32768&t)&&SS(e,It)||!!(4096&t)&&SS(e,Qt)||!!(67108864&t)&&SS(e,cn))}function pM(e,t,n){return 1048576&e.flags?x(e.types,(e=>pM(e,t,n))):dM(e,t,n)}function fM(e){return!!(16&wx(e))&&!!e.symbol&&mM(e.symbol)}function mM(e){return 0!=(128&e.flags)}function gM(e){const t=Dj("hasInstance");if(pM(e,67108864)){const n=Jp(e,t);if(n){const e=$l(n);if(e&&0!==Vp(e,0).length)return e}}}function hM(e,t,n,r,i=!1){const o=e.properties,a=o[n];if(303===a.kind||304===a.kind){const e=a.name,n=Tv(e);if(mC(n)){const e=Jp(t,gC(n));e&&(XA(e,a,i),pA(a,!1,!0,t,e))}const r=Rc(a,Mb(t,n,32,e));return vM(304===a.kind?a:a.initializer,r)}if(305===a.kind){if(!(nLy(e,n))):Ty(r),i);xo(o.operatorToken,va.A_rest_element_cannot_have_an_initializer)}}}function vM(e,t,n,r){let i;if(304===e.kind){const r=e;r.objectAssignmentInitializer&&(U&&!Qw(KM(r.objectAssignmentInitializer),16777216)&&(t=Zw(t,524288)),function(e,t,n,r,i){const o=t.kind;if(64===o&&(210===e.kind||209===e.kind))return vM(e,KM(n,r),r,110===n.kind);let a;a=ub(o)?_j(e,r):KM(e,r);SM(e,t,n,a,KM(n,r),r,void 0)}(r.name,r.equalsToken,r.objectAssignmentInitializer,n)),i=e.name}else i=e;return 226===i.kind&&64===i.operatorToken.kind&&(oe(i,n),i=i.left,U&&(t=Zw(t,524288))),210===i.kind?function(e,t,n){const r=e.properties;if(U&&0===r.length)return TA(t,e);for(let i=0;idM(t,e)&&dM(n,e))),St}return 65===c&&p(h),h;case 30:case 32:case 33:case 34:return d(c)&&(r=_T(TA(r,e)),i=_T(TA(i,n)),f(((e,t)=>{if(Ec(e)||Ec(t))return!0;const n=SS(e,mn),r=SS(t,mn);return n&&r||!n&&!r&&CS(e,t)}))),Xt;case 35:case 36:case 37:case 38:if(!(o&&64&o)){if((Jl(e)||Jl(n))&&(!Mm(e)||37===c||38===c)){const e=35===c||37===c;xo(s,va.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value,e?"false":"true")}!function(e,t,n,r){const i=g(lh(n)),o=g(lh(r));if(i||o){const a=xo(e,va.This_condition_will_always_return_0,Ra(37===t||35===t?97:112));if(i&&o)return;const s=38===t||36===t?Ra(54):"",c=i?r:n,l=lh(c);fT(a,Rp(c,va.Did_you_mean_0,`${s}Number.isNaN(${vb(l)?jp(l):"..."})`))}}(s,c,e,n),f(((e,t)=>xM(e,t)||xM(t,e)))}return Xt;case 104:return function(e,t,n,r,i){if(n===tn||r===tn)return tn;!Ec(n)&&pM(n,402784252)&&xo(e,va.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),xn.assert(Eb(e.parent));const o=nO(e.parent,void 0,i);return o===ri?tn:(PS(Gf(o),Xt,t,va.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression),Xt)}(e,n,r,i,o);case 103:return function(e,t,n,r){return n===tn||r===tn?tn:(VD(e)?((M<9||M<99||!z)&&xB(e,2097152),!Wo(e).resolvedSymbol&&Zf(e)&&JA(e,r,OA(e,r.symbol,!0))):PS(TA(n,e),pn,e),PS(TA(r,t),cn,t)&&bD(r,(e=>e===Nn||!!(2097152&e.flags)&&ok(Hd(e))))&&xo(t,va.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator,Ws(r)),Xt)}(e,n,r,i);case 56:case 77:{const e=Qw(r,4194304)?ev([(u=U?r:cT(i),DD(u,zT)),i]):r;return 77===c&&p(i),e}case 57:case 76:{const e=Qw(r,8388608)?ev([QT(JT(r)),i],2):r;return 76===c&&p(i),e}case 61:case 78:{const e=Qw(r,262144)?ev([QT(r),i],2):r;return 78===c&&p(i),e}case 64:const y=uP(e.parent)?ag(e.parent):0;return function(e,t){if(2===e)for(const e of Md(t)){const t=$l(e);if(t.symbol&&32&t.symbol.flags){const t=e.escapedName,n=je(e.valueDeclaration,t,788968,void 0,!1);(null==n?void 0:n.declarations)&&n.declarations.some(wF)&&(zo(n,va.Duplicate_identifier_0,vc(t),e),zo(e,va.Duplicate_identifier_0,vc(t),n))}}}(y,i),function(t){var r;switch(t){case 2:return!0;case 1:case 5:case 6:case 3:case 4:const t=rs(e),i=Qm(n);return!!i&&HE(i)&&!!(null==(r=null==t?void 0:t.exports)?void 0:r.size);default:return!1}}(y)?(524288&i.flags&&(2===y||6===y||ik(i)||Gw(i)||1&wx(i))||p(i),r):(p(i),i);case 28:if(!A.allowUnreachableCode&&bM(e)&&!(217===(l=e.parent).parent.kind&&TD(l.left)&&"0"===l.left.text&&(QE(l.parent.parent)&&l.parent.parent.expression===l.parent||215===l.parent.parent.kind)&&(Ox(l.right)||qD(l.right)&&"eval"===l.right.escapedText))){const t=Sd(e),n=as(t.text,e.pos);t.parseDiagnostics.some((e=>e.code===va.JSX_expressions_must_have_one_parent_element.code&&Bs(e,n)))||xo(e,va.Left_side_of_comma_operator_is_unused_and_has_no_side_effects)}return i;default:return xn.fail()}var l,u;function _(e,t){return dM(e,2112)&&dM(t,2112)}function d(t){const o=uM(r,12288)?e:uM(i,12288)?n:void 0;return!o||(xo(o,va.The_0_operator_cannot_be_applied_to_type_symbol,Ra(t)),!1)}function p(i){db(c)&&a((function(){let o=r;if(LJ(t.kind)&&211===e.kind&&(o=wA(e,void 0,!0)),sM(e,va.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,va.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)){let t;if(ie&&GE(e)&&_M(i,32768)){const n=Tc(qM(e.expression),e.name.escapedText);yk(i,n)&&(t=va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target)}IS(i,o,e,n,t)}}))}function f(e){return!e(r,i)&&(m(e),!0)}function m(e){let n=!1;const o=s||t;if(e){const t=kL(r),o=kL(i);n=!(t===r&&o===i)&&!(!t||!o)&&e(t,o)}let a=r,c=i;!n&&e&&([a,c]=function(e,t,n){let r=e,i=t;const o=cT(e),a=cT(t);return n(o,a)||(r=o,i=a),[r,i]}(r,i,e));const[l,u]=Hs(a,c);(function(e,n,r,i){switch(t.kind){case 37:case 35:case 38:case 36:return To(e,n,va.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap,r,i);default:return}})(o,n,l,u)||To(o,n,va.Operator_0_cannot_be_applied_to_types_1_and_2,Ra(t.kind),l,u)}function g(e){if(qD(e)&&"NaN"===e.escapedText){const t=Br||(Br=Rh("NaN",!1));return!!t&&t===Nw(e)}return!1}}function kM(e){const t=e.parent;return tP(t)&&kM(t)||XE(t)&&t.argumentExpression===e}function TM(e){const t=[e.head.text],n=[];for(const r of e.templateSpans){const e=KM(r.expression);uM(e,12288)&&xo(r.expression,va.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String),t.push(r.literal.text),n.push(SS(e,hn)?e:Jt)}const r=215!==e.parent.kind&&_e(e).value;return r?ax(lx(r)):AM(e)||kM(e)||bD(dF(e,void 0)||At,CM)?Ov(t,n):Jt}function CM(e){return!!(134217856&e.flags||58982400&e.flags&&_M(Wd(e)||At,402653316))}function wM(e,t,n,r){const i=function(e){return FN(e)&&!TN(e.parent)?e.parent.parent:e}(e);fF(i,t,!1),function(e,t){Ti[Di]=e,wi[Di]=t,Di++}(i,n);const o=KM(e,1|r|(n?2:0));n&&n.intraExpressionInferenceSites&&(n.intraExpressionInferenceSites=void 0);const a=_M(o,2944)&&FM(o,lF(t,e,void 0))?sx(o):o;return Di--,mF(),a}function DM(e,t){if(t)return KM(e,t);const n=Wo(e);if(!n.resolvedType){const r=mi,i=Qr;mi=gi,Qr=void 0,n.resolvedType=KM(e,t),Qr=i,mi=r}return n.resolvedType}function EM(e){return 216===(e=lh(e,!0)).kind||234===e.kind||_A(e)}function PM(e,t,n){const r=Gm(e);if(Mm(e)){const n=cC(e);if(n)return yO(r,n,t)}const i=VM(r)||(n?wM(r,n,void 0,t||0):DM(r,t));return sE(e)&&207===e.name.kind&&PT(i)&&!i.target.hasRestElement&&Og(i)FM(e,t)));if(58982400&t.flags){const n=Wd(t)||At;return _M(n,4)&&_M(e,128)||_M(n,8)&&_M(e,256)||_M(n,64)&&_M(e,2048)||_M(n,4096)&&_M(e,8192)||FM(e,n)}return!!(406847616&t.flags&&_M(e,128)||256&t.flags&&_M(e,256)||2048&t.flags&&_M(e,2048)||512&t.flags&&_M(e,512)||8192&t.flags&&_M(e,8192))}return!1}function AM(e){const t=e.parent;return Qu(t)&&Dl(t.type)||_A(t)&&Dl(dA(t))||pO(e)&&zd(dF(e,0))||(tP(t)||WE(t)||fP(t))&&AM(t)||(BN(t)||JN(t)||CP(t))&&AM(t.parent)}function IM(e,t,n){const r=KM(e,t,n);return AM(e)||Lf(e)?sx(r):EM(e)?r:bT(r,lF(dF(e,void 0),e,void 0))}function OM(e,t){return 167===e.name.kind&&IF(e.name),IM(e.initializer,t)}function MM(e,t){return rJ(e),167===e.name.kind&&IF(e.name),LM(e,nM(e,t),t)}function LM(e,t,n){if(n&&10&n){const r=vI(t,0,!0),i=vI(t,1,!0),o=r||i;if(o&&o.typeParameters){const t=oF(e,2);if(t){const i=vI(QT(t),r?0:1,!1);if(i&&!i.typeParameters){if(8&n)return jM(e,n),In;const t=yF(e),r=t.signature&&Gf(t.signature),a=r&&yI(r);if(a&&!a.typeParameters&&!x(t.inferences,RM)){const e=function(e,t){const n=[];let r,i;for(const o of t){const t=o.symbol.escapedName;if(JM(e.inferredTypeParameters,t)||JM(n,t)){const a=ys(No(262144,zM(Z(e.inferredTypeParameters,n),t)));a.target=o,r=ue(r,o),i=ue(i,a),n.push(a)}else n.push(o)}if(i){const e=Fx(r,i);for(const t of i)t.mapper=e}return n}(t,o.typeParameters),n=ym(o,e),r=O(t.inferences,(e=>GC(e.typeParameter)));if(qC(n,i,((e,t)=>{xw(r,e,t,0,!0)})),Q(r,RM)&&(VC(n,i,((e,t)=>{xw(r,e,t)})),!function(e,t){for(let n=0;ne&&O(e.inferences,(e=>e.typeParameter)))).slice())}}}}return t}function jM(e,t){2&t&&(yF(e).flags|=4)}function RM(e){return!(!e.candidates&&!e.contraCandidates)}function BM(e){return!!(e.candidates||e.contraCandidates||rp(e.typeParameter))}function JM(e,t){return Q(e,(e=>e.symbol.escapedName===t))}function zM(e,t){let n=t.length;for(;n>1&&t.charCodeAt(n-1)>=48&&t.charCodeAt(n-1)<=57;)n--;const r=t.slice(0,n);for(let t=1;;t++){const n=r+t;if(!JM(e,n))return n}}function $M(e){const t=hI(e);if(t&&!t.typeParameters)return Gf(t)}function qM(e){const t=VM(e);if(t)return t;if(268435456&e.flags&&Qr){const t=Qr[IB(e)];if(t)return t}const n=vi,r=KM(e,64);return vi!==n&&((Qr||(Qr=[]))[IB(e)]=r,IT(e,268435456|e.flags)),r}function VM(e){let t=lh(e,!0);if(_A(t)){const e=dA(t);if(!Dl(e))return Sx(e)}if(t=lh(e),sP(t)){const e=VM(t.expression);return e?SL(e):void 0}return!QE(t)||108===t.expression.kind||Jm(t,!0)||cO(t)?Qu(t)&&!Dl(t.type)?Sx(t.type):Bl(e)||_u(e)?KM(e):void 0:xl(t)?function(e){const t=KM(e.expression),n=vC(t,e.expression),r=$M(t);return r&&pC(r,e,n!==t)}(t):$M(yA(t.expression))}function UM(e){const t=Wo(e);if(t.contextFreeType)return t.contextFreeType;fF(e,St,!1);const n=t.contextFreeType=KM(e,4);return mF(),n}function KM(i,o,s){var c,l;null==(c=or)||c.push(or.Phase.Check,"checkExpression",{kind:i.kind,pos:i.pos,end:i.end,path:i.tracingPath});const _=r;r=i,h=0;const d=function(e,r,i){const o=e.kind;if(t)switch(o){case 231:case 218:case 219:t.throwIfCancellationRequested()}switch(o){case 80:return jP(e,r);case 81:return function(e){!function(e){if(!Zf(e))return pJ(e,va.Private_identifiers_are_not_allowed_outside_class_bodies);if(!MP(e.parent)){if(!Tm(e))return pJ(e,va.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);const t=uP(e.parent)&&103===e.parent.operatorToken.kind;NA(e)||t||pJ(e,va.Cannot_find_name_0,bc(e))}}(e);const t=NA(e);return t&&XA(t,void 0,!1),St}(e);case 110:return VP(e);case 108:return tN(e);case 106:return Bt;case 15:case 11:return uw(e)?Ct:ax(lx(e.text));case 9:return gJ(e),ax(ux(+e.text));case 10:return function(e){if(!(JE(e.parent)||cP(e.parent)&&JE(e.parent.parent))&&M<7&&pJ(e,va.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020));}(e),ax(_x({negative:!1,base10Value:xT(e.text)}));case 112:return Kt;case 97:return qt;case 228:return TM(e);case 14:return function(e){const t=Wo(e);return 1&t.flags||(t.flags|=1,a((()=>function(e){const t=Sd(e);if(!uJ(t)&&!e.isUnterminated){let r;n??(n=Cs(99,!0)),n.setScriptTarget(t.languageVersion),n.setLanguageVariant(t.languageVariant),n.setOnError(((e,i,o)=>{const a=n.getTokenEnd();if(3===e.category&&r&&a===r.start&&i===r.length){const n=nS(t.fileName,t.text,a,i,e,o);fT(r,n)}else r&&a===r.start||(r=aS(t,a,i,e,o),ro.add(r))})),n.setText(t.text,e.pos,e.end-e.pos);try{return n.scan(),xn.assert(14===n.reScanSlashToken(!0),"Expected scanner to rescan RegularExpressionLiteral"),!!r}finally{n.setText(""),n.setOnError(void 0)}}return!1}(e)))),tr}(e);case 209:return FF(e,r,i);case 210:return function(e,t=0){var n;const r=eh(e);!function(e,t){const n=new Map;for(const r of e.properties){if(305===r.kind){if(t){const e=lh(r.expression);if(WE(e)||HE(e))return pJ(r.expression,va.A_rest_element_cannot_contain_a_binding_pattern)}continue}const e=r.name;if(167===e.kind&&GB(e),304===r.kind&&!t&&r.objectAssignmentInitializer&&pJ(r.equalsToken,va.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern),81===e.kind&&pJ(e,va.Private_identifiers_are_not_allowed_outside_class_bodies),cI(r)&&r.modifiers)for(const e of r.modifiers)!iu(e)||134===e.kind&&174===r.kind||pJ(e,va._0_modifier_cannot_be_used_here,Gd(e));else if(LA(r)&&r.modifiers)for(const e of r.modifiers)iu(e)&&pJ(e,va._0_modifier_cannot_be_used_here,Gd(e));let i;switch(r.kind){case 304:case 303:YB(r.exclamationToken,va.A_definite_assignment_assertion_is_not_permitted_in_this_context),QB(r.questionToken,va.An_object_member_cannot_be_declared_optional),9===e.kind&&gJ(e),i=4;break;case 174:i=8;break;case 177:i=1;break;case 178:i=2;break;default:xn.assertNever(r,"Unexpected syntax kind:"+r.kind)}if(!t){const t=vJ(e);if(void 0===t)continue;const r=n.get(t);if(r)if(8&i&&8&r)pJ(e,va.Duplicate_identifier_0,Gd(e));else if(4&i&&4&r)pJ(e,va.An_object_literal_cannot_have_multiple_properties_with_the_same_name,Gd(e));else{if(!(3&i&&3&r))return pJ(e,va.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);if(3===r||i===r)return pJ(e,va.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);n.set(t,i|r)}else n.set(t,i)}}}(e,r);const i=U?ed():void 0;let o=ed(),a=[],s=wn;pF(e);const c=oF(e,void 0),l=c&&c.pattern&&(206===c.pattern.kind||210===c.pattern.kind),_=AM(e),d=_?8:0,p=Mm(e)&&!Lm(e),f=p?el(e):void 0,m=!c&&p&&!f;let g=8192,h=!1,y=!1,v=!1,b=!1;for(const t of e.properties)t.name&&oE(t.name)&&IF(t.name);let x=0;for(const n of e.properties){let u=ns(n);const m=n.name&&167===n.name.kind?IF(n.name):void 0;if(303===n.kind||304===n.kind||$f(n)){let o=303===n.kind?OM(n,t):304===n.kind?IM(!r&&n.objectAssignmentInitializer?n.objectAssignmentInitializer:n.name,t):MM(n,t);if(p){const e=Kc(n);e?(PS(o,e,n),o=e):f&&f.typeExpression&&PS(o,Sx(f.typeExpression),n)}g|=458752&wx(o);const a=m&&mC(m)?m:void 0,s=a?No(4|u.flags,gC(a),4096|d):No(4|u.flags,u.escapedName,d);if(a&&(s.links.nameType=a),r)(303===n.kind&&PF(n.initializer)||304===n.kind&&n.objectAssignmentInitializer)&&(s.flags|=16777216);else if(l&&!(512&wx(c))){const e=Jp(c,u.escapedName);e?s.flags|=16777216&e.flags:_f(c,Jt)||xo(n.name,va.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Us(u),Ws(c))}if(s.declarations=u.declarations,s.parent=u.parent,u.valueDeclaration&&(s.valueDeclaration=u.valueDeclaration),s.links.type=o,s.links.target=u,u=s,null==i||i.set(s.escapedName,s),c&&2&t&&!(4&t)&&(303===n.kind||174===n.kind)&&lS(n)){const t=yF(e);xn.assert(t),HC(t,303===n.kind?n.initializer:n,o)}}else{if(305===n.kind){M<2&&xB(n,2),a.length>0&&(s=nx(s,S(),e.symbol,g,_),a=[],o=ed(),y=!1,v=!1,b=!1);const r=Sp(KM(n.expression,2&t));if(RF(r)){const t=tx(r,_);if(i&&qF(t,i,n),x=a.length,Nc(s))continue;s=nx(s,t,e.symbol,g,_)}else xo(n,va.Spread_types_may_only_be_created_from_object_types),s=Dt;continue}xn.assert(177===n.kind||178===n.kind),SR(n)}!m||8576&m.flags?o.set(u.escapedName,u):SS(m,pn)&&(SS(m,zt)?v=!0:SS(m,Qt)?b=!0:y=!0,r&&(h=!0)),a.push(u)}if(mF(),l){const t=mc(c.pattern.parent,(e=>260===e.kind||226===e.kind||169===e.kind));if(305!==mc(e,(e=>e===t||305===e.kind)).kind)for(const e of Rd(c))o.get(e.escapedName)||Jp(s,e.escapedName)||(16777216&e.flags||xo(e.valueDeclaration||(null==(n=lt(e,td))?void 0:n.links.bindingElement),va.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),o.set(e.escapedName,e),a.push(e))}return Nc(s)?Dt:s!==wn?(a.length>0&&(s=nx(s,S(),e.symbol,g,_),a=[],o=ed(),y=!1,v=!1),DD(s,(e=>e===wn?S():e))):S();function S(){const t=[];y&&t.push(LF(e,x,a,Jt)),v&&t.push(LF(e,x,a,zt)),b&&t.push(LF(e,x,a,Qt));const n=ks(e.symbol,o,u,u,t);return n.objectFlags|=131200|g,m&&(n.objectFlags|=4096),h&&(n.objectFlags|=512),r&&(n.pattern=e),n}}(e,r);case 211:return wA(e,r);case 166:return DA(e,r);case 212:return function(e,t){return 64&e.flags?function(e,t){const n=KM(e.expression),r=vC(n,e.expression);return pC(nI(e,TA(r,e.expression),t),e,r!==n)}(e,t):nI(e,yA(e.expression),t)}(e,r);case 213:if(102===e.expression.kind)return function(e){if(function(e){if(A.verbatimModuleSyntax&&1===B)return pJ(e,va.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(5===B)return pJ(e,va.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext);if(e.typeArguments)return pJ(e,va.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);const t=e.arguments;if(99!==B&&199!==B&&100!==B&&(EB(t),t.length>1))return pJ(t[1],va.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext);if(0===t.length||t.length>2)return pJ(e,va.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);const n=S(t,fP);n&&pJ(n,va.Argument_of_dynamic_import_cannot_be_spread_element)}(e),0===e.arguments.length)return WO(e,St);const t=e.arguments[0],n=DM(t),r=e.arguments.length>1?DM(e.arguments[1]):void 0;for(let t=2;tcM(e)));const t=KM(e.expression),n=hL(t,!0,e,va.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);return n!==t||Nc(n)||3&t.flags||So(!1,Rp(e,va.await_has_no_effect_on_the_type_of_this_expression)),n}(e);case 224:return function(e){const t=KM(e.operand);if(t===tn)return tn;switch(e.operand.kind){case 9:switch(e.operator){case 41:return ax(ux(-e.operand.text));case 40:return ax(ux(+e.operand.text))}break;case 10:if(41===e.operator)return ax(_x({negative:!0,base10Value:xT(e.operand.text)}))}switch(e.operator){case 40:case 41:case 55:return TA(t,e.operand),uM(t,12288)&&xo(e.operand,va.The_0_operator_cannot_be_applied_to_type_symbol,Ra(e.operator)),40===e.operator?(uM(t,2112)&&xo(e.operand,va.Operator_0_cannot_be_applied_to_type_1,Ra(e.operator),Ws(cT(t))),zt):lM(t);case 54:uj(t,e.operand);const n=Xw(t,12582912);return 4194304===n?qt:8388608===n?Kt:Xt;case 46:case 47:return rM(e.operand,TA(t,e.operand),va.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&sM(e.operand,va.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,va.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),lM(t)}return Dt}(e);case 225:return function(e){const t=KM(e.operand);return t===tn?tn:(rM(e.operand,TA(t,e.operand),va.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&sM(e.operand,va.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,va.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),lM(t))}(e);case 226:return oe(e,r);case 227:return function(e,t){const n=_j(e.condition,t);return lj(e.condition,n,e.whenTrue),ev([KM(e.whenTrue,t),KM(e.whenFalse,t)],2)}(e,r);case 230:return function(e,t){return M<2&&xB(e,A.downlevelIteration?1536:1024),fj(33,KM(e.expression,t),It,e.expression)}(e,r);case 232:return Ot;case 229:return function(e){a((function(){16384&e.flags||_J(e,va.A_yield_expression_is_only_allowed_in_a_generator_body),bN(e)&&xo(e,va.yield_expressions_cannot_be_used_in_a_parameter_initializer)}));const t=Qf(e);if(!t)return St;const n=Jh(t);if(!(1&n))return St;const r=0!=(2&n);e.asteriskToken&&(r&&M<5&&xB(e,26624),!r&&M<2&&A.downlevelIteration&&xB(e,256));let i=Xf(t);i&&1048576&i.flags&&(i=SD(i,(e=>QM(e,n,void 0))));const o=i&&Rj(i,r),s=o&&o.yieldType||St,c=o&&o.nextType||St,l=r?SL(c)||St:c,u=e.expression?KM(e.expression):Ot,_=XO(e,u,l,r);if(i&&_&&IS(_,s,e.expression||e,e.expression),e.asteriskToken)return gj(r?19:17,1,u,e.expression)||St;if(i)return jj(2,i,r)||St;let d=xN(2,t);return d||(d=St,a((()=>{if(Y&&!BT(e)){const t=dF(e,void 0);t&&!Ec(t)||xo(e,va.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation)}}))),d}(e);case 237:return function(e){return e.isSpread?Mb(e.type,zt):e.type}(e);case 294:return function(e,t){if(function(e){e.expression&&uA(e.expression)&&pJ(e.expression,va.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array)}(e),e.expression){const n=KM(e.expression,t);return e.dotDotDotToken&&n!==St&&!qk(n)&&xo(e,va.JSX_spread_child_must_be_an_array_type),n}return Dt}(e,r);case 284:case 285:return function(e,t){return SR(e),tA(e)||St}(e);case 288:return function(e){iA(e.openingFragment);const t=Sd(e);return!ek(A)||!A.jsxFactory&&!t.pragmas.has("jsx")||A.jsxFragmentFactory||t.pragmas.has("jsxfrag")||xo(e,A.jsxFactory?va.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:va.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments),$F(e),tA(e)||St}(e);case 292:return function(e,t){return function(e,t=0){const n=e.attributes,r=dF(n,0),i=U?ed():void 0;let o,a=ed(),s=Dn,c=!1,l=!1,_=2048;const d=XF(HF(e));for(const e of n.properties){const u=e.symbol;if(NN(e)){const o=zF(e,t);_|=458752&wx(o);const s=No(4|u.flags,u.escapedName);if(s.declarations=u.declarations,s.parent=u.parent,u.valueDeclaration&&(s.valueDeclaration=u.valueDeclaration),s.links.type=o,s.links.target=u,a.set(s.escapedName,s),null==i||i.set(s.escapedName,s),lC(e.name)===d&&(l=!0),r){const t=Jp(r,u.escapedName);t&&t.declarations&&wo(t)&&qD(e.name)&&Eo(e.name,t.declarations,e.name.escapedText)}if(r&&2&t&&!(4&t)&&lS(e)){const t=yF(n);xn.assert(t),HC(t,e.initializer.expression,o)}}else{xn.assert(293===e.kind),a.size>0&&(s=nx(s,f(),n.symbol,_,!1),a=ed());const r=Sp(KM(e.expression,2&t));Ec(r)&&(c=!0),RF(r)?(s=nx(s,r,n.symbol,_,!1),i&&qF(r,i,e)):(xo(e.expression,va.Spread_types_may_only_be_created_from_object_types),o=o?cv([o,r]):r)}}c||a.size>0&&(s=nx(s,f(),n.symbol,_,!1));const p=284===e.parent.kind?e.parent:void 0;if(p&&p.openingElement===e&&vy(p.children).length>0){const r=$F(p,t);if(!c&&d&&""!==d){l&&xo(n,va._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,vc(d));const t=oF(e.attributes,void 0),i=t&&LN(t,d),o=No(4,d);o.links.type=1===r.length?r[0]:i&&bD(i,Zk)?Ay(r):Ty(ev(r)),o.valueDeclaration=YC.createPropertySignature(void 0,vc(d),void 0,void 0),OT(o.valueDeclaration,n),o.valueDeclaration.symbol=o;const a=ed();a.set(d,o),s=nx(s,ks(n.symbol,a,u,u,u),n.symbol,_,!1)}}return c?St:o&&s!==Dn?cv([o,s]):o||(s===Dn?f():s);function f(){_|=8192;const e=ks(n.symbol,a,u,u,u);return e.objectFlags|=131200|_,e}}(e.parent,t)}(e,r);case 286:xn.fail("Shouldn't ever directly check a JsxOpeningElement")}return Dt}(i,o,s),p=LM(i,d,o);return fM(p)&&function(t,n){if(211===t.parent.kind&&t.parent.expression===t||212===t.parent.kind&&t.parent.expression===t||(80===t.kind||166===t.kind)&&MR(t)||186===t.parent.kind&&t.parent.exprName===t||281===t.parent.kind||xo(t,va.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query),NS(A)){xn.assert(!!(128&n.symbol.flags));const r=n.symbol.valueDeclaration,i=e.getRedirectReferenceForResolutionFromSourceOfProject(Sd(r).resolvedPath);!(33554432&r.flags)||wT(t)||i&&jS(i.commandLine.options)||xo(t,va.Cannot_access_ambient_const_enums_when_0_is_enabled,Ne)}}(i,p),r=_,null==(l=or)||l.pop(),p}function WM(e){CB(e),e.expression&&_J(e.expression,va.Type_expected),yR(e.constraint),yR(e.default);const t=Lu(ns(e));Wd(t),function(e){return tp(e)!==Mn}(t)||xo(e.default,va.Type_parameter_0_has_a_circular_default,Ws(t));const n=Jd(t),r=np(t);n&&r&&PS(r,y_(eS(n,Mx(t,r)),r),e.default,va.Type_0_does_not_satisfy_the_constraint_1),SR(e),a((()=>Vj(e.name,va.Type_parameter_name_cannot_be_0)))}function HM(e){CB(e),rj(e);const t=Qf(e);Bv(e,31)&&(176===t.kind&&Fd(t.body)||xo(e,va.A_parameter_property_is_only_allowed_in_a_constructor_implementation),176===t.kind&&qD(e.name)&&"constructor"===e.name.escapedText&&xo(e.name,va.constructor_cannot_be_used_as_a_parameter_property_name)),!e.initializer&&iC(e)&&Eu(e.name)&&t.body&&xo(e,va.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),e.name&&qD(e.name)&&("this"===e.name.escapedText||"new"===e.name.escapedText)&&(0!==t.parameters.indexOf(e)&&xo(e,va.A_0_parameter_must_be_the_first_parameter,e.name.escapedText),176!==t.kind&&180!==t.kind&&185!==t.kind||xo(e,va.A_constructor_cannot_have_a_this_parameter),219===t.kind&&xo(e,va.An_arrow_function_cannot_have_a_this_parameter),177!==t.kind&&178!==t.kind||xo(e,va.get_and_set_accessors_cannot_declare_this_parameters)),!e.dotDotDotToken||Eu(e.name)||SS(Sp($l(e.symbol)),ar)||xo(e,va.A_rest_parameter_must_be_of_an_array_type)}function GM(e,t,n){for(const r of e.elements){if(gP(r))continue;const e=r.name;if(80===e.kind&&e.escapedText===n)return xo(t,va.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,n),!0;if((207===e.kind||206===e.kind)&&GM(e,t,n))return!0}}function XM(e){181===e.kind?function(e){CB(e)||function(e){const t=e.parameters[0];if(1!==e.parameters.length)return pJ(t?t.name:e,va.An_index_signature_must_have_exactly_one_parameter);if(EB(e.parameters,va.An_index_signature_cannot_have_a_trailing_comma),t.dotDotDotToken)return pJ(t.dotDotDotToken,va.An_index_signature_cannot_have_a_rest_parameter);if(Lv(t))return pJ(t.name,va.An_index_signature_parameter_cannot_have_an_accessibility_modifier);if(t.questionToken)return pJ(t.questionToken,va.An_index_signature_parameter_cannot_have_a_question_mark);if(t.initializer)return pJ(t.name,va.An_index_signature_parameter_cannot_have_an_initializer);if(!t.type)return pJ(t.name,va.An_index_signature_parameter_must_have_a_type_annotation);const n=Sx(t.type);bD(n,(e=>!!(8576&e.flags)))||lb(n)?pJ(t.name,va.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead):xD(n,ng)?e.type||pJ(e,va.An_index_signature_must_have_a_type_annotation):pJ(t.name,va.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type)}(e)}(e):184!==e.kind&&262!==e.kind&&185!==e.kind&&179!==e.kind&&176!==e.kind&&180!==e.kind||UB(e);const t=Jh(e);4&t||(3==(3&t)&&M<5&&xB(e,6144),2==(3&t)&&M<4&&xB(e,64),0!=(3&t)&&M<2&&xB(e,128)),Uj(ml(e)),function(e){const t=F(ll(e),xF);if(!p(t))return;const n=Mm(e),r=new Set,i=new Set;if(f(e.parameters,(({name:e},t)=>{qD(e)&&r.add(e.escapedText),Eu(e)&&i.add(t)})),Ef(e)){const e=t.length-1,o=t[e];n&&o&&qD(o.name)&&o.typeExpression&&o.typeExpression.type&&!r.has(o.name.escapedText)&&!i.has(e)&&!qk(Sx(o.typeExpression.type))&&xo(o.name,va.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,bc(o.name))}else f(t,(({name:e,isNameFirst:t},o)=>{i.has(o)||qD(e)&&r.has(e.escapedText)||(iE(e)?n&&xo(e,va.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,jp(e),jp(e.left)):t||ko(n,e,va.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,bc(e)))}))}(e),f(e.parameters,HM),e.type&&yR(e.type),a((function(){!function(e){M>=2||!V_(e)||33554432&e.flags||Nd(e.body)||f(e.parameters,(e=>{e.name&&!Eu(e.name)&&e.name.escapedText===Ee.escapedName&&vo("noEmit",e,va.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)}))}(e);let t=Cv(e),n=t;if(Mm(e)){const r=ol(e);if(r&&r.typeExpression&&xE(r.typeExpression.type)){const e=hI(Sx(r.typeExpression));e&&e.declaration&&(t=Cv(e.declaration),n=r.typeExpression.type)}}if(Y&&!t)switch(e.kind){case 180:xo(e,va.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 179:xo(e,va.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(t&&n){const r=Jh(e);if(1==(5&r)){const e=Sx(t);e===Zt?xo(n,va.A_generator_cannot_have_a_void_type_annotation):QM(e,r,n)}else 2==(3&r)&&function(e,t,n){const r=Sx(t);if(M>=2){if(Nc(r))return;const e=_y(!0);if(e!==An&&!Kl(r,e))return void i(va.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0,t,n,Ws(kL(r)||Zt))}else{if(eP(e,5),Nc(r))return;const o=fm(t);if(void 0===o)return void i(va.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,Ws(r));const a=Ma(o,111551,!0),s=a?$l(a):Dt;if(Nc(s))return void(80===o.kind&&"Promise"===o.escapedText&&Hl(r)===_y(!1)?xo(n,va.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):i(va.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,jp(o)));const c=(!0,hr||(hr=Xh("PromiseConstructorLike",0,true))||wn);if(c===wn)return void i(va.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,t,n,jp(o));const l=va.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value;if(!PS(s,c,n,l,(()=>t===n?void 0:uS(void 0,va.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type))))return;const u=o&&bb(o),_=Ho(e.locals,u.escapedText,111551);if(_)return void xo(_.valueDeclaration,va.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,bc(u),jp(o))}function i(e,t,n,r){t===n?xo(n,e,r):fT(xo(n,va.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type),Rp(t,e,r))}hL(r,!1,e,va.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(e,t,n)}181!==e.kind&&317!==e.kind&&ML(e)}))}function QM(e,t,n){const r=jj(0,e,0!=(2&t))||St;return PS(GO(r,jj(1,e,0!=(2&t))||r,jj(2,e,0!=(2&t))||At,!!(2&t)),e,n)}function YM(e){const t=new Map;for(const n of e.members)if(171===n.kind){let e;const r=n.name;switch(r.kind){case 11:case 9:e=r.text;break;case 80:e=bc(r);break;default:continue}t.get(e)?(xo(Pc(n.symbol.valueDeclaration),va.Duplicate_identifier_0,e),xo(n.name,va.Duplicate_identifier_0,e)):t.set(e,!0)}}function ZM(e){if(264===e.kind){const t=ns(e);if(t.declarations&&t.declarations.length>0&&t.declarations[0]!==e)return}const t=jm(ns(e));if(null==t?void 0:t.declarations){const e=new Map;for(const n of t.declarations)1===n.parameters.length&&n.parameters[0].type&&vD(Sx(n.parameters[0].type),(t=>{const r=e.get(qy(t));r?r.declarations.push(n):e.set(qy(t),{type:t,declarations:[n]})}));e.forEach((e=>{if(e.declarations.length>1)for(const t of e.declarations)xo(t,va.Duplicate_index_signature_for_type_0,Ws(e.type))}))}}function eL(e){CB(e)||function(e){if(oE(e.name)&&uP(e.name.expression)&&103===e.name.expression.operatorToken.kind)return pJ(e.parent.members[0],va.A_mapped_type_may_not_declare_properties_or_methods);if(gu(e.parent)){if(wD(e.name)&&"constructor"===e.name.text)return pJ(e.name,va.Classes_may_not_have_a_field_named_constructor);if(nJ(e.name,va.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type))return!0;if(M<2&&VD(e.name))return pJ(e.name,va.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(M<2&&yu(e))return pJ(e.name,va.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(yu(e)&&QB(e.questionToken,va.An_accessor_property_cannot_be_declared_optional))return!0}else if(264===e.parent.kind){if(nJ(e.name,va.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(xn.assertNode(e,lE),e.initializer)return pJ(e.initializer,va.An_interface_property_cannot_have_an_initializer)}else if(CE(e.parent)){if(nJ(e.name,va.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type))return!0;if(xn.assertNode(e,lE),e.initializer)return pJ(e.initializer,va.A_type_literal_property_cannot_have_an_initializer)}if(33554432&e.flags&&oJ(e),uE(e)&&e.exclamationToken&&(!gu(e.parent)||!e.type||e.initializer||33554432&e.flags||Jv(e)||qv(e))){const t=e.initializer?va.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:e.type?va.A_definite_assignment_assertion_is_not_permitted_in_this_context:va.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return pJ(e.exclamationToken,t)}}(e)||GB(e.name),rj(e),tL(e),Bv(e,64)&&172===e.kind&&e.initializer&&xo(e,va.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract,Ap(e.name))}function tL(e){if(VD(e.name)&&(M<9||M<99||!z)){for(let t=Np(e);t;t=Np(t))Wo(t).flags|=1048576;if(mP(e.parent)){const t=BP(e.parent);t&&(Wo(e.name).flags|=32768,Wo(t).flags|=4096)}}}function nL(e){return 108===e.kind||110===e.kind||!im(e)&&!!LI(e,nL)}function rL(e){qD(e.name)&&"constructor"===bc(e.name)&&gu(e.parent)&&xo(e.name,va.Class_constructor_may_not_be_an_accessor),a((function(){if(UB(e)||function(e){if(!(33554432&e.flags)&&187!==e.parent.kind&&264!==e.parent.kind){if(M<2&&VD(e.name))return pJ(e.name,va.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(void 0===e.body&&!Bv(e,64))return dJ(e,e.end-1,";".length,va._0_expected,"{")}if(e.body){if(Bv(e,64))return pJ(e,va.An_abstract_accessor_cannot_have_an_implementation);if(187===e.parent.kind||264===e.parent.kind)return pJ(e.body,va.An_implementation_cannot_be_declared_in_ambient_contexts)}if(e.typeParameters)return pJ(e.name,va.An_accessor_cannot_have_type_parameters);if(!function(e){return tJ(e)||e.parameters.length===(177===e.kind?0:1)}(e))return pJ(e.name,177===e.kind?va.A_get_accessor_cannot_have_parameters:va.A_set_accessor_must_have_exactly_one_parameter);if(178===e.kind){if(e.type)return pJ(e.name,va.A_set_accessor_cannot_have_a_return_type_annotation);const t=xn.checkDefined(fv(e),"Return value does not match parameter count assertion.");if(t.dotDotDotToken)return pJ(t.dotDotDotToken,va.A_set_accessor_cannot_have_rest_parameter);if(t.questionToken)return pJ(t.questionToken,va.A_set_accessor_cannot_have_an_optional_parameter);if(t.initializer)return pJ(e.name,va.A_set_accessor_parameter_cannot_have_an_initializer)}return!1}(e)||GB(e.name),AL(e),XM(e),177===e.kind&&!(33554432&e.flags)&&Fd(e.body)&&512&e.flags&&(1024&e.flags||xo(e.name,va.A_get_accessor_must_return_a_value)),167===e.name.kind&&IF(e.name),l_(e)){const t=ns(e),n=Y_(t,177),r=Y_(t,178);if(n&&r&&!(1&iB(n))){Wo(n).flags|=1;const e=Qv(n),t=Qv(r);(64&e)!=(64&t)&&(xo(n.name,va.Accessors_must_both_be_abstract_or_non_abstract),xo(r.name,va.Accessors_must_both_be_abstract_or_non_abstract)),(4&e&&!(6&t)||2&e&&!(2&t))&&(xo(n.name,va.A_get_accessor_must_be_at_least_as_accessible_as_the_setter),xo(r.name,va.A_get_accessor_must_be_at_least_as_accessible_as_the_setter))}}const t=Fl(ns(e));177===e.kind&&tM(e,t)})),yR(e.body),tL(e)}function iL(e,t,n){return e.typeArguments&&n{const t=sL(e);t&&aL(e,t)}));const t=Wo(e).resolvedSymbol;t&&Q(t.declarations,(e=>YT(e)&&!!(536870912&e.flags)))&&Eo(sO(e),t.declarations,t.escapedName)}}function uL(e,t){if(!(8388608&e.flags))return e;const n=e.objectType,r=e.indexType,i=Ad(n)&&2===Id(n)?Sv(n,0):Av(n,0),o=!!_f(n,zt);if(xD(r,(e=>SS(e,i)||o&&af(e,zt))))return 212===t.kind&&eh(t)&&32&wx(n)&&1&Dd(n)&&xo(t,va.Index_signature_in_type_0_only_permits_reading,Ws(n)),e;if(pb(n)){const e=eb(r,t);if(e){const r=vD(mp(n),(t=>Jp(t,e)));if(r&&6&fx(r))return xo(t,va.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter,vc(e)),Dt}}return xo(t,va.Type_0_cannot_be_used_to_index_type_1,Ws(r),Ws(n)),Dt}function _L(e){return(Rv(e,2)||Zl(e))&&!!(33554432&e.flags)}function dL(e,t){let n=bJ(e);if(264!==e.parent.kind&&263!==e.parent.kind&&231!==e.parent.kind&&33554432&e.flags){const t=Pp(e);!(t&&128&t.flags)||128&n||eN(e.parent)&&ZP(e.parent.parent)&&pp(e.parent.parent)||(n|=32),n|=128}return n&t}function pL(e){a((()=>function(e){function t(e,t){return void 0!==t&&t.parent===e[0].parent?t:e[0]}let n,r,i,o=0,a=230,s=!1,c=!0,l=!1;const u=e.declarations,_=0!=(16384&e.flags);function d(e){if(e.name&&Nd(e.name))return;let t=!1;const n=LI(e.parent,(n=>{if(t)return n;t=n===e}));if(n&&n.pos===e.end&&n.kind===e.kind){const t=n.name||n,r=n.name;if(e.name&&r&&(VD(e.name)&&VD(r)&&e.name.escapedText===r.escapedText||oE(e.name)&&oE(r)&&gS(IF(e.name),IF(r))||Wh(e.name)&&Wh(r)&&Gh(e.name)===Gh(r)))return void(174!==e.kind&&173!==e.kind||Jv(e)===Jv(n)||xo(t,Jv(e)?va.Function_overload_must_be_static:va.Function_overload_must_not_be_static));if(Fd(n.body))return void xo(t,va.Function_implementation_name_must_be_0,Ap(e.name))}const r=e.name||e;_?xo(r,va.Constructor_implementation_is_missing):Bv(e,64)?xo(r,va.All_declarations_of_an_abstract_method_must_be_consecutive):xo(r,va.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}let m=!1,g=!1,h=!1;const y=[];if(u)for(const e of u){const t=e,u=33554432&t.flags,f=t.parent&&(264===t.parent.kind||187===t.parent.kind)||u;if(f&&(i=void 0),263!==t.kind&&231!==t.kind||u||(h=!0),262===t.kind||174===t.kind||173===t.kind||176===t.kind){y.push(t);const e=dL(t,230);o|=e,a&=e,s=s||Pg(t),c=c&&Pg(t);const u=Fd(t.body);u&&n?_?g=!0:m=!0:(null==i?void 0:i.parent)===t.parent&&i.end!==t.pos&&d(i),u?n||(n=t):l=!0,i=t,f||(r=t)}Mm(e)&&cu(e)&&e.jsDoc&&(l=p(Vg(e))>0)}if(g&&f(y,(e=>{xo(e,va.Multiple_constructor_implementations_are_not_allowed)})),m&&f(y,(e=>{xo(Pc(e)||e,va.Duplicate_function_implementation)})),h&&!_&&16&e.flags&&u){const t=F(u,(e=>263===e.kind)).map((e=>Rp(e,va.Consider_adding_a_declare_modifier_to_this_class)));f(u,(n=>{const r=263===n.kind?va.Class_declaration_cannot_implement_overload_list_for_0:262===n.kind?va.Function_with_bodies_can_only_merge_with_classes_that_are_ambient:void 0;r&&fT(xo(Pc(n)||n,r,Sc(e)),...t)}))}if(!r||r.body||Bv(r,64)||r.questionToken||d(r),l&&(u&&(function(e,n,r,i,o){if(0!=(i^o)){const i=dL(t(e,n),r);f(e,(e=>{const t=dL(e,r)^i;32&t?xo(Pc(e),va.Overload_signatures_must_all_be_exported_or_non_exported):128&t?xo(Pc(e),va.Overload_signatures_must_all_be_ambient_or_non_ambient):6&t?xo(Pc(e)||e,va.Overload_signatures_must_all_be_public_private_or_protected):64&t&&xo(Pc(e),va.Overload_signatures_must_all_be_abstract_or_non_abstract)}))}}(u,n,230,o,a),function(e,n,r,i){if(r!==i){const r=Pg(t(e,n));f(e,(e=>{Pg(e)!==r&&xo(Pc(e),va.Overload_signatures_must_all_be_optional_or_required)}))}}(u,n,s,c)),n)){const t=Jf(e),r=Cf(n);for(const e of t)if(!ZS(r,e)){fT(xo(e.declaration&&sF(e.declaration)?e.declaration.parent.tagName:e.declaration,va.This_overload_signature_is_not_compatible_with_its_implementation_signature),Rp(n,va.The_implementation_signature_is_declared_here));break}}}(e)))}function fL(e){a((()=>function(e){let t=e.localSymbol;if(!t&&(t=ns(e),!t.exportSymbol))return;if(Y_(t,e.kind)!==e)return;let n=0,r=0,i=0;for(const e of t.declarations){const t=s(e),o=dL(e,2080);32&o?2048&o?i|=t:n|=t:r|=t}const o=n&r,a=i&(n|r);if(o||a)for(const e of t.declarations){const t=s(e),n=Pc(e);t&a?xo(n,va.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,Ap(n)):t&o&&xo(n,va.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,Ap(n))}function s(e){let t=e;switch(t.kind){case 264:case 265:case 346:case 338:case 340:return 2;case 267:return sp(t)||0!==DR(t)?5:4;case 263:case 266:case 306:return 3;case 307:return 7;case 277:case 226:const e=t,n=mN(e)?e.expression:e.right;if(!vb(n))return 1;t=n;case 271:case 274:case 273:let r=0;return f(Ea(ns(t)).declarations,(e=>{r|=s(e)})),r;case 260:case 208:case 262:case 276:case 80:return 1;case 173:case 171:return 2;default:return xn.failBadSyntaxKind(t)}}}(e)))}function mL(e,t,n,...r){const i=gL(e,t);return i&&SL(i,t,n,...r)}function gL(e,t,n){if(Ec(e))return;const r=e;if(r.promisedTypeOfPromise)return r.promisedTypeOfPromise;if(Kl(e,_y(!1)))return r.promisedTypeOfPromise=Ig(e)[0];if(pM(Hd(e),402915324))return;const i=Tc(e,"then");if(Ec(i))return;const o=i?Vp(i,0):u;if(0===o.length)return void(t&&xo(t,va.A_promise_must_have_a_then_method));let a,s;for(const t of o){const n=Kf(t);n&&n!==Zt&&!uk(e,n,ao)?a=n:s=ue(s,t)}if(!s)return xn.assertIsDefined(a),n&&(n.value=a),void(t&&xo(t,va.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Ws(e),Ws(a)));const c=Zw(ev(O(s,LO)),2097152);if(Ec(c))return;const l=Vp(c,0);if(0!==l.length)return r.promisedTypeOfPromise=ev(O(l,LO),2);t&&xo(t,va.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback)}function hL(e,t,n,r,...i){return(t?SL(e,n,r,...i):kL(e,n,r,...i))||Dt}function yL(e){if(pM(Hd(e),402915324))return!1;const t=Tc(e,"then");return!!t&&Vp(Zw(t,2097152),0).length>0}function vL(e){var t;if(16777216&e.flags){const n=yy(!1);return!!n&&e.aliasSymbol===n&&1===(null==(t=e.aliasTypeArguments)?void 0:t.length)}return!1}function bL(e){return 1048576&e.flags?DD(e,bL):vL(e)?e.aliasTypeArguments[0]:e}function xL(e){if(Ec(e)||vL(e))return!1;if(pb(e)){const t=Wd(e);if(t?3&t.flags||ik(t)||bD(t,yL):_M(e,8650752))return!0}return!1}function SL(e,t,n,...r){const i=kL(e,t,n,...r);return i&&function(e){return xL(e)?function(e){const t=yy(!0);if(t)return Bg(t,[bL(e)])}(e)??e:(xn.assert(vL(e)||void 0===gL(e),"type provided should not be a non-generic 'promise'-like."),e)}(i)}function kL(e,t,n,...r){if(Ec(e))return e;if(vL(e))return e;const i=e;if(i.awaitedTypeOfType)return i.awaitedTypeOfType;if(1048576&e.flags){if(Zi.lastIndexOf(e.id)>=0)return void(t&&xo(t,va.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));const o=t?e=>kL(e,t,n,...r):kL;Zi.push(e.id);const a=DD(e,o);return Zi.pop(),i.awaitedTypeOfType=a}if(xL(e))return i.awaitedTypeOfType=e;const o={value:void 0},a=gL(e,void 0,o);if(a){if(e.id===a.id||Zi.lastIndexOf(a.id)>=0)return void(t&&xo(t,va.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));Zi.push(e.id);const o=kL(a,t,n,...r);if(Zi.pop(),!o)return;return i.awaitedTypeOfType=o}if(!yL(e))return i.awaitedTypeOfType=e;if(t){let i;xn.assertIsDefined(n),o.value&&(i=uS(i,va.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1,Ws(e),Ws(o.value))),i=uS(i,n,...r),ro.add(zp(Sd(t),t,i))}}function TL(e){!function(e){if(!uJ(Sd(e))){let t=e.expression;if(tP(t))return!1;let n,r=!0;for(;;)if(hP(t)||bP(t))t=t.expression;else if(QE(t))r||(n=t),t.questionDotToken&&(n=t.questionDotToken),t=t.expression,r=!1;else{if(!GE(t)){qD(t)||(n=t);break}t.questionDotToken&&(n=t.questionDotToken),t=t.expression,r=!1}if(n)fT(xo(e.expression,va.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),Rp(n,va.Invalid_syntax_in_decorator))}}(e);const t=nO(e);aO(t,e);const n=Gf(t);if(1&n.flags)return;const r=VO(e);if(!(null==r?void 0:r.resolvedReturnType))return;let i;const o=r.resolvedReturnType;switch(e.parent.kind){case 263:case 231:i=va.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;case 172:if(!J){i=va.Decorator_function_return_type_0_is_not_assignable_to_type_1;break}case 169:i=va.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any;break;case 174:case 177:case 178:i=va.Decorator_function_return_type_0_is_not_assignable_to_type_1;break;default:return xn.failBadSyntaxKind(e.parent)}PS(n,o,e.expression,i)}function CL(e,t,n,r,i,o=n.length,a=0){return x_(YC.createFunctionTypeNode(void 0,u,YC.createKeywordTypeNode(133)),e,t,n,r,i,o,a)}function wL(e,t,n,r,i,o,a){return Om(CL(e,t,n,r,i,o,a))}function DL(e){return wL(void 0,void 0,u,e)}function EL(e){return wL(void 0,void 0,[Oo("value",e)],Zt)}function PL(e){if(e)switch(e.kind){case 193:case 192:return NL(e.types);case 194:return NL([e.trueType,e.falseType]);case 196:case 202:return PL(e.type);case 183:return e.typeName}}function NL(e){let t;for(let n of e){for(;196===n.kind||202===n.kind;)n=n.type;if(146===n.kind)continue;if(!U&&(201===n.kind&&106===n.literal.kind||157===n.kind))continue;const e=PL(n);if(!e)return;if(t){if(!qD(t)||!qD(e)||t.escapedText!==e.escapedText)return}else t=e}return t}function FL(e){const t=kv(e);return U_(e)?Ff(t):t}function AL(e){if(!(lI(e)&&Wv(e)&&e.modifiers&&gm(J,e,e.parent,e.parent.parent)))return;const t=S(e.modifiers,cE);if(t){J?(xB(t,8),169===e.kind&&xB(t,32)):M<99&&(xB(t,8),GP(e)?e.name?Hj(e)&&xB(t,4194304):xB(t,4194304):mP(e)||(VD(e.name)&&(dE(e)||hu(e)||yu(e))&&xB(t,4194304),oE(e.name)&&xB(t,8388608))),eP(e,8);for(const t of e.modifiers)cE(t)&&TL(t)}}function IL(e){switch(e.kind){case 80:return e;case 211:return e.name;default:return}}function OL(e){var t;AL(e),XM(e);const n=Jh(e);if(e.name&&167===e.name.kind&&IF(e.name),l_(e)){const n=ns(e),r=e.localSymbol||n,i=null==(t=r.declarations)?void 0:t.find((t=>t.kind===e.kind&&!(524288&t.flags)));e===i&&pL(r),n.parent&&pL(n)}const r=173===e.kind?void 0:e.body;if(yR(r),tM(e,Xf(e)),a((function(){Cv(e)||(Nd(r)&&!_L(e)&&zC(e,St),1&n&&Fd(r)&&Gf(Cf(e)))})),Mm(e)){const t=ol(e);t&&t.typeExpression&&!SF(Sx(t.typeExpression),e)&&xo(t.typeExpression.type,va.The_type_of_a_function_declaration_must_match_the_function_s_signature)}}function ML(e){a((function(){const t=Sd(e);let n=fi.get(t.path);n||(n=[],fi.set(t.path,n)),n.push(e)}))}function LL(e,t){for(const n of e)switch(n.kind){case 263:case 231:BL(n,t),zL(n,t);break;case 307:case 267:case 241:case 269:case 248:case 249:case 250:KL(n,t);break;case 176:case 218:case 262:case 219:case 174:case 177:case 178:n.body&&KL(n,t),zL(n,t);break;case 173:case 179:case 180:case 184:case 185:case 265:case 264:zL(n,t);break;case 195:JL(n,t);break;default:xn.assertNever(n,"Node should not have been registered for unused identifiers check")}}function jL(e,t,n){n(e,0,Rp(Pc(e)||e,YT(e)?va._0_is_declared_but_never_used:va._0_is_declared_but_its_value_is_never_read,t))}function RL(e){return qD(e)&&95===bc(e).charCodeAt(0)}function BL(e,t){for(const n of e.members)switch(n.kind){case 174:case 172:case 177:case 178:if(178===n.kind&&32768&n.symbol.flags)break;const e=ns(n);e.isReferenced||!(Rv(n,2)||Dc(n)&&VD(n.name))||33554432&n.flags||t(n,0,Rp(n.name,va._0_is_declared_but_its_value_is_never_read,Us(e)));break;case 176:for(const e of n.parameters)!e.symbol.isReferenced&&Bv(e,2)&&t(e,0,Rp(e.name,va.Property_0_is_declared_but_its_value_is_never_read,Sc(e.symbol)));break;case 181:case 240:case 175:break;default:xn.fail("Unexpected class member")}}function JL(e,t){const{typeParameter:n}=e;$L(n)&&t(e,1,Rp(e,va._0_is_declared_but_its_value_is_never_read,bc(n.name)))}function zL(e,t){const n=ns(e).declarations;if(!n||De(n)!==e)return;const r=ml(e),i=new Set;for(const e of r){if(!$L(e))continue;const n=bc(e.name),{parent:r}=e;if(195!==r.kind&&r.typeParameters.every($L)){if(W(i,r)){const i=Sd(r),o=CF(r)?gT(r):hT(i,r.typeParameters),a=1===r.typeParameters.length?[va._0_is_declared_but_its_value_is_never_read,n]:[va.All_type_parameters_are_unused];t(e,1,aS(i,o.pos,o.end-o.pos,...a))}}else t(e,1,Rp(e,va._0_is_declared_but_its_value_is_never_read,n))}}function $L(e){return!(262144&ts(e.symbol).isReferenced||RL(e.name))}function qL(e,t,n,r){const i=String(r(t)),o=e.get(i);o?o[1].push(n):e.set(i,[t,[n]])}function VL(e){return lt(sy(e),sE)}function UL(e){return KE(e)?VE(e.parent)?!(!e.propertyName||!RL(e.name)):RL(e.name):sp(e)||(KP(e)&&i_(e.parent.parent)||HL(e))&&RL(e.name)}function KL(e,t){const n=new Map,r=new Map,i=new Map;e.locals.forEach((e=>{var o;if(!(262144&e.flags?!(3&e.flags)||3&e.isReferenced:e.isReferenced||e.exportSymbol)&&e.declarations)for(const a of e.declarations)if(!UL(a))if(HL(a))qL(n,273===(o=a).kind?o:274===o.kind?o.parent:o.parent.parent,a,IB);else if(KE(a)&&VE(a.parent))a!==De(a.parent.elements)&&De(a.parent.elements).dotDotDotToken||qL(r,a.parent,a,IB);else if(KP(a)){const e=7&xJ(a),t=Pc(a);(4===e||6===e)&&t&&RL(t)||qL(i,a.parent,a,IB)}else{const n=e.valueDeclaration&&VL(e.valueDeclaration),i=e.valueDeclaration&&Pc(e.valueDeclaration);n&&i?rc(n,n.parent)||hv(n)||RL(i)||(KE(a)&&UE(a.parent)?qL(r,a.parent,a,IB):t(n,1,Rp(i,va._0_is_declared_but_its_value_is_never_read,Sc(e)))):jL(a,Sc(e),t)}})),n.forEach((([e,n])=>{const r=e.parent;if((e.name?1:0)+(e.namedBindings?274===e.namedBindings.kind?1:e.namedBindings.elements.length:0)===n.length)t(r,0,1===n.length?Rp(r,va._0_is_declared_but_its_value_is_never_read,bc(Te(n).name)):Rp(r,va.All_imports_in_import_declaration_are_unused));else for(const e of n)jL(e,bc(e.name),t)})),r.forEach((([e,n])=>{const r=VL(e.parent)?1:0;if(e.elements.length===n.length)1===n.length&&260===e.parent.kind&&261===e.parent.parent.kind?qL(i,e.parent.parent,e.parent,IB):t(e,r,1===n.length?Rp(e,va._0_is_declared_but_its_value_is_never_read,WL(Te(n).name)):Rp(e,va.All_destructured_elements_are_unused));else for(const e of n)t(e,r,Rp(e,va._0_is_declared_but_its_value_is_never_read,WL(e.name)))})),i.forEach((([e,n])=>{if(e.declarations.length===n.length)t(e,0,1===n.length?Rp(Te(n).name,va._0_is_declared_but_its_value_is_never_read,WL(Te(n).name)):Rp(243===e.parent.kind?e.parent:e,va.All_variables_are_unused));else for(const e of n)t(e,0,Rp(e,va._0_is_declared_but_its_value_is_never_read,WL(e.name)))}))}function WL(e){switch(e.kind){case 80:return bc(e);case 207:case 206:return WL(ut(Te(e.elements),KE).name);default:return xn.assertNever(e)}}function HL(e){return 273===e.kind||276===e.kind||274===e.kind}function GL(e){if(241===e.kind&&mJ(e),fu(e)){const t=yi;f(e.statements,yR),yi=t}else f(e.statements,yR);e.locals&&ML(e)}function XL(e,t,n){if((null==t?void 0:t.escapedText)!==n)return!1;if(172===e.kind||171===e.kind||174===e.kind||173===e.kind||177===e.kind||178===e.kind||303===e.kind)return!1;if(33554432&e.flags)return!1;if((oN(e)||rN(e)||fN(e))&&Wl(e))return!1;const r=sy(e);return!sE(r)||!Nd(r.parent.body)}function QL(e){mc(e,(t=>!!(4&iB(t))&&(80!==e.kind?xo(Pc(e),va.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):xo(e,va.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),!0)))}function YL(e){mc(e,(t=>!!(8&iB(t))&&(80!==e.kind?xo(Pc(e),va.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference):xo(e,va.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference),!0)))}function ZL(e){1048576&iB(Np(e))&&(xn.assert(Dc(e)&&qD(e.name)&&"string"==typeof e.name.escapedText,"The target of a WeakMap/WeakSet collision check should be an identifier"),vo("noEmit",e,va.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel,e.name.escapedText))}function ej(e){let t=!1;if(mP(e)){for(const n of e.members)if(2097152&iB(n)){t=!0;break}}else if(nP(e))2097152&iB(e)&&(t=!0);else{const n=Np(e);n&&2097152&iB(n)&&(t=!0)}t&&(xn.assert(Dc(e)&&qD(e.name),"The target of a Reflect collision check should be an identifier"),vo("noEmit",e,va.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers,Ap(e.name),"Reflect"))}function tj(e,t){t&&(function(e,t){if(B>=5&&!(B>=100&&1===Sd(e).impliedNodeFormat))return;if(!t||!XL(e,t,"require")&&!XL(e,t,"exports"))return;if(ZP(e)&&1!==DR(e))return;const n=kc(e);307===n.kind&&Zp(n)&&vo("noEmit",t,va.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,Ap(t),Ap(t))}(e,t),function(e,t){if(!t||M>=4||!XL(e,t,"Promise"))return;if(ZP(e)&&1!==DR(e))return;const n=kc(e);307===n.kind&&Zp(n)&&4096&n.flags&&vo("noEmit",t,va.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,Ap(t),Ap(t))}(e,t),function(e,t){M<=8&&(XL(e,t,"WeakMap")||XL(e,t,"WeakSet"))&&Xi.push(e)}(e,t),function(e,t){t&&M>=2&&M<=8&&XL(e,t,"Reflect")&&Qi.push(e)}(e,t),gu(e)?(Vj(t,va.Class_name_cannot_be_0),33554432&e.flags||function(e){M>=1&&"Object"===e.escapedText&&(B<5||1===Sd(e).impliedNodeFormat)&&xo(e,va.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,Ci[B])}(t)):YP(e)&&Vj(t,va.Enum_name_cannot_be_0))}function nj(e){return e===kt?St:e===ir?rr:e}function rj(e){var t;if(AL(e),KE(e)||yR(e.type),!e.name)return;if(167===e.name.kind&&(IF(e.name),j_(e)&&e.initializer&&DM(e.initializer)),KE(e)){if(e.propertyName&&qD(e.name)&&ay(e)&&Nd(Qf(e).body))return void Yi.push(e);VE(e.parent)&&e.dotDotDotToken&&M<5&&xB(e,4),e.propertyName&&167===e.propertyName.kind&&IF(e.propertyName);const t=e.parent.parent,n=Ic(t,e.dotDotDotToken?32:0),r=e.propertyName||e.name;if(n&&!Eu(r)){const i=Tv(r);if(mC(i)){const r=Jp(n,gC(i));r&&(XA(r,void 0,!1),pA(e,!!t.initializer&&108===t.initializer.kind,!1,n,r))}}}if(Eu(e.name)&&(207===e.name.kind&&M<2&&A.downlevelIteration&&xB(e,512),f(e.name.elements,yR)),e.initializer&&ay(e)&&Nd(Qf(e).body))return void xo(e,va.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);if(Eu(e.name)){if(Fw(e))return;const t=j_(e)&&e.initializer&&249!==e.parent.parent.kind,n=!Q(e.name.elements,dn(gP));if(t||n){const r=vl(e);if(t){const t=DM(e.initializer);U&&n?CA(t,e):IS(t,vl(e),e,e.initializer)}n&&(UE(e.name)?fj(65,r,It,e):U&&CA(r,e))}return}const n=ns(e);if(2097152&n.flags&&($m(e)||qm(e)))return void uR(e);const r=nj($l(n));if(e===n.valueDeclaration){const i=j_(e)&&Gm(e);if(i&&!(Mm(e)&&HE(i)&&(0===i.properties.length||Tb(e.name))&&(null==(t=n.exports)?void 0:t.size)||249===e.parent.parent.kind)){const t=DM(i);IS(t,r,e,i,void 0);const n=7&xJ(e);if(6===n){const e=(!0,Or||(Or=Xh("AsyncDisposable",0,true))||wn),n=gy(!0);e!==wn&&n!==wn&&PS(t,ev([e,n,Rt,It]),i,va.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined)}else if(4===n){const e=gy(!0);e!==wn&&PS(t,ev([e,Rt,It]),i,va.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined)}}n.declarations&&n.declarations.length>1&&Q(n.declarations,(t=>t!==e&&If(t)&&!oj(t,e)))&&xo(e.name,va.All_declarations_of_0_must_have_identical_modifiers,Ap(e.name))}else{const t=nj(vl(e));Nc(r)||Nc(t)||gS(r,t)||67108864&n.flags||ij(n.valueDeclaration,r,e,t),j_(e)&&e.initializer&&IS(DM(e.initializer),t,e,e.initializer,void 0),n.valueDeclaration&&!oj(e,n.valueDeclaration)&&xo(e.name,va.All_declarations_of_0_must_have_identical_modifiers,Ap(e.name))}172!==e.kind&&171!==e.kind&&(fL(e),260!==e.kind&&208!==e.kind||function(e){if(0!=(7&xJ(e))||ay(e))return;const t=ns(e);if(1&t.flags){if(!qD(e.name))return xn.fail();const n=je(e,e.name.escapedText,3,void 0,!1);if(n&&n!==t&&2&n.flags&&7&cA(n)){const t=Eh(n.valueDeclaration,261),r=243===t.parent.kind&&t.parent.parent?t.parent.parent:void 0;if(!r||!(241===r.kind&&cu(r.parent)||268===r.kind||267===r.kind||307===r.kind)){const t=Us(n);xo(e,va.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,t,t)}}}}(e),tj(e,e.name))}function ij(e,t,n,r){const i=Pc(n),o=172===n.kind||171===n.kind?va.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:va.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,a=Ap(i),s=xo(i,o,a,Ws(t),Ws(r));e&&fT(s,Rp(e,va._0_was_also_declared_here,a))}function oj(e,t){return 169===e.kind&&260===t.kind||260===e.kind&&169===t.kind||Pg(e)===Pg(t)&&Hv(e,1358)===Hv(t,1358)}function aj(e){var t,n;null==(t=or)||t.push(or.Phase.Check,"checkVariableDeclaration",{kind:e.kind,pos:e.pos,end:e.end,path:e.tracingPath}),function(e){const t=xJ(e),n=7&t;if(Eu(e.name))switch(n){case 6:return pJ(e,va._0_declarations_may_not_have_binding_patterns,"await using");case 4:return pJ(e,va._0_declarations_may_not_have_binding_patterns,"using")}if(249!==e.parent.parent.kind&&250!==e.parent.parent.kind)if(33554432&t)oJ(e);else if(!e.initializer){if(Eu(e.name)&&!Eu(e.parent))return pJ(e,va.A_destructuring_declaration_must_have_an_initializer);switch(n){case 6:return pJ(e,va._0_declarations_must_be_initialized,"await using");case 4:return pJ(e,va._0_declarations_must_be_initialized,"using");case 2:return pJ(e,va._0_declarations_must_be_initialized,"const")}}if(e.exclamationToken&&(243!==e.parent.parent.kind||!e.type||e.initializer||33554432&t)){const t=e.initializer?va.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:e.type?va.A_definite_assignment_assertion_is_not_permitted_in_this_context:va.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return pJ(e.exclamationToken,t)}!(B<5||1===Sd(e).impliedNodeFormat)||4===B||33554432&e.parent.parent.flags||!Bv(e.parent.parent,32)||aJ(e.name),n&&sJ(e.name)}(e),rj(e),null==(n=or)||n.pop()}function sj(e){const t=7&uc(e);(4===t||6===t)&&M<99&&xB(e,16777216),f(e.declarations,yR)}function cj(e){CB(e)||cJ(e.declarationList)||function(e){if(!lJ(e.parent)){const t=7&xJ(e.declarationList);if(t){const n=1===t?"let":2===t?"const":4===t?"using":6===t?"await using":xn.fail("Unknown BlockScope flag");pJ(e,va._0_declarations_can_only_be_declared_inside_a_block,n)}}}(e),sj(e.declarationList)}function lj(e,t,n){function r(e,t){for(i(e=lh(e),t);uP(e)&&(57===e.operatorToken.kind||61===e.operatorToken.kind);)i(e=lh(e.left),t)}function i(e,n){const i=_b(e)?lh(e.right):e;if(og(i))return;if(_b(i))return void r(i,n);const o=i===e?t:_j(i);if(1024&o.flags&&GE(i)&&384&(Wo(i.expression).resolvedSymbol??ht).flags)return void xo(i,va.This_condition_will_always_return_0,o.value?"true":"false");const a=GE(i)&&EM(i.expression);if(!Qw(o,4194304)||a)return;const s=Vp(o,0),c=!!mL(o);if(0===s.length&&!c)return;const l=qD(i)?i:GE(i)?i.name:void 0,u=l&&JR(l);if(!u&&!c)return;const _=u&&uP(e.parent)&&function(e,t){for(;uP(e)&&56===e.operatorToken.kind;){if(LI(e.right,(function e(n){if(qD(n)){const e=JR(n);if(e&&e===t)return!0}return LI(n,e)})))return!0;e=e.parent}return!1}(e.parent,u)||u&&n&&function(e,t,n,r){return!!LI(t,(function t(i){if(qD(i)){const t=JR(i);if(t&&t===r){if(qD(e)||qD(n)&&uP(n.parent))return!0;let t=n.parent,r=i.parent;for(;t&&r;){if(qD(t)&&qD(r)||110===t.kind&&110===r.kind)return JR(t)===JR(r);if(GE(t)&&GE(r)){if(JR(t.name)!==JR(r.name))return!1;r=r.expression,t=t.expression}else{if(!QE(t)||!QE(r))return!1;r=r.expression,t=t.expression}}}}return LI(i,t)}))}(e,n,l,u);_||(c?To(i,!0,va.This_condition_will_always_return_true_since_this_0_is_always_defined,Gs(o)):xo(i,va.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead))}U&&r(e,n)}function uj(e,t){return 16384&e.flags&&xo(t,va.An_expression_of_type_void_cannot_be_tested_for_truthiness),e}function _j(e,t){return uj(KM(e,t),e)}function pj(e){return fj(e.awaitModifier?15:13,yA(e.expression),It,e.expression)}function fj(e,t,n,r){return Ec(t)?t:mj(e,t,n,r,!0)||St}function mj(e,t,n,r,i){const o=0!=(2&e);if(t===en)return void(r&&Pj(r,t,o));const a=M>=2,s=!a&&A.downlevelIteration,c=A.noUncheckedIndexedAccess&&!!(128&e);if(a||s||o){const o=xj(t,e,a?r:void 0);if(i&&o){const t=8&e?va.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:32&e?va.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:64&e?va.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:16&e?va.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;t&&PS(n,o.nextType,r,t)}if(o||a)return c?aD(o&&o.yieldType):o&&o.yieldType}let l=t,u=!1;if(4&e){if(1048576&l.flags){const e=t.types,n=F(e,(e=>!(402653316&e.flags)));n!==e&&(l=ev(n,2))}else 402653316&l.flags&&(l=en);if(u=l!==t,u&&131072&l.flags)return c?aD(Jt):Jt}if(!Hk(l)){if(r){const n=!!(4&e)&&!u,[i,o]=function(n,r){var i;return r?n?[va.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:[va.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:gj(e,0,t,void 0)?[va.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!1]:function(e){switch(e){case"Float32Array":case"Float64Array":case"Int16Array":case"Int32Array":case"Int8Array":case"NodeList":case"Uint16Array":case"Uint32Array":case"Uint8Array":case"Uint8ClampedArray":return!0}return!1}(null==(i=t.symbol)?void 0:i.escapedName)?[va.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher,!0]:n?[va.Type_0_is_not_an_array_type_or_a_string_type,!0]:[va.Type_0_is_not_an_array_type,!0]}(n,s);To(r,o&&!!mL(l),i,Ws(l))}return u?c?aD(Jt):Jt:void 0}const _=pf(l,zt);return u&&_?402653316&_.flags&&!A.noUncheckedIndexedAccess?Jt:ev(c?[_,Jt,It]:[_,Jt],2):128&e?aD(_):_}function gj(e,t,n,r){if(Ec(n))return;const i=xj(n,e,r);return i&&i[BB(t)]}function hj(e=en,t=en,n=At){if(67359327&e.flags&&180227&t.flags&&180227&n.flags){const r=fg([e,t,n]);let i=ai.get(r);return i||(i={yieldType:e,returnType:t,nextType:n},ai.set(r,i)),i}return{yieldType:e,returnType:t,nextType:n}}function yj(e){let t,n,r;for(const i of e)if(void 0!==i&&i!==si){if(i===ci)return ci;t=ue(t,i.yieldType),n=ue(n,i.returnType),r=ue(r,i.nextType)}return t||n||r?hj(t&&ev(t),n&&ev(n),r&&cv(r)):si}function vj(e,t){return e[t]}function bj(e,t,n){return e[t]=n}function xj(e,t,n){var r,i;if(Ec(e))return ci;if(!(1048576&e.flags)){const i=n?{errors:void 0}:void 0,o=kj(e,t,n,i);if(o===si){if(n){const r=Pj(n,e,!!(2&t));(null==i?void 0:i.errors)&&fT(r,...i.errors)}return}if(null==(r=null==i?void 0:i.errors)?void 0:r.length)for(const e of i.errors)ro.add(e);return o}const o=2&t?"iterationTypesOfAsyncIterable":"iterationTypesOfIterable",a=vj(e,o);if(a)return a===si?void 0:a;let s;for(const r of e.types){const a=n?{errors:void 0}:void 0,c=kj(r,t,n,a);if(c===si){if(n){const r=Pj(n,e,!!(2&t));(null==a?void 0:a.errors)&&fT(r,...a.errors)}return void bj(e,o,si)}if(null==(i=null==a?void 0:a.errors)?void 0:i.length)for(const e of a.errors)ro.add(e);s=ue(s,c)}const c=s?yj(s):si;return bj(e,o,c),c===si?void 0:c}function Sj(e,t){if(e===si)return si;if(e===ci)return ci;const{yieldType:n,returnType:r,nextType:i}=e;return t&&yy(!0),hj(SL(n,t)||St,SL(r,t)||St,i)}function kj(e,t,n,r){if(Ec(e))return ci;let i=!1;if(2&t){const r=Tj(e,_i)||wj(e,_i);if(r){if(r!==si||!n)return 8&t?Sj(r,n):r;i=!0}}if(1&t){let r=Tj(e,di)||wj(e,di);if(r)if(r===si&&n)i=!0;else{if(!(2&t))return r;if(r!==si)return r=Sj(r,n),i?r:bj(e,"iterationTypesOfAsyncIterable",r)}}if(2&t){const t=Ej(e,_i,n,r,i);if(t!==si)return t}if(1&t){let o=Ej(e,di,n,r,i);if(o!==si)return 2&t?(o=Sj(o,n),i?o:bj(e,"iterationTypesOfAsyncIterable",o)):o}return si}function Tj(e,t){return vj(e,t.iterableCacheKey)}function Cj(e,t){const n=Tj(e,t)||Ej(e,t,void 0,void 0,!1);return n===si?ui:n}function wj(e,t){let n;if(Kl(e,n=t.getGlobalIterableType(!1))||Kl(e,n=t.getGlobalIterableIteratorType(!1))){const[r]=Ig(e),{returnType:i,nextType:o}=Cj(n,t);return bj(e,t.iterableCacheKey,hj(t.resolveIterationType(r,void 0)||r,t.resolveIterationType(i,void 0)||i,o))}if(Kl(e,t.getGlobalGeneratorType(!1))){const[n,r,i]=Ig(e);return bj(e,t.iterableCacheKey,hj(t.resolveIterationType(n,void 0)||n,t.resolveIterationType(r,void 0)||r,i))}}function Dj(e){const t=iy(!1),n=t&&Tc($l(t),yc(e));return n&&mC(n)?gC(n):`__@${e}`}function Ej(e,t,n,r,i){const o=Jp(e,Dj(t.iteratorSymbolName)),a=!o||16777216&o.flags?void 0:$l(o);if(Ec(a))return i?ci:bj(e,t.iterableCacheKey,ci);const s=a?Vp(a,0):void 0;if(!Q(s))return i?si:bj(e,t.iterableCacheKey,si);const c=Nj(cv(O(s,Gf)),t,n,r,i)??si;return i?c:bj(e,t.iterableCacheKey,c)}function Pj(e,t,n){const r=n?va.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:va.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator;return To(e,!!mL(t)||!n&&LP(e.parent)&&e.parent.expression===e&&fy(!1)!==An&&SS(t,fy(!1)),r,Ws(t))}function Nj(e,t,n,r,i){if(Ec(e))return ci;let o=Fj(e,t)||function(e,t){const n=t.getGlobalIterableIteratorType(!1);if(Kl(e,n)){const[r]=Ig(e),i=Fj(n,t)||Lj(n,t,void 0,void 0,!1),{returnType:o,nextType:a}=i===si?ui:i;return bj(e,t.iteratorCacheKey,hj(r,o,a))}if(Kl(e,t.getGlobalIteratorType(!1))||Kl(e,t.getGlobalGeneratorType(!1))){const[n,r,i]=Ig(e);return bj(e,t.iteratorCacheKey,hj(n,r,i))}}(e,t);return o===si&&n&&(o=void 0,i=!0),o??(o=Lj(e,t,n,r,i)),o===si?void 0:o}function Fj(e,t){return vj(e,t.iteratorCacheKey)}function Aj(e,t){const n=Tc(e,"done")||qt;return SS(0===t?qt:Kt,n)}function Ij(e){return Aj(e,0)}function Oj(e){return Aj(e,1)}function Mj(e,t,n,r,i){var o,a,s,c;const l=Jp(e,n);if(!l&&"next"!==n)return;const _=!l||"next"===n&&16777216&l.flags?void 0:"next"===n?$l(l):Zw($l(l),2097152);if(Ec(_))return"next"===n?ci:li;const d=_?Vp(_,0):u;if(0===d.length){if(r){const e="next"===n?t.mustHaveANextMethodDiagnostic:t.mustBeAMethodDiagnostic;i?(i.errors??(i.errors=[]),i.errors.push(Rp(r,e,n))):xo(r,e,n)}return"next"===n?si:void 0}if((null==_?void 0:_.symbol)&&1===d.length){const e=t.getGlobalGeneratorType(!1),r=t.getGlobalIteratorType(!1),i=(null==(a=null==(o=e.symbol)?void 0:o.members)?void 0:a.get(n))===_.symbol,l=!i&&(null==(c=null==(s=r.symbol)?void 0:s.members)?void 0:c.get(n))===_.symbol;if(i||l){const t=i?e:r,{mapper:o}=_;return hj(Ax(t.typeParameters[0],o),Ax(t.typeParameters[1],o),"next"===n?Ax(t.typeParameters[2],o):void 0)}}let p,f,m,g,h;for(const e of d)"throw"!==n&&Q(e.parameters)&&(p=ue(p,DO(e,0))),f=ue(f,Gf(e));if("throw"!==n){const e=p?ev(p):At;"next"===n?g=e:"return"===n&&(m=ue(m,t.resolveIterationType(e,r)||St))}const y=f?cv(f):en,v=function(e){if(Ec(e))return ci;const t=vj(e,"iterationTypesOfIteratorResult");if(t)return t;if(Kl(e,Sr||(Sr=Xh("IteratorYieldResult",1,!1))||An))return bj(e,"iterationTypesOfIteratorResult",hj(Ig(e)[0],void 0,void 0));if(Kl(e,kr||(kr=Xh("IteratorReturnResult",1,!1))||An))return bj(e,"iterationTypesOfIteratorResult",hj(void 0,Ig(e)[0],void 0));const n=SD(e,Ij),r=n!==en?Tc(n,"value"):void 0,i=SD(e,Oj),o=i!==en?Tc(i,"value"):void 0;return bj(e,"iterationTypesOfIteratorResult",r||o?hj(r,o||Zt,void 0):si)}(t.resolveIterationType(y,r)||St);return v===si?(r&&(i?(i.errors??(i.errors=[]),i.errors.push(Rp(r,t.mustHaveAValueDiagnostic,n))):xo(r,t.mustHaveAValueDiagnostic,n)),h=St,m=ue(m,St)):(h=v.yieldType,m=ue(m,v.returnType)),hj(h,ev(m),g)}function Lj(e,t,n,r,i){const o=yj([Mj(e,t,"next",n,r),Mj(e,t,"return",n,r),Mj(e,t,"throw",n,r)]);return i?o:bj(e,t.iteratorCacheKey,o)}function jj(e,t,n){if(Ec(t))return;const r=Rj(t,n);return r&&r[BB(e)]}function Rj(e,t){if(Ec(e))return ci;const n=t?_i:di;return xj(e,t?2:1,void 0)||function(e,t,n,r){return Nj(e,t,void 0,void 0,!1)}(e,n)}function Bj(e,t){const n=!!(2&t);if(1&t){const t=jj(1,e,n);return t?n?kL(bL(t)):t:Dt}return n?kL(e)||Dt:e}function Jj(e,t){const n=Bj(t,Jh(e));return!(!n||!(_M(n,16384)||32769&n.flags))}function zj(e,t,n){const r=cf(e);if(0===r.length)return;for(const t of Md(e))n&&4194304&t.flags||$j(e,t,Ev(t,8576,!0),ql(t));const i=t.valueDeclaration;if(i&&gu(i))for(const t of i.members)if(!Jv(t)&&!l_(t)){const n=ns(t);$j(e,n,qM(t.name.expression),ql(n))}if(r.length>1)for(const t of r)qj(e,t)}function $j(e,t,n,r){const i=t.valueDeclaration,o=Pc(i);if(o&&VD(o))return;const a=ff(e,n),s=2&wx(e)?Y_(e.symbol,264):void 0,c=i&&226===i.kind||o&&167===o.kind?i:void 0,l=is(t)===e.symbol?i:void 0;for(const n of a){const i=n.declaration&&is(ns(n.declaration))===e.symbol?n.declaration:void 0,o=l||i||(s&&!Q(ku(e),(e=>!!Ld(e,t.escapedName)&&!!pf(e,n.keyType)))?s:void 0);if(o&&!SS(r,n.type)){const e=bo(o,va.Property_0_of_type_1_is_not_assignable_to_2_index_type_3,Us(t),Ws(r),Ws(n.keyType),Ws(n.type));c&&o!==c&&fT(e,Rp(c,va._0_is_declared_here,Us(t))),ro.add(e)}}}function qj(e,t){const n=t.declaration,r=ff(e,t.keyType),i=2&wx(e)?Y_(e.symbol,264):void 0,o=n&&is(ns(n))===e.symbol?n:void 0;for(const n of r){if(n===t)continue;const r=n.declaration&&is(ns(n.declaration))===e.symbol?n.declaration:void 0,a=o||r||(i&&!Q(ku(e),(e=>!!_f(e,t.keyType)&&!!pf(e,n.keyType)))?i:void 0);a&&!SS(t.type,n.type)&&xo(a,va._0_index_type_1_is_not_assignable_to_2_index_type_3,Ws(t.keyType),Ws(t.type),Ws(n.keyType),Ws(n.type))}}function Vj(e,t){switch(e.escapedText){case"any":case"unknown":case"never":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":case"undefined":xo(e,t,e.escapedText)}}function Uj(e){let t=!1;if(e)for(let t=0;t{var i,o,a;n.default?(t=!0,i=n.default,o=e,a=r,function e(t){if(183===t.kind){const e=Ih(t);if(262144&e.flags)for(let n=a;n263===e.kind||264===e.kind))}(e);if(!n||n.length<=1)return;if(!Wj(n,ju(e).localTypeParameters,ml)){const t=Us(e);for(const e of n)xo(e.name,va.All_declarations_of_0_must_have_identical_type_parameters,t)}}}function Wj(e,t,n){const r=p(t),i=kf(t);for(const o of e){const e=n(o),a=e.length;if(ar)return!1;for(let n=0;n1)return _J(r.types[1],va.Classes_can_only_extend_a_single_class);t=!0}else{if(xn.assert(119===r.token),n)return _J(r,va.implements_clause_already_seen);n=!0}WB(r)}})(e)||LB(e.typeParameters,t)}(e),AL(e),tj(e,e.name),Uj(ml(e)),fL(e);const t=ns(e),n=ju(t),r=y_(n),i=$l(t);Kj(t),pL(t),function(e){const t=new Map,n=new Map,r=new Map;for(const o of e.members)if(176===o.kind)for(const e of o.parameters)rc(e,o)&&!Eu(e.name)&&i(t,e.name,e.name.escapedText,3);else{const e=Jv(o),a=o.name;if(!a)continue;const s=VD(a),c=s&&e?16:0,l=s?r:e?n:t,u=a&&vJ(a);if(u)switch(o.kind){case 177:i(l,a,u,1|c);break;case 178:i(l,a,u,2|c);break;case 172:i(l,a,u,3|c);break;case 174:i(l,a,u,8|c)}}function i(e,t,n,r){const i=e.get(n);if(i)if((16&i)!=(16&r))xo(t,va.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name,Gd(t));else{const o=!!(8&i),a=!!(8&r);o||a?o!==a&&xo(t,va.Duplicate_identifier_0,Gd(t)):i&r&-17?xo(t,va.Duplicate_identifier_0,Gd(t)):e.set(n,i|r)}else e.set(n,r)}}(e),33554432&e.flags||function(e){for(const t of e.members){const n=t.name;if(Jv(t)&&n){const t=vJ(n);switch(t){case"name":case"length":case"caller":case"arguments":if(z)break;case"prototype":xo(n,va.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1,t,oc(ns(e)))}}}}(e);const o=Sh(e);if(o){f(o.typeArguments,yR),M<2&&xB(o.parent,1);const t=kh(e);t&&t!==o&&KM(t.expression);const s=ku(n);s.length&&a((()=>{const t=s[0],a=xu(n),c=mp(a);if(function(e,t){const n=Vp(e,1);if(n.length){const r=n[0].declaration;r&&Rv(r,2)&&(OR(t,Cx(e.symbol))||xo(t,va.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private,Oa(e.symbol)))}}(c,o),yR(o.expression),Q(o.typeArguments)){f(o.typeArguments,yR);for(const e of pu(c,o.typeArguments,o))if(!aL(o,e.typeParameters))break}const l=y_(t,n.thisType);PS(r,l,void 0)?PS(i,mS(c),e.name||e,va.Class_static_side_0_incorrectly_extends_base_class_static_side_1):Yj(e,r,l,va.Class_0_incorrectly_extends_base_class_1),8650752&a.flags&&(ru(i)?Vp(a,1).some((e=>4&e.flags))&&!Bv(e,64)&&xo(e.name||e,va.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract):xo(e.name||e,va.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any)),c.symbol&&32&c.symbol.flags||8650752&a.flags||f(bu(c,o.typeArguments,o),(e=>!rO(e.declaration)&&!gS(Gf(e),t)))&&xo(o.expression,va.Base_constructors_must_all_have_the_same_return_type),function(e,t){var n,r,i,o,a;const s=Rd(t),c=new Map;e:for(const l of s){const s=Zj(l);if(4194304&s.flags)continue;const u=Ld(e,s.escapedName);if(!u)continue;const _=Zj(u),d=fx(s);if(xn.assert(!!_,"derived should point to something, even if it is the base class' declaration."),_===s){const r=Cx(e.symbol);if(64&d&&(!r||!Bv(r,64))){for(const n of ku(e)){if(n===t)continue;const e=Ld(n,s.escapedName),r=e&&Zj(e);if(r&&r!==s)continue e}const i=Ws(t),o=Ws(e),a=Us(l),u=ue(null==(n=c.get(r))?void 0:n.missedProperties,a);c.set(r,{baseTypeName:i,typeName:o,missedProperties:u})}}else{const n=fx(_);if(2&d||2&n)continue;let c;const l=98308&s.flags,u=98308&_.flags;if(l&&u){if((6&px(s)?null==(r=s.declarations)?void 0:r.some((e=>eR(e,d))):null==(i=s.declarations)?void 0:i.every((e=>eR(e,d))))||262144&px(s)||_.valueDeclaration&&uP(_.valueDeclaration))continue;const c=4!==l&&4===u,p=4===l&&4!==u;if(c||p){const n=c?va._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:va._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;xo(Pc(_.valueDeclaration)||_.valueDeclaration,n,Us(s),Ws(t),Ws(e))}else if(z){const r=null==(o=_.declarations)?void 0:o.find((e=>172===e.kind&&!e.initializer));if(r&&!(33554432&_.flags)&&!(64&d)&&!(64&n)&&!(null==(a=_.declarations)?void 0:a.some((e=>!!(33554432&e.flags))))){const n=CC(Cx(e.symbol)),i=r.name;if(r.exclamationToken||!n||!qD(i)||!U||!nR(i,e,n)){const e=va.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration;xo(Pc(_.valueDeclaration)||_.valueDeclaration,e,Us(s),Ws(t))}}}continue}if(lA(s)){if(lA(_)||4&_.flags)continue;xn.assert(!!(98304&_.flags)),c=va.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor}else c=98304&s.flags?va.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:va.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;xo(Pc(_.valueDeclaration)||_.valueDeclaration,c,Ws(t),Us(s),Ws(e))}}for(const[e,t]of c)if(1===p(t.missedProperties))mP(e)?xo(e,va.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,Te(t.missedProperties),t.baseTypeName):xo(e,va.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,t.typeName,Te(t.missedProperties),t.baseTypeName);else if(p(t.missedProperties)>5){const n=O(t.missedProperties.slice(0,4),(e=>`'${e}'`)).join(", "),r=p(t.missedProperties)-4;mP(e)?xo(e,va.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more,t.baseTypeName,n,r):xo(e,va.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more,t.typeName,t.baseTypeName,n,r)}else{const n=O(t.missedProperties,(e=>`'${e}'`)).join(", ");mP(e)?xo(e,va.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1,t.baseTypeName,n):xo(e,va.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2,t.typeName,t.baseTypeName,n)}}(n,t)}))}!function(e,t,n,r){const i=Sh(e)&&ku(t),o=(null==i?void 0:i.length)?y_(Te(i),t.thisType):void 0,a=xu(t);for(const i of e.members)Vv(i)||(fE(i)&&f(i.parameters,(s=>{rc(s,i)&&Xj(e,r,a,o,t,n,s,!0)})),Xj(e,r,a,o,t,n,i,!1))}(e,n,r,i);const s=Th(e);if(s)for(const e of s)vb(e.expression)&&!Sl(e.expression)||xo(e.expression,va.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),cL(e),a(c(e));function c(t){return()=>{const i=Sp(Sx(t));if(!Nc(i))if(Du(i)){const t=i.symbol&&32&i.symbol.flags?va.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:va.Class_0_incorrectly_implements_interface_1,o=y_(i,n.thisType);PS(r,o,void 0)||Yj(e,r,o,t)}else xo(t,va.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members)}}a((()=>{zj(n,t),zj(i,t,!0),ZM(e),function(e){if(!U||!X||33554432&e.flags)return;const t=CC(e);for(const n of e.members)if(!(128&Qv(n))&&!Jv(n)&&tR(n)){const e=n.name;if(qD(e)||VD(e)||oE(e)){const r=$l(ns(n));3&r.flags||ak(r)||t&&nR(e,r,t)||xo(n.name,va.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor,Ap(e))}}}(e)}))}function Xj(e,t,n,r,i,o,a,s,c=!0){const l=a.name&&JR(a.name)||JR(a);return l?Qj(e,t,n,r,i,o,$v(a),qv(a),Jv(a),s,Sc(l),c?a:void 0):0}function Qj(e,t,n,r,i,o,a,s,c,l,u,_){const d=Mm(e),p=!!(33554432&e.flags);if(r&&(a||A.noImplicitOverride)){const e=yc(u),i=c?n:r,f=Jp(c?t:o,e),m=Jp(i,e),g=Ws(r);if(f&&!m&&a){if(_){const e=$A(u,i);e?xo(_,d?va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1,g,Us(e)):xo(_,d?va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0,g)}return 2}if(f&&(null==m?void 0:m.declarations)&&A.noImplicitOverride&&!p){const e=Q(m.declarations,qv);if(a)return 0;if(!e)return _&&xo(_,l?d?va.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:va.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:d?va.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:va.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0,g),1;if(s&&e)return _&&xo(_,va.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0,g),1}}else if(a){if(_){const e=Ws(i);xo(_,d?va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:va.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class,e)}return 2}return 0}function Yj(e,t,n,r){let i=!1;for(const r of e.members){if(Jv(r))continue;const e=r.name&&JR(r.name)||JR(r);if(e){const o=Jp(t,e.escapedName),a=Jp(n,e.escapedName);if(o&&a){const s=()=>uS(void 0,va.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2,Us(e),Ws(t),Ws(n));PS($l(o),$l(a),r.name||r,void 0,s)||(i=!0)}}}i||PS(t,n,e.name||e,r)}function Zj(e){return 1&px(e)?e.links.target:e}function eR(e,t){return 64&t&&(!uE(e)||!e.initializer)||XP(e.parent)}function tR(e){return 172===e.kind&&!qv(e)&&!e.exclamationToken&&!e.initializer}function nR(e,t,n){const r=oE(e)?YC.createElementAccessExpression(YC.createThis(),e.expression):YC.createPropertyAccessExpression(YC.createThis(),e);return OT(r.expression,r),OT(r,n),r.flowNode=n.returnFlowNode,!ak(XD(r,t,XT(t)))}function rR(e){const t=Wo(e);if(!(1024&t.flags)){t.flags|=1024;let n,r=0;for(const t of e.members){const e=iR(t,r,n);Wo(t).enumMemberValue=e,r="number"==typeof e.value?e.value+1:void 0,n=t}}}function iR(e,t,n){if(Op(e.name))xo(e.name,va.Computed_property_names_are_not_allowed_in_enums);else{const t=Lp(e.name);WT(t)&&!qT(t)&&xo(e.name,va.An_enum_member_cannot_have_a_numeric_name)}if(e.initializer)return function(e){const t=tf(e.parent),n=e.initializer,r=_e(n,e);return void 0!==r.value?t&&"number"==typeof r.value&&!isFinite(r.value)?xo(n,isNaN(r.value)?va.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:va.const_enum_member_initializer_was_evaluated_to_a_non_finite_value):NS(A)&&"string"==typeof r.value&&!r.isSyntacticallyString&&xo(n,va._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled,`${bc(e.parent.name)}.${Lp(e.name)}`):t?xo(n,va.const_enum_member_initializers_must_be_constant_expressions):33554432&e.parent.flags?xo(n,va.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):PS(KM(n),zt,n,va.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values),r}(e);if(33554432&e.parent.flags&&!tf(e.parent))return SC(void 0);if(void 0===t)return xo(e.name,va.Enum_member_must_have_initializer),SC(void 0);if(NS(A)&&(null==n?void 0:n.initializer)){const t=aB(n);("number"!=typeof t.value||t.resolvedOtherFiles)&&xo(e.name,va.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled)}return SC(t)}function oR(e,t){const n=Ma(e,111551,!0);if(!n)return SC(void 0);if(80===e.kind){const t=e;if(qT(t.escapedText)&&n===qh(t.escapedText,111551,void 0))return SC(+t.escapedText,!1)}if(8&n.flags)return t?aR(e,n,t):aB(n.valueDeclaration);if(wE(n)){const e=n.valueDeclaration;if(e&&KP(e)&&!e.type&&e.initializer&&(!t||e!==t&&Xo(e,t))){const n=_e(e.initializer,e);return t&&Sd(t)!==Sd(e)?SC(n.value,!1,!0,!0):SC(n.value,n.isSyntacticallyString,n.resolvedOtherFiles,!0)}}return SC(void 0)}function aR(e,t,n){const r=t.valueDeclaration;if(!r||r===n)return xo(e,va.Property_0_is_used_before_being_assigned,Us(t)),SC(void 0);if(!Xo(r,n))return xo(e,va.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums),SC(0);const i=aB(r);return n.parent!==r.parent?SC(i.value,i.isSyntacticallyString,i.resolvedOtherFiles,!0):i}function sR(e){VD(e.name)&&xo(e,va.An_enum_member_cannot_be_named_with_a_private_identifier),e.initializer&&KM(e.initializer)}function cR(e,t){switch(e.kind){case 243:for(const n of e.declarationList.declarations)cR(n,t);break;case 277:case 278:_J(e,va.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 271:case 272:_J(e,va.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 208:case 260:const n=e.name;if(Eu(n)){for(const e of n.elements)cR(e,t);break}case 263:case 266:case 262:case 264:case 267:case 265:if(t)return}}function lR(e){const t=Cg(e);if(!t||Nd(t))return!1;if(!wD(t))return xo(t,va.String_literal_expected),!1;const n=268===e.parent.kind&&sp(e.parent.parent);if(307!==e.parent.kind&&!n)return xo(t,278===e.kind?va.Export_declarations_are_not_permitted_in_a_namespace:va.Import_declarations_in_a_namespace_cannot_reference_a_module),!1;if(n&&Os(t.text)&&!tc(e))return xo(e,va.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),!1;if(!rN(e)&&e.attributes){const t=118===e.attributes.token?va.Import_attribute_values_must_be_string_literal_expressions:va.Import_assertion_values_must_be_string_literal_expressions;let n=!1;for(const r of e.attributes.elements)wD(r.value)||(n=!0,xo(r.value,t));return!n}return!0}function uR(e){var t,n,r,i;let o=ns(e);const a=Ea(o);if(a!==ht){if(o=ts(o.exportSymbol||o),Mm(e)&&!(111551&a.flags)&&!Wl(e)){const s=Vl(e)?e.propertyName||e.name:Dc(e)?e.name:e;if(xn.assert(280!==e.kind),281===e.kind){const i=xo(s,va.Types_cannot_appear_in_export_declarations_in_JavaScript_files),o=null==(n=null==(t=Sd(e).symbol)?void 0:t.exports)?void 0:n.get((e.propertyName||e.name).escapedText);if(o===a){const e=null==(r=o.declarations)?void 0:r.find(P_);e&&fT(i,Rp(e,va._0_is_automatically_exported_here,vc(o.escapedName)))}}else{xn.assert(260!==e.kind);const t=mc(e,_n(iN,rN)),n=(t&&(null==(i=Sg(t))?void 0:i.text))??"...",r=vc(qD(s)?s.escapedText:o.escapedName);xo(s,va._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation,r,`import("${n}").${r}`)}return}const s=Pa(a);if(s&((1160127&o.flags?111551:0)|(788968&o.flags?788968:0)|(1920&o.flags?1920:0))?xo(e,281===e.kind?va.Export_declaration_conflicts_with_exported_declaration_of_0:va.Import_declaration_conflicts_with_local_declaration_of_0,Us(o)):281!==e.kind&&A.isolatedModules&&!mc(e,Wl)&&1160127&o.flags&&xo(e,va.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled,Us(o),Ne),NS(A)&&!Wl(e)&&!(33554432&e.flags)){const t=Aa(o),n=!(111551&s);if(n||t)switch(e.kind){case 273:case 276:case 271:if(A.verbatimModuleSyntax){xn.assertIsDefined(e.name,"An ImportClause with a symbol should have a name");const r=A.verbatimModuleSyntax&&Fm(e)?va.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:n?va._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:va._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled,i=bc(276===e.kind&&e.propertyName||e.name);Zo(xo(e,r,i),n?void 0:t,i)}n&&271===e.kind&&Rv(e,32)&&xo(e,va.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled,Ne);break;case 281:if(A.verbatimModuleSyntax||Sd(t)!==Sd(e)){const r=bc(e.propertyName||e.name);Zo(n?xo(e,va.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type,Ne):xo(e,va._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled,r,Ne),n?void 0:t,r);break}}!A.verbatimModuleSyntax||271===e.kind||Mm(e)||1!==B&&1!==Sd(e).impliedNodeFormat||xo(e,va.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}if(fN(e)){const t=_R(o,e);wo(t)&&t.declarations&&Eo(e,t.declarations,t.escapedName)}}}function _R(e,t){if(!(2097152&e.flags)||wo(e)||!sa(e))return e;const n=Ea(e);if(n===ht)return n;for(;2097152&e.flags;){const r=jF(e);if(!r)break;if(r===n)break;if(r.declarations&&p(r.declarations)){if(wo(r)){Eo(t,r.declarations,r.escapedName);break}if(e===n)break;e=r}}return n}function dR(e){tj(e,e.name),uR(e),276===e.kind&&"default"===bc(e.propertyName||e.name)&&FS(A)&&4!==B&&(B<5||1===Sd(e).impliedNodeFormat)&&xB(e,131072)}function pR(e){var t;const n=e.attributes;if(n){const r=ny(!0);r!==wn&&PS(function(e){const t=Wo(e);if(!t.resolvedType){const n=No(4096,"__importAttributes"),r=ed();f(e.elements,(e=>{const t=No(4,xC(e));t.parent=n,t.links.type=function(e){return sx(DM(e.value))}(e),t.links.target=t,r.set(t.escapedName,t)}));const i=ks(n,r,u,u,u);i.objectFlags|=262272,t.resolvedType=i}return t.resolvedType}(n),KT(r,32768),n);const i=qq(e),o=Kq(n,i?pJ:void 0),a=118===e.attributes.token;if(i&&o)return;if(99!==(199===B&&e.moduleSpecifier&&pa(e.moduleSpecifier))&&99!==B&&200!==B)return pJ(n,a?199===B?va.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:va.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve:199===B?va.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:va.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve);if(AF(e)||(iN(e)?null==(t=e.importClause)?void 0:t.isTypeOnly:e.isTypeOnly))return pJ(n,a?va.Import_attributes_cannot_be_used_with_type_only_imports_or_exports:va.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);if(o)return pJ(n,va.resolution_mode_can_only_be_set_for_type_only_imports)}}function fR(e,t){const n=307===e.parent.kind||268===e.parent.kind||267===e.parent.kind;return n||_J(e,t),!n}function mR(e){if(uR(e),LS(A)&&lc(e.propertyName||e.name,!0),e.parent.parent.moduleSpecifier)FS(A)&&4!==B&&(B<5||1===Sd(e).impliedNodeFormat)&&"default"===bc(e.propertyName||e.name)&&xB(e,131072);else{const t=e.propertyName||e.name,n=je(t,t.escapedText,2998271,void 0,!0);n&&(n===ge||n===he||n.declarations&&Yp(kc(n.declarations[0])))?xo(t,va.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,bc(t)):eP(e,7)}}function gR(e){const t=ns(e),n=Uo(t);if(!n.exportsChecked){const e=t.exports.get("export=");if(e&&function(e){return ld(e.exports,((e,t)=>"export="!==t))}(t)){const t=sa(e)||e.valueDeclaration;!t||tc(t)||Mm(t)||xo(t,va.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}const r=Qa(t);r&&r.forEach((({declarations:e,flags:t},n)=>{if("__export"===n)return;if(1920&t)return;const r=N(e,un(PB,dn(XP)));if(!(524288&t&&r<=2)&&r>1&&!hR(e))for(const t of e)jB(t)&&ro.add(Rp(t,va.Cannot_redeclare_exported_variable_0,vc(n)))})),n.exportsChecked=!0}}function hR(e){return e&&e.length>1&&e.every((e=>Mm(e)&&Ox(e)&&(rg(e.expression)||og(e.expression))))}function yR(e){if(e){const n=r;r=e,h=0,function(e){Rg(e)&&f(e.jsDoc,(({comment:t,tags:n})=>{vR(t),f(n,(t=>{vR(t.comment),Mm(e)&&yR(t)}))}));const n=e.kind;if(t)switch(n){case 267:case 263:case 264:case 262:t.throwIfCancellationRequested()}switch(n>=243&&n<=259&&jg(e)&&e.flowNode&&!UD(e.flowNode)&&ko(!1===A.allowUnreachableCode,e,va.Unreachable_code_detected),n){case 168:return WM(e);case 169:return HM(e);case 172:return eL(e);case 171:return function(e){return VD(e.name)&&xo(e,va.Private_identifiers_are_not_allowed_outside_class_bodies),eL(e)}(e);case 185:case 184:case 179:case 180:case 181:return XM(e);case 174:case 173:return function(e){rJ(e)||GB(e.name),dE(e)&&e.asteriskToken&&qD(e.name)&&"constructor"===bc(e.name)&&xo(e.name,va.Class_constructor_may_not_be_a_generator),OL(e),Bv(e,64)&&174===e.kind&&e.body&&xo(e,va.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,Ap(e.name)),VD(e.name)&&!Zf(e)&&xo(e,va.Private_identifiers_are_not_allowed_outside_class_bodies),tL(e)}(e);case 175:return function(e){CB(e),LI(e,yR)}(e);case 176:return function(e){XM(e),function(e){const t=Mm(e)?wv(e):void 0,n=e.typeParameters||t&&Se(t);if(n){const t=n.pos===n.end?n.pos:as(Sd(e).text,n.pos);return dJ(e,t,n.end-t,va.Type_parameters_cannot_appear_on_a_constructor_declaration)}}(e)||function(e){const t=e.type||Cv(e);t&&pJ(t,va.Type_annotation_cannot_appear_on_a_constructor_declaration)}(e),yR(e.body);const t=ns(e),n=Y_(t,e.kind);function r(e){return!!Zl(e)||172===e.kind&&!Jv(e)&&!!e.initializer}e===n&&pL(t),Nd(e.body)||a((function(){const t=e.parent;if(kh(t)){JP(e.parent,t);const n=$P(t),i=zP(e.body);if(i){if(n&&xo(i,va.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null),!$&&(Q(e.parent.members,r)||Q(e.parameters,(e=>Bv(e,31)))))if(function(e,t){const n=ah(e.parent);return NP(n)&&n.parent===t}(i,e.body)){let t;for(const n of e.body.statements){if(NP(n)&&lf(fA(n.expression))){t=n;break}if(nL(n))break}void 0===t&&xo(e,va.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers)}else xo(i,va.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers)}else n||xo(e,va.Constructors_for_derived_classes_must_contain_a_super_call)}}))}(e);case 177:case 178:return rL(e);case 183:return cL(e);case 182:return function(e){const t=function(e){switch(e.parent.kind){case 219:case 179:case 262:case 218:case 184:case 174:case 173:const t=e.parent;if(e===t.type)return t}}(e);if(!t)return void xo(e,va.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);const n=Cf(t),r=Wf(n);if(!r)return;yR(e.type);const{parameterName:i}=e;if(0===r.kind||2===r.kind)vx(i);else if(r.parameterIndex>=0){if(JB(n)&&r.parameterIndex===n.parameters.length-1)xo(i,va.A_type_predicate_cannot_reference_a_rest_parameter);else if(r.type){const t=()=>uS(void 0,va.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);PS(r.type,$l(n.parameters[r.parameterIndex]),e.type,void 0,t)}}else if(i){let n=!1;for(const{name:e}of t.parameters)if(Eu(e)&&GM(e,i,r.parameterName)){n=!0;break}n||xo(e.parameterName,va.Cannot_find_parameter_0,r.parameterName)}}(e);case 186:return function(e){Lh(e)}(e);case 187:return function(e){f(e.members,yR),a((function(){const t=Xb(e);zj(t,t.symbol),ZM(e),YM(e)}))}(e);case 188:return function(e){yR(e.elementType)}(e);case 189:return function(e){let t=!1,n=!1;for(const r of e.elements){let e=Cy(r);if(8&e){const t=Sx(r.type);if(!Hk(t)){xo(r,va.A_rest_element_type_must_be_an_array_type);break}(qk(t)||PT(t)&&4&t.target.combinedFlags)&&(e|=4)}if(4&e){if(n){pJ(r,va.A_rest_element_cannot_follow_another_rest_element);break}n=!0}else if(2&e){if(n){pJ(r,va.An_optional_element_cannot_follow_a_rest_element);break}t=!0}else if(1&e&&t){pJ(r,va.A_required_element_cannot_follow_an_optional_element);break}}f(e.elements,yR),Sx(e)}(e);case 192:case 193:return function(e){f(e.types,yR),Sx(e)}(e);case 196:case 190:case 191:return yR(e.type);case 197:return function(e){vx(e)}(e);case 198:return function(e){!function(e){if(158===e.operator){if(155!==e.type.kind)return pJ(e.type,va._0_expected,Ra(155));let t=oh(e.parent);if(Mm(t)&&UN(t)){const e=Wg(t);e&&(t=Mg(e)||e)}switch(t.kind){case 260:const n=t;if(80!==n.name.kind)return pJ(e,va.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);if(!Mf(n))return pJ(e,va.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement);if(!(2&n.parent.flags))return pJ(t.name,va.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);break;case 172:if(!Jv(t)||!Kv(t))return pJ(t.name,va.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);break;case 171:if(!Bv(t,8))return pJ(t.name,va.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);break;default:pJ(e,va.unique_symbol_types_are_not_allowed_here)}}else 148===e.operator&&188!==e.type.kind&&189!==e.type.kind&&_J(e,va.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types,Ra(155))}(e),yR(e.type)}(e);case 194:return function(e){LI(e,yR)}(e);case 195:return function(e){mc(e,(e=>e.parent&&194===e.parent.kind&&e.parent.extendsType===e))||pJ(e,va.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type),yR(e.typeParameter);const t=ns(e.typeParameter);if(t.declarations&&t.declarations.length>1){const e=Uo(t);if(!e.typeParametersChecked){e.typeParametersChecked=!0;const n=Lu(t),r=Z_(t,168);if(!Wj(r,[n],(e=>[e]))){const e=Us(t);for(const t of r)xo(t.name,va.All_declarations_of_0_must_have_identical_constraints,e)}}}ML(e)}(e);case 203:return function(e){for(const t of e.templateSpans)yR(t.type),PS(Sx(t.type),hn,t.type);Sx(e)}(e);case 205:return function(e){yR(e.argument),e.attributes&&Kq(e.attributes,pJ),lL(e)}(e);case 202:return function(e){e.dotDotDotToken&&e.questionToken&&pJ(e,va.A_tuple_member_cannot_be_both_optional_and_rest),190===e.type.kind&&pJ(e.type,va.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type),191===e.type.kind&&pJ(e.type,va.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type),yR(e.type),Sx(e)}(e);case 328:return function(e){const t=Kg(e);if(!t||!GP(t)&&!mP(t))return void xo(t,va.JSDoc_0_is_not_attached_to_a_class,bc(e.tagName));const n=ll(t).filter(cF);xn.assert(n.length>0),n.length>1&&xo(n[1],va.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);const r=IL(e.class.expression),i=kh(t);if(i){const t=IL(i.expression);t&&r.escapedText!==t.escapedText&&xo(r,va.JSDoc_0_1_does_not_match_the_extends_2_clause,bc(e.tagName),bc(r),bc(t))}}(e);case 329:return function(e){const t=Kg(e);t&&(GP(t)||mP(t))||xo(t,va.JSDoc_0_is_not_attached_to_a_class,bc(e.tagName))}(e);case 346:case 338:case 340:return function(e){e.typeExpression||xo(e.name,va.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),e.name&&Vj(e.name,va.Type_alias_name_cannot_be_0),yR(e.typeExpression),Uj(ml(e))}(e);case 345:return function(e){yR(e.constraint);for(const t of e.typeParameters)yR(t)}(e);case 344:return function(e){yR(e.typeExpression)}(e);case 324:case 325:case 326:return function(e){e.name&&RR(e.name,!0)}(e);case 341:case 348:return function(e){yR(e.typeExpression)}(e);case 317:!function(e){a((function(){e.type||Ng(e)||zC(e,St)})),XM(e)}(e);case 315:case 314:case 312:case 313:case 322:return bR(e),void LI(e,yR);case 318:return void function(e){bR(e),yR(e.type);const{parent:t}=e;if(sE(t)&&nF(t.parent))return void(De(t.parent.parameters)!==t&&xo(e,va.A_rest_parameter_must_be_last_in_a_parameter_list));UN(t)||xo(e,va.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const n=e.parent.parent;if(!xF(n))return void xo(e,va.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature);const r=$g(n);if(!r)return;const i=Ug(n);i&&De(i.parameters).symbol===r||xo(e,va.A_rest_parameter_must_be_last_in_a_parameter_list)}(e);case 309:return yR(e.type);case 333:case 335:case 334:return function(e){const t=Wg(e);t&&Zl(t)&&xo(e,va.An_accessibility_modifier_cannot_be_used_with_a_private_identifier)}(e);case 350:return function(e){yR(e.typeExpression);const t=Kg(e);if(t){const e=dl(t,NF);if(p(e)>1)for(let t=1;t{var i;297!==e.kind||n||(void 0===t?t=e:(pJ(e,va.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),n=!0)),296===e.kind&&a((i=e,()=>{const e=KM(i.expression);xM(r,e)||XS(e,r,i.expression,void 0)})),f(e.statements,yR),A.noFallthroughCasesInSwitch&&e.fallthroughFlowNode&&UD(e.fallthroughFlowNode)&&xo(e,va.Fallthrough_case_in_switch)})),e.caseBlock.locals&&ML(e.caseBlock)}(e);case 256:return function(e){mJ(e)||mc(e.parent,(t=>cu(t)?"quit":256===t.kind&&t.label.escapedText===e.label.escapedText&&(pJ(e.label,va.Duplicate_label_0,Gd(e.label)),!0))),yR(e.statement)}(e);case 257:return function(e){mJ(e)||qD(e.expression)&&!e.expression.escapedText&&function(e,t,...n){const r=Sd(e);if(!uJ(r)){const i=Gp(r,e.pos);ro.add(aS(r,js(i),0,t,...n))}}(e,va.Line_break_not_permitted_here),e.expression&&KM(e.expression)}(e);case 258:return function(e){mJ(e),GL(e.tryBlock);const t=e.catchClause;if(t){if(t.variableDeclaration){const e=t.variableDeclaration;rj(e);const n=kv(e);if(n){const e=Sx(n);!e||3&e.flags||_J(n,va.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified)}else if(e.initializer)_J(e.initializer,va.Catch_clause_variable_cannot_have_an_initializer);else{const e=t.block.locals;e&&ud(t.locals,(t=>{const n=e.get(t);(null==n?void 0:n.valueDeclaration)&&0!=(2&n.flags)&&pJ(n.valueDeclaration,va.Cannot_redeclare_identifier_0_in_catch_clause,vc(t))}))}}GL(t.block)}e.finallyBlock&&GL(e.finallyBlock)}(e);case 260:return aj(e);case 208:return function(e){return function(e){if(e.dotDotDotToken){const t=e.parent.elements;if(e!==De(t))return pJ(e,va.A_rest_element_must_be_last_in_a_destructuring_pattern);if(EB(t,va.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),e.propertyName)return pJ(e.name,va.A_rest_element_cannot_have_a_property_name)}e.dotDotDotToken&&e.initializer&&dJ(e,e.initializer.pos-1,1,va.A_rest_element_cannot_have_an_initializer)}(e),rj(e)}(e);case 263:return function(e){const t=S(e.modifiers,cE);J&&t&&Q(e.members,(e=>zv(e)&&Zl(e)))&&pJ(t,va.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator),e.name||Bv(e,2048)||_J(e,va.A_class_declaration_without_the_default_modifier_must_have_a_name),Gj(e),f(e.members,yR),ML(e)}(e);case 264:return function(e){CB(e)||function(e){let t=!1;if(e.heritageClauses)for(const n of e.heritageClauses){if(96!==n.token)return xn.assert(119===n.token),_J(n,va.Interface_declaration_cannot_have_implements_clause);if(t)return _J(n,va.extends_clause_already_seen);t=!0,WB(n)}}(e),Uj(e.typeParameters),a((()=>{Vj(e.name,va.Interface_name_cannot_be_0),fL(e);const t=ns(e);Kj(t);const n=Y_(t,264);if(e===n){const n=ju(t),r=y_(n);if(function(e,t){const n=ku(e);if(n.length<2)return!0;const r=new Map;f(o_(e).declaredProperties,(t=>{r.set(t.escapedName,{prop:t,containingType:e})}));let i=!0;for(const o of n){const n=Rd(y_(o,e.thisType));for(const a of n){const n=r.get(a.escapedName);if(n){if(n.containingType!==e&&0===Bk(n.prop,a,hS)){i=!1;const r=Ws(n.containingType),s=Ws(o);let c=uS(void 0,va.Named_property_0_of_types_1_and_2_are_not_identical,Us(a),r,s);c=uS(c,va.Interface_0_cannot_simultaneously_extend_types_1_and_2,Ws(e),r,s),ro.add(zp(Sd(t),t,c))}}else r.set(a.escapedName,{prop:a,containingType:o})}}return i}(n,e.name)){for(const t of ku(n))PS(r,y_(t,n.thisType),e.name,va.Interface_0_incorrectly_extends_interface_1);zj(n,t)}}YM(e)})),f(wh(e),(e=>{vb(e.expression)&&!Sl(e.expression)||xo(e.expression,va.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),cL(e)})),f(e.members,yR),a((()=>{ZM(e),ML(e)}))}(e);case 265:return function(e){CB(e),Vj(e.name,va.Type_alias_name_cannot_be_0),fL(e),Uj(e.typeParameters),141===e.type.kind?NB.has(e.name.escapedText)&&1===p(e.typeParameters)||xo(e.type,va.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types):(yR(e.type),ML(e))}(e);case 266:return function(e){a((()=>function(e){CB(e),tj(e,e.name),fL(e),e.members.forEach(sR),rR(e);const t=ns(e);if(e===Y_(t,e.kind)){if(t.declarations&&t.declarations.length>1){const n=tf(e);f(t.declarations,(e=>{YP(e)&&tf(e)!==n&&xo(Pc(e),va.Enum_declarations_must_all_be_const_or_non_const)}))}let n=!1;f(t.declarations,(e=>{if(266!==e.kind)return!1;const t=e;if(!t.members.length)return!1;const r=t.members[0];r.initializer||(n?xo(r.name,va.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):n=!0)}))}}(e)))}(e);case 267:return function(e){e.body&&(yR(e.body),pp(e)||ML(e)),a((function(){var t,n;const r=pp(e),i=33554432&e.flags;r&&!i&&xo(e.name,va.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);const o=sp(e),a=o?va.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:va.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;if(fR(e,a))return;CB(e)||i||11!==e.name.kind||pJ(e.name,va.Only_ambient_modules_can_use_quoted_names),qD(e.name)&&tj(e,e.name),fL(e);const s=ns(e);if(512&s.flags&&!i&&MB(e,jS(A))){if(NS(A)&&!Sd(e).externalModuleIndicator&&xo(e.name,va.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement,Ne),(null==(t=s.declarations)?void 0:t.length)>1){const t=function(e){const t=e.declarations;if(t)for(const e of t)if((263===e.kind||262===e.kind&&Fd(e.body))&&!(33554432&e.flags))return e}(s);t&&(Sd(e)!==Sd(t)?xo(e.name,va.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):e.pos95===e.kind));t&&xo(t,va.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled)}}if(o)if(fp(e)){if((r||33554432&ns(e).flags)&&e.body)for(const t of e.body.statements)cR(t,r)}else Yp(e.parent)?r?xo(e.name,va.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):Os(Hh(e.name))&&xo(e.name,va.Ambient_module_declaration_cannot_specify_relative_module_name):xo(e.name,r?va.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:va.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)}))}(e);case 272:return function(e){if(!fR(e,Mm(e)?va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!CB(e)&&e.modifiers&&_J(e,va.An_import_declaration_cannot_have_modifiers),lR(e)){const t=e.importClause;t&&!function(e){var t;return e.isTypeOnly&&e.name&&e.namedBindings?pJ(e,va.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both):!(!e.isTypeOnly||275!==(null==(t=e.namedBindings)?void 0:t.kind))&&hJ(e.namedBindings)}(t)&&(t.name&&dR(t),t.namedBindings)&&(274===t.namedBindings.kind?(dR(t.namedBindings),4!==B&&(B<5||1===Sd(e).impliedNodeFormat)&&FS(A)&&xB(e,65536)):ja(e,e.moduleSpecifier)&&f(t.namedBindings.elements,dR))}pR(e)}}(e);case 271:return function(e){if(!fR(e,Mm(e)?va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)&&(CB(e),Fm(e)||lR(e)))if(dR(e),eP(e,6),283!==e.moduleReference.kind){const t=Ea(ns(e));if(t!==ht){const n=Pa(t);if(111551&n){const t=bb(e.moduleReference);1920&Ma(t,112575).flags||xo(t,va.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,Ap(t))}788968&n&&Vj(e.name,va.Import_name_cannot_be_0)}e.isTypeOnly&&pJ(e,va.An_import_alias_cannot_use_import_type)}else!(B>=5&&200!==B&&void 0===Sd(e).impliedNodeFormat)||e.isTypeOnly||33554432&e.flags||pJ(e,va.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(e);case 278:return function(e){if(!fR(e,Mm(e)?va.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:va.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)){if(!CB(e)&&jv(e)&&_J(e,va.An_export_declaration_cannot_have_modifiers),function(e){var t;e.isTypeOnly&&279===(null==(t=e.exportClause)?void 0:t.kind)&&hJ(e.exportClause)}(e),!e.moduleSpecifier||lR(e))if(e.exportClause&&!dN(e.exportClause)){f(e.exportClause.elements,mR);const t=268===e.parent.kind&&sp(e.parent.parent),n=!t&&268===e.parent.kind&&!e.moduleSpecifier&&33554432&e.flags;307===e.parent.kind||t||n||xo(e,va.Export_declarations_are_not_permitted_in_a_namespace)}else{const t=ja(e,e.moduleSpecifier);t&&Ua(t)?xo(e.moduleSpecifier,va.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,Us(t)):e.exportClause&&uR(e.exportClause),4!==B&&(B<5||1===Sd(e).impliedNodeFormat)&&(e.exportClause?FS(A)&&xB(e,65536):xB(e,32768))}pR(e)}}(e);case 277:return function(e){if(fR(e,e.isExportEquals?va.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration:va.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration))return;const t=307===e.parent.kind?e.parent:e.parent.parent;if(267===t.kind&&!sp(t))return void(e.isExportEquals?xo(e,va.An_export_assignment_cannot_be_used_in_a_namespace):xo(e,va.A_default_export_can_only_be_used_in_an_ECMAScript_style_module));!CB(e)&&Lv(e)&&_J(e,va.An_export_assignment_cannot_have_modifiers);const n=kv(e);n&&PS(DM(e.expression),Sx(n),e.expression);const r=!e.isExportEquals&&!(33554432&e.flags)&&A.verbatimModuleSyntax&&(1===B||1===Sd(e).impliedNodeFormat);if(80===e.expression.kind){const t=e.expression,n=_s(Ma(t,-1,!0,!0,e));if(n){eP(e,3);const i=Aa(n,111551);if(111551&Pa(n)?(DM(t),r||33554432&e.flags||!A.verbatimModuleSyntax||!i||xo(t,e.isExportEquals?va.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:va.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,bc(t))):r||33554432&e.flags||!A.verbatimModuleSyntax||xo(t,e.isExportEquals?va.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:va.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type,bc(t)),!r&&!(33554432&e.flags)&&NS(A)&&!(111551&n.flags)){const r=Pa(n,!1,!0);!(2097152&n.flags&&788968&r)||111551&r||i&&Sd(i)===Sd(e)?i&&Sd(i)!==Sd(e)&&Zo(xo(t,e.isExportEquals?va._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:va._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,bc(t),Ne),i,bc(t)):xo(t,e.isExportEquals?va._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported:va._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,bc(t),Ne)}}else DM(t);LS(A)&&lc(t,!0)}else DM(e.expression);r&&xo(e,va.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled),gR(t),33554432&e.flags&&!vb(e.expression)&&pJ(e.expression,va.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),e.isExportEquals&&(B>=5&&200!==B&&(33554432&e.flags&&99===Sd(e).impliedNodeFormat||!(33554432&e.flags)&&1!==Sd(e).impliedNodeFormat)?pJ(e,va.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):4!==B||33554432&e.flags||pJ(e,va.Export_assignment_is_not_supported_when_module_flag_is_system))}(e);case 242:case 259:return void mJ(e);case 282:!function(e){AL(e)}(e)}}(e),r=n}}function vR(e){ot(e)&&f(e,(e=>{q_(e)&&yR(e)}))}function bR(e){if(!Mm(e))if(eF(e)||ZN(e)){const t=Ra(eF(e)?54:58),n=e.postfix?va._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:va._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1,r=Sx(e.type);pJ(e,n,t,Ws(ZN(e)&&r!==en&&r!==Zt?ev(ue([r,It],e.postfix?void 0:Rt)):r))}else pJ(e,va.JSDoc_types_can_only_be_used_inside_documentation_comments)}function SR(e){const t=Wo(Sd(e));1&t.flags?xn.assert(!t.deferredNodes,"A type-checked file should have no deferred nodes."):(t.deferredNodes||(t.deferredNodes=new Set),t.deferredNodes.add(e))}function kR(e){var t,n;null==(t=or)||t.push(or.Phase.Check,"checkDeferredNode",{kind:e.kind,pos:e.pos,end:e.end,path:e.tracingPath});const o=r;switch(r=e,h=0,e.kind){case 213:case 214:case 215:case 170:case 286:iI(e);break;case 218:case 219:case 174:case 173:!function(e){xn.assert(174!==e.kind||$f(e));const t=Jh(e),n=Xf(e);if(tM(e,n),e.body)if(Cv(e)||Gf(Cf(e)),241===e.body.kind)yR(e.body);else{const r=KM(e.body),i=n&&Bj(n,t);if(i){const n=DI(e.body);IS(2==(3&t)?hL(r,!1,n,va.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):r,i,n,n)}}}(e);break;case 177:case 178:rL(e);break;case 231:!function(e){f(e.members,yR),ML(e)}(e);break;case 168:!function(e){var t,n;if(XP(e.parent)||gu(e.parent)||QP(e.parent)){const r=Lu(ns(e)),o=24576&Dk(r);if(o){const a=ns(e.parent);if(!QP(e.parent)||52&wx(ju(a))){if(8192===o||16384===o){null==(t=or)||t.push(or.Phase.CheckTypes,"checkTypeParameterDeferred",{parent:qy(ju(a)),id:qy(r)});const s=Ck(a,r,16384===o?zn:Jn),c=Ck(a,r,16384===o?Jn:zn),l=r;i=r,PS(s,c,e,va.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation),i=l,null==(n=or)||n.pop()}}else xo(e,va.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types)}}}(e);break;case 285:!function(e){iA(e)}(e);break;case 284:!function(e){iA(e.openingElement),JF(e.closingElement.tagName)?KF(e.closingElement):KM(e.closingElement.tagName),$F(e)}(e);break;case 216:case 234:case 217:!function(e){const{type:t}=mO(e),n=tP(e)?t:e,r=Wo(e);xn.assertIsDefined(r.assertionExpressionType);const i=AC(cT(r.assertionExpressionType)),o=Sx(t);Nc(o)||a((()=>{const e=RC(i);TS(o,e)||XS(i,o,n,va.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first)}))}(e);break;case 222:KM(e.expression);break;case 226:Eb(e)&&iI(e)}r=o,null==(n=or)||n.pop()}function TR(e,t){if(t)return!1;switch(e){case 0:return!!A.noUnusedLocals;case 1:return!!A.noUnusedParameters;default:return xn.assertNever(e)}}function CR(e){return fi.get(e.path)||u}function wR(n,r){try{return t=r,function(t){if(t){ER();const e=ro.getGlobalDiagnostics(),n=e.length;PR(t);const r=ro.getDiagnostics(t.fileName),i=ro.getGlobalDiagnostics();return i!==e?Z(le(e,i,pS),r):0===n&&i.length>0?Z(i,r):r}return f(e.getSourceFiles(),PR),ro.getDiagnostics()}(n)}finally{t=void 0}}function ER(){for(const e of o)e();o=[]}function PR(t){ER();const n=a;var r,i,o;a=e=>e(),r=t,null==(i=or)||i.push(or.Phase.Check,"checkSourceFile",{path:r.path},!0),pr("beforeCheck"),function(t){const n=Wo(t);if(!(1&n.flags)){if(yT(t,A,e))return;!function(e){33554432&e.flags&&function(e){for(const t of e.statements)if((h_(t)||243===t.kind)&&fJ(t))return!0}(e)}(t),I(Hi),I(Gi),I(Xi),I(Qi),I(Yi),f(t.statements,yR),yR(t.endOfFileToken),function(e){const t=Wo(e);t.deferredNodes&&t.deferredNodes.forEach(kR),t.deferredNodes=void 0}(t),Zp(t)&&ML(t),a((()=>{t.isDeclarationFile||!A.noUnusedLocals&&!A.noUnusedParameters||LL(CR(t),((e,t,n)=>{!xd(e)&&TR(t,!!(33554432&e.flags))&&ro.add(n)})),t.isDeclarationFile||function(){var e;for(const t of Yi)if(!(null==(e=ns(t))?void 0:e.isReferenced)){const e=ac(t);xn.assert(ay(e),"Only parameter declaration should be checked here");const n=Rp(t.name,va._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation,Ap(t.name),Ap(t.propertyName));e.type||fT(n,aS(Sd(e),e.end,1,va.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here,Ap(t.propertyName))),ro.add(n)}}()})),Zp(t)&&gR(t),Hi.length&&(f(Hi,QL),I(Hi)),Gi.length&&(f(Gi,YL),I(Gi)),Xi.length&&(f(Xi,ZL),I(Xi)),Qi.length&&(f(Qi,ej),I(Qi)),n.flags|=1}}(r),pr("afterCheck"),fr("Check","beforeCheck","afterCheck"),null==(o=or)||o.pop(),a=n}function NR(e){for(;166===e.parent.kind;)e=e.parent;return 183===e.parent.kind}function AR(e,t){let n,r=Zf(e);for(;r&&!(n=t(r));)r=Zf(r);return n}function OR(e,t){return!!AR(e,(e=>e===t))}function MR(e){return void 0!==function(e){for(;166===e.parent.kind;)e=e.parent;return 271===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:277===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function LR(e){if(dh(e))return rs(e.parent);if(Mm(e)&&211===e.parent.kind&&e.parent===e.parent.parent.left&&!VD(e)&&!WN(e)&&!function(e){if(110===e.expression.kind){const t=rm(e,!1,!1);if(cu(t)){const e=aN(t);if(e){const t=uN(e,oF(e,void 0));return t&&!Ec(t)}}}}(e.parent)){const t=function(e){switch(ag(e.parent.parent)){case 1:case 3:return rs(e.parent);case 5:if(GE(e.parent)&&jx(e.parent)===e)return;case 4:case 2:return ns(e.parent.parent)}}(e);if(t)return t}if(277===e.parent.kind&&vb(e)){const t=Ma(e,2998271,!0);if(t&&t!==ht)return t}else if(ou(e)&&MR(e)){const t=Eh(e,271);return xn.assert(void 0!==t),Ia(e,!0)}if(ou(e)){const t=function(e){let t=e.parent;for(;iE(t);)e=t,t=t.parent;if(t&&205===t.kind&&t.qualifier===e)return t}(e);if(t){Sx(t);const n=Wo(e).resolvedSymbol;return n===ht?void 0:n}}for(;Db(e);)e=e.parent;if(function(e){for(;211===e.parent.kind;)e=e.parent;return 233===e.parent.kind}(e)){let t=0;233===e.parent.kind?(t=wf(e)?788968:111551,yb(e.parent)&&(t|=111551)):t=1920,t|=2097152;const n=vb(e)?Ma(e,t,!0):void 0;if(n)return n}if(341===e.parent.kind)return $g(e.parent);if(168===e.parent.kind&&345===e.parent.parent.kind){xn.assert(!Mm(e));const t=Gg(e.parent);return t&&t.symbol}if(Tm(e)){if(Nd(e))return;const t=mc(e,_n(q_,KN,WN)),n=t?901119:111551;if(80===e.kind){if(km(e)&&JF(e)){const t=KF(e.parent);return t===ht?void 0:t}const r=Ma(e,n,!0,!0,Ug(e));if(!r&&t){const t=mc(e,_n(gu,XP));if(t)return RR(e,!0,ns(t))}if(r&&t){const t=Wg(e);if(t&&$N(t)&&t===r.valueDeclaration)return Ma(e,n,!0,!0,Sd(t))||r}return r}if(VD(e))return NA(e);if(211===e.kind||166===e.kind){const n=Wo(e);return n.resolvedSymbol?n.resolvedSymbol:(211===e.kind?(wA(e,0),n.resolvedSymbol||(n.resolvedSymbol=jR(DM(e.expression),Tv(e.name)))):DA(e,0),!n.resolvedSymbol&&t&&iE(e)?RR(e):n.resolvedSymbol)}if(WN(e))return RR(e)}else if(NR(e)){const t=Ma(e,183===e.parent.kind?788968:1920,!1,!0);return t&&t!==ht?t:Xg(e)}return 182===e.parent.kind?Ma(e,1):void 0}function jR(e,t){const n=ff(e,t);if(n.length&&e.members){const t=zm(Od(e).members);if(n===cf(e))return t;if(t){const r=Uo(t),i=O(q(n,(e=>e.declaration)),IB).join(",");if(r.filteredIndexSymbolCache||(r.filteredIndexSymbolCache=new Map),r.filteredIndexSymbolCache.has(i))return r.filteredIndexSymbolCache.get(i);{const t=No(131072,"__index");return t.declarations=q(n,(e=>e.declaration)),t.parent=e.aliasSymbol?e.aliasSymbol:e.symbol?e.symbol:JR(t.declarations[0].parent),r.filteredIndexSymbolCache.set(i,t),t}}}}function RR(e,t,n){if(ou(e)){const r=901119;let i=Ma(e,r,t,!0,Ug(e));if(!i&&qD(e)&&n&&(i=ts(Ho(Ga(n),e.escapedText,r))),i)return i}const r=qD(e)?n:RR(e.left,t,n),i=qD(e)?e.escapedText:e.right.escapedText;if(r){const e=111551&r.flags&&Jp($l(r),"prototype");return Jp(e?$l(e):ju(r),i)}}function JR(e,t){if(qN(e))return qI(e)?ts(e.symbol):void 0;const{parent:n}=e,r=n.parent;if(!(67108864&e.flags)){if(RB(e)){const t=ns(n);return Vl(e.parent)&&e.parent.propertyName===e?jF(t):t}if(fh(e))return ns(n.parent);if(80===e.kind){if(MR(e))return LR(e);if(208===n.kind&&206===r.kind&&e===n.propertyName){const t=Jp(zR(r),e.escapedText);if(t)return t}else if(xP(n)&&n.name===e)return 105===n.keywordToken&&"target"===bc(e)?bO(n).symbol:102===n.keywordToken&&"meta"===bc(e)?ey().members.get("meta"):void 0}switch(e.kind){case 80:case 81:case 211:case 166:if(!bv(e))return LR(e);case 110:const i=rm(e,!1,!1);if(cu(i)){const e=Cf(i);if(e.thisParameter)return e.thisParameter}if(Cm(e))return KM(e).symbol;case 197:return vx(e).symbol;case 108:return KM(e).symbol;case 137:const o=e.parent;return o&&176===o.kind?o.parent.symbol:void 0;case 11:case 15:if(Em(e.parent.parent)&&Pm(e.parent.parent)===e||(272===e.parent.kind||278===e.parent.kind)&&e.parent.moduleSpecifier===e||Mm(e)&&AF(e.parent)&&e.parent.moduleSpecifier===e||Mm(e)&&Jm(e.parent,!1)||uf(e.parent)||JE(e.parent)&&df(e.parent.parent)&&e.parent.parent.argument===e.parent)return ja(e,e,t);if(QE(n)&&sg(n)&&n.arguments[1]===e)return ns(n);case 9:const a=XE(n)?n.argumentExpression===e?qM(n.expression):void 0:JE(n)&&RE(r)?Sx(r.objectType):void 0;return a&&Jp(a,yc(e.text));case 90:case 100:case 39:case 86:return rs(e.parent);case 205:return df(e)?JR(e.argument.literal,t):void 0;case 95:return mN(e.parent)?xn.checkDefined(e.parent.symbol):void 0;case 102:case 105:return xP(e.parent)?vO(e.parent).symbol:void 0;case 104:if(uP(e.parent)){const t=qM(e.parent.right),n=gM(t);return(null==n?void 0:n.symbol)??t.symbol}return;case 236:return KM(e).symbol;case 295:if(km(e)&&JF(e)){const t=KF(e.parent);return t===ht?void 0:t}default:return}}}function zR(e){if(qN(e)&&!qI(e))return Dt;if(67108864&e.flags)return Dt;const t=fb(e),n=t&&Nu(ns(t.class));if(wf(e)){const t=Sx(e);return n?y_(t,n.thisType):t}if(Tm(e))return qR(e);if(n&&!t.isImplements){const e=Se(ku(n));return e?y_(e,n.thisType):Dt}if(YT(e))return ju(ns(e));if(80===(r=e).kind&&YT(r.parent)&&Pc(r.parent)===r){const t=JR(e);return t?ju(t):Dt}var r;if(KE(e))return Gc(e,!0,0)||Dt;if(h_(e)){const t=ns(e);return t?$l(t):Dt}if(RB(e)){const t=JR(e);return t?$l(t):Dt}if(Eu(e))return Gc(e.parent,!0,0)||Dt;if(MR(e)){const t=JR(e);if(t){const e=ju(t);return Nc(e)?$l(t):e}}return xP(e.parent)&&e.parent.keywordToken===e.kind?vO(e.parent):lN(e)?ny(!1):Dt}function $R(e){if(xn.assert(210===e.kind||209===e.kind),250===e.parent.kind)return vM(e,pj(e.parent)||Dt);if(226===e.parent.kind)return vM(e,qM(e.parent.right)||Dt);if(303===e.parent.kind){const t=ut(e.parent.parent,HE);return hM(t,$R(t)||Dt,Qd(t.properties,e.parent))}const t=ut(e.parent,WE),n=$R(t)||Dt,r=fj(65,n,It,e.parent)||Dt;return yM(t,n,t.elements.indexOf(e),r)}function qR(e){return Cb(e)&&(e=e.parent),sx(qM(e))}function VR(e){const t=rs(e.parent);return Jv(e)?$l(t):ju(t)}function UR(e){const t=e.name;switch(t.kind){case 80:return lx(bc(t));case 9:case 11:return lx(t.text);case 167:const e=IF(t);return dM(e,12288)?e:Jt;default:return xn.fail("Unsupported property name.")}}function KR(e){const t=ed(Rd(e=mp(e))),n=Vp(e,0).length?Hn:Vp(e,1).length?Gn:void 0;return n&&f(Rd(n),(e=>{t.has(e.escapedName)||t.set(e.escapedName,e)})),bs(t)}function WR(e){return 0!==Vp(e,0).length||0!==Vp(e,1).length}function HR(e){if(418&e.flags&&e.valueDeclaration&&!qN(e.valueDeclaration)){const t=Uo(e);if(void 0===t.isDeclarationWithCollidingName){const n=Np(e.valueDeclaration);if(Cd(n)||function(e){return e.valueDeclaration&&KE(e.valueDeclaration)&&299===ac(e.valueDeclaration).parent.kind}(e))if(je(n.parent,e.escapedName,111551,void 0,!1))t.isDeclarationWithCollidingName=!0;else if(oB(e.valueDeclaration,16384)){const r=oB(e.valueDeclaration,32768),i=Zu(n,!1),o=241===n.kind&&Zu(n.parent,!1);t.isDeclarationWithCollidingName=!(dp(n)||r&&(i||o))}else t.isDeclarationWithCollidingName=!1}return t.isDeclarationWithCollidingName}return!1}function XR(e){switch(xn.assert(Ie),e.kind){case 271:return QR(ns(e));case 273:case 274:case 276:case 281:const t=ns(e);return!!t&&QR(t,!0);case 278:const n=e.exportClause;return!!n&&(dN(n)||Q(n.elements,XR));case 277:return!e.expression||80!==e.expression.kind||QR(ns(e),!0)}return!1}function QR(e,t){if(!e)return!1;const n=Sd(e.valueDeclaration);$a(n&&ns(n));const r=_s(Ea(e));return r===ht?!t||!Aa(e):!!(111551&Pa(e,t,!0))&&(jS(A)||!YR(r))}function YR(e){return mM(e)||!!e.constEnumOnlyModule}function ZR(e,t){if(xn.assert(Ie),la(e)){const t=ns(e),n=t&&Uo(t);if(null==n?void 0:n.referenced)return!0;const r=Uo(t).aliasTarget;if(r&&32&Qv(e)&&111551&Pa(r)&&(jS(A)||!YR(r)))return!0}return!!t&&!!LI(e,(e=>ZR(e,t)))}function tB(e){if(Fd(e.body)){if(I_(e)||A_(e))return!1;const t=Jf(ns(e));return t.length>1||1===t.length&&t[0].declaration!==e}return!1}function nB(e){return(function(e){return!(!U||xf(e)||xF(e)||!e.initializer||Bv(e,31))}(e)||function(e){return U&&xf(e)&&(xF(e)||!e.initializer)&&Bv(e,31)}(e))&&!function(e){const t=gB(e);return!!t&&ak(Sx(t))}(e)}function rB(e){const t=hc(e,(e=>HP(e)||KP(e)));if(!t)return!1;let n;if(KP(t)){if(t.type||!Mm(t)&&!SJ(t))return!1;const e=Xm(t);if(!e||!p_(e))return!1;n=ns(e)}else n=ns(t);return!!(n&&16&n.flags|3)&&!!ld(Ga(n),(e=>111551&e.flags&&hC(e.valueDeclaration)))}function iB(e){var t;const n=e.id||0;return n<0||n>=Bi.length?0:(null==(t=Bi[n])?void 0:t.flags)||0}function oB(e,t){return function(e,t){if((A.noCheck||!vT(Sd(e),A))&&!(Wo(e).calculatedFlags&t))switch(t){case 16:case 32:return i(e);case 128:case 256:case 2097152:return void n(e,r);case 512:case 8192:case 65536:case 262144:return function(e){n(e,o)}(e);case 536870912:return a(e);case 4096:case 32768:case 16384:return function(e){n(Np(dh(e)?e.parent:e),s)}(e);default:return xn.assertNever(t,`Unhandled node check flag calculation: ${xn.formatNodeCheckFlags(t)}`)}function n(e,t){const n=t(e,e.parent);if("skip"!==n)return n||jI(e,t)}function r(e){const n=Wo(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=2097536,i(e)}function i(e){Wo(e).calculatedFlags|=48,108===e.kind&&tN(e)}function o(e){const n=Wo(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=336384,a(e)}function a(e){if(Wo(e).calculatedFlags|=536920064,qD(e)&&Tm(e)&&(!GE(e.parent)||e.parent.name!==e)){const t=JR(e,!0);t&&t!==ht&&IP(e,t)}}function s(e){const n=Wo(e);if(n.calculatedFlags&t)return"skip";n.calculatedFlags|=53248,function(e){a(e),oE(e)&&IF(e),VD(e)&&mu(e.parent)&&tL(e.parent)}(e)}}(e,t),!!(iB(e)&t)}function aB(e){return rR(e.parent),Wo(e).enumMemberValue??SC(void 0)}function sB(e){switch(e.kind){case 306:case 211:case 212:return!0}return!1}function cB(e){if(306===e.kind)return aB(e).value;Wo(e).resolvedSymbol||DM(e);const t=Wo(e).resolvedSymbol||(vb(e)?Ma(e,111551,!0):void 0);if(t&&8&t.flags){const e=t.valueDeclaration;if(tf(e.parent))return aB(e).value}}function lB(e){return!!(524288&e.flags)&&Vp(e,0).length>0}function uB(e){const t=178===(e=hc(e,yl)).kind?177:178,n=Y_(ns(e),t);return{firstAccessor:n&&n.pos{if(t)return t=void 0,!0;t=e.expression})):t=n}return t}function pB(e,t){const n=Wo(e).resolvedSymbol;if(n)return n;let r=e;if(t){const t=e.parent;h_(t)&&e===t.name&&(r=kc(t))}return je(r,e.escapedText,3257279,void 0,!0)}function fB(e){return e?(go(e),Sd(e).localJsxFactory||Zr):Zr}function mB(e){if(e){const t=Sd(e);if(t){if(t.localJsxFragmentFactory)return t.localJsxFragmentFactory;const e=t.pragmas.get("jsxfrag"),n=ot(e)?e[0]:e;if(n)return t.localJsxFragmentFactory=zI(n.arguments.factory,M),t.localJsxFragmentFactory}}if(A.jsxFragmentFactory)return zI(A.jsxFragmentFactory,M)}function gB(e){const t=kv(e);if(t)return t;if(169===e.kind&&178===e.parent.kind){const t=uB(e.parent).getAccessor;if(t)return Cv(t)}}function yB(e){const t=267===e.kind?lt(e.name,wD):Cg(e),n=Ba(t,t,void 0);if(n)return Y_(n,307)}function xB(e,t){if(A.importHelpers){const n=Sd(e);if(hp(n,A)&&!(33554432&e.flags)){const r=function(e,t){const n=Wo(e);return n.externalHelpersModule||(n.externalHelpersModule=Ja(function(e){xn.assert(A.importHelpers,"Expected importHelpers to be enabled");const t=e.imports[0];return xn.assert(t&&ly(t)&&"tslib"===t.text,"Expected sourceFile.imports[0] to be the synthesized tslib import"),t}(e),G_,va.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,t)||ht),n.externalHelpersModule}(n,e);if(r!==ht){const n=Uo(r);if(n.requestedExternalEmitHelpers??(n.requestedExternalEmitHelpers=0),(n.requestedExternalEmitHelpers&t)!==t){const i=t&~n.requestedExternalEmitHelpers;for(let t=1;t<=16777216;t<<=1)if(i&t)for(const n of SB(t)){const i=Da(Ho(Qa(r),yc(n),111551));i?524288&t?Q(Jf(i),(e=>FO(e)>3))||xo(e,va.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,G_,n,4):1048576&t?Q(Jf(i),(e=>FO(e)>4))||xo(e,va.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,G_,n,5):1024&t&&(Q(Jf(i),(e=>FO(e)>2))||xo(e,va.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0,G_,n,3)):xo(e,va.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,G_,n)}}n.requestedExternalEmitHelpers|=t}}}}function SB(e){switch(e){case 1:return["__extends"];case 2:return["__assign"];case 4:return["__rest"];case 8:return J?["__decorate"]:["__esDecorate","__runInitializers"];case 16:return["__metadata"];case 32:return["__param"];case 64:return["__awaiter"];case 128:return["__generator"];case 256:return["__values"];case 512:return["__read"];case 1024:return["__spreadArray"];case 2048:return["__await"];case 4096:return["__asyncGenerator"];case 8192:return["__asyncDelegator"];case 16384:return["__asyncValues"];case 32768:return["__exportStar"];case 65536:return["__importStar"];case 131072:return["__importDefault"];case 262144:return["__makeTemplateObject"];case 524288:return["__classPrivateFieldGet"];case 1048576:return["__classPrivateFieldSet"];case 2097152:return["__classPrivateFieldIn"];case 4194304:return["__setFunctionName"];case 8388608:return["__propKey"];case 16777216:return["__addDisposableResource","__disposeResources"];default:return xn.fail("Unrecognized helper")}}function CB(e){var t;const n=function(e){const t=function(e){return MA(e)?S(e.modifiers,cE):void 0}(e);return t&&_J(t,va.Decorators_are_not_valid_here)}(e)||function(e){if(!e.modifiers)return!1;const t=function(e){switch(e.kind){case 177:case 178:case 176:case 172:case 171:case 174:case 173:case 181:case 267:case 272:case 271:case 278:case 277:case 218:case 219:case 169:case 168:return;case 175:case 303:case 304:case 270:case 282:return S(e.modifiers,iu);default:if(268===e.parent.kind||307===e.parent.kind)return;switch(e.kind){case 262:return DB(e,134);case 263:case 185:return DB(e,128);case 231:case 264:case 265:return S(e.modifiers,iu);case 243:return 4&e.declarationList.flags?DB(e,135):S(e.modifiers,iu);case 266:return DB(e,87);default:xn.assertNever(e)}}}(e);return t&&_J(t,va.Modifiers_cannot_appear_here)}(e);if(void 0!==n)return n;if(sE(e)&&hv(e))return _J(e,va.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters);const r=EP(e)?7&e.declarationList.flags:0;let i,o,a,s,c,l=0,u=!1,_=!1;for(const n of e.modifiers)if(cE(n)){if(!gm(J,e,e.parent,e.parent.parent))return 174!==e.kind||Fd(e.body)?_J(e,va.Decorators_are_not_valid_here):_J(e,va.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(J&&(177===e.kind||178===e.kind)){const t=uB(e);if(Wv(t.firstAccessor)&&e===t.secondAccessor)return _J(e,va.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}if(-34849&l)return pJ(n,va.Decorators_are_not_valid_here);if(_&&98303&l)return xn.assertIsDefined(c),!uJ(Sd(n))&&(fT(xo(n,va.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),Rp(c,va.Decorator_used_before_export_here)),!0);l|=32768,98303&l?32&l&&(u=!0):_=!0,c??(c=n)}else{if(148!==n.kind){if(171===e.kind||173===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_type_member,Ra(n.kind));if(181===e.kind&&(126!==n.kind||!gu(e.parent)))return pJ(n,va._0_modifier_cannot_appear_on_an_index_signature,Ra(n.kind))}if(103!==n.kind&&147!==n.kind&&87!==n.kind&&168===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_type_parameter,Ra(n.kind));switch(n.kind){case 87:{if(266!==e.kind&&168!==e.kind)return pJ(e,va.A_class_member_cannot_have_the_0_keyword,Ra(87));const t=CF(e.parent)&&Kg(e.parent)||e.parent;if(168===e.kind&&!(uu(t)||gu(t)||SE(t)||kE(t)||hE(t)||yE(t)||_E(t)))return pJ(n,va._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class,Ra(n.kind));break}case 164:if(16&l)return pJ(n,va._0_modifier_already_seen,"override");if(128&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"override","declare");if(8&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"override","readonly");if(512&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"override","accessor");if(1024&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"override","async");l|=16,s=n;break;case 125:case 124:case 123:const _=ec(ob(n.kind));if(7&l)return pJ(n,va.Accessibility_modifier_already_seen);if(16&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"override");if(256&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"static");if(512&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"accessor");if(8&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"readonly");if(1024&l)return pJ(n,va._0_modifier_must_precede_1_modifier,_,"async");if(268===e.parent.kind||307===e.parent.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_module_or_namespace_element,_);if(64&l)return 123===n.kind?pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,_,"abstract"):pJ(n,va._0_modifier_must_precede_1_modifier,_,"abstract");if(Zl(e))return pJ(n,va.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);l|=ob(n.kind);break;case 126:if(256&l)return pJ(n,va._0_modifier_already_seen,"static");if(8&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"static","readonly");if(1024&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"static","async");if(512&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"static","accessor");if(268===e.parent.kind||307===e.parent.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_module_or_namespace_element,"static");if(169===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_parameter,"static");if(64&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(16&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"static","override");l|=256,i=n;break;case 129:if(512&l)return pJ(n,va._0_modifier_already_seen,"accessor");if(8&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"accessor","readonly");if(128&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"accessor","declare");if(172!==e.kind)return pJ(n,va.accessor_modifier_can_only_appear_on_a_property_declaration);l|=512;break;case 148:if(8&l)return pJ(n,va._0_modifier_already_seen,"readonly");if(172!==e.kind&&171!==e.kind&&181!==e.kind&&169!==e.kind)return pJ(n,va.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);if(512&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"readonly","accessor");l|=8;break;case 95:if(A.verbatimModuleSyntax&&!(33554432&e.flags)&&265!==e.kind&&264!==e.kind&&267!==e.kind&&307===e.parent.kind&&(1===B||1===Sd(e).impliedNodeFormat))return pJ(n,va.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);if(32&l)return pJ(n,va._0_modifier_already_seen,"export");if(128&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"export","declare");if(64&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"export","abstract");if(1024&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"export","async");if(gu(e.parent))return pJ(n,va._0_modifier_cannot_appear_on_class_elements_of_this_kind,"export");if(169===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_parameter,"export");if(4===r)return pJ(n,va._0_modifier_cannot_appear_on_a_using_declaration,"export");if(6===r)return pJ(n,va._0_modifier_cannot_appear_on_an_await_using_declaration,"export");l|=32;break;case 90:const d=307===e.parent.kind?e.parent:e.parent.parent;if(267===d.kind&&!sp(d))return pJ(n,va.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);if(4===r)return pJ(n,va._0_modifier_cannot_appear_on_a_using_declaration,"default");if(6===r)return pJ(n,va._0_modifier_cannot_appear_on_an_await_using_declaration,"default");if(!(32&l))return pJ(n,va._0_modifier_must_precede_1_modifier,"export","default");if(u)return pJ(c,va.Decorators_are_not_valid_here);l|=2048;break;case 138:if(128&l)return pJ(n,va._0_modifier_already_seen,"declare");if(1024&l)return pJ(n,va._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(16&l)return pJ(n,va._0_modifier_cannot_be_used_in_an_ambient_context,"override");if(gu(e.parent)&&!uE(e))return pJ(n,va._0_modifier_cannot_appear_on_class_elements_of_this_kind,"declare");if(169===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_parameter,"declare");if(4===r)return pJ(n,va._0_modifier_cannot_appear_on_a_using_declaration,"declare");if(6===r)return pJ(n,va._0_modifier_cannot_appear_on_an_await_using_declaration,"declare");if(33554432&e.parent.flags&&268===e.parent.kind)return pJ(n,va.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);if(Zl(e))return pJ(n,va._0_modifier_cannot_be_used_with_a_private_identifier,"declare");if(512&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"declare","accessor");l|=128,o=n;break;case 128:if(64&l)return pJ(n,va._0_modifier_already_seen,"abstract");if(263!==e.kind&&185!==e.kind){if(174!==e.kind&&172!==e.kind&&177!==e.kind&&178!==e.kind)return pJ(n,va.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);if(263!==e.parent.kind||!Bv(e.parent,64))return pJ(n,172===e.kind?va.Abstract_properties_can_only_appear_within_an_abstract_class:va.Abstract_methods_can_only_appear_within_an_abstract_class);if(256&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"static","abstract");if(2&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"private","abstract");if(1024&l&&a)return pJ(a,va._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");if(16&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"abstract","override");if(512&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"abstract","accessor")}if(Dc(e)&&81===e.name.kind)return pJ(n,va._0_modifier_cannot_be_used_with_a_private_identifier,"abstract");l|=64;break;case 134:if(1024&l)return pJ(n,va._0_modifier_already_seen,"async");if(128&l||33554432&e.parent.flags)return pJ(n,va._0_modifier_cannot_be_used_in_an_ambient_context,"async");if(169===e.kind)return pJ(n,va._0_modifier_cannot_appear_on_a_parameter,"async");if(64&l)return pJ(n,va._0_modifier_cannot_be_used_with_1_modifier,"async","abstract");l|=1024,a=n;break;case 103:case 147:{const r=103===n.kind?8192:16384,i=103===n.kind?"in":"out",o=CF(e.parent)&&(Kg(e.parent)||S(null==(t=Hg(e.parent))?void 0:t.tags,wF))||e.parent;if(168!==e.kind||o&&!(XP(o)||gu(o)||QP(o)||wF(o)))return pJ(n,va._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias,i);if(l&r)return pJ(n,va._0_modifier_already_seen,i);if(8192&r&&16384&l)return pJ(n,va._0_modifier_must_precede_1_modifier,"in","out");l|=r;break}}}return 176===e.kind?256&l?pJ(i,va._0_modifier_cannot_appear_on_a_constructor_declaration,"static"):16&l?pJ(s,va._0_modifier_cannot_appear_on_a_constructor_declaration,"override"):!!(1024&l)&&pJ(a,va._0_modifier_cannot_appear_on_a_constructor_declaration,"async"):(272===e.kind||271===e.kind)&&128&l?pJ(o,va.A_0_modifier_cannot_be_used_with_an_import_declaration,"declare"):169===e.kind&&31&l&&Eu(e.name)?pJ(e,va.A_parameter_property_may_not_be_declared_using_a_binding_pattern):169===e.kind&&31&l&&e.dotDotDotToken?pJ(e,va.A_parameter_property_cannot_be_declared_using_a_rest_parameter):!!(1024&l)&&function(e,t){switch(e.kind){case 174:case 262:case 218:case 219:return!1}return pJ(t,va._0_modifier_cannot_be_used_here,"async")}(e,a)}function DB(e,t){const n=S(e.modifiers,iu);return n&&n.kind!==t?n:void 0}function EB(e,t=va.Trailing_comma_not_allowed){return!(!e||!e.hasTrailingComma)&&dJ(e[0],e.end-",".length,",".length,t)}function LB(e,t){if(e&&0===e.length){const n=e.pos-"<".length;return dJ(t,n,as(t.text,e.end)+">".length-n,va.Type_parameter_list_cannot_be_empty)}return!1}function UB(e){const t=Sd(e);return CB(e)||LB(e.typeParameters,t)||function(e){let t=!1;const n=e.length;for(let r=0;r1||e.typeParameters.hasTrailingComma||e.typeParameters[0].constraint)&&t&&Io(t.fileName,[".mts",".cts"])&&pJ(e.typeParameters[0],va.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);const{equalsGreaterThanToken:n}=e;return Xa(t,n.pos).line!==Xa(t,n.end).line&&pJ(n,va.Line_terminator_not_permitted_before_arrow)}(e,t)||uu(e)&&function(e){if(M>=3){const t=e.body&&DP(e.body)&&sA(e.body.statements);if(t){const n=F(e.parameters,(e=>!!e.initializer||Eu(e.name)||U_(e)));if(p(n)){f(n,(e=>{fT(xo(e,va.This_parameter_is_not_allowed_with_use_strict_directive),Rp(t,va.use_strict_directive_used_here))}));const e=n.map(((e,t)=>Rp(e,0===t?va.Non_simple_parameter_declared_here:va.and_here)));return fT(xo(t,va.use_strict_directive_cannot_be_used_with_non_simple_parameter_list),...e),!0}}}return!1}(e)}function KB(e,t){return EB(t)||function(e,t){if(t&&0===t.length){const n=Sd(e),r=t.pos-"<".length;return dJ(n,r,as(n.text,t.end)+">".length-r,va.Type_argument_list_cannot_be_empty)}return!1}(e,t)}function WB(e){const t=e.types;if(EB(t))return!0;if(t&&0===t.length){const n=Ra(e.token);return dJ(e,t.pos,0,va._0_list_cannot_be_empty,n)}return Q(t,HB)}function HB(e){return hP(e)&&nE(e.expression)&&e.typeArguments?pJ(e,va.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments):KB(e,e.typeArguments)}function GB(e){if(167!==e.kind)return!1;const t=e;return 226===t.expression.kind&&28===t.expression.operatorToken.kind&&pJ(t.expression,va.A_comma_expression_is_not_allowed_in_a_computed_property_name)}function XB(e){if(e.asteriskToken){if(xn.assert(262===e.kind||218===e.kind||174===e.kind),33554432&e.flags)return pJ(e.asteriskToken,va.Generators_are_not_allowed_in_an_ambient_context);if(!e.body)return pJ(e.asteriskToken,va.An_overload_signature_cannot_be_declared_as_a_generator)}}function QB(e,t){return!!e&&pJ(e,t)}function YB(e,t){return!!e&&pJ(e,t)}function eJ(e){if(mJ(e))return!0;if(250===e.kind&&e.awaitModifier&&!(65536&e.flags)){const t=Sd(e);if(om(e)){if(!uJ(t))switch(hp(t,A)||ro.add(Rp(e.awaitModifier,va.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)),B){case 100:case 199:if(1===t.impliedNodeFormat){ro.add(Rp(e.awaitModifier,va.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level));break}case 7:case 99:case 4:if(M>=4)break;default:ro.add(Rp(e.awaitModifier,va.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher))}}else if(!uJ(t)){const t=Rp(e.awaitModifier,va.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules),n=Qf(e);return n&&176!==n.kind&&(xn.assert(0==(2&Jh(n)),"Enclosing function should never be an async function."),fT(t,Rp(n,va.Did_you_mean_to_mark_this_function_as_async))),ro.add(t),!0}}if(LP(e)&&!(65536&e.flags)&&qD(e.initializer)&&"async"===e.initializer.escapedText)return pJ(e.initializer,va.The_left_hand_side_of_a_for_of_statement_may_not_be_async),!1;if(261===e.initializer.kind){const t=e.initializer;if(!cJ(t)){const n=t.declarations;if(!n.length)return!1;if(n.length>1){const n=249===e.kind?va.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:va.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return _J(t.declarations[1],n)}const r=n[0];if(r.initializer){const t=249===e.kind?va.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:va.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return pJ(r.name,t)}if(r.type)return pJ(r,249===e.kind?va.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:va.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}return!1}function tJ(e){if(e.parameters.length===(177===e.kind?1:2))return gv(e)}function nJ(e,t){if(function(e){return Uh(e)&&!a_(e)}(e))return pJ(e,t)}function rJ(e){if(UB(e))return!0;if(174===e.kind){if(210===e.parent.kind){if(e.modifiers&&(1!==e.modifiers.length||134!==Te(e.modifiers).kind))return _J(e,va.Modifiers_cannot_appear_here);if(QB(e.questionToken,va.An_object_member_cannot_be_declared_optional))return!0;if(YB(e.exclamationToken,va.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(void 0===e.body)return dJ(e,e.end-1,";".length,va._0_expected,"{")}if(XB(e))return!0}if(gu(e.parent)){if(M<2&&VD(e.name))return pJ(e.name,va.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);if(33554432&e.flags)return nJ(e.name,va.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(174===e.kind&&!e.body)return nJ(e.name,va.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(264===e.parent.kind)return nJ(e.name,va.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(187===e.parent.kind)return nJ(e.name,va.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function iJ(e){return $h(e)||224===e.kind&&41===e.operator&&9===e.operand.kind}function oJ(e){const t=e.initializer;if(t){const r=!(iJ(t)||function(e){if((GE(e)||XE(e)&&iJ(e.argumentExpression))&&vb(e.expression))return!!(1056&DM(e).flags)}(t)||112===t.kind||97===t.kind||(n=t,10===n.kind||224===n.kind&&41===n.operator&&10===n.operand.kind));if(!(nf(e)||KP(e)&&SJ(e))||e.type)return pJ(t,va.Initializers_are_not_allowed_in_ambient_contexts);if(r)return pJ(t,va.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference)}var n}function aJ(e){if(80===e.kind){if("__esModule"===bc(e))return function(e,t,n,...r){return!uJ(Sd(t))&&(vo(e,t,n,...r),!0)}("noEmit",e,va.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else{const t=e.elements;for(const e of t)if(!gP(e))return aJ(e.name)}return!1}function sJ(e){if(80===e.kind){if("let"===e.escapedText)return pJ(e,va.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else{const t=e.elements;for(const e of t)gP(e)||sJ(e.name)}return!1}function cJ(e){const t=e.declarations;if(EB(e.declarations))return!0;if(!e.declarations.length)return dJ(e,t.pos,t.end-t.pos,va.Variable_declaration_list_cannot_be_empty);const n=7&e.flags;return 4!==n&&6!==n||!MP(e.parent)?6===n&&cM(e):pJ(e,4===n?va.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:va.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration)}function lJ(e){switch(e.kind){case 245:case 246:case 247:case 254:case 248:case 249:case 250:return!1;case 256:return lJ(e.parent)}return!0}function uJ(e){return e.parseDiagnostics.length>0}function _J(e,t,...n){const r=Sd(e);if(!uJ(r)){const i=Gp(r,e.pos);return ro.add(aS(r,i.start,i.length,t,...n)),!0}return!1}function dJ(e,t,n,r,...i){const o=Sd(e);return!uJ(o)&&(ro.add(aS(o,t,n,r,...i)),!0)}function pJ(e,t,...n){return!uJ(Sd(e))&&(ro.add(Rp(e,t,...n)),!0)}function fJ(e){return 264!==e.kind&&265!==e.kind&&272!==e.kind&&271!==e.kind&&278!==e.kind&&277!==e.kind&&270!==e.kind&&!Bv(e,2208)&&_J(e,va.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function mJ(e){if(33554432&e.flags){if(!Wo(e).hasReportedStatementInAmbientContext&&(cu(e.parent)||hu(e.parent)))return Wo(e).hasReportedStatementInAmbientContext=_J(e,va.An_implementation_cannot_be_declared_in_ambient_contexts);if(241===e.parent.kind||268===e.parent.kind||307===e.parent.kind){const t=Wo(e.parent);if(!t.hasReportedStatementInAmbientContext)return t.hasReportedStatementInAmbientContext=_J(e,va.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function gJ(e){const t=Gd(e).includes("."),n=16&e.numericLiteralFlags;t||n||+e.text<=2**53-1||So(!1,Rp(e,va.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}function hJ(e){return!!f(e.elements,(e=>{if(e.isTypeOnly)return _J(e,276===e.kind?va.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:va.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement)}))}function yJ(e,t,n){if(1048576&t.flags&&2621440&e.flags){const r=Uw(t,e);if(r)return r;const i=Rd(e);if(i){const e=$w(i,t);if(e){const r=bk(t,O(e,(e=>[()=>$l(e),e.escapedName])),n);if(r!==t)return r}}}}function vJ(e){return Kh(e)||(oE(e)?jw(qM(e.expression)):void 0)}function bJ(e){return xe===e?Le:(xe=e,Le=cc(e))}function xJ(e){return ve===e?Me:(ve=e,Me=uc(e))}function SJ(e){const t=7&xJ(e);return 2===t||4===t||6===t}}function jB(e){return 262!==e.kind&&174!==e.kind||!!e.body}function RB(e){switch(e.parent.kind){case 276:case 281:return qD(e);default:return dh(e)}}function BB(e){switch(e){case 0:return"yieldType";case 1:return"returnType";case 2:return"nextType"}}function JB(e){return!!(1&e.flags)}function zB(e){return!!(2&e.flags)}(yB=hB||(hB={})).JSX="JSX",yB.IntrinsicElements="IntrinsicElements",yB.ElementClass="ElementClass",yB.ElementAttributesPropertyNameContainer="ElementAttributesProperty",yB.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",yB.Element="Element",yB.ElementType="ElementType",yB.IntrinsicAttributes="IntrinsicAttributes",yB.IntrinsicClassAttributes="IntrinsicClassAttributes",yB.LibraryManagedAttributes="LibraryManagedAttributes";var $B=class e{constructor(t,n,r){var i;for(this.moduleResolverHost=void 0,this.inner=void 0,this.disableTrackSymbol=!1;n instanceof e;)n=n.inner;this.inner=n,this.moduleResolverHost=r,this.context=t,this.canTrackSymbol=!!(null==(i=this.inner)?void 0:i.trackSymbol)}trackSymbol(e,t,n){var r,i;if((null==(r=this.inner)?void 0:r.trackSymbol)&&!this.disableTrackSymbol){if(this.inner.trackSymbol(e,t,n))return this.onDiagnosticReported(),!0;262144&e.flags||((i=this.context).trackedSymbols??(i.trackedSymbols=[])).push([e,t,n])}return!1}reportInaccessibleThisError(){var e;(null==(e=this.inner)?void 0:e.reportInaccessibleThisError)&&(this.onDiagnosticReported(),this.inner.reportInaccessibleThisError())}reportPrivateInBaseOfClassExpression(e){var t;(null==(t=this.inner)?void 0:t.reportPrivateInBaseOfClassExpression)&&(this.onDiagnosticReported(),this.inner.reportPrivateInBaseOfClassExpression(e))}reportInaccessibleUniqueSymbolError(){var e;(null==(e=this.inner)?void 0:e.reportInaccessibleUniqueSymbolError)&&(this.onDiagnosticReported(),this.inner.reportInaccessibleUniqueSymbolError())}reportCyclicStructureError(){var e;(null==(e=this.inner)?void 0:e.reportCyclicStructureError)&&(this.onDiagnosticReported(),this.inner.reportCyclicStructureError())}reportLikelyUnsafeImportRequiredError(e){var t;(null==(t=this.inner)?void 0:t.reportLikelyUnsafeImportRequiredError)&&(this.onDiagnosticReported(),this.inner.reportLikelyUnsafeImportRequiredError(e))}reportTruncationError(){var e;(null==(e=this.inner)?void 0:e.reportTruncationError)&&(this.onDiagnosticReported(),this.inner.reportTruncationError())}reportNonlocalAugmentation(e,t,n){var r;(null==(r=this.inner)?void 0:r.reportNonlocalAugmentation)&&(this.onDiagnosticReported(),this.inner.reportNonlocalAugmentation(e,t,n))}reportNonSerializableProperty(e){var t;(null==(t=this.inner)?void 0:t.reportNonSerializableProperty)&&(this.onDiagnosticReported(),this.inner.reportNonSerializableProperty(e))}onDiagnosticReported(){this.context.reportedDiagnostic=!0}reportInferenceFallback(e){var t;(null==(t=this.inner)?void 0:t.reportInferenceFallback)&&this.inner.reportInferenceFallback(e)}};function qB(e,t,n,r){if(void 0===e)return e;const i=t(e);let o;return void 0!==i?(o=ot(i)?(r||tJ)(i):i,xn.assertNode(o,n),o):void 0}function VB(e,t,n,r,i){if(void 0===e)return e;const o=e.length;let a;(void 0===r||r<0)&&(r=0),(void 0===i||i>o-r)&&(i=o-r);let s=-1,c=-1;r>0||io-r)&&(i=o-r),KB(e,t,n,r,i)}function KB(e,t,n,r,i){let o;const a=e.length;(r>0||i=2&&(i=function(e,t){let n;for(let r=0;r{const o=rl,addSource:F,setSourceContent:A,addName:I,addMapping:O,appendSourceMap:function(e,t,n,r,i,o){xn.assert(e>=S,"generatedLine cannot backtrack"),xn.assert(t>=0,"generatedCharacter cannot be negative"),s();const a=[];let l;const u=_J(n.mappings);for(const s of u){if(o&&(s.generatedLine>o.line||s.generatedLine===o.line&&s.generatedCharacter>o.character))break;if(i&&(s.generatedLineJSON.stringify(R())};function F(t){s();const n=ma(r,t,e.getCurrentDirectory(),e.getCanonicalFileName,!0);let i=_.get(n);return void 0===i&&(i=u.length,u.push(n),l.push(t),_.set(n,i)),c(),i}function A(e,t){if(s(),null!==t){for(o||(o=[]);o.length=S,"generatedLine cannot backtrack"),xn.assert(t>=0,"generatedCharacter cannot be negative"),xn.assert(void 0===n||n>=0,"sourceIndex cannot be negative"),xn.assert(void 0===r||r>=0,"sourceLine cannot be negative"),xn.assert(void 0===i||i>=0,"sourceCharacter cannot be negative"),s(),(function(e,t){return!E||S!==e||k!==t}(e,t)||function(e,t,n){return void 0!==e&&void 0!==t&&void 0!==n&&T===e&&(C>t||C===t&&w>n)}(n,r,i))&&(L(),S=e,k=t,P=!1,N=!1,E=!0),void 0!==n&&void 0!==r&&void 0!==i&&(T=n,C=r,w=i,P=!0,void 0!==o&&(D=o,N=!0)),c()}function M(e){p.push(e),p.length>=1024&&j()}function L(){if(E&&(!x||m!==S||g!==k||h!==T||y!==C||v!==w||b!==D)){if(s(),m0&&(f+=String.fromCharCode.apply(void 0,p),p.length=0)}function R(){return L(),j(),{version:3,file:t,sourceRoot:n,sources:u,names:d,mappings:f,sourcesContent:o}}function B(e){e<0?e=1+(-e<<1):e<<=1;do{let n=31&e;(e>>=5)>0&&(n|=32),M((t=n)>=0&&t<26?65+t:t>=26&&t<52?97+t-26:t>=52&&t<62?48+t-52:62===t?43:63===t?47:xn.fail(`${t}: not a base64 value`))}while(e>0);var t}}var rJ=/\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,iJ=/^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,oJ=/^\s*(\/\/[@#] .*)?$/;function aJ(e,t){return{getLineCount:()=>t.length,getLineText:n=>e.substring(t[n],t[n+1])}}function sJ(e){for(let t=e.getLineCount()-1;t>=0;t--){const n=e.getLineText(t),r=iJ.exec(n);if(r)return r[1].trimEnd();if(!n.match(oJ))break}}function cJ(e){return"string"==typeof e||null===e}function lJ(e){return null!==e&&"object"==typeof e&&3===e.version&&"string"==typeof e.file&&"string"==typeof e.mappings&&ot(e.sources)&&x(e.sources,st)&&(void 0===e.sourceRoot||null===e.sourceRoot||"string"==typeof e.sourceRoot)&&(void 0===e.sourcesContent||null===e.sourcesContent||ot(e.sourcesContent)&&x(e.sourcesContent,cJ))&&(void 0===e.names||null===e.names||ot(e.names)&&x(e.names,st))}function uJ(e){try{const t=JSON.parse(e);if(lJ(t))return t}catch{}}function _J(e){let t,n=!1,r=0,i=0,o=0,a=0,s=0,c=0,l=0;return{get pos(){return r},get error(){return t},get state(){return u(!0,!0)},next(){for(;!n&&r=e.length)return d("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;const a=(o=e.charCodeAt(r))>=65&&o<=90?o-65:o>=97&&o<=122?o-97+26:o>=48&&o<=57?o-48+52:43===o?62:47===o?63:-1;if(-1===a)return d("Invalid character in VLQ"),-1;t=0!=(32&a),i|=(31&a)<>=1:(i>>=1,i=-i),i}}function dJ(e,t){return e===t||e.generatedLine===t.generatedLine&&e.generatedCharacter===t.generatedCharacter&&e.sourceIndex===t.sourceIndex&&e.sourceLine===t.sourceLine&&e.sourceCharacter===t.sourceCharacter&&e.nameIndex===t.nameIndex}function pJ(e){return void 0!==e.sourceIndex&&void 0!==e.sourceLine&&void 0!==e.sourceCharacter}function fJ(e){return void 0!==e.sourceIndex&&void 0!==e.sourcePosition}function mJ(e,t){return e.generatedPosition===t.generatedPosition&&e.sourceIndex===t.sourceIndex&&e.sourcePosition===t.sourcePosition}function gJ(e,t){return xn.assert(e.sourceIndex===t.sourceIndex),Nt(e.sourcePosition,t.sourcePosition)}function hJ(e,t){return Nt(e.generatedPosition,t.generatedPosition)}function yJ(e){return e.sourcePosition}function vJ(e){return e.generatedPosition}function bJ(e,t,n){const r=Ro(n),i=t.sourceRoot?Go(t.sourceRoot,r):r,o=Go(t.file,r),a=e.getSourceFileLike(o),s=t.sources.map((e=>Go(e,i))),c=new Map(s.map(((t,n)=>[e.getCanonicalFileName(t),n])));let l,_,d;return{getSourcePosition:function(e){const t=function(){if(void 0===_){const e=[];for(const t of f())e.push(t);_=oe(e,hJ,mJ)}return _}();if(!Q(t))return e;let n=Ie(t,e.pos,vJ,Nt);n<0&&(n=~n);const r=t[n];return void 0!==r&&fJ(r)?{fileName:s[r.sourceIndex],pos:r.sourcePosition}:e},getGeneratedPosition:function(t){const n=c.get(e.getCanonicalFileName(t.fileName));if(void 0===n)return t;const r=function(e){if(void 0===d){const e=[];for(const t of f()){if(!fJ(t))continue;let n=e[t.sourceIndex];n||(e[t.sourceIndex]=n=[]),n.push(t)}d=e.map((e=>oe(e,gJ,mJ)))}return d[e]}(n);if(!Q(r))return t;let i=Ie(r,t.pos,yJ,Nt);i<0&&(i=~i);const a=r[i];return void 0===a||a.sourceIndex!==n?t:{fileName:o,pos:a.generatedPosition}}};function p(n){const r=void 0!==a?Va(a,n.generatedLine,n.generatedCharacter,!0):-1;let i,o;if(pJ(n)){const r=e.getSourceFileLike(s[n.sourceIndex]);i=t.sources[n.sourceIndex],o=void 0!==r?Va(r,n.sourceLine,n.sourceCharacter,!0):-1}return{generatedPosition:r,source:i,sourceIndex:n.sourceIndex,sourcePosition:o,nameIndex:n.nameIndex}}function f(){if(void 0===l){const n=_J(t.mappings),r=$e(n,p);void 0!==n.error?(e.log&&e.log(`Encountered error while decoding sourcemap: ${n.error}`),l=u):l=r}return l}}var xJ={getSourcePosition:mt,getGeneratedPosition:mt};function SJ(e){return(e=fc(e))?IB(e):0}function kJ(e){return!!e&&!(!pN(e)&&!hN(e))&&Q(e.elements,TJ)}function TJ(e){return void 0!==e.propertyName?"default"===e.propertyName.escapedText:"default"===e.name.escapedText}function CJ(e,t){return function(n){return 307===n.kind?t(n):function(n){return e.factory.createBundle(O(n.sourceFiles,t))}(n)}}function wJ(e){return!!wg(e)}function DJ(e){if(wg(e))return!0;const t=e.importClause&&e.importClause.namedBindings;if(!t)return!1;if(!pN(t))return!1;let n=0;for(const e of t.elements)TJ(e)&&n++;return n>0&&n!==t.elements.length||!!(t.elements.length-n)&&Dg(e)}function EJ(e){return!DJ(e)&&(Dg(e)||!!e.importClause&&pN(e.importClause.namedBindings)&&kJ(e.importClause.namedBindings))}function PJ(e,t){const n=e.getEmitResolver(),r=e.getCompilerOptions(),i=[],o=new IJ,a=[],s=new Map,c=new Set;let l,u,_=!1,d=!1,p=!1,f=!1;for(const n of t.statements)switch(n.kind){case 272:i.push(n),!p&&DJ(n)&&(p=!0),!f&&EJ(n)&&(f=!0);break;case 271:283===n.moduleReference.kind&&i.push(n);break;case 278:if(n.moduleSpecifier)if(n.exportClause)if(i.push(n),hN(n.exportClause))g(n),f||(f=kJ(n.exportClause));else{const e=n.exportClause.name;s.get(bc(e))||(FJ(a,SJ(n),e),s.set(bc(e),!0),l=ue(l,e)),p=!0}else i.push(n),d=!0;else g(n);break;case 277:n.isExportEquals&&!u&&(u=n);break;case 243:if(Bv(n,32))for(const e of n.declarationList.declarations)l=NJ(e,s,l,a);break;case 262:Bv(n,32)&&h(n,void 0,Bv(n,2048));break;case 263:if(Bv(n,32))if(Bv(n,2048))_||(FJ(a,SJ(n),e.factory.getDeclarationName(n)),_=!0);else{const e=n.name;e&&!s.get(bc(e))&&(FJ(a,SJ(n),e),s.set(bc(e),!0),l=ue(l,e))}}const m=bA(e.factory,e.getEmitHelperFactory(),t,r,d,p,f);return m&&i.unshift(m),{externalImports:i,exportSpecifiers:o,exportEquals:u,hasExportStarsToExportValues:d,exportedBindings:a,exportedNames:l,exportedFunctions:c,externalHelpersImportDeclaration:m};function g(e){for(const t of ut(e.exportClause,hN).elements)if(!s.get(bc(t.name))){const r=t.propertyName||t.name;e.moduleSpecifier||o.add(r,t);const i=n.getReferencedImportDeclaration(r)||n.getReferencedValueDeclaration(r);if(i){if(262===i.kind){h(i,t.name,"default"===t.name.escapedText);continue}FJ(a,SJ(i),t.name)}s.set(bc(t.name),!0),l=ue(l,t.name)}}function h(t,n,r){c.add(t),r?_||(FJ(a,SJ(t),n??e.factory.getDeclarationName(t)),_=!0):(n??(n=t.name),s.get(bc(n))||(FJ(a,SJ(t),n),s.set(bc(n),!0)))}}function NJ(e,t,n,r){if(Eu(e.name))for(const i of e.name.elements)gP(i)||(n=NJ(i,t,n,r));else if(!Xl(e.name)){const i=bc(e.name);t.get(i)||(t.set(i,!0),n=ue(n,e.name),iA(e.name)&&FJ(r,SJ(e),e.name))}return n}function FJ(e,t,n){let r=e[t];return r?r.push(n):e[t]=r=[n],r}var AJ=class e{constructor(){this._map=new Map}get size(){return this._map.size}has(t){return this._map.has(e.toKey(t))}get(t){return this._map.get(e.toKey(t))}set(t,n){return this._map.set(e.toKey(t),n),this}delete(t){var n;return(null==(n=this._map)?void 0:n.delete(e.toKey(t)))??!1}clear(){this._map.clear()}values(){return this._map.values()}static toKey(t){if(Ql(t)||Xl(t)){const n=t.emitNode.autoGenerate;if(4==(7&n.flags)){const r=QA(t),i=hl(r)&&r!==t?e.toKey(r):`(generated@${IB(r)})`;return ZA(!1,n.prefix,i,n.suffix,e.toKey)}{const t=`(auto@${n.id})`;return ZA(!1,n.prefix,t,n.suffix,e.toKey)}}return VD(t)?bc(t).slice(1):bc(t)}},IJ=class extends AJ{add(e,t){let n=this.get(e);return n?n.push(t):this.set(e,n=[t]),n}remove(e,t){const n=this.get(e);n&&(en(n,t),n.length||this.delete(e))}};function OJ(e){return $_(e)||9===e.kind||Ph(e.kind)||qD(e)}function MJ(e){return!qD(e)&&OJ(e)}function LJ(e){return e>=65&&e<=79}function jJ(e){switch(e){case 65:return 40;case 66:return 41;case 67:return 42;case 68:return 43;case 69:return 44;case 70:return 45;case 71:return 48;case 72:return 49;case 73:return 50;case 74:return 51;case 75:return 52;case 79:return 53;case 76:return 57;case 77:return 56;case 78:return 61}}function RJ(e){if(!NP(e))return;const t=lh(e.expression);return lf(t)?t:void 0}function BJ(e,t,n){for(let r=t;rfunction(e,t,n){return uE(e)&&(!!e.initializer||!t)&&zv(e)===n}(e,t,n)))}function $J(e){return uE(t=e)&&zv(t)||pE(e);var t}function qJ(e){return F(e.members,$J)}function VJ(e){return 172===e.kind&&void 0!==e.initializer}function UJ(e){return!Jv(e)&&(bu(e)||yu(e))&&VD(e.name)}function KJ(e){let t;if(e){const n=e.parameters,r=n.length>0&&hv(n[0]),i=r?1:0,o=r?n.length-1:n.length;for(let e=0;eYJ(e.privateEnv,t)))}function tz(e){return!e.initializer&&qD(e.name)}function nz(e){return x(e,tz)}var rz=(e=>(e[e.All=0]="All",e[e.ObjectRest=1]="ObjectRest",e))(rz||{});function iz(e,t,n,r,i,o){let a,s,c=e;if(hb(e))for(a=e.right;Fb(e.left)||Nb(e.left);){if(!hb(a))return xn.checkDefined(qB(a,t,Xu));c=e=a,a=e.right}const l={context:n,level:r,downlevelIteration:!!n.getCompilerOptions().downlevelIteration,hoistTempVariables:!0,emitExpression:u,emitBindingOrAssignment:function(e,r,i,a){xn.assertNode(e,o?qD:Xu);const s=o?o(e,r,i):sI(n.factory.createAssignment(xn.checkDefined(qB(e,t,Xu)),r),i);s.original=a,u(s)},createArrayBindingOrAssignmentPattern:e=>function(e,t){return xn.assertEachNode(t,ju),e.createArrayLiteralExpression(O(t,e.converters.convertToArrayAssignmentElement))}(n.factory,e),createObjectBindingOrAssignmentPattern:e=>function(e,t){return xn.assertEachNode(t,Mu),e.createObjectLiteralExpression(O(t,e.converters.convertToObjectAssignmentElement))}(n.factory,e),createArrayBindingOrAssignmentElement:dz,visitor:t};if(a&&(a=qB(a,t,Xu),xn.assert(a),qD(a)&&oz(e,a.escapedText)||az(e)?a=_z(l,a,!1,c):i?a=_z(l,a,!0,c):ly(e)&&(c=a)),cz(l,e,a,c,hb(e)),a&&i){if(!Q(s))return a;s.push(a)}return n.factory.inlineExpressions(s)||n.factory.createOmittedExpression();function u(e){s=ue(s,e)}}function oz(e,t){const n=wA(e);return Iu(n)?function(e,t){const n=FA(e);for(const e of n)if(oz(e,t))return!0;return!1}(n,t):!!qD(n)&&n.escapedText===t}function az(e){const t=PA(e);if(t&&oE(t)&&!Bl(t.expression))return!0;const n=wA(e);return!!n&&Iu(n)&&!!f(FA(n),az)}function sz(e,t,n,r,i,o=!1,a){let s;const c=[],l=[],u={context:n,level:r,downlevelIteration:!!n.getCompilerOptions().downlevelIteration,hoistTempVariables:o,emitExpression:function(e){s=ue(s,e)},emitBindingOrAssignment:_,createArrayBindingOrAssignmentPattern:e=>function(e,t){return xn.assertEachNode(t,Nu),e.createArrayBindingPattern(t)}(n.factory,e),createObjectBindingOrAssignmentPattern:e=>function(e,t){return xn.assertEachNode(t,KE),e.createObjectBindingPattern(t)}(n.factory,e),createArrayBindingOrAssignmentElement:e=>function(e,t){return e.createBindingElement(void 0,void 0,t)}(n.factory,e),visitor:t};if(KP(e)){let t=CA(e);t&&(qD(t)&&oz(e,t.escapedText)||az(e))&&(t=_z(u,xn.checkDefined(qB(t,u.visitor,Xu)),!1,t),e=n.factory.updateVariableDeclaration(e,e.name,void 0,void 0,t))}if(cz(u,e,i,e,a),s){const e=n.factory.createTempVariable(void 0);if(o){const t=n.factory.inlineExpressions(s);s=void 0,_(e,t,void 0,void 0)}else{n.hoistVariableDeclaration(e);const t=De(c);t.pendingExpressions=ue(t.pendingExpressions,n.factory.createAssignment(e,t.value)),pe(t.pendingExpressions,s),t.value=e}}for(const{pendingExpressions:e,name:t,value:r,location:i,original:o}of c){const a=n.factory.createVariableDeclaration(t,void 0,void 0,e?n.factory.inlineExpressions(ue(e,r)):r);a.original=o,sI(a,i),l.push(a)}return l;function _(e,t,r,i){xn.assertNode(e,su),s&&(t=n.factory.inlineExpressions(ue(s,t)),s=void 0),c.push({pendingExpressions:s,name:e,value:t,location:r,original:i})}}function cz(e,t,n,r,i){const o=wA(t);if(!i){const i=qB(CA(t),e.visitor,Xu);i?n?(n=function(e,t,n,r){return t=_z(e,t,!0,r),e.context.factory.createConditionalExpression(e.context.factory.createTypeCheck(t,"undefined"),void 0,n,void 0,t)}(e,n,i,r),!MJ(i)&&Iu(o)&&(n=_z(e,n,!0,r))):n=i:n||(n=e.context.factory.createVoidZero())}Ou(o)?function(e,t,n,r,i){const o=FA(n),a=o.length;let s,c;1!==a&&(r=_z(e,r,!Fu(t)||0!==a,i));for(let t=0;t=1)||98304&l.transformFlags||98304&wA(l).transformFlags||oE(t)){s&&(e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(s),r,i,n),s=void 0);const o=uz(e,r,t);oE(t)&&(c=ue(c,o.argumentExpression)),cz(e,l,o,l)}else s=ue(s,qB(l,e.visitor,Au))}}s&&e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(s),r,i,n)}(e,t,o,n,r):Lu(o)?function(e,t,n,r,i){const o=FA(n),a=o.length;let s,c;e.level<1&&e.downlevelIteration?r=_z(e,sI(e.context.getEmitHelperFactory().createReadHelper(r,a>0&&DA(o[a-1])?void 0:a),i),!1,i):(1!==a&&(e.level<1||0===a)||x(o,gP))&&(r=_z(e,r,!Fu(t)||0!==a,i));for(let t=0;t=1)if(65536&n.transformFlags||e.hasTransformedPriorElement&&!lz(n)){e.hasTransformedPriorElement=!0;const t=e.context.factory.createTempVariable(void 0);e.hoistTempVariables&&e.context.hoistVariableDeclaration(t),c=ue(c,[t,n]),s=ue(s,e.createArrayBindingOrAssignmentElement(t))}else s=ue(s,n);else{if(gP(n))continue;if(DA(n)){if(t===a-1){const i=e.context.factory.createArraySliceCall(r,t);cz(e,n,i,n)}}else{const i=e.context.factory.createElementAccessExpression(r,t);cz(e,n,i,n)}}}if(s&&e.emitBindingOrAssignment(e.createArrayBindingOrAssignmentPattern(s),r,i,n),c)for(const[t,n]of c)cz(e,n,t,n)}(e,t,o,n,r):e.emitBindingOrAssignment(o,n,r,t)}function lz(e){const t=wA(e);if(!t||gP(t))return!0;const n=PA(e);if(n&&!Wh(n))return!1;const r=CA(e);return!(r&&!MJ(r))&&(Iu(t)?x(FA(t),lz):qD(t))}function uz(e,t,n){const{factory:r}=e.context;if(oE(n)){const r=_z(e,xn.checkDefined(qB(n.expression,e.visitor,Xu)),!1,n);return e.context.factory.createElementAccessExpression(t,r)}if($h(n)){const i=r.cloneNode(n);return e.context.factory.createElementAccessExpression(t,i)}{const r=e.context.factory.createIdentifier(bc(n));return e.context.factory.createPropertyAccessExpression(t,r)}}function _z(e,t,n,r){if(qD(t)&&n)return t;{const n=e.context.factory.createTempVariable(void 0);return e.hoistTempVariables?(e.context.hoistVariableDeclaration(n),e.emitExpression(sI(e.context.factory.createAssignment(n,t),r))):e.emitBindingOrAssignment(n,t,r,void 0),n}}function dz(e){return e}function pz(e,t,n=e.createThis()){const r=e.createAssignment(t,n),i=e.createExpressionStatement(r),o=e.createBlock([i],!1),a=e.createClassStaticBlockDeclaration(o);return tw(a).classThis=t,a}function fz(e){var t;if(!pE(e)||1!==e.body.statements.length)return!1;const n=e.body.statements[0];return NP(n)&&mb(n.expression,!0)&&qD(n.expression.left)&&(null==(t=e.emitNode)?void 0:t.classThis)===n.expression.left&&110===n.expression.right.kind}function mz(e){var t;return!!(null==(t=e.emitNode)?void 0:t.classThis)&&Q(e.members,fz)}function gz(e,t,n,r){if(mz(t))return t;const i=pz(e,n,r);t.name&&lw(i.body.statements[0],t.name);const o=e.createNodeArray([i,...t.members]);sI(o,t.members);const a=GP(t)?e.updateClassDeclaration(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,o):e.updateClassExpression(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,o);return tw(a).classThis=n,a}function hz(e,t,n){const r=fc(fA(n));return(GP(r)||HP(r))&&!r.name&&Bv(r,2048)?e.createStringLiteral("default"):e.createStringLiteralFromNode(t)}function yz(e,t,n){const{factory:r}=e;if(void 0!==n)return{assignedName:r.createStringLiteral(n),name:t};if(Wh(t)||VD(t))return{assignedName:r.createStringLiteralFromNode(t),name:t};if(Wh(t.expression)&&!qD(t.expression))return{assignedName:r.createStringLiteralFromNode(t.expression),name:t};const i=r.getGeneratedNameForNode(t);e.hoistVariableDeclaration(i);const o=e.getEmitHelperFactory().createPropKeyHelper(t.expression),a=r.createAssignment(i,o);return{assignedName:i,name:r.updateComputedPropertyName(t,a)}}function vz(e,t,n=e.factory.createThis()){const{factory:r}=e,i=e.getEmitHelperFactory().createSetFunctionNameHelper(n,t),o=r.createExpressionStatement(i),a=r.createBlock([o],!1),s=r.createClassStaticBlockDeclaration(a);return tw(s).assignedName=t,s}function bz(e){var t;if(!pE(e)||1!==e.body.statements.length)return!1;const n=e.body.statements[0];return NP(n)&&kD(n.expression,"___setFunctionName")&&n.expression.arguments.length>=2&&n.expression.arguments[1]===(null==(t=e.emitNode)?void 0:t.assignedName)}function xz(e){var t;return!!(null==(t=e.emitNode)?void 0:t.assignedName)&&Q(e.members,bz)}function Sz(e){return!!e.name||xz(e)}function kz(e,t,n,r){if(xz(t))return t;const{factory:i}=e,o=vz(e,n,r);t.name&&lw(o.body.statements[0],t.name);const a=T(t.members,fz)+1,s=t.members.slice(0,a),c=t.members.slice(a),l=i.createNodeArray([...s,o,...c]);return sI(l,t.members),tw(t=GP(t)?i.updateClassDeclaration(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,l):i.updateClassExpression(t,t.modifiers,t.name,t.typeParameters,t.heritageClauses,l)).assignedName=n,t}function Tz(e,t,n,r){if(r&&wD(n)&&Sm(n))return t;const{factory:i}=e,o=fA(t),a=mP(o)?ut(kz(e,o,n),mP):e.getEmitHelperFactory().createSetFunctionNameHelper(o,n);return i.restoreOuterExpressions(t,a)}function Cz(e,t,n,r){switch(t.kind){case 303:return function(e,t,n,r){const{factory:i}=e,{assignedName:o,name:a}=yz(e,t.name,r),s=Tz(e,t.initializer,o,n);return i.updatePropertyAssignment(t,a,s)}(e,t,n,r);case 304:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.name,t.objectAssignmentInitializer),a=Tz(e,t.objectAssignmentInitializer,o,n);return i.updateShorthandPropertyAssignment(t,t.name,a)}(e,t,n,r);case 260:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.name,t.initializer),a=Tz(e,t.initializer,o,n);return i.updateVariableDeclaration(t,t.name,t.exclamationToken,t.type,a)}(e,t,n,r);case 169:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.name,t.initializer),a=Tz(e,t.initializer,o,n);return i.updateParameterDeclaration(t,t.modifiers,t.dotDotDotToken,t.name,t.questionToken,t.type,a)}(e,t,n,r);case 208:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.name,t.initializer),a=Tz(e,t.initializer,o,n);return i.updateBindingElement(t,t.dotDotDotToken,t.propertyName,t.name,a)}(e,t,n,r);case 172:return function(e,t,n,r){const{factory:i}=e,{assignedName:o,name:a}=yz(e,t.name,r),s=Tz(e,t.initializer,o,n);return i.updatePropertyDeclaration(t,t.modifiers,a,t.questionToken??t.exclamationToken,t.type,s)}(e,t,n,r);case 226:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):hz(i,t.left,t.right),a=Tz(e,t.right,o,n);return i.updateBinaryExpression(t,t.left,t.operatorToken,a)}(e,t,n,r);case 277:return function(e,t,n,r){const{factory:i}=e,o=void 0!==r?i.createStringLiteral(r):i.createStringLiteral(t.isExportEquals?"":"default"),a=Tz(e,t.expression,o,n);return i.updateExportAssignment(t,t.modifiers,a)}(e,t,n,r)}}var wz=(e=>(e[e.LiftRestriction=0]="LiftRestriction",e[e.All=1]="All",e))(wz||{});function Dz(e,t,n,r,i,o){const a=qB(t.tag,n,Xu);xn.assert(a);const s=[void 0],c=[],l=[],u=t.template;if(0===o&&!Ty(u))return ZB(t,n,e);const{factory:_}=e;if(PD(u))c.push(Ez(_,u)),l.push(Pz(_,u,r));else{c.push(Ez(_,u.head)),l.push(Pz(_,u.head,r));for(const e of u.templateSpans)c.push(Ez(_,e.literal)),l.push(Pz(_,e.literal,r)),s.push(xn.checkDefined(qB(e.expression,n,Xu)))}const d=e.getEmitHelperFactory().createTemplateObjectHelper(_.createArrayLiteralExpression(c),_.createArrayLiteralExpression(l));if(qI(r)){const e=_.createUniqueName("templateObject");i(e),s[0]=_.createLogicalOr(e,_.createAssignment(e,d))}else s[0]=d;return _.createCallExpression(a,void 0,s)}function Ez(e,t){return 26656&t.templateFlags?e.createVoidZero():e.createStringLiteral(t.text)}function Pz(e,t,n){let r=t.rawText;if(void 0===r){xn.assertIsDefined(n,"Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."),r=Kd(n,t);const e=15===t.kind||18===t.kind;r=r.substring(1,r.length-(e?1:2))}return r=r.replace(/\r\n?/g,"\n"),sI(e.createStringLiteral(r),t)}function Nz(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,resumeLexicalEnvironment:i,endLexicalEnvironment:o,hoistVariableDeclaration:a}=e,s=e.getEmitResolver(),c=e.getCompilerOptions(),l=wS(c),u=DS(c),_=!!c.experimentalDecorators,d=c.emitDecoratorMetadata?Iz(e):void 0,p=e.onEmitNode,f=e.onSubstituteNode;let m,g,h,y,v,b,x,S;return e.onEmitNode=function(e,t,n){const r=S,i=m;qN(t)&&(m=t),2&x&&function(e){return 267===fc(e).kind}(t)&&(S|=2),8&x&&function(e){return 266===fc(e).kind}(t)&&(S|=8),p(e,t,n),S=r,m=i},e.onSubstituteNode=function(e,n){return n=f(e,n),1===e?function(e){switch(e.kind){case 80:return function(e){return ke(e)||e}(e);case 211:case 212:return function(e){return function(e){const n=function(e){if(!NS(c))return GE(e)||XE(e)?s.getConstantValue(e):void 0}(e);if(void 0!==n){Tw(e,n);const i="string"==typeof n?t.createStringLiteral(n):n<0?t.createPrefixUnaryExpression(41,t.createNumericLiteral(-n)):t.createNumericLiteral(n);if(!c.removeComments){xw(i,3,` ${r=Gd(fc(e,Ox)),r.replace(/\*\//g,"*_/")} `)}return i}var r;return e}(e)}(e)}return e}(n):JN(n)?function(e){if(2&x){const n=e.name,r=ke(n);if(r){if(e.objectAssignmentInitializer){const i=t.createAssignment(r,e.objectAssignmentInitializer);return sI(t.createPropertyAssignment(n,i),e)}return sI(t.createPropertyAssignment(n,r),e)}}return e}(n):n},e.enableSubstitution(211),e.enableSubstitution(212),function(e){return 308===e.kind?function(e){return t.createBundle(e.sourceFiles.map(k))}(e):k(e)};function k(t){if(t.isDeclarationFile)return t;m=t;const n=T(t,R);return ww(n,e.readEmitHelpers()),m=void 0,n}function T(e,t){const n=y,r=v,i=b;!function(e){switch(e.kind){case 307:case 269:case 268:case 241:y=e,v=void 0;break;case 263:case 262:if(Bv(e,128))break;e.name?re(e):xn.assert(263===e.kind||Bv(e,2048))}}(e);const o=t(e);return y!==n&&(v=r),y=n,b=i,o}function C(e){return T(e,w)}function w(e){return 1&e.transformFlags?j(e):e}function D(e){return T(e,E)}function E(n){switch(n.kind){case 272:case 271:case 277:case 278:return function(n){if(function(e){const t=hc(e);if(t===e||mN(e))return!1;if(!t||t.kind!==e.kind)return!0;switch(e.kind){case 272:if(xn.assertNode(t,iN),e.importClause!==t.importClause)return!0;if(e.attributes!==t.attributes)return!0;break;case 271:if(xn.assertNode(t,rN),e.name!==t.name)return!0;if(e.isTypeOnly!==t.isTypeOnly)return!0;if(e.moduleReference!==t.moduleReference&&(ou(e.moduleReference)||ou(t.moduleReference)))return!0;break;case 278:if(xn.assertNode(t,gN),e.exportClause!==t.exportClause)return!0;if(e.attributes!==t.attributes)return!0}return!1}(n))return 1&n.transformFlags?ZB(n,C,e):n;switch(n.kind){case 272:return function(e){if(!e.importClause)return e;if(e.importClause.isTypeOnly)return;const n=qB(e.importClause,ce,oN);return n?t.updateImportDeclaration(e,void 0,n,e.moduleSpecifier,e.attributes):void 0}(n);case 271:return fe(n);case 277:return function(t){return c.verbatimModuleSyntax||s.isValueAliasDeclaration(t)?ZB(t,C,e):void 0}(n);case 278:return function(e){if(e.isTypeOnly)return;if(!e.exportClause||dN(e.exportClause))return e;const n=!!c.verbatimModuleSyntax,r=qB(e.exportClause,(e=>function(e,n){return dN(e)?function(e){return t.updateNamespaceExport(e,xn.checkDefined(qB(e.name,C,qD)))}(e):function(e,n){const r=VB(e.elements,de,yN);return n||Q(r)?t.updateNamedExports(e,r):void 0}(e,n)}(e,n)),Fl);return r?t.updateExportDeclaration(e,void 0,e.isTypeOnly,r,e.moduleSpecifier,e.attributes):void 0}(n);default:xn.fail("Unhandled ellided statement")}}(n);default:return w(n)}}function P(e){return T(e,N)}function N(e){if(278!==e.kind&&272!==e.kind&&273!==e.kind&&(271!==e.kind||283!==e.moduleReference.kind))return 1&e.transformFlags||Bv(e,32)?j(e):e}function A(n){return r=>T(r,(r=>function(n,r){switch(n.kind){case 176:return function(n){if(K(n))return t.updateConstructorDeclaration(n,void 0,HB(n.parameters,C,e),function(n,r){const a=r&&F(r.parameters,(e=>rc(e,r)));if(!Q(a))return XB(n,C,e);let s=[];i();const c=t.copyPrologue(n.statements,s,!1,C),l=JJ(n.statements,c),u=q(a,H);l.length?W(s,n.statements,c,l,0,u):(pe(s,u),pe(s,VB(n.statements,C,b_,c))),s=t.mergeLexicalEnvironment(s,o());const _=t.createBlock(sI(t.createNodeArray(s),n.statements),!0);return sI(_,n),ew(_,n),_}(n.body,n))}(n);case 172:return function(e,n){const r=33554432&e.flags||Bv(e,64);if(r&&(!_||!Wv(e)))return;let i=gu(n)?VB(e.modifiers,r?M:C,Su):VB(e.modifiers,I,Su);return i=$(i,e,n),r?t.updatePropertyDeclaration(e,Z(i,t.createModifiersFromModifierFlags(128)),xn.checkDefined(qB(e.name,C,au)),void 0,void 0,void 0):t.updatePropertyDeclaration(e,i,U(e),void 0,void 0,qB(e.initializer,C,Xu))}(n,r);case 177:return Y(n,r);case 178:return ee(n,r);case 174:return G(n,r);case 175:return ZB(n,C,e);case 240:return n;case 181:return;default:return xn.failBadSyntaxKind(n)}}(r,n)))}function I(e){return cE(e)?void 0:C(e)}function M(e){return iu(e)?void 0:C(e)}function L(e){if(!cE(e)&&!(28895&ob(e.kind)||g&&95===e.kind))return e}function j(n){if(b_(n)&&Bv(n,128))return t.createNotEmittedStatement(n);switch(n.kind){case 95:case 90:return g?void 0:n;case 125:case 123:case 124:case 128:case 164:case 87:case 138:case 148:case 103:case 147:case 188:case 189:case 190:case 191:case 187:case 182:case 168:case 133:case 159:case 136:case 154:case 150:case 146:case 116:case 155:case 185:case 184:case 186:case 183:case 192:case 193:case 194:case 196:case 197:case 198:case 199:case 200:case 201:case 181:case 270:return;case 265:case 264:return t.createNotEmittedStatement(n);case 263:return function(n){const r=function(e){let t=0;Q(zJ(e,!0,!0))&&(t|=1);const n=Sh(e);return n&&106!==fA(n.expression).kind&&(t|=64),bm(_,e)&&(t|=2),vm(_,e)&&(t|=4),me(e)?t|=8:function(e){return ge(e)&&Bv(e,2048)}(e)?t|=32:he(e)&&(t|=16),t}(n),i=l<=1&&!!(7&r);if(!function(e){return Wv(e)||Q(e.typeParameters)||Q(e.heritageClauses,B)||Q(e.members,B)}(n)&&!bm(_,n)&&!me(n))return t.updateClassDeclaration(n,VB(n.modifiers,L,iu),n.name,void 0,VB(n.heritageClauses,C,jN),VB(n.members,A(n),mu));i&&e.startLexicalEnvironment();const o=i||8&r;let a=VB(n.modifiers,o?M:C,Su);2&r&&(a=z(a,n));const s=o&&!n.name||4&r||1&r?n.name??t.getGeneratedNameForNode(n):n.name,c=t.updateClassDeclaration(n,a,s,void 0,VB(n.heritageClauses,C,jN),J(n));let u,d=Yd(n);if(1&r&&(d|=64),iw(c,d),i){const r=[c],i=Gb(as(m.text,n.members.end),20),o=t.getInternalName(n),a=t.createPartiallyEmittedExpression(o);NT(a,i.end),iw(a,3072);const s=t.createReturnStatement(a);PT(s,i.pos),iw(s,3840),r.push(s),jd(r,e.endLexicalEnvironment());const l=t.createImmediatelyInvokedArrowFunction(r);aw(l,1);const _=t.createVariableDeclaration(t.getLocalName(n,!1,!1),void 0,void 0,l);ew(_,n);const d=t.createVariableStatement(void 0,t.createVariableDeclarationList([_],1));ew(d,n),mw(d,n),lw(d,Kb(n)),hA(d),u=d}else u=c;if(o){if(8&r)return[u,ye(n)];if(32&r)return[u,t.createExportDefault(t.getLocalName(n,!1,!0))];if(16&r)return[u,t.createExternalModuleExport(t.getDeclarationName(n,!1,!0))]}return u}(n);case 231:return function(e){let n=VB(e.modifiers,M,Su);return bm(_,e)&&(n=z(n,e)),t.updateClassExpression(e,n,e.name,void 0,VB(e.heritageClauses,C,jN),J(e))}(n);case 298:return function(t){if(119!==t.token)return ZB(t,C,e)}(n);case 233:return function(e){return t.updateExpressionWithTypeArguments(e,xn.checkDefined(qB(e.expression,C,Vu)),void 0)}(n);case 210:return function(e){return t.updateObjectLiteralExpression(e,VB(e.properties,(n=e,e=>T(e,(e=>function(e,t){switch(e.kind){case 303:case 304:case 305:return C(e);case 177:return Y(e,t);case 178:return ee(e,t);case 174:return G(e,t);default:return xn.failBadSyntaxKind(e)}}(e,n)))),Cu));var n}(n);case 176:case 172:case 174:case 177:case 178:case 175:return xn.fail("Class and object literal elements must be visited with their respective visitors");case 262:return function(n){if(!K(n))return t.createNotEmittedStatement(n);const r=t.updateFunctionDeclaration(n,VB(n.modifiers,L,iu),n.asteriskToken,n.name,void 0,HB(n.parameters,C,e),void 0,XB(n.body,C,e)||t.createBlock([]));if(me(n)){const e=[r];return function(e,t){e.push(ye(t))}(e,n),e}return r}(n);case 218:return function(n){return K(n)?t.updateFunctionExpression(n,VB(n.modifiers,L,iu),n.asteriskToken,n.name,void 0,HB(n.parameters,C,e),void 0,XB(n.body,C,e)||t.createBlock([])):t.createOmittedExpression()}(n);case 219:return function(n){return t.updateArrowFunction(n,VB(n.modifiers,L,iu),void 0,HB(n.parameters,C,e),void 0,n.equalsGreaterThanToken,XB(n.body,C,e))}(n);case 169:return function(e){if(hv(e))return;const n=t.updateParameterDeclaration(e,VB(e.modifiers,(e=>cE(e)?C(e):void 0),Su),e.dotDotDotToken,xn.checkDefined(qB(e.name,C,su)),void 0,void 0,qB(e.initializer,C,Xu));return n!==e&&(mw(n,e),sI(n,Wb(e)),lw(n,Wb(e)),iw(n.name,64)),n}(n);case 217:return function(n){const r=fA(n.expression,-7);if(Qu(r)||vP(r)){const e=qB(n.expression,C,Xu);return xn.assert(e),t.createPartiallyEmittedExpression(e,n)}return ZB(n,C,e)}(n);case 216:case 234:return function(e){const n=qB(e.expression,C,Xu);return xn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 238:return function(e){const n=qB(e.expression,C,Xu);return xn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 213:return function(e){return t.updateCallExpression(e,xn.checkDefined(qB(e.expression,C,Xu)),void 0,VB(e.arguments,C,Xu))}(n);case 214:return function(e){return t.updateNewExpression(e,xn.checkDefined(qB(e.expression,C,Xu)),void 0,VB(e.arguments,C,Xu))}(n);case 215:return function(e){return t.updateTaggedTemplateExpression(e,xn.checkDefined(qB(e.tag,C,Xu)),void 0,xn.checkDefined(qB(e.template,C,qu)))}(n);case 235:return function(e){const n=qB(e.expression,C,Vu);return xn.assert(n),t.createPartiallyEmittedExpression(n,e)}(n);case 266:return function(e){if(!function(e){return!tf(e)||jS(c)}(e))return t.createNotEmittedStatement(e);const n=[];let i=4;const a=oe(n,e);a&&(4===u&&y===m||(i|=1024));const s=xe(e),l=Se(e),_=me(e)?t.getExternalModuleOrNamespaceExportName(h,e,!1,!0):t.getDeclarationName(e,!1,!0);let d=t.createLogicalOr(_,t.createAssignment(_,t.createObjectLiteralExpression()));if(me(e)){const n=t.getLocalName(e,!1,!0);d=t.createAssignment(n,d)}const p=t.createExpressionStatement(t.createCallExpression(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,s)],void 0,function(e,n){const i=h;h=n;const a=[];r();const s=O(e.members,ne);return jd(a,o()),pe(a,s),h=i,t.createBlock(sI(t.createNodeArray(a),e.members),!0)}(e,l)),void 0,[d]));return ew(p,e),a&&(hw(p,void 0),bw(p,void 0)),sI(p,e),ow(p,i),n.push(p),n}(n);case 243:return function(n){if(me(n)){const e=lx(n.declarationList);if(0===e.length)return;return sI(t.createExpressionStatement(t.inlineExpressions(O(e,te))),n)}return ZB(n,C,e)}(n);case 260:return function(e){const n=t.updateVariableDeclaration(e,xn.checkDefined(qB(e.name,C,su)),void 0,void 0,qB(e.initializer,C,Xu));return e.type&&Iw(n.name,e.type),n}(n);case 267:return ae(n);case 271:return fe(n);case 285:return function(e){return t.updateJsxSelfClosingElement(e,xn.checkDefined(qB(e.tagName,C,k_)),void 0,xn.checkDefined(qB(e.attributes,C,FN)))}(n);case 286:return function(e){return t.updateJsxOpeningElement(e,xn.checkDefined(qB(e.tagName,C,k_)),void 0,xn.checkDefined(qB(e.attributes,C,FN)))}(n);default:return ZB(n,C,e)}}function R(n){const r=WS(c,"alwaysStrict")&&!(qI(n)&&u>=5)&&!ef(n);return t.updateSourceFile(n,WB(n.statements,D,e,0,r))}function B(e){return!!(8192&e.transformFlags)}function J(e){const n=VB(e.members,A(e),mu);let r;const i=pv(e),o=i&&F(i.parameters,(e=>rc(e,i)));if(o)for(const e of o){const n=t.createPropertyDeclaration(void 0,e.name,void 0,void 0,void 0);ew(n,e),r=ue(r,n)}return r?(r=pe(r,n),sI(t.createNodeArray(r),e.members)):n}function z(e,n){const r=V(n,n);if(Q(r)){const n=[];pe(n,yn(e,HA)),pe(n,F(e,cE)),pe(n,r),pe(n,F(vn(e,HA),iu)),e=sI(t.createNodeArray(n),e)}return e}function $(e,n,r){if(gu(r)&&xm(_,n,r)){const i=V(n,r);if(Q(i)){const n=[];pe(n,F(e,cE)),pe(n,i),pe(n,F(e,iu)),e=sI(t.createNodeArray(n),e)}}return e}function V(e,r){if(_)return function(e,r){if(d){let i;if(function(e){const t=e.kind;return 174===t||177===t||178===t||172===t}(e)){const o=n().createMetadataHelper("design:type",d.serializeTypeOfNode({currentLexicalScope:y,currentNameScope:r},e,r));i=ue(i,t.createDecorator(o))}if(function(e){switch(e.kind){case 263:case 231:return void 0!==pv(e);case 174:case 177:case 178:return!0}return!1}(e)){const o=n().createMetadataHelper("design:paramtypes",d.serializeParameterTypesOfNode({currentLexicalScope:y,currentNameScope:r},e,r));i=ue(i,t.createDecorator(o))}if(function(e){return 174===e.kind}(e)){const o=n().createMetadataHelper("design:returntype",d.serializeReturnTypeOfNode({currentLexicalScope:y,currentNameScope:r},e));i=ue(i,t.createDecorator(o))}return i}}(e,r)}function U(e){const n=e.name;if(oE(n)&&(!zv(e)&&b||Wv(e)&&_)){const e=qB(n.expression,C,Xu);if(xn.assert(e),!MJ(El(e))){const r=t.getGeneratedNameForNode(n);return a(r),t.updateComputedPropertyName(n,t.createAssignment(r,e))}}return xn.checkDefined(qB(n,C,au))}function K(e){return!Nd(e.body)}function W(e,n,r,i,o,a){const s=i[o],c=n[s];if(pe(e,VB(n,C,b_,r,s-r)),VP(c)){const n=[];W(n,c.tryBlock.statements,0,i,o+1,a),sI(t.createNodeArray(n),c.tryBlock.statements),e.push(t.updateTryStatement(c,t.updateBlock(c.tryBlock,n),qB(c.catchClause,C,RN),qB(c.finallyBlock,C,DP)))}else pe(e,VB(n,C,b_,s,1)),pe(e,a);pe(e,VB(n,C,b_,s+1))}function H(e){const n=e.name;if(!qD(n))return;const r=OT(sI(t.cloneNode(n),n),n.parent);iw(r,3168);const i=OT(sI(t.cloneNode(n),n),n.parent);return iw(i,3072),hA(rw(sI(ew(t.createExpressionStatement(t.createAssignment(sI(t.createPropertyAccessExpression(t.createThis(),r),e.name),i)),e),Ub(e,-1))))}function G(n,r){if(!(1&n.transformFlags))return n;if(!K(n))return;let i=gu(r)?VB(n.modifiers,C,Su):VB(n.modifiers,I,Su);return i=$(i,n,r),t.updateMethodDeclaration(n,i,n.asteriskToken,U(n),void 0,void 0,HB(n.parameters,C,e),void 0,XB(n.body,C,e))}function X(e){return!(Nd(e.body)&&Bv(e,64))}function Y(n,r){if(!(1&n.transformFlags))return n;if(!X(n))return;let i=gu(r)?VB(n.modifiers,C,Su):VB(n.modifiers,I,Su);return i=$(i,n,r),t.updateGetAccessorDeclaration(n,i,U(n),HB(n.parameters,C,e),void 0,XB(n.body,C,e)||t.createBlock([]))}function ee(n,r){if(!(1&n.transformFlags))return n;if(!X(n))return;let i=gu(r)?VB(n.modifiers,C,Su):VB(n.modifiers,I,Su);return i=$(i,n,r),t.updateSetAccessorDeclaration(n,i,U(n),HB(n.parameters,C,e),XB(n.body,C,e)||t.createBlock([]))}function te(n){const r=n.name;return Eu(r)?iz(n,C,e,0,!1,ve):sI(t.createAssignment(be(r),xn.checkDefined(qB(n.initializer,C,Xu))),n)}function ne(n){const r=function(e,n){const r=e.name;return VD(r)?t.createIdentifier(""):oE(r)?r.expression:qD(r)?t.createStringLiteral(bc(r)):t.cloneNode(r)}(n),i=s.getEnumMemberValue(n),o=function(n,r){return void 0!==r?"string"==typeof r?t.createStringLiteral(r):r<0?t.createPrefixUnaryExpression(41,t.createNumericLiteral(-r)):t.createNumericLiteral(r):(0==(8&x)&&(x|=8,e.enableSubstitution(80)),n.initializer?xn.checkDefined(qB(n.initializer,C,Xu)):t.createVoidZero())}(n,null==i?void 0:i.value),a=t.createAssignment(t.createElementAccessExpression(h,r),o),c="string"==typeof(null==i?void 0:i.value)||(null==i?void 0:i.isSyntacticallyString)?a:t.createAssignment(t.createElementAccessExpression(h,a),r);return sI(t.createExpressionStatement(sI(c,n)),n)}function re(e){v||(v=new Map);const t=ie(e);v.has(t)||v.set(t,e)}function ie(e){return xn.assertNode(e.name,qD),e.name.escapedText}function oe(e,n){const r=t.createVariableDeclaration(t.getLocalName(n,!1,!0)),i=307===y.kind?0:1,o=t.createVariableStatement(VB(n.modifiers,L,iu),t.createVariableDeclarationList([r],i));return ew(r,n),hw(r,void 0),bw(r,void 0),ew(o,n),re(n),!!function(e){if(v){const t=ie(e);return v.get(t)===e}return!0}(n)&&(266===n.kind?lw(o.declarationList,n):lw(o,n),mw(o,n),ow(o,2048),e.push(o),!0)}function ae(n){if(!function(e){const t=hc(e,ZP);return!t||MB(t,jS(c))}(n))return t.createNotEmittedStatement(n);xn.assertNode(n.name,qD,"A TypeScript namespace should have an Identifier name."),0==(2&x)&&(x|=2,e.enableSubstitution(80),e.enableSubstitution(304),e.enableEmitNotification(267));const i=[];let a=4;const s=oe(i,n);s&&(4===u&&y===m||(a|=1024));const l=xe(n),_=Se(n),d=me(n)?t.getExternalModuleOrNamespaceExportName(h,n,!1,!0):t.getDeclarationName(n,!1,!0);let p=t.createLogicalOr(d,t.createAssignment(d,t.createObjectLiteralExpression()));if(me(n)){const e=t.getLocalName(n,!1,!0);p=t.createAssignment(e,p)}const f=t.createExpressionStatement(t.createCallExpression(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,l)],void 0,function(e,n){const i=h,a=g,s=v;h=n,g=e,v=void 0;const c=[];let l,u;if(r(),e.body)if(268===e.body.kind)T(e.body,(e=>pe(c,VB(e.statements,P,b_)))),l=e.body.statements,u=e.body;else{const t=ae(e.body);t&&(ot(t)?pe(c,t):c.push(t)),l=Ub(se(e).body.statements,-1)}jd(c,o()),h=i,g=a,v=s;const _=t.createBlock(sI(t.createNodeArray(c),l),!0);return sI(_,u),e.body&&268===e.body.kind||iw(_,3072|Yd(_)),_}(n,_)),void 0,[p]));return ew(f,n),s&&(hw(f,void 0),bw(f,void 0)),sI(f,n),ow(f,a),i.push(f),i}function se(e){if(267===e.body.kind)return se(e.body)||e.body}function ce(e){xn.assert(!e.isTypeOnly);const n=Te(e)?e.name:void 0,r=qB(e.namedBindings,le,__);return n||r?t.updateImportClause(e,!1,n,r):void 0}function le(e){if(274===e.kind)return Te(e)?e:void 0;{const n=c.verbatimModuleSyntax,r=VB(e.elements,_e,fN);return n||Q(r)?t.updateNamedImports(e,r):void 0}}function _e(e){return!e.isTypeOnly&&Te(e)?e:void 0}function de(e){return e.isTypeOnly||!c.verbatimModuleSyntax&&!s.isValueAliasDeclaration(e)?void 0:e}function fe(n){if(n.isTypeOnly)return;if(Em(n))return Te(n)?ZB(n,C,e):void 0;if(!function(e){return Te(e)||!qI(m)&&s.isTopLevelValueImportEqualsWithEntityName(e)}(n))return;const r=ZF(t,n.moduleReference);return iw(r,7168),he(n)||!me(n)?ew(sI(t.createVariableStatement(VB(n.modifiers,L,iu),t.createVariableDeclarationList([ew(t.createVariableDeclaration(n.name,void 0,void 0,r),n)])),n),n):ew(function(e,n,r){return sI(t.createExpressionStatement(t.createAssignment(t.getNamespaceMemberName(h,e,!1,!0),n)),r)}(n.name,r,n),n)}function me(e){return void 0!==g&&Bv(e,32)}function ge(e){return void 0===g&&Bv(e,32)}function he(e){return ge(e)&&!Bv(e,2048)}function ye(e){const n=t.createAssignment(t.getExternalModuleOrNamespaceExportName(h,e,!1,!0),t.getLocalName(e));lw(n,qb(e.name?e.name.pos:e.pos,e.end));const r=t.createExpressionStatement(n);return lw(r,qb(-1,e.end)),r}function ve(e,n,r){return sI(t.createAssignment(be(e),n),r)}function be(e){return t.getNamespaceMemberName(h,e,!1,!0)}function xe(e){const n=t.getGeneratedNameForNode(e);return lw(n,e.name),n}function Se(e){return t.getGeneratedNameForNode(e)}function ke(e){if(x&S&&!Xl(e)&&!iA(e)){const n=s.getReferencedExportContainer(e,!1);if(n&&307!==n.kind&&(2&S&&267===n.kind||8&S&&266===n.kind))return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(n),e),e)}}function Te(e){return c.verbatimModuleSyntax||Mm(e)||s.isReferencedAliasDeclaration(e)}}function Fz(e){const{factory:t,getEmitHelperFactory:n,hoistVariableDeclaration:r,endLexicalEnvironment:i,startLexicalEnvironment:o,resumeLexicalEnvironment:a,addBlockScopedVariable:s}=e,c=e.getEmitResolver(),l=e.getCompilerOptions(),u=wS(l),_=zS(l),d=!!l.experimentalDecorators,p=!_,f=_&&u<9,m=p||f,g=u<9,h=u<99?-1:_?0:3,y=u<9,v=y&&u>=2,b=m||g||-1===h,x=e.onSubstituteNode;e.onSubstituteNode=function(e,n){return n=x(e,n),1===e?function(e){switch(e.kind){case 80:return function(e){return function(e){if(1&T&&c.hasNodeCheckFlag(e,536870912)){const n=c.getReferencedValueDeclaration(e);if(n){const r=C[n.id];if(r){const n=t.cloneNode(r);return lw(n,e),mw(n,e),n}}}}(e)||e}(e);case 110:return function(e){if(2&T&&(null==E?void 0:E.data)&&!A.has(e)){const{facts:n,classConstructor:r,classThis:i}=E.data,o=L?i??r:r;if(o)return sI(ew(t.cloneNode(o),e),e);if(1&n&&d)return t.createParenthesizedExpression(t.createVoidZero())}return e}(e)}return e}(n):n};const k=e.onEmitNode;e.onEmitNode=function(e,t,n){const r=fc(t),i=N.get(r);if(i){const o=E,a=j;return E=i,j=L,L=!(pE(r)&&32&Zd(r)),k(e,t,n),L=j,j=a,void(E=o)}switch(t.kind){case 218:if(rP(r)||524288&Yd(t))break;case 262:case 176:case 177:case 178:case 174:case 172:{const r=E,i=j;return E=void 0,j=L,L=!1,k(e,t,n),L=j,j=i,void(E=r)}case 167:{const r=E,i=L;return E=null==E?void 0:E.previous,L=j,k(e,t,n),L=i,void(E=r)}}k(e,t,n)};let T,C,w,D,E,P=!1;const N=new Map,A=new Set;let I,M,L=!1,j=!1;return CJ(e,(function(t){if(t.isDeclarationFile)return t;if(E=void 0,P=!!(32&Zd(t)),!b&&!P)return t;const n=ZB(t,B,e);return ww(n,e.readEmitHelpers()),n}));function R(e){return 129===e.kind?ee()?void 0:e:lt(e,iu)}function B(n){if(!(16777216&n.transformFlags||134234112&n.transformFlags))return n;switch(n.kind){case 129:return xn.fail("Use `modifierVisitor` instead.");case 263:return function(e){return ge(e,he)}(n);case 231:return function(e){return ge(e,ye)}(n);case 175:case 172:return xn.fail("Use `classElementVisitor` instead.");case 303:case 260:case 169:case 208:return function(t){return iy(t,le)&&(t=Cz(e,t)),ZB(t,B,e)}(n);case 243:return function(t){const n=D;D=[];const r=ZB(t,B,e),i=Q(D)?[r,...D]:r;return D=n,i}(n);case 277:return function(t){return iy(t,le)&&(t=Cz(e,t,!0,t.isExportEquals?"":"default")),ZB(t,B,e)}(n);case 81:return function(e){return g?b_(e.parent)?e:ew(t.createIdentifier(""),e):e}(n);case 211:return function(n){if(VD(n.name)){const e=Le(n.name);if(e)return sI(ew(re(e,n.expression),n),n)}if(v&&M&&um(n)&&qD(n.name)&&Az(M)&&(null==E?void 0:E.data)){const{classConstructor:e,superClassReference:r,facts:i}=E.data;if(1&i)return De(n);if(e&&r){const i=t.createReflectGetCall(r,t.createStringLiteralFromNode(n.name),e);return ew(i,n.expression),sI(i,n.expression),i}}return ZB(n,B,e)}(n);case 212:return function(n){if(v&&M&&um(n)&&Az(M)&&(null==E?void 0:E.data)){const{classConstructor:e,superClassReference:r,facts:i}=E.data;if(1&i)return De(n);if(e&&r){const i=t.createReflectGetCall(r,qB(n.argumentExpression,B,Xu),e);return ew(i,n.expression),sI(i,n.expression),i}}return ZB(n,B,e)}(n);case 224:case 225:return oe(n,!1);case 226:return _e(n,!1);case 217:return de(n,!1);case 213:return function(n){var i;if(eu(n.expression)&&Le(n.expression.name)){const{thisArg:e,target:i}=t.createCallBinding(n.expression,r,u);return xl(n)?t.updateCallChain(n,t.createPropertyAccessChain(qB(i,B,Xu),n.questionDotToken,"call"),void 0,void 0,[qB(e,B,Xu),...VB(n.arguments,B,Xu)]):t.updateCallExpression(n,t.createPropertyAccessExpression(qB(i,B,Xu),"call"),void 0,[qB(e,B,Xu),...VB(n.arguments,B,Xu)])}if(v&&M&&um(n.expression)&&Az(M)&&(null==(i=null==E?void 0:E.data)?void 0:i.classConstructor)){const e=t.createFunctionCallCall(qB(n.expression,B,Xu),E.data.classConstructor,VB(n.arguments,B,Xu));return ew(e,n),sI(e,n),e}return ZB(n,B,e)}(n);case 244:return function(e){return t.updateExpressionStatement(e,qB(e.expression,z,Xu))}(n);case 215:return function(n){var i;if(eu(n.tag)&&Le(n.tag.name)){const{thisArg:e,target:i}=t.createCallBinding(n.tag,r,u);return t.updateTaggedTemplateExpression(n,t.createCallExpression(t.createPropertyAccessExpression(qB(i,B,Xu),"bind"),void 0,[qB(e,B,Xu)]),void 0,qB(n.template,B,qu))}if(v&&M&&um(n.tag)&&Az(M)&&(null==(i=null==E?void 0:E.data)?void 0:i.classConstructor)){const e=t.createFunctionBindCall(qB(n.tag,B,Xu),E.data.classConstructor,[]);return ew(e,n),sI(e,n),t.updateTaggedTemplateExpression(n,e,void 0,qB(n.template,B,qu))}return ZB(n,B,e)}(n);case 248:return function(n){return t.updateForStatement(n,qB(n.initializer,z,s_),qB(n.condition,B,Xu),qB(n.incrementor,z,Xu),QB(n.statement,B,e))}(n);case 110:return function(e){if(y&&M&&pE(M)&&(null==E?void 0:E.data)){const{classThis:t,classConstructor:n}=E.data;return t??n??e}return e}(n);case 262:case 218:return Y(void 0,J,n);case 176:case 174:case 177:case 178:return Y(n,J,n);default:return J(n)}}function J(t){return ZB(t,B,e)}function z(e){switch(e.kind){case 224:case 225:return oe(e,!0);case 226:return _e(e,!0);case 355:return function(e,n){const r=YB(e.elements,z);return t.updateCommaListExpression(e,r)}(e);case 217:return de(e,!0);default:return B(e)}}function $(n){switch(n.kind){case 298:return ZB(n,$,e);case 233:return function(n){var i;if(4&((null==(i=null==E?void 0:E.data)?void 0:i.facts)||0)){const e=t.createTempVariable(r,!0);return Ee().superClassReference=e,t.updateExpressionWithTypeArguments(n,t.createAssignment(e,qB(n.expression,B,Xu)),void 0)}return ZB(n,B,e)}(n);default:return B(n)}}function q(e){switch(e.kind){case 210:case 209:return ze(e);default:return B(e)}}function V(e){switch(e.kind){case 176:return Y(e,H,e);case 177:case 178:case 174:return Y(e,X,e);case 172:return Y(e,te,e);case 175:return Y(e,ve,e);case 167:return W(e);case 240:return e;default:return Su(e)?R(e):B(e)}}function U(e){return 167===e.kind?W(e):B(e)}function K(e){switch(e.kind){case 172:return Z(e);case 177:case 178:return V(e);default:xn.assertMissingNode(e,"Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration")}}function W(e){const n=qB(e.expression,B,Xu);return t.updateComputedPropertyName(e,function(e){return Q(w)&&(tP(e)?(w.push(e.expression),e=t.updateParenthesizedExpression(e,t.inlineExpressions(w))):(w.push(e),e=t.inlineExpressions(w)),w=void 0),e}(n))}function H(e){return I?xe(e,I):J(e)}function G(e){return!!g||!!(zv(e)&&32&Zd(e))}function X(n){if(xn.assert(!Wv(n)),!Zl(n)||!G(n))return ZB(n,V,e);const r=Le(n.name);if(xn.assert(r,"Undeclared private name for property declaration."),!r.isValid)return n;const i=function(e){xn.assert(VD(e.name));const t=Le(e.name);if(xn.assert(t,"Undeclared private name for property declaration."),"m"===t.kind)return t.methodName;if("a"===t.kind){if(I_(e))return t.getterName;if(A_(e))return t.setterName}}(n);i&&Ne().push(t.createAssignment(i,t.createFunctionExpression(F(n.modifiers,(e=>iu(e)&&!QD(e)&&!eE(e))),n.asteriskToken,i,void 0,HB(n.parameters,B,e),void 0,XB(n.body,B,e))))}function Y(e,t,n){if(e!==M){const r=M;M=e;const i=t(n);return M=r,i}return t(n)}function Z(n){return xn.assert(!Wv(n),"Decorators should already have been transformed and elided."),Zl(n)?function(n){if(!G(n))return p&&!Jv(n)&&(null==E?void 0:E.data)&&16&E.data.facts?t.updatePropertyDeclaration(n,VB(n.modifiers,B,Su),n.name,void 0,void 0,void 0):(iy(n,le)&&(n=Cz(e,n)),t.updatePropertyDeclaration(n,VB(n.modifiers,R,iu),qB(n.name,U,au),void 0,void 0,qB(n.initializer,B,Xu)));{const e=Le(n.name);if(xn.assert(e,"Undeclared private name for property declaration."),!e.isValid)return n;if(e.isStatic&&!g){const e=Te(n,t.createThis());if(e)return t.createClassStaticBlockDeclaration(t.createBlock([e],!0))}}}(n):function(e){if(!m||yu(e))return t.updatePropertyDeclaration(e,VB(e.modifiers,R,iu),qB(e.name,U,au),void 0,void 0,qB(e.initializer,B,Xu));{const n=function(e,n){if(oE(e)){const i=rI(e),o=qB(e.expression,B,Xu),a=El(o),l=MJ(a);if(!(i||mb(a)&&Xl(a.left))&&!l&&n){const n=t.getGeneratedNameForNode(e);return c.hasNodeCheckFlag(e,32768)?s(n):r(n),t.createAssignment(n,o)}return l||qD(a)?void 0:o}}(e.name,!!e.initializer||_);if(n&&Ne().push(...oI(n)),Jv(e)&&!g){const n=Te(e,t.createThis());if(n){const r=t.createClassStaticBlockDeclaration(t.createBlock([n]));return ew(r,e),mw(r,e),mw(n,{pos:-1,end:-1}),hw(n,void 0),bw(n,void 0),r}}}}(n)}function ee(){return-1===h||3===h&&!!(null==E?void 0:E.data)&&!!(16&E.data.facts)}function te(e){return yu(e)&&(ee()||zv(e)&&32&Zd(e))?function(e){const n=fw(e),i=cw(e),o=e.name;let a=o,s=o;if(oE(o)&&!MJ(o.expression)){const e=rI(o);if(e)a=t.updateComputedPropertyName(o,qB(o.expression,B,Xu)),s=t.updateComputedPropertyName(o,e.left);else{const e=t.createTempVariable(r);lw(e,o.expression);const n=qB(o.expression,B,Xu),i=t.createAssignment(e,n);lw(i,o.expression),a=t.updateComputedPropertyName(o,i),s=t.updateComputedPropertyName(o,e)}}const c=VB(e.modifiers,R,iu),l=eI(t,e,c,e.initializer);ew(l,e),iw(l,3072),lw(l,i);const u=Jv(e)?function(){const e=Ee();return e.classThis??e.classConstructor??(null==I?void 0:I.name)}()??t.createThis():t.createThis(),_=tI(t,e,c,a,u);ew(_,e),mw(_,n),lw(_,i);const d=t.createModifiersFromModifierFlags(ib(c)),p=nI(t,e,d,s,u);return ew(p,e),iw(p,3072),lw(p,i),UB([l,_,p],K,mu)}(e):Z(e)}function ne(e){if(M&&zv(M)&&hu(M)&&yu(fc(M))){const t=fA(e);110===t.kind&&A.add(t)}}function re(e,t){return ne(t=qB(t,B,Xu)),ie(e,t)}function ie(e,t){switch(mw(t,Ub(t,-1)),e.kind){case"a":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.getterName);case"m":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.methodName);case"f":return n().createClassPrivateFieldGetHelper(t,e.brandCheckIdentifier,e.kind,e.isStatic?e.variableName:void 0);case"untransformed":return xn.fail("Access helpers should not be created for untransformed private elements");default:xn.assertNever(e,"Unknown private element type")}}function oe(n,i){if(46===n.operator||47===n.operator){const e=lh(n.operand);if(eu(e)){let o;if(o=Le(e.name)){const a=qB(e.expression,B,Xu);ne(a);const{readExpression:s,initializeExpression:c}=ae(a);let l=re(o,s);const u=cP(n)||i?void 0:t.createTempVariable(r);return l=nA(t,n,l,r,u),l=fe(o,c||s,l,64),ew(l,n),sI(l,n),u&&(l=t.createComma(l,u),sI(l,n)),l}}else if(v&&M&&um(e)&&Az(M)&&(null==E?void 0:E.data)){const{classConstructor:o,superClassReference:a,facts:s}=E.data;if(1&s){const r=De(e);return cP(n)?t.updatePrefixUnaryExpression(n,r):t.updatePostfixUnaryExpression(n,r)}if(o&&a){let s,c;if(GE(e)?qD(e.name)&&(c=s=t.createStringLiteralFromNode(e.name)):MJ(e.argumentExpression)?c=s=e.argumentExpression:(c=t.createTempVariable(r),s=t.createAssignment(c,qB(e.argumentExpression,B,Xu))),s&&c){let l=t.createReflectGetCall(a,c,o);sI(l,e);const u=i?void 0:t.createTempVariable(r);return l=nA(t,n,l,r,u),l=t.createReflectSetCall(a,s,l,o),ew(l,n),sI(l,n),u&&(l=t.createComma(l,u),sI(l,n)),l}}}}return ZB(n,B,e)}function ae(e){const n=ly(e)?e:t.cloneNode(e);if(110===e.kind&&A.has(e)&&A.add(n),MJ(e))return{readExpression:n,initializeExpression:void 0};const i=t.createTempVariable(r);return{readExpression:i,initializeExpression:t.createAssignment(i,n)}}function se(e){if(E&&N.set(fc(e),E),g){if(fz(e)){const t=qB(e.body.statements[0].expression,B,Xu);if(mb(t,!0)&&t.left===t.right)return;return t}if(bz(e))return qB(e.body.statements[0].expression,B,Xu);o();let n=Y(e,(e=>VB(e,B,b_)),e.body.statements);n=t.mergeLexicalEnvironment(n,i());const r=t.createImmediatelyInvokedArrowFunction(n);return ew(lh(r.expression),e),ow(lh(r.expression),4),ew(r,e),sI(r,e),r}}function le(e){if(mP(e)&&!e.name){const t=qJ(e);return!Q(t,bz)&&((g||!!Zd(e))&&Q(t,(e=>pE(e)||Zl(e)||m&&VJ(e))))}return!1}function _e(i,o){if(hb(i)){const e=w;w=void 0,i=t.updateBinaryExpression(i,qB(i.left,q,Xu),i.operatorToken,qB(i.right,B,Xu));const n=Q(w)?t.inlineExpressions(ce([...w,i])):i;return w=e,n}if(mb(i)){iy(i,le)&&(i=Cz(e,i),xn.assertNode(i,mb));const n=fA(i.left,9);if(eu(n)){const e=Le(n.name);if(e)return sI(ew(fe(e,n.expression,i.right,i.operatorToken.kind),i),i)}else if(v&&M&&um(i.left)&&Az(M)&&(null==E?void 0:E.data)){const{classConstructor:e,superClassReference:n,facts:a}=E.data;if(1&a)return t.updateBinaryExpression(i,De(i.left),i.operatorToken,qB(i.right,B,Xu));if(e&&n){let a=XE(i.left)?qB(i.left.argumentExpression,B,Xu):qD(i.left.name)?t.createStringLiteralFromNode(i.left.name):void 0;if(a){let s=qB(i.right,B,Xu);if(LJ(i.operatorToken.kind)){let o=a;MJ(a)||(o=t.createTempVariable(r),a=t.createAssignment(o,a));const c=t.createReflectGetCall(n,o,e);ew(c,i.left),sI(c,i.left),s=t.createBinaryExpression(c,jJ(i.operatorToken.kind),s),sI(s,i)}const c=o?void 0:t.createTempVariable(r);return c&&(s=t.createAssignment(c,s),sI(c,i)),s=t.createReflectSetCall(n,a,s,e),ew(s,i),sI(s,i),c&&(s=t.createComma(s,c),sI(s,i)),s}}}}return function(e){return VD(e.left)&&103===e.operatorToken.kind}(i)?function(t){const r=Le(t.left);if(r){const e=qB(t.right,B,Xu);return ew(n().createClassPrivateFieldInHelper(r.brandCheckIdentifier,e),t)}return ZB(t,B,e)}(i):ZB(i,B,e)}function de(e,n){const r=n?z:B,i=qB(e.expression,r,Xu);return t.updateParenthesizedExpression(e,i)}function fe(e,r,i,o){if(r=qB(r,B,Xu),i=qB(i,B,Xu),ne(r),LJ(o)){const{readExpression:n,initializeExpression:a}=ae(r);r=a||n,i=t.createBinaryExpression(ie(e,n),jJ(o),i)}switch(mw(r,Ub(r,-1)),e.kind){case"a":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,e.setterName);case"m":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,void 0);case"f":return n().createClassPrivateFieldSetHelper(r,e.brandCheckIdentifier,i,e.kind,e.isStatic?e.variableName:void 0);case"untransformed":return xn.fail("Access helpers should not be created for untransformed private elements");default:xn.assertNever(e,"Unknown private element type")}}function me(e){return F(e.members,UJ)}function ge(n,r){var i;const o=I,a=w,s=E;I=n,w=void 0,E={previous:E,data:void 0};const l=32&Zd(n);if(g||l){const e=Pc(n);if(e&&qD(e))Pe().data.className=e;else if((null==(i=n.emitNode)?void 0:i.assignedName)&&wD(n.emitNode.assignedName))if(n.emitNode.assignedName.textSourceNode&&qD(n.emitNode.assignedName.textSourceNode))Pe().data.className=n.emitNode.assignedName.textSourceNode;else if(Ts(n.emitNode.assignedName.text,u)){const e=t.createIdentifier(n.emitNode.assignedName.text);Pe().data.className=e}}if(g){const e=me(n);Q(e)&&(Pe().data.weakSetName=Oe("instances",e[0].name))}const _=function(e){var t;let n=0;const r=fc(e);gu(r)&&bm(d,r)&&(n|=1),g&&(mz(e)||xz(e))&&(n|=2);let i=!1,o=!1,a=!1,s=!1;for(const r of e.members)Jv(r)?(r.name&&(VD(r.name)||yu(r))&&g?n|=2:!yu(r)||-1!==h||e.name||(null==(t=e.emitNode)?void 0:t.classThis)||(n|=2),(uE(r)||pE(r))&&(y&&16384&r.transformFlags&&(n|=8,1&n||(n|=2)),v&&134217728&r.transformFlags&&(1&n||(n|=6)))):qv(fc(r))||(yu(r)?(s=!0,a||(a=Zl(r))):Zl(r)?(a=!0,c.hasNodeCheckFlag(r,262144)&&(n|=2)):uE(r)&&(i=!0,o||(o=!!r.initializer)));return(f&&i||p&&o||g&&a||g&&s&&-1===h)&&(n|=16),n}(n);_&&(Ee().facts=_),8&_&&0==(2&T)&&(T|=2,e.enableSubstitution(110),e.enableEmitNotification(262),e.enableEmitNotification(218),e.enableEmitNotification(176),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(174),e.enableEmitNotification(172),e.enableEmitNotification(167));const m=r(n,_);return E=null==E?void 0:E.previous,xn.assert(E===s),I=o,w=a,m}function he(e,n){var i,o;let a;if(2&n)if(g&&(null==(i=e.emitNode)?void 0:i.classThis))Ee().classConstructor=e.emitNode.classThis,a=t.createAssignment(e.emitNode.classThis,t.getInternalName(e));else{const n=t.createTempVariable(r,!0);Ee().classConstructor=t.cloneNode(n),a=t.createAssignment(n,t.getInternalName(e))}(null==(o=e.emitNode)?void 0:o.classThis)&&(Ee().classThis=e.emitNode.classThis);const s=c.hasNodeCheckFlag(e,262144),l=Bv(e,32),u=Bv(e,2048);let _=VB(e.modifiers,R,iu);const d=VB(e.heritageClauses,$,jN),{members:f,prologue:m}=be(e),h=[];if(a&&Ne().unshift(a),Q(w)&&h.push(t.createExpressionStatement(t.inlineExpressions(w))),p||g||32&Zd(e)){const n=qJ(e);Q(n)&&ke(h,n,t.getInternalName(e))}h.length>0&&l&&u&&(_=VB(_,(e=>HA(e)?void 0:e),iu),h.push(t.createExportAssignment(void 0,!1,t.getLocalName(e,!1,!0))));const y=Ee().classConstructor;s&&y&&(we(),C[SJ(e)]=y);const v=t.updateClassDeclaration(e,_,e.name,void 0,d,f);return h.unshift(v),m&&h.unshift(t.createExpressionStatement(m)),h}function ye(e,n){var i,o,a;const l=!!(1&n),u=qJ(e),_=c.hasNodeCheckFlag(e,262144),d=c.hasNodeCheckFlag(e,32768);let p;function f(){var n;if(g&&(null==(n=e.emitNode)?void 0:n.classThis))return Ee().classConstructor=e.emitNode.classThis;const i=t.createTempVariable(d?s:r,!0);return Ee().classConstructor=t.cloneNode(i),i}(null==(i=e.emitNode)?void 0:i.classThis)&&(Ee().classThis=e.emitNode.classThis),2&n&&(p??(p=f()));const h=VB(e.modifiers,R,iu),y=VB(e.heritageClauses,$,jN),{members:v,prologue:b}=be(e),x=t.updateClassExpression(e,h,e.name,void 0,y,v),S=[];if(b&&S.push(b),(g||32&Zd(e))&&Q(u,(e=>pE(e)||Zl(e)||m&&VJ(e)))||Q(w))if(l)xn.assertIsDefined(D,"Decorated classes transformed by TypeScript are expected to be within a variable declaration."),Q(w)&&pe(D,O(w,t.createExpressionStatement)),Q(u)&&ke(D,u,(null==(o=e.emitNode)?void 0:o.classThis)??t.getInternalName(e)),p?S.push(t.createAssignment(p,x)):g&&(null==(a=e.emitNode)?void 0:a.classThis)?S.push(t.createAssignment(e.emitNode.classThis,x)):S.push(x);else{if(p??(p=f()),_){we();const n=t.cloneNode(p);n.emitNode.autoGenerate.flags&=-9,C[SJ(e)]=n}S.push(t.createAssignment(p,x)),pe(S,w),pe(S,function(e,t){const n=[];for(const r of e){const e=pE(r)?Y(r,se,r):Y(r,(()=>Ce(r,t)),void 0);e&&(hA(e),ew(e,r),ow(e,3072&Yd(r)),lw(e,Wb(r)),mw(e,r),n.push(e))}return n}(u,p)),S.push(t.cloneNode(p))}else S.push(x);return S.length>1&&(ow(x,131072),S.forEach(hA)),t.inlineExpressions(S)}function ve(t){if(!g)return ZB(t,B,e)}function be(e){const n=!!(32&Zd(e));if(g||P){for(const t of e.members)Zl(t)&&(G(t)?Ie(t,t.name,Fe):ZJ(Pe(),t.name,{kind:"untransformed"}));if(g&&Q(me(e))&&function(){const{weakSetName:e}=Pe().data;xn.assert(e,"weakSetName should be set in private identifier environment"),Ne().push(t.createAssignment(e,t.createNewExpression(t.createIdentifier("WeakSet"),void 0,[])))}(),ee())for(const r of e.members)if(yu(r)){const e=t.getGeneratedPrivateNameForNode(r.name,void 0,"_accessor_storage");g||n&&zv(r)?Ie(r,e,Ae):ZJ(Pe(),e,{kind:"untransformed"})}}let i,o,a,s=VB(e.members,V,mu);if(Q(s,fE)||(i=xe(void 0,e)),!g&&Q(w)){let e=t.createExpressionStatement(t.inlineExpressions(w));if(134234112&e.transformFlags){const n=t.createTempVariable(r),i=t.createArrowFunction(void 0,void 0,[],void 0,void 0,t.createBlock([e]));o=t.createAssignment(n,i),e=t.createExpressionStatement(t.createCallExpression(n,void 0,[]))}const n=t.createBlock([e]);a=t.createClassStaticBlockDeclaration(n),w=void 0}if(i||a){let n;const r=S(s,fz),o=S(s,bz);n=ue(n,r),n=ue(n,o),n=ue(n,i),n=ue(n,a),n=pe(n,r||o?F(s,(e=>e!==r&&e!==o)):s),s=sI(t.createNodeArray(n),e.members)}return{members:s,prologue:o}}function xe(n,r){if(n=qB(n,B,fE),!((null==E?void 0:E.data)&&16&E.data.facts))return n;const o=Sh(r),s=!(!o||106===fA(o.expression).kind),c=HB(n?n.parameters:void 0,B,e),l=function(n,r,o){const s=zJ(n,!1,!1);let c=s;_||(c=F(c,(e=>!!e.initializer||VD(e.name)||Uv(e))));const l=me(n),u=Q(c)||Q(l);if(!r&&!u)return XB(void 0,B,e);a();const d=!r&&o;let p=0,f=[];const m=[],h=t.createThis();if(function(e,n,r){if(!g||!Q(n))return;const{weakSetName:i}=Pe().data;xn.assert(i,"weakSetName should be set in private identifier environment"),e.push(t.createExpressionStatement(function(e,t,n){return e.createCallExpression(e.createPropertyAccessExpression(n,"add"),void 0,[t])}(t,r,i)))}(m,l,h),r){const e=F(s,(e=>rc(fc(e),r))),t=F(c,(e=>!rc(fc(e),r)));ke(m,e,h),ke(m,t,h)}else ke(m,c,h);if(null==r?void 0:r.body){p=t.copyPrologue(r.body.statements,f,!1,B);const e=JJ(r.body.statements,p);if(e.length)Se(f,r.body.statements,p,e,0,m,r);else{for(;p=f.length?r.body.multiLine??f.length>0:f.length>0;return sI(t.createBlock(sI(t.createNodeArray(f),r?r.body.statements:n.members),y),r?r.body:void 0)}(r,n,s);return l?n?(xn.assert(c),t.updateConstructorDeclaration(n,void 0,c,l)):hA(ew(sI(t.createConstructorDeclaration(void 0,c??[],l),n||r),n)):n}function Se(e,n,r,i,o,a,s){const c=i[o],l=n[c];if(pe(e,VB(n,B,b_,r,c-r)),r=c+1,VP(l)){const n=[];Se(n,l.tryBlock.statements,0,i,o+1,a,s),sI(t.createNodeArray(n),l.tryBlock.statements),e.push(t.updateTryStatement(l,t.updateBlock(l.tryBlock,n),qB(l.catchClause,B,RN),qB(l.finallyBlock,B,DP)))}else{for(pe(e,VB(n,B,b_,c,1));rl(e,p,t),serializeTypeOfNode:(e,t,n)=>l(e,u,t,n),serializeParameterTypesOfNode:(e,t,n)=>l(e,_,t,n),serializeReturnTypeOfNode:(e,t)=>l(e,d,t)};function l(e,t,n,r){const i=s,o=c;s=e.currentLexicalScope,c=e.currentNameScope;const a=void 0===r?t(n):t(n,r);return s=i,c=o,a}function u(e,n){switch(e.kind){case 172:case 169:return p(e.type);case 178:case 177:return p(function(e,t){const n=Sv(t.members,e);return n.setAccessor&&mv(n.setAccessor)||n.getAccessor&&Cv(n.getAccessor)}(e,n));case 263:case 231:case 174:return t.createIdentifier("Function");default:return t.createVoidZero()}}function _(e,n){const r=gu(e)?pv(e):cu(e)&&Fd(e.body)?e:void 0,i=[];if(r){const e=function(e,t){if(t&&177===e.kind){const{setAccessor:n}=Sv(t.members,e);if(n)return n.parameters}return e.parameters}(r,n),t=e.length;for(let r=0;re.parent&&IE(e.parent)&&(e.parent.trueType===e||e.parent.falseType===e))))return t.createIdentifier("Object");const r=y(e.typeName),o=t.createTempVariable(n);return t.createConditionalExpression(t.createTypeCheck(t.createAssignment(o,r),"function"),void 0,o,void 0,t.createIdentifier("Object"));case 1:return v(e.typeName);case 2:return t.createVoidZero();case 4:return b("BigInt",7);case 6:return t.createIdentifier("Boolean");case 3:return t.createIdentifier("Number");case 5:return t.createIdentifier("String");case 7:return t.createIdentifier("Array");case 8:return b("Symbol",2);case 10:return t.createIdentifier("Function");case 9:return t.createIdentifier("Promise");case 11:return t.createIdentifier("Object");default:return xn.assertNever(i)}}(e);case 193:return m(e.types,!0);case 192:return m(e.types,!1);case 194:return m([e.trueType,e.falseType],!1);case 198:if(148===e.operator)return p(e.type);break;case 186:case 199:case 200:case 187:case 133:case 159:case 197:case 205:case 312:case 313:case 317:case 318:case 319:break;case 314:case 315:case 316:return p(e.type);default:return xn.failBadSyntaxKind(e)}return t.createIdentifier("Object")}function f(e){switch(e.kind){case 11:case 15:return t.createIdentifier("String");case 224:{const t=e.operand;switch(t.kind){case 9:case 10:return f(t);default:return xn.failBadSyntaxKind(t)}}case 9:return t.createIdentifier("Number");case 10:return b("BigInt",7);case 112:case 97:return t.createIdentifier("Boolean");case 106:return t.createVoidZero();default:return xn.failBadSyntaxKind(e)}}function m(e,n){let r;for(let i of e){if(i=ch(i),146===i.kind){if(n)return t.createVoidZero();continue}if(159===i.kind){if(!n)return t.createIdentifier("Object");continue}if(133===i.kind)return t.createIdentifier("Object");if(!a&&(JE(i)&&106===i.literal.kind||157===i.kind))continue;const e=p(i);if(qD(e)&&"Object"===e.escapedText)return e;if(r){if(!g(r,e))return t.createIdentifier("Object")}else r=e}return r??t.createVoidZero()}function g(e,t){return Xl(e)?Xl(t):qD(e)?qD(t)&&e.escapedText===t.escapedText:GE(e)?GE(t)&&g(e.expression,t.expression)&&g(e.name,t.name):aP(e)?aP(t)&&TD(e.expression)&&"0"===e.expression.text&&TD(t.expression)&&"0"===t.expression.text:wD(e)?wD(t)&&e.text===t.text:oP(e)?oP(t)&&g(e.expression,t.expression):tP(e)?tP(t)&&g(e.expression,t.expression):_P(e)?_P(t)&&g(e.condition,t.condition)&&g(e.whenTrue,t.whenTrue)&&g(e.whenFalse,t.whenFalse):!!uP(e)&&uP(t)&&e.operatorToken.kind===t.operatorToken.kind&&g(e.left,t.left)&&g(e.right,t.right)}function h(e,n){return t.createLogicalAnd(t.createStrictInequality(t.createTypeOfExpression(e),t.createStringLiteral("undefined")),n)}function y(e){if(80===e.kind){const t=v(e);return h(t,t)}if(80===e.left.kind)return h(v(e.left),v(e));const r=y(e.left),i=t.createTempVariable(n);return t.createLogicalAnd(t.createLogicalAnd(r.left,t.createStrictInequality(t.createAssignment(i,r.right),t.createVoidZero())),t.createPropertyAccessExpression(i,e.right))}function v(e){switch(e.kind){case 80:const n=OT(sI(_I.cloneNode(e),e),e.parent);return n.original=void 0,OT(n,hc(s)),n;case 166:return function(e){return t.createPropertyAccessExpression(v(e.left),e.right)}(e)}}function b(e,n){return oHA(e)||cE(e)?void 0:e),Su),f=Wb(o),m=function(n){if(i.hasNodeCheckFlag(n,262144)){c||(e.enableSubstitution(80),c=[]);const i=t.createUniqueName(n.name&&!Xl(n.name)?bc(n.name):"default");return c[SJ(n)]=i,r(i),i}}(o),h=a<2?t.getInternalName(o,!1,!0):t.getLocalName(o,!1,!0),y=VB(o.heritageClauses,u,jN);let v=VB(o.members,u,mu),b=[];({members:v,decorationStatements:b}=p(o,v));const x=a>=9&&!!m&&Q(v,(e=>uE(e)&&Bv(e,256)||pE(e)));x&&(v=sI(t.createNodeArray([t.createClassStaticBlockDeclaration(t.createBlock([t.createExpressionStatement(t.createAssignment(m,t.createThis()))])),...v]),v));const S=t.createClassExpression(d,s&&Xl(s)?void 0:s,void 0,y,v);ew(S,o),sI(S,f);const k=m&&!x?t.createAssignment(m,S):S,T=t.createVariableDeclaration(h,void 0,void 0,k);ew(T,o);const C=t.createVariableDeclarationList([T],1),w=t.createVariableStatement(void 0,C);ew(w,o),sI(w,f),mw(w,o);const D=[w];if(pe(D,b),function(e,r){const i=function(e){const r=g(WJ(e));if(!r)return;const i=c&&c[SJ(e)],o=a<2?t.getInternalName(e,!1,!0):t.getDeclarationName(e,!1,!0),s=n().createDecorateHelper(r,o),l=t.createAssignment(o,i?t.createAssignment(i,s):s);return iw(l,3072),lw(l,Wb(e)),l}(r);i&&e.push(ew(t.createExpressionStatement(i),r))}(D,o),l)if(_){const e=t.createExportDefault(h);D.push(e)}else{const e=t.createExternalModuleExport(t.getDeclarationName(o));D.push(e)}return D}(o,o.name):function(e,n){const r=VB(e.modifiers,l,iu),i=VB(e.heritageClauses,u,jN);let o=VB(e.members,u,mu),a=[];return({members:o,decorationStatements:a}=p(e,o)),pe([t.updateClassDeclaration(e,r,n,void 0,i,o)],a)}(o,o.name)):ZB(o,u,e)}(o);case 231:return function(e){return t.updateClassExpression(e,VB(e.modifiers,l,iu),e.name,void 0,VB(e.heritageClauses,u,jN),VB(e.members,u,mu))}(o);case 176:return function(e){return t.updateConstructorDeclaration(e,VB(e.modifiers,l,iu),VB(e.parameters,u,sE),qB(e.body,u,DP))}(o);case 174:return function(e){return f(t.updateMethodDeclaration(e,VB(e.modifiers,l,iu),e.asteriskToken,xn.checkDefined(qB(e.name,u,au)),void 0,void 0,VB(e.parameters,u,sE),void 0,qB(e.body,u,DP)),e)}(o);case 178:return function(e){return f(t.updateSetAccessorDeclaration(e,VB(e.modifiers,l,iu),xn.checkDefined(qB(e.name,u,au)),VB(e.parameters,u,sE),qB(e.body,u,DP)),e)}(o);case 177:return function(e){return f(t.updateGetAccessorDeclaration(e,VB(e.modifiers,l,iu),xn.checkDefined(qB(e.name,u,au)),VB(e.parameters,u,sE),void 0,qB(e.body,u,DP)),e)}(o);case 172:return function(e){if(!(33554432&e.flags||Bv(e,128)))return f(t.updatePropertyDeclaration(e,VB(e.modifiers,l,iu),xn.checkDefined(qB(e.name,u,au)),void 0,void 0,qB(e.initializer,u,Xu)),e)}(o);case 169:return function(e){const n=t.updateParameterDeclaration(e,XA(t,e.modifiers),e.dotDotDotToken,xn.checkDefined(qB(e.name,u,su)),void 0,void 0,qB(e.initializer,u,Xu));return n!==e&&(mw(n,e),sI(n,Wb(e)),lw(n,Wb(e)),iw(n.name,64)),n}(o);default:return ZB(o,u,e)}}function _(e){return!!(536870912&e.transformFlags)}function d(e){return Q(e,_)}function p(e,n){let r=[];return h(r,e,!1),h(r,e,!0),function(e){for(const t of e.members){if(!lI(t))continue;const n=HJ(t,e,!0);if(Q(null==n?void 0:n.decorators,_))return!0;if(Q(null==n?void 0:n.parameters,d))return!0}return!1}(e)&&(n=sI(t.createNodeArray([...n,t.createClassStaticBlockDeclaration(t.createBlock(r,!0))]),n),r=void 0),{decorationStatements:r,members:n}}function f(e,t){return e!==t&&(mw(e,t),lw(e,Wb(t))),e}function m(e){return kD(e.expression,"___metadata")}function g(e){if(!e)return;const{false:t,true:n}=Ge(e.decorators,m),r=[];return pe(r,O(t,v)),pe(r,R(e.parameters,b)),pe(r,O(n,v)),r}function h(e,n,r){pe(e,O(function(e,t){const n=function(e,t){return F(e.members,(n=>{return i=t,ym(!0,r=n,e)&&i===Jv(r);var r,i}))}(e,t);let r;for(const t of n)r=ue(r,y(e,t));return r}(n,r),(e=>t.createExpressionStatement(e))))}function y(e,r){const i=g(HJ(r,e,!0));if(!i)return;const o=function(e,n){return Jv(n)?t.getDeclarationName(e):function(e){return t.createPropertyAccessExpression(t.getDeclarationName(e),"prototype")}(e)}(e,r),a=function(e,n){const r=e.name;return VD(r)?t.createIdentifier(""):oE(r)?n&&!MJ(r.expression)?t.getGeneratedNameForNode(r):r.expression:qD(r)?t.createStringLiteral(bc(r)):t.cloneNode(r)}(r,!Bv(r,128)),s=uE(r)&&!Uv(r)?t.createVoidZero():t.createNull(),c=n().createDecorateHelper(i,o,a,s);return iw(c,3072),lw(c,Wb(r)),c}function v(e){return xn.checkDefined(qB(e.expression,u,Xu))}function b(e,t){let r;if(e){r=[];for(const i of e){const e=n().createParamHelper(v(i),t);sI(e,i.expression),iw(e,3072),r.push(e)}}return r}}function Mz(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=wS(e.getCompilerOptions());let s,c,l,u,_,d;return CJ(e,(function(t){s=void 0,d=!1;const n=ZB(t,b,e);return ww(n,e.readEmitHelpers()),d&&(sw(n,32),d=!1),n}));function p(){switch(c=void 0,l=void 0,u=void 0,null==s?void 0:s.kind){case"class":c=s.classInfo;break;case"class-element":c=s.next.classInfo,l=s.classThis,u=s.classSuper;break;case"name":const e=s.next.next.next;"class-element"===(null==e?void 0:e.kind)&&(c=e.next.classInfo,l=e.classThis,u=e.classSuper)}}function f(e){s={kind:"class",next:s,classInfo:e,savedPendingExpressions:_},_=void 0,p()}function m(){xn.assert("class"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'class' but got '${null==s?void 0:s.kind}' instead.`)),_=s.savedPendingExpressions,s=s.next,p()}function g(e){var t,n;xn.assert("class"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'class' but got '${null==s?void 0:s.kind}' instead.`)),s={kind:"class-element",next:s},(pE(e)||uE(e)&&zv(e))&&(s.classThis=null==(t=s.next.classInfo)?void 0:t.classThis,s.classSuper=null==(n=s.next.classInfo)?void 0:n.classSuper),p()}function h(){var e;xn.assert("class-element"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'class-element' but got '${null==s?void 0:s.kind}' instead.`)),xn.assert("class"===(null==(e=s.next)?void 0:e.kind),"Incorrect value for top.next.kind.",(()=>{var e;return`Expected top.next.kind to be 'class' but got '${null==(e=s.next)?void 0:e.kind}' instead.`})),s=s.next,p()}function y(){xn.assert("class-element"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'class-element' but got '${null==s?void 0:s.kind}' instead.`)),s={kind:"name",next:s},p()}function v(){xn.assert("name"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'name' but got '${null==s?void 0:s.kind}' instead.`)),s=s.next,p()}function b(n){if(!function(e){return!!(33554432&e.transformFlags)||!!l&&!!(16384&e.transformFlags)||!!l&&!!u&&!!(134217728&e.transformFlags)}(n))return n;switch(n.kind){case 170:return xn.fail("Use `modifierVisitor` instead.");case 263:return function(n){if(E(n)){const r=[],i=fc(n,gu)??n,o=i.name?t.createStringLiteralFromNode(i.name):t.createStringLiteral("default"),a=Bv(n,32),s=Bv(n,2048);if(n.name||(n=kz(e,n,o)),a&&s){const e=D(n);if(n.name){const i=t.createVariableDeclaration(t.getLocalName(n),void 0,void 0,e);ew(i,n);const o=t.createVariableDeclarationList([i],1),a=t.createVariableStatement(void 0,o);r.push(a);const s=t.createExportDefault(t.getDeclarationName(n));ew(s,n),mw(s,fw(n)),lw(s,Kb(n)),r.push(s)}else{const i=t.createExportDefault(e);ew(i,n),mw(i,fw(n)),lw(i,Kb(n)),r.push(i)}}else{xn.assertIsDefined(n.name,"A class declaration that is not a default export must have a name.");const e=D(n),i=a?e=>UD(e)?void 0:S(e):S,o=VB(n.modifiers,i,iu),s=t.getLocalName(n,!1,!0),c=t.createVariableDeclaration(s,void 0,void 0,e);ew(c,n);const l=t.createVariableDeclarationList([c],1),u=t.createVariableStatement(o,l);if(ew(u,n),mw(u,fw(n)),r.push(u),a){const e=t.createExternalModuleExport(s);ew(e,n),r.push(e)}}return Ne(r)}{const e=VB(n.modifiers,S,iu),r=VB(n.heritageClauses,b,jN);f(void 0);const i=VB(n.members,k,mu);return m(),t.updateClassDeclaration(n,e,n.name,void 0,r,i)}}(n);case 231:return function(e){if(E(e)){const t=D(e);return ew(t,e),t}{const n=VB(e.modifiers,S,iu),r=VB(e.heritageClauses,b,jN);f(void 0);const i=VB(e.members,k,mu);return m(),t.updateClassExpression(e,n,e.name,void 0,r,i)}}(n);case 176:case 172:case 175:return xn.fail("Not supported outside of a class. Use 'classElementVisitor' instead.");case 169:return function(n){iy(n,I)&&(n=Cz(e,n,M(n.initializer)));const r=t.updateParameterDeclaration(n,void 0,n.dotDotDotToken,qB(n.name,b,su),void 0,void 0,qB(n.initializer,b,Xu));return r!==n&&(mw(r,n),sI(r,Wb(n)),lw(r,Wb(n)),iw(r.name,64)),r}(n);case 226:return L(n,!1);case 303:case 260:case 208:return function(t){return iy(t,I)&&(t=Cz(e,t,M(t.initializer))),ZB(t,b,e)}(n);case 277:return function(t){return iy(t,I)&&(t=Cz(e,t,M(t.expression))),ZB(t,b,e)}(n);case 110:return function(e){return l??e}(n);case 248:return function(n){return t.updateForStatement(n,qB(n.initializer,T,s_),qB(n.condition,b,Xu),qB(n.incrementor,T,Xu),QB(n.statement,b,e))}(n);case 244:return function(t){return ZB(t,T,e)}(n);case 355:return R(n,!1);case 217:return K(n,!1);case 354:return function(e,n){const r=b,i=qB(e.expression,r,Xu);return t.updatePartiallyEmittedExpression(e,i)}(n);case 213:return function(n){if(um(n.expression)&&l){const e=qB(n.expression,b,Xu),r=VB(n.arguments,b,Xu),i=t.createFunctionCallCall(e,l,r);return ew(i,n),sI(i,n),i}return ZB(n,b,e)}(n);case 215:return function(n){if(um(n.tag)&&l){const e=qB(n.tag,b,Xu),r=t.createFunctionBindCall(e,l,[]);ew(r,n),sI(r,n);const i=qB(n.template,b,qu);return t.updateTaggedTemplateExpression(n,r,void 0,i)}return ZB(n,b,e)}(n);case 224:case 225:return j(n,!1);case 211:return function(n){if(um(n)&&qD(n.name)&&l&&u){const e=t.createStringLiteralFromNode(n.name),r=t.createReflectGetCall(u,e,l);return ew(r,n.expression),sI(r,n.expression),r}return ZB(n,b,e)}(n);case 212:return function(n){if(um(n)&&l&&u){const e=qB(n.argumentExpression,b,Xu),r=t.createReflectGetCall(u,e,l);return ew(r,n.expression),sI(r,n.expression),r}return ZB(n,b,e)}(n);case 167:return J(n);case 174:case 178:case 177:case 218:case 262:{"other"===(null==s?void 0:s.kind)?(xn.assert(!_),s.depth++):(s={kind:"other",next:s,depth:0,savedPendingExpressions:_},_=void 0,p());const t=ZB(n,x,e);return xn.assert("other"===(null==s?void 0:s.kind),"Incorrect value for top.kind.",(()=>`Expected top.kind to be 'other' but got '${null==s?void 0:s.kind}' instead.`)),s.depth>0?(xn.assert(!_),s.depth--):(_=s.savedPendingExpressions,s=s.next,p()),t}default:return ZB(n,x,e)}}function x(e){if(170!==e.kind)return b(e)}function S(e){if(170!==e.kind)return e}function k(a){switch(a.kind){case 176:return function(e){g(e);const n=VB(e.modifiers,S,iu),r=VB(e.parameters,b,sE);let i;if(e.body&&c){const n=P(c.class,c);if(n){const r=[],o=t.copyPrologue(e.body.statements,r,!1,b),a=JJ(e.body.statements,o);a.length>0?N(r,e.body.statements,o,a,0,n):(pe(r,n),pe(r,VB(e.body.statements,b,b_))),i=t.createBlock(r,!0),ew(i,e.body),sI(i,e.body)}}return i??(i=qB(e.body,b,DP)),h(),t.updateConstructorDeclaration(e,n,r,i)}(a);case 174:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,ee);if(i)return h(),F(function(e,n,r){return e=VB(e,(e=>QD(e)?e:void 0),iu),t.createGetAccessorDeclaration(e,n,[],void 0,t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(r,t.createIdentifier("value")))]))}(n,r,i),e);{const i=VB(e.parameters,b,sE),o=qB(e.body,b,DP);return h(),F(t.updateMethodDeclaration(e,n,e.asteriskToken,r,void 0,void 0,i,void 0,o),e)}}(a);case 177:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,te);if(i)return h(),F(ie(n,r,i),e);{const i=VB(e.parameters,b,sE),o=qB(e.body,b,DP);return h(),F(t.updateGetAccessorDeclaration(e,n,r,i,void 0,o),e)}}(a);case 178:return function(e){g(e);const{modifiers:n,name:r,descriptorName:i}=A(e,c,ne);if(i)return h(),F(oe(n,r,i),e);{const i=VB(e.parameters,b,sE),o=qB(e.body,b,DP);return h(),F(t.updateSetAccessorDeclaration(e,n,r,i,o),e)}}(a);case 172:return function(a){iy(a,I)&&(a=Cz(e,a,M(a.initializer))),g(a),xn.assert(!vp(a),"Not yet implemented.");const{modifiers:s,name:l,initializersName:u,extraInitializersName:_,descriptorName:d,thisArg:p}=A(a,c,Uv(a)?re:void 0);r();let f=qB(a.initializer,b,Xu);u&&(f=n().createRunInitializersHelper(p??t.createThis(),u,f??t.createVoidZero())),Jv(a)&&c&&f&&(c.hasStaticInitializers=!0);const m=i();if(Q(m)&&(f=t.createImmediatelyInvokedArrowFunction([...m,t.createReturnStatement(f)])),c&&(Jv(a)?(f=G(c,!0,f),_&&(c.pendingStaticInitializers??(c.pendingStaticInitializers=[]),c.pendingStaticInitializers.push(n().createRunInitializersHelper(c.classThis??t.createThis(),_)))):(f=G(c,!1,f),_&&(c.pendingInstanceInitializers??(c.pendingInstanceInitializers=[]),c.pendingInstanceInitializers.push(n().createRunInitializersHelper(t.createThis(),_))))),h(),Uv(a)&&d){const e=fw(a),n=cw(a),r=a.name;let i=r,c=r;if(oE(r)&&!MJ(r.expression)){const e=rI(r);if(e)i=t.updateComputedPropertyName(r,qB(r.expression,b,Xu)),c=t.updateComputedPropertyName(r,e.left);else{const e=t.createTempVariable(o);lw(e,r.expression);const n=qB(r.expression,b,Xu),a=t.createAssignment(e,n);lw(a,r.expression),i=t.updateComputedPropertyName(r,a),c=t.updateComputedPropertyName(r,e)}}const l=VB(s,(e=>129!==e.kind?e:void 0),iu),u=eI(t,a,l,f);ew(u,a),iw(u,3072),lw(u,n),lw(u.name,a.name);const _=ie(l,i,d);ew(_,a),mw(_,e),lw(_,n);const p=oe(l,c,d);return ew(p,a),iw(p,3072),lw(p,n),[u,_,p]}return F(t.updatePropertyDeclaration(a,s,l,void 0,void 0,f),a)}(a);case 175:return function(n){let r;if(g(n),bz(n))r=ZB(n,b,e);else if(fz(n)){const t=l;l=void 0,r=ZB(n,b,e),l=t}else if(r=n=ZB(n,b,e),c&&(c.hasStaticInitializers=!0,Q(c.pendingStaticInitializers))){const e=[];for(const n of c.pendingStaticInitializers){const r=t.createExpressionStatement(n);lw(r,cw(n)),e.push(r)}const n=t.createBlock(e,!0);r=[t.createClassStaticBlockDeclaration(n),r],c.pendingStaticInitializers=void 0}return h(),r}(a);default:return b(a)}}function T(e){switch(e.kind){case 224:case 225:return j(e,!0);case 226:return L(e,!0);case 355:return R(e,!0);case 217:return K(e,!0);default:return b(e)}}function C(e,n){return t.createUniqueName(`${function(e){let t=e.name&&qD(e.name)&&!Xl(e.name)?bc(e.name):e.name&&VD(e.name)&&!Xl(e.name)?bc(e.name).slice(1):e.name&&wD(e.name)&&Ts(e.name.text,99)?e.name.text:gu(e)?"class":"member";return I_(e)&&(t=`get_${t}`),A_(e)&&(t=`set_${t}`),e.name&&VD(e.name)&&(t=`private_${t}`),Jv(e)&&(t=`static_${t}`),"_"+t}(e)}_${n}`,24)}function w(e,n){return t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(e,void 0,void 0,n)],1))}function D(o){r(),!Sz(o)&&bm(!1,o)&&(o=kz(e,o,t.createStringLiteral("")));const a=t.getLocalName(o,!1,!1,!0),s=function(e){const r=t.createUniqueName("_metadata",48);let i,o,a,s,c,l=!1,u=!1,_=!1;if(hm(!1,e)){const n=Q(e.members,(e=>(Zl(e)||yu(e))&&zv(e)));a=t.createUniqueName("_classThis",n?24:48)}for(const r of e.members){if(bu(r)&&ym(!1,r,e))if(zv(r)){if(!o){o=t.createUniqueName("_staticExtraInitializers",48);const r=n().createRunInitializersHelper(a??t.createThis(),o);lw(r,e.name??Kb(e)),s??(s=[]),s.push(r)}}else{if(!i){i=t.createUniqueName("_instanceExtraInitializers",48);const r=n().createRunInitializersHelper(t.createThis(),i);lw(r,e.name??Kb(e)),c??(c=[]),c.push(r)}i??(i=t.createUniqueName("_instanceExtraInitializers",48))}if(pE(r)?bz(r)||(l=!0):uE(r)&&(zv(r)?l||(l=!!r.initializer||Wv(r)):u||(u=!vp(r))),(Zl(r)||yu(r))&&zv(r)&&(_=!0),o&&i&&l&&u&&_)break}return{class:e,classThis:a,metadataReference:r,instanceMethodExtraInitializersName:i,staticMethodExtraInitializersName:o,hasStaticInitializers:l,hasNonAmbientInstanceFields:u,hasStaticPrivateClassElements:_,pendingStaticInitializers:s,pendingInstanceInitializers:c}}(o),c=[];let l,u,p,g,h=!1;const y=X(WJ(o));y&&(s.classDecoratorsName=t.createUniqueName("_classDecorators",48),s.classDescriptorName=t.createUniqueName("_classDescriptor",48),s.classExtraInitializersName=t.createUniqueName("_classExtraInitializers",48),xn.assertIsDefined(s.classThis),c.push(w(s.classDecoratorsName,t.createArrayLiteralExpression(y)),w(s.classDescriptorName),w(s.classExtraInitializersName,t.createArrayLiteralExpression()),w(s.classThis)),s.hasStaticPrivateClassElements&&(h=!0,d=!0));const v=Dh(o.heritageClauses,96),x=v&&Se(v.types),S=x&&qB(x.expression,b,Xu);if(S){s.classSuper=t.createUniqueName("_classSuper",48);const e=fA(S),n=mP(e)&&!e.name||nP(e)&&!e.name||rP(e)?t.createComma(t.createNumericLiteral(0),S):S;c.push(w(s.classSuper,n));const r=t.updateExpressionWithTypeArguments(x,s.classSuper,void 0),i=t.updateHeritageClause(v,[r]);g=t.createNodeArray([i])}const T=s.classThis??t.createThis();f(s),l=ue(l,function(e,n){const r=t.createVariableDeclaration(e,void 0,void 0,t.createConditionalExpression(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("Symbol"),"function"),t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata")),t.createToken(58),t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"create"),void 0,[n?ae(n):t.createNull()]),t.createToken(59),t.createVoidZero()));return t.createVariableStatement(void 0,t.createVariableDeclarationList([r],2))}(s.metadataReference,s.classSuper));let C=o.members;if(C=VB(C,(e=>fE(e)?e:k(e)),mu),C=VB(C,(e=>fE(e)?k(e):e),mu),_){let n;for(let r of _)r=qB(r,(function r(i){return 16384&i.transformFlags?110===i.kind?(n||(n=t.createUniqueName("_outerThis",16),c.unshift(w(n,t.createThis()))),n):ZB(i,r,e):i}),Xu),l=ue(l,t.createExpressionStatement(r));_=void 0}if(m(),Q(s.pendingInstanceInitializers)&&!pv(o)){const e=P(0,s);if(e){const n=Sh(o),r=[];if(n&&106!==fA(n.expression).kind){const e=t.createSpreadElement(t.createIdentifier("arguments")),n=t.createCallExpression(t.createSuper(),void 0,[e]);r.push(t.createExpressionStatement(n))}pe(r,e);const i=t.createBlock(r,!0);p=t.createConstructorDeclaration(void 0,[],i)}}if(s.staticMethodExtraInitializersName&&c.push(w(s.staticMethodExtraInitializersName,t.createArrayLiteralExpression())),s.instanceMethodExtraInitializersName&&c.push(w(s.instanceMethodExtraInitializersName,t.createArrayLiteralExpression())),s.memberInfos&&ld(s.memberInfos,((e,n)=>{Jv(n)&&(c.push(w(e.memberDecoratorsName)),e.memberInitializersName&&c.push(w(e.memberInitializersName,t.createArrayLiteralExpression())),e.memberExtraInitializersName&&c.push(w(e.memberExtraInitializersName,t.createArrayLiteralExpression())),e.memberDescriptorName&&c.push(w(e.memberDescriptorName)))})),s.memberInfos&&ld(s.memberInfos,((e,n)=>{Jv(n)||(c.push(w(e.memberDecoratorsName)),e.memberInitializersName&&c.push(w(e.memberInitializersName,t.createArrayLiteralExpression())),e.memberExtraInitializersName&&c.push(w(e.memberExtraInitializersName,t.createArrayLiteralExpression())),e.memberDescriptorName&&c.push(w(e.memberDescriptorName)))})),l=pe(l,s.staticNonFieldDecorationStatements),l=pe(l,s.nonStaticNonFieldDecorationStatements),l=pe(l,s.staticFieldDecorationStatements),l=pe(l,s.nonStaticFieldDecorationStatements),s.classDescriptorName&&s.classDecoratorsName&&s.classExtraInitializersName&&s.classThis){l??(l=[]);const e=t.createPropertyAssignment("value",T),r=t.createObjectLiteralExpression([e]),i=t.createAssignment(s.classDescriptorName,r),c=t.createPropertyAccessExpression(T,"name"),u=n().createESDecorateHelper(t.createNull(),i,s.classDecoratorsName,{kind:"class",name:c,metadata:s.metadataReference},t.createNull(),s.classExtraInitializersName),_=t.createExpressionStatement(u);lw(_,Kb(o)),l.push(_);const d=t.createPropertyAccessExpression(s.classDescriptorName,"value"),p=t.createAssignment(s.classThis,d),f=t.createAssignment(a,p);l.push(t.createExpressionStatement(f))}if(l.push(function(e,n){const r=t.createObjectDefinePropertyCall(e,t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata"),t.createPropertyDescriptor({configurable:!0,writable:!0,enumerable:!0,value:n},!0));return iw(t.createIfStatement(n,t.createExpressionStatement(r)),1)}(T,s.metadataReference)),Q(s.pendingStaticInitializers)){for(const e of s.pendingStaticInitializers){const n=t.createExpressionStatement(e);lw(n,cw(e)),u=ue(u,n)}s.pendingStaticInitializers=void 0}if(s.classExtraInitializersName){const e=n().createRunInitializersHelper(T,s.classExtraInitializersName),r=t.createExpressionStatement(e);lw(r,o.name??Kb(o)),u=ue(u,r)}l&&u&&!s.hasStaticInitializers&&(pe(l,u),u=void 0);const D=l&&t.createClassStaticBlockDeclaration(t.createBlock(l,!0));D&&h&&aw(D,32);const E=u&&t.createClassStaticBlockDeclaration(t.createBlock(u,!0));if(D||p||E){const e=[],n=C.findIndex(bz);D?(pe(e,C,0,n+1),e.push(D),pe(e,C,n+1)):pe(e,C),p&&e.push(p),E&&e.push(E),C=sI(t.createNodeArray(e),C)}const N=i();let F;if(y){F=t.createClassExpression(void 0,void 0,void 0,g,C),s.classThis&&(F=gz(t,F,s.classThis));const e=t.createVariableDeclaration(a,void 0,void 0,F),n=t.createVariableDeclarationList([e]),r=s.classThis?t.createAssignment(a,s.classThis):a;c.push(t.createVariableStatement(void 0,n),t.createReturnStatement(r))}else F=t.createClassExpression(void 0,o.name,void 0,g,C),c.push(t.createReturnStatement(F));if(h){sw(F,32);for(const e of F.members)(Zl(e)||yu(e))&&zv(e)&&sw(e,32)}return ew(F,o),t.createImmediatelyInvokedArrowFunction(t.mergeLexicalEnvironment(c,N))}function E(e){return bm(!1,e)||vm(!1,e)}function P(e,n){if(Q(n.pendingInstanceInitializers)){const e=[];return e.push(t.createExpressionStatement(t.inlineExpressions(n.pendingInstanceInitializers))),n.pendingInstanceInitializers=void 0,e}}function N(e,n,r,i,o,a){const s=i[o],c=n[s];if(pe(e,VB(n,b,b_,r,s-r)),VP(c)){const n=[];N(n,c.tryBlock.statements,0,i,o+1,a),sI(t.createNodeArray(n),c.tryBlock.statements),e.push(t.updateTryStatement(c,t.updateBlock(c.tryBlock,n),qB(c.catchClause,b,RN),qB(c.finallyBlock,b,DP)))}else pe(e,VB(n,b,b_,s,1)),pe(e,a);pe(e,VB(n,b,b_,s+1))}function F(e,t){return e!==t&&(mw(e,t),lw(e,Kb(t))),e}function A(e,r,i){let a,s,c,l,u,d;if(!r){const t=VB(e.modifiers,S,iu);return y(),s=B(e.name),v(),{modifiers:t,referencedName:a,name:s,initializersName:c,descriptorName:d,thisArg:u}}const p=X(HJ(e,r.class,!1)),f=VB(e.modifiers,S,iu);if(p){const m=C(e,"decorators"),g=t.createArrayLiteralExpression(p),h=t.createAssignment(m,g),x={memberDecoratorsName:m};r.memberInfos??(r.memberInfos=new Map),r.memberInfos.set(e,x),_??(_=[]),_.push(h);const S=bu(e)||yu(e)?Jv(e)?r.staticNonFieldDecorationStatements??(r.staticNonFieldDecorationStatements=[]):r.nonStaticNonFieldDecorationStatements??(r.nonStaticNonFieldDecorationStatements=[]):uE(e)&&!yu(e)?Jv(e)?r.staticFieldDecorationStatements??(r.staticFieldDecorationStatements=[]):r.nonStaticFieldDecorationStatements??(r.nonStaticFieldDecorationStatements=[]):xn.fail(),k=mE(e)?"getter":gE(e)?"setter":dE(e)?"method":yu(e)?"accessor":uE(e)?"field":xn.fail();let T;if(qD(e.name)||VD(e.name))T={computed:!1,name:e.name};else if(Wh(e.name))T={computed:!0,name:t.createStringLiteralFromNode(e.name)};else{const r=e.name.expression;Wh(r)&&!qD(r)?T={computed:!0,name:t.createStringLiteralFromNode(r)}:(y(),({referencedName:a,name:s}=function(e){if(Wh(e)||VD(e))return{referencedName:t.createStringLiteralFromNode(e),name:qB(e,b,au)};if(Wh(e.expression)&&!qD(e.expression))return{referencedName:t.createStringLiteralFromNode(e.expression),name:qB(e,b,au)};const r=t.getGeneratedNameForNode(e);o(r);const i=n().createPropKeyHelper(qB(e.expression,b,Xu)),a=t.createAssignment(r,i);return{referencedName:r,name:t.updateComputedPropertyName(e,H(a))}}(e.name)),T={computed:!0,name:a},v())}const w={kind:k,name:T,static:Jv(e),private:VD(e.name),access:{get:uE(e)||mE(e)||dE(e),set:uE(e)||gE(e)},metadata:r.metadataReference};if(bu(e)){const o=Jv(e)?r.staticMethodExtraInitializersName:r.instanceMethodExtraInitializersName;let a;xn.assertIsDefined(o),Zl(e)&&i&&(a=i(e,VB(f,(e=>lt(e,WD)),iu)),x.memberDescriptorName=d=C(e,"descriptor"),a=t.createAssignment(d,a));const s=n().createESDecorateHelper(t.createThis(),a??t.createNull(),m,w,t.createNull(),o),c=t.createExpressionStatement(s);lw(c,Kb(e)),S.push(c)}else if(uE(e)){let o;c=x.memberInitializersName??(x.memberInitializersName=C(e,"initializers")),l=x.memberExtraInitializersName??(x.memberExtraInitializersName=C(e,"extraInitializers")),Jv(e)&&(u=r.classThis),Zl(e)&&Uv(e)&&i&&(o=i(e,void 0),x.memberDescriptorName=d=C(e,"descriptor"),o=t.createAssignment(d,o));const a=n().createESDecorateHelper(yu(e)?t.createThis():t.createNull(),o??t.createNull(),m,w,c,l),s=t.createExpressionStatement(a);lw(s,Kb(e)),S.push(s)}}return void 0===s&&(y(),s=B(e.name),v()),Q(f)||!dE(e)&&!uE(e)||iw(s,1024),{modifiers:f,referencedName:a,name:s,initializersName:c,extraInitializersName:l,descriptorName:d,thisArg:u}}function I(e){return mP(e)&&!e.name&&E(e)}function M(e){const t=fA(e);return mP(t)&&!t.name&&!bm(!1,t)}function L(n,r){if(hb(n)){const e=U(n.left),r=qB(n.right,b,Xu);return t.updateBinaryExpression(n,e,n.operatorToken,r)}if(mb(n)){if(iy(n,I))return ZB(n=Cz(e,n,M(n.right)),b,e);if(um(n.left)&&l&&u){let e=XE(n.left)?qB(n.left.argumentExpression,b,Xu):qD(n.left.name)?t.createStringLiteralFromNode(n.left.name):void 0;if(e){let i=qB(n.right,b,Xu);if(LJ(n.operatorToken.kind)){let r=e;MJ(e)||(r=t.createTempVariable(o),e=t.createAssignment(r,e));const a=t.createReflectGetCall(u,r,l);ew(a,n.left),sI(a,n.left),i=t.createBinaryExpression(a,jJ(n.operatorToken.kind),i),sI(i,n)}const a=r?void 0:t.createTempVariable(o);return a&&(i=t.createAssignment(a,i),sI(a,n)),i=t.createReflectSetCall(u,e,i,l),ew(i,n),sI(i,n),a&&(i=t.createComma(i,a),sI(i,n)),i}}}if(28===n.operatorToken.kind){const e=qB(n.left,T,Xu),i=qB(n.right,r?T:b,Xu);return t.updateBinaryExpression(n,e,n.operatorToken,i)}return ZB(n,b,e)}function j(n,r){if(46===n.operator||47===n.operator){const e=lh(n.operand);if(um(e)&&l&&u){let i=XE(e)?qB(e.argumentExpression,b,Xu):qD(e.name)?t.createStringLiteralFromNode(e.name):void 0;if(i){let e=i;MJ(i)||(e=t.createTempVariable(o),i=t.createAssignment(e,i));let a=t.createReflectGetCall(u,e,l);ew(a,n),sI(a,n);const s=r?void 0:t.createTempVariable(o);return a=nA(t,n,a,o,s),a=t.createReflectSetCall(u,i,a,l),ew(a,n),sI(a,n),s&&(a=t.createComma(a,s),sI(a,n)),a}}}return ZB(n,b,e)}function R(e,n){const r=n?YB(e.elements,T):YB(e.elements,b,T);return t.updateCommaListExpression(e,r)}function B(e){return oE(e)?J(e):qB(e,b,au)}function J(e){let n=qB(e.expression,b,Xu);return MJ(n)||(n=H(n)),t.updateComputedPropertyName(e,n)}function z(n){if(HE(n)||WE(n))return U(n);if(um(n)&&l&&u){const e=XE(n)?qB(n.argumentExpression,b,Xu):qD(n.name)?t.createStringLiteralFromNode(n.name):void 0;if(e){const r=t.createTempVariable(void 0),i=t.createAssignmentTargetWrapper(r,t.createReflectSetCall(u,e,r,l));return ew(i,n),sI(i,n),i}}return ZB(n,b,e)}function $(n){if(mb(n,!0)){iy(n,I)&&(n=Cz(e,n,M(n.right)));const r=z(n.left),i=qB(n.right,b,Xu);return t.updateBinaryExpression(n,r,n.operatorToken,i)}return z(n)}function q(n){return xn.assertNode(n,ju),fP(n)?function(n){if(Vu(n.expression)){const e=z(n.expression);return t.updateSpreadElement(n,e)}return ZB(n,b,e)}(n):gP(n)?ZB(n,b,e):$(n)}function V(n){return xn.assertNode(n,Mu),zN(n)?function(n){if(Vu(n.expression)){const e=z(n.expression);return t.updateSpreadAssignment(n,e)}return ZB(n,b,e)}(n):JN(n)?function(t){return iy(t,I)&&(t=Cz(e,t,M(t.objectAssignmentInitializer))),ZB(t,b,e)}(n):BN(n)?function(n){const r=qB(n.name,b,au);if(mb(n.initializer,!0)){const e=$(n.initializer);return t.updatePropertyAssignment(n,r,e)}if(Vu(n.initializer)){const e=z(n.initializer);return t.updatePropertyAssignment(n,r,e)}return ZB(n,b,e)}(n):ZB(n,b,e)}function U(e){if(WE(e)){const n=VB(e.elements,q,Xu);return t.updateArrayLiteralExpression(e,n)}{const n=VB(e.properties,V,Cu);return t.updateObjectLiteralExpression(e,n)}}function K(e,n){const r=n?T:b,i=qB(e.expression,r,Xu);return t.updateParenthesizedExpression(e,i)}function W(e,n){return Q(e)&&(n?tP(n)?(e.push(n.expression),n=t.updateParenthesizedExpression(n,t.inlineExpressions(e))):(e.push(n),n=t.inlineExpressions(e)):n=t.inlineExpressions(e)),n}function H(e){const t=W(_,e);return xn.assertIsDefined(t),t!==e&&(_=void 0),t}function G(e,t,n){const r=W(t?e.pendingStaticInitializers:e.pendingInstanceInitializers,n);return r!==n&&(t?e.pendingStaticInitializers=void 0:e.pendingInstanceInitializers=void 0),r}function X(e){if(!e)return;const t=[];return pe(t,O(e.decorators,Y)),t}function Y(e){const n=qB(e.expression,b,Xu);if(iw(n,3072),Ox(fA(n))){const{target:e,thisArg:r}=t.createCallBinding(n,o,a,!0);return t.restoreOuterExpressions(n,t.createFunctionBindCall(e,r,[]))}return n}function Z(e,r,i,o,a,s,c){const l=t.createFunctionExpression(i,o,void 0,void 0,s,void 0,c??t.createBlock([]));ew(l,e),lw(l,Kb(e)),iw(l,3072);const u="get"===a||"set"===a?a:void 0,_=t.createStringLiteralFromNode(r,void 0),d=n().createSetFunctionNameHelper(l,_,u),p=t.createPropertyAssignment(t.createIdentifier(a),d);return ew(p,e),lw(p,Kb(e)),iw(p,3072),p}function ee(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,e.asteriskToken,"value",VB(e.parameters,b,sE),qB(e.body,b,DP))])}function te(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"get",[],qB(e.body,b,DP))])}function ne(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"set",VB(e.parameters,b,sE),qB(e.body,b,DP))])}function re(e,n){return t.createObjectLiteralExpression([Z(e,e.name,n,void 0,"get",[],t.createBlock([t.createReturnStatement(t.createPropertyAccessExpression(t.createThis(),t.getGeneratedPrivateNameForNode(e.name)))])),Z(e,e.name,n,void 0,"set",[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createThis(),t.getGeneratedPrivateNameForNode(e.name)),t.createIdentifier("value")))]))])}function ie(e,n,r){return e=VB(e,(e=>QD(e)?e:void 0),iu),t.createGetAccessorDeclaration(e,n,[],void 0,t.createBlock([t.createReturnStatement(t.createFunctionCallCall(t.createPropertyAccessExpression(r,t.createIdentifier("get")),t.createThis(),[]))]))}function oe(e,n,r){return e=VB(e,(e=>QD(e)?e:void 0),iu),t.createSetAccessorDeclaration(e,n,[t.createParameterDeclaration(void 0,void 0,"value")],t.createBlock([t.createReturnStatement(t.createFunctionCallCall(t.createPropertyAccessExpression(r,t.createIdentifier("set")),t.createThis(),[t.createIdentifier("value")]))]))}function ae(e){return t.createBinaryExpression(t.createElementAccessExpression(e,t.createPropertyAccessExpression(t.createIdentifier("Symbol"),"metadata")),61,t.createNull())}}function Lz(e){const{factory:t,getEmitHelperFactory:n,resumeLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=e.getEmitResolver(),s=e.getCompilerOptions(),c=wS(s);let l,u,_,d,p,m=0;const g=[];let h=0;const y=e.onEmitNode,v=e.onSubstituteNode;return e.onEmitNode=function(e,t,n){if(1&l&&function(e){const t=e.kind;return 263===t||176===t||174===t||177===t||178===t}(t)){const r=(a.hasNodeCheckFlag(t,128)?128:0)|(a.hasNodeCheckFlag(t,256)?256:0);if(r!==m){const i=m;return m=r,y(e,t,n),void(m=i)}}else if(l&&g[IB(t)]){const r=m;return m=0,y(e,t,n),void(m=r)}y(e,t,n)},e.onSubstituteNode=function(e,n){return n=v(e,n),1===e&&m?function(e){switch(e.kind){case 211:return K(e);case 212:return W(e);case 213:return function(e){const n=e.expression;if(um(n)){const r=GE(n)?K(n):W(n);return t.createCallExpression(t.createPropertyAccessExpression(r,"call"),void 0,[t.createThis(),...e.arguments])}return e}(e)}return e}(n):n},CJ(e,(function(t){if(t.isDeclarationFile)return t;b(1,!1),b(2,!yp(t,s));const n=ZB(t,C,e);return ww(n,e.readEmitHelpers()),n}));function b(e,t){h=t?h|e:h&~e}function x(e){return 0!=(h&e)}function S(e,t,n){const r=e&~h;if(r){b(r,!0);const e=t(n);return b(r,!1),e}return t(n)}function k(t){return ZB(t,C,e)}function T(t){switch(t.kind){case 218:case 262:case 174:case 177:case 178:case 176:return t;case 169:case 208:case 260:break;case 80:if(p&&a.isArgumentsLocalBinding(t))return p}return ZB(t,T,e)}function C(n){if(0==(256&n.transformFlags))return p?T(n):n;switch(n.kind){case 134:return;case 223:return function(n){return x(1)?ew(sI(t.createYieldExpression(void 0,qB(n.expression,C,Xu)),n),n):ZB(n,C,e)}(n);case 174:return S(3,E,n);case 262:return S(3,F,n);case 218:return S(3,A,n);case 219:return S(1,I,n);case 211:return _&&GE(n)&&108===n.expression.kind&&_.add(n.name.escapedText),ZB(n,C,e);case 212:return _&&108===n.expression.kind&&(d=!0),ZB(n,C,e);case 177:return S(3,P,n);case 178:return S(3,N,n);case 176:return S(3,D,n);case 263:case 231:return S(3,k,n);default:return ZB(n,C,e)}}function w(n){if(nh(n))switch(n.kind){case 243:return function(n){if(L(n.declarationList)){const e=j(n.declarationList,!1);return e?t.createExpressionStatement(e):void 0}return ZB(n,C,e)}(n);case 248:return function(n){const r=n.initializer;return t.updateForStatement(n,L(r)?j(r,!1):qB(n.initializer,C,s_),qB(n.condition,C,Xu),qB(n.incrementor,C,Xu),QB(n.statement,w,e))}(n);case 249:return function(n){return t.updateForInStatement(n,L(n.initializer)?j(n.initializer,!0):xn.checkDefined(qB(n.initializer,C,s_)),xn.checkDefined(qB(n.expression,C,Xu)),QB(n.statement,w,e))}(n);case 250:return function(n){return t.updateForOfStatement(n,qB(n.awaitModifier,C,GD),L(n.initializer)?j(n.initializer,!0):xn.checkDefined(qB(n.initializer,C,s_)),xn.checkDefined(qB(n.expression,C,Xu)),QB(n.statement,w,e))}(n);case 299:return function(t){const n=new Set;let r;if(M(t.variableDeclaration,n),n.forEach(((e,t)=>{u.has(t)&&(r||(r=new Set(u)),r.delete(t))})),r){const n=u;u=r;const i=ZB(t,w,e);return u=n,i}return ZB(t,w,e)}(n);case 241:case 255:case 269:case 296:case 297:case 258:case 246:case 247:case 245:case 254:case 256:return ZB(n,w,e);default:return xn.assertNever(n,"Unhandled node.")}return C(n)}function D(n){const r=p;p=void 0;const i=t.updateConstructorDeclaration(n,VB(n.modifiers,C,iu),HB(n.parameters,C,e),z(n));return p=r,i}function E(n){let r;const i=Jh(n),o=p;p=void 0;const a=t.updateMethodDeclaration(n,VB(n.modifiers,C,Su),n.asteriskToken,n.name,void 0,void 0,r=2&i?q(n):HB(n.parameters,C,e),void 0,2&i?V(n,r):z(n));return p=o,a}function P(n){const r=p;p=void 0;const i=t.updateGetAccessorDeclaration(n,VB(n.modifiers,C,Su),n.name,HB(n.parameters,C,e),void 0,z(n));return p=r,i}function N(n){const r=p;p=void 0;const i=t.updateSetAccessorDeclaration(n,VB(n.modifiers,C,Su),n.name,HB(n.parameters,C,e),z(n));return p=r,i}function F(n){let r;const i=p;p=void 0;const o=Jh(n),a=t.updateFunctionDeclaration(n,VB(n.modifiers,C,Su),n.asteriskToken,n.name,void 0,r=2&o?q(n):HB(n.parameters,C,e),void 0,2&o?V(n,r):XB(n.body,C,e));return p=i,a}function A(n){let r;const i=p;p=void 0;const o=Jh(n),a=t.updateFunctionExpression(n,VB(n.modifiers,C,iu),n.asteriskToken,n.name,void 0,r=2&o?q(n):HB(n.parameters,C,e),void 0,2&o?V(n,r):XB(n.body,C,e));return p=i,a}function I(n){let r;const i=Jh(n);return t.updateArrowFunction(n,VB(n.modifiers,C,iu),void 0,r=2&i?q(n):HB(n.parameters,C,e),void 0,n.equalsGreaterThanToken,2&i?V(n,r):XB(n.body,C,e))}function M({name:e},t){if(qD(e))t.add(e.escapedText);else for(const n of e.elements)gP(n)||M(n,t)}function L(e){return!!e&&WP(e)&&!(7&e.flags)&&e.declarations.some(J)}function j(e,n){!function(e){f(e.declarations,R)}(e);const r=lx(e);return 0===r.length?n?qB(t.converters.convertToAssignmentElementTarget(e.declarations[0].name),C,Xu):void 0:t.inlineExpressions(O(r,B))}function R({name:e}){if(qD(e))o(e);else for(const t of e.elements)gP(t)||R(t)}function B(e){const n=lw(t.createAssignment(t.converters.convertToAssignmentElementTarget(e.name),e.initializer),e);return xn.checkDefined(qB(n,C,Xu))}function J({name:e}){if(qD(e))return u.has(e.escapedText);for(const t of e.elements)if(!gP(t)&&J(t))return!0;return!1}function z(n){xn.assertIsDefined(n.body);const r=_,i=d;_=new Set,d=!1;let o=XB(n.body,C,e);const s=fc(n,uu);if(c>=2&&(a.hasNodeCheckFlag(n,256)||a.hasNodeCheckFlag(n,128))&&3!=(3&Jh(s))){if(U(),_.size){const e=jz(t,a,n,_);g[IB(e)]=!0;const r=o.statements.slice();jd(r,[e]),o=t.updateBlock(o,r)}d&&(a.hasNodeCheckFlag(n,256)?Cw(o,SD):a.hasNodeCheckFlag(n,128)&&Cw(o,xD))}return _=r,d=i,o}function $(){xn.assert(p);const e=t.createVariableDeclaration(p,void 0,void 0,t.createIdentifier("arguments")),n=t.createVariableStatement(void 0,[e]);return hA(n),ow(n,2097152),n}function q(n){if(nz(n.parameters))return HB(n.parameters,C,e);const r=[];for(const e of n.parameters){if(e.initializer||e.dotDotDotToken){if(219===n.kind){const e=t.createParameterDeclaration(void 0,t.createToken(26),t.createUniqueName("args",8));r.push(e)}break}const i=t.createParameterDeclaration(void 0,void 0,t.getGeneratedNameForNode(e.name,8));r.push(i)}const i=t.createNodeArray(r);return sI(i,n.parameters),i}function V(o,s){const l=nz(o.parameters)?void 0:HB(o.parameters,C,e);r();const f=fc(o,cu).type,m=c<2?function(e){const t=e&&fm(e);if(t&&ou(t)){const e=a.getTypeReferenceSerializationKind(t);if(1===e||0===e)return t}}(f):void 0,h=219===o.kind,y=p,v=a.hasNodeCheckFlag(o,512)&&!p;let b;if(v&&(p=t.createUniqueName("arguments")),l)if(h){const e=[];xn.assert(s.length<=o.parameters.length);for(let n=0;n=2&&(a.hasNodeCheckFlag(o,256)||a.hasNodeCheckFlag(o,128));if(r&&(U(),_.size)){const n=jz(t,a,o,_);g[IB(n)]=!0,jd(e,[n])}v&&jd(e,[$()]);const i=t.createBlock(e,!0);sI(i,o.body),r&&d&&(a.hasNodeCheckFlag(o,256)?Cw(i,SD):a.hasNodeCheckFlag(o,128)&&Cw(i,xD)),N=i}return u=S,h||(_=k,d=T,p=y),N}function U(){0==(1&l)&&(l|=1,e.enableSubstitution(213),e.enableSubstitution(211),e.enableSubstitution(212),e.enableEmitNotification(263),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(176),e.enableEmitNotification(243))}function K(e){return 108===e.expression.kind?sI(t.createPropertyAccessExpression(t.createUniqueName("_super",48),e.name),e):e}function W(e){return 108===e.expression.kind?function(e,n){return sI(256&m?t.createPropertyAccessExpression(t.createCallExpression(t.createUniqueName("_superIndex",48),void 0,[e]),"value"):t.createCallExpression(t.createUniqueName("_superIndex",48),void 0,[e]),n)}(e.argumentExpression,e):e}}function jz(e,t,n,r){const i=t.hasNodeCheckFlag(n,256),o=[];return r.forEach(((t,n)=>{const r=vc(n),a=[];a.push(e.createPropertyAssignment("get",e.createArrowFunction(void 0,void 0,[],void 0,void 0,iw(e.createPropertyAccessExpression(iw(e.createSuper(),8),r),8)))),i&&a.push(e.createPropertyAssignment("set",e.createArrowFunction(void 0,void 0,[e.createParameterDeclaration(void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,e.createAssignment(iw(e.createPropertyAccessExpression(iw(e.createSuper(),8),r),8),e.createIdentifier("v"))))),o.push(e.createPropertyAssignment(r,e.createObjectLiteralExpression(a)))})),e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createUniqueName("_super",48),void 0,void 0,e.createCallExpression(e.createPropertyAccessExpression(e.createIdentifier("Object"),"create"),void 0,[e.createNull(),e.createObjectLiteralExpression(o,!0)]))],2))}function Rz(e){const{factory:t,getEmitHelperFactory:n,resumeLexicalEnvironment:r,endLexicalEnvironment:i,hoistVariableDeclaration:o}=e,a=e.getEmitResolver(),s=e.getCompilerOptions(),c=wS(s),l=e.onEmitNode;e.onEmitNode=function(e,t,n){if(1&_&&function(e){const t=e.kind;return 263===t||176===t||174===t||177===t||178===t}(t)){const r=(a.hasNodeCheckFlag(t,128)?128:0)|(a.hasNodeCheckFlag(t,256)?256:0);if(r!==v){const i=v;return v=r,l(e,t,n),void(v=i)}}else if(_&&x[IB(t)]){const r=v;return v=0,l(e,t,n),void(v=r)}l(e,t,n)};const u=e.onSubstituteNode;e.onSubstituteNode=function(e,n){return n=u(e,n),1===e&&v?function(e){switch(e.kind){case 211:return G(e);case 212:return X(e);case 213:return function(e){const n=e.expression;if(um(n)){const r=GE(n)?G(n):X(n);return t.createCallExpression(t.createPropertyAccessExpression(r,"call"),void 0,[t.createThis(),...e.arguments])}return e}(e)}return e}(n):n};let _,d,p,f,m,g,h,y=!1,v=0,b=0;const x=[];return CJ(e,(function(n){if(n.isDeclarationFile)return n;f=n;const r=function(n){const r=S(2,yp(n,s)?0:1);y=!1;const i=ZB(n,C,e),o=Z(i.statements,m&&[t.createVariableStatement(void 0,t.createVariableDeclarationList(m))]),a=t.updateSourceFile(i,sI(t.createNodeArray(o),n.statements));return k(r),a}(n);return ww(r,e.readEmitHelpers()),f=void 0,m=void 0,r}));function S(e,t){const n=b;return b=3&(b&~e|t),n}function k(e){b=e}function T(e){m=ue(m,t.createVariableDeclaration(e))}function C(e){return N(e,!1)}function w(e){return N(e,!0)}function D(e){if(134!==e.kind)return e}function E(e,t,n,r){if(function(e,t){return b!==(b&~e|t)}(n,r)){const i=S(n,r),o=e(t);return k(i),o}return e(t)}function P(t){return ZB(t,C,e)}function N(r,i){if(0==(128&r.transformFlags))return r;switch(r.kind){case 223:return function(r){return 2&d&&1&d?ew(sI(t.createYieldExpression(void 0,n().createAwaitHelper(qB(r.expression,C,Xu))),r),r):ZB(r,C,e)}(r);case 229:return function(r){if(2&d&&1&d){if(r.asteriskToken){const e=qB(xn.checkDefined(r.expression),C,Xu);return ew(sI(t.createYieldExpression(void 0,n().createAwaitHelper(t.updateYieldExpression(r,r.asteriskToken,sI(n().createAsyncDelegatorHelper(sI(n().createAsyncValuesHelper(e),e)),e)))),r),r)}return ew(sI(t.createYieldExpression(void 0,O(r.expression?qB(r.expression,C,Xu):t.createVoidZero())),r),r)}return ZB(r,C,e)}(r);case 253:return function(n){return 2&d&&1&d?t.updateReturnStatement(n,O(n.expression?qB(n.expression,C,Xu):t.createVoidZero())):ZB(n,C,e)}(r);case 256:return function(n){if(2&d){const e=Jf(n);return 250===e.kind&&e.awaitModifier?I(e,n):t.restoreEnclosingLabel(qB(e,C,b_,t.liftToBlock),n)}return ZB(n,C,e)}(r);case 210:return function(r){if(65536&r.transformFlags){const e=function(e){let n;const r=[];for(const i of e)if(305===i.kind){n&&(r.push(t.createObjectLiteralExpression(n)),n=void 0);const e=i.expression;r.push(qB(e,C,Xu))}else n=ue(n,303===i.kind?t.createPropertyAssignment(i.name,qB(i.initializer,C,Xu)):qB(i,C,Cu));return n&&r.push(t.createObjectLiteralExpression(n)),r}(r.properties);e.length&&210!==e[0].kind&&e.unshift(t.createObjectLiteralExpression());let i=e[0];if(e.length>1){for(let t=1;t=2&&(a.hasNodeCheckFlag(o,256)||a.hasNodeCheckFlag(o,128));if(m){0==(1&_)&&(_|=1,e.enableSubstitution(213),e.enableSubstitution(211),e.enableSubstitution(212),e.enableEmitNotification(263),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(176),e.enableEmitNotification(243));const n=jz(t,a,o,g);x[IB(n)]=!0,jd(d,[n])}d.push(f);const y=t.updateBlock(o.body,d);return m&&h&&(a.hasNodeCheckFlag(o,256)?Cw(y,SD):a.hasNodeCheckFlag(o,128)&&Cw(y,xD)),g=l,h=u,y}function W(e){r();let n=0;const o=[],a=qB(e.body,C,o_)??t.createBlock([]);DP(a)&&(n=t.copyPrologue(a.statements,o,!1,C)),pe(o,H(void 0,e));const s=i();if(n>0||Q(o)||Q(s)){const e=t.converters.convertToFunctionBlock(a,!0);return jd(o,s),pe(o,e.statements.slice(n)),t.updateBlock(e,sI(t.createNodeArray(o),e.statements))}return a}function H(n,r){let i=!1;for(const o of r.parameters)if(i){if(Eu(o.name)){if(o.name.elements.length>0){const r=sz(o,C,e,0,t.getGeneratedNameForNode(o));if(Q(r)){const e=t.createVariableDeclarationList(r),i=t.createVariableStatement(void 0,e);iw(i,2097152),n=ue(n,i)}}else if(o.initializer){const e=t.getGeneratedNameForNode(o),r=qB(o.initializer,C,Xu),i=t.createAssignment(e,r),a=t.createExpressionStatement(i);iw(a,2097152),n=ue(n,a)}}else if(o.initializer){const e=t.cloneNode(o.name);sI(e,o.name),iw(e,96);const r=qB(o.initializer,C,Xu);ow(r,3168);const i=t.createAssignment(e,r);sI(i,o),iw(i,3072);const a=t.createBlock([t.createExpressionStatement(i)]);sI(a,o),iw(a,3905);const s=t.createTypeCheck(t.cloneNode(o.name),"undefined"),c=t.createIfStatement(s,a);hA(c),sI(c,o),iw(c,2101056),n=ue(n,c)}}else if(65536&o.transformFlags){i=!0;const r=sz(o,C,e,1,t.getGeneratedNameForNode(o),!1,!0);if(Q(r)){const e=t.createVariableDeclarationList(r),i=t.createVariableStatement(void 0,e);iw(i,2097152),n=ue(n,i)}}return n}function G(e){return 108===e.expression.kind?sI(t.createPropertyAccessExpression(t.createUniqueName("_super",48),e.name),e):e}function X(e){return 108===e.expression.kind?function(e,n){return sI(256&v?t.createPropertyAccessExpression(t.createCallExpression(t.createIdentifier("_superIndex"),void 0,[e]),"value"):t.createCallExpression(t.createIdentifier("_superIndex"),void 0,[e]),n)}(e.argumentExpression,e):e}}function Bz(e){const t=e.factory;return CJ(e,(function(t){return t.isDeclarationFile?t:ZB(t,n,e)}));function n(r){return 0==(64&r.transformFlags)?r:299===r.kind?function(r){return r.variableDeclaration?ZB(r,n,e):t.updateCatchClause(r,t.createVariableDeclaration(t.createTempVariable(void 0)),qB(r.block,n,DP))}(r):ZB(r,n,e)}}function Jz(e){const{factory:t,hoistVariableDeclaration:n}=e;return CJ(e,(function(t){return t.isDeclarationFile?t:ZB(t,r,e)}));function r(i){if(0==(32&i.transformFlags))return i;switch(i.kind){case 213:{const e=o(i,!1);return xn.assertNotNode(e,xN),e}case 211:case 212:if(Sl(i)){const e=s(i,!1,!1);return xn.assertNotNode(e,xN),e}return ZB(i,r,e);case 226:return 61===i.operatorToken.kind?function(e){let i=qB(e.left,r,Xu),o=i;return OJ(i)||(o=t.createTempVariable(n),i=t.createAssignment(o,i)),sI(t.createConditionalExpression(c(i,o),void 0,o,void 0,qB(e.right,r,Xu)),e)}(i):ZB(i,r,e);case 220:return function(e){return Sl(lh(e.expression))?ew(a(e.expression,!1,!0),e):t.updateDeleteExpression(e,qB(e.expression,r,Xu))}(i);default:return ZB(i,r,e)}}function i(e,n,r){const i=a(e.expression,n,r);return xN(i)?t.createSyntheticReferenceExpression(t.updateParenthesizedExpression(e,i.expression),i.thisArg):t.updateParenthesizedExpression(e,i)}function o(n,o){if(Sl(n))return s(n,o,!1);if(tP(n.expression)&&Sl(lh(n.expression))){const e=i(n.expression,!0,!1),o=VB(n.arguments,r,Xu);return xN(e)?sI(t.createFunctionCallCall(e.expression,e.thisArg,o),n):t.updateCallExpression(n,e,void 0,o)}return ZB(n,r,e)}function a(e,a,c){switch(e.kind){case 217:return i(e,a,c);case 211:case 212:return function(e,i,o){if(Sl(e))return s(e,i,o);let a,c=qB(e.expression,r,Xu);return xn.assertNotNode(c,xN),i&&(OJ(c)?a=c:(a=t.createTempVariable(n),c=t.createAssignment(a,c))),c=211===e.kind?t.updatePropertyAccessExpression(e,c,qB(e.name,r,qD)):t.updateElementAccessExpression(e,c,qB(e.argumentExpression,r,Xu)),a?t.createSyntheticReferenceExpression(c,a):c}(e,a,c);case 213:return o(e,a);default:return qB(e,r,Xu)}}function s(e,i,o){const{expression:s,chain:l}=function(e){xn.assertNotNode(e,Pl);const t=[e];for(;!e.questionDotToken&&!ZE(e);)e=ut(El(e.expression),Sl),xn.assertNotNode(e,Pl),t.unshift(e);return{expression:e.expression,chain:t}}(e),u=a(El(s),xl(l[0]),!1);let _=xN(u)?u.thisArg:void 0,d=xN(u)?u.expression:u,p=t.restoreOuterExpressions(s,d,8);OJ(d)||(d=t.createTempVariable(n),p=t.createAssignment(d,p));let f,m=d;for(let e=0;ee&&pe(c,VB(n.statements,u,b_,e,d-e));break}d++}xn.assert(dt&&(t=e)}return t}(n.caseBlock.clauses);if(r){const i=m();return g([t.updateSwitchStatement(n,qB(n.expression,u,Xu),t.updateCaseBlock(n.caseBlock,n.caseBlock.clauses.map((n=>function(n,r){return 0!==Wz(n.statements)?MN(n)?t.updateCaseClause(n,qB(n.expression,u,Xu),_(n.statements,0,n.statements.length,r,void 0)):t.updateDefaultClause(n,_(n.statements,0,n.statements.length,r,void 0)):ZB(n,u,e)}(n,i)))))],i,2===r)}return ZB(n,u,e)}(n);default:return ZB(n,u,e)}}function _(i,o,a,s,_){const m=[];for(let r=o;rt&&(t=e)}return t}function Hz(e){const{factory:t,getEmitHelperFactory:n}=e,r=e.getCompilerOptions();let i,o;return CJ(e,(function(n){if(n.isDeclarationFile)return n;i=n,o={},o.importSpecifier=tk(r,n);let a=ZB(n,c,e);ww(a,e.readEmitHelpers());let s=a.statements;if(o.filenameDeclaration&&(s=Jd(s.slice(),t.createVariableStatement(void 0,t.createVariableDeclarationList([o.filenameDeclaration],2)))),o.utilizedImplicitRuntimeImports)for(const[e,r]of $e(o.utilizedImplicitRuntimeImports.entries()))if(qI(n)){const n=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamedImports($e(r.values()))),t.createStringLiteral(e),void 0);LT(n,!1),s=Jd(s.slice(),n)}else if(Zp(n)){const n=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createObjectBindingPattern($e(r.values(),(e=>t.createBindingElement(void 0,e.propertyName,e.name)))),void 0,void 0,t.createCallExpression(t.createIdentifier("require"),void 0,[t.createStringLiteral(e)]))],2));LT(n,!1),s=Jd(s.slice(),n)}return s!==a.statements&&(a=t.updateSourceFile(a,s)),o=void 0,a}));function a(){if(o.filenameDeclaration)return o.filenameDeclaration.name;const e=t.createVariableDeclaration(t.createUniqueName("_jsxFileName",48),void 0,void 0,t.createStringLiteral(i.fileName));return o.filenameDeclaration=e,o.filenameDeclaration.name}function s(e){var n,i;const a="createElement"===e?o.importSpecifier:nk(o.importSpecifier,r),s=null==(i=null==(n=o.utilizedImplicitRuntimeImports)?void 0:n.get(a))?void 0:i.get(e);if(s)return s.name;o.utilizedImplicitRuntimeImports||(o.utilizedImplicitRuntimeImports=new Map);let c=o.utilizedImplicitRuntimeImports.get(a);c||(c=new Map,o.utilizedImplicitRuntimeImports.set(a,c));const l=t.createUniqueName(`_${e}`,112),u=t.createImportSpecifier(!1,t.createIdentifier(e),l);return Bw(l,u),c.set(e,u),l}function c(t){return 2&t.transformFlags?function(t){switch(t.kind){case 284:return f(t,!1);case 285:return m(t,!1);case 288:return g(t,!1);case 294:return N(t);default:return ZB(t,c,e)}}(t):t}function l(e){switch(e.kind){case 12:return function(e){const n=function(e){let t,n=0,r=-1;for(let i=0;iBN(e)&&(qD(e.name)&&"__proto__"===bc(e.name)||wD(e.name)&&"__proto__"===e.name.text)))}function d(e){return void 0===o.importSpecifier||function(e){let t=!1;for(const n of e.attributes.properties)if(!AN(n)||HE(n.expression)&&!n.expression.properties.some(zN)){if(t&&NN(n)&&qD(n.name)&&"key"===n.name.escapedText)return!0}else t=!0;return!1}(e)}function f(e,t){return(d(e.openingElement)?b:y)(e.openingElement,e.children,t,e)}function m(e,t){return(d(e)?b:y)(e,void 0,t,e)}function g(e,t){return(void 0===o.importSpecifier?k:x)(e.openingFragment,e.children,t,e)}function h(e){const n=vy(e);if(1===p(n)&&!n[0].dotDotDotToken){const e=l(n[0]);return e&&t.createPropertyAssignment("children",e)}const r=q(e,l);return p(r)?t.createPropertyAssignment("children",t.createArrayLiteralExpression(r)):void 0}function y(e,n,r,i){const o=P(e),a=n&&n.length?h(n):void 0,s=S(e.attributes.properties,(e=>!!e.name&&qD(e.name)&&"key"===e.name.escapedText)),c=s?F(e.attributes.properties,(e=>e!==s)):e.attributes.properties;return v(o,p(c)?T(c,a):t.createObjectLiteralExpression(a?[a]:u),s,n||u,r,i)}function v(e,n,o,c,l,u){var _;const d=vy(c),f=p(d)>1||!!(null==(_=d[0])?void 0:_.dotDotDotToken),m=[e,n];if(o&&m.push(w(o.initializer)),5===r.jsx){const e=fc(i);if(e&&qN(e)){void 0===o&&m.push(t.createVoidZero()),m.push(f?t.createTrue():t.createFalse());const n=Xa(e,u.pos);m.push(t.createObjectLiteralExpression([t.createPropertyAssignment("fileName",a()),t.createPropertyAssignment("lineNumber",t.createNumericLiteral(n.line+1)),t.createPropertyAssignment("columnNumber",t.createNumericLiteral(n.character+1))])),m.push(t.createThis())}}const g=sI(t.createCallExpression(function(e){const t=function(e){return 5===r.jsx?"jsxDEV":e?"jsxs":"jsx"}(e);return s(t)}(f),void 0,m),u);return l&&hA(g),g}function b(n,a,c,u){const _=P(n),d=n.attributes.properties,f=p(d)?T(d):t.createNull(),m=void 0===o.importSpecifier?HF(t,e.getEmitResolver().getJsxFactoryEntity(i),r.reactNamespace,n):s("createElement"),g=GF(t,m,_,f,q(a,l),u);return c&&hA(g),g}function x(e,n,r,i){let o;if(n&&n.length){const e=function(e){const n=h(e);return n&&t.createObjectLiteralExpression([n])}(n);e&&(o=e)}return v(s("Fragment"),o||t.createObjectLiteralExpression([]),void 0,n,r,i)}function k(n,o,a,s){const c=XF(t,e.getEmitResolver().getJsxFactoryEntity(i),e.getEmitResolver().getJsxFragmentFactoryEntity(i),r.reactNamespace,q(o,l),n,s);return a&&hA(c),c}function T(e,i){const o=wS(r);return o&&o>=5?t.createObjectLiteralExpression(function(e,n){const r=j(G(e,AN,((e,n)=>j(O(e,(e=>{return n?HE((r=e).expression)&&!_(r.expression)?L(r.expression.properties,(e=>xn.checkDefined(qB(e,c,Cu)))):t.createSpreadAssignment(xn.checkDefined(qB(r.expression,c,Xu))):C(e);var r}))))));return n&&r.push(n),r}(e,i)):function(e,r){const i=[];let o=[];for(const t of e)if(AN(t)){if(HE(t.expression)&&!_(t.expression)){for(const e of t.expression.properties)zN(e)?(a(),i.push(xn.checkDefined(qB(e.expression,c,Xu)))):o.push(xn.checkDefined(qB(e,c)));continue}a(),i.push(xn.checkDefined(qB(t.expression,c,Xu)))}else o.push(C(t));return r&&o.push(r),a(),i.length&&!HE(i[0])&&i.unshift(t.createObjectLiteralExpression()),Ee(i)||n().createAssignHelper(i);function a(){o.length&&(i.push(t.createObjectLiteralExpression(o)),o=[])}}(e,i)}function C(e){const n=function(e){const n=e.name;if(qD(n)){const e=bc(n);return/^[A-Za-z_]\w*$/.test(e)?n:t.createStringLiteral(e)}return t.createStringLiteral(bc(n.namespace)+":"+bc(n.name))}(e),r=w(e.initializer);return t.createPropertyAssignment(n,r)}function w(e){if(void 0===e)return t.createTrue();if(11===e.kind){const n=void 0!==e.singleQuote?e.singleQuote:!Wm(e,i);return sI(t.createStringLiteral(function(e){const t=E(e);return t===e?void 0:t}(e.text)||e.text,n),e)}return 294===e.kind?void 0===e.expression?t.createTrue():xn.checkDefined(qB(e.expression,c,Xu)):kN(e)?f(e,!1):TN(e)?m(e,!1):DN(e)?g(e,!1):xn.failBadSyntaxKind(e)}function D(e,t){const n=E(t);return void 0===e?n:e+" "+n}function E(e){return e.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g,((e,t,n,r,i,o,a)=>{if(i)return Ps(parseInt(i,10));if(o)return Ps(parseInt(o,16));{const t=Gz.get(a);return t?Ps(t):e}}))}function P(e){if(284===e.kind)return P(e.openingElement);{const n=e.tagName;return qD(n)&&Jy(n.escapedText)?t.createStringLiteral(bc(n)):ON(n)?t.createStringLiteral(bc(n.namespace)+":"+bc(n.name)):ZF(t,n)}}function N(e){const n=qB(e.expression,c,Xu);return e.dotDotDotToken?t.createSpreadElement(n):n}}var Gz=new Map(Object.entries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}));function Xz(e){const{factory:t,hoistVariableDeclaration:n}=e;return CJ(e,(function(t){return t.isDeclarationFile?t:ZB(t,r,e)}));function r(i){return 0==(512&i.transformFlags)?i:226===i.kind?function(i){switch(i.operatorToken.kind){case 68:return function(e){let i,o;const a=qB(e.left,r,Xu),s=qB(e.right,r,Xu);if(XE(a)){const e=t.createTempVariable(n),r=t.createTempVariable(n);i=sI(t.createElementAccessExpression(sI(t.createAssignment(e,a.expression),a.expression),sI(t.createAssignment(r,a.argumentExpression),a.argumentExpression)),a),o=sI(t.createElementAccessExpression(e,r),a)}else if(GE(a)){const e=t.createTempVariable(n);i=sI(t.createPropertyAccessExpression(sI(t.createAssignment(e,a.expression),a.expression),a.name),a),o=sI(t.createPropertyAccessExpression(e,a.name),a)}else i=a,o=a;return sI(t.createAssignment(i,sI(t.createGlobalMethodCall("Math","pow",[o,s]),e)),e)}(i);case 43:return function(e){const n=qB(e.left,r,Xu),i=qB(e.right,r,Xu);return sI(t.createGlobalMethodCall("Math","pow",[n,i]),e)}(i);default:return ZB(i,r,e)}}(i):ZB(i,r,e)}}function Qz(e,t){return{kind:e,expression:t}}function Yz(e){const{factory:t,getEmitHelperFactory:n,startLexicalEnvironment:r,resumeLexicalEnvironment:i,endLexicalEnvironment:o,hoistVariableDeclaration:a}=e,s=e.getCompilerOptions(),c=e.getEmitResolver(),l=e.onSubstituteNode,u=e.onEmitNode;let _,d,p,f,m,g;function h(e){f=ue(f,t.createVariableDeclaration(e))}return e.onEmitNode=function(e,t,n){if(1&g&&cu(t)){const r=y(32670,16&Yd(t)?81:65);return u(e,t,n),void v(r,0,0)}u(e,t,n)},e.onSubstituteNode=function(e,n){return n=l(e,n),1===e?function(e){switch(e.kind){case 80:return function(e){if(2&g&&!rA(e)){const n=c.getReferencedDeclarationWithCollidingName(e);if(n&&(!gu(n)||!function(e,t){let n=hc(t);if(!n||n===e||n.end<=e.pos||n.pos>=e.end)return!1;const r=Np(e);for(;n;){if(n===r||n===e)return!1;if(mu(n)&&n.parent===e)return!0;n=n.parent}return!1}(n,e)))return sI(t.getGeneratedNameForNode(Pc(n)),e)}return e}(e);case 110:return function(e){return 1&g&&16&p?sI(P(),e):e}(e)}return e}(n):qD(n)?function(e){if(2&g&&!rA(e)){const n=hc(e,qD);if(n&&function(e){switch(e.parent.kind){case 208:case 263:case 266:case 260:return e.parent.name===e&&c.isDeclarationWithCollidingName(e.parent)}return!1}(n))return sI(t.getGeneratedNameForNode(n),e)}return e}(n):n},CJ(e,(function(n){if(n.isDeclarationFile)return n;_=n,d=n.text;const i=function(e){const n=y(8064,64),i=[],a=[];r();const s=t.copyPrologue(e.statements,i,!1,k);return pe(a,VB(e.statements,k,b_,s)),f&&a.push(t.createVariableStatement(void 0,t.createVariableDeclarationList(f))),t.mergeLexicalEnvironment(i,o()),oe(i,e),v(n,0,0),t.updateSourceFile(e,sI(t.createNodeArray(Z(i,a)),e.statements))}(n);return ww(i,e.readEmitHelpers()),_=void 0,d=void 0,f=void 0,p=0,i}));function y(e,t){const n=p;return p=32767&(p&~e|t),n}function v(e,t,n){p=-32768&(p&~t|n)|e}function b(e){return 0!=(8192&p)&&253===e.kind&&!e.expression}function S(e){return 0!=(1024&e.transformFlags)||void 0!==m||8192&p&&function(e){return 4194304&e.transformFlags&&(BP(e)||FP(e)||JP(e)||zP(e)||tN(e)||MN(e)||LN(e)||VP(e)||RN(e)||$P(e)||Zu(e,!1)||DP(e))}(e)||Zu(e,!1)&&$e(e)||0!=(1&Zd(e))}function k(e){return S(e)?D(e,!1):e}function T(e){return S(e)?D(e,!0):e}function C(e){if(S(e)){const t=fc(e);if(uE(t)&&zv(t)){const t=y(32670,16449),n=D(e,!1);return v(t,229376,0),n}return D(e,!1)}return e}function w(e){return 108===e.kind?st(e,!0):k(e)}function D(n,r){switch(n.kind){case 126:return;case 263:return function(e){const n=t.createVariableDeclaration(t.getLocalName(e,!0),void 0,void 0,A(e));ew(n,e);const r=[],i=t.createVariableStatement(void 0,t.createVariableDeclarationList([n]));if(ew(i,e),sI(i,e),hA(i),r.push(i),Bv(e,32)){const n=Bv(e,2048)?t.createExportDefault(t.getLocalName(e)):t.createExternalModuleExport(t.getLocalName(e));ew(n,i),r.push(n)}return Ne(r)}(n);case 231:return function(e){return A(e)}(n);case 169:return function(e){return e.dotDotDotToken?void 0:Eu(e.name)?ew(sI(t.createParameterDeclaration(void 0,void 0,t.getGeneratedNameForNode(e),void 0,void 0,void 0),e),e):e.initializer?ew(sI(t.createParameterDeclaration(void 0,void 0,e.name,void 0,void 0,void 0),e),e):e}(n);case 262:return function(n){const r=m;m=void 0;const i=y(32670,65),o=HB(n.parameters,k,e),a=ge(n),s=32768&p?t.getLocalName(n):n.name;return v(i,229376,0),m=r,t.updateFunctionDeclaration(n,VB(n.modifiers,k,iu),n.asteriskToken,s,void 0,o,void 0,a)}(n);case 219:return function(n){16384&n.transformFlags&&!(16384&p)&&(p|=131072);const r=m;m=void 0;const i=y(15232,66),o=t.createFunctionExpression(void 0,void 0,void 0,void 0,HB(n.parameters,k,e),void 0,ge(n));return sI(o,n),ew(o,n),iw(o,16),v(i,0,0),m=r,o}(n);case 218:return function(n){const r=524288&Yd(n)?y(32662,69):y(32670,65),i=m;m=void 0;const o=HB(n.parameters,k,e),a=ge(n),s=32768&p?t.getLocalName(n):n.name;return v(r,229376,0),m=i,t.updateFunctionExpression(n,void 0,n.asteriskToken,s,void 0,o,void 0,a)}(n);case 260:return ve(n);case 80:return N(n);case 261:return function(n){if(7&n.flags||524288&n.transformFlags){7&n.flags&&ct();const e=VB(n.declarations,1&n.flags?ye:ve,KP),r=t.createVariableDeclarationList(e);return ew(r,n),sI(r,n),mw(r,n),524288&n.transformFlags&&(Eu(n.declarations[0].name)||Eu(De(n.declarations).name))&&lw(r,function(e){let t=-1,n=-1;for(const r of e)t=-1===t?r.pos:-1===r.pos?t:Math.min(t,r.pos),n=Math.max(n,r.end);return qb(t,n)}(e)),r}return ZB(n,k,e)}(n);case 255:return function(t){if(void 0!==m){const n=m.allowedNonLabeledJumps;m.allowedNonLabeledJumps|=2;const r=ZB(t,k,e);return m.allowedNonLabeledJumps=n,r}return ZB(t,k,e)}(n);case 269:return function(t){const n=y(7104,0),r=ZB(t,k,e);return v(n,0,0),r}(n);case 241:return function(t,n){const r=256&p?y(7104,512):y(6976,128),i=ZB(t,k,e);return v(r,0,0),i}(n);case 252:case 251:return function(n){if(m){const e=252===n.kind?2:4;if(!(n.label&&m.labels&&m.labels.get(bc(n.label))||!n.label&&m.allowedNonLabeledJumps&e)){let e;const r=n.label;r?252===n.kind?(e=`break-${r.escapedText}`,Ge(m,!0,bc(r),e)):(e=`continue-${r.escapedText}`,Ge(m,!1,bc(r),e)):252===n.kind?(m.nonLocalJumps|=2,e="break"):(m.nonLocalJumps|=4,e="continue");let i=t.createStringLiteral(e);if(m.loopOutParameters.length){const e=m.loopOutParameters;let n;for(let r=0;rEP(e)&&!!Te(e.declarationList.declarations).initializer,i=m;m=void 0;const o=VB(n.statements,C,b_);m=i;const a=F(o,r),s=F(o,(e=>!r(e))),c=ut(Te(a),EP).declarationList.declarations[0],l=fA(c.initializer);let u=lt(l,mb);!u&&uP(l)&&28===l.operatorToken.kind&&(u=lt(l.left,mb));const _=ut(u?fA(u.right):l,QE),d=ut(fA(_.expression),nP),p=d.body.statements;let f=0,g=-1;const h=[];if(u){const e=lt(p[f],NP);e&&(h.push(e),f++),h.push(p[f]),f++,h.push(t.createExpressionStatement(t.createAssignment(u.left,ut(c.name,qD))))}for(;!BP(xe(p,g));)g--;pe(h,p,f,g),g<-1&&pe(h,p,g+1);const y=lt(xe(p,g),BP);for(const e of s)BP(e)&&(null==y?void 0:y.expression)&&!qD(y.expression)?h.push(y):h.push(e);return pe(h,a,1),t.restoreOuterExpressions(e.expression,t.restoreOuterExpressions(c.initializer,t.restoreOuterExpressions(u&&u.right,t.updateCallExpression(_,t.restoreOuterExpressions(_.expression,t.updateFunctionExpression(d,void 0,void 0,void 0,void 0,d.parameters,void 0,t.updateBlock(d.body,h))),void 0,_.arguments))))}(n);const r=fA(n.expression);return 108===r.kind||um(r)||Q(n.arguments,fP)?function(n,r){if(32768&n.transformFlags||108===n.expression.kind||um(fA(n.expression))){const{target:e,thisArg:r}=t.createCallBinding(n.expression,a);let i;if(108===n.expression.kind&&iw(r,8),i=32768&n.transformFlags?t.createFunctionApplyCall(xn.checkDefined(qB(e,w,Xu)),108===n.expression.kind?r:xn.checkDefined(qB(r,k,Xu)),tt(n.arguments,!0,!1,!1)):sI(t.createFunctionCallCall(xn.checkDefined(qB(e,w,Xu)),108===n.expression.kind?r:xn.checkDefined(qB(r,k,Xu)),VB(n.arguments,k,Xu)),n),108===n.expression.kind){const e=t.createLogicalOr(i,Y());i=t.createAssignment(P(),e)}return ew(i,n)}return lf(n)&&(p|=131072),ZB(n,k,e)}(n):t.updateCallExpression(n,xn.checkDefined(qB(n.expression,w,Xu)),void 0,VB(n.arguments,k,Xu))}(n);case 214:return function(n){if(Q(n.arguments,fP)){const{target:e,thisArg:r}=t.createCallBinding(t.createPropertyAccessExpression(n.expression,"bind"),a);return t.createNewExpression(t.createFunctionApplyCall(xn.checkDefined(qB(e,k,Xu)),r,tt(t.createNodeArray([t.createVoidZero(),...n.arguments]),!0,!1,!1)),void 0,[])}return ZB(n,k,e)}(n);case 217:return function(t,n){return ZB(t,n?T:k,e)}(n,r);case 226:return he(n,r);case 355:return function(n,r){if(r)return ZB(n,T,e);let i;for(let e=0;e0&&e.push(t.createStringLiteral(r.literal.text)),n=t.createCallExpression(t.createPropertyAccessExpression(n,"concat"),void 0,e)}return sI(n,e)}(n);case 230:return function(e){return qB(e.expression,k,Xu)}(n);case 108:return st(n,!1);case 110:return function(e){return p|=65536,2&p&&!(16384&p)&&(p|=131072),m?2&p?(m.containsLexicalThis=!0,e):m.thisName||(m.thisName=t.createUniqueName("this")):e}(n);case 236:return function(e){return 105===e.keywordToken&&"target"===e.name.escapedText?(p|=32768,t.createUniqueName("_newTarget",48)):e}(n);case 174:return function(e){xn.assert(!oE(e.name));const n=me(e,Ub(e,-1),void 0,void 0);return iw(n,1024|Yd(n)),sI(t.createPropertyAssignment(e.name,n),e)}(n);case 177:case 178:return function(n){xn.assert(!oE(n.name));const r=m;m=void 0;const i=y(32670,65);let o;const a=HB(n.parameters,k,e),s=ge(n);return o=177===n.kind?t.updateGetAccessorDeclaration(n,n.modifiers,n.name,a,n.type,s):t.updateSetAccessorDeclaration(n,n.modifiers,n.name,a,s),v(i,229376,0),m=r,o}(n);case 243:return function(n){const r=y(0,Bv(n,32)?32:0);let i;if(m&&0==(7&n.declarationList.flags)&&!function(e){return 1===e.declarationList.declarations.length&&!!e.declarationList.declarations[0].initializer&&!!(1&Zd(e.declarationList.declarations[0].initializer))}(n)){let r;for(const i of n.declarationList.declarations)if(Ve(m,i),i.initializer){let n;Eu(i.name)?n=iz(i,k,e,0):(n=t.createBinaryExpression(i.name,64,xn.checkDefined(qB(i.initializer,k,Xu))),sI(n,i)),r=ue(r,n)}i=r?sI(t.createExpressionStatement(t.inlineExpressions(r)),n):void 0}else i=ZB(n,k,e);return v(r,0,0),i}(n);case 253:return function(n){return m?(m.nonLocalJumps|=8,b(n)&&(n=E(n)),t.createReturnStatement(t.createObjectLiteralExpression([t.createPropertyAssignment(t.createIdentifier("value"),n.expression?xn.checkDefined(qB(n.expression,k,Xu)):t.createVoidZero())]))):b(n)?E(n):ZB(n,k,e)}(n);default:return ZB(n,k,e)}}function E(e){return ew(t.createReturnStatement(P()),e)}function P(){return t.createUniqueName("_this",48)}function N(e){return m&&c.isArgumentsLocalBinding(e)?m.argumentsName||(m.argumentsName=t.createUniqueName("arguments")):256&e.flags?ew(sI(t.createIdentifier(vc(e.escapedText)),e),e):e}function A(a){a.name&&ct();const s=kh(a),c=t.createFunctionExpression(void 0,void 0,void 0,void 0,s?[t.createParameterDeclaration(void 0,void 0,at())]:[],void 0,function(a,s){const c=[],l=t.getInternalName(a),u=jh(l)?t.getGeneratedNameForNode(l):l;r(),function(e,r,i){i&&e.push(sI(t.createExpressionStatement(n().createExtendsHelper(t.getInternalName(r))),i))}(c,a,s),function(n,r,a,s){const c=m;m=void 0;const l=y(32662,73),u=pv(r),_=function(e,t){if(!e||!t)return!1;if(Q(e.parameters))return!1;const n=Se(e.body.statements);if(!n||!ly(n)||244!==n.kind)return!1;const r=n.expression;if(!ly(r)||213!==r.kind)return!1;const i=r.expression;if(!ly(i)||108!==i.kind)return!1;const o=Ee(r.arguments);if(!o||!ly(o)||230!==o.kind)return!1;const a=o.expression;return qD(a)&&"arguments"===a.escapedText}(u,void 0!==s),d=t.createFunctionDeclaration(void 0,void 0,a,void 0,function(t,n){return HB(t&&!n?t.parameters:void 0,k,e)||[]}(u,_),void 0,function(e,n,r,a){const s=!!r&&106!==fA(r.expression).kind;if(!e)return function(e,n){const r=[];i(),t.mergeLexicalEnvironment(r,o()),n&&r.push(t.createReturnStatement(t.createLogicalOr(t.createLogicalAnd(t.createStrictInequality(at(),t.createNull()),t.createFunctionApplyCall(at(),Y(),t.createIdentifier("arguments"))),Y())));const a=t.createNodeArray(r);sI(a,e.members);const s=t.createBlock(a,!0);return sI(s,e),iw(s,3072),s}(n,s);const c=[],l=[];i();const u=t.copyStandardPrologue(e.body.statements,c,0);(a||M(e.body))&&(p|=8192),pe(l,VB(e.body.statements,k,b_,u));const _=s||8192&p;te(c,e),ie(c,e,a),ce(c,e),_?ae(c,e,Y()):oe(c,e),t.mergeLexicalEnvironment(c,o()),_&&!X(e.body)&&l.push(t.createReturnStatement(P()));const d=t.createBlock(sI(t.createNodeArray([...c,...l]),e.body.statements),!0);return sI(d,e.body),function(e,n,r){const i=e;return e=function(e){for(let n=0;n0;n--){const i=e.statements[n];if(BP(i)&&i.expression&&L(i.expression)){const i=e.statements[n-1];let o;if(NP(i)&&U(fA(i.expression)))o=i.expression;else if(r&&B(i)){const e=i.declarationList.declarations[0];K(fA(e.initializer))&&(o=t.createAssignment(P(),e.initializer))}if(!o)break;const a=t.createReturnStatement(o);ew(a,i),sI(a,i);const s=t.createNodeArray([...e.statements.slice(0,n-1),a,...e.statements.slice(n+1)]);return sI(s,e.statements),t.updateBlock(e,s)}}return e}(e,n),e!==i&&(e=function(e,n){if(16384&n.transformFlags||65536&p||131072&p)return e;for(const t of n.statements)if(134217728&t.transformFlags&&!RJ(t))return e;return t.updateBlock(e,VB(e.statements,W,b_))}(e,n)),r&&(e=function(e){return t.updateBlock(e,VB(e.statements,H,b_))}(e)),e}(d,e.body,a)}(u,r,s,_));sI(d,u||r),s&&iw(d,16),n.push(d),v(l,229376,0),m=c}(c,a,u,s),function(e,t){for(const n of t.members)switch(n.kind){case 240:e.push(le(n));break;case 174:e.push(_e(_t(t,n),n,t));break;case 177:case 178:const r=Sv(t.members,n);n===r.firstAccessor&&e.push(de(_t(t,n),r,t));break;case 176:case 175:break;default:xn.failBadSyntaxKind(n,_&&_.fileName)}}(c,a);const f=Gb(as(d,a.members.end),20),g=t.createPartiallyEmittedExpression(u);NT(g,f.end),iw(g,3072);const h=t.createReturnStatement(g);PT(h,f.pos),iw(h,3840),c.push(h),jd(c,o());const b=t.createBlock(sI(t.createNodeArray(c),a.members),!0);return iw(b,3072),b}(a,s));iw(c,131072&Yd(a)|1048576);const l=t.createPartiallyEmittedExpression(c);NT(l,a.end),iw(l,3072);const u=t.createPartiallyEmittedExpression(l);NT(u,as(d,a.pos)),iw(u,3072);const f=t.createParenthesizedExpression(t.createCallExpression(u,void 0,s?[xn.checkDefined(qB(s.expression,k,Xu))]:[]));return yw(f,3,"* @class "),f}function I(e){return EP(e)&&x(e.declarationList.declarations,(e=>qD(e.name)&&!e.initializer))}function M(e){if(lf(e))return!0;if(!(134217728&e.transformFlags))return!1;switch(e.kind){case 219:case 218:case 262:case 176:case 175:return!1;case 177:case 178:case 174:case 172:{const t=e;return!!oE(t.name)&&!!LI(t.name,M)}}return!!LI(e,M)}function L(e){return Xl(e)&&"_this"===bc(e)}function R(e){return Xl(e)&&"_super"===bc(e)}function B(e){return EP(e)&&1===e.declarationList.declarations.length&&function(e){return KP(e)&&L(e.name)&&!!e.initializer}(e.declarationList.declarations[0])}function J(e){return mb(e,!0)&&L(e.left)}function z(e){return QE(e)&&GE(e.expression)&&R(e.expression.expression)&&qD(e.expression.name)&&("call"===bc(e.expression.name)||"apply"===bc(e.expression.name))&&e.arguments.length>=1&&110===e.arguments[0].kind}function $(e){return uP(e)&&57===e.operatorToken.kind&&110===e.right.kind&&z(e.left)}function q(e){return uP(e)&&56===e.operatorToken.kind&&uP(e.left)&&38===e.left.operatorToken.kind&&R(e.left.left)&&106===e.left.right.kind&&z(e.right)&&"apply"===bc(e.right.expression.name)}function V(e){return uP(e)&&57===e.operatorToken.kind&&110===e.right.kind&&q(e.left)}function U(e){return J(e)&&$(e.right)}function K(e){return z(e)||$(e)||U(e)||q(e)||V(e)||function(e){return J(e)&&V(e.right)}(e)}function W(e){if(B(e)){if(110===e.declarationList.declarations[0].initializer.kind)return}else if(J(e))return t.createPartiallyEmittedExpression(e.right,e);switch(e.kind){case 219:case 218:case 262:case 176:case 175:return e;case 177:case 178:case 174:case 172:{const n=e;return oE(n.name)?t.replacePropertyName(n,ZB(n.name,W,void 0)):e}}return ZB(e,W,void 0)}function H(e){if(z(e)&&2===e.arguments.length&&qD(e.arguments[1])&&"arguments"===bc(e.arguments[1]))return t.createLogicalAnd(t.createStrictInequality(at(),t.createNull()),e);switch(e.kind){case 219:case 218:case 262:case 176:case 175:return e;case 177:case 178:case 174:case 172:{const n=e;return oE(n.name)?t.replacePropertyName(n,ZB(n.name,H,void 0)):e}}return ZB(e,H,void 0)}function X(e){if(253===e.kind)return!0;if(245===e.kind){const t=e;if(t.elseStatement)return X(t.thenStatement)&&X(t.elseStatement)}else if(241===e.kind){const t=we(e.statements);if(t&&X(t))return!0}return!1}function Y(){return iw(t.createThis(),8)}function ee(e){return void 0!==e.initializer||Eu(e.name)}function te(e,t){if(!Q(t.parameters,ee))return!1;let n=!1;for(const r of t.parameters){const{name:t,initializer:i,dotDotDotToken:o}=r;o||(Eu(t)?n=ne(e,r,t,i)||n:i&&(re(e,r,t,i),n=!0))}return n}function ne(n,r,i,o){return i.elements.length>0?(Jd(n,iw(t.createVariableStatement(void 0,t.createVariableDeclarationList(sz(r,k,e,0,t.getGeneratedNameForNode(r)))),2097152)),!0):!!o&&(Jd(n,iw(t.createExpressionStatement(t.createAssignment(t.getGeneratedNameForNode(r),xn.checkDefined(qB(o,k,Xu)))),2097152)),!0)}function re(e,n,r,i){i=xn.checkDefined(qB(i,k,Xu));const o=t.createIfStatement(t.createTypeCheck(t.cloneNode(r),"undefined"),iw(sI(t.createBlock([t.createExpressionStatement(iw(sI(t.createAssignment(iw(OT(sI(t.cloneNode(r),r),r.parent),96),iw(i,3168|Yd(i))),n),3072))]),n),3905));hA(o),sI(o,n),iw(o,2101056),Jd(e,o)}function ie(n,r,i){const o=[],a=we(r.parameters);if(!function(e,t){return!(!e||!e.dotDotDotToken||t)}(a,i))return!1;const s=80===a.name.kind?OT(sI(t.cloneNode(a.name),a.name),a.name.parent):t.createTempVariable(void 0);iw(s,96);const c=80===a.name.kind?t.cloneNode(a.name):s,l=r.parameters.length-1,u=t.createLoopVariable();o.push(iw(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(s,void 0,void 0,t.createArrayLiteralExpression([]))])),a),2097152));const _=t.createForStatement(sI(t.createVariableDeclarationList([t.createVariableDeclaration(u,void 0,void 0,t.createNumericLiteral(l))]),a),sI(t.createLessThan(u,t.createPropertyAccessExpression(t.createIdentifier("arguments"),"length")),a),sI(t.createPostfixIncrement(u),a),t.createBlock([hA(sI(t.createExpressionStatement(t.createAssignment(t.createElementAccessExpression(c,0===l?u:t.createSubtract(u,t.createNumericLiteral(l))),t.createElementAccessExpression(t.createIdentifier("arguments"),u))),a))]));return iw(_,2097152),hA(_),o.push(_),80!==a.name.kind&&o.push(iw(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList(sz(a,k,e,0,c))),a),2097152)),Rd(n,o),!0}function oe(e,n){return!!(131072&p&&219!==n.kind)&&(ae(e,n,t.createThis()),!0)}function ae(n,r,i){0==(1&g)&&(g|=1,e.enableSubstitution(110),e.enableEmitNotification(176),e.enableEmitNotification(174),e.enableEmitNotification(177),e.enableEmitNotification(178),e.enableEmitNotification(219),e.enableEmitNotification(218),e.enableEmitNotification(262));const o=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(P(),void 0,void 0,i)]));iw(o,2100224),lw(o,r),Jd(n,o)}function ce(e,n){if(32768&p){let r;switch(n.kind){case 219:return e;case 174:case 177:case 178:r=t.createVoidZero();break;case 176:r=t.createPropertyAccessExpression(iw(t.createThis(),8),"constructor");break;case 262:case 218:r=t.createConditionalExpression(t.createLogicalAnd(iw(t.createThis(),8),t.createBinaryExpression(iw(t.createThis(),8),104,t.getLocalName(n))),void 0,t.createPropertyAccessExpression(iw(t.createThis(),8),"constructor"),void 0,t.createVoidZero());break;default:return xn.failBadSyntaxKind(n)}const i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createUniqueName("_newTarget",48),void 0,void 0,r)]));iw(i,2100224),Jd(e,i)}return e}function le(e){return sI(t.createEmptyStatement(),e)}function _e(n,r,i){const o=fw(r),a=cw(r),s=me(r,r,void 0,i),c=qB(r.name,k,au);let l;if(xn.assert(c),!VD(c)&&zS(e.getCompilerOptions())){const e=oE(c)?c.expression:qD(c)?t.createStringLiteral(vc(c.escapedText)):c;l=t.createObjectDefinePropertyCall(n,e,t.createPropertyDescriptor({value:s,enumerable:!1,writable:!0,configurable:!0}))}else{const e=UF(t,n,c,r.name);l=t.createAssignment(e,s)}iw(s,3072),lw(s,a);const u=sI(t.createExpressionStatement(l),r);return ew(u,r),mw(u,o),iw(u,96),u}function de(e,n,r){const i=t.createExpressionStatement(fe(e,n,r,!1));return iw(i,3072),lw(i,cw(n.firstAccessor)),i}function fe(e,{firstAccessor:n,getAccessor:r,setAccessor:i},o,a){const s=OT(sI(t.cloneNode(e),e),e.parent);iw(s,3136),lw(s,n.name);const c=qB(n.name,k,au);if(xn.assert(c),VD(c))return xn.failBadSyntaxKind(c,"Encountered unhandled private identifier while transforming ES2015.");const l=eA(t,c);iw(l,3104),lw(l,n.name);const u=[];if(r){const e=me(r,void 0,void 0,o);lw(e,cw(r)),iw(e,1024);const n=t.createPropertyAssignment("get",e);mw(n,fw(r)),u.push(n)}if(i){const e=me(i,void 0,void 0,o);lw(e,cw(i)),iw(e,1024);const n=t.createPropertyAssignment("set",e);mw(n,fw(i)),u.push(n)}u.push(t.createPropertyAssignment("enumerable",r||i?t.createFalse():t.createTrue()),t.createPropertyAssignment("configurable",t.createTrue()));const _=t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[s,l,t.createObjectLiteralExpression(u,!0)]);return a&&hA(_),_}function me(n,r,i,o){const a=m;m=void 0;const s=o&&gu(o)&&!Jv(n)?y(32670,73):y(32670,65),c=HB(n.parameters,k,e),l=ge(n);return 32768&p&&!i&&(262===n.kind||218===n.kind)&&(i=t.getGeneratedNameForNode(n)),v(s,229376,0),m=a,ew(sI(t.createFunctionExpression(void 0,n.asteriskToken,i,void 0,c,void 0,l),r),n)}function ge(e){let n,r,a=!1,s=!1;const c=[],l=[],u=e.body;let d;if(i(),DP(u)&&(d=t.copyStandardPrologue(u.statements,c,0,!1),d=t.copyCustomPrologue(u.statements,l,d,k,mf),d=t.copyCustomPrologue(u.statements,l,d,k,hf)),a=te(l,e)||a,a=ie(l,e,!1)||a,DP(u))d=t.copyCustomPrologue(u.statements,l,d,k),n=u.statements,pe(l,VB(u.statements,k,b_,d)),!a&&u.multiLine&&(a=!0);else{xn.assert(219===e.kind),n=Vb(u,-1);const i=e.equalsGreaterThanToken;ly(i)||ly(u)||(ex(i,u,_)?s=!0:a=!0);const o=qB(u,k,Xu),c=t.createReturnStatement(o);sI(c,u),Sw(c,u),iw(c,2880),l.push(c),r=u}if(t.mergeLexicalEnvironment(c,o()),ce(c,e),oe(c,e),Q(c)&&(a=!0),l.unshift(...c),DP(u)&&se(l,u.statements))return u;const p=t.createBlock(sI(t.createNodeArray(l),n),a);return sI(p,e.body),!a&&s&&iw(p,1),r&&_w(p,20,r),ew(p,e.body),p}function he(n,r){return hb(n)?iz(n,k,e,0,!r):28===n.operatorToken.kind?t.updateBinaryExpression(n,xn.checkDefined(qB(n.left,T,Xu)),n.operatorToken,xn.checkDefined(qB(n.right,r?T:k,Xu))):ZB(n,k,e)}function ye(n){return Eu(n.name)?ve(n):!n.initializer&&function(e){const t=c.hasNodeCheckFlag(e,16384),n=c.hasNodeCheckFlag(e,32768);return!(0!=(64&p)||t&&n&&0!=(512&p))&&0==(4096&p)&&(!c.isDeclarationWithCollidingName(e)||n&&!t&&0==(6144&p))}(n)?t.updateVariableDeclaration(n,n.name,void 0,void 0,t.createVoidZero()):ZB(n,k,e)}function ve(t){const n=y(32,0);let r;return r=Eu(t.name)?sz(t,k,e,0,void 0,0!=(32&n)):ZB(t,k,e),v(n,0,0),r}function be(e){m.labels.set(bc(e.label),!0)}function ke(e){m.labels.set(bc(e.label),!1)}function Ce(n,i,a,s,c){const l=y(n,i),u=function(n,i,a,s){if(!$e(n)){let r;m&&(r=m.allowedNonLabeledJumps,m.allowedNonLabeledJumps=6);const o=s?s(n,i,void 0,a):t.restoreEnclosingLabel(OP(n)?function(e){return t.updateForStatement(e,qB(e.initializer,T,s_),qB(e.condition,k,Xu),qB(e.incrementor,T,Xu),xn.checkDefined(qB(e.statement,k,b_,t.liftToBlock)))}(n):ZB(n,k,e),i,m&&ke);return m&&(m.allowedNonLabeledJumps=r),o}const c=function(e){let t;switch(e.kind){case 248:case 249:case 250:const n=e.initializer;n&&261===n.kind&&(t=n)}const n=[],r=[];if(t&&7&uc(t)){const i=Be(e)||Je(e)||ze(e);for(const o of t.declarations)Qe(e,o,n,r,i)}const i={loopParameters:n,loopOutParameters:r};return m&&(m.argumentsName&&(i.argumentsName=m.argumentsName),m.thisName&&(i.thisName=m.thisName),m.hoistedLocalVariables&&(i.hoistedLocalVariables=m.hoistedLocalVariables)),i}(n),l=[],u=m;m=c;const _=Be(n)?function(e,n){const r=t.createUniqueName("_loop_init"),i=0!=(1048576&e.initializer.transformFlags);let o=0;n.containsLexicalThis&&(o|=16),i&&4&p&&(o|=524288);const a=[];a.push(t.createVariableStatement(void 0,e.initializer)),He(n.loopOutParameters,2,1,a);return{functionName:r,containsYield:i,functionDeclaration:t.createVariableStatement(void 0,iw(t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,iw(t.createFunctionExpression(void 0,i?t.createToken(42):void 0,void 0,void 0,void 0,void 0,xn.checkDefined(qB(t.createBlock(a,!0),k,DP))),o))]),4194304)),part:t.createVariableDeclarationList(O(n.loopOutParameters,Ke))}}(n,c):void 0,d=qe(n)?function(e,n,i){const a=t.createUniqueName("_loop");r();const s=qB(e.statement,k,b_,t.liftToBlock),c=o(),l=[];(Je(e)||ze(e))&&(n.conditionVariable=t.createUniqueName("inc"),e.incrementor?l.push(t.createIfStatement(n.conditionVariable,t.createExpressionStatement(xn.checkDefined(qB(e.incrementor,k,Xu))),t.createExpressionStatement(t.createAssignment(n.conditionVariable,t.createTrue())))):l.push(t.createIfStatement(t.createLogicalNot(n.conditionVariable),t.createExpressionStatement(t.createAssignment(n.conditionVariable,t.createTrue())))),Je(e)&&l.push(t.createIfStatement(t.createPrefixUnaryExpression(54,xn.checkDefined(qB(e.condition,k,Xu))),xn.checkDefined(qB(t.createBreakStatement(),k,b_))))),xn.assert(s),DP(s)?pe(l,s.statements):l.push(s),He(n.loopOutParameters,1,1,l),jd(l,c);const u=t.createBlock(l,!0);DP(s)&&ew(u,s);const _=0!=(1048576&e.statement.transformFlags);let d=1048576;n.containsLexicalThis&&(d|=16),_&&0!=(4&p)&&(d|=524288);const f=t.createVariableStatement(void 0,iw(t.createVariableDeclarationList([t.createVariableDeclaration(a,void 0,void 0,iw(t.createFunctionExpression(void 0,_?t.createToken(42):void 0,void 0,void 0,n.loopParameters,void 0,u),d))]),4194304)),m=function(e,n,r,i){const o=[],a=!(-5&n.nonLocalJumps||n.labeledNonLocalBreaks||n.labeledNonLocalContinues),s=t.createCallExpression(e,void 0,O(n.loopParameters,(e=>e.name))),c=i?t.createYieldExpression(t.createToken(42),iw(s,8388608)):s;if(a)o.push(t.createExpressionStatement(c)),He(n.loopOutParameters,1,0,o);else{const e=t.createUniqueName("state"),i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(e,void 0,void 0,c)]));if(o.push(i),He(n.loopOutParameters,1,0,o),8&n.nonLocalJumps){let n;r?(r.nonLocalJumps|=8,n=t.createReturnStatement(e)):n=t.createReturnStatement(t.createPropertyAccessExpression(e,"value")),o.push(t.createIfStatement(t.createTypeCheck(e,"object"),n))}if(2&n.nonLocalJumps&&o.push(t.createIfStatement(t.createStrictEquality(e,t.createStringLiteral("break")),t.createBreakStatement())),n.labeledNonLocalBreaks||n.labeledNonLocalContinues){const i=[];Xe(n.labeledNonLocalBreaks,!0,e,r,i),Xe(n.labeledNonLocalContinues,!1,e,r,i),o.push(t.createSwitchStatement(e,t.createCaseBlock(i)))}}return o}(a,n,i,_);return{functionName:a,containsYield:_,functionDeclaration:f,part:m}}(n,c,u):void 0;let f;if(m=u,_&&l.push(_.functionDeclaration),d&&l.push(d.functionDeclaration),function(e,n,r){let i;if(n.argumentsName&&(r?r.argumentsName=n.argumentsName:(i||(i=[])).push(t.createVariableDeclaration(n.argumentsName,void 0,void 0,t.createIdentifier("arguments")))),n.thisName&&(r?r.thisName=n.thisName:(i||(i=[])).push(t.createVariableDeclaration(n.thisName,void 0,void 0,t.createIdentifier("this")))),n.hoistedLocalVariables)if(r)r.hoistedLocalVariables=n.hoistedLocalVariables;else{i||(i=[]);for(const e of n.hoistedLocalVariables)i.push(t.createVariableDeclaration(e))}if(n.loopOutParameters.length){i||(i=[]);for(const e of n.loopOutParameters)i.push(t.createVariableDeclaration(e.outParamName))}n.conditionVariable&&(i||(i=[]),i.push(t.createVariableDeclaration(n.conditionVariable,void 0,void 0,t.createFalse()))),i&&e.push(t.createVariableStatement(void 0,t.createVariableDeclarationList(i)))}(l,c,u),_&&l.push(function(e,n){const r=t.createCallExpression(e,void 0,[]),i=n?t.createYieldExpression(t.createToken(42),iw(r,8388608)):r;return t.createExpressionStatement(i)}(_.functionName,_.containsYield)),d)if(s)f=s(n,i,d.part,a);else{const e=Ue(n,_,t.createBlock(d.part,!0));f=t.restoreEnclosingLabel(e,i,m&&ke)}else{const e=Ue(n,_,xn.checkDefined(qB(n.statement,k,b_,t.liftToBlock)));f=t.restoreEnclosingLabel(e,i,m&&ke)}return l.push(f),l}(a,s,l,c);return v(l,0,0),u}function Pe(e,t){return Ce(0,1280,e,t)}function Fe(e,t){return Ce(5056,3328,e,t)}function Ae(e,t){return Ce(3008,5376,e,t)}function Ie(e,t){return Ce(3008,5376,e,t,s.downlevelIteration?je:Le)}function Oe(n,r,i){const o=[],a=n.initializer;if(WP(a)){7&n.initializer.flags&&ct();const i=Se(a.declarations);if(i&&Eu(i.name)){const a=sz(i,k,e,0,r),s=sI(t.createVariableDeclarationList(a),n.initializer);ew(s,n.initializer),lw(s,qb(a[0].pos,De(a).end)),o.push(t.createVariableStatement(void 0,s))}else o.push(sI(t.createVariableStatement(void 0,ew(sI(t.createVariableDeclarationList([t.createVariableDeclaration(i?i.name:t.createTempVariable(void 0),void 0,void 0,r)]),Ub(a,-1)),a)),Vb(a,-1)))}else{const e=t.createAssignment(a,r);hb(e)?o.push(t.createExpressionStatement(he(e,!0))):(NT(e,a.end),o.push(sI(t.createExpressionStatement(xn.checkDefined(qB(e,k,Xu))),Vb(a,-1))))}if(i)return Me(pe(o,i));{const e=qB(n.statement,k,b_,t.liftToBlock);return xn.assert(e),DP(e)?t.updateBlock(e,sI(t.createNodeArray(Z(o,e.statements)),e.statements)):(o.push(e),Me(o))}}function Me(e){return iw(t.createBlock(t.createNodeArray(e),!0),864)}function Le(e,n,r){const i=qB(e.expression,k,Xu);xn.assert(i);const o=t.createLoopVariable(),a=qD(i)?t.getGeneratedNameForNode(i):t.createTempVariable(void 0);iw(i,96|Yd(i));const s=sI(t.createForStatement(iw(sI(t.createVariableDeclarationList([sI(t.createVariableDeclaration(o,void 0,void 0,t.createNumericLiteral(0)),Ub(e.expression,-1)),sI(t.createVariableDeclaration(a,void 0,void 0,i),e.expression)]),e.expression),4194304),sI(t.createLessThan(o,t.createPropertyAccessExpression(a,"length")),e.expression),sI(t.createPostfixIncrement(o),e.expression),Oe(e,t.createElementAccessExpression(a,o),r)),e);return iw(s,512),sI(s,e),t.restoreEnclosingLabel(s,n,m&&ke)}function je(e,r,i,o){const s=qB(e.expression,k,Xu);xn.assert(s);const c=qD(s)?t.getGeneratedNameForNode(s):t.createTempVariable(void 0),l=qD(s)?t.getGeneratedNameForNode(c):t.createTempVariable(void 0),u=t.createUniqueName("e"),_=t.getGeneratedNameForNode(u),d=t.createTempVariable(void 0),p=sI(n().createValuesHelper(s),e.expression),f=t.createCallExpression(t.createPropertyAccessExpression(c,"next"),void 0,[]);a(u),a(d);const g=1024&o?t.inlineExpressions([t.createAssignment(u,t.createVoidZero()),p]):p,h=iw(sI(t.createForStatement(iw(sI(t.createVariableDeclarationList([sI(t.createVariableDeclaration(c,void 0,void 0,g),e.expression),t.createVariableDeclaration(l,void 0,void 0,f)]),e.expression),4194304),t.createLogicalNot(t.createPropertyAccessExpression(l,"done")),t.createAssignment(l,f),Oe(e,t.createPropertyAccessExpression(l,"value"),i)),e),512);return t.createTryStatement(t.createBlock([t.restoreEnclosingLabel(h,r,m&&ke)]),t.createCatchClause(t.createVariableDeclaration(_),iw(t.createBlock([t.createExpressionStatement(t.createAssignment(u,t.createObjectLiteralExpression([t.createPropertyAssignment("error",_)])))]),1)),t.createBlock([t.createTryStatement(t.createBlock([iw(t.createIfStatement(t.createLogicalAnd(t.createLogicalAnd(l,t.createLogicalNot(t.createPropertyAccessExpression(l,"done"))),t.createAssignment(d,t.createPropertyAccessExpression(c,"return"))),t.createExpressionStatement(t.createFunctionCallCall(d,c,[]))),1)]),void 0,iw(t.createBlock([iw(t.createIfStatement(u,t.createThrowStatement(t.createPropertyAccessExpression(u,"error"))),1)]),1))]))}function Re(e){return c.hasNodeCheckFlag(e,8192)}function Be(e){return OP(e)&&!!e.initializer&&Re(e.initializer)}function Je(e){return OP(e)&&!!e.condition&&Re(e.condition)}function ze(e){return OP(e)&&!!e.incrementor&&Re(e.incrementor)}function $e(e){return qe(e)||Be(e)}function qe(e){return c.hasNodeCheckFlag(e,4096)}function Ve(e,t){e.hoistedLocalVariables||(e.hoistedLocalVariables=[]),function t(n){if(80===n.kind)e.hoistedLocalVariables.push(n);else for(const e of n.elements)gP(e)||t(e.name)}(t.name)}function Ue(e,n,r){switch(e.kind){case 248:return function(e,n,r){const i=e.condition&&Re(e.condition),o=i||e.incrementor&&Re(e.incrementor);return t.updateForStatement(e,qB(n?n.part:e.initializer,T,s_),qB(i?void 0:e.condition,k,Xu),qB(o?void 0:e.incrementor,T,Xu),r)}(e,n,r);case 249:return function(e,n){return t.updateForInStatement(e,xn.checkDefined(qB(e.initializer,k,s_)),xn.checkDefined(qB(e.expression,k,Xu)),n)}(e,r);case 250:return function(e,n){return t.updateForOfStatement(e,void 0,xn.checkDefined(qB(e.initializer,k,s_)),xn.checkDefined(qB(e.expression,k,Xu)),n)}(e,r);case 246:return function(e,n){return t.updateDoStatement(e,n,xn.checkDefined(qB(e.expression,k,Xu)))}(e,r);case 247:return function(e,n){return t.updateWhileStatement(e,xn.checkDefined(qB(e.expression,k,Xu)),n)}(e,r);default:return xn.failBadSyntaxKind(e,"IterationStatement expected")}}function Ke(e){return t.createVariableDeclaration(e.originalName,void 0,void 0,e.outParamName)}function We(e,n){const r=0===n?e.outParamName:e.originalName,i=0===n?e.originalName:e.outParamName;return t.createBinaryExpression(i,64,r)}function He(e,n,r,i){for(const o of e)o.flags&n&&i.push(t.createExpressionStatement(We(o,r)))}function Ge(e,t,n,r){t?(e.labeledNonLocalBreaks||(e.labeledNonLocalBreaks=new Map),e.labeledNonLocalBreaks.set(n,r)):(e.labeledNonLocalContinues||(e.labeledNonLocalContinues=new Map),e.labeledNonLocalContinues.set(n,r))}function Xe(e,n,r,i,o){e&&e.forEach(((e,a)=>{const s=[];if(!i||i.labels&&i.labels.get(a)){const e=t.createIdentifier(a);s.push(n?t.createBreakStatement(e):t.createContinueStatement(e))}else Ge(i,n,a,e),s.push(t.createReturnStatement(r));o.push(t.createCaseClause(t.createStringLiteral(e),s))}))}function Qe(e,n,r,i,o){const a=n.name;if(Eu(a))for(const t of a.elements)gP(t)||Qe(e,t,r,i,o);else{r.push(t.createParameterDeclaration(void 0,void 0,a));const s=c.hasNodeCheckFlag(n,65536);if(s||o){const r=t.createUniqueName("out_"+bc(a));let o=0;s&&(o|=1),OP(e)&&(e.initializer&&c.isBindingCapturedByNode(e.initializer,n)&&(o|=2),(e.condition&&c.isBindingCapturedByNode(e.condition,n)||e.incrementor&&c.isBindingCapturedByNode(e.incrementor,n))&&(o|=1)),i.push({flags:o,originalName:a,outParamName:r})}}}function Ye(e,n,r){const i=t.createAssignment(UF(t,n,xn.checkDefined(qB(e.name,k,au))),xn.checkDefined(qB(e.initializer,k,Xu)));return sI(i,e),r&&hA(i),i}function Ze(e,n,r){const i=t.createAssignment(UF(t,n,xn.checkDefined(qB(e.name,k,au))),t.cloneNode(e.name));return sI(i,e),r&&hA(i),i}function et(e,n,r,i){const o=t.createAssignment(UF(t,n,xn.checkDefined(qB(e.name,k,au))),me(e,e,void 0,r));return sI(o,e),i&&hA(o),o}function tt(e,r,i,o){const a=e.length,c=j(G(e,nt,((e,t,n,r)=>t(e,i,o&&r===a))));if(1===c.length){const e=c[0];if(r&&!s.downlevelIteration||RT(e.expression)||kD(e.expression,"___spreadArray"))return e.expression}const l=n(),u=0!==c[0].kind;let _=u?t.createArrayLiteralExpression():c[0].expression;for(let e=u?0:1;e0?t.inlineExpressions(O(i,G)):void 0,qB(n.condition,R,Xu),qB(n.incrementor,R,Xu),QB(n.statement,R,e))}else n=ZB(n,R,e);return m&&ce(),n}(r);case 249:return function(n){m&&ae();const r=n.initializer;if(WP(r)){for(const e of r.declarations)a(e.name);n=t.updateForInStatement(n,r.declarations[0].name,xn.checkDefined(qB(n.expression,R,Xu)),xn.checkDefined(qB(n.statement,R,b_,t.liftToBlock)))}else n=ZB(n,R,e);return m&&ce(),n}(r);case 252:return function(t){if(m){const e=me(t.label&&bc(t.label));if(e>0)return ve(e,t)}return ZB(t,R,e)}(r);case 251:return function(t){if(m){const e=ge(t.label&&bc(t.label));if(e>0)return ve(e,t)}return ZB(t,R,e)}(r);case 253:return function(e){return function(e,n){return sI(t.createReturnStatement(t.createArrayLiteralExpression(e?[ye(2),e]:[ye(2)])),n)}(qB(e.expression,R,Xu),e)}(r);default:return 1048576&r.transformFlags?function(r){switch(r.kind){case 226:return function(n){const r=dy(n);switch(r){case 0:return function(n){return X(n.right)?sb(n.operatorToken.kind)?function(e){const t=ee(),n=Z();return Se(n,xn.checkDefined(qB(e.left,R,Xu)),e.left),56===e.operatorToken.kind?Ce(t,n,e.left):Te(t,n,e.left),Se(n,xn.checkDefined(qB(e.right,R,Xu)),e.right),te(t),n}(n):28===n.operatorToken.kind?q(n):t.updateBinaryExpression(n,Y(xn.checkDefined(qB(n.left,R,Xu))),n.operatorToken,xn.checkDefined(qB(n.right,R,Xu))):ZB(n,R,e)}(n);case 1:return function(n){const{left:r,right:i}=n;if(X(i)){let e;switch(r.kind){case 211:e=t.updatePropertyAccessExpression(r,Y(xn.checkDefined(qB(r.expression,R,Vu))),r.name);break;case 212:e=t.updateElementAccessExpression(r,Y(xn.checkDefined(qB(r.expression,R,Vu))),Y(xn.checkDefined(qB(r.argumentExpression,R,Xu))));break;default:e=xn.checkDefined(qB(r,R,Xu))}const o=n.operatorToken.kind;return LJ(o)?sI(t.createAssignment(e,sI(t.createBinaryExpression(Y(e),jJ(o),xn.checkDefined(qB(i,R,Xu))),n)),n):t.updateBinaryExpression(n,e,n.operatorToken,xn.checkDefined(qB(i,R,Xu)))}return ZB(n,R,e)}(n);default:return xn.assertNever(r)}}(r);case 355:return function(e){let n=[];for(const r of e.elements)uP(r)&&28===r.operatorToken.kind?n.push(q(r)):(X(r)&&n.length>0&&(De(1,[t.createExpressionStatement(t.inlineExpressions(n))]),n=[]),n.push(xn.checkDefined(qB(r,R,Xu))));return t.inlineExpressions(n)}(r);case 227:return function(t){if(X(t.whenTrue)||X(t.whenFalse)){const e=ee(),n=ee(),r=Z();return Ce(e,xn.checkDefined(qB(t.condition,R,Xu)),t.condition),Se(r,xn.checkDefined(qB(t.whenTrue,R,Xu)),t.whenTrue),ke(n),te(e),Se(r,xn.checkDefined(qB(t.whenFalse,R,Xu)),t.whenFalse),te(n),r}return ZB(t,R,e)}(r);case 229:return function(e){const r=ee(),i=qB(e.expression,R,Xu);return e.asteriskToken?function(e,t){De(7,[e],t)}(0==(8388608&Yd(e.expression))?sI(n().createValuesHelper(i),e):i,e):function(e,t){De(6,[e],t)}(i,e),te(r),function(e){return sI(t.createCallExpression(t.createPropertyAccessExpression(C,"sent"),void 0,[]),e)}(e)}(r);case 209:return function(e){return V(e.elements,void 0,void 0,e.multiLine)}(r);case 210:return function(e){const n=e.properties,r=e.multiLine,i=Q(n),o=Z();Se(o,t.createObjectLiteralExpression(VB(n,R,Cu,0,i),r));const a=Oe(n,(function(n,i){X(i)&&n.length>0&&(xe(t.createExpressionStatement(t.inlineExpressions(n))),n=[]);const a=qB(tA(t,e,i,o),R,Xu);return a&&(r&&hA(a),n.push(a)),n}),[],i);return a.push(r?hA(OT(sI(t.cloneNode(o),o),o.parent)):o),t.inlineExpressions(a)}(r);case 212:return function(n){return X(n.argumentExpression)?t.updateElementAccessExpression(n,Y(xn.checkDefined(qB(n.expression,R,Vu))),xn.checkDefined(qB(n.argumentExpression,R,Xu))):ZB(n,R,e)}(r);case 213:return function(n){if(!uf(n)&&f(n.arguments,X)){const{target:e,thisArg:r}=t.createCallBinding(n.expression,a,c,!0);return ew(sI(t.createFunctionApplyCall(Y(xn.checkDefined(qB(e,R,Vu))),r,V(n.arguments)),n),n)}return ZB(n,R,e)}(r);case 214:return function(n){if(f(n.arguments,X)){const{target:e,thisArg:r}=t.createCallBinding(t.createPropertyAccessExpression(n.expression,"bind"),a);return ew(sI(t.createNewExpression(t.createFunctionApplyCall(Y(xn.checkDefined(qB(e,R,Xu))),r,V(n.arguments,t.createVoidZero())),void 0,[]),n),n)}return ZB(n,R,e)}(r);default:return ZB(r,R,e)}}(r):4196352&r.transformFlags?ZB(r,R,e):r}}function J(n){if(n.asteriskToken)n=ew(sI(t.createFunctionDeclaration(n.modifiers,void 0,n.name,void 0,HB(n.parameters,R,e),void 0,$(n.body)),n),n);else{const t=p,r=m;p=!1,m=!1,n=ZB(n,R,e),p=t,m=r}return p?void o(n):n}function z(n){if(n.asteriskToken)n=ew(sI(t.createFunctionExpression(void 0,void 0,n.name,void 0,HB(n.parameters,R,e),void 0,$(n.body)),n),n);else{const t=p,r=m;p=!1,m=!1,n=ZB(n,R,e),p=t,m=r}return n}function $(e){const o=[],a=p,s=m,c=g,l=h,u=y,_=v,d=b,f=x,O=M,B=S,J=k,z=T,$=C;p=!0,m=!1,g=void 0,h=void 0,y=void 0,v=void 0,b=void 0,x=void 0,M=1,S=void 0,k=void 0,T=void 0,C=t.createTempVariable(void 0),r();const q=t.copyPrologue(e.statements,o,!1,R);U(e.statements,q);const V=function(){L=0,j=0,w=void 0,D=!1,E=!1,P=void 0,N=void 0,F=void 0,A=void 0,I=void 0;const e=function(){if(S){for(let e=0;e0)),1048576))}();return jd(o,i()),o.push(t.createReturnStatement(V)),p=a,m=s,g=c,h=l,y=u,v=_,b=d,x=f,M=O,S=B,k=J,T=z,C=$,sI(t.createBlock(o,e.multiLine),e)}function q(e){let n=[];return r(e.left),r(e.right),t.inlineExpressions(n);function r(e){uP(e)&&28===e.operatorToken.kind?(r(e.left),r(e.right)):(X(e)&&n.length>0&&(De(1,[t.createExpressionStatement(t.inlineExpressions(n))]),n=[]),n.push(xn.checkDefined(qB(e,R,Xu))))}}function V(e,n,r,i){const o=Q(e);let a;if(o>0){a=Z();const r=VB(e,R,Xu,0,o);Se(a,t.createArrayLiteralExpression(n?[n,...r]:r)),n=void 0}const s=Oe(e,(function(e,r){if(X(r)&&e.length>0){const r=void 0!==a;a||(a=Z()),Se(a,r?t.createArrayConcatCall(a,[t.createArrayLiteralExpression(e,i)]):t.createArrayLiteralExpression(n?[n,...e]:e,i)),n=void 0,e=[]}return e.push(xn.checkDefined(qB(r,R,Xu))),e}),[],o);return a?t.createArrayConcatCall(a,[t.createArrayLiteralExpression(s,i)]):sI(t.createArrayLiteralExpression(n?[n,...s]:s,i),r)}function U(e,t=0){const n=e.length;for(let r=t;r0?ke(t,e):xe(e)}(n);case 252:return function(e){const t=me(e.label?bc(e.label):void 0);t>0?ke(t,e):xe(e)}(n);case 253:return function(e){!function(e,t){De(8,[e],t)}(qB(e.expression,R,Xu),e)}(n);case 254:return function(e){X(e)?(function(e){const t=ee(),n=ee();te(t),ne({kind:1,expression:e,startLabel:t,endLabel:n})}(Y(xn.checkDefined(qB(e.expression,R,Xu)))),K(e.statement),xn.assert(1===oe()),te(re().endLabel)):xe(qB(e,R,b_))}(n);case 255:return function(e){if(X(e.caseBlock)){const n=e.caseBlock,r=n.clauses.length,i=function(){const e=ee();return ne({kind:2,isScript:!1,breakLabel:e}),e}(),o=Y(xn.checkDefined(qB(e.expression,R,Xu))),a=[];let s=-1;for(let e=0;e0)break;l.push(t.createCaseClause(xn.checkDefined(qB(r.expression,R,Xu)),[ve(a[i],r.expression)]))}else e++}l.length&&(xe(t.createSwitchStatement(o,t.createCaseBlock(l))),c+=l.length,l=[]),e>0&&(c+=e,e=0)}ke(s>=0?a[s]:i);for(let e=0;e0)break;o.push(G(t))}o.length&&(xe(t.createExpressionStatement(t.inlineExpressions(o))),i+=o.length,o=[])}}function G(e){return lw(t.createAssignment(lw(t.cloneNode(e.name),e.name),xn.checkDefined(qB(e.initializer,R,Xu))),e)}function X(e){return!!e&&0!=(1048576&e.transformFlags)}function Q(e){const t=e.length;for(let n=0;n=0;n--){const t=v[n];if(!de(t))break;if(t.labelText===e)return!0}return!1}function me(e){if(v)if(e)for(let t=v.length-1;t>=0;t--){const n=v[t];if(de(n)&&n.labelText===e)return n.breakLabel;if(_e(n)&&fe(e,t-1))return n.breakLabel}else for(let e=v.length-1;e>=0;e--){const t=v[e];if(_e(t))return t.breakLabel}return 0}function ge(e){if(v)if(e)for(let t=v.length-1;t>=0;t--){const n=v[t];if(pe(n)&&fe(e,t-1))return n.continueLabel}else for(let e=v.length-1;e>=0;e--){const t=v[e];if(pe(t))return t.continueLabel}return 0}function he(e){if(void 0!==e&&e>0){void 0===x&&(x=[]);const n=t.createNumericLiteral(Number.MAX_SAFE_INTEGER);return void 0===x[e]?x[e]=[n]:x[e].push(n),n}return t.createOmittedExpression()}function ye(e){const n=t.createNumericLiteral(e);return xw(n,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(e)),n}function ve(e,n){return xn.assertLessThan(0,e,"Invalid label"),sI(t.createReturnStatement(t.createArrayLiteralExpression([ye(3),he(e)])),n)}function be(){De(0)}function xe(e){e?De(1,[e]):be()}function Se(e,t,n){De(2,[e,t],n)}function ke(e,t){De(3,[e],t)}function Te(e,t,n){De(4,[e,t],n)}function Ce(e,t,n){De(5,[e,t],n)}function De(e,t,n){void 0===S&&(S=[],k=[],T=[]),void 0===b&&te(ee());const r=S.length;S[r]=e,k[r]=t,T[r]=n}function Ee(e){(function(e){if(!E)return!0;if(!b||!x)return!1;for(let t=0;t=0;e--){const n=I[e];N=[t.createWithStatement(n.expression,t.createBlock(N))]}if(A){const{startLabel:e,catchLabel:n,finallyLabel:r,endLabel:i}=A;N.unshift(t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createPropertyAccessExpression(C,"trys"),"push"),void 0,[t.createArrayLiteralExpression([he(e),he(n),he(r),he(i)])]))),A=void 0}e&&N.push(t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(C,"label"),t.createNumericLiteral(j+1))))}P.push(t.createCaseClause(t.createNumericLiteral(j),N||[])),N=void 0}function Ne(e){if(b)for(let t=0;tt.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.createIdentifier(bc(n))),e)),t.createVoidZero())))}for(const e of h.exportedFunctions)V(o,e);ue(o,qB(h.externalHelpersImportDeclaration,E,b_)),pe(o,VB(n.statements,E,b_,c)),D(o,!1),jd(o,i());const l=t.updateSourceFile(n,sI(t.createNodeArray(o),n.statements));return ww(l,e.readEmitHelpers()),l}function S(n){const r=t.createIdentifier("define"),i=TA(t,n,c,a),o=ef(n)&&n,{aliasedModuleNames:s,unaliasedModuleNames:l,importAliasNames:_}=T(n,!0),d=t.updateSourceFile(n,sI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(r,void 0,[...i?[i]:[],t.createArrayLiteralExpression(o?u:[t.createStringLiteral("require"),t.createStringLiteral("exports"),...s,...l]),o?o.statements.length?o.statements[0].expression:t.createObjectLiteralExpression():t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"require"),t.createParameterDeclaration(void 0,void 0,"exports"),..._],void 0,w(n))]))]),n.statements));return ww(d,e.readEmitHelpers()),d}function k(n){const{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:o}=T(n,!1),s=TA(t,n,c,a),l=t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"factory")],void 0,sI(t.createBlock([t.createIfStatement(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("module"),"object"),t.createTypeCheck(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),"object")),t.createBlock([t.createVariableStatement(void 0,[t.createVariableDeclaration("v",void 0,void 0,t.createCallExpression(t.createIdentifier("factory"),void 0,[t.createIdentifier("require"),t.createIdentifier("exports")]))]),iw(t.createIfStatement(t.createStrictInequality(t.createIdentifier("v"),t.createIdentifier("undefined")),t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),t.createIdentifier("v")))),1)]),t.createIfStatement(t.createLogicalAnd(t.createTypeCheck(t.createIdentifier("define"),"function"),t.createPropertyAccessExpression(t.createIdentifier("define"),"amd")),t.createBlock([t.createExpressionStatement(t.createCallExpression(t.createIdentifier("define"),void 0,[...s?[s]:[],t.createArrayLiteralExpression([t.createStringLiteral("require"),t.createStringLiteral("exports"),...r,...i]),t.createIdentifier("factory")]))])))],!0),void 0)),u=t.updateSourceFile(n,sI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(l,void 0,[t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,"require"),t.createParameterDeclaration(void 0,void 0,"exports"),...o],void 0,w(n))]))]),n.statements));return ww(u,e.readEmitHelpers()),u}function T(e,n){const r=[],i=[],o=[];for(const n of e.amdDependencies)n.name?(r.push(t.createStringLiteral(n.path)),o.push(t.createParameterDeclaration(void 0,void 0,n.name))):i.push(t.createStringLiteral(n.path));for(const e of h.externalImports){const l=kA(t,e,g,c,s,a),u=SA(t,e,g);l&&(n&&u?(iw(u,8),r.push(l),o.push(t.createParameterDeclaration(void 0,void 0,u))):i.push(l))}return{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:o}}function C(e){if(rN(e)||gN(e)||!kA(t,e,g,c,s,a))return;const n=SA(t,e,g),r=j(e,n);return r!==n?t.createExpressionStatement(t.createAssignment(n,r)):void 0}function w(e){r();const n=[],o=t.copyPrologue(e.statements,n,!0,E);b()&&ue(n,W()),Q(h.exportedNames)&&ue(n,t.createExpressionStatement(Oe(h.exportedNames,((e,n)=>t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.createIdentifier(bc(n))),e)),t.createVoidZero())));for(const e of h.exportedFunctions)V(n,e);ue(n,qB(h.externalHelpersImportDeclaration,E,b_)),2===_&&pe(n,q(h.externalImports,C)),pe(n,VB(e.statements,E,b_,o)),D(n,!0),jd(n,i());const a=t.createBlock(n,!0);return v&&Cw(a,t$),a}function D(e,n){if(h.exportEquals){const r=qB(h.exportEquals.expression,F,Xu);if(r)if(n){const n=t.createReturnStatement(r);sI(n,h.exportEquals),iw(n,3840),e.push(n)}else{const n=t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),r));sI(n,h.exportEquals),iw(n,3072),e.push(n)}}}function E(e){switch(e.kind){case 272:return function(e){let n;const r=wg(e);if(2!==_){if(!e.importClause)return ew(sI(t.createExpressionStatement(R(e)),e),e);{const i=[];r&&!Dg(e)?i.push(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,j(e,R(e)))):(i.push(t.createVariableDeclaration(t.getGeneratedNameForNode(e),void 0,void 0,j(e,R(e)))),r&&Dg(e)&&i.push(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,t.getGeneratedNameForNode(e)))),n=ue(n,ew(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList(i,l>=2?2:0)),e),e))}}else r&&Dg(e)&&(n=ue(n,t.createVariableStatement(void 0,t.createVariableDeclarationList([ew(sI(t.createVariableDeclaration(t.cloneNode(r.name),void 0,void 0,t.getGeneratedNameForNode(e)),e),e)],l>=2?2:0))));return n=function(e,t){if(h.exportEquals)return e;const n=t.importClause;if(!n)return e;const r=new AJ;n.name&&(e=U(e,r,n));const i=n.namedBindings;if(i)switch(i.kind){case 274:e=U(e,r,i);break;case 275:for(const t of i.elements)e=U(e,r,t,!0)}return e}(n,e),Ne(n)}(e);case 271:return function(e){let n;return xn.assert(Em(e),"import= for internal module references should be handled in an earlier transformer."),2!==_?n=Bv(e,32)?ue(n,ew(sI(t.createExpressionStatement(G(e.name,R(e))),e),e)):ue(n,ew(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.cloneNode(e.name),void 0,void 0,R(e))],l>=2?2:0)),e),e)):Bv(e,32)&&(n=ue(n,ew(sI(t.createExpressionStatement(G(t.getExportName(e),t.getLocalName(e))),e),e))),n=function(e,t){return h.exportEquals?e:U(e,new AJ,t)}(n,e),Ne(n)}(e);case 278:return function(e){if(!e.moduleSpecifier)return;const r=t.getGeneratedNameForNode(e);if(e.exportClause&&hN(e.exportClause)){const i=[];2!==_&&i.push(ew(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,R(e))])),e),e));for(const o of e.exportClause.elements){const s=!(!FS(a)||2&Zd(e)||"default"!==bc(o.propertyName||o.name)),c=t.createPropertyAccessExpression(s?n().createImportDefaultHelper(r):r,o.propertyName||o.name);i.push(ew(sI(t.createExpressionStatement(G(t.getExportName(o),c,void 0,!0)),o),o))}return Ne(i)}if(e.exportClause){const i=[];return i.push(ew(sI(t.createExpressionStatement(G(t.cloneNode(e.exportClause.name),function(e,t){return!FS(a)||2&Zd(e)?t:wJ(e)?n().createImportStarHelper(t):t}(e,2!==_?R(e):Wd(e)?r:t.createIdentifier(bc(e.exportClause.name))))),e),e)),Ne(i)}return ew(sI(t.createExpressionStatement(n().createExportStarHelper(2!==_?R(e):r)),e),e)}(e);case 277:return function(e){if(!e.isExportEquals)return H(t.createIdentifier("default"),qB(e.expression,F,Xu),e,!0)}(e);default:return P(e)}}function P(n){switch(n.kind){case 243:return function(n){let r,i,o;if(Bv(n,32)){let e,a=!1;for(const r of n.declarationList.declarations)if(qD(r.name)&&iA(r.name))e||(e=VB(n.modifiers,X,iu)),i=r.initializer?ue(i,t.updateVariableDeclaration(r,r.name,void 0,void 0,G(r.name,qB(r.initializer,F,Xu)))):ue(i,r);else if(r.initializer)if(!Eu(r.name)&&(rP(r.initializer)||nP(r.initializer)||mP(r.initializer))){const e=t.createAssignment(sI(t.createPropertyAccessExpression(t.createIdentifier("exports"),r.name),r.name),t.createIdentifier(Hh(r.name)));i=ue(i,t.createVariableDeclaration(r.name,r.exclamationToken,r.type,qB(r.initializer,F,Xu))),o=ue(o,e),a=!0}else o=ue(o,J(r));if(i&&(r=ue(r,t.updateVariableStatement(n,e,t.updateVariableDeclarationList(n.declarationList,i)))),o){const e=ew(sI(t.createExpressionStatement(t.inlineExpressions(o)),n),n);a&&rw(e),r=ue(r,e)}}else r=ue(r,ZB(n,F,e));return r=function(e,t){return z(e,t.declarationList,!1)}(r,n),Ne(r)}(n);case 262:return function(n){let r;return r=Bv(n,32)?ue(r,ew(sI(t.createFunctionDeclaration(VB(n.modifiers,X,iu),n.asteriskToken,t.getDeclarationName(n,!0,!0),void 0,VB(n.parameters,F,sE),void 0,ZB(n.body,F,e)),n),n)):ue(r,ZB(n,F,e)),Ne(r)}(n);case 263:return function(n){let r;return r=Bv(n,32)?ue(r,ew(sI(t.createClassDeclaration(VB(n.modifiers,X,Su),t.getDeclarationName(n,!0,!0),void 0,VB(n.heritageClauses,F,jN),VB(n.members,F,mu)),n),n)):ue(r,ZB(n,F,e)),r=V(r,n),Ne(r)}(n);case 248:return O(n,!0);case 249:return function(n){if(WP(n.initializer)&&!(7&n.initializer.flags)){const r=z(void 0,n.initializer,!0);if(Q(r)){const i=qB(n.initializer,A,s_),o=qB(n.expression,F,Xu),a=QB(n.statement,P,e),s=DP(a)?t.updateBlock(a,[...r,...a.statements]):t.createBlock([...r,a],!0);return t.updateForInStatement(n,i,o,s)}}return t.updateForInStatement(n,qB(n.initializer,A,s_),qB(n.expression,F,Xu),QB(n.statement,P,e))}(n);case 250:return function(n){if(WP(n.initializer)&&!(7&n.initializer.flags)){const r=z(void 0,n.initializer,!0),i=qB(n.initializer,A,s_),o=qB(n.expression,F,Xu);let a=QB(n.statement,P,e);return Q(r)&&(a=DP(a)?t.updateBlock(a,[...r,...a.statements]):t.createBlock([...r,a],!0)),t.updateForOfStatement(n,n.awaitModifier,i,o,a)}return t.updateForOfStatement(n,n.awaitModifier,qB(n.initializer,A,s_),qB(n.expression,F,Xu),QB(n.statement,P,e))}(n);case 246:return function(n){return t.updateDoStatement(n,QB(n.statement,P,e),qB(n.expression,F,Xu))}(n);case 247:return function(n){return t.updateWhileStatement(n,qB(n.expression,F,Xu),QB(n.statement,P,e))}(n);case 256:return function(e){return t.updateLabeledStatement(e,e.label,xn.checkDefined(qB(e.statement,P,b_,t.liftToBlock)))}(n);case 254:return function(e){return t.updateWithStatement(e,qB(e.expression,F,Xu),xn.checkDefined(qB(e.statement,P,b_,t.liftToBlock)))}(n);case 245:return function(e){return t.updateIfStatement(e,qB(e.expression,F,Xu),xn.checkDefined(qB(e.thenStatement,P,b_,t.liftToBlock)),qB(e.elseStatement,P,b_,t.liftToBlock))}(n);case 255:return function(e){return t.updateSwitchStatement(e,qB(e.expression,F,Xu),xn.checkDefined(qB(e.caseBlock,P,tN)))}(n);case 269:return function(e){return t.updateCaseBlock(e,VB(e.clauses,P,E_))}(n);case 296:return function(e){return t.updateCaseClause(e,qB(e.expression,F,Xu),VB(e.statements,P,b_))}(n);case 297:case 258:case 241:return function(t){return ZB(t,P,e)}(n);case 299:return function(e){return t.updateCatchClause(e,e.variableDeclaration,xn.checkDefined(qB(e.block,P,DP)))}(n);default:return F(n)}}function N(n,r){if(!(276828160&n.transformFlags))return n;switch(n.kind){case 248:return O(n,!1);case 244:return function(e){return t.updateExpressionStatement(e,qB(e.expression,A,Xu))}(n);case 217:return function(e,n){return t.updateParenthesizedExpression(e,qB(e.expression,n?A:F,Xu))}(n,r);case 354:return function(e,n){return t.updatePartiallyEmittedExpression(e,qB(e.expression,n?A:F,Xu))}(n,r);case 213:if(uf(n)&&void 0===g.impliedNodeFormat)return function(n){if(0===_&&l>=7)return ZB(n,F,e);const r=kA(t,n,g,c,s,a),i=qB(Se(n.arguments),F,Xu),u=!r||i&&wD(i)&&i.text===r.text?i:r,d=!!(16384&n.transformFlags);switch(a.module){case 2:return M(u,d);case 3:return function(e,n){if(v=!0,OJ(e)){const r=Xl(e)?e:wD(e)?t.createStringLiteralFromNode(e):iw(sI(t.cloneNode(e),e),3072);return t.createConditionalExpression(t.createIdentifier("__syncRequire"),void 0,L(e),void 0,M(r,n))}{const r=t.createTempVariable(o);return t.createComma(t.createAssignment(r,e),t.createConditionalExpression(t.createIdentifier("__syncRequire"),void 0,L(r,!0),void 0,M(r,n)))}}(u??t.createVoidZero(),d);default:return L(u)}}(n);break;case 226:if(hb(n))return function(t,n){return I(t.left)?iz(t,F,e,0,!n,B):ZB(t,F,e)}(n,r);break;case 224:case 225:return function(n,r){if((46===n.operator||47===n.operator)&&qD(n.operand)&&!Xl(n.operand)&&!iA(n.operand)&&!cx(n.operand)){const e=Z(n.operand);if(e){let i,a=qB(n.operand,F,Xu);cP(n)?a=t.updatePrefixUnaryExpression(n,a):(a=t.updatePostfixUnaryExpression(n,a),r||(i=t.createTempVariable(o),a=t.createAssignment(i,a),sI(a,n)),a=t.createComma(a,t.cloneNode(n.operand)),sI(a,n));for(const t of e)y[IB(a)]=!0,a=G(t,a),sI(a,n);return i&&(y[IB(a)]=!0,a=t.createComma(a,i),sI(a,n)),a}}return ZB(n,F,e)}(n,r)}return ZB(n,F,e)}function F(e){return N(e,!1)}function A(e){return N(e,!0)}function I(e){if(HE(e))for(const t of e.properties)switch(t.kind){case 303:if(I(t.initializer))return!0;break;case 304:if(I(t.name))return!0;break;case 305:if(I(t.expression))return!0;break;case 174:case 177:case 178:return!1;default:xn.assertNever(t,"Unhandled object member kind")}else if(WE(e)){for(const t of e.elements)if(fP(t)){if(I(t.expression))return!0}else if(I(t))return!0}else if(qD(e))return p(Z(e))>(oA(e)?1:0);return!1}function O(n,r){if(r&&n.initializer&&WP(n.initializer)&&!(7&n.initializer.flags)){const i=z(void 0,n.initializer,!1);if(i){const o=[],a=qB(n.initializer,A,WP),s=t.createVariableStatement(void 0,a);o.push(s),pe(o,i);const c=qB(n.condition,F,Xu),l=qB(n.incrementor,A,Xu),u=QB(n.statement,r?P:F,e);return o.push(t.updateForStatement(n,void 0,c,l,u)),o}}return t.updateForStatement(n,qB(n.initializer,A,s_),qB(n.condition,F,Xu),qB(n.incrementor,A,Xu),QB(n.statement,r?P:F,e))}function M(e,r){const i=t.createUniqueName("resolve"),o=t.createUniqueName("reject"),s=[t.createParameterDeclaration(void 0,void 0,i),t.createParameterDeclaration(void 0,void 0,o)],c=t.createBlock([t.createExpressionStatement(t.createCallExpression(t.createIdentifier("require"),void 0,[t.createArrayLiteralExpression([e||t.createOmittedExpression()]),i,o]))]);let u;l>=2?u=t.createArrowFunction(void 0,void 0,s,void 0,void 0,c):(u=t.createFunctionExpression(void 0,void 0,void 0,void 0,s,void 0,c),r&&iw(u,16));const _=t.createNewExpression(t.createIdentifier("Promise"),void 0,[u]);return FS(a)?t.createCallExpression(t.createPropertyAccessExpression(_,t.createIdentifier("then")),void 0,[n().createImportStarCallbackHelper()]):_}function L(e,r){const i=e&&!MJ(e)&&!r,o=t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Promise"),"resolve"),void 0,i?l>=2?[t.createTemplateExpression(t.createTemplateHead(""),[t.createTemplateSpan(e,t.createTemplateTail(""))])]:[t.createCallExpression(t.createPropertyAccessExpression(t.createStringLiteral(""),"concat"),void 0,[e])]:[]);let s=t.createCallExpression(t.createIdentifier("require"),void 0,i?[t.createIdentifier("s")]:e?[e]:[]);FS(a)&&(s=n().createImportStarHelper(s));const c=i?[t.createParameterDeclaration(void 0,void 0,"s")]:[];let u;return u=l>=2?t.createArrowFunction(void 0,void 0,c,void 0,void 0,s):t.createFunctionExpression(void 0,void 0,void 0,void 0,c,void 0,t.createBlock([t.createReturnStatement(s)])),t.createCallExpression(t.createPropertyAccessExpression(o,"then"),void 0,[u])}function j(e,t){return!FS(a)||2&Zd(e)?t:DJ(e)?n().createImportStarHelper(t):EJ(e)?n().createImportDefaultHelper(t):t}function R(e){const n=kA(t,e,g,c,s,a),r=[];return n&&r.push(n),t.createCallExpression(t.createIdentifier("require"),void 0,r)}function B(e,n,r){const i=Z(e);if(i){let o=oA(e)?n:t.createAssignment(e,n);for(const e of i)iw(o,8),o=G(e,o,r);return o}return t.createAssignment(e,n)}function J(n){return Eu(n.name)?iz(qB(n,F,ux),F,e,0,!1,B):t.createAssignment(sI(t.createPropertyAccessExpression(t.createIdentifier("exports"),n.name),n.name),n.initializer?qB(n.initializer,F,Xu):t.createVoidZero())}function z(e,t,n){if(h.exportEquals)return e;for(const r of t.declarations)e=$(e,r,n);return e}function $(e,t,n){if(h.exportEquals)return e;if(Eu(t.name))for(const r of t.name.elements)gP(r)||(e=$(e,r,n));else Xl(t.name)||KP(t)&&!t.initializer&&!n||(e=U(e,new AJ,t));return e}function V(e,n){if(h.exportEquals)return e;const r=new AJ;return Bv(n,32)&&(e=K(e,r,Bv(n,2048)?t.createIdentifier("default"):t.getDeclarationName(n),t.getLocalName(n),n)),n.name&&(e=U(e,r,n)),e}function U(e,n,r,i){const o=t.getDeclarationName(r),a=h.exportSpecifiers.get(o);if(a)for(const t of a)e=K(e,n,t.name,o,t.name,void 0,i);return e}function K(e,t,n,r,i,o,a){return t.has(n)||(t.set(n,!0),e=ue(e,H(n,r,i,o,a))),e}function W(){const e=t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[t.createIdentifier("exports"),t.createStringLiteral("__esModule"),t.createObjectLiteralExpression([t.createPropertyAssignment("value",t.createTrue())])]));return iw(e,2097152),e}function H(e,n,r,i,o){const a=sI(t.createExpressionStatement(G(e,n,void 0,o)),r);return hA(a),i||iw(a,3072),a}function G(e,n,r,i){return sI(i?t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"defineProperty"),void 0,[t.createIdentifier("exports"),t.createStringLiteralFromNode(e),t.createObjectLiteralExpression([t.createPropertyAssignment("enumerable",t.createTrue()),t.createPropertyAssignment("get",t.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,t.createBlock([t.createReturnStatement(n)])))])]):t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)),n),r)}function X(e){switch(e.kind){case 95:case 90:return}return e}function Y(e){var n,r;if(8192&Yd(e)){const n=yA(g);return n?t.createPropertyAccessExpression(n,e):e}if((!Xl(e)||64&e.emitNode.autoGenerate.flags)&&!iA(e)){const i=s.getReferencedExportContainer(e,oA(e));if(i&&307===i.kind)return sI(t.createPropertyAccessExpression(t.createIdentifier("exports"),t.cloneNode(e)),e);const o=s.getReferencedImportDeclaration(e);if(o){if(oN(o))return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(o.parent),t.createIdentifier("default")),e);if(fN(o)){const i=o.propertyName||o.name;return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=o.parent)?void 0:n.parent)?void 0:r.parent)||o),t.cloneNode(i)),e)}}}return e}function Z(e){if(Xl(e)){if(Yl(e)){const t=null==h?void 0:h.exportSpecifiers.get(e);if(t){const e=[];for(const n of t)e.push(n.name);return e}}}else{const t=s.getReferencedImportDeclaration(e);if(t)return null==h?void 0:h.exportedBindings[SJ(t)];const n=new Set,r=s.getReferencedValueDeclarations(e);if(r){for(const e of r){const t=null==h?void 0:h.exportedBindings[SJ(e)];if(t)for(const e of t)n.add(e)}if(n.size)return $e(n)}}}}var t$={name:"typescript:dynamicimport-sync-require",scoped:!0,text:'\n var __syncRequire = typeof module === "object" && typeof module.exports === "object";'};function n$(e){const{factory:t,startLexicalEnvironment:n,endLexicalEnvironment:r,hoistVariableDeclaration:i}=e,o=e.getCompilerOptions(),a=e.getEmitResolver(),s=e.getEmitHost(),c=e.onSubstituteNode,l=e.onEmitNode;e.onSubstituteNode=function(e,n){return function(e){return x&&e.id&&x[e.id]}(n=c(e,n))?n:1===e?function(e){switch(e.kind){case 80:return function(e){var n,r;if(8192&Yd(e)){const n=yA(m);return n?t.createPropertyAccessExpression(n,e):e}if(!Xl(e)&&!iA(e)){const i=a.getReferencedImportDeclaration(e);if(i){if(oN(i))return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode(i.parent),t.createIdentifier("default")),e);if(fN(i))return sI(t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=i.parent)?void 0:n.parent)?void 0:r.parent)||i),t.cloneNode(i.propertyName||i.name)),e)}}return e}(e);case 226:return function(e){if(db(e.operatorToken.kind)&&qD(e.left)&&(!Xl(e.left)||Yl(e.left))&&!iA(e.left)){const t=K(e.left);if(t){let n=e;for(const e of t)n=j(e,W(n));return n}}return e}(e);case 236:return function(e){return _f(e)?t.createPropertyAccessExpression(y,t.createIdentifier("meta")):e}(e)}return e}(n):4===e?function(e){return 304===e.kind?function(e){var n,r;const i=e.name;if(!Xl(i)&&!iA(i)){const o=a.getReferencedImportDeclaration(i);if(o){if(oN(o))return sI(t.createPropertyAssignment(t.cloneNode(i),t.createPropertyAccessExpression(t.getGeneratedNameForNode(o.parent),t.createIdentifier("default"))),e);if(fN(o))return sI(t.createPropertyAssignment(t.cloneNode(i),t.createPropertyAccessExpression(t.getGeneratedNameForNode((null==(r=null==(n=o.parent)?void 0:n.parent)?void 0:r.parent)||o),t.cloneNode(o.propertyName||o.name))),e)}}return e}(e):e}(n):n},e.onEmitNode=function(e,t,n){if(307===t.kind){const r=SJ(t);m=t,g=u[r],h=_[r],x=d[r],y=p[r],x&&delete d[r],l(e,t,n),m=void 0,g=void 0,h=void 0,y=void 0,x=void 0}else l(e,t,n)},e.enableSubstitution(80),e.enableSubstitution(304),e.enableSubstitution(226),e.enableSubstitution(236),e.enableEmitNotification(307);const u=[],_=[],d=[],p=[];let m,g,h,y,v,b,x;return CJ(e,(function(i){if(i.isDeclarationFile||!(hp(i,o)||8388608&i.transformFlags))return i;const c=SJ(i);m=i,b=i,g=u[c]=PJ(e,i),h=t.createUniqueName("exports"),_[c]=h,y=p[c]=t.createUniqueName("context");const l=function(e){const n=new Map,r=[];for(const i of e){const e=kA(t,i,m,s,a,o);if(e){const t=e.text,o=n.get(t);void 0!==o?r[o].externalImports.push(i):(n.set(t,r.length),r.push({name:e,externalImports:[i]}))}}return r}(g.externalImports),f=function(e,i){const a=[];n();const s=WS(o,"alwaysStrict")||qI(m),c=t.copyPrologue(e.statements,a,s,T);a.push(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration("__moduleName",void 0,void 0,t.createLogicalAnd(y,t.createPropertyAccessExpression(y,"id")))]))),qB(g.externalHelpersImportDeclaration,T,b_);const l=VB(e.statements,T,b_,c);pe(a,v),jd(a,r());const u=function(e){if(!g.hasExportStarsToExportValues)return;if(!Q(g.exportedNames)&&0===g.exportedFunctions.size&&0===g.exportSpecifiers.size){let t=!1;for(const e of g.externalImports)if(278===e.kind&&e.exportClause){t=!0;break}if(!t){const t=S(void 0);return e.push(t),t.name}}const n=[];if(g.exportedNames)for(const e of g.exportedNames)"default"!==e.escapedText&&n.push(t.createPropertyAssignment(t.createStringLiteralFromNode(e),t.createTrue()));for(const e of g.exportedFunctions)Bv(e,2048)||(xn.assert(!!e.name),n.push(t.createPropertyAssignment(t.createStringLiteralFromNode(e.name),t.createTrue())));const r=t.createUniqueName("exportedNames");e.push(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,t.createObjectLiteralExpression(n,!0))])));const i=S(r);return e.push(i),i.name}(a),_=2097152&e.transformFlags?t.createModifiersFromModifierFlags(1024):void 0,d=t.createObjectLiteralExpression([t.createPropertyAssignment("setters",k(u,i)),t.createPropertyAssignment("execute",t.createFunctionExpression(_,void 0,void 0,void 0,[],void 0,t.createBlock(l,!0)))],!0);return a.push(t.createReturnStatement(d)),t.createBlock(a,!0)}(i,l),C=t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,h),t.createParameterDeclaration(void 0,void 0,y)],void 0,f),w=TA(t,i,s,o),D=t.createArrayLiteralExpression(O(l,(e=>e.name))),E=iw(t.updateSourceFile(i,sI(t.createNodeArray([t.createExpressionStatement(t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("System"),"register"),void 0,w?[w,D,C]:[D,C]))]),i.statements)),2048);return o.outFile||Pw(E,f,(e=>!e.scoped)),x&&(d[c]=x,x=void 0),m=void 0,g=void 0,h=void 0,y=void 0,v=void 0,b=void 0,E}));function S(e){const n=t.createUniqueName("exportStar"),r=t.createIdentifier("m"),i=t.createIdentifier("n"),o=t.createIdentifier("exports");let a=t.createStrictInequality(i,t.createStringLiteral("default"));return e&&(a=t.createLogicalAnd(a,t.createLogicalNot(t.createCallExpression(t.createPropertyAccessExpression(e,"hasOwnProperty"),void 0,[i])))),t.createFunctionDeclaration(void 0,void 0,n,void 0,[t.createParameterDeclaration(void 0,void 0,r)],void 0,t.createBlock([t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(o,void 0,void 0,t.createObjectLiteralExpression([]))])),t.createForInStatement(t.createVariableDeclarationList([t.createVariableDeclaration(i)]),r,t.createBlock([iw(t.createIfStatement(a,t.createExpressionStatement(t.createAssignment(t.createElementAccessExpression(o,i),t.createElementAccessExpression(r,i)))),1)])),t.createExpressionStatement(t.createCallExpression(h,void 0,[o]))],!0))}function k(e,n){const r=[];for(const i of n){const n=f(i.externalImports,(e=>SA(t,e,m))),o=n?t.getGeneratedNameForNode(n):t.createUniqueName(""),a=[];for(const n of i.externalImports){const r=SA(t,n,m);switch(n.kind){case 272:if(!n.importClause)break;case 271:xn.assert(void 0!==r),a.push(t.createExpressionStatement(t.createAssignment(r,o))),Bv(n,32)&&a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createStringLiteral(bc(r)),o])));break;case 278:if(xn.assert(void 0!==r),n.exportClause)if(hN(n.exportClause)){const e=[];for(const r of n.exportClause.elements)e.push(t.createPropertyAssignment(t.createStringLiteral(bc(r.name)),t.createElementAccessExpression(o,t.createStringLiteral(bc(r.propertyName||r.name)))));a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createObjectLiteralExpression(e,!0)])))}else a.push(t.createExpressionStatement(t.createCallExpression(h,void 0,[t.createStringLiteral(bc(n.exportClause.name)),o])));else a.push(t.createExpressionStatement(t.createCallExpression(e,void 0,[o])))}}r.push(t.createFunctionExpression(void 0,void 0,void 0,void 0,[t.createParameterDeclaration(void 0,void 0,o)],void 0,t.createBlock(a,!0)))}return t.createArrayLiteralExpression(r,!0)}function T(e){switch(e.kind){case 272:return function(e){return e.importClause&&i(SA(t,e,m)),Ne(function(e,t){if(g.exportEquals)return e;const n=t.importClause;if(!n)return e;n.name&&(e=I(e,n));const r=n.namedBindings;if(r)switch(r.kind){case 274:e=I(e,r);break;case 275:for(const t of r.elements)e=I(e,t)}return e}(undefined,e))}(e);case 271:return function(e){return xn.assert(Em(e),"import= for internal module references should be handled in an earlier transformer."),i(SA(t,e,m)),Ne(function(e,t){return g.exportEquals?e:I(e,t)}(undefined,e))}(e);case 278:return function(e){xn.assertIsDefined(e)}(e);case 277:return function(e){if(e.isExportEquals)return;const n=qB(e.expression,$,Xu);return L(t.createIdentifier("default"),n,!0)}(e);default:return R(e)}}function C(e){if(Eu(e.name))for(const t of e.name.elements)gP(t)||C(t);else i(t.cloneNode(e.name))}function w(e){return 0==(4194304&Yd(e))&&(307===b.kind||0==(7&fc(e).flags))}function D(t,n){const r=n?E:P;return Eu(t.name)?iz(t,$,e,0,!1,r):t.initializer?r(t.name,qB(t.initializer,$,Xu)):t.name}function E(e,t,n){return N(e,t,n,!0)}function P(e,t,n){return N(e,t,n,!1)}function N(e,n,r,o){return i(t.cloneNode(e)),o?j(e,W(sI(t.createAssignment(e,n),r))):W(sI(t.createAssignment(e,n),r))}function F(e,n,r){if(g.exportEquals)return e;if(Eu(n.name))for(const t of n.name.elements)gP(t)||(e=F(e,t,r));else if(!Xl(n.name)){let i;r&&(e=M(e,n.name,t.getLocalName(n)),i=bc(n.name)),e=I(e,n,i)}return e}function A(e,n){if(g.exportEquals)return e;let r;if(Bv(n,32)){const i=Bv(n,2048)?t.createStringLiteral("default"):n.name;e=M(e,i,t.getLocalName(n)),r=Hh(i)}return n.name&&(e=I(e,n,r)),e}function I(e,n,r){if(g.exportEquals)return e;const i=t.getDeclarationName(n),o=g.exportSpecifiers.get(i);if(o)for(const t of o)t.name.escapedText!==r&&(e=M(e,t.name,i));return e}function M(e,t,n,r){return ue(e,L(t,n,r))}function L(e,n,r){const i=t.createExpressionStatement(j(e,n));return hA(i),r||iw(i,3072),i}function j(e,n){const r=qD(e)?t.createStringLiteralFromNode(e):e;return iw(n,3072|Yd(n)),mw(t.createCallExpression(h,void 0,[r,n]),n)}function R(n){switch(n.kind){case 243:return function(e){if(!w(e.declarationList))return qB(e,$,b_);let n;if(of(e.declarationList)||rf(e.declarationList)){const r=VB(e.modifiers,U,Su),i=[];for(const n of e.declarationList.declarations)i.push(t.updateVariableDeclaration(n,t.getGeneratedNameForNode(n.name),void 0,void 0,D(n,!1)));const o=t.updateVariableDeclarationList(e.declarationList,i);n=ue(n,t.updateVariableStatement(e,r,o))}else{let r;const i=Bv(e,32);for(const t of e.declarationList.declarations)t.initializer?r=ue(r,D(t,i)):C(t);r&&(n=ue(n,sI(t.createExpressionStatement(t.inlineExpressions(r)),e)))}return n=function(e,t,n){if(g.exportEquals)return e;for(const n of t.declarationList.declarations)n.initializer&&(e=F(e,n,!1));return e}(n,e),Ne(n)}(n);case 262:return function(n){v=Bv(n,32)?ue(v,t.updateFunctionDeclaration(n,VB(n.modifiers,U,Su),n.asteriskToken,t.getDeclarationName(n,!0,!0),void 0,VB(n.parameters,$,sE),void 0,qB(n.body,$,DP))):ue(v,ZB(n,$,e)),v=A(v,n)}(n);case 263:return function(e){let n;const r=t.getLocalName(e);return i(r),n=ue(n,sI(t.createExpressionStatement(t.createAssignment(r,sI(t.createClassExpression(VB(e.modifiers,U,Su),e.name,void 0,VB(e.heritageClauses,$,jN),VB(e.members,$,mu)),e))),e)),n=A(n,e),Ne(n)}(n);case 248:return B(n,!0);case 249:return function(n){const r=b;return b=n,n=t.updateForInStatement(n,J(n.initializer),qB(n.expression,$,Xu),QB(n.statement,R,e)),b=r,n}(n);case 250:return function(n){const r=b;return b=n,n=t.updateForOfStatement(n,n.awaitModifier,J(n.initializer),qB(n.expression,$,Xu),QB(n.statement,R,e)),b=r,n}(n);case 246:return function(n){return t.updateDoStatement(n,QB(n.statement,R,e),qB(n.expression,$,Xu))}(n);case 247:return function(n){return t.updateWhileStatement(n,qB(n.expression,$,Xu),QB(n.statement,R,e))}(n);case 256:return function(e){return t.updateLabeledStatement(e,e.label,xn.checkDefined(qB(e.statement,R,b_,t.liftToBlock)))}(n);case 254:return function(e){return t.updateWithStatement(e,qB(e.expression,$,Xu),xn.checkDefined(qB(e.statement,R,b_,t.liftToBlock)))}(n);case 245:return function(e){return t.updateIfStatement(e,qB(e.expression,$,Xu),xn.checkDefined(qB(e.thenStatement,R,b_,t.liftToBlock)),qB(e.elseStatement,R,b_,t.liftToBlock))}(n);case 255:return function(e){return t.updateSwitchStatement(e,qB(e.expression,$,Xu),xn.checkDefined(qB(e.caseBlock,R,tN)))}(n);case 269:return function(e){const n=b;return b=e,e=t.updateCaseBlock(e,VB(e.clauses,R,E_)),b=n,e}(n);case 296:return function(e){return t.updateCaseClause(e,qB(e.expression,$,Xu),VB(e.statements,R,b_))}(n);case 297:case 258:return function(t){return ZB(t,R,e)}(n);case 299:return function(e){const n=b;return b=e,e=t.updateCatchClause(e,e.variableDeclaration,xn.checkDefined(qB(e.block,R,DP))),b=n,e}(n);case 241:return function(t){const n=b;return b=t,t=ZB(t,R,e),b=n,t}(n);default:return $(n)}}function B(n,r){const i=b;return b=n,n=t.updateForStatement(n,qB(n.initializer,r?J:q,s_),qB(n.condition,$,Xu),qB(n.incrementor,q,Xu),QB(n.statement,r?R:$,e)),b=i,n}function J(e){if(function(e){return WP(e)&&w(e)}(e)){let n;for(const t of e.declarations)n=ue(n,D(t,!1)),t.initializer||C(t);return n?t.inlineExpressions(n):t.createOmittedExpression()}return qB(e,q,s_)}function z(n,r){if(!(276828160&n.transformFlags))return n;switch(n.kind){case 248:return B(n,!1);case 244:return function(e){return t.updateExpressionStatement(e,qB(e.expression,q,Xu))}(n);case 217:return function(e,n){return t.updateParenthesizedExpression(e,qB(e.expression,n?q:$,Xu))}(n,r);case 354:return function(e,n){return t.updatePartiallyEmittedExpression(e,qB(e.expression,n?q:$,Xu))}(n,r);case 226:if(hb(n))return function(t,n){return V(t.left)?iz(t,$,e,0,!n):ZB(t,$,e)}(n,r);break;case 213:if(uf(n))return function(e){const n=kA(t,e,m,s,a,o),r=qB(Se(e.arguments),$,Xu),i=!n||r&&wD(r)&&r.text===n.text?r:n;return t.createCallExpression(t.createPropertyAccessExpression(y,t.createIdentifier("import")),void 0,i?[i]:[])}(n);break;case 224:case 225:return function(n,r){if((46===n.operator||47===n.operator)&&qD(n.operand)&&!Xl(n.operand)&&!iA(n.operand)&&!cx(n.operand)){const e=K(n.operand);if(e){let o,a=qB(n.operand,$,Xu);cP(n)?a=t.updatePrefixUnaryExpression(n,a):(a=t.updatePostfixUnaryExpression(n,a),r||(o=t.createTempVariable(i),a=t.createAssignment(o,a),sI(a,n)),a=t.createComma(a,t.cloneNode(n.operand)),sI(a,n));for(const t of e)a=j(t,W(a));return o&&(a=t.createComma(a,o),sI(a,n)),a}}return ZB(n,$,e)}(n,r)}return ZB(n,$,e)}function $(e){return z(e,!1)}function q(e){return z(e,!0)}function V(e){if(mb(e,!0))return V(e.left);if(fP(e))return V(e.expression);if(HE(e))return Q(e.properties,V);if(WE(e))return Q(e.elements,V);if(JN(e))return V(e.name);if(BN(e))return V(e.initializer);if(qD(e)){const t=a.getReferencedExportContainer(e);return void 0!==t&&307===t.kind}return!1}function U(e){switch(e.kind){case 95:case 90:return}return e}function K(e){let n;const r=function(e){if(!Xl(e)){const t=a.getReferencedImportDeclaration(e);if(t)return t;const n=a.getReferencedValueDeclaration(e);if(n&&(null==g?void 0:g.exportedBindings[SJ(n)]))return n;const r=a.getReferencedValueDeclarations(e);if(r)for(const e of r)if(e!==n&&(null==g?void 0:g.exportedBindings[SJ(e)]))return e;return n}}(e);if(r){const i=a.getReferencedExportContainer(e,!1);i&&307===i.kind&&(n=ue(n,t.getDeclarationName(r))),n=pe(n,null==g?void 0:g.exportedBindings[SJ(r)])}else if(Xl(e)&&Yl(e)){const t=null==g?void 0:g.exportSpecifiers.get(e);if(t){const e=[];for(const n of t)e.push(n.name);return e}}return n}function W(e){return void 0===x&&(x=[]),x[IB(e)]=!0,e}}function r$(e){const{factory:t,getEmitHelperFactory:n}=e,r=e.getEmitHost(),i=e.getEmitResolver(),o=e.getCompilerOptions(),a=wS(o),s=e.onEmitNode,c=e.onSubstituteNode;let l,u,_;return e.onEmitNode=function(e,t,n){qN(t)?((qI(t)||NS(o))&&o.importHelpers&&(l=new Map),s(e,t,n),l=void 0):s(e,t,n)},e.onSubstituteNode=function(e,n){return n=c(e,n),l&&qD(n)&&8192&Yd(n)?function(e){const n=bc(e);let r=l.get(n);return r||l.set(n,r=t.createUniqueName(n,48)),r}(n):n},e.enableEmitNotification(307),e.enableSubstitution(80),CJ(e,(function(r){if(r.isDeclarationFile)return r;if(qI(r)||NS(o)){u=r,_=void 0;let i=function(r){const i=bA(t,n(),r,o);if(i){const e=[],n=t.copyPrologue(r.statements,e);return ue(e,i),pe(e,VB(r.statements,d,b_,n)),t.updateSourceFile(r,sI(t.createNodeArray(e),r.statements))}return ZB(r,d,e)}(r);return u=void 0,_&&(i=t.updateSourceFile(i,sI(t.createNodeArray(Rd(i.statements.slice(),_)),i.statements))),!qI(r)||200===DS(o)||Q(i.statements,r_)?i:t.updateSourceFile(i,sI(t.createNodeArray([...i.statements,VF(t)]),i.statements))}return r}));function d(e){switch(e.kind){case 271:return DS(o)>=100?function(e){let n;return xn.assert(Em(e),"import= for internal module references should be handled in an earlier transformer."),n=ue(n,ew(sI(t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.cloneNode(e.name),void 0,void 0,p(e))],a>=2?2:0)),e),e)),n=function(e,n){return Bv(n,32)&&(e=ue(e,t.createExportDeclaration(void 0,n.isTypeOnly,t.createNamedExports([t.createExportSpecifier(!1,void 0,bc(n.name))])))),e}(n,e),Ne(n)}(e):void 0;case 277:return function(e){return e.isExportEquals?200===DS(o)?ew(t.createExpressionStatement(t.createAssignment(t.createPropertyAccessExpression(t.createIdentifier("module"),"exports"),e.expression)),e):void 0:e}(e);case 278:return function(e){if(void 0!==o.module&&o.module>5)return e;if(!e.exportClause||!dN(e.exportClause)||!e.moduleSpecifier)return e;const n=e.exportClause.name,r=t.getGeneratedNameForNode(n),i=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamespaceImport(r)),e.moduleSpecifier,e.attributes);ew(i,e.exportClause);const a=Wd(e)?t.createExportDefault(r):t.createExportDeclaration(void 0,!1,t.createNamedExports([t.createExportSpecifier(!1,r,n)]));return ew(a,e),[i,a]}(e)}return e}function p(e){const n=kA(t,e,xn.checkDefined(u),r,i,o),s=[];if(n&&s.push(n),200===DS(o))return t.createCallExpression(t.createIdentifier("require"),void 0,s);if(!_){const e=t.createUniqueName("_createRequire",48),n=t.createImportDeclaration(void 0,t.createImportClause(!1,void 0,t.createNamedImports([t.createImportSpecifier(!1,t.createIdentifier("createRequire"),e)])),t.createStringLiteral("module"),void 0),r=t.createUniqueName("__require",48),i=t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(r,void 0,void 0,t.createCallExpression(t.cloneNode(e),void 0,[t.createPropertyAccessExpression(t.createMetaProperty(102,t.createIdentifier("meta")),t.createIdentifier("url"))]))],a>=2?2:0));_=[n,i]}const c=_[1].declarationList.declarations[0].name;return xn.assertNode(c,qD),t.createCallExpression(t.cloneNode(c),void 0,s)}}function i$(e){const t=e.onSubstituteNode,n=e.onEmitNode,r=r$(e),i=e.onSubstituteNode,o=e.onEmitNode;e.onSubstituteNode=t,e.onEmitNode=n;const a=e$(e),s=e.onSubstituteNode,c=e.onEmitNode;let l;return e.onSubstituteNode=function(e,n){return qN(n)?(l=n,t(e,n)):l?99===l.impliedNodeFormat?i(e,n):s(e,n):t(e,n)},e.onEmitNode=function(e,t,r){return qN(t)&&(l=t),l?99===l.impliedNodeFormat?o(e,t,r):c(e,t,r):n(e,t,r)},e.enableSubstitution(307),e.enableEmitNotification(307),function(t){return 307===t.kind?u(t):function(t){return e.factory.createBundle(O(t.sourceFiles,u))}(t)};function u(e){if(e.isDeclarationFile)return e;l=e;const t=(99===e.impliedNodeFormat?r:a)(e);return l=void 0,xn.assert(qN(t)),t}}function o$(e){return KP(e)||uE(e)||lE(e)||KE(e)||A_(e)||I_(e)||yE(e)||hE(e)||dE(e)||_E(e)||HP(e)||sE(e)||aE(e)||hP(e)||rN(e)||QP(e)||fE(e)||vE(e)||GE(e)||XE(e)||uP(e)||Fg(e)}function a$(e){return A_(e)||I_(e)?function(t){const n=function(t){return Jv(e)?t.errorModuleName?2===t.accessibility?va.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind?t.errorModuleName?2===t.accessibility?va.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Property_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:_E(e)||dE(e)?function(t){const n=function(t){return Jv(e)?t.errorModuleName?2===t.accessibility?va.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind?t.errorModuleName?2===t.accessibility?va.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_method_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Method_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:s$(e)}function s$(e){return KP(e)||uE(e)||lE(e)||GE(e)||XE(e)||uP(e)||KE(e)||fE(e)?t:A_(e)||I_(e)?function(t){let n;return n=178===e.kind?Jv(e)?t.errorModuleName?va.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:Jv(e)?t.errorModuleName?2===t.accessibility?va.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?2===t.accessibility?va.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1,{diagnosticMessage:n,errorNode:e.name,typeName:e.name}}:yE(e)||hE(e)||dE(e)||_E(e)||HP(e)||vE(e)?function(t){let n;switch(e.kind){case 180:n=t.errorModuleName?va.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 179:n=t.errorModuleName?va.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 181:n=t.errorModuleName?va.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 174:case 173:n=Jv(e)?t.errorModuleName?2===t.accessibility?va.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:va.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:263===e.parent.kind?t.errorModuleName?2===t.accessibility?va.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:va.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t.errorModuleName?va.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 262:n=t.errorModuleName?2===t.accessibility?va.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:va.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:va.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return xn.fail("This is unknown kind for signature: "+e.kind)}return{diagnosticMessage:n,errorNode:e.name||e}}:sE(e)?rc(e,e.parent)&&Bv(e.parent,2)?t:function(t){const n=function(t){switch(e.parent.kind){case 176:return t.errorModuleName?2===t.accessibility?va.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 180:case 185:return t.errorModuleName?va.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 179:return t.errorModuleName?va.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 181:return t.errorModuleName?va.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 174:case 173:return Jv(e.parent)?t.errorModuleName?2===t.accessibility?va.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:263===e.parent.parent.kind?t.errorModuleName?2===t.accessibility?va.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 262:case 184:return t.errorModuleName?2===t.accessibility?va.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_exported_function_has_or_is_using_private_name_1;case 178:case 177:return t.errorModuleName?2===t.accessibility?va.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:va.Parameter_0_of_accessor_has_or_is_using_private_name_1;default:return xn.fail(`Unknown parent for parameter: ${xn.formatSyntaxKind(e.parent.kind)}`)}}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}:aE(e)?function(){let t;switch(e.parent.kind){case 263:t=va.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 264:t=va.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 200:t=va.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 185:case 180:t=va.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 179:t=va.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 174:case 173:t=Jv(e.parent)?va.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:263===e.parent.parent.kind?va.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:va.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 184:case 262:t=va.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 195:t=va.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;break;case 265:t=va.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return xn.fail("This is unknown parent for type parameter: "+e.parent.kind)}return{diagnosticMessage:t,errorNode:e,typeName:e.name}}:hP(e)?function(){let t;return t=GP(e.parent.parent)?jN(e.parent)&&119===e.parent.token?va.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.parent.parent.name?va.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:va.extends_clause_of_exported_class_has_or_is_using_private_name_0:va.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1,{diagnosticMessage:t,errorNode:e,typeName:Pc(e.parent.parent)}}:rN(e)?function(){return{diagnosticMessage:va.Import_declaration_0_is_using_private_name_1,errorNode:e,typeName:e.name}}:QP(e)||Fg(e)?function(t){return{diagnosticMessage:t.errorModuleName?va.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:va.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:Fg(e)?xn.checkDefined(e.typeExpression):e.type,typeName:Fg(e)?Pc(e):e.name}}:xn.assertNever(e,`Attempted to set a declaration diagnostic context for unhandled node kind: ${xn.formatSyntaxKind(e.kind)}`);function t(t){const n=function(t){return 260===e.kind||208===e.kind?t.errorModuleName?2===t.accessibility?va.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:va.Exported_variable_0_has_or_is_using_private_name_1:172===e.kind||211===e.kind||212===e.kind||226===e.kind||171===e.kind||169===e.kind&&Bv(e.parent,2)?Jv(e)?t.errorModuleName?2===t.accessibility?va.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:263===e.parent.kind||169===e.kind?t.errorModuleName?2===t.accessibility?va.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:va.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:va.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?va.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:va.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}(t);return void 0!==n?{diagnosticMessage:n,errorNode:e,typeName:e.name}:void 0}}function c$(e){const t={219:va.Add_a_return_type_to_the_function_expression,218:va.Add_a_return_type_to_the_function_expression,174:va.Add_a_return_type_to_the_method,177:va.Add_a_return_type_to_the_get_accessor_declaration,178:va.Add_a_type_to_parameter_of_the_set_accessor_declaration,262:va.Add_a_return_type_to_the_function_declaration,180:va.Add_a_return_type_to_the_function_declaration,169:va.Add_a_type_annotation_to_the_parameter_0,260:va.Add_a_type_annotation_to_the_variable_0,172:va.Add_a_type_annotation_to_the_property_0,171:va.Add_a_type_annotation_to_the_property_0,277:va.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it},n={218:va.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,262:va.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,219:va.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,174:va.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,180:va.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,177:va.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,178:va.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations,169:va.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations,260:va.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations,172:va.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,171:va.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations,167:va.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations,305:va.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations,304:va.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations,209:va.Only_const_arrays_can_be_inferred_with_isolatedDeclarations,277:va.Default_exports_can_t_be_inferred_with_isolatedDeclarations,230:va.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations};return function(r){if(mc(r,jN))return Rp(r,va.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations);if((wf(r)||TE(r.parent))&&(ou(r)||vb(r)))return function(e){const t=Rp(e,va.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations,Gd(e,!1));return o(e,t),t}(r);switch(xn.type(r),r.kind){case 177:case 178:return i(r);case 167:case 304:case 305:return function(e){const t=Rp(e,n[e.kind]);return o(e,t),t}(r);case 209:case 230:return function(e){const t=Rp(e,n[e.kind]);return o(e,t),t}(r);case 174:case 180:case 218:case 219:case 262:return function(e){const r=Rp(e,n[e.kind]);return o(e,r),fT(r,Rp(e,t[e.kind])),r}(r);case 208:return function(e){return Rp(e,va.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations)}(r);case 172:case 260:return function(e){const r=Rp(e,n[e.kind]),i=Gd(e.name,!1);return fT(r,Rp(e,t[e.kind],i)),r}(r);case 169:return function(r){if(A_(r.parent))return i(r.parent);const o=e.requiresAddingImplicitUndefined(r);if(!o&&r.initializer)return a(r.initializer);const s=Rp(r,o?va.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations:n[r.kind]),c=Gd(r.name,!1);return fT(s,Rp(r,t[r.kind],c)),s}(r);case 303:return a(r.initializer);case 231:return function(e){return a(e,va.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations)}(r);default:return a(r)}};function r(e){const t=mc(e,(e=>mN(e)||b_(e)||KP(e)||uE(e)||sE(e)));if(t)return mN(t)?t:BP(t)?mc(t,(e=>uu(e)&&!fE(e))):b_(t)?void 0:t}function i(e){const{getAccessor:r,setAccessor:i}=Sv(e.symbol.declarations,e),o=Rp((A_(e)?e.parameters[0]:e)??e,n[e.kind]);return i&&fT(o,Rp(i,t[i.kind])),r&&fT(o,Rp(r,t[r.kind])),o}function o(e,n){const i=r(e);if(i){const e=mN(i)||!i.name?"":Gd(i.name,!1);fT(n,Rp(i,t[i.kind],e))}return n}function a(e,i){const o=r(e);let a;if(o){const r=mN(o)||!o.name?"":Gd(o.name,!1);o===mc(e.parent,(e=>mN(e)||(b_(e)?"quit":!tP(e)&&!eP(e)&&!yP(e))))?(a=Rp(e,i??n[o.kind]),fT(a,Rp(o,t[o.kind],r))):(a=Rp(e,i??va.Expression_type_can_t_be_inferred_with_isolatedDeclarations),fT(a,Rp(o,t[o.kind],r)),fT(a,Rp(e,va.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit)))}else a=Rp(e,i??va.Expression_type_can_t_be_inferred_with_isolatedDeclarations);return a}}function l$(e,t,n){const r=e.getCompilerOptions(),i=F(iv(e,n),jm);return T$(t,e,YC,r,n?D(i,n)?[n]:u:i,[_$],!1).diagnostics}var u$=531469;function _$(e){const t=()=>xn.fail("Diagnostic emitted without context");let n,r,i,o,a=t,s=!0,c=!1,l=!1,_=!1,d=!1;const{factory:m}=e,g=e.getEmitHost(),h={trackSymbol:function(e,t,n){return!(262144&e.flags)&&I(T.isSymbolAccessible(e,t,n,!0))},reportInaccessibleThisError:function(){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,M(),"this"))},reportInaccessibleUniqueSymbolError:function(){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,M(),"unique symbol"))},reportCyclicStructureError:function(){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary,M()))},reportPrivateInBaseOfClassExpression:function(t){(y||v)&&e.addDiagnostic(Rp(y||v,va.Property_0_of_exported_class_expression_may_not_be_private_or_protected,t))},reportLikelyUnsafeImportRequiredError:function(t){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,M(),t))},reportTruncationError:function(){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed))},moduleResolverHost:g,reportNonlocalAugmentation:function(t,n,r){var i;const o=null==(i=n.declarations)?void 0:i.find((e=>Sd(e)===t)),a=F(r.declarations,(e=>Sd(e)!==t));if(o&&a)for(const t of a)e.addDiagnostic(fT(Rp(t,va.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized),Rp(o,va.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)))},reportNonSerializableProperty:function(t){(y||v)&&e.addDiagnostic(Rp(y||v,va.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized,t))},reportInferenceFallback:A};let y,v,b,x,S,k;const T=e.getEmitResolver(),C=e.getCompilerOptions(),w=c$(T),{stripInternal:E,isolatedDeclarations:P}=C;return function(u){if(307===u.kind&&u.isDeclarationFile)return u;if(308===u.kind){c=!0,x=[],S=[],k=[];let p=!1;const f=m.createBundle(O(u.sourceFiles,(c=>{if(c.isDeclarationFile)return;if(p=p||c.hasNoDefaultLib,b=c,n=c,r=void 0,o=!1,i=new Map,a=t,_=!1,d=!1,h(c),Zp(c)||ef(c)){l=!1,s=!1;const t=Im(c)?m.createNodeArray(L(c)):VB(c.statements,oe,b_);return m.updateSourceFile(c,[m.createModuleDeclaration([m.createModifier(138)],m.createStringLiteral(Hy(e.getEmitHost(),c)),m.createModuleBlock(sI(m.createNodeArray(re(t)),c.statements)))],!0,[],[],!1,[])}s=!0;const u=Im(c)?m.createNodeArray(L(c)):VB(c.statements,oe,b_);return m.updateSourceFile(c,re(u),!0,[],[],!1,[])}))),y=Ro(Vo(F$(u,g,!0).declarationFilePath));return f.syntheticFileReferences=C(y),f.syntheticTypeReferences=v(),f.syntheticLibReferences=T(),f.hasNoDefaultLib=p,f}let p;if(s=!0,_=!1,d=!1,n=u,b=u,a=t,c=!1,l=!1,o=!1,r=void 0,i=new Map,x=[],S=[],k=[],h(b),Im(b))p=m.createNodeArray(L(u));else{const e=VB(u.statements,oe,b_);p=sI(m.createNodeArray(re(e)),u.statements),qI(u)&&(!l||_&&!d)&&(p=sI(m.createNodeArray([...p,VF(m)]),p))}const f=Ro(Vo(F$(u,g,!0).declarationFilePath));return m.updateSourceFile(u,p,!0,C(f),v(),u.hasNoDefaultLib,T());function h(e){x=Z(x,O(e.referencedFiles,(t=>[e,t]))),S=Z(S,e.typeReferenceDirectives),k=Z(k,e.libReferenceDirectives)}function y(e){const t={...e};return t.pos=-1,t.end=-1,t}function v(){return q(S,(e=>{if(e.preserve)return y(e)}))}function T(){return q(k,(e=>{if(e.preserve)return y(e)}))}function C(e){return q(x,(([t,n])=>{if(!n.preserve)return;const r=g.getSourceFileFromReference(t,n);if(!r)return;let i;if(r.isDeclarationFile)i=r.fileName;else{if(c&&D(u.sourceFiles,r))return;const e=F$(r,g,!0);i=e.declarationFilePath||e.jsFilePath||r.fileName}if(!i)return;const o=ma(e,i,g.getCurrentDirectory(),g.getCanonicalFileName,!1),a=y(n);return a.fileName=o,a}))}};function N(t){T.getPropertiesOfContainerFunction(t).forEach((t=>{if(hC(t.valueDeclaration)){const n=uP(t.valueDeclaration)?t.valueDeclaration.left:t.valueDeclaration;e.addDiagnostic(Rp(n,va.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function))}}))}function A(t){P&&!Im(b)&&(KP(t)&&T.isExpandoFunctionDeclaration(t)?N(t):e.addDiagnostic(w(t)))}function I(t){if(0===t.accessibility){if(t.aliasesToMakeVisible)if(r)for(const e of t.aliasesToMakeVisible)fe(r,e);else r=t.aliasesToMakeVisible}else if(3!==t.accessibility){const n=a(t);if(n)return n.typeName?e.addDiagnostic(Rp(t.errorNode||n.errorNode,n.diagnosticMessage,Gd(n.typeName),t.errorSymbolName,t.errorModuleName)):e.addDiagnostic(Rp(t.errorNode||n.errorNode,n.diagnosticMessage,t.errorSymbolName,t.errorModuleName)),!0}return!1}function M(){return y?Ap(y):v&&Pc(v)?Ap(Pc(v)):v&&mN(v)?v.isExportEquals?"export=":"default":"(Missing)"}function L(e){const t=a;a=t=>t.errorNode&&o$(t.errorNode)?s$(t.errorNode)(t):{diagnosticMessage:t.errorModuleName?va.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:va.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit,errorNode:t.errorNode||e};const n=T.getDeclarationStatementsForSourceFile(e,u$,h);return a=t,n}function B(e){return 80===e.kind?e:207===e.kind?m.updateArrayBindingPattern(e,VB(e.elements,t,Nu)):m.updateObjectBindingPattern(e,VB(e.elements,t,KE));function t(e){return 232===e.kind?e:(e.propertyName&&oE(e.propertyName)&&vb(e.propertyName.expression)&&Y(e.propertyName.expression,n),m.updateBindingElement(e,e.dotDotDotToken,e.propertyName,B(e.name),void 0))}}function J(e,t,n){let r;o||(r=a,a=s$(e));const i=m.updateParameterDeclaration(e,function(e,t,n,r){return e.createModifiersFromModifierFlags(d$(t,n,void 0))}(m,e,t),e.dotDotDotToken,B(e.name),T.isOptionalParameter(e)?e.questionToken||m.createToken(58):void 0,V(e,n||e.type,!0),$(e));return o||(a=r),i}function z(e){return f$(e)&&!!e.initializer&&T.isLiteralConstDeclaration(hc(e))}function $(e){if(z(e))return DC(EC(e.initializer))||A(e),T.createLiteralConstValue(hc(e,f$),h)}function V(e,t,r){if(!r&&Rv(e,2))return;if(z(e))return;const i=169===e.kind&&T.requiresAddingImplicitUndefined(e);if(t&&!i)return qB(t,ie,wu);let s,c;switch(y=e.name,o||(s=a,a=s$(e)),e.kind){case 169:case 171:case 172:case 208:case 260:c=T.createTypeOfDeclaration(e,n,u$,h);break;case 262:case 180:case 173:case 174:case 177:case 179:c=T.createReturnTypeOfSignatureDeclaration(e,n,u$,h);break;default:xn.assertNever(e)}return y=void 0,o||(a=s),c??m.createKeywordTypeNode(133)}function U(e){switch((e=hc(e)).kind){case 262:case 267:case 264:case 263:case 265:case 266:return!T.isDeclarationVisible(e);case 260:return!K(e);case 271:case 272:case 278:case 277:return!1;case 175:return!0}return!1}function K(e){return!gP(e)&&(Eu(e.name)?Q(e.name.elements,K):T.isDeclarationVisible(e))}function W(e,t,n){if(Rv(e,2))return m.createNodeArray();const r=O(t,(e=>J(e,n)));return r?m.createNodeArray(r,t.hasTrailingComma):m.createNodeArray()}function H(e,t){let n;if(!t){const t=gv(e);t&&(n=[J(t)])}if(gE(e)){let r;if(!t){const t=fv(e);t&&(r=J(t,void 0,ge(e,Sv(HE(e.parent)?e.parent.properties:e.parent.members,e))))}r||(r=m.createParameterDeclaration(void 0,void 0,"value")),n=ue(n,r)}return m.createNodeArray(n||u)}function G(e,t){return Rv(e,2)?void 0:VB(t,ie,aE)}function X(e){return qN(e)||QP(e)||ZP(e)||GP(e)||XP(e)||cu(e)||vE(e)||BE(e)}function Y(e,t){I(T.isEntityNameVisible(e,t))}function ee(e,t){return O_(e)&&O_(t)&&(e.jsDoc=t.jsDoc),mw(e,fw(t))}function te(t,n){if(n){if(l=l||267!==t.kind&&205!==t.kind,$_(n)&&c){const n=Xy(e.getEmitHost(),T,t);if(n)return m.createStringLiteral(n)}return n}}function ne(e){const t=Kq(e);return e&&void 0!==t?e:void 0}function re(e){for(;p(r);){const e=r.shift();if(!wp(e))return xn.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${xn.formatSyntaxKind(e.kind)}`);const t=s;s=e.parent&&qN(e.parent)&&!(qI(e.parent)&&c);const n=le(e);s=t,i.set(SJ(e),n)}return VB(e,(function(e){if(wp(e)){const t=SJ(e);if(i.has(t)){const n=i.get(t);return i.delete(t),n&&((ot(n)?Q(n,n_):n_(n))&&(_=!0),qN(e.parent)&&(ot(n)?Q(n,r_):r_(n))&&(l=!0)),n}}return e}),b_)}function ie(t){if(de(t))return;if(h_(t)){if(U(t))return;if(Vh(t))if(P){if(GP(t.parent)||HE(t.parent))return void e.addDiagnostic(Rp(t,va.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations));if((XP(t.parent)||CE(t.parent))&&!vb(t.name.expression))return void e.addDiagnostic(Rp(t,va.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations))}else if(!T.isLateBound(hc(t))||!vb(t.name.expression))return}if(cu(t)&&T.isImplementationOfOverload(t))return;if(wP(t))return;let r;X(t)&&(r=n,n=t);const i=a,s=o$(t),c=o;let l=(187===t.kind||200===t.kind)&&265!==t.parent.kind;if((dE(t)||_E(t))&&Rv(t,2)){if(t.symbol&&t.symbol.declarations&&t.symbol.declarations[0]!==t)return;return _(m.createPropertyDeclaration(me(t),t.name,void 0,void 0,void 0))}if(s&&!o&&(a=s$(t)),TE(t)&&Y(t.exprName,n),l&&(o=!0),function(e){switch(e.kind){case 180:case 176:case 174:case 177:case 178:case 172:case 171:case 173:case 179:case 181:case 260:case 168:case 233:case 183:case 194:case 184:case 185:case 205:return!0}return!1}(t))switch(t.kind){case 233:{(ou(t.expression)||vb(t.expression))&&Y(t.expression,n);const r=ZB(t,ie,e);return _(m.updateExpressionWithTypeArguments(r,r.expression,r.typeArguments))}case 183:{Y(t.typeName,n);const r=ZB(t,ie,e);return _(m.updateTypeReferenceNode(r,r.typeName,r.typeArguments))}case 180:return _(m.updateConstructSignature(t,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type)));case 176:return _(m.createConstructorDeclaration(me(t),W(t,t.parameters,0),void 0));case 174:return VD(t.name)?_(void 0):_(m.createMethodDeclaration(me(t),void 0,t.name,t.questionToken,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type),void 0));case 177:{if(VD(t.name))return _(void 0);const e=ge(t,Sv(HE(t.parent)?t.parent.properties:t.parent.members,t));return _(m.updateGetAccessorDeclaration(t,me(t),t.name,H(t,Rv(t,2)),V(t,e),void 0))}case 178:return VD(t.name)?_(void 0):_(m.updateSetAccessorDeclaration(t,me(t),t.name,H(t,Rv(t,2)),void 0));case 172:return VD(t.name)?_(void 0):_(m.updatePropertyDeclaration(t,me(t),t.name,t.questionToken,V(t,t.type),$(t)));case 171:return VD(t.name)?_(void 0):_(m.updatePropertySignature(t,me(t),t.name,t.questionToken,V(t,t.type)));case 173:return VD(t.name)?_(void 0):_(m.updateMethodSignature(t,me(t),t.name,t.questionToken,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type)));case 179:return _(m.updateCallSignature(t,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type)));case 181:return _(m.updateIndexSignature(t,me(t),W(t,t.parameters),qB(t.type,ie,wu)||m.createKeywordTypeNode(133)));case 260:return Eu(t.name)?_e(t.name):(l=!0,o=!0,_(m.updateVariableDeclaration(t,t.name,void 0,V(t,t.type),$(t))));case 168:return 174===(u=t).parent.kind&&Rv(u.parent,2)&&(t.default||t.constraint)?_(m.updateTypeParameterDeclaration(t,t.modifiers,t.name,void 0,void 0)):_(ZB(t,ie,e));case 194:{const e=qB(t.checkType,ie,wu),r=qB(t.extendsType,ie,wu),i=n;n=t.trueType;const o=qB(t.trueType,ie,wu);n=i;const a=qB(t.falseType,ie,wu);return xn.assert(e),xn.assert(r),xn.assert(o),xn.assert(a),_(m.updateConditionalTypeNode(t,e,r,o,a))}case 184:return _(m.updateFunctionTypeNode(t,VB(t.typeParameters,ie,aE),W(t,t.parameters),xn.checkDefined(qB(t.type,ie,wu))));case 185:return _(m.updateConstructorTypeNode(t,me(t),VB(t.typeParameters,ie,aE),W(t,t.parameters),xn.checkDefined(qB(t.type,ie,wu))));case 205:return df(t)?_(m.updateImportTypeNode(t,m.updateLiteralTypeNode(t.argument,te(t,t.argument.literal)),t.attributes,t.qualifier,VB(t.typeArguments,ie,wu),t.isTypeOf)):_(t);default:xn.assertNever(t,`Attempted to process unhandled node kind: ${xn.formatSyntaxKind(t.kind)}`)}var u;return DE(t)&&Xa(b,t.pos).line===Xa(b,t.end).line&&iw(t,1),_(ZB(t,ie,e));function _(e){return e&&s&&Vh(t)&&function(e){let t;o||(t=a,a=a$(e)),y=e.name,xn.assert(Vh(e)),Y(e.name.expression,n),o||(a=t),y=void 0}(t),X(t)&&(n=r),s&&!o&&(a=i),l&&(o=c),e===t?e:e&&ew(ee(e,t),t)}}function oe(e){if(!function(e){switch(e.kind){case 262:case 267:case 271:case 264:case 263:case 265:case 266:case 243:case 272:case 278:case 277:return!0}return!1}(e))return;if(de(e))return;switch(e.kind){case 278:return qN(e.parent)&&(l=!0),d=!0,m.updateExportDeclaration(e,e.modifiers,e.isTypeOnly,e.exportClause,te(e,e.moduleSpecifier),ne(e.attributes));case 277:if(qN(e.parent)&&(l=!0),d=!0,80===e.expression.kind)return e;{const t=m.createUniqueName("_default",16);a=()=>({diagnosticMessage:va.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:e}),v=e;const n=m.createVariableDeclaration(t,void 0,T.createTypeOfExpression(e.expression,e,u$,h),void 0);v=void 0;const r=m.createVariableStatement(s?[m.createModifier(138)]:[],m.createVariableDeclarationList([n],2));return ee(r,e),rw(e),[r,m.updateExportAssignment(e,e.modifiers,t)]}}const t=le(e);return i.set(SJ(e),t),e}function ae(e){if(rN(e)||Rv(e,2048)||!cI(e))return e;const t=m.createModifiersFromModifierFlags(131039&Qv(e));return m.replaceModifiers(e,t)}function se(e,t,n,r){const i=m.updateModuleDeclaration(e,t,n,r);if(sp(i)||32&i.flags)return i;const o=m.createModuleDeclaration(i.modifiers,i.name,i.body,32|i.flags);return ew(o,i),sI(o,i),o}function le(t){if(r)for(;Qt(r,t););if(de(t))return;switch(t.kind){case 271:return function(e){if(T.isDeclarationVisible(e)){if(283===e.moduleReference.kind){const t=Pm(e);return m.updateImportEqualsDeclaration(e,e.modifiers,e.isTypeOnly,e.name,m.updateExternalModuleReference(e.moduleReference,te(e,t)))}{const t=a;return a=s$(e),Y(e.moduleReference,n),a=t,e}}}(t);case 272:return function(t){if(!t.importClause)return m.updateImportDeclaration(t,t.modifiers,t.importClause,te(t,t.moduleSpecifier),ne(t.attributes));const n=t.importClause&&t.importClause.name&&T.isDeclarationVisible(t.importClause)?t.importClause.name:void 0;if(!t.importClause.namedBindings)return n&&m.updateImportDeclaration(t,t.modifiers,m.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,void 0),te(t,t.moduleSpecifier),ne(t.attributes));if(274===t.importClause.namedBindings.kind){const e=T.isDeclarationVisible(t.importClause.namedBindings)?t.importClause.namedBindings:void 0;return n||e?m.updateImportDeclaration(t,t.modifiers,m.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,e),te(t,t.moduleSpecifier),ne(t.attributes)):void 0}const r=q(t.importClause.namedBindings.elements,(e=>T.isDeclarationVisible(e)?e:void 0));return r&&r.length||n?m.updateImportDeclaration(t,t.modifiers,m.updateImportClause(t.importClause,t.importClause.isTypeOnly,n,r&&r.length?m.updateNamedImports(t.importClause.namedBindings,r):void 0),te(t,t.moduleSpecifier),ne(t.attributes)):T.isImportRequiredByAugmentation(t)?(P&&e.addDiagnostic(Rp(t,va.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)),m.updateImportDeclaration(t,t.modifiers,void 0,te(t,t.moduleSpecifier),ne(t.attributes))):void 0}(t)}if(h_(t)&&U(t))return;if(AF(t))return;if(cu(t)&&T.isImplementationOfOverload(t))return;let o;X(t)&&(o=n,n=t);const c=o$(t),u=a;c&&(a=s$(t));const g=s;switch(t.kind){case 265:{s=!1;const e=b(m.updateTypeAliasDeclaration(t,me(t),t.name,VB(t.typeParameters,ie,aE),xn.checkDefined(qB(t.type,ie,wu))));return s=g,e}case 264:return b(m.updateInterfaceDeclaration(t,me(t),t.name,G(t,t.typeParameters),he(t.heritageClauses),VB(t.members,ie,ku)));case 262:{const e=b(m.updateFunctionDeclaration(t,me(t),void 0,t.name,G(t,t.typeParameters),W(t,t.parameters),V(t,t.type),void 0));if(e&&T.isExpandoFunctionDeclaration(t)&&function(e){var t;if(e.body)return!0;const n=null==(t=e.symbol.declarations)?void 0:t.filter((e=>HP(e)&&!e.body));return!n||n.indexOf(e)===n.length-1}(t)){const r=T.getPropertiesOfContainerFunction(t);P&&N(t);const i=_I.createModuleDeclaration(void 0,e.name||m.createIdentifier("_default"),m.createModuleBlock([]),32);OT(i,n),i.locals=ed(r),i.symbol=r[0].parent;const o=[];let s=q(r,(e=>{if(!hC(e.valueDeclaration))return;const t=vc(e.escapedName);if(!Ts(t,99))return;a=s$(e.valueDeclaration);const n=T.createTypeOfDeclaration(e.valueDeclaration,i,-2146952179,h);a=u;const r=Mh(t),s=r?m.getGeneratedNameForNode(e.valueDeclaration):m.createIdentifier(t);r&&o.push([s,t]);const c=m.createVariableDeclaration(s,void 0,n,void 0);return m.createVariableStatement(r?void 0:[m.createToken(95)],m.createVariableDeclarationList([c]))}));o.length?s.push(m.createExportDeclaration(void 0,!1,m.createNamedExports(O(o,(([e,t])=>m.createExportSpecifier(!1,e,t)))))):s=q(s,(e=>m.replaceModifiers(e,0)));const c=m.createModuleDeclaration(me(t),t.name,m.createModuleBlock(s),32);if(!Rv(e,2048))return[e,c];const _=m.createModifiersFromModifierFlags(-2081&Qv(e)|128),p=m.updateFunctionDeclaration(e,_,void 0,e.name,e.typeParameters,e.parameters,e.type,void 0),f=m.updateModuleDeclaration(c,_,c.name,c.body),g=m.createExportAssignment(void 0,!1,c.name);return qN(t.parent)&&(l=!0),d=!0,[p,f,g]}return e}case 267:{s=!1;const e=t.body;if(e&&268===e.kind){const n=_,r=d;d=!1,_=!1;let i=re(VB(e.statements,oe,b_));33554432&t.flags&&(_=!1),pp(t)||Q(i,pe)||d||(i=_?m.createNodeArray([...i,VF(m)]):VB(i,ae,b_));const o=m.updateModuleBlock(e,i);s=g,_=n,d=r;const a=me(t);return b(se(t,a,fp(t)?te(t,t.name):t.name,o))}{s=g;const n=me(t);s=!1,qB(e,oe);const r=SJ(e),o=i.get(r);return i.delete(r),b(se(t,n,t.name,o))}}case 263:{y=t.name,v=t;const e=m.createNodeArray(me(t)),n=G(t,t.typeParameters),r=pv(t);let i;if(r){const e=a;i=ce(R(r.parameters,(e=>{if(Bv(e,31)&&!de(e))return a=s$(e),80===e.name.kind?ee(m.createPropertyDeclaration(me(e),e.name,e.questionToken,V(e,e.type),$(e)),e):function t(n){let r;for(const i of n.elements)gP(i)||(Eu(i.name)&&(r=Z(r,t(i.name))),r=r||[],r.push(m.createPropertyDeclaration(me(e),i.name,void 0,V(i,void 0),void 0)));return r}(e.name)}))),a=e}const o=Z(Z(Q(t.members,(e=>!!e.name&&VD(e.name)))?[m.createPropertyDeclaration(void 0,m.createPrivateIdentifier("#private"),void 0,void 0,void 0)]:void 0,i),VB(t.members,ie,mu)),c=m.createNodeArray(o),l=Sh(t);if(l&&!vb(l.expression)&&106!==l.expression.kind){const r=t.name?vc(t.name.escapedText):"default",i=m.createUniqueName(`${r}_base`,16);a=()=>({diagnosticMessage:va.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,errorNode:l,typeName:t.name});const o=m.createVariableDeclaration(i,void 0,T.createTypeOfExpression(l.expression,t,u$,h),void 0),u=m.createVariableStatement(s?[m.createModifier(138)]:[],m.createVariableDeclarationList([o],2)),_=m.createNodeArray(O(t.heritageClauses,(e=>{if(96===e.token){const t=a;a=s$(e.types[0]);const n=m.updateHeritageClause(e,O(e.types,(e=>m.updateExpressionWithTypeArguments(e,i,VB(e.typeArguments,ie,wu)))));return a=t,n}return m.updateHeritageClause(e,VB(m.createNodeArray(F(e.types,(e=>vb(e.expression)||106===e.expression.kind))),ie,hP))})));return[u,b(m.updateClassDeclaration(t,e,t.name,n,_,c))]}{const r=he(t.heritageClauses);return b(m.updateClassDeclaration(t,e,t.name,n,r,c))}}case 243:return b(function(e){if(!f(e.declarationList.declarations,K))return;const t=VB(e.declarationList.declarations,ie,KP);if(!p(t))return;const n=m.createNodeArray(me(e));let r;return of(e.declarationList)||rf(e.declarationList)?(r=m.createVariableDeclarationList(t,2),ew(r,e.declarationList),sI(r,e.declarationList),mw(r,e.declarationList)):r=m.updateVariableDeclarationList(e.declarationList,t),m.updateVariableStatement(e,n,r)}(t));case 266:return b(m.updateEnumDeclaration(t,m.createNodeArray(me(t)),t.name,m.createNodeArray(q(t.members,(t=>{if(de(t))return;const n=T.getEnumMemberValue(t),r=null==n?void 0:n.value;P&&t.initializer&&(null==n?void 0:n.hasExternalReferences)&&!oE(t.name)&&e.addDiagnostic(Rp(t,va.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations));const i=void 0===r?void 0:"string"==typeof r?m.createStringLiteral(r):r<0?m.createPrefixUnaryExpression(41,m.createNumericLiteral(-r)):m.createNumericLiteral(r);return ee(m.updateEnumMember(t,t.name,i),t)})))))}return xn.assertNever(t,`Unhandled top-level node in declaration emit: ${xn.formatSyntaxKind(t.kind)}`);function b(e){return X(t)&&(n=o),c&&(a=u),267===t.kind&&(s=g),e===t?e:(v=void 0,y=void 0,e&&ew(ee(e,t),t))}}function _e(e){return j(q(e.elements,(e=>function(e){if(232!==e.kind&&e.name){if(!K(e))return;return Eu(e.name)?_e(e.name):m.createVariableDeclaration(e.name,void 0,V(e,void 0),void 0)}}(e))))}function de(e){return!!E&&!!e&&W_(e,b)}function pe(e){return mN(e)||gN(e)}function me(e){const t=Qv(e),n=function(e){let t=130030,n=s&&!function(e){return 264===e.kind}(e)?128:0;const r=307===e.parent.kind;return(!r||c&&r&&qI(e.parent))&&(t^=128,n=0),d$(e,t,n)}(e);return t===n?UB(e.modifiers,(e=>lt(e,iu)),iu):m.createModifiersFromModifierFlags(n)}function ge(e,t){let n=p$(e);return n||e===t.firstAccessor||(n=p$(t.firstAccessor),a=s$(t.firstAccessor)),!n&&t.secondAccessor&&e!==t.secondAccessor&&(n=p$(t.secondAccessor),a=s$(t.secondAccessor)),n}function he(e){return m.createNodeArray(F(O(e,(e=>m.updateHeritageClause(e,VB(m.createNodeArray(F(e.types,(t=>vb(t.expression)||96===e.token&&106===t.expression.kind))),ie,hP)))),(e=>e.types&&!!e.types.length)))}}function d$(e,t=131070,n=0){let r=Qv(e)&t|n;return 2048&r&&!(32&r)&&(r^=32),2048&r&&128&r&&(r^=128),r}function p$(e){if(e)return 177===e.kind?e.type:e.parameters.length>0?e.parameters[0].type:void 0}function f$(e){switch(e.kind){case 172:case 171:return!Rv(e,2);case 169:case 260:return!0}return!1}var m$={scriptTransformers:u,declarationTransformers:u};function g$(e,t,n){return{scriptTransformers:h$(e,t,n),declarationTransformers:y$(t)}}function h$(e,t,n){if(n)return u;const r=wS(e),i=DS(e),o=zS(e),a=[];return pe(a,t&&O(t.before,b$)),a.push(Nz),e.experimentalDecorators&&a.push(Oz),ek(e)&&a.push(Hz),r<99&&a.push($z),e.experimentalDecorators||!(r<99)&&o||a.push(Mz),a.push(Fz),r<8&&a.push(zz),r<7&&a.push(Jz),r<6&&a.push(Bz),r<5&&a.push(Rz),r<4&&a.push(Lz),r<3&&a.push(Xz),r<2&&(a.push(Yz),a.push(Zz)),a.push(function(e){switch(e){case 99:case 7:case 6:case 5:case 200:return r$;case 4:return n$;case 100:case 199:return i$;default:return e$}}(i)),pe(a,t&&O(t.after,b$)),a}function y$(e){const t=[];return t.push(_$),pe(t,e&&O(e.afterDeclarations,x$)),t}function v$(e,t){return n=>{const r=e(n);return"function"==typeof r?t(n,r):function(e){return t=>VN(t)?e.transformBundle(t):e.transformSourceFile(t)}(r)}}function b$(e){return v$(e,CJ)}function x$(e){return v$(e,((e,t)=>t))}function S$(e,t){return t}function k$(e,t,n){n(e,t)}function T$(e,t,n,r,i,o,a){var s,c;const l=new Array(357);let u,_,d,p,f,m=0,g=[],h=[],y=[],v=[],b=0,x=!1,S=[],k=0,T=S$,C=k$,w=0;const D=[],E={factory:n,getCompilerOptions:()=>r,getEmitResolver:()=>e,getEmitHost:()=>t,getEmitHelperFactory:bt((()=>$w(E))),startLexicalEnvironment:function(){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),xn.assert(!x,"Lexical environment is suspended."),g[b]=u,h[b]=_,y[b]=d,v[b]=m,b++,u=void 0,_=void 0,d=void 0,m=0},suspendLexicalEnvironment:function(){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),xn.assert(!x,"Lexical environment is already suspended."),x=!0},resumeLexicalEnvironment:function(){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),xn.assert(x,"Lexical environment is not suspended."),x=!1},endLexicalEnvironment:function(){let e;if(xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),xn.assert(!x,"Lexical environment is suspended."),u||_||d){if(_&&(e=[..._]),u){const t=n.createVariableStatement(void 0,n.createVariableDeclarationList(u));iw(t,2097152),e?e.push(t):e=[t]}d&&(e=e?[...e,...d]:[...d])}return b--,u=g[b],_=h[b],d=y[b],m=v[b],0===b&&(g=[],h=[],y=[],v=[]),e},setLexicalEnvironmentFlags:function(e,t){m=t?m|e:m&~e},getLexicalEnvironmentFlags:function(){return m},hoistVariableDeclaration:function(e){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed.");const t=iw(n.createVariableDeclaration(e),128);u?u.push(t):u=[t],1&m&&(m|=2)},hoistFunctionDeclaration:function(e){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),iw(e,2097152),_?_.push(e):_=[e]},addInitializationStatement:function(e){xn.assert(w>0,"Cannot modify the lexical environment during initialization."),xn.assert(w<2,"Cannot modify the lexical environment after transformation has completed."),iw(e,2097152),d?d.push(e):d=[e]},startBlockScope:function(){xn.assert(w>0,"Cannot start a block scope during initialization."),xn.assert(w<2,"Cannot start a block scope after transformation has completed."),S[k]=p,k++,p=void 0},endBlockScope:function(){xn.assert(w>0,"Cannot end a block scope during initialization."),xn.assert(w<2,"Cannot end a block scope after transformation has completed.");const e=Q(p)?[n.createVariableStatement(void 0,n.createVariableDeclarationList(p.map((e=>n.createVariableDeclaration(e))),1))]:void 0;return k--,p=S[k],0===k&&(S=[]),e},addBlockScopedVariable:function(e){xn.assert(k>0,"Cannot add a block scoped variable outside of an iteration body."),(p||(p=[])).push(e)},requestEmitHelper:function e(t){if(xn.assert(w>0,"Cannot modify the transformation context during initialization."),xn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),xn.assert(!t.scoped,"Cannot request a scoped emit helper."),t.dependencies)for(const n of t.dependencies)e(n);f=ue(f,t)},readEmitHelpers:function(){xn.assert(w>0,"Cannot modify the transformation context during initialization."),xn.assert(w<2,"Cannot modify the transformation context after transformation has completed.");const e=f;return f=void 0,e},enableSubstitution:function(e){xn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),l[e]|=1},enableEmitNotification:function(e){xn.assert(w<2,"Cannot modify the transformation context after transformation has completed."),l[e]|=2},isSubstitutionEnabled:I,isEmitNotificationEnabled:O,get onSubstituteNode(){return T},set onSubstituteNode(e){xn.assert(w<1,"Cannot modify transformation hooks after initialization has completed."),xn.assert(void 0!==e,"Value must not be 'undefined'"),T=e},get onEmitNode(){return C},set onEmitNode(e){xn.assert(w<1,"Cannot modify transformation hooks after initialization has completed."),xn.assert(void 0!==e,"Value must not be 'undefined'"),C=e},addDiagnostic(e){D.push(e)}};for(const e of i)nw(Sd(hc(e)));pr("beforeTransform");const P=o.map((e=>e(E))),N=e=>{for(const t of P)e=t(e);return e};w=1;const F=[];for(const e of i)null==(s=or)||s.push(or.Phase.Emit,"transformNodes",307===e.kind?{path:e.path}:{kind:e.kind,pos:e.pos,end:e.end}),F.push((a?N:A)(e)),null==(c=or)||c.pop();return w=2,pr("afterTransform"),fr("transformTime","beforeTransform","afterTransform"),{transformed:F,substituteNode:function(e,t){return xn.assert(w<3,"Cannot substitute a node after the result is disposed."),t&&I(t)&&T(e,t)||t},emitNodeWithNotification:function(e,t,n){xn.assert(w<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),t&&(O(t)?C(e,t,n):n(e,t))},isEmitNotificationEnabled:O,dispose:function(){if(w<3){for(const e of i)nw(Sd(hc(e)));u=void 0,g=void 0,_=void 0,h=void 0,T=void 0,C=void 0,f=void 0,w=3}},diagnostics:D};function A(e){return!e||qN(e)&&e.isDeclarationFile?e:N(e)}function I(e){return 0!=(1&l[e.kind])&&0==(8&Yd(e))}function O(e){return 0!=(2&l[e.kind])||0!=(4&Yd(e))}}var C$={factory:YC,getCompilerOptions:()=>({}),getEmitResolver:vt,getEmitHost:vt,getEmitHelperFactory:vt,startLexicalEnvironment:_t,resumeLexicalEnvironment:_t,suspendLexicalEnvironment:_t,endLexicalEnvironment:ft,setLexicalEnvironmentFlags:_t,getLexicalEnvironmentFlags:()=>0,hoistVariableDeclaration:_t,hoistFunctionDeclaration:_t,addInitializationStatement:_t,startBlockScope:_t,endBlockScope:ft,addBlockScopedVariable:_t,requestEmitHelper:_t,readEmitHelpers:vt,enableSubstitution:_t,enableEmitNotification:_t,isSubstitutionEnabled:vt,isEmitNotificationEnabled:vt,onSubstituteNode:S$,onEmitNode:k$,addDiagnostic:_t},w$=function(){const e=[];return e[1024]=["{","}"],e[2048]=["(",")"],e[4096]=["<",">"],e[8192]=["[","]"],e}();function D$(e){return Ao(e,".tsbuildinfo")}function E$(e,t,n,r=!1,i,o){const a=ot(n)?n:iv(e,n,r),s=e.getCompilerOptions();if(s.outFile){if(a.length){const n=YC.createBundle(a),i=t(F$(n,e,r),n);if(i)return i}}else{if(!i)for(const n of a){const i=t(F$(n,e,r),n);if(i)return i}if(o){const e=P$(s);if(e)return t({buildInfoPath:e},void 0)}}}function P$(e){const t=e.configFilePath;if(!RS(e))return;if(e.tsBuildInfoFile)return e.tsBuildInfoFile;const n=e.outFile;let r;if(n)r=Yk(n);else{if(!t)return;const n=Yk(t);r=e.outDir?e.rootDir?Wo(e.outDir,da(e.rootDir,n,!0)):Ko(e.outDir,Bo(n)):n}return r+".tsbuildinfo"}function N$(e,t){const n=e.outFile,r=e.emitDeclarationOnly?void 0:n,i=r&&A$(r,e),o=t||LS(e)?Yk(n)+".d.ts":void 0;return{jsFilePath:r,sourceMapFilePath:i,declarationFilePath:o,declarationMapPath:o&&BS(e)?o+".map":void 0,buildInfoPath:P$(e)}}function F$(e,t,n){const r=t.getCompilerOptions();if(308===e.kind)return N$(r,n);{const i=Yy(e.fileName,t,I$(e.fileName,r)),o=ef(e),a=o&&0===ca(e.fileName,i,t.getCurrentDirectory(),!t.useCaseSensitiveFileNames()),s=r.emitDeclarationOnly||a?void 0:i,c=!s||ef(e)?void 0:A$(s,r),l=n||LS(r)&&!o?Zy(e.fileName,t):void 0;return{jsFilePath:s,sourceMapFilePath:c,declarationFilePath:l,declarationMapPath:l&&BS(r)?l+".map":void 0,buildInfoPath:void 0}}}function A$(e,t){return t.sourceMap&&!t.inlineSourceMap?e+".map":void 0}function I$(e,t){return Ao(e,".json")?".json":1===t.jsx&&Io(e,[".jsx",".tsx"])?".jsx":Io(e,[".mts",".mjs"])?".mjs":Io(e,[".cts",".cjs"])?".cjs":".js"}function O$(e,t,n,r){return n?Wo(n,da(r(),e,t)):e}function M$(e,t,n,r=(()=>q$(t,n))){return L$(e,t.options,n,r)}function L$(e,t,n,r){return tT(O$(e,n,t.declarationDir||t.outDir,r),tv(e))}function j$(e,t,n,r=(()=>q$(t,n))){if(t.options.emitDeclarationOnly)return;const i=Ao(e,".json"),o=R$(e,t.options,n,r);return i&&0===ca(e,o,xn.checkDefined(t.options.configFilePath),n)?void 0:o}function R$(e,t,n,r){return tT(O$(e,n,t.outDir,r),I$(e,t))}function B$(){let e;return{addOutput:function(t){t&&(e||(e=[])).push(t)},getOutputs:function(){return e||u}}}function J$(e,t){const{jsFilePath:n,sourceMapFilePath:r,declarationFilePath:i,declarationMapPath:o,buildInfoPath:a}=N$(e.options,!1);t(n),t(r),t(i),t(o),t(a)}function z$(e,t,n,r,i){if(QI(t))return;const o=j$(t,e,n,i);if(r(o),!Ao(t,".json")&&(o&&e.options.sourceMap&&r(`${o}.map`),LS(e.options))){const o=M$(t,e,n,i);r(o),e.options.declarationMap&&r(`${o}.map`)}}function $$(e,t,n,r,i){let o;return e.rootDir?(o=Go(e.rootDir,n),null==i||i(e.rootDir)):e.composite&&e.configFilePath?(o=Ro(Vo(e.configFilePath)),null==i||i(o)):o=Sq(t(),n,r),o&&o[o.length-1]!==xo&&(o+=xo),o}function q$({options:e,fileNames:t},n){return $$(e,(()=>F(t,(t=>!(e.noEmitForJsFiles&&Io(t,Mk)||QI(t))))),Ro(Vo(xn.checkDefined(e.configFilePath))),tn(!n))}function V$(e,t){const{addOutput:n,getOutputs:r}=B$();if(e.options.outFile)J$(e,n);else{const r=bt((()=>q$(e,t)));for(const i of e.fileNames)z$(e,i,t,n,r);n(P$(e.options))}return r()}function U$(e,t,n){t=Xo(t),xn.assert(D(e.fileNames,t),"Expected fileName to be present in command line");const{addOutput:r,getOutputs:i}=B$();return e.options.outFile?J$(e,r):z$(e,t,n,r),i()}function K$(e,t){if(e.options.outFile){const{jsFilePath:t,declarationFilePath:n}=N$(e.options,!1);return xn.checkDefined(t||n,`project ${e.options.configFilePath} expected to have at least one output`)}const n=bt((()=>q$(e,t)));for(const r of e.fileNames){if(QI(r))continue;const i=j$(r,e,t,n);if(i)return i;if(!Ao(r,".json")&&LS(e.options))return M$(r,e,t,n)}return P$(e.options)||xn.fail(`project ${e.options.configFilePath} expected to have at least one output`)}function W$(e,t){return!!t&&!!e}function H$(e,t,n,{scriptTransformers:r,declarationTransformers:i},o,a,s){var c=t.getCompilerOptions(),l=c.sourceMap||c.inlineSourceMap||BS(c)?[]:void 0,u=c.listEmittedFiles?[]:void 0,_=by(),d=$b(c),f=Vy(d),{enter:m,exit:g}=ir("printTime","beforePrint","afterPrint"),h=!1;return m(),E$(t,(function({jsFilePath:a,sourceMapFilePath:l,declarationFilePath:d,declarationMapPath:f,buildInfoPath:m},g){var b,x,S,k,T,C;null==(b=or)||b.push(or.Phase.Emit,"emitJsFileOrBundle",{jsFilePath:a}),function(n,i,a){if(!n||o||!i)return;if(t.isEmitBlocked(i)||c.noEmit)return void(h=!0);(qN(n)?[n]:F(n.sourceFiles,jm)).forEach((t=>{!c.noCheck&&vT(t,c)||jI(t,(t=>!rN(t)||32&Zv(t)?iN(t)?"skip":void e.markLinkedReferences(t):"skip"))}));const s=T$(e,t,YC,c,[n],r,!1),l=rq({removeComments:c.removeComments,newLine:c.newLine,noEmitHelpers:c.noEmitHelpers,module:DS(c),target:wS(c),sourceMap:c.sourceMap,inlineSourceMap:c.inlineSourceMap,inlineSources:c.inlineSources,extendedDiagnostics:c.extendedDiagnostics},{hasGlobalName:e.hasGlobalName,onEmitNode:s.emitNodeWithNotification,isEmitNotificationEnabled:s.isEmitNotificationEnabled,substituteNode:s.substituteNode});xn.assert(1===s.transformed.length,"Should only see one output from the transform"),v(i,a,s,l,c),s.dispose(),u&&(u.push(i),a&&u.push(a))}(g,a,l),null==(x=or)||x.pop(),null==(S=or)||S.push(or.Phase.Emit,"emitDeclarationFileOrBundle",{declarationFilePath:d}),function(n,r,a){if(!n||0===o)return;if(!r)return void((o||c.emitDeclarationOnly)&&(h=!0));const l=qN(n)?[n]:n.sourceFiles,d=s?l:F(l,jm),f=c.outFile?[YC.createBundle(d)]:d;d.forEach((e=>{(o&&!LS(c)||c.noCheck||W$(o,s)||!vT(e,c))&&y(e)}));const m=T$(e,t,YC,c,f,i,!1);if(p(m.diagnostics))for(const e of m.diagnostics)_.add(e);const g=!!m.diagnostics&&!!m.diagnostics.length||!!t.isEmitBlocked(r)||!!c.noEmit;if(h=h||g,!g||s){xn.assert(1===m.transformed.length,"Should only see one output from the decl transform");const t={removeComments:c.removeComments,newLine:c.newLine,noEmitHelpers:!0,module:c.module,target:c.target,sourceMap:!s&&c.declarationMap,inlineSourceMap:c.inlineSourceMap,extendedDiagnostics:c.extendedDiagnostics,onlyPrintJsDocStyle:!0,omitBraceSourceMapPositions:!0};v(r,a,m,rq(t,{hasGlobalName:e.hasGlobalName,onEmitNode:m.emitNodeWithNotification,isEmitNotificationEnabled:m.isEmitNotificationEnabled,substituteNode:m.substituteNode}),{sourceMap:t.sourceMap,sourceRoot:c.sourceRoot,mapRoot:c.mapRoot,extendedDiagnostics:c.extendedDiagnostics}),u&&(u.push(r),a&&u.push(a))}m.dispose()}(g,d,f),null==(k=or)||k.pop(),null==(T=or)||T.push(or.Phase.Emit,"emitBuildInfo",{buildInfoPath:m}),function(e){if(!e||n||h)return;if(t.isEmitBlocked(e))return void(h=!0);const r=t.getBuildInfo()||G$(void 0);cv(t,_,e,X$(r),!1,void 0,{buildInfo:r}),null==u||u.push(e)}(m),null==(C=or)||C.pop()}),iv(t,n,s),s,a,!n),g(),{emitSkipped:h,diagnostics:_.getDiagnostics(),emittedFiles:u,sourceMaps:l};function y(t){mN(t)?80===t.expression.kind&&e.collectLinkedAliases(t.expression,!0):yN(t)?e.collectLinkedAliases(t.propertyName||t.name,!0):LI(t,y)}function v(e,n,r,i,o){const a=r.transformed[0],s=308===a.kind?a:void 0,u=307===a.kind?a:void 0,p=s?s.sourceFiles:[u];let m,g;if(function(e,t){return(e.sourceMap||e.inlineSourceMap)&&(307!==t.kind||!Ao(t.fileName,".json"))}(o,a)&&(m=nJ(t,Bo(Vo(e)),function(e){const t=Vo(e.sourceRoot||"");return t?ea(t):t}(o),function(e,n,r){if(e.sourceRoot)return t.getCommonSourceDirectory();if(e.mapRoot){let n=Vo(e.mapRoot);return r&&(n=Ro(av(r.fileName,t,n))),0===jo(n)&&(n=Ko(t.getCommonSourceDirectory(),n)),n}return Ro(Xo(n))}(o,e,u),o)),s?i.writeBundle(s,f,m):i.writeFile(u,f,m),m){l&&l.push({inputSourceFileNames:m.getSources(),sourceMap:m.toJSON()});const r=function(e,n,r,i,o){if(e.inlineSourceMap){const e=n.toString();return`data:application/json;base64,${Lb(vo,e)}`}const a=Bo(Vo(xn.checkDefined(i)));if(e.mapRoot){let n=Vo(e.mapRoot);return o&&(n=Ro(av(o.fileName,t,n))),0===jo(n)?(n=Ko(t.getCommonSourceDirectory(),n),encodeURI(ma(Ro(Xo(r)),Ko(n,a),t.getCurrentDirectory(),t.getCanonicalFileName,!0))):encodeURI(Ko(n,a))}return encodeURI(a)}(o,m,e,n,u);if(r&&(f.isAtStartOfLine()||f.rawWrite(d),g=f.getTextPos(),f.writeComment(`//# sourceMappingURL=${r}`)),n){const e=m.toString();cv(t,_,n,e,!1,p)}}else f.writeLine();const h=f.getText();cv(t,_,e,h,!!c.emitBOM,p,{sourceMapUrlPos:g,diagnostics:r.diagnostics}),f.clear()}}function G$(e){return{program:e,version:c}}function X$(e){return JSON.stringify(e)}function Q$(e,t){return Rb(e,t)}var Y$={hasGlobalName:vt,getReferencedExportContainer:vt,getReferencedImportDeclaration:vt,getReferencedDeclarationWithCollidingName:vt,isDeclarationWithCollidingName:vt,isValueAliasDeclaration:vt,isReferencedAliasDeclaration:vt,isTopLevelValueImportEqualsWithEntityName:vt,hasNodeCheckFlag:vt,isDeclarationVisible:vt,isLateBound:e=>!1,collectLinkedAliases:vt,markLinkedReferences:vt,isImplementationOfOverload:vt,requiresAddingImplicitUndefined:vt,isExpandoFunctionDeclaration:vt,getPropertiesOfContainerFunction:vt,createTypeOfDeclaration:vt,createReturnTypeOfSignatureDeclaration:vt,createTypeOfExpression:vt,createLiteralConstValue:vt,isSymbolAccessible:vt,isEntityNameVisible:vt,getConstantValue:vt,getEnumMemberValue:vt,getReferencedValueDeclaration:vt,getReferencedValueDeclarations:vt,getTypeReferenceSerializationKind:vt,isOptionalParameter:vt,isArgumentsLocalBinding:vt,getExternalModuleFileFromDeclaration:vt,isLiteralConstDeclaration:vt,getJsxFactoryEntity:vt,getJsxFragmentFactoryEntity:vt,isBindingCapturedByNode:vt,getDeclarationStatementsForSourceFile:vt,isImportRequiredByAugmentation:vt},Z$=bt((()=>rq({}))),eq=bt((()=>rq({removeComments:!0}))),tq=bt((()=>rq({removeComments:!0,neverAsciiEscape:!0}))),nq=bt((()=>rq({removeComments:!0,omitTrailingSemicolon:!0})));function rq(e={},t={}){var n,r,i,o,a,s,c,l,u,_,d,p,m,g,h,y,v,b,S,k,C,w,D,E,P,N,{hasGlobalName:F,onEmitNode:A=k$,isEmitNotificationEnabled:I,substituteNode:O=S$,onBeforeEmitNode:M,onAfterEmitNode:L,onBeforeEmitNodeArray:j,onAfterEmitNodeArray:R,onBeforeEmitToken:B,onAfterEmitToken:J}=t,z=!!e.extendedDiagnostics,$=!!e.omitBraceSourceMapPositions,q=$b(e),V=DS(e),U=new Map,K=e.preserveSourceNewlines,W=function(e){v.write(e)},H=!0,G=-1,X=-1,Y=-1,Z=-1,ee=-1,te=!1,ne=!!e.removeComments,{enter:re,exit:ie}=rr(z,"commentTime","beforeComment","afterComment"),oe=YC.parenthesizer,ae={select:e=>0===e?oe.parenthesizeLeadingTypeArgument:void 0},se=function(){return KA((function(e,t){if(t){t.stackIndex++,t.preserveSourceNewlinesStack[t.stackIndex]=K,t.containerPosStack[t.stackIndex]=Y,t.containerEndStack[t.stackIndex]=Z,t.declarationListContainerEndStack[t.stackIndex]=ee;const n=t.shouldEmitCommentsStack[t.stackIndex]=Ie(e),r=t.shouldEmitSourceMapsStack[t.stackIndex]=Oe(e);null==M||M(e),n&&Kn(e),r&&mr(e),Ne(e)}else t={stackIndex:0,preserveSourceNewlinesStack:[void 0],containerPosStack:[-1],containerEndStack:[-1],declarationListContainerEndStack:[-1],shouldEmitCommentsStack:[!1],shouldEmitSourceMapsStack:[!1]};return t}),(function(t,n,r){return e(t,r,"left")}),(function(e,t,n){const r=28!==e.kind,i=kn(n,n.left,e),o=kn(n,e,n.right);pn(i,r),or(e.pos),ln(e,103===e.kind?Qt:Yt),sr(e.end,!0),pn(o,!0)}),(function(t,n,r){return e(t,r,"right")}),(function(e,t){if(fn(kn(e,e.left,e.operatorToken),kn(e,e.operatorToken,e.right)),t.stackIndex>0){const n=t.preserveSourceNewlinesStack[t.stackIndex],r=t.containerPosStack[t.stackIndex],i=t.containerEndStack[t.stackIndex],o=t.declarationListContainerEndStack[t.stackIndex],a=t.shouldEmitCommentsStack[t.stackIndex],s=t.shouldEmitSourceMapsStack[t.stackIndex];Fe(n),s&&gr(e),a&&Wn(e,r,i,o),null==L||L(e),t.stackIndex--}}),void 0);function e(e,t,n){const r="left"===n?oe.getParenthesizeLeftSideOfBinaryForOperator(t.operatorToken.kind):oe.getParenthesizeRightSideOfBinaryForOperator(t.operatorToken.kind);let i=Me(0,1,e);if(i===Je&&(xn.assertIsDefined(P),i=Le(1,1,e=r(ut(P,Xu))),P=void 0),(i===Un||i===fr||i===Re)&&uP(e))return e;N=r,i(1,e)}}();return be(),{printNode:function(e,t,n){switch(e){case 0:xn.assert(qN(t),"Expected a SourceFile node.");break;case 2:xn.assert(qD(t),"Expected an Identifier node.");break;case 1:xn.assert(Xu(t),"Expected an Expression node.")}switch(t.kind){case 307:return le(t);case 308:return ce(t)}return ue(e,t,n,fe()),me()},printList:function(e,t,n){return _e(e,t,n,fe()),me()},printFile:le,printBundle:ce,writeNode:ue,writeList:_e,writeFile:pe,writeBundle:de};function ce(e){return de(e,fe(),void 0),me()}function le(e){return pe(e,fe(),void 0),me()}function ue(e,t,n,r){const i=v;ye(r,void 0),ge(e,t,n),be(),v=i}function _e(e,t,n,r){const i=v;ye(r,void 0),n&&he(n),qt(void 0,t,e),be(),v=i}function de(e,t,n){S=!1;const r=v;var i;ye(t,n),Pt(e),Et(e),ze(e),Ct(!!(i=e).hasNoDefaultLib,i.syntheticFileReferences||[],i.syntheticTypeReferences||[],i.syntheticLibReferences||[]);for(const t of e.sourceFiles)ge(0,t,t);be(),v=r}function pe(e,t,n){S=!0;const r=v;ye(t,n),Pt(e),Et(e),ge(0,e,e),be(),v=r}function fe(){return b||(b=Vy(q))}function me(){const e=b.getText();return b.clear(),e}function ge(e,t,n){n&&he(n),Ae(e,t,void 0)}function he(e){n=e,D=void 0,E=void 0,e&&br(e)}function ye(t,n){t&&e.omitTrailingSemicolon&&(t=Uy(t)),k=n,H=!(v=t)||!k}function be(){r=[],i=[],o=[],a=new Set,s=[],c=new Map,l=[],u=0,_=[],d=0,p=[],m=void 0,g=[],h=void 0,n=void 0,D=void 0,E=void 0,ye(void 0,void 0)}function xe(){return D||(D=Ka(xn.checkDefined(n)))}function ke(e,t){void 0!==e&&Ae(4,e,t)}function Te(e){void 0!==e&&Ae(2,e,void 0)}function Ce(e,t){void 0!==e&&Ae(1,e,t)}function Pe(e){Ae(wD(e)?6:4,e)}function Ne(e){K&&4&Zd(e)&&(K=!1)}function Fe(e){K=e}function Ae(e,t,n){N=n,Me(0,e,t)(e,t),N=void 0}function Ie(e){return!ne&&!qN(e)}function Oe(e){return!H&&!qN(e)&&!Lm(e)}function Me(e,t,n){switch(e){case 0:if(A!==k$&&(!I||I(n)))return je;case 1:if(O!==S$&&(P=O(t,n)||n)!==n)return N&&(P=N(P)),Je;case 2:if(Ie(n))return Un;case 3:if(Oe(n))return fr;case 4:return Re;default:return xn.assertNever(e)}}function Le(e,t,n){return Me(e+1,t,n)}function je(e,t){const n=Le(0,e,t);A(e,t,n)}function Re(e,t){if(null==M||M(t),K){const n=K;Ne(t),Be(e,t),Fe(n)}else Be(e,t);null==L||L(t),N=void 0}function Be(e,t,r=!0){if(r){const n=Nw(t);if(n)return function(e,t,n){switch(n.kind){case 1:!function(e,t,n){rn(`\${${n.order}:`),Be(e,t,!1),rn("}")}(e,t,n);break;case 0:!function(e,t,n){xn.assert(242===t.kind,`A tab stop cannot be attached to a node of kind ${xn.formatSyntaxKind(t.kind)}.`),xn.assert(5!==e,"A tab stop cannot be attached to an embedded statement."),rn(`$${n.order}`)}(e,t,n)}}(e,t,n)}if(0===e)return Tt(ut(t,qN));if(2===e)return Ve(ut(t,qD));if(6===e)return qe(ut(t,wD),!0);if(3===e)return function(e){ke(e.name),tn(),Qt("in"),tn(),ke(e.constraint)}(ut(t,aE));if(7===e)return function(e){Gt("{"),tn(),Qt(132===e.token?"assert":"with"),Gt(":"),tn();qt(e,e.elements,526226),tn(),Gt("}")}(ut(t,lN));if(5===e)return xn.assertNode(t,PP),Ye(!0);if(4===e){switch(t.kind){case 16:case 17:case 18:return qe(t,!1);case 80:return Ve(t);case 81:return Ue(t);case 166:return function(e){(function(e){80===e.kind?Ce(e):ke(e)})(e.left),Gt("."),ke(e.right)}(t);case 167:return function(e){Gt("["),Ce(e.expression,oe.parenthesizeExpressionOfComputedPropertyName),Gt("]")}(t);case 168:return function(e){At(e,e.modifiers),ke(e.name),e.constraint&&(tn(),Qt("extends"),tn(),ke(e.constraint)),e.default&&(tn(),Yt("="),tn(),ke(e.default))}(t);case 169:return function(e){Ft(e,e.modifiers,!0),ke(e.dotDotDotToken),Nt(e.name,Zt),ke(e.questionToken),e.parent&&317===e.parent.kind&&!e.name?ke(e.type):It(e.type),Ot(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name?e.name.end:e.modifiers?e.modifiers.end:e.pos,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 170:return a=t,Gt("@"),void Ce(a.expression,oe.parenthesizeLeftSideOfAccess);case 171:return function(e){At(e,e.modifiers),Nt(e.name,nn),ke(e.questionToken),It(e.type),Xt()}(t);case 172:return function(e){Ft(e,e.modifiers,!0),ke(e.name),ke(e.questionToken),ke(e.exclamationToken),It(e.type),Ot(e.initializer,e.type?e.type.end:e.questionToken?e.questionToken.end:e.name.end,e),Xt()}(t);case 173:return function(e){At(e,e.modifiers),ke(e.name),ke(e.questionToken),st(e,dt,_t)}(t);case 174:return function(e){Ft(e,e.modifiers,!0),ke(e.asteriskToken),ke(e.name),ke(e.questionToken),st(e,dt,ct)}(t);case 175:return function(e){Qt("static"),En(e),pt(e.body),Pn(e)}(t);case 176:return function(e){Ft(e,e.modifiers,!1),Qt("constructor"),st(e,dt,ct)}(t);case 177:case 178:return function(e){const t=Ft(e,e.modifiers,!0);tt(177===e.kind?139:153,t,Qt,e),tn(),ke(e.name),st(e,dt,ct)}(t);case 179:return function(e){st(e,dt,_t)}(t);case 180:return function(e){Qt("new"),tn(),st(e,dt,_t)}(t);case 181:return function(e){Ft(e,e.modifiers,!1),qt(e,e.parameters,8848),It(e.type),Xt()}(t);case 182:return function(e){e.assertsModifier&&(ke(e.assertsModifier),tn()),ke(e.parameterName),e.type&&(tn(),Qt("is"),tn(),ke(e.type))}(t);case 183:return function(e){ke(e.typeName),Rt(e,e.typeArguments)}(t);case 184:return function(e){st(e,Ke,We)}(t);case 185:return function(e){At(e,e.modifiers),Qt("new"),tn(),st(e,Ke,We)}(t);case 186:return function(e){Qt("typeof"),tn(),ke(e.exprName),Rt(e,e.typeArguments)}(t);case 187:return function(e){En(e),f(e.members,In),Gt("{");const t=1&Yd(e)?768:32897;qt(e,e.members,524288|t),Gt("}"),Pn(e)}(t);case 188:return function(e){ke(e.elementType,oe.parenthesizeNonArrayTypeOfPostfixType),Gt("["),Gt("]")}(t);case 189:return function(e){tt(23,e.pos,Gt,e);const t=1&Yd(e)?528:657;qt(e,e.elements,524288|t,oe.parenthesizeElementTypeOfTupleType),tt(24,e.elements.end,Gt,e)}(t);case 190:return function(e){ke(e.type,oe.parenthesizeTypeOfOptionalType),Gt("?")}(t);case 192:return function(e){qt(e,e.types,516,oe.parenthesizeConstituentTypeOfUnionType)}(t);case 193:return function(e){qt(e,e.types,520,oe.parenthesizeConstituentTypeOfIntersectionType)}(t);case 194:return function(e){ke(e.checkType,oe.parenthesizeCheckTypeOfConditionalType),tn(),Qt("extends"),tn(),ke(e.extendsType,oe.parenthesizeExtendsTypeOfConditionalType),tn(),Gt("?"),tn(),ke(e.trueType),tn(),Gt(":"),tn(),ke(e.falseType)}(t);case 195:return function(e){Qt("infer"),tn(),ke(e.typeParameter)}(t);case 196:return function(e){Gt("("),ke(e.type),Gt(")")}(t);case 233:return Xe(t);case 197:return void Qt("this");case 198:return function(e){un(e.operator,Qt),tn();const t=148===e.operator?oe.parenthesizeOperandOfReadonlyTypeOperator:oe.parenthesizeOperandOfTypeOperator;ke(e.type,t)}(t);case 199:return function(e){ke(e.objectType,oe.parenthesizeNonArrayTypeOfPostfixType),Gt("["),ke(e.indexType),Gt("]")}(t);case 200:return function(e){const t=Yd(e);Gt("{"),1&t?tn():(on(),an()),e.readonlyToken&&(ke(e.readonlyToken),148!==e.readonlyToken.kind&&Qt("readonly"),tn()),Gt("["),Ae(3,e.typeParameter),e.nameType&&(tn(),Qt("as"),tn(),ke(e.nameType)),Gt("]"),e.questionToken&&(ke(e.questionToken),58!==e.questionToken.kind&&Gt("?")),Gt(":"),tn(),ke(e.type),Xt(),1&t?tn():(on(),sn()),qt(e,e.members,2),Gt("}")}(t);case 201:return function(e){Ce(e.literal)}(t);case 202:return function(e){ke(e.dotDotDotToken),ke(e.name),ke(e.questionToken),tt(59,e.name.end,Gt,e),tn(),ke(e.type)}(t);case 203:return function(e){ke(e.head),qt(e,e.templateSpans,262144)}(t);case 204:return function(e){ke(e.type),ke(e.literal)}(t);case 205:return function(e){e.isTypeOf&&(Qt("typeof"),tn()),Qt("import"),Gt("("),ke(e.argument),e.attributes&&(Gt(","),tn(),Ae(7,e.attributes)),Gt(")"),e.qualifier&&(Gt("."),ke(e.qualifier)),Rt(e,e.typeArguments)}(t);case 206:return function(e){Gt("{"),qt(e,e.elements,525136),Gt("}")}(t);case 207:return function(e){Gt("["),qt(e,e.elements,524880),Gt("]")}(t);case 208:return function(e){ke(e.dotDotDotToken),e.propertyName&&(ke(e.propertyName),Gt(":"),tn()),ke(e.name),Ot(e.initializer,e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 239:return function(e){Ce(e.expression),ke(e.literal)}(t);case 240:return void Xt();case 241:return function(e){Qe(e,!e.multiLine&&Tn(e))}(t);case 243:return function(e){Ft(e,e.modifiers,!1),ke(e.declarationList),Xt()}(t);case 242:return Ye(!1);case 244:return function(e){Ce(e.expression,oe.parenthesizeExpressionOfExpressionStatement),n&&ef(n)&&!ly(e.expression)||Xt()}(t);case 245:return function(e){const t=tt(101,e.pos,Qt,e);tn(),tt(21,t,Gt,e),Ce(e.expression),tt(22,e.expression.end,Gt,e),jt(e,e.thenStatement),e.elseStatement&&(_n(e,e.thenStatement,e.elseStatement),tt(93,e.thenStatement.end,Qt,e),245===e.elseStatement.kind?(tn(),ke(e.elseStatement)):jt(e,e.elseStatement))}(t);case 246:return function(e){tt(92,e.pos,Qt,e),jt(e,e.statement),DP(e.statement)&&!K?tn():_n(e,e.statement,e.expression),Ze(e,e.statement.end),Xt()}(t);case 247:return function(e){Ze(e,e.pos),jt(e,e.statement)}(t);case 248:return function(e){const t=tt(99,e.pos,Qt,e);tn();let n=tt(21,t,Gt,e);et(e.initializer),n=tt(27,e.initializer?e.initializer.end:n,Gt,e),Lt(e.condition),n=tt(27,e.condition?e.condition.end:n,Gt,e),Lt(e.incrementor),tt(22,e.incrementor?e.incrementor.end:n,Gt,e),jt(e,e.statement)}(t);case 249:return function(e){const t=tt(99,e.pos,Qt,e);tn(),tt(21,t,Gt,e),et(e.initializer),tn(),tt(103,e.initializer.end,Qt,e),tn(),Ce(e.expression),tt(22,e.expression.end,Gt,e),jt(e,e.statement)}(t);case 250:return function(e){const t=tt(99,e.pos,Qt,e);tn(),function(e){e&&(ke(e),tn())}(e.awaitModifier),tt(21,t,Gt,e),et(e.initializer),tn(),tt(165,e.initializer.end,Qt,e),tn(),Ce(e.expression),tt(22,e.expression.end,Gt,e),jt(e,e.statement)}(t);case 251:return function(e){tt(88,e.pos,Qt,e),Mt(e.label),Xt()}(t);case 252:return function(e){tt(83,e.pos,Qt,e),Mt(e.label),Xt()}(t);case 253:return function(e){tt(107,e.pos,Qt,e),Lt(e.expression&&it(e.expression),it),Xt()}(t);case 254:return function(e){const t=tt(118,e.pos,Qt,e);tn(),tt(21,t,Gt,e),Ce(e.expression),tt(22,e.expression.end,Gt,e),jt(e,e.statement)}(t);case 255:return function(e){const t=tt(109,e.pos,Qt,e);tn(),tt(21,t,Gt,e),Ce(e.expression),tt(22,e.expression.end,Gt,e),tn(),ke(e.caseBlock)}(t);case 256:return function(e){ke(e.label),tt(59,e.label.end,Gt,e),tn(),ke(e.statement)}(t);case 257:return function(e){tt(111,e.pos,Qt,e),Lt(it(e.expression),it),Xt()}(t);case 258:return function(e){tt(113,e.pos,Qt,e),tn(),ke(e.tryBlock),e.catchClause&&(_n(e,e.tryBlock,e.catchClause),ke(e.catchClause)),e.finallyBlock&&(_n(e,e.catchClause||e.tryBlock,e.finallyBlock),tt(98,(e.catchClause||e.tryBlock).end,Qt,e),tn(),ke(e.finallyBlock))}(t);case 259:return function(e){cn(89,e.pos,Qt),Xt()}(t);case 260:return function(e){var t,n,r;ke(e.name),ke(e.exclamationToken),It(e.type),Ot(e.initializer,(null==(t=e.type)?void 0:t.end)??(null==(r=null==(n=e.name.emitNode)?void 0:n.typeNode)?void 0:r.end)??e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 261:return function(e){rf(e)?(Qt("await"),tn(),Qt("using")):Qt(cf(e)?"let":af(e)?"const":of(e)?"using":"var"),tn(),qt(e,e.declarations,528)}(t);case 262:return function(e){at(e)}(t);case 263:return function(e){gt(e)}(t);case 264:return function(e){Ft(e,e.modifiers,!1),Qt("interface"),tn(),ke(e.name),Bt(e,e.typeParameters),qt(e,e.heritageClauses,512),tn(),Gt("{"),En(e),f(e.members,In),qt(e,e.members,129),Pn(e),Gt("}")}(t);case 265:return function(e){Ft(e,e.modifiers,!1),Qt("type"),tn(),ke(e.name),Bt(e,e.typeParameters),tn(),Gt("="),tn(),ke(e.type),Xt()}(t);case 266:return function(e){Ft(e,e.modifiers,!1),Qt("enum"),tn(),ke(e.name),tn(),Gt("{"),qt(e,e.members,145),Gt("}")}(t);case 267:return function(e){Ft(e,e.modifiers,!1),2048&~e.flags&&(Qt(32&e.flags?"namespace":"module"),tn()),ke(e.name);let t=e.body;if(!t)return Xt();for(;t&&ZP(t);)Gt("."),ke(t.name),t=t.body;tn(),ke(t)}(t);case 268:return function(e){En(e),f(e.statements,An),Qe(e,Tn(e)),Pn(e)}(t);case 269:return function(e){tt(19,e.pos,Gt,e),qt(e,e.clauses,129),tt(20,e.clauses.end,Gt,e,!0)}(t);case 270:return function(e){let t=tt(95,e.pos,Qt,e);tn(),t=tt(130,t,Qt,e),tn(),t=tt(145,t,Qt,e),tn(),ke(e.name),Xt()}(t);case 271:return function(e){Ft(e,e.modifiers,!1),tt(102,e.modifiers?e.modifiers.end:e.pos,Qt,e),tn(),e.isTypeOnly&&(tt(156,e.pos,Qt,e),tn()),ke(e.name),tn(),tt(64,e.name.end,Gt,e),tn(),function(e){80===e.kind?Ce(e):ke(e)}(e.moduleReference),Xt()}(t);case 272:return function(e){Ft(e,e.modifiers,!1),tt(102,e.modifiers?e.modifiers.end:e.pos,Qt,e),tn(),e.importClause&&(ke(e.importClause),tn(),tt(161,e.importClause.end,Qt,e),tn()),Ce(e.moduleSpecifier),e.attributes&&Mt(e.attributes),Xt()}(t);case 273:return function(e){e.isTypeOnly&&(tt(156,e.pos,Qt,e),tn()),ke(e.name),e.name&&e.namedBindings&&(tt(28,e.name.end,Gt,e),tn()),ke(e.namedBindings)}(t);case 274:return function(e){const t=tt(42,e.pos,Gt,e);tn(),tt(130,t,Qt,e),tn(),ke(e.name)}(t);case 280:return function(e){const t=tt(42,e.pos,Gt,e);tn(),tt(130,t,Qt,e),tn(),ke(e.name)}(t);case 275:case 279:return function(e){!function(e){Gt("{"),qt(e,e.elements,525136),Gt("}")}(e)}(t);case 276:case 281:return function(e){!function(e){e.isTypeOnly&&(Qt("type"),tn()),e.propertyName&&(ke(e.propertyName),tn(),tt(130,e.propertyName.end,Qt,e),tn()),ke(e.name)}(e)}(t);case 277:return function(e){const t=tt(95,e.pos,Qt,e);tn(),e.isExportEquals?tt(64,t,Yt,e):tt(90,t,Qt,e),tn(),Ce(e.expression,e.isExportEquals?oe.getParenthesizeRightSideOfBinaryForOperator(64):oe.parenthesizeExpressionOfExportDefault),Xt()}(t);case 278:return function(e){Ft(e,e.modifiers,!1);let t=tt(95,e.pos,Qt,e);tn(),e.isTypeOnly&&(t=tt(156,t,Qt,e),tn()),e.exportClause?ke(e.exportClause):t=tt(42,t,Gt,e),e.moduleSpecifier&&(tn(),tt(161,e.exportClause?e.exportClause.end:t,Qt,e),tn(),Ce(e.moduleSpecifier)),e.attributes&&Mt(e.attributes),Xt()}(t);case 300:return function(e){tt(e.token,e.pos,Qt,e),tn();qt(e,e.elements,526226)}(t);case 301:return function(e){ke(e.name),Gt(":"),tn();const t=e.value;0==(1024&Yd(t))&&sr(fw(t).pos),ke(t)}(t);case 282:case 319:case 330:case 331:case 333:case 334:case 335:case 336:case 353:return;case 283:return function(e){Qt("require"),Gt("("),Ce(e.expression),Gt(")")}(t);case 12:return function(e){v.writeLiteral(e.text)}(t);case 286:case 289:return function(e){if(Gt("<"),CN(e)){const t=vn(e.tagName,e);ht(e.tagName),Rt(e,e.typeArguments),e.attributes.properties&&e.attributes.properties.length>0&&tn(),ke(e.attributes),bn(e.attributes,e),fn(t)}Gt(">")}(t);case 287:case 290:return function(e){Gt("")}(t);case 291:return function(e){ke(e.name),function(e,t,n,r){n&&(t("="),r(n))}(0,Gt,e.initializer,Pe)}(t);case 292:return function(e){qt(e,e.properties,262656)}(t);case 293:return function(e){Gt("{..."),Ce(e.expression),Gt("}")}(t);case 294:return function(e){var t,r;if(e.expression||!ne&&!ly(e)&&(function(e){let t=!1;return ms((null==n?void 0:n.text)||"",e+1,(()=>t=!0)),t}(r=e.pos)||function(e){let t=!1;return fs((null==n?void 0:n.text)||"",e+1,(()=>t=!0)),t}(r))){const r=n&&!ly(e)&&Xa(n,e.pos).line!==Xa(n,e.end).line;r&&v.increaseIndent();const i=tt(19,e.pos,Gt,e);ke(e.dotDotDotToken),Ce(e.expression),tt(20,(null==(t=e.expression)?void 0:t.end)||i,Gt,e),r&&v.decreaseIndent()}}(t);case 295:return function(e){Te(e.namespace),Gt(":"),Te(e.name)}(t);case 296:return function(e){tt(84,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeExpressionForDisallowedComma),yt(e,e.statements,e.expression.end)}(t);case 297:return function(e){const t=tt(90,e.pos,Qt,e);yt(e,e.statements,t)}(t);case 298:return function(e){tn(),un(e.token,Qt),tn(),qt(e,e.types,528)}(t);case 299:return function(e){const t=tt(85,e.pos,Qt,e);tn(),e.variableDeclaration&&(tt(21,t,Gt,e),ke(e.variableDeclaration),tt(22,e.variableDeclaration.end,Gt,e),tn()),ke(e.block)}(t);case 303:return function(e){ke(e.name),Gt(":"),tn();const t=e.initializer;0==(1024&Yd(t))&&sr(fw(t).pos),Ce(t,oe.parenthesizeExpressionForDisallowedComma)}(t);case 304:return function(e){ke(e.name),e.objectAssignmentInitializer&&(tn(),Gt("="),tn(),Ce(e.objectAssignmentInitializer,oe.parenthesizeExpressionForDisallowedComma))}(t);case 305:return function(e){e.expression&&(tt(26,e.pos,Gt,e),Ce(e.expression,oe.parenthesizeExpressionForDisallowedComma))}(t);case 306:return function(e){ke(e.name),Ot(e.initializer,e.name.end,e,oe.parenthesizeExpressionForDisallowedComma)}(t);case 307:return Tt(t);case 308:return xn.fail("Bundles should be printed using printBundle");case 309:return kt(t);case 310:return function(e){tn(),Gt("{"),ke(e.name),Gt("}")}(t);case 312:return Gt("*");case 313:return Gt("?");case 314:return function(e){Gt("?"),ke(e.type)}(t);case 315:return function(e){Gt("!"),ke(e.type)}(t);case 316:return function(e){ke(e.type),Gt("=")}(t);case 317:return function(e){Qt("function"),Jt(e,e.parameters),Gt(":"),ke(e.type)}(t);case 191:case 318:return function(e){Gt("..."),ke(e.type)}(t);case 320:return function(e){if(W("/**"),e.comment){const t=fl(e.comment);if(t){const e=t.split(/\r\n?|\n/g);for(const t of e)on(),tn(),Gt("*"),tn(),W(t)}}e.tags&&(1!==e.tags.length||344!==e.tags[0].kind||e.comment?qt(e,e.tags,33):(tn(),ke(e.tags[0]))),tn(),W("*/")}(t);case 322:return vt(t);case 323:return bt(t);case 327:case 332:case 337:return xt((o=t).tagName),void St(o.comment);case 328:case 329:return function(e){xt(e.tagName),tn(),Gt("{"),ke(e.class),Gt("}"),St(e.comment)}(t);case 338:return function(e){xt(e.tagName),e.name&&(tn(),ke(e.name)),St(e.comment),bt(e.typeExpression)}(t);case 339:return function(e){St(e.comment),bt(e.typeExpression)}(t);case 341:case 348:return xt((i=t).tagName),kt(i.typeExpression),tn(),i.isBracketed&&Gt("["),ke(i.name),i.isBracketed&&Gt("]"),void St(i.comment);case 340:case 342:case 343:case 344:case 349:case 350:return function(e){xt(e.tagName),kt(e.typeExpression),St(e.comment)}(t);case 345:return function(e){xt(e.tagName),kt(e.constraint),tn(),qt(e,e.typeParameters,528),St(e.comment)}(t);case 346:return function(e){xt(e.tagName),e.typeExpression&&(309===e.typeExpression.kind?kt(e.typeExpression):(tn(),Gt("{"),W("Object"),e.typeExpression.isArrayType&&(Gt("["),Gt("]")),Gt("}"))),e.fullName&&(tn(),ke(e.fullName)),St(e.comment),e.typeExpression&&322===e.typeExpression.kind&&vt(e.typeExpression)}(t);case 347:return function(e){xt(e.tagName),ke(e.name),St(e.comment)}(t);case 351:return function(e){xt(e.tagName),tn(),e.importClause&&(ke(e.importClause),tn(),tt(161,e.importClause.end,Qt,e),tn()),Ce(e.moduleSpecifier),e.attributes&&Mt(e.attributes),St(e.comment)}(t)}if(Xu(t)&&(e=1,O!==S$)){const n=O(e,t)||t;n!==t&&(t=n,N&&(t=N(t)))}}var i,o,a;if(1===e)switch(t.kind){case 9:case 10:return function(e){qe(e,!1)}(t);case 11:case 14:case 15:return qe(t,!1);case 80:return Ve(t);case 81:return Ue(t);case 209:return function(e){Vt(e,e.elements,8914|(e.multiLine?65536:0),oe.parenthesizeExpressionForDisallowedComma)}(t);case 210:return function(e){En(e),f(e.properties,In);const t=131072&Yd(e);t&&an();const r=e.multiLine?65536:0,i=n&&n.languageVersion>=1&&!ef(n)?64:0;qt(e,e.properties,526226|i|r),t&&sn(),Pn(e)}(t);case 211:return function(e){Ce(e.expression,oe.parenthesizeLeftSideOfAccess);const t=e.questionDotToken||FT(YC.createToken(25),e.expression.end,e.name.pos),n=kn(e,e.expression,t),r=kn(e,t,e.name);pn(n,!1),29===t.kind||!function(e){if(TD(e=El(e))){const t=Dn(e,!0,!1);return!(448&e.numericLiteralFlags||t.includes(Ra(25))||t.includes(String.fromCharCode(69))||t.includes(String.fromCharCode(101)))}if(Ox(e)){const t=kw(e);return"number"==typeof t&&isFinite(t)&&t>=0&&Math.floor(t)===t}}(e.expression)||v.hasTrailingComment()||v.hasTrailingWhitespace()||Gt("."),e.questionDotToken?ke(t):tt(t.kind,e.expression.end,Gt,e),pn(r,!1),ke(e.name),fn(n,r)}(t);case 212:return function(e){Ce(e.expression,oe.parenthesizeLeftSideOfAccess),ke(e.questionDotToken),tt(23,e.expression.end,Gt,e),Ce(e.argumentExpression),tt(24,e.argumentExpression.end,Gt,e)}(t);case 213:return function(e){const t=16&Zd(e);t&&(Gt("("),Wt("0"),Gt(","),tn()),Ce(e.expression,oe.parenthesizeLeftSideOfAccess),t&&Gt(")"),ke(e.questionDotToken),Rt(e,e.typeArguments),Vt(e,e.arguments,2576,oe.parenthesizeExpressionForDisallowedComma)}(t);case 214:return function(e){tt(105,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeExpressionOfNew),Rt(e,e.typeArguments),Vt(e,e.arguments,18960,oe.parenthesizeExpressionForDisallowedComma)}(t);case 215:return function(e){const t=16&Zd(e);t&&(Gt("("),Wt("0"),Gt(","),tn()),Ce(e.tag,oe.parenthesizeLeftSideOfAccess),t&&Gt(")"),Rt(e,e.typeArguments),tn(),Ce(e.template)}(t);case 216:return function(e){Gt("<"),ke(e.type),Gt(">"),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 217:return function(e){const t=tt(21,e.pos,Gt,e),n=vn(e.expression,e);Ce(e.expression,void 0),bn(e.expression,e),fn(n),tt(22,e.expression?e.expression.end:t,Gt,e)}(t);case 218:return function(e){On(e.name),at(e)}(t);case 219:return function(e){At(e,e.modifiers),st(e,He,Ge)}(t);case 220:return function(e){tt(91,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 221:return function(e){tt(114,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 222:return function(e){tt(116,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 223:return function(e){tt(135,e.pos,Qt,e),tn(),Ce(e.expression,oe.parenthesizeOperandOfPrefixUnary)}(t);case 224:return function(e){un(e.operator,Yt),function(e){const t=e.operand;return 224===t.kind&&(40===e.operator&&(40===t.operator||46===t.operator)||41===e.operator&&(41===t.operator||47===t.operator))}(e)&&tn(),Ce(e.operand,oe.parenthesizeOperandOfPrefixUnary)}(t);case 225:return function(e){Ce(e.operand,oe.parenthesizeOperandOfPostfixUnary),un(e.operator,Yt)}(t);case 226:return se(t);case 227:return function(e){const t=kn(e,e.condition,e.questionToken),n=kn(e,e.questionToken,e.whenTrue),r=kn(e,e.whenTrue,e.colonToken),i=kn(e,e.colonToken,e.whenFalse);Ce(e.condition,oe.parenthesizeConditionOfConditionalExpression),pn(t,!0),ke(e.questionToken),pn(n,!0),Ce(e.whenTrue,oe.parenthesizeBranchOfConditionalExpression),fn(t,n),pn(r,!0),ke(e.colonToken),pn(i,!0),Ce(e.whenFalse,oe.parenthesizeBranchOfConditionalExpression),fn(r,i)}(t);case 228:return function(e){ke(e.head),qt(e,e.templateSpans,262144)}(t);case 229:return function(e){tt(127,e.pos,Qt,e),ke(e.asteriskToken),Lt(e.expression&&it(e.expression),ot)}(t);case 230:return function(e){tt(26,e.pos,Gt,e),Ce(e.expression,oe.parenthesizeExpressionForDisallowedComma)}(t);case 231:return function(e){On(e.name),gt(e)}(t);case 232:case 282:case 353:return;case 234:return function(e){Ce(e.expression,void 0),e.type&&(tn(),Qt("as"),tn(),ke(e.type))}(t);case 235:return function(e){Ce(e.expression,oe.parenthesizeLeftSideOfAccess),Yt("!")}(t);case 233:return Xe(t);case 238:return function(e){Ce(e.expression,void 0),e.type&&(tn(),Qt("satisfies"),tn(),ke(e.type))}(t);case 236:return function(e){cn(e.keywordToken,e.pos,Gt),Gt("."),ke(e.name)}(t);case 237:return xn.fail("SyntheticExpression should never be printed.");case 284:return function(e){ke(e.openingElement),qt(e,e.children,262144),ke(e.closingElement)}(t);case 285:return function(e){Gt("<"),ht(e.tagName),Rt(e,e.typeArguments),tn(),ke(e.attributes),Gt("/>")}(t);case 288:return function(e){ke(e.openingFragment),qt(e,e.children,262144),ke(e.closingFragment)}(t);case 352:return xn.fail("SyntaxList should not be printed");case 354:return function(e){const t=Yd(e);1024&t||e.pos===e.expression.pos||sr(e.expression.pos),Ce(e.expression),2048&t||e.end===e.expression.end||or(e.expression.end)}(t);case 355:return function(e){Vt(e,e.elements,528,void 0)}(t);case 356:return xn.fail("SyntheticReferenceExpression should not be printed")}return Ph(t.kind)?ln(t,Qt):Ml(t.kind)?ln(t,Gt):void xn.fail(`Unhandled SyntaxKind: ${xn.formatSyntaxKind(t.kind)}.`)}function Je(e,t){const n=Le(1,e,t);xn.assertIsDefined(P),t=P,P=void 0,n(e,t)}function ze(t){let r=!1;const i=308===t.kind?t:void 0;if(i&&0===V)return;const o=i?i.sourceFiles.length:1;for(let a=0;a")}function We(e){tn(),ke(e.type)}function He(e){Bt(e,e.typeParameters),zt(e,e.parameters),It(e.type),tn(),ke(e.equalsGreaterThanToken)}function Ge(e){DP(e.body)?pt(e.body):(tn(),Ce(e.body,oe.parenthesizeConciseBodyOfArrowFunction))}function Xe(e){Ce(e.expression,oe.parenthesizeLeftSideOfAccess),Rt(e,e.typeArguments)}function Qe(e,t){tt(19,e.pos,Gt,e);const n=t||1&Yd(e)?768:129;qt(e,e.statements,n),tt(20,e.statements.end,Gt,e,!!(1&n))}function Ye(e){e?Gt(";"):Xt()}function Ze(e,t){const n=tt(117,t,Qt,e);tn(),tt(21,n,Gt,e),Ce(e.expression),tt(22,e.expression.end,Gt,e)}function et(e){void 0!==e&&(261===e.kind?ke(e):Ce(e))}function tt(e,t,r,i,o){const a=hc(i),s=a&&a.kind===i.kind,c=t;if(s&&n&&(t=as(n.text,t)),s&&i.pos!==c){const e=o&&n&&!ix(c,t,n);e&&an(),or(c),e&&sn()}if(t=$||19!==e&&20!==e?un(e,r,t):cn(e,t,r,i),s&&i.end!==t){const e=294===i.kind;sr(t,!e,e)}return t}function nt(e){return 2===e.kind||!!e.hasTrailingNewLine}function rt(e){if(!n)return!1;const t=vs(n.text,e.pos);if(t){const t=hc(e);if(t&&tP(t.parent))return!0}return!!Q(t,nt)||!!Q(gw(e),nt)||!!kP(e)&&(!(e.pos===e.expression.pos||!Q(bs(n.text,e.expression.pos),nt))||rt(e.expression))}function it(e){if(!ne&&kP(e)&&rt(e)){const t=hc(e);if(t&&tP(t)){const n=YC.createParenthesizedExpression(e.expression);return ew(n,e),sI(n,t),n}return YC.createParenthesizedExpression(e)}return e}function ot(e){return it(oe.parenthesizeExpressionForDisallowedComma(e))}function at(e){Ft(e,e.modifiers,!1),Qt("function"),ke(e.asteriskToken),tn(),Te(e.name),st(e,dt,ct)}function st(e,t,n){const r=131072&Yd(e);r&&an(),En(e),f(e.parameters,An),t(e),n(e),Pn(e),r&&sn()}function ct(e){const t=e.body;t?pt(t):Xt()}function _t(e){Xt()}function dt(e){Bt(e,e.typeParameters),Jt(e,e.parameters),It(e.type)}function pt(e){An(e),null==M||M(e),tn(),Gt("{"),an();const t=function(e){if(1&Yd(e))return!0;if(e.multiLine)return!1;if(!ly(e)&&n&&!Xb(e,n))return!1;if(mn(e,Se(e.statements),2)||hn(e,we(e.statements),2,e.statements))return!1;let t;for(const n of e.statements){if(gn(t,n,2)>0)return!1;t=n}return!0}(e)?ft:mt;Yn(e,e.statements,t),sn(),cn(20,e.statements.end,Gt,e),null==L||L(e)}function ft(e){mt(e,!0)}function mt(e,t){const n=Dt(e.statements),r=v.getTextPos();ze(e),0===n&&r===v.getTextPos()&&t?(sn(),qt(e,e.statements,768),an()):qt(e,e.statements,1,void 0,n)}function gt(e){Ft(e,e.modifiers,!0),tt(86,Wb(e).pos,Qt,e),e.name&&(tn(),Te(e.name));const t=131072&Yd(e);t&&an(),Bt(e,e.typeParameters),qt(e,e.heritageClauses,0),tn(),Gt("{"),En(e),f(e.members,In),qt(e,e.members,129),Pn(e),Gt("}"),t&&sn()}function ht(e){80===e.kind?Ce(e):ke(e)}function yt(e,t,r){let i=163969;1===t.length&&(!n||ly(e)||ly(t[0])||Qb(e,t[0],n))?(cn(59,r,Gt,e),tn(),i&=-130):tt(59,r,Gt,e),qt(e,t,i)}function vt(e){qt(e,YC.createNodeArray(e.jsDocPropertyTags),33)}function bt(e){e.typeParameters&&qt(e,YC.createNodeArray(e.typeParameters),33),e.parameters&&qt(e,YC.createNodeArray(e.parameters),33),e.type&&(on(),tn(),Gt("*"),tn(),ke(e.type))}function xt(e){Gt("@"),ke(e)}function St(e){const t=fl(e);t&&(tn(),W(t))}function kt(e){e&&(tn(),Gt("{"),ke(e.type),Gt("}"))}function Tt(e){on();const t=e.statements;0===t.length||!pf(t[0])||ly(t[0])?Yn(e,t,wt):wt(e)}function Ct(e,t,r,i){if(e&&(en('/// '),on()),n&&n.moduleName&&(en(`/// `),on()),n&&n.amdDependencies)for(const e of n.amdDependencies)e.name?en(`/// `):en(`/// `),on();function o(e,t){for(const n of t){const t=n.resolutionMode?`resolution-mode="${99===n.resolutionMode?"import":"require"}" `:"",r=n.preserve?'preserve="true" ':"";en(`/// `),on()}}o("path",t),o("types",r),o("lib",i)}function wt(e){const t=e.statements;En(e),f(e.statements,An),ze(e);const n=T(t,(e=>!pf(e)));!function(e){e.isDeclarationFile&&Ct(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives,e.libReferenceDirectives)}(e),qt(e,t,1,void 0,-1===n?t.length:n),Pn(e)}function Dt(e,t,n){let r=!!t;for(let i=0;i=r.length||0===s;if(c&&32768&i)return null==j||j(r),void(null==R||R(r));15360&i&&(Gt(function(e){return w$[15360&e][0]}(i)),c&&r&&sr(r.pos,!0)),null==j||j(r),c?!(1&i)||K&&(!t||n&&Xb(t,n))?256&i&&!(524288&i)&&tn():on():Kt(e,t,r,i,o,a,s,r.hasTrailingComma,r),null==R||R(r),15360&i&&(c&&r&&or(r.end),Gt(function(e){return w$[15360&e][1]}(i)))}function Kt(e,t,n,r,i,o,a,s,c){const l=0==(262144&r);let u=l;const _=mn(t,n[o],r);_?(on(_),u=!1):256&r&&tn(),128&r&&an();const d=function(e,t){return 1===e.length?iq:"object"==typeof t?oq:aq}(e,i);let p,f=!1;for(let s=0;s0?(0==(131&r)&&(an(),f=!0),u&&60&r&&!iT(a.pos)&&sr(fw(a).pos,!!(512&r),!0),on(e),u=!1):p&&512&r&&tn()}u?sr(fw(a).pos):u=l,y=a.pos,d(a,e,i,s),f&&(sn(),f=!1),p=a}const m=p?Yd(p):0,g=ne||!!(2048&m),h=s&&64&r&&16&r;h&&(p&&!g?tt(28,p.end,Gt,p):Gt(",")),p&&(t?t.end:-1)!==p.end&&60&r&&!g&&or(h&&(null==c?void 0:c.end)?c.end:p.end),128&r&&sn();const v=hn(t,n[o+a-1],r,c);v?on(v):2097408&r&&tn()}function Wt(e){v.writeLiteral(e)}function Ht(e,t){v.writeSymbol(e,t)}function Gt(e){v.writePunctuation(e)}function Xt(){v.writeTrailingSemicolon(";")}function Qt(e){v.writeKeyword(e)}function Yt(e){v.writeOperator(e)}function Zt(e){v.writeParameter(e)}function en(e){v.writeComment(e)}function tn(){v.writeSpace(" ")}function nn(e){v.writeProperty(e)}function rn(e){v.nonEscapingWrite?v.nonEscapingWrite(e):v.write(e)}function on(e=1){for(let t=0;t0)}function an(){v.increaseIndent()}function sn(){v.decreaseIndent()}function cn(e,t,n,r){return H?un(e,n,t):function(e,t,n,r,i){if(H||e&&Lm(e))return i(t,n,r);const o=e&&e.emitNode,a=o&&o.flags||0,s=o&&o.tokenSourceMapRanges&&o.tokenSourceMapRanges[t],c=s&&s.source||C;return r=hr(c,s?s.pos:r),0==(256&a)&&r>=0&&vr(c,r),r=i(t,n,r),s&&(r=s.end),0==(512&a)&&r>=0&&vr(c,r),r}(r,e,n,t,un)}function ln(e,t){B&&B(e),t(Ra(e.kind)),J&&J(e)}function un(e,t,n){const r=Ra(e);return t(r),n<0?n:n+r.length}function _n(e,t,n){if(1&Yd(e))tn();else if(K){const r=kn(e,t,n);r?on(r):tn()}else on()}function dn(e){const t=e.split(/\r\n?|\n/g),n=z_(t);for(const e of t){const t=n?e.slice(n):e;t.length&&(on(),W(t))}}function pn(e,t){e?(an(),on(e)):t&&tn()}function fn(e,t){e&&sn(),t&&sn()}function mn(e,t,r){if(2&r||K){if(65536&r)return 1;if(void 0===t)return!e||n&&Xb(e,n)?0:1;if(t.pos===y)return 0;if(12===t.kind)return 0;if(n&&e&&!iT(e.pos)&&!ly(t)&&(!t.parent||fc(t.parent)===fc(e)))return K?yn((r=>ax(t.pos,e.pos,n,r))):Qb(e,t,n)?0:1;if(Sn(t,r))return 1}return 1&r?1:0}function gn(e,t,r){if(2&r||K){if(void 0===e||void 0===t)return 0;if(12===t.kind)return 0;if(n&&!ly(e)&&!ly(t))return K&&function(e,t){if(t.pos-1&&r.indexOf(t)===i+1}(e,t)?yn((r=>tx(e,t,n,r))):!K&&(o=t,(i=fc(i=e)).parent&&i.parent===fc(o).parent)?ex(e,t,n)?0:1:65536&r?1:0;if(Sn(e,r)||Sn(t,r))return 1}else if(dw(t))return 1;var i,o;return 1&r?1:0}function hn(e,t,r,i){if(2&r||K){if(65536&r)return 1;if(void 0===t)return!e||n&&Xb(e,n)?0:1;if(n&&e&&!iT(e.pos)&&!ly(t)&&(!t.parent||t.parent===e)){if(K){const r=i&&!iT(i.end)?i.end:t.end;return yn((t=>sx(r,e.end,n,t)))}return Yb(e,t,n)?0:1}if(Sn(t,r))return 1}return 1&r&&!(131072&r)?1:0}function yn(e){xn.assert(!!K);const t=e(!0);return 0===t?e(!1):t}function vn(e,t){const n=K&&mn(t,e,0);return n&&pn(n,!1),!!n}function bn(e,t){const n=K&&hn(t,e,0,void 0);n&&on(n)}function Sn(e,t){if(ly(e)){const n=dw(e);return void 0===n?0!=(65536&t):n}return 0!=(65536&t)}function kn(e,t,r){return 262144&Yd(e)?0:(e=Cn(e),t=Cn(t),dw(r=Cn(r))?1:!n||ly(e)||ly(t)||ly(r)?0:K?yn((e=>tx(t,r,n,e))):ex(t,r,n)?0:1)}function Tn(e){return 0===e.statements.length&&(!n||ex(e,e,n))}function Cn(e){for(;217===e.kind&&ly(e);)e=e.expression;return e}function wn(e,t){if(Xl(e)||Ql(e))return Mn(e);if(wD(e)&&e.textSourceNode)return wn(e.textSourceNode,t);const r=n,i=!!r&&!!e.parent&&!ly(e);if(hl(e)){if(!i||Sd(e)!==fc(r))return bc(e)}else if(ON(e)){if(!i||Sd(e)!==fc(r))return pC(e)}else if(xn.assertNode(e,Bl),!i)return e.text;return Kd(r,e,t)}function Dn(t,r,i){if(11===t.kind&&t.textSourceNode){const e=t.textSourceNode;if(qD(e)||VD(e)||TD(e)||ON(e)){const n=TD(e)?e.text:wn(e);return i?`"${Ry(n)}"`:r||16777216&Yd(t)?`"${Fy(n)}"`:`"${Iy(n)}"`}return Dn(e,r,i)}const o=(r?1:0)|(i?2:0)|(e.terminateUnterminatedLiterals?4:0)|(e.target&&e.target>=8?8:0);return np(t,n,o)}function En(e){l.push(u),u=0,g.push(h),e&&1048576&Yd(e)||(_.push(d),d=0,s.push(c),c=void 0,p.push(m))}function Pn(e){u=l.pop(),h=g.pop(),e&&1048576&Yd(e)||(d=_.pop(),c=s.pop(),m=p.pop())}function Nn(e){m&&m!==we(p)||(m=new Set),m.add(e)}function Fn(e){h&&h!==we(g)||(h=new Set),h.add(e)}function An(e){if(e)switch(e.kind){case 241:case 296:case 297:f(e.statements,An);break;case 256:case 254:case 246:case 247:An(e.statement);break;case 245:An(e.thenStatement),An(e.elseStatement);break;case 248:case 250:case 249:An(e.initializer),An(e.statement);break;case 255:An(e.caseBlock);break;case 269:f(e.clauses,An);break;case 258:An(e.tryBlock),An(e.catchClause),An(e.finallyBlock);break;case 299:An(e.variableDeclaration),An(e.block);break;case 243:An(e.declarationList);break;case 261:f(e.declarations,An);break;case 260:case 169:case 208:case 263:case 274:case 280:On(e.name);break;case 262:On(e.name),1048576&Yd(e)&&(f(e.parameters,An),An(e.body));break;case 206:case 207:case 275:f(e.elements,An);break;case 272:An(e.importClause);break;case 273:On(e.name),An(e.namedBindings);break;case 276:On(e.propertyName||e.name)}}function In(e){if(e)switch(e.kind){case 303:case 304:case 172:case 171:case 174:case 173:case 177:case 178:On(e.name)}}function On(e){e&&(Xl(e)||Ql(e)?Mn(e):Eu(e)&&An(e))}function Mn(e){const t=e.emitNode.autoGenerate;if(4==(7&t.flags))return Ln(QA(e),VD(e),t.flags,t.prefix,t.suffix);{const n=t.id;return o[n]||(o[n]=function(e){const t=e.emitNode.autoGenerate,n=YA(t.prefix,Mn),r=YA(t.suffix);switch(7&t.flags){case 1:return Jn(0,!!(8&t.flags),VD(e),n,r);case 2:return xn.assertNode(e,qD),Jn(268435456,!!(8&t.flags),!1,n,r);case 3:return zn(bc(e),32&t.flags?Rn:jn,!!(16&t.flags),!!(8&t.flags),VD(e),n,r)}return xn.fail(`Unsupported GeneratedIdentifierKind: ${xn.formatEnum(7&t.flags,Fr,!0)}.`)}(e))}}function Ln(e,t,n,o,a){const s=IB(e),c=t?i:r;return c[s]||(c[s]=Vn(e,t,n??0,YA(o,Mn),YA(a)))}function jn(e,t){return Rn(e)&&!function(e,t){let n,r;if(t?(n=h,r=g):(n=m,r=p),null==n?void 0:n.has(e))return!0;for(let t=r.length-1;t>=0;t--)if(n!==r[t]&&(n=r[t],null==n?void 0:n.has(e)))return!0;return!1}(e,t)&&!a.has(e)}function Rn(e,t){return!n||Pd(n,e,F)}function Bn(e,t){switch(e){case"":d=t;break;case"#":u=t;break;default:c??(c=new Map),c.set(e,t)}}function Jn(e,t,n,r,i){r.length>0&&35===r.charCodeAt(0)&&(r=r.slice(1));const o=ZA(n,r,"",i);let a=function(e){switch(e){case"":return d;case"#":return u;default:return(null==c?void 0:c.get(e))??0}}(o);if(e&&!(a&e)){const s=ZA(n,r,268435456===e?"_i":"_n",i);if(jn(s,n))return a|=e,n?Fn(s):t&&Nn(s),Bn(o,a),s}for(;;){const e=268435455&a;if(a++,8!==e&&13!==e){const s=ZA(n,r,e<26?"_"+String.fromCharCode(97+e):"_"+(e-26),i);if(jn(s,n))return n?Fn(s):t&&Nn(s),Bn(o,a),s}}}function zn(e,t=jn,n,r,i,o,s){if(e.length>0&&35===e.charCodeAt(0)&&(e=e.slice(1)),o.length>0&&35===o.charCodeAt(0)&&(o=o.slice(1)),n){const n=ZA(i,o,e,s);if(t(n,i))return i?Fn(n):r?Nn(n):a.add(n),n}95!==e.charCodeAt(e.length-1)&&(e+="_");let c=1;for(;;){const n=ZA(i,o,e+c,s);if(t(n,i))return i?Fn(n):r?Nn(n):a.add(n),n;c++}}function $n(e){return zn(e,Rn,!0,!1,!1,"","")}function qn(){return zn("default",jn,!1,!1,!1,"","")}function Vn(e,t,n,r,i){switch(e.kind){case 80:case 81:return zn(wn(e),jn,!!(16&n),!!(8&n),t,r,i);case 267:case 266:return xn.assert(!r&&!i&&!t),function(e){const t=wn(e.name);return function(e,t){for(let n=t;n&&_h(n,t);n=n.nextContainer)if(f_(n)&&n.locals){const t=n.locals.get(yc(e));if(t&&3257279&t.flags)return!1}return!0}(t,lt(e,f_))?t:zn(t,jn,!1,!1,!1,"","")}(e);case 272:case 278:return xn.assert(!r&&!i&&!t),function(e){const t=Cg(e);return zn(wD(t)?ip(t.text):"module",jn,!1,!1,!1,"","")}(e);case 262:case 263:{xn.assert(!r&&!i&&!t);const o=e.name;return o&&!Xl(o)?Vn(o,!1,n,r,i):qn()}case 277:return xn.assert(!r&&!i&&!t),qn();case 231:return xn.assert(!r&&!i&&!t),zn("class",jn,!1,!1,!1,"","");case 174:case 177:case 178:return function(e,t,n,r){return qD(e.name)?Ln(e.name,t):Jn(0,!1,t,n,r)}(e,t,r,i);case 167:return Jn(0,!0,t,r,i);default:return Jn(0,!1,t,r,i)}}function Un(e,t){const n=Le(2,e,t),r=Y,i=Z,o=ee;Kn(t),n(e,t),Wn(t,r,i,o)}function Kn(e){const t=Yd(e),n=fw(e);!function(e,t,n,r){re(),te=!1;const i=n<0||0!=(1024&t)||12===e.kind,o=r<0||0!=(2048&t)||12===e.kind;(n>0||r>0)&&n!==r&&(i||Zn(n,353!==e.kind),(!i||n>=0&&0!=(1024&t))&&(Y=n),(!o||r>=0&&0!=(2048&t))&&(Z=r,261===e.kind&&(ee=r))),f(gw(e),Gn),ie()}(e,t,n.pos,n.end),4096&t&&(ne=!0)}function Wn(e,t,n,r){const i=Yd(e),o=fw(e);4096&i&&(ne=!1),Hn(e,i,o.pos,o.end,t,n,r);const a=Ow(e);a&&Hn(e,i,a.pos,a.end,t,n,r)}function Hn(e,t,n,r,i,o,a){re();const s=r<0||0!=(2048&t)||12===e.kind;f(vw(e),Xn),(n>0||r>0)&&n!==r&&(Y=i,Z=o,ee=a,s||353===e.kind||function(e){_r(e,ar)}(r)),ie()}function Gn(e){(e.hasLeadingNewline||2===e.kind)&&v.writeLine(),Qn(e),e.hasTrailingNewLine||2===e.kind?v.writeLine():v.writeSpace(" ")}function Xn(e){v.isAtStartOfLine()||v.writeSpace(" "),Qn(e),e.hasTrailingNewLine&&v.writeLine()}function Qn(e){const t=function(e){return 3===e.kind?`/*${e.text}*/`:`//${e.text}`}(e);Iv(t,3===e.kind?qa(t):void 0,v,0,t.length,q)}function Yn(e,t,r){re();const{pos:i,end:o}=t,a=Yd(e),s=ne||o<0||0!=(2048&a);i<0||0!=(1024&a)||function(e){const t=n&&Av(n.text,xe(),v,dr,e,q,ne);t&&(E?E.push(t):E=[t])}(t),ie(),4096&a&&!ne?(ne=!0,r(e),ne=!1):r(e),re(),s||(Zn(t.end,!0),te&&!v.isAtStartOfLine()&&v.writeLine()),ie()}function Zn(e,t){te=!1,t?0===e&&(null==n?void 0:n.isDeclarationFile)?ur(e,tr):ur(e,ir):0===e&&ur(e,er)}function er(e,t,n,r,i){pr(e,t)&&ir(e,t,n,r,i)}function tr(e,t,n,r,i){pr(e,t)||ir(e,t,n,r,i)}function nr(t,n){return!e.onlyPrintJsDocStyle||fI(t,n)||$d(t,n)}function ir(e,t,r,i,o){n&&nr(n.text,e)&&(te||(Nv(xe(),v,o,e),te=!0),yr(e),Iv(n.text,xe(),v,e,t,q),yr(t),i?v.writeLine():3===r&&v.writeSpace(" "))}function or(e){ne||-1===e||Zn(e,!0)}function ar(e,t,r,i){n&&nr(n.text,e)&&(v.isAtStartOfLine()||v.writeSpace(" "),yr(e),Iv(n.text,xe(),v,e,t,q),yr(t),i&&v.writeLine())}function sr(e,t,n){ne||(re(),_r(e,t?ar:n?cr:lr),ie())}function cr(e,t,r){n&&(yr(e),Iv(n.text,xe(),v,e,t,q),yr(t),2===r&&v.writeLine())}function lr(e,t,r,i){n&&(yr(e),Iv(n.text,xe(),v,e,t,q),yr(t),i?v.writeLine():v.writeSpace(" "))}function ur(e,t){!n||-1!==Y&&e===Y||(function(e){return void 0!==E&&De(E).nodePos===e}(e)?function(e){if(!n)return;const t=De(E).detachedCommentEndPos;E.length-1?E.pop():E=void 0,fs(n.text,t,e,t)}(t):fs(n.text,e,t,e))}function _r(e,t){n&&(-1===Z||e!==Z&&e!==ee)&&ms(n.text,e,t)}function dr(e,t,r,i,o,a){n&&nr(n.text,i)&&(yr(i),Iv(e,t,r,i,o,a),yr(o))}function pr(e,t){return!!n&&zd(n.text,e,t)}function fr(e,t){const n=Le(3,e,t);mr(t),n(e,t),gr(t)}function mr(e){const t=Yd(e),n=cw(e),r=n.source||C;353!==e.kind&&0==(32&t)&&n.pos>=0&&vr(n.source||C,hr(r,n.pos)),128&t&&(H=!0)}function gr(e){const t=Yd(e),n=cw(e);128&t&&(H=!1),353!==e.kind&&0==(64&t)&&n.end>=0&&vr(n.source||C,n.end)}function hr(e,t){return e.skipTrivia?e.skipTrivia(t):as(e.text,t)}function yr(e){if(H||iT(e)||xr(C))return;const{line:t,character:n}=Xa(C,e);k.addMapping(v.getLine(),v.getColumn(),G,t,n,void 0)}function vr(e,t){if(e!==C){const n=C,r=G;br(e),yr(t),function(e,t){C=e,G=t}(n,r)}else yr(t)}function br(t){H||(C=t,t!==w?xr(t)||(G=k.addSource(t.fileName),e.inlineSources&&k.setSourceContent(G,t.text),w=t,X=G):G=X)}function xr(e){return Ao(e.fileName,".json")}}function iq(e,t,n,r){t(e)}function oq(e,t,n,r){t(e,n.select(r))}function aq(e,t,n,r){t(e,n)}function sq(e,t,n){if(!e.getDirectories||!e.readDirectory)return;const r=new Map,i=tn(n);return{useCaseSensitiveFileNames:n,fileExists:function(t){const n=s(o(t));return n&&_(n.sortedAndCanonicalizedFiles,i(c(t)))||e.fileExists(t)},readFile:(t,n)=>e.readFile(t,n),directoryExists:e.directoryExists&&function(t){const n=o(t);return r.has(ea(n))||e.directoryExists(t)},getDirectories:function(t){const n=l(t,o(t));return n?n.directories.slice():e.getDirectories(t)},readDirectory:function(r,i,a,s,_){const p=o(r),f=l(r,p);let m;return void 0!==f?Ck(r,i,a,s,n,t,_,(function(e){const t=o(e);if(t===p)return f||g(e,t);const n=l(e,t);return void 0!==n?n||g(e,t):_T}),d):e.readDirectory(r,i,a,s,_);function g(t,n){if(m&&n===p)return m;const r={files:O(e.readDirectory(t,void 0,void 0,["*.*"]),c)||u,directories:e.getDirectories(t)||u};return n===p&&(m=r),r}},createDirectory:e.createDirectory&&function(t){const n=s(o(t));if(n){const e=c(t),r=i(e);ie(n.sortedAndCanonicalizedDirectories,r,Mt)&&n.directories.push(e)}e.createDirectory(t)},writeFile:e.writeFile&&function(t,n,r){const i=s(o(t));return i&&p(i,c(t),!0),e.writeFile(t,n,r)},addOrDeleteFileOrDirectory:function(t,n){if(void 0!==a(n))return void f();const r=s(n);if(!r)return;if(!e.directoryExists)return void f();const o=c(t),l={fileExists:e.fileExists(t),directoryExists:e.directoryExists(t)};return l.directoryExists||_(r.sortedAndCanonicalizedDirectories,i(o))?f():p(r,o,l.fileExists),l},addOrDeleteFile:function(e,t,n){if(1===n)return;const r=s(t);r&&p(r,c(e),0===n)},clearCache:f,realpath:e.realpath&&d};function o(e){return Yo(e,t,i)}function a(e){return r.get(ea(e))}function s(e){const t=a(Ro(e));return t?(t.sortedAndCanonicalizedFiles||(t.sortedAndCanonicalizedFiles=t.files.map(i).sort(),t.sortedAndCanonicalizedDirectories=t.directories.map(i).sort()),t):t}function c(e){return Bo(Xo(e))}function l(t,n){const i=a(n=ea(n));if(i)return i;try{return function(t,n){var i;if(!e.realpath||ea(o(e.realpath(t)))===n){const i={files:O(e.readDirectory(t,void 0,void 0,["*.*"]),c)||[],directories:e.getDirectories(t)||[]};return r.set(ea(n),i),i}if(null==(i=e.directoryExists)?void 0:i.call(e,t))return r.set(n,!1),!1}(t,n)}catch(e){return void xn.assert(!r.has(ea(n)))}}function _(e,t){return Ae(e,t,mt,Mt)>=0}function d(t){return e.realpath?e.realpath(t):t}function p(e,t,n){const r=e.sortedAndCanonicalizedFiles,o=i(t);if(n)ie(r,o,Mt)&&e.files.push(t);else{const t=Ae(r,o,mt,Mt);if(t>=0){r.splice(t,1);const n=e.files.findIndex((e=>i(e)===o));e.files.splice(n,1)}}}function f(){r.clear()}}var cq=(e=>(e[e.Update=0]="Update",e[e.RootNamesAndUpdate=1]="RootNamesAndUpdate",e[e.Full=2]="Full",e))(cq||{});function lq(e,t,n,r,i){var o;const a=Ue((null==(o=null==t?void 0:t.configFile)?void 0:o.extendedSourceFiles)||u,i);n.forEach(((t,n)=>{a.has(n)||(t.projects.delete(e),t.close())})),a.forEach(((t,i)=>{const o=n.get(i);o?o.projects.add(e):n.set(i,{projects:new Set([e]),watcher:r(t,i),close:()=>{const e=n.get(i);e&&0===e.projects.size&&(e.watcher.close(),n.delete(i))}})}))}function uq(e,t){t.forEach((t=>{t.projects.delete(e)&&t.close()}))}function _q(e,t,n){e.delete(t)&&e.forEach((({extendedResult:r},i)=>{var o;(null==(o=r.extendedSourceFiles)?void 0:o.some((e=>n(e)===t)))&&_q(e,i,n)}))}function dq(e,t,n){kx(t,e.getMissingFilePaths(),{createNewValue:n,onDeleteValue:dx})}function pq(e,t,n){function r(e,t){return{watcher:n(e,t),flags:t}}t?kx(e,new Map(Object.entries(t)),{createNewValue:r,onDeleteValue:vq,onExistingValue:function(t,n,i){t.flags!==n&&(t.watcher.close(),e.set(i,r(i,n)))}}):xx(e,vq)}function fq({watchedDirPath:e,fileOrDirectory:t,fileOrDirectoryPath:n,configFileName:r,options:i,program:o,extraFileExtensions:a,currentDirectory:s,useCaseSensitiveFileNames:c,writeLog:l,toPath:u,getScriptKind:_}){const d=_U(n);if(!d)return l(`Project: ${r} Detected ignored path: ${t}`),!0;if((n=d)===e)return!1;if(Fo(n)&&!Hk(t,i,a)&&!function(){if(!_)return!1;switch(_(t)){case 3:case 4:case 7:case 5:return!0;case 1:case 2:return JS(i);case 6:return MS(i);case 0:return!1}}())return l(`Project: ${r} Detected file add/remove of non supported extension: ${t}`),!0;if(SL(t,i.configFile.configFileSpecs,Go(Ro(r),s),c,s))return l(`Project: ${r} Detected excluded file: ${t}`),!0;if(!o)return!1;if(i.outFile||i.outDir)return!1;if(QI(n)){if(i.declarationDir)return!1}else if(!Io(n,Mk))return!1;const p=Yk(n),f=ot(o)?void 0:function(e){return!!e.getState}(o)?o.getProgramOrUndefined():o,m=f||ot(o)?void 0:o;return!(!g(p+".ts")&&!g(p+".tsx")||(l(`Project: ${r} Detected output file: ${t}`),0));function g(e){return f?!!f.getSourceFileByPath(e):m?m.getState().fileInfos.has(e):!!S(o,(t=>u(t)===e))}}function mq(e,t){return!!e&&e.isEmittedFile(t)}var gq=(e=>(e[e.None=0]="None",e[e.TriggerOnly=1]="TriggerOnly",e[e.Verbose=2]="Verbose",e))(gq||{});function hq(e,t,n,r){_o(2===t?n:_t);const i={watchFile:(t,n,r,i)=>e.watchFile(t,n,r,i),watchDirectory:(t,n,r,i)=>e.watchDirectory(t,n,0!=(1&r),i)},o=0!==t?{watchFile:l("watchFile"),watchDirectory:l("watchDirectory")}:void 0,a=2===t?{watchFile:function(e,t,i,a,s,c){n(`FileWatcher:: Added:: ${u(e,i,a,s,c,r)}`);const l=o.watchFile(e,t,i,a,s,c);return{close:()=>{n(`FileWatcher:: Close:: ${u(e,i,a,s,c,r)}`),l.close()}}},watchDirectory:function(e,t,i,a,s,c){const l=`DirectoryWatcher:: Added:: ${u(e,i,a,s,c,r)}`;n(l);const _=Yn(),d=o.watchDirectory(e,t,i,a,s,c),p=Yn()-_;return n(`Elapsed:: ${p}ms ${l}`),{close:()=>{const t=`DirectoryWatcher:: Close:: ${u(e,i,a,s,c,r)}`;n(t);const o=Yn();d.close();const l=Yn()-o;n(`Elapsed:: ${l}ms ${t}`)}}}}:o||i,s=2===t?function(e,t,i,o,a){return n(`ExcludeWatcher:: Added:: ${u(e,t,i,o,a,r)}`),{close:()=>n(`ExcludeWatcher:: Close:: ${u(e,t,i,o,a,r)}`)}}:QU;return{watchFile:c("watchFile"),watchDirectory:c("watchDirectory")};function c(t){return(n,r,i,o,c,l)=>{var u;return TL(n,"watchFile"===t?null==o?void 0:o.excludeFiles:null==o?void 0:o.excludeDirectories,"boolean"==typeof e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),(null==(u=e.getCurrentDirectory)?void 0:u.call(e))||"")?s(n,i,o,c,l):a[t].call(void 0,n,r,i,o,c,l)}}function l(e){return(t,o,a,s,c,l)=>i[e].call(void 0,t,((...i)=>{const _=`${"watchFile"===e?"FileWatcher":"DirectoryWatcher"}:: Triggered with ${i[0]} ${void 0!==i[1]?i[1]:""}:: ${u(t,a,s,c,l,r)}`;n(_);const d=Yn();o.call(void 0,...i);const p=Yn()-d;n(`Elapsed:: ${p}ms ${_}`)}),a,s,c,l)}function u(e,t,n,r,i,o){return`WatchInfo: ${e} ${t} ${JSON.stringify(n)} ${o?o(r,i):void 0===i?r:`${r} ${i}`}`}}function yq(e){const t=null==e?void 0:e.fallbackPolling;return{watchFile:void 0!==t?t:1}}function vq(e){e.watcher.close()}function bq(e,t,n="tsconfig.json"){return ga(e,(e=>{const r=Ko(e,n);return t(r)?r:void 0}))}function xq(e,t){const n=Ro(t);return Xo(wo(e)?e:Ko(n,e))}function Sq(e,t,n){let r;return f(e,(e=>{const i=Ho(e,t);if(i.pop(),!r)return void(r=i);const o=Math.min(r.length,i.length);for(let e=0;e{let o;try{pr("beforeIORead"),o=e(n),pr("afterIORead"),fr("I/O Read","beforeIORead","afterIORead")}catch(e){i&&i(e.message),o=""}return void 0!==o?JI(n,o,r,t):void 0}}function Cq(e,t,n){return(r,i,o,a)=>{try{pr("beforeIOWrite"),uv(r,i,o,e,t,n),pr("afterIOWrite"),fr("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}}}function wq(e,t,n=vo){const r=new Map,i=tn(n.useCaseSensitiveFileNames);function o(){return Ro(Xo(n.getExecutingFilePath()))}const a=$b(e),s=n.realpath&&(e=>n.realpath(e)),c={getSourceFile:Tq((e=>c.readFile(e)),t),getDefaultLibLocation:o,getDefaultLibFileName:e=>Ko(o(),Ls(e)),writeFile:Cq(((e,t,r)=>n.writeFile(e,t,r)),(e=>(c.createDirectory||n.createDirectory)(e)),(e=>{return t=e,!!r.has(t)||!!(c.directoryExists||n.directoryExists)(t)&&(r.set(t,!0),!0);var t})),getCurrentDirectory:bt((()=>n.getCurrentDirectory())),useCaseSensitiveFileNames:()=>n.useCaseSensitiveFileNames,getCanonicalFileName:i,getNewLine:()=>a,fileExists:e=>n.fileExists(e),readFile:e=>n.readFile(e),trace:e=>n.write(e+a),directoryExists:e=>n.directoryExists(e),getEnvironmentVariable:e=>n.getEnvironmentVariable?n.getEnvironmentVariable(e):"",getDirectories:e=>n.getDirectories(e),realpath:s,readDirectory:(e,t,r,i,o)=>n.readDirectory(e,t,r,i,o),createDirectory:e=>n.createDirectory(e),createHash:Ze(n,n.createHash)};return c}function Dq(e,t,n){const r=e.readFile,i=e.fileExists,o=e.directoryExists,a=e.createDirectory,s=e.writeFile,c=new Map,l=new Map,u=new Map,_=new Map,d=(t,n)=>{const i=r.call(e,n);return c.set(t,void 0!==i&&i),i};e.readFile=n=>{const i=t(n),o=c.get(i);return void 0!==o?!1!==o?o:void 0:Ao(n,".json")||D$(n)?d(i,n):r.call(e,n)};const p=n?(e,r,i,o)=>{const a=t(e),s="object"==typeof r?r.impliedNodeFormat:void 0,c=_.get(s),l=null==c?void 0:c.get(a);if(l)return l;const u=n(e,r,i,o);return u&&(QI(e)||Ao(e,".json"))&&_.set(s,(c||new Map).set(a,u)),u}:void 0;return e.fileExists=n=>{const r=t(n),o=l.get(r);if(void 0!==o)return o;const a=i.call(e,n);return l.set(r,!!a),a},s&&(e.writeFile=(n,r,...i)=>{const o=t(n);l.delete(o);const a=c.get(o);void 0!==a&&a!==r?(c.delete(o),_.forEach((e=>e.delete(o)))):p&&_.forEach((e=>{const t=e.get(o);t&&t.text!==r&&e.delete(o)})),s.call(e,n,r,...i)}),o&&(e.directoryExists=n=>{const r=t(n),i=u.get(r);if(void 0!==i)return i;const a=o.call(e,n);return u.set(r,!!a),a},a&&(e.createDirectory=n=>{const r=t(n);u.delete(r),a.call(e,n)})),{originalReadFile:r,originalFileExists:i,originalDirectoryExists:o,originalCreateDirectory:a,originalWriteFile:s,getSourceFileWithCache:p,readFileWithCache:e=>{const n=t(e),r=c.get(n);return void 0!==r?!1!==r?r:void 0:d(n,e)}}}function Eq(e,t,n){let r;return r=pe(r,e.getConfigFileParsingDiagnostics()),r=pe(r,e.getOptionsDiagnostics(n)),r=pe(r,e.getSyntacticDiagnostics(t,n)),r=pe(r,e.getGlobalDiagnostics(n)),r=pe(r,e.getSemanticDiagnostics(t,n)),LS(e.getCompilerOptions())&&(r=pe(r,e.getDeclarationDiagnostics(t,n))),Ms(r||u)}function Pq(e,t){let n="";for(const r of e)n+=Nq(r,t);return n}function Nq(e,t){const n=`${vi(e)} TS${e.code}: ${Jq(e.messageText,t.getNewLine())}${t.getNewLine()}`;if(e.file){const{line:r,character:i}=Xa(e.file,e.start);return`${pa(e.file.fileName,t.getCurrentDirectory(),(e=>t.getCanonicalFileName(e)))}(${r+1},${i+1}): `+n}return n}var Fq=(e=>(e.Grey="",e.Red="",e.Yellow="",e.Blue="",e.Cyan="",e))(Fq||{}),Aq="",Iq="",Oq=" ";function Mq(e){switch(e){case 1:return"";case 0:return"";case 2:return xn.fail("Should never get an Info diagnostic on the command line.");case 3:return""}}function Lq(e,t){return t+e+Iq}function jq(e,t,n,r,i,o){const{line:a,character:s}=Xa(e,t),{line:c,character:l}=Xa(e,t+n),u=Xa(e,e.text.length).line,_=c-a>=4;let d=(c+1+"").length;_&&(d=Math.max("...".length,d));let p="";for(let t=a;t<=c;t++){p+=o.getNewLine(),_&&a+1n.getCanonicalFileName(e))):e.fileName,""),a+=":",a+=r(`${i+1}`,""),a+=":",a+=r(`${o+1}`,""),a}function Bq(e,t){let n="";for(const r of e){if(r.file){const{file:e,start:i}=r;n+=Rq(e,i,t),n+=" - "}if(n+=Lq(vi(r),Mq(r.category)),n+=Lq(` TS${r.code}: `,""),n+=Jq(r.messageText,t.getNewLine()),r.file&&r.code!==va.File_appears_to_be_binary.code&&(n+=t.getNewLine(),n+=jq(r.file,r.start,r.length,"",Mq(r.category),t)),r.relatedInformation){n+=t.getNewLine();for(const{file:e,start:i,length:o,messageText:a}of r.relatedInformation)e&&(n+=t.getNewLine(),n+=" "+Rq(e,i,t),n+=jq(e,i,o,Oq,"",t)),n+=t.getNewLine(),n+=Oq+Jq(a,t.getNewLine())}n+=t.getNewLine()}return n}function Jq(e,t,n=0){if(st(e))return e;if(void 0===e)return"";let r="";if(n){r+=t;for(let e=0;eVq(t,e,n)};function Xq(e,t,n,r,i){return{nameAndMode:Gq,resolve:(o,a)=>Sj(o,e,n,r,i,t,a)}}function Qq(e){return st(e)?e:e.fileName}var Yq={getName:Qq,getMode:(e,t)=>zq(e,null==t?void 0:t.impliedNodeFormat)};function Zq(e,t,n,r,i){return{nameAndMode:Yq,resolve:(o,a)=>tj(o,e,n,r,t,i,a)}}function eV(e,t,n,r,i,o,a,s){if(0===e.length)return u;const c=[],l=new Map,_=s(t,n,r,o,a);for(const t of e){const e=_.nameAndMode.getName(t),o=_.nameAndMode.getMode(t,i,(null==n?void 0:n.commandLine.options)||r),a=dj(e,o);let s=l.get(a);s||l.set(a,s=_.resolve(e,o)),c.push(s)}return c}function tV(e,t){return nV(void 0,e,((e,n)=>e&&t(e,n)))}function nV(e,t,n,r){let i;return function e(t,o,a){if(r){const e=r(t,a);if(e)return e}return f(o,((t,r)=>{if(t&&(null==i?void 0:i.has(t.sourceFile.path)))return;const o=n(t,a,r);return o||!t?o:((i||(i=new Set)).add(t.sourceFile.path),e(t.commandLine.projectReferences,t.references,t))}))}(e,t,void 0)}var rV="__inferred type names__.ts";function iV(e,t,n){return Ko(e.configFilePath?Ro(e.configFilePath):t,`__lib_node_modules_lookup_${n}__.ts`)}function oV(e){const t=e.split(".");let n=t[1],r=2;for(;t[r]&&"d"!==t[r];)n+=(2===r?"/":"-")+t[r],r++;return"@typescript/lib-"+n}function aV(e){return yt(e.fileName)}function sV(e){const t=aV(e);return fO.get(t)}function cV(e){switch(null==e?void 0:e.kind){case 3:case 4:case 5:case 7:return!0;default:return!1}}function lV(e){return void 0!==e.pos}function uV(e,t){var n,r,i,o;const a=xn.checkDefined(e.getSourceFileByPath(t.file)),{kind:s,index:c}=t;let l,u,_;switch(s){case 3:const t=TV(a,c);if(_=null==(r=null==(n=e.getResolvedModuleFromModuleSpecifier(t,a))?void 0:n.resolvedModule)?void 0:r.packageId,-1===t.pos)return{file:a,packageId:_,text:t.text};l=as(a.text,t.pos),u=t.end;break;case 4:({pos:l,end:u}=a.referencedFiles[c]);break;case 5:({pos:l,end:u}=a.typeReferenceDirectives[c]),_=null==(o=null==(i=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a.typeReferenceDirectives[c],a))?void 0:i.resolvedTypeReferenceDirective)?void 0:o.packageId;break;case 7:({pos:l,end:u}=a.libReferenceDirectives[c]);break;default:return xn.assertNever(s)}return{file:a,pos:l,end:u,packageId:_}}function _V(e,t,n,r,i,o,a,s,c,l){if(!e||(null==s?void 0:s()))return!1;if(!se(e.getRootFileNames(),t))return!1;let u;if(!se(e.getProjectReferences(),l,(function(t,n,r){return fd(t,n)&&p(e.getResolvedProjectReferences()[r],t)})))return!1;if(e.getSourceFiles().some((function(e){return!function(e){return e.version===r(e.resolvedPath,e.fileName)}(e)||o(e.path)})))return!1;const _=e.getMissingFilePaths();if(_&&ld(_,i))return!1;const d=e.getCompilerOptions();return!(!bx(d,n)||e.resolvedLibReferences&&ld(e.resolvedLibReferences,((e,t)=>a(t)))||d.configFile&&n.configFile&&d.configFile.text!==n.configFile.text);function p(e,t){if(e){if(D(u,e))return!0;const n=xV(t),r=c(n);return!!r&&e.commandLine.options.configFile===r.options.configFile&&!!se(e.commandLine.fileNames,r.fileNames)&&((u||(u=[])).push(e),!f(e.references,((t,n)=>!p(t,e.commandLine.projectReferences[n]))))}const n=xV(t);return!c(n)}}function dV(e){return e.options.configFile?[...e.options.configFile.parseDiagnostics,...e.errors]:e.errors}function pV(e,t,n,r){const i=fV(e,t,n,r);return"object"==typeof i?i.impliedNodeFormat:i}function fV(e,t,n,r){switch(ES(r)){case 3:case 99:return Io(e,[".d.mts",".mts",".mjs"])?99:Io(e,[".d.cts",".cts",".cjs"])?1:Io(e,[".d.ts",".ts",".tsx",".js",".jsx"])?function(){const i=Wj(t,n,r),o=[];i.failedLookupLocations=o,i.affectingLocations=o;const a=Hj(e,i);return{impliedNodeFormat:"module"===(null==a?void 0:a.contents.packageJsonContent.type)?99:1,packageJsonLocations:o,packageJsonScope:a}}():void 0;default:return}}var mV=new Set([va.Cannot_redeclare_block_scoped_variable_0.code,va.A_module_cannot_have_multiple_default_exports.code,va.Another_export_default_is_here.code,va.The_first_export_default_is_here.code,va.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code,va.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code,va.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code,va.constructor_is_a_reserved_word.code,va.delete_cannot_be_called_on_an_identifier_in_strict_mode.code,va.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code,va.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,va.Invalid_use_of_0_in_strict_mode.code,va.A_label_is_not_allowed_here.code,va.with_statements_are_not_allowed_in_strict_mode.code,va.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code,va.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code,va.A_class_declaration_without_the_default_modifier_must_have_a_name.code,va.A_class_member_cannot_have_the_0_keyword.code,va.A_comma_expression_is_not_allowed_in_a_computed_property_name.code,va.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code,va.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,va.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code,va.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code,va.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code,va.A_definite_assignment_assertion_is_not_permitted_in_this_context.code,va.A_destructuring_declaration_must_have_an_initializer.code,va.A_get_accessor_cannot_have_parameters.code,va.A_rest_element_cannot_contain_a_binding_pattern.code,va.A_rest_element_cannot_have_a_property_name.code,va.A_rest_element_cannot_have_an_initializer.code,va.A_rest_element_must_be_last_in_a_destructuring_pattern.code,va.A_rest_parameter_cannot_have_an_initializer.code,va.A_rest_parameter_must_be_last_in_a_parameter_list.code,va.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,va.A_return_statement_cannot_be_used_inside_a_class_static_block.code,va.A_set_accessor_cannot_have_rest_parameter.code,va.A_set_accessor_must_have_exactly_one_parameter.code,va.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,va.An_export_declaration_cannot_have_modifiers.code,va.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,va.An_import_declaration_cannot_have_modifiers.code,va.An_object_member_cannot_be_declared_optional.code,va.Argument_of_dynamic_import_cannot_be_spread_element.code,va.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code,va.Cannot_redeclare_identifier_0_in_catch_clause.code,va.Catch_clause_variable_cannot_have_an_initializer.code,va.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code,va.Classes_can_only_extend_a_single_class.code,va.Classes_may_not_have_a_field_named_constructor.code,va.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code,va.Duplicate_label_0.code,va.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code,va.for_await_loops_cannot_be_used_inside_a_class_static_block.code,va.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code,va.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code,va.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code,va.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code,va.Jump_target_cannot_cross_function_boundary.code,va.Line_terminator_not_permitted_before_arrow.code,va.Modifiers_cannot_appear_here.code,va.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code,va.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code,va.Private_identifiers_are_not_allowed_outside_class_bodies.code,va.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,va.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code,va.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code,va.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code,va.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code,va.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code,va.Trailing_comma_not_allowed.code,va.Variable_declaration_list_cannot_be_empty.code,va._0_and_1_operations_cannot_be_mixed_without_parentheses.code,va._0_expected.code,va._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code,va._0_list_cannot_be_empty.code,va._0_modifier_already_seen.code,va._0_modifier_cannot_appear_on_a_constructor_declaration.code,va._0_modifier_cannot_appear_on_a_module_or_namespace_element.code,va._0_modifier_cannot_appear_on_a_parameter.code,va._0_modifier_cannot_appear_on_class_elements_of_this_kind.code,va._0_modifier_cannot_be_used_here.code,va._0_modifier_must_precede_1_modifier.code,va._0_declarations_can_only_be_declared_inside_a_block.code,va._0_declarations_must_be_initialized.code,va.extends_clause_already_seen.code,va.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,va.Class_constructor_may_not_be_a_generator.code,va.Class_constructor_may_not_be_an_accessor.code,va.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.Private_field_0_must_be_declared_in_an_enclosing_class.code,va.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code]);function gV(e,t,n,r,i){var o,a,c,l,_,d,p,m,g,y,v,b,x,k,C,w;const E=ot(e)?function(e,t,n,r,i,o){return{rootNames:e,options:t,host:n,oldProgram:r,configFileParsingDiagnostics:i,typeScriptVersion:void 0}}(e,t,n,r,i):e,{rootNames:P,options:N,configFileParsingDiagnostics:A,projectReferences:I,typeScriptVersion:O}=E;let{oldProgram:M}=E;for(const e of NO)if(Le(N,e.name)&&"string"==typeof N[e.name])throw new Error(`${e.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);const L=bt((()=>Gn("ignoreDeprecations",va.Invalid_value_for_ignoreDeprecations)));let B,J,z,$,V,U,K;const W=new Map;let H,G,X,Y=et();const ee={},te={};let ne,re,ie,oe,ae,ce,le,_e,de,pe;const fe="number"==typeof N.maxNodeModuleJsDepth?N.maxNodeModuleJsDepth:0;let me=0;const ge=new Map,he=new Map;null==(o=or)||o.push(or.Phase.Program,"createProgram",{configFilePath:N.configFilePath,rootDir:N.rootDir},!0),pr("beforeProgram");const ye=E.host||kq(N),be=bV(ye);let xe=N.noLib;const Se=bt((()=>ye.getDefaultLibFileName(N))),ke=ye.getDefaultLibLocation?ye.getDefaultLibLocation():Ro(Se()),Te=by();let Ce=[];const we=ye.getCurrentDirectory(),De=zk(N),Ee=$k(N,De),Pe=new Map;let Ne,Fe,Ae,Ie;const Oe=ye.hasInvalidatedResolutions||dt;let Me;if(ye.resolveModuleNameLiterals?(Ie=ye.resolveModuleNameLiterals.bind(ye),Ae=null==(a=ye.getModuleResolutionCache)?void 0:a.call(ye)):ye.resolveModuleNames?(Ie=(e,t,n,r,i,o)=>ye.resolveModuleNames(e.map(Hq),t,null==o?void 0:o.map(Hq),n,r,i).map((e=>e?void 0!==e.extension?{resolvedModule:e}:{resolvedModule:{...e,extension:sT(e.resolvedFileName)}}:Wq)),Ae=null==(c=ye.getModuleResolutionCache)?void 0:c.call(ye)):(Ae=hj(we,Ln,N),Ie=(e,t,n,r,i)=>eV(e,t,n,r,i,ye,Ae,Xq)),ye.resolveTypeReferenceDirectiveReferences)Me=ye.resolveTypeReferenceDirectiveReferences.bind(ye);else if(ye.resolveTypeReferenceDirectives)Me=(e,t,n,r,i)=>ye.resolveTypeReferenceDirectives(e.map(Qq),t,n,r,null==i?void 0:i.impliedNodeFormat).map((e=>({resolvedTypeReferenceDirective:e})));else{const e=yj(we,Ln,void 0,null==Ae?void 0:Ae.getPackageJsonInfoCache(),null==Ae?void 0:Ae.optionsToRedirectsKey);Me=(t,n,r,i,o)=>eV(t,n,r,i,o,ye,e,Zq)}const je=ye.hasInvalidatedLibResolutions||dt;let Re;if(ye.resolveLibrary)Re=ye.resolveLibrary.bind(ye);else{const e=hj(we,Ln,N,null==Ae?void 0:Ae.getPackageJsonInfoCache());Re=(t,n,r)=>bj(t,n,r,ye,e)}const Be=new Map;let Je=new Map,ze=et(),$e=!1;const qe=new Map;let Ve=new Map;const Ue=ye.useCaseSensitiveFileNames()?new Map:void 0;let Ke,We,He,Ge;const Xe=!!(null==(l=ye.useSourceOfProjectReferenceRedirect)?void 0:l.call(ye))&&!N.disableSourceOfProjectReferenceRedirect,{onProgramCreateComplete:Qe,fileExists:Ye,directoryExists:tt}=function(e){let t;const n=e.compilerHost.fileExists,r=e.compilerHost.directoryExists,i=e.compilerHost.getDirectories,o=e.compilerHost.realpath;if(!e.useSourceOfProjectReferenceRedirect)return{onProgramCreateComplete:_t,fileExists:s};let a;return e.compilerHost.fileExists=s,r&&(a=e.compilerHost.directoryExists=n=>r.call(e.compilerHost,n)?(function(t){var n;if(!e.getResolvedProjectReferences()||JT(t))return;if(!o||!t.includes(Ij))return;const r=e.getSymlinkCache(),i=ea(e.toPath(t));if(null==(n=r.getSymlinkedDirectories())?void 0:n.has(i))return;const a=Xo(o.call(e.compilerHost,t));let s;a!==t&&(s=ea(e.toPath(a)))!==i?r.setSymlinkedDirectory(t,{real:ea(a),realPath:s}):r.setSymlinkedDirectory(i,!1)}(n),!0):!!e.getResolvedProjectReferences()&&(t||(t=new Set,e.forEachResolvedProjectReference((n=>{const r=n.commandLine.options.outFile;if(r)t.add(Ro(e.toPath(r)));else{const r=n.commandLine.options.declarationDir||n.commandLine.options.outDir;r&&t.add(e.toPath(r))}}))),c(n,!1))),i&&(e.compilerHost.getDirectories=t=>!e.getResolvedProjectReferences()||r&&r.call(e.compilerHost,t)?i.call(e.compilerHost,t):[]),o&&(e.compilerHost.realpath=t=>{var n;return(null==(n=e.getSymlinkCache().getSymlinkedFiles())?void 0:n.get(e.toPath(t)))||o.call(e.compilerHost,t)}),{onProgramCreateComplete:function(){e.compilerHost.fileExists=n,e.compilerHost.directoryExists=r,e.compilerHost.getDirectories=i},fileExists:s,directoryExists:a};function s(t){return!!n.call(e.compilerHost,t)||!!e.getResolvedProjectReferences()&&!!QI(t)&&c(t,!0)}function c(r,i){var o;const a=i?t=>function(t){const r=e.getSourceOfProjectReferenceRedirect(e.toPath(t));return void 0!==r?!st(r)||n.call(e.compilerHost,r):void 0}(t):n=>function(n){const r=e.toPath(n),i=`${r}${xo}`;return ud(t,(e=>r===e||an(e,i)||an(r,`${e}/`)))}(n),s=a(r);if(void 0!==s)return s;const c=e.getSymlinkCache(),l=c.getSymlinkedDirectories();if(!l)return!1;const u=e.toPath(r);return!!u.includes(Ij)&&(!(!i||!(null==(o=c.getSymlinkedFiles())?void 0:o.has(u)))||h(l.entries(),(([t,n])=>{if(!n||!an(u,t))return;const o=a(u.replace(t,n.realPath));if(i&&o){const i=Go(r,e.compilerHost.getCurrentDirectory());c.setSymlinkedFile(u,`${n.real}${i.replace(new RegExp(t,"i"),"")}`)}return o}))||!1)}}({compilerHost:ye,getSymlinkCache:ir,useSourceOfProjectReferenceRedirect:Xe,toPath:Ft,getResolvedProjectReferences:jt,getSourceOfProjectReferenceRedirect:wn,forEachResolvedProjectReference:Cn}),nt=ye.readFile.bind(ye);null==(_=or)||_.push(or.Phase.Program,"shouldProgramCreateNewSourceFiles",{hasOldProgram:!!M});const rt=function(e,t){return!!e&&sd(e.getCompilerOptions(),t,CO)}(M,N);let it;if(null==(d=or)||d.pop(),null==(p=or)||p.push(or.Phase.Program,"tryReuseStructureFromOldProgram",{}),it=function(){var e;if(!M)return 0;const t=M.getCompilerOptions();if(id(t,N))return 0;if(!se(M.getRootFileNames(),P))return 0;if(nV(M.getProjectReferences(),M.getResolvedProjectReferences(),((e,t,n)=>{const r=Rn((t?t.commandLine.projectReferences:I)[n]);return e?!r||r.sourceFile!==e.sourceFile||!se(e.commandLine.fileNames,r.commandLine.fileNames):void 0!==r}),((e,t)=>!se(e,t?En(t.sourceFile.path).commandLine.projectReferences:I,fd))))return 0;I&&(Ke=I.map(Rn));const n=[],r=[];if(it=2,ld(M.getMissingFilePaths(),(e=>ye.fileExists(e))))return 0;const i=M.getSourceFiles();let o;var a;(a=o||(o={}))[a.Exists=0]="Exists",a[a.Modified=1]="Modified";const s=new Map;for(const t of i){const i=gn(t.fileName,Ae,ye,N);let o,a=ye.getSourceFileByPath?ye.getSourceFileByPath(t.fileName,t.resolvedPath,i,void 0,rt):ye.getSourceFile(t.fileName,i,void 0,rt);if(!a)return 0;if(a.packageJsonLocations=(null==(e=i.packageJsonLocations)?void 0:e.length)?i.packageJsonLocations:void 0,a.packageJsonScope=i.packageJsonScope,xn.assert(!a.redirectInfo,"Host should not return a redirect source file from `getSourceFile`"),t.redirectInfo){if(a!==t.redirectInfo.unredirected)return 0;o=!1,a=t}else if(M.redirectTargetsMap.has(t.path)){if(a!==t)return 0;o=!1}else o=a!==t;a.path=t.path,a.originalFileName=t.originalFileName,a.resolvedPath=t.resolvedPath,a.fileName=t.fileName;const c=M.sourceFileToPackageName.get(t.path);if(void 0!==c){const e=s.get(c),t=o?1:0;if(void 0!==e&&1===t||1===e)return 0;s.set(c,t)}if(o)t.impliedNodeFormat!==a.impliedNodeFormat?it=1:se(t.libReferenceDirectives,a.libReferenceDirectives,on)?t.hasNoDefaultLib!==a.hasNoDefaultLib?it=1:se(t.referencedFiles,a.referencedFiles,on)?(un(a),se(t.imports,a.imports,cn)&&se(t.moduleAugmentations,a.moduleAugmentations,cn)?(12582912&t.flags)!=(12582912&a.flags)?it=1:se(t.typeReferenceDirectives,a.typeReferenceDirectives,on)||(it=1):it=1):it=1:it=1,r.push(a);else if(Oe(t.path))it=1,r.push(a);else for(const e of t.ambientModuleNames)W.set(e,t.fileName);n.push(a)}if(2!==it)return it;for(const e of r){const t=kV(e),n=It(t,e);(le??(le=new Map)).set(e.path,n),bd(t,n,(t=>M.getResolvedModule(e,t.text,ar(e,t))),md)&&(it=1);const r=e.typeReferenceDirectives,i=Ot(r,e);(de??(de=new Map)).set(e.path,i),bd(r,i,(t=>M.getResolvedTypeReferenceDirective(e,Qq(t),zq(t,e.impliedNodeFormat))),vd)&&(it=1)}if(2!==it)return it;if(ad(t,N))return 1;if(M.resolvedLibReferences&&ld(M.resolvedLibReferences,((e,t)=>On(t).actual!==e.actual)))return 1;if(ye.hasChangedAutomaticTypeDirectiveNames){if(ye.hasChangedAutomaticTypeDirectiveNames())return 1}else if(re=oj(N,ye),!se(M.getAutomaticTypeDirectiveNames(),re))return 1;Ve=M.getMissingFilePaths(),xn.assert(n.length===M.getSourceFiles().length);for(const e of n)qe.set(e.path,e);return M.getFilesByNameMap().forEach(((e,t)=>{e?e.path!==t?qe.set(t,qe.get(e.path)):M.isSourceFileFromExternalLibrary(e)&&he.set(e.path,!0):qe.set(t,e)})),z=n,Y=M.getFileIncludeReasons(),ne=M.getFileProcessingDiagnostics(),re=M.getAutomaticTypeDirectiveNames(),ie=M.getAutomaticTypeDirectiveResolutions(),Je=M.sourceFileToPackageName,ze=M.redirectTargetsMap,$e=M.usesUriStyleNodeCoreModules,ce=M.resolvedModules,_e=M.resolvedTypeReferenceDirectiveNames,oe=M.resolvedLibReferences,pe=M.getCurrentPackagesMap(),2}(),null==(m=or)||m.pop(),2!==it){if(B=[],J=[],I&&(Ke||(Ke=I.map(Rn)),P.length&&(null==Ke||Ke.forEach(((e,t)=>{if(!e)return;const n=e.commandLine.options.outFile;if(Xe){if(n||0===DS(e.commandLine.options))for(const n of e.commandLine.fileNames)pn(n,{kind:1,index:t})}else if(n)pn(tT(n,".d.ts"),{kind:2,index:t});else if(0===DS(e.commandLine.options)){const n=bt((()=>q$(e.commandLine,!ye.useCaseSensitiveFileNames())));for(const r of e.commandLine.fileNames)QI(r)||Ao(r,".json")||pn(M$(r,e.commandLine,!ye.useCaseSensitiveFileNames(),n),{kind:2,index:t})}})))),null==(g=or)||g.push(or.Phase.Program,"processRootFiles",{count:P.length}),f(P,((e,t)=>rn(e,!1,!1,{kind:0,index:t}))),null==(y=or)||y.pop(),re??(re=P.length?oj(N,ye):u),ie=pj(),re.length){null==(v=or)||v.push(or.Phase.Program,"processTypeReferences",{count:re.length});const e=Ko(N.configFilePath?Ro(N.configFilePath):we,rV),t=Ot(re,e);for(let e=0;e{rn(In(e),!0,!1,{kind:6,index:t})}))}z=ve(B,(function(e,t){return Nt(Pt(e),Pt(t))})).concat(J),B=void 0,J=void 0,H=void 0}if(M&&ye.onReleaseOldSourceFile){const e=M.getSourceFiles();for(const t of e){const e=$t(t.resolvedPath);(rt||!e||e.impliedNodeFormat!==t.impliedNodeFormat||t.resolvedPath===t.path&&e.resolvedPath!==t.path)&&ye.onReleaseOldSourceFile(t,M.getCompilerOptions(),!!$t(t.path))}ye.getParsedCommandLine||M.forEachResolvedProjectReference((e=>{En(e.sourceFile.path)||ye.onReleaseOldSourceFile(e.sourceFile,M.getCompilerOptions(),!1)}))}M&&ye.onReleaseParsedCommandLine&&nV(M.getProjectReferences(),M.getResolvedProjectReferences(),((e,t,n)=>{const r=xV((null==t?void 0:t.commandLine.projectReferences[n])||M.getProjectReferences()[n]);(null==We?void 0:We.has(Ft(r)))||ye.onReleaseParsedCommandLine(r,e,M.getCompilerOptions())})),M=void 0,ae=void 0,le=void 0,de=void 0;const at={getRootFileNames:()=>P,getSourceFile:zt,getSourceFileByPath:$t,getSourceFiles:()=>z,getMissingFilePaths:()=>Ve,getModuleResolutionCache:()=>Ae,getFilesByNameMap:()=>qe,getCompilerOptions:()=>N,getSyntacticDiagnostics:function(e,t){return qt(e,Kt,t)},getOptionsDiagnostics:function(){return Ms(Z(ct().getGlobalDiagnostics(),function(){if(!N.configFile)return u;let e=ct().getDiagnostics(N.configFile.fileName);return Cn((t=>{e=Z(e,ct().getDiagnostics(t.sourceFile.fileName))})),e}()))},getGlobalDiagnostics:function(){return P.length?Ms(Bt().getGlobalDiagnostics().slice()):u},getSemanticDiagnostics:function(e,t){return qt(e,Gt,t)},getCachedSemanticDiagnostics:function(e){var t;return e?null==(t=ee.perFile)?void 0:t.get(e.path):ee.allDiagnostics},getSuggestionDiagnostics:function(e,t){return Wt((()=>Bt().getSuggestionDiagnostics(e,t)))},getDeclarationDiagnostics:function(e,t){const n=at.getCompilerOptions();return!e||n.outFile?Zt(e,t):qt(e,nn,t)},getBindAndCheckDiagnostics:function(e,t){return Xt(e,t)},getProgramDiagnostics:Vt,getTypeChecker:Bt,getClassifiableNames:function(){var e;if(!K){Bt(),K=new Set;for(const t of z)null==(e=t.classifiableNames)||e.forEach((e=>K.add(e)))}return K},getCommonSourceDirectory:At,emit:function(e,t,n,r,i,o){var a,s;null==(a=or)||a.push(or.Phase.Emit,"emit",{path:null==e?void 0:e.path},!0);const c=Wt((()=>function(e,t,n,r,i,o,a){if(!a){const i=yV(e,t,n,r);if(i)return i}const s=Bt(),c=s.getEmitResolver(N.outFile?void 0:t,r,W$(i,a));pr("beforeEmit");const l=s.runWithCancellationToken(r,(()=>H$(c,Mt(n),t,g$(N,o,i),i,!1,a)));return pr("afterEmit"),fr("Emit","beforeEmit","afterEmit"),l}(at,e,t,n,r,i,o)));return null==(s=or)||s.pop(),c},getCurrentDirectory:()=>we,getNodeCount:()=>Bt().getNodeCount(),getIdentifierCount:()=>Bt().getIdentifierCount(),getSymbolCount:()=>Bt().getSymbolCount(),getTypeCount:()=>Bt().getTypeCount(),getInstantiationCount:()=>Bt().getInstantiationCount(),getRelationCacheSizes:()=>Bt().getRelationCacheSizes(),getFileProcessingDiagnostics:()=>ne,getAutomaticTypeDirectiveNames:()=>re,getAutomaticTypeDirectiveResolutions:()=>ie,isSourceFileFromExternalLibrary:Rt,isSourceFileDefaultLibrary:function(e){if(!e.isDeclarationFile)return!1;if(e.hasNoDefaultLib)return!0;if(!N.noLib)return!1;const t=ye.useCaseSensitiveFileNames()?Et:Dt;return N.lib?Q(N.lib,(n=>t(e.fileName,oe.get(n).actual))):t(e.fileName,Se())},getModeForUsageLocation:ar,getModeForResolutionAtIndex:function(e,t){return ar(e,TV(e,t))},getSourceFileFromReference:function(e,t){return _n(xq(t.fileName,e.fileName),zt)},getLibFileFromReference:function(e){var t;const n=sV(e),r=n&&(null==(t=null==oe?void 0:oe.get(n))?void 0:t.actual);return void 0!==r?zt(r):void 0},sourceFileToPackageName:Je,redirectTargetsMap:ze,usesUriStyleNodeCoreModules:$e,resolvedModules:ce,resolvedTypeReferenceDirectiveNames:_e,resolvedLibReferences:oe,getResolvedModule:ut,getResolvedModuleFromModuleSpecifier:function(e,t){return t??(t=Sd(e)),xn.assertIsDefined(t,"`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."),ut(t,e.text,ar(t,e))},getResolvedTypeReferenceDirective:pt,getResolvedTypeReferenceDirectiveFromTypeReferenceDirective:function(e,t){return pt(t,e.fileName,e.resolutionMode||t.impliedNodeFormat)},forEachResolvedModule:ft,forEachResolvedTypeReferenceDirective:gt,getCurrentPackagesMap:()=>pe,typesPackageExists:function(e){return vt().has(fR(e))},packageBundlesTypes:function(e){return!!vt().get(e)},isEmittedFile:function(e){if(N.noEmit)return!1;const t=Ft(e);if($t(t))return!1;const n=N.outFile;if(n)return rr(t,n)||rr(t,Yk(n)+".d.ts");if(N.declarationDir&&la(N.declarationDir,t,we,!ye.useCaseSensitiveFileNames()))return!0;if(N.outDir)return la(N.outDir,t,we,!ye.useCaseSensitiveFileNames());if(Io(t,Mk)||QI(t)){const e=Yk(t);return!!$t(e+".ts")||!!$t(e+".tsx")}return!1},getConfigFileParsingDiagnostics:function(){return A||u},getProjectReferences:function(){return I},getResolvedProjectReferences:jt,getProjectReferenceRedirect:bn,getResolvedProjectReferenceToRedirect:Tn,getResolvedProjectReferenceByPath:En,forEachResolvedProjectReference:Cn,isSourceOfProjectReferenceRedirect:Dn,getRedirectReferenceForResolutionFromSourceOfProject:wt,emitBuildInfo:function(e){var t,n;xn.assert(!N.outFile),null==(t=or)||t.push(or.Phase.Emit,"emitBuildInfo",{},!0),pr("beforeEmit");const r=H$(Y$,Mt(e),void 0,m$,!1,!0);return pr("afterEmit"),fr("Emit","beforeEmit","afterEmit"),null==(n=or)||n.pop(),r},fileExists:Ye,readFile:nt,directoryExists:tt,getSymlinkCache:ir,realpath:null==(C=ye.realpath)?void 0:C.bind(ye),useCaseSensitiveFileNames:()=>ye.useCaseSensitiveFileNames(),getCanonicalFileName:Ln,getFileIncludeReasons:()=>Y,structureIsReused:it,writeFile:Lt};return Qe(),function(){N.strictPropertyInitialization&&!WS(N,"strictNullChecks")&&Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks"),N.exactOptionalPropertyTypes&&!WS(N,"strictNullChecks")&&Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"exactOptionalPropertyTypes","strictNullChecks"),(N.isolatedModules||N.verbatimModuleSyntax)&&N.outFile&&Hn(va.Option_0_cannot_be_specified_with_option_1,"outFile",N.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules"),N.isolatedDeclarations&&(JS(N)&&Hn(va.Option_0_cannot_be_specified_with_option_1,"allowJs","isolatedDeclarations"),LS(N)||Hn(va.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"isolatedDeclarations","declaration","composite")),N.inlineSourceMap&&(N.sourceMap&&Hn(va.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),N.mapRoot&&Hn(va.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap")),N.composite&&(!1===N.declaration&&Hn(va.Composite_projects_may_not_disable_declaration_emit,"declaration"),!1===N.incremental&&Hn(va.Composite_projects_may_not_disable_incremental_compilation,"declaration"));const e=N.outFile;if(N.tsBuildInfoFile?RS(N)||Hn(va.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"tsBuildInfoFile","incremental","composite"):!N.incremental||e||N.configFilePath||Te.add(cS(va.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)),Bn("5.0","5.5","6.0",(function(e,t,n,r,...i){if(n){const o=uS(void 0,va.Use_0_instead,n);Qn(!t,e,void 0,uS(o,r,...i))}else Qn(!t,e,void 0,r,...i)}),(e=>{0===N.target&&e("target","ES3"),N.noImplicitUseStrict&&e("noImplicitUseStrict"),N.keyofStringsOnly&&e("keyofStringsOnly"),N.suppressExcessPropertyErrors&&e("suppressExcessPropertyErrors"),N.suppressImplicitAnyIndexErrors&&e("suppressImplicitAnyIndexErrors"),N.noStrictGenericChecks&&e("noStrictGenericChecks"),N.charset&&e("charset"),N.out&&e("out",void 0,"outFile"),N.importsNotUsedAsValues&&e("importsNotUsedAsValues",void 0,"verbatimModuleSyntax"),N.preserveValueImports&&e("preserveValueImports",void 0,"verbatimModuleSyntax")})),function(){const e=N.suppressOutputPathCheck?void 0:P$(N);nV(I,Ke,((t,n,r)=>{const i=(n?n.commandLine.projectReferences:I)[r],o=n&&n.sourceFile;if(function(e,t,n){Bn("5.0","5.5","6.0",(function(e,r,i,o,...a){Xn(t,n,o,...a)}),(t=>{e.prepend&&t("prepend")}))}(i,o,r),!t)return void Xn(o,r,va.File_0_not_found,i.path);const a=t.commandLine.options;a.composite&&!a.noEmit||(n?n.commandLine.fileNames:P).length&&(a.composite||Xn(o,r,va.Referenced_project_0_must_have_setting_composite_Colon_true,i.path),a.noEmit&&Xn(o,r,va.Referenced_project_0_may_not_disable_emit,i.path)),!n&&e&&e===P$(a)&&(Xn(o,r,va.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,e,i.path),Pe.set(Ft(e),!0))}))}(),N.composite){const e=new Set(P.map(Ft));for(const t of z)ov(t,at)&&!e.has(t.path)&&$n(t,va.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,[t.fileName,N.configFilePath||""])}if(N.paths)for(const e in N.paths)if(Le(N.paths,e))if(rk(e)||Vn(!0,e,va.Pattern_0_can_have_at_most_one_Asterisk_character,e),ot(N.paths[e])){const t=N.paths[e].length;0===t&&Vn(!1,e,va.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,e);for(let n=0;nqI(e)&&!e.isDeclarationFile));if(N.isolatedModules||N.verbatimModuleSyntax)0===N.module&&t<2&&N.isolatedModules&&Hn(va.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher,"isolatedModules","target"),!1===N.preserveConstEnums&&Hn(va.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled,N.verbatimModuleSyntax?"verbatimModuleSyntax":"isolatedModules","preserveConstEnums");else if(n&&t<2&&0===N.module){const e=Qp(n,"boolean"==typeof n.externalModuleIndicator?n:n.externalModuleIndicator);Te.add(aS(n,e.start,e.length,va.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none))}if(e&&!N.emitDeclarationOnly)if(N.module&&2!==N.module&&4!==N.module)Hn(va.Only_amd_and_system_modules_are_supported_alongside_0,"outFile","module");else if(void 0===N.module&&n){const e=Qp(n,"boolean"==typeof n.externalModuleIndicator?n:n.externalModuleIndicator);Te.add(aS(n,e.start,e.length,va.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system,"outFile"))}if(MS(N)&&(1===ES(N)?Hn(va.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic,"resolveJsonModule"):qS(N)||Hn(va.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd,"resolveJsonModule","module")),N.outDir||N.rootDir||N.sourceRoot||N.mapRoot){const e=At();N.outDir&&""===e&&z.some((e=>jo(e.fileName)>1))&&Hn(va.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}N.checkJs&&!JS(N)&&Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs"),N.emitDeclarationOnly&&(LS(N)||Hn(va.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"),N.noEmit&&Hn(va.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit")),N.noCheck&&N.noEmit&&Hn(va.Option_0_cannot_be_specified_with_option_1,"noCheck","noEmit"),N.emitDecoratorMetadata&&!N.experimentalDecorators&&Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators"),N.jsxFactory?(N.reactNamespace&&Hn(va.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),4!==N.jsx&&5!==N.jsx||Hn(va.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFactory",_O.get(""+N.jsx)),zI(N.jsxFactory,t)||Gn("jsxFactory",va.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,N.jsxFactory)):N.reactNamespace&&!Ts(N.reactNamespace,t)&&Gn("reactNamespace",va.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,N.reactNamespace),N.jsxFragmentFactory&&(N.jsxFactory||Hn(va.Option_0_cannot_be_specified_without_specifying_option_1,"jsxFragmentFactory","jsxFactory"),4!==N.jsx&&5!==N.jsx||Hn(va.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFragmentFactory",_O.get(""+N.jsx)),zI(N.jsxFragmentFactory,t)||Gn("jsxFragmentFactory",va.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name,N.jsxFragmentFactory)),N.reactNamespace&&(4!==N.jsx&&5!==N.jsx||Hn(va.Option_0_cannot_be_specified_when_option_jsx_is_1,"reactNamespace",_O.get(""+N.jsx))),N.jsxImportSource&&2===N.jsx&&Hn(va.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxImportSource",_O.get(""+N.jsx));const r=DS(N);N.verbatimModuleSyntax&&(2!==r&&3!==r&&4!==r||Hn(va.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System,"verbatimModuleSyntax")),!N.allowImportingTsExtensions||N.noEmit||N.emitDeclarationOnly||Gn("allowImportingTsExtensions",va.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);const i=ES(N);if(N.resolvePackageJsonExports&&!KS(i)&&Hn(va.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonExports"),N.resolvePackageJsonImports&&!KS(i)&&Hn(va.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"resolvePackageJsonImports"),N.customConditions&&!KS(i)&&Hn(va.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler,"customConditions"),100!==i||$S(r)||200===r||Gn("moduleResolution",va.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later,"bundler"),Ci[r]&&100<=r&&r<=199&&!(3<=i&&i<=99)){const e=Ci[r];Gn("moduleResolution",va.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1,e,e)}else if(bi[i]&&3<=i&&i<=99&&!(100<=r&&r<=199)){const e=bi[i];Gn("module",va.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1,e,e)}if(!N.noEmit&&!N.suppressOutputPathCheck){const e=Mt(),t=new Set;E$(e,(e=>{N.emitDeclarationOnly||o(e.jsFilePath,t),o(e.declarationFilePath,t)}))}function o(e,t){if(e){const n=Ft(e);if(qe.has(n)){let t;N.configFilePath||(t=uS(void 0,va.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),t=uS(t,va.Cannot_write_file_0_because_it_would_overwrite_input_file,e),nr(e,lS(t))}const r=ye.useCaseSensitiveFileNames()?n:yt(n);t.has(r)?nr(e,cS(va.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,e)):t.add(r)}}}(),pr("afterProgram"),fr("Program","beforeProgram","afterProgram"),null==(w=or)||w.pop(),at;function ct(){return Ce&&(null==ne||ne.forEach((e=>{switch(e.kind){case 1:return Te.add(Jn(e.file&&$t(e.file),e.fileProcessingReason,e.diagnostic,e.args||u));case 0:return Te.add(function({reason:e}){const{file:t,pos:n,end:r}=uV(at,e),i=aV(t.libReferenceDirectives[e.index]),o=Ut(Ht(sn(i,"lib."),".d.ts"),pO,mt);return aS(t,xn.checkDefined(n),xn.checkDefined(r)-n,o?va.Cannot_find_lib_definition_for_0_Did_you_mean_1:va.Cannot_find_lib_definition_for_0,i,o)}(e));case 2:return e.diagnostics.forEach((e=>Te.add(e)));default:xn.assertNever(e)}})),Ce.forEach((({file:e,diagnostic:t,args:n})=>Te.add(Jn(e,void 0,t,n)))),Ce=void 0,G=void 0,X=void 0),Te}function ut(e,t,n){var r;return null==(r=null==ce?void 0:ce.get(e.path))?void 0:r.get(t,n)}function pt(e,t,n){var r;return null==(r=null==_e?void 0:_e.get(e.path))?void 0:r.get(t,n)}function ft(e,t){ht(ce,e,t)}function gt(e,t){ht(_e,e,t)}function ht(e,t,n){var r;n?null==(r=null==e?void 0:e.get(n.path))||r.forEach(((e,r,i)=>t(e,r,i,n.path))):null==e||e.forEach(((e,n)=>e.forEach(((e,r,i)=>t(e,r,i,n)))))}function vt(){return pe||(pe=new Map,ft((({resolvedModule:e})=>{(null==e?void 0:e.packageId)&&pe.set(e.packageId.name,".d.ts"===e.extension||!!pe.get(e.packageId.name))})),pe)}function xt(e){var t;(null==(t=e.resolutionDiagnostics)?void 0:t.length)&&(ne??(ne=[])).push({kind:2,diagnostics:e.resolutionDiagnostics})}function St(e,t,n,r){if(ye.resolveModuleNameLiterals||!ye.resolveModuleNames)return xt(n);if(!Ae||Os(t))return;const i=Ro(Go(e.originalFileName,we)),o=Ct(e),a=Ae.getFromNonRelativeNameCache(t,r,i,o);a&&xt(a)}function kt(e,t,n){var r,i;if(!e.length)return u;const o=Go(t.originalFileName,we),a=Ct(t);null==(r=or)||r.push(or.Phase.Program,"resolveModuleNamesWorker",{containingFileName:o}),pr("beforeResolveModule");const s=Ie(e,o,a,N,t,n);return pr("afterResolveModule"),fr("ResolveModule","beforeResolveModule","afterResolveModule"),null==(i=or)||i.pop(),s}function Tt(e,t,n){var r,i;if(!e.length)return[];const o=st(t)?void 0:t,a=st(t)?t:Go(t.originalFileName,we),s=o&&Ct(o);null==(r=or)||r.push(or.Phase.Program,"resolveTypeReferenceDirectiveNamesWorker",{containingFileName:a}),pr("beforeResolveTypeReference");const c=Me(e,a,s,N,o,n);return pr("afterResolveTypeReference"),fr("ResolveTypeReference","beforeResolveTypeReference","afterResolveTypeReference"),null==(i=or)||i.pop(),c}function Ct(e){const t=Tn(e.originalFileName);if(t||!QI(e.originalFileName))return t;const n=wt(e.path);if(n)return n;if(!ye.realpath||!N.preserveSymlinks||!e.originalFileName.includes(Ij))return;const r=Ft(ye.realpath(e.originalFileName));return r===e.path?void 0:wt(r)}function wt(e){const t=wn(e);return st(t)?Tn(t):t?Cn((t=>{const n=t.commandLine.options.outFile;if(n)return Ft(n)===e?t:void 0})):void 0}function Pt(e){if(la(ke,e.fileName,!1)){const t=Bo(e.fileName);if("lib.d.ts"===t||"lib.es6.d.ts"===t)return 0;const n=Ht(sn(t,"lib."),".d.ts"),r=pO.indexOf(n);if(-1!==r)return r+1}return pO.length+2}function Ft(e){return Yo(e,we,Ln)}function At(){if(void 0===V){const e=F(z,(e=>ov(e,at)));V=$$(N,(()=>q(e,(e=>e.isDeclarationFile?void 0:e.fileName))),we,Ln,(t=>function(e,t){let n=!0;const r=ye.getCanonicalFileName(Go(t,we));for(const i of e)i.isDeclarationFile||0!==ye.getCanonicalFileName(Go(i.fileName,we)).indexOf(r)&&($n(i,va.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,[i.fileName,t]),n=!1);return n}(e,t)))}return V}function It(e,t){if(0===it&&!t.ambientModuleNames.length)return kt(e,t,void 0);let n,r,i;const o=Wq,a=M&&M.getSourceFile(t.fileName);for(let s=0;swe,getSourceFile:at.getSourceFile,getSourceFileByPath:at.getSourceFileByPath,getSourceFiles:at.getSourceFiles,isSourceFileFromExternalLibrary:Rt,getResolvedProjectReferenceToRedirect:Tn,getProjectReferenceRedirect:bn,isSourceOfProjectReferenceRedirect:Dn,getSymlinkCache:ir,writeFile:e||Lt,isEmitBlocked:Jt,readFile:e=>ye.readFile(e),fileExists:e=>{const t=Ft(e);return!!$t(t)||!Ve.has(t)&&ye.fileExists(e)},realpath:Ze(ye,ye.realpath),useCaseSensitiveFileNames:()=>ye.useCaseSensitiveFileNames(),getBuildInfo:()=>{var e;return null==(e=at.getBuildInfo)?void 0:e.call(at)},getSourceFileFromReference:(e,t)=>at.getSourceFileFromReference(e,t),redirectTargetsMap:ze,getFileIncludeReasons:at.getFileIncludeReasons,createHash:Ze(ye,ye.createHash),getModuleResolutionCache:()=>at.getModuleResolutionCache(),trace:Ze(ye,ye.trace)}}function Lt(e,t,n,r,i,o){ye.writeFile(e,t,n,r,i,o)}function jt(){return Ke}function Rt(e){return!!he.get(e.path)}function Bt(){return U||(U=LB(at))}function Jt(e){return Pe.has(Ft(e))}function zt(e){return $t(Ft(e))}function $t(e){return qe.get(e)||void 0}function qt(e,t,n){return Ms(e?t(e,n):R(at.getSourceFiles(),(e=>(n&&n.throwIfCancellationRequested(),t(e,n)))))}function Vt(e){var t;if(yT(e,N,at))return u;const n=ct().getDiagnostics(e.fileName);return(null==(t=e.commentDirectives)?void 0:t.length)?Yt(e,e.commentDirectives,n).diagnostics:n}function Kt(e){return Im(e)?(e.additionalSyntacticDiagnostics||(e.additionalSyntacticDiagnostics=function(e){return Wt((()=>{const t=[];return n(e,e),jI(e,n,(function(e,n){if(MA(n)){const e=S(n.modifiers,cE);e&&t.push(i(e,va.Decorators_are_not_valid_here))}else if(lI(n)&&n.modifiers){const e=T(n.modifiers,cE);if(e>=0)if(sE(n)&&!N.experimentalDecorators)t.push(i(n.modifiers[e],va.Decorators_are_not_valid_here));else if(GP(n)){const r=T(n.modifiers,UD);if(r>=0){const o=T(n.modifiers,KD);if(e>r&&o>=0&&e=0&&e=0&&t.push(fT(i(n.modifiers[o],va.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),i(n.modifiers[e],va.Decorator_used_before_export_here)))}}}}switch(n.kind){case 263:case 231:case 174:case 176:case 177:case 178:case 218:case 262:case 219:if(e===n.typeParameters)return t.push(r(e,va.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)),"skip";case 243:if(e===n.modifiers)return function(e,n){for(const r of e)switch(r.kind){case 87:if(n)continue;case 125:case 123:case 124:case 148:case 138:case 128:case 164:case 103:case 147:t.push(i(r,va.The_0_modifier_can_only_be_used_in_TypeScript_files,Ra(r.kind)))}}(n.modifiers,243===n.kind),"skip";break;case 172:if(e===n.modifiers){for(const n of e)iu(n)&&126!==n.kind&&129!==n.kind&&t.push(i(n,va.The_0_modifier_can_only_be_used_in_TypeScript_files,Ra(n.kind)));return"skip"}break;case 169:if(e===n.modifiers&&Q(e,iu))return t.push(r(e,va.Parameter_modifiers_can_only_be_used_in_TypeScript_files)),"skip";break;case 213:case 214:case 233:case 285:case 286:case 215:if(e===n.typeArguments)return t.push(r(e,va.Type_arguments_can_only_be_used_in_TypeScript_files)),"skip"}})),t;function n(e,n){switch(n.kind){case 169:case 172:case 174:if(n.questionToken===e)return t.push(i(e,va.The_0_modifier_can_only_be_used_in_TypeScript_files,"?")),"skip";case 173:case 176:case 177:case 178:case 218:case 262:case 219:case 260:if(n.type===e)return t.push(i(e,va.Type_annotations_can_only_be_used_in_TypeScript_files)),"skip"}switch(e.kind){case 273:if(e.isTypeOnly)return t.push(i(n,va._0_declarations_can_only_be_used_in_TypeScript_files,"import type")),"skip";break;case 278:if(e.isTypeOnly)return t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,"export type")),"skip";break;case 276:case 281:if(e.isTypeOnly)return t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,fN(e)?"import...type":"export...type")),"skip";break;case 271:return t.push(i(e,va.import_can_only_be_used_in_TypeScript_files)),"skip";case 277:if(e.isExportEquals)return t.push(i(e,va.export_can_only_be_used_in_TypeScript_files)),"skip";break;case 298:if(119===e.token)return t.push(i(e,va.implements_clauses_can_only_be_used_in_TypeScript_files)),"skip";break;case 264:const r=Ra(120);return xn.assertIsDefined(r),t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,r)),"skip";case 267:const o=32&e.flags?Ra(145):Ra(144);return xn.assertIsDefined(o),t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,o)),"skip";case 265:return t.push(i(e,va.Type_aliases_can_only_be_used_in_TypeScript_files)),"skip";case 176:case 174:case 262:return e.body?void 0:(t.push(i(e,va.Signature_declarations_can_only_be_used_in_TypeScript_files)),"skip");case 266:const a=xn.checkDefined(Ra(94));return t.push(i(e,va._0_declarations_can_only_be_used_in_TypeScript_files,a)),"skip";case 235:return t.push(i(e,va.Non_null_assertions_can_only_be_used_in_TypeScript_files)),"skip";case 234:return t.push(i(e.type,va.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 238:return t.push(i(e.type,va.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)),"skip";case 216:xn.fail()}}function r(t,n,...r){const i=t.pos;return aS(e,i,t.end-i,n,...r)}function i(t,n,...r){return Jp(e,t,n,...r)}}))}(e)),Z(e.additionalSyntacticDiagnostics,e.parseDiagnostics)):e.parseDiagnostics}function Wt(e){try{return e()}catch(e){throw e instanceof Lr&&(U=void 0),e}}function Gt(e,t){return Z(vV(Xt(e,t),N),Vt(e))}function Xt(e,t){return tn(e,t,ee,Qt)}function Qt(e,t){return Wt((()=>{if(yT(e,N,at))return u;const n=Bt();xn.assert(!!e.bindDiagnostics);const r=(1===e.scriptKind||2===e.scriptKind)&&uT(e,N),i=Td(e,N.checkJs);let o=e.bindDiagnostics,a=n.getDiagnostics(e,t);return i&&(o=F(o,(e=>mV.has(e.code))),a=F(a,(e=>mV.has(e.code)))),function(e,t,...n){var r;const i=j(n);if(!t||!(null==(r=e.commentDirectives)?void 0:r.length))return i;const{diagnostics:o,directives:a}=Yt(e,e.commentDirectives,i);for(const t of a.getUnusedExpectations())o.push(Wp(e,t.range,va.Unused_ts_expect_error_directive));return o}(e,!i,o,a,r?e.jsDocDiagnostics:void 0)}))}function Yt(e,t,n){const r=qd(e,t),i=n.filter((e=>-1===function(e,t){const{file:n,start:r}=e;if(!n)return-1;const i=Ka(n);let o=Wa(i,r).line-1;for(;o>=0;){if(t.markUsed(o))return o;const e=n.text.slice(i[o],i[o+1]).trim();if(""!==e&&!/^(\s*)\/\/(.*)$/.test(e))return-1;o--}return-1}(e,r)));return{diagnostics:i,directives:r}}function Zt(e,t){return tn(e,t,te,en)}function en(e,t){return Wt((()=>{const n=Bt().getEmitResolver(e,t);return l$(Mt(_t),n,e)||u}))}function tn(e,t,n,r){var i;const o=e?null==(i=n.perFile)?void 0:i.get(e.path):n.allDiagnostics;if(o)return o;const a=r(e,t);return e?(n.perFile||(n.perFile=new Map)).set(e.path,a):n.allDiagnostics=a,a}function nn(e,t){return e.isDeclarationFile?[]:Zt(e,t)}function rn(e,t,n,r){dn(Xo(e),t,n,void 0,r)}function on(e,t){return e.fileName===t.fileName}function cn(e,t){return 80===e.kind?80===t.kind&&e.escapedText===t.escapedText:11===t.kind&&e.text===t.text}function ln(e,t){const n=YC.createStringLiteral(e),r=YC.createImportDeclaration(void 0,void 0,n);return sw(r,2),OT(n,r),OT(r,t),n.flags&=-17,r.flags&=-17,n}function un(e){if(e.imports)return;const t=Im(e),n=qI(e);let r,i,o;if(t||!e.isDeclarationFile&&(NS(N)||qI(e))){N.importHelpers&&(r=[ln(G_,e)]);const t=nk(tk(N,e),N);t&&(r||(r=[])).push(ln(t,e))}for(const t of e.statements)a(t,!1);return(4194304&e.flags||t)&&function(e){const n=/import|require/g;for(;null!==n.exec(e.text);){const i=s(e,n.lastIndex);if(t&&Jm(i,!0))LT(i,!1),r=ue(r,i.arguments[0]);else if(uf(i)&&i.arguments.length>=1&&$_(i.arguments[0]))LT(i,!1),r=ue(r,i.arguments[0]);else if(df(i))LT(i,!1),r=ue(r,i.argument.literal);else if(t&&AF(i)){const e=Cg(i);e&&wD(e)&&e.text&&(LT(i,!1),r=ue(r,e))}}}(e),e.imports=r||u,e.moduleAugmentations=i||u,void(e.ambientModuleNames=o||u);function a(t,s){if(Ep(t)){const n=Cg(t);!(n&&wD(n)&&n.text)||s&&Os(n.text)||(LT(t,!1),r=ue(r,n),$e||0!==me||e.isDeclarationFile||($e=an(n.text,"node:")))}else if(ZP(t)&&sp(t)&&(s||Bv(t,128)||e.isDeclarationFile)){t.name.parent=t;const r=Hh(t.name);if(n||s&&!Os(r))(i||(i=[])).push(t.name);else if(!s){e.isDeclarationFile&&(o||(o=[])).push(r);const n=t.body;if(n)for(const e of n.statements)a(e,!0)}}}function s(e,n){let r=e;const i=e=>{if(e.pos<=n&&(nAo(i,e))))return void(n&&(qk(i)?n(va.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option,e):n(va.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1,e,"'"+j(De).join("', '")+"'")));const o=t(e);if(n)if(o)cV(r)&&i===ye.getCanonicalFileName($t(r.file).fileName)&&n(va.A_file_cannot_have_a_reference_to_itself);else{const t=bn(e);t?n(va.Output_file_0_has_not_been_built_from_source_file_1,t,e):n(va.File_0_not_found,e)}return o}{const r=N.allowNonTsExtensions&&t(e);if(r)return r;if(n&&N.allowNonTsExtensions)return void n(va.File_0_not_found,e);const i=f(De[0],(n=>t(e+n)));return n&&!i&&n(va.Could_not_resolve_the_path_0_with_the_extensions_Colon_1,e,"'"+j(De).join("', '")+"'"),i}}function dn(e,t,n,r,i){_n(e,(e=>mn(e,t,n,i,r)),((e,...t)=>zn(void 0,i,e,t)),i)}function pn(e,t){return dn(e,!1,!1,void 0,t)}function fn(e,t,n){!cV(n)&&Q(Y.get(t.path),cV)?zn(t,n,va.Already_included_file_name_0_differs_from_file_name_1_only_in_casing,[t.fileName,e]):zn(t,n,va.File_name_0_differs_from_already_included_file_name_1_only_in_casing,[e,t.fileName])}function mn(e,t,n,r,i){var o,a;null==(o=or)||o.push(or.Phase.Program,"findSourceFile",{fileName:e,isDefaultLib:t||void 0,fileIncludeKind:jr[r.kind]});const s=function(e,t,n,r,i){var o;const a=Ft(e);if(Xe){let o=wn(a);if(!o&&ye.realpath&&N.preserveSymlinks&&QI(e)&&e.includes(Ij)){const t=Ft(ye.realpath(e));t!==a&&(o=wn(t))}if(o){const s=st(o)?mn(o,t,n,r,i):void 0;return s&&yn(s,a,e,void 0),s}}const s=e;if(qe.has(a)){const n=qe.get(a),i=hn(n||void 0,r,!0);if(n&&i&&!1!==N.forceConsistentCasingInFileNames){const t=n.fileName;Ft(t)!==Ft(e)&&(e=bn(e)||e),Qo(t,we)!==Qo(e,we)&&fn(e,n,r)}return n&&he.get(n.path)&&0===me?(he.set(n.path,!1),N.noResolve||(Pn(n,t),Fn(n)),N.noLib||Mn(n),ge.set(n.path,!1),jn(n)):n&&ge.get(n.path)&&mezn(void 0,r,va.Cannot_read_file_0_Colon_1,[e,t])),rt);if(i){const t=yd(i),n=Be.get(t);if(n){const t=function(e,t,n,r,i,o,a){var s;const c=_I.createRedirectedSourceFile({redirectTarget:e,unredirected:t});return c.fileName=n,c.path=r,c.resolvedPath=i,c.originalFileName=o,c.packageJsonLocations=(null==(s=a.packageJsonLocations)?void 0:s.length)?a.packageJsonLocations:void 0,c.packageJsonScope=a.packageJsonScope,he.set(r,me>0),c}(n,u,e,a,Ft(e),s,l);return ze.add(n.path,e),yn(t,a,e,c),hn(t,r,!1),Je.set(a,hd(i)),J.push(t),t}u&&(Be.set(t,u),Je.set(a,hd(i)))}if(yn(u,a,e,c),u){if(he.set(a,me>0),u.fileName=e,u.path=a,u.resolvedPath=Ft(e),u.originalFileName=s,u.packageJsonLocations=(null==(o=l.packageJsonLocations)?void 0:o.length)?l.packageJsonLocations:void 0,u.packageJsonScope=l.packageJsonScope,hn(u,r,!1),ye.useCaseSensitiveFileNames()){const t=yt(a),n=Ue.get(t);n?fn(e,n,r):Ue.set(t,u)}xe=xe||u.hasNoDefaultLib&&!n,N.noResolve||(Pn(u,t),Fn(u)),N.noLib||Mn(u),jn(u),t?B.push(u):J.push(u),(H??(H=new Set)).add(u.path)}return u}(e,t,n,r,i);return null==(a=or)||a.pop(),s}function gn(e,t,n,r){const i=fV(Go(e,we),null==t?void 0:t.getPackageJsonInfoCache(),n,r),o=wS(r),a=TS(r);return"object"==typeof i?{...i,languageVersion:o,setExternalModuleIndicator:a,jsDocParsingMode:n.jsDocParsingMode}:{languageVersion:o,impliedNodeFormat:i,setExternalModuleIndicator:a,jsDocParsingMode:n.jsDocParsingMode}}function hn(e,t,n){return!(!e||n&&cV(t)&&(null==H?void 0:H.has(t.file))||(Y.add(e.path,t),0))}function yn(e,t,n,r){r?(vn(n,r,e),vn(n,t,e||!1)):vn(n,t,e)}function vn(e,t,n){qe.set(t,n),void 0!==n?Ve.delete(t):Ve.set(t,e)}function bn(e){const t=Sn(e);return t&&kn(t,e)}function Sn(e){if(Ke&&Ke.length&&!QI(e)&&!Ao(e,".json"))return Tn(e)}function kn(e,t){const n=e.commandLine.options.outFile;return n?tT(n,".d.ts"):M$(t,e.commandLine,!ye.useCaseSensitiveFileNames())}function Tn(e){void 0===He&&(He=new Map,Cn((e=>{Ft(N.configFilePath)!==e.sourceFile.path&&e.commandLine.fileNames.forEach((t=>He.set(Ft(t),e.sourceFile.path)))})));const t=He.get(Ft(e));return t&&En(t)}function Cn(e){return tV(Ke,e)}function wn(e){if(QI(e))return void 0===Ge&&(Ge=new Map,Cn((e=>{const t=e.commandLine.options.outFile;if(t){const e=tT(t,".d.ts");Ge.set(Ft(e),!0)}else{const t=bt((()=>q$(e.commandLine,!ye.useCaseSensitiveFileNames())));f(e.commandLine.fileNames,(n=>{if(!QI(n)&&!Ao(n,".json")){const r=M$(n,e.commandLine,!ye.useCaseSensitiveFileNames(),t);Ge.set(Ft(r),n)}}))}}))),Ge.get(e)}function Dn(e){return Xe&&!!Tn(e)}function En(e){if(We)return We.get(e)||void 0}function Pn(e,t){f(e.referencedFiles,((n,r)=>{dn(xq(n.fileName,e.fileName),t,!1,void 0,{kind:4,file:e.path,index:r})}))}function Fn(e){const t=e.typeReferenceDirectives;if(!t.length)return;const n=(null==de?void 0:de.get(e.path))||Ot(t,e),r=pj();(_e??(_e=new Map)).set(e.path,r);for(let i=0;i{const r=sV(t);r?rn(In(r),!0,!0,{kind:7,file:e.path,index:n}):(ne||(ne=[])).push({kind:0,reason:{kind:7,file:e.path,index:n}})}))}function Ln(e){return ye.getCanonicalFileName(e)}function jn(e){var t;if(un(e),e.imports.length||e.moduleAugmentations.length){const n=kV(e),r=(null==le?void 0:le.get(e.path))||It(n,e);xn.assert(r.length===n.length);const i=(null==(t=Ct(e))?void 0:t.commandLine.options)||N,o=pj();(ce??(ce=new Map)).set(e.path,o);for(let t=0;tfe,f=d&&!SV(i,a,e)&&!i.noResolve&&t{u?void 0===i?r(n,i,o,va.Option_0_has_been_removed_Please_remove_it_from_your_configuration,n):r(n,i,o,va.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration,n,i):void 0===i?r(n,i,o,va.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error,n,t,e):r(n,i,o,va.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error,n,i,t,e)}))}function Jn(e,t,n,r){let i;const o=e&&Y.get(e.path);let a,s,c,l,_,d=cV(t)?t:void 0,p=e&&(null==G?void 0:G.get(e.path));p?(p.fileIncludeReasonDetails?(i=new Set(o),null==o||o.forEach(h)):null==o||o.forEach(g),l=p.redirectInfo):(null==o||o.forEach(g),l=e&&qU(e)),t&&g(t);const f=(null==i?void 0:i.size)!==(null==o?void 0:o.length);d&&1===(null==i?void 0:i.size)&&(i=void 0),i&&p&&(p.details&&!f?_=uS(p.details,n,...r||u):p.fileIncludeReasonDetails&&(f?a=y()?ue(p.fileIncludeReasonDetails.next.slice(0,o.length),a[0]):[...p.fileIncludeReasonDetails.next,a[0]]:y()?a=p.fileIncludeReasonDetails.next.slice(0,o.length):c=p.fileIncludeReasonDetails)),_||(c||(c=i&&uS(a,va.The_file_is_in_the_program_because_Colon)),_=uS(l?c?[c,...l]:l:c,n,...r||u)),e&&(p?(!p.fileIncludeReasonDetails||!f&&c)&&(p.fileIncludeReasonDetails=c):(G??(G=new Map)).set(e.path,p={fileIncludeReasonDetails:c,redirectInfo:l}),p.details||f||(p.details=_.next));const m=d&&uV(at,d);return m&&lV(m)?Vp(m.file,m.pos,m.end-m.pos,_,s):lS(_,s);function g(e){(null==i?void 0:i.has(e))||((i??(i=new Set)).add(e),(a??(a=[])).push(KU(at,e)),h(e))}function h(e){!d&&cV(e)?d=e:d!==e&&(s=ue(s,function(e){let t=null==X?void 0:X.get(e);return void 0===t&&(X??(X=new Map)).set(e,t=function(e){if(cV(e)){const t=uV(at,e);let n;switch(e.kind){case 3:n=va.File_is_included_via_import_here;break;case 4:n=va.File_is_included_via_reference_here;break;case 5:n=va.File_is_included_via_type_library_reference_here;break;case 7:n=va.File_is_included_via_library_reference_here;break;default:xn.assertNever(e)}return lV(t)?aS(t.file,t.pos,t.end-t.pos,n):void 0}if(!N.configFile)return;let t,n;switch(e.kind){case 0:if(!N.configFile.configFileSpecs)return;const i=Go(P[e.index],we),o=VU(at,i);if(o){t=Gf(N.configFile,"files",o),n=va.File_is_matched_by_files_list_specified_here;break}const a=UU(at,i);if(!a||!st(a))return;t=Gf(N.configFile,"include",a),n=va.File_is_matched_by_include_pattern_specified_here;break;case 1:case 2:const s=xn.checkDefined(null==Ke?void 0:Ke[e.index]),c=nV(I,Ke,((e,t,n)=>e===s?{sourceFile:(null==t?void 0:t.sourceFile)||N.configFile,index:n}:void 0));if(!c)return;const{sourceFile:l,index:u}=c,_=Xf(l,"references",(e=>WE(e.initializer)?e.initializer:void 0));return _&&_.elements.length>u?Jp(l,_.elements[u],2===e.kind?va.File_is_output_from_referenced_project_specified_here:va.File_is_source_from_referenced_project_specified_here):void 0;case 8:if(!N.types)return;t=Wn("types",e.typeReference),n=va.File_is_entry_point_of_type_library_specified_here;break;case 6:if(void 0!==e.index){t=Wn("lib",N.lib[e.index]),n=va.File_is_library_specified_here;break}const d=HS(wS(N));t=d?(r=d,Un("target",(e=>wD(e.initializer)&&e.initializer.text===r?e.initializer:void 0))):void 0,n=va.File_is_default_library_for_target_specified_here;break;default:xn.assertNever(e)}var r;return t&&Jp(N.configFile,t,n)}(e)??!1),t||void 0}(e)))}function y(){var e;return(null==(e=p.fileIncludeReasonDetails.next)?void 0:e.length)!==(null==o?void 0:o.length)}}function zn(e,t,n,r){(ne||(ne=[])).push({kind:1,file:e&&e.path,fileProcessingReason:t,diagnostic:n,args:r})}function $n(e,t,n){Ce.push({file:e,diagnostic:t,args:n})}function qn(e,t,n,...r){let i=!0;Kn((o=>{HE(o.initializer)&&Kf(o.initializer,e,(e=>{const o=e.initializer;WE(o)&&o.elements.length>t&&(Te.add(Jp(N.configFile,o.elements[t],n,...r)),i=!1)}))})),i&&Yn(n,...r)}function Vn(e,t,n,...r){let i=!0;Kn((o=>{HE(o.initializer)&&tr(o.initializer,e,t,void 0,n,...r)&&(i=!1)})),i&&Yn(n,...r)}function Un(e,t){return Kf(Zn(),e,t)}function Kn(e){return Un("paths",e)}function Wn(e,t){const n=Zn();return n&&Wf(n,e,t)}function Hn(e,t,n,r){Qn(!0,t,n,e,t,n,r)}function Gn(e,t,...n){Qn(!1,e,void 0,t,...n)}function Xn(e,t,n,...r){const i=Xf(e||N.configFile,"references",(e=>WE(e.initializer)?e.initializer:void 0));i&&i.elements.length>t?Te.add(Jp(e||N.configFile,i.elements[t],n,...r)):Te.add(cS(n,...r))}function Qn(e,t,n,r,...i){const o=Zn();(!o||!tr(o,e,t,n,r,...i))&&Yn(r,...i)}function Yn(e,...t){const n=er();n?"messageText"in e?Te.add(zp(N.configFile,n.name,e)):Te.add(Jp(N.configFile,n.name,e,...t)):"messageText"in e?Te.add(lS(e)):Te.add(cS(e,...t))}function Zn(){if(void 0===Ne){const e=er();Ne=e&<(e.initializer,HE)||!1}return Ne||void 0}function er(){return void 0===Fe&&(Fe=Kf(Hf(N.configFile),"compilerOptions",mt)||!1),Fe||void 0}function tr(e,t,n,r,i,...o){let a=!1;return Kf(e,n,(e=>{"messageText"in i?Te.add(zp(N.configFile,t?e.name:e.initializer,i)):Te.add(Jp(N.configFile,t?e.name:e.initializer,i,...o)),a=!0}),r),a}function nr(e,t){Pe.set(Ft(e),!0),Te.add(t)}function rr(e,t){return 0===ca(e,t,we,!ye.useCaseSensitiveFileNames())}function ir(){return ye.getSymlinkCache?ye.getSymlinkCache():($||($=ik(we,Ln)),z&&!$.hasProcessedResolutions()&&$.setSymlinksFromResolutions(ft,gt,ie),$)}function ar(e,t){var n;return Uq(e,t,(null==(n=Ct(e))?void 0:n.commandLine.options)||N)}}var hV={diagnostics:u,sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0};function yV(e,t,n,r){const i=e.getCompilerOptions();if(i.noEmit)return e.getSemanticDiagnostics(t,r),t||i.outFile?hV:e.emitBuildInfo(n,r);if(!i.noEmitOnError)return;let o,a=[...e.getOptionsDiagnostics(r),...e.getSyntacticDiagnostics(t,r),...e.getGlobalDiagnostics(r),...e.getSemanticDiagnostics(t,r)];if(0===a.length&&LS(e.getCompilerOptions())&&(a=e.getDeclarationDiagnostics(void 0,r)),a.length){if(!t&&!i.outFile){const t=e.emitBuildInfo(n,r);t.diagnostics&&(a=[...a,...t.diagnostics]),o=t.emittedFiles}return{diagnostics:a,sourceMaps:void 0,emittedFiles:o,emitSkipped:!0}}}function vV(e,t){return F(e,(e=>!e.skippedOn||!t[e.skippedOn]))}function bV(e,t=e){return{fileExists:e=>t.fileExists(e),readDirectory:(e,n,r,i,o)=>(xn.assertIsDefined(t.readDirectory,"'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"),t.readDirectory(e,n,r,i,o)),readFile:e=>t.readFile(e),directoryExists:Ze(t,t.directoryExists),getDirectories:Ze(t,t.getDirectories),realpath:Ze(t,t.realpath),useCaseSensitiveFileNames:e.useCaseSensitiveFileNames(),getCurrentDirectory:()=>e.getCurrentDirectory(),onUnRecoverableConfigFileDiagnostic:e.onUnRecoverableConfigFileDiagnostic||ft,trace:e.trace?t=>e.trace(t):void 0}}function xV(e){return gK(e.path)}function SV(e,{extension:t},{isDeclarationFile:n}){switch(t){case".ts":case".d.ts":case".mts":case".d.mts":case".cts":case".d.cts":return;case".tsx":return r();case".jsx":return r()||i();case".js":case".mjs":case".cjs":return i();case".json":return MS(e)?void 0:va.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used;default:return n||e.allowArbitraryExtensions?void 0:va.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set}function r(){return e.jsx?void 0:va.Module_0_was_resolved_to_1_but_jsx_is_not_set}function i(){return JS(e)||!WS(e,"noImplicitAny")?void 0:va.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type}}function kV({imports:e,moduleAugmentations:t}){const n=e.map((e=>e));for(const e of t)11===e.kind&&n.push(e);return n}function TV({imports:e,moduleAugmentations:t},n){if(n(e[e.ComputedDts=0]="ComputedDts",e[e.StoredSignatureAtEmit=1]="StoredSignatureAtEmit",e[e.UsedVersion=2]="UsedVersion",e))(DV||{});(e=>{function t(){return function(e,t,r){const i={getKeys:e=>t.get(e),getValues:t=>e.get(t),keys:()=>e.keys(),size:()=>e.size,deleteKey:i=>{(r||(r=new Set)).add(i);const o=e.get(i);return!!o&&(o.forEach((e=>n(t,e,i))),e.delete(i),!0)},set:(o,a)=>{null==r||r.delete(o);const s=e.get(o);return e.set(o,a),null==s||s.forEach((e=>{a.has(e)||n(t,e,o)})),a.forEach((e=>{(null==s?void 0:s.has(e))||function(e,t,n){let r=e.get(t);r||(r=new Set,e.set(t,r)),r.add(n)}(t,e,o)})),i}};return i}(new Map,new Map,void 0)}function n(e,t,n){const r=e.get(t);return!!(null==r?void 0:r.delete(n))&&(r.size||e.delete(t),!0)}function r(e,t){const n=e.getSymbolAtLocation(t);return n&&function(e){return q(e.declarations,(e=>{var t;return null==(t=Sd(e))?void 0:t.resolvedPath}))}(n)}function i(e,t,n,r){return Yo(e.getProjectReferenceRedirect(t)||t,n,r)}function o(e,t,n){let o;if(t.imports&&t.imports.length>0){const n=e.getTypeChecker();for(const e of t.imports){const t=r(n,e);null==t||t.forEach(c)}}const a=Ro(t.resolvedPath);if(t.referencedFiles&&t.referencedFiles.length>0)for(const r of t.referencedFiles)c(i(e,r.fileName,a,n));if(e.forEachResolvedTypeReferenceDirective((({resolvedTypeReferenceDirective:t})=>{if(!t)return;const r=t.resolvedFileName;c(i(e,r,a,n))}),t),t.moduleAugmentations.length){const n=e.getTypeChecker();for(const e of t.moduleAugmentations){if(!wD(e))continue;const t=n.getSymbolAtLocation(e);t&&s(t)}}for(const t of e.getTypeChecker().getAmbientModules())t.declarations&&t.declarations.length>1&&s(t);return o;function s(e){if(e.declarations)for(const n of e.declarations){const e=Sd(n);e&&e!==t&&c(e.resolvedPath)}}function c(e){(o||(o=new Set)).add(e)}}function a(e,t){return t&&!t.referencedMap==!e}function s(e){return 0===e.module||e.outFile?void 0:t()}function c(e,t,n,r,i){const o=t.getSourceFileByPath(n);return o?_(e,t,o,r,i)?(e.referencedMap?h:g)(e,t,o,r,i):[o]:u}function l(e,t,n,r,i){e.emit(t,((n,o,a,s,c,l)=>{xn.assert(QI(n),`File extension for signature expected to be dts: Got:: ${n}`),i(YV(e,t,o,r,l),c)}),n,!0,void 0,!0)}function _(e,t,n,r,i,o=e.useFileVersionAsSignature){var a;if(null==(a=e.hasCalledUpdateShapeSignature)?void 0:a.has(n.resolvedPath))return!1;const s=e.fileInfos.get(n.resolvedPath),c=s.signature;let u;return n.isDeclarationFile||o||l(t,n,r,i,(t=>{u=t,i.storeSignatureInfo&&(e.signatureInfo??(e.signatureInfo=new Map)).set(n.resolvedPath,0)})),void 0===u&&(u=n.version,i.storeSignatureInfo&&(e.signatureInfo??(e.signatureInfo=new Map)).set(n.resolvedPath,2)),(e.oldSignatures||(e.oldSignatures=new Map)).set(n.resolvedPath,c||!1),(e.hasCalledUpdateShapeSignature||(e.hasCalledUpdateShapeSignature=new Set)).add(n.resolvedPath),s.signature=u,u!==c}function d(e,t){if(!e.allFileNames){const n=t.getSourceFiles();e.allFileNames=n===u?u:n.map((e=>e.fileName))}return e.allFileNames}function p(e,t){const n=e.referencedMap.getKeys(t);return n?$e(n.keys()):[]}function f(e){return function(e){return Q(e.moduleAugmentations,(e=>pp(e.parent)))}(e)||!Zp(e)&&!ef(e)&&!function(e){for(const t of e.statements)if(!cp(t))return!1;return!0}(e)}function m(e,t,n){if(e.allFilesExcludingDefaultLibraryFile)return e.allFilesExcludingDefaultLibraryFile;let r;n&&i(n);for(const e of t.getSourceFiles())e!==n&&i(e);return e.allFilesExcludingDefaultLibraryFile=r||u,e.allFilesExcludingDefaultLibraryFile;function i(e){t.isSourceFileDefaultLibrary(e)||(r||(r=[])).push(e)}}function g(e,t,n){const r=t.getCompilerOptions();return r&&r.outFile?[n]:m(e,t,n)}function h(e,t,n,r,i){if(f(n))return m(e,t,n);const o=t.getCompilerOptions();if(o&&(NS(o)||o.outFile))return[n];const a=new Map;a.set(n.resolvedPath,n);const s=p(e,n.resolvedPath);for(;s.length>0;){const n=s.pop();if(!a.has(n)){const o=t.getSourceFileByPath(n);a.set(n,o),o&&_(e,t,o,r,i)&&s.push(...p(e,o.resolvedPath))}}return $e(V(a.values(),(e=>e)))}e.createManyToManyPathMap=t,e.canReuseOldState=a,e.createReferencedMap=s,e.create=function(e,t,n){var r,i;const c=new Map,l=e.getCompilerOptions(),u=s(l),_=a(u,t);e.getTypeChecker();for(const n of e.getSourceFiles()){const a=xn.checkDefined(n.version,"Program intended to be used with Builder should have source files with versions set"),s=_?null==(r=t.oldSignatures)?void 0:r.get(n.resolvedPath):void 0,d=void 0===s?_?null==(i=t.fileInfos.get(n.resolvedPath))?void 0:i.signature:void 0:s||void 0;if(u){const t=o(e,n,e.getCanonicalFileName);t&&u.set(n.resolvedPath,t)}c.set(n.resolvedPath,{version:a,signature:d,affectsGlobalScope:l.outFile?void 0:f(n)||void 0,impliedFormat:n.impliedNodeFormat})}return{fileInfos:c,referencedMap:u,useFileVersionAsSignature:!n&&!_}},e.releaseCache=function(e){e.allFilesExcludingDefaultLibraryFile=void 0,e.allFileNames=void 0},e.getFilesAffectedBy=function(e,t,n,r,i){var o;const a=c(e,t,n,r,i);return null==(o=e.oldSignatures)||o.clear(),a},e.getFilesAffectedByWithOldState=c,e.updateSignatureOfFile=function(e,t,n){e.fileInfos.get(n).signature=t,(e.hasCalledUpdateShapeSignature||(e.hasCalledUpdateShapeSignature=new Set)).add(n)},e.computeDtsSignature=l,e.updateShapeSignature=_,e.getAllDependencies=function(e,t,n){if(t.getCompilerOptions().outFile)return d(e,t);if(!e.referencedMap||f(n))return d(e,t);const r=new Set,i=[n.resolvedPath];for(;i.length;){const t=i.pop();if(!r.has(t)){r.add(t);const n=e.referencedMap.getValues(t);if(n)for(const e of n.keys())i.push(e)}}return $e(V(r.keys(),(e=>{var n;return(null==(n=t.getSourceFileByPath(e))?void 0:n.fileName)??e})))},e.getReferencedByPaths=p,e.getAllFilesExcludingDefaultLibraryFile=m})(wV||(wV={}));var EV=(e=>(e[e.None=0]="None",e[e.Js=1]="Js",e[e.JsMap=2]="JsMap",e[e.JsInlineMap=4]="JsInlineMap",e[e.Dts=8]="Dts",e[e.DtsMap=16]="DtsMap",e[e.AllJs=7]="AllJs",e[e.AllDts=24]="AllDts",e[e.All=31]="All",e))(EV||{});function PV(e){let t=1;return e.sourceMap&&(t|=2),e.inlineSourceMap&&(t|=4),LS(e)&&(t|=8),e.declarationMap&&(t|=16),e.emitDeclarationOnly&&(t&=24),t}function NV(e,t){const n=t&&(ct(t)?t:PV(t)),r=ct(e)?e:PV(e);if(n===r)return 0;if(!n||!r)return r;const i=n^r;let o=0;return 7&i&&(o=7&r),24&i&&(o|=24&r),o}function FV(e,t){e.changedFilesSet.add(t),e.buildInfoEmitPending=!0,e.programEmitPending=void 0}function AV(e,t,n){return!!e.declarationMap==!!t.declarationMap?n:st(n)?[n]:n[0]}function IV(e,t){return e.length?L(e,(e=>{if(st(e.messageText))return e;const n=OV(e.messageText,e.file,t,(e=>{var t;return null==(t=e.repopulateInfo)?void 0:t.call(e)}));return n===e.messageText?e:{...e,messageText:n}})):e}function OV(e,t,n,r){const i=r(e);if(i)return{...gd(t,n,i.moduleReference,i.mode,i.packageName||i.moduleReference),next:MV(e.next,t,n,r)};const o=MV(e.next,t,n,r);return o===e.next?e:{...e,next:o}}function MV(e,t,n,r){return L(e,(e=>OV(e,t,n,r)))}function LV(e,t,n){if(!e.length)return u;let r;return e.map((e=>{const r=jV(e,t,n,i);r.reportsUnnecessary=e.reportsUnnecessary,r.reportsDeprecated=e.reportDeprecated,r.source=e.source,r.skippedOn=e.skippedOn;const{relatedInformation:o}=e;return r.relatedInformation=o?o.length?o.map((e=>jV(e,t,n,i))):[]:void 0,r}));function i(e){return r??(r=Ro(Go(P$(n.getCompilerOptions()),n.getCurrentDirectory()))),Yo(e,r,n.getCanonicalFileName)}}function jV(e,t,n,r){const{file:i}=e,o=!1!==i?n.getSourceFileByPath(i?r(i):t):void 0;return{...e,file:o,messageText:st(e.messageText)?e.messageText:OV(e.messageText,o,n,(e=>e.info))}}function RV(e,t){xn.assert(!t||!e.affectedFiles||e.affectedFiles[e.affectedFilesIndex-1]!==t||!e.semanticDiagnosticsPerFile.has(t.resolvedPath))}function BV(e,t,n){for(var r;;){const{affectedFiles:i}=e;if(i){const o=e.seenAffectedFiles;let a=e.affectedFilesIndex;for(;at.isSourceFileDefaultLibrary(r)&&!yT(r,n,t)&&qV(e,r.resolvedPath)))}}function zV(e,t,n,r){if(qV(e,t.resolvedPath),e.allFilesExcludingDefaultLibraryFile===e.affectedFiles)return JV(e),void wV.updateShapeSignature(e,xn.checkDefined(e.program),t,n,r);e.compilerOptions.assumeChangesOnlyAffectDirectDependencies||function(e,t,n,r){var i,o;if(!e.referencedMap||!e.changedFilesSet.has(t.resolvedPath))return;if(!VV(e,t.resolvedPath))return;if(NS(e.compilerOptions)){const i=new Map;i.set(t.resolvedPath,!0);const o=wV.getReferencedByPaths(e,t.resolvedPath);for(;o.length>0;){const t=o.pop();if(!i.has(t)){if(i.set(t,!0),UV(e,t,!1,n,r))return;if($V(e,t,!1,n,r),VV(e,t)){const n=xn.checkDefined(e.program).getSourceFileByPath(t);o.push(...wV.getReferencedByPaths(e,n.resolvedPath))}}}}const a=new Set,s=!!(null==(i=t.symbol)?void 0:i.exports)&&!!ld(t.symbol.exports,(n=>{if(0!=(128&n.flags))return!0;const r=mx(n,e.program.getTypeChecker());return r!==n&&0!=(128&r.flags)&&Q(r.declarations,(e=>Sd(e)===t))}));null==(o=e.referencedMap.getKeys(t.resolvedPath))||o.forEach((t=>{if(UV(e,t,s,n,r))return!0;const i=e.referencedMap.getKeys(t);return i&&ud(i,(t=>KV(e,t,s,a,n,r)))}))}(e,t,n,r)}function $V(e,t,n,r,i){if(qV(e,t),!e.changedFilesSet.has(t)){const o=xn.checkDefined(e.program),a=o.getSourceFileByPath(t);a&&(wV.updateShapeSignature(e,o,a,r,i,!0),n?tU(e,t,PV(e.compilerOptions)):LS(e.compilerOptions)&&tU(e,t,e.compilerOptions.declarationMap?24:8))}}function qV(e,t){return!e.semanticDiagnosticsFromOldState||(e.semanticDiagnosticsFromOldState.delete(t),e.semanticDiagnosticsPerFile.delete(t),!e.semanticDiagnosticsFromOldState.size)}function VV(e,t){const n=xn.checkDefined(e.oldSignatures).get(t)||void 0;return xn.checkDefined(e.fileInfos.get(t)).signature!==n}function UV(e,t,n,r,i){var o;return!!(null==(o=e.fileInfos.get(t))?void 0:o.affectsGlobalScope)&&(wV.getAllFilesExcludingDefaultLibraryFile(e,e.program,void 0).forEach((t=>$V(e,t.resolvedPath,n,r,i))),JV(e),!0)}function KV(e,t,n,r,i,o){var a;if(W(r,t)){if(UV(e,t,n,i,o))return!0;$V(e,t,n,i,o),null==(a=e.referencedMap.getKeys(t))||a.forEach((t=>KV(e,t,n,r,i,o)))}}function WV(e,t,n){return Z(function(e,t,n){const r=t.resolvedPath;if(e.semanticDiagnosticsPerFile){const t=e.semanticDiagnosticsPerFile.get(r);if(t)return vV(t,e.compilerOptions)}const i=xn.checkDefined(e.program).getBindAndCheckDiagnostics(t,n);return e.semanticDiagnosticsPerFile&&e.semanticDiagnosticsPerFile.set(r,i),vV(i,e.compilerOptions)}(e,t,n),xn.checkDefined(e.program).getProgramDiagnostics(t))}function HV(e){var t;return!!(null==(t=e.options)?void 0:t.outFile)}var GV=(e=>(e[e.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",e[e.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram",e))(GV||{});function XV(e,t,n,r,i,o){let a,s,c;return void 0===e?(xn.assert(void 0===t),a=n,c=r,xn.assert(!!c),s=c.getProgram()):ot(e)?(c=r,s=gV({rootNames:e,options:t,host:n,oldProgram:c&&c.getProgramOrUndefined(),configFileParsingDiagnostics:i,projectReferences:o}),a=n):(s=e,a=t,c=n,i=r),{host:a,newProgram:s,oldProgram:c,configFileParsingDiagnostics:i||u}}function QV(e,t){return void 0!==(null==t?void 0:t.sourceMapUrlPos)?e.substring(0,t.sourceMapUrlPos):e}function YV(e,t,n,r,i){var o;let a;return n=QV(n,i),(null==(o=null==i?void 0:i.diagnostics)?void 0:o.length)&&(n+=i.diagnostics.map((n=>`${function(n){return n.file.resolvedPath===t.resolvedPath?`(${n.start},${n.length})`:(void 0===a&&(a=Ro(t.resolvedPath)),`${ta(da(a,n.file.resolvedPath,e.getCanonicalFileName))}(${n.start},${n.length})`)}(n)}${yi[n.category]}${n.code}: ${s(n.messageText)}`)).join("\n")),(r.createHash??Hi)(n);function s(e){return st(e)?e:void 0===e?"":e.next?e.messageText+e.next.map(s).join("\n"):e.messageText}}function ZV(e,t,n){return(t.createHash??Hi)(QV(e,n))}function eU(e,{newProgram:t,host:n,oldProgram:r,configFileParsingDiagnostics:i}){let o=r&&r.getState();if(o&&t===o.program&&i===t.getConfigFileParsingDiagnostics())return t=void 0,o=void 0,r;const a=function(e,t){var n,r;const i=wV.create(e,t,!1);i.program=e;const o=e.getCompilerOptions();i.compilerOptions=o;const a=o.outFile;a?o.composite&&(null==t?void 0:t.outSignature)&&a===t.compilerOptions.outFile&&(i.outSignature=t.outSignature&&AV(o,t.compilerOptions,t.outSignature)):i.semanticDiagnosticsPerFile=new Map,i.changedFilesSet=new Set,i.latestChangedDtsFile=o.composite?null==t?void 0:t.latestChangedDtsFile:void 0;const s=wV.canReuseOldState(i.referencedMap,t),c=s?t.compilerOptions:void 0,l=s&&t.semanticDiagnosticsPerFile&&!!i.semanticDiagnosticsPerFile&&!XS(o,c),u=o.composite&&(null==t?void 0:t.emitSignatures)&&!a&&!YS(o,t.compilerOptions);s?(null==(n=t.changedFilesSet)||n.forEach((e=>i.changedFilesSet.add(e))),!a&&(null==(r=t.affectedFilesPendingEmit)?void 0:r.size)&&(i.affectedFilesPendingEmit=new Map(t.affectedFilesPendingEmit),i.seenAffectedFiles=new Set),i.programEmitPending=t.programEmitPending):i.buildInfoEmitPending=!0;const _=i.referencedMap,d=s?t.referencedMap:void 0,p=l&&!o.skipLibCheck==!c.skipLibCheck,f=p&&!o.skipDefaultLibCheck==!c.skipDefaultLibCheck;if(i.fileInfos.forEach(((n,r)=>{var a;let c,m;if(!s||!(c=t.fileInfos.get(r))||c.version!==n.version||c.impliedFormat!==n.impliedFormat||(g=m=_&&_.getValues(r))!==(h=d&&d.getValues(r))&&(void 0===g||void 0===h||g.size!==h.size||ud(g,(e=>!h.has(e))))||m&&ud(m,(e=>!i.fileInfos.has(e)&&t.fileInfos.has(e))))FV(i,r);else{const n=e.getSourceFileByPath(r),o=null==(a=t.emitDiagnosticsPerFile)?void 0:a.get(r);if(o&&(i.emitDiagnosticsPerFile??(i.emitDiagnosticsPerFile=new Map)).set(r,t.hasReusableDiagnostic?LV(o,r,e):IV(o,e)),l){if(n.isDeclarationFile&&!p)return;if(n.hasNoDefaultLib&&!f)return;const o=t.semanticDiagnosticsPerFile.get(r);o&&(i.semanticDiagnosticsPerFile.set(r,t.hasReusableDiagnostic?LV(o,r,e):IV(o,e)),(i.semanticDiagnosticsFromOldState??(i.semanticDiagnosticsFromOldState=new Set)).add(r))}}var g,h;if(u){const e=t.emitSignatures.get(r);e&&(i.emitSignatures??(i.emitSignatures=new Map)).set(r,AV(o,t.compilerOptions,e))}})),s&&ld(t.fileInfos,((e,t)=>!(i.fileInfos.has(t)||!a&&!e.affectsGlobalScope&&(i.buildInfoEmitPending=!0,1)))))wV.getAllFilesExcludingDefaultLibraryFile(i,e,void 0).forEach((e=>FV(i,e.resolvedPath)));else if(c){const t=QS(o,c)?PV(o):NV(o,c);0!==t&&(a?i.programEmitPending=i.programEmitPending?i.programEmitPending|t:t:(e.getSourceFiles().forEach((e=>{i.changedFilesSet.has(e.resolvedPath)||tU(i,e.resolvedPath,t)})),xn.assert(!i.seenAffectedFiles||!i.seenAffectedFiles.size),i.seenAffectedFiles=i.seenAffectedFiles||new Set,i.buildInfoEmitPending=!0))}return i}(t,o);t.getBuildInfo=()=>function(e){var t,n;const r=xn.checkDefined(e.program).getCurrentDirectory(),i=Ro(Go(P$(e.compilerOptions),r)),o=e.latestChangedDtsFile?x(e.latestChangedDtsFile):void 0,a=[],s=new Map,c=new Set(e.program.getRootFileNames().map((t=>Yo(t,r,e.program.getCanonicalFileName)))),l=[];if(e.compilerOptions.outFile){const t=$e(e.fileInfos.entries(),(([e,t])=>(C(e,k(e)),t.impliedFormat?{version:t.version,impliedFormat:t.impliedFormat,signature:void 0,affectsGlobalScope:void 0}:t.version)));return G$({fileNames:a,fileInfos:t,root:l,resolvedRoot:w(),options:D(e.compilerOptions),outSignature:e.outSignature,latestChangedDtsFile:o,pendingEmit:e.programEmitPending?e.programEmitPending!==PV(e.compilerOptions)&&e.programEmitPending:void 0})}let _,d,p;const m=$e(e.fileInfos.entries(),(([t,n])=>{var r,i;const o=k(t);C(t,o),xn.assert(a[o-1]===S(t));const s=null==(r=e.oldSignatures)?void 0:r.get(t),c=void 0!==s?s||void 0:n.signature;if(e.compilerOptions.composite){const n=e.program.getSourceFileByPath(t);if(!ef(n)&&ov(n,e.program)){const n=null==(i=e.emitSignatures)?void 0:i.get(t);n!==c&&(p=ue(p,void 0===n?o:[o,st(n)||n[0]!==c?n:u]))}}return n.version===c?n.affectsGlobalScope||n.impliedFormat?{version:n.version,signature:void 0,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}:n.version:void 0!==c?void 0===s?n:{version:n.version,signature:c,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}:{version:n.version,signature:!1,affectsGlobalScope:n.affectsGlobalScope,impliedFormat:n.impliedFormat}}));let g;(null==(t=e.referencedMap)?void 0:t.size())&&(g=$e(e.referencedMap.keys()).sort(Mt).map((t=>[k(t),T(e.referencedMap.getValues(t))])));const h=function(){let t;return e.fileInfos.forEach(((n,r)=>{var i;const o=null==(i=e.semanticDiagnosticsPerFile)?void 0:i.get(r);o?o.length&&(t=ue(t,[k(r),P(o,r)])):e.changedFilesSet.has(r)||(t=ue(t,k(r)))})),t}();let y,v;if(null==(n=e.affectedFilesPendingEmit)?void 0:n.size){const t=PV(e.compilerOptions),n=new Set;for(const r of $e(e.affectedFilesPendingEmit.keys()).sort(Mt))if(W(n,r)){const n=e.program.getSourceFileByPath(r);if(!n||!ov(n,e.program))continue;const i=k(r),o=e.affectedFilesPendingEmit.get(r);y=ue(y,o===t?i:8===o?[i]:[i,o])}}if(e.changedFilesSet.size)for(const t of $e(e.changedFilesSet.keys()).sort(Mt))v=ue(v,k(t));const b=function(){var t;let n;if(!(null==(t=e.emitDiagnosticsPerFile)?void 0:t.size))return n;for(const t of $e(e.emitDiagnosticsPerFile.keys()).sort(Mt)){const r=e.emitDiagnosticsPerFile.get(t);n=ue(n,[k(t),P(r,t)])}return n}();return G$({fileNames:a,fileInfos:m,root:l,resolvedRoot:w(),options:D(e.compilerOptions),fileIdsList:_,referencedMap:g,semanticDiagnosticsPerFile:h,emitDiagnosticsPerFile:b,affectedFilesPendingEmit:y,changeFileSet:v,emitSignatures:p,latestChangedDtsFile:o});function x(e){return S(Go(e,r))}function S(t){return ta(da(i,t,e.program.getCanonicalFileName))}function k(e){let t=s.get(e);return void 0===t&&(a.push(S(e)),s.set(e,t=a.length)),t}function T(e){const t=$e(e.keys(),k).sort(Nt),n=t.join();let r=null==d?void 0:d.get(n);return void 0===r&&(_=ue(_,t),(d??(d=new Map)).set(n,r=_.length)),r}function C(t,n){const r=e.program.getSourceFile(t);if(!e.program.getFileIncludeReasons().get(r.path).some((e=>0===e.kind)))return;if(!l.length)return l.push(n);const i=l[l.length-1],o=ot(i);if(o&&i[1]===n-1)return i[1]=n;if(o||1===l.length||i!==n-1)return l.push(n);const a=l[l.length-2];return ct(a)&&a===i-1?(l[l.length-2]=[a,n],l.length=l.length-1):l.push(n)}function w(){let t;return c.forEach((n=>{const r=e.program.getSourceFileByPath(n);r&&n!==r.resolvedPath&&(t=ue(t,[k(r.resolvedPath),k(n)]))})),t}function D(e){let t;const{optionsNameMap:n}=MO();for(const r of Re(e).sort(Mt)){const i=n.get(r.toLowerCase());(null==i?void 0:i.affectsBuildInfo)&&((t||(t={}))[r]=E(i,e[r]))}return t}function E(e,t){if(e)if(xn.assert("listOrElement"!==e.type),"list"===e.type){const n=t;if(e.element.isFilePath&&n.length)return n.map(x)}else if(e.isFilePath)return x(t);return t}function P(e,t){return xn.assert(!!e.length),e.map((e=>{const n=N(e,t);n.reportsUnnecessary=e.reportsUnnecessary,n.reportDeprecated=e.reportsDeprecated,n.source=e.source,n.skippedOn=e.skippedOn;const{relatedInformation:r}=e;return n.relatedInformation=r?r.length?r.map((e=>N(e,t))):[]:void 0,n}))}function N(e,t){const{file:n}=e;return{...e,file:!!n&&(n.resolvedPath===t?void 0:S(n.resolvedPath)),messageText:st(e.messageText)?e.messageText:F(e.messageText)}}function F(e){if(e.repopulateInfo)return{info:e.repopulateInfo(),next:A(e.next)};const t=A(e.next);return t===e.next?e:{...e,next:t}}function A(e){return e&&f(e,((t,n)=>{const r=F(t);if(t===r)return;const i=n>0?e.slice(0,n-1):[];i.push(r);for(let t=n+1;ta,c=sU(s,i);return c.getState=s,c.saveEmitState=()=>function(e){const t=e.compilerOptions.outFile;return xn.assert(!e.changedFilesSet.size||t),{affectedFilesPendingEmit:e.affectedFilesPendingEmit&&new Map(e.affectedFilesPendingEmit),seenEmittedFiles:e.seenEmittedFiles&&new Map(e.seenEmittedFiles),programEmitPending:e.programEmitPending,emitSignatures:e.emitSignatures&&new Map(e.emitSignatures),outSignature:e.outSignature,latestChangedDtsFile:e.latestChangedDtsFile,hasChangedEmitSignature:e.hasChangedEmitSignature,changedFilesSet:t?new Set(e.changedFilesSet):void 0,buildInfoEmitPending:e.buildInfoEmitPending,emitDiagnosticsPerFile:e.emitDiagnosticsPerFile&&new Map(e.emitDiagnosticsPerFile)}}(a),c.restoreEmitState=e=>function(e,t){e.affectedFilesPendingEmit=t.affectedFilesPendingEmit,e.seenEmittedFiles=t.seenEmittedFiles,e.programEmitPending=t.programEmitPending,e.emitSignatures=t.emitSignatures,e.outSignature=t.outSignature,e.latestChangedDtsFile=t.latestChangedDtsFile,e.hasChangedEmitSignature=t.hasChangedEmitSignature,e.buildInfoEmitPending=t.buildInfoEmitPending,e.emitDiagnosticsPerFile=t.emitDiagnosticsPerFile,t.changedFilesSet&&(e.changedFilesSet=t.changedFilesSet)}(a,e),c.hasChangedEmitSignature=()=>!!a.hasChangedEmitSignature,c.getAllDependencies=e=>wV.getAllDependencies(a,xn.checkDefined(a.program),e),c.getSemanticDiagnostics=function(e,t){if(RV(a,e),xn.checkDefined(a.program).getCompilerOptions().outFile)return xn.assert(!a.semanticDiagnosticsPerFile),xn.checkDefined(a.program).getSemanticDiagnostics(e,t);if(e)return WV(a,e,t);for(;d(t););let n;for(const e of xn.checkDefined(a.program).getSourceFiles())n=pe(n,WV(a,e,t));return n||u},c.emit=function(t,n,r,i,o){1===e&&RV(a,t);const s=yV(c,t,n,r);if(s)return s;if(!t){if(1===e){let e,t,a=[],s=!1,c=[];for(;t=l(n,r,i,o);)s=s||t.result.emitSkipped,e=pe(e,t.result.diagnostics),c=pe(c,t.result.emittedFiles),a=pe(a,t.result.sourceMaps);return{emitSkipped:s,diagnostics:e||u,emittedFiles:c,sourceMaps:a}}!function(e,t){var n;(null==(n=e.affectedFilesPendingEmit)?void 0:n.size)&&(t?e.affectedFilesPendingEmit.forEach(((t,n)=>{const r=7&t;r?e.affectedFilesPendingEmit.set(n,r):e.affectedFilesPendingEmit.delete(n)})):e.affectedFilesPendingEmit=void 0)}(a,i)}return xn.checkDefined(a.program).emit(t,_(n,o),r,i,o)},c.releaseProgram=()=>function(e){wV.releaseCache(e),e.program=void 0}(a),0===e?c.getSemanticDiagnosticsOfNextAffectedFile=d:1===e?(c.getSemanticDiagnosticsOfNextAffectedFile=d,c.emitNextAffectedFile=l,c.emitBuildInfo=function(e,t){if(a.buildInfoEmitPending){const r=xn.checkDefined(a.program).emitBuildInfo(e||Ze(n,n.writeFile),t);return a.buildInfoEmitPending=!1,r}return hV}):vt(),c;function l(e,t,r,i){var o,s,c;let l=BV(a,t,n);const u=PV(a.compilerOptions);let d,p=r?24&u:u;if(!l)if(a.compilerOptions.outFile){if(!a.programEmitPending)return;if(p=a.programEmitPending,r&&(p&=24),!p)return;l=a.program}else{const i=function(e,t){var n;if(null==(n=e.affectedFilesPendingEmit)?void 0:n.size)return ld(e.affectedFilesPendingEmit,((n,r)=>{var i;const o=e.program.getSourceFileByPath(r);if(!o||!ov(o,e.program))return void e.affectedFilesPendingEmit.delete(r);let a=NV(n,null==(i=e.seenEmittedFiles)?void 0:i.get(o.resolvedPath));return t&&(a&=24),a?{affectedFile:o,emitKind:a}:void 0}))}(a,r);if(!i){const r=function(e){var t;if(null==(t=e.emitDiagnosticsPerFile)?void 0:t.size)return ld(e.emitDiagnosticsPerFile,((t,n)=>{var r;const i=e.program.getSourceFileByPath(n);if(!i||!ov(i,e.program))return void e.emitDiagnosticsPerFile.delete(n);const o=(null==(r=e.seenEmittedFiles)?void 0:r.get(i.resolvedPath))||0;return 24&o?void 0:{affectedFile:i,diagnostics:t,seenKind:o}}))}(a);if(r)return(a.seenEmittedFiles??(a.seenEmittedFiles=new Map)).set(r.affectedFile.resolvedPath,24|r.seenKind),{result:{emitSkipped:!0,diagnostics:r.diagnostics},affected:r.affectedFile};if(!a.buildInfoEmitPending)return;const i=a.program,o=i.emitBuildInfo(e||Ze(n,n.writeFile),t);return a.buildInfoEmitPending=!1,{result:o,affected:i}}({affectedFile:l,emitKind:p}=i)}7&p&&(d=0),24&p&&(d=void 0===d?1:void 0),l===a.program&&(a.programEmitPending=a.changedFilesSet.size?NV(u,p):a.programEmitPending?NV(a.programEmitPending,p):void 0);const f=a.program.emit(l===a.program?void 0:l,_(e,i),t,d,i);if(l!==a.program){const e=l;a.seenAffectedFiles.add(e.resolvedPath),void 0!==a.affectedFilesIndex&&a.affectedFilesIndex++,a.buildInfoEmitPending=!0;const t=(null==(o=a.seenEmittedFiles)?void 0:o.get(e.resolvedPath))||0;(a.seenEmittedFiles??(a.seenEmittedFiles=new Map)).set(e.resolvedPath,p|t);const n=NV((null==(s=a.affectedFilesPendingEmit)?void 0:s.get(e.resolvedPath))||u,p|t);n?(a.affectedFilesPendingEmit??(a.affectedFilesPendingEmit=new Map)).set(e.resolvedPath,n):null==(c=a.affectedFilesPendingEmit)||c.delete(e.resolvedPath),f.diagnostics.length&&(a.emitDiagnosticsPerFile??(a.emitDiagnosticsPerFile=new Map)).set(e.resolvedPath,f.diagnostics)}else a.changedFilesSet.clear();return{result:f,affected:l}}function _(e,t){return LS(a.compilerOptions)?(r,i,o,s,c,l)=>{var u,_,d;if(QI(r))if(a.compilerOptions.outFile){if(a.compilerOptions.composite){const e=p(a.outSignature,void 0);if(!e)return;a.outSignature=e}}else{let e;if(xn.assert(1===(null==c?void 0:c.length)),!t){const t=c[0],r=a.fileInfos.get(t.resolvedPath);if(r.signature===t.version){const o=YV(a.program,t,i,n,l);(null==(u=null==l?void 0:l.diagnostics)?void 0:u.length)||(e=o),o!==t.version&&(n.storeSignatureInfo&&(a.signatureInfo??(a.signatureInfo=new Map)).set(t.resolvedPath,1),a.affectedFiles?(void 0===(null==(_=a.oldSignatures)?void 0:_.get(t.resolvedPath))&&(a.oldSignatures??(a.oldSignatures=new Map)).set(t.resolvedPath,r.signature||!1),r.signature=o):r.signature=o)}}if(a.compilerOptions.composite){const t=c[0].resolvedPath;if(e=p(null==(d=a.emitSignatures)?void 0:d.get(t),e),!e)return;(a.emitSignatures??(a.emitSignatures=new Map)).set(t,e)}}function p(e,t){const o=!e||st(e)?e:e[0];if(t??(t=ZV(i,n,l)),t===o){if(e===o)return;l?l.differsOnlyInMap=!0:l={differsOnlyInMap:!0}}else a.hasChangedEmitSignature=!0,a.latestChangedDtsFile=r;return t}e?e(r,i,o,s,c,l):n.writeFile?n.writeFile(r,i,o,s,c,l):a.program.writeFile(r,i,o,s,c,l)}:e||Ze(n,n.writeFile)}function d(e,t){for(;;){const r=BV(a,e,n);let i;if(!r)return;if(r!==a.program){const n=r;if(t&&t(n)||(i=WV(a,n,e)),a.seenAffectedFiles.add(n.resolvedPath),a.affectedFilesIndex++,a.buildInfoEmitPending=!0,!i)continue}else i=a.program.getSemanticDiagnostics(void 0,e),a.changedFilesSet.clear(),a.programEmitPending=PV(a.compilerOptions);return{result:i,affected:r}}}}function tU(e,t,n){var r,i;const o=(null==(r=e.affectedFilesPendingEmit)?void 0:r.get(t))||0;(e.affectedFilesPendingEmit??(e.affectedFilesPendingEmit=new Map)).set(t,o|n),null==(i=e.emitDiagnosticsPerFile)||i.delete(t)}function nU(e){return st(e)?{version:e,signature:e,affectsGlobalScope:void 0,impliedFormat:void 0}:st(e.signature)?e:{version:e.version,signature:!1===e.signature?void 0:e.version,affectsGlobalScope:e.affectsGlobalScope,impliedFormat:e.impliedFormat}}function rU(e,t){return ct(e)?t:e[1]||8}function iU(e,t){return e||PV(t||{})}function oU(e,t,n){var r,i,o,a;const s=e.program,c=Ro(Go(t,n.getCurrentDirectory())),l=tn(n.useCaseSensitiveFileNames());let _;const d=null==(r=s.fileNames)?void 0:r.map((function(e){return Yo(e,c,l)}));let p;const f=s.latestChangedDtsFile?g(s.latestChangedDtsFile):void 0;if(HV(s)){const e=new Map;s.fileInfos.forEach(((t,n)=>{const r=h(n+1);e.set(r,st(t)?{version:t,signature:void 0,affectsGlobalScope:void 0,impliedFormat:void 0}:t)})),_={fileInfos:e,compilerOptions:s.options?jM(s.options,g):{},latestChangedDtsFile:f,outSignature:s.outSignature,programEmitPending:void 0===s.pendingEmit?void 0:iU(s.pendingEmit,s.options)}}else{p=null==(i=s.fileIdsList)?void 0:i.map((e=>new Set(e.map(h))));const e=new Map,t=(null==(o=s.options)?void 0:o.composite)&&!s.options.outFile?new Map:void 0;s.fileInfos.forEach(((n,r)=>{const i=h(r+1),o=nU(n);e.set(i,o),t&&o.signature&&t.set(i,o.signature)})),null==(a=s.emitSignatures)||a.forEach((e=>{if(ct(e))t.delete(h(e));else{const n=h(e[0]);t.set(n,st(e[1])||e[1].length?e[1]:[t.get(n)])}}));const n=new Set(O(s.changeFileSet,h)),r=s.affectedFilesPendingEmit?PV(s.options||{}):void 0;_={fileInfos:e,compilerOptions:s.options?jM(s.options,g):{},referencedMap:function(e,t){const n=wV.createReferencedMap(t);return n&&e?(e.forEach((([e,t])=>n.set(h(e),p[t-1]))),n):n}(s.referencedMap,s.options??{}),semanticDiagnosticsPerFile:function(e,t,n){const r=new Map(V(t.keys(),(e=>n.has(e)?void 0:[e,u])));return null==e||e.forEach((e=>{ct(e)?r.delete(h(e)):r.set(h(e[0]),e[1])})),r.size?r:void 0}(s.semanticDiagnosticsPerFile,e,n),emitDiagnosticsPerFile:(m=s.emitDiagnosticsPerFile,m&&Ue(m,(e=>h(e[0])),(e=>e[1]))),hasReusableDiagnostic:!0,affectedFilesPendingEmit:s.affectedFilesPendingEmit&&Ue(s.affectedFilesPendingEmit,(e=>h(ct(e)?e:e[0])),(e=>rU(e,r))),changedFilesSet:n,latestChangedDtsFile:f,emitSignatures:(null==t?void 0:t.size)?t:void 0}}var m;return{getState:()=>_,saveEmitState:_t,restoreEmitState:_t,getProgram:vt,getProgramOrUndefined:ft,releaseProgram:_t,getCompilerOptions:()=>_.compilerOptions,getSourceFile:vt,getSourceFiles:vt,getOptionsDiagnostics:vt,getGlobalDiagnostics:vt,getConfigFileParsingDiagnostics:vt,getSyntacticDiagnostics:vt,getDeclarationDiagnostics:vt,getSemanticDiagnostics:vt,emit:vt,getAllDependencies:vt,getCurrentDirectory:vt,emitNextAffectedFile:vt,getSemanticDiagnosticsOfNextAffectedFile:vt,emitBuildInfo:vt,close:_t,hasChangedEmitSignature:dt};function g(e){return Go(e,c)}function h(e){return d[e-1]}}function aU(e,t,n){const r=Ro(Go(t,n.getCurrentDirectory())),i=tn(n.useCaseSensitiveFileNames()),o=new Map;let a=0;const s=new Map,c=new Map(e.resolvedRoot);return e.fileInfos.forEach(((t,n)=>{const s=Yo(e.fileNames[n],r,i),c=st(t)?t:t.version;if(o.set(s,c),ae().program,releaseProgram:()=>e().program=void 0,getCompilerOptions:()=>e().compilerOptions,getSourceFile:e=>n().getSourceFile(e),getSourceFiles:()=>n().getSourceFiles(),getOptionsDiagnostics:e=>n().getOptionsDiagnostics(e),getGlobalDiagnostics:e=>n().getGlobalDiagnostics(e),getConfigFileParsingDiagnostics:()=>t,getSyntacticDiagnostics:(e,t)=>n().getSyntacticDiagnostics(e,t),getDeclarationDiagnostics:(e,t)=>n().getDeclarationDiagnostics(e,t),getSemanticDiagnostics:(e,t)=>n().getSemanticDiagnostics(e,t),emit:(e,t,r,i,o)=>n().emit(e,t,r,i,o),emitBuildInfo:(e,t)=>n().emitBuildInfo(e,t),getAllDependencies:vt,getCurrentDirectory:()=>n().getCurrentDirectory(),close:_t};function n(){return xn.checkDefined(e().program)}}function cU(e,t,n,r,i,o){return eU(0,XV(e,t,n,r,i,o))}function lU(e,t,n,r,i,o){return eU(1,XV(e,t,n,r,i,o))}function uU(e,t,n,r,i,o){const{newProgram:a,configFileParsingDiagnostics:s}=XV(e,t,n,r,i,o);return sU((()=>({program:a,compilerOptions:a.getCompilerOptions()})),s)}function _U(e){return Wt(e,"/node_modules/.staging")?Ht(e,"/.staging"):Q(co,(t=>e.includes(t)))?void 0:e}function dU(e,t){if(t<=1)return 1;let n=1,r=0===e[0].search(/[a-zA-Z]:/);if(e[0]!==xo&&!r&&0===e[1].search(/[a-zA-Z]\$$/)){if(2===t)return 2;n=2,r=!0}return r&&!e[n].match(/^users$/i)?n:e[n].match(/^workspaces$/i)?n+1:n+2}function pU(e,t){return void 0===t&&(t=e.length),!(t<=2)&&t>dU(e,t)+1}function fU(e){return gU(Ro(e))}function mU(e,t){if(t.lengthi.length+1?bU(s,a,Math.max(i.length+1,c+1),u):{dir:n,dirPath:r,nonRecursive:!0}:vU(s,a,a.length-1,c,l,i,u)}function vU(e,t,n,r,i,o,a){if(-1!==i)return bU(e,t,i+1,a);let s=!0,c=n;for(let e=0;e=n&&r+2function(e,t,n,r,i,o,a){const s=TU(e),c=Sj(n,r,i,s,t,o,a);if(!e.getGlobalCache)return c;const l=e.getGlobalCache();if(!(void 0===l||Os(n)||c.resolvedModule&&oT(c.resolvedModule.extension))){const{resolvedModule:r,failedLookupLocations:o,affectingLocations:a,resolutionDiagnostics:u}=SR(xn.checkDefined(e.globalCacheResolutionModuleName)(n),e.projectName,i,s,l,t);if(r)return c.resolvedModule=r,c.failedLookupLocations=KL(c.failedLookupLocations,o),c.affectingLocations=KL(c.affectingLocations,a),c.resolutionDiagnostics=KL(c.resolutionDiagnostics,u),c}return c}(r,i,o,e,n,t,a)}}function wU(e,t,n){let r,i,o;const a=et(),s=new Set,c=new Set,l=new Map,_=new Map;let d,p,f,m,g,y=!1,v=!1;const b=bt((()=>e.getCurrentDirectory())),x=e.getCachedDirectoryStructureHost(),S=new Map,k=hj(b(),e.getCanonicalFileName,e.getCompilationSettings()),T=new Map,C=yj(b(),e.getCanonicalFileName,e.getCompilationSettings(),k.getPackageJsonInfoCache(),k.optionsToRedirectsKey),w=new Map,D=hj(b(),e.getCanonicalFileName,vj(e.getCompilationSettings()),k.getPackageJsonInfoCache()),E=new Map,P=new Map,N=SU(t,b),F=e.toPath(N),A=$o(F),I=new Map,O=new Map,M=new Map,L=new Map;return{rootDirForResolution:t,resolvedModuleNames:S,resolvedTypeReferenceDirectives:T,resolvedLibraries:w,resolvedFileToResolution:l,resolutionsWithFailedLookups:s,resolutionsWithOnlyAffectingLocations:c,directoryWatchesOfFailedLookups:E,fileWatchesOfAffectingLocations:P,packageDirWatchers:O,dirPathToSymlinkPackageRefCount:M,watchFailedLookupLocationsOfExternalModuleResolutions:U,getModuleResolutionCache:()=>k,startRecordingFilesWithChangedResolutions:function(){r=[]},finishRecordingFilesWithChangedResolutions:function(){const e=r;return r=void 0,e},startCachingPerDirectoryResolution:function(){k.isReadonly=void 0,C.isReadonly=void 0,D.isReadonly=void 0,k.getPackageJsonInfoCache().isReadonly=void 0,k.clearAllExceptPackageJsonInfoCache(),C.clearAllExceptPackageJsonInfoCache(),D.clearAllExceptPackageJsonInfoCache(),a.forEach(Y),a.clear(),I.clear()},finishCachingPerDirectoryResolution:function(t,n){o=void 0,v=!1,a.forEach(Y),a.clear(),t!==n&&(function(t){w.forEach(((n,r)=>{var i;(null==(i=null==t?void 0:t.resolvedLibReferences)?void 0:i.has(r))||(ne(n,e.toPath(iV(e.getCompilationSettings(),b(),r)),j),w.delete(r))}))}(t),null==t||t.getSourceFiles().forEach((e=>{var t;const n=Zp(e)?(null==(t=e.packageJsonLocations)?void 0:t.length)??0:0,r=_.get(e.resolvedPath)??u;for(let t=r.length;tn)for(let e=n;e{const r=null==t?void 0:t.getSourceFileByPath(n);r&&r.resolvedPath===n||(e.forEach((e=>P.get(e).files--)),_.delete(n))}))),E.forEach(z),P.forEach($),O.forEach(J),y=!1,k.isReadonly=!0,C.isReadonly=!0,D.isReadonly=!0,k.getPackageJsonInfoCache().isReadonly=!0,I.clear()},resolveModuleNameLiterals:function(t,r,i,o,a,s){return q({entries:t,containingFile:r,containingSourceFile:a,redirectedReference:i,options:o,reusedNames:s,perFileCache:S,loader:CU(r,i,o,e,k),getResolutionWithResolvedFileName:j,shouldRetryResolution:e=>!e.resolvedModule||!aT(e.resolvedModule.extension),logChanges:n,deferWatchingNonRelativeResolution:!0})},resolveTypeReferenceDirectiveReferences:function(t,n,r,i,o,a){return q({entries:t,containingFile:n,containingSourceFile:o,redirectedReference:r,options:i,reusedNames:a,perFileCache:T,loader:Zq(n,r,i,TU(e),C),getResolutionWithResolvedFileName:R,shouldRetryResolution:e=>void 0===e.resolvedTypeReferenceDirective,deferWatchingNonRelativeResolution:!1})},resolveLibrary:function(t,n,r,i){const o=TU(e);let a=null==w?void 0:w.get(i);if(!a||a.isInvalidated){const s=a;a=bj(t,n,r,o,D);const c=e.toPath(n);U(t,a,c,j,!1),w.set(i,a),s&&ne(s,c,j)}else if(jL(r,o)){const e=j(a);LL(o,(null==e?void 0:e.resolvedFileName)?e.packageId?va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,t,n,null==e?void 0:e.resolvedFileName,(null==e?void 0:e.packageId)&&yd(e.packageId))}return a},resolveSingleModuleNameWithoutWatching:function(t,n){var r,i;const o=e.toPath(n),a=S.get(o),s=null==a?void 0:a.get(t,void 0);if(s&&!s.isInvalidated)return s;const c=null==(r=e.beforeResolveSingleModuleNameWithoutWatching)?void 0:r.call(e,k),l=TU(e),u=Sj(t,n,e.getCompilationSettings(),l,k);return null==(i=e.afterResolveSingleModuleNameWithoutWatching)||i.call(e,k,t,n,u,c),u},removeResolutionsFromProjectReferenceRedirects:function(t){if(!Ao(t,".json"))return;const n=e.getCurrentProgram();if(!n)return;const r=n.getResolvedProjectReferenceByPath(t);r&&r.commandLine.fileNames.forEach((t=>ae(e.toPath(t))))},removeResolutionsOfFile:ae,hasChangedAutomaticTypeDirectiveNames:()=>y,invalidateResolutionOfFile:function(t){ae(t);const n=y;se(l.get(t),pt)&&y&&!n&&e.onChangedAutomaticTypeDirectiveNames()},invalidateResolutionsOfFailedLookupLocations:ue,setFilesWithInvalidatedNonRelativeUnresolvedImports:function(e){xn.assert(o===e||void 0===o),o=e},createHasInvalidatedResolutions:function(e,t){ue();const n=i;return i=void 0,{hasInvalidatedResolutions:t=>e(t)||v||!!(null==n?void 0:n.has(t))||B(t),hasInvalidatedLibResolutions:e=>{var n;return t(e)||!!(null==(n=null==w?void 0:w.get(e))?void 0:n.isInvalidated)}}},isFileWithInvalidatedNonRelativeUnresolvedImports:B,updateTypeRootsWatch:function(){const t=e.getCompilationSettings();if(t.types)return void fe();const n=QL(t,{getCurrentDirectory:b});n?kx(L,new Set(n),{createNewValue:me,onDeleteValue:dx}):fe()},closeTypeRootsWatch:fe,clear:function(){xx(E,vq),xx(P,vq),I.clear(),O.clear(),M.clear(),a.clear(),fe(),S.clear(),T.clear(),l.clear(),s.clear(),c.clear(),f=void 0,m=void 0,g=void 0,p=void 0,d=void 0,v=!1,k.clear(),C.clear(),k.update(e.getCompilationSettings()),C.update(e.getCompilationSettings()),D.clear(),_.clear(),w.clear(),y=!1},onChangesAffectModuleResolution:function(){v=!0,k.clearAllExceptPackageJsonInfoCache(),C.clearAllExceptPackageJsonInfoCache(),k.update(e.getCompilationSettings()),C.update(e.getCompilationSettings())}};function j(e){return e.resolvedModule}function R(e){return e.resolvedTypeReferenceDirective}function B(e){if(!o)return!1;const t=o.get(e);return!!t&&!!t.length}function J(e,t){0===e.dirPathToWatcher.size&&O.delete(t)}function z(e,t){0===e.refCount&&(E.delete(t),e.watcher.close())}function $(e,t){var n;0!==e.files||0!==e.resolutions||(null==(n=e.symlinks)?void 0:n.size)||(P.delete(t),e.watcher.close())}function q({entries:t,containingFile:n,containingSourceFile:i,redirectedReference:o,options:a,perFileCache:s,reusedNames:c,loader:l,getResolutionWithResolvedFileName:u,deferWatchingNonRelativeResolution:_,shouldRetryResolution:d,logChanges:p}){const f=e.toPath(n),m=s.get(f)||s.set(f,pj()).get(f),g=[],h=p&&B(f),y=e.getCurrentProgram(),b=y&&y.getResolvedProjectReferenceToRedirect(n),x=b?!o||o.sourceFile.path!==b.sourceFile.path:!!o,k=pj();for(const c of t){const t=l.nameAndMode.getName(c),y=l.nameAndMode.getMode(c,i,(null==o?void 0:o.commandLine.options)||a);let b=m.get(t,y);if(!k.has(t,y)&&(v||x||!b||b.isInvalidated||h&&!Os(t)&&d(b))){const n=b;b=l.resolve(t,y),e.onDiscoveredSymlink&&DU(b)&&e.onDiscoveredSymlink(),m.set(t,y,b),b!==n&&(U(t,b,f,u,_),n&&ne(n,f,u)),p&&r&&!T(n,b)&&(r.push(f),p=!1)}else{const r=TU(e);if(jL(a,r)&&!k.has(t,y)){const e=u(b);LL(r,s===S?(null==e?void 0:e.resolvedFileName)?e.packageId?va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:va.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:(null==e?void 0:e.resolvedFileName)?e.packageId?va.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:va.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:va.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,t,n,null==e?void 0:e.resolvedFileName,(null==e?void 0:e.packageId)&&yd(e.packageId))}}xn.assert(void 0!==b&&!b.isInvalidated),k.set(t,y,!0),g.push(b)}return null==c||c.forEach((e=>k.set(l.nameAndMode.getName(e),l.nameAndMode.getMode(e,i,(null==o?void 0:o.commandLine.options)||a),!0))),m.size()!==k.size()&&m.forEach(((e,t,n)=>{k.has(t,n)||(ne(e,f,u),m.delete(t,n))})),g;function T(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=u(e),r=u(t);return n===r||!(!n||!r)&&n.resolvedFileName===r.resolvedFileName}}function V(e){return Wt(e,"/node_modules/@types")}function U(t,n,r,i,o){var s;if(n.refCount)n.refCount++,xn.assertIsDefined(n.files);else{n.refCount=1,xn.assert(!(null==(s=n.files)?void 0:s.size)),!o||Os(t)?W(n):a.add(t,n);const r=i(n);if(r&&r.resolvedFileName){const t=e.toPath(r.resolvedFileName);let i=l.get(t);i||l.set(t,i=new Set),i.add(n)}}(n.files??(n.files=new Set)).add(r)}function K(t,n){const r=yU(t,e.toPath(t),N,F,A,b);if(r){const{dir:e,dirPath:t,nonRecursive:i,packageDir:o,packageDirPath:a}=r;t===F?(xn.assert(i),xn.assert(!o),n=!0):Z(e,t,o,a,i)}return n}function W(e){xn.assert(!!e.refCount);const{failedLookupLocations:t,affectingLocations:n,alternateResult:r}=e;if(!(null==t?void 0:t.length)&&!(null==n?void 0:n.length)&&!r)return;((null==t?void 0:t.length)||r)&&s.add(e);let i=!1;if(t)for(const e of t)i=K(e,i);r&&(i=K(r,i)),i&&Z(N,F,void 0,void 0,!0),H(e,!(null==t?void 0:t.length)&&!r)}function H(e,t){xn.assert(!!e.refCount);const{affectingLocations:n}=e;if(null==n?void 0:n.length){t&&c.add(e);for(const e of n)G(e,!0)}}function G(t,n){const r=P.get(t);if(r)return void(n?r.resolutions++:r.files++);let i,o=t,a=!1;e.realpath&&(o=e.realpath(t),t!==o&&(a=!0,i=P.get(o)));const s=n?1:0,c=n?0:1;if(!a||!i){const t={watcher:hU(e.toPath(o))?e.watchAffectingFileLocation(o,((t,n)=>{null==x||x.addOrDeleteFile(t,e.toPath(o),n),X(o,k.getPackageJsonInfoCache().getInternalMap()),e.scheduleInvalidateResolutionsOfFailedLookupLocations()})):XU,resolutions:a?0:s,files:a?0:c,symlinks:void 0};P.set(o,t),a&&(i=t)}if(a){xn.assert(!!i);const e={watcher:{close:()=>{var e;const n=P.get(o);!(null==(e=null==n?void 0:n.symlinks)?void 0:e.delete(t))||n.symlinks.size||n.resolutions||n.files||(P.delete(o),n.watcher.close())}},resolutions:s,files:c,symlinks:void 0};P.set(t,e),(i.symlinks??(i.symlinks=new Set)).add(t)}}function X(t,n){var r;const i=P.get(t);(null==i?void 0:i.resolutions)&&(p??(p=new Set)).add(t),(null==i?void 0:i.files)&&(d??(d=new Set)).add(t),null==(r=null==i?void 0:i.symlinks)||r.forEach((e=>X(e,n))),null==n||n.delete(e.toPath(t))}function Y(t,n){const r=e.getCurrentProgram();r&&r.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(n)?t.forEach((e=>H(e,!0))):t.forEach(W)}function Z(t,n,r,i,o){i&&e.realpath?function(t,n,r,i,o){xn.assert(!o);let a=I.get(i),s=O.get(i);if(void 0===a){const t=e.realpath(r);a=t!==r&&e.toPath(t)!==i,I.set(i,a),s?s.isSymlink!==a&&(s.dirPathToWatcher.forEach((e=>{re(s.isSymlink?i:n,!1),e.watcher=l()})),s.isSymlink=a):O.set(i,s={dirPathToWatcher:new Map,isSymlink:a})}else xn.assertIsDefined(s),xn.assert(a===s.isSymlink);const c=s.dirPathToWatcher.get(n);function l(){return a?ee(r,i,o):ee(t,n,o)}c?c.refCount++:(s.dirPathToWatcher.set(n,{watcher:l(),refCount:1}),a&&M.set(n,(M.get(n)??0)+1))}(t,n,r,i,o):ee(t,n,o)}function ee(e,t,n){let r=E.get(t);return r?(xn.assert(!!n==!!r.nonRecursive),r.refCount++):E.set(t,r={watcher:ie(e,t,n),refCount:1,nonRecursive:n}),r}function te(t,n,r){const i=yU(t,e.toPath(t),N,F,A,b);if(i){const{dirPath:t,packageDirPath:o}=i;if(t===F)n=!0;else if(o&&e.realpath){const e=O.get(o),n=e.dirPathToWatcher.get(t);if(n.refCount--,0===n.refCount){if(re(e.isSymlink?o:t,r),e.dirPathToWatcher.delete(t),e.isSymlink){const e=M.get(t)-1;0===e?M.delete(t):M.set(t,e)}r&&J(e,o)}}else re(t,r)}return n}function ne(t,n,r,i){if(xn.checkDefined(t.files).delete(n),t.refCount--,t.refCount)return;const o=r(t);if(o&&o.resolvedFileName){const n=e.toPath(o.resolvedFileName),r=l.get(n);(null==r?void 0:r.delete(t))&&!r.size&&l.delete(n)}const{failedLookupLocations:a,affectingLocations:u,alternateResult:_}=t;if(s.delete(t)){let e=!1;if(a)for(const t of a)e=te(t,e,i);_&&(e=te(_,e,i)),e&&re(F,i)}else(null==u?void 0:u.length)&&c.delete(t);if(u)for(const e of u){const t=P.get(e);t.resolutions--,i&&$(t,e)}}function re(e,t){const n=E.get(e);n.refCount--,t&&z(n,e)}function ie(t,n,r){return e.watchDirectoryOfFailedLookupLocation(t,(t=>{const r=e.toPath(t);x&&x.addOrDeleteFileOrDirectory(t,r),ce(r,n===r)}),r?0:1)}function oe(e,t,n,r){const i=e.get(t);i&&(i.forEach((e=>ne(e,t,n,r))),e.delete(t))}function ae(e,t){oe(S,e,j,t),oe(T,e,R,t)}function se(e,t){if(!e)return!1;let n=!1;return e.forEach((e=>{if(!e.isInvalidated&&t(e)){e.isInvalidated=n=!0;for(const t of xn.checkDefined(e.files))(i??(i=new Set)).add(t),y=y||Wt(t,rV)}})),n}function ce(t,n){if(n)(g||(g=new Set)).add(t);else{const n=_U(t);if(!n)return!1;if(t=n,e.fileIsOpen(t))return!1;const r=Ro(t);if(V(t)||ha(t)||V(r)||ha(r))(f||(f=new Set)).add(t),(m||(m=new Set)).add(t);else{if(mq(e.getCurrentProgram(),t))return!1;if(Ao(t,".map"))return!1;(f||(f=new Set)).add(t);const n=Mj(t,!0);n&&(m||(m=new Set)).add(n)}}e.scheduleInvalidateResolutionsOfFailedLookupLocations()}function le(){const e=k.getPackageJsonInfoCache().getInternalMap();e&&(f||m||g)&&e.forEach(((t,n)=>de(n)?e.delete(n):void 0))}function ue(){var t;if(v)return d=void 0,le(),(f||m||g||p)&&se(w,_e),f=void 0,m=void 0,g=void 0,p=void 0,!0;let n=!1;return d&&(null==(t=e.getCurrentProgram())||t.getSourceFiles().forEach((e=>{Q(e.packageJsonLocations,(e=>d.has(e)))&&((i??(i=new Set)).add(e.path),n=!0)})),d=void 0),f||m||g||p?(n=se(s,_e)||n,le(),f=void 0,m=void 0,g=void 0,n=se(c,pe)||n,p=void 0,n):n}function _e(t){var n;return!!pe(t)||!!(f||m||g)&&((null==(n=t.failedLookupLocations)?void 0:n.some((t=>de(e.toPath(t)))))||!!t.alternateResult&&de(e.toPath(t.alternateResult)))}function de(e){return(null==f?void 0:f.has(e))||h((null==m?void 0:m.keys())||[],(t=>!!an(e,t)||void 0))||h((null==g?void 0:g.keys())||[],(t=>!(!(e.length>t.length&&an(e,t))||!Do(t)&&e[t.length]!==xo)||void 0))}function pe(e){var t;return!!p&&(null==(t=e.affectingLocations)?void 0:t.some((e=>p.has(e))))}function fe(){xx(L,dx)}function me(t){return function(t){return!!e.getCompilationSettings().typeRoots||fU(e.toPath(t))}(t)?e.watchTypeRootsDirectory(t,(n=>{const r=e.toPath(n);x&&x.addOrDeleteFileOrDirectory(n,r),y=!0,e.onChangedAutomaticTypeDirectiveNames();const i=xU(t,e.toPath(t),F,A,b,(e=>E.has(e)||M.has(e)));i&&ce(r,i===r)}),1):XU}}function DU(e){var t,n;return!(!(null==(t=e.resolvedModule)?void 0:t.originalPath)&&!(null==(n=e.resolvedTypeReferenceDirective)?void 0:n.originalPath))}var EU=vo?{getCurrentDirectory:()=>vo.getCurrentDirectory(),getNewLine:()=>vo.newLine,getCanonicalFileName:tn(vo.useCaseSensitiveFileNames)}:void 0;function PU(e,t){const n=e===vo&&EU?EU:{getCurrentDirectory:()=>e.getCurrentDirectory(),getNewLine:()=>e.newLine,getCanonicalFileName:tn(e.useCaseSensitiveFileNames)};if(!t)return t=>e.write(Nq(t,n));const r=new Array(1);return t=>{r[0]=t,e.write(Bq(r,n)+n.getNewLine()),r[0]=void 0}}function NU(e,t,n){return!(!e.clearScreen||n.preserveWatchOutput||n.extendedDiagnostics||n.diagnostics||!D(FU,t.code)||(e.clearScreen(),0))}var FU=[va.Starting_compilation_in_watch_mode.code,va.File_change_detected_Starting_incremental_compilation.code];function AU(e){return e.now?e.now().toLocaleTimeString("en-US",{timeZone:"UTC"}).replace(" "," "):(new Date).toLocaleTimeString()}function IU(e,t){return t?(t,n,r)=>{NU(e,t,r);let i=`[${Lq(AU(e),"")}] `;i+=`${Jq(t.messageText,e.newLine)}${n+n}`,e.write(i)}:(t,n,r)=>{let i="";NU(e,t,r)||(i+=n),i+=`${AU(e)} - `,i+=`${Jq(t.messageText,e.newLine)}${function(e,t){return D(FU,e.code)?t+t:t}(t,n)}`,e.write(i)}}function OU(e,t,n,r,i,o){const a=i;a.onUnRecoverableConfigFileDiagnostic=e=>aK(i,o,e);const s=tM(e,t,a,n,r);return a.onUnRecoverableConfigFileDiagnostic=void 0,s}function MU(e){return N(e,(e=>1===e.category))}function LU(e){return F(e,(e=>1===e.category)).map((e=>{if(void 0!==e.file)return`${e.file.fileName}`})).map((t=>{if(void 0===t)return;const n=S(e,(e=>void 0!==e.file&&e.file.fileName===t));if(void 0!==n){const{line:e}=Xa(n.file,n.start);return{fileName:t,line:e+1}}}))}function jU(e){return 1===e?va.Found_1_error_Watching_for_file_changes:va.Found_0_errors_Watching_for_file_changes}function RU(e,t){const n=Lq(":"+e.line,"");return Eo(e.fileName)&&Eo(t)?da(t,e.fileName,!1)+n:e.fileName+n}function BU(e,t,n,r){if(0===e)return"";const i=t.filter((e=>void 0!==e)),o=i.map((e=>`${e.fileName}:${e.line}`)).filter(((e,t,n)=>n.indexOf(e)===t)),a=i[0]&&RU(i[0],r.getCurrentDirectory());let s;s=1===e?void 0!==t[0]?[va.Found_1_error_in_0,a]:[va.Found_1_error]:0===o.length?[va.Found_0_errors,e]:1===o.length?[va.Found_0_errors_in_the_same_file_starting_at_Colon_1,e,a]:[va.Found_0_errors_in_1_files,e,o.length];const c=cS(...s),l=o.length>1?function(e,t){const n=e.filter(((e,t,n)=>t===n.findIndex((t=>(null==t?void 0:t.fileName)===(null==e?void 0:e.fileName)))));if(0===n.length)return"";const r=e=>Math.log(e)*Math.LOG10E+1,i=n.map((t=>[t,N(e,(e=>e.fileName===t.fileName))])),o=i.reduce(((e,t)=>Math.max(e,t[1]||0)),0),a=va.Errors_Files.message,s=a.split(" ")[0].length,c=Math.max(s,r(o)),l=Math.max(r(o)-s,0);let u="";return u+=" ".repeat(l)+a+"\n",i.forEach((e=>{const[n,r]=e,i=Math.log(r)*Math.LOG10E+1|0,o=i{t(e.fileName)}))}function $U(e,t){var n,r;const i=e.getFileIncludeReasons(),o=t=>pa(t,e.getCurrentDirectory(),e.getCanonicalFileName);for(const a of e.getSourceFiles())t(`${WU(a,o)}`),null==(n=i.get(a.path))||n.forEach((n=>t(` ${KU(e,n,o).messageText}`))),null==(r=qU(a,o))||r.forEach((e=>t(` ${e.messageText}`)))}function qU(e,t){var n;let r;if(e.path!==e.resolvedPath&&(r??(r=[])).push(uS(void 0,va.File_is_output_of_project_reference_source_0,WU(e.originalFileName,t))),e.redirectInfo&&(r??(r=[])).push(uS(void 0,va.File_redirects_to_file_0,WU(e.redirectInfo.redirectTarget,t))),Zp(e))switch(e.impliedNodeFormat){case 99:e.packageJsonScope&&(r??(r=[])).push(uS(void 0,va.File_is_ECMAScript_module_because_0_has_field_type_with_value_module,WU(De(e.packageJsonLocations),t)));break;case 1:e.packageJsonScope?(r??(r=[])).push(uS(void 0,e.packageJsonScope.contents.packageJsonContent.type?va.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:va.File_is_CommonJS_module_because_0_does_not_have_field_type,WU(De(e.packageJsonLocations),t))):(null==(n=e.packageJsonLocations)?void 0:n.length)&&(r??(r=[])).push(uS(void 0,va.File_is_CommonJS_module_because_package_json_was_not_found))}return r}function VU(e,t){var n;const r=e.getCompilerOptions().configFile;if(!(null==(n=null==r?void 0:r.configFileSpecs)?void 0:n.validatedFilesSpec))return;const i=e.getCanonicalFileName(t),o=Ro(Go(r.fileName,e.getCurrentDirectory())),a=T(r.configFileSpecs.validatedFilesSpec,(t=>e.getCanonicalFileName(Go(t,o))===i));return-1!==a?r.configFileSpecs.validatedFilesSpecBeforeSubstitution[a]:void 0}function UU(e,t){var n,r;const i=e.getCompilerOptions().configFile;if(!(null==(n=null==i?void 0:i.configFileSpecs)?void 0:n.validatedIncludeSpecs))return;if(i.configFileSpecs.isDefaultIncludeSpec)return!0;const o=Ao(t,".json"),a=Ro(Go(i.fileName,e.getCurrentDirectory())),s=e.useCaseSensitiveFileNames(),c=T(null==(r=null==i?void 0:i.configFileSpecs)?void 0:r.validatedIncludeSpecs,(e=>{if(o&&!Wt(e,".json"))return!1;const n=bk(e,a,"files");return!!n&&Tk(`(${n})$`,s).test(t)}));return-1!==c?i.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[c]:void 0}function KU(e,t,n){var r,i;const o=e.getCompilerOptions();if(cV(t)){const r=uV(e,t),i=lV(r)?r.file.text.substring(r.pos,r.end):`"${r.text}"`;let o;switch(xn.assert(lV(r)||3===t.kind,"Only synthetic references are imports"),t.kind){case 3:o=lV(r)?r.packageId?va.Imported_via_0_from_file_1_with_packageId_2:va.Imported_via_0_from_file_1:r.text===G_?r.packageId?va.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:va.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:r.packageId?va.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:va.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions;break;case 4:xn.assert(!r.packageId),o=va.Referenced_via_0_from_file_1;break;case 5:o=r.packageId?va.Type_library_referenced_via_0_from_file_1_with_packageId_2:va.Type_library_referenced_via_0_from_file_1;break;case 7:xn.assert(!r.packageId),o=va.Library_referenced_via_0_from_file_1;break;default:xn.assertNever(t)}return uS(void 0,o,i,WU(r.file,n),r.packageId&&yd(r.packageId))}switch(t.kind){case 0:if(!(null==(r=o.configFile)?void 0:r.configFileSpecs))return uS(void 0,va.Root_file_specified_for_compilation);const a=Go(e.getRootFileNames()[t.index],e.getCurrentDirectory());if(VU(e,a))return uS(void 0,va.Part_of_files_list_in_tsconfig_json);const s=UU(e,a);return st(s)?uS(void 0,va.Matched_by_include_pattern_0_in_1,s,WU(o.configFile,n)):uS(void 0,s?va.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:va.Root_file_specified_for_compilation);case 1:case 2:const c=2===t.kind,l=xn.checkDefined(null==(i=e.getResolvedProjectReferences())?void 0:i[t.index]);return uS(void 0,o.outFile?c?va.Output_from_referenced_project_0_included_because_1_specified:va.Source_from_referenced_project_0_included_because_1_specified:c?va.Output_from_referenced_project_0_included_because_module_is_specified_as_none:va.Source_from_referenced_project_0_included_because_module_is_specified_as_none,WU(l.sourceFile.fileName,n),o.outFile?"--outFile":"--out");case 8:return uS(void 0,...o.types?t.packageId?[va.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1,t.typeReference,yd(t.packageId)]:[va.Entry_point_of_type_library_0_specified_in_compilerOptions,t.typeReference]:t.packageId?[va.Entry_point_for_implicit_type_library_0_with_packageId_1,t.typeReference,yd(t.packageId)]:[va.Entry_point_for_implicit_type_library_0,t.typeReference]);case 6:{if(void 0!==t.index)return uS(void 0,va.Library_0_specified_in_compilerOptions,o.lib[t.index]);const e=HS(wS(o));return uS(void 0,...e?[va.Default_library_for_target_0,e]:[va.Default_library])}default:xn.assertNever(t)}}function WU(e,t){const n=st(e)?e:e.fileName;return t?t(n):n}function HU(e,t,n,r,i,o,a,s){const c=!!e.getCompilerOptions().listFilesOnly,l=e.getConfigFileParsingDiagnostics().slice(),_=l.length;pe(l,e.getSyntacticDiagnostics(void 0,o)),l.length===_&&(pe(l,e.getOptionsDiagnostics(o)),c||(pe(l,e.getGlobalDiagnostics(o)),l.length===_&&pe(l,e.getSemanticDiagnostics(void 0,o))));const d=c?{emitSkipped:!0,diagnostics:u}:e.emit(void 0,i,o,a,s),{emittedFiles:p,diagnostics:m}=d;pe(l,m);const g=Ms(l);if(g.forEach(t),n){const t=e.getCurrentDirectory();f(p,(e=>{const r=Go(e,t);n(`TSFILE: ${r}`)})),zU(e,n)}return r&&r(MU(g),LU(g)),{emitResult:d,diagnostics:g}}function GU(e,t,n,r,i,o,a,s){const{emitResult:c,diagnostics:l}=HU(e,t,n,r,i,o,a,s);return c.emitSkipped&&l.length>0?1:l.length>0?2:0}var XU={close:_t},QU=()=>XU;function YU(e=vo,t){return{onWatchStatusChange:t||IU(e),watchFile:Ze(e,e.watchFile)||QU,watchDirectory:Ze(e,e.watchDirectory)||QU,setTimeout:Ze(e,e.setTimeout)||_t,clearTimeout:Ze(e,e.clearTimeout)||_t}}var ZU={ConfigFile:"Config file",ExtendedConfigFile:"Extended config file",SourceFile:"Source file",MissingFile:"Missing file",WildcardDirectory:"Wild card directory",FailedLookupLocations:"Failed Lookup Locations",AffectingFileLocation:"File location affecting resolution",TypeRoots:"Type roots",ConfigFileOfReferencedProject:"Config file of referened project",ExtendedConfigOfReferencedProject:"Extended config file of referenced project",WildcardDirectoryOfReferencedProject:"Wild card directory of referenced project",PackageJson:"package.json file",ClosedScriptInfo:"Closed Script info",ConfigFileForInferredRoot:"Config file for the inferred project root",NodeModules:"node_modules for closed script infos and package.jsons affecting module specifier cache",MissingSourceMapFile:"Missing source map file",NoopConfigFileForInferredRoot:"Noop Config file for the inferred project root",MissingGeneratedFile:"Missing generated file",NodeModulesForModuleSpecifierCache:"node_modules for module specifier cache invalidation",TypingInstallerLocationFile:"File location for typing installer",TypingInstallerLocationDirectory:"Directory location for typing installer"};function eK(e,t){const n=e.trace?t.extendedDiagnostics?2:t.diagnostics?1:0:0,r=0!==n?t=>e.trace(t):_t,i=hq(e,n,r);return i.writeLog=r,i}function tK(e,t,n=e){const r=e.useCaseSensitiveFileNames(),i={getSourceFile:Tq(((t,n)=>n?e.readFile(t,n):i.readFile(t)),void 0),getDefaultLibLocation:Ze(e,e.getDefaultLibLocation),getDefaultLibFileName:t=>e.getDefaultLibFileName(t),writeFile:Cq(((t,n,r)=>e.writeFile(t,n,r)),(t=>e.createDirectory(t)),(t=>e.directoryExists(t))),getCurrentDirectory:bt((()=>e.getCurrentDirectory())),useCaseSensitiveFileNames:()=>r,getCanonicalFileName:tn(r),getNewLine:()=>$b(t()),fileExists:t=>e.fileExists(t),readFile:t=>e.readFile(t),trace:Ze(e,e.trace),directoryExists:Ze(n,n.directoryExists),getDirectories:Ze(n,n.getDirectories),realpath:Ze(e,e.realpath),getEnvironmentVariable:Ze(e,e.getEnvironmentVariable)||(()=>""),createHash:Ze(e,e.createHash),readDirectory:Ze(e,e.readDirectory),storeSignatureInfo:e.storeSignatureInfo,jsDocParsingMode:e.jsDocParsingMode};return i}function nK(e,t){if(t.match(rJ)){let e=t.length,n=e;for(let r=e-1;r>=0;r--){const i=t.charCodeAt(r);switch(i){case 10:r&&13===t.charCodeAt(r-1)&&r--;case 13:break;default:if(i<127||!Za(i)){n=r;continue}}const o=t.substring(n,e);if(o.match(iJ)){t=t.substring(0,n);break}if(!o.match(oJ))break;e=n}}return(e.createHash||Hi)(t)}function rK(e){const t=e.getSourceFile;e.getSourceFile=(...n)=>{const r=t.call(e,...n);return r&&(r.version=nK(e,r.text)),r}}function iK(e,t){const n=bt((()=>Ro(Xo(e.getExecutingFilePath()))));return{useCaseSensitiveFileNames:()=>e.useCaseSensitiveFileNames,getNewLine:()=>e.newLine,getCurrentDirectory:bt((()=>e.getCurrentDirectory())),getDefaultLibLocation:n,getDefaultLibFileName:e=>Ko(n(),Ls(e)),fileExists:t=>e.fileExists(t),readFile:(t,n)=>e.readFile(t,n),directoryExists:t=>e.directoryExists(t),getDirectories:t=>e.getDirectories(t),readDirectory:(t,n,r,i,o)=>e.readDirectory(t,n,r,i,o),realpath:Ze(e,e.realpath),getEnvironmentVariable:Ze(e,e.getEnvironmentVariable),trace:t=>e.write(t+e.newLine),createDirectory:t=>e.createDirectory(t),writeFile:(t,n,r)=>e.writeFile(t,n,r),createHash:Ze(e,e.createHash),createProgram:t||lU,storeSignatureInfo:e.storeSignatureInfo,now:Ze(e,e.now)}}function oK(e=vo,t,n,r){const i=t=>e.write(t+e.newLine),o=iK(e,t);return Ye(o,YU(e,r)),o.afterProgramCreate=e=>{const t=e.getCompilerOptions(),r=$b(t);HU(e,n,i,(e=>o.onWatchStatusChange(cS(jU(e),e),r,t,e)))},o}function aK(e,t,n){t(n),e.exit(1)}function sK({configFileName:e,optionsToExtend:t,watchOptionsToExtend:n,extraFileExtensions:r,system:i,createProgram:o,reportDiagnostic:a,reportWatchStatus:s}){const c=a||PU(i),l=oK(i,o,c,s);return l.onUnRecoverableConfigFileDiagnostic=e=>aK(i,c,e),l.configFileName=e,l.optionsToExtend=t,l.watchOptionsToExtend=n,l.extraFileExtensions=r,l}function cK({rootFiles:e,options:t,watchOptions:n,projectReferences:r,system:i,createProgram:o,reportDiagnostic:a,reportWatchStatus:s}){const c=oK(i,o,a||PU(i),s);return c.rootFiles=e,c.options=t,c.watchOptions=n,c.projectReferences=r,c}function lK(e){const t=e.system||vo,n=e.host||(e.host=_K(e.options,t)),r=dK(e),i=GU(r,e.reportDiagnostic||PU(t),(e=>n.trace&&n.trace(e)),e.reportErrorSummary||e.options.pretty?(e,r)=>t.write(BU(e,r,t.newLine,n)):void 0);return e.afterProgramEmitAndDiagnostics&&e.afterProgramEmitAndDiagnostics(r),i}function uK(e,t){const n=P$(e);if(!n)return;let r;if(t.getBuildInfo)r=t.getBuildInfo(n,e.configFilePath);else{const e=t.readFile(n);if(!e)return;r=Q$(n,e)}return r&&r.version===c&&r.program?oU(r,n,t):void 0}function _K(e,t=vo){const n=wq(e,void 0,t);return n.createHash=Ze(t,t.createHash),n.storeSignatureInfo=t.storeSignatureInfo,rK(n),Dq(n,(e=>Yo(e,n.getCurrentDirectory(),n.getCanonicalFileName))),n}function dK({rootNames:e,options:t,configFileParsingDiagnostics:n,projectReferences:r,host:i,createProgram:o}){return(o=o||lU)(e,t,i=i||_K(t),uK(t,i),n,r)}function pK(e,t,n,r,i,o,a,s){return ot(e)?cK({rootFiles:e,options:t,watchOptions:s,projectReferences:a,system:n,createProgram:r,reportDiagnostic:i,reportWatchStatus:o}):sK({configFileName:e,optionsToExtend:t,watchOptionsToExtend:a,extraFileExtensions:s,system:n,createProgram:r,reportDiagnostic:i,reportWatchStatus:o})}function fK(e){let t,n,r,i,o,a,s,c,l=e.extendedConfigCache,u=!1;const _=new Map;let d,p=!1;const f=e.useCaseSensitiveFileNames(),m=e.getCurrentDirectory(),{configFileName:g,optionsToExtend:h={},watchOptionsToExtend:y,extraFileExtensions:v,createProgram:b}=e;let x,S,{rootFiles:k,options:T,watchOptions:C,projectReferences:w}=e,D=!1,E=!1;const P=void 0===g?void 0:sq(e,m,f),N=P||e,F=bV(e,N);let A=H();g&&e.configFileParsingResult&&(se(e.configFileParsingResult),A=H()),Z(va.Starting_compilation_in_watch_mode),g&&!e.configFileParsingResult&&(A=$b(h),xn.assert(!k),ae(),A=H()),xn.assert(T),xn.assert(k);const{watchFile:I,watchDirectory:O,writeLog:M}=eK(e,T),L=tn(f);let j;M(`Current directory: ${m} CaseSensitiveFileNames: ${f}`),g&&(j=I(g,(function(){xn.assert(!!g),n=2,re()}),2e3,C,ZU.ConfigFile));const R=tK(e,(()=>T),N);rK(R);const B=R.getSourceFile;R.getSourceFile=(e,...t)=>Q(e,G(e),...t),R.getSourceFileByPath=Q,R.getNewLine=()=>A,R.fileExists=function(e){const t=G(e);return!X(_.get(t))&&N.fileExists(e)},R.onReleaseOldSourceFile=function(e,t,n){const r=_.get(e.resolvedPath);void 0!==r&&(X(r)?(d||(d=[])).push(e.path):r.sourceFile===e&&(r.fileWatcher&&r.fileWatcher.close(),_.delete(e.resolvedPath),n||J.removeResolutionsOfFile(e.path)))},R.onReleaseParsedCommandLine=function(e){var t;const n=G(e),r=null==s?void 0:s.get(n);r&&(s.delete(n),r.watchedDirectories&&xx(r.watchedDirectories,vq),null==(t=r.watcher)||t.close(),uq(n,c))},R.toPath=G,R.getCompilationSettings=()=>T,R.useSourceOfProjectReferenceRedirect=Ze(e,e.useSourceOfProjectReferenceRedirect),R.watchDirectoryOfFailedLookupLocation=(e,t,n)=>O(e,t,n,C,ZU.FailedLookupLocations),R.watchAffectingFileLocation=(e,t)=>I(e,t,2e3,C,ZU.AffectingFileLocation),R.watchTypeRootsDirectory=(e,t,n)=>O(e,t,n,C,ZU.TypeRoots),R.getCachedDirectoryStructureHost=()=>P,R.scheduleInvalidateResolutionsOfFailedLookupLocations=function(){if(!e.setTimeout||!e.clearTimeout)return J.invalidateResolutionsOfFailedLookupLocations();const t=te();M("Scheduling invalidateFailedLookup"+(t?", Cancelled earlier one":"")),a=e.setTimeout(ne,250,"timerToInvalidateFailedLookupResolutions")},R.onInvalidatedResolution=re,R.onChangedAutomaticTypeDirectiveNames=re,R.fileIsOpen=dt,R.getCurrentProgram=K,R.writeLog=M,R.getParsedCommandLine=ce;const J=wU(R,g?Ro(Go(g,m)):m,!1);R.resolveModuleNameLiterals=Ze(e,e.resolveModuleNameLiterals),R.resolveModuleNames=Ze(e,e.resolveModuleNames),R.resolveModuleNameLiterals||R.resolveModuleNames||(R.resolveModuleNameLiterals=J.resolveModuleNameLiterals.bind(J)),R.resolveTypeReferenceDirectiveReferences=Ze(e,e.resolveTypeReferenceDirectiveReferences),R.resolveTypeReferenceDirectives=Ze(e,e.resolveTypeReferenceDirectives),R.resolveTypeReferenceDirectiveReferences||R.resolveTypeReferenceDirectives||(R.resolveTypeReferenceDirectiveReferences=J.resolveTypeReferenceDirectiveReferences.bind(J)),R.resolveLibrary=e.resolveLibrary?e.resolveLibrary.bind(e):J.resolveLibrary.bind(J),R.getModuleResolutionCache=e.resolveModuleNameLiterals||e.resolveModuleNames?Ze(e,e.getModuleResolutionCache):()=>J.getModuleResolutionCache();const z=e.resolveModuleNameLiterals||e.resolveTypeReferenceDirectiveReferences||e.resolveModuleNames||e.resolveTypeReferenceDirectives?Ze(e,e.hasInvalidatedResolutions)||pt:dt,$=e.resolveLibrary?Ze(e,e.hasInvalidatedLibResolutions)||pt:dt;return t=uK(T,R),W(),fe(),g&&ge(G(g),T,C,ZU.ExtendedConfigFile),g?{getCurrentProgram:U,getProgram:oe,close:q,getResolutionCache:V}:{getCurrentProgram:U,getProgram:oe,updateRootFileNames:function(e){xn.assert(!g,"Cannot update root file names with config file watch mode"),k=e,re()},close:q,getResolutionCache:V};function q(){te(),J.clear(),xx(_,(e=>{e&&e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)})),j&&(j.close(),j=void 0),null==l||l.clear(),l=void 0,c&&(xx(c,vq),c=void 0),i&&(xx(i,vq),i=void 0),r&&(xx(r,dx),r=void 0),s&&(xx(s,(e=>{var t;null==(t=e.watcher)||t.close(),e.watcher=void 0,e.watchedDirectories&&xx(e.watchedDirectories,vq),e.watchedDirectories=void 0})),s=void 0),t=void 0}function V(){return J}function U(){return t}function K(){return t&&t.getProgramOrUndefined()}function W(){M("Synchronizing program"),xn.assert(T),xn.assert(k),te();const n=U();p&&(A=H(),n&&id(n.getCompilerOptions(),T)&&J.onChangesAffectModuleResolution());const{hasInvalidatedResolutions:i,hasInvalidatedLibResolutions:o}=J.createHasInvalidatedResolutions(z,$),{originalReadFile:a,originalFileExists:s,originalDirectoryExists:c,originalCreateDirectory:l,originalWriteFile:f,readFileWithCache:m}=Dq(R,G);return _V(K(),k,T,(e=>function(e,t){const n=_.get(e);if(!n)return;if(n.version)return n.version;const r=t(e);return void 0!==r?nK(R,r):void 0}(e,m)),(e=>R.fileExists(e)),i,o,ee,ce,w)?E&&(u&&Z(va.File_change_detected_Starting_incremental_compilation),t=b(void 0,void 0,R,t,S,w),E=!1):(u&&Z(va.File_change_detected_Starting_incremental_compilation),function(e,n){M("CreatingProgramWith::"),M(` roots: ${JSON.stringify(k)}`),M(` options: ${JSON.stringify(T)}`),w&&M(` projectReferences: ${JSON.stringify(w)}`);const i=p||!K();p=!1,E=!1,J.startCachingPerDirectoryResolution(),R.hasInvalidatedResolutions=e,R.hasInvalidatedLibResolutions=n,R.hasChangedAutomaticTypeDirectiveNames=ee;const o=K();if(t=b(k,T,R,t,S,w),J.finishCachingPerDirectoryResolution(t.getProgram(),o),dq(t.getProgram(),r||(r=new Map),de),i&&J.updateTypeRootsWatch(),d){for(const e of d)r.has(e)||_.delete(e);d=void 0}}(i,o)),u=!1,e.afterProgramCreate&&n!==t&&e.afterProgramCreate(t),R.readFile=a,R.fileExists=s,R.directoryExists=c,R.createDirectory=l,R.writeFile=f,t}function H(){return $b(T||h)}function G(e){return Yo(e,m,L)}function X(e){return"boolean"==typeof e}function Q(e,t,n,r,i){const o=_.get(t);if(X(o))return;const a="object"==typeof n?n.impliedNodeFormat:void 0;if(void 0===o||i||function(e){return"boolean"==typeof e.version}(o)||o.sourceFile.impliedNodeFormat!==a){const i=B(e,n,r);if(o)i?(o.sourceFile=i,o.version=i.version,o.fileWatcher||(o.fileWatcher=le(t,e,ue,250,C,ZU.SourceFile))):(o.fileWatcher&&o.fileWatcher.close(),_.set(t,!1));else if(i){const n=le(t,e,ue,250,C,ZU.SourceFile);_.set(t,{sourceFile:i,version:i.version,fileWatcher:n})}else _.set(t,!1);return i}return o.sourceFile}function Y(e){const t=_.get(e);void 0!==t&&(X(t)?_.set(e,{version:!1}):t.version=!1)}function Z(t){e.onWatchStatusChange&&e.onWatchStatusChange(cS(t),A,T||h)}function ee(){return J.hasChangedAutomaticTypeDirectiveNames()}function te(){return!!a&&(e.clearTimeout(a),a=void 0,!0)}function ne(){a=void 0,J.invalidateResolutionsOfFailedLookupLocations()&&re()}function re(){e.setTimeout&&e.clearTimeout&&(o&&e.clearTimeout(o),M("Scheduling update"),o=e.setTimeout(ie,250,"timerToUpdateProgram"))}function ie(){o=void 0,u=!0,oe()}function oe(){var e,t,r,i;switch(n){case 1:null==(e=tr)||e.logStartUpdateProgram("PartialConfigReload"),M("Reloading new file names and options"),xn.assert(T),xn.assert(g),n=0,k=xL(T.configFile.configFileSpecs,Go(Ro(g),m),T,F,v),nL(k,Go(g,m),T.configFile.configFileSpecs,S,D)&&(E=!0),W();break;case 2:null==(t=tr)||t.logStartUpdateProgram("FullConfigReload"),xn.assert(g),M(`Reloading config file: ${g}`),n=0,P&&P.clearCache(),ae(),p=!0,W(),fe(),ge(G(g),T,C,ZU.ExtendedConfigFile);break;default:null==(r=tr)||r.logStartUpdateProgram("SynchronizeProgram"),W()}return null==(i=tr)||i.logStopUpdateProgram("Done"),U()}function ae(){xn.assert(g),se(tM(g,h,F,l||(l=new Map),y,v))}function se(e){k=e.fileNames,T=e.options,C=e.watchOptions,w=e.projectReferences,x=e.wildcardDirectories,S=dV(e).slice(),D=tL(e.raw),E=!0}function ce(t){const n=G(t);let r=null==s?void 0:s.get(n);if(r){if(!r.updateLevel)return r.parsedCommandLine;if(r.parsedCommandLine&&1===r.updateLevel&&!e.getParsedCommandLine){M("Reloading new file names and options"),xn.assert(T);const e=xL(r.parsedCommandLine.options.configFile.configFileSpecs,Go(Ro(t),m),T,F);return r.parsedCommandLine={...r.parsedCommandLine,fileNames:e},r.updateLevel=void 0,r.parsedCommandLine}}M(`Loading config file: ${t}`);const i=e.getParsedCommandLine?e.getParsedCommandLine(t):function(e){const t=F.onUnRecoverableConfigFileDiagnostic;F.onUnRecoverableConfigFileDiagnostic=_t;const n=tM(e,void 0,F,l||(l=new Map),y);return F.onUnRecoverableConfigFileDiagnostic=t,n}(t);return r?(r.parsedCommandLine=i,r.updateLevel=void 0):(s||(s=new Map)).set(n,r={parsedCommandLine:i}),function(e,t,n){var r,i,o,a;n.watcher||(n.watcher=I(e,((n,r)=>{_e(e,t,r);const i=null==s?void 0:s.get(t);i&&(i.updateLevel=2),J.removeResolutionsFromProjectReferenceRedirects(t),re()}),2e3,(null==(r=n.parsedCommandLine)?void 0:r.watchOptions)||C,ZU.ConfigFileOfReferencedProject)),pq(n.watchedDirectories||(n.watchedDirectories=new Map),null==(i=n.parsedCommandLine)?void 0:i.wildcardDirectories,((r,i)=>{var o;return O(r,(n=>{const i=G(n);P&&P.addOrDeleteFileOrDirectory(n,i),Y(i);const o=null==s?void 0:s.get(t);(null==o?void 0:o.parsedCommandLine)&&(fq({watchedDirPath:G(r),fileOrDirectory:n,fileOrDirectoryPath:i,configFileName:e,options:o.parsedCommandLine.options,program:o.parsedCommandLine.fileNames,currentDirectory:m,useCaseSensitiveFileNames:f,writeLog:M,toPath:G})||2!==o.updateLevel&&(o.updateLevel=1,re()))}),i,(null==(o=n.parsedCommandLine)?void 0:o.watchOptions)||C,ZU.WildcardDirectoryOfReferencedProject)})),ge(t,null==(o=n.parsedCommandLine)?void 0:o.options,(null==(a=n.parsedCommandLine)?void 0:a.watchOptions)||C,ZU.ExtendedConfigOfReferencedProject)}(t,n,r),i}function le(e,t,n,r,i,o){return I(t,((t,r)=>n(t,r,e)),r,i,o)}function ue(e,t,n){_e(e,n,t),2===t&&_.has(n)&&J.invalidateResolutionOfFile(n),Y(n),re()}function _e(e,t,n){P&&P.addOrDeleteFile(e,t,n)}function de(e,t){return(null==s?void 0:s.has(e))?XU:le(e,t,pe,500,C,ZU.MissingFile)}function pe(e,t,n){_e(e,n,t),0===t&&r.has(n)&&(r.get(n).close(),r.delete(n),Y(n),re())}function fe(){pq(i||(i=new Map),x,me)}function me(e,t){return O(e,(t=>{xn.assert(g),xn.assert(T);const r=G(t);P&&P.addOrDeleteFileOrDirectory(t,r),Y(r),fq({watchedDirPath:G(e),fileOrDirectory:t,fileOrDirectoryPath:r,configFileName:g,extraFileExtensions:v,options:T,program:U()||k,currentDirectory:m,useCaseSensitiveFileNames:f,writeLog:M,toPath:G})||2!==n&&(n=1,re())}),t,C,ZU.WildcardDirectory)}function ge(e,t,r,i){lq(e,t,c||(c=new Map),((e,t)=>I(e,((r,i)=>{var o;_e(e,t,i),l&&_q(l,t,G);const a=null==(o=c.get(t))?void 0:o.projects;(null==a?void 0:a.size)&&a.forEach((e=>{if(g&&G(g)===e)n=2;else{const t=null==s?void 0:s.get(e);t&&(t.updateLevel=2),J.removeResolutionsFromProjectReferenceRedirects(e)}re()}))}),2e3,r,i)),G)}}var mK=(e=>(e[e.Unbuildable=0]="Unbuildable",e[e.UpToDate=1]="UpToDate",e[e.UpToDateWithUpstreamTypes=2]="UpToDateWithUpstreamTypes",e[e.OutputMissing=3]="OutputMissing",e[e.ErrorReadingFile=4]="ErrorReadingFile",e[e.OutOfDateWithSelf=5]="OutOfDateWithSelf",e[e.OutOfDateWithUpstream=6]="OutOfDateWithUpstream",e[e.OutOfDateBuildInfo=7]="OutOfDateBuildInfo",e[e.OutOfDateOptions=8]="OutOfDateOptions",e[e.OutOfDateRoots=9]="OutOfDateRoots",e[e.UpstreamOutOfDate=10]="UpstreamOutOfDate",e[e.UpstreamBlocked=11]="UpstreamBlocked",e[e.ComputingUpstream=12]="ComputingUpstream",e[e.TsVersionOutputOfDate=13]="TsVersionOutputOfDate",e[e.UpToDateWithInputFileText=14]="UpToDateWithInputFileText",e[e.ContainerOnly=15]="ContainerOnly",e[e.ForceBuild=16]="ForceBuild",e))(mK||{});function gK(e){return Ao(e,".json")?e:Ko(e,"tsconfig.json")}var hK=new Date(-864e13),yK=new Date(864e13);function vK(e,t){return function(e,t,n){const r=e.get(t);let i;return r||(i=new Map,e.set(t,i)),r||i}(e,t)}function bK(e){return e.now?e.now():new Date}function xK(e){return!!e&&!!e.buildOrder}function SK(e){return xK(e)?e.buildOrder:e}function kK(e,t){return n=>{let r=t?`[${Lq(AU(e),"")}] `:`${AU(e)} - `;r+=`${Jq(n.messageText,e.newLine)}${e.newLine+e.newLine}`,e.write(r)}}function TK(e,t,n,r){const i=iK(e,t);return i.getModifiedTime=e.getModifiedTime?t=>e.getModifiedTime(t):ft,i.setModifiedTime=e.setModifiedTime?(t,n)=>e.setModifiedTime(t,n):_t,i.deleteFile=e.deleteFile?t=>e.deleteFile(t):_t,i.reportDiagnostic=n||PU(e),i.reportSolutionBuilderStatus=r||kK(e),i.now=Ze(e,e.now),i}function CK(e=vo,t,n,r,i){const o=TK(e,t,n,r);return o.reportErrorSummary=i,o}function wK(e=vo,t,n,r,i){const o=TK(e,t,n,r);return Ye(o,YU(e,i)),o}function DK(e,t,n){return SW(!1,e,t,n)}function EK(e,t,n,r){return SW(!0,e,t,n,r)}function PK(e,t){return Yo(t,e.compilerHost.getCurrentDirectory(),e.compilerHost.getCanonicalFileName)}function NK(e,t){const{resolvedConfigFilePaths:n}=e,r=n.get(t);if(void 0!==r)return r;const i=PK(e,t);return n.set(t,i),i}function FK(e){return!!e.options}function AK(e,t){const n=e.configFileCache.get(t);return n&&FK(n)?n:void 0}function IK(e,t,n){const{configFileCache:r}=e,i=r.get(n);if(i)return FK(i)?i:void 0;let o;pr("SolutionBuilder::beforeConfigFileParsing");const{parseConfigFileHost:a,baseCompilerOptions:s,baseWatchOptions:c,extendedConfigCache:l,host:u}=e;let _;return u.getParsedCommandLine?(_=u.getParsedCommandLine(t),_||(o=cS(va.File_0_not_found,t))):(a.onUnRecoverableConfigFileDiagnostic=e=>o=e,_=tM(t,s,a,l,c),a.onUnRecoverableConfigFileDiagnostic=_t),r.set(n,_||o),pr("SolutionBuilder::afterConfigFileParsing"),fr("SolutionBuilder::Config file parsing","SolutionBuilder::beforeConfigFileParsing","SolutionBuilder::afterConfigFileParsing"),_}function OK(e,t){return gK(Wo(e.compilerHost.getCurrentDirectory(),t))}function MK(e,t){const n=new Map,r=new Map,i=[];let o,a;for(const e of t)s(e);return a?{buildOrder:o||u,circularDiagnostics:a}:o||u;function s(t,c){const l=NK(e,t);if(r.has(l))return;if(n.has(l))return void(c||(a||(a=[])).push(cS(va.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0,i.join("\r\n"))));n.set(l,!0),i.push(t);const u=IK(e,t,l);if(u&&u.projectReferences)for(const t of u.projectReferences)s(OK(e,t.path),c||t.circular);i.pop(),r.set(l,!0),(o||(o=[])).push(t)}}function LK(e){return e.buildOrder||function(e){const t=MK(e,e.rootNames.map((t=>OK(e,t))));e.resolvedConfigFilePaths.clear();const n=new Set(SK(t).map((t=>NK(e,t)))),r={onDeleteValue:_t};return Sx(e.configFileCache,n,r),Sx(e.projectStatus,n,r),Sx(e.builderPrograms,n,r),Sx(e.diagnostics,n,r),Sx(e.projectPendingBuild,n,r),Sx(e.projectErrorsReported,n,r),Sx(e.buildInfoCache,n,r),Sx(e.outputTimeStamps,n,r),Sx(e.lastCachedPackageJsonLookups,n,r),e.watch&&(Sx(e.allWatchedConfigFiles,n,{onDeleteValue:dx}),e.allWatchedExtendedConfigFiles.forEach((e=>{e.projects.forEach((t=>{n.has(t)||e.projects.delete(t)})),e.close()})),Sx(e.allWatchedWildcardDirectories,n,{onDeleteValue:e=>e.forEach(vq)}),Sx(e.allWatchedInputFiles,n,{onDeleteValue:e=>e.forEach(dx)}),Sx(e.allWatchedPackageJsonFiles,n,{onDeleteValue:e=>e.forEach(dx)})),e.buildOrder=t}(e)}function jK(e,t,n){const r=t&&OK(e,t),i=LK(e);if(xK(i))return i;if(r){const t=NK(e,r);if(-1===T(i,(n=>NK(e,n)===t)))return}const o=r?MK(e,[r]):i;return xn.assert(!xK(o)),xn.assert(!n||void 0!==r),xn.assert(!n||o[o.length-1]===r),n?o.slice(0,o.length-1):o}function RK(e){e.cache&&BK(e);const{compilerHost:t,host:n}=e,r=e.readFileWithCache,i=t.getSourceFile,{originalReadFile:o,originalFileExists:a,originalDirectoryExists:s,originalCreateDirectory:c,originalWriteFile:l,getSourceFileWithCache:u,readFileWithCache:_}=Dq(n,(t=>PK(e,t)),((...e)=>i.call(t,...e)));e.readFileWithCache=_,t.getSourceFile=u,e.cache={originalReadFile:o,originalFileExists:a,originalDirectoryExists:s,originalCreateDirectory:c,originalWriteFile:l,originalReadFileWithCache:r,originalGetSourceFile:i}}function BK(e){if(!e.cache)return;const{cache:t,host:n,compilerHost:r,extendedConfigCache:i,moduleResolutionCache:o,typeReferenceDirectiveResolutionCache:a,libraryResolutionCache:s}=e;n.readFile=t.originalReadFile,n.fileExists=t.originalFileExists,n.directoryExists=t.originalDirectoryExists,n.createDirectory=t.originalCreateDirectory,n.writeFile=t.originalWriteFile,r.getSourceFile=t.originalGetSourceFile,e.readFileWithCache=t.originalReadFileWithCache,i.clear(),null==o||o.clear(),null==a||a.clear(),null==s||s.clear(),e.cache=void 0}function JK(e,t){e.projectStatus.delete(t),e.diagnostics.delete(t)}function zK({projectPendingBuild:e},t,n){const r=e.get(t);(void 0===r||re.projectPendingBuild.set(NK(e,t),0))),t&&t.throwIfCancellationRequested())}var qK=(e=>(e[e.Build=0]="Build",e[e.UpdateOutputFileStamps=1]="UpdateOutputFileStamps",e))(qK||{});function VK(e,t){return e.projectPendingBuild.delete(t),e.diagnostics.has(t)?1:0}function UK(e,t,n){if(!e.projectPendingBuild.size)return;if(xK(t))return;const{options:r,projectPendingBuild:i}=e;for(let o=0;oi.options,getCurrentDirectory:()=>e.compilerHost.getCurrentDirectory(),getBuilderProgram:()=>l(mt),getProgram:()=>l((e=>e.getProgramOrUndefined())),getSourceFile:e=>l((t=>t.getSourceFile(e))),getSourceFiles:()=>_((e=>e.getSourceFiles())),getOptionsDiagnostics:e=>_((t=>t.getOptionsDiagnostics(e))),getGlobalDiagnostics:e=>_((t=>t.getGlobalDiagnostics(e))),getConfigFileParsingDiagnostics:()=>_((e=>e.getConfigFileParsingDiagnostics())),getSyntacticDiagnostics:(e,t)=>_((n=>n.getSyntacticDiagnostics(e,t))),getAllDependencies:e=>_((t=>t.getAllDependencies(e))),getSemanticDiagnostics:(e,t)=>_((n=>n.getSemanticDiagnostics(e,t))),getSemanticDiagnosticsOfNextAffectedFile:(e,t)=>l((n=>n.getSemanticDiagnosticsOfNextAffectedFile&&n.getSemanticDiagnosticsOfNextAffectedFile(e,t))),emit:(n,r,i,o,a)=>n||o?l((s=>{var c,l;return s.emit(n,r,i,o,a||(null==(l=(c=e.host).getCustomTransformers)?void 0:l.call(c,t)))})):(y(2,i),4===c?h(r,i):3===c?g(r,i,a):void 0),done:function(t,r,i){return y(6,t,r,i),pr("SolutionBuilder::Projects built"),VK(e,n)}};function l(e){return y(0),a&&e(a)}function _(e){return l(e)||u}function d(){var r,o,l;if(xn.assert(void 0===a),e.options.dry)return TW(e,va.A_non_dry_build_would_build_project_0,t),s=1,void(c=5);if(e.options.verbose&&TW(e,va.Building_project_0,t),0===i.fileNames.length)return DW(e,n,dV(i)),s=0,void(c=5);const{host:u,compilerHost:_}=e;if(e.projectCompilerOptions=i.options,null==(r=e.moduleResolutionCache)||r.update(i.options),null==(o=e.typeReferenceDirectiveResolutionCache)||o.update(i.options),a=u.createProgram(i.fileNames,i.options,_,function({options:e,builderPrograms:t,compilerHost:n},r,i){if(!e.force)return t.get(r)||uK(i.options,n)}(e,n,i),dV(i),i.projectReferences),e.watch){const t=null==(l=e.moduleResolutionCache)?void 0:l.getPackageJsonInfoCache().getInternalMap();e.lastCachedPackageJsonLookups.set(n,t&&new Set($e(t.values(),(t=>e.host.realpath&&(aj(t)||t.directoryExists)?e.host.realpath(Ko(t.packageDirectory,"package.json")):Ko(t.packageDirectory,"package.json"))))),e.builderPrograms.set(n,a)}c++}function p(t,r,i){t.length?({buildResult:s,step:c}=XK(e,n,a,0,t,r,i)):c++}function f(e){xn.assertIsDefined(a),p([...a.getConfigFileParsingDiagnostics(),...a.getOptionsDiagnostics(e),...a.getGlobalDiagnostics(e),...a.getSyntacticDiagnostics(void 0,e)],8,"Syntactic")}function m(e){p(xn.checkDefined(a).getSemanticDiagnostics(void 0,e),16,"Semantic")}function g(r,o,l){var u,_,d;xn.assertIsDefined(a),xn.assert(3===c);const p=a.saveEmitState();let f;const m=[],{emitResult:g}=HU(a,(e=>(f||(f=[])).push(e)),void 0,void 0,((e,t,n,r,i,o)=>m.push({name:e,text:t,writeByteOrderMark:n,data:o})),o,!1,l||(null==(_=(u=e.host).getCustomTransformers)?void 0:_.call(u,t)));if(f)return a.restoreEmitState(p),({buildResult:s,step:c}=XK(e,n,a,0,f,32,"Declaration file")),{emitSkipped:!0,diagnostics:g.diagnostics};const{host:h,compilerHost:y}=e,v=(null==(d=a.hasChangedEmitSignature)?void 0:d.call(a))?0:2,b=by(),x=new Map,S=a.getCompilerOptions(),k=RS(S);let T,C;return m.forEach((({name:t,text:i,writeByteOrderMark:o,data:a})=>{const s=PK(e,t);x.set(PK(e,t),t),(null==a?void 0:a.buildInfo)&&tW(e,a.buildInfo,n,S,v);const c=(null==a?void 0:a.differsOnlyInMap)?Zi(e.host,t):void 0;cv(r?{writeFile:r}:y,b,t,i,o),(null==a?void 0:a.differsOnlyInMap)?e.host.setModifiedTime(t,c):!k&&e.watch&&(T||(T=eW(e,n))).set(s,C||(C=bK(e.host)))})),function(t,r,o,l){const u=t.getDiagnostics();if(u.length)return({buildResult:s,step:c}=XK(e,n,a,0,u,64,"Emit")),u;e.write&&r.forEach((t=>HK(e,i,t))),sW(e,i,n,va.Updating_unchanged_output_timestamps_of_project_0,r),e.diagnostics.delete(n),e.projectStatus.set(n,{type:1,oldestOutputFileName:o}),GK(e,a),c=5,s=l}(b,x,m.length?m[0].name:K$(i,!h.useCaseSensitiveFileNames()),v),g}function h(t,r){xn.assertIsDefined(a),xn.assert(4===c);const o=a.emitBuildInfo(((r,i,o,s,c,l)=>{(null==l?void 0:l.buildInfo)&&tW(e,l.buildInfo,n,a.getCompilerOptions(),2),t?t(r,i,o,s,c,l):e.compilerHost.writeFile(r,i,o,s,c,l)}),r);return o.diagnostics.length&&(wW(e,o.diagnostics),e.diagnostics.set(n,[...e.diagnostics.get(n),...o.diagnostics]),s&=64),o.emittedFiles&&e.write&&o.emittedFiles.forEach((t=>HK(e,i,t))),GK(e,a),c=5,o}function y(a,l,u,_){for(;c<=a&&c<6;){const a=c;switch(c){case 0:d();break;case 1:f(l);break;case 2:m(l);break;case 3:g(u,l,_);break;case 4:h(u,l);break;case 5:uW(e,t,n,r,i,o,xn.checkDefined(s)),c++}xn.assert(c>a)}}}(e,t.project,t.projectPath,t.projectIndex,t.config,n):function(e,t,n,r,i){let o=!0;return{kind:1,project:t,projectPath:n,buildOrder:i,getCompilerOptions:()=>r.options,getCurrentDirectory:()=>e.compilerHost.getCurrentDirectory(),updateOutputFileStatmps:()=>{lW(e,r,n),o=!1},done:()=>(o&&lW(e,r,n),pr("SolutionBuilder::Timestamps only updates"),VK(e,n))}}(e,t.project,t.projectPath,t.config,n)}function WK(e,t,n){const r=UK(e,t,n);return r?KK(e,r,t):r}function HK({write:e},t,n){e&&t.options.listEmittedFiles&&e(`TSFILE: ${n}`)}function GK(e,t){t&&(e.write&&zU(t,e.write),e.host.afterProgramEmitAndDiagnostics&&e.host.afterProgramEmitAndDiagnostics(t),t.releaseProgram()),e.projectCompilerOptions=e.baseCompilerOptions}function XK(e,t,n,r,i,o,a){const s=n&&!n.getCompilerOptions().outFile;return DW(e,t,i),e.projectStatus.set(t,{type:0,reason:`${a} errors`}),s?{buildResult:o,step:4}:(GK(e,n),{buildResult:o,step:5})}function QK(e){return!!e.watcher}function YK(e,t){const n=PK(e,t),r=e.filesWatched.get(n);if(e.watch&&r){if(!QK(r))return r;if(r.modifiedTime)return r.modifiedTime}const i=Zi(e.host,t);return e.watch&&(r?r.modifiedTime=i:e.filesWatched.set(n,i)),i}function ZK(e,t,n,r,i,o,a){const s=PK(e,t),c=e.filesWatched.get(s);if(c&&QK(c))c.callbacks.push(n);else{const l=e.watchFile(t,((t,n,r)=>{const i=xn.checkDefined(e.filesWatched.get(s));xn.assert(QK(i)),i.modifiedTime=r,i.callbacks.forEach((e=>e(t,n,r)))}),r,i,o,a);e.filesWatched.set(s,{callbacks:[n],watcher:l,modifiedTime:c})}return{close:()=>{const t=xn.checkDefined(e.filesWatched.get(s));xn.assert(QK(t)),1===t.callbacks.length?(e.filesWatched.delete(s),vq(t)):en(t.callbacks,n)}}}function eW(e,t){if(!e.watch)return;let n=e.outputTimeStamps.get(t);return n||e.outputTimeStamps.set(t,n=new Map),n}function tW(e,t,n,r,i){const o=P$(r),a=nW(e,o,n),s=bK(e.host);a?(a.buildInfo=t,a.modifiedTime=s,2&i||(a.latestChangedDtsTime=s)):e.buildInfoCache.set(n,{path:PK(e,o),buildInfo:t,modifiedTime:s,latestChangedDtsTime:2&i?void 0:s})}function nW(e,t,n){const r=PK(e,t),i=e.buildInfoCache.get(n);return(null==i?void 0:i.path)===r?i:void 0}function rW(e,t,n,r){const i=PK(e,t),o=e.buildInfoCache.get(n);if(void 0!==o&&o.path===i)return o.buildInfo||void 0;const a=e.readFileWithCache(t),s=a?Q$(t,a):void 0;return e.buildInfoCache.set(n,{path:i,buildInfo:s||!1,modifiedTime:r||Yi}),s}function iW(e,t,n,r){if(nb&&(y=n,b=t),g&&S.add(r)}if(g){h||(h=aU(g,d,_));const e=ld(h.roots,((e,t)=>S.has(t)?void 0:t));if(e)return{type:9,buildInfoFile:d,inputFile:e}}if(!d){const r=V$(t,!_.useCaseSensitiveFileNames()),i=eW(e,n);for(const t of r){const n=PK(e,t);let r=null==i?void 0:i.get(n);if(r||(r=Zi(e.host,t),null==i||i.set(n,r)),r===Yi)return{type:3,missingOutputFileName:t};if(riW(e,t,v,p)));if(w)return w;const D=e.lastCachedPackageJsonLookups.get(n);return D&&ud(D,(t=>iW(e,t,v,p)))||{type:T?2:x?14:1,newestInputFileTime:b,newestInputFileName:y,oldestOutputFileName:p}}(e,t,n);return pr("SolutionBuilder::afterUpToDateCheck"),fr("SolutionBuilder::Up-to-date check","SolutionBuilder::beforeUpToDateCheck","SolutionBuilder::afterUpToDateCheck"),e.projectStatus.set(n,i),i}function sW(e,t,n,r,i){if(t.options.noEmit)return;let o;const a=P$(t.options);if(a)return(null==i?void 0:i.has(PK(e,a)))||(e.options.verbose&&TW(e,r,t.options.configFilePath),e.host.setModifiedTime(a,o=bK(e.host)),nW(e,a,n).modifiedTime=o),void e.outputTimeStamps.delete(n);const{host:s}=e,c=V$(t,!s.useCaseSensitiveFileNames()),l=eW(e,n),u=l?new Set:void 0;if(!i||c.length!==i.size){let n=!!e.options.verbose;for(const a of c){const c=PK(e,a);(null==i?void 0:i.has(c))||(n&&(n=!1,TW(e,r,t.options.configFilePath)),s.setModifiedTime(a,o||(o=bK(e.host))),l&&(l.set(c,o),u.add(c)))}}null==l||l.forEach(((e,t)=>{(null==i?void 0:i.has(t))||u.has(t)||l.delete(t)}))}function cW(e,t,n){if(!t.composite)return;const r=xn.checkDefined(e.buildInfoCache.get(n));if(void 0!==r.latestChangedDtsTime)return r.latestChangedDtsTime||void 0;const i=r.buildInfo&&r.buildInfo.program&&r.buildInfo.program.latestChangedDtsFile?e.host.getModifiedTime(Go(r.buildInfo.program.latestChangedDtsFile,Ro(r.path))):void 0;return r.latestChangedDtsTime=i||!1,i}function lW(e,t,n){if(e.options.dry)return TW(e,va.A_non_dry_build_would_update_timestamps_for_output_of_project_0,t.options.configFilePath);sW(e,t,n,va.Updating_output_timestamps_of_project_0),e.projectStatus.set(n,{type:1,oldestOutputFileName:K$(t,!e.host.useCaseSensitiveFileNames())})}function uW(e,t,n,r,i,o,a){if(!(124&a)&&i.options.composite)for(let i=r+1;ie.diagnostics.has(NK(e,t))))?c?2:1:0}(e,t,n,r,i,o);return pr("SolutionBuilder::afterBuild"),fr("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),a}function dW(e,t,n){pr("SolutionBuilder::beforeClean");const r=function(e,t,n){const r=jK(e,t,n);if(!r)return 3;if(xK(r))return wW(e,r.circularDiagnostics),4;const{options:i,host:o}=e,a=i.dry?[]:void 0;for(const t of r){const n=NK(e,t),r=IK(e,t,n);if(void 0===r){EW(e,n);continue}const i=V$(r,!o.useCaseSensitiveFileNames());if(!i.length)continue;const s=new Set(r.fileNames.map((t=>PK(e,t))));for(const t of i)s.has(PK(e,t))||o.fileExists(t)&&(a?a.push(t):(o.deleteFile(t),pW(e,n,0)))}return a&&TW(e,va.A_non_dry_build_would_delete_the_following_files_Colon_0,a.map((e=>`\r\n * ${e}`)).join("")),0}(e,t,n);return pr("SolutionBuilder::afterClean"),fr("SolutionBuilder::Clean","SolutionBuilder::beforeClean","SolutionBuilder::afterClean"),r}function pW(e,t,n){e.host.getParsedCommandLine&&1===n&&(n=2),2===n&&(e.configFileCache.delete(t),e.buildOrder=void 0),e.needsSummary=!0,JK(e,t),zK(e,t,n),RK(e)}function fW(e,t,n){e.reportFileChangeDetected=!0,pW(e,t,n),mW(e,250,!0)}function mW(e,t,n){const{hostWithWatch:r}=e;r.setTimeout&&r.clearTimeout&&(e.timerToBuildInvalidatedProject&&r.clearTimeout(e.timerToBuildInvalidatedProject),e.timerToBuildInvalidatedProject=r.setTimeout(gW,t,"timerToBuildInvalidatedProject",e,n))}function gW(e,t,n){pr("SolutionBuilder::beforeBuild");const r=function(e,t){e.timerToBuildInvalidatedProject=void 0,e.reportFileChangeDetected&&(e.reportFileChangeDetected=!1,e.projectErrorsReported.clear(),CW(e,va.File_change_detected_Starting_incremental_compilation));let n=0;const r=LK(e),i=WK(e,r,!1);if(i)for(i.done(),n++;e.projectPendingBuild.size;){if(e.timerToBuildInvalidatedProject)return;const i=UK(e,r,!1);if(!i)break;if(1!==i.kind&&(t||5===n))return void mW(e,100,!1);KK(e,i,r).done(),1!==i.kind&&n++}return BK(e),r}(t,n);pr("SolutionBuilder::afterBuild"),fr("SolutionBuilder::Build","SolutionBuilder::beforeBuild","SolutionBuilder::afterBuild"),r&&PW(t,r)}function hW(e,t,n,r){e.watch&&!e.allWatchedConfigFiles.has(n)&&e.allWatchedConfigFiles.set(n,ZK(e,t,(()=>fW(e,n,2)),2e3,null==r?void 0:r.watchOptions,ZU.ConfigFile,t))}function yW(e,t,n){lq(t,null==n?void 0:n.options,e.allWatchedExtendedConfigFiles,((t,r)=>ZK(e,t,(()=>{var t;return null==(t=e.allWatchedExtendedConfigFiles.get(r))?void 0:t.projects.forEach((t=>fW(e,t,2)))}),2e3,null==n?void 0:n.watchOptions,ZU.ExtendedConfigFile)),(t=>PK(e,t)))}function vW(e,t,n,r){e.watch&&pq(vK(e.allWatchedWildcardDirectories,n),r.wildcardDirectories,((i,o)=>e.watchDirectory(i,(o=>{var a;fq({watchedDirPath:PK(e,i),fileOrDirectory:o,fileOrDirectoryPath:PK(e,o),configFileName:t,currentDirectory:e.compilerHost.getCurrentDirectory(),options:r.options,program:e.builderPrograms.get(n)||(null==(a=AK(e,n))?void 0:a.fileNames),useCaseSensitiveFileNames:e.parseConfigFileHost.useCaseSensitiveFileNames,writeLog:t=>e.writeLog(t),toPath:t=>PK(e,t)})||fW(e,n,1)}),o,null==r?void 0:r.watchOptions,ZU.WildcardDirectory,t)))}function bW(e,t,n,r){e.watch&&kx(vK(e.allWatchedInputFiles,n),new Set(r.fileNames),{createNewValue:i=>ZK(e,i,(()=>fW(e,n,0)),250,null==r?void 0:r.watchOptions,ZU.SourceFile,t),onDeleteValue:dx})}function xW(e,t,n,r){e.watch&&e.lastCachedPackageJsonLookups&&kx(vK(e.allWatchedPackageJsonFiles,n),e.lastCachedPackageJsonLookups.get(n),{createNewValue:i=>ZK(e,i,(()=>fW(e,n,0)),2e3,null==r?void 0:r.watchOptions,ZU.PackageJson,t),onDeleteValue:dx})}function SW(e,t,n,r,i){const o=function(e,t,n,r,i){const o=t,a=t,s=function(e){const t={};return gO.forEach((n=>{Le(e,n.name)&&(t[n.name]=e[n.name])})),t}(r),c=tK(o,(()=>m.projectCompilerOptions));let l,u,_;rK(c),c.getParsedCommandLine=e=>IK(m,e,NK(m,e)),c.resolveModuleNameLiterals=Ze(o,o.resolveModuleNameLiterals),c.resolveTypeReferenceDirectiveReferences=Ze(o,o.resolveTypeReferenceDirectiveReferences),c.resolveLibrary=Ze(o,o.resolveLibrary),c.resolveModuleNames=Ze(o,o.resolveModuleNames),c.resolveTypeReferenceDirectives=Ze(o,o.resolveTypeReferenceDirectives),c.getModuleResolutionCache=Ze(o,o.getModuleResolutionCache),c.resolveModuleNameLiterals||c.resolveModuleNames||(l=hj(c.getCurrentDirectory(),c.getCanonicalFileName),c.resolveModuleNameLiterals=(e,t,n,r,i)=>eV(e,t,n,r,i,o,l,Xq),c.getModuleResolutionCache=()=>l),c.resolveTypeReferenceDirectiveReferences||c.resolveTypeReferenceDirectives||(u=yj(c.getCurrentDirectory(),c.getCanonicalFileName,void 0,null==l?void 0:l.getPackageJsonInfoCache(),null==l?void 0:l.optionsToRedirectsKey),c.resolveTypeReferenceDirectiveReferences=(e,t,n,r,i)=>eV(e,t,n,r,i,o,u,Zq)),c.resolveLibrary||(_=hj(c.getCurrentDirectory(),c.getCanonicalFileName,void 0,null==l?void 0:l.getPackageJsonInfoCache()),c.resolveLibrary=(e,t,n)=>bj(e,t,n,o,_)),c.getBuildInfo=(e,t)=>rW(m,e,NK(m,t),void 0);const{watchFile:d,watchDirectory:p,writeLog:f}=eK(a,r),m={host:o,hostWithWatch:a,parseConfigFileHost:bV(o),write:Ze(o,o.trace),options:r,baseCompilerOptions:s,rootNames:n,baseWatchOptions:i,resolvedConfigFilePaths:new Map,configFileCache:new Map,projectStatus:new Map,extendedConfigCache:new Map,buildInfoCache:new Map,outputTimeStamps:new Map,builderPrograms:new Map,diagnostics:new Map,projectPendingBuild:new Map,projectErrorsReported:new Map,compilerHost:c,moduleResolutionCache:l,typeReferenceDirectiveResolutionCache:u,libraryResolutionCache:_,buildOrder:void 0,readFileWithCache:e=>o.readFile(e),projectCompilerOptions:s,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:e,watch:e,allWatchedWildcardDirectories:new Map,allWatchedInputFiles:new Map,allWatchedConfigFiles:new Map,allWatchedExtendedConfigFiles:new Map,allWatchedPackageJsonFiles:new Map,filesWatched:new Map,lastCachedPackageJsonLookups:new Map,timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:d,watchDirectory:p,writeLog:f};return m}(e,t,n,r,i);return{build:(e,t,n,r)=>_W(o,e,t,n,r),clean:e=>dW(o,e),buildReferences:(e,t,n,r)=>_W(o,e,t,n,r,!0),cleanReferences:e=>dW(o,e,!0),getNextInvalidatedProject:e=>($K(o,e),WK(o,LK(o),!1)),getBuildOrder:()=>LK(o),getUpToDateStatusOfProject:e=>{const t=OK(o,e),n=NK(o,t);return aW(o,IK(o,t,n),n)},invalidateProject:(e,t)=>pW(o,e,t||0),close:()=>function(e){xx(e.allWatchedConfigFiles,dx),xx(e.allWatchedExtendedConfigFiles,vq),xx(e.allWatchedWildcardDirectories,(e=>xx(e,vq))),xx(e.allWatchedInputFiles,(e=>xx(e,dx))),xx(e.allWatchedPackageJsonFiles,(e=>xx(e,dx)))}(o)}}function kW(e,t){return pa(t,e.compilerHost.getCurrentDirectory(),e.compilerHost.getCanonicalFileName)}function TW(e,t,...n){e.host.reportSolutionBuilderStatus(cS(t,...n))}function CW(e,t,...n){var r,i;null==(i=(r=e.hostWithWatch).onWatchStatusChange)||i.call(r,cS(t,...n),e.host.getNewLine(),e.baseCompilerOptions)}function wW({host:e},t){t.forEach((t=>e.reportDiagnostic(t)))}function DW(e,t,n){wW(e,n),e.projectErrorsReported.set(t,!0),n.length&&e.diagnostics.set(t,n)}function EW(e,t){DW(e,t,[e.configFileCache.get(t)])}function PW(e,t){if(!e.needsSummary)return;e.needsSummary=!1;const n=e.watch||!!e.host.reportErrorSummary,{diagnostics:r}=e;let i=0,o=[];xK(t)?(NW(e,t.buildOrder),wW(e,t.circularDiagnostics),n&&(i+=MU(t.circularDiagnostics)),n&&(o=[...o,...LU(t.circularDiagnostics)])):(t.forEach((t=>{const n=NK(e,t);e.projectErrorsReported.has(n)||wW(e,r.get(n)||u)})),n&&r.forEach((e=>i+=MU(e))),n&&r.forEach((e=>[...o,...LU(e)]))),e.watch?CW(e,jU(i),i):e.host.reportErrorSummary&&e.host.reportErrorSummary(i,o)}function NW(e,t){e.options.verbose&&TW(e,va.Projects_in_this_build_Colon_0,t.map((t=>"\r\n * "+kW(e,t))).join(""))}function FW(e,t,n){e.options.verbose&&function(e,t,n){switch(n.type){case 5:return TW(e,va.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,kW(e,t),kW(e,n.outOfDateOutputFileName),kW(e,n.newerInputFileName));case 6:return TW(e,va.Project_0_is_out_of_date_because_output_1_is_older_than_input_2,kW(e,t),kW(e,n.outOfDateOutputFileName),kW(e,n.newerProjectName));case 3:return TW(e,va.Project_0_is_out_of_date_because_output_file_1_does_not_exist,kW(e,t),kW(e,n.missingOutputFileName));case 4:return TW(e,va.Project_0_is_out_of_date_because_there_was_error_reading_file_1,kW(e,t),kW(e,n.fileName));case 7:return TW(e,va.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted,kW(e,t),kW(e,n.buildInfoFile));case 8:return TW(e,va.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions,kW(e,t),kW(e,n.buildInfoFile));case 9:return TW(e,va.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more,kW(e,t),kW(e,n.buildInfoFile),kW(e,n.inputFile));case 1:if(void 0!==n.newestInputFileTime)return TW(e,va.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2,kW(e,t),kW(e,n.newestInputFileName||""),kW(e,n.oldestOutputFileName||""));break;case 2:return TW(e,va.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,kW(e,t));case 14:return TW(e,va.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,kW(e,t));case 10:return TW(e,va.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date,kW(e,t),kW(e,n.upstreamProjectName));case 11:return TW(e,n.upstreamProjectBlocked?va.Project_0_can_t_be_built_because_its_dependency_1_was_not_built:va.Project_0_can_t_be_built_because_its_dependency_1_has_errors,kW(e,t),kW(e,n.upstreamProjectName));case 0:return TW(e,va.Failed_to_parse_file_0_Colon_1,kW(e,t),n.reason);case 13:return TW(e,va.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,kW(e,t),n.version,c);case 16:TW(e,va.Project_0_is_being_forcibly_rebuilt,kW(e,t))}}(e,t,n)}var AW=(e=>(e[e.time=0]="time",e[e.count=1]="count",e[e.memory=2]="memory",e))(AW||{});function IW(e,t,n){return MW(e,n)?PU(e,!0):t}function OW(e){return!!e.writeOutputIsTTY&&e.writeOutputIsTTY()&&!e.getEnvironmentVariable("NO_COLOR")}function MW(e,t){return t&&void 0!==t.pretty?t.pretty:OW(e)}function LW(e){return e.options.all?he(bO,((e,t)=>It(e.name,t.name))):F(bO.slice(),(e=>!!e.showInSimplifiedHelpView))}function jW(e){e.write(eM(va.Version_0,c)+e.newLine)}function RW(e){if(!OW(e))return{bold:e=>e,blue:e=>e,blueBackground:e=>e,brightWhite:e=>e};const t=e.getEnvironmentVariable("OS")&&e.getEnvironmentVariable("OS").toLowerCase().includes("windows"),n=e.getEnvironmentVariable("WT_SESSION"),r=e.getEnvironmentVariable("TERM_PROGRAM")&&"vscode"===e.getEnvironmentVariable("TERM_PROGRAM"),i="truecolor"===e.getEnvironmentVariable("COLORTERM")||"xterm-256color"===e.getEnvironmentVariable("TERM");function o(e){return`${e}`}return{bold:function(e){return`${e}`},blue:function(e){return!t||n||r?`${e}`:o(e)},brightWhite:o,blueBackground:function(e){return i?`${e}`:`${e}`}}}function BW(e){return`--${e.name}${e.shortName?`, -${e.shortName}`:""}`}function JW(e,t,n,r){var i;const o=[],a=RW(e),s=BW(t),c=function(e){if("object"!==e.type)return{valueType:function(e){switch(xn.assert("listOrElement"!==e.type),e.type){case"string":case"number":case"boolean":return eM(va.type_Colon);case"list":return eM(va.one_or_more_Colon);default:return eM(va.one_of_Colon)}}(e),possibleValues:function e(t){let n;switch(t.type){case"string":case"number":case"boolean":n=t.type;break;case"list":case"listOrElement":n=e(t.element);break;case"object":n="";break;default:const r={};return t.type.forEach(((e,n)=>{var i;(null==(i=t.deprecatedKeys)?void 0:i.has(n))||(r[e]||(r[e]=[])).push(n)})),Object.entries(r).map((([,e])=>e.join("/"))).join(", ")}return n}(e)}}(t),l="object"==typeof t.defaultValueDescription?eM(t.defaultValueDescription):(u=t.defaultValueDescription,_="list"===t.type||"listOrElement"===t.type?t.element.type:t.type,void 0!==u&&"object"==typeof _?$e(_.entries()).filter((([,e])=>e===u)).map((([e])=>e)).join("/"):String(u));var u,_;const d=(null==(i=e.getWidthOfTerminal)?void 0:i.call(e))??0;if(d>=80){let i="";t.description&&(i=eM(t.description)),o.push(...f(s,i,n,r,d,!0),e.newLine),p(c,t)&&(c&&o.push(...f(c.valueType,c.possibleValues,n,r,d,!1),e.newLine),l&&o.push(...f(eM(va.default_Colon),l,n,r,d,!1),e.newLine)),o.push(e.newLine)}else{if(o.push(a.blue(s),e.newLine),t.description){const e=eM(t.description);o.push(e)}if(o.push(e.newLine),p(c,t)){if(c&&o.push(`${c.valueType} ${c.possibleValues}`),l){c&&o.push(e.newLine);const t=eM(va.default_Colon);o.push(`${t} ${l}`)}o.push(e.newLine)}o.push(e.newLine)}return o;function p(e,t){const n=t.defaultValueDescription;return!(t.category===va.Command_line_Options||D(["string"],null==e?void 0:e.possibleValues)&&D([void 0,"false","n/a"],n))}function f(e,t,n,r,i,o){const s=[];let c=!0,l=t;const u=i-r;for(;l.length>0;){let t="";c?(t=e.padStart(n),t=t.padEnd(r),t=o?a.blue(t):t):t="".padStart(r);const i=l.substr(0,u);l=l.slice(u),s.push(`${t}${i}`),c=!1}return s}}function zW(e,t){let n=0;for(const e of t){const t=BW(e).length;n=n>t?n:t}const r=n+2,i=r+2;let o=[];for(const n of t){const t=JW(e,n,r,i);o=[...o,...t]}return o[o.length-2]!==e.newLine&&o.push(e.newLine),o}function $W(e,t,n,r,i,o){let a=[];if(a.push(RW(e).bold(t)+e.newLine+e.newLine),i&&a.push(i+e.newLine+e.newLine),!r)return a=[...a,...zW(e,n)],o&&a.push(o+e.newLine+e.newLine),a;const s=new Map;for(const e of n){if(!e.category)continue;const t=eM(e.category),n=s.get(t)??[];n.push(e),s.set(t,n)}return s.forEach(((t,n)=>{a.push(`### ${n}${e.newLine}${e.newLine}`),a=[...a,...zW(e,t)]})),o&&a.push(o+e.newLine+e.newLine),a}function qW(e,t){let n=[...VW(e,`${eM(va.tsc_Colon_The_TypeScript_Compiler)} - ${eM(va.Version_0,c)}`)];n=[...n,...$W(e,eM(va.BUILD_OPTIONS),t,!1,sS(va.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const t of n)e.write(t)}function VW(e,t){var n;const r=RW(e),i=[],o=(null==(n=e.getWidthOfTerminal)?void 0:n.call(e))??0,a=r.blueBackground("".padStart(5)),s=r.blueBackground(r.brightWhite("TS ".padStart(5)));if(o>=t.length+5){const n=(o>120?120:o)-5;i.push(t.padEnd(n)+a+e.newLine),i.push("".padStart(n)+s+e.newLine)}else i.push(t+e.newLine),i.push(e.newLine);return i}function UW(e,t){t.options.all?function(e,t,n,r){let i=[...VW(e,`${eM(va.tsc_Colon_The_TypeScript_Compiler)} - ${eM(va.Version_0,c)}`)];i=[...i,...$W(e,eM(va.ALL_COMPILER_OPTIONS),t,!0,void 0,sS(va.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))],i=[...i,...$W(e,eM(va.WATCH_OPTIONS),r,!1,eM(va.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon))],i=[...i,...$W(e,eM(va.BUILD_OPTIONS),n,!1,sS(va.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,"https://aka.ms/tsc-composite-builds"))];for(const t of i)e.write(t)}(e,LW(t),FO,mO):function(e,t){const n=RW(e);let r=[...VW(e,`${eM(va.tsc_Colon_The_TypeScript_Compiler)} - ${eM(va.Version_0,c)}`)];r.push(n.bold(eM(va.COMMON_COMMANDS))+e.newLine+e.newLine),a("tsc",va.Compiles_the_current_project_tsconfig_json_in_the_working_directory),a("tsc app.ts util.ts",va.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options),a("tsc -b",va.Build_a_composite_project_in_the_working_directory),a("tsc --init",va.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory),a("tsc -p ./path/to/tsconfig.json",va.Compiles_the_TypeScript_project_located_at_the_specified_path),a("tsc --help --all",va.An_expanded_version_of_this_information_showing_all_possible_compiler_options),a(["tsc --noEmit","tsc --target esnext"],va.Compiles_the_current_project_with_additional_settings);const i=t.filter((e=>e.isCommandLineOnly||e.category===va.Command_line_Options)),o=t.filter((e=>!D(i,e)));r=[...r,...$W(e,eM(va.COMMAND_LINE_FLAGS),i,!1,void 0,void 0),...$W(e,eM(va.COMMON_COMPILER_OPTIONS),o,!1,void 0,sS(va.You_can_learn_about_all_of_the_compiler_options_at_0,"https://aka.ms/tsc"))];for(const t of r)e.write(t);function a(t,i){const o="string"==typeof t?[t]:t;for(const t of o)r.push(" "+n.blue(t)+e.newLine);r.push(" "+eM(i)+e.newLine+e.newLine)}}(e,LW(t))}function KW(e,t,n){let r,i=PU(e);if(n.options.build)return i(cS(va.Option_build_must_be_the_first_command_line_argument)),e.exit(1);if(n.options.locale&&pc(n.options.locale,e,n.errors),n.errors.length>0)return n.errors.forEach(i),e.exit(1);if(n.options.init)return function(e,t,n,r){const i=Xo(Ko(e.getCurrentDirectory(),"tsconfig.json"));if(e.fileExists(i))t(cS(va.A_tsconfig_json_file_is_already_defined_at_Colon_0,i));else{e.writeFile(i,LM(n,r,e.newLine));const t=[e.newLine,...VW(e,"Created a new tsconfig.json with:")];t.push(OM(n,e.newLine)+e.newLine+e.newLine),t.push("You can learn more at https://aka.ms/tsconfig"+e.newLine);for(const n of t)e.write(n)}}(e,i,n.options,n.fileNames),e.exit(0);if(n.options.version)return jW(e),e.exit(0);if(n.options.help||n.options.all)return UW(e,n),e.exit(0);if(n.options.watch&&n.options.listFilesOnly)return i(cS(va.Options_0_and_1_cannot_be_combined,"watch","listFilesOnly")),e.exit(1);if(n.options.project){if(0!==n.fileNames.length)return i(cS(va.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)),e.exit(1);const t=Xo(n.options.project);if(!t||e.directoryExists(t)){if(r=Ko(t,"tsconfig.json"),!e.fileExists(r))return i(cS(va.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0,n.options.project)),e.exit(1)}else if(r=t,!e.fileExists(r))return i(cS(va.The_specified_path_does_not_exist_Colon_0,n.options.project)),e.exit(1)}else 0===n.fileNames.length&&(r=bq(Xo(e.getCurrentDirectory()),(t=>e.fileExists(t))));if(0===n.fileNames.length&&!r)return n.options.showConfig?i(cS(va.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0,Xo(e.getCurrentDirectory()))):(jW(e),UW(e,n)),e.exit(1);const o=e.getCurrentDirectory(),a=jM(n.options,(e=>Go(e,o)));if(r){const o=new Map,s=OU(r,a,o,n.watchOptions,e,i);if(a.showConfig)return 0!==s.errors.length?(i=IW(e,i,s.options),s.errors.forEach(i),e.exit(1)):(e.write(JSON.stringify(DM(s,r,e),null,4)+e.newLine),e.exit(0));if(i=IW(e,i,s.options),_x(s.options)){if(GW(e,i))return;return function(e,t,n,r,i,o,a){const s=sK({configFileName:r.options.configFilePath,optionsToExtend:i,watchOptionsToExtend:o,system:e,reportDiagnostic:n,reportWatchStatus:rH(e,r.options)});return nH(e,t,s),s.configFileParsingResult=r,s.extendedConfigCache=a,fK(s)}(e,t,i,s,a,n.watchOptions,o)}RS(s.options)?ZW(e,t,i,s):YW(e,t,i,s)}else{if(a.showConfig)return e.write(JSON.stringify(DM(n,Ko(o,"tsconfig.json"),e),null,4)+e.newLine),e.exit(0);if(i=IW(e,i,a),_x(a)){if(GW(e,i))return;return function(e,t,n,r,i,o){const a=cK({rootFiles:r,options:i,watchOptions:o,system:e,reportDiagnostic:n,reportWatchStatus:rH(e,i)});return nH(e,t,a),fK(a)}(e,t,i,n.fileNames,a,n.watchOptions)}RS(a)?ZW(e,t,i,{...n,options:a}):YW(e,t,i,{...n,options:a})}}function WW(e){if(e.length>0&&45===e[0].charCodeAt(0)){const t=e[0].slice(45===e[0].charCodeAt(1)?2:1).toLowerCase();return"build"===t||"b"===t}return!1}function HW(e,t,n){if(WW(n)){const{buildOptions:r,watchOptions:i,projects:o,errors:a}=ZO(n.slice(1));if(!r.generateCpuProfile||!e.enableCPUProfiler)return XW(e,t,r,i,o,a);e.enableCPUProfiler(r.generateCpuProfile,(()=>XW(e,t,r,i,o,a)))}const r=HO(n,(t=>e.readFile(t)));if(!r.options.generateCpuProfile||!e.enableCPUProfiler)return KW(e,t,r);e.enableCPUProfiler(r.options.generateCpuProfile,(()=>KW(e,t,r)))}function GW(e,t){return!(e.watchFile&&e.watchDirectory||(t(cS(va.The_current_host_does_not_support_the_0_option,"--watch")),e.exit(1),0))}function XW(e,t,n,r,i,o){const a=IW(e,PU(e),n);if(n.locale&&pc(n.locale,e,o),o.length>0)return o.forEach(a),e.exit(1);if(n.help)return jW(e),qW(e,AO),e.exit(0);if(0===i.length)return jW(e),qW(e,AO),e.exit(0);if(!e.getModifiedTime||!e.setModifiedTime||n.clean&&!e.deleteFile)return a(cS(va.The_current_host_does_not_support_the_0_option,"--build")),e.exit(1);if(n.watch){if(GW(e,a))return;const o=wK(e,void 0,a,kK(e,MW(e,n)),rH(e,n));o.jsDocParsingMode=2;const s=iH(e,n);eH(e,t,o,s);const c=o.onWatchStatusChange;let l=!1;o.onWatchStatusChange=(e,t,n,r)=>{null==c||c(e,t,n,r),!l||e.code!==va.Found_0_errors_Watching_for_file_changes.code&&e.code!==va.Found_1_error_Watching_for_file_changes.code||oH(u,s)};const u=EK(o,i,n,r);return u.build(),oH(u,s),l=!0,u}const s=CK(e,void 0,a,kK(e,MW(e,n)),QW(e,n));s.jsDocParsingMode=2;const c=iH(e,n);eH(e,t,s,c);const l=DK(s,i,n),u=n.clean?l.clean():l.build();return oH(l,c),Cr(),e.exit(u)}function QW(e,t){return MW(e,t)?(t,n)=>e.write(BU(t,n,e.newLine,e)):void 0}function YW(e,t,n,r){const{fileNames:i,options:o,projectReferences:a}=r,s=wq(o,void 0,e);s.jsDocParsingMode=2;const c=s.getCurrentDirectory(),l=tn(s.useCaseSensitiveFileNames());Dq(s,(e=>Yo(e,c,l))),cH(e,o,!1);const u=gV({rootNames:i,options:o,projectReferences:a,host:s,configFileParsingDiagnostics:dV(r)}),_=GU(u,n,(t=>e.write(t+e.newLine)),QW(e,o));return uH(e,u,void 0),t(u),e.exit(_)}function ZW(e,t,n,r){const{options:i,fileNames:o,projectReferences:a}=r;cH(e,i,!1);const s=_K(i,e);s.jsDocParsingMode=2;const c=lK({host:s,system:e,rootNames:o,options:i,configFileParsingDiagnostics:dV(r),projectReferences:a,reportDiagnostic:n,reportErrorSummary:QW(e,i),afterProgramEmitAndDiagnostics:n=>{uH(e,n.getProgram(),void 0),t(n)}});return e.exit(c)}function eH(e,t,n,r){tH(e,n,!0),n.afterProgramEmitAndDiagnostics=n=>{uH(e,n.getProgram(),r),t(n)}}function tH(e,t,n){const r=t.createProgram;t.createProgram=(t,i,o,a,s,c)=>(xn.assert(void 0!==t||void 0===i&&!!a),void 0!==i&&cH(e,i,n),r(t,i,o,a,s,c))}function nH(e,t,n){n.jsDocParsingMode=2,tH(e,n,!1);const r=n.afterProgramCreate;n.afterProgramCreate=n=>{r(n),uH(e,n.getProgram(),void 0),t(n)}}function rH(e,t){return IU(e,MW(e,t))}function iH(e,t){if(e===vo&&t.extendedDiagnostics)return Sr(),function(){let e;return{addAggregateStatistic:function(t){const n=null==e?void 0:e.get(t.name);n?2===n.type?n.value=Math.max(n.value,t.value):n.value+=t.value:(e??(e=new Map)).set(t.name,t)},forEachAggregateStatistics:function(t){null==e||e.forEach(t)},clear:function(){e=void 0}}}()}function oH(e,t){if(!t)return;if(!xr())return void vo.write(va.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+"\n");const n=[];function r(e){const t=mr(e);t&&n.push({name:i(e),value:t,type:1})}function i(e){return e.replace("SolutionBuilder::","")}n.push({name:"Projects in scope",value:SK(e.getBuildOrder()).length,type:1}),r("SolutionBuilder::Projects built"),r("SolutionBuilder::Timestamps only updates"),r("SolutionBuilder::Bundles updated"),t.forEachAggregateStatistics((e=>{e.name=`Aggregate ${e.name}`,n.push(e)})),hr(((e,t)=>{lH(e)&&n.push({name:`${i(e)} time`,value:t,type:0})})),kr(),Sr(),t.clear(),_H(vo,n)}function aH(e,t){return e===vo&&(t.diagnostics||t.extendedDiagnostics)}function sH(e,t){return e===vo&&t.generateTrace}function cH(e,t,n){aH(e,t)&&Sr(e),sH(e,t)&&Tr(n?"build":"project",t.generateTrace,t.configFilePath)}function lH(e){return an(e,"SolutionBuilder::")}function uH(e,t,n){var r;const i=t.getCompilerOptions();let o;if(sH(e,i)&&(null==(r=or)||r.stopTracing()),aH(e,i)){o=[];const r=e.getMemoryUsage?e.getMemoryUsage():-1;s("Files",t.getSourceFiles().length);const l=function(e){const t=function(){const e=new Map;return e.set("Library",0),e.set("Definitions",0),e.set("TypeScript",0),e.set("JavaScript",0),e.set("JSON",0),e.set("Other",0),e}();return f(e.getSourceFiles(),(n=>{const r=function(e,t){if(e.isSourceFileDefaultLibrary(t))return"Library";if(t.isDeclarationFile)return"Definitions";const n=t.path;return Io(n,Fk)?"TypeScript":Io(n,Mk)?"JavaScript":Ao(n,".json")?"JSON":"Other"}(e,n),i=Ka(n).length;t.set(r,t.get(r)+i)})),t}(t);if(i.extendedDiagnostics)for(const[e,t]of l.entries())s("Lines of "+e,t);else s("Lines",y(l.values(),((e,t)=>e+t),0));s("Identifiers",t.getIdentifierCount()),s("Symbols",t.getSymbolCount()),s("Types",t.getTypeCount()),s("Instantiations",t.getInstantiationCount()),r>=0&&a({name:"Memory used",value:r,type:2},!0);const u=xr(),_=u?gr("Program"):0,d=u?gr("Bind"):0,p=u?gr("Check"):0,m=u?gr("Emit"):0;if(i.extendedDiagnostics){const e=t.getRelationCacheSizes();s("Assignability cache size",e.assignable),s("Identity cache size",e.identity),s("Subtype cache size",e.subtype),s("Strict subtype cache size",e.strictSubtype),u&&hr(((e,t)=>{lH(e)||c(`${e} time`,t,!0)}))}else u&&(c("I/O read",gr("I/O Read"),!0),c("I/O write",gr("I/O Write"),!0),c("Parse time",_,!0),c("Bind time",d,!0),c("Check time",p,!0),c("Emit time",m,!0));u&&c("Total time",_+d+p+m,!1),_H(e,o),u?n?(hr((e=>{lH(e)||vr(e)})),yr((e=>{lH(e)||br(e)}))):kr():e.write(va.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message+"\n")}function a(e,t){o.push(e),t&&(null==n||n.addAggregateStatistic(e))}function s(e,t){a({name:e,value:t,type:1},!0)}function c(e,t,n){a({name:e,value:t,type:0},n)}}function _H(e,t){let n=0,r=0;for(const e of t){e.name.length>n&&(n=e.name.length);const t=dH(e);t.length>r&&(r=t.length)}for(const i of t)e.write(`${i.name}:`.padEnd(n+2)+dH(i).toString().padStart(r)+e.newLine)}function dH(e){switch(e.type){case 1:return""+e.value;case 0:return(e.value/1e3).toFixed(2)+"s";case 2:return Math.round(e.value/1e3)+"K";default:xn.assertNever(e.type)}}function pH(e,t){const n=WS(e,"strictNullChecks");return{typeFromExpression:_,serializeTypeOfDeclaration:function(e,n){switch(e.kind){case 171:return r(kv(e));case 169:return s(e,n);case 260:return function(e,n){const i=kv(e);if(i)return r(i);let o;return e.initializer&&(t.isExpandoFunctionDeclaration(e)||(o=_(e.initializer,n,void 0,void 0,sf(e)))),o??c(e,n)}(e,n);case 172:return function(e,t){const n=kv(e);if(n)return r(n);let i;if(e.initializer){const n=nf(e);i=_(e.initializer,t,void 0,void 0,n)}return i??c(e,t)}(e,n);case 208:return c(e,n);case 277:return i(e.expression,n,void 0,!0);case 211:case 212:case 226:return r(kv(e))||c(e,n);case 303:return _(e.initializer,n)||c(e,n);default:xn.assertNever(e,`Node needs to be an inferrable node, found ${xn.formatSyntaxKind(e.kind)}`)}},serializeReturnTypeForSignature:function(e,t){switch(e.kind){case 177:return a(e,t);case 174:case 262:case 180:case 173:case 179:case 176:case 178:case 181:case 184:case 185:case 218:case 219:case 317:case 323:return y(e,t);default:xn.assertNever(e,`Node needs to be an inferrable node, found ${xn.formatSyntaxKind(e.kind)}`)}},serializeTypeOfExpression:i};function r(e,t){return!(void 0===e||!(!t||e&&h(e)))||void 0}function i(e,t,n,r){return _(e,t,!1,n,r)??l(e,t)}function o(e){if(e)return 177===e.kind?Cv(e):e.parameters.length>0?kv(e.parameters[0]):void 0}function a(e,n){const i=t.getAllAccessorDeclarations(e),a=function(e,t){let n=o(e);return n||e===t.firstAccessor||(n=o(t.firstAccessor)),!n&&t.secondAccessor&&e!==t.secondAccessor&&(n=o(t.secondAccessor)),n}(e,i);return a?r(a):!!i.getAccessor&&y(i.getAccessor,n)}function s(e,n){const i=e.parent;if(178===i.kind)return a(i,n);const o=kv(e),s=t.requiresAddingImplicitUndefined(e);let l;return o?l=r(o,s):e.initializer&&qD(e.name)&&(l=_(e.initializer,n,void 0,s)),l??c(e,n)}function c(e,t){return t.tracker.reportInferenceFallback(e),!1}function l(e,t){return t.tracker.reportInferenceFallback(e),!1}function u(e,t,n,i){return Dl(t)?_(e,n,!0,i):(i&&!h(t)&&n.tracker.reportInferenceFallback(t),r(t))}function _(e,n,i=!1,o=!1,a=!1){switch(e.kind){case 217:return _A(e)?u(e.expression,dA(e),n,o):_(e.expression,n,i,o);case 80:if(t.isUndefinedIdentifierExpression(e))return!0;break;case 106:case 9:case 15:case 11:case 10:case 112:case 97:return!0;case 219:case 218:return function(e,t){const n=r(e.type)??y(e,t),i=f(e.typeParameters),o=e.parameters.every((e=>p(e,t)));return n&&i&&o}(e,n);case 216:case 234:const s=e;return u(s.expression,s.type,n,o);case 224:const c=e;if(DC(c)){if(10===c.operand.kind)return!0;if(9===c.operand.kind)return!0}break;case 228:if(!i&&!a)return!0;break;case 209:return function(e,t,n){if(!function(e,t,n){if(!n)return t.tracker.reportInferenceFallback(e),!1;for(const n of e.elements)if(230===n.kind)return t.tracker.reportInferenceFallback(n),!1;return!0}(e,t,n))return!1;let r=!0;for(const i of e.elements)xn.assert(230!==i.kind),232!==i.kind&&(r=(_(i,t,n)??l(i,t))&&r);return!0}(e,n,i);case 210:return function(e,t,n){if(!function(e,t){let n=!0;for(const r of e.properties){if(262144&r.flags){n=!1;break}if(304===r.kind||305===r.kind)t.tracker.reportInferenceFallback(r),n=!1;else{if(262144&r.name.flags){n=!1;break}81===r.name.kind?n=!1:167===r.name.kind&&(DC(r.name.expression,!1)||(t.tracker.reportInferenceFallback(r.name),n=!1))}}return n}(e,t))return!1;let r=!0;for(const i of e.properties){xn.assert(!JN(i)&&!zN(i));i.name;switch(i.kind){case 174:r=!!m(i,0,t)&&r;break;case 303:r=!!d(i,0,t,n)&&r;break;case 178:case 177:r=!!g(i,0,t)&&r}}return r}(e,n,i);case 231:return l(e,n)}}function d(e,t,n,r){return _(e.initializer,n,r)??c(e,n)}function p(e,t){return s(e,t)}function f(e){return(null==e?void 0:e.every((e=>r(e.constraint)&&r(e.default))))??!0}function m(e,t,n){const r=y(e,n),i=f(e.typeParameters),o=e.parameters.every((e=>p(e,n)));return r&&i&&o}function g(e,n,i){const a=t.getAllAccessorDeclarations(e),s=a.getAccessor&&o(a.getAccessor),c=a.setAccessor&&o(a.setAccessor);if(void 0!==s&&void 0!==c){const t=e.parameters.every((e=>p(e,i)));return I_(e)?t&&r(s):t}if(a.firstAccessor===e){const t=s??c,n=t?r(t):function(e,t,n){return 177===e.kind?y(e,n):(n.tracker.reportInferenceFallback(e),!1)}(e,0,i);return n}return!1}function h(e){return!n||!(!Ph(e.kind)&&201!==e.kind&&184!==e.kind&&185!==e.kind&&188!==e.kind&&189!==e.kind&&187!==e.kind&&203!==e.kind&&197!==e.kind)||(196===e.kind?h(e.type):(192===e.kind||193===e.kind)&&e.types.every(h))}function y(e,t){let n;const i=Cv(e);return i&&(n=r(i)),!n&&rh(e)&&(n=function(e,t){let n;if(e&&!Nd(e.body)){if(3&Jh(e))return;const t=e.body;t&&DP(t)?Pf(t,(e=>{if(n)return n=void 0,!0;n=e.expression})):n=t}if(n)return _(n,t)}(e,t)),n??function(e,t){return t.tracker.reportInferenceFallback(e),!1}(e,t)}}var fH={};o(fH,{NameValidationResult:()=>zH,discoverTypings:()=>BH,isTypingUpToDate:()=>FH,loadSafeList:()=>jH,loadTypesMap:()=>RH,nodeCoreModuleList:()=>OH,nodeCoreModules:()=>MH,nonRelativeModuleNameForTypingCache:()=>LH,prefixedNodeCoreModuleList:()=>IH,renderPackageNameValidationFailure:()=>VH,validatePackageName:()=>$H});var mH,gH,hH="action::set",yH="action::invalidate",vH="action::packageInstalled",bH="event::typesRegistry",xH="event::beginInstallTypes",SH="event::endInstallTypes",kH="event::initializationFailed",TH="action::watchTypingLocations";function CH(e){return vo.args.includes(e)}function wH(e){const t=vo.args.indexOf(e);return t>=0&&t`node:${e}`)),OH=[...AH,...IH],MH=new Set(OH);function LH(e){return MH.has(e)?"node":e}function jH(e,t){const n=nM(t,(t=>e.readFile(t)));return new Map(Object.entries(n.config))}function RH(e,t){var n;const r=nM(t,(t=>e.readFile(t)));if(null==(n=r.config)?void 0:n.simpleMap)return new Map(Object.entries(r.config.simpleMap))}function BH(e,t,n,r,i,o,a,s,c,l){if(!a||!a.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};const u=new Map;n=q(n,(e=>{const t=Xo(e);if(qk(t))return t}));const _=[];a.include&&y(a.include,"Explicitly included types");const d=a.exclude||[];if(!l.types){const e=new Set(n.map(Ro));e.add(r),e.forEach((e=>{v(e,"bower.json","bower_components",_),v(e,"package.json","node_modules",_)}))}a.disableFilenameBasedTypeAcquisition||function(e){const n=q(e,(e=>{if(!qk(e))return;const t=Xt(Yk(yt(Bo(e))));return i.get(t)}));n.length&&y(n,"Inferred typings from file names"),Q(e,(e=>Ao(e,".jsx")))&&(t&&t("Inferred 'react' typings due to presence of '.jsx' extension"),h("react"))}(n),s&&y(ne(s.map(LH),Et,Mt),"Inferred typings from unresolved imports");for(const e of d)u.delete(e)&&t&&t(`Typing for ${e} is in exclude list, will be ignored.`);o.forEach(((e,t)=>{const n=c.get(t);!1===u.get(t)&&void 0!==n&&FH(e,n)&&u.set(t,e.typingLocation)}));const p=[],m=[];u.forEach(((e,t)=>{e?m.push(e):p.push(t)}));const g={cachedTypingPaths:m,newTypingNames:p,filesToWatch:_};return t&&t(`Finished typings discovery:${NH(g)}`),g;function h(e){u.has(e)||u.set(e,!1)}function y(e,n){t&&t(`${n}: ${JSON.stringify(e)}`),f(e,h)}function v(n,r,i,o){const a=Ko(n,r);let s,c;e.fileExists(a)&&(o.push(a),s=nM(a,(t=>e.readFile(t))).config,c=R([s.dependencies,s.devDependencies,s.optionalDependencies,s.peerDependencies],Re),y(c,`Typing names in '${a}' dependencies`));const l=Ko(n,i);if(o.push(l),!e.directoryExists(l))return;const _=[],d=c?c.map((e=>Ko(l,e,r))):e.readDirectory(l,[".json"],void 0,void 0,3).filter((e=>{if(Bo(e)!==r)return!1;const t=$o(Xo(e)),n="@"===t[t.length-3][0];return n&&yt(t[t.length-4])===i||!n&&yt(t[t.length-3])===i}));t&&t(`Searching for typing names in ${l}; all files: ${JSON.stringify(d)}`);for(const n of d){const r=Xo(n),i=nM(r,(t=>e.readFile(t))).config;if(!i.name)continue;const o=i.types||i.typings;if(o){const n=Go(o,Ro(r));e.fileExists(n)?(t&&t(` Package '${i.name}' provides its own types.`),u.set(i.name,n)):t&&t(` Package '${i.name}' provides its own types but they are missing.`)}else _.push(i.name)}y(_," Found package names")}}var JH,zH=(e=>(e[e.Ok=0]="Ok",e[e.EmptyName=1]="EmptyName",e[e.NameTooLong=2]="NameTooLong",e[e.NameStartsWithDot=3]="NameStartsWithDot",e[e.NameStartsWithUnderscore=4]="NameStartsWithUnderscore",e[e.NameContainsNonURISafeCharacters=5]="NameContainsNonURISafeCharacters",e))(zH||{});function $H(e){return qH(e,!0)}function qH(e,t){if(!e)return 1;if(e.length>214)return 2;if(46===e.charCodeAt(0))return 3;if(95===e.charCodeAt(0))return 4;if(t){const t=/^@([^/]+)\/([^/]+)$/.exec(e);if(t){const e=qH(t[1],!1);if(0!==e)return{name:t[1],isScopeName:!0,result:e};const n=qH(t[2],!1);return 0!==n?{name:t[2],isScopeName:!1,result:n}:0}}return encodeURIComponent(e)!==e?5:0}function VH(e,t){return"object"==typeof e?UH(t,e.result,e.name,e.isScopeName):UH(t,e,t,!1)}function UH(e,t,n,r){const i=r?"Scope":"Package";switch(t){case 1:return`'${e}':: ${i} name '${n}' cannot be empty`;case 2:return`'${e}':: ${i} name '${n}' should be less than 214 characters`;case 3:return`'${e}':: ${i} name '${n}' cannot start with '.'`;case 4:return`'${e}':: ${i} name '${n}' cannot start with '_'`;case 5:return`'${e}':: ${i} name '${n}' contains non URI safe characters`;case 0:return xn.fail();default:xn.assertNever(t)}}(e=>{class t{constructor(e){this.text=e}getText(e,t){return 0===e&&t===this.text.length?this.text:this.text.substring(e,t)}getLength(){return this.text.length}getChangeRange(){}}e.fromString=function(e){return new t(e)}})(JH||(JH={}));var KH=(e=>(e[e.Dependencies=1]="Dependencies",e[e.DevDependencies=2]="DevDependencies",e[e.PeerDependencies=4]="PeerDependencies",e[e.OptionalDependencies=8]="OptionalDependencies",e[e.All=15]="All",e))(KH||{}),WH=(e=>(e[e.Off=0]="Off",e[e.On=1]="On",e[e.Auto=2]="Auto",e))(WH||{}),HH=(e=>(e[e.Semantic=0]="Semantic",e[e.PartialSemantic=1]="PartialSemantic",e[e.Syntactic=2]="Syntactic",e))(HH||{}),GH={},XH=(e=>(e.Original="original",e.TwentyTwenty="2020",e))(XH||{}),QH=(e=>(e.All="All",e.SortAndCombine="SortAndCombine",e.RemoveUnused="RemoveUnused",e))(QH||{}),YH=(e=>(e[e.Invoked=1]="Invoked",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",e))(YH||{}),ZH=(e=>(e.Type="Type",e.Parameter="Parameter",e.Enum="Enum",e))(ZH||{}),eG=(e=>(e.none="none",e.definition="definition",e.reference="reference",e.writtenReference="writtenReference",e))(eG||{}),tG=(e=>(e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart",e))(tG||{}),nG=(e=>(e.Ignore="ignore",e.Insert="insert",e.Remove="remove",e))(nG||{});function rG(e){return{indentSize:4,tabSize:4,newLineCharacter:e||"\n",convertTabsToSpaces:!0,indentStyle:2,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:"ignore",trimTrailingWhitespace:!0,indentSwitchCase:!0}}var iG=rG("\n"),oG=(e=>(e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral",e[e.link=22]="link",e[e.linkName=23]="linkName",e[e.linkText=24]="linkText",e))(oG||{}),aG=(e=>(e[e.None=0]="None",e[e.MayIncludeAutoImports=1]="MayIncludeAutoImports",e[e.IsImportStatementCompletion=2]="IsImportStatementCompletion",e[e.IsContinuation=4]="IsContinuation",e[e.ResolvedModuleSpecifiers=8]="ResolvedModuleSpecifiers",e[e.ResolvedModuleSpecifiersBeyondLimit=16]="ResolvedModuleSpecifiersBeyondLimit",e[e.MayIncludeMethodSnippets=32]="MayIncludeMethodSnippets",e))(aG||{}),sG=(e=>(e.Comment="comment",e.Region="region",e.Code="code",e.Imports="imports",e))(sG||{}),cG=(e=>(e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration",e))(cG||{}),lG=(e=>(e[e.None=0]="None",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",e[e.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",e[e.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition",e))(lG||{}),uG=(e=>(e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.BigIntLiteral=7]="BigIntLiteral",e[e.StringLiteral=8]="StringLiteral",e[e.RegExpLiteral=9]="RegExpLiteral",e))(uG||{}),_G=(e=>(e.unknown="",e.warning="warning",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.localClassElement="local class",e.interfaceElement="interface",e.typeElement="type",e.enumElement="enum",e.enumMemberElement="enum member",e.variableElement="var",e.localVariableElement="local var",e.variableUsingElement="using",e.variableAwaitUsingElement="await using",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.memberAccessorVariableElement="accessor",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e.directory="directory",e.externalModuleName="external module name",e.jsxAttribute="JSX attribute",e.string="string",e.link="link",e.linkName="link name",e.linkText="link text",e))(_G||{}),dG=(e=>(e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e.abstractModifier="abstract",e.optionalModifier="optional",e.deprecatedModifier="deprecated",e.dtsModifier=".d.ts",e.tsModifier=".ts",e.tsxModifier=".tsx",e.jsModifier=".js",e.jsxModifier=".jsx",e.jsonModifier=".json",e.dmtsModifier=".d.mts",e.mtsModifier=".mts",e.mjsModifier=".mjs",e.dctsModifier=".d.cts",e.ctsModifier=".cts",e.cjsModifier=".cjs",e))(dG||{}),pG=(e=>(e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.bigintLiteral="bigint",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAliasName="type alias name",e.parameterName="parameter name",e.docCommentTagName="doc comment tag name",e.jsxOpenTagName="jsx open tag name",e.jsxCloseTagName="jsx close tag name",e.jsxSelfClosingTagName="jsx self closing tag name",e.jsxAttribute="jsx attribute",e.jsxText="jsx text",e.jsxAttributeStringLiteralValue="jsx attribute string literal value",e))(pG||{}),fG=(e=>(e[e.comment=1]="comment",e[e.identifier=2]="identifier",e[e.keyword=3]="keyword",e[e.numericLiteral=4]="numericLiteral",e[e.operator=5]="operator",e[e.stringLiteral=6]="stringLiteral",e[e.regularExpressionLiteral=7]="regularExpressionLiteral",e[e.whiteSpace=8]="whiteSpace",e[e.text=9]="text",e[e.punctuation=10]="punctuation",e[e.className=11]="className",e[e.enumName=12]="enumName",e[e.interfaceName=13]="interfaceName",e[e.moduleName=14]="moduleName",e[e.typeParameterName=15]="typeParameterName",e[e.typeAliasName=16]="typeAliasName",e[e.parameterName=17]="parameterName",e[e.docCommentTagName=18]="docCommentTagName",e[e.jsxOpenTagName=19]="jsxOpenTagName",e[e.jsxCloseTagName=20]="jsxCloseTagName",e[e.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",e[e.jsxAttribute=22]="jsxAttribute",e[e.jsxText=23]="jsxText",e[e.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",e[e.bigintLiteral=25]="bigintLiteral",e))(fG||{}),mG=Cs(99,!0),gG=(e=>(e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All",e))(gG||{});function hG(e){switch(e.kind){case 260:return Mm(e)&&el(e)?7:1;case 169:case 208:case 172:case 171:case 303:case 304:case 174:case 173:case 176:case 177:case 178:case 262:case 218:case 219:case 299:case 291:return 1;case 168:case 264:case 265:case 187:return 2;case 346:return void 0===e.name?3:2;case 306:case 263:return 3;case 267:return sp(e)||1===DR(e)?5:4;case 266:case 275:case 276:case 271:case 272:case 277:case 278:return 7;case 307:return 5}return 7}function yG(e){const t=(e=vX(e)).parent;return 307===e.kind?1:mN(t)||yN(t)||SN(t)||fN(t)||oN(t)||rN(t)&&e===t.name?7:vG(e)?function(e){const t=166===e.kind?e:iE(e.parent)&&e.parent.right===e?e.parent:void 0;return t&&271===t.parent.kind?7:4}(e):dh(e)?hG(t):ou(e)&&mc(e,_n(KN,q_,WN))?7:function(e){switch(Cb(e)&&(e=e.parent),e.kind){case 110:return!Tm(e);case 197:return!0}switch(e.parent.kind){case 183:return!0;case 205:return!e.parent.isTypeOf;case 233:return wf(e.parent)}return!1}(e)?2:function(e){return function(e){let t=e,n=!0;if(166===t.parent.kind){for(;t.parent&&166===t.parent.kind;)t=t.parent;n=t.right===e}return 183===t.parent.kind&&!n}(e)||function(e){let t=e,n=!0;if(211===t.parent.kind){for(;t.parent&&211===t.parent.kind;)t=t.parent;n=t.name===e}if(!n&&233===t.parent.kind&&298===t.parent.parent.kind){const e=t.parent.parent.parent;return 263===e.kind&&119===t.parent.parent.token||264===e.kind&&96===t.parent.parent.token}return!1}(e)}(e)?4:aE(t)?(xn.assert(CF(t.parent)),2):JE(t)?3:1}function vG(e){for(;166===e.parent.kind;)e=e.parent;return Fm(e.parent)&&e.parent.moduleReference===e}function bG(e,t=!1,n=!1){return PG(e,QE,wG,t,n)}function xG(e,t=!1,n=!1){return PG(e,YE,wG,t,n)}function SG(e,t=!1,n=!1){return PG(e,$u,wG,t,n)}function kG(e,t=!1,n=!1){return PG(e,ZE,DG,t,n)}function TG(e,t=!1,n=!1){return PG(e,cE,wG,t,n)}function CG(e,t=!1,n=!1){return PG(e,D_,EG,t,n)}function wG(e){return e.expression}function DG(e){return e.tag}function EG(e){return e.tagName}function PG(e,t,n,r,i){let o=r?FG(e):NG(e);return i&&(o=fA(o)),!!o&&!!o.parent&&t(o.parent)&&n(o.parent)===o}function NG(e){return BG(e)?e.parent:e}function FG(e){return BG(e)||JG(e)?e.parent:e}function AG(e,t){for(;e;){if(256===e.kind&&e.label.escapedText===t)return e.label;e=e.parent}}function IG(e,t){return!!GE(e.expression)&&e.expression.name.text===t}function OG(e){var t;return qD(e)&&(null==(t=lt(e.parent,Nl))?void 0:t.label)===e}function MG(e){var t;return qD(e)&&(null==(t=lt(e.parent,$P))?void 0:t.label)===e}function LG(e){return MG(e)||OG(e)}function jG(e){var t;return(null==(t=lt(e.parent,F_))?void 0:t.tagName)===e}function RG(e){var t;return(null==(t=lt(e.parent,iE))?void 0:t.right)===e}function BG(e){var t;return(null==(t=lt(e.parent,GE))?void 0:t.name)===e}function JG(e){var t;return(null==(t=lt(e.parent,XE))?void 0:t.argumentExpression)===e}function zG(e){var t;return(null==(t=lt(e.parent,ZP))?void 0:t.name)===e}function $G(e){var t;return qD(e)&&(null==(t=lt(e.parent,cu))?void 0:t.name)===e}function qG(e){switch(e.parent.kind){case 172:case 171:case 303:case 306:case 174:case 173:case 177:case 178:case 267:return Pc(e.parent)===e;case 212:return e.parent.argumentExpression===e;case 167:return!0;case 201:return 199===e.parent.parent.kind;default:return!1}}function VG(e){return Em(e.parent.parent)&&Pm(e.parent.parent)===e}function UG(e){for(Fg(e)&&(e=e.parent.parent);;){if(!(e=e.parent))return;switch(e.kind){case 307:case 174:case 173:case 262:case 218:case 177:case 178:case 263:case 264:case 266:case 267:return e}}}function KG(e){switch(e.kind){case 307:return qI(e)?"module":"script";case 267:return"module";case 263:case 231:return"class";case 264:return"interface";case 265:case 338:case 346:return"type";case 266:return"enum";case 260:return t(e);case 208:return t(sy(e));case 219:case 262:case 218:return"function";case 177:return"getter";case 178:return"setter";case 174:case 173:return"method";case 303:const{initializer:n}=e;return cu(n)?"method":"property";case 172:case 171:case 304:case 305:return"property";case 181:return"index";case 180:return"construct";case 179:return"call";case 176:case 175:return"constructor";case 168:return"type parameter";case 306:return"enum member";case 169:return Bv(e,31)?"property":"parameter";case 271:case 276:case 281:case 274:case 280:return"alias";case 226:const r=ag(e),{right:i}=e;switch(r){case 7:case 8:case 9:case 0:default:return"";case 1:case 2:const e=KG(i);return""===e?"const":e;case 3:case 5:return nP(i)?"method":"property";case 4:return"property";case 6:return"local class"}case 80:return oN(e.parent)?"alias":"";case 277:const o=KG(e.expression);return""===o?"const":o;default:return""}function t(e){return af(e)?"const":cf(e)?"let":"var"}}function WG(e){switch(e.kind){case 110:return!0;case 80:return xv(e)&&169===e.parent.kind;default:return!1}}var HG=/^\/\/\/\s*=n.end}function tX(e,t,n){return e.pos<=t&&e.end>=n}function nX(e,t,n){return iX(e.pos,e.end,t,n)}function rX(e,t,n,r){return iX(e.getStart(t),e.end,n,r)}function iX(e,t,n,r){return Math.max(e,n)e.kind===t))}function _X(e){const t=S(e.parent.getChildren(),(t=>IF(t)&&XG(t,e)));return xn.assert(!t||D(t.getChildren(),e)),t}function dX(e){return 90===e.kind}function pX(e){return 86===e.kind}function fX(e){return 100===e.kind}function mX(e,t){if(16777216&e.flags)return;const n=GY(e,t);if(n)return n;const r=function(e){let t;return mc(e,(e=>(wu(e)&&(t=e),!iE(e.parent)&&!wu(e.parent)&&!ku(e.parent)))),t}(e);return r&&t.getTypeAtLocation(r)}function gX(e,t){if(e.importClause){if(e.importClause.name&&e.importClause.namedBindings)return;if(e.importClause.name)return e.importClause.name;if(e.importClause.namedBindings){if(pN(e.importClause.namedBindings)){const t=Ee(e.importClause.namedBindings.elements);if(!t)return;return t.name}if(_N(e.importClause.namedBindings))return e.importClause.namedBindings.name}}if(!t)return e.moduleSpecifier}function hX(e,t){if(e.exportClause){if(hN(e.exportClause)){if(!Ee(e.exportClause.elements))return;return e.exportClause.elements[0].name}if(dN(e.exportClause))return e.exportClause.name}if(!t)return e.moduleSpecifier}function yX(e,t){const{parent:n}=e;if(iu(e)&&(t||90!==e.kind)?cI(n)&&D(n.modifiers,e):86===e.kind?GP(n)||mP(e):100===e.kind?HP(n)||nP(e):120===e.kind?XP(n):94===e.kind?YP(n):156===e.kind?QP(n):145===e.kind||144===e.kind?ZP(n):102===e.kind?rN(n):139===e.kind?mE(n):153===e.kind&&gE(n)){const e=function(e,t){if(!t)switch(e.kind){case 263:case 231:return function(e){if(Dc(e))return e.name;if(GP(e)){const t=e.modifiers&&S(e.modifiers,dX);if(t)return t}if(mP(e)){const t=S(e.getChildren(),pX);if(t)return t}}(e);case 262:case 218:return function(e){if(Dc(e))return e.name;if(HP(e)){const t=S(e.modifiers,dX);if(t)return t}if(nP(e)){const t=S(e.getChildren(),fX);if(t)return t}}(e);case 176:return e}if(Dc(e))return e.name}(n,t);if(e)return e}if((115===e.kind||87===e.kind||121===e.kind)&&WP(n)&&1===n.declarations.length){const e=n.declarations[0];if(qD(e.name))return e.name}if(156===e.kind){if(oN(n)&&n.isTypeOnly){const e=gX(n.parent,t);if(e)return e}if(gN(n)&&n.isTypeOnly){const e=hX(n,t);if(e)return e}}if(130===e.kind){if(fN(n)&&n.propertyName||yN(n)&&n.propertyName||_N(n)||dN(n))return n.name;if(gN(n)&&n.exportClause&&dN(n.exportClause))return n.exportClause.name}if(102===e.kind&&iN(n)){const e=gX(n,t);if(e)return e}if(95===e.kind){if(gN(n)){const e=hX(n,t);if(e)return e}if(mN(n))return fA(n.expression)}if(149===e.kind&&SN(n))return n.expression;if(161===e.kind&&(iN(n)||gN(n))&&n.moduleSpecifier)return n.moduleSpecifier;if((96===e.kind||119===e.kind)&&jN(n)&&n.token===e.kind){const e=function(e){if(1===e.types.length)return e.types[0].expression}(n);if(e)return e}if(96===e.kind){if(aE(n)&&n.constraint&&xE(n.constraint))return n.constraint.typeName;if(IE(n)&&xE(n.extendsType))return n.extendsType.typeName}if(140===e.kind&&OE(n))return n.typeParameter.name;if(103===e.kind&&aE(n)&&BE(n.parent))return n.name;if(143===e.kind&&jE(n)&&143===n.operator&&xE(n.type))return n.type.typeName;if(148===e.kind&&jE(n)&&148===n.operator&&wE(n.type)&&xE(n.type.elementType))return n.type.elementType.typeName;if(!t){if((105===e.kind&&YE(n)||116===e.kind&&aP(n)||114===e.kind&&oP(n)||135===e.kind&&sP(n)||127===e.kind&&pP(n)||91===e.kind&&iP(n))&&n.expression)return fA(n.expression);if((103===e.kind||104===e.kind)&&uP(n)&&n.operatorToken===e)return fA(n.right);if(130===e.kind&&yP(n)&&xE(n.type))return n.type.typeName;if(103===e.kind&&MP(n)||165===e.kind&&LP(n))return fA(n.expression)}return e}function vX(e){return yX(e,!1)}function bX(e){return yX(e,!0)}function xX(e,t){return SX(e,t,(e=>Wh(e)||Ph(e.kind)||VD(e)))}function SX(e,t,n){return TX(e,t,!1,n,!1)}function kX(e,t){return TX(e,t,!0,void 0,!1)}function TX(e,t,n,r,i){let o,a=e;for(;;){const i=a.getChildren(e),c=Ie(i,t,((e,t)=>t),((o,a)=>{const c=i[o].getEnd();if(ct?1:s(i[o],l,c)?i[o-1]&&s(i[o-1])?1:0:r&&l===t&&i[o-1]&&i[o-1].getEnd()===t&&s(i[o-1])?1:-1}));if(o)return o;if(!(c>=0&&i[c]))return a;a=i[c]}function s(a,s,c){if(c??(c=a.getEnd()),ct)return!1;if(tn.getStart(e)&&t(r.pos<=e.pos&&r.end>e.end||r.pos===e.end)&&UX(r,n)?t(r):void 0))}(t)}function EX(e,t,n,r){const i=function i(o){if(PX(o)&&1!==o.kind)return o;const a=o.getChildren(t),s=Ie(a,e,((e,t)=>t),((t,n)=>e=a[t-1].end?0:1:-1));if(s>=0&&a[s]){const n=a[s];if(e=e||!UX(n,t)||OX(n)){const e=FX(a,s,t,o.kind);return e?!r&&N_(e)&&e.getChildren(t).length?i(e):NX(e,t):void 0}return i(n)}}xn.assert(void 0!==n||307===o.kind||1===o.kind||N_(o));const c=FX(a,a.length,t,o.kind);return c&&NX(c,t)}(n||t);return xn.assert(!(i&&OX(i))),i}function PX(e){return Ll(e)&&!OX(e)}function NX(e,t){if(PX(e))return e;const n=e.getChildren(t);if(0===n.length)return e;const r=FX(n,n.length,t,e.kind);return r&&NX(r,t)}function FX(e,t,n,r){for(let i=t-1;i>=0;i--)if(OX(e[i]))0!==i||12!==r&&285!==r||xn.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(UX(e[i],n))return e[i]}function AX(e,t,n=EX(t,e)){if(n&&Hl(n)){const r=n.getStart(e),i=n.getEnd();if(rn.getStart(e)}function LX(e,t){const n=kX(e,t);return!!DD(n)||!(19!==n.kind||!IN(n.parent)||!kN(n.parent.parent))||!(30!==n.kind||!D_(n.parent)||!kN(n.parent.parent))}function jX(e,t){return function(n){for(;n;)if(n.kind>=285&&n.kind<=294||12===n.kind||30===n.kind||32===n.kind||80===n.kind||20===n.kind||19===n.kind||44===n.kind)n=n.parent;else{if(284!==n.kind)return!1;if(t>n.getStart(e))return!0;n=n.parent}return!1}(kX(e,t))}function RX(e,t,n){const r=Ra(e.kind),i=Ra(t),o=e.getFullStart(),a=n.text.lastIndexOf(i,o);if(-1===a)return;if(n.text.lastIndexOf(r,o-1)!!e.typeParameters&&e.typeParameters.length>=t))}function $X(e,t){if(-1===t.text.lastIndexOf("<",e?e.pos:t.text.length))return;let n=e,r=0,i=0;for(;n;){switch(n.kind){case 30:if(n=EX(n.getFullStart(),t),n&&29===n.kind&&(n=EX(n.getFullStart(),t)),!n||!qD(n))return;if(!r)return dh(n)?void 0:{called:n,nTypeArguments:i};r--;break;case 50:r=3;break;case 49:r=2;break;case 32:r++;break;case 20:if(n=RX(n,19,t),!n)return;break;case 22:if(n=RX(n,21,t),!n)return;break;case 24:if(n=RX(n,23,t),!n)return;break;case 28:i++;break;case 39:case 80:case 11:case 9:case 10:case 112:case 97:case 114:case 96:case 143:case 25:case 52:case 58:case 59:break;default:if(wu(n))break;return}n=EX(n.getFullStart(),t)}}function qX(e,t,n){return A_e.getRangeOfEnclosingComment(e,t,void 0,n)}function VX(e,t){return!!mc(kX(e,t),oF)}function UX(e,t){return 1===e.kind?!!e.jsDoc:0!==e.getWidth(t)}function KX(e,t=0){const n=[],r=h_(e)?lc(e)&~t:0;return 2&r&&n.push("private"),4&r&&n.push("protected"),1&r&&n.push("public"),(256&r||pE(e))&&n.push("static"),64&r&&n.push("abstract"),32&r&&n.push("export"),65536&r&&n.push("deprecated"),33554432&e.flags&&n.push("declare"),277===e.kind&&n.push("export"),n.length>0?n.join(","):""}function WX(e){return 183===e.kind||213===e.kind?e.typeArguments:cu(e)||263===e.kind||264===e.kind?e.typeParameters:void 0}function HX(e){return 2===e||3===e}function GX(e){return!(11!==e&&14!==e&&!zl(e))}function XX(e,t,n){return!!(4&t.flags)&&e.isEmptyAnonymousObjectType(n)}function QX(e){if(!e.isIntersection())return!1;const{types:t,checker:n}=e;return 2===t.length&&(XX(n,t[0],t[1])||XX(n,t[1],t[0]))}function YX(e,t,n){return zl(e.kind)&&e.getStart(n){const n=IB(t);return!e[n]&&(e[n]=!0)}}function yQ(e){return e.getText(0,e.getLength())}function vQ(e,t){let n="";for(let r=0;r!(t.isDeclarationFile||e.isSourceFileFromExternalLibrary(t)||!t.externalModuleIndicator&&!t.commonJsModuleIndicator)))}function kQ(e){return e.getSourceFiles().some((t=>!t.isDeclarationFile&&!e.isSourceFileFromExternalLibrary(t)&&!!t.externalModuleIndicator))}function TQ(e){return!!e.module||wS(e)>=2||!!e.noEmit}function CQ(e,t){return{fileExists:t=>e.fileExists(t),getCurrentDirectory:()=>t.getCurrentDirectory(),readFile:Ze(t,t.readFile),useCaseSensitiveFileNames:Ze(t,t.useCaseSensitiveFileNames),getSymlinkCache:Ze(t,t.getSymlinkCache)||e.getSymlinkCache,getModuleSpecifierCache:Ze(t,t.getModuleSpecifierCache),getPackageJsonInfoCache:()=>{var t;return null==(t=e.getModuleResolutionCache())?void 0:t.getPackageJsonInfoCache()},getGlobalTypingsCacheLocation:Ze(t,t.getGlobalTypingsCacheLocation),redirectTargetsMap:e.redirectTargetsMap,getProjectReferenceRedirect:t=>e.getProjectReferenceRedirect(t),isSourceOfProjectReferenceRedirect:t=>e.isSourceOfProjectReferenceRedirect(t),getNearestAncestorDirectoryWithPackageJson:Ze(t,t.getNearestAncestorDirectoryWithPackageJson),getFileIncludeReasons:()=>e.getFileIncludeReasons(),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function wQ(e,t){return{...CQ(e,t),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function DQ(e){return 2===e||e>=3&&e<=99||100===e}function EQ(e,t,n,r,i){return YC.createImportDeclaration(void 0,e||t?YC.createImportClause(!!i,e,t&&t.length?YC.createNamedImports(t):void 0):void 0,"string"==typeof n?PQ(n,r):n,void 0)}function PQ(e,t){return YC.createStringLiteral(e,0===t)}var NQ=(e=>(e[e.Single=0]="Single",e[e.Double=1]="Double",e))(NQ||{});function FQ(e,t){return Wm(e,t)?1:0}function AQ(e,t){if(t.quotePreference&&"auto"!==t.quotePreference)return"single"===t.quotePreference?0:1;{const t=Am(e)&&e.imports&&S(e.imports,(e=>wD(e)&&!ly(e.parent)));return t?FQ(t,e):1}}function IQ(e){switch(e){case 0:return"'";case 1:return'"';default:return xn.assertNever(e)}}function OQ(e){const t=MQ(e);return void 0===t?void 0:vc(t)}function MQ(e){return"default"!==e.escapedName?e.escapedName:g(e.declarations,(e=>{const t=Pc(e);return t&&80===t.kind?t.escapedText:void 0}))}function LQ(e){return $_(e)&&(SN(e.parent)||iN(e.parent)||AF(e.parent)||Jm(e.parent,!1)&&e.parent.arguments[0]===e||uf(e.parent)&&e.parent.arguments[0]===e)}function jQ(e){return KE(e)&&VE(e.parent)&&qD(e.name)&&!e.propertyName}function RQ(e,t){const n=e.getTypeAtLocation(t.parent);return n&&e.getPropertyOfType(n,t.name.text)}function BQ(e,t,n){if(e)for(;e.parent;){if(qN(e.parent)||!JQ(n,e.parent,t))return e;e=e.parent}}function JQ(e,t,n){return Bs(e,t.getStart(n))&&t.getEnd()<=js(e)}function zQ(e,t){return cI(e)?S(e.modifiers,(e=>e.kind===t)):void 0}function $Q(e,t,n,r,i){var o;const a=243===(ot(n)?n[0]:n).kind?Um:kp,s=F(t.statements,a),{comparer:c,isSorted:l}=vle.getOrganizeImportsStringComparerWithDetection(s,i),u=ot(n)?ve(n,((e,t)=>vle.compareImportsOrRequireStatements(e,t,c))):[n];if(null==s?void 0:s.length)if(xn.assert(Am(t)),s&&l)for(const n of u){const r=vle.getImportDeclarationInsertionIndex(s,n,c);if(0===r){const r=s[0]===t.statements[0]?{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude}:{};e.insertNodeBefore(t,s[0],n,!1,r)}else{const i=s[r-1];e.insertNodeAfter(t,i,n)}}else{const n=we(s);n?e.insertNodesAfter(t,n,u):e.insertNodesAtTopOfFile(t,u,r)}else if(Am(t))e.insertNodesAtTopOfFile(t,u,r);else for(const n of u)e.insertStatementsInNewFile(t.fileName,[n],null==(o=fc(n))?void 0:o.getSourceFile())}function qQ(e,t){return xn.assert(e.isTypeOnly),ut(e.getChildAt(0,t),mQ)}function VQ(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}function UQ(e,t,n){return(n?Et:Dt)(e.fileName,t.fileName)&&VQ(e.textSpan,t.textSpan)}function KQ(e){return(t,n)=>UQ(t,n,e)}function WQ(e,t){if(e)for(let n=0;n!!sE(e)||!(KE(e)||VE(e)||UE(e))&&"quit"))}var ZQ=function(){const e=10*X_;let t,n,r,i;c();const o=e=>s(e,17);return{displayParts:()=>{const n=t.length&&t[t.length-1].text;return i>e&&n&&"..."!==n&&(Qa(n.charCodeAt(n.length-1))||t.push(tY(" ",16)),t.push(tY("...",15))),t},writeKeyword:e=>s(e,5),writeOperator:e=>s(e,12),writePunctuation:e=>s(e,15),writeTrailingSemicolon:e=>s(e,15),writeSpace:e=>s(e,16),writeStringLiteral:e=>s(e,8),writeParameter:e=>s(e,13),writeProperty:e=>s(e,14),writeLiteral:e=>s(e,8),writeSymbol:function(n,r){i>e||(a(),i+=n.length,t.push(eY(n,r)))},writeLine:function(){i>e||(i+=1,t.push(hY()),n=!0)},write:o,writeComment:o,getText:()=>"",getTextPos:()=>0,getColumn:()=>0,getLine:()=>0,isAtStartOfLine:()=>!1,hasTrailingWhitespace:()=>!1,hasTrailingComment:()=>!1,rawWrite:vt,getIndent:()=>r,increaseIndent:()=>{r++},decreaseIndent:()=>{r--},clear:c};function a(){if(!(i>e)&&n){const e=$y(r);e&&(i+=e.length,t.push(tY(e,16))),n=!1}}function s(n,r){i>e||(a(),i+=n.length,t.push(tY(n,r)))}function c(){t=[],n=!0,r=0,i=0}}();function eY(e,t){return tY(e,function(e){const t=e.flags;return 3&t?YQ(e)?13:9:4&t||32768&t||65536&t?14:8&t?19:16&t?20:32&t?1:64&t?4:384&t?2:1536&t?11:8192&t?10:262144&t?18:524288&t||2097152&t?0:17}(t))}function tY(e,t){return{text:e,kind:oG[t]}}function nY(){return tY(" ",16)}function rY(e){return tY(Ra(e),5)}function iY(e){return tY(Ra(e),15)}function oY(e){return tY(Ra(e),12)}function aY(e){return tY(e,13)}function sY(e){return tY(e,14)}function cY(e){const t=Ba(e);return void 0===t?lY(e):rY(t)}function lY(e){return tY(e,17)}function uY(e){return tY(e,0)}function _Y(e){return tY(e,18)}function dY(e){return tY(e,24)}function pY(e,t){return{text:e,kind:oG[23],target:{fileName:Sd(t).fileName,textSpan:aQ(t)}}}function fY(e){return tY(e,22)}function mY(e,t){var n;const r=[fY(`{@${HN(e)?"link":GN(e)?"linkcode":"linkplain"} `)];if(e.name){const i=null==t?void 0:t.getSymbolAtLocation(e.name),o=i&&t?CY(i,t):void 0,a=function(e){let t=e.indexOf("://");if(0===t){for(;t"===e[n]&&t--,n++,!t)return n}return 0}(e.text),s=Gd(e.name)+e.text.slice(0,a),c=function(e){let t=0;if(124===e.charCodeAt(t++)){for(;t{e.writeType(t,n,17408|r,i)}))}function bY(e,t,n,r,i=0){return yY((o=>{e.writeSymbol(t,n,r,8|i,o)}))}function xY(e,t,n,r=0){return r|=25632,yY((i=>{e.writeSignature(t,n,r,void 0,i)}))}function SY(e,t){const n=t.getSourceFile();return yY((t=>{nq().writeNode(4,e,n,t)}))}function kY(e){return!!e.parent&&Vl(e.parent)&&e.parent.propertyName===e}function TY(e,t){return Ek(e,t.getScriptKind&&t.getScriptKind(e))}function CY(e,t){let n=e;for(;wY(n)||td(n)&&n.links.target;)n=td(n)&&n.links.target?n.links.target:mx(n,t);return n}function wY(e){return 0!=(2097152&e.flags)}function DY(e,t){return OB(mx(e,t))}function EY(e,t){for(;Qa(e.charCodeAt(t));)t+=1;return t}function PY(e,t){for(;t>-1&&Ya(e.charCodeAt(t));)t-=1;return t+1}function NY(e,t=!0){const n=e&&AY(e);return n&&!t&&MY(n),LT(n,!1)}function FY(e,t,n){let r=n(e);return r?ew(r,e):r=AY(e,n),r&&!t&&MY(r),r}function AY(e,t){const n=t?e=>FY(e,!0,t):NY,r=ZB(e,n,void 0,t?e=>e&&OY(e,!0,t):e=>e&&IY(e),n);return r===e?sI(wD(e)?ew(YC.createStringLiteralFromNode(e),e):TD(e)?ew(YC.createNumericLiteral(e.text,e.numericLiteralFlags),e):YC.cloneNode(e),e):(r.parent=void 0,r)}function IY(e,t=!0){if(e){const n=YC.createNodeArray(e.map((e=>NY(e,t))),e.hasTrailingComma);return sI(n,e),n}return e}function OY(e,t,n){return YC.createNodeArray(e.map((e=>FY(e,t,n))),e.hasTrailingComma)}function MY(e){LY(e),jY(e)}function LY(e){BY(e,1024,JY)}function jY(e){BY(e,2048,Nx)}function RY(e,t){const n=e.getSourceFile();!function(e,t){const n=e.getFullStart(),r=e.getStart();for(let e=n;ee))}function zY(e,t){let n=e;for(let r=1;!Pd(t,n);r++)n=`${e}_${r}`;return n}function $Y(e,t,n,r){let i=0,o=-1;for(const{fileName:a,textChanges:s}of e){xn.assert(a===t);for(const e of s){const{span:t,newText:a}=e,s=WY(a,Fy(n));if(-1!==s&&(o=t.start+i+s,!r))return o;i+=a.length-t.length}}return xn.assert(r),xn.assert(o>=0),o}function qY(e,t,n,r,i){fs(n.text,e.pos,KY(t,n,r,i,yw))}function VY(e,t,n,r,i){ms(n.text,e.end,KY(t,n,r,i,xw))}function UY(e,t,n,r,i){ms(n.text,e.pos,KY(t,n,r,i,yw))}function KY(e,t,n,r,i){return(o,a,s,c)=>{3===s?(o+=2,a-=2):o+=2,i(e,n||s,t.text.slice(o,a),void 0!==r?r:c)}}function WY(e,t){if(an(e,t))return 0;let n=e.indexOf(" "+t);return-1===n&&(n=e.indexOf("."+t)),-1===n&&(n=e.indexOf('"'+t)),-1===n?-1:n+1}function HY(e){return uP(e)&&28===e.operatorToken.kind||HE(e)||(yP(e)||vP(e))&&HE(e.expression)}function GY(e,t,n){const r=ah(e.parent);switch(r.kind){case 214:return t.getContextualType(r,n);case 226:{const{left:i,operatorToken:o,right:a}=r;return QY(o.kind)?t.getTypeAtLocation(e===a?i:a):t.getContextualType(e,n)}case 296:return eZ(r,t);default:return t.getContextualType(e,n)}}function XY(e,t,n){const r=AQ(e,t),i=JSON.stringify(n);return 0===r?`'${By(i).replace(/'/g,(()=>"\\'")).replace(/\\"/g,'"')}'`:i}function QY(e){switch(e){case 37:case 35:case 38:case 36:return!0;default:return!1}}function YY(e){switch(e.kind){case 11:case 15:case 228:case 215:return!0;default:return!1}}function ZY(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()}function eZ(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}var tZ="anonymous function";function nZ(e,t,n,r){const i=n.getTypeChecker();let o=!0;const a=()=>o=!1,s=i.typeToTypeNode(e,t,1,{trackSymbol:(e,t,n)=>(o=o&&0===i.isSymbolAccessible(e,t,n,!1).accessibility,!o),reportInaccessibleThisError:a,reportPrivateInBaseOfClassExpression:a,reportInaccessibleUniqueSymbolError:a,moduleResolverHost:wQ(n,r)});return o?s:void 0}function rZ(e){return 179===e||180===e||181===e||171===e||173===e}function iZ(e){return 262===e||176===e||174===e||177===e||178===e}function oZ(e){return 267===e}function aZ(e){return 243===e||244===e||246===e||251===e||252===e||253===e||257===e||259===e||172===e||265===e||272===e||271===e||278===e||270===e||277===e}var sZ=_n(rZ,iZ,oZ,aZ);function cZ(e,t,n){const r=mc(t,(t=>t.end!==e?"quit":sZ(t.kind)));return!!r&&function(e,t){const n=e.getLastToken(t);if(n&&27===n.kind)return!1;if(rZ(e.kind)){if(n&&28===n.kind)return!1}else if(oZ(e.kind)){const n=De(e.getChildren(t));if(n&&eN(n))return!1}else if(iZ(e.kind)){const n=De(e.getChildren(t));if(n&&zf(n))return!1}else if(!aZ(e.kind))return!1;if(246===e.kind)return!0;const r=DX(e,mc(e,(e=>!e.parent)),t);return!r||20===r.kind||t.getLineAndCharacterOfPosition(e.getEnd()).line!==t.getLineAndCharacterOfPosition(r.getStart(t)).line}(r,n)}function lZ(e){let t=0,n=0;return LI(e,(function r(i){if(aZ(i.kind)){const r=i.getLastToken(e);27===(null==r?void 0:r.kind)?t++:n++}else if(rZ(i.kind)){const r=i.getLastToken(e);27===(null==r?void 0:r.kind)?t++:r&&28!==r.kind&&Xa(e,r.getStart(e)).line!==Xa(e,Gp(e,r.end).start).line&&n++}return t+n>=5||LI(i,r)})),0===t&&n<=1||t/n>.2}function uZ(e,t){return mZ(e,e.getDirectories,t)||[]}function _Z(e,t,n,r,i){return mZ(e,e.readDirectory,t,n,r,i)||u}function dZ(e,t){return mZ(e,e.fileExists,t)}function pZ(e,t){return fZ((()=>zb(t,e)))||!1}function fZ(e){try{return e()}catch{return}}function mZ(e,t,...n){return fZ((()=>t&&t.apply(e,n)))}function gZ(e,t,n){const r=[];return ga(e,(e=>{if(e===n)return!0;const i=Ko(e,"package.json");dZ(t,i)&&r.push(i)})),r}function hZ(e,t){let n;return ga(e,(e=>"node_modules"===e||(n=bq(e,(e=>dZ(t,e)),"package.json"),!!n||void 0))),n}function yZ(e,t){if(!t.fileExists)return[];const n=[];return ga(Ro(e),(e=>{const r=Ko(e,"package.json");if(t.fileExists(r)){const e=vZ(r,t);e&&n.push(e)}})),n}function vZ(e,t){if(!t.readFile)return;const n=["dependencies","devDependencies","optionalDependencies","peerDependencies"],r=Jb(t.readFile(e)||""),i={};if(r)for(const e of n){const t=r[e];if(!t)continue;const n=new Map;for(const e in t)n.set(e,t[e]);i[e]=n}const o=[[1,i.dependencies],[2,i.devDependencies],[8,i.optionalDependencies],[4,i.peerDependencies]];return{...i,parseable:!!r,fileName:e,get:a,has:(e,t)=>!!a(e,t)};function a(e,t=15){for(const[n,r]of o)if(r&&t&n){const t=r.get(e);if(void 0!==t)return t}}}function bZ(e,t,n){const r=(n.getPackageJsonsVisibleToFile&&n.getPackageJsonsVisibleToFile(e.fileName)||yZ(e.fileName,n)).filter((e=>e.parseable));let i,o,a;return{allowsImportingAmbientModule:function(e,t){if(!r.length||!e.valueDeclaration)return!0;if(o){const t=o.get(e);if(void 0!==t)return t}else o=new Map;const n=By(e.getName());if(c(n))return o.set(e,!0),!0;const i=l(e.valueDeclaration.getSourceFile().fileName,t);if(void 0===i)return o.set(e,!0),!0;const a=s(i)||s(n);return o.set(e,a),a},allowsImportingSourceFile:function(e,t){if(!r.length)return!0;if(a){const t=a.get(e);if(void 0!==t)return t}else a=new Map;const n=l(e.fileName,t);if(!n)return a.set(e,!0),!0;const i=s(n);return a.set(e,i),i},allowsImportingSpecifier:function(e){return!(r.length&&!c(e))||(!(!Po(e)&&!wo(e))||s(e))}};function s(e){const t=u(e);for(const e of r)if(e.has(t)||e.has(fR(t)))return!0;return!1}function c(t){return!!(Am(e)&&Im(e)&&fH.nodeCoreModules.has(t)&&(void 0===i&&(i=xZ(e)),i))}function l(r,i){if(!r.includes("node_modules"))return;const o=JR.getNodeModulesPackageName(n.getCompilationSettings(),e,r,i,t);return o?Po(o)||wo(o)?void 0:u(o):void 0}function u(e){const t=$o(gR(e)).slice(1);return an(t[0],"@")?`${t[0]}/${t[1]}`:t[0]}}function xZ(e){return Q(e.imports,(({text:e})=>fH.nodeCoreModules.has(e)))}function SZ(e){return D($o(e),"node_modules")}function kZ(e){return void 0!==e.file&&void 0!==e.start&&void 0!==e.length}function TZ(e,t){const n=Ie(t,aQ(e),mt,Ft);if(n>=0){const r=t[n];return xn.assertEqual(r.file,e.getSourceFile(),"Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"),ut(r,kZ)}}function CZ(e,t){var n;let r=Ie(t,e.start,(e=>e.start),Nt);for(r<0&&(r=~r);(null==(n=t[r-1])?void 0:n.start)===e.start;)r--;const i=[],o=js(e);for(;;){const n=lt(t[r],kZ);if(!n||n.start>o)break;zs(e,n)&&i.push(n),r++}return i}function wZ({startPosition:e,endPosition:t}){return Xs(e,void 0===t?e:t)}function DZ(e,t){return mc(kX(e,t.start),(n=>n.getStart(e)js(t)?"quit":Xu(n)&&VQ(t,aQ(n,e))))}function EZ(e,t,n=mt){return e?ot(e)?n(O(e,t)):t(e,0):void 0}function PZ(e){return ot(e)?Te(e):e}function NZ(e,t){if(AZ(e)){const n=IZ(e);if(n)return n;const r=MZ(OZ(e),t,!1),i=MZ(OZ(e),t,!0);return r===i?r:[r,i]}return e.name}function FZ(e,t,n){return AZ(e)?IZ(e)||MZ(OZ(e),t,!!n):e.name}function AZ(e){return!(33554432&e.flags||"export="!==e.escapedName&&"default"!==e.escapedName)}function IZ(e){return g(e.declarations,(e=>{var t,n,r;return mN(e)?null==(t=lt(fA(e.expression),qD))?void 0:t.text:yN(e)&&2097152===e.symbol.flags?null==(n=lt(e.propertyName,qD))?void 0:n.text:null==(r=lt(Pc(e),qD))?void 0:r.text}))}function OZ(e){var t;return xn.checkDefined(e.parent,`Symbol parent was undefined. Flags: ${xn.formatSymbolFlags(e.flags)}. Declarations: ${null==(t=e.declarations)?void 0:t.map((e=>{const t=xn.formatSyntaxKind(e.kind),n=Mm(e),{expression:r}=e;return(n?"[JS]":"")+t+(r?` (expression: ${xn.formatSyntaxKind(r.kind)})`:"")})).join(", ")}.`)}function MZ(e,t,n){return LZ(Yk(By(e.name)),t,n)}function LZ(e,t,n){const r=Bo(Ht(e,"/index"));let i="",o=!0;const a=r.charCodeAt(0);Ss(a,t)?(i+=String.fromCharCode(a),n&&(i=i.toUpperCase())):o=!1;for(let e=1;ee.length)return!1;for(let i=0;iZP(e)&&pp(e))))}function zZ(e){return!!(65536&lc(e))}function $Z(e,t){return g(e.imports,(e=>{if(fH.nodeCoreModules.has(e.text))return an(e.text,"node:")}))??t.usesUriStyleNodeCoreModules}function qZ(e){return"\n"===e?1:0}function VZ(e){return ot(e)?Yx(tS(e[0]),e.slice(1)):tS(e)}function UZ({options:e},t){const n=!e.semicolons||"ignore"===e.semicolons,r="remove"===e.semicolons||n&&!lZ(t);return{...e,semicolons:r?"remove":"ignore"}}function KZ(e){return 2===e||3===e}function WZ(e,t){return e.isSourceFileFromExternalLibrary(t)||e.isSourceFileDefaultLibrary(t)}function HZ(e,t){const n=new Set,r=new Set,i=new Set;for(const a of t)if(!LN(a)){const t=lh(a.expression);if(Bl(t))switch(t.kind){case 15:case 11:n.add(t.text);break;case 9:r.add(parseInt(t.text));break;case 10:const e=kT(Wt(t.text,"n")?t.text.slice(0,-1):t.text);e&&i.add(ST(e))}else{const t=e.getSymbolAtLocation(a.expression);if(t&&t.valueDeclaration&&$N(t.valueDeclaration)){const n=e.getConstantValue(t.valueDeclaration);void 0!==n&&o(n)}}}return{addValue:o,hasValue:function(e){switch(typeof e){case"string":return n.has(e);case"number":return r.has(e);case"object":return i.has(ST(e))}}};function o(e){switch(typeof e){case"string":n.add(e);break;case"number":r.add(e)}}}function GZ(e,t,n,r){var i;if(!qk("string"==typeof e?e:e.fileName))return!1;const o=t.getCompilerOptions(),a=DS(o),s="string"==typeof e?pV(Yo(e,n.getCurrentDirectory(),Wy(n)),null==(i=t.getPackageJsonInfoCache)?void 0:i.call(t),n,o):e.impliedNodeFormat;if(99===s)return!1;if(1===s)return!0;if(o.verbatimModuleSyntax&&1===a)return!0;if(o.verbatimModuleSyntax&&$S(a))return!1;if("object"==typeof e){if(e.commonJsModuleIndicator)return!0;if(e.externalModuleIndicator)return!1}return r}function XZ(e){switch(e.kind){case 241:case 307:case 268:case 296:return!0;default:return!1}}function QZ(e,t,n,r){var i;const o=fV(e,null==(i=n.getPackageJsonInfoCache)?void 0:i.call(n),r,n.getCompilerOptions());let a,s;return"object"==typeof o&&(a=o.impliedNodeFormat,s=o.packageJsonScope),{path:Yo(e,n.getCurrentDirectory(),n.getCanonicalFileName),fileName:e,externalModuleIndicator:99===t||void 0,commonJsModuleIndicator:1===t||void 0,impliedNodeFormat:a,packageJsonScope:s,statements:u,imports:u}}var YZ=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.Namespace=2]="Namespace",e[e.CommonJS=3]="CommonJS",e))(YZ||{}),ZZ=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals",e[e.UMD=3]="UMD",e))(ZZ||{});function e0(e){let t=1;const n=et(),r=new Map,i=new Map;let o;const a={isUsableByFile:e=>e===o,isEmpty:()=>!n.size,clear:()=>{n.clear(),r.clear(),o=void 0},add:(e,s,c,l,u,_,d,p)=>{let f;if(e!==o&&(a.clear(),o=e),u){const t=XT(u.fileName);if(t){const{topLevelNodeModulesIndex:n,topLevelPackageNameIndex:r,packageRootIndex:o}=t;if(f=hR(gR(u.fileName.substring(r+1,o))),an(e,u.path.substring(0,n))){const e=i.get(f),t=u.fileName.substring(0,r+1);e?n>e.indexOf(Ij)&&i.set(f,t):i.set(f,t)}}}const m=1===_&&Ab(s)||s,g=0===_||nd(m)?vc(c):NZ(m,void 0),h="string"==typeof g?g:g[0],y="string"==typeof g?void 0:g[1],v=By(l.name),b=t++,x=mx(s,p),S=33554432&s.flags?void 0:s,k=33554432&l.flags?void 0:l;S&&k||r.set(b,[s,l]),n.add(function(e,t,n,r){const i=n||"";return`${e.length} ${OB(mx(t,r))} ${e} ${i}`}(h,s,Os(v)?void 0:v,p),{id:b,symbolTableKey:c,symbolName:h,capitalizedSymbolName:y,moduleName:v,moduleFile:u,moduleFileName:null==u?void 0:u.fileName,packageName:f,exportKind:_,targetFlags:x.flags,isFromPackageJson:d,symbol:S,moduleSymbol:k})},get:(e,t)=>{if(e!==o)return;const r=n.get(t);return null==r?void 0:r.map(s)},search:(t,r,a,c)=>{if(t===o)return ld(n,((t,n)=>{const{symbolName:o,ambientModuleName:l}=function(e){const t=e.indexOf(" "),n=e.indexOf(" ",t+1),r=parseInt(e.substring(0,t),10),i=e.substring(n+1),o=i.substring(0,r),a=i.substring(r+1);return{symbolName:o,ambientModuleName:""===a?void 0:a}}(n),u=r&&t[0].capitalizedSymbolName||o;if(a(u,t[0].targetFlags)){const r=t.map(s).filter(((n,r)=>function(t,n){if(!n||!t.moduleFileName)return!0;const r=e.getGlobalTypingsCacheLocation();if(r&&an(t.moduleFileName,r))return!0;const o=i.get(n);return!o||an(t.moduleFileName,o)}(n,t[r].packageName)));if(r.length){const e=c(r,u,!!l,n);if(void 0!==e)return e}}}))},releaseSymbols:()=>{r.clear()},onFileChanged:(e,t,n)=>!(c(e)&&c(t)||(o&&o!==t.path||n&&xZ(e)!==xZ(t)||!se(e.moduleAugmentations,t.moduleAugmentations)||!function(e,t){if(!se(e.ambientModuleNames,t.ambientModuleNames))return!1;let n=-1,r=-1;for(const i of t.ambientModuleNames){const o=e=>lp(e)&&e.name.text===i;if(n=T(e.statements,o,n+1),r=T(t.statements,o,r+1),e.statements[n]!==t.statements[r])return!1}return!0}(e,t)?(a.clear(),0):(o=t.path,1)))};return xn.isDebugging&&Object.defineProperty(a,"__cache",{value:n}),a;function s(t){if(t.symbol&&t.moduleSymbol)return t;const{id:n,exportKind:i,targetFlags:o,isFromPackageJson:a,moduleFileName:s}=t,[c,l]=r.get(n)||u;if(c&&l)return{symbol:c,moduleSymbol:l,moduleFileName:s,exportKind:i,targetFlags:o,isFromPackageJson:a};const _=(a?e.getPackageJsonAutoImportProvider():e.getCurrentProgram()).getTypeChecker(),d=t.moduleSymbol||l||xn.checkDefined(t.moduleFile?_.getMergedSymbol(t.moduleFile.symbol):_.tryFindAmbientModule(t.moduleName)),p=t.symbol||c||xn.checkDefined(2===i?_.resolveExternalModuleSymbol(d):_.tryGetMemberInModuleExportsAndProperties(vc(t.symbolTableKey),d),`Could not find symbol '${t.symbolName}' by key '${t.symbolTableKey}' in module ${d.name}`);return r.set(n,[p,d]),{symbol:p,moduleSymbol:d,moduleFileName:s,exportKind:i,targetFlags:o,isFromPackageJson:a}}function c(e){return!(e.commonJsModuleIndicator||e.externalModuleIndicator||e.moduleAugmentations||e.ambientModuleNames)}}function t0(e,t,n,r,i,o,a){var s;if(t===n)return!1;const c=null==a?void 0:a.get(t.path,n.path,r,{});if(void 0!==(null==c?void 0:c.isBlockedByPackageJsonDependencies))return!c.isBlockedByPackageJsonDependencies;const l=Wy(o),u=null==(s=o.getGlobalTypingsCacheLocation)?void 0:s.call(o),_=!!JR.forEachFileNameOfModule(t.fileName,n.fileName,o,!1,(r=>{const i=e.getSourceFile(r);return(i===n||!i)&&function(e,t,n,r){const i=ga(t,(e=>"node_modules"===Bo(e)?e:void 0)),o=i&&Ro(n(i));return void 0===o||an(n(e),o)||!!r&&an(n(r),o)}(t.fileName,r,l,u)}));if(i){const e=_&&i.allowsImportingSourceFile(n,o);return null==a||a.setBlockedByPackageJsonDependencies(t.path,n.path,r,{},!e),e}return _}function n0(e,t,n,r,i){var o,a;const s=Ky(t),c=n.autoImportFileExcludePatterns&&q(n.autoImportFileExcludePatterns,(e=>{const t=xk(e,"","exclude");return t?Tk(t,s):void 0}));r0(e.getTypeChecker(),e.getSourceFiles(),c,t,((t,n)=>i(t,n,e,!1)));const l=r&&(null==(o=t.getPackageJsonAutoImportProvider)?void 0:o.call(t));if(l){const n=Yn(),r=e.getTypeChecker();r0(l.getTypeChecker(),l.getSourceFiles(),c,t,((t,n)=>{(n&&!e.getSourceFile(n.fileName)||!n&&!r.resolveName(t.name,void 0,1536,!1))&&i(t,n,l,!0)})),null==(a=t.log)||a.call(t,"forEachExternalModuleToImportFrom autoImportProvider: "+(Yn()-n))}}function r0(e,t,n,r,i){var o,a;const s=null==(o=r.getSymlinkCache)?void 0:o.call(r).getSymlinkedDirectoriesByRealpath(),c=n&&(({fileName:e,path:t})=>{if(n.some((t=>t.test(e))))return!0;if((null==s?void 0:s.size)&&Oj(e)){let r=Ro(e);return ga(Ro(t),(t=>{const i=s.get(ea(t));if(i)return i.some((t=>n.some((n=>n.test(e.replace(r,t))))));r=Ro(r)}))??!1}return!1});for(const t of e.getAmbientModules())t.name.includes("*")||n&&(null==(a=t.declarations)?void 0:a.every((e=>c(e.getSourceFile()))))||i(t,void 0);for(const n of t)Zp(n)&&!(null==c?void 0:c(n))&&i(e.getMergedSymbol(n.symbol),n)}function i0(e,t,n,r,i){var o,a,s,c,l;const u=Yn();null==(o=t.getPackageJsonAutoImportProvider)||o.call(t);const _=(null==(a=t.getCachedExportInfoMap)?void 0:a.call(t))||e0({getCurrentProgram:()=>n,getPackageJsonAutoImportProvider:()=>{var e;return null==(e=t.getPackageJsonAutoImportProvider)?void 0:e.call(t)},getGlobalTypingsCacheLocation:()=>{var e;return null==(e=t.getGlobalTypingsCacheLocation)?void 0:e.call(t)}});if(_.isUsableByFile(e.path))return null==(s=t.log)||s.call(t,"getExportInfoMap: cache hit"),_;null==(c=t.log)||c.call(t,"getExportInfoMap: cache miss or empty; calculating new results");let d=0;try{n0(n,t,r,!0,((t,n,r,o)=>{++d%100==0&&(null==i||i.throwIfCancellationRequested());const a=new Map,s=r.getTypeChecker(),c=o0(t,s);c&&a0(c.symbol,s)&&_.add(e.path,c.symbol,1===c.exportKind?"default":"export=",t,n,c.exportKind,o,s),s.forEachExportAndPropertyOfModule(t,((r,i)=>{r!==(null==c?void 0:c.symbol)&&a0(r,s)&&Fx(a,i)&&_.add(e.path,r,i,t,n,0,o,s)}))}))}catch(e){throw _.clear(),e}return null==(l=t.log)||l.call(t,`getExportInfoMap: done in ${Yn()-u} ms`),_}function o0(e,t){const n=t.resolveExternalModuleSymbol(e);if(n!==e)return{symbol:n,exportKind:2};const r=t.tryGetMemberInModuleExports("default",e);return r?{symbol:r,exportKind:1}:void 0}function a0(e,t){return!(t.isUndefinedSymbol(e)||t.isUnknownSymbol(e)||Yh(e)||Zh(e))}function s0(e,t,n,r,i){let o,a=e;for(;a;){const e=IZ(a);if(e){const t=i(e);if(t)return t}if("default"!==a.escapedName&&"export="!==a.escapedName){const e=i(a.name);if(e)return e}o=ue(o,a),a=2097152&a.flags?t.getImmediateAliasedSymbol(a):void 0}for(const e of o??u)if(e.parent&&nd(e.parent)){const t=i(MZ(e.parent,wS(n),r));if(t)return t}}function c0(){const e=Cs(99,!1);function t(t,n,r){let i=0,o=0;const a=[],{prefix:s,pushTemplate:c}=function(e){switch(e){case 3:return{prefix:'"\\\n'};case 2:return{prefix:"'\\\n"};case 1:return{prefix:"/*\n"};case 4:return{prefix:"`\n"};case 5:return{prefix:"}\n",pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return xn.assertNever(e)}}(n);t=s+t;const l=s.length;c&&a.push(16),e.setText(t);let u=0;const _=[];let d=0;do{i=e.scan(),Rh(i)||(p(),o=i);const n=e.getTokenEnd();if(d0(e.getTokenStart(),n,l,f0(i),_),n>=t.length){const t=_0(e,i,we(a));void 0!==t&&(u=t)}}while(1!==i);function p(){switch(i){case 44:case 69:u0[o]||14!==e.reScanSlashToken()||(i=14);break;case 30:80===o&&d++;break;case 32:d>0&&d--;break;case 133:case 154:case 150:case 136:case 155:d>0&&!r&&(i=80);break;case 16:a.push(i);break;case 19:a.length>0&&a.push(i);break;case 20:if(a.length>0){const t=we(a);16===t?(i=e.reScanTemplateToken(!1),18===i?a.pop():xn.assertEqual(i,17,"Should have been a template middle.")):(xn.assertEqual(t,19,"Should have been an open brace"),a.pop())}break;default:if(!Ph(i))break;(25===o||Ph(o)&&Ph(i)&&!function(e,t){if(!ZX(e))return!0;switch(t){case 139:case 153:case 137:case 126:case 129:return!0;default:return!1}}(o,i))&&(i=80)}}return{endOfLineState:u,spans:_}}return{getClassificationsForLine:function(e,n,r){return function(e,t){const n=[],r=e.spans;let i=0;for(let e=0;e=0){const e=t-i;e>0&&n.push({length:e,classification:4})}n.push({length:o,classification:p0(a)}),i=t+o}const o=t.length-i;return o>0&&n.push({length:o,classification:4}),{entries:n,finalLexState:e.endOfLineState}}(t(e,n,r),e)},getEncodedLexicalClassifications:t}}var l0,u0=Ke([80,11,9,10,14,110,46,47,22,24,20,112,97],(e=>e),(()=>!0));function _0(e,t,n){switch(t){case 11:{if(!e.isUnterminated())return;const t=e.getTokenText(),n=t.length-1;let r=0;for(;92===t.charCodeAt(n-r);)r++;if(0==(1&r))return;return 34===t.charCodeAt(0)?3:2}case 3:return e.isUnterminated()?1:void 0;default:if(zl(t)){if(!e.isUnterminated())return;switch(t){case 18:return 5;case 15:return 4;default:return xn.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+t)}}return 16===n?6:void 0}}function d0(e,t,n,r,i){if(8===r)return;0===e&&n>0&&(e+=n);const o=t-e;o>0&&i.push(e-n,o,r)}function p0(e){switch(e){case 1:return 3;case 3:return 1;case 4:return 6;case 25:return 7;case 5:return 2;case 6:return 8;case 8:return 4;case 10:return 0;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return 5;default:return}}function f0(e){if(Ph(e))return 3;if(function(e){switch(e){case 42:case 44:case 45:case 40:case 41:case 48:case 49:case 50:case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:case 35:case 36:case 37:case 38:case 51:case 53:case 52:case 56:case 57:case 75:case 74:case 79:case 71:case 72:case 73:case 65:case 66:case 67:case 69:case 70:case 64:case 28:case 61:case 76:case 77:case 78:return!0;default:return!1}}(e)||function(e){switch(e){case 40:case 41:case 55:case 54:case 46:case 47:return!0;default:return!1}}(e))return 5;if(e>=19&&e<=79)return 10;switch(e){case 9:return 4;case 10:return 25;case 11:return 6;case 14:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;default:return zl(e)?6:2}}function m0(e,t,n,r,i){return b0(h0(e,t,n,r,i))}function g0(e,t){switch(t){case 267:case 263:case 264:case 262:case 231:case 218:case 219:e.throwIfCancellationRequested()}}function h0(e,t,n,r,i){const o=[];return n.forEachChild((function a(s){if(s&&Us(i,s.pos,s.getFullWidth())){if(g0(t,s.kind),qD(s)&&!Nd(s)&&r.has(s.escapedText)){const t=e.getSymbolAtLocation(s),r=t&&y0(t,yG(s),e);r&&function(e,t,n){const r=t-e;xn.assert(r>0,`Classification had non-positive length of ${r}`),o.push(e),o.push(r),o.push(n)}(s.getStart(n),s.getEnd(),r)}s.forEachChild(a)}})),{spans:o,endOfLineState:0}}function y0(e,t,n){const r=e.getFlags();return 0==(2885600&r)?void 0:32&r?11:384&r?12:524288&r?16:1536&r?4&t||1&t&&function(e){return Q(e.declarations,(e=>ZP(e)&&1===DR(e)))}(e)?14:void 0:2097152&r?y0(n.getAliasedSymbol(e),t,n):2&t?64&r?13:262144&r?15:void 0:void 0}function v0(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function b0(e){xn.assert(e.spans.length%3==0);const t=e.spans,n=[];for(let e=0;e])*)(\/>)?)?/im.exec(i);if(!o)return!1;if(!o[3]||!(o[3]in Ki))return!1;let a=e;u(a,o[1].length),a+=o[1].length,c(a,o[2].length,10),a+=o[2].length,c(a,o[3].length,21),a+=o[3].length;const s=o[4];let l=a;for(;;){const e=r.exec(s);if(!e)break;const t=a+e.index+e[1].length;t>l&&(u(l,t-l),l=t),c(l,e[2].length,22),l+=e[2].length,e[3].length&&(u(l,e[3].length),l+=e[3].length),c(l,e[4].length,5),l+=e[4].length,e[5].length&&(u(l,e[5].length),l+=e[5].length),c(l,e[6].length,24),l+=e[6].length}a+=o[4].length,a>l&&u(l,a-l),o[5]&&(c(a,o[5].length,10),a+=o[5].length);const _=e+n;return a<_&&u(a,_-a),!0}(r,i))return;u(r,i)}function u(e,t){c(e,t,1)}function _(e){for(const t of e.getChildren())g(t)}function d(e,t,n){let r;for(r=t;r=0),i>0){const t=n||m(e.kind,e);t&&c(r,i,t)}return!0}function m(e,t){if(Ph(e))return 3;if((30===e||32===e)&&t&&WX(t.parent))return 10;if(Nh(e)){if(t){const n=t.parent;if(64===e&&(260===n.kind||172===n.kind||169===n.kind||291===n.kind))return 5;if(226===n.kind||224===n.kind||225===n.kind||227===n.kind)return 5}return 10}if(9===e)return 4;if(10===e)return 25;if(11===e)return t&&291===t.parent.kind?24:6;if(14===e)return 6;if(zl(e))return 6;if(12===e)return 23;if(80===e){if(t){switch(t.parent.kind){case 263:return t.parent.name===t?11:void 0;case 168:return t.parent.name===t?15:void 0;case 264:return t.parent.name===t?13:void 0;case 266:return t.parent.name===t?12:void 0;case 267:return t.parent.name===t?14:void 0;case 169:return t.parent.name===t?yv(t)?3:17:void 0}if(Dl(t.parent))return 3}return 2}}function g(n){if(n&&Ks(r,i,n.pos,n.getFullWidth())){g0(e,n.kind);for(const e of n.getChildren(t))f(e)||g(e)}}}function k0(e){return!!e.sourceFile}function T0(e,t,n){return C0(e,t,n)}function C0(e,t="",n,r){const i=new Map,o=tn(!!e);function a(e){return"function"==typeof e.getCompilationSettings?e.getCompilationSettings():e}function s(e,t,n,r,i,o,a,s){return u(e,t,n,r,i,o,!0,a,s)}function c(e,t,n,r,i,o,s,c){return u(e,t,a(n),r,i,o,!1,s,c)}function l(e,t){const n=k0(e)?e:e.get(xn.checkDefined(t,"If there are more than one scriptKind's for same document the scriptKind should be provided"));return xn.assert(void 0===t||!n||n.sourceFile.scriptKind===t,`Script kind should match provided ScriptKind:${t} and sourceFile.scriptKind: ${null==n?void 0:n.sourceFile.scriptKind}, !entry: ${!n}`),n}function u(e,t,o,s,c,u,_,d,p){var f,m,g,h;d=Ek(e,d);const y=a(o),v=o===y?void 0:o,b=6===d?100:wS(y),x="object"==typeof p?p:{languageVersion:b,impliedNodeFormat:v&&pV(t,null==(h=null==(g=null==(m=null==(f=v.getCompilerHost)?void 0:f.call(v))?void 0:m.getModuleResolutionCache)?void 0:g.call(m))?void 0:h.getPackageJsonInfoCache(),v,y),setExternalModuleIndicator:TS(y),jsDocParsingMode:n};x.languageVersion=b,xn.assertEqual(n,x.jsDocParsingMode);const S=i.size,k=D0(s,x.impliedNodeFormat),T=K(i,k,(()=>new Map));if(or){i.size>S&&or.instant(or.Phase.Session,"createdDocumentRegistryBucket",{configFilePath:y.configFilePath,key:k});const e=!QI(t)&&ld(i,((e,n)=>n!==k&&e.has(t)&&n));e&&or.instant(or.Phase.Session,"documentRegistryBucketOverlap",{path:t,key1:e,key2:k})}const C=T.get(t);let w=C&&l(C,d);if(!w&&r){const e=r.getDocument(k,t);e&&e.scriptKind===d&&e.text===yQ(c)&&(xn.assert(_),w={sourceFile:e,languageServiceRefCount:0},D())}if(w)w.sourceFile.version!==u&&(w.sourceFile=D7(w.sourceFile,c,u,c.getChangeRange(w.sourceFile.scriptSnapshot)),r&&r.setDocument(k,t,w.sourceFile)),_&&w.languageServiceRefCount++;else{const n=w7(e,c,x,u,!1,d);r&&r.setDocument(k,t,n),w={sourceFile:n,languageServiceRefCount:1},D()}return xn.assert(0!==w.languageServiceRefCount),w.sourceFile;function D(){if(C)if(k0(C)){const e=new Map;e.set(C.sourceFile.scriptKind,C),e.set(d,w),T.set(t,e)}else C.set(d,w);else T.set(t,w)}}function _(e,t,n,r){const o=xn.checkDefined(i.get(D0(t,r))),a=o.get(e),s=l(a,n);s.languageServiceRefCount--,xn.assert(s.languageServiceRefCount>=0),0===s.languageServiceRefCount&&(k0(a)?o.delete(e):(a.delete(n),1===a.size&&o.set(e,h(a.values(),mt))))}return{acquireDocument:function(e,n,r,i,c,l){return s(e,Yo(e,t,o),n,w0(a(n)),r,i,c,l)},acquireDocumentWithKey:s,updateDocument:function(e,n,r,i,s,l){return c(e,Yo(e,t,o),n,w0(a(n)),r,i,s,l)},updateDocumentWithKey:c,releaseDocument:function(e,n,r,i){return _(Yo(e,t,o),w0(n),r,i)},releaseDocumentWithKey:_,getKeyForCompilationSettings:w0,getDocumentRegistryBucketKeyWithMode:D0,reportStats:function(){const e=$e(i.keys()).filter((e=>e&&"_"===e.charAt(0))).map((e=>{const t=i.get(e),n=[];return t.forEach(((e,t)=>{k0(e)?n.push({name:t,scriptKind:e.sourceFile.scriptKind,refCount:e.languageServiceRefCount}):e.forEach(((e,r)=>n.push({name:t,scriptKind:r,refCount:e.languageServiceRefCount})))})),n.sort(((e,t)=>t.refCount-e.refCount)),{bucket:e,sourceFiles:n}}));return JSON.stringify(e,void 0,2)},getBuckets:()=>i}}function w0(e){return lj(e,CO)}function D0(e,t){return t?`${e}|${t}`:e}function E0(e,t,n,r,i,o,a){const s=Ky(r),c=tn(s),l=P0(t,n,c,a),u=P0(n,t,c,a);return r_e.ChangeTracker.with({host:r,formatContext:i,preferences:o},(i=>{!function(e,t,n,r,i,o,a){const{configFile:s}=e.getCompilerOptions();if(!s)return;const c=Ro(s.fileName),l=Hf(s);function u(e){const t=WE(e.initializer)?e.initializer.elements:[e.initializer];let n=!1;for(const e of t)n=_(e)||n;return n}function _(e){if(!wD(e))return!1;const r=N0(c,e.text),i=n(r);return void 0!==i&&(t.replaceRangeWithText(s,O0(e,s),d(i)),!0)}function d(e){return da(c,e,!a)}l&&M0(l,((e,n)=>{switch(n){case"files":case"include":case"exclude":{if(u(e)||"include"!==n||!WE(e.initializer))return;const l=q(e.initializer.elements,(e=>wD(e)?e.text:void 0));if(0===l.length)return;const _=kk(c,[],l,a,o);return void(Tk(xn.checkDefined(_.includeFilePattern),a).test(r)&&!Tk(xn.checkDefined(_.includeFilePattern),a).test(i)&&t.insertNodeAfter(s,De(e.initializer.elements),YC.createStringLiteral(d(i))))}case"compilerOptions":return void M0(e.initializer,((e,t)=>{const n=GO(t);xn.assert("listOrElement"!==(null==n?void 0:n.type)),n&&(n.isFilePath||"list"===n.type&&n.element.isFilePath)?u(e):"paths"===t&&M0(e.initializer,(e=>{if(WE(e.initializer))for(const t of e.initializer.elements)_(t)}))}))}}))}(e,i,l,t,n,r.getCurrentDirectory(),s),function(e,t,n,r,i,o){const a=e.getSourceFiles();for(const s of a){const c=n(s.fileName),l=c??s.fileName,u=Ro(l),_=r(s.fileName),d=_||s.fileName,p=Ro(d),f=void 0!==c||void 0!==_;I0(s,t,(e=>{if(!Po(e))return;const t=N0(p,e),r=n(t);return void 0===r?void 0:ta(da(u,r,o))}),(t=>{const r=e.getTypeChecker().getSymbolAtLocation(t);if((null==r?void 0:r.declarations)&&r.declarations.some((e=>sp(e))))return;const o=void 0!==_?A0(t,Sj(t.text,d,e.getCompilerOptions(),i),n,a):F0(r,t,s,e,i,n);return void 0!==o&&(o.updated||f&&Po(t.text))?JR.updateModuleSpecifier(e.getCompilerOptions(),s,l,o.newFileName,CQ(e,i),t.text):void 0}))}}(e,i,l,u,r,c)}))}function P0(e,t,n,r){const i=n(e);return e=>{const o=r&&r.tryGetSourcePosition({fileName:e,pos:0}),a=function(e){if(n(e)===i)return t;const r=ak(e,i,n);return void 0===r?void 0:t+"/"+r}(o?o.fileName:e);return o?void 0===a?void 0:function(e,t,n,r){const i=fa(e,t,r);return N0(Ro(n),i)}(o.fileName,a,e,n):a}}function N0(e,t){return ta(function(e,t){return Xo(Ko(e,t))}(e,t))}function F0(e,t,n,r,i,o){if(e){const t=S(e.declarations,qN).fileName,n=o(t);return void 0===n?{newFileName:t,updated:!1}:{newFileName:n,updated:!0}}{const e=r.getModeForUsageLocation(n,t);return A0(t,i.resolveModuleNameLiterals||!i.resolveModuleNames?r.getResolvedModuleFromModuleSpecifier(t,n):i.getResolvedModuleWithFailedLookupLocationsFromCache&&i.getResolvedModuleWithFailedLookupLocationsFromCache(t.text,n.fileName,e),o,r.getSourceFiles())}}function A0(e,t,n,r){if(!t)return;if(t.resolvedModule){const e=o(t.resolvedModule.resolvedFileName);if(e)return e}return f(t.failedLookupLocations,(function(e){const t=n(e);return t&&S(r,(e=>e.fileName===t))?i(e):void 0}))||Po(e.text)&&f(t.failedLookupLocations,i)||t.resolvedModule&&{newFileName:t.resolvedModule.resolvedFileName,updated:!1};function i(e){return Wt(e,"/package.json")?void 0:o(e)}function o(e){const t=n(e);return t&&{newFileName:t,updated:!0}}}function I0(e,t,n,r){for(const r of e.referencedFiles||u){const i=n(r.fileName);void 0!==i&&i!==e.text.slice(r.pos,r.end)&&t.replaceRangeWithText(e,r,i)}for(const n of e.imports){const i=r(n);void 0!==i&&i!==n.text&&t.replaceRangeWithText(e,O0(n,e),i)}}function O0(e,t){return qb(e.getStart(t)+1,e.end-1)}function M0(e,t){if(HE(e))for(const n of e.properties)BN(n)&&wD(n.name)&&t(n,n.name.text)}(e=>{function t(e,t){return{fileName:t.fileName,textSpan:aQ(e,t),kind:"none"}}function n(e){return qP(e)?[e]:VP(e)?Z(e.catchClause?n(e.catchClause):e.tryBlock&&n(e.tryBlock),e.finallyBlock&&n(e.finallyBlock)):cu(e)?void 0:i(e,n)}function r(e){return Nl(e)?[e]:cu(e)?void 0:i(e,r)}function i(e,t){const n=[];return e.forEachChild((e=>{const r=t(e);void 0!==r&&n.push(...at(r))})),n}function o(e,t){const n=a(t);return!!n&&n===e}function a(e){return mc(e,(t=>{switch(t.kind){case 255:if(251===e.kind)return!1;case 248:case 249:case 250:case 247:case 246:return!e.label||function(e,t){return!!mc(e.parent,(e=>$P(e)?e.label.escapedText===t:"quit"))}(t,e.label.escapedText);default:return cu(t)&&"quit"}}))}function s(e,t,...n){return!(!t||!D(n,t.kind)||(e.push(t),0))}function c(e){const t=[];if(s(t,e.getFirstToken(),99,117,92)&&246===e.kind){const n=e.getChildren();for(let e=n.length-1;e>=0&&!s(t,n[e],117);e--);}return f(r(e.statement),(n=>{o(e,n)&&s(t,n.getFirstToken(),83,88)})),t}function l(e){const t=a(e);if(t)switch(t.kind){case 248:case 249:case 250:case 246:case 247:return c(t);case 255:return u(t)}}function u(e){const t=[];return s(t,e.getFirstToken(),109),f(e.caseBlock.clauses,(n=>{s(t,n.getFirstToken(),84,90),f(r(n),(n=>{o(e,n)&&s(t,n.getFirstToken(),83)}))})),t}function _(e,t){const n=[];return s(n,e.getFirstToken(),113),e.catchClause&&s(n,e.catchClause.getFirstToken(),85),e.finallyBlock&&s(n,uX(e,98,t),98),n}function d(e,t){const r=function(e){let t=e;for(;t.parent;){const e=t.parent;if(zf(e)||307===e.kind)return e;if(VP(e)&&e.tryBlock===t&&e.catchClause)return t;t=e}}(e);if(!r)return;const i=[];return f(n(r),(e=>{i.push(uX(e,111,t))})),zf(r)&&Pf(r,(e=>{i.push(uX(e,107,t))})),i}function p(e,t){const r=Qf(e);if(!r)return;const i=[];return Pf(ut(r.body,DP),(e=>{i.push(uX(e,107,t))})),f(n(r.body),(e=>{i.push(uX(e,111,t))})),i}function m(e){const t=Qf(e);if(!t)return;const n=[];return t.modifiers&&t.modifiers.forEach((e=>{s(n,e,134)})),LI(t,(e=>{g(e,(e=>{sP(e)&&s(n,e.getFirstToken(),135)}))})),n}function g(e,t){t(e),cu(e)||gu(e)||XP(e)||ZP(e)||QP(e)||wu(e)||LI(e,(e=>g(e,t)))}e.getDocumentHighlights=function(e,n,r,i,o){const a=xX(r,i);if(a.parent&&(CN(a.parent)&&a.parent.tagName===a||wN(a.parent))){const{openingElement:e,closingElement:n}=a.parent.parent,i=[e,n].map((({tagName:e})=>t(e,r)));return[{fileName:r.fileName,highlightSpans:i}]}return function(e,t,n,r,i){const o=new Set(i.map((e=>e.fileName))),a=Rse.getReferenceEntriesForNode(e,t,n,i,r,void 0,o);if(!a)return;const s=We(a.map(Rse.toHighlightSpan),(e=>e.fileName),(e=>e.span)),c=tn(n.useCaseSensitiveFileNames());return $e(V(s.entries(),(([e,t])=>{if(!o.has(e)){if(!n.redirectTargetsMap.has(Yo(e,n.getCurrentDirectory(),c)))return;const t=n.getSourceFile(e);e=S(i,(e=>!!e.redirectInfo&&e.redirectInfo.redirectTarget===t)).fileName,xn.assert(o.has(e))}return{fileName:e,highlightSpans:t}})))}(i,a,e,n,o)||function(e,n){const r=function(e,n){switch(e.kind){case 101:case 93:return FP(e.parent)?function(e,n){const r=function(e,t){const n=[];for(;FP(e.parent)&&e.parent.elseStatement===e;)e=e.parent;for(;;){const r=e.getChildren(t);s(n,r[0],101);for(let e=r.length-1;e>=0&&!s(n,r[e],93);e--);if(!e.elseStatement||!FP(e.elseStatement))break;e=e.elseStatement}return n}(e,n),i=[];for(let e=0;e=t.end;e--)if(!Ya(n.text.charCodeAt(e))){a=!1;break}if(a){i.push({fileName:n.fileName,textSpan:Xs(t.getStart(),o.end),kind:"reference"}),e++;continue}}i.push(t(r[e],n))}return i}(e.parent,n):void 0;case 107:return o(e.parent,BP,p);case 111:return o(e.parent,qP,d);case 113:case 85:case 98:return o(85===e.kind?e.parent.parent:e.parent,VP,_);case 109:return o(e.parent,zP,u);case 84:case 90:return LN(e.parent)||MN(e.parent)?o(e.parent.parent.parent,zP,u):void 0;case 83:case 88:return o(e.parent,Nl,l);case 99:case 117:case 92:return o(e.parent,(e=>Zu(e,!0)),c);case 137:return i(fE,[137]);case 139:case 153:return i(hu,[139,153]);case 135:return o(e.parent,sP,m);case 134:return a(m(e));case 127:return a(function(e){const t=Qf(e);if(!t)return;const n=[];return LI(t,(e=>{g(e,(e=>{pP(e)&&s(n,e.getFirstToken(),127)}))})),n}(e));case 103:case 147:return;default:return tu(e.kind)&&(h_(e.parent)||EP(e.parent))?a((r=e.kind,q(function(e,t){const n=e.parent;switch(n.kind){case 268:case 307:case 241:case 296:case 297:return 64&t&&GP(e)?[...e.members,e]:n.statements;case 176:case 174:case 262:return[...n.parameters,...gu(n.parent)?n.parent.members:[]];case 263:case 231:case 264:case 187:const r=n.members;if(15&t){const e=S(n.members,fE);if(e)return[...r,...e.parameters]}else if(64&t)return[...r,n];return r;case 210:return;default:xn.assertNever(n,"Invalid container kind.")}}(e.parent,ob(r)),(e=>zQ(e,r))))):void 0}var r;function i(t,r){return o(e.parent,t,(e=>{var i;return q(null==(i=lt(e,p_))?void 0:i.symbol.declarations,(e=>t(e)?S(e.getChildren(n),(e=>D(r,e.kind))):void 0))}))}function o(e,t,r){return t(e)?a(r(e,n)):void 0}function a(e){return e&&e.map((e=>t(e,n)))}}(e,n);return r&&[{fileName:n.fileName,highlightSpans:r}]}(a,r)}})(l0||(l0={}));var L0=(e=>(e[e.exact=0]="exact",e[e.prefix=1]="prefix",e[e.substring=2]="substring",e[e.camelCase=3]="camelCase",e))(L0||{});function j0(e,t){return{kind:e,isCaseSensitive:t}}function R0(e){const t=new Map,n=e.trim().split(".").map((e=>{return{totalTextChunk:Q0(t=e.trim()),subWordTextChunks:X0(t)};var t}));return 1===n.length&&""===n[0].totalTextChunk.text?{getMatchForLastSegmentOfPattern:()=>j0(2,!0),getFullMatch:()=>j0(2,!0),patternContainsDots:!1}:n.some((e=>!e.subWordTextChunks.length))?void 0:{getFullMatch:(e,r)=>function(e,t,n,r){if(!z0(t,De(n),r))return;if(n.length-1>e.length)return;let i;for(let t=n.length-2,o=e.length-1;t>=0;t-=1,o-=1)i=$0(i,z0(e[o],n[t],r));return i}(e,r,n,t),getMatchForLastSegmentOfPattern:e=>z0(e,De(n),t),patternContainsDots:n.length>1}}function B0(e,t){let n=t.get(e);return n||t.set(e,n=Z0(e)),n}function J0(e,t,n){const r=function(e,t){const n=e.length-t.length;for(let r=0;r<=n;r++)if(a1(t,((t,n)=>H0(e.charCodeAt(n+r))===t)))return r;return-1}(e,t.textLowerCase);if(0===r)return j0(t.text.length===e.length?0:1,an(e,t.text));if(t.isLowerCase){if(-1===r)return;const i=B0(e,n);for(const n of i)if(V0(e,n,t.text,!0))return j0(2,V0(e,n,t.text,!1));if(t.text.length0)return j0(2,!0);if(t.characterSpans.length>0){const r=B0(e,n),i=!!U0(e,r,t,!1)||!U0(e,r,t,!0)&&void 0;if(void 0!==i)return j0(3,i)}}}function z0(e,t,n){if(a1(t.totalTextChunk.text,(e=>32!==e&&42!==e))){const r=J0(e,t.totalTextChunk,n);if(r)return r}const r=t.subWordTextChunks;let i;for(const t of r)i=$0(i,J0(e,t,n));return i}function $0(e,t){return At([e,t],q0)}function q0(e,t){return void 0===e?1:void 0===t?-1:Nt(e.kind,t.kind)||Vt(!e.isCaseSensitive,!t.isCaseSensitive)}function V0(e,t,n,r,i={start:0,length:n.length}){return i.length<=t.length&&o1(0,i.length,(o=>function(e,t,n){return n?H0(e)===H0(t):e===t}(n.charCodeAt(i.start+o),e.charCodeAt(t.start+o),r)))}function U0(e,t,n,r){const i=n.characterSpans;let o,a,s=0,c=0;for(;;){if(c===i.length)return!0;if(s===t.length)return!1;let l=t[s],u=!1;for(;c=65&&e<=90)return!0;if(e<127||!Ma(e,99))return!1;const t=String.fromCharCode(e);return t===t.toUpperCase()}function W0(e){if(e>=97&&e<=122)return!0;if(e<127||!Ma(e,99))return!1;const t=String.fromCharCode(e);return t===t.toLowerCase()}function H0(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function G0(e){return e>=48&&e<=57}function X0(e){const t=[];let n=0,r=0;for(let o=0;o0&&(t.push(Q0(e.substr(n,r))),r=0);var i;return r>0&&t.push(Q0(e.substr(n,r))),t}function Q0(e){const t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:Y0(e)}}function Y0(e){return e1(e,!1)}function Z0(e){return e1(e,!0)}function e1(e,t){const n=[];let r=0;for(let i=1;it1(e)&&95!==e),t,n)}function r1(e,t,n){return t!==n&&t+1t(e.charCodeAt(n),n)))}function s1(e,t=!0,n=!1){const r={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},i=[];let o,a,s,c=0,l=!1;function u(){return a=s,s=mG.scan(),19===s?c++:20===s&&c--,s}function _(){const e=mG.getTokenValue(),t=mG.getTokenStart();return{fileName:e,pos:t,end:t+e.length}}function d(){i.push(_()),f()}function f(){0===c&&(l=!0)}function m(){let e=mG.getToken();return 138===e&&(e=u(),144===e&&(e=u(),11===e&&(o||(o=[]),o.push({ref:_(),depth:c}))),!0)}function g(){if(25===a)return!1;let e=mG.getToken();if(102===e){if(e=u(),21===e){if(e=u(),11===e||15===e)return d(),!0}else{if(11===e)return d(),!0;if(156===e&&mG.lookAhead((()=>{const e=mG.scan();return 161!==e&&(42===e||19===e||80===e||Ph(e))}))&&(e=u()),80===e||Ph(e))if(e=u(),161===e){if(e=u(),11===e)return d(),!0}else if(64===e){if(y(!0))return!0}else{if(28!==e)return!0;e=u()}if(19===e){for(e=u();20!==e&&1!==e;)e=u();20===e&&(e=u(),161===e&&(e=u(),11===e&&d()))}else 42===e&&(e=u(),130===e&&(e=u(),(80===e||Ph(e))&&(e=u(),161===e&&(e=u(),11===e&&d()))))}return!0}return!1}function h(){let e=mG.getToken();if(95===e){if(f(),e=u(),156===e&&mG.lookAhead((()=>{const e=mG.scan();return 42===e||19===e}))&&(e=u()),19===e){for(e=u();20!==e&&1!==e;)e=u();20===e&&(e=u(),161===e&&(e=u(),11===e&&d()))}else if(42===e)e=u(),161===e&&(e=u(),11===e&&d());else if(102===e&&(e=u(),156===e&&mG.lookAhead((()=>{const e=mG.scan();return 80===e||Ph(e)}))&&(e=u()),(80===e||Ph(e))&&(e=u(),64===e&&y(!0))))return!0;return!0}return!1}function y(e,t=!1){let n=e?u():mG.getToken();return 149===n&&(n=u(),21===n&&(n=u(),(11===n||t&&15===n)&&d()),!0)}function v(){let e=mG.getToken();if(80===e&&"define"===mG.getTokenValue()){if(e=u(),21!==e)return!0;if(e=u(),11===e||15===e){if(e=u(),28!==e)return!0;e=u()}if(23!==e)return!0;for(e=u();24!==e&&1!==e;)11!==e&&15!==e||d(),e=u();return!0}return!1}if(t&&function(){for(mG.setText(e),u();1!==mG.getToken();){if(16===mG.getToken()){const e=[mG.getToken()];e:for(;p(e);){const t=mG.scan();switch(t){case 1:break e;case 102:g();break;case 16:e.push(t);break;case 19:p(e)&&e.push(t);break;case 20:p(e)&&(16===we(e)?18===mG.reScanTemplateToken(!1)&&e.pop():e.pop())}}u()}m()||g()||h()||n&&(y(!1,!0)||v())||u()}mG.setText(void 0)}(),ZI(r,e),eO(r,_t),l){if(o)for(const e of o)i.push(e.ref);return{referencedFiles:r.referencedFiles,typeReferenceDirectives:r.typeReferenceDirectives,libReferenceDirectives:r.libReferenceDirectives,importedFiles:i,isLibFile:!!r.hasNoDefaultLib,ambientExternalModules:void 0}}{let e;if(o)for(const t of o)0===t.depth?(e||(e=[]),e.push(t.ref.fileName)):i.push(t.ref);return{referencedFiles:r.referencedFiles,typeReferenceDirectives:r.typeReferenceDirectives,libReferenceDirectives:r.libReferenceDirectives,importedFiles:i,isLibFile:!!r.hasNoDefaultLib,ambientExternalModules:e}}}var c1=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/;function l1(e){const t=tn(e.useCaseSensitiveFileNames()),n=e.getCurrentDirectory(),r=new Map,i=new Map;return{tryGetSourcePosition:function e(t){if(!QI(t.fileName))return;if(!s(t.fileName))return;const n=a(t.fileName).getSourcePosition(t);return n&&n!==t?e(n)||n:void 0},tryGetGeneratedPosition:function(r){if(QI(r.fileName))return;const i=s(r.fileName);if(!i)return;const o=e.getProgram();if(o.isSourceOfProjectReferenceRedirect(i.fileName))return;const c=o.getCompilerOptions().outFile,l=c?Yk(c)+".d.ts":ev(r.fileName,o.getCompilerOptions(),n,o.getCommonSourceDirectory(),t);if(void 0===l)return;const u=a(l,r.fileName).getGeneratedPosition(r);return u===r?void 0:u},toLineColumnOffset:function(e,t){return c(e).getLineAndCharacterOfPosition(t)},clearCache:function(){r.clear(),i.clear()},documentPositionMappers:i};function o(e){return Yo(e,n,t)}function a(n,r){const a=o(n),s=i.get(a);if(s)return s;let l;if(e.getDocumentPositionMapper)l=e.getDocumentPositionMapper(n,r);else if(e.readFile){const r=c(n);l=r&&u1({getSourceFileLike:c,getCanonicalFileName:t,log:t=>e.log(t)},n,aJ(r.text,Ka(r)),(t=>!e.fileExists||e.fileExists(t)?e.readFile(t):void 0))}return i.set(a,l||xJ),l||xJ}function s(t){const n=e.getProgram();if(!n)return;const r=o(t),i=n.getSourceFileByPath(r);return i&&i.resolvedPath===r?i:void 0}function c(t){return e.getSourceFileLike?e.getSourceFileLike(t):s(t)||function(t){const n=o(t),i=r.get(n);if(void 0!==i)return i||void 0;if(!e.readFile||e.fileExists&&!e.fileExists(t))return void r.set(n,!1);const a=e.readFile(t),s=!!a&&function(e,t){return{text:e,lineMap:void 0,getLineAndCharacterOfPosition(e){return Wa(Ka(this),e)}}}(a);return r.set(n,s),s||void 0}(t)}}function u1(e,t,n,r){let i=sJ(n);if(i){const n=c1.exec(i);if(n){if(n[1]){const r=n[1];return _1(e,jb(vo,r),t)}i=void 0}}const o=[];i&&o.push(i),o.push(t+".map");const a=i&&Go(i,Ro(t));for(const n of o){const i=Go(n,Ro(t)),o=r(i,a);if(st(o))return _1(e,o,i);if(void 0!==o)return o||void 0}}function _1(e,t,n){const r=uJ(t);if(r&&r.sources&&r.file&&r.mappings&&(!r.sourcesContent||!r.sourcesContent.some(st)))return bJ(e,r,n)}var d1=new Map;function p1(e,t,n){var r;t.getSemanticDiagnostics(e,n);const i=[],o=t.getTypeChecker();var a;1!==e.impliedNodeFormat&&!Io(e.fileName,[".cts",".cjs"])&&e.commonJsModuleIndicator&&(kQ(t)||TQ(t.getCompilerOptions()))&&function(e){return e.statements.some((e=>{switch(e.kind){case 243:return e.declarationList.declarations.some((e=>!!e.initializer&&Jm(f1(e.initializer),!0)));case 244:{const{expression:t}=e;if(!uP(t))return Jm(t,!0);const n=ag(t);return 1===n||2===n}default:return!1}}))}(e)&&i.push(Rp(uP(a=e.commonJsModuleIndicator)?a.left:a,va.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module));const s=Im(e);if(d1.clear(),function t(n){if(s)(function(e,t){var n,r,i,o;if(nP(e)){if(KP(e.parent)&&(null==(n=e.symbol.members)?void 0:n.size))return!0;const o=t.getSymbolOfExpando(e,!1);return!(!o||!(null==(r=o.exports)?void 0:r.size)&&!(null==(i=o.members)?void 0:i.size))}return!!HP(e)&&!!(null==(o=e.symbol.members)?void 0:o.size)})(n,o)&&i.push(Rp(KP(n.parent)?n.parent.name:n,va.This_constructor_function_may_be_converted_to_a_class_declaration));else{if(EP(n)&&n.parent===e&&2&n.declarationList.flags&&1===n.declarationList.declarations.length){const e=n.declarationList.declarations[0].initializer;e&&Jm(e,!0)&&i.push(Rp(e,va.require_call_may_be_converted_to_an_import))}const t=a8.getJSDocTypedefNodes(n);for(const e of t)i.push(Rp(e,va.JSDoc_typedef_may_be_converted_to_TypeScript_type));a8.parameterShouldGetTypeFromJSDoc(n)&&i.push(Rp(n.name||n,va.JSDoc_types_may_be_moved_to_TypeScript_types))}k1(n)&&function(e,t,n){(function(e,t){return!zh(e)&&e.body&&DP(e.body)&&function(e,t){return!!Pf(e,(e=>h1(e,t)))}(e.body,t)&&g1(e,t)})(e,t)&&!d1.has(S1(e))&&n.push(Rp(!e.name&&KP(e.parent)&&qD(e.parent.name)?e.parent.name:e,va.This_may_be_converted_to_an_async_function))}(n,o,i),n.forEachChild(t)}(e),AS(t.getCompilerOptions()))for(const n of e.imports){const o=m1(kg(n));if(!o)continue;const a=null==(r=t.getResolvedModuleFromModuleSpecifier(n,e))?void 0:r.resolvedModule,s=a&&t.getSourceFile(a.resolvedFileName);s&&s.externalModuleIndicator&&!0!==s.externalModuleIndicator&&mN(s.externalModuleIndicator)&&s.externalModuleIndicator.isExportEquals&&i.push(Rp(o,va.Import_may_be_converted_to_a_default_import))}return pe(i,e.bindSuggestionDiagnostics),pe(i,t.getSuggestionDiagnostics(e,n)),i.sort(((e,t)=>e.start-t.start))}function f1(e){return GE(e)?f1(e.expression):e}function m1(e){switch(e.kind){case 272:const{importClause:t,moduleSpecifier:n}=e;return t&&!t.name&&t.namedBindings&&274===t.namedBindings.kind&&wD(n)?t.namedBindings.name:void 0;case 271:return e.name;default:return}}function g1(e,t){const n=t.getSignatureFromDeclaration(e),r=n?t.getReturnTypeOfSignature(n):void 0;return!!r&&!!t.getPromisedTypeOfPromise(r)}function h1(e,t){return BP(e)&&!!e.expression&&y1(e.expression,t)}function y1(e,t){if(!v1(e)||!b1(e)||!e.arguments.every((e=>x1(e,t))))return!1;let n=e.expression.expression;for(;v1(n)||GE(n);)if(QE(n)){if(!b1(n)||!n.arguments.every((e=>x1(e,t))))return!1;n=n.expression.expression}else n=n.expression;return!0}function v1(e){return QE(e)&&(IG(e,"then")||IG(e,"catch")||IG(e,"finally"))}function b1(e){const t=e.expression.name.text,n="then"===t?2:"catch"===t||"finally"===t?1:0;return!(e.arguments.length>n)&&(e.arguments.length106===e.kind||qD(e)&&"undefined"===e.text)))}function x1(e,t){switch(e.kind){case 262:case 218:if(1&Jh(e))return!1;case 219:d1.set(S1(e),!0);case 106:return!0;case 80:case 211:{const n=t.getSymbolAtLocation(e);return!!n&&(t.isUndefinedSymbol(n)||Q(mx(n,t).declarations,(e=>cu(e)||L_(e)&&!!e.initializer&&cu(e.initializer))))}default:return!1}}function S1(e){return`${e.pos.toString()}:${e.end.toString()}`}function k1(e){switch(e.kind){case 262:case 174:case 218:case 219:return!0;default:return!1}}var T1=new Set(["isolatedModules"]);function C1(e,t){return N1(e,t,!1)}function w1(e,t){return N1(e,t,!0)}var D1,E1,P1="lib.d.ts";function N1(e,t,n){D1??(D1=JI(P1,'/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number {}\ninterface Object {}\ninterface RegExp {}\ninterface String {}\ninterface Array { length: number; [n: number]: T; }\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}',{languageVersion:99}));const r=[],i=t.compilerOptions?A1(t.compilerOptions,r):{},o={target:1,jsx:1};for(const e in o)Le(o,e)&&void 0===i[e]&&(i[e]=o[e]);for(const e of DO)i.verbatimModuleSyntax&&T1.has(e.name)||(i[e.name]=e.transpileOptionValue);i.suppressOutputPathCheck=!0,i.allowNonTsExtensions=!0,n?(i.declaration=!0,i.emitDeclarationOnly=!0,i.isolatedDeclarations=!0):i.declaration=!1;const a=$b(i),s={getSourceFile:e=>e===Xo(c)?l:e===Xo(P1)?D1:void 0,writeFile:(e,t)=>{Ao(e,".map")?(xn.assertEqual(_,void 0,"Unexpected multiple source map outputs, file:",e),_=t):(xn.assertEqual(u,void 0,"Unexpected multiple outputs, file:",e),u=t)},getDefaultLibFileName:()=>P1,useCaseSensitiveFileNames:()=>!1,getCanonicalFileName:e=>e,getCurrentDirectory:()=>"",getNewLine:()=>a,fileExists:e=>e===c||!!n&&e===P1,readFile:()=>"",directoryExists:()=>!0,getDirectories:()=>[]},c=t.fileName||(t.compilerOptions&&t.compilerOptions.jsx?"module.tsx":"module.ts"),l=JI(c,e,{languageVersion:wS(i),impliedNodeFormat:pV(Yo(c,"",s.getCanonicalFileName),void 0,s,i),setExternalModuleIndicator:TS(i),jsDocParsingMode:t.jsDocParsingMode??0});let u,_;t.moduleName&&(l.moduleName=t.moduleName),t.renamedDependencies&&(l.renamedDependencies=new Map(Object.entries(t.renamedDependencies)));const d=gV(n?[c,P1]:[c],i,s);return t.reportDiagnostics&&(pe(r,d.getSyntacticDiagnostics(l)),pe(r,d.getOptionsDiagnostics())),pe(r,d.emit(void 0,void 0,void 0,n,t.transformers,n).diagnostics),void 0===u?xn.fail("Output generation failed"):{outputText:u,diagnostics:r,sourceMapText:_}}function F1(e,t,n,r,i){const o=C1(e,{compilerOptions:t,fileName:n,reportDiagnostics:!!r,moduleName:i});return pe(r,o.diagnostics),o.outputText}function A1(e,t){E1=E1||F(bO,(e=>"object"==typeof e.type&&!ld(e.type,(e=>"number"!=typeof e)))),e=eQ(e);for(const n of E1){if(!Le(e,n.name))continue;const r=e[n.name];st(r)?e[n.name]=JO(n,r,t):ld(n.type,(e=>e===r))||t.push(RO(n))}return e}var I1={};function O1(e,t,n,r,i,o,a){const s=R0(r);if(!s)return u;const c=[],l=1===e.length?e[0]:void 0;for(const r of e)n.throwIfCancellationRequested(),o&&r.isDeclarationFile||M1(r,!!a,l)||r.getNamedDeclarations().forEach(((e,n)=>{L1(s,n,e,t,r.fileName,!!a,l,c)}));return c.sort($1),(void 0===i?c:c.slice(0,i)).map(q1)}function M1(e,t,n){return e!==n&&t&&(SZ(e.path)||e.hasNoDefaultLib)}function L1(e,t,n,r,i,o,a,s){const c=e.getMatchForLastSegmentOfPattern(t);if(c)for(const l of n)if(j1(l,r,o,a))if(e.patternContainsDots){const n=e.getFullMatch(z1(l),t);n&&s.push({name:t,fileName:i,matchKind:n.kind,isCaseSensitive:n.isCaseSensitive,declaration:l})}else s.push({name:t,fileName:i,matchKind:c.kind,isCaseSensitive:c.isCaseSensitive,declaration:l})}function j1(e,t,n,r){var i;switch(e.kind){case 273:case 276:case 271:const o=t.getSymbolAtLocation(e.name),a=t.getAliasedSymbol(o);return o.escapedName!==a.escapedName&&!(null==(i=a.declarations)?void 0:i.every((e=>M1(e.getSourceFile(),n,r))));default:return!0}}function R1(e,t){const n=Pc(e);return!!n&&(J1(n,t)||167===n.kind&&B1(n.expression,t))}function B1(e,t){return J1(e,t)||GE(e)&&(t.push(e.name.text),!0)&&B1(e.expression,t)}function J1(e,t){return Wh(e)&&(t.push(Hh(e)),!0)}function z1(e){const t=[],n=Pc(e);if(n&&167===n.kind&&!B1(n.expression,t))return u;t.shift();let r=UG(e);for(;r;){if(!R1(r,t))return u;r=UG(r)}return t.reverse()}function $1(e,t){return Nt(e.matchKind,t.matchKind)||$t(e.name,t.name)}function q1(e){const t=e.declaration,n=UG(t),r=n&&Pc(n);return{name:e.name,kind:KG(t),kindModifiers:KX(t),matchKind:L0[e.matchKind],isCaseSensitive:e.isCaseSensitive,fileName:e.fileName,textSpan:aQ(t),containerName:r?r.text:"",containerKind:r?KG(n):""}}o(I1,{getNavigateToItems:()=>O1});var V1={};o(V1,{getNavigationBarItems:()=>Z1,getNavigationTree:()=>e2});var U1,K1,W1,H1,G1=/\s+/g,X1=[],Q1=[],Y1=[];function Z1(e,t){U1=t,K1=e;try{return O(function(e){const t=[];return function e(n){if(function(e){if(e.children)return!0;switch(r2(e)){case 263:case 231:case 266:case 264:case 267:case 307:case 265:case 346:case 338:return!0;case 219:case 262:case 218:return t(e);default:return!1}function t(e){if(!e.node.body)return!1;switch(r2(e.parent)){case 268:case 307:case 174:case 176:return!0;default:return!1}}}(n)&&(t.push(n),n.children))for(const t of n.children)e(t)}(e),t}(o2(e)),E2)}finally{t2()}}function e2(e,t){U1=t,K1=e;try{return D2(o2(e))}finally{t2()}}function t2(){K1=void 0,U1=void 0,X1=[],W1=void 0,Y1=[]}function n2(e){return R2(e.getText(K1))}function r2(e){return e.node.kind}function i2(e,t){e.children?e.children.push(t):e.children=[t]}function o2(e){xn.assert(!X1.length);const t={node:e,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};W1=t;for(const t of e.statements)g2(t);return d2(),xn.assert(!W1&&!X1.length),t}function a2(e,t){i2(W1,s2(e,t))}function s2(e,t){return{node:e,name:t||(h_(e)||Xu(e)?Pc(e):void 0),additionalNodes:void 0,parent:W1,children:void 0,indent:W1.indent+1}}function c2(e){H1||(H1=new Map),H1.set(e,!0)}function l2(e){for(let t=0;t0;t--)_2(e,n[t]);return[n.length-1,n[0]]}function _2(e,t){const n=s2(e,t);i2(W1,n),X1.push(W1),Q1.push(H1),H1=void 0,W1=n}function d2(){W1.children&&(h2(W1.children,W1),k2(W1.children)),W1=X1.pop(),H1=Q1.pop()}function p2(e,t,n){_2(e,n),g2(t),d2()}function f2(e){e.initializer&&function(e){switch(e.kind){case 219:case 218:case 231:return!0;default:return!1}}(e.initializer)?(_2(e),LI(e.initializer,g2),d2()):p2(e,e.initializer)}function m2(e){const t=Pc(e);if(void 0===t)return!1;if(oE(t)){const e=t.expression;return vb(e)||TD(e)||$h(e)}return!!t}function g2(e){if(U1.throwIfCancellationRequested(),e&&!Ll(e))switch(e.kind){case 176:const t=e;p2(t,t.body);for(const e of t.parameters)rc(e,t)&&a2(e);break;case 174:case 177:case 178:case 173:m2(e)&&p2(e,e.body);break;case 172:m2(e)&&f2(e);break;case 171:m2(e)&&a2(e);break;case 273:const n=e;n.name&&a2(n.name);const{namedBindings:r}=n;if(r)if(274===r.kind)a2(r);else for(const e of r.elements)a2(e);break;case 304:p2(e,e.name);break;case 305:const{expression:i}=e;qD(i)?a2(e,i):a2(e);break;case 208:case 303:case 260:{const t=e;Eu(t.name)?g2(t.name):f2(t);break}case 262:const o=e.name;o&&qD(o)&&c2(o.text),p2(e,e.body);break;case 219:case 218:p2(e,e.body);break;case 266:_2(e);for(const t of e.members)I2(t)||a2(t);d2();break;case 263:case 231:case 264:_2(e);for(const t of e.members)g2(t);d2();break;case 267:p2(e,A2(e).body);break;case 277:{const t=e.expression,n=HE(t)||QE(t)?t:rP(t)||nP(t)?t.body:void 0;n?(_2(e),g2(n),d2()):a2(e);break}case 281:case 271:case 181:case 179:case 180:case 265:a2(e);break;case 213:case 226:{const t=ag(e);switch(t){case 1:case 2:return void p2(e,e.right);case 6:case 3:{const n=e,r=n.left,i=3===t?r.expression:r;let o,a=0;return qD(i.expression)?(c2(i.expression.text),o=i.expression):[a,o]=u2(n,i.expression),6===t?HE(n.right)&&n.right.properties.length>0&&(_2(n,o),LI(n.right,g2),d2()):nP(n.right)||rP(n.right)?p2(e,n.right,o):(_2(n,o),p2(e,n.right,r.name),d2()),void l2(a)}case 7:case 9:{const n=e,r=7===t?n.arguments[0]:n.arguments[0].expression,i=n.arguments[1],[o,a]=u2(e,r);return _2(e,a),_2(e,sI(YC.createIdentifier(i.text),i)),g2(e.arguments[2]),d2(),d2(),void l2(o)}case 5:{const t=e,n=t.left,r=n.expression;if(qD(r)&&"prototype"!==mg(n)&&H1&&H1.has(r.text))return void(nP(t.right)||rP(t.right)?p2(e,t.right,r):ug(n)&&(_2(t,r),p2(t.left,t.right,pg(n)),d2()));break}case 4:case 0:case 8:break;default:xn.assertNever(t)}}default:O_(e)&&f(e.jsDoc,(e=>{f(e.tags,(e=>{Fg(e)&&a2(e)}))})),LI(e,g2)}}function h2(e,t){const n=new Map;A(e,((e,r)=>{const i=e.name||Pc(e.node),o=i&&n2(i);if(!o)return!0;const a=n.get(o);if(!a)return n.set(o,e),!0;if(a instanceof Array){for(const n of a)if(v2(n,e,r,t))return!1;return a.push(e),!0}{const i=a;return!v2(i,e,r,t)&&(n.set(o,[i,e]),!0)}}))}var y2={5:!0,3:!0,7:!0,9:!0,0:!1,1:!1,2:!1,8:!1,6:!0,4:!1};function v2(e,t,n,r){return!!function(e,t,n,r){function i(e){return nP(e)||HP(e)||KP(e)}const o=uP(t.node)||QE(t.node)?ag(t.node):0,a=uP(e.node)||QE(e.node)?ag(e.node):0;if(y2[o]&&y2[a]||i(e.node)&&y2[o]||i(t.node)&&y2[a]||GP(e.node)&&b2(e.node)&&y2[o]||GP(t.node)&&y2[a]||GP(e.node)&&b2(e.node)&&i(t.node)||GP(t.node)&&i(e.node)&&b2(e.node)){let o=e.additionalNodes&&we(e.additionalNodes)||e.node;if(!GP(e.node)&&!GP(t.node)||i(e.node)||i(t.node)){const n=i(e.node)?e.node:i(t.node)?t.node:void 0;if(void 0!==n){const r=s2(sI(YC.createConstructorDeclaration(void 0,[],void 0),n));r.indent=e.indent+1,r.children=e.node===n?e.children:t.children,e.children=e.node===n?Z([r],t.children||[t]):Z(e.children||[{...e}],[r])}else(e.children||t.children)&&(e.children=Z(e.children||[{...e}],t.children||[t]),e.children&&(h2(e.children,e),k2(e.children)));o=e.node=sI(YC.createClassDeclaration(void 0,e.name||YC.createIdentifier("__class__"),void 0,void 0,[]),e.node)}else e.children=Z(e.children,t.children),e.children&&h2(e.children,e);const a=t.node;return r.children[n-1].node.end===o.end?sI(o,{pos:o.pos,end:a.end}):(e.additionalNodes||(e.additionalNodes=[]),e.additionalNodes.push(sI(YC.createClassDeclaration(void 0,e.name||YC.createIdentifier("__class__"),void 0,void 0,[]),t.node))),!0}return 0!==o}(e,t,n,r)||!!function(e,t,n){if(e.kind!==t.kind||e.parent!==t.parent&&(!x2(e,n)||!x2(t,n)))return!1;switch(e.kind){case 172:case 174:case 177:case 178:return Jv(e)===Jv(t);case 267:return S2(e,t)&&F2(e)===F2(t);default:return!0}}(e.node,t.node,r)&&(o=t,(i=e).additionalNodes=i.additionalNodes||[],i.additionalNodes.push(o.node),o.additionalNodes&&i.additionalNodes.push(...o.additionalNodes),i.children=Z(i.children,o.children),i.children&&(h2(i.children,i),k2(i.children)),!0);var i,o}function b2(e){return!!(16&e.flags)}function x2(e,t){const n=eN(e.parent)?e.parent.parent:e.parent;return n===t.node||D(t.additionalNodes,n)}function S2(e,t){return e.body&&t.body?e.body.kind===t.body.kind&&(267!==e.body.kind||S2(e.body,t.body)):e.body===t.body}function k2(e){e.sort(T2)}function T2(e,t){return $t(C2(e.node),C2(t.node))||Nt(r2(e),r2(t))}function C2(e){if(267===e.kind)return N2(e);const t=Pc(e);if(t&&au(t)){const e=Kh(t);return e&&vc(e)}switch(e.kind){case 218:case 219:case 231:return L2(e);default:return}}function w2(e,t){if(267===e.kind)return R2(N2(e));if(t){const e=qD(t)?t.text:XE(t)?`[${n2(t.argumentExpression)}]`:n2(t);if(e.length>0)return R2(e)}switch(e.kind){case 307:const t=e;return qI(t)?`"${Fy(Bo(Yk(Xo(t.fileName))))}"`:"";case 277:return mN(e)&&e.isExportEquals?"export=":"default";case 219:case 262:case 218:case 263:case 231:return 2048&Zv(e)?"default":L2(e);case 176:return"constructor";case 180:return"new()";case 179:return"()";case 181:return"[]";default:return""}}function D2(e){return{text:w2(e.node,e.name),kind:KG(e.node),kindModifiers:M2(e.node),spans:P2(e),nameSpan:e.name&&O2(e.name),childItems:O(e.children,D2)}}function E2(e){return{text:w2(e.node,e.name),kind:KG(e.node),kindModifiers:M2(e.node),spans:P2(e),childItems:O(e.children,(function(e){return{text:w2(e.node,e.name),kind:KG(e.node),kindModifiers:KX(e.node),spans:P2(e),childItems:Y1,indent:0,bolded:!1,grayed:!1}}))||Y1,indent:e.indent,bolded:!1,grayed:!1}}function P2(e){const t=[O2(e.node)];if(e.additionalNodes)for(const n of e.additionalNodes)t.push(O2(n));return t}function N2(e){return sp(e)?Gd(e.name):F2(e)}function F2(e){const t=[Hh(e.name)];for(;e.body&&267===e.body.kind;)e=e.body,t.push(Hh(e.name));return t.join(".")}function A2(e){return e.body&&ZP(e.body)?A2(e.body):e}function I2(e){return!e.name||167===e.name.kind}function O2(e){return 307===e.kind?lQ(e):aQ(e,K1)}function M2(e){return e.parent&&260===e.parent.kind&&(e=e.parent),KX(e)}function L2(e){const{parent:t}=e;if(e.name&&pd(e.name)>0)return R2(Ap(e.name));if(KP(t))return R2(Ap(t.name));if(uP(t)&&64===t.operatorToken.kind)return n2(t.left).replace(G1,"");if(BN(t))return n2(t.name);if(2048&Zv(e))return"default";if(gu(e))return"";if(QE(t)){let e=j2(t.expression);if(void 0!==e)return e=R2(e),e.length>150?`${e} callback`:`${e}(${R2(q(t.arguments,(e=>$_(e)||qu(e)?e.getText(K1):void 0)).join(", "))}) callback`}return""}function j2(e){if(qD(e))return e.text;if(GE(e)){const t=j2(e.expression),n=e.name.text;return void 0===t?n:`${t}.${n}`}}function R2(e){return(e=e.length>150?e.substring(0,150)+"...":e).replace(/\\?(\r?\n|\r|\u2028|\u2029)/g,"")}var B2={};o(B2,{addExportToChanges:()=>R6,addExportsInOldFile:()=>b6,addImportsForMovedSymbols:()=>E6,addNewFileToTsconfig:()=>h6,addOrRemoveBracesToArrowFunction:()=>f3,addTargetFileImports:()=>r3,containsJsx:()=>z6,convertArrowFunctionOrFunctionExpression:()=>C3,convertParamsToDestructuredObject:()=>M3,convertStringOrTemplateLiteral:()=>e4,convertToOptionalChainExpression:()=>d4,createNewFileName:()=>B6,deleteMovedStatements:()=>y6,deleteUnusedImports:()=>N6,deleteUnusedOldImports:()=>v6,doChangeNamedToNamespaceOrDefault:()=>t6,extractSymbol:()=>T4,filterImport:()=>M6,forEachImportInStatement:()=>w6,generateGetAccessorAndSetAccessor:()=>q4,getApplicableRefactors:()=>$2,getEditsForRefactor:()=>q2,getExistingLocals:()=>Z6,getIdentifierForNode:()=>n3,getNewStatementsAndRemoveFromOldFile:()=>g6,getStatementsToMove:()=>J6,getTopLevelDeclarationStatement:()=>j6,getUsageInfo:()=>q6,inferFunctionReturnType:()=>W4,isRefactorErrorInfo:()=>e3,isTopLevelDeclaration:()=>G6,moduleSpecifierFromImport:()=>C6,nameOfTopLevelDeclaration:()=>L6,refactorKindBeginsWith:()=>t3,registerRefactor:()=>z2,updateImportsInOtherFiles:()=>x6});var J2=new Map;function z2(e,t){J2.set(e,t)}function $2(e,t){return $e(J(J2.values(),(n=>{var r;return e.cancellationToken&&e.cancellationToken.isCancellationRequested()||!(null==(r=n.kinds)?void 0:r.some((t=>t3(t,e.kind))))?void 0:n.getAvailableActions(e,t)})))}function q2(e,t,n,r){const i=J2.get(t);return i&&i.getEditsForAction(e,n,r)}var V2="Convert export",U2={name:"Convert default export to named export",description:tS(va.Convert_default_export_to_named_export),kind:"refactor.rewrite.export.named"},K2={name:"Convert named export to default export",description:tS(va.Convert_named_export_to_default_export),kind:"refactor.rewrite.export.default"};function W2(e,t=!0){const{file:n,program:r}=e,i=wZ(e),o=kX(n,i.start),a=o.parent&&32&Zv(o.parent)&&t?o.parent:BQ(o,n,i);if(!a||!(qN(a.parent)||eN(a.parent)&&sp(a.parent.parent)))return{error:tS(va.Could_not_find_export_statement)};const s=r.getTypeChecker(),c=function(e,t){if(qN(e))return e.symbol;const n=e.parent.symbol;return n.valueDeclaration&&fp(n.valueDeclaration)?t.getMergedSymbol(n):n}(a.parent,s),l=Zv(a)||(mN(a)&&!a.isExportEquals?2080:0),u=!!(2048&l);if(!(32&l)||!u&&c.exports.has("default"))return{error:tS(va.This_file_already_has_a_default_export)};const _=e=>qD(e)&&s.getSymbolAtLocation(e)?void 0:{error:tS(va.Can_only_convert_named_export)};switch(a.kind){case 262:case 263:case 264:case 266:case 265:case 267:{const e=a;if(!e.name)return;return _(e.name)||{exportNode:e,exportName:e.name,wasDefault:u,exportingModuleSymbol:c}}case 243:{const e=a;if(!(2&e.declarationList.flags)||1!==e.declarationList.declarations.length)return;const t=Te(e.declarationList.declarations);if(!t.initializer)return;return xn.assert(!u,"Can't have a default flag here"),_(t.name)||{exportNode:e,exportName:t.name,wasDefault:u,exportingModuleSymbol:c}}case 277:{const e=a;if(e.isExportEquals)return;return _(e.expression)||{exportNode:e,exportName:e.expression,wasDefault:u,exportingModuleSymbol:c}}default:return}}function H2(e,t){return YC.createImportSpecifier(!1,e===t?void 0:YC.createIdentifier(e),YC.createIdentifier(t))}function G2(e,t){return YC.createExportSpecifier(!1,e===t?void 0:YC.createIdentifier(e),YC.createIdentifier(t))}z2(V2,{kinds:[U2.kind,K2.kind],getAvailableActions:function(e){const t=W2(e,"invoked"===e.triggerReason);if(!t)return u;if(!e3(t)){const e=t.wasDefault?U2:K2;return[{name:V2,description:e.description,actions:[e]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:V2,description:tS(va.Convert_default_export_to_named_export),actions:[{...U2,notApplicableReason:t.error},{...K2,notApplicableReason:t.error}]}]:u},getEditsForAction:function(e,t){xn.assert(t===U2.name||t===K2.name,"Unexpected action name");const n=W2(e);xn.assert(n&&!e3(n),"Expected applicable refactor info");const r=r_e.ChangeTracker.with(e,(t=>function(e,t,n,r,i){(function(e,{wasDefault:t,exportNode:n,exportName:r},i,o){if(t)if(mN(n)&&!n.isExportEquals){const t=n.expression,r=G2(t.text,t.text);i.replaceNode(e,n,YC.createExportDeclaration(void 0,!1,YC.createNamedExports([r])))}else i.delete(e,xn.checkDefined(zQ(n,90),"Should find a default keyword in modifier list"));else{const t=xn.checkDefined(zQ(n,95),"Should find an export keyword in modifier list");switch(n.kind){case 262:case 263:case 264:i.insertNodeAfter(e,t,YC.createToken(90));break;case 243:const a=Te(n.declarationList.declarations);if(!Rse.Core.isSymbolReferencedInFile(r,o,e)&&!a.type){i.replaceNode(e,n,YC.createExportDefault(xn.checkDefined(a.initializer,"Initializer was previously known to be present")));break}case 266:case 265:case 267:i.deleteModifier(e,t),i.insertNodeAfter(e,n,YC.createExportDefault(YC.createIdentifier(r.text)));break;default:xn.fail(`Unexpected exportNode kind ${n.kind}`)}}})(e,n,r,t.getTypeChecker()),function(e,{wasDefault:t,exportName:n,exportingModuleSymbol:r},i,o){const a=e.getTypeChecker(),s=xn.checkDefined(a.getSymbolAtLocation(n),"Export name should resolve to a symbol");Rse.Core.eachExportReference(e.getSourceFiles(),a,o,s,r,n.text,t,(e=>{if(n===e)return;const r=e.getSourceFile();t?function(e,t,n,r){const{parent:i}=t;switch(i.kind){case 211:n.replaceNode(e,t,YC.createIdentifier(r));break;case 276:case 281:{const t=i;n.replaceNode(e,t,H2(r,t.name.text));break}case 273:{const o=i;xn.assert(o.name===t,"Import clause name should match provided ref");const a=H2(r,t.text),{namedBindings:s}=o;if(s)if(274===s.kind){n.deleteRange(e,{pos:t.getStart(e),end:s.getStart(e)});const i=wD(o.parent.moduleSpecifier)?FQ(o.parent.moduleSpecifier,e):1,a=EQ(void 0,[H2(r,t.text)],o.parent.moduleSpecifier,i);n.insertNodeAfter(e,o.parent,a)}else n.delete(e,t),n.insertNodeAtEndOfList(e,s.elements,a);else n.replaceNode(e,t,YC.createNamedImports([a]));break}case 205:const o=i;n.replaceNode(e,i,YC.createImportTypeNode(o.argument,o.attributes,YC.createIdentifier(r),o.typeArguments,o.isTypeOf));break;default:xn.failBadSyntaxKind(i)}}(r,e,i,n.text):function(e,t,n){const r=t.parent;switch(r.kind){case 211:n.replaceNode(e,t,YC.createIdentifier("default"));break;case 276:{const t=YC.createIdentifier(r.name.text);1===r.parent.elements.length?n.replaceNode(e,r.parent,t):(n.delete(e,r),n.insertNodeBefore(e,r.parent,t));break}case 281:n.replaceNode(e,r,G2("default",r.name.text));break;default:xn.assertNever(r,`Unexpected parent kind ${r.kind}`)}}(r,e,i)}))}(t,n,r,i)}(e.file,e.program,n,t,e.cancellationToken)));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var X2="Convert import",Q2={0:{name:"Convert namespace import to named imports",description:tS(va.Convert_namespace_import_to_named_imports),kind:"refactor.rewrite.import.named"},2:{name:"Convert named imports to namespace import",description:tS(va.Convert_named_imports_to_namespace_import),kind:"refactor.rewrite.import.namespace"},1:{name:"Convert named imports to default import",description:tS(va.Convert_named_imports_to_default_import),kind:"refactor.rewrite.import.default"}};function Y2(e,t=!0){const{file:n}=e,r=wZ(e),i=kX(n,r.start),o=t?mc(i,_n(iN,AF)):BQ(i,n,r);if(void 0===o||!iN(o)&&!AF(o))return{error:"Selection is not an import declaration."};const a=r.start+r.length,s=DX(o,o.parent,n);if(s&&a>s.getStart())return;const{importClause:c}=o;return c?c.namedBindings?274===c.namedBindings.kind?{convertTo:0,import:c.namedBindings}:Z2(e.program,c)?{convertTo:1,import:c.namedBindings}:{convertTo:2,import:c.namedBindings}:{error:tS(va.Could_not_find_namespace_import_or_named_imports)}:{error:tS(va.Could_not_find_import_clause)}}function Z2(e,t){return AS(e.getCompilerOptions())&&function(e,t){const n=t.resolveExternalModuleName(e);if(!n)return!1;return n!==t.resolveExternalModuleSymbol(n)}(t.parent.moduleSpecifier,e.getTypeChecker())}function e6(e){return GE(e)?e.name:e.right}function t6(e,t,n,r,i=Z2(t,r.parent)){const o=t.getTypeChecker(),a=r.parent.parent,{moduleSpecifier:s}=a,c=new Set;r.elements.forEach((e=>{const t=o.getSymbolAtLocation(e.name);t&&c.add(t)}));const l=s&&wD(s)?LZ(s.text,99):"module",u=r.elements.some((function(t){return!!Rse.Core.eachSymbolReferenceInFile(t.name,o,e,(e=>{const t=o.resolveName(l,e,-1,!0);return!!t&&(!c.has(t)||yN(e.parent))}))}))?zY(l,e):l,_=new Set;for(const t of r.elements){const r=(t.propertyName||t.name).text;Rse.Core.eachSymbolReferenceInFile(t.name,o,e,(i=>{const o=YC.createPropertyAccessExpression(YC.createIdentifier(u),r);JN(i.parent)?n.replaceNode(e,i.parent,YC.createPropertyAssignment(i.text,o)):yN(i.parent)?_.add(t):n.replaceNode(e,i,o)}))}if(n.replaceNode(e,r,i?YC.createIdentifier(u):YC.createNamespaceImport(YC.createIdentifier(u))),_.size&&iN(a)){const t=$e(_.values(),(e=>YC.createImportSpecifier(e.isTypeOnly,e.propertyName&&YC.createIdentifier(e.propertyName.text),YC.createIdentifier(e.name.text))));n.insertNodeAfter(e,r.parent.parent,n6(a,void 0,t))}}function n6(e,t,n){return YC.createImportDeclaration(void 0,r6(t,n),e.moduleSpecifier,void 0)}function r6(e,t){return YC.createImportClause(!1,e,t&&t.length?YC.createNamedImports(t):void 0)}z2(X2,{kinds:Je(Q2).map((e=>e.kind)),getAvailableActions:function(e){const t=Y2(e,"invoked"===e.triggerReason);if(!t)return u;if(!e3(t)){const e=Q2[t.convertTo];return[{name:X2,description:e.description,actions:[e]}]}return e.preferences.provideRefactorNotApplicableReason?Je(Q2).map((e=>({name:X2,description:e.description,actions:[{...e,notApplicableReason:t.error}]}))):u},getEditsForAction:function(e,t){xn.assert(Q(Je(Q2),(e=>e.name===t)),"Unexpected action name");const n=Y2(e);xn.assert(n&&!e3(n),"Expected applicable refactor info");const r=r_e.ChangeTracker.with(e,(t=>function(e,t,n,r){const i=t.getTypeChecker();0===r.convertTo?function(e,t,n,r,i){let o=!1;const a=[],s=new Map;Rse.Core.eachSymbolReferenceInFile(r.name,t,e,(e=>{if(Bu(e.parent)){const r=e6(e.parent).text;t.resolveName(r,e,-1,!0)&&s.set(r,!0),xn.assert((GE(n=e.parent)?n.expression:n.left)===e,"Parent expression should match id"),a.push(e.parent)}else o=!0;var n}));const c=new Map;for(const t of a){const r=e6(t).text;let i=c.get(r);void 0===i&&c.set(r,i=s.has(r)?zY(r,e):r),n.replaceNode(e,t,YC.createIdentifier(i))}const l=[];c.forEach(((e,t)=>{l.push(YC.createImportSpecifier(!1,e===t?void 0:YC.createIdentifier(t),YC.createIdentifier(e)))}));const u=r.parent.parent;if(o&&!i&&iN(u))n.insertNodeAfter(e,u,n6(u,void 0,l));else{const t=o?YC.createIdentifier(r.name.text):void 0;n.replaceNode(e,r.parent,r6(t,l))}}(e,i,n,r.import,AS(t.getCompilerOptions())):t6(e,t,n,r.import,1===r.convertTo)}(e.file,e.program,t,n)));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var i6="Extract type",o6={name:"Extract to type alias",description:tS(va.Extract_to_type_alias),kind:"refactor.extract.type"},a6={name:"Extract to interface",description:tS(va.Extract_to_interface),kind:"refactor.extract.interface"},s6={name:"Extract to typedef",description:tS(va.Extract_to_typedef),kind:"refactor.extract.typedef"};function c6(e,t=!0){const{file:n,startPosition:r}=e,i=Im(n),o=uQ(wZ(e)),a=o.pos===o.end&&t,s=function(e,t,n,r){const i=[()=>kX(e,t),()=>SX(e,t,(()=>!0))];for(const t of i){const i=t(),o=rX(i,e,n.pos,n.end),a=mc(i,(t=>t.parent&&wu(t)&&!u6(n,t.parent,e)&&(r||o)));if(a)return a}}(n,r,o,a);if(!s||!wu(s))return{info:{error:tS(va.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const c=e.program.getTypeChecker(),l=function(e,t){return mc(e,b_)||(t?mc(e,oF):void 0)}(s,i);if(void 0===l)return{info:{error:tS(va.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0};const _=function(e,t){return mc(e,(e=>e===t?"quit":!(!FE(e.parent)&&!AE(e.parent))))??e}(s,l);if(!wu(_))return{info:{error:tS(va.Selection_is_not_a_valid_type_node)},affectedTextRange:void 0};const d=[];(FE(_.parent)||AE(_.parent))&&o.end>s.end&&pe(d,_.parent.types.filter((e=>rX(e,n,o.pos,o.end))));const p=d.length>1?d:_,{typeParameters:f,affectedTextRange:m}=function(e,t,n,r){const i=[],o=at(t),a={pos:o[0].getStart(r),end:o[o.length-1].end};for(const e of o)if(s(e))return{typeParameters:void 0,affectedTextRange:void 0};return{typeParameters:i,affectedTextRange:a};function s(t){if(xE(t)){if(qD(t.typeName)){const o=t.typeName,s=e.resolveName(o.text,o,262144,!0);for(const e of(null==s?void 0:s.declarations)||u)if(aE(e)&&e.getSourceFile()===r){if(e.name.escapedText===o.escapedText&&u6(e,a,r))return!0;if(u6(n,e,r)&&!u6(a,e,r)){fe(i,e);break}}}}else if(OE(t)){const e=mc(t,(e=>IE(e)&&u6(e.extendsType,t,r)));if(!e||!u6(a,e,r))return!0}else if(bE(t)||LE(t)){const e=mc(t.parent,cu);if(e&&e.type&&u6(e.type,t,r)&&!u6(a,e,r))return!0}else if(TE(t))if(qD(t.exprName)){const i=e.resolveName(t.exprName.text,t.exprName,111551,!1);if((null==i?void 0:i.valueDeclaration)&&u6(n,i.valueDeclaration,r)&&!u6(a,i.valueDeclaration,r))return!0}else if(yv(t.exprName.left)&&!u6(a,t.parent,r))return!0;return r&&DE(t)&&Xa(r,t.pos).line===Xa(r,t.end).line&&iw(t,1),LI(t,s)}}(c,p,l,n);return f?{info:{isJS:i,selection:p,enclosingNode:l,typeParameters:f,typeElements:l6(c,p)},affectedTextRange:m}:{info:{error:tS(va.No_type_could_be_extracted_from_this_type_node)},affectedTextRange:void 0}}function l6(e,t){if(t){if(ot(t)){const n=[];for(const r of t){const t=l6(e,r);if(!t)return;pe(n,t)}return n}if(AE(t)){const n=[],r=new Map;for(const i of t.types){const t=l6(e,i);if(!t||!t.every((e=>e.name&&Fx(r,xQ(e.name)))))return;pe(n,t)}return n}return ME(t)?l6(e,t.type):CE(t)?t.members:void 0}}function u6(e,t,n){return tX(e,as(n.text,t.pos),t.end)}function _6(e){return ot(e.selection)?{firstTypeNode:e.selection[0],lastTypeNode:e.selection[e.selection.length-1],newTypeNode:FE(e.selection[0].parent)?YC.createUnionTypeNode(e.selection):YC.createIntersectionTypeNode(e.selection)}:{firstTypeNode:e.selection,lastTypeNode:e.selection,newTypeNode:e.selection}}z2(i6,{kinds:[o6.kind,a6.kind,s6.kind],getAvailableActions:function(e){const{info:t,affectedTextRange:n}=c6(e,"invoked"===e.triggerReason);return t?e3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:i6,description:tS(va.Extract_type),actions:[{...s6,notApplicableReason:t.error},{...o6,notApplicableReason:t.error},{...a6,notApplicableReason:t.error}]}]:u:[{name:i6,description:tS(va.Extract_type),actions:t.isJS?[s6]:ue([o6],t.typeElements&&a6)}].map((t=>({...t,actions:t.actions.map((t=>({...t,range:n?{start:{line:Xa(e.file,n.pos).line,offset:Xa(e.file,n.pos).character},end:{line:Xa(e.file,n.end).line,offset:Xa(e.file,n.end).character}}:void 0})))}))):u},getEditsForAction:function(e,t){const{file:n}=e,{info:r}=c6(e);xn.assert(r&&!e3(r),"Expected to find a range to extract");const i=zY("NewType",n),o=r_e.ChangeTracker.with(e,(o=>{switch(t){case o6.name:return xn.assert(!r.isJS,"Invalid actionName/JS combo"),function(e,t,n,r){const{enclosingNode:i,typeParameters:o}=r,{firstTypeNode:a,lastTypeNode:s,newTypeNode:c}=_6(r),l=YC.createTypeAliasDeclaration(void 0,n,o.map((e=>YC.updateTypeParameterDeclaration(e,e.modifiers,e.name,e.constraint,void 0))),c);e.insertNodeBefore(t,i,Aw(l),!0),e.replaceNodeRange(t,a,s,YC.createTypeReferenceNode(n,o.map((e=>YC.createTypeReferenceNode(e.name,void 0)))),{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.ExcludeWhitespace})}(o,n,i,r);case s6.name:return xn.assert(r.isJS,"Invalid actionName/JS combo"),function(e,t,n,r,i){var o;at(i.selection).forEach((e=>{iw(e,7168)}));const{enclosingNode:a,typeParameters:s}=i,{firstTypeNode:c,lastTypeNode:l,newTypeNode:u}=_6(i),_=YC.createJSDocTypedefTag(YC.createIdentifier("typedef"),YC.createJSDocTypeExpression(u),YC.createIdentifier(r)),d=[];f(s,(e=>{const t=gl(e),n=YC.createTypeParameterDeclaration(void 0,e.name),r=YC.createJSDocTemplateTag(YC.createIdentifier("template"),t&&ut(t,UN),[n]);d.push(r)}));const p=YC.createJSDocComment(void 0,YC.createNodeArray(Z(d,[_])));if(oF(a)){const r=a.getStart(n),i=gY(t.host,null==(o=t.formatContext)?void 0:o.options);e.insertNodeAt(n,a.getStart(n),p,{suffix:i+i+n.text.slice(PY(n.text,r-1),r)})}else e.insertNodeBefore(n,a,p,!0);e.replaceNodeRange(n,c,l,YC.createTypeReferenceNode(r,s.map((e=>YC.createTypeReferenceNode(e.name,void 0)))))}(o,e,n,i,r);case a6.name:return xn.assert(!r.isJS&&!!r.typeElements,"Invalid actionName/JS combo"),function(e,t,n,r){var i;const{enclosingNode:o,typeParameters:a,typeElements:s}=r,c=YC.createInterfaceDeclaration(void 0,n,a,void 0,s);sI(c,null==(i=s[0])?void 0:i.parent),e.insertNodeBefore(t,o,Aw(c),!0);const{firstTypeNode:l,lastTypeNode:u}=_6(r);e.replaceNodeRange(t,l,u,YC.createTypeReferenceNode(n,a.map((e=>YC.createTypeReferenceNode(e.name,void 0)))),{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.ExcludeWhitespace})}(o,n,i,r);default:xn.fail("Unexpected action name")}})),a=n.fileName;return{edits:o,renameFilename:a,renameLocation:$Y(o,a,i,!1)}}});var d6="Move to file",p6=tS(va.Move_to_file),f6={name:"Move to file",description:p6,kind:"refactor.move.file"};function m6(e){return{edits:[],renameFilename:void 0,renameLocation:void 0,notApplicableReason:e}}function g6(e,t,n,r,i,o,a,s,c,l){const u=o.getTypeChecker(),_=yn(e.statements,pf),d=!GZ(t.fileName,o,a,!!e.commonJsModuleIndicator),f=AQ(e,s);E6(n.oldFileImportsFromTargetFile,t.fileName,l,o),v6(e,i.all,n.unusedImportsFromOldFile,l),l.writeFixes(r,f),y6(e,i.ranges,r),x6(r,o,a,e,n.movedSymbols,t.fileName,f),b6(e,n.targetFileImportsFromOldFile,r,d),r3(e,n.oldImportsNeededByTargetFile,n.targetFileImportsFromOldFile,u,o,c),!Am(t)&&_.length&&r.insertStatementsInNewFile(t.fileName,_,e),c.writeFixes(r,f);const m=function(e,t,n,r){return R(t,(t=>{if(F6(t)&&!P6(e,t,r)&&K6(t,(e=>{var t;return n.includes(xn.checkDefined(null==(t=lt(e,p_))?void 0:t.symbol))}))){const e=function(e,t){return t?[A6(e)]:function(e){return[e,...O6(e).map(I6)]}(e)}(NY(t),r);if(e)return e}return NY(t)}))}(e,i.all,$e(n.oldFileImportsFromTargetFile.keys()),d);Am(t)&&t.statements.length>0?function(e,t,n,r,i){var o;const a=new Set,s=null==(o=r.symbol)?void 0:o.exports;if(s){const n=t.getTypeChecker(),o=new Map;for(const e of i.all)F6(e)&&Bv(e,32)&&K6(e,(e=>{var t;const n=g(p_(e)?null==(t=s.get(e.symbol.escapedName))?void 0:t.declarations:void 0,(e=>gN(e)?e:yN(e)?lt(e.parent.parent,gN):void 0));n&&n.moduleSpecifier&&o.set(n,(o.get(n)||new Set).add(e))}));for(const[t,i]of $e(o))if(t.exportClause&&hN(t.exportClause)&&p(t.exportClause.elements)){const o=t.exportClause.elements,s=F(o,(e=>void 0===S(mx(e.symbol,n).declarations,(e=>G6(e)&&i.has(e)))));if(0===p(s)){e.deleteNode(r,t),a.add(t);continue}p(s)gN(e)&&!!e.moduleSpecifier&&!a.has(e)));c?e.insertNodesBefore(r,c,n,!0):e.insertNodesAfter(r,r.statements[r.statements.length-1],n)}(r,o,m,t,i):Am(t)?r.insertNodesAtEndOfFile(t,m,!1):r.insertStatementsInNewFile(t.fileName,c.hasFixes()?[4,...m]:m,e)}function h6(e,t,n,r,i){const o=e.getCompilerOptions().configFile;if(!o)return;const a=Xo(Ko(n,"..",r)),s=fa(o.fileName,a,i),c=o.statements[0]&<(o.statements[0].expression,HE),l=c&&S(c.properties,(e=>BN(e)&&wD(e.name)&&"files"===e.name.text));l&&WE(l.initializer)&&t.insertNodeInListAfter(o,De(l.initializer.elements),YC.createStringLiteral(s),l.initializer.elements)}function y6(e,t,n){for(const{first:r,afterLast:i}of t)n.deleteNodeRangeExcludingEnd(e,r,i)}function v6(e,t,n,r){for(const i of e.statements)D(t,i)||w6(i,(e=>{D6(e,(e=>{n.has(e.symbol)&&r.removeExistingImport(e)}))}))}function b6(e,t,n,r){const i=hQ();t.forEach(((t,o)=>{if(o.declarations)for(const t of o.declarations){if(!G6(t))continue;const o=L6(t);if(!o)continue;const a=j6(t);i(a)&&R6(e,a,o,n,r)}}))}function x6(e,t,n,r,i,o,a){const s=t.getTypeChecker();for(const c of t.getSourceFiles())if(c!==r)for(const l of c.statements)w6(l,(u=>{if(s.getSymbolAtLocation(C6(u))!==r.symbol)return;const _=e=>{const t=KE(e.parent)?RQ(s,e.parent):mx(s.getSymbolAtLocation(e),s);return!!t&&i.has(t)};N6(c,u,e,_);const d=Wo(Ro(Go(r.fileName,t.getCurrentDirectory())),o);if(0===Lt(!t.useCaseSensitiveFileNames())(d,c.fileName))return;const p=VR(t.getCompilerOptions(),c,c.fileName,d,CQ(t,n)),f=M6(u,PQ(p,a),_);f&&e.insertNodeAfter(c,l,f);const m=S6(u);m&&k6(e,c,s,i,p,m,u,a)}))}function S6(e){switch(e.kind){case 272:return e.importClause&&e.importClause.namedBindings&&274===e.importClause.namedBindings.kind?e.importClause.namedBindings.name:void 0;case 271:return e.name;case 260:return lt(e.name,qD);default:return xn.assertNever(e,`Unexpected node kind ${e.kind}`)}}function k6(e,t,n,r,i,o,a,s){const c=LZ(i,99);let l=!1;const u=[];if(Rse.Core.eachSymbolReferenceInFile(o,n,t,(e=>{GE(e.parent)&&(l=l||!!n.resolveName(c,e,-1,!0),r.has(n.getSymbolAtLocation(e.parent.name))&&u.push(e))})),u.length){const n=l?zY(c,t):c;for(const r of u)e.replaceNode(t,r,YC.createIdentifier(n));e.insertNodeAfter(t,a,function(e,t,n,r){const i=YC.createIdentifier(t),o=PQ(n,r);switch(e.kind){case 272:return YC.createImportDeclaration(void 0,YC.createImportClause(!1,void 0,YC.createNamespaceImport(i)),o,void 0);case 271:return YC.createImportEqualsDeclaration(void 0,!1,i,YC.createExternalModuleReference(o));case 260:return YC.createVariableDeclaration(i,void 0,void 0,T6(o));default:return xn.assertNever(e,`Unexpected node kind ${e.kind}`)}}(a,c,i,s))}}function T6(e){return YC.createCallExpression(YC.createIdentifier("require"),void 0,[e])}function C6(e){return 272===e.kind?e.moduleSpecifier:271===e.kind?e.moduleReference.expression:e.initializer.arguments[0]}function w6(e,t){if(iN(e))wD(e.moduleSpecifier)&&t(e);else if(rN(e))SN(e.moduleReference)&&$_(e.moduleReference.expression)&&t(e);else if(EP(e))for(const n of e.declarationList.declarations)n.initializer&&Jm(n.initializer,!0)&&t(n)}function D6(e,t){var n,r,i,o,a;if(272===e.kind){if((null==(n=e.importClause)?void 0:n.name)&&t(e.importClause),274===(null==(i=null==(r=e.importClause)?void 0:r.namedBindings)?void 0:i.kind)&&t(e.importClause.namedBindings),275===(null==(a=null==(o=e.importClause)?void 0:o.namedBindings)?void 0:a.kind))for(const n of e.importClause.namedBindings.elements)t(n)}else if(271===e.kind)t(e);else if(260===e.kind)if(80===e.name.kind)t(e);else if(206===e.name.kind)for(const n of e.name.elements)qD(n.name)&&t(n)}function E6(e,t,n,r){for(const[i,o]of e){const e=FZ(i,wS(r.getCompilerOptions())),a="default"===i.name&&i.parent?1:0;n.addImportForNonExistentExport(e,t,a,i.flags,o)}}function P6(e,t,n,r){var i;return n?!NP(t)&&Bv(t,32)||!!(r&&e.symbol&&(null==(i=e.symbol.exports)?void 0:i.has(r.escapedText))):!!e.symbol&&!!e.symbol.exports&&O6(t).some((t=>e.symbol.exports.has(yc(t))))}function N6(e,t,n,r){if(272===t.kind&&t.importClause){const{name:i,namedBindings:o}=t.importClause;if((!i||r(i))&&(!o||275===o.kind&&0!==o.elements.length&&o.elements.every((e=>r(e.name)))))return n.delete(e,t)}D6(t,(t=>{t.name&&qD(t.name)&&r(t.name)&&n.delete(e,t)}))}function F6(e){return xn.assert(qN(e.parent),"Node parent should be a SourceFile"),Q6(e)||EP(e)}function A6(e){const t=cI(e)?Z([YC.createModifier(95)],Ac(e)):void 0;switch(e.kind){case 262:return YC.updateFunctionDeclaration(e,t,e.asteriskToken,e.name,e.typeParameters,e.parameters,e.type,e.body);case 263:const n=lI(e)?Fc(e):void 0;return YC.updateClassDeclaration(e,Z(n,t),e.name,e.typeParameters,e.heritageClauses,e.members);case 243:return YC.updateVariableStatement(e,t,e.declarationList);case 267:return YC.updateModuleDeclaration(e,t,e.name,e.body);case 266:return YC.updateEnumDeclaration(e,t,e.name,e.members);case 265:return YC.updateTypeAliasDeclaration(e,t,e.name,e.typeParameters,e.type);case 264:return YC.updateInterfaceDeclaration(e,t,e.name,e.typeParameters,e.heritageClauses,e.members);case 271:return YC.updateImportEqualsDeclaration(e,t,e.isTypeOnly,e.name,e.moduleReference);case 244:return xn.fail();default:return xn.assertNever(e,`Unexpected declaration kind ${e.kind}`)}}function I6(e){return YC.createExpressionStatement(YC.createBinaryExpression(YC.createPropertyAccessExpression(YC.createIdentifier("exports"),YC.createIdentifier(e)),64,YC.createIdentifier(e)))}function O6(e){switch(e.kind){case 262:case 263:return[e.name.text];case 243:return q(e.declarationList.declarations,(e=>qD(e.name)?e.name.text:void 0));case 267:case 266:case 265:case 264:case 271:return u;case 244:return xn.fail("Can't export an ExpressionStatement");default:return xn.assertNever(e,`Unexpected decl kind ${e.kind}`)}}function M6(e,t,n){switch(e.kind){case 272:{const r=e.importClause;if(!r)return;const i=r.name&&n(r.name)?r.name:void 0,o=r.namedBindings&&function(e,t){if(274===e.kind)return t(e.name)?e:void 0;{const n=e.elements.filter((e=>t(e.name)));return n.length?YC.createNamedImports(n):void 0}}(r.namedBindings,n);return i||o?YC.createImportDeclaration(void 0,YC.createImportClause(r.isTypeOnly,i,o),NY(t),void 0):void 0}case 271:return n(e.name)?e:void 0;case 260:{const r=function(e,t){switch(e.kind){case 80:return t(e)?e:void 0;case 207:return e;case 206:{const n=e.elements.filter((e=>e.propertyName||!qD(e.name)||t(e.name)));return n.length?YC.createObjectBindingPattern(n):void 0}}}(e.name,n);return r?function(e,t,n,r=2){return YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(e,void 0,t,n)],r))}(r,e.type,T6(t),e.parent.flags):void 0}default:return xn.assertNever(e,`Unexpected import kind ${e.kind}`)}}function L6(e){return NP(e)?lt(e.expression.left.name,qD):lt(e.name,qD)}function j6(e){switch(e.kind){case 260:return e.parent.parent;case 208:return j6(ut(e.parent.parent,(e=>KP(e)||KE(e))));default:return e}}function R6(e,t,n,r,i){if(!P6(e,t,i,n))if(i)NP(t)||r.insertExportModifier(e,t);else{const n=O6(t);0!==n.length&&r.insertNodesAfter(e,t,n.map(I6))}}function B6(e,t,n,r){const i=t.getTypeChecker();if(r){const t=q6(e,r.all,i),s=Ro(e.fileName),c=sT(e.fileName),l=Ko(s,function(e,t,n,r){let i=e;for(let o=1;;o++){const a=Ko(n,i+t);if(!r.fileExists(a))return i;i=`${e}.${o}`}}((o=t.oldFileImportsFromTargetFile,a=t.movedSymbols,ud(o,OQ)||ud(a,OQ)||"newFile"),c,s,n))+c;return l}var o,a;return""}function J6(e){const t=function(e){const{file:t}=e,n=uQ(wZ(e)),{statements:r}=t;let i=T(r,(e=>e.end>n.pos));if(-1===i)return;const o=Y6(t,r[i]);o&&(i=o.start);let a=T(r,(e=>e.end>=n.end),i);-1!==a&&n.end<=r[a].getStart()&&a--;const s=Y6(t,r[a]);return s&&(a=s.end),{toMove:r.slice(i,-1===a?r.length:a+1),afterLast:-1===a?void 0:r[a+1]}}(e);if(void 0===t)return;const n=[],r=[],{toMove:i,afterLast:o}=t;return Y(i,$6,((e,t)=>{for(let r=e;r!!(2&e.transformFlags)))}function $6(e){return!function(e){switch(e.kind){case 272:return!0;case 271:return!Bv(e,32);case 243:return e.declarationList.declarations.every((e=>!!e.initializer&&Jm(e.initializer,!0)));default:return!1}}(e)&&!pf(e)}function q6(e,t,n,r=new Set){var i;const o=new Set,a=new Map,s=new Map,c=function(e){if(void 0===e)return;const t=n.getJsxNamespace(e),r=n.resolveName(t,e,1920,!0);return r&&Q(r.declarations,W6)?r:void 0}(z6(t));c&&a.set(c,[!1,lt(null==(i=c.declarations)?void 0:i[0],(e=>fN(e)||oN(e)||_N(e)||rN(e)||KE(e)||KP(e)))]);for(const e of t)K6(e,(e=>{o.add(xn.checkDefined(NP(e)?n.getSymbolAtLocation(e.expression.left):e.symbol,"Need a symbol here"))}));const l=new Set;for(const i of t)U6(i,n,((t,i)=>{var c;if(t.declarations&&!V6(n,t))if(r.has(mx(t,n)))l.add(t);else for(const n of t.declarations)if(W6(n)){const e=a.get(t);a.set(t,[(void 0===e||e)&&i,lt(n,(e=>fN(e)||oN(e)||_N(e)||rN(e)||KE(e)||KP(e)))])}else G6(n)&&(KP(c=n)?c.parent.parent.parent:c.parent)===e&&!o.has(t)&&s.set(t,i)}));for(const e of a.keys())l.add(e);const u=new Map;for(const r of e.statements)D(t,r)||(c&&2&r.transformFlags&&l.delete(c),U6(r,n,((e,t)=>{o.has(e)&&u.set(e,t),l.delete(e)})));return{movedSymbols:o,targetFileImportsFromOldFile:s,oldFileImportsFromTargetFile:u,oldImportsNeededByTargetFile:a,unusedImportsFromOldFile:l}}function V6(e,t){return!!e.resolveName(t.name,void 0,788968,!1)}function U6(e,t,n){e.forEachChild((function e(r){if(qD(r)&&!dh(r)){const e=t.getSymbolAtLocation(r);e&&n(e,wT(r))}else r.forEachChild(e)}))}function K6(e,t){switch(e.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return t(e);case 243:return g(e.declarationList.declarations,(e=>X6(e.name,t)));case 244:{const{expression:n}=e;return uP(n)&&1===ag(n)?t(e):void 0}}}function W6(e){switch(e.kind){case 271:case 276:case 273:case 274:return!0;case 260:return H6(e);case 208:return KP(e.parent.parent)&&H6(e.parent.parent);default:return!1}}function H6(e){return qN(e.parent.parent.parent)&&!!e.initializer&&Jm(e.initializer,!0)}function G6(e){return Q6(e)&&qN(e.parent)||KP(e)&&qN(e.parent.parent.parent)}function X6(e,t){switch(e.kind){case 80:return t(ut(e.parent,(e=>KP(e)||KE(e))));case 207:case 206:return g(e.elements,(e=>gP(e)?void 0:X6(e.name,t)));default:return xn.assertNever(e,`Unexpected name kind ${e.kind}`)}}function Q6(e){switch(e.kind){case 262:case 263:case 267:case 266:case 265:case 264:case 271:return!0;default:return!1}}function Y6(e,t){if(uu(t)){const n=t.symbol.declarations;if(void 0===n||p(n)<=1||!D(n,t))return;const r=n[0],i=n[p(n)-1],o=q(n,(t=>Sd(t)===e&&b_(t)?t:void 0)),a=T(e.statements,(e=>e.end>=i.end));return{toMove:o,start:T(e.statements,(e=>e.end>=r.end)),end:a}}}function Z6(e,t,n){const r=new Set;for(const t of e.imports){const e=kg(t);if(iN(e)&&e.importClause&&e.importClause.namedBindings&&pN(e.importClause.namedBindings))for(const t of e.importClause.namedBindings.elements){const e=n.getSymbolAtLocation(t.propertyName||t.name);e&&r.add(mx(e,n))}if(zm(e.parent)&&VE(e.parent.name))for(const t of e.parent.name.elements){const e=n.getSymbolAtLocation(t.propertyName||t.name);e&&r.add(mx(e,n))}}for(const i of t)U6(i,n,(t=>{const i=mx(t,n);i.valueDeclaration&&Sd(i.valueDeclaration).path===e.path&&r.add(i)}));return r}function e3(e){return void 0!==e.error}function t3(e,t){return!t||e.substr(0,t.length)===t}function n3(e,t,n,r){return!GE(e)||gu(t)||n.resolveName(e.name.text,e,111551,!1)||VD(e.name)||xc(e.name)?zY(gu(t)?"newProperty":"newLocal",r):e.name.text}function r3(e,t,n,r,i,o){t.forEach((([e,t],n)=>{var i;const a=mx(n,r);r.isUnknownSymbol(a)?o.addVerbatimImport(xn.checkDefined(t??mc(null==(i=n.declarations)?void 0:i[0],Cp))):o.addImportFromExportedSymbol(a,e,t)})),E6(n,e.fileName,o,i)}z2(d6,{kinds:[f6.kind],getAvailableActions:function(e,t){const n=e.file,r=J6(e);if(!t)return u;if("implicit"===e.triggerReason&&void 0!==e.endPosition){const t=mc(kX(n,e.startPosition),XZ),r=mc(kX(n,e.endPosition),XZ);if(t&&!qN(t)&&r&&!qN(r))return u}if(e.preferences.allowTextChangesInNewFiles&&r){const e={start:{line:Xa(n,r.all[0].getStart(n)).line,offset:Xa(n,r.all[0].getStart(n)).character},end:{line:Xa(n,De(r.all).end).line,offset:Xa(n,De(r.all).end).character}};return[{name:d6,description:p6,actions:[{...f6,range:e}]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:d6,description:p6,actions:[{...f6,notApplicableReason:tS(va.Selection_is_not_a_valid_statement_or_statements)}]}]:u},getEditsForAction:function(e,t,n){xn.assert(t===d6,"Wrong refactor invoked");const r=xn.checkDefined(J6(e)),{host:i,program:o}=e;xn.assert(n,"No interactive refactor arguments available");const a=n.targetFile;if(qk(a)||Vk(a)){if(i.fileExists(a)&&void 0===o.getSourceFile(a))return m6(tS(va.Cannot_move_statements_to_the_selected_file));const t=r_e.ChangeTracker.with(e,(t=>function(e,t,n,r,i,o,a,s){const c=r.getTypeChecker(),l=!a.fileExists(n),u=l?QZ(n,t.externalModuleIndicator?99:t.commonJsModuleIndicator?1:void 0,r,a):xn.checkDefined(r.getSourceFile(n)),_=a8.createImportAdder(t,e.program,e.preferences,e.host),d=a8.createImportAdder(u,e.program,e.preferences,e.host);g6(t,u,q6(t,i.all,c,l?void 0:Z6(u,i.all,c)),o,i,r,a,s,d,_),l&&h6(r,o,t.fileName,n,Wy(a))}(e,e.file,n.targetFile,e.program,r,t,e.host,e.preferences)));return{edits:t,renameFilename:void 0,renameLocation:void 0}}return m6(tS(va.Cannot_move_to_file_selected_file_is_invalid))}});var i3="Inline variable",o3=tS(va.Inline_variable),a3={name:i3,description:o3,kind:"refactor.inline.variable"};function s3(e,t,n,r){var i,o;const a=r.getTypeChecker(),s=xX(e,t),c=s.parent;if(qD(s)){if(ux(c)&&Mf(c)&&qD(c.name)){if(1!==(null==(i=a.getMergedSymbol(c.symbol).declarations)?void 0:i.length))return{error:tS(va.Variables_with_multiple_declarations_cannot_be_inlined)};if(c3(c))return;const t=l3(c,a,e);return t&&{references:t,declaration:c,replacement:c.initializer}}if(n){let t=a.resolveName(s.text,s,111551,!1);if(t=t&&a.getMergedSymbol(t),1!==(null==(o=null==t?void 0:t.declarations)?void 0:o.length))return{error:tS(va.Variables_with_multiple_declarations_cannot_be_inlined)};const n=t.declarations[0];if(!ux(n)||!Mf(n)||!qD(n.name))return;if(c3(n))return;const r=l3(n,a,e);return r&&{references:r,declaration:n,replacement:n.initializer}}return{error:tS(va.Could_not_find_variable_to_inline)}}}function c3(e){return Q(ut(e.parent.parent,EP).modifiers,UD)}function l3(e,t,n){const r=[],i=Rse.Core.eachSymbolReferenceInFile(e.name,t,n,(t=>!(!Rse.isWriteAccessForReference(t)||JN(t.parent))||!(!yN(t.parent)&&!mN(t.parent))||!!TE(t.parent)||!!Js(e,t.pos)||void r.push(t)));return 0===r.length||i?void 0:r}function u3(e,t){t=NY(t);const{parent:n}=e;return Xu(n)&&(fy(t){for(const t of a)e.replaceNode(n,t,u3(t,c));e.delete(n,s)}))}}});var _3="Move to a new file",d3=tS(va.Move_to_a_new_file),p3={name:_3,description:d3,kind:"refactor.move.newFile"};z2(_3,{kinds:[p3.kind],getAvailableActions:function(e){const t=J6(e),n=e.file;if("implicit"===e.triggerReason&&void 0!==e.endPosition){const t=mc(kX(n,e.startPosition),XZ),r=mc(kX(n,e.endPosition),XZ);if(t&&!qN(t)&&r&&!qN(r))return u}if(e.preferences.allowTextChangesInNewFiles&&t){const n=e.file,r={start:{line:Xa(n,t.all[0].getStart(n)).line,offset:Xa(n,t.all[0].getStart(n)).character},end:{line:Xa(n,De(t.all).end).line,offset:Xa(n,De(t.all).end).character}};return[{name:_3,description:d3,actions:[{...p3,range:r}]}]}return e.preferences.provideRefactorNotApplicableReason?[{name:_3,description:d3,actions:[{...p3,notApplicableReason:tS(va.Selection_is_not_a_valid_statement_or_statements)}]}]:u},getEditsForAction:function(e,t){xn.assert(t===_3,"Wrong refactor invoked");const n=xn.checkDefined(J6(e)),r=r_e.ChangeTracker.with(e,(t=>function(e,t,n,r,i,o,a){const s=t.getTypeChecker(),c=q6(e,n.all,s),l=B6(e,t,i,n),u=QZ(l,e.externalModuleIndicator?99:e.commonJsModuleIndicator?1:void 0,t,i),_=a8.createImportAdder(e,o.program,o.preferences,o.host);g6(e,u,c,r,n,t,i,a,a8.createImportAdder(u,o.program,o.preferences,o.host),_),h6(t,r,e.fileName,l,Wy(i))}(e.file,e.program,n,t,e.host,e,e.preferences)));return{edits:r,renameFilename:void 0,renameLocation:void 0}}});var f3={},m3="Convert overload list to single signature",g3=tS(va.Convert_overload_list_to_single_signature),h3={name:m3,description:g3,kind:"refactor.rewrite.function.overloadList"};function y3(e){switch(e.kind){case 173:case 174:case 179:case 176:case 180:case 262:return!0}return!1}function v3(e,t,n){const r=mc(kX(e,t),y3);if(!r)return;if(uu(r)&&r.body&&YG(r.body,t))return;const i=n.getTypeChecker(),o=r.symbol;if(!o)return;const a=o.declarations;if(p(a)<=1)return;if(!x(a,(t=>Sd(t)===e)))return;if(!y3(a[0]))return;const s=a[0].kind;if(!x(a,(e=>e.kind===s)))return;const c=a;if(Q(c,(e=>!!e.typeParameters||Q(e.parameters,(e=>!!e.modifiers||!qD(e.name))))))return;const l=q(c,(e=>i.getSignatureFromDeclaration(e)));if(p(l)!==p(a))return;const u=i.getReturnTypeOfSignature(l[0]);return x(l,(e=>i.getReturnTypeOfSignature(e)===u))?c:void 0}z2(m3,{kinds:[h3.kind],getEditsForAction:function(e){const{file:t,startPosition:n,program:r}=e,i=v3(t,n,r);if(!i)return;const o=r.getTypeChecker(),a=i[i.length-1];let s=a;switch(a.kind){case 173:s=YC.updateMethodSignature(a,a.modifiers,a.name,a.questionToken,a.typeParameters,c(i),a.type);break;case 174:s=YC.updateMethodDeclaration(a,a.modifiers,a.asteriskToken,a.name,a.questionToken,a.typeParameters,c(i),a.type,a.body);break;case 179:s=YC.updateCallSignature(a,a.typeParameters,c(i),a.type);break;case 176:s=YC.updateConstructorDeclaration(a,a.modifiers,c(i),a.body);break;case 180:s=YC.updateConstructSignature(a,a.typeParameters,c(i),a.type);break;case 262:s=YC.updateFunctionDeclaration(a,a.modifiers,a.asteriskToken,a.name,a.typeParameters,c(i),a.type,a.body);break;default:return xn.failBadSyntaxKind(a,"Unhandled signature kind in overload list conversion refactoring")}if(s!==a)return{renameFilename:void 0,renameLocation:void 0,edits:r_e.ChangeTracker.with(e,(e=>{e.replaceNodeRange(t,i[0],i[i.length-1],s)}))};function c(e){const t=e[e.length-1];return uu(t)&&t.body&&(e=e.slice(0,e.length-1)),YC.createNodeArray([YC.createParameterDeclaration(void 0,YC.createToken(26),"args",void 0,YC.createUnionTypeNode(O(e,l)))])}function l(e){const t=O(e.parameters,u);return iw(YC.createTupleTypeNode(t),Q(t,(e=>!!p(gw(e))))?0:1)}function u(e){xn.assert(qD(e.name));const t=sI(YC.createNamedTupleMember(e.dotDotDotToken,e.name,e.questionToken,e.type||YC.createKeywordTypeNode(133)),e),n=e.symbol&&e.symbol.getDocumentationComment(o);if(n){const e=S7(n);e.length&&hw(t,[{text:`*\n${e.split("\n").map((e=>` * ${e}`)).join("\n")}\n `,kind:3,pos:-1,end:-1,hasTrailingNewLine:!0,hasLeadingNewline:!0}])}return t}},getAvailableActions:function(e){const{file:t,startPosition:n,program:r}=e;return v3(t,n,r)?[{name:m3,description:g3,actions:[h3]}]:u}});var b3="Add or remove braces in an arrow function",x3=tS(va.Add_or_remove_braces_in_an_arrow_function),S3={name:"Add braces to arrow function",description:tS(va.Add_braces_to_arrow_function),kind:"refactor.rewrite.arrow.braces.add"},k3={name:"Remove braces from arrow function",description:tS(va.Remove_braces_from_arrow_function),kind:"refactor.rewrite.arrow.braces.remove"};function T3(e,t,n=!0,r){const i=kX(e,t),o=Qf(i);if(!o)return{error:tS(va.Could_not_find_a_containing_arrow_function)};if(!rP(o))return{error:tS(va.Containing_function_is_not_an_arrow_function)};if(XG(o,i)&&(!XG(o.body,i)||n)){if(t3(S3.kind,r)&&Xu(o.body))return{func:o,addBraces:!0,expression:o.body};if(t3(k3.kind,r)&&DP(o.body)&&1===o.body.statements.length){const e=Te(o.body.statements);if(BP(e))return{func:o,addBraces:!1,expression:e.expression&&HE(Bx(e.expression,!1))?YC.createParenthesizedExpression(e.expression):e.expression,returnStatement:e}}}}z2(b3,{kinds:[k3.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r}=e,i=T3(n,r);xn.assert(i&&!e3(i),"Expected applicable refactor info");const{expression:o,returnStatement:a,func:s}=i;let c;if(t===S3.name){const e=YC.createReturnStatement(o);c=YC.createBlock([e],!0),qY(o,e,n,3,!0)}else if(t===k3.name&&a){const e=o||YC.createVoidZero();c=HY(e)?YC.createParenthesizedExpression(e):e,UY(a,c,n,3,!1),qY(a,c,n,3,!1),VY(a,c,n,3,!1)}else xn.fail("invalid action");return{renameFilename:void 0,renameLocation:void 0,edits:r_e.ChangeTracker.with(e,(e=>{e.replaceNode(n,s.body,c)}))}},getAvailableActions:function(e){const{file:t,startPosition:n,triggerReason:r}=e,i=T3(t,n,"invoked"===r);return i?e3(i)?e.preferences.provideRefactorNotApplicableReason?[{name:b3,description:x3,actions:[{...S3,notApplicableReason:i.error},{...k3,notApplicableReason:i.error}]}]:u:[{name:b3,description:x3,actions:[i.addBraces?S3:k3]}]:u}});var C3={},w3="Convert arrow function or function expression",D3=tS(va.Convert_arrow_function_or_function_expression),E3={name:"Convert to anonymous function",description:tS(va.Convert_to_anonymous_function),kind:"refactor.rewrite.function.anonymous"},P3={name:"Convert to named function",description:tS(va.Convert_to_named_function),kind:"refactor.rewrite.function.named"},N3={name:"Convert to arrow function",description:tS(va.Convert_to_arrow_function),kind:"refactor.rewrite.function.arrow"};function F3(e){let t=!1;return e.forEachChild((function e(n){WG(n)?t=!0:gu(n)||HP(n)||nP(n)||LI(n,e)})),t}function A3(e,t,n){const r=kX(e,t),i=n.getTypeChecker(),o=function(e,t,n){if(!function(e){return KP(e)||WP(e)&&1===e.declarations.length}(n))return;const r=(KP(n)?n:Te(n.declarations)).initializer;return r&&(rP(r)||nP(r)&&!O3(e,t,r))?r:void 0}(e,i,r.parent);if(o&&!F3(o.body)&&!i.containsArgumentsReference(o))return{selectedVariableDeclaration:!0,func:o};const a=Qf(r);if(a&&(nP(a)||rP(a))&&!XG(a.body,r)&&!F3(a.body)&&!i.containsArgumentsReference(a)){if(nP(a)&&O3(e,i,a))return;return{selectedVariableDeclaration:!1,func:a}}}function I3(e){if(Xu(e)){const t=YC.createReturnStatement(e),n=e.getSourceFile();return sI(t,e),MY(t),UY(e,t,n,void 0,!0),YC.createBlock([t],!0)}return e}function O3(e,t,n){return!!n.name&&Rse.Core.isSymbolReferencedInFile(n.name,t,e)}z2(w3,{kinds:[E3.kind,P3.kind,N3.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r,program:i}=e,o=A3(n,r,i);if(!o)return;const{func:a}=o,s=[];switch(t){case E3.name:s.push(...function(e,t){const{file:n}=e,r=I3(t.body),i=YC.createFunctionExpression(t.modifiers,t.asteriskToken,void 0,t.typeParameters,t.parameters,t.type,r);return r_e.ChangeTracker.with(e,(e=>e.replaceNode(n,t,i)))}(e,a));break;case P3.name:const t=function(e){const t=e.parent;if(!KP(t)||!Mf(t))return;const n=t.parent,r=n.parent;return WP(n)&&EP(r)&&qD(t.name)?{variableDeclaration:t,variableDeclarationList:n,statement:r,name:t.name}:void 0}(a);if(!t)return;s.push(...function(e,t,n){const{file:r}=e,i=I3(t.body),{variableDeclaration:o,variableDeclarationList:a,statement:s,name:c}=n;LY(s);const l=32&cc(o)|Qv(t),u=YC.createModifiersFromModifierFlags(l),_=YC.createFunctionDeclaration(p(u)?u:void 0,t.asteriskToken,c,t.typeParameters,t.parameters,t.type,i);return 1===a.declarations.length?r_e.ChangeTracker.with(e,(e=>e.replaceNode(r,s,_))):r_e.ChangeTracker.with(e,(e=>{e.delete(r,o),e.insertNodeAfter(r,s,_)}))}(e,a,t));break;case N3.name:if(!nP(a))return;s.push(...function(e,t){const{file:n}=e,r=t.body.statements[0];let i;!function(e,t){return 1===e.statements.length&&BP(t)&&!!t.expression}(t.body,r)?i=t.body:(i=r.expression,MY(i),RY(r,i));const o=YC.createArrowFunction(t.modifiers,t.typeParameters,t.parameters,t.type,YC.createToken(39),i);return r_e.ChangeTracker.with(e,(e=>e.replaceNode(n,t,o)))}(e,a));break;default:return xn.fail("invalid action")}return{renameFilename:void 0,renameLocation:void 0,edits:s}},getAvailableActions:function(e){const{file:t,startPosition:n,program:r,kind:i}=e,o=A3(t,n,r);if(!o)return u;const{selectedVariableDeclaration:a,func:s}=o,c=[],l=[];if(t3(P3.kind,i)){const e=a||rP(s)&&KP(s.parent)?void 0:tS(va.Could_not_convert_to_named_function);e?l.push({...P3,notApplicableReason:e}):c.push(P3)}if(t3(E3.kind,i)){const e=!a&&rP(s)?void 0:tS(va.Could_not_convert_to_anonymous_function);e?l.push({...E3,notApplicableReason:e}):c.push(E3)}if(t3(N3.kind,i)){const e=nP(s)?void 0:tS(va.Could_not_convert_to_arrow_function);e?l.push({...N3,notApplicableReason:e}):c.push(N3)}return[{name:w3,description:D3,actions:0===c.length&&e.preferences.provideRefactorNotApplicableReason?l:c}]}});var M3={},L3="Convert parameters to destructured object",j3=tS(va.Convert_parameters_to_destructured_object),R3={name:L3,description:j3,kind:"refactor.rewrite.parameters.toDestructured"};function B3(e,t){const n=O7(e);if(n){const e=t.getContextualTypeForObjectLiteralElement(n),r=null==e?void 0:e.getSymbol();if(r&&!(6&px(r)))return r}}function J3(e){const t=e.node;return fN(t.parent)||oN(t.parent)||rN(t.parent)||_N(t.parent)||yN(t.parent)||mN(t.parent)?t:void 0}function z3(e){if(h_(e.node.parent))return e.node}function $3(e){if(e.node.parent){const t=e.node,n=t.parent;switch(n.kind){case 213:case 214:const e=lt(n,$u);if(e&&e.expression===t)return e;break;case 211:const r=lt(n,GE);if(r&&r.parent&&r.name===t){const e=lt(r.parent,$u);if(e&&e.expression===r)return e}break;case 212:const i=lt(n,XE);if(i&&i.parent&&i.argumentExpression===t){const e=lt(i.parent,$u);if(e&&e.expression===i)return e}}}}function q3(e){if(e.node.parent){const t=e.node,n=t.parent;switch(n.kind){case 211:const e=lt(n,GE);if(e&&e.expression===t)return e;break;case 212:const r=lt(n,XE);if(r&&r.expression===t)return r}}}function V3(e){const t=e.node;if(2===yG(t)||yb(t.parent))return t}function U3(e,t,n){const r=SX(e,t),i=Yf(r);if(!function(e){const t=mc(e,P_);if(t){const e=mc(t,(e=>!P_(e)));return!!e&&uu(e)}return!1}(r))return!(i&&function(e,t){var n;if(!function(e,t){return function(e){return G3(e)?e.length-1:e.length}(e)>=1&&x(e,(e=>function(e,t){if(U_(e)){const n=t.getTypeAtLocation(e);if(!t.isArrayType(n)&&!t.isTupleType(n))return!1}return!e.modifiers&&qD(e.name)}(e,t)))}(e.parameters,t))return!1;switch(e.kind){case 262:return W3(e)&&K3(e,t);case 174:if(HE(e.parent)){const r=B3(e.name,t);return 1===(null==(n=null==r?void 0:r.declarations)?void 0:n.length)&&K3(e,t)}return K3(e,t);case 176:return GP(e.parent)?W3(e.parent)&&K3(e,t):H3(e.parent.parent)&&K3(e,t);case 218:case 219:return H3(e.parent)}return!1}(i,n)&&XG(i,r))||i.body&&XG(i.body,r)?void 0:i}function K3(e,t){return!!e.body&&!t.isImplementationOfOverload(e)}function W3(e){return!!e.name||!!zQ(e,90)}function H3(e){return KP(e)&&af(e)&&qD(e.name)&&!e.type}function G3(e){return e.length>0&&WG(e[0].name)}function X3(e){return G3(e)&&(e=YC.createNodeArray(e.slice(1),e.hasTrailingComma)),e}function Q3(e,t){const n=X3(e.parameters),r=U_(De(n)),i=O(r?t.slice(0,n.length-1):t,((e,t)=>{const r=(i=Z3(n[t]),qD(o=e)&&Hh(o)===i?YC.createShorthandPropertyAssignment(i):YC.createPropertyAssignment(i,o));var i,o;return MY(r.name),BN(r)&&MY(r.initializer),RY(e,r),r}));if(r&&t.length>=n.length){const e=t.slice(n.length-1),r=YC.createPropertyAssignment(Z3(De(n)),YC.createArrayLiteralExpression(e));i.push(r)}return YC.createObjectLiteralExpression(i,!1)}function Y3(e,t,n){const r=t.getTypeChecker(),i=X3(e.parameters),o=O(i,(function(e){const t=YC.createBindingElement(void 0,void 0,Z3(e),U_(e)&&_(e)?YC.createArrayLiteralExpression():e.initializer);return MY(t),e.initializer&&t.initializer&&RY(e.initializer,t.initializer),t})),a=YC.createObjectBindingPattern(o),s=function(e){const t=O(e,u);return ow(YC.createTypeLiteralNode(t),1)}(i);let c;x(i,_)&&(c=YC.createObjectLiteralExpression());const l=YC.createParameterDeclaration(void 0,void 0,a,void 0,s,c);if(G3(e.parameters)){const t=e.parameters[0],n=YC.createParameterDeclaration(void 0,void 0,t.name,void 0,t.type);return MY(n.name),RY(t.name,n.name),t.type&&(MY(n.type),RY(t.type,n.type)),YC.createNodeArray([n,l])}return YC.createNodeArray([l]);function u(e){let i=e.type;var o;i||!e.initializer&&!U_(e)||(o=e,i=nZ(r.getTypeAtLocation(o),o,t,n));const a=YC.createPropertySignature(void 0,Z3(e),_(e)?YC.createToken(58):e.questionToken,i);return MY(a),RY(e.name,a.name),e.type&&a.type&&RY(e.type,a.type),a}function _(e){if(U_(e)){const t=r.getTypeAtLocation(e);return!r.isTupleType(t)}return r.isOptionalParameter(e)}}function Z3(e){return Hh(e.name)}z2(L3,{kinds:[R3.kind],getEditsForAction:function(e,t){xn.assert(t===L3,"Unexpected action name");const{file:n,startPosition:r,program:i,cancellationToken:o,host:a}=e,s=U3(n,r,i.getTypeChecker());if(!s||!o)return;const c=function(e,t,n){const r=function(e){switch(e.kind){case 262:return e.name?[e.name]:[xn.checkDefined(zQ(e,90),"Nameless function declaration should be a default export")];case 174:return[e.name];case 176:const t=xn.checkDefined(uX(e,137,e.getSourceFile()),"Constructor declaration should have constructor keyword");return 231===e.parent.kind?[e.parent.parent.name,t]:[t];case 219:return[e.parent.name];case 218:return e.name?[e.name,e.parent.name]:[e.parent.name];default:return xn.assertNever(e,`Unexpected function declaration kind ${e.kind}`)}}(e),i=fE(e)?function(e){switch(e.parent.kind){case 263:const t=e.parent;return t.name?[t.name]:[xn.checkDefined(zQ(t,90),"Nameless class declaration should be a default export")];case 231:const n=e.parent,r=e.parent.parent,i=n.name;return i?[i,r.name]:[r.name]}}(e):[],o=ne([...r,...i],wt),a=t.getTypeChecker(),s=function(t){const n={accessExpressions:[],typeUsages:[]},o={functionCalls:[],declarations:[],classReferences:n,valid:!0},s=O(r,c),l=O(i,c),u=fE(e),_=O(r,(e=>B3(e,a)));for(const r of t){if(r.kind===Rse.EntryKind.Span){o.valid=!1;continue}if(D(_,c(r.node))){if(_E(d=r.node.parent)&&(XP(d.parent)||CE(d.parent))){o.signature=r.node.parent;continue}const e=$3(r);if(e){o.functionCalls.push(e);continue}}const t=B3(r.node,a);if(t&&D(_,t)){const e=z3(r);if(e){o.declarations.push(e);continue}}if(D(s,c(r.node))||xG(r.node)){if(J3(r))continue;const e=z3(r);if(e){o.declarations.push(e);continue}const t=$3(r);if(t){o.functionCalls.push(t);continue}}if(u&&D(l,c(r.node))){if(J3(r))continue;const t=z3(r);if(t){o.declarations.push(t);continue}const i=q3(r);if(i){n.accessExpressions.push(i);continue}if(GP(e.parent)){const e=V3(r);if(e){n.typeUsages.push(e);continue}}}o.valid=!1}var d;return o}(R(o,(e=>Rse.getReferenceEntriesForNode(-1,e,t,t.getSourceFiles(),n))));return x(s.declarations,(e=>D(o,e)))||(s.valid=!1),s;function c(e){const t=a.getSymbolAtLocation(e);return t&&CY(t,a)}}(s,i,o);if(c.valid){const t=r_e.ChangeTracker.with(e,(e=>function(e,t,n,r,i,o){const a=o.signature,s=O(Y3(i,t,n),(e=>NY(e)));a&&l(a,O(Y3(a,t,n),(e=>NY(e)))),l(i,s);const c=oe(o.functionCalls,((e,t)=>Nt(e.pos,t.pos)));for(const e of c)if(e.arguments&&e.arguments.length){const t=NY(Q3(i,e.arguments),!0);r.replaceNodeRange(Sd(e),Te(e.arguments),De(e.arguments),t,{leadingTriviaOption:r_e.LeadingTriviaOption.IncludeAll,trailingTriviaOption:r_e.TrailingTriviaOption.Include})}function l(t,n){r.replaceNodeRangeWithNodes(e,Te(t.parameters),De(t.parameters),n,{joiner:", ",indentation:0,leadingTriviaOption:r_e.LeadingTriviaOption.IncludeAll,trailingTriviaOption:r_e.TrailingTriviaOption.Include})}}(n,i,a,e,s,c)));return{renameFilename:void 0,renameLocation:void 0,edits:t}}return{edits:[]}},getAvailableActions:function(e){const{file:t,startPosition:n}=e;return Im(t)?u:U3(t,n,e.program.getTypeChecker())?[{name:L3,description:j3,actions:[R3]}]:u}});var e4={},t4="Convert to template string",n4=tS(va.Convert_to_template_string),r4={name:t4,description:n4,kind:"refactor.rewrite.string"};function i4(e,t){const n=kX(e,t),r=a4(n);return!s4(r).isValidConcatenation&&tP(r.parent)&&uP(r.parent.parent)?r.parent.parent:n}function o4(e,t){const n=a4(t),r=e.file,i=function({nodes:e,operators:t},n){const r=((e,t)=>(n,r)=>{n(r,i)=>{for(;r.length>0;){const o=r.shift();VY(e[o],i,t,3,!1),n(o,i)}})(e,n,r),[o,a,s,c]=l4(0,e);if(o===e.length){const e=YC.createNoSubstitutionTemplateLiteral(a,s);return i(c,e),e}const l=[],u=YC.createTemplateHead(a,s);i(c,u);for(let t=o;t{u4(e);const r=t===n.templateSpans.length-1,i=e.literal.text+(r?a:""),o=c4(e.literal)+(r?s:"");return YC.createTemplateSpan(e.expression,u&&r?YC.createTemplateTail(i,o):YC.createTemplateMiddle(i,o))}));l.push(...e)}else{const e=u?YC.createTemplateTail(a,s):YC.createTemplateMiddle(a,s);i(c,e),l.push(YC.createTemplateSpan(n,e))}}return YC.createTemplateExpression(u,l)}(s4(n),r),o=bs(r.text,n.end);if(o){const t=o[o.length-1],a={pos:o[0].pos,end:t.end};return r_e.ChangeTracker.with(e,(e=>{e.deleteRange(r,a),e.replaceNode(r,n,i)}))}return r_e.ChangeTracker.with(e,(e=>e.replaceNode(r,n,i)))}function a4(e){return mc(e.parent,(e=>{switch(e.kind){case 211:case 212:return!1;case 228:case 226:return!(uP(e.parent)&&(t=e.parent,64!==t.operatorToken.kind&&65!==t.operatorToken.kind));default:return"quit"}var t}))||e}function s4(e){const t=e=>{if(!uP(e))return{nodes:[e],operators:[],validOperators:!0,hasString:wD(e)||PD(e)};const{nodes:n,operators:r,hasString:i,validOperators:o}=t(e.left);if(!(i||wD(e.right)||dP(e.right)))return{nodes:[e],operators:[],hasString:!1,validOperators:!0};const a=40===e.operatorToken.kind,s=o&&a;return n.push(e.right),r.push(e.operatorToken),{nodes:n,operators:r,hasString:!0,validOperators:s}},{nodes:n,operators:r,validOperators:i,hasString:o}=t(e);return{nodes:n,operators:r,isValidConcatenation:i&&o}}function c4(e){const t=ND(e)||FD(e)?-2:-1;return Gd(e).slice(1,t)}function l4(e,t){const n=[];let r="",i="";for(;e"\\"===e[0]?e:"\\"+e)),n.push(e),e++}return[e,r,i,n]}function u4(e){const t=e.getSourceFile();VY(e,e.expression,t,3,!1),UY(e.expression,e.expression,t,3,!1)}function _4(e){return tP(e)&&(u4(e),e=e.expression),e}z2(t4,{kinds:[r4.kind],getEditsForAction:function(e,t){const{file:n,startPosition:r}=e,i=i4(n,r);return t===n4?{edits:o4(e,i)}:xn.fail("invalid action")},getAvailableActions:function(e){const{file:t,startPosition:n}=e,r=a4(i4(t,n)),i=wD(r),o={name:t4,description:n4,actions:[]};return i&&"invoked"!==e.triggerReason?u:Tm(r)&&(i||uP(r)&&s4(r).isValidConcatenation)?(o.actions.push(r4),[o]):e.preferences.provideRefactorNotApplicableReason?(o.actions.push({...r4,notApplicableReason:tS(va.Can_only_convert_string_concatenations_and_string_literals)}),[o]):u}});var d4={},p4="Convert to optional chain expression",f4=tS(va.Convert_to_optional_chain_expression),m4={name:p4,description:f4,kind:"refactor.rewrite.expression.optionalChain"};function g4(e){return uP(e)||_P(e)}function h4(e){return g4(e)||function(e){return NP(e)||BP(e)||EP(e)}(e)}function y4(e,t=!0){const{file:n,program:r}=e,i=wZ(e),o=0===i.length;if(o&&!t)return;const a=kX(n,i.start),s=wX(n,i.start+i.length),c=Xs(a.pos,s&&s.end>=a.pos?s.getEnd():a.getEnd()),l=o?function(e){for(;e.parent;){if(h4(e)&&!h4(e.parent))return e;e=e.parent}}(a):function(e,t){for(;e.parent;){if(h4(e)&&0!==t.length&&e.end>=t.start+t.length)return e;e=e.parent}}(a,c),u=l&&h4(l)?function(e){if(g4(e))return e;if(EP(e)){const t=Mg(e),n=null==t?void 0:t.initializer;return n&&g4(n)?n:void 0}return e.expression&&g4(e.expression)?e.expression:void 0}(l):void 0;if(!u)return{error:tS(va.Could_not_find_convertible_access_expression)};const _=r.getTypeChecker();return _P(u)?function(e,t){const n=e.condition,r=S4(e.whenTrue);if(!r||t.isNullableType(t.getTypeAtLocation(r)))return{error:tS(va.Could_not_find_convertible_access_expression)};if((GE(n)||qD(n))&&b4(n,r.expression))return{finalExpression:r,occurrences:[n],expression:e};if(uP(n)){const t=v4(r.expression,n);return t?{finalExpression:r,occurrences:t,expression:e}:{error:tS(va.Could_not_find_matching_access_expressions)}}}(u,_):function(e){if(56!==e.operatorToken.kind)return{error:tS(va.Can_only_convert_logical_AND_access_chains)};const t=S4(e.right);if(!t)return{error:tS(va.Could_not_find_convertible_access_expression)};const n=v4(t.expression,e.left);return n?{finalExpression:t,occurrences:n,expression:e}:{error:tS(va.Could_not_find_matching_access_expressions)}}(u)}function v4(e,t){const n=[];for(;uP(t)&&56===t.operatorToken.kind;){const r=b4(lh(e),lh(t.right));if(!r)break;n.push(r),e=r,t=t.left}const r=b4(e,t);return r&&n.push(r),n.length>0?n:void 0}function b4(e,t){if(qD(t)||GE(t)||XE(t))return function(e,t){for(;(QE(e)||GE(e)||XE(e))&&x4(e)!==x4(t);)e=e.expression;for(;GE(e)&&GE(t)||XE(e)&&XE(t);){if(x4(e)!==x4(t))return!1;e=e.expression,t=t.expression}return qD(e)&&qD(t)&&e.getText()===t.getText()}(e,t)?t:void 0}function x4(e){return qD(e)||$h(e)?e.getText():GE(e)?x4(e.name):XE(e)?x4(e.argumentExpression):void 0}function S4(e){return uP(e=lh(e))?S4(e.left):(GE(e)||XE(e)||QE(e))&&!Sl(e)?e:void 0}function k4(e,t,n){if(GE(t)||XE(t)||QE(t)){const r=k4(e,t.expression,n),i=n.length>0?n[n.length-1]:void 0,o=(null==i?void 0:i.getText())===t.expression.getText();if(o&&n.pop(),QE(t))return o?YC.createCallChain(r,YC.createToken(29),t.typeArguments,t.arguments):YC.createCallChain(r,t.questionDotToken,t.typeArguments,t.arguments);if(GE(t))return o?YC.createPropertyAccessChain(r,YC.createToken(29),t.name):YC.createPropertyAccessChain(r,t.questionDotToken,t.name);if(XE(t))return o?YC.createElementAccessChain(r,YC.createToken(29),t.argumentExpression):YC.createElementAccessChain(r,t.questionDotToken,t.argumentExpression)}return t}z2(p4,{kinds:[m4.kind],getEditsForAction:function(e,t){const n=y4(e);return xn.assert(n&&!e3(n),"Expected applicable refactor info"),{edits:r_e.ChangeTracker.with(e,(t=>function(e,t,n,r,i){const{finalExpression:o,occurrences:a,expression:s}=r,c=a[a.length-1],l=k4(t,o,a);l&&(GE(l)||XE(l)||QE(l))&&(uP(s)?n.replaceNodeRange(e,c,o,l):_P(s)&&n.replaceNode(e,s,YC.createBinaryExpression(l,YC.createToken(61),s.whenFalse)))}(e.file,e.program.getTypeChecker(),t,n))),renameFilename:void 0,renameLocation:void 0}},getAvailableActions:function(e){const t=y4(e,"invoked"===e.triggerReason);return t?e3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:p4,description:f4,actions:[{...m4,notApplicableReason:t.error}]}]:u:[{name:p4,description:f4,actions:[m4]}]:u}});var T4={};o(T4,{Messages:()=>C4,RangeFacts:()=>F4,getRangeToExtract:()=>A4,getRefactorActionsToExtractSymbol:()=>P4,getRefactorEditsToExtractSymbol:()=>N4});var C4,w4="Extract Symbol",D4={name:"Extract Constant",description:tS(va.Extract_constant),kind:"refactor.extract.constant"},E4={name:"Extract Function",description:tS(va.Extract_function),kind:"refactor.extract.function"};function P4(e){const t=e.kind,n=A4(e.file,wZ(e),"invoked"===e.triggerReason),r=n.targetRange;if(void 0===r){if(!n.errors||0===n.errors.length||!e.preferences.provideRefactorNotApplicableReason)return u;const r=[];return t3(E4.kind,t)&&r.push({name:w4,description:E4.description,actions:[{...E4,notApplicableReason:m(n.errors)}]}),t3(D4.kind,t)&&r.push({name:w4,description:D4.description,actions:[{...D4,notApplicableReason:m(n.errors)}]}),r}const{affectedTextRange:i,extractions:o}=function(e,t){const{scopes:n,affectedTextRange:r,readsAndWrites:{functionErrorsPerScope:i,constantErrorsPerScope:o}}=M4(e,t),a=n.map(((e,t)=>{const n=function(e){return uu(e)?"inner function":gu(e)?"method":"function"}(e),r=function(e){return gu(e)?"readonly field":"constant"}(e),a=uu(e)?function(e){switch(e.kind){case 176:return"constructor";case 218:case 262:return e.name?`function '${e.name.text}'`:tZ;case 219:return"arrow function";case 174:return`method '${e.name.getText()}'`;case 177:return`'get ${e.name.getText()}'`;case 178:return`'set ${e.name.getText()}'`;default:xn.assertNever(e,`Unexpected scope kind ${e.kind}`)}}(e):gu(e)?function(e){return 263===e.kind?e.name?`class '${e.name.text}'`:"anonymous class declaration":e.name?`class expression '${e.name.text}'`:"anonymous class expression"}(e):function(e){return 268===e.kind?`namespace '${e.parent.name.getText()}'`:e.externalModuleIndicator?0:1}(e);let s,c;return 1===a?(s=Yx(tS(va.Extract_to_0_in_1_scope),[n,"global"]),c=Yx(tS(va.Extract_to_0_in_1_scope),[r,"global"])):0===a?(s=Yx(tS(va.Extract_to_0_in_1_scope),[n,"module"]),c=Yx(tS(va.Extract_to_0_in_1_scope),[r,"module"])):(s=Yx(tS(va.Extract_to_0_in_1),[n,a]),c=Yx(tS(va.Extract_to_0_in_1),[r,a])),0!==t||gu(e)||(c=Yx(tS(va.Extract_to_0_in_enclosing_scope),[r])),{functionExtraction:{description:s,errors:i[t]},constantExtraction:{description:c,errors:o[t]}}}));return{affectedTextRange:r,extractions:a}}(r,e);if(void 0===o)return u;const a=[],s=new Map;let c;const l=[],_=new Map;let d,p=0;for(const{functionExtraction:n,constantExtraction:r}of o){if(t3(E4.kind,t)){const t=n.description;0===n.errors.length?s.has(t)||(s.set(t,!0),a.push({description:t,name:`function_scope_${p}`,kind:E4.kind,range:{start:{line:Xa(e.file,i.pos).line,offset:Xa(e.file,i.pos).character},end:{line:Xa(e.file,i.end).line,offset:Xa(e.file,i.end).character}}})):c||(c={description:t,name:`function_scope_${p}`,notApplicableReason:m(n.errors),kind:E4.kind})}if(t3(D4.kind,t)){const t=r.description;0===r.errors.length?_.has(t)||(_.set(t,!0),l.push({description:t,name:`constant_scope_${p}`,kind:D4.kind,range:{start:{line:Xa(e.file,i.pos).line,offset:Xa(e.file,i.pos).character},end:{line:Xa(e.file,i.end).line,offset:Xa(e.file,i.end).character}}})):d||(d={description:t,name:`constant_scope_${p}`,notApplicableReason:m(r.errors),kind:D4.kind})}p++}const f=[];return a.length?f.push({name:w4,description:tS(va.Extract_function),actions:a}):e.preferences.provideRefactorNotApplicableReason&&c&&f.push({name:w4,description:tS(va.Extract_function),actions:[c]}),l.length?f.push({name:w4,description:tS(va.Extract_constant),actions:l}):e.preferences.provideRefactorNotApplicableReason&&d&&f.push({name:w4,description:tS(va.Extract_constant),actions:[d]}),f.length?f:u;function m(e){let t=e[0].messageText;return"string"!=typeof t&&(t=t.messageText),t}}function N4(e,t){const n=A4(e.file,wZ(e)).targetRange,r=/^function_scope_(\d+)$/.exec(t);if(r){const t=+r[1];return xn.assert(isFinite(t),"Expected to parse a finite number from the function scope index"),function(e,t,n){const{scopes:r,readsAndWrites:{target:i,usagesPerScope:o,functionErrorsPerScope:a,exposedVariableDeclarations:s}}=M4(e,t);return xn.assert(!a[n].length,"The extraction went missing? How?"),t.cancellationToken.throwIfCancellationRequested(),function(e,t,{usages:n,typeParameterUsages:r,substitutions:i},o,a,s){const c=s.program.getTypeChecker(),l=wS(s.program.getCompilerOptions()),_=a8.createImportAdder(s.file,s.program,s.preferences,s.host),d=t.getSourceFile(),p=zY(gu(t)?"newMethod":"newFunction",d),f=Mm(t),m=YC.createIdentifier(p);let g;const h=[],y=[];let v;n.forEach(((e,n)=>{let r;if(!f){let n=c.getTypeOfSymbolAtLocation(e.symbol,e.node);n=c.getBaseTypeOfLiteralType(n),r=a8.typeToAutoImportableTypeNode(c,_,n,t,l,1)}const i=YC.createParameterDeclaration(void 0,void 0,n,void 0,r);h.push(i),2===e.usage&&(v||(v=[])).push(e),y.push(YC.createIdentifier(n))}));const b=$e(r.values(),(e=>({type:e,declaration:L4(e,s.startPosition)}))).sort(j4),x=0===b.length?void 0:q(b,(({declaration:e})=>e)),k=void 0!==x?x.map((e=>YC.createTypeReferenceNode(e.name,void 0))):void 0;if(Xu(e)&&!f){const n=c.getContextualType(e);g=c.typeToTypeNode(n,t,1)}const{body:T,returnValueProperty:C}=function(e,t,n,r,i){const o=void 0!==n||t.length>0;if(DP(e)&&!o&&0===r.size)return{body:YC.createBlock(e.statements,!0),returnValueProperty:void 0};let a,s=!1;const c=YC.createNodeArray(DP(e)?e.statements.slice(0):[b_(e)?e:YC.createReturnStatement(lh(e))]);if(o||r.size){const l=VB(c,(function e(i){if(!s&&BP(i)&&o){const r=R4(t,n);return i.expression&&(a||(a="__return"),r.unshift(YC.createPropertyAssignment(a,qB(i.expression,e,Xu)))),1===r.length?YC.createReturnStatement(r[0].name):YC.createReturnStatement(YC.createObjectLiteralExpression(r))}{const t=s;s=s||uu(i)||gu(i);const n=r.get(IB(i).toString()),o=n?NY(n):ZB(i,e,void 0);return s=t,o}}),b_).slice();if(o&&!i&&b_(e)){const e=R4(t,n);1===e.length?l.push(YC.createReturnStatement(e[0].name)):l.push(YC.createReturnStatement(YC.createObjectLiteralExpression(e)))}return{body:YC.createBlock(l,!0),returnValueProperty:a}}return{body:YC.createBlock(c,!0),returnValueProperty:void 0}}(e,o,v,i,!!(1&a.facts));let w;MY(T);const D=!!(16&a.facts);if(gu(t)){const e=f?[]:[YC.createModifier(123)];32&a.facts&&e.push(YC.createModifier(126)),4&a.facts&&e.push(YC.createModifier(134)),w=YC.createMethodDeclaration(e.length?e:void 0,2&a.facts?YC.createToken(42):void 0,m,void 0,x,h,g,T)}else D&&h.unshift(YC.createParameterDeclaration(void 0,void 0,"this",void 0,c.typeToTypeNode(c.getTypeAtLocation(a.thisNode),t,1),void 0)),w=YC.createFunctionDeclaration(4&a.facts?[YC.createToken(134)]:void 0,2&a.facts?YC.createToken(42):void 0,m,x,h,g,T);const E=r_e.ChangeTracker.fromContext(s),P=function(e,t){return S(function(e){if(uu(e)){const t=e.body;if(DP(t))return t.statements}else{if(eN(e)||qN(e))return e.statements;if(gu(e))return e.members}return u}(t),(t=>t.pos>=e&&uu(t)&&!fE(t)))}((B4(a.range)?De(a.range):a.range).end,t);P?E.insertNodeBefore(s.file,P,w,!0):E.insertNodeAtEndOfScope(s.file,t,w),_.writeFixes(E);const N=[],F=function(e,t,n){const r=YC.createIdentifier(n);if(gu(e)){const n=32&t.facts?YC.createIdentifier(e.name.text):YC.createThis();return YC.createPropertyAccessExpression(n,r)}return r}(t,a,p);D&&y.unshift(YC.createIdentifier("this"));let A=YC.createCallExpression(D?YC.createPropertyAccessExpression(F,"call"):F,k,y);if(2&a.facts&&(A=YC.createYieldExpression(YC.createToken(42),A)),4&a.facts&&(A=YC.createAwaitExpression(A)),z4(e)&&(A=YC.createJsxExpression(void 0,A)),o.length&&!v)if(xn.assert(!C,"Expected no returnValueProperty"),xn.assert(!(1&a.facts),"Expected RangeFacts.HasReturn flag to be unset"),1===o.length){const e=o[0];N.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(NY(e.name),void 0,NY(e.type),A)],e.parent.flags)))}else{const e=[],n=[];let r=o[0].parent.flags,i=!1;for(const a of o){e.push(YC.createBindingElement(void 0,void 0,NY(a.name)));const o=c.typeToTypeNode(c.getBaseTypeOfLiteralType(c.getTypeAtLocation(a)),t,1);n.push(YC.createPropertySignature(void 0,a.symbol.name,void 0,o)),i=i||void 0!==a.type,r&=a.parent.flags}const a=i?YC.createTypeLiteralNode(n):void 0;a&&iw(a,1),N.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(YC.createObjectBindingPattern(e),void 0,a,A)],r)))}else if(o.length||v){if(o.length)for(const e of o){let t=e.parent.flags;2&t&&(t=-3&t|1),N.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(e.symbol.name,void 0,M(e.type))],t)))}C&&N.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(C,void 0,M(g))],1)));const e=R4(o,v);C&&e.unshift(YC.createShorthandPropertyAssignment(C)),1===e.length?(xn.assert(!C,"Shouldn't have returnValueProperty here"),N.push(YC.createExpressionStatement(YC.createAssignment(e[0].name,A))),1&a.facts&&N.push(YC.createReturnStatement())):(N.push(YC.createExpressionStatement(YC.createAssignment(YC.createObjectLiteralExpression(e),A))),C&&N.push(YC.createReturnStatement(YC.createIdentifier(C))))}else 1&a.facts?N.push(YC.createReturnStatement(A)):B4(a.range)?N.push(YC.createExpressionStatement(A)):N.push(A);B4(a.range)?E.replaceNodeRangeWithNodes(s.file,Te(a.range),De(a.range),N):E.replaceNodeWithNodes(s.file,a.range,N);const I=E.getChanges(),O=(B4(a.range)?Te(a.range):a.range).getSourceFile().fileName;return{renameFilename:O,renameLocation:$Y(I,O,p,!1),edits:I};function M(e){if(void 0===e)return;const t=NY(e);let n=t;for(;ME(n);)n=n.type;return FE(n)&&S(n.types,(e=>157===e.kind))?t:YC.createUnionTypeNode([t,YC.createKeywordTypeNode(157)])}}(i,r[n],o[n],s,e,t)}(n,e,t)}const i=/^constant_scope_(\d+)$/.exec(t);if(i){const t=+i[1];return xn.assert(isFinite(t),"Expected to parse a finite number from the constant scope index"),function(e,t,n){const{scopes:r,readsAndWrites:{target:i,usagesPerScope:o,constantErrorsPerScope:a,exposedVariableDeclarations:s}}=M4(e,t);return xn.assert(!a[n].length,"The extraction went missing? How?"),xn.assert(0===s.length,"Extract constant accepted a range containing a variable declaration?"),t.cancellationToken.throwIfCancellationRequested(),function(e,t,{substitutions:n},r,i){const o=i.program.getTypeChecker(),a=t.getSourceFile(),s=n3(e,t,o,a),c=Mm(t);let l=c||!o.isContextSensitive(e)?void 0:o.typeToTypeNode(o.getContextualType(e),t,1),u=function(e,t){return t.size?function e(n){const r=t.get(IB(n).toString());return r?NY(r):ZB(n,e,void 0)}(e):e}(lh(e),n);({variableType:l,initializer:u}=function(n,r){if(void 0===n)return{variableType:n,initializer:r};if(!nP(r)&&!rP(r)||r.typeParameters)return{variableType:n,initializer:r};const i=o.getTypeAtLocation(e),a=Ee(o.getSignaturesOfType(i,0));if(!a)return{variableType:n,initializer:r};if(a.getTypeParameters())return{variableType:n,initializer:r};const s=[];let c=!1;for(const e of r.parameters)if(e.type)s.push(e);else{const n=o.getTypeAtLocation(e);n===o.getAnyType()&&(c=!0),s.push(YC.updateParameterDeclaration(e,e.modifiers,e.dotDotDotToken,e.name,e.questionToken,e.type||o.typeToTypeNode(n,t,1),e.initializer))}if(c)return{variableType:n,initializer:r};if(n=void 0,rP(r))r=YC.updateArrowFunction(r,cI(e)?Ac(e):void 0,r.typeParameters,s,r.type||o.typeToTypeNode(a.getReturnType(),t,1),r.equalsGreaterThanToken,r.body);else{if(a&&a.thisParameter){const n=Se(s);if(!n||qD(n.name)&&"this"!==n.name.escapedText){const n=o.getTypeOfSymbolAtLocation(a.thisParameter,e);s.splice(0,0,YC.createParameterDeclaration(void 0,void 0,"this",void 0,o.typeToTypeNode(n,t,1)))}}r=YC.updateFunctionExpression(r,cI(e)?Ac(e):void 0,r.asteriskToken,r.name,r.typeParameters,s,r.type||o.typeToTypeNode(a.getReturnType(),t,1),r.body)}return{variableType:n,initializer:r}}(l,u)),MY(u);const _=r_e.ChangeTracker.fromContext(i);if(gu(t)){xn.assert(!c,"Cannot extract to a JS class");const n=[];n.push(YC.createModifier(123)),32&r&&n.push(YC.createModifier(126)),n.push(YC.createModifier(148));const o=YC.createPropertyDeclaration(n,s,void 0,l,u);let a=YC.createPropertyAccessExpression(32&r?YC.createIdentifier(t.name.getText()):YC.createThis(),YC.createIdentifier(s));z4(e)&&(a=YC.createJsxExpression(void 0,a));const d=function(e,t){const n=t.members;let r;xn.assert(n.length>0,"Found no members");let i=!0;for(const t of n){if(t.pos>e)return r||n[0];if(i&&!uE(t)){if(void 0!==r)return t;i=!1}r=t}return void 0===r?xn.fail():r}(e.pos,t);_.insertNodeBefore(i.file,d,o,!0),_.replaceNode(i.file,e,a)}else{const n=YC.createVariableDeclaration(s,void 0,l,u),r=function(e,t){let n;for(;void 0!==e&&e!==t;){if(KP(e)&&e.initializer===n&&WP(e.parent)&&e.parent.declarations.length>1)return e;n=e,e=e.parent}}(e,t);if(r){_.insertNodeBefore(i.file,r,n);const t=YC.createIdentifier(s);_.replaceNode(i.file,e,t)}else if(244===e.parent.kind&&t===mc(e,O4)){const t=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([n],2));_.replaceNode(i.file,e.parent,t)}else{const r=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([n],2)),o=function(e,t){let n;xn.assert(!gu(t));for(let r=e;r!==t;r=r.parent)O4(r)&&(n=r);for(let r=(n||e).parent;;r=r.parent){if(XZ(r)){let t;for(const n of r.statements){if(n.pos>e.pos)break;t=n}return!t&&MN(r)?(xn.assert(zP(r.parent.parent),"Grandparent isn't a switch statement"),r.parent.parent):xn.checkDefined(t,"prevStatement failed to get set")}xn.assert(r!==t,"Didn't encounter a block-like before encountering scope")}}(e,t);if(0===o.pos?_.insertNodeAtTopOfFile(i.file,r,!1):_.insertNodeBefore(i.file,o,r,!1),244===e.parent.kind)_.delete(i.file,e.parent);else{let t=YC.createIdentifier(s);z4(e)&&(t=YC.createJsxExpression(void 0,t)),_.replaceNode(i.file,e,t)}}}const d=_.getChanges(),p=e.getSourceFile().fileName;return{renameFilename:p,renameLocation:$Y(d,p,s,!0),edits:d}}(Xu(i)?i:i.statements[0].expression,r[n],o[n],e.facts,t)}(n,e,t)}xn.fail("Unrecognized action name")}z2(w4,{kinds:[D4.kind,E4.kind],getEditsForAction:N4,getAvailableActions:P4}),(e=>{function t(e){return{message:e,code:0,category:3,key:e}}e.cannotExtractRange=t("Cannot extract range."),e.cannotExtractImport=t("Cannot extract import statement."),e.cannotExtractSuper=t("Cannot extract super call."),e.cannotExtractJSDoc=t("Cannot extract JSDoc."),e.cannotExtractEmpty=t("Cannot extract empty range."),e.expressionExpected=t("expression expected."),e.uselessConstantType=t("No reason to extract constant of type."),e.statementOrExpressionExpected=t("Statement or expression expected."),e.cannotExtractRangeContainingConditionalBreakOrContinueStatements=t("Cannot extract range containing conditional break or continue statements."),e.cannotExtractRangeContainingConditionalReturnStatement=t("Cannot extract range containing conditional return statement."),e.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange=t("Cannot extract range containing labeled break or continue with target outside of the range."),e.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators=t("Cannot extract range containing writes to references located outside of the target range in generators."),e.typeWillNotBeVisibleInTheNewScope=t("Type will not visible in the new scope."),e.functionWillNotBeVisibleInTheNewScope=t("Function will not visible in the new scope."),e.cannotExtractIdentifier=t("Select more than a single identifier."),e.cannotExtractExportedEntity=t("Cannot extract exported declaration"),e.cannotWriteInExpression=t("Cannot write back side-effects when extracting an expression"),e.cannotExtractReadonlyPropertyInitializerOutsideConstructor=t("Cannot move initialization of read-only class property outside of the constructor"),e.cannotExtractAmbientBlock=t("Cannot extract code from ambient contexts"),e.cannotAccessVariablesFromNestedScopes=t("Cannot access variables from nested scopes"),e.cannotExtractToJSClass=t("Cannot extract constant to a class scope in JS"),e.cannotExtractToExpressionArrowFunction=t("Cannot extract constant to an arrow function without a block"),e.cannotExtractFunctionsContainingThisToMethod=t("Cannot extract functions containing this to method")})(C4||(C4={}));var F4=(e=>(e[e.None=0]="None",e[e.HasReturn=1]="HasReturn",e[e.IsGenerator=2]="IsGenerator",e[e.IsAsyncFunction=4]="IsAsyncFunction",e[e.UsesThis=8]="UsesThis",e[e.UsesThisInFunction=16]="UsesThisInFunction",e[e.InStaticRegion=32]="InStaticRegion",e))(F4||{});function A4(e,t,n=!0){const{length:r}=t;if(0===r&&!n)return{errors:[aS(e,t.start,r,C4.cannotExtractEmpty)]};const i=0===r&&n,o=CX(e,t.start),a=wX(e,js(t)),s=o&&a&&n?function(e,t,n){const r=e.getStart(n);let i=t.getEnd();return 59===n.text.charCodeAt(i)&&i++,{start:r,length:i-r}}(o,a,e):t,c=i?function(e){return mc(e,(e=>e.parent&&J4(e)&&!uP(e.parent)))}(o):BQ(o,e,s),l=i?c:BQ(a,e,s);let u,_=0;if(!c||!l)return{errors:[aS(e,t.start,r,C4.cannotExtractRange)]};if(16777216&c.flags)return{errors:[aS(e,t.start,r,C4.cannotExtractJSDoc)]};if(c.parent!==l.parent)return{errors:[aS(e,t.start,r,C4.cannotExtractRange)]};if(c!==l){if(!XZ(c.parent))return{errors:[aS(e,t.start,r,C4.cannotExtractRange)]};const n=[];for(const e of c.parent.statements){if(e===c||n.length){const t=f(e);if(t)return{errors:t};n.push(e)}if(e===l)break}return n.length?{targetRange:{range:n,facts:_,thisNode:u}}:{errors:[aS(e,t.start,r,C4.cannotExtractRange)]}}if(BP(c)&&!c.expression)return{errors:[aS(e,t.start,r,C4.cannotExtractRange)]};const d=function(e){if(BP(e)){if(e.expression)return e.expression}else if(EP(e)||WP(e)){const t=EP(e)?e.declarationList.declarations:e.declarations;let n,r=0;for(const e of t)e.initializer&&(r++,n=e.initializer);if(1===r)return n}else if(KP(e)&&e.initializer)return e.initializer;return e}(c),p=function(e){if(qD(NP(e)?e.expression:e))return[Rp(e,C4.cannotExtractIdentifier)]}(d)||f(d);return p?{errors:p}:{targetRange:{range:I4(d),facts:_,thisNode:u}};function f(e){let n;var r;if((r=n||(n={}))[r.None=0]="None",r[r.Break=1]="Break",r[r.Continue=2]="Continue",r[r.Return=4]="Return",xn.assert(e.pos<=e.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"),xn.assert(!iT(e.pos),"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"),!(b_(e)||Tm(e)&&J4(e)||$4(e)))return[Rp(e,C4.statementOrExpressionExpected)];if(33554432&e.flags)return[Rp(e,C4.cannotExtractAmbientBlock)];const i=Zf(e);let o;i&&function(e,t){let n=e;for(;n!==t;){if(172===n.kind){Jv(n)&&(_|=32);break}if(169===n.kind){176===Qf(n).kind&&(_|=32);break}174===n.kind&&Jv(n)&&(_|=32),n=n.parent}}(e,i);let a,s=4;if(function e(n){if(o)return!0;if(h_(n)&&Bv(260===n.kind?n.parent.parent:n,32))return(o||(o=[])).push(Rp(n,C4.cannotExtractExportedEntity)),!0;switch(n.kind){case 272:return(o||(o=[])).push(Rp(n,C4.cannotExtractImport)),!0;case 277:return(o||(o=[])).push(Rp(n,C4.cannotExtractExportedEntity)),!0;case 108:if(213===n.parent.kind){const e=Zf(n);if(void 0===e||e.pos=t.start+t.length)return(o||(o=[])).push(Rp(n,C4.cannotExtractSuper)),!0}else _|=8,u=n;break;case 219:LI(n,(function e(t){if(WG(t))_|=8,u=n;else{if(gu(t)||cu(t)&&!rP(t))return!1;LI(t,e)}}));case 263:case 262:qN(n.parent)&&void 0===n.parent.externalModuleIndicator&&(o||(o=[])).push(Rp(n,C4.functionWillNotBeVisibleInTheNewScope));case 231:case 218:case 174:case 176:case 177:case 178:return!1}const r=s;switch(n.kind){case 245:s&=-5;break;case 258:s=0;break;case 241:n.parent&&258===n.parent.kind&&n.parent.finallyBlock===n&&(s=4);break;case 297:case 296:s|=1;break;default:Zu(n,!1)&&(s|=3)}switch(n.kind){case 197:case 110:_|=8,u=n;break;case 256:{const t=n.label;(a||(a=[])).push(t.escapedText),LI(n,e),a.pop();break}case 252:case 251:{const e=n.label;e?D(a,e.escapedText)||(o||(o=[])).push(Rp(n,C4.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):s&(252===n.kind?1:2)||(o||(o=[])).push(Rp(n,C4.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break}case 223:_|=4;break;case 229:_|=2;break;case 253:4&s?_|=1:(o||(o=[])).push(Rp(n,C4.cannotExtractRangeContainingConditionalReturnStatement));break;default:LI(n,e)}s=r}(e),8&_){const t=rm(e,!1,!1);(262===t.kind||174===t.kind&&210===t.parent.kind||218===t.kind)&&(_|=16)}return o}}function I4(e){return b_(e)?[e]:Tm(e)?NP(e.parent)?[e.parent]:e:$4(e)?e:void 0}function O4(e){return rP(e)?a_(e.body):uu(e)||qN(e)||eN(e)||gu(e)}function M4(e,t){const{file:n}=t,r=function(e){let t=B4(e.range)?Te(e.range):e.range;if(8&e.facts&&!(16&e.facts)){const e=Zf(t);if(e){const n=mc(t,uu);return n?[n,e]:[e]}}const n=[];for(;;)if(t=t.parent,169===t.kind&&(t=mc(t,(e=>uu(e))).parent),O4(t)&&(n.push(t),307===t.kind))return n}(e),i=function(e,t){return B4(e.range)?{pos:Te(e.range).getStart(t),end:De(e.range).getEnd()}:e.range}(e,n),o=function(e,t,n,r,i,o){const a=new Map,s=[],c=[],l=[],u=[],_=[],d=new Map,p=[];let f;const m=B4(e.range)?1===e.range.length&&NP(e.range[0])?e.range[0].expression:void 0:e.range;let g;if(void 0===m){const t=e.range,n=Te(t).getStart(),i=De(t).end;g=aS(r,n,i-n,C4.expressionExpected)}else 147456&i.getTypeAtLocation(m).flags&&(g=Rp(m,C4.uselessConstantType));for(const e of t){s.push({usages:new Map,typeParameterUsages:new Map,substitutions:new Map}),c.push(new Map),l.push([]);const t=[];g&&t.push(g),gu(e)&&Mm(e)&&t.push(Rp(e,C4.cannotExtractToJSClass)),rP(e)&&!DP(e.body)&&t.push(Rp(e,C4.cannotExtractToExpressionArrowFunction)),u.push(t)}const h=new Map,y=B4(e.range)?YC.createBlock(e.range):e.range,v=B4(e.range)?Te(e.range):e.range,b=!!mc(v,(e=>xp(e)&&0!==ml(e).length));if(function o(a,d=1){b&&x(i.getTypeAtLocation(a));if(h_(a)&&a.symbol&&_.push(a),mb(a))o(a.left,2),o(a.right);else if(Hu(a))o(a.operand,2);else if(GE(a)||XE(a))LI(a,o);else if(qD(a)){if(!a.parent)return;if(iE(a.parent)&&a!==a.parent.left)return;if(GE(a.parent)&&a!==a.parent.expression)return;!function(o,a,_){const d=function(o,a,_){const d=k(o);if(!d)return;const p=OB(d).toString(),f=h.get(p);if(f&&f>=a)return p;if(h.set(p,a),f){for(const e of s)e.usages.get(o.text)&&e.usages.set(o.text,{usage:a,symbol:d,node:o});return p}const m=d.getDeclarations(),g=m&&S(m,(e=>e.getSourceFile()===r));if(g&&!tX(n,g.getStart(),g.end)){if(2&e.facts&&2===a){const e=Rp(o,C4.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators);for(const t of l)t.push(e);for(const t of u)t.push(e)}for(let e=0;e0){const e=new Map;let n=0;for(let r=v;void 0!==r&&n{s[n].typeParameterUsages.set(t,e)})),n++),xp(r))for(const t of ml(r)){const n=i.getTypeAtLocation(t);a.has(n.id.toString())&&e.set(n.id.toString(),n)}xn.assert(n===t.length,"Should have iterated all scopes")}_.length&&LI(bp(t[0],t[0].parent)?t[0]:Np(t[0]),(function t(n){if(n===e.range||B4(e.range)&&e.range.includes(n))return;const r=qD(n)?k(n):i.getSymbolAtLocation(n);if(r){const e=S(_,(e=>e.symbol===r));if(e)if(KP(e)){const t=e.symbol.id.toString();d.has(t)||(p.push(e),d.set(t,!0))}else f=f||e}LI(n,t)}));for(let n=0;n0&&(r.usages.size>0||r.typeParameterUsages.size>0)){const t=B4(e.range)?e.range[0]:e.range;u[n].push(Rp(t,C4.cannotAccessVariablesFromNestedScopes))}16&e.facts&&gu(t[n])&&l[n].push(Rp(e.thisNode,C4.cannotExtractFunctionsContainingThisToMethod));let i,o=!1;if(s[n].usages.forEach((e=>{2===e.usage&&(o=!0,106500&e.symbol.flags&&e.symbol.valueDeclaration&&Rv(e.symbol.valueDeclaration,8)&&(i=e.symbol.valueDeclaration))})),xn.assert(B4(e.range)||0===p.length,"No variable declarations expected if something was extracted"),o&&!B4(e.range)){const t=Rp(e.range,C4.cannotWriteInExpression);l[n].push(t),u[n].push(t)}else if(i&&n>0){const e=Rp(i,C4.cannotExtractReadonlyPropertyInitializerOutsideConstructor);l[n].push(e),u[n].push(e)}else if(f){const e=Rp(f,C4.cannotExtractExportedEntity);l[n].push(e),u[n].push(e)}}return{target:y,usagesPerScope:s,functionErrorsPerScope:l,constantErrorsPerScope:u,exposedVariableDeclarations:p};function x(e){const t=i.getSymbolWalker((()=>(o.throwIfCancellationRequested(),!0))),{visitedTypes:n}=t.walkType(e);for(const e of n)e.isTypeParameter()&&a.set(e.id.toString(),e)}function k(e){return e.parent&&JN(e.parent)&&e.parent.name===e?i.getShorthandAssignmentValueSymbol(e.parent):i.getSymbolAtLocation(e)}function T(e,t,n){if(!e)return;const r=e.getDeclarations();if(r&&r.some((e=>e.parent===t)))return YC.createIdentifier(e.name);const i=T(e.parent,t,n);return void 0!==i?n?YC.createQualifiedName(i,YC.createIdentifier(e.name)):YC.createPropertyAccessExpression(i,e.name):void 0}}(e,r,i,n,t.program.getTypeChecker(),t.cancellationToken);return{scopes:r,affectedTextRange:i,readsAndWrites:o}}function L4(e,t){let n;const r=e.symbol;if(r&&r.declarations)for(const e of r.declarations)(void 0===n||e.posYC.createShorthandPropertyAssignment(e.symbol.name))),r=O(t,(e=>YC.createShorthandPropertyAssignment(e.symbol.name)));return void 0===n?r:void 0===r?n:n.concat(r)}function B4(e){return ot(e)}function J4(e){const{parent:t}=e;if(306===t.kind)return!1;switch(e.kind){case 11:return 272!==t.kind&&276!==t.kind;case 230:case 206:case 208:return!1;case 80:return 208!==t.kind&&276!==t.kind&&281!==t.kind}return!0}function z4(e){return $4(e)||(kN(e)||TN(e)||DN(e))&&(kN(e.parent)||DN(e.parent))}function $4(e){return wD(e)&&e.parent&&NN(e.parent)}var q4={},V4="Generate 'get' and 'set' accessors",U4=tS(va.Generate_get_and_set_accessors),K4={name:V4,description:U4,kind:"refactor.rewrite.property.generateAccessors"};z2(V4,{kinds:[K4.kind],getEditsForAction:function(e,t){if(!e.endPosition)return;const n=a8.getAccessorConvertiblePropertyAtPosition(e.file,e.program,e.startPosition,e.endPosition);xn.assert(n&&!e3(n),"Expected applicable refactor info");const r=a8.generateAccessorFromProperty(e.file,e.program,e.startPosition,e.endPosition,e,t);if(!r)return;const i=e.file.fileName,o=n.renameAccessor?n.accessorName:n.fieldName;return{renameFilename:i,renameLocation:(qD(o)?0:-1)+$Y(r,i,o.text,sE(n.declaration)),edits:r}},getAvailableActions(e){if(!e.endPosition)return u;const t=a8.getAccessorConvertiblePropertyAtPosition(e.file,e.program,e.startPosition,e.endPosition,"invoked"===e.triggerReason);return t?e3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:V4,description:U4,actions:[{...K4,notApplicableReason:t.error}]}]:u:[{name:V4,description:U4,actions:[K4]}]:u}});var W4={},H4="Infer function return type",G4=tS(va.Infer_function_return_type),X4={name:H4,description:G4,kind:"refactor.rewrite.function.returnType"};function Q4(e){if(Mm(e.file)||!t3(X4.kind,e.kind))return;const t=mc(xX(e.file,e.startPosition),(e=>DP(e)||e.parent&&rP(e.parent)&&(39===e.kind||e.parent.body===e)?"quit":function(e){switch(e.kind){case 262:case 218:case 219:case 174:return!0;default:return!1}}(e)));if(!t||!t.body||t.type)return{error:tS(va.Return_type_must_be_inferred_from_a_function)};const n=e.program.getTypeChecker(),r=function(e,t){if(e.isImplementationOfOverload(t)){const n=e.getTypeAtLocation(t).getCallSignatures();if(n.length>1)return e.getUnionType(q(n,(e=>e.getReturnType())))}const n=e.getSignatureFromDeclaration(t);if(n)return e.getReturnTypeOfSignature(n)}(n,t);if(!r)return{error:tS(va.Could_not_determine_function_return_type)};const i=n.typeToTypeNode(r,t,1);return i?{declaration:t,returnTypeNode:i}:void 0}z2(H4,{kinds:[X4.kind],getEditsForAction:function(e){const t=Q4(e);if(t&&!e3(t))return{renameFilename:void 0,renameLocation:void 0,edits:r_e.ChangeTracker.with(e,(n=>function(e,t,n,r){const i=uX(n,22,e),o=rP(n)&&void 0===i,a=o?Te(n.parameters):i;a&&(o&&(t.insertNodeBefore(e,a,YC.createToken(21)),t.insertNodeAfter(e,a,YC.createToken(22))),t.insertNodeAt(e,a.end,r,{prefix:": "}))}(e.file,n,t.declaration,t.returnTypeNode)))}},getAvailableActions:function(e){const t=Q4(e);return t?e3(t)?e.preferences.provideRefactorNotApplicableReason?[{name:H4,description:G4,actions:[{...X4,notApplicableReason:t.error}]}]:u:[{name:H4,description:G4,actions:[X4]}]:u}});var Y4=(e=>(e[e.typeOffset=8]="typeOffset",e[e.modifierMask=255]="modifierMask",e))(Y4||{}),Z4=(e=>(e[e.class=0]="class",e[e.enum=1]="enum",e[e.interface=2]="interface",e[e.namespace=3]="namespace",e[e.typeParameter=4]="typeParameter",e[e.type=5]="type",e[e.parameter=6]="parameter",e[e.variable=7]="variable",e[e.enumMember=8]="enumMember",e[e.property=9]="property",e[e.function=10]="function",e[e.member=11]="member",e))(Z4||{}),e7=(e=>(e[e.declaration=0]="declaration",e[e.static=1]="static",e[e.async=2]="async",e[e.readonly=3]="readonly",e[e.defaultLibrary=4]="defaultLibrary",e[e.local=5]="local",e))(e7||{});function t7(e,t,n,r){const i=n7(e,t,n,r);xn.assert(i.spans.length%3==0);const o=i.spans,a=[];for(let e=0;ee(r)||r.isUnion()&&r.types.some(e);if(6!==n&&e((e=>e.getConstructSignatures().length>0)))return 0;if(e((e=>e.getCallSignatures().length>0))&&!e((e=>e.getProperties().length>0))||function(e){for(;o7(e);)e=e.parent;return QE(e.parent)&&e.parent.expression===e}(t))return 9===n?11:10}}return n}(o,c,i);const s=n.valueDeclaration;if(s){const r=cc(s),o=uc(s);256&r&&(a|=2),1024&r&&(a|=4),0!==i&&2!==i&&(8&r||2&o||8&n.getFlags())&&(a|=8),7!==i&&10!==i||!function(e,t){return KE(e)&&(e=i7(e)),KP(e)?(!qN(e.parent.parent.parent)||RN(e.parent))&&e.getSourceFile()===t:!!HP(e)&&(!qN(e.parent)&&e.getSourceFile()===t)}(s,t)||(a|=32),e.isSourceFileDefaultLibrary(s.getSourceFile())&&(a|=16)}else n.declarations&&n.declarations.some((t=>e.isSourceFileDefaultLibrary(t.getSourceFile())))&&(a|=16);r(c,i,a)}}}LI(c,s),a=l}(t)}(e,t,n,((e,n,r)=>{i.push(e.getStart(t),e.getWidth(t),(n+1<<8)+r)}),r),i}function i7(e){for(;;){if(!KE(e.parent.parent))return e.parent.parent;e=e.parent.parent}}function o7(e){return iE(e.parent)&&e.parent.right===e||GE(e.parent)&&e.parent.name===e}var a7=new Map([[260,7],[169,6],[172,9],[267,3],[266,1],[306,8],[263,0],[174,11],[262,10],[218,10],[173,11],[177,9],[178,9],[171,9],[264,2],[265,5],[168,4],[303,9],[304,9]]),s7="0.8";function c7(e,t,n,r){const i=Ol(e)?new l7(e,t,n):80===e?new p7(80,t,n):81===e?new f7(81,t,n):new d7(e,t,n);return i.parent=r,i.flags=101441536&r.flags,i}var l7=class{constructor(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}assertHasRealPosition(e){xn.assert(!iT(this.pos)&&!iT(this.end),e||"Node must have a real position for this operation")}getSourceFile(){return Sd(this)}getStart(e,t){return this.assertHasRealPosition(),Vd(this,e,t)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos}getFullText(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(e){return this.getChildren(e).length}getChildAt(e,t){return this.getChildren(t)[e]}getChildren(e){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),zF(this)??$F(this,function(e,t){const n=[];if(N_(e))return e.forEachChild((e=>{n.push(e)})),n;mG.setText((t||e.getSourceFile()).text);let r=e.pos;const i=t=>{u7(n,r,t.pos,e),n.push(t),r=t.end};return f(e.jsDoc,i),r=e.pos,e.forEachChild(i,(t=>{u7(n,r,t.pos,e),n.push(function(e,t){const n=c7(352,e.pos,e.end,t),r=[];let i=e.pos;for(const n of e)u7(r,i,n.pos,t),r.push(n),i=n.end;return u7(r,i,e.end,t),$F(n,r),n}(t,e)),r=t.end})),u7(n,r,e.end,e),mG.setText(void 0),n}(this,e))}getFirstToken(e){this.assertHasRealPosition();const t=this.getChildren(e);if(!t.length)return;const n=S(t,(e=>e.kind<309||e.kind>351));return n.kind<166?n:n.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();const t=we(this.getChildren(e));if(t)return t.kind<166?t:t.getLastToken(e)}forEachChild(e,t){return LI(this,e,t)}};function u7(e,t,n,r){for(mG.resetTokenState(t);t"inheritDoc"===e.tagName.text||"inheritdoc"===e.tagName.text))}function g7(e,t){if(!e)return u;let n=Wce.getJsDocTagsFromDeclarations(e,t);if(t&&(0===n.length||e.some(m7))){const r=new Set;for(const i of e){const e=y7(t,i,(e=>{var n;if(!r.has(e))return r.add(e),177===i.kind||178===i.kind?e.getContextualJsDocTags(i,t):1===(null==(n=e.declarations)?void 0:n.length)?e.getJsDocTags(t):void 0}));e&&(n=[...e,...n])}}return n}function h7(e,t){if(!e)return u;let n=Wce.getJsDocCommentsFromDeclarations(e,t);if(t&&(0===n.length||e.some(m7))){const r=new Set;for(const i of e){const e=y7(t,i,(e=>{if(!r.has(e))return r.add(e),177===i.kind||178===i.kind?e.getContextualDocumentationComment(i,t):e.getDocumentationComment(t)}));e&&(n=0===n.length?e.slice():e.concat(hY(),n))}}return n}function y7(e,t,n){var r;const i=176===(null==(r=t.parent)?void 0:r.kind)?t.parent.parent:t.parent;if(!i)return;const o=zv(t);return g(Ch(i),(r=>{const i=e.getTypeAtLocation(r),a=o&&i.symbol?e.getTypeOfSymbol(i.symbol):i,s=e.getPropertyOfType(a,t.symbol.name);return s?n(s):void 0}))}var v7=class extends l7{constructor(e,t,n){super(e,t,n)}update(e,t){return VI(this,e,t)}getLineAndCharacterOfPosition(e){return Xa(this,e)}getLineStarts(){return Ka(this)}getPositionOfLineAndCharacter(e,t,n){return Ua(Ka(this),e,t,this.text,n)}getLineEndOfPosition(e){const{line:t}=this.getLineAndCharacterOfPosition(e),n=this.getLineStarts();let r;t+1>=n.length&&(r=this.getEnd()),r||(r=n[t+1]-1);const i=this.getFullText();return"\n"===i[r]&&"\r"===i[r-1]?r-1:r}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){const e=et();return this.forEachChild((function r(i){switch(i.kind){case 262:case 218:case 174:case 173:const o=i,a=n(o);if(a){const t=function(t){let n=e.get(t);return n||e.set(t,n=[]),n}(a),n=we(t);n&&o.parent===n.parent&&o.symbol===n.symbol?o.body&&!n.body&&(t[t.length-1]=o):t.push(o)}LI(i,r);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(i),LI(i,r);break;case 169:if(!Bv(i,31))break;case 260:case 208:{const e=i;if(Eu(e.name)){LI(e.name,r);break}e.initializer&&r(e.initializer)}case 306:case 172:case 171:t(i);break;case 278:const s=i;s.exportClause&&(hN(s.exportClause)?f(s.exportClause.elements,r):r(s.exportClause.name));break;case 272:const c=i.importClause;c&&(c.name&&t(c.name),c.namedBindings&&(274===c.namedBindings.kind?t(c.namedBindings):f(c.namedBindings.elements,r)));break;case 226:0!==ag(i)&&t(i);default:LI(i,r)}})),e;function t(t){const r=n(t);r&&e.add(r,t)}function n(e){const t=Ec(e);return t&&(oE(t)&&GE(t.expression)?t.expression.name.text:au(t)?xQ(t):void 0)}}};function b7(e){let t=!0;for(const n in e)if(Le(e,n)&&!x7(n)){t=!1;break}if(t)return e;const n={};for(const t in e)Le(e,t)&&(n[x7(t)?t:t.charAt(0).toLowerCase()+t.substr(1)]=e[t]);return n}function x7(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function S7(e){return e?O(e,(e=>e.text)).join(""):""}function k7(){return{target:1,jsx:1}}function T7(){return a8.getSupportedErrorCodes()}function C7(e,t,n){e.version=n,e.scriptSnapshot=t}function w7(e,t,n,r,i,o){const a=JI(e,yQ(t),n,i,o);return C7(a,t,r),a}function D7(e,t,n,r,i){if(r&&n!==e.version){let o;const a=0!==r.span.start?e.text.substr(0,r.span.start):"",s=js(r.span)!==e.text.length?e.text.substr(js(r.span)):"";if(0===r.newLength)o=a&&s?a+s:a||s;else{const e=t.getText(r.span.start,r.span.start+r.newLength);o=a&&s?a+e+s:a?a+e:e+s}const c=VI(e,o,r,i);return C7(c,t,n),c.nameTable=void 0,e!==c&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),c}const o={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator,jsDocParsingMode:e.jsDocParsingMode};return w7(e.fileName,t,o,n,!0,e.scriptKind)}var E7={isCancellationRequested:dt,throwIfCancellationRequested:_t},P7=class{constructor(e,t=20){this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}isCancellationRequested(){const e=Yn();return Math.abs(e-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested())}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw null==(e=or)||e.instant(or.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new Lr}},N7=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],F7=[...N7,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"];function A7(e,t=T0(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory(),e.jsDocParsingMode),n){var r;let i;i=void 0===n?0:"boolean"==typeof n?n?2:0:n;const o=new class{constructor(e){this.host=e}getCurrentSourceFile(e){var t,n,r,i,o,a,s,c;const l=this.host.getScriptSnapshot(e);if(!l)throw new Error("Could not find file: '"+e+"'.");const u=TY(e,this.host),_=this.host.getScriptVersion(e);let d;if(this.currentFileName!==e)d=w7(e,l,{languageVersion:99,impliedNodeFormat:pV(Yo(e,this.host.getCurrentDirectory(),(null==(r=null==(n=(t=this.host).getCompilerHost)?void 0:n.call(t))?void 0:r.getCanonicalFileName)||Wy(this.host)),null==(c=null==(s=null==(a=null==(o=(i=this.host).getCompilerHost)?void 0:o.call(i))?void 0:a.getModuleResolutionCache)?void 0:s.call(a))?void 0:c.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:TS(this.host.getCompilationSettings()),jsDocParsingMode:0},_,!0,u);else if(this.currentFileVersion!==_){const e=l.getChangeRange(this.currentFileScriptSnapshot);d=D7(this.currentSourceFile,l,_,e)}return d&&(this.currentFileVersion=_,this.currentFileName=e,this.currentFileScriptSnapshot=l,this.currentSourceFile=d),this.currentSourceFile}}(e);let a,s,c=0;const l=e.getCancellationToken?new class{constructor(e){this.cancellationToken=e}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw null==(e=or)||e.instant(or.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new Lr}}(e.getCancellationToken()):E7,_=e.getCurrentDirectory();function d(t){e.log&&e.log(t)}eS(null==(r=e.getLocalizedDiagnosticMessages)?void 0:r.bind(e));const p=Ky(e),m=tn(p),g=l1({useCaseSensitiveFileNames:()=>p,getCurrentDirectory:()=>_,getProgram:v,fileExists:Ze(e,e.fileExists),readFile:Ze(e,e.readFile),getDocumentPositionMapper:Ze(e,e.getDocumentPositionMapper),getSourceFileLike:Ze(e,e.getSourceFileLike),log:d});function h(e){const t=a.getSourceFile(e);if(!t){const t=new Error(`Could not find source file: '${e}'.`);throw t.ProgramFiles=a.getSourceFiles().map((e=>e.fileName)),t}return t}function y(){e.updateFromProject&&!e.updateFromProjectInProgress?e.updateFromProject():function(){var n,r,o;if(xn.assert(2!==i),e.getProjectVersion){const t=e.getProjectVersion();if(t){if(s===t&&!(null==(n=e.hasChangedAutomaticTypeDirectiveNames)?void 0:n.call(e)))return;s=t}}const u=e.getTypeRootsVersion?e.getTypeRootsVersion():0;c!==u&&(d("TypeRoots version has changed; provide new program"),a=void 0,c=u);const f=e.getScriptFileNames().slice(),h=e.getCompilationSettings()||{target:1,jsx:1},y=e.hasInvalidatedResolutions||dt,v=Ze(e,e.hasInvalidatedLibResolutions)||dt,b=Ze(e,e.hasChangedAutomaticTypeDirectiveNames),x=null==(r=e.getProjectReferences)?void 0:r.call(e);let S,k={getSourceFile:F,getSourceFileByPath:A,getCancellationToken:()=>l,getCanonicalFileName:m,useCaseSensitiveFileNames:()=>p,getNewLine:()=>$b(h),getDefaultLibFileName:t=>e.getDefaultLibFileName(t),writeFile:_t,getCurrentDirectory:()=>_,fileExists:t=>e.fileExists(t),readFile:t=>e.readFile&&e.readFile(t),getSymlinkCache:Ze(e,e.getSymlinkCache),realpath:Ze(e,e.realpath),directoryExists:t=>zb(t,e),getDirectories:t=>e.getDirectories?e.getDirectories(t):[],readDirectory:(t,n,r,i,o)=>(xn.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(t,n,r,i,o)),onReleaseOldSourceFile:N,onReleaseParsedCommandLine:function(t,n,r){var i;e.getParsedCommandLine?null==(i=e.onReleaseParsedCommandLine)||i.call(e,t,n,r):n&&N(n.sourceFile,r)},hasInvalidatedResolutions:y,hasInvalidatedLibResolutions:v,hasChangedAutomaticTypeDirectiveNames:b,trace:Ze(e,e.trace),resolveModuleNames:Ze(e,e.resolveModuleNames),getModuleResolutionCache:Ze(e,e.getModuleResolutionCache),createHash:Ze(e,e.createHash),resolveTypeReferenceDirectives:Ze(e,e.resolveTypeReferenceDirectives),resolveModuleNameLiterals:Ze(e,e.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:Ze(e,e.resolveTypeReferenceDirectiveReferences),resolveLibrary:Ze(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:Ze(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:P,jsDocParsingMode:e.jsDocParsingMode};const T=k.getSourceFile,{getSourceFileWithCache:C}=Dq(k,(e=>Yo(e,_,m)),((...e)=>T.call(k,...e)));k.getSourceFile=C,null==(o=e.setCompilerHost)||o.call(e,k);const w={useCaseSensitiveFileNames:p,fileExists:e=>k.fileExists(e),readFile:e=>k.readFile(e),directoryExists:e=>k.directoryExists(e),getDirectories:e=>k.getDirectories(e),realpath:k.realpath,readDirectory:(...e)=>k.readDirectory(...e),trace:k.trace,getCurrentDirectory:k.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:_t},D=t.getKeyForCompilationSettings(h);let E=new Set;return _V(a,f,h,((t,n)=>e.getScriptVersion(n)),(e=>k.fileExists(e)),y,v,b,P,x)?(k=void 0,S=void 0,void(E=void 0)):(a=gV({rootNames:f,options:h,host:k,oldProgram:a,projectReferences:x}),k=void 0,S=void 0,E=void 0,g.clearCache(),void a.getTypeChecker());function P(t){const n=Yo(t,_,m),r=null==S?void 0:S.get(n);if(void 0!==r)return r||void 0;const i=e.getParsedCommandLine?e.getParsedCommandLine(t):function(e){const t=F(e,100);if(t)return t.path=Yo(e,_,m),t.resolvedPath=t.path,t.originalFileName=t.fileName,JM(t,w,Go(Ro(e),_),void 0,Go(e,_))}(t);return(S||(S=new Map)).set(n,i||!1),i}function N(e,n){const r=t.getKeyForCompilationSettings(n);t.releaseDocumentWithKey(e.resolvedPath,r,e.scriptKind,e.impliedNodeFormat)}function F(e,t,n,r){return A(e,Yo(e,_,m),t,0,r)}function A(n,r,i,o,s){xn.assert(k,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");const c=e.getScriptSnapshot(n);if(!c)return;const l=TY(n,e),u=e.getScriptVersion(n);if(!s){const o=a&&a.getSourceFileByPath(r);if(o){if(l===o.scriptKind||E.has(o.resolvedPath))return t.updateDocumentWithKey(n,r,e,D,c,u,l,i);t.releaseDocumentWithKey(o.resolvedPath,t.getKeyForCompilationSettings(a.getCompilerOptions()),o.scriptKind,o.impliedNodeFormat),E.add(o.resolvedPath)}}return t.acquireDocumentWithKey(n,r,e,D,c,u,l,i)}}()}function v(){if(2!==i)return y(),a;xn.assert(void 0===a)}function b(){if(a){const e=t.getKeyForCompilationSettings(a.getCompilerOptions());f(a.getSourceFiles(),(n=>t.releaseDocumentWithKey(n.resolvedPath,e,n.scriptKind,n.impliedNodeFormat))),a=void 0}}function x(e,t,n,r){y();const i=n&&n.use===Rse.FindReferencesUse.Rename?a.getSourceFiles().filter((e=>!a.isSourceFileDefaultLibrary(e))):a.getSourceFiles();return Rse.findReferenceOrRenameEntries(a,l,i,e,t,n,r)}const S=new Map(Object.entries({19:20,21:22,23:24,32:30}));function k(t){return xn.assertEqual(t.type,"install package"),e.installPackage?e.installPackage({fileName:(n=t.file,Yo(n,_,m)),packageName:t.packageName}):Promise.reject("Host does not implement `installPackage`");var n}function T(e,t){return{lineStarts:e.getLineStarts(),firstLine:e.getLineAndCharacterOfPosition(t.pos).line,lastLine:e.getLineAndCharacterOfPosition(t.end).line}}function C(e,t,n){const r=o.getCurrentSourceFile(e),i=[],{lineStarts:a,firstLine:s,lastLine:c}=T(r,t);let l=n||!1,u=Number.MAX_VALUE;const _=new Map,d=new RegExp(/\S/),p=jX(r,a[s]),f=p?"{/*":"//";for(let e=s;e<=c;e++){const t=r.text.substring(a[e],r.getLineEndOfPosition(a[e])),i=d.exec(t);i&&(u=Math.min(u,i.index),_.set(e.toString(),i.index),t.substr(i.index,f.length)!==f&&(l=void 0===n||n))}for(let n=s;n<=c;n++){if(s!==c&&a[n]===t.end)continue;const o=_.get(n.toString());void 0!==o&&(p?i.push(...w(e,{pos:a[n]+u,end:r.getLineEndOfPosition(a[n])},l,p)):l?i.push({newText:f,span:{length:0,start:a[n]+u}}):r.text.substr(a[n]+o,f.length)===f&&i.push({newText:"",span:{length:f.length,start:a[n]+o}}))}return i}function w(e,t,n,r){var i;const a=o.getCurrentSourceFile(e),s=[],{text:c}=a;let l=!1,u=n||!1;const _=[];let{pos:d}=t;const p=void 0!==r?r:jX(a,d),f=p?"{/*":"/*",m=p?"*/}":"*/",g=p?"\\{\\/\\*":"\\/\\*",h=p?"\\*\\/\\}":"\\*\\/";for(;d<=t.end;){const e=qX(a,d+(c.substr(d,f.length)===f?f.length:0));if(e)p&&(e.pos--,e.end++),_.push(e.pos),3===e.kind&&_.push(e.end),l=!0,d=e.end+1;else{const e=c.substring(d,t.end).search(`(${g})|(${h})`);u=void 0!==n?n:u||!HQ(c,d,-1===e?t.end:d+e),d=-1===e?t.end+1:d+e+m.length}}if(u||!l){2!==(null==(i=qX(a,t.pos))?void 0:i.kind)&&ie(_,t.pos,Nt),ie(_,t.end,Nt);const e=_[0];c.substr(e,f.length)!==f&&s.push({newText:f,span:{length:0,start:e}});for(let e=1;e<_.length-1;e++)c.substr(_[e]-m.length,m.length)!==m&&s.push({newText:m,span:{length:0,start:_[e]}}),c.substr(_[e],f.length)!==f&&s.push({newText:f,span:{length:0,start:_[e]}});s.length%2!=0&&s.push({newText:m,span:{length:0,start:_[_.length-1]}})}else for(const e of _){const t=e-m.length>0?e-m.length:0,n=c.substr(t,m.length)===m?m.length:0;s.push({newText:"",span:{length:f.length,start:e-n}})}return s}function D({openingElement:e,closingElement:t,parent:n}){return!sO(e.tagName,t.tagName)||kN(n)&&sO(e.tagName,n.openingElement.tagName)&&D(n)}function E({closingFragment:e,parent:t}){return!!(262144&e.flags)||DN(t)&&E(t)}function P(t,n,r,i,o,a){const[s,c]="number"==typeof n?[n,void 0]:[n.pos,n.end];return{file:t,startPosition:s,endPosition:c,program:v(),host:e,formatContext:A_e.getFormatContext(i,e),cancellationToken:l,preferences:r,triggerReason:o,kind:a}}S.forEach(((e,t)=>S.set(e.toString(),Number(t))));const N={dispose:function(){b(),e=void 0},cleanupSemanticCache:b,getSyntacticDiagnostics:function(e){return y(),a.getSyntacticDiagnostics(h(e),l).slice()},getSemanticDiagnostics:function(e){y();const t=h(e),n=a.getSemanticDiagnostics(t,l);if(!LS(a.getCompilerOptions()))return n.slice();const r=a.getDeclarationDiagnostics(t,l);return[...n,...r]},getSuggestionDiagnostics:function(e){return y(),p1(h(e),a,l)},getCompilerOptionsDiagnostics:function(){return y(),[...a.getOptionsDiagnostics(l),...a.getGlobalDiagnostics(l)]},getSyntacticClassifications:function(e,t){return x0(l,o.getCurrentSourceFile(e),t)},getSemanticClassifications:function(e,t,n){return y(),"2020"===(n||"original")?t7(a,l,h(e),t):m0(a.getTypeChecker(),l,h(e),a.getClassifiableNames(),t)},getEncodedSyntacticClassifications:function(e,t){return S0(l,o.getCurrentSourceFile(e),t)},getEncodedSemanticClassifications:function(e,t,n){return y(),"original"===(n||"original")?h0(a.getTypeChecker(),l,h(e),a.getClassifiableNames(),t):n7(a,l,h(e),t)},getCompletionsAtPosition:function(t,n,r=GH,i){const o={...r,includeCompletionsForModuleExports:r.includeCompletionsForModuleExports||r.includeExternalModuleExports,includeCompletionsWithInsertText:r.includeCompletionsWithInsertText||r.includeInsertTextCompletions};return y(),$oe.getCompletionsAtPosition(e,a,d,h(t),n,o,r.triggerCharacter,r.triggerKind,l,i&&A_e.getFormatContext(i,e),r.includeSymbol)},getCompletionEntryDetails:function(t,n,r,i,o,s=GH,c){return y(),$oe.getCompletionEntryDetails(a,d,h(t),n,{name:r,source:o,data:c},e,i&&A_e.getFormatContext(i,e),s,l)},getCompletionEntrySymbol:function(t,n,r,i,o=GH){return y(),$oe.getCompletionEntrySymbol(a,d,h(t),n,{name:r,source:i},e,o)},getSignatureHelpItems:function(e,t,{triggerReason:n}=GH){y();const r=h(e);return due.getSignatureHelpItems(a,r,t,n,l)},getQuickInfoAtPosition:function(e,t){y();const n=h(e),r=xX(n,t);if(r===n)return;const i=a.getTypeChecker(),o=function(e){return YE(e.parent)&&e.pos===e.parent.pos?e.parent.expression:EE(e.parent)&&e.pos===e.parent.pos||_f(e.parent)&&e.parent.name===e||ON(e.parent)?e.parent:e}(r),s=function(e,t){const n=O7(e);if(n){const e=t.getContextualType(n.parent),r=e&&M7(n,t,e,!1);if(r&&1===r.length)return Te(r)}return t.getSymbolAtLocation(e)}(o,i);if(!s||i.isUnknownSymbol(s)){const e=function(e,t,n){switch(t.kind){case 80:return!(16777216&t.flags&&!Mm(t)&&(171===t.parent.kind&&t.parent.name===t||mc(t,(e=>169===e.kind)))||LG(t)||jG(t)||Dl(t.parent));case 211:case 166:return!qX(e,n);case 110:case 197:case 108:case 202:return!0;case 236:return _f(t);default:return!1}}(n,o,t)?i.getTypeAtLocation(o):void 0;return e&&{kind:"",kindModifiers:"",textSpan:aQ(o,n),displayParts:i.runWithCancellationToken(l,(t=>vY(t,e,UG(o)))),documentation:e.symbol?e.symbol.getDocumentationComment(i):void 0,tags:e.symbol?e.symbol.getJsDocTags(i):void 0}}const{symbolKind:c,displayParts:u,documentation:_,tags:d}=i.runWithCancellationToken(l,(e=>Hue.getSymbolDisplayPartsDocumentationAndSymbolKind(e,s,n,UG(o),o)));return{kind:c,kindModifiers:Hue.getSymbolModifiers(i,s),textSpan:aQ(o,n),displayParts:u,documentation:_,tags:d}},getDefinitionAtPosition:function(e,t,n,r){return y(),Cce.getDefinitionAtPosition(a,h(e),t,n,r)},getDefinitionAndBoundSpan:function(e,t){return y(),Cce.getDefinitionAndBoundSpan(a,h(e),t)},getImplementationAtPosition:function(e,t){return y(),Rse.getImplementationsAtPosition(a,l,a.getSourceFiles(),h(e),t)},getTypeDefinitionAtPosition:function(e,t){return y(),Cce.getTypeDefinitionAtPosition(a.getTypeChecker(),h(e),t)},getReferencesAtPosition:function(e,t){return y(),x(xX(h(e),t),t,{use:Rse.FindReferencesUse.References},Rse.toReferenceEntry)},findReferences:function(e,t){return y(),Rse.findReferencedSymbols(a,l,a.getSourceFiles(),h(e),t)},getFileReferences:function(e){return y(),Rse.Core.getReferencesForFileName(e,a,a.getSourceFiles()).map(Rse.toReferenceEntry)},getDocumentHighlights:function(e,t,n){const r=Xo(e);xn.assert(n.some((e=>Xo(e)===r))),y();const i=q(n,(e=>a.getSourceFile(e))),o=h(e);return l0.getDocumentHighlights(a,l,o,t,i)},getNameOrDottedNameSpan:function(e,t,n){const r=o.getCurrentSourceFile(e),i=xX(r,t);if(i===r)return;switch(i.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let a=i;for(;;)if(BG(a)||RG(a))a=a.parent;else{if(!zG(a))break;if(267!==a.parent.parent.kind||a.parent.parent.body!==a.parent)break;a=a.parent.parent.name}return Xs(a.getStart(),i.getEnd())},getBreakpointStatementAtPosition:function(e,t){const n=o.getCurrentSourceFile(e);return R7.spanInSourceFileAtLocation(n,t)},getNavigateToItems:function(e,t,n,r=!1,i=!1){return y(),O1(n?[h(n)]:a.getSourceFiles(),a.getTypeChecker(),l,e,t,r,i)},getRenameInfo:function(e,t,n){return y(),oue.getRenameInfo(a,h(e),t,n||{})},getSmartSelectionRange:function(e,t){return jue.getSmartSelectionRange(t,o.getCurrentSourceFile(e))},findRenameLocations:function(e,t,n,r,i){y();const o=h(e),a=bX(xX(o,t));if(oue.nodeIsEligibleForRename(a)){if(qD(a)&&(CN(a.parent)||wN(a.parent))&&Jy(a.escapedText)){const{openingElement:e,closingElement:t}=a.parent.parent;return[e,t].map((e=>{const t=aQ(e.tagName,o);return{fileName:o.fileName,textSpan:t,...Rse.toContextSpan(t,o,e.parent)}}))}{const e=AQ(o,i??GH),s="boolean"==typeof i?i:null==i?void 0:i.providePrefixAndSuffixTextForRename;return x(a,t,{findInStrings:n,findInComments:r,providePrefixAndSuffixTextForRename:s,use:Rse.FindReferencesUse.Rename},((t,n,r)=>Rse.toRenameLocation(t,n,r,s||!1,e)))}}},getNavigationBarItems:function(e){return Z1(o.getCurrentSourceFile(e),l)},getNavigationTree:function(e){return e2(o.getCurrentSourceFile(e),l)},getOutliningSpans:function(e){const t=o.getCurrentSourceFile(e);return Xle.collectElements(t,l)},getTodoComments:function(e,t){y();const n=h(e);l.throwIfCancellationRequested();const r=n.text,i=[];if(t.length>0&&!n.fileName.includes("/node_modules/")){const e=function(){const e="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/\/+\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",n="(?:"+O(t,(e=>"("+e.text.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")+")")).join("|")+")";return new RegExp(e+"("+n+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}();let a;for(;a=e.exec(r);){l.throwIfCancellationRequested();const e=3;xn.assert(a.length===t.length+e);const s=a[1],c=a.index+s.length;if(!qX(n,c))continue;let u;for(let n=0;n=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57)continue;const _=a[2];i.push({descriptor:u,message:_,position:c})}}var o;return i},getBraceMatchingAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=SX(n,t),i=r.getStart(n)===t?S.get(r.kind.toString()):void 0,a=i&&uX(r.parent,i,n);return a?[aQ(r,n),aQ(a,n)].sort(((e,t)=>e.start-t.start)):u},getIndentationAtPosition:function(e,t,n){let r=Yn();const i=b7(n),a=o.getCurrentSourceFile(e);d("getIndentationAtPosition: getCurrentSourceFile: "+(Yn()-r)),r=Yn();const s=A_e.SmartIndenter.getIndentation(t,a,i);return d("getIndentationAtPosition: computeIndentation : "+(Yn()-r)),s},getFormattingEditsForRange:function(t,n,r,i){const a=o.getCurrentSourceFile(t);return A_e.formatSelection(n,r,a,A_e.getFormatContext(b7(i),e))},getFormattingEditsForDocument:function(t,n){return A_e.formatDocument(o.getCurrentSourceFile(t),A_e.getFormatContext(b7(n),e))},getFormattingEditsAfterKeystroke:function(t,n,r,i){const a=o.getCurrentSourceFile(t),s=A_e.getFormatContext(b7(i),e);if(!qX(a,n))switch(r){case"{":return A_e.formatOnOpeningCurly(n,a,s);case"}":return A_e.formatOnClosingCurly(n,a,s);case";":return A_e.formatOnSemicolon(n,a,s);case"\n":return A_e.formatOnEnter(n,a,s)}return[]},getDocCommentTemplateAtPosition:function(t,n,r,i){const a=i?A_e.getFormatContext(i,e).options:void 0;return Wce.getDocCommentTemplateAtPosition(gY(e,a),o.getCurrentSourceFile(t),n,r)},isValidBraceCompletionAtPosition:function(e,t,n){if(60===n)return!1;const r=o.getCurrentSourceFile(e);if(AX(r,t))return!1;if(IX(r,t))return 123===n;if(MX(r,t))return!1;switch(n){case 39:case 34:case 96:return!qX(r,t)}return!0},getJsxClosingTagAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=EX(t,n);if(!r)return;const i=32===r.kind&&CN(r.parent)?r.parent.parent:DD(r)&&kN(r.parent)?r.parent:void 0;if(i&&D(i))return{newText:``};const a=32===r.kind&&EN(r.parent)?r.parent.parent:DD(r)&&DN(r.parent)?r.parent:void 0;return a&&E(a)?{newText:""}:void 0},getLinkedEditingRangeAtPosition:function(e,t){const n=o.getCurrentSourceFile(e),r=EX(t,n);if(!r||307===r.parent.kind)return;const i="[a-zA-Z0-9:\\-\\._$]*";if(DN(r.parent.parent)){const e=r.parent.parent.openingFragment,o=r.parent.parent.closingFragment;if(xd(e)||xd(o))return;const a=e.getStart(n)+1,s=o.getStart(n)+2;if(t!==a&&t!==s)return;return{ranges:[{start:a,length:0},{start:s,length:0}],wordPattern:i}}{const e=mc(r.parent,(e=>!(!CN(e)&&!wN(e))));if(!e)return;xn.assert(CN(e)||wN(e),"tag should be opening or closing element");const o=e.parent.openingElement,a=e.parent.closingElement,s=o.tagName.getStart(n),c=o.tagName.end,l=a.tagName.getStart(n),u=a.tagName.end;if(s===o.getStart(n)||l===a.getStart(n)||c===o.getEnd()||u===a.getEnd())return;if(!(s<=t&&t<=c||l<=t&&t<=u))return;if(o.tagName.getText(n)!==a.tagName.getText(n))return;return{ranges:[{start:s,length:c-s},{start:l,length:u-l}],wordPattern:i}}},getSpanOfEnclosingComment:function(e,t,n){const r=o.getCurrentSourceFile(e),i=A_e.getRangeOfEnclosingComment(r,t);return!i||n&&3!==i.kind?void 0:lQ(i)},getCodeFixesAtPosition:function(t,n,r,i,o,s=GH){y();const c=h(t),u=Xs(n,r),_=A_e.getFormatContext(o,e);return R(ne(i,wt,Nt),(t=>(l.throwIfCancellationRequested(),a8.getFixes({errorCode:t,sourceFile:c,span:u,program:a,host:e,cancellationToken:l,formatContext:_,preferences:s}))))},getCombinedCodeFix:function(t,n,r,i=GH){y(),xn.assert("file"===t.type);const o=h(t.fileName),s=A_e.getFormatContext(r,e);return a8.getAllFixes({fixId:n,sourceFile:o,program:a,host:e,cancellationToken:l,formatContext:s,preferences:i})},applyCodeActionCommand:function(e,t){const n="string"==typeof e?t:e;return ot(n)?Promise.all(n.map((e=>k(e)))):k(n)},organizeImports:function(t,n,r=GH){y(),xn.assert("file"===t.type);const i=h(t.fileName),o=A_e.getFormatContext(n,e),s=t.mode??(t.skipDestructiveCodeActions?"SortAndCombine":"All");return vle.organizeImports(i,o,e,a,r,s)},getEditsForFileRename:function(t,n,r,i=GH){return E0(v(),t,n,e,A_e.getFormatContext(r,e),i,g)},getEmitOutput:function(t,n,r){y();const i=h(t),o=e.getCustomTransformers&&e.getCustomTransformers();return CV(a,i,!!n,l,o,r)},getNonBoundSourceFile:function(e){return o.getCurrentSourceFile(e)},getProgram:v,getCurrentProgram:()=>a,getAutoImportProvider:function(){var t;return null==(t=e.getPackageJsonAutoImportProvider)?void 0:t.call(e)},updateIsDefinitionOfReferencedSymbols:function(t,n){const r=a.getTypeChecker(),i=function(){for(const i of t)for(const t of i.references){if(n.has(t)){const e=o(t);return xn.assertIsDefined(e),r.getSymbolAtLocation(e)}const i=XQ(t,g,Ze(e,e.fileExists));if(i&&n.has(i)){const e=o(i);if(e)return r.getSymbolAtLocation(e)}}}();if(!i)return!1;for(const r of t)for(const t of r.references){const r=o(t);if(xn.assertIsDefined(r),n.has(t)||Rse.isDeclarationOfSymbol(r,i)){n.add(t),t.isDefinition=!0;const r=XQ(t,g,Ze(e,e.fileExists));r&&n.add(r)}else t.isDefinition=!1}return!0;function o(e){const t=a.getSourceFile(e.fileName);if(!t)return;const n=xX(t,e.textSpan.start);return Rse.Core.getAdjustedNode(n,{use:Rse.FindReferencesUse.References})}},getApplicableRefactors:function(e,t,n=GH,r,i,o){y();const a=h(e);return B2.getApplicableRefactors(P(a,t,n,GH,r,i),o)},getEditsForRefactor:function(e,t,n,r,i,o=GH,a){y();const s=h(e);return B2.getEditsForRefactor(P(s,n,o,t),r,i,a)},getMoveToRefactoringFileSuggestions:function(t,n,r=GH){y();const i=h(t),o=xn.checkDefined(a.getSourceFiles()),s=sT(t),c=J6(P(i,n,r,GH)),l=z6(null==c?void 0:c.all),u=q(o,(e=>{const t=sT(e.fileName);return(null==a?void 0:a.isSourceFileFromExternalLibrary(i))||i===h(e.fileName)||".ts"===s&&".d.ts"===t||".d.ts"===s&&an(Bo(e.fileName),"lib.")&&".d.ts"===t||s!==t&&(!(".tsx"===s&&".ts"===t||".jsx"===s&&".js"===t)||l)?void 0:e.fileName}));return{newFileName:B6(i,a,e,c),files:u}},toLineColumnOffset:function(e,t){return 0===t?{line:0,character:0}:g.toLineColumnOffset(e,t)},getSourceMapper:()=>g,clearSourceMapperCache:()=>g.clearCache(),prepareCallHierarchy:function(e,t){y();const n=J7.resolveCallHierarchyDeclaration(a,xX(h(e),t));return n&&EZ(n,(e=>J7.createCallHierarchyItem(a,e)))},provideCallHierarchyIncomingCalls:function(e,t){y();const n=h(e),r=PZ(J7.resolveCallHierarchyDeclaration(a,0===t?n:xX(n,t)));return r?J7.getIncomingCalls(a,r,l):[]},provideCallHierarchyOutgoingCalls:function(e,t){y();const n=h(e),r=PZ(J7.resolveCallHierarchyDeclaration(a,0===t?n:xX(n,t)));return r?J7.getOutgoingCalls(a,r):[]},toggleLineComment:C,toggleMultilineComment:w,commentSelection:function(e,t){const n=o.getCurrentSourceFile(e),{firstLine:r,lastLine:i}=T(n,t);return r===i&&t.pos!==t.end?w(e,t,!0):C(e,t,!0)},uncommentSelection:function(e,t){const n=o.getCurrentSourceFile(e),r=[],{pos:i}=t;let{end:a}=t;i===a&&(a+=jX(n,i)?2:1);for(let t=i;t<=a;t++){const i=qX(n,t);if(i){switch(i.kind){case 2:r.push(...C(e,{end:i.end,pos:i.pos+1},!1));break;case 3:r.push(...w(e,{end:i.end,pos:i.pos+1},!1))}t=i.end+1}}return r},provideInlayHints:function(t,n,r=GH){y();const i=h(t);return qce.provideInlayHints(function(t,n,r){return{file:t,program:v(),host:e,span:n,preferences:r,cancellationToken:l}}(i,n,r))},getSupportedCodeFixes:T7,getPasteEdits:function(t,n){return y(),Ppe.pasteEditsProvider(h(t.targetFile),t.pastedText,t.pasteLocations,t.copiedFrom?{file:h(t.copiedFrom.file),range:t.copiedFrom.range}:void 0,e,t.preferences,A_e.getFormatContext(n,e),l)},mapCode:function(t,n,r,i,a){return ple.mapCode(o.getCurrentSourceFile(t),n,r,e,A_e.getFormatContext(i,e),a)}};switch(i){case 0:break;case 1:N7.forEach((e=>N[e]=()=>{throw new Error(`LanguageService Operation: ${e} not allowed in LanguageServiceMode.PartialSemantic`)}));break;case 2:F7.forEach((e=>N[e]=()=>{throw new Error(`LanguageService Operation: ${e} not allowed in LanguageServiceMode.Syntactic`)}));break;default:xn.assertNever(i)}return N}function I7(e){return e.nameTable||function(e){const t=e.nameTable=new Map;e.forEachChild((function e(n){if(qD(n)&&!jG(n)&&n.escapedText||$h(n)&&function(e){return dh(e)||283===e.parent.kind||function(e){return e&&e.parent&&212===e.parent.kind&&e.parent.argumentExpression===e}(e)||fh(e)}(n)){const e=Gh(n);t.set(e,void 0===t.get(e)?n.pos:-1)}else if(VD(n)){const e=n.escapedText;t.set(e,void 0===t.get(e)?n.pos:-1)}if(LI(n,e),O_(n))for(const t of n.jsDoc)LI(t,e)}))}(e),e.nameTable}function O7(e){const t=function(e){switch(e.kind){case 11:case 15:case 9:if(167===e.parent.kind)return R_(e.parent.parent)?e.parent.parent:void 0;case 80:return!R_(e.parent)||210!==e.parent.parent.kind&&292!==e.parent.parent.kind||e.parent.name!==e?void 0:e.parent}}(e);return t&&(HE(t.parent)||FN(t.parent))?t:void 0}function M7(e,t,n,r){const i=xQ(e.name);if(!i)return u;if(!n.isUnion()){const e=n.getProperty(i);return e?[e]:u}const o=HE(e.parent)||FN(e.parent)?F(n.types,(n=>!t.isTypeInvalidDueToUnionDiscriminant(n,e.parent))):n.types,a=q(o,(e=>e.getProperty(i)));if(r&&(0===a.length||a.length===n.types.length)){const e=n.getProperty(i);if(e)return[e]}return o.length||a.length?ne(a,wt):q(n.types,(e=>e.getProperty(i)))}function L7(e){if(vo)return Ko(Ro(Xo(vo.getExecutingFilePath())),Ls(e));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}function j7(e,t,n){const r=[];n=A1(n,r);const i=ot(e)?e:[e],o=T$(void 0,void 0,YC,n,i,t,!0);return o.diagnostics=Z(o.diagnostics,r),o}Qx({getNodeConstructor:()=>l7,getTokenConstructor:()=>d7,getIdentifierConstructor:()=>p7,getPrivateIdentifierConstructor:()=>f7,getSourceFileConstructor:()=>v7,getSymbolConstructor:()=>class{constructor(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}getFlags(){return this.flags}get name(){return Sc(this)}getEscapedName(){return this.escapedName}getName(){return this.name}getDeclarations(){return this.declarations}getDocumentationComment(e){if(!this.documentationComment)if(this.documentationComment=u,!this.declarations&&td(this)&&this.links.target&&td(this.links.target)&&this.links.target.links.tupleLabelDeclaration){const t=this.links.target.links.tupleLabelDeclaration;this.documentationComment=h7([t],e)}else this.documentationComment=h7(this.declarations,e);return this.documentationComment}getContextualDocumentationComment(e,t){if(e){if(I_(e)&&(this.contextualGetAccessorDocumentationComment||(this.contextualGetAccessorDocumentationComment=h7(F(this.declarations,I_),t)),p(this.contextualGetAccessorDocumentationComment)))return this.contextualGetAccessorDocumentationComment;if(A_(e)&&(this.contextualSetAccessorDocumentationComment||(this.contextualSetAccessorDocumentationComment=h7(F(this.declarations,A_),t)),p(this.contextualSetAccessorDocumentationComment)))return this.contextualSetAccessorDocumentationComment}return this.getDocumentationComment(t)}getJsDocTags(e){return void 0===this.tags&&(this.tags=u,this.tags=g7(this.declarations,e)),this.tags}getContextualJsDocTags(e,t){if(e){if(I_(e)&&(this.contextualGetAccessorTags||(this.contextualGetAccessorTags=g7(F(this.declarations,I_),t)),p(this.contextualGetAccessorTags)))return this.contextualGetAccessorTags;if(A_(e)&&(this.contextualSetAccessorTags||(this.contextualSetAccessorTags=g7(F(this.declarations,A_),t)),p(this.contextualSetAccessorTags)))return this.contextualSetAccessorTags}return this.getJsDocTags(t)}},getTypeConstructor:()=>class{constructor(e,t){this.flags=t,this.checker=e}getFlags(){return this.flags}getSymbol(){return this.symbol}getProperties(){return this.checker.getPropertiesOfType(this)}getProperty(e){return this.checker.getPropertyOfType(this,e)}getApparentProperties(){return this.checker.getAugmentedPropertiesOfType(this)}getCallSignatures(){return this.checker.getSignaturesOfType(this,0)}getConstructSignatures(){return this.checker.getSignaturesOfType(this,1)}getStringIndexType(){return this.checker.getIndexTypeOfType(this,0)}getNumberIndexType(){return this.checker.getIndexTypeOfType(this,1)}getBaseTypes(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0}isNullableType(){return this.checker.isNullableType(this)}getNonNullableType(){return this.checker.getNonNullableType(this)}getNonOptionalType(){return this.checker.getNonOptionalType(this)}getConstraint(){return this.checker.getBaseConstraintOfType(this)}getDefault(){return this.checker.getDefaultFromTypeParameter(this)}isUnion(){return!!(1048576&this.flags)}isIntersection(){return!!(2097152&this.flags)}isUnionOrIntersection(){return!!(3145728&this.flags)}isLiteral(){return!!(2432&this.flags)}isStringLiteral(){return!!(128&this.flags)}isNumberLiteral(){return!!(256&this.flags)}isTypeParameter(){return!!(262144&this.flags)}isClassOrInterface(){return!!(3&wx(this))}isClass(){return!!(1&wx(this))}isIndexType(){return!!(4194304&this.flags)}get typeArguments(){if(4&wx(this))return this.checker.getTypeArguments(this)}},getSignatureConstructor:()=>class{constructor(e,t){this.flags=t,this.checker=e}getDeclaration(){return this.declaration}getTypeParameters(){return this.typeParameters}getParameters(){return this.parameters}getReturnType(){return this.checker.getReturnTypeOfSignature(this)}getTypeParameterAtPosition(e){const t=this.checker.getParameterType(this,e);if(t.isIndexType()&>(t.type)){const e=t.type.getConstraint();if(e)return this.checker.getIndexType(e)}return t}getDocumentationComment(){return this.documentationComment||(this.documentationComment=h7(fn(this.declaration),this.checker))}getJsDocTags(){return this.jsDocTags||(this.jsDocTags=g7(fn(this.declaration),this.checker))}},getSourceMapSourceConstructor:()=>class{constructor(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||(e=>e)}getLineAndCharacterOfPosition(e){return Xa(this,e)}}});var R7={};function B7(e,t){if(e.isDeclarationFile)return;let n=kX(e,t);const r=e.getLineAndCharacterOfPosition(t).line;if(e.getLineAndCharacterOfPosition(n.getStart(e)).line>r){const t=EX(n.pos,e);if(!t||e.getLineAndCharacterOfPosition(t.getEnd()).line!==r)return;n=t}if(!(33554432&n.flags))return l(n);function i(t,n){const r=lI(t)?k(t.modifiers,cE):void 0;return Xs(r?as(e.text,r.end):t.getStart(e),(n||t).getEnd())}function o(t,n){return i(t,DX(n,n.parent,e))}function a(t,n){return t&&r===e.getLineAndCharacterOfPosition(t.getStart(e)).line?l(t):l(n)}function s(t){return l(EX(t.pos,e))}function c(t){return l(DX(t,t.parent,e))}function l(t){if(t){const{parent:u}=t;switch(t.kind){case 243:return _(t.declarationList.declarations[0]);case 260:case 172:case 171:return _(t);case 169:return function e(t){if(Eu(t.name))return g(t.name);if(function(e){return!!e.initializer||void 0!==e.dotDotDotToken||Bv(e,3)}(t))return i(t);{const n=t.parent,r=n.parameters.indexOf(t);return xn.assert(-1!==r),0!==r?e(n.parameters[r-1]):l(n.body)}}(t);case 262:case 174:case 173:case 177:case 178:case 176:case 218:case 219:return function(e){if(e.body)return d(e)?i(e):l(e.body)}(t);case 241:if(zf(t))return function(e){const t=e.statements.length?e.statements[0]:e.getLastToken();return d(e.parent)?a(e.parent,t):l(t)}(t);case 268:return p(t);case 299:return p(t.block);case 244:return i(t.expression);case 253:return i(t.getChildAt(0),t.expression);case 247:return o(t,t.expression);case 246:return l(t.statement);case 259:return i(t.getChildAt(0));case 245:return o(t,t.expression);case 256:return l(t.statement);case 252:case 251:return i(t.getChildAt(0),t.label);case 248:return(r=t).initializer?m(r):r.condition?i(r.condition):r.incrementor?i(r.incrementor):void 0;case 249:return o(t,t.expression);case 250:return m(t);case 255:return o(t,t.expression);case 296:case 297:return l(t.statements[0]);case 258:return p(t.tryBlock);case 257:case 277:return i(t,t.expression);case 271:return i(t,t.moduleReference);case 272:case 278:return i(t,t.moduleSpecifier);case 267:if(1!==DR(t))return;case 263:case 266:case 306:case 208:return i(t);case 254:return l(t.statement);case 170:return function(t,n,r){if(t){const i=t.indexOf(n);if(i>=0){let n=i,o=i+1;for(;n>0&&r(t[n-1]);)n--;for(;o0)return l(t.declarations[0])}}function g(e){const t=f(e.elements,(e=>232!==e.kind?e:void 0));return t?l(t):208===e.parent.kind?i(e.parent):u(e.parent)}function h(e){xn.assert(207!==e.kind&&206!==e.kind);const t=f(209===e.kind?e.elements:e.properties,(e=>232!==e.kind?e:void 0));return t?l(t):i(226===e.parent.kind?e.parent:e)}}}o(R7,{spanInSourceFileAtLocation:()=>B7});var J7={};function z7(e){return uE(e)||KP(e)}function $7(e){return(nP(e)||rP(e)||mP(e))&&z7(e.parent)&&e===e.parent.initializer&&qD(e.parent.name)&&(!!(2&uc(e.parent))||uE(e.parent))}function q7(e){return qN(e)||ZP(e)||HP(e)||nP(e)||GP(e)||mP(e)||pE(e)||dE(e)||_E(e)||mE(e)||gE(e)}function V7(e){return qN(e)||ZP(e)&&qD(e.name)||HP(e)||GP(e)||pE(e)||dE(e)||_E(e)||mE(e)||gE(e)||function(e){return(nP(e)||mP(e))&&Dc(e)}(e)||$7(e)}function U7(e){return qN(e)?e:Dc(e)?e.name:$7(e)?e.parent.name:xn.checkDefined(e.modifiers&&S(e.modifiers,K7))}function K7(e){return 90===e.kind}function W7(e,t){const n=U7(t);return n&&e.getSymbolAtLocation(n)}function H7(e,t){if(t.body)return t;if(fE(t))return pv(t.parent);if(HP(t)||dE(t)){const n=W7(e,t);return n&&n.valueDeclaration&&uu(n.valueDeclaration)&&n.valueDeclaration.body?n.valueDeclaration:void 0}return t}function G7(e,t){const n=W7(e,t);let r;if(n&&n.declarations){const e=te(n.declarations),t=O(n.declarations,(e=>({file:e.getSourceFile().fileName,pos:e.pos})));e.sort(((e,n)=>Mt(t[e].file,t[n].file)||t[e].pos-t[n].pos));const i=O(e,(e=>n.declarations[e]));let o;for(const e of i)V7(e)&&(o&&o.parent===e.parent&&o.end===e.pos||(r=ue(r,e)),o=e)}return r}function X7(e,t){return pE(t)?t:uu(t)?H7(e,t)??G7(e,t)??t:G7(e,t)??t}function Q7(e,t){const n=e.getTypeChecker();let r=!1;for(;;){if(V7(t))return X7(n,t);if(q7(t)){const e=mc(t,V7);return e&&X7(n,e)}if(dh(t)){if(V7(t.parent))return X7(n,t.parent);if(q7(t.parent)){const e=mc(t.parent,V7);return e&&X7(n,e)}return z7(t.parent)&&t.parent.initializer&&$7(t.parent.initializer)?t.parent.initializer:void 0}if(fE(t))return V7(t.parent)?t.parent:void 0;if(126!==t.kind||!pE(t.parent)){if(KP(t)&&t.initializer&&$7(t.initializer))return t.initializer;if(!r){let e=n.getSymbolAtLocation(t);if(e&&(2097152&e.flags&&(e=n.getAliasedSymbol(e)),e.valueDeclaration)){r=!0,t=e.valueDeclaration;continue}}return}t=t.parent}}function Y7(e,t){const n=t.getSourceFile(),r=function(e,t){if(qN(t))return{text:t.fileName,pos:0,end:0};if((HP(t)||GP(t))&&!Dc(t)){const e=t.modifiers&&S(t.modifiers,K7);if(e)return{text:"default",pos:e.getStart(),end:e.getEnd()}}if(pE(t)){const n=as(t.getSourceFile().text,Wb(t).pos),r=n+6,i=e.getTypeChecker(),o=i.getSymbolAtLocation(t.parent);return{text:(o?`${i.symbolToString(o,t.parent)} `:"")+"static {}",pos:n,end:r}}const n=$7(t)?t.parent.name:xn.checkDefined(Pc(t),"Expected call hierarchy item to have a name");let r=qD(n)?bc(n):$h(n)?n.text:oE(n)&&$h(n.expression)?n.expression.text:void 0;if(void 0===r){const i=e.getTypeChecker(),o=i.getSymbolAtLocation(n);o&&(r=i.symbolToString(o,t))}if(void 0===r){const e=nq();r=dd((n=>e.writeNode(4,t,t.getSourceFile(),n)))}return{text:r,pos:n.getStart(),end:n.getEnd()}}(e,t),i=function(e){var t,n,r,i;if($7(e))return uE(e.parent)&&gu(e.parent.parent)?mP(e.parent.parent)?null==(t=Nc(e.parent.parent))?void 0:t.getText():null==(n=e.parent.parent.name)?void 0:n.getText():eN(e.parent.parent.parent.parent)&&qD(e.parent.parent.parent.parent.parent.name)?e.parent.parent.parent.parent.parent.name.getText():void 0;switch(e.kind){case 177:case 178:case 174:return 210===e.parent.kind?null==(r=Nc(e.parent))?void 0:r.getText():null==(i=Pc(e.parent))?void 0:i.getText();case 262:case 263:case 267:if(eN(e.parent)&&qD(e.parent.parent.name))return e.parent.parent.name.getText()}}(t),o=KG(t),a=KX(t),s=Xs(as(n.text,t.getFullStart(),!1,!0),t.getEnd()),c=Xs(r.pos,r.end);return{file:n.fileName,kind:o,kindModifiers:a,name:r.text,containerName:i,span:s,selectionSpan:c}}function Z7(e){return void 0!==e}function e8(e){if(e.kind===Rse.EntryKind.Node){const{node:t}=e;if(SG(t,!0,!0)||kG(t,!0,!0)||TG(t,!0,!0)||CG(t,!0,!0)||BG(t)||JG(t)){const e=t.getSourceFile();return{declaration:mc(t,V7)||e,range:cQ(t,e)}}}}function t8(e){return IB(e.declaration)}function n8(e,t,n){if(qN(t)||ZP(t)||pE(t))return[];const r=U7(t),i=F(Rse.findReferenceOrRenameEntries(e,n,e.getSourceFiles(),r,0,{use:Rse.FindReferencesUse.References},e8),Z7);return i?He(i,t8,(t=>function(e,t){return{from:Y7(e,t[0].declaration),fromSpans:O(t,(e=>lQ(e.range)))}}(e,t))):[]}function r8(e,t){return 33554432&t.flags||_E(t)?[]:He(function(e,t){const n=[],r=function(e,t){function n(n){const r=ZE(n)?n.tag:D_(n)?n.tagName:Ox(n)||pE(n)?n:n.expression,i=Q7(e,r);if(i){const e=cQ(r,n.getSourceFile());if(ot(i))for(const n of i)t.push({declaration:n,range:e});else t.push({declaration:i,range:e})}}return function e(t){if(t&&!(33554432&t.flags))if(V7(t)){if(gu(t))for(const n of t.members)n.name&&oE(n.name)&&e(n.name.expression)}else{switch(t.kind){case 80:case 271:case 272:case 278:case 264:case 265:return;case 175:return void n(t);case 216:case 234:case 238:return void e(t.expression);case 260:case 169:return e(t.name),void e(t.initializer);case 213:case 214:return n(t),e(t.expression),void f(t.arguments,e);case 215:return n(t),e(t.tag),void e(t.template);case 286:case 285:return n(t),e(t.tagName),void e(t.attributes);case 170:return n(t),void e(t.expression);case 211:case 212:n(t),LI(t,e)}wf(t)||LI(t,e)}}}(e,n);switch(t.kind){case 307:!function(e,t){f(e.statements,t)}(t,r);break;case 267:!function(e,t){!Bv(e,128)&&e.body&&eN(e.body)&&f(e.body.statements,t)}(t,r);break;case 262:case 218:case 219:case 174:case 177:case 178:!function(e,t,n){const r=H7(e,t);r&&(f(r.parameters,n),n(r.body))}(e.getTypeChecker(),t,r);break;case 263:case 231:!function(e,t){f(e.modifiers,t);const n=kh(e);n&&t(n.expression);for(const n of e.members)cI(n)&&f(n.modifiers,t),uE(n)?t(n.initializer):fE(n)&&n.body?(f(n.parameters,t),t(n.body)):pE(n)&&t(n)}(t,r);break;case 175:!function(e,t){t(e.body)}(t,r);break;default:xn.assertNever(t)}return n}(e,t),t8,(t=>function(e,t){return{to:Y7(e,t[0].declaration),fromSpans:O(t,(e=>lQ(e.range)))}}(e,t)))}o(J7,{createCallHierarchyItem:()=>Y7,getIncomingCalls:()=>n8,getOutgoingCalls:()=>r8,resolveCallHierarchyDeclaration:()=>Q7});var i8={};o(i8,{v2020:()=>o8});var o8={};o(o8,{TokenEncodingConsts:()=>Y4,TokenModifier:()=>e7,TokenType:()=>Z4,getEncodedSemanticClassifications:()=>n7,getSemanticClassifications:()=>t7});var a8={};o(a8,{PreserveOptionalFlags:()=>lie,addNewNodeForMemberSymbol:()=>uie,codeFixAll:()=>b8,createCodeFixAction:()=>_8,createCodeFixActionMaybeFixAll:()=>d8,createCodeFixActionWithoutFixAll:()=>u8,createCombinedCodeActions:()=>y8,createFileTextChanges:()=>v8,createImportAdder:()=>$9,createImportSpecifierResolver:()=>V9,createJsonPropertyAssignment:()=>kie,createMissingMemberNodes:()=>sie,createSignatureDeclarationFromCallExpression:()=>die,createSignatureDeclarationFromSignature:()=>_ie,createStubbedBody:()=>bie,eachDiagnostic:()=>x8,findAncestorMatchingSpan:()=>Eie,findJsonProperty:()=>Tie,generateAccessorFromProperty:()=>Pie,getAccessorConvertiblePropertyAtPosition:()=>Iie,getAllFixes:()=>h8,getAllSupers:()=>Lie,getArgumentTypesAndTypeParameters:()=>gie,getFixes:()=>g8,getImportCompletionAction:()=>U9,getImportKind:()=>see,getJSDocTypedefNodes:()=>P9,getNoopSymbolTrackerWithResolver:()=>cie,getPromoteTypeOnlyCompletionAction:()=>K9,getSupportedErrorCodes:()=>m8,importFixName:()=>B9,importSymbols:()=>Die,parameterShouldGetTypeFromJSDoc:()=>c5,registerCodeFix:()=>f8,setJsonCompilerOptionValue:()=>Sie,setJsonCompilerOptionValues:()=>xie,tryGetAutoImportableReferenceFromTypeNode:()=>Cie,typeToAutoImportableTypeNode:()=>fie});var s8,c8=et(),l8=new Map;function u8(e,t,n){return p8(e,VZ(n),t,void 0,void 0)}function _8(e,t,n,r,i,o){return p8(e,VZ(n),t,r,VZ(i),o)}function d8(e,t,n,r,i,o){return p8(e,VZ(n),t,r,i&&VZ(i),o)}function p8(e,t,n,r,i,o){return{fixName:e,description:t,changes:n,fixId:r,fixAllDescription:i,commands:o?[o]:void 0}}function f8(e){for(const t of e.errorCodes)s8=void 0,c8.add(String(t),e);if(e.fixIds)for(const t of e.fixIds)xn.assert(!l8.has(t)),l8.set(t,e)}function m8(){return s8??(s8=$e(c8.keys()))}function g8(e){const t=S8(e);return R(c8.get(String(e.errorCode)),(n=>O(n.getCodeActions(e),function(e,t){const{errorCodes:n}=e;let r=0;for(const e of t)if(D(n,e.code)&&r++,r>1)break;const i=r<2;return({fixId:e,fixAllDescription:t,...n})=>i?n:{...n,fixId:e,fixAllDescription:t}}(n,t))))}function h8(e){return l8.get(ut(e.fixId,st)).getAllCodeActions(e)}function y8(e,t){return{changes:e,commands:t}}function v8(e,t){return{fileName:e,textChanges:t}}function b8(e,t,n){const r=[];return y8(r_e.ChangeTracker.with(e,(i=>x8(e,t,(e=>n(i,e,r))))),0===r.length?void 0:r)}function x8(e,t,n){for(const r of S8(e))D(t,r.code)&&n(r)}function S8({program:e,sourceFile:t,cancellationToken:n}){const r=[...e.getSemanticDiagnostics(t,n),...e.getSyntacticDiagnostics(t,n),...p1(t,e,n)];return LS(e.getCompilerOptions())&&r.push(...e.getDeclarationDiagnostics(t,n)),r}var k8="addConvertToUnknownForNonOverlappingTypes",T8=[va.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];function C8(e,t,n){const r=yP(n)?YC.createAsExpression(n.expression,YC.createKeywordTypeNode(159)):YC.createTypeAssertion(YC.createKeywordTypeNode(159),n.expression);e.replaceNode(t,n.expression,r)}function w8(e,t){if(!Mm(e))return mc(kX(e,t),(e=>yP(e)||eP(e)))}f8({errorCodes:T8,getCodeActions:function(e){const t=w8(e.sourceFile,e.span.start);if(void 0===t)return;const n=r_e.ChangeTracker.with(e,(n=>C8(n,e.sourceFile,t)));return[_8(k8,n,va.Add_unknown_conversion_for_non_overlapping_types,k8,va.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[k8],getAllCodeActions:e=>b8(e,T8,((e,t)=>{const n=w8(t.file,t.start);n&&C8(e,t.file,n)}))}),f8({errorCodes:[va.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,va.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,va.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code],getCodeActions:function(e){const{sourceFile:t}=e;return[u8("addEmptyExportDeclaration",r_e.ChangeTracker.with(e,(e=>{const n=YC.createExportDeclaration(void 0,!1,YC.createNamedExports([]),void 0);e.insertNodeAtEndOfScope(t,t,n)})),va.Add_export_to_make_this_file_into_a_module)]}});var D8="addMissingAsync",E8=[va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,va.Type_0_is_not_assignable_to_type_1.code,va.Type_0_is_not_comparable_to_type_1.code];function P8(e,t,n,r){const i=n((n=>function(e,t,n,r){if(r&&r.has(IB(n)))return;null==r||r.add(IB(n));const i=YC.replaceModifiers(NY(n,!0),YC.createNodeArray(YC.createModifiersFromModifierFlags(1024|Zv(n))));e.replaceNode(t,n,i)}(n,e.sourceFile,t,r)));return _8(D8,i,va.Add_async_modifier_to_containing_function,D8,va.Add_all_missing_async_modifiers)}function N8(e,t){if(t)return mc(kX(e,t.start),(n=>n.getStart(e)js(t)?"quit":(rP(n)||dE(n)||nP(n)||HP(n))&&VQ(t,aQ(n,e))))}f8({fixIds:[D8],errorCodes:E8,getCodeActions:function(e){const{sourceFile:t,errorCode:n,cancellationToken:r,program:i,span:o}=e,a=S(i.getTypeChecker().getDiagnostics(t,r),function(e,t){return({start:n,length:r,relatedInformation:i,code:o})=>ct(n)&&ct(r)&&VQ({start:n,length:r},e)&&o===t&&!!i&&Q(i,(e=>e.code===va.Did_you_mean_to_mark_this_function_as_async.code))}(o,n)),s=N8(t,a&&a.relatedInformation&&S(a.relatedInformation,(e=>e.code===va.Did_you_mean_to_mark_this_function_as_async.code)));if(s)return[P8(e,s,(t=>r_e.ChangeTracker.with(e,t)))]},getAllCodeActions:e=>{const{sourceFile:t}=e,n=new Set;return b8(e,E8,((r,i)=>{const o=i.relatedInformation&&S(i.relatedInformation,(e=>e.code===va.Did_you_mean_to_mark_this_function_as_async.code)),a=N8(t,o);if(a)return P8(e,a,(e=>(e(r),[])),n)}))}});var F8="addMissingAwait",A8=va.Property_0_does_not_exist_on_type_1.code,I8=[va.This_expression_is_not_callable.code,va.This_expression_is_not_constructable.code],O8=[va.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,va.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,va.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,va.Operator_0_cannot_be_applied_to_type_1.code,va.Operator_0_cannot_be_applied_to_types_1_and_2.code,va.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code,va.This_condition_will_always_return_true_since_this_0_is_always_defined.code,va.Type_0_is_not_an_array_type.code,va.Type_0_is_not_an_array_type_or_a_string_type.code,va.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code,va.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,va.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,va.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,va.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,A8,...I8];function M8(e,t,n,r,i){const o=DZ(e,n);return o&&function(e,t,n,r,i){return Q(i.getTypeChecker().getDiagnostics(e,r),(({start:e,length:r,relatedInformation:i,code:o})=>ct(e)&&ct(r)&&VQ({start:e,length:r},n)&&o===t&&!!i&&Q(i,(e=>e.code===va.Did_you_forget_to_use_await.code))))}(e,t,n,r,i)&&B8(o)?o:void 0}function L8(e,t,n,r,i,o){const{sourceFile:a,program:s,cancellationToken:c}=e,l=function(e,t,n,r,i){const o=function(e,t){if(GE(e.parent)&&qD(e.parent.expression))return{identifiers:[e.parent.expression],isCompleteFix:!0};if(qD(e))return{identifiers:[e],isCompleteFix:!0};if(uP(e)){let n,r=!0;for(const i of[e.left,e.right]){const e=t.getTypeAtLocation(i);if(t.getPromisedTypeOfPromise(e)){if(!qD(i)){r=!1;continue}(n||(n=[])).push(i)}}return n&&{identifiers:n,isCompleteFix:r}}}(e,i);if(!o)return;let a,s=o.isCompleteFix;for(const e of o.identifiers){const o=i.getSymbolAtLocation(e);if(!o)continue;const c=lt(o.valueDeclaration,KP),l=c&<(c.name,qD),u=Eh(c,243);if(!c||!u||c.type||!c.initializer||u.getSourceFile()!==t||Bv(u,32)||!l||!B8(c.initializer)){s=!1;continue}const _=r.getSemanticDiagnostics(t,n);Rse.Core.eachSymbolReferenceInFile(l,i,t,(n=>e!==n&&!R8(n,_,t,i)))?s=!1:(a||(a=[])).push({expression:c.initializer,declarationSymbol:o})}return a&&{initializers:a,needsSecondPassForFixAll:!s}}(t,a,c,s,r);if(l)return u8("addMissingAwaitToInitializer",i((e=>{f(l.initializers,(({expression:t})=>J8(e,n,a,r,t,o))),o&&l.needsSecondPassForFixAll&&J8(e,n,a,r,t,o)})),1===l.initializers.length?[va.Add_await_to_initializer_for_0,l.initializers[0].declarationSymbol.name]:va.Add_await_to_initializers)}function j8(e,t,n,r,i,o){const a=i((i=>J8(i,n,e.sourceFile,r,t,o)));return _8(F8,a,va.Add_await,F8,va.Fix_all_expressions_possibly_missing_await)}function R8(e,t,n,r){const i=GE(e.parent)?e.parent.name:uP(e.parent)?e.parent:e,o=S(t,(e=>e.start===i.getStart(n)&&e.start+e.length===i.getEnd()));return o&&D(O8,o.code)||1&r.getTypeAtLocation(i).flags}function B8(e){return 65536&e.flags||!!mc(e,(e=>e.parent&&rP(e.parent)&&e.parent.body===e||DP(e)&&(262===e.parent.kind||218===e.parent.kind||219===e.parent.kind||174===e.parent.kind)))}function J8(e,t,n,r,i,o){if(LP(i.parent)&&!i.parent.awaitModifier){const t=r.getTypeAtLocation(i),o=r.getAsyncIterableType();if(o&&r.isTypeAssignableTo(t,o)){const t=i.parent;return void e.replaceNode(n,t,YC.updateForOfStatement(t,YC.createToken(135),t.initializer,t.expression,t.statement))}}if(uP(i))for(const t of[i.left,i.right]){if(o&&qD(t)){const e=r.getSymbolAtLocation(t);if(e&&o.has(OB(e)))continue}const i=r.getTypeAtLocation(t),a=r.getPromisedTypeOfPromise(i)?YC.createAwaitExpression(t):t;e.replaceNode(n,t,a)}else if(t===A8&&GE(i.parent)){if(o&&qD(i.parent.expression)){const e=r.getSymbolAtLocation(i.parent.expression);if(e&&o.has(OB(e)))return}e.replaceNode(n,i.parent.expression,YC.createParenthesizedExpression(YC.createAwaitExpression(i.parent.expression))),z8(e,i.parent.expression,n)}else if(D(I8,t)&&$u(i.parent)){if(o&&qD(i)){const e=r.getSymbolAtLocation(i);if(e&&o.has(OB(e)))return}e.replaceNode(n,i,YC.createParenthesizedExpression(YC.createAwaitExpression(i))),z8(e,i,n)}else{if(o&&KP(i.parent)&&qD(i.parent.name)){const e=r.getSymbolAtLocation(i.parent.name);if(e&&!W(o,OB(e)))return}e.replaceNode(n,i,YC.createAwaitExpression(i))}}function z8(e,t,n){const r=EX(t.pos,n);r&&cZ(r.end,r.parent,n)&&e.insertText(n,t.getStart(n),";")}f8({fixIds:[F8],errorCodes:O8,getCodeActions:function(e){const{sourceFile:t,errorCode:n,span:r,cancellationToken:i,program:o}=e,a=M8(t,n,r,i,o);if(!a)return;const s=e.program.getTypeChecker(),c=t=>r_e.ChangeTracker.with(e,t);return ce([L8(e,a,n,s,c),j8(e,a,n,s,c)])},getAllCodeActions:e=>{const{sourceFile:t,program:n,cancellationToken:r}=e,i=e.program.getTypeChecker(),o=new Set;return b8(e,O8,((a,s)=>{const c=M8(t,s.code,s,r,n);if(!c)return;const l=e=>(e(a),[]);return L8(e,c,s.code,i,l,o)||j8(e,c,s.code,i,l,o)}))}});var $8="addMissingConst",q8=[va.Cannot_find_name_0.code,va.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code];function V8(e,t,n,r,i){const o=kX(t,n),a=mc(o,(e=>i_(e.parent)?e.parent.initializer===e:!function(e){switch(e.kind){case 80:case 209:case 210:case 303:case 304:return!0;default:return!1}}(e)&&"quit"));if(a)return U8(e,a,t,i);const s=o.parent;if(uP(s)&&64===s.operatorToken.kind&&NP(s.parent))return U8(e,o,t,i);if(WE(s)){const n=r.getTypeChecker();if(!x(s.elements,(e=>function(e,t){const n=qD(e)?e:mb(e,!0)&&qD(e.left)?e.left:void 0;return!!n&&!t.getSymbolAtLocation(n)}(e,n))))return;return U8(e,s,t,i)}const c=mc(o,(e=>!!NP(e.parent)||!function(e){switch(e.kind){case 80:case 226:case 28:return!0;default:return!1}}(e)&&"quit"));if(c){if(!K8(c,r.getTypeChecker()))return;return U8(e,c,t,i)}}function U8(e,t,n,r){r&&!W(r,t)||e.insertModifierBefore(n,87,t)}function K8(e,t){return!!uP(e)&&(28===e.operatorToken.kind?x([e.left,e.right],(e=>K8(e,t))):64===e.operatorToken.kind&&qD(e.left)&&!t.getSymbolAtLocation(e.left))}f8({errorCodes:q8,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>V8(t,e.sourceFile,e.span.start,e.program)));if(t.length>0)return[_8($8,t,va.Add_const_to_unresolved_variable,$8,va.Add_const_to_all_unresolved_variables)]},fixIds:[$8],getAllCodeActions:e=>{const t=new Set;return b8(e,q8,((n,r)=>V8(n,r.file,r.start,e.program,t)))}});var W8="addMissingDeclareProperty",H8=[va.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];function G8(e,t,n,r){const i=kX(t,n);if(!qD(i))return;const o=i.parent;172!==o.kind||r&&!W(r,o)||e.insertModifierBefore(t,138,o)}f8({errorCodes:H8,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>G8(t,e.sourceFile,e.span.start)));if(t.length>0)return[_8(W8,t,va.Prefix_with_declare,W8,va.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[W8],getAllCodeActions:e=>{const t=new Set;return b8(e,H8,((e,n)=>G8(e,n.file,n.start,t)))}});var X8="addMissingInvocationForDecorator",Q8=[va._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];function Y8(e,t,n){const r=mc(kX(t,n),cE);xn.assert(!!r,"Expected position to be owned by a decorator.");const i=YC.createCallExpression(r.expression,void 0,void 0);e.replaceNode(t,r.expression,i)}f8({errorCodes:Q8,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>Y8(t,e.sourceFile,e.span.start)));return[_8(X8,t,va.Call_decorator_expression,X8,va.Add_to_all_uncalled_decorators)]},fixIds:[X8],getAllCodeActions:e=>b8(e,Q8,((e,t)=>Y8(e,t.file,t.start)))});var Z8="addNameToNamelessParameter",e5=[va.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];function t5(e,t,n){const r=kX(t,n),i=r.parent;if(!sE(i))return xn.fail("Tried to add a parameter name to a non-parameter: "+xn.formatSyntaxKind(r.kind));const o=i.parent.parameters.indexOf(i);xn.assert(!i.type,"Tried to add a parameter name to a parameter that already had one."),xn.assert(o>-1,"Parameter not found in parent parameter list.");let a=i.name.getEnd(),s=YC.createTypeReferenceNode(i.name,void 0),c=n5(t,i);for(;c;)s=YC.createArrayTypeNode(s),a=c.getEnd(),c=n5(t,c);const l=YC.createParameterDeclaration(i.modifiers,i.dotDotDotToken,"arg"+o,i.questionToken,i.dotDotDotToken&&!wE(s)?YC.createArrayTypeNode(s):s,i.initializer);e.replaceRange(t,qb(i.getStart(t),a),l)}function n5(e,t){const n=DX(t.name,t.parent,e);if(n&&23===n.kind&&UE(n.parent)&&sE(n.parent.parent))return n.parent.parent}f8({errorCodes:e5,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>t5(t,e.sourceFile,e.span.start)));return[_8(Z8,t,va.Add_parameter_name,Z8,va.Add_names_to_all_parameters_without_names)]},fixIds:[Z8],getAllCodeActions:e=>b8(e,e5,((e,t)=>t5(e,t.file,t.start)))});var r5="addOptionalPropertyUndefined";function i5(e,t){var n;if(e){if(uP(e.parent)&&64===e.parent.operatorToken.kind)return{source:e.parent.right,target:e.parent.left};if(KP(e.parent)&&e.parent.initializer)return{source:e.parent.initializer,target:e.parent.name};if(QE(e.parent)){const n=t.getSymbolAtLocation(e.parent.expression);if(!(null==n?void 0:n.valueDeclaration)||!pu(n.valueDeclaration.kind))return;if(!Xu(e))return;const r=e.parent.arguments.indexOf(e);if(-1===r)return;const i=n.valueDeclaration.parameters[r].name;if(qD(i))return{source:e,target:i}}else if(BN(e.parent)&&qD(e.parent.name)||JN(e.parent)){const r=i5(e.parent.parent,t);if(!r)return;const i=t.getPropertyOfType(t.getTypeAtLocation(r.target),e.parent.name.text),o=null==(n=null==i?void 0:i.declarations)?void 0:n[0];if(!o)return;return{source:BN(e.parent)?e.parent.initializer:e.parent.name,target:o}}}}f8({errorCodes:[va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code,va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code],getCodeActions(e){const t=e.program.getTypeChecker(),n=function(e,t,n){var r,i;const o=i5(DZ(e,t),n);if(!o)return u;const{source:a,target:s}=o,c=function(e,t,n){return GE(t)&&!!n.getExactOptionalProperties(n.getTypeAtLocation(t.expression)).length&&n.getTypeAtLocation(e)===n.getUndefinedType()}(a,s,n)?n.getTypeAtLocation(s.expression):n.getTypeAtLocation(s);return(null==(i=null==(r=c.symbol)?void 0:r.declarations)?void 0:i.some((e=>Sd(e).fileName.match(/\.d\.ts$/))))?u:n.getExactOptionalProperties(c)}(e.sourceFile,e.span,t);if(!n.length)return;const r=r_e.ChangeTracker.with(e,(e=>function(e,t){for(const n of t){const t=n.valueDeclaration;if(t&&(lE(t)||uE(t))&&t.type){const n=YC.createUnionTypeNode([...192===t.type.kind?t.type.types:[t.type],YC.createTypeReferenceNode("undefined")]);e.replaceNode(t.getSourceFile(),t.type,n)}}}(e,n)));return[u8(r5,r,va.Add_undefined_to_optional_property_type)]},fixIds:[r5]});var o5="annotateWithTypeFromJSDoc",a5=[va.JSDoc_types_may_be_moved_to_TypeScript_types.code];function s5(e,t){const n=kX(e,t);return lt(sE(n.parent)?n.parent.parent:n.parent,c5)}function c5(e){return function(e){return uu(e)||260===e.kind||171===e.kind||172===e.kind}(e)&&l5(e)}function l5(e){return uu(e)?e.parameters.some(l5)||!e.type&&!!sl(e):!e.type&&!!al(e)}function u5(e,t,n){if(uu(n)&&(sl(n)||n.parameters.some((e=>!!al(e))))){if(!n.typeParameters){const r=wv(n);r.length&&e.insertTypeParameters(t,n,r)}const r=rP(n)&&!uX(n,21,t);r&&e.insertNodeBefore(t,Te(n.parameters),YC.createToken(21));for(const r of n.parameters)if(!r.type){const n=al(r);n&&e.tryInsertTypeAnnotation(t,r,qB(n,_5,wu))}if(r&&e.insertNodeAfter(t,De(n.parameters),YC.createToken(22)),!n.type){const r=sl(n);r&&e.tryInsertTypeAnnotation(t,n,qB(r,_5,wu))}}else{const r=xn.checkDefined(al(n),"A JSDocType for this declaration should exist");xn.assert(!n.type,"The JSDocType decl should have a type"),e.tryInsertTypeAnnotation(t,n,qB(r,_5,wu))}}function _5(e){switch(e.kind){case 312:case 313:return YC.createTypeReferenceNode("any",u);case 316:return function(e){return YC.createUnionTypeNode([qB(e.type,_5,wu),YC.createTypeReferenceNode("undefined",u)])}(e);case 315:return _5(e.type);case 314:return function(e){return YC.createUnionTypeNode([qB(e.type,_5,wu),YC.createTypeReferenceNode("null",u)])}(e);case 318:return function(e){return YC.createArrayTypeNode(qB(e.type,_5,wu))}(e);case 317:return function(e){return YC.createFunctionTypeNode(u,e.parameters.map(d5),e.type??YC.createKeywordTypeNode(133))}(e);case 183:return function(e){let t=e.typeName,n=e.typeArguments;if(qD(e.typeName)){if(Bm(e))return function(e){const t=YC.createParameterDeclaration(void 0,void 0,150===e.typeArguments[0].kind?"n":"s",void 0,YC.createTypeReferenceNode(150===e.typeArguments[0].kind?"number":"string",[]),void 0),n=YC.createTypeLiteralNode([YC.createIndexSignature(void 0,[t],e.typeArguments[1])]);return iw(n,1),n}(e);let r=e.typeName.text;switch(e.typeName.text){case"String":case"Boolean":case"Object":case"Number":r=r.toLowerCase();break;case"array":case"date":case"promise":r=r[0].toUpperCase()+r.slice(1)}t=YC.createIdentifier(r),n="Array"!==r&&"Promise"!==r||e.typeArguments?VB(e.typeArguments,_5,wu):YC.createNodeArray([YC.createTypeReferenceNode("any",u)])}return YC.createTypeReferenceNode(t,n)}(e);case 322:return function(e){const t=YC.createTypeLiteralNode(O(e.jsDocPropertyTags,(e=>YC.createPropertySignature(void 0,qD(e.name)?e.name:e.name.right,eC(e)?YC.createToken(58):void 0,e.typeExpression&&qB(e.typeExpression.type,_5,wu)||YC.createKeywordTypeNode(133)))));return iw(t,1),t}(e);default:const t=ZB(e,_5,void 0);return iw(t,1),t}}function d5(e){const t=e.parent.parameters.indexOf(e),n=318===e.type.kind&&t===e.parent.parameters.length-1,r=e.name||(n?"rest":"arg"+t),i=n?YC.createToken(26):e.dotDotDotToken;return YC.createParameterDeclaration(e.modifiers,i,r,e.questionToken,qB(e.type,_5,wu),e.initializer)}f8({errorCodes:a5,getCodeActions(e){const t=s5(e.sourceFile,e.span.start);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>u5(n,e.sourceFile,t)));return[_8(o5,n,va.Annotate_with_type_from_JSDoc,o5,va.Annotate_everything_with_types_from_JSDoc)]},fixIds:[o5],getAllCodeActions:e=>b8(e,a5,((e,t)=>{const n=s5(t.file,t.start);n&&u5(e,t.file,n)}))});var p5="convertFunctionToEs6Class",f5=[va.This_constructor_function_may_be_converted_to_a_class_declaration.code];function m5(e,t,n,r,i,o){const a=r.getSymbolAtLocation(kX(t,n));if(!(a&&a.valueDeclaration&&19&a.flags))return;const s=a.valueDeclaration;if(HP(s)||nP(s))e.replaceNode(t,s,function(e){const t=c(a);e.body&&t.unshift(YC.createConstructorDeclaration(void 0,e.parameters,e.body));const n=g5(e,95);return YC.createClassDeclaration(n,e.name,void 0,void 0,t)}(s));else if(KP(s)){const n=function(e){const t=e.initializer;if(!t||!nP(t)||!qD(e.name))return;const n=c(e.symbol);t.body&&n.unshift(YC.createConstructorDeclaration(void 0,t.parameters,t.body));const r=g5(e.parent.parent,95);return YC.createClassDeclaration(r,e.name,void 0,void 0,n)}(s);if(!n)return;const r=s.parent.parent;WP(s.parent)&&s.parent.declarations.length>1?(e.delete(t,s),e.insertNodeAfter(t,r,n)):e.replaceNode(t,r,n)}function c(n){const r=[];return n.exports&&n.exports.forEach((e=>{if("prototype"===e.name&&e.declarations){const t=e.declarations[0];1===e.declarations.length&&GE(t)&&uP(t.parent)&&64===t.parent.operatorToken.kind&&HE(t.parent.right)&&a(t.parent.right.symbol,void 0,r)}else a(e,[YC.createToken(126)],r)})),n.members&&n.members.forEach(((i,o)=>{var s,c,l,u;if("constructor"===o&&i.valueDeclaration){const r=null==(u=null==(l=null==(c=null==(s=n.exports)?void 0:s.get("prototype"))?void 0:c.declarations)?void 0:l[0])?void 0:u.parent;r&&uP(r)&&HE(r.right)&&Q(r.right.properties,h5)||e.delete(t,i.valueDeclaration.parent)}else a(i,void 0,r)})),r;function a(n,r,a){if(!(8192&n.flags||4096&n.flags))return;const s=n.valueDeclaration,c=s.parent,l=c.right;if(_=l,!(Ox(u=s)?GE(u)&&h5(u)||cu(_):x(u.properties,(e=>!!(dE(e)||yl(e)||BN(e)&&nP(e.initializer)&&e.name||h5(e))))))return;var u,_;if(Q(a,(e=>{const t=Pc(e);return!(!t||!qD(t)||bc(t)!==Sc(n))})))return;const d=c.parent&&244===c.parent.kind?c.parent:c;if(e.delete(t,d),l)if(Ox(s)&&(nP(l)||rP(l))){const e=AQ(t,i),n=function(e,t,n){if(GE(e))return e.name;const r=e.argumentExpression;return TD(r)?r:$_(r)?Ts(r.text,wS(t))?YC.createIdentifier(r.text):PD(r)?YC.createStringLiteral(r.text,0===n):r:void 0}(s,o,e);n&&p(a,l,n)}else{if(!HE(l)){if(Im(t))return;if(!GE(s))return;const e=YC.createPropertyDeclaration(r,s.name,void 0,void 0,l);return qY(c.parent,e,t),void a.push(e)}f(l.properties,(e=>{(dE(e)||yl(e))&&a.push(e),BN(e)&&nP(e.initializer)&&p(a,e.initializer,e.name),h5(e)}))}else a.push(YC.createPropertyDeclaration(r,n.name,void 0,void 0,void 0));function p(e,n,i){return nP(n)?function(e,n,i){const o=Z(r,g5(n,134)),a=YC.createMethodDeclaration(o,void 0,i,void 0,void 0,n.parameters,void 0,n.body);return qY(c,a,t),void e.push(a)}(e,n,i):function(e,n,i){const o=n.body;let a;a=241===o.kind?o:YC.createBlock([YC.createReturnStatement(o)]);const s=Z(r,g5(n,134)),l=YC.createMethodDeclaration(s,void 0,i,void 0,void 0,n.parameters,void 0,a);qY(c,l,t),e.push(l)}(e,n,i)}}}}function g5(e,t){return cI(e)?F(e.modifiers,(e=>e.kind===t)):void 0}function h5(e){return!!e.name&&!(!qD(e.name)||"constructor"!==e.name.text)}f8({errorCodes:f5,getCodeActions(e){const t=r_e.ChangeTracker.with(e,(t=>m5(t,e.sourceFile,e.span.start,e.program.getTypeChecker(),e.preferences,e.program.getCompilerOptions())));return[_8(p5,t,va.Convert_function_to_an_ES2015_class,p5,va.Convert_all_constructor_functions_to_classes)]},fixIds:[p5],getAllCodeActions:e=>b8(e,f5,((t,n)=>m5(t,n.file,n.start,e.program.getTypeChecker(),e.preferences,e.program.getCompilerOptions())))});var y5="convertToAsyncFunction",v5=[va.This_may_be_converted_to_an_async_function.code],b5=!0;function x5(e,t,n,r){const i=kX(t,n);let o;if(o=qD(i)&&KP(i.parent)&&i.parent.initializer&&uu(i.parent.initializer)?i.parent.initializer:lt(Qf(kX(t,n)),k1),!o)return;const a=new Map,s=Mm(o),c=function(e,t){if(!e.body)return new Set;const n=new Set;return LI(e.body,(function e(r){S5(r,t,"then")?(n.add(IB(r)),f(r.arguments,e)):S5(r,t,"catch")||S5(r,t,"finally")?(n.add(IB(r)),LI(r,e)):C5(r,t)?n.add(IB(r)):LI(r,e)})),n}(o,r),l=function(e,t,n){const r=new Map,i=et();return LI(e,(function e(o){if(!qD(o))return void LI(o,e);const a=t.getSymbolAtLocation(o);if(a){const e=R5(t.getTypeAtLocation(o),t),s=OB(a).toString();if(!e||sE(o.parent)||uu(o.parent)||n.has(s)){if(o.parent&&(sE(o.parent)||KP(o.parent)||KE(o.parent))){const e=o.text,t=i.get(e);if(t&&t.some((e=>e!==a))){const t=w5(o,i);r.set(s,t.identifier),n.set(s,t),i.add(e,a)}else{const t=NY(o);n.set(s,$5(t)),i.add(e,a)}}}else{const t=Se(e.parameters),r=(null==t?void 0:t.valueDeclaration)&&sE(t.valueDeclaration)&<(t.valueDeclaration.name,qD)||YC.createUniqueName("result",16),o=w5(r,i);n.set(s,o),i.add(r.text,a)}}})),FY(e,!0,(e=>{if(KE(e)&&qD(e.name)&&VE(e.parent)){const n=t.getSymbolAtLocation(e.name),i=n&&r.get(String(OB(n)));if(i&&i.text!==(e.name||e.propertyName).getText())return YC.createBindingElement(e.dotDotDotToken,e.propertyName||e.name,i,e.initializer)}else if(qD(e)){const n=t.getSymbolAtLocation(e),i=n&&r.get(String(OB(n)));if(i)return YC.createIdentifier(i.text)}}))}(o,r,a);if(!g1(l,r))return;const _=l.body&&DP(l.body)?function(e,t){const n=[];return Pf(e,(e=>{h1(e,t)&&n.push(e)})),n}(l.body,r):u,d={checker:r,synthNamesMap:a,setOfExpressionsToReturn:c,isInJSFile:s};if(!_.length)return;const p=as(t.text,Wb(o).pos);e.insertModifierAt(t,p,134,{suffix:" "});for(const n of _)if(LI(n,(function r(i){if(QE(i)){const r=P5(i,i,d,!1);if(D5())return!0;e.replaceNodeWithNodes(t,n,r)}else if(!cu(i)&&(LI(i,r),D5()))return!0})),D5())return}function S5(e,t,n){if(!QE(e))return!1;const r=IG(e,n)&&t.getTypeAtLocation(e);return!(!r||!t.getPromisedTypeOfPromise(r))}function k5(e,t){return 0!=(4&wx(e))&&e.target===t}function T5(e,t,n){if("finally"===e.expression.name.escapedText)return;const r=n.getTypeAtLocation(e.expression.expression);if(k5(r,n.getPromiseType())||k5(r,n.getPromiseLikeType())){if("then"!==e.expression.name.escapedText)return xe(e.typeArguments,0);if(t===xe(e.arguments,0))return xe(e.typeArguments,0);if(t===xe(e.arguments,1))return xe(e.typeArguments,1)}}function C5(e,t){return!!Xu(e)&&!!t.getPromisedTypeOfPromise(t.getTypeAtLocation(e))}function w5(e,t){const n=(t.get(e.text)||u).length;return $5(0===n?e:YC.createIdentifier(e.text+"_"+n))}function D5(){return!b5}function E5(){return b5=!1,u}function P5(e,t,n,r,i){if(S5(t,n.checker,"then"))return function(e,t,n,r,i,o){if(!t||N5(r,t))return I5(e,n,r,i,o);if(n&&!N5(r,n))return E5();const a=J5(t,r),s=P5(e.expression.expression,e.expression.expression,r,!0,a);if(D5())return E5();const c=L5(t,i,o,a,e,r);return D5()?E5():Z(s,c)}(t,xe(t.arguments,0),xe(t.arguments,1),n,r,i);if(S5(t,n.checker,"catch"))return I5(t,xe(t.arguments,0),n,r,i);if(S5(t,n.checker,"finally"))return function(e,t,n,r,i){if(!t||N5(n,t))return P5(e,e.expression.expression,n,r,i);const o=F5(e,n,i),a=P5(e,e.expression.expression,n,!0,o);if(D5())return E5();const s=L5(t,r,void 0,void 0,e,n);if(D5())return E5();const c=YC.createBlock(a),l=YC.createBlock(s);return A5(e,n,YC.createTryStatement(c,void 0,l),o,i)}(t,xe(t.arguments,0),n,r,i);if(GE(t))return P5(e,t.expression,n,r,i);const o=n.checker.getTypeAtLocation(t);return o&&n.checker.getPromisedTypeOfPromise(o)?(xn.assertNode(fc(t).parent,GE),function(e,t,n,r,i){if(H5(e,n)){let e=NY(t);return r&&(e=YC.createAwaitExpression(e)),[YC.createReturnStatement(e)]}return O5(i,YC.createAwaitExpression(t),void 0)}(e,t,n,r,i)):E5()}function N5({checker:e},t){if(106===t.kind)return!0;if(qD(t)&&!Xl(t)&&"undefined"===bc(t)){const n=e.getSymbolAtLocation(t);return!n||e.isUndefinedSymbol(n)}return!1}function F5(e,t,n){let r;return n&&!H5(e,t)&&(W5(n)?(r=n,t.synthNamesMap.forEach(((e,r)=>{if(e.identifier.text===n.identifier.text){const e=(i=n,$5(YC.createUniqueName(i.identifier.text,16)));t.synthNamesMap.set(r,e)}var i}))):r=$5(YC.createUniqueName("result",16),n.types),K5(r)),r}function A5(e,t,n,r,i){const o=[];let a;if(r&&!H5(e,t)){a=NY(K5(r));const e=r.types,n=t.checker.getUnionType(e,2),i=t.isInJSFile?void 0:t.checker.typeToTypeNode(n,void 0,void 0),s=[YC.createVariableDeclaration(a,void 0,i)],c=YC.createVariableStatement(void 0,YC.createVariableDeclarationList(s,1));o.push(c)}return o.push(n),i&&a&&1===i.kind&&o.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(NY(U5(i)),void 0,void 0,a)],2))),o}function I5(e,t,n,r,i){if(!t||N5(n,t))return P5(e,e.expression.expression,n,r,i);const o=J5(t,n),a=F5(e,n,i),s=P5(e,e.expression.expression,n,!0,a);if(D5())return E5();const c=L5(t,r,a,o,e,n);if(D5())return E5();const l=YC.createBlock(s),u=YC.createCatchClause(o&&NY(V5(o)),YC.createBlock(c));return A5(e,n,YC.createTryStatement(l,u,void 0),a,i)}function O5(e,t,n){return!e||z5(e)?[YC.createExpressionStatement(t)]:W5(e)&&e.hasBeenDeclared?[YC.createExpressionStatement(YC.createAssignment(NY(q5(e)),t))]:[YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(NY(V5(e)),void 0,n,t)],2))]}function M5(e,t){if(t&&e){const n=YC.createUniqueName("result",16);return[...O5($5(n),e,t),YC.createReturnStatement(n)]}return[YC.createReturnStatement(e)]}function L5(e,t,n,r,i,o){var a;switch(e.kind){case 106:break;case 211:case 80:if(!r)break;const s=YC.createCallExpression(NY(e),void 0,W5(r)?[q5(r)]:[]);if(H5(i,o))return M5(s,T5(i,e,o.checker));const c=o.checker.getTypeAtLocation(e),l=o.checker.getSignaturesOfType(c,0);if(!l.length)return E5();const _=l[0].getReturnType(),d=O5(n,YC.createAwaitExpression(s),T5(i,e,o.checker));return n&&n.types.push(o.checker.getAwaitedType(_)||_),d;case 218:case 219:{const r=e.body,s=null==(a=R5(o.checker.getTypeAtLocation(e),o.checker))?void 0:a.getReturnType();if(DP(r)){let a=[],c=!1;for(const l of r.statements)if(BP(l))if(c=!0,h1(l,o.checker))a=a.concat(B5(o,l,t,n));else{const t=s&&l.expression?j5(o.checker,s,l.expression):l.expression;a.push(...M5(t,T5(i,e,o.checker)))}else{if(t&&Pf(l,pt))return E5();a.push(l)}return H5(i,o)?a.map((e=>NY(e))):function(e,t,n,r){const i=[];for(const r of e)if(BP(r)){if(r.expression){const e=C5(r.expression,n.checker)?YC.createAwaitExpression(r.expression):r.expression;void 0===t?i.push(YC.createExpressionStatement(e)):W5(t)&&t.hasBeenDeclared?i.push(YC.createExpressionStatement(YC.createAssignment(q5(t),e))):i.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(V5(t),void 0,void 0,e)],2)))}}else i.push(NY(r));return r||void 0===t||i.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(V5(t),void 0,void 0,YC.createIdentifier("undefined"))],2))),i}(a,n,o,c)}{const a=y1(r,o.checker)?B5(o,YC.createReturnStatement(r),t,n):u;if(a.length>0)return a;if(s){const t=j5(o.checker,s,r);if(H5(i,o))return M5(t,T5(i,e,o.checker));{const e=O5(n,t,void 0);return n&&n.types.push(o.checker.getAwaitedType(s)||s),e}}return E5()}}default:return E5()}return u}function j5(e,t,n){const r=NY(n);return e.getPromisedTypeOfPromise(t)?YC.createAwaitExpression(r):r}function R5(e,t){return we(t.getSignaturesOfType(e,0))}function B5(e,t,n,r){let i=[];return LI(t,(function t(o){if(QE(o)){const t=P5(o,o,e,n,r);if(i=i.concat(t),i.length>0)return}else cu(o)||LI(o,t)})),i}function J5(e,t){const n=[];let r;if(uu(e)?e.parameters.length>0&&(r=function e(t){if(qD(t))return i(t);return function(e,t=u,n=[]){return{kind:1,bindingPattern:e,elements:t,types:n}}(t,R(t.elements,(t=>gP(t)?[]:[e(t.name)])))}(e.parameters[0].name)):qD(e)?r=i(e):GE(e)&&qD(e.name)&&(r=i(e.name)),r&&(!("identifier"in r)||"undefined"!==r.identifier.text))return r;function i(e){var r;const i=function(e){var n;return(null==(n=lt(e,p_))?void 0:n.symbol)??t.checker.getSymbolAtLocation(e)}((r=e).original?r.original:r);return i&&t.synthNamesMap.get(OB(i).toString())||$5(e,n)}}function z5(e){return!e||(W5(e)?!e.identifier.text:x(e.elements,z5))}function $5(e,t=[]){return{kind:0,identifier:e,types:t,hasBeenDeclared:!1,hasBeenReferenced:!1}}function q5(e){return e.hasBeenReferenced=!0,e.identifier}function V5(e){return W5(e)?K5(e):U5(e)}function U5(e){for(const t of e.elements)V5(t);return e.bindingPattern}function K5(e){return e.hasBeenDeclared=!0,e.identifier}function W5(e){return 0===e.kind}function H5(e,t){return!!e.original&&t.setOfExpressionsToReturn.has(IB(e.original))}function G5(e,t,n,r,i){var o;for(const a of e.imports){const s=null==(o=n.getResolvedModuleFromModuleSpecifier(a,e))?void 0:o.resolvedModule;if(!s||s.resolvedFileName!==t.fileName)continue;const c=kg(a);switch(c.kind){case 271:r.replaceNode(e,c,EQ(c.name,void 0,a,i));break;case 213:Jm(c,!1)&&r.replaceNode(e,c,YC.createPropertyAccessExpression(NY(c),"default"))}}}function X5(e,t){e.forEachChild((function n(r){if(GE(r)&&LR(e,r.expression)&&qD(r.name)){const{parent:e}=r;t(r,uP(e)&&e.left===r&&64===e.operatorToken.kind)}r.forEachChild(n)}))}function Q5(e,t,n,r,i,o,a,s,c){switch(t.kind){case 243:return Y5(e,t,r,n,i,o,c),!1;case 244:{const{expression:i}=t;switch(i.kind){case 213:return Jm(i,!0)&&r.replaceNode(e,t,EQ(void 0,void 0,i.arguments[0],c)),!1;case 226:{const{operatorToken:t}=i;return 64===t.kind&&function(e,t,n,r,i,o){const{left:a,right:s}=n;if(!GE(a))return!1;if(LR(e,a)){if(!LR(e,s)){const i=HE(s)?function(e,t){const n=$(e.properties,(e=>{switch(e.kind){case 177:case 178:case 304:case 305:return;case 303:return qD(e.name)?function(e,t,n){const r=[YC.createToken(95)];switch(t.kind){case 218:{const{name:n}=t;if(n&&n.text!==e)return i()}case 219:return o9(e,r,t,n);case 231:return function(e,t,n,r){return YC.createClassDeclaration(Z(t,IY(n.modifiers)),e,IY(n.typeParameters),IY(n.heritageClauses),t9(n.members,r))}(e,r,t,n);default:return i()}function i(){return c9(r,YC.createIdentifier(e),t9(t,n))}}(e.name.text,e.initializer,t):void 0;case 174:return qD(e.name)?o9(e.name.text,[YC.createToken(95)],e,t):void 0;default:xn.assertNever(e,`Convert to ES6 got invalid prop kind ${e.kind}`)}}));return n&&[n,!1]}(s,o):Jm(s,!0)?function(e,t){const n=e.text,r=t.getSymbolAtLocation(e),i=r?r.exports:_;return i.has("export=")?[[e9(n)],!0]:i.has("default")?i.size>1?[[Z5(n),e9(n)],!0]:[[e9(n)],!0]:[[Z5(n)],!1]}(s.arguments[0],t):void 0;return i?(r.replaceNodeWithNodes(e,n.parent,i[0]),i[1]):(r.replaceRangeWithText(e,qb(a.getStart(e),s.pos),"export default"),!0)}r.delete(e,n.parent)}else LR(e,a.expression)&&function(e,t,n,r){const{text:i}=t.left.name,o=r.get(i);if(void 0!==o){const r=[c9(void 0,o,t.right),l9([YC.createExportSpecifier(!1,o,i)])];n.replaceNodeWithNodes(e,t.parent,r)}else!function({left:e,right:t,parent:n},r,i){const o=e.name.text;if(!(nP(t)||rP(t)||mP(t))||t.name&&t.name.text!==o)i.replaceNodeRangeWithNodes(r,e.expression,uX(e,25,r),[YC.createToken(95),YC.createToken(87)],{joiner:" ",suffix:" "});else{i.replaceRange(r,{pos:e.getStart(r),end:t.getStart(r)},YC.createToken(95),{suffix:" "}),t.name||i.insertName(r,t,o);const a=uX(n,27,r);a&&i.delete(r,a)}}(t,e,n)}(e,n,r,i);return!1}(e,n,i,r,a,s)}}}default:return!1}}function Y5(e,t,n,r,i,o,a){const{declarationList:s}=t;let c=!1;const l=O(s.declarations,(t=>{const{name:n,initializer:l}=t;if(l){if(LR(e,l))return c=!0,u9([]);if(Jm(l,!0))return c=!0,function(e,t,n,r,i,o){switch(e.kind){case 206:{const n=$(e.elements,(e=>e.dotDotDotToken||e.initializer||e.propertyName&&!qD(e.propertyName)||!qD(e.name)?void 0:s9(e.propertyName&&e.propertyName.text,e.name.text)));if(n)return u9([EQ(void 0,n,t,o)])}case 207:{const n=n9(LZ(t.text,i),r);return u9([EQ(YC.createIdentifier(n),void 0,t,o),c9(void 0,NY(e),YC.createIdentifier(n))])}case 80:return function(e,t,n,r,i){const o=n.getSymbolAtLocation(e),a=new Map;let s,c=!1;for(const t of r.original.get(e.text)){if(n.getSymbolAtLocation(t)!==o||t===e)continue;const{parent:i}=t;if(GE(i)){const{name:{text:e}}=i;if("default"===e){c=!0;const e=t.getText();(s??(s=new Map)).set(i,YC.createIdentifier(e))}else{xn.assert(i.expression===t,"Didn't expect expression === use");let n=a.get(e);void 0===n&&(n=n9(e,r),a.set(e,n)),(s??(s=new Map)).set(i,YC.createIdentifier(n))}}else c=!0}const l=0===a.size?void 0:$e(M(a.entries(),(([e,t])=>YC.createImportSpecifier(!1,e===t?void 0:YC.createIdentifier(e),YC.createIdentifier(t)))));return l||(c=!0),u9([EQ(c?NY(e):void 0,l,t,i)],s)}(e,t,n,r,o);default:return xn.assertNever(e,`Convert to ES module got invalid name kind ${e.kind}`)}}(n,l.arguments[0],r,i,o,a);if(GE(l)&&Jm(l.expression,!0))return c=!0,function(e,t,n,r,i){switch(e.kind){case 206:case 207:{const o=n9(t,r);return u9([a9(o,t,n,i),c9(void 0,e,YC.createIdentifier(o))])}case 80:return u9([a9(e.text,t,n,i)]);default:return xn.assertNever(e,`Convert to ES module got invalid syntax form ${e.kind}`)}}(n,l.name.text,l.expression.arguments[0],i,a)}return u9([YC.createVariableStatement(void 0,YC.createVariableDeclarationList([t],s.flags))])}));if(c){let r;return n.replaceNodeWithNodes(e,t,R(l,(e=>e.newImports))),f(l,(e=>{e.useSitesToUnqualify&&_d(e.useSitesToUnqualify,r??(r=new Map))})),r}}function Z5(e){return l9(void 0,e)}function e9(e){return l9([YC.createExportSpecifier(!1,void 0,"default")],e)}function t9(e,t){return t&&Q($e(t.keys()),(t=>XG(e,t)))?ot(e)?OY(e,!0,n):FY(e,!0,n):e;function n(e){if(211===e.kind){const n=t.get(e);return t.delete(e),n}}}function n9(e,t){for(;t.original.has(e)||t.additional.has(e);)e=`_${e}`;return t.additional.add(e),e}function r9(e){const t=et();return i9(e,(e=>t.add(e.text,e))),t}function i9(e,t){qD(e)&&function(e){const{parent:t}=e;switch(t.kind){case 211:return t.name!==e;case 208:case 276:return t.propertyName!==e;default:return!0}}(e)&&t(e),e.forEachChild((e=>i9(e,t)))}function o9(e,t,n,r){return YC.createFunctionDeclaration(Z(t,IY(n.modifiers)),NY(n.asteriskToken),e,IY(n.typeParameters),IY(n.parameters),NY(n.type),YC.converters.convertToFunctionBlock(t9(n.body,r)))}function a9(e,t,n,r){return"default"===t?EQ(YC.createIdentifier(e),void 0,n,r):EQ(void 0,[s9(t,e)],n,r)}function s9(e,t){return YC.createImportSpecifier(!1,void 0!==e&&e!==t?YC.createIdentifier(e):void 0,YC.createIdentifier(t))}function c9(e,t,n){return YC.createVariableStatement(e,YC.createVariableDeclarationList([YC.createVariableDeclaration(t,void 0,void 0,n)],2))}function l9(e,t){return YC.createExportDeclaration(void 0,!1,e&&YC.createNamedExports(e),void 0===t?void 0:YC.createStringLiteral(t))}function u9(e,t){return{newImports:e,useSitesToUnqualify:t}}f8({errorCodes:v5,getCodeActions(e){b5=!0;const t=r_e.ChangeTracker.with(e,(t=>x5(t,e.sourceFile,e.span.start,e.program.getTypeChecker())));return b5?[_8(y5,t,va.Convert_to_async_function,y5,va.Convert_all_to_async_functions)]:[]},fixIds:[y5],getAllCodeActions:e=>b8(e,v5,((t,n)=>x5(t,n.file,n.start,e.program.getTypeChecker())))}),f8({errorCodes:[va.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],getCodeActions(e){const{sourceFile:t,program:n,preferences:r}=e;return[u8("convertToEsModule",r_e.ChangeTracker.with(e,(e=>{const i=function(e,t,n,r,i){const o={original:r9(e),additional:new Set},a=function(e,t,n){const r=new Map;return X5(e,(e=>{const{text:i}=e.name;r.has(i)||!jh(e.name)&&!t.resolveName(i,e,111551,!0)||r.set(i,n9(`_${i}`,n))})),r}(e,t,o);!function(e,t,n){X5(e,((r,i)=>{if(i)return;const{text:o}=r.name;n.replaceNode(e,r,YC.createIdentifier(t.get(o)||o))}))}(e,a,n);let s,c=!1;for(const a of F(e.statements,EP)){const c=Y5(e,a,n,t,o,r,i);c&&_d(c,s??(s=new Map))}for(const l of F(e.statements,(e=>!EP(e)))){const u=Q5(e,l,t,n,o,r,a,s,i);c=c||u}return null==s||s.forEach(((t,r)=>{n.replaceNode(e,r,t)})),c}(t,n.getTypeChecker(),e,wS(n.getCompilerOptions()),AQ(t,r));if(i)for(const i of n.getSourceFiles())G5(i,t,n,e,AQ(i,r))})),va.Convert_to_ES_module)]}});var _9="correctQualifiedNameToIndexedAccessType",d9=[va.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];function p9(e,t){const n=mc(kX(e,t),iE);return xn.assert(!!n,"Expected position to be owned by a qualified name."),qD(n.left)?n:void 0}function f9(e,t,n){const r=n.right.text,i=YC.createIndexedAccessTypeNode(YC.createTypeReferenceNode(n.left,void 0),YC.createLiteralTypeNode(YC.createStringLiteral(r)));e.replaceNode(t,n,i)}f8({errorCodes:d9,getCodeActions(e){const t=p9(e.sourceFile,e.span.start);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>f9(n,e.sourceFile,t))),r=`${t.left.text}["${t.right.text}"]`;return[_8(_9,n,[va.Rewrite_as_the_indexed_access_type_0,r],_9,va.Rewrite_all_as_indexed_access_types)]},fixIds:[_9],getAllCodeActions:e=>b8(e,d9,((e,t)=>{const n=p9(t.file,t.start);n&&f9(e,t.file,n)}))});var m9=[va.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code],g9="convertToTypeOnlyExport";function h9(e,t){return lt(kX(t,e.start).parent,yN)}function y9(e,t,n){if(!t)return;const r=t.parent,i=r.parent,o=function(e,t){const n=e.parent;if(1===n.elements.length)return n.elements;const r=CZ(aQ(n),t.program.getSemanticDiagnostics(t.sourceFile,t.cancellationToken));return F(n.elements,(t=>{var n;return t===e||(null==(n=TZ(t,r))?void 0:n.code)===m9[0]}))}(t,n);if(o.length===r.elements.length)e.insertModifierBefore(n.sourceFile,156,r);else{const t=YC.updateExportDeclaration(i,i.modifiers,!1,YC.updateNamedExports(r,F(r.elements,(e=>!D(o,e)))),i.moduleSpecifier,void 0),a=YC.createExportDeclaration(void 0,!0,YC.createNamedExports(o),i.moduleSpecifier,void 0);e.replaceNode(n.sourceFile,i,t,{leadingTriviaOption:r_e.LeadingTriviaOption.IncludeAll,trailingTriviaOption:r_e.TrailingTriviaOption.Exclude}),e.insertNodeAfter(n.sourceFile,i,a)}}f8({errorCodes:m9,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>y9(t,h9(e.span,e.sourceFile),e)));if(t.length)return[_8(g9,t,va.Convert_to_type_only_export,g9,va.Convert_all_re_exported_types_to_type_only_exports)]},fixIds:[g9],getAllCodeActions:function(e){const t=new Map;return b8(e,m9,((n,r)=>{const i=h9(r,e.sourceFile);i&&Fx(t,IB(i.parent.parent))&&y9(n,i,e)}))}});var v9=[va._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,va._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code],b9="convertToTypeOnlyImport";function x9(e,t){const{parent:n}=kX(e,t);return fN(n)||iN(n)&&n.importClause?n:void 0}function S9(e,t,n){if(e.parent.parent.name)return!1;const r=e.parent.elements.filter((e=>!e.isTypeOnly));if(1===r.length)return!0;const i=n.getTypeChecker();for(const e of r)if(Rse.Core.eachSymbolReferenceInFile(e.name,i,t,(e=>{const t=i.getSymbolAtLocation(e);return!!t&&i.symbolIsValue(t)||!wT(e)})))return!1;return!0}function k9(e,t,n){var r;if(fN(n))e.replaceNode(t,n,YC.updateImportSpecifier(n,!0,n.propertyName,n.name));else{const i=n.importClause;if(i.name&&i.namedBindings)e.replaceNodeWithNodes(t,n,[YC.createImportDeclaration(IY(n.modifiers,!0),YC.createImportClause(!0,NY(i.name,!0),void 0),NY(n.moduleSpecifier,!0),NY(n.attributes,!0)),YC.createImportDeclaration(IY(n.modifiers,!0),YC.createImportClause(!0,void 0,NY(i.namedBindings,!0)),NY(n.moduleSpecifier,!0),NY(n.attributes,!0))]);else{const o=275===(null==(r=i.namedBindings)?void 0:r.kind)?YC.updateNamedImports(i.namedBindings,L(i.namedBindings.elements,(e=>YC.updateImportSpecifier(e,!1,e.propertyName,e.name)))):i.namedBindings,a=YC.updateImportDeclaration(n,n.modifiers,YC.updateImportClause(i,!0,i.name,o),n.moduleSpecifier,n.attributes);e.replaceNode(t,n,a)}}}f8({errorCodes:v9,getCodeActions:function(e){var t;const n=x9(e.sourceFile,e.span.start);if(n){const r=r_e.ChangeTracker.with(e,(t=>k9(t,e.sourceFile,n))),i=276===n.kind&&iN(n.parent.parent.parent)&&S9(n,e.sourceFile,e.program)?r_e.ChangeTracker.with(e,(t=>k9(t,e.sourceFile,n.parent.parent.parent))):void 0,o=_8(b9,r,276===n.kind?[va.Use_type_0,(null==(t=n.propertyName)?void 0:t.text)??n.name.text]:va.Use_import_type,b9,va.Fix_all_with_type_only_imports);return Q(i)?[u8(b9,i,va.Use_import_type),o]:[o]}},fixIds:[b9],getAllCodeActions:function(e){const t=new Set;return b8(e,v9,((n,r)=>{const i=x9(r.file,r.start);272!==(null==i?void 0:i.kind)||t.has(i)?276===(null==i?void 0:i.kind)&&iN(i.parent.parent.parent)&&!t.has(i.parent.parent.parent)&&S9(i,r.file,e.program)?(k9(n,r.file,i.parent.parent.parent),t.add(i.parent.parent.parent)):276===(null==i?void 0:i.kind)&&k9(n,r.file,i):(k9(n,r.file,i),t.add(i))}))}});var T9="convertTypedefToType",C9=[va.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];function w9(e,t,n,r,i=!1){if(!wF(t))return;const o=function(e){var t;const{typeExpression:n}=e;if(!n)return;const r=null==(t=e.name)?void 0:t.getText();return r?322===n.kind?function(e,t){const n=E9(t);if(Q(n))return YC.createInterfaceDeclaration(void 0,e,void 0,void 0,n)}(r,n):309===n.kind?function(e,t){const n=NY(t.type);if(n)return YC.createTypeAliasDeclaration(void 0,YC.createIdentifier(e),void 0,n)}(r,n):void 0:void 0}(t);if(!o)return;const a=t.parent,{leftSibling:s,rightSibling:c}=function(e){const t=e.parent,n=t.getChildCount()-1,r=t.getChildren().findIndex((t=>t.getStart()===e.getStart()&&t.getEnd()===e.getEnd()));return{leftSibling:r>0?t.getChildAt(r-1):void 0,rightSibling:r0;e--)if(!/[*/\s]/g.test(r.substring(e-1,e)))return t+e;return n}function E9(e){const t=e.jsDocPropertyTags;if(Q(t))return q(t,(e=>{var t;const n=function(e){return 80===e.name.kind?e.name.text:e.name.right.text}(e),r=null==(t=e.typeExpression)?void 0:t.type,i=e.isBracketed;let o;if(r&&aF(r)){const e=E9(r);o=YC.createTypeLiteralNode(e)}else r&&(o=NY(r));if(o&&n){const e=i?YC.createToken(58):void 0;return YC.createPropertySignature(void 0,n,e,o)}}))}function P9(e){return O_(e)?R(e.jsDoc,(e=>{var t;return null==(t=e.tags)?void 0:t.filter((e=>wF(e)))})):[]}f8({fixIds:[T9],errorCodes:C9,getCodeActions(e){const t=gY(e.host,e.formatContext.options),n=kX(e.sourceFile,e.span.start);if(!n)return;const r=r_e.ChangeTracker.with(e,(r=>w9(r,n,e.sourceFile,t)));return r.length>0?[_8(T9,r,va.Convert_typedef_to_TypeScript_type,T9,va.Convert_all_typedef_to_TypeScript_types)]:void 0},getAllCodeActions:e=>b8(e,C9,((t,n)=>{const r=gY(e.host,e.formatContext.options),i=kX(n.file,n.start);i&&w9(t,i,n.file,r,!0)}))});var N9="convertLiteralTypeToMappedType",F9=[va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];function A9(e,t){const n=kX(e,t);if(qD(n)){const t=ut(n.parent.parent,lE),r=n.getText(e);return{container:ut(t.parent,CE),typeNode:t.type,constraint:r,name:"K"===r?"P":"K"}}}function I9(e,t,{container:n,typeNode:r,constraint:i,name:o}){e.replaceNode(t,n,YC.createMappedTypeNode(void 0,YC.createTypeParameterDeclaration(void 0,o,YC.createTypeReferenceNode(i)),void 0,void 0,r,void 0))}f8({errorCodes:F9,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=A9(t,n.start);if(!r)return;const{name:i,constraint:o}=r,a=r_e.ChangeTracker.with(e,(e=>I9(e,t,r)));return[_8(N9,a,[va.Convert_0_to_1_in_0,o,i],N9,va.Convert_all_type_literals_to_mapped_type)]},fixIds:[N9],getAllCodeActions:e=>b8(e,F9,((e,t)=>{const n=A9(t.file,t.start);n&&I9(e,t.file,n)}))});var O9=[va.Class_0_incorrectly_implements_interface_1.code,va.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code],M9="fixClassIncorrectlyImplementsInterface";function L9(e,t){return xn.checkDefined(Zf(kX(e,t)),"There should be a containing class")}function j9(e){return!(e.valueDeclaration&&2&Qv(e.valueDeclaration))}function R9(e,t,n,r,i,o){const a=e.program.getTypeChecker(),s=function(e,t){const n=Sh(e);if(!n)return ed();const r=t.getTypeAtLocation(n);return ed(t.getPropertiesOfType(r).filter(j9))}(r,a),c=a.getTypeAtLocation(t),l=a.getPropertiesOfType(c).filter(un(j9,(e=>!s.has(e.escapedName)))),u=a.getTypeAtLocation(r),_=S(r.members,(e=>fE(e)));u.getNumberIndexType()||p(c,1),u.getStringIndexType()||p(c,0);const d=$9(n,e.program,o,e.host);function p(t,i){const o=a.getIndexInfoOfType(t,i);o&&f(n,r,a.indexInfoToIndexSignatureDeclaration(o,r,void 0,cie(e)))}function f(e,t,n){_?i.insertNodeAfter(e,_,n):i.insertMemberAtStart(e,t,n)}sie(r,l,n,e,o,d,(e=>f(n,r,e))),d.writeFixes(i)}f8({errorCodes:O9,getCodeActions(e){const{sourceFile:t,span:n}=e,r=L9(t,n.start);return q(Th(r),(n=>{const i=r_e.ChangeTracker.with(e,(i=>R9(e,n,t,r,i,e.preferences)));return 0===i.length?void 0:_8(M9,i,[va.Implement_interface_0,n.getText(t)],M9,va.Implement_all_unimplemented_interfaces)}))},fixIds:[M9],getAllCodeActions(e){const t=new Map;return b8(e,O9,((n,r)=>{const i=L9(r.file,r.start);if(Fx(t,IB(i)))for(const t of Th(i))R9(e,t,r.file,i,n,e.preferences)}))}});var B9="import",J9="fixMissingImport",z9=[va.Cannot_find_name_0.code,va.Cannot_find_name_0_Did_you_mean_1.code,va.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,va.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,va.Cannot_find_namespace_0.code,va._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,va._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,va.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,va._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,va.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,va.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,va.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,va.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,va.Cannot_find_namespace_0_Did_you_mean_1.code];function $9(e,t,n,r,i){return q9(e,t,!1,n,r,i)}function q9(e,t,n,r,i,o){const a=t.getCompilerOptions(),s=[],c=[],l=new Map,u=new Set,_=new Set,d=new Map;return{addImportFromDiagnostic:function(e,t){const r=nee(t,e.code,e.start,n);r&&r.length&&p(Te(r))},addImportFromExportedSymbol:function(n,s,c){var l;const u=xn.checkDefined(n.parent),_=FZ(n,wS(a)),d=t.getTypeChecker(),f=d.getMergedSymbol(mx(n,d)),m=G9(e,f,_,u,!1,t,i,r,o),g=eee(e,t);let h=W9(e,xn.checkDefined(m),t,void 0,!!s,g,i,r);if(h){const e=(null==(l=lt(null==c?void 0:c.name,qD))?void 0:l.text)??_;c&&Ul(c)&&(3===h.kind||2===h.kind)&&1===h.addAsTypeOnly&&(h={...h,addAsTypeOnly:2}),p({fix:h,symbolName:e??_,errorIdentifierText:void 0})}},writeFixes:function(t,n){var i,o;let p,f,m;p=Am(e)&&0===e.imports.length&&void 0!==n?n:AQ(e,r);for(const n of s)fee(t,e,n);for(const n of c)mee(t,e,n,p);if(u.size){xn.assert(Am(e),"Cannot remove imports from a future source file");const n=new Set(q([...u],(e=>mc(e,iN)))),r=new Set(q([...u],(e=>mc(e,zm)))),a=[...n].filter((e=>{var t,n,r;return!l.has(e.importClause)&&(!(null==(t=e.importClause)?void 0:t.name)||u.has(e.importClause))&&(!lt(null==(n=e.importClause)?void 0:n.namedBindings,_N)||u.has(e.importClause.namedBindings))&&(!lt(null==(r=e.importClause)?void 0:r.namedBindings,pN)||x(e.importClause.namedBindings.elements,(e=>u.has(e))))})),s=[...r].filter((e=>(206!==e.name.kind||!l.has(e.name))&&(206!==e.name.kind||x(e.name.elements,(e=>u.has(e)))))),c=[...n].filter((e=>{var t,n;return(null==(t=e.importClause)?void 0:t.namedBindings)&&-1===a.indexOf(e)&&!(null==(n=l.get(e.importClause))?void 0:n.namedImports)&&(274===e.importClause.namedBindings.kind||x(e.importClause.namedBindings.elements,(e=>u.has(e))))}));for(const n of[...a,...s])t.delete(e,n);for(const n of c)t.replaceNode(e,n.importClause,YC.updateImportClause(n.importClause,n.importClause.isTypeOnly,n.importClause.name,void 0));for(const n of u){const r=mc(n,iN);r&&-1===a.indexOf(r)&&-1===c.indexOf(r)?273===n.kind?t.delete(e,n.name):(xn.assert(276===n.kind,"NamespaceImport should have been handled earlier"),(null==(i=l.get(r.importClause))?void 0:i.namedImports)?(f??(f=new Set)).add(n):t.delete(e,n)):208===n.kind?(null==(o=l.get(n.parent))?void 0:o.namedImports)?(f??(f=new Set)).add(n):t.delete(e,n):271===n.kind&&t.delete(e,n)}}l.forEach((({importClauseOrBindingPattern:n,defaultImport:i,namedImports:o})=>{pee(t,e,n,i,$e(o.entries(),(([e,t])=>({addAsTypeOnly:t,name:e}))),f,r)})),d.forEach((({useRequire:e,defaultImport:t,namedImports:n,namespaceLikeImport:i},o)=>{const s=(e?bee:vee)(o.slice(2),p,t,n&&$e(n.entries(),(([e,t])=>({addAsTypeOnly:t,name:e}))),i,a,r);m=_e(m,s)})),m=_e(m,function(){if(!_.size)return;const e=new Set(q([..._],(e=>mc(e,iN)))),t=new Set(q([..._],(e=>mc(e,Um))));return[...q([..._],(e=>271===e.kind?NY(e,!0):void 0)),...[...e].map((e=>{var t;return _.has(e)?NY(e,!0):NY(YC.updateImportDeclaration(e,e.modifiers,e.importClause&&YC.updateImportClause(e.importClause,e.importClause.isTypeOnly,_.has(e.importClause)?e.importClause.name:void 0,_.has(e.importClause.namedBindings)?e.importClause.namedBindings:(null==(t=lt(e.importClause.namedBindings,pN))?void 0:t.elements.some((e=>_.has(e))))?YC.updateNamedImports(e.importClause.namedBindings,e.importClause.namedBindings.elements.filter((e=>_.has(e)))):void 0),e.moduleSpecifier,e.attributes),!0)})),...[...t].map((e=>_.has(e)?NY(e,!0):NY(YC.updateVariableStatement(e,e.modifiers,YC.updateVariableDeclarationList(e.declarationList,q(e.declarationList.declarations,(e=>_.has(e)?e:YC.updateVariableDeclaration(e,206===e.name.kind?YC.updateObjectBindingPattern(e.name,e.name.elements.filter((e=>_.has(e)))):e.name,e.exclamationToken,e.type,e.initializer))))),!0)))]}()),m&&$Q(t,e,m,!0,r)},hasFixes:function(){return s.length>0||c.length>0||l.size>0||d.size>0||_.size>0||u.size>0},addImportForUnresolvedIdentifier:function(e,t,n){const r=function(e,t,n){const r=cee(e,t,n),i=bZ(e.sourceFile,e.preferences,e.host);return r&&ree(r,e.sourceFile,e.program,i,e.host,e.preferences)}(e,t,n);r&&r.length&&p(Te(r))},addImportForNonExistentExport:function(n,o,s,c,l){const u=t.getSourceFile(o),_=eee(e,t);if(u&&u.symbol){const{fixes:a}=Q9([{exportKind:s,isFromPackageJson:!1,moduleFileName:o,moduleSymbol:u.symbol,targetFlags:c}],void 0,l,_,t,e,i,r);a.length&&p({fix:a[0],symbolName:n,errorIdentifierText:n})}else{const r=QZ(o,99,t,i);p({fix:{kind:3,moduleSpecifierKind:"relative",moduleSpecifier:JR.getLocalModuleSpecifierBetweenFileNames(e,o,a,CQ(t,i)),importKind:see(r,s,a),addAsTypeOnly:Y9(l,0,void 0,c,t.getTypeChecker(),a),useRequire:_},symbolName:n,errorIdentifierText:n})}},removeExistingImport:function(e){273===e.kind&&xn.assertIsDefined(e.name,"ImportClause should have a name if it's being removed"),u.add(e)},addVerbatimImport:function(e){_.add(e)}};function p(e){var t,n;const{fix:r,symbolName:i}=e;switch(r.kind){case 0:s.push(r);break;case 1:c.push(r);break;case 2:{const{importClauseOrBindingPattern:e,importKind:n,addAsTypeOnly:a}=r;let s=l.get(e);if(s||l.set(e,s={importClauseOrBindingPattern:e,defaultImport:void 0,namedImports:new Map}),0===n){const e=null==s?void 0:s.namedImports.get(i);s.namedImports.set(i,o(e,a))}else xn.assert(void 0===s.defaultImport||s.defaultImport.name===i,"(Add to Existing) Default import should be missing or match symbolName"),s.defaultImport={name:i,addAsTypeOnly:o(null==(t=s.defaultImport)?void 0:t.addAsTypeOnly,a)};break}case 3:{const{moduleSpecifier:e,importKind:t,useRequire:s,addAsTypeOnly:c}=r,l=function(e,t,n,r){const i=u(e,!0),o=u(e,!1),a=d.get(i),s=d.get(o),c={defaultImport:void 0,namedImports:void 0,namespaceLikeImport:void 0,useRequire:n};return 1===t&&2===r?a||(d.set(i,c),c):1===r&&(a||s)?a||s:s||(d.set(o,c),c)}(e,t,s,c);switch(xn.assert(l.useRequire===s,"(Add new) Tried to add an `import` and a `require` for the same module"),t){case 1:xn.assert(void 0===l.defaultImport||l.defaultImport.name===i,"(Add new) Default import should be missing or match symbolName"),l.defaultImport={name:i,addAsTypeOnly:o(null==(n=l.defaultImport)?void 0:n.addAsTypeOnly,c)};break;case 0:const e=(l.namedImports||(l.namedImports=new Map)).get(i);l.namedImports.set(i,o(e,c));break;case 3:if(a.verbatimModuleSyntax){const e=(l.namedImports||(l.namedImports=new Map)).get(i);l.namedImports.set(i,o(e,c))}else xn.assert(void 0===l.namespaceLikeImport||l.namespaceLikeImport.name===i,"Namespacelike import shoudl be missing or match symbolName"),l.namespaceLikeImport={importKind:t,name:i,addAsTypeOnly:c};break;case 2:xn.assert(void 0===l.namespaceLikeImport||l.namespaceLikeImport.name===i,"Namespacelike import shoudl be missing or match symbolName"),l.namespaceLikeImport={importKind:t,name:i,addAsTypeOnly:c}}break}case 4:break;default:xn.assertNever(r,`fix wasn't never - got kind ${r.kind}`)}function o(e,t){return Math.max(e??0,t)}function u(e,t){return`${t?1:0}|${e}`}}}function V9(e,t,n,r){const i=bZ(e,r,n),o=Z9(t.getTypeChecker(),e,t.getCompilerOptions());return{getModuleSpecifierForBestExportInfo:function(a,s,c,l){const{fixes:u,computedWithoutCacheCount:_}=Q9(a,s,c,!1,t,e,n,r,o,l),d=iee(u,e,t,i,n,r);return d&&{...d,computedWithoutCacheCount:_}}}}function U9(e,t,n,r,i,o,a,s,c,l,u,_){let d;n?(d=i0(r,a,s,u,_).get(r.path,n),xn.assertIsDefined(d,"Some exportInfo should match the specified exportMapKey")):(d=No(By(t.name))?[X9(e,i,t,s,a)]:G9(r,e,i,t,o,s,a,u,_),xn.assertIsDefined(d,"Some exportInfo should match the specified symbol / moduleSymbol"));const p=eee(r,s),f=wT(kX(r,l)),m=xn.checkDefined(W9(r,d,s,l,f,p,a,u));return{moduleSpecifier:m.moduleSpecifier,codeAction:H9(_ee({host:a,formatContext:c,preferences:u},r,i,m,!1,s,u))}}function K9(e,t,n,r,i,o){const a=n.getCompilerOptions(),s=Pe(uee(e,n.getTypeChecker(),t,a)),c=lee(e,t,s,n),l=s!==t.text;return c&&H9(_ee({host:r,formatContext:i,preferences:o},e,s,c,l,n,o))}function W9(e,t,n,r,i,o,a,s){const c=bZ(e,s,a);return iee(Q9(t,r,i,o,n,e,a,s).fixes,e,n,c,a,s)}function H9({description:e,changes:t,commands:n}){return{description:e,changes:t,commands:n}}function G9(e,t,n,r,i,o,a,s,c){const l=tee(o,a);return i0(e,a,o,s,c).search(e.path,i,(e=>e===n),(e=>{if(mx(e[0].symbol,l(e[0].isFromPackageJson))===t&&e.some((e=>e.moduleSymbol===r||e.symbol.parent===r)))return e}))}function X9(e,t,n,r,i){var o,a;const s=l(r.getTypeChecker(),!1);if(s)return s;const c=null==(a=null==(o=i.getPackageJsonAutoImportProvider)?void 0:o.call(i))?void 0:a.getTypeChecker();return xn.checkDefined(c&&l(c,!0),"Could not find symbol in specified module for code actions");function l(r,i){const o=o0(n,r);if(o&&mx(o.symbol,r)===e)return{symbol:o.symbol,moduleSymbol:n,moduleFileName:void 0,exportKind:o.exportKind,targetFlags:mx(e,r).flags,isFromPackageJson:i};const a=r.tryGetMemberInModuleExportsAndProperties(t,n);return a&&mx(a,r)===e?{symbol:a,moduleSymbol:n,moduleFileName:void 0,exportKind:0,targetFlags:mx(e,r).flags,isFromPackageJson:i}:void 0}}function Q9(e,t,n,r,i,o,a,s,c=(Am(o)?Z9(i.getTypeChecker(),o,i.getCompilerOptions()):void 0),l){const _=i.getTypeChecker(),d=c?R(e,c.getImportsForExportInfo):u,p=void 0!==t&&function(e,t){return g(e,(({declaration:e,importKind:n})=>{var r;if(0!==n)return;const i=function(e){var t,n,r;switch(e.kind){case 260:return null==(t=lt(e.name,qD))?void 0:t.text;case 271:return e.name.text;case 351:case 272:return null==(r=lt(null==(n=e.importClause)?void 0:n.namedBindings,_N))?void 0:r.name.text;default:return xn.assertNever(e)}}(e),o=i&&(null==(r=Sg(e))?void 0:r.text);return o?{kind:0,namespacePrefix:i,usagePosition:t,moduleSpecifierKind:void 0,moduleSpecifier:o}:void 0}))}(d,t),f=function(e,t,n,r){let i;for(const t of e){const e=o(t);if(!e)continue;const n=Ul(e.importClauseOrBindingPattern);if(4!==e.addAsTypeOnly&&n||4===e.addAsTypeOnly&&!n)return e;i??(i=e)}return i;function o({declaration:e,importKind:i,symbol:o,targetFlags:a}){if(3===i||2===i||271===e.kind)return;if(260===e.kind)return 0!==i&&1!==i||206!==e.name.kind?void 0:{kind:2,importClauseOrBindingPattern:e.name,importKind:i,moduleSpecifierKind:void 0,moduleSpecifier:e.initializer.arguments[0].text,addAsTypeOnly:4};const{importClause:s}=e;if(!s||!$_(e.moduleSpecifier))return;const{name:c,namedBindings:l}=s;if(s.isTypeOnly&&(0!==i||!l))return;const u=Y9(t,0,o,a,n,r);return 1===i&&(c||2===u&&l)||0===i&&274===(null==l?void 0:l.kind)?void 0:{kind:2,importClauseOrBindingPattern:s,importKind:i,moduleSpecifierKind:void 0,moduleSpecifier:e.moduleSpecifier.text,addAsTypeOnly:u}}}(d,n,_,i.getCompilerOptions());if(f)return{computedWithoutCacheCount:0,fixes:[...p?[p]:u,f]};const{fixes:m,computedWithoutCacheCount:h=0}=function(e,t,n,r,i,o,a,s,c,l){const u=g(t,(e=>function({declaration:e,importKind:t,symbol:n,targetFlags:r},i,o,a,s){var c;const l=null==(c=Sg(e))?void 0:c.text;if(l)return{kind:3,moduleSpecifierKind:void 0,moduleSpecifier:l,importKind:t,addAsTypeOnly:o?4:Y9(i,0,n,r,a,s),useRequire:o}}(e,o,a,n.getTypeChecker(),n.getCompilerOptions())));return u?{fixes:[u]}:function(e,t,n,r,i,o,a,s,c){const l=qk(t.fileName),u=e.getCompilerOptions(),_=CQ(e,a),d=tee(e,a),p=DQ(ES(u)),f=c?e=>JR.tryGetModuleSpecifiersFromCache(e.moduleSymbol,t,_,s):(e,n)=>JR.getModuleSpecifiersWithCacheInfo(e.moduleSymbol,n,u,t,_,s,void 0,!0);let m=0;const g=R(o,((e,o)=>{const a=d(e.isFromPackageJson),{computedWithoutCache:s,moduleSpecifiers:c,kind:_}=f(e,a)??{},g=!!(111551&e.targetFlags),h=Y9(r,0,e.symbol,e.targetFlags,a,u);return m+=s?1:0,q(c,(r=>{if(p&&Oj(r))return;if(!g&&l&&void 0!==n)return{kind:1,moduleSpecifierKind:_,moduleSpecifier:r,usagePosition:n,exportInfo:e,isReExport:o>0};const s=see(t,e.exportKind,u);let c;if(void 0!==n&&3===s&&0===e.exportKind){const t=a.resolveExternalModuleSymbol(e.moduleSymbol);let r;t!==e.moduleSymbol&&(r=s0(t,a,u,!1,mt)),r||(r=MZ(e.moduleSymbol,wS(u),!1)),c={namespacePrefix:r,usagePosition:n}}return{kind:3,moduleSpecifierKind:_,moduleSpecifier:r,importKind:s,useRequire:i,addAsTypeOnly:h,exportInfo:e,isReExport:o>0,qualification:c}}))}));return{computedWithoutCacheCount:m,fixes:g}}(n,r,i,o,a,e,s,c,l)}(e,d,i,o,t,n,r,a,s,l);return{computedWithoutCacheCount:h,fixes:[...p?[p]:u,...m]}}function Y9(e,t,n,r,i,o){return e?!n||!o.verbatimModuleSyntax||111551&r&&!i.getTypeOnlyAliasDeclaration(n)?1:2:4}function Z9(e,t,n){let r;for(const n of t.imports){const t=kg(n);if(zm(t.parent)){const i=e.resolveExternalModuleName(n);i&&(r||(r=et())).add(OB(i),t.parent)}else if(272===t.kind||271===t.kind||351===t.kind){const i=e.getSymbolAtLocation(n);i&&(r||(r=et())).add(OB(i),t)}}return{getImportsForExportInfo:({moduleSymbol:e,exportKind:i,targetFlags:o,symbol:a})=>{const s=null==r?void 0:r.get(OB(e));if(!s)return u;if(Im(t)&&!(111551&o)&&!x(s,AF))return u;const c=see(t,i,n);return s.map((e=>({declaration:e,importKind:c,symbol:a,targetFlags:o})))}}}function eee(e,t){if(!qk(e.fileName))return!1;if(e.commonJsModuleIndicator&&!e.externalModuleIndicator)return!0;if(e.externalModuleIndicator&&!e.commonJsModuleIndicator)return!1;const n=t.getCompilerOptions();if(n.configFile)return DS(n)<5;if(1===e.impliedNodeFormat)return!0;if(99===e.impliedNodeFormat)return!1;for(const n of t.getSourceFiles())if(n!==e&&Im(n)&&!t.isSourceFileFromExternalLibrary(n)){if(n.commonJsModuleIndicator&&!n.externalModuleIndicator)return!0;if(n.externalModuleIndicator&&!n.commonJsModuleIndicator)return!1}return!0}function tee(e,t){return xt((n=>n?t.getPackageJsonAutoImportProvider().getTypeChecker():e.getTypeChecker()))}function nee(e,t,n,r){const i=kX(e.sourceFile,n);let o;if(t===va._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code)o=function({sourceFile:e,program:t,host:n,preferences:r},i){const o=t.getTypeChecker(),a=function(e,t){const n=qD(e)?t.getSymbolAtLocation(e):void 0;if(Ex(n))return n;const{parent:r}=e;if(D_(r)&&r.tagName===e||EN(r)){const n=t.resolveName(t.getJsxNamespace(r),D_(r)?e:r,111551,!1);if(Ex(n))return n}}(i,o);if(!a)return;const s=o.getAliasedSymbol(a),c=a.name;return Q9([{symbol:a,moduleSymbol:s,moduleFileName:void 0,exportKind:3,targetFlags:s.flags,isFromPackageJson:!1}],void 0,!1,eee(e,t),t,e,n,r).fixes.map((e=>{var t;return{fix:e,symbolName:c,errorIdentifierText:null==(t=lt(i,qD))?void 0:t.text}}))}(e,i);else{if(!qD(i))return;if(t===va._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code){const t=Pe(uee(e.sourceFile,e.program.getTypeChecker(),i,e.program.getCompilerOptions())),n=lee(e.sourceFile,i,t,e.program);return n&&[{fix:n,symbolName:t,errorIdentifierText:i.text}]}o=cee(e,i,r)}const a=bZ(e.sourceFile,e.preferences,e.host);return o&&ree(o,e.sourceFile,e.program,a,e.host,e.preferences)}function ree(e,t,n,r,i,o){const a=e=>Yo(e,i.getCurrentDirectory(),Wy(i));return he(e,((e,i)=>Vt(!!e.isJsxNamespaceFix,!!i.isJsxNamespaceFix)||Nt(e.fix.kind,i.fix.kind)||oee(e.fix,i.fix,t,n,o,r.allowsImportingSpecifier,a)))}function iee(e,t,n,r,i,o){if(Q(e))return 0===e[0].kind||2===e[0].kind?e[0]:e.reduce(((e,a)=>-1===oee(a,e,t,n,o,r.allowsImportingSpecifier,(e=>Yo(e,i.getCurrentDirectory(),Wy(i))))?a:e))}function oee(e,t,n,r,i,o,a){return 0!==e.kind&&0!==t.kind?Vt("node_modules"!==t.moduleSpecifierKind||o(t.moduleSpecifier),"node_modules"!==e.moduleSpecifierKind||o(e.moduleSpecifier))||function(e,t,n){return"non-relative"===n.importModuleSpecifierPreference||"project-relative"===n.importModuleSpecifierPreference?Vt("relative"===e.moduleSpecifierKind,"relative"===t.moduleSpecifierKind):0}(e,t,i)||function(e,t,n,r){return an(e,"node:")&&!an(t,"node:")?$Z(n,r)?-1:1:an(t,"node:")&&!an(e,"node:")?$Z(n,r)?1:-1:0}(e.moduleSpecifier,t.moduleSpecifier,n,r)||Vt(aee(e,n.path,a),aee(t,n.path,a))||Xk(e.moduleSpecifier,t.moduleSpecifier):0}function aee(e,t,n){var r;return!(!e.isReExport||!(null==(r=e.exportInfo)?void 0:r.moduleFileName)||"index"!==Bo(e.exportInfo.moduleFileName,[".js",".jsx",".d.ts",".ts",".tsx"],!0))&&an(t,n(Ro(e.exportInfo.moduleFileName)))}function see(e,t,n,r){if(n.verbatimModuleSyntax&&(1===DS(n)||1===e.impliedNodeFormat))return 3;switch(t){case 0:return 0;case 1:return 1;case 2:return function(e,t,n){const r=AS(t),i=qk(e.fileName);if(!i&&DS(t)>=5)return r?1:2;if(i)return e.externalModuleIndicator||n?r?1:2:3;for(const t of e.statements??u)if(rN(t)&&!Nd(t.moduleReference))return 3;return r?1:3}(e,n,!!r);case 3:return function(e,t,n){if(AS(t))return 1;const r=DS(t);switch(r){case 2:case 1:case 3:return qk(e.fileName)&&(e.externalModuleIndicator||n)?2:3;case 4:case 5:case 6:case 7:case 99:case 0:case 200:return 2;case 100:case 199:return 99===e.impliedNodeFormat?2:3;default:return xn.assertNever(r,`Unexpected moduleKind ${r}`)}}(e,n,!!r);default:return xn.assertNever(t)}}function cee({sourceFile:e,program:t,cancellationToken:n,host:r,preferences:i},o,a){const s=t.getTypeChecker(),c=t.getCompilerOptions();return R(uee(e,s,o,c),(s=>{if("default"===s)return;const c=wT(o),l=eee(e,t),u=function(e,t,n,r,i,o,a,s,c){var l;const u=et(),_=bZ(i,c,s),d=null==(l=s.getModuleSpecifierCache)?void 0:l.call(s),p=xt((e=>CQ(e?s.getPackageJsonAutoImportProvider():o,s)));function f(e,t,n,r,o,a){const s=p(a);if(t&&t0(o,i,t,c,_,s,d)||!t&&_.allowsImportingAmbientModule(e,s)){const i=o.getTypeChecker();u.add(DY(n,i).toString(),{symbol:n,moduleSymbol:e,moduleFileName:null==t?void 0:t.fileName,exportKind:r,targetFlags:mx(n,i).flags,isFromPackageJson:a})}}return n0(o,s,c,a,((i,o,a,s)=>{const c=a.getTypeChecker();r.throwIfCancellationRequested();const l=a.getCompilerOptions(),u=o0(i,c);u&&See(c.getSymbolFlags(u.symbol),n)&&s0(u.symbol,c,l,t,(t=>t===e))&&f(i,o,u.symbol,u.exportKind,a,s);const _=c.tryGetMemberInModuleExportsAndProperties(e,i);_&&See(c.getSymbolFlags(_),n)&&f(i,o,_,0,a,s)})),u}(s,km(o),yG(o),n,e,t,a,r,i);return $e(J(u.values(),(n=>Q9(n,o.getStart(e),c,l,t,e,r,i).fixes)),(e=>({fix:e,symbolName:s,errorIdentifierText:o.text,isJsxNamespaceFix:s!==o.text})))}))}function lee(e,t,n,r){const i=r.getTypeChecker(),o=i.resolveName(n,t,111551,!0);if(!o)return;const a=i.getTypeOnlyAliasDeclaration(o);return a&&Sd(a)===e?{kind:4,typeOnlyAliasDeclaration:a}:void 0}function uee(e,t,n,r){const i=n.parent;if((D_(i)||wN(i))&&i.tagName===n&&KZ(r.jsx)){const r=t.getJsxNamespace(e);if(function(e,t,n){if(Jy(t.text))return!0;const r=n.resolveName(e,t,111551,!0);return!r||Q(r.declarations,Wl)&&!(111551&r.flags)}(r,n,t))return Jy(n.text)||t.resolveName(n.text,n,111551,!1)?[r]:[n.text,r]}return[n.text]}function _ee(e,t,n,r,i,o,a){let s;const c=r_e.ChangeTracker.with(e,(e=>{s=function(e,t,n,r,i,o,a){const s=AQ(t,a);switch(r.kind){case 0:return fee(e,t,r),[va.Change_0_to_1,n,`${r.namespacePrefix}.${n}`];case 1:return mee(e,t,r,s),[va.Change_0_to_1,n,gee(r.moduleSpecifier,s)+n];case 2:{const{importClauseOrBindingPattern:o,importKind:s,addAsTypeOnly:c,moduleSpecifier:l}=r;pee(e,t,o,1===s?{name:n,addAsTypeOnly:c}:void 0,0===s?[{name:n,addAsTypeOnly:c}]:u,void 0,a);const _=By(l);return i?[va.Import_0_from_1,n,_]:[va.Update_import_from_0,_]}case 3:{const{importKind:c,moduleSpecifier:l,addAsTypeOnly:u,useRequire:_,qualification:d}=r;return $Q(e,t,(_?bee:vee)(l,s,1===c?{name:n,addAsTypeOnly:u}:void 0,0===c?[{name:n,addAsTypeOnly:u}]:void 0,2===c||3===c?{importKind:c,name:(null==d?void 0:d.namespacePrefix)||n,addAsTypeOnly:u}:void 0,o.getCompilerOptions(),a),!0,a),d&&fee(e,t,d),i?[va.Import_0_from_1,n,l]:[va.Add_import_from_0,l]}case 4:{const{typeOnlyAliasDeclaration:i}=r,s=function(e,t,n,r,i){const o=n.getCompilerOptions(),a=o.verbatimModuleSyntax;switch(t.kind){case 276:if(t.isTypeOnly){if(t.parent.elements.length>1){const n=YC.updateImportSpecifier(t,!1,t.propertyName,t.name),{specifierComparer:o}=vle.getNamedImportSpecifierComparerWithDetection(t.parent.parent.parent,i,r),a=vle.getImportSpecifierInsertionIndex(t.parent.elements,n,o);if(a!==t.parent.elements.indexOf(t))return e.delete(r,t),e.insertImportSpecifierAtIndex(r,n,t.parent,a),t}return e.deleteRange(r,{pos:Vd(t.getFirstToken()),end:Vd(t.propertyName??t.name)}),t}return xn.assert(t.parent.parent.isTypeOnly),s(t.parent.parent),t.parent.parent;case 273:return s(t),t;case 274:return s(t.parent),t.parent;case 271:return e.deleteRange(r,t.getChildAt(1)),t;default:xn.failBadSyntaxKind(t)}function s(s){var c;if(e.delete(r,qQ(s,r)),!o.allowImportingTsExtensions){const t=Sg(s.parent),i=t&&(null==(c=n.getResolvedModuleFromModuleSpecifier(t,r))?void 0:c.resolvedModule);if(null==i?void 0:i.resolvedUsingTsExtension){const n=na(t.text,I$(t.text,o));e.replaceNode(r,t,YC.createStringLiteral(n))}}if(a){const n=lt(s.namedBindings,pN);if(n&&n.elements.length>1){!1!==vle.getNamedImportSpecifierComparerWithDetection(s.parent,i,r).isSorted&&276===t.kind&&0!==n.elements.indexOf(t)&&(e.delete(r,t),e.insertImportSpecifierAtIndex(r,t,n,0));for(const i of n.elements)i===t||i.isTypeOnly||e.insertModifierBefore(r,156,i)}}}}(e,i,o,t,a);return 276===s.kind?[va.Remove_type_from_import_of_0_from_1,n,dee(s.parent.parent)]:[va.Remove_type_from_import_declaration_from_0,dee(s)]}default:return xn.assertNever(r,`Unexpected fix kind ${r.kind}`)}}(e,t,n,r,i,o,a)}));return _8(B9,c,s,J9,va.Add_all_missing_imports)}function dee(e){var t,n;return 271===e.kind?(null==(n=lt(null==(t=lt(e.moduleReference,SN))?void 0:t.expression,$_))?void 0:n.text)||e.moduleReference.getText():ut(e.parent.moduleSpecifier,wD).text}function pee(e,t,n,r,i,o,a){var s;if(206===n.kind){if(o&&n.elements.some((e=>o.has(e))))return void e.replaceNode(t,n,YC.createObjectBindingPattern([...n.elements.filter((e=>!o.has(e))),...r?[YC.createBindingElement(void 0,"default",r.name)]:u,...i.map((e=>YC.createBindingElement(void 0,void 0,e.name)))]));r&&_(n,r.name,"default");for(const e of i)_(n,e.name,void 0);return}const c=n.isTypeOnly&&Q([r,...i],(e=>4===(null==e?void 0:e.addAsTypeOnly))),l=n.namedBindings&&(null==(s=lt(n.namedBindings,pN))?void 0:s.elements);if(r&&(xn.assert(!n.name,"Cannot add a default import to an import clause that already has one"),e.insertNodeAt(t,n.getStart(t),YC.createIdentifier(r.name),{suffix:", "})),i.length){const{specifierComparer:r,isSorted:s}=vle.getNamedImportSpecifierComparerWithDetection(n.parent,a,t),u=ve(i.map((e=>YC.createImportSpecifier((!n.isTypeOnly||c)&&yee(e,a),void 0,YC.createIdentifier(e.name)))),r);if(o)e.replaceNode(t,n.namedBindings,YC.updateNamedImports(n.namedBindings,ve([...l.filter((e=>!o.has(e))),...u],r)));else if((null==l?void 0:l.length)&&!1!==s){const i=c&&l?YC.updateNamedImports(n.namedBindings,L(l,(e=>YC.updateImportSpecifier(e,!0,e.propertyName,e.name)))).elements:l;for(const o of u){const a=vle.getImportSpecifierInsertionIndex(i,o,r);e.insertImportSpecifierAtIndex(t,o,n.namedBindings,a)}}else if(null==l?void 0:l.length)for(const n of u)e.insertNodeInListAfter(t,De(l),n,l);else if(u.length){const r=YC.createNamedImports(u);n.namedBindings?e.replaceNode(t,n.namedBindings,r):e.insertNodeAfter(t,xn.checkDefined(n.name,"Import clause must have either named imports or a default import"),r)}}if(c&&(e.delete(t,qQ(n,t)),l))for(const n of l)e.insertModifierBefore(t,156,n);function _(n,r,i){const o=YC.createBindingElement(void 0,i,r);n.elements.length?e.insertNodeInListAfter(t,De(n.elements),o):e.replaceNode(t,n,YC.createObjectBindingPattern([o]))}}function fee(e,t,{namespacePrefix:n,usagePosition:r}){e.insertText(t,r,n+".")}function mee(e,t,{moduleSpecifier:n,usagePosition:r},i){e.insertText(t,r,gee(n,i))}function gee(e,t){const n=IQ(t);return`import(${n}${e}${n}).`}function hee({addAsTypeOnly:e}){return 2===e}function yee(e,t){return hee(e)||!!t.preferTypeOnlyAutoImports&&4!==e.addAsTypeOnly}function vee(e,t,n,r,i,o,a){const s=PQ(e,t);let c;if(void 0!==n||(null==r?void 0:r.length)){const i=(!n||hee(n))&&x(r,hee)||(o.verbatimModuleSyntax||a.preferTypeOnlyAutoImports)&&4!==(null==n?void 0:n.addAsTypeOnly)&&!Q(r,(e=>4===e.addAsTypeOnly));c=_e(c,EQ(n&&YC.createIdentifier(n.name),null==r?void 0:r.map((e=>YC.createImportSpecifier(!i&&yee(e,a),void 0,YC.createIdentifier(e.name)))),e,t,i))}return i&&(c=_e(c,3===i.importKind?YC.createImportEqualsDeclaration(void 0,yee(i,a),YC.createIdentifier(i.name),YC.createExternalModuleReference(s)):YC.createImportDeclaration(void 0,YC.createImportClause(yee(i,a),void 0,YC.createNamespaceImport(YC.createIdentifier(i.name))),s,void 0))),xn.checkDefined(c)}function bee(e,t,n,r,i){const o=PQ(e,t);let a;if(n||(null==r?void 0:r.length)){const e=(null==r?void 0:r.map((({name:e})=>YC.createBindingElement(void 0,void 0,e))))||[];n&&e.unshift(YC.createBindingElement(void 0,"default",n.name)),a=_e(a,xee(YC.createObjectBindingPattern(e),o))}return i&&(a=_e(a,xee(i.name,o))),xn.checkDefined(a)}function xee(e,t){return YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration("string"==typeof e?YC.createIdentifier(e):e,void 0,void 0,YC.createCallExpression(YC.createIdentifier("require"),void 0,[t]))],2))}function See(e,t){return!!(7===t||(1&t?111551&e:2&t?788968&e:4&t&&1920&e))}f8({errorCodes:z9,getCodeActions(e){const{errorCode:t,preferences:n,sourceFile:r,span:i,program:o}=e,a=nee(e,t,i.start,!0);if(a)return a.map((({fix:t,symbolName:i,errorIdentifierText:a})=>_ee(e,r,i,t,i!==a,o,n)))},fixIds:[J9],getAllCodeActions:e=>{const{sourceFile:t,program:n,preferences:r,host:i,cancellationToken:o}=e,a=q9(t,n,!0,r,i,o);return x8(e,z9,(t=>a.addImportFromDiagnostic(t,e))),y8(r_e.ChangeTracker.with(e,a.writeFixes))}});var kee="addMissingConstraint",Tee=[va.Type_0_is_not_comparable_to_type_1.code,va.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,va.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,va.Type_0_is_not_assignable_to_type_1.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code,va.Property_0_is_incompatible_with_index_signature.code,va.Property_0_in_type_1_is_not_assignable_to_type_2.code,va.Type_0_does_not_satisfy_the_constraint_1.code];function Cee(e,t,n){const r=S(e.getSemanticDiagnostics(t),(e=>e.start===n.start&&e.length===n.length));if(void 0===r||void 0===r.relatedInformation)return;const i=S(r.relatedInformation,(e=>e.code===va.This_type_parameter_might_need_an_extends_0_constraint.code));if(void 0===i||void 0===i.file||void 0===i.start||void 0===i.length)return;let o=Eie(i.file,Gs(i.start,i.length));if(void 0!==o&&(qD(o)&&aE(o.parent)&&(o=o.parent),aE(o))){if(BE(o.parent))return;const r=kX(t,n.start);return{constraint:(a=e.getTypeChecker(),(wu((s=r).parent)?a.getTypeArgumentConstraint(s.parent):(Xu(s)?a.getContextualType(s):void 0)||a.getTypeAtLocation(s))||function(e){const[,t]=Jq(e,"\n",0).match(/`extends (.*)`/)||[];return t}(i.messageText)),declaration:o,token:r}}var a,s}function wee(e,t,n,r,i,o){const{declaration:a,constraint:s}=o,c=t.getTypeChecker();if(st(s))e.insertText(i,a.name.end,` extends ${s}`);else{const o=wS(t.getCompilerOptions()),l=cie({program:t,host:r}),u=$9(i,t,n,r),_=fie(c,u,s,void 0,o,void 0,l);_&&(e.replaceNode(i,a,YC.updateTypeParameterDeclaration(a,void 0,a.name,_,a.default)),u.writeFixes(e))}}f8({errorCodes:Tee,getCodeActions(e){const{sourceFile:t,span:n,program:r,preferences:i,host:o}=e,a=Cee(r,t,n);if(void 0===a)return;const s=r_e.ChangeTracker.with(e,(e=>wee(e,r,i,o,t,a)));return[_8(kee,s,va.Add_extends_constraint,kee,va.Add_extends_constraint_to_all_type_parameters)]},fixIds:[kee],getAllCodeActions:e=>{const{program:t,preferences:n,host:r}=e,i=new Map;return y8(r_e.ChangeTracker.with(e,(o=>{x8(e,Tee,(e=>{const a=Cee(t,e.file,Gs(e.start,e.length));if(a&&Fx(i,IB(a.declaration)))return wee(o,t,n,r,e.file,a)}))})))}});var Dee="fixOverrideModifier",Eee="fixAddOverrideModifier",Pee="fixRemoveOverrideModifier",Nee=[va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code,va.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code,va.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code,va.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code,va.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code,va.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code,va.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code,va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code],Fee={[va.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Add_all_missing_override_modifiers},[va.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Add_all_missing_override_modifiers},[va.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:va.Remove_override_modifier,fixId:Pee,fixAllDescriptions:va.Remove_all_unnecessary_override_modifiers},[va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]:{descriptions:va.Remove_override_modifier,fixId:Pee,fixAllDescriptions:va.Remove_override_modifier},[va.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Add_all_missing_override_modifiers},[va.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Add_all_missing_override_modifiers},[va.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]:{descriptions:va.Add_override_modifier,fixId:Eee,fixAllDescriptions:va.Remove_all_unnecessary_override_modifiers},[va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:va.Remove_override_modifier,fixId:Pee,fixAllDescriptions:va.Remove_all_unnecessary_override_modifiers},[va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]:{descriptions:va.Remove_override_modifier,fixId:Pee,fixAllDescriptions:va.Remove_all_unnecessary_override_modifiers}};function Aee(e,t,n,r){switch(n){case va.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code:case va.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:case va.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code:case va.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code:case va.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code:return function(e,t,n){const r=Oee(t,n);if(Im(t))return void e.addJSDocTags(t,r,[YC.createJSDocOverrideTag(YC.createIdentifier("override"))]);const i=r.modifiers||u,o=S(i,QD),a=S(i,YD),s=S(i,(e=>ZX(e.kind))),c=k(i,cE),l=a?a.end:o?o.end:s?s.end:c?as(t.text,c.end):r.getStart(t),_=s||o||a?{prefix:" "}:{suffix:" "};e.insertModifierAt(t,l,164,_)}(e,t.sourceFile,r);case va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code:case va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code:case va.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code:case va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code:return function(e,t,n){const r=Oee(t,n);if(Im(t))return void e.filterJSDocTags(t,r,dn(gF));const i=S(r.modifiers,ZD);xn.assertIsDefined(i),e.deleteModifier(t,i)}(e,t.sourceFile,r);default:xn.fail("Unexpected error code: "+n)}}function Iee(e){switch(e.kind){case 176:case 172:case 174:case 177:case 178:return!0;case 169:return rc(e,e.parent);default:return!1}}function Oee(e,t){const n=mc(kX(e,t),(e=>gu(e)?"quit":Iee(e)));return xn.assert(n&&Iee(n)),n}f8({errorCodes:Nee,getCodeActions:function(e){const{errorCode:t,span:n}=e,r=Fee[t];if(!r)return u;const{descriptions:i,fixId:o,fixAllDescriptions:a}=r,s=r_e.ChangeTracker.with(e,(r=>Aee(r,e,t,n.start)));return[d8(Dee,s,i,o,a)]},fixIds:[Dee,Eee,Pee],getAllCodeActions:e=>b8(e,Nee,((t,n)=>{const{code:r,start:i}=n,o=Fee[r];o&&o.fixId===e.fixId&&Aee(t,e,r,i)}))});var Mee="fixNoPropertyAccessFromIndexSignature",Lee=[va.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code];function jee(e,t,n,r){const i=AQ(t,r),o=YC.createStringLiteral(n.name.text,0===i);e.replaceNode(t,n,vl(n)?YC.createElementAccessChain(n.expression,n.questionDotToken,o):YC.createElementAccessExpression(n.expression,o))}function Ree(e,t){return ut(kX(e,t).parent,GE)}f8({errorCodes:Lee,fixIds:[Mee],getCodeActions(e){const{sourceFile:t,span:n,preferences:r}=e,i=Ree(t,n.start),o=r_e.ChangeTracker.with(e,(t=>jee(t,e.sourceFile,i,r)));return[_8(Mee,o,[va.Use_element_access_for_0,i.name.text],Mee,va.Use_element_access_for_all_undeclared_properties)]},getAllCodeActions:e=>b8(e,Lee,((t,n)=>jee(t,n.file,Ree(n.file,n.start),e.preferences)))});var Bee="fixImplicitThis",Jee=[va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function zee(e,t,n,r){const i=kX(t,n);if(!WG(i))return;const o=rm(i,!1,!1);if((HP(o)||nP(o))&&!qN(rm(o,!1,!1))){const n=xn.checkDefined(uX(o,100,t)),{name:i}=o,a=xn.checkDefined(o.body);if(nP(o)){if(i&&Rse.Core.isSymbolReferencedInFile(i,r,t,a))return;return e.delete(t,n),i&&e.delete(t,i),e.insertText(t,a.pos," =>"),[va.Convert_function_expression_0_to_arrow_function,i?i.text:tZ]}return e.replaceNode(t,n,YC.createToken(87)),e.insertText(t,i.end," = "),e.insertText(t,a.pos," =>"),[va.Convert_function_declaration_0_to_arrow_function,i.text]}}f8({errorCodes:Jee,getCodeActions:function(e){const{sourceFile:t,program:n,span:r}=e;let i;const o=r_e.ChangeTracker.with(e,(e=>{i=zee(e,t,r.start,n.getTypeChecker())}));return i?[_8(Bee,o,i,Bee,va.Fix_all_implicit_this_errors)]:u},fixIds:[Bee],getAllCodeActions:e=>b8(e,Jee,((t,n)=>{zee(t,n.file,n.start,e.program.getTypeChecker())}))});var $ee="fixImportNonExportedMember",qee=[va.Module_0_declares_1_locally_but_it_is_not_exported.code];function Vee(e,t,n){var r,i;const o=kX(e,t);if(qD(o)){const t=mc(o,iN);if(void 0===t)return;const a=wD(t.moduleSpecifier)?t.moduleSpecifier:void 0;if(void 0===a)return;const s=null==(r=n.getResolvedModuleFromModuleSpecifier(a,e))?void 0:r.resolvedModule;if(void 0===s)return;const c=n.getSourceFile(s.resolvedFileName);if(void 0===c||WZ(n,c))return;const l=null==(i=lt(c.symbol.valueDeclaration,f_))?void 0:i.locals;if(void 0===l)return;const u=l.get(o.escapedText);if(void 0===u)return;const _=function(e){if(void 0===e.valueDeclaration)return Se(e.declarations);const t=e.valueDeclaration,n=KP(t)?lt(t.parent.parent,EP):void 0;return n&&1===p(n.declarationList.declarations)?n:t}(u);if(void 0===_)return;return{exportName:{node:o,isTypeOnly:YT(_)},node:_,moduleSourceFile:c,moduleSpecifier:a.text}}}function Uee(e,t,n,r,i){p(r)&&(i?Wee(e,t,n,i,r):Hee(e,t,n,r))}function Kee(e,t){return k(e.statements,(e=>gN(e)&&(t&&e.isTypeOnly||!e.isTypeOnly)))}function Wee(e,t,n,r,i){const o=r.exportClause&&hN(r.exportClause)?r.exportClause.elements:YC.createNodeArray([]),a=!(r.isTypeOnly||!NS(t.getCompilerOptions())&&!S(o,(e=>e.isTypeOnly)));e.replaceNode(n,r,YC.updateExportDeclaration(r,r.modifiers,r.isTypeOnly,YC.createNamedExports(YC.createNodeArray([...o,...Gee(i,a)],o.hasTrailingComma)),r.moduleSpecifier,r.attributes))}function Hee(e,t,n,r){e.insertNodeAtEndOfScope(n,n,YC.createExportDeclaration(void 0,!1,YC.createNamedExports(Gee(r,NS(t.getCompilerOptions()))),void 0,void 0))}function Gee(e,t){return YC.createNodeArray(O(e,(e=>YC.createExportSpecifier(t&&e.isTypeOnly,void 0,e.node))))}f8({errorCodes:qee,fixIds:[$ee],getCodeActions(e){const{sourceFile:t,span:n,program:r}=e,i=Vee(t,n.start,r);if(void 0===i)return;const o=r_e.ChangeTracker.with(e,(e=>function(e,t,{exportName:n,node:r,moduleSourceFile:i}){const o=Kee(i,n.isTypeOnly);o?Wee(e,t,i,o,[n]):ZT(r)?e.insertExportModifier(i,r):Hee(e,t,i,[n])}(e,r,i)));return[_8($ee,o,[va.Export_0_from_module_1,i.exportName.node.text,i.moduleSpecifier],$ee,va.Export_all_referenced_locals)]},getAllCodeActions(e){const{program:t}=e;return y8(r_e.ChangeTracker.with(e,(n=>{const r=new Map;x8(e,qee,(e=>{const i=Vee(e.file,e.start,t);if(void 0===i)return;const{exportName:o,node:a,moduleSourceFile:s}=i;if(void 0===Kee(s,o.isTypeOnly)&&ZT(a))n.insertExportModifier(s,a);else{const e=r.get(s)||{typeOnlyExports:[],exports:[]};o.isTypeOnly?e.typeOnlyExports.push(o):e.exports.push(o),r.set(s,e)}})),r.forEach(((e,r)=>{const i=Kee(r,!0);i&&i.isTypeOnly?(Uee(n,t,r,e.typeOnlyExports,i),Uee(n,t,r,e.exports,Kee(r,!1))):Uee(n,t,r,[...e.exports,...e.typeOnlyExports],i)}))})))}});var Xee="fixIncorrectNamedTupleSyntax";f8({errorCodes:[va.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code,va.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code],getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=function(e,t){return mc(kX(e,t),(e=>202===e.kind))}(t,n.start),i=r_e.ChangeTracker.with(e,(e=>function(e,t,n){if(!n)return;let r=n.type,i=!1,o=!1;for(;190===r.kind||191===r.kind||196===r.kind;)190===r.kind?i=!0:191===r.kind&&(o=!0),r=r.type;const a=YC.updateNamedTupleMember(n,n.dotDotDotToken||(o?YC.createToken(26):void 0),n.name,n.questionToken||(i?YC.createToken(58):void 0),r);a!==n&&e.replaceNode(t,n,a)}(e,t,r)));return[_8(Xee,i,va.Move_labeled_tuple_element_modifiers_to_labels,Xee,va.Move_labeled_tuple_element_modifiers_to_labels)]},fixIds:[Xee]});var Qee="fixSpelling",Yee=[va.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,va.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,va.Cannot_find_name_0_Did_you_mean_1.code,va.Could_not_find_name_0_Did_you_mean_1.code,va.Cannot_find_namespace_0_Did_you_mean_1.code,va.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,va.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,va._0_has_no_exported_member_named_1_Did_you_mean_2.code,va.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,va.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code,va.No_overload_matches_this_call.code,va.Type_0_is_not_assignable_to_type_1.code];function Zee(e,t,n,r){const i=kX(e,t),o=i.parent;if((r===va.No_overload_matches_this_call.code||r===va.Type_0_is_not_assignable_to_type_1.code)&&!NN(o))return;const a=n.program.getTypeChecker();let s;if(GE(o)&&o.name===i){xn.assert(hl(i),"Expected an identifier for spelling (property access)");let e=a.getTypeAtLocation(o.expression);64&o.flags&&(e=a.getNonNullableType(e)),s=a.getSuggestedSymbolForNonexistentProperty(i,e)}else if(uP(o)&&103===o.operatorToken.kind&&o.left===i&&VD(i)){const e=a.getTypeAtLocation(o.right);s=a.getSuggestedSymbolForNonexistentProperty(i,e)}else if(iE(o)&&o.right===i){const e=a.getSymbolAtLocation(o.left);e&&1536&e.flags&&(s=a.getSuggestedSymbolForNonexistentModule(o.right,e))}else if(fN(o)&&o.name===i){xn.assertNode(i,qD,"Expected an identifier for spelling (import)");const t=function(e,t,n){var r;if(!t||!$_(t.moduleSpecifier))return;const i=null==(r=e.program.getResolvedModuleFromModuleSpecifier(t.moduleSpecifier,n))?void 0:r.resolvedModule;return i?e.program.getSourceFile(i.resolvedFileName):void 0}(n,mc(i,iN),e);t&&t.symbol&&(s=a.getSuggestedSymbolForNonexistentModule(i,t.symbol))}else if(NN(o)&&o.name===i){xn.assertNode(i,qD,"Expected an identifier for JSX attribute");const e=mc(i,D_),t=a.getContextualTypeForArgumentAtIndex(e,0);s=a.getSuggestedSymbolForNonexistentJSXAttribute(i,t)}else if($v(o)&&mu(o)&&o.name===i){const e=mc(i,gu),t=e?Sh(e):void 0,n=t?a.getTypeAtLocation(t):void 0;n&&(s=a.getSuggestedSymbolForNonexistentClassMember(Gd(i),n))}else{const e=yG(i),t=Gd(i);xn.assert(void 0!==t,"name should be defined"),s=a.getSuggestedSymbolForNonexistentSymbol(i,t,function(e){let t=0;return 4&e&&(t|=1920),2&e&&(t|=788968),1&e&&(t|=111551),t}(e))}return void 0===s?void 0:{node:i,suggestedSymbol:s}}function ete(e,t,n,r,i){const o=Sc(r);if(!Ts(o,i)&&GE(n.parent)){const i=r.valueDeclaration;i&&Dc(i)&&VD(i.name)?e.replaceNode(t,n,YC.createIdentifier(o)):e.replaceNode(t,n.parent,YC.createElementAccessExpression(n.parent.expression,YC.createStringLiteral(o)))}else e.replaceNode(t,n,YC.createIdentifier(o))}f8({errorCodes:Yee,getCodeActions(e){const{sourceFile:t,errorCode:n}=e,r=Zee(t,e.span.start,e,n);if(!r)return;const{node:i,suggestedSymbol:o}=r,a=wS(e.host.getCompilationSettings());return[_8("spelling",r_e.ChangeTracker.with(e,(e=>ete(e,t,i,o,a))),[va.Change_spelling_to_0,Sc(o)],Qee,va.Fix_all_detected_spelling_errors)]},fixIds:[Qee],getAllCodeActions:e=>b8(e,Yee,((t,n)=>{const r=Zee(n.file,n.start,e,n.code),i=wS(e.host.getCompilationSettings());r&&ete(t,e.sourceFile,r.node,r.suggestedSymbol,i)}))});var tte="returnValueCorrect",nte="fixAddReturnStatement",rte="fixRemoveBracesFromArrowFunctionBody",ite="fixWrapTheBlockWithParen",ote=[va.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code,va.Type_0_is_not_assignable_to_type_1.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code];function ate(e,t,n){const r=e.createSymbol(4,t.escapedText);r.links.type=e.getTypeAtLocation(n);const i=ed([r]);return e.createAnonymousType(void 0,i,[],[],[])}function ste(e,t,n,r){if(!t.body||!DP(t.body)||1!==p(t.body.statements))return;const i=Te(t.body.statements);if(NP(i)&&cte(e,t,e.getTypeAtLocation(i.expression),n,r))return{declaration:t,kind:0,expression:i.expression,statement:i,commentSource:i.expression};if($P(i)&&NP(i.statement)){const o=YC.createObjectLiteralExpression([YC.createPropertyAssignment(i.label,i.statement.expression)]);if(cte(e,t,ate(e,i.label,i.statement.expression),n,r))return rP(t)?{declaration:t,kind:1,expression:o,statement:i,commentSource:i.statement.expression}:{declaration:t,kind:0,expression:o,statement:i,commentSource:i.statement.expression}}else if(DP(i)&&1===p(i.statements)){const o=Te(i.statements);if($P(o)&&NP(o.statement)){const a=YC.createObjectLiteralExpression([YC.createPropertyAssignment(o.label,o.statement.expression)]);if(cte(e,t,ate(e,o.label,o.statement.expression),n,r))return{declaration:t,kind:0,expression:a,statement:i,commentSource:o}}}}function cte(e,t,n,r,i){if(i){const r=e.getSignatureFromDeclaration(t);if(r){Bv(t,1024)&&(n=e.createPromiseType(n));const i=e.createSignature(t,r.typeParameters,r.thisParameter,r.parameters,n,void 0,r.minArgumentCount,r.flags);n=e.createAnonymousType(void 0,ed(),[i],[],[])}else n=e.getAnyType()}return e.isTypeAssignableTo(n,r)}function lte(e,t,n,r){const i=kX(t,n);if(!i.parent)return;const o=mc(i.parent,uu);switch(r){case va.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code:if(!(o&&o.body&&o.type&&XG(o.type,i)))return;return ste(e,o,e.getTypeFromTypeNode(o.type),!1);case va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:if(!o||!QE(o.parent)||!o.body)return;const t=o.parent.arguments.indexOf(o);if(-1===t)return;const n=e.getContextualTypeForArgumentAtIndex(o.parent,t);if(!n)return;return ste(e,o,n,!0);case va.Type_0_is_not_assignable_to_type_1.code:if(!dh(i)||!If(i.parent)&&!NN(i.parent))return;const r=function(e){switch(e.kind){case 260:case 169:case 208:case 172:case 303:return e.initializer;case 291:return e.initializer&&(IN(e.initializer)?e.initializer.expression:void 0);case 304:case 171:case 306:case 348:case 341:return}}(i.parent);if(!r||!uu(r)||!r.body)return;return ste(e,r,e.getTypeAtLocation(i.parent),!0)}}function ute(e,t,n,r){MY(n);const i=lZ(t);e.replaceNode(t,r,YC.createReturnStatement(n),{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.Exclude,suffix:i?";":void 0})}function _te(e,t,n,r,i,o){const a=o||HY(r)?YC.createParenthesizedExpression(r):r;MY(i),RY(i,a),e.replaceNode(t,n.body,a)}function dte(e,t,n,r){e.replaceNode(t,n.body,YC.createParenthesizedExpression(r))}function pte(e,t,n){const r=r_e.ChangeTracker.with(e,(r=>ute(r,e.sourceFile,t,n)));return _8(tte,r,va.Add_a_return_statement,nte,va.Add_all_missing_return_statement)}function fte(e,t,n){const r=r_e.ChangeTracker.with(e,(r=>dte(r,e.sourceFile,t,n)));return _8(tte,r,va.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal,ite,va.Wrap_all_object_literal_with_parentheses)}f8({errorCodes:ote,fixIds:[nte,rte,ite],getCodeActions:function(e){const{program:t,sourceFile:n,span:{start:r},errorCode:i}=e,o=lte(t.getTypeChecker(),n,r,i);if(o)return 0===o.kind?ue([pte(e,o.expression,o.statement)],rP(o.declaration)?function(e,t,n,r){const i=r_e.ChangeTracker.with(e,(i=>_te(i,e.sourceFile,t,n,r,!1)));return _8(tte,i,va.Remove_braces_from_arrow_function_body,rte,va.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues)}(e,o.declaration,o.expression,o.commentSource):void 0):[fte(e,o.declaration,o.expression)]},getAllCodeActions:e=>b8(e,ote,((t,n)=>{const r=lte(e.program.getTypeChecker(),n.file,n.start,n.code);if(r)switch(e.fixId){case nte:ute(t,n.file,r.expression,r.statement);break;case rte:if(!rP(r.declaration))return;_te(t,n.file,r.declaration,r.expression,r.commentSource,!1);break;case ite:if(!rP(r.declaration))return;dte(t,n.file,r.declaration,r.expression);break;default:xn.fail(JSON.stringify(e.fixId))}}))});var mte="fixMissingMember",gte="fixMissingProperties",hte="fixMissingAttributes",yte="fixMissingFunctionDeclaration",vte=[va.Property_0_does_not_exist_on_type_1.code,va.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,va.Property_0_is_missing_in_type_1_but_required_in_type_2.code,va.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,va.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,va.Cannot_find_name_0.code];function bte(e,t,n,r,i){var o;const a=kX(e,t),s=a.parent;if(n===va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code){if(19!==a.kind||!HE(s)||!QE(s.parent))return;const e=T(s.parent.arguments,(e=>e===s));if(e<0)return;const t=r.getResolvedSignature(s.parent);if(!(t&&t.declaration&&t.parameters[e]))return;const n=t.parameters[e].valueDeclaration;if(!(n&&sE(n)&&qD(n.name)))return;const i=$e(r.getUnmatchedProperties(r.getTypeAtLocation(s),r.getParameterType(t,e),!1,!1));if(!p(i))return;return{kind:3,token:n.name,identifier:n.name.text,properties:i,parentDeclaration:s}}if(19===a.kind&&HE(s)){const e=r.getContextualType(s)||r.getTypeAtLocation(s),t=$e(r.getUnmatchedProperties(r.getTypeAtLocation(s),e,!1,!1));if(!p(t))return;return{kind:3,token:s,identifier:"",properties:t,parentDeclaration:s}}if(!hl(a))return;if(qD(a)&&L_(s)&&s.initializer&&HE(s.initializer)){const e=r.getContextualType(a)||r.getTypeAtLocation(a),t=$e(r.getUnmatchedProperties(r.getTypeAtLocation(s.initializer),e,!1,!1));if(!p(t))return;return{kind:3,token:a,identifier:a.text,properties:t,parentDeclaration:s.initializer}}if(qD(a)&&D_(a.parent)){const e=function(e,t,n){const r=e.getContextualType(n.attributes);if(void 0===r)return u;const i=r.getProperties();if(!p(i))return u;const o=new Set;for(const t of n.attributes.properties)if(NN(t)&&o.add(lC(t.name)),AN(t)){const n=e.getTypeAtLocation(t.expression);for(const e of n.getProperties())o.add(e.escapedName)}return F(i,(e=>Ts(e.name,t,1)&&!(16777216&e.flags||48&px(e)||o.has(e.escapedName))))}(r,wS(i.getCompilerOptions()),a.parent);if(!p(e))return;return{kind:4,token:a,attributes:e,parentDeclaration:a.parent}}if(qD(a)){const t=null==(o=r.getContextualType(a))?void 0:o.getNonNullableType();if(t&&16&wx(t)){const n=Se(r.getSignaturesOfType(t,0));if(void 0===n)return;return{kind:5,token:a,signature:n,sourceFile:e,parentDeclaration:Ite(a)}}if(QE(s)&&s.expression===a)return{kind:2,token:a,call:s,sourceFile:e,modifierFlags:0,parentDeclaration:Ite(a)}}if(!GE(s))return;const c=bQ(r.getTypeAtLocation(s.expression)),l=c.symbol;if(!l||!l.declarations)return;if(qD(a)&&QE(s.parent)){const t=S(l.declarations,ZP),n=null==t?void 0:t.getSourceFile();if(t&&n&&!WZ(i,n))return{kind:2,token:a,call:s.parent,sourceFile:e,modifierFlags:32,parentDeclaration:t};const r=S(l.declarations,qN);if(e.commonJsModuleIndicator)return;if(r&&!WZ(i,r))return{kind:2,token:a,call:s.parent,sourceFile:r,modifierFlags:32,parentDeclaration:r}}const _=S(l.declarations,gu);if(!_&&VD(a))return;const d=_||S(l.declarations,(e=>XP(e)||CE(e)));if(d&&!WZ(i,d.getSourceFile())){const e=!CE(d)&&(c.target||c)!==r.getDeclaredTypeOfSymbol(l);if(e&&(VD(a)||XP(d)))return;const t=d.getSourceFile(),n=CE(d)?0:(e?256:0)|(RZ(a.text)?2:0),i=Im(t);return{kind:0,token:a,call:lt(s.parent,QE),modifierFlags:n,parentDeclaration:d,declSourceFile:t,isJSFile:i}}const f=S(l.declarations,YP);return!f||1056&c.flags||VD(a)||WZ(i,f.getSourceFile())?void 0:{kind:1,token:a,parentDeclaration:f}}function xte(e,t,n,r,i){const o=r.text;if(i){if(231===n.kind)return;const r=n.name.getText(),i=Ste(YC.createIdentifier(r),o);e.insertNodeAfter(t,n,i)}else if(VD(r)){const r=YC.createPropertyDeclaration(void 0,o,void 0,void 0,void 0),i=Cte(n);i?e.insertNodeAfter(t,i,r):e.insertMemberAtStart(t,n,r)}else{const r=pv(n);if(!r)return;const i=Ste(YC.createThis(),o);e.insertNodeAtConstructorEnd(t,r,i)}}function Ste(e,t){return YC.createExpressionStatement(YC.createAssignment(YC.createPropertyAccessExpression(e,t),Ate()))}function kte(e,t,n){let r;if(226===n.parent.parent.kind){const i=n.parent.parent,o=n.parent===i.left?i.right:i.left,a=e.getWidenedType(e.getBaseTypeOfLiteralType(e.getTypeAtLocation(o)));r=e.typeToTypeNode(a,t,1)}else{const t=e.getContextualType(n.parent);r=t?e.typeToTypeNode(t,void 0,1):void 0}return r||YC.createKeywordTypeNode(133)}function Tte(e,t,n,r,i,o){const a=o?YC.createNodeArray(YC.createModifiersFromModifierFlags(o)):void 0,s=gu(n)?YC.createPropertyDeclaration(a,r,void 0,i,void 0):YC.createPropertySignature(void 0,r,void 0,i),c=Cte(n);c?e.insertNodeAfter(t,c,s):e.insertMemberAtStart(t,n,s)}function Cte(e){let t;for(const n of e.members){if(!uE(n))break;t=n}return t}function wte(e,t,n,r,i,o,a){const s=$9(a,e.program,e.preferences,e.host),c=die(gu(o)?174:173,e,s,n,r,i,o),l=function(e,t){if(CE(e))return;const n=mc(t,(e=>dE(e)||fE(e)));return n&&n.parent===e?n:void 0}(o,n);l?t.insertNodeAfter(a,l,c):t.insertMemberAtStart(a,o,c),s.writeFixes(t)}function Dte(e,t,{token:n,parentDeclaration:r}){const i=Q(r.members,(e=>{const n=t.getTypeAtLocation(e);return!!(n&&402653316&n.flags)})),o=r.getSourceFile(),a=YC.createEnumMember(n,i?YC.createStringLiteral(n.text):void 0),s=we(r.members);s?e.insertNodeInListAfter(o,s,a,r.members):e.insertMemberAtStart(o,r,a)}function Ete(e,t,n){const r=AQ(t.sourceFile,t.preferences),i=$9(t.sourceFile,t.program,t.preferences,t.host),o=2===n.kind?die(262,t,i,n.call,bc(n.token),n.modifierFlags,n.parentDeclaration):_ie(262,t,r,n.signature,bie(va.Function_not_implemented.message,r),n.token,void 0,void 0,void 0,i);void 0===o&&xn.fail("fixMissingFunctionDeclaration codefix got unexpected error."),BP(n.parentDeclaration)?e.insertNodeBefore(n.sourceFile,n.parentDeclaration,o,!0):e.insertNodeAtEndOfScope(n.sourceFile,n.parentDeclaration,o),i.writeFixes(e)}function Pte(e,t,n){const r=$9(t.sourceFile,t.program,t.preferences,t.host),i=AQ(t.sourceFile,t.preferences),o=t.program.getTypeChecker(),a=n.parentDeclaration.attributes,s=Q(a.properties,AN),c=O(n.attributes,(e=>{const a=Fte(t,o,r,i,o.getTypeOfSymbol(e),n.parentDeclaration),s=YC.createIdentifier(e.name),c=YC.createJsxAttribute(s,YC.createJsxExpression(void 0,a));return OT(s,c),c})),l=YC.createJsxAttributes(s?[...c,...a.properties]:[...a.properties,...c]),u={prefix:a.pos===a.end?" ":void 0};e.replaceNode(t.sourceFile,a,l,u),r.writeFixes(e)}function Nte(e,t,n){const r=$9(t.sourceFile,t.program,t.preferences,t.host),i=AQ(t.sourceFile,t.preferences),o=wS(t.program.getCompilerOptions()),a=t.program.getTypeChecker(),s=O(n.properties,(e=>{const s=Fte(t,a,r,i,a.getTypeOfSymbol(e),n.parentDeclaration);return YC.createPropertyAssignment(function(e,t,n,r){if(td(e)){const t=r.symbolToNode(e,111551,void 0,1073741824);if(t&&oE(t))return t}return HT(e.name,t,0===n,!1,!1)}(e,o,i,a),s)})),c={leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.Exclude,indentation:n.indentation};e.replaceNode(t.sourceFile,n.parentDeclaration,YC.createObjectLiteralExpression([...n.parentDeclaration.properties,...s],!0),c),r.writeFixes(e)}function Fte(e,t,n,r,i,o){if(3&i.flags)return Ate();if(134217732&i.flags)return YC.createStringLiteral("",0===r);if(8&i.flags)return YC.createNumericLiteral(0);if(64&i.flags)return YC.createBigIntLiteral("0n");if(16&i.flags)return YC.createFalse();if(1056&i.flags){const e=i.symbol.exports?ke(i.symbol.exports.values()):i.symbol,n=t.symbolToExpression(i.symbol.parent?i.symbol.parent:i.symbol,111551,void 0,64);return void 0===e||void 0===n?YC.createNumericLiteral(0):YC.createPropertyAccessExpression(n,t.symbolToString(e))}if(256&i.flags)return YC.createNumericLiteral(i.value);if(2048&i.flags)return YC.createBigIntLiteral(i.value);if(128&i.flags)return YC.createStringLiteral(i.value,0===r);if(512&i.flags)return i===t.getFalseType()||i===t.getFalseType(!0)?YC.createFalse():YC.createTrue();if(65536&i.flags)return YC.createNull();if(1048576&i.flags)return g(i.types,(i=>Fte(e,t,n,r,i,o)))??Ate();if(t.isArrayLikeType(i))return YC.createArrayLiteralExpression();if(function(e){return 524288&e.flags&&(128&wx(e)||e.symbol&<(Ee(e.symbol.declarations),CE))}(i)){const a=O(t.getPropertiesOfType(i),(i=>{const a=Fte(e,t,n,r,t.getTypeOfSymbol(i),o);return YC.createPropertyAssignment(i.name,a)}));return YC.createObjectLiteralExpression(a,!0)}if(16&wx(i)){if(void 0===S(i.symbol.declarations||u,_n(SE,_E,dE)))return Ate();const a=t.getSignaturesOfType(i,0);return void 0===a?Ate():_ie(218,e,r,a[0],bie(va.Function_not_implemented.message,r),void 0,void 0,void 0,o,n)??Ate()}if(1&wx(i)){const e=Cx(i.symbol);if(void 0===e||qv(e))return Ate();const t=pv(e);return t&&p(t.parameters)?Ate():YC.createNewExpression(YC.createIdentifier(i.symbol.name),void 0,void 0)}return Ate()}function Ate(){return YC.createIdentifier("undefined")}function Ite(e){if(mc(e,IN)){const t=mc(e.parent,BP);if(t)return t}return Sd(e)}f8({errorCodes:vte,getCodeActions(e){const t=e.program.getTypeChecker(),n=bte(e.sourceFile,e.span.start,e.errorCode,t,e.program);if(n){if(3===n.kind){const t=r_e.ChangeTracker.with(e,(t=>Nte(t,e,n)));return[_8(gte,t,va.Add_missing_properties,gte,va.Add_all_missing_properties)]}if(4===n.kind){const t=r_e.ChangeTracker.with(e,(t=>Pte(t,e,n)));return[_8(hte,t,va.Add_missing_attributes,hte,va.Add_all_missing_attributes)]}if(2===n.kind||5===n.kind){const t=r_e.ChangeTracker.with(e,(t=>Ete(t,e,n)));return[_8(yte,t,[va.Add_missing_function_declaration_0,n.token.text],yte,va.Add_all_missing_function_declarations)]}if(1===n.kind){const t=r_e.ChangeTracker.with(e,(t=>Dte(t,e.program.getTypeChecker(),n)));return[_8(mte,t,[va.Add_missing_enum_member_0,n.token.text],mte,va.Add_all_missing_members)]}return Z(function(e,t){const{parentDeclaration:n,declSourceFile:r,modifierFlags:i,token:o,call:a}=t;if(void 0===a)return;const s=o.text,c=t=>r_e.ChangeTracker.with(e,(i=>wte(e,i,a,o,t,n,r))),l=[_8(mte,c(256&i),[256&i?va.Declare_static_method_0:va.Declare_method_0,s],mte,va.Add_all_missing_members)];return 2&i&&l.unshift(u8(mte,c(2),[va.Declare_private_method_0,s])),l}(e,n),function(e,t){return t.isJSFile?fn(function(e,{parentDeclaration:t,declSourceFile:n,modifierFlags:r,token:i}){if(XP(t)||CE(t))return;const o=r_e.ChangeTracker.with(e,(e=>xte(e,n,t,i,!!(256&r))));if(0===o.length)return;const a=256&r?va.Initialize_static_property_0:VD(i)?va.Declare_a_private_field_named_0:va.Initialize_property_0_in_the_constructor;return _8(mte,o,[a,i.text],mte,va.Add_all_missing_members)}(e,t)):function(e,{parentDeclaration:t,declSourceFile:n,modifierFlags:r,token:i}){const o=i.text,a=256&r,s=kte(e.program.getTypeChecker(),t,i),c=r=>r_e.ChangeTracker.with(e,(e=>Tte(e,n,t,o,s,r))),l=[_8(mte,c(256&r),[a?va.Declare_static_property_0:va.Declare_property_0,o],mte,va.Add_all_missing_members)];return a||VD(i)||(2&r&&l.unshift(u8(mte,c(2),[va.Declare_private_property_0,o])),l.push(function(e,t,n,r,i){const o=YC.createKeywordTypeNode(154),a=YC.createParameterDeclaration(void 0,void 0,"x",void 0,o,void 0),s=YC.createIndexSignature(void 0,[a],i),c=r_e.ChangeTracker.with(e,(e=>e.insertMemberAtStart(t,n,s)));return u8(mte,c,[va.Add_index_signature_for_property_0,r])}(e,n,t,i.text,s))),l}(e,t)}(e,n))}},fixIds:[mte,yte,gte,hte],getAllCodeActions:e=>{const{program:t,fixId:n}=e,r=t.getTypeChecker(),i=new Map,o=new Map;return y8(r_e.ChangeTracker.with(e,(t=>{x8(e,vte,(a=>{const s=bte(a.file,a.start,a.code,r,e.program);if(s&&Fx(i,IB(s.parentDeclaration)+"#"+(3===s.kind?s.identifier:s.token.text)))if(n!==yte||2!==s.kind&&5!==s.kind){if(n===gte&&3===s.kind)Nte(t,e,s);else if(n===hte&&4===s.kind)Pte(t,e,s);else if(1===s.kind&&Dte(t,r,s),0===s.kind){const{parentDeclaration:e,token:t}=s,n=K(o,e,(()=>[]));n.some((e=>e.token.text===t.text))||n.push(s)}}else Ete(t,e,s)})),o.forEach(((n,i)=>{const a=CE(i)?void 0:Lie(i,r);for(const i of n){if(null==a?void 0:a.some((e=>{const t=o.get(e);return!!t&&t.some((({token:e})=>e.text===i.token.text))})))continue;const{parentDeclaration:n,declSourceFile:s,modifierFlags:c,token:l,call:u,isJSFile:_}=i;if(u&&!VD(l))wte(e,t,u,l,256&c,n,s);else if(!_||XP(n)||CE(n)){const e=kte(r,n,l);Tte(t,s,n,l.text,e,256&c)}else xte(t,s,n,l,!!(256&c))}}))})))}});var Ote="addMissingNewOperator",Mte=[va.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];function Lte(e,t,n){const r=ut(function(e,t){let n=kX(e,t.start);const r=js(t);for(;n.endLte(e,t,n)));return[_8(Ote,r,va.Add_missing_new_operator_to_call,Ote,va.Add_missing_new_operator_to_all_calls)]},fixIds:[Ote],getAllCodeActions:e=>b8(e,Mte,((t,n)=>Lte(t,e.sourceFile,n)))});var jte="addMissingParam",Rte="addOptionalParam",Bte=[va.Expected_0_arguments_but_got_1.code];function Jte(e,t,n){const r=mc(kX(e,n),QE);if(void 0===r||0===p(r.arguments))return;const i=t.getTypeChecker(),o=F(i.getTypeAtLocation(r.expression).symbol.declarations,qte);if(void 0===o)return;const a=we(o);if(void 0===a||void 0===a.body||WZ(t,a.getSourceFile()))return;const s=function(e){const t=Pc(e);return t||(KP(e.parent)&&qD(e.parent.name)||uE(e.parent)||sE(e.parent)?e.parent.name:void 0)}(a);if(void 0===s)return;const c=[],l=[],u=p(a.parameters),_=p(r.arguments);if(u>_)return;const d=[a,...Ute(a,o)];for(let e=0,t=0,n=0;e<_;e++){const o=r.arguments[e],s=Ox(o)?Mx(o):o,_=i.getWidenedType(i.getBaseTypeOfLiteralType(i.getTypeAtLocation(o))),p=t{const s=Sd(i),c=$9(s,t,n,r);p(i.parameters)?e.replaceNodeRangeWithNodes(s,Te(i.parameters),De(i.parameters),Vte(c,a,i,o),{joiner:", ",indentation:0,leadingTriviaOption:r_e.LeadingTriviaOption.IncludeAll,trailingTriviaOption:r_e.TrailingTriviaOption.Include}):f(Vte(c,a,i,o),((t,n)=>{0===p(i.parameters)&&0===n?e.insertNodeAt(s,i.parameters.end,t):e.insertNodeAtEndOfList(s,i.parameters,t)})),c.writeFixes(e)}))}function qte(e){switch(e.kind){case 262:case 218:case 174:case 219:return!0;default:return!1}}function Vte(e,t,n,r){const i=O(n.parameters,(e=>YC.createParameterDeclaration(e.modifiers,e.dotDotDotToken,e.name,e.questionToken,e.type,e.initializer)));for(const{pos:n,declaration:o}of r){const r=n>0?i[n-1]:void 0;i.splice(n,0,YC.updateParameterDeclaration(o,o.modifiers,o.dotDotDotToken,o.name,r&&r.questionToken?YC.createToken(58):o.questionToken,Gte(e,o.type,t),o.initializer))}return i}function Ute(e,t){const n=[];for(const r of t)if(Kte(r)){if(p(r.parameters)===p(e.parameters)){n.push(r);continue}if(p(r.parameters)>p(e.parameters))return[]}return n}function Kte(e){return qte(e)&&void 0===e.body}function Wte(e,t,n){return YC.createParameterDeclaration(void 0,void 0,e,n,t,void 0)}function Hte(e,t){return p(e)&&Q(e,(e=>t$te(t,e.program,e.preferences,e.host,r,i))),[p(i)>1?va.Add_missing_parameters_to_0:va.Add_missing_parameter_to_0,n],jte,va.Add_all_missing_parameters)),p(o)&&ue(a,_8(Rte,r_e.ChangeTracker.with(e,(t=>$te(t,e.program,e.preferences,e.host,r,o))),[p(o)>1?va.Add_optional_parameters_to_0:va.Add_optional_parameter_to_0,n],Rte,va.Add_all_optional_parameters)),a},getAllCodeActions:e=>b8(e,Bte,((t,n)=>{const r=Jte(e.sourceFile,e.program,n.start);if(r){const{declarations:n,newParameters:i,newOptionalParameters:o}=r;e.fixId===jte&&$te(t,e.program,e.preferences,e.host,n,i),e.fixId===Rte&&$te(t,e.program,e.preferences,e.host,n,o)}}))});var Xte="installTypesPackage",Qte=va.Cannot_find_module_0_or_its_corresponding_type_declarations.code,Yte=[Qte,va.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code];function Zte(e,t){return{type:"install package",file:e,packageName:t}}function ene(e,t){const n=lt(kX(e,t),wD);if(!n)return;const r=n.text,{packageName:i}=eR(r);return Os(i)?void 0:i}function tne(e,t,n){var r;return n===Qte?fH.nodeCoreModules.has(e)?"@types/node":void 0:(null==(r=t.isKnownTypesPackageName)?void 0:r.call(t,e))?fR(e):void 0}f8({errorCodes:Yte,getCodeActions:function(e){const{host:t,sourceFile:n,span:{start:r}}=e,i=ene(n,r);if(void 0===i)return;const o=tne(i,t,e.errorCode);return void 0===o?[]:[_8("fixCannotFindModule",[],[va.Install_0,o],Xte,va.Install_all_missing_types_packages,Zte(n.fileName,o))]},fixIds:[Xte],getAllCodeActions:e=>b8(e,Yte,((t,n,r)=>{const i=ene(n.file,n.start);if(void 0!==i)switch(e.fixId){case Xte:{const t=tne(i,e.host,n.code);t&&r.push(Zte(n.file.fileName,t));break}default:xn.fail(`Bad fixId: ${e.fixId}`)}}))});var nne=[va.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,va.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,va.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,va.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,va.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,va.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code],rne="fixClassDoesntImplementInheritedAbstractMember";function ine(e,t){return ut(kX(e,t).parent,gu)}function one(e,t,n,r,i){const o=Sh(e),a=n.program.getTypeChecker(),s=a.getTypeAtLocation(o),c=a.getPropertiesOfType(s).filter(ane),l=$9(t,n.program,i,n.host);sie(e,c,t,n,i,l,(n=>r.insertMemberAtStart(t,e,n))),l.writeFixes(r)}function ane(e){const t=Zv(Te(e.getDeclarations()));return!(2&t||!(64&t))}f8({errorCodes:nne,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=r_e.ChangeTracker.with(e,(r=>one(ine(t,n.start),t,e,r,e.preferences)));return 0===r.length?void 0:[_8(rne,r,va.Implement_inherited_abstract_class,rne,va.Implement_all_inherited_abstract_classes)]},fixIds:[rne],getAllCodeActions:function(e){const t=new Map;return b8(e,nne,((n,r)=>{const i=ine(r.file,r.start);Fx(t,IB(i))&&one(i,e.sourceFile,e,n,e.preferences)}))}});var sne="classSuperMustPrecedeThisAccess",cne=[va.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];function lne(e,t,n,r){e.insertNodeAtConstructorStart(t,n,r),e.delete(t,r)}function une(e,t){const n=kX(e,t);if(110!==n.kind)return;const r=Qf(n),i=_ne(r.body);return i&&!i.expression.arguments.some((e=>GE(e)&&e.expression===n))?{constructor:r,superCall:i}:void 0}function _ne(e){return NP(e)&&lf(e.expression)?e:cu(e)?void 0:LI(e,_ne)}f8({errorCodes:cne,getCodeActions(e){const{sourceFile:t,span:n}=e,r=une(t,n.start);if(!r)return;const{constructor:i,superCall:o}=r,a=r_e.ChangeTracker.with(e,(e=>lne(e,t,i,o)));return[_8(sne,a,va.Make_super_call_the_first_statement_in_the_constructor,sne,va.Make_all_super_calls_the_first_statement_in_their_constructor)]},fixIds:[sne],getAllCodeActions(e){const{sourceFile:t}=e,n=new Map;return b8(e,cne,((e,r)=>{const i=une(r.file,r.start);if(!i)return;const{constructor:o,superCall:a}=i;Fx(n,IB(o.parent))&&lne(e,t,o,a)}))}});var dne="constructorForDerivedNeedSuperCall",pne=[va.Constructors_for_derived_classes_must_contain_a_super_call.code];function fne(e,t){const n=kX(e,t);return xn.assert(fE(n.parent),"token should be at the constructor declaration"),n.parent}function mne(e,t,n){const r=YC.createExpressionStatement(YC.createCallExpression(YC.createSuper(),void 0,u));e.insertNodeAtConstructorStart(t,n,r)}f8({errorCodes:pne,getCodeActions(e){const{sourceFile:t,span:n}=e,r=fne(t,n.start),i=r_e.ChangeTracker.with(e,(e=>mne(e,t,r)));return[_8(dne,i,va.Add_missing_super_call,dne,va.Add_all_missing_super_calls)]},fixIds:[dne],getAllCodeActions:e=>b8(e,pne,((t,n)=>mne(t,e.sourceFile,fne(n.file,n.start))))});var gne="fixEnableJsxFlag",hne=[va.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];function yne(e,t){Sie(e,t,"jsx",YC.createStringLiteral("react"))}f8({errorCodes:hne,getCodeActions:function(e){const{configFile:t}=e.program.getCompilerOptions();if(void 0===t)return;const n=r_e.ChangeTracker.with(e,(e=>yne(e,t)));return[u8(gne,n,va.Enable_the_jsx_flag_in_your_configuration_file)]},fixIds:[gne],getAllCodeActions:e=>b8(e,hne,(t=>{const{configFile:n}=e.program.getCompilerOptions();void 0!==n&&yne(t,n)}))});var vne="fixNaNEquality",bne=[va.This_condition_will_always_return_0.code];function xne(e,t,n){const r=S(e.getSemanticDiagnostics(t),(e=>e.start===n.start&&e.length===n.length));if(void 0===r||void 0===r.relatedInformation)return;const i=S(r.relatedInformation,(e=>e.code===va.Did_you_mean_0.code));if(void 0===i||void 0===i.file||void 0===i.start||void 0===i.length)return;const o=Eie(i.file,Gs(i.start,i.length));return void 0!==o&&Xu(o)&&uP(o.parent)?{suggestion:kne(i.messageText),expression:o.parent,arg:o}:void 0}function Sne(e,t,n,r){const i=YC.createCallExpression(YC.createPropertyAccessExpression(YC.createIdentifier("Number"),YC.createIdentifier("isNaN")),void 0,[n]),o=r.operatorToken.kind;e.replaceNode(t,r,38===o||36===o?YC.createPrefixUnaryExpression(54,i):i)}function kne(e){const[,t]=Jq(e,"\n",0).match(/'(.*)'/)||[];return t}f8({errorCodes:bne,getCodeActions(e){const{sourceFile:t,span:n,program:r}=e,i=xne(r,t,n);if(void 0===i)return;const{suggestion:o,expression:a,arg:s}=i,c=r_e.ChangeTracker.with(e,(e=>Sne(e,t,s,a)));return[_8(vne,c,[va.Use_0,o],vne,va.Use_Number_isNaN_in_all_conditions)]},fixIds:[vne],getAllCodeActions:e=>b8(e,bne,((t,n)=>{const r=xne(e.program,n.file,Gs(n.start,n.length));r&&Sne(t,n.file,r.arg,r.expression)}))}),f8({errorCodes:[va.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,va.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,va.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code],getCodeActions:function(e){const t=e.program.getCompilerOptions(),{configFile:n}=t;if(void 0===n)return;const r=[],i=DS(t);if(i>=5&&i<99){const t=r_e.ChangeTracker.with(e,(e=>{Sie(e,n,"module",YC.createStringLiteral("esnext"))}));r.push(u8("fixModuleOption",t,[va.Set_the_module_option_in_your_configuration_file_to_0,"esnext"]))}const o=wS(t);if(o<4||o>99){const t=r_e.ChangeTracker.with(e,(e=>{if(!Hf(n))return;const t=[["target",YC.createStringLiteral("es2017")]];1===i&&t.push(["module",YC.createStringLiteral("commonjs")]),xie(e,n,t)}));r.push(u8("fixTargetOption",t,[va.Set_the_target_option_in_your_configuration_file_to_0,"es2017"]))}return r.length?r:void 0}});var Tne="fixPropertyAssignment",Cne=[va.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code];function wne(e,t,n){e.replaceNode(t,n,YC.createPropertyAssignment(n.name,n.objectAssignmentInitializer))}function Dne(e,t){return ut(kX(e,t).parent,JN)}f8({errorCodes:Cne,fixIds:[Tne],getCodeActions(e){const{sourceFile:t,span:n}=e,r=Dne(t,n.start),i=r_e.ChangeTracker.with(e,(t=>wne(t,e.sourceFile,r)));return[_8(Tne,i,[va.Change_0_to_1,"=",":"],Tne,[va.Switch_each_misused_0_to_1,"=",":"])]},getAllCodeActions:e=>b8(e,Cne,((e,t)=>wne(e,t.file,Dne(t.file,t.start))))});var Ene="extendsInterfaceBecomesImplements",Pne=[va.Cannot_extend_an_interface_0_Did_you_mean_implements.code];function Nne(e,t){const n=Zf(kX(e,t)).heritageClauses,r=n[0].getFirstToken();return 96===r.kind?{extendsToken:r,heritageClauses:n}:void 0}function Fne(e,t,n,r){if(e.replaceNode(t,n,YC.createToken(119)),2===r.length&&96===r[0].token&&119===r[1].token){const n=r[1].getFirstToken(),i=n.getFullStart();e.replaceRange(t,{pos:i,end:i},YC.createToken(28));const o=t.text;let a=n.end;for(;aFne(e,t,r,i)));return[_8(Ene,o,va.Change_extends_to_implements,Ene,va.Change_all_extended_interfaces_to_implements)]},fixIds:[Ene],getAllCodeActions:e=>b8(e,Pne,((e,t)=>{const n=Nne(t.file,t.start);n&&Fne(e,t.file,n.extendsToken,n.heritageClauses)}))});var Ane="forgottenThisPropertyAccess",Ine=va.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,One=[va.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,va.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code,Ine];function Mne(e,t,n){const r=kX(e,t);if(qD(r)||VD(r))return{node:r,className:n===Ine?Zf(r).name.text:void 0}}function Lne(e,t,{node:n,className:r}){MY(n),e.replaceNode(t,n,YC.createPropertyAccessExpression(r?YC.createIdentifier(r):YC.createThis(),n))}f8({errorCodes:One,getCodeActions(e){const{sourceFile:t}=e,n=Mne(t,e.span.start,e.errorCode);if(!n)return;const r=r_e.ChangeTracker.with(e,(e=>Lne(e,t,n)));return[_8(Ane,r,[va.Add_0_to_unresolved_variable,n.className||"this"],Ane,va.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]},fixIds:[Ane],getAllCodeActions:e=>b8(e,One,((t,n)=>{const r=Mne(n.file,n.start,n.code);r&&Lne(t,e.sourceFile,r)}))});var jne="fixInvalidJsxCharacters_expression",Rne="fixInvalidJsxCharacters_htmlEntity",Bne=[va.Unexpected_token_Did_you_mean_or_gt.code,va.Unexpected_token_Did_you_mean_or_rbrace.code];f8({errorCodes:Bne,fixIds:[jne,Rne],getCodeActions(e){const{sourceFile:t,preferences:n,span:r}=e,i=r_e.ChangeTracker.with(e,(e=>zne(e,n,t,r.start,!1))),o=r_e.ChangeTracker.with(e,(e=>zne(e,n,t,r.start,!0)));return[_8(jne,i,va.Wrap_invalid_character_in_an_expression_container,jne,va.Wrap_all_invalid_characters_in_an_expression_container),_8(Rne,o,va.Convert_invalid_character_to_its_html_entity_code,Rne,va.Convert_all_invalid_characters_to_HTML_entity_code)]},getAllCodeActions:e=>b8(e,Bne,((t,n)=>zne(t,e.preferences,n.file,n.start,e.fixId===Rne)))});var Jne={">":">","}":"}"};function zne(e,t,n,r,i){const o=n.getText()[r];if(!function(e){return Le(Jne,e)}(o))return;const a=i?Jne[o]:`{${XY(n,t,o)}}`;e.replaceRangeWithText(n,{pos:r,end:r+1},a)}var $ne="deleteUnmatchedParameter",qne="renameUnmatchedParameter",Vne=[va.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code];function Une(e,t){const n=kX(e,t);if(n.parent&&xF(n.parent)&&qD(n.parent.name)){const e=n.parent,t=Wg(e),r=Ug(e);if(t&&r)return{jsDocHost:t,signature:r,name:n.parent.name,jsDocParameterTag:e}}}f8({fixIds:[$ne,qne],errorCodes:Vne,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=[],i=Une(t,n.start);if(i)return ue(r,function(e,{name:t,jsDocHost:n,jsDocParameterTag:r}){const i=r_e.ChangeTracker.with(e,(t=>t.filterJSDocTags(e.sourceFile,n,(e=>e!==r))));return _8($ne,i,[va.Delete_unused_param_tag_0,t.getText(e.sourceFile)],$ne,va.Delete_all_unused_param_tags)}(e,i)),ue(r,function(e,{name:t,jsDocHost:n,signature:r,jsDocParameterTag:i}){if(!p(r.parameters))return;const o=e.sourceFile,a=ll(r),s=new Set;for(const e of a)xF(e)&&qD(e.name)&&s.add(e.name.escapedText);const c=g(r.parameters,(e=>qD(e.name)&&!s.has(e.name.escapedText)?e.name.getText(o):void 0));if(void 0===c)return;const l=YC.updateJSDocParameterTag(i,i.tagName,YC.createIdentifier(c),i.isBracketed,i.typeExpression,i.isNameFirst,i.comment),u=r_e.ChangeTracker.with(e,(e=>e.replaceJSDocComment(o,n,O(a,(e=>e===i?l:e)))));return u8(qne,u,[va.Rename_param_tag_name_0_to_1,t.getText(o),c])}(e,i)),r},getAllCodeActions:function(e){const t=new Map;return y8(r_e.ChangeTracker.with(e,(n=>{x8(e,Vne,(({file:e,start:n})=>{const r=Une(e,n);r&&t.set(r.signature,ue(t.get(r.signature),r.jsDocParameterTag))})),t.forEach(((t,r)=>{if(e.fixId===$ne){const e=new Set(t);n.filterJSDocTags(r.getSourceFile(),r,(t=>!e.has(t)))}}))})))}});var Kne="fixUnreferenceableDecoratorMetadata";f8({errorCodes:[va.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code],getCodeActions:e=>{const t=function(e,t,n){const r=lt(kX(e,n),qD);if(!r||183!==r.parent.kind)return;const i=t.getTypeChecker().getSymbolAtLocation(r);return S((null==i?void 0:i.declarations)||u,_n(oN,fN,rN))}(e.sourceFile,e.program,e.span.start);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>276===t.kind&&function(e,t,n,r){B2.doChangeNamedToNamespaceOrDefault(t,r,e,n.parent)}(n,e.sourceFile,t,e.program))),r=r_e.ChangeTracker.with(e,(n=>function(e,t,n,r){if(271===n.kind)return void e.insertModifierBefore(t,156,n.name);const i=273===n.kind?n:n.parent.parent;if(i.name&&i.namedBindings)return;const o=r.getTypeChecker();Eg(i,(e=>{if(111551&mx(e.symbol,o).flags)return!0}))||e.insertModifierBefore(t,156,i)}(n,e.sourceFile,t,e.program)));let i;return n.length&&(i=ue(i,u8(Kne,n,va.Convert_named_imports_to_namespace_import))),r.length&&(i=ue(i,u8(Kne,r,va.Use_import_type))),i},fixIds:[Kne]});var Wne="unusedIdentifier",Hne="unusedIdentifier_prefix",Gne="unusedIdentifier_delete",Xne="unusedIdentifier_deleteImports",Qne="unusedIdentifier_infer",Yne=[va._0_is_declared_but_its_value_is_never_read.code,va._0_is_declared_but_never_used.code,va.Property_0_is_declared_but_its_value_is_never_read.code,va.All_imports_in_import_declaration_are_unused.code,va.All_destructured_elements_are_unused.code,va.All_variables_are_unused.code,va.All_type_parameters_are_unused.code];function Zne(e,t,n){e.replaceNode(t,n.parent,YC.createKeywordTypeNode(159))}function ere(e,t){return _8(Wne,e,t,Gne,va.Delete_all_unused_declarations)}function tre(e,t,n){e.delete(t,xn.checkDefined(ut(n.parent,Sp).typeParameters,"The type parameter to delete should exist"))}function nre(e){return 102===e.kind||80===e.kind&&(276===e.parent.kind||273===e.parent.kind)}function rre(e){return 102===e.kind?lt(e.parent,iN):void 0}function ire(e,t){return WP(t.parent)&&Te(t.parent.getChildren(e))===t}function ore(e,t,n){e.delete(t,243===n.parent.kind?n.parent:n)}function are(e,t,n,r){t!==va.Property_0_is_declared_but_its_value_is_never_read.code&&(140===r.kind&&(r=ut(r.parent,OE).typeParameter.name),qD(r)&&function(e){switch(e.parent.kind){case 169:case 168:return!0;case 260:switch(e.parent.parent.parent.kind){case 250:case 249:return!0}}return!1}(r)&&(e.replaceNode(n,r,YC.createIdentifier(`_${r.text}`)),sE(r.parent)&&Oc(r.parent).forEach((t=>{qD(t.name)&&e.replaceNode(n,t.name,YC.createIdentifier(`_${t.name.text}`))}))))}function sre(e,t,n,r,i,o,a,s){!function(e,t,n,r,i,o,a,s){const{parent:c}=e;if(sE(c))!function(e,t,n,r,i,o,a,s=!1){if(function(e,t,n,r,i,o,a){const{parent:s}=n;switch(s.kind){case 174:case 176:const c=s.parameters.indexOf(n),l=dE(s)?s.name:s,u=Rse.Core.getReferencedSymbolsForNode(s.pos,l,i,r,o);if(u)for(const e of u)for(const t of e.references)if(t.kind===Rse.EntryKind.Node){const e=tE(t.node)&&QE(t.node.parent)&&t.node.parent.arguments.length>c,r=GE(t.node.parent)&&tE(t.node.parent.expression)&&QE(t.node.parent.parent)&&t.node.parent.parent.arguments.length>c,i=(dE(t.node.parent)||_E(t.node.parent))&&t.node.parent!==n.parent&&t.node.parent.parameters.length>c;if(e||r||i)return!1}return!0;case 262:return!s.name||!function(e,t,n){return!!Rse.Core.eachSymbolReferenceInFile(n,e,t,(e=>qD(e)&&QE(e.parent)&&e.parent.arguments.includes(e)))}(e,t,s.name)||lre(s,n,a);case 218:case 219:return lre(s,n,a);case 178:return!1;case 177:return!0;default:return xn.failBadSyntaxKind(s)}}(r,t,n,i,o,a,s))if(n.modifiers&&n.modifiers.length>0&&(!qD(n.name)||Rse.Core.isSymbolReferencedInFile(n.name,r,t)))for(const r of n.modifiers)iu(r)&&e.deleteModifier(t,r);else!n.initializer&&cre(n,r,i)&&e.delete(t,n)}(t,n,c,r,i,o,a,s);else if(!(s&&qD(e)&&Rse.Core.isSymbolReferencedInFile(e,r,n))){const r=oN(c)?e:oE(c)?c.parent:c;xn.assert(r!==n,"should not delete whole source file"),t.delete(n,r)}}(t,n,e,r,i,o,a,s),qD(t)&&Rse.Core.eachSymbolReferenceInFile(t,r,e,(t=>{var r;GE(t.parent)&&t.parent.name===t&&(t=t.parent),!s&&(uP((r=t).parent)&&r.parent.left===r||(lP(r.parent)||cP(r.parent))&&r.parent.operand===r)&&NP(r.parent.parent)&&n.delete(e,t.parent.parent)}))}function cre(e,t,n){const r=e.parent.parameters.indexOf(e);return!Rse.Core.someSignatureUsage(e.parent,n,t,((e,t)=>!t||t.arguments.length>r))}function lre(e,t,n){const r=e.parameters,i=r.indexOf(t);return xn.assert(-1!==i,"The parameter should already be in the list"),n?r.slice(i+1).every((e=>qD(e.name)&&!e.symbol.isReferenced)):i===r.length-1}f8({errorCodes:Yne,getCodeActions(e){const{errorCode:t,sourceFile:n,program:r,cancellationToken:i}=e,o=r.getTypeChecker(),a=r.getSourceFiles(),s=kX(n,e.span.start);if(CF(s))return[ere(r_e.ChangeTracker.with(e,(e=>e.delete(n,s))),va.Remove_template_tag)];if(30===s.kind)return[ere(r_e.ChangeTracker.with(e,(e=>tre(e,n,s))),va.Remove_type_parameters)];const c=rre(s);if(c){const t=r_e.ChangeTracker.with(e,(e=>e.delete(n,c)));return[_8(Wne,t,[va.Remove_import_from_0,Px(c)],Xne,va.Delete_all_unused_imports)]}if(nre(s)){const t=r_e.ChangeTracker.with(e,(e=>sre(n,s,e,o,a,r,i,!1)));if(t.length)return[_8(Wne,t,[va.Remove_unused_declaration_for_Colon_0,s.getText(n)],Xne,va.Delete_all_unused_imports)]}if(VE(s.parent)||UE(s.parent)){if(sE(s.parent.parent)){const t=s.parent.elements,r=[t.length>1?va.Remove_unused_declarations_for_Colon_0:va.Remove_unused_declaration_for_Colon_0,O(t,(e=>e.getText(n))).join(", ")];return[ere(r_e.ChangeTracker.with(e,(e=>function(e,t,n){f(n.elements,(n=>e.delete(t,n)))}(e,n,s.parent))),r)]}return[ere(r_e.ChangeTracker.with(e,(t=>function(e,t,n,{parent:r}){if(KP(r)&&r.initializer&&zu(r.initializer))if(WP(r.parent)&&p(r.parent.declarations)>1){const i=r.parent.parent,o=i.getStart(n),a=i.end;t.delete(n,r),t.insertNodeAt(n,a,r.initializer,{prefix:gY(e.host,e.formatContext.options)+n.text.slice(PY(n.text,o-1),o),suffix:lZ(n)?";":""})}else t.replaceNode(n,r.parent,r.initializer);else t.delete(n,r)}(e,t,n,s.parent))),va.Remove_unused_destructuring_declaration)]}if(ire(n,s))return[ere(r_e.ChangeTracker.with(e,(e=>ore(e,n,s.parent))),va.Remove_variable_statement)];if(qD(s)&&HP(s.parent))return[ere(r_e.ChangeTracker.with(e,(e=>function(e,t,n){const r=n.symbol.declarations;if(r)for(const n of r)e.delete(t,n)}(e,n,s.parent))),[va.Remove_unused_declaration_for_Colon_0,s.getText(n)])];const l=[];if(140===s.kind){const t=r_e.ChangeTracker.with(e,(e=>Zne(e,n,s))),r=ut(s.parent,OE).typeParameter.name.text;l.push(_8(Wne,t,[va.Replace_infer_0_with_unknown,r],Qne,va.Replace_all_unused_infer_with_unknown))}else{const t=r_e.ChangeTracker.with(e,(e=>sre(n,s,e,o,a,r,i,!1)));if(t.length){const e=oE(s.parent)?s.parent:s;l.push(ere(t,[va.Remove_unused_declaration_for_Colon_0,e.getText(n)]))}}const u=r_e.ChangeTracker.with(e,(e=>are(e,t,n,s)));return u.length&&l.push(_8(Wne,u,[va.Prefix_0_with_an_underscore,s.getText(n)],Hne,va.Prefix_all_unused_declarations_with_where_possible)),l},fixIds:[Hne,Gne,Xne,Qne],getAllCodeActions:e=>{const{sourceFile:t,program:n,cancellationToken:r}=e,i=n.getTypeChecker(),o=n.getSourceFiles();return b8(e,Yne,((a,s)=>{const c=kX(t,s.start);switch(e.fixId){case Hne:are(a,s.code,t,c);break;case Xne:{const e=rre(c);e?a.delete(t,e):nre(c)&&sre(t,c,a,i,o,n,r,!0);break}case Gne:if(140===c.kind||nre(c))break;if(CF(c))a.delete(t,c);else if(30===c.kind)tre(a,t,c);else if(VE(c.parent)){if(c.parent.parent.initializer)break;sE(c.parent.parent)&&!cre(c.parent.parent,i,o)||a.delete(t,c.parent.parent)}else{if(UE(c.parent.parent)&&c.parent.parent.parent.initializer)break;ire(t,c)?ore(a,t,c.parent):sre(t,c,a,i,o,n,r,!0)}break;case Qne:140===c.kind&&Zne(a,t,c);break;default:xn.fail(JSON.stringify(e.fixId))}}))}});var ure="fixUnreachableCode",_re=[va.Unreachable_code_detected.code];function dre(e,t,n,r,i){const o=kX(t,n),a=mc(o,b_);if(a.getStart(t)!==o.getStart(t)){const e=JSON.stringify({statementKind:xn.formatSyntaxKind(a.kind),tokenKind:xn.formatSyntaxKind(o.kind),errorCode:i,start:n,length:r});xn.fail("Token and statement should start at the same point. "+e)}const s=(DP(a.parent)?a.parent:a).parent;if(!DP(a.parent)||a===Te(a.parent.statements))switch(s.kind){case 245:if(s.elseStatement){if(DP(a.parent))break;return void e.replaceNode(t,a,YC.createBlock(u))}case 247:case 248:return void e.delete(t,s)}if(DP(a.parent)){const i=n+r,o=xn.checkDefined(function(e,t){let n;for(const t of e){if(!(t.posdre(t,e.sourceFile,e.span.start,e.span.length,e.errorCode)));return[_8(ure,t,va.Remove_unreachable_code,ure,va.Remove_all_unreachable_code)]},fixIds:[ure],getAllCodeActions:e=>b8(e,_re,((e,t)=>dre(e,t.file,t.start,t.length,t.code)))});var pre="fixUnusedLabel",fre=[va.Unused_label.code];function mre(e,t,n){const r=kX(t,n),i=ut(r.parent,$P),o=r.getStart(t),a=i.statement.getStart(t),s=ix(o,a,t)?a:as(t.text,uX(i,59,t).end,!0);e.deleteRange(t,{pos:o,end:s})}f8({errorCodes:fre,getCodeActions(e){const t=r_e.ChangeTracker.with(e,(t=>mre(t,e.sourceFile,e.span.start)));return[_8(pre,t,va.Remove_unused_label,pre,va.Remove_all_unused_labels)]},fixIds:[pre],getAllCodeActions:e=>b8(e,fre,((e,t)=>mre(e,t.file,t.start)))});var gre="fixJSDocTypes_plain",hre="fixJSDocTypes_nullable",yre=[va.JSDoc_types_can_only_be_used_inside_documentation_comments.code,va._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code,va._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code];function vre(e,t,n,r,i){e.replaceNode(t,n,i.typeToTypeNode(r,n,void 0))}function bre(e,t,n){const r=mc(kX(e,t),xre),i=r&&r.type;return i&&{typeNode:i,type:Sre(n,i)}}function xre(e){switch(e.kind){case 234:case 179:case 180:case 262:case 177:case 181:case 200:case 174:case 173:case 169:case 172:case 171:case 178:case 265:case 216:case 260:return!0;default:return!1}}function Sre(e,t){if(ZN(t)){const n=e.getTypeFromTypeNode(t.type);return n===e.getNeverType()||n===e.getVoidType()?n:e.getUnionType(ue([n,e.getUndefinedType()],t.postfix?void 0:e.getNullType()))}return e.getTypeFromTypeNode(t)}f8({errorCodes:yre,getCodeActions(e){const{sourceFile:t}=e,n=e.program.getTypeChecker(),r=bre(t,e.span.start,n);if(!r)return;const{typeNode:i,type:o}=r,a=i.getText(t),s=[c(o,gre,va.Change_all_jsdoc_style_types_to_TypeScript)];return 314===i.kind&&s.push(c(o,hre,va.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)),s;function c(r,o,s){return _8("jdocTypes",r_e.ChangeTracker.with(e,(e=>vre(e,t,i,r,n))),[va.Change_0_to_1,a,n.typeToString(r)],o,s)}},fixIds:[gre,hre],getAllCodeActions(e){const{fixId:t,program:n,sourceFile:r}=e,i=n.getTypeChecker();return b8(e,yre,((e,n)=>{const o=bre(n.file,n.start,i);if(!o)return;const{typeNode:a,type:s}=o,c=314===a.kind&&t===hre?i.getNullableType(s,32768):s;vre(e,r,a,c,i)}))}});var kre="fixMissingCallParentheses",Tre=[va.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code];function Cre(e,t,n){e.replaceNodeWithText(t,n,`${n.text}()`)}function wre(e,t){const n=kX(e,t);if(GE(n.parent)){let e=n.parent;for(;GE(e.parent);)e=e.parent;return e.name}if(qD(n))return n}f8({errorCodes:Tre,fixIds:[kre],getCodeActions(e){const{sourceFile:t,span:n}=e,r=wre(t,n.start);if(!r)return;const i=r_e.ChangeTracker.with(e,(t=>Cre(t,e.sourceFile,r)));return[_8(kre,i,va.Add_missing_call_parentheses,kre,va.Add_all_missing_call_parentheses)]},getAllCodeActions:e=>b8(e,Tre,((e,t)=>{const n=wre(t.file,t.start);n&&Cre(e,t.file,n)}))});var Dre="fixMissingTypeAnnotationOnExports",Ere="add-annotation",Pre="add-type-assertion",Nre=[va.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,va.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,va.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code,va.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,va.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,va.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code,va.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code,va.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code,va.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code,va.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code,va.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code,va.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code,va.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code,va.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code,va.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code,va.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code,va.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code,va.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code,va.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations.code,va.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code,va.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code],Fre=new Set([177,174,172,262,218,219,260,169,277,263,206,207]);function Are(e,t,n,r,i){const o=Ire(n,r,i);o.result&&o.textChanges.length&&t.push(_8(e,o.textChanges,o.result,Dre,va.Add_all_missing_type_annotations))}function Ire(e,t,n){const r={typeNode:void 0,mutatedTarget:!1},i=r_e.ChangeTracker.fromContext(e),o=e.sourceFile,a=e.program,s=a.getTypeChecker(),c=wS(a.getCompilerOptions()),l=$9(e.sourceFile,e.program,e.preferences,e.host),u=new Set,_=new Set,d=rq({preserveSourceNewlines:!1}),p=n({addTypeAnnotation:function(t){e.cancellationToken.throwIfCancellationRequested();const n=kX(o,t.start),r=g(n);if(r)return HP(r)?function(e){var t;if(null==_?void 0:_.has(e))return;null==_||_.add(e);const n=s.getTypeAtLocation(e),r=s.getPropertiesOfType(n);if(!e.name||0===r.length)return;const c=[];for(const t of r)Ts(t.name,wS(a.getCompilerOptions()))&&(t.valueDeclaration&&KP(t.valueDeclaration)||c.push(YC.createVariableStatement([YC.createModifier(95)],YC.createVariableDeclarationList([YC.createVariableDeclaration(t.name,void 0,w(s.getTypeOfSymbol(t),e),void 0)]))));if(0===c.length)return;const l=[];(null==(t=e.modifiers)?void 0:t.some((e=>95===e.kind)))&&l.push(YC.createModifier(95)),l.push(YC.createModifier(138));const u=YC.createModuleDeclaration(l,e.name,YC.createModuleBlock(c),101441696);return i.insertNodeAfter(o,e,u),[va.Annotate_types_of_properties_expando_function_in_a_namespace]}(r):h(r);const c=mc(n,(e=>Fre.has(e.kind)&&(!VE(e)&&!UE(e)||KP(e.parent))));return c?h(c):void 0},addInlineAssertion:function(t){e.cancellationToken.throwIfCancellationRequested();const n=kX(o,t.start);if(g(n))return;const r=E(n,t);if(!r||rh(r)||rh(r.parent))return;const a=Xu(r),c=JN(r);if(!c&&h_(r))return;if(mc(r,Eu))return;if(mc(r,$N))return;if(a&&(mc(r,jN)||mc(r,wu)))return;if(fP(r))return;const l=mc(r,KP),u=l&&s.getTypeAtLocation(l);if(u&&8192&u.flags)return;if(!a&&!c)return;const{typeNode:_,mutatedTarget:d}=x(r,u);return _&&!d?(c?i.insertNodeAt(o,r.end,m(NY(r.name),_),{prefix:": "}):a?i.replaceNode(o,r,function(e,t){return f(e)&&(e=YC.createParenthesizedExpression(e)),YC.createAsExpression(YC.createSatisfiesExpression(e,NY(t)),t)}(NY(r),_)):xn.assertNever(r),[va.Add_satisfies_and_an_inline_type_assertion_with_0,D(_)]):void 0},extractAsVariable:function(t){e.cancellationToken.throwIfCancellationRequested();const n=E(kX(o,t.start),t);if(!n||rh(n)||rh(n.parent))return;if(!Xu(n))return;if(WE(n))return i.replaceNode(o,n,m(n,YC.createTypeReferenceNode("const"))),[va.Mark_array_literal_as_const];const r=mc(n,BN);if(r){if(r===n.parent&&vb(n))return;const e=YC.createUniqueName(n3(n,o,s,o),16);let t=n,a=n;if(fP(t)&&(t=ah(t.parent),a=T(t.parent)?t=t.parent:m(t,YC.createTypeReferenceNode("const"))),vb(t))return;const c=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(e,void 0,void 0,a)],2)),l=mc(n,b_);return i.insertNodeBefore(o,l,c),i.replaceNode(o,t,YC.createAsExpression(YC.cloneNode(e),YC.createTypeQueryNode(YC.cloneNode(e)))),[va.Extract_to_variable_and_replace_with_0_as_typeof_0,D(e)]}}});return l.writeFixes(i),{result:p,textChanges:i.getChanges()};function f(e){return!(vb(e)||QE(e)||HE(e)||WE(e))}function m(e,t){return f(e)&&(e=YC.createParenthesizedExpression(e)),YC.createAsExpression(e,t)}function g(e){const t=mc(e,(e=>b_(e)?"quit":hC(e)));if(t&&hC(t)){let e=t;if(uP(e)&&(e=e.left,!hC(e)))return;const n=s.getTypeAtLocation(e.expression);if(!n)return;if(Q(s.getPropertiesOfType(n),(e=>e.valueDeclaration===t||e.valueDeclaration===t.parent))){const e=n.symbol.valueDeclaration;if(e){if(UT(e)&&KP(e.parent))return e.parent;if(HP(e))return e}}}}function h(e){if(!(null==u?void 0:u.has(e)))switch(null==u||u.add(e),e.kind){case 169:case 172:case 260:return function(e){const{typeNode:t}=x(e);if(t)return e.type?i.replaceNode(Sd(e),e.type,t):i.tryInsertTypeAnnotation(Sd(e),e,t),[va.Add_annotation_of_type_0,D(t)]}(e);case 219:case 218:case 262:case 174:case 177:return function(e,t){if(e.type)return;const{typeNode:n}=x(e);return n?(i.tryInsertTypeAnnotation(t,e,n),[va.Add_return_type_0,D(n)]):void 0}(e,o);case 277:return function(e){if(e.isExportEquals)return;const{typeNode:t}=x(e.expression);if(!t)return;const n=YC.createUniqueName("_default");return i.replaceNodeWithNodes(o,e,[YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(n,void 0,t,e.expression)],2)),YC.updateExportAssignment(e,null==e?void 0:e.modifiers,n)]),[va.Extract_default_export_to_variable]}(e);case 263:return function(e){var t,n;const r=null==(t=e.heritageClauses)?void 0:t.find((e=>96===e.token)),a=null==r?void 0:r.types[0];if(!a)return;const{typeNode:s}=x(a.expression);if(!s)return;const c=YC.createUniqueName(e.name?e.name.text+"Base":"Anonymous",16),l=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(c,void 0,s,a.expression)],2));i.insertNodeBefore(o,e,l);const u=bs(o.text,a.end),_=(null==(n=null==u?void 0:u[u.length-1])?void 0:n.end)??a.end;return i.replaceRange(o,{pos:a.getFullStart(),end:_},c,{prefix:" "}),[va.Extract_base_class_to_variable]}(e);case 206:case 207:return function(e){var t;const n=e.parent,r=e.parent.parent.parent;if(!n.initializer)return;let a;const s=[];if(qD(n.initializer))a={expression:{kind:3,identifier:n.initializer}};else{const e=YC.createUniqueName("dest",16);a={expression:{kind:3,identifier:e}},s.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(e,void 0,void 0,n.initializer)],2)))}const c=[];UE(e)?y(e,c,a):v(e,c,a);const l=new Map;for(const e of c){if(e.element.propertyName&&oE(e.element.propertyName)){const t=e.element.propertyName.expression,n=YC.getGeneratedNameForNode(t),r=YC.createVariableDeclaration(n,void 0,void 0,t),i=YC.createVariableDeclarationList([r],2),o=YC.createVariableStatement(void 0,i);s.push(o),l.set(t,n)}const n=e.element.name;if(UE(n))y(n,c,e);else if(VE(n))v(n,c,e);else{const{typeNode:i}=x(n);let o=b(e,l);if(e.element.initializer){const n=null==(t=e.element)?void 0:t.propertyName,r=YC.createUniqueName(n&&qD(n)?n.text:"temp",16);s.push(YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(r,void 0,void 0,o)],2))),o=YC.createConditionalExpression(YC.createBinaryExpression(r,YC.createToken(37),YC.createIdentifier("undefined")),YC.createToken(58),e.element.initializer,YC.createToken(59),o)}const a=Bv(r,32)?[YC.createToken(95)]:void 0;s.push(YC.createVariableStatement(a,YC.createVariableDeclarationList([YC.createVariableDeclaration(n,void 0,i,o)],2)))}}return r.declarationList.declarations.length>1&&s.push(YC.updateVariableStatement(r,r.modifiers,YC.updateVariableDeclarationList(r.declarationList,r.declarationList.declarations.filter((t=>t!==e.parent))))),i.replaceNodeWithNodes(o,r,s),[va.Extract_binding_expressions_to_variable]}(e);default:throw new Error(`Cannot find a fix for the given node ${e.kind}`)}}function y(e,t,n){for(let r=0;r=0;--e){const i=n[e].expression;0===i.kind?r=YC.createPropertyAccessChain(r,void 0,YC.createIdentifier(i.text)):1===i.kind?r=YC.createElementAccessExpression(r,t.get(i.computed)):2===i.kind&&(r=YC.createElementAccessExpression(r,i.arrayIndex))}return r}function x(e,n){if(1===t)return C(e);let i=rh(e)?function(e){const t=s.getSignatureFromDeclaration(e);if(t)return s.getReturnTypeOfSignature(t)}(e):s.getTypeAtLocation(e);if(!i)return r;if(2===t){n&&(i=n);const e=s.getWidenedLiteralType(i);if(s.isTypeAssignableTo(e,i))return r;i=e}sE(e)&&s.requiresAddingImplicitUndefined(e)&&(i=s.getUnionType([s.getUndefinedType(),i],0));const a=(KP(e)||uE(e)&&Bv(e,264))&&8192&i.flags?1048576:0;return{typeNode:w(i,mc(e,h_)??o,a),mutatedTarget:!1}}function S(e){return YC.createTypeQueryNode(NY(e))}function k(e,t,n,a,s,c,l,u){const _=[],d=[];let p;const f=mc(e,b_);for(const t of a(e))s(t)?(g(),vb(t.expression)?(_.push(S(t.expression)),d.push(t)):m(t.expression)):(p??(p=[])).push(t);return 0===d.length?r:(g(),i.replaceNode(o,e,l(d)),{typeNode:u(_),mutatedTarget:!0});function m(e){const r=YC.createUniqueName(t+"_Part"+(d.length+1),16),a=n?YC.createAsExpression(e,YC.createTypeReferenceNode("const")):e,s=YC.createVariableStatement(void 0,YC.createVariableDeclarationList([YC.createVariableDeclaration(r,void 0,void 0,a)],2));i.insertNodeBefore(o,f,s),_.push(S(r)),d.push(c(r))}function g(){p&&(m(l(p)),p=void 0)}}function T(e){return Qu(e)&&Dl(e.type)}function C(e){if(sE(e))return r;if(JN(e))return{typeNode:S(e.name),mutatedTarget:!1};if(vb(e))return{typeNode:S(e),mutatedTarget:!1};if(T(e))return C(e.expression);if(WE(e)){const t=mc(e,KP);return function(e,t="temp"){const n=!!mc(e,T);return n?k(e,t,n,(e=>e.elements),fP,YC.createSpreadElement,(e=>YC.createArrayLiteralExpression(e,!0)),(e=>YC.createTupleTypeNode(e.map(YC.createRestTypeNode)))):r}(e,t&&qD(t.name)?t.name.text:void 0)}if(HE(e)){const t=mc(e,KP);return function(e,t="temp"){return k(e,t,!!mc(e,T),(e=>e.properties),zN,YC.createSpreadAssignment,(e=>YC.createObjectLiteralExpression(e,!0)),YC.createIntersectionTypeNode)}(e,t&&qD(t.name)?t.name.text:void 0)}if(KP(e)&&e.initializer)return C(e.initializer);if(_P(e)){const{typeNode:t,mutatedTarget:n}=C(e.whenTrue);if(!t)return r;const{typeNode:i,mutatedTarget:o}=C(e.whenFalse);return i?{typeNode:YC.createUnionTypeNode([t,i]),mutatedTarget:n||o}:r}return r}function w(e,t,n=0){let r=!1;const i=fie(s,l,e,t,c,1074273293|n,{moduleResolverHost:a,trackSymbol:()=>!0,reportTruncationError(){r=!0}});return r?YC.createKeywordTypeNode(133):i}function D(e){iw(e,1);const t=d.printNode(4,e,o);return t.length>X_?t.substring(0,X_-"...".length)+"...":(iw(e,0),t)}function E(e,t){for(;e&&e.endt.addTypeAnnotation(e.span))),Are(Ere,t,e,1,(t=>t.addTypeAnnotation(e.span))),Are(Ere,t,e,2,(t=>t.addTypeAnnotation(e.span))),Are(Pre,t,e,0,(t=>t.addInlineAssertion(e.span))),Are(Pre,t,e,1,(t=>t.addInlineAssertion(e.span))),Are(Pre,t,e,2,(t=>t.addInlineAssertion(e.span))),Are("extract-expression",t,e,0,(t=>t.extractAsVariable(e.span))),t},getAllCodeActions:e=>y8(Ire(e,0,(t=>{x8(e,Nre,(e=>{t.addTypeAnnotation(e)}))})).textChanges)});var Ore="fixAwaitInSyncFunction",Mre=[va.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,va.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code];function Lre(e,t){const n=Qf(kX(e,t));if(!n)return;let r;switch(n.kind){case 174:r=n.name;break;case 262:case 218:r=uX(n,100,e);break;case 219:r=uX(n,n.typeParameters?30:21,e)||Te(n.parameters);break;default:return}return r&&{insertBefore:r,returnType:(i=n,i.type?i.type:KP(i.parent)&&i.parent.type&&SE(i.parent.type)?i.parent.type.type:void 0)};var i}function jre(e,t,{insertBefore:n,returnType:r}){if(r){const n=fm(r);n&&80===n.kind&&"Promise"===n.text||e.replaceNode(t,r,YC.createTypeReferenceNode("Promise",YC.createNodeArray([r])))}e.insertModifierBefore(t,134,n)}f8({errorCodes:Mre,getCodeActions(e){const{sourceFile:t,span:n}=e,r=Lre(t,n.start);if(!r)return;const i=r_e.ChangeTracker.with(e,(e=>jre(e,t,r)));return[_8(Ore,i,va.Add_async_modifier_to_containing_function,Ore,va.Add_all_missing_async_modifiers)]},fixIds:[Ore],getAllCodeActions:function(e){const t=new Map;return b8(e,Mre,((n,r)=>{const i=Lre(r.file,r.start);i&&Fx(t,IB(i.insertBefore))&&jre(n,e.sourceFile,i)}))}});var Rre=[va._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,va._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code],Bre="fixPropertyOverrideAccessor";function Jre(e,t,n,r,i){let o,a;if(r===va._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code)o=t,a=t+n;else if(r===va._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code){const n=i.program.getTypeChecker(),r=kX(e,t).parent;xn.assert(hu(r),"error span of fixPropertyOverrideAccessor should only be on an accessor");const s=r.parent;xn.assert(gu(s),"erroneous accessors should only be inside classes");const c=Ee(Lie(s,n));if(!c)return[];const l=vc(Lp(r.name)),u=n.getPropertyOfType(n.getTypeAtLocation(c),l);if(!u||!u.valueDeclaration)return[];o=u.valueDeclaration.pos,a=u.valueDeclaration.end,e=Sd(u.valueDeclaration)}else xn.fail("fixPropertyOverrideAccessor codefix got unexpected error code "+r);return Pie(e,i.program,o,a,i,va.Generate_get_and_set_accessors.message)}f8({errorCodes:Rre,getCodeActions(e){const t=Jre(e.sourceFile,e.span.start,e.span.length,e.errorCode,e);if(t)return[_8(Bre,t,va.Generate_get_and_set_accessors,Bre,va.Generate_get_and_set_accessors_for_all_overriding_properties)]},fixIds:[Bre],getAllCodeActions:e=>b8(e,Rre,((t,n)=>{const r=Jre(n.file,n.start,n.length,n.code,e);if(r)for(const n of r)t.pushRaw(e.sourceFile,n)}))});var zre="inferFromUsage",$re=[va.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code,va.Variable_0_implicitly_has_an_1_type.code,va.Parameter_0_implicitly_has_an_1_type.code,va.Rest_parameter_0_implicitly_has_an_any_type.code,va.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code,va._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code,va.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code,va.Member_0_implicitly_has_an_1_type.code,va.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code,va.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,va.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,va.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code,va.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code,va._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code,va.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code,va.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code,va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];function qre(e,t){switch(e){case va.Parameter_0_implicitly_has_an_1_type.code:case va.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return gE(Qf(t))?va.Infer_type_of_0_from_usage:va.Infer_parameter_types_from_usage;case va.Rest_parameter_0_implicitly_has_an_any_type.code:case va.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Infer_parameter_types_from_usage;case va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:return va.Infer_this_type_of_0_from_usage;default:return va.Infer_type_of_0_from_usage}}function Vre(e,t,n,r,i,o,a,s,c){if(!nu(n.kind)&&80!==n.kind&&26!==n.kind&&110!==n.kind)return;const{parent:l}=n,u=$9(t,i,c,s);switch(r=function(e){switch(e){case va.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code:return va.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code;case va.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Variable_0_implicitly_has_an_1_type.code;case va.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Parameter_0_implicitly_has_an_1_type.code;case va.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Rest_parameter_0_implicitly_has_an_any_type.code;case va.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code:return va.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code;case va._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code:return va._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code;case va.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code:return va.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code;case va.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code:return va.Member_0_implicitly_has_an_1_type.code}return e}(r)){case va.Member_0_implicitly_has_an_1_type.code:case va.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code:if(KP(l)&&a(l)||uE(l)||lE(l))return Ure(e,u,t,l,i,s,o),u.writeFixes(e),l;if(GE(l)){const n=nZ(Xre(l.name,i,o),l,i,s);if(n){const r=YC.createJSDocTypeTag(void 0,YC.createJSDocTypeExpression(n),void 0);e.addJSDocTags(t,ut(l.parent.parent,NP),[r])}return u.writeFixes(e),l}return;case va.Variable_0_implicitly_has_an_1_type.code:{const t=i.getTypeChecker().getSymbolAtLocation(n);return t&&t.valueDeclaration&&KP(t.valueDeclaration)&&a(t.valueDeclaration)?(Ure(e,u,Sd(t.valueDeclaration),t.valueDeclaration,i,s,o),u.writeFixes(e),t.valueDeclaration):void 0}}const _=Qf(n);if(void 0===_)return;let d;switch(r){case va.Parameter_0_implicitly_has_an_1_type.code:if(gE(_)){Kre(e,u,t,_,i,s,o),d=_;break}case va.Rest_parameter_0_implicitly_has_an_any_type.code:if(a(_)){const n=ut(l,sE);!function(e,t,n,r,i,o,a,s){if(!qD(r.name))return;const c=function(e,t,n,r){const i=Qre(e,t,n,r);return i&&Yre(n,i,r).parameters(e)||e.parameters.map((e=>({declaration:e,type:qD(e.name)?Xre(e.name,n,r):n.getTypeChecker().getAnyType()})))}(i,n,o,s);if(xn.assert(i.parameters.length===c.length,"Parameter count and inference count should match"),Mm(i))Hre(e,n,c,o,a);else{const r=rP(i)&&!uX(i,21,n);r&&e.insertNodeBefore(n,Te(i.parameters),YC.createToken(21));for(const{declaration:r,type:i}of c)!r||r.type||r.initializer||Wre(e,t,n,r,i,o,a);r&&e.insertNodeAfter(n,De(i.parameters),YC.createToken(22))}}(e,u,t,n,_,i,s,o),d=n}break;case va.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code:case va._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code:mE(_)&&qD(_.name)&&(Wre(e,u,t,_,Xre(_.name,i,o),i,s),d=_);break;case va.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code:gE(_)&&(Kre(e,u,t,_,i,s,o),d=_);break;case va.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code:r_e.isThisTypeAnnotatable(_)&&a(_)&&(function(e,t,n,r,i,o){const a=Qre(n,t,r,o);if(!a||!a.length)return;const s=nZ(Yre(r,a,o).thisParameter(),n,r,i);s&&(Mm(n)?function(e,t,n,r){e.addJSDocTags(t,n,[YC.createJSDocThisTag(void 0,YC.createJSDocTypeExpression(r))])}(e,t,n,s):e.tryInsertThisTypeAnnotation(t,n,s))}(e,t,_,i,s,o),d=_);break;default:return xn.fail(String(r))}return u.writeFixes(e),d}function Ure(e,t,n,r,i,o,a){qD(r.name)&&Wre(e,t,n,r,Xre(r.name,i,a),i,o)}function Kre(e,t,n,r,i,o,a){const s=Se(r.parameters);if(s&&qD(r.name)&&qD(s.name)){let c=Xre(r.name,i,a);c===i.getTypeChecker().getAnyType()&&(c=Xre(s.name,i,a)),Mm(r)?Hre(e,n,[{declaration:s,type:c}],i,o):Wre(e,t,n,s,c,i,o)}}function Wre(e,t,n,r,i,o,a){const s=nZ(i,r,o,a);if(s)if(Mm(n)&&171!==r.kind){const t=KP(r)?lt(r.parent.parent,EP):r;if(!t)return;const i=YC.createJSDocTypeExpression(s),o=mE(r)?YC.createJSDocReturnTag(void 0,i,void 0):YC.createJSDocTypeTag(void 0,i,void 0);e.addJSDocTags(n,t,[o])}else(function(e,t,n,r,i,o){const a=Cie(e,o);return!(!a||!r.tryInsertTypeAnnotation(n,t,a.typeNode))&&(f(a.symbols,(e=>i.addImportFromExportedSymbol(e,!0))),!0)})(s,r,n,e,t,wS(o.getCompilerOptions()))||e.tryInsertTypeAnnotation(n,r,s)}function Hre(e,t,n,r,i){const o=n.length&&n[0].declaration.parent;if(!o)return;const a=q(n,(e=>{const t=e.declaration;if(t.initializer||al(t)||!qD(t.name))return;const n=e.type&&nZ(e.type,t,r,i);return n?(iw(YC.cloneNode(t.name),7168),{name:YC.cloneNode(t.name),param:t,isOptional:!!e.isOptional,typeNode:n}):void 0}));if(a.length)if(rP(o)||nP(o)){const n=rP(o)&&!uX(o,21,t);n&&e.insertNodeBefore(t,Te(o.parameters),YC.createToken(21)),f(a,(({typeNode:n,param:r})=>{const i=YC.createJSDocTypeTag(void 0,YC.createJSDocTypeExpression(n)),o=YC.createJSDocComment(void 0,[i]);e.insertNodeAt(t,r.getStart(t),o,{suffix:" "})})),n&&e.insertNodeAfter(t,De(o.parameters),YC.createToken(22))}else{const n=O(a,(({name:e,typeNode:t,isOptional:n})=>YC.createJSDocParameterTag(void 0,e,!!n,YC.createJSDocTypeExpression(t),!1,void 0)));e.addJSDocTags(t,o,n)}}function Gre(e,t,n){return q(Rse.getReferenceEntriesForNode(-1,e,t,t.getSourceFiles(),n),(e=>e.kind!==Rse.EntryKind.Span?lt(e.node,qD):void 0))}function Xre(e,t,n){return Yre(t,Gre(e,t,n),n).single()}function Qre(e,t,n,r){let i;switch(e.kind){case 176:i=uX(e,137,t);break;case 219:case 218:const n=e.parent;i=(KP(n)||uE(n))&&qD(n.name)?n.name:e.name;break;case 262:case 174:case 173:i=e.name}if(i)return Gre(i,n,r)}function Yre(e,t,n){const r=e.getTypeChecker(),i={string:()=>r.getStringType(),number:()=>r.getNumberType(),Array:e=>r.createArrayType(e),Promise:e=>r.createPromiseType(e)},o=[r.getStringType(),r.getNumberType(),r.createArrayType(r.getAnyType()),r.createPromiseType(r.getAnyType())];return{single:function(){return d(s(t))},parameters:function(i){if(0===t.length||!i.parameters)return;const o={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};for(const e of t)n.throwIfCancellationRequested(),c(e,o);const a=[...o.constructs||[],...o.calls||[]];return i.parameters.map(((t,o)=>{const c=[],l=U_(t);let u=!1;for(const e of a)if(e.argumentTypes.length<=o)u=Mm(i),c.push(r.getUndefinedType());else if(l)for(let t=o;t{t.has(n)||t.set(n,[]),t.get(n).push(e)}));const n=new Map;return t.forEach(((e,t)=>{n.set(t,a(e))})),{isNumber:e.some((e=>e.isNumber)),isString:e.some((e=>e.isString)),isNumberOrString:e.some((e=>e.isNumberOrString)),candidateTypes:R(e,(e=>e.candidateTypes)),properties:n,calls:R(e,(e=>e.calls)),constructs:R(e,(e=>e.constructs)),numberIndex:f(e,(e=>e.numberIndex)),stringIndex:f(e,(e=>e.stringIndex)),candidateThisTypes:R(e,(e=>e.candidateThisTypes)),inferredTypes:void 0}}function s(e){const t={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};for(const r of e)n.throwIfCancellationRequested(),c(r,t);return m(t)}function c(e,t){for(;Cb(e);)e=e.parent;switch(e.parent.kind){case 244:!function(e,t){v(t,QE(e)?r.getVoidType():r.getAnyType())}(e,t);break;case 225:t.isNumber=!0;break;case 224:!function(e,t){switch(e.operator){case 46:case 47:case 41:case 55:t.isNumber=!0;break;case 40:t.isNumberOrString=!0}}(e.parent,t);break;case 226:!function(e,t,n){switch(t.operatorToken.kind){case 43:case 42:case 44:case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 66:case 68:case 67:case 69:case 70:case 74:case 75:case 79:case 71:case 73:case 72:case 41:case 30:case 33:case 32:case 34:const i=r.getTypeAtLocation(t.left===e?t.right:t.left);1056&i.flags?v(n,i):n.isNumber=!0;break;case 65:case 40:const o=r.getTypeAtLocation(t.left===e?t.right:t.left);1056&o.flags?v(n,o):296&o.flags?n.isNumber=!0:402653316&o.flags?n.isString=!0:1&o.flags||(n.isNumberOrString=!0);break;case 64:case 35:case 37:case 38:case 36:case 77:case 78:case 76:v(n,r.getTypeAtLocation(t.left===e?t.right:t.left));break;case 103:e===t.left&&(n.isString=!0);break;case 57:case 61:e!==t.left||260!==e.parent.parent.kind&&!mb(e.parent.parent,!0)||v(n,r.getTypeAtLocation(t.right))}}(e,e.parent,t);break;case 296:case 297:!function(e,t){v(t,r.getTypeAtLocation(e.parent.parent.expression))}(e.parent,t);break;case 213:case 214:e.parent.expression===e?function(e,t){const n={argumentTypes:[],return_:{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0}};if(e.arguments)for(const t of e.arguments)n.argumentTypes.push(r.getTypeAtLocation(t));c(e,n.return_),213===e.kind?(t.calls||(t.calls=[])).push(n):(t.constructs||(t.constructs=[])).push(n)}(e.parent,t):l(e,t);break;case 211:!function(e,t){const n=yc(e.name.text);t.properties||(t.properties=new Map);const r=t.properties.get(n)||{isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};c(e,r),t.properties.set(n,r)}(e.parent,t);break;case 212:!function(e,t,n){if(t!==e.argumentExpression){const t=r.getTypeAtLocation(e.argumentExpression),i={isNumber:void 0,isString:void 0,isNumberOrString:void 0,candidateTypes:void 0,properties:void 0,calls:void 0,constructs:void 0,numberIndex:void 0,stringIndex:void 0,candidateThisTypes:void 0,inferredTypes:void 0};c(e,i),296&t.flags?n.numberIndex=i:n.stringIndex=i}else n.isNumberOrString=!0}(e.parent,e,t);break;case 303:case 304:!function(e,t){const n=KP(e.parent.parent)?e.parent.parent:e.parent;b(t,r.getTypeAtLocation(n))}(e.parent,t);break;case 172:!function(e,t){b(t,r.getTypeAtLocation(e.parent))}(e.parent,t);break;case 260:{const{name:n,initializer:i}=e.parent;if(e===n){i&&v(t,r.getTypeAtLocation(i));break}}default:return l(e,t)}}function l(e,t){Tm(e)&&v(t,r.getContextualType(e))}function _(e){return d(m(e))}function d(e){if(!e.length)return r.getAnyType();const t=r.getUnionType([r.getStringType(),r.getNumberType()]);let n=function(e,t){const n=[];for(const r of e)for(const{high:e,low:i}of t)e(r)&&(xn.assert(!i(r),"Priority can't have both low and high"),n.push(i));return e.filter((e=>n.every((t=>!t(e)))))}(e,[{high:e=>e===r.getStringType()||e===r.getNumberType(),low:e=>e===t},{high:e=>!(16385&e.flags),low:e=>!!(16385&e.flags)},{high:e=>!(114689&e.flags||16&wx(e)),low:e=>!!(16&wx(e))}]);const i=n.filter((e=>16&wx(e)));return i.length&&(n=n.filter((e=>!(16&wx(e)))),n.push(function(e){if(1===e.length)return e[0];const t=[],n=[],i=[],o=[];let a=!1,s=!1;const c=et();for(const l of e){for(const e of r.getPropertiesOfType(l))c.add(e.escapedName,e.valueDeclaration?r.getTypeOfSymbolAtLocation(e,e.valueDeclaration):r.getAnyType());t.push(...r.getSignaturesOfType(l,0)),n.push(...r.getSignaturesOfType(l,1));const e=r.getIndexInfoOfType(l,0);e&&(i.push(e.type),a=a||e.isReadonly);const u=r.getIndexInfoOfType(l,1);u&&(o.push(u.type),s=s||u.isReadonly)}const l=X(c,((t,n)=>{const i=n.lengthr.getBaseTypeOfLiteralType(e))),l=(null==(a=e.calls)?void 0:a.length)?g(e):void 0;return l&&c?s.push(r.getUnionType([l,...c],2)):(l&&s.push(l),p(c)&&s.push(...c)),s.push(...function(e){if(!e.properties||!e.properties.size)return[];const t=o.filter((t=>function(e,t){return!!t.properties&&!ld(t.properties,((t,n)=>{const i=r.getTypeOfPropertyOfType(e,n);return!i||(t.calls?!r.getSignaturesOfType(i,0).length||!r.isTypeAssignableTo(i,(o=t.calls,r.createAnonymousType(void 0,ed(),[y(o)],u,u))):!r.isTypeAssignableTo(i,_(t)));var o}))}(t,e)));return 0function(e,t){if(!(4&wx(e)&&t.properties))return e;const n=e.target,o=Ee(n.typeParameters);if(!o)return e;const a=[];return t.properties.forEach(((e,t)=>{const i=r.getTypeOfPropertyOfType(n,t);xn.assert(!!i,"generic should have all the properties of its reference."),a.push(...h(i,_(e),o))})),i[e.symbol.escapedName](d(a))}(t,e))):[]}(e)),s}function g(e){const t=new Map;e.properties&&e.properties.forEach(((e,n)=>{const i=r.createSymbol(4,n);i.links.type=_(e),t.set(n,i)}));const n=e.calls?[y(e.calls)]:[],i=e.constructs?[y(e.constructs)]:[],o=e.stringIndex?[r.createIndexInfo(r.getStringType(),_(e.stringIndex),!1)]:[];return r.createAnonymousType(void 0,t,n,i,o)}function h(e,t,n){if(e===n)return[t];if(3145728&e.flags)return R(e.types,(e=>h(e,t,n)));if(4&wx(e)&&4&wx(t)){const i=r.getTypeArguments(e),o=r.getTypeArguments(t),a=[];if(i&&o)for(let e=0;ee.argumentTypes.length)));for(let i=0;ie.argumentTypes[i]||r.getUndefinedType()))),e.some((e=>void 0===e.argumentTypes[i]))&&(n.flags|=16777216),t.push(n)}const i=_(a(e.map((e=>e.return_))));return r.createSignature(void 0,void 0,void 0,t,i,void 0,n,0)}function v(e,t){!t||1&t.flags||131072&t.flags||(e.candidateTypes||(e.candidateTypes=[])).push(t)}function b(e,t){!t||1&t.flags||131072&t.flags||(e.candidateThisTypes||(e.candidateThisTypes=[])).push(t)}}f8({errorCodes:$re,getCodeActions(e){const{sourceFile:t,program:n,span:{start:r},errorCode:i,cancellationToken:o,host:a,preferences:s}=e,c=kX(t,r);let l;const u=r_e.ChangeTracker.with(e,(e=>{l=Vre(e,t,c,i,n,o,pt,a,s)})),_=l&&Pc(l);return _&&0!==u.length?[_8(zre,u,[qre(i,c),Gd(_)],zre,va.Infer_all_types_from_usage)]:void 0},fixIds:[zre],getAllCodeActions(e){const{sourceFile:t,program:n,cancellationToken:r,host:i,preferences:o}=e,a=hQ();return b8(e,$re,((e,s)=>{Vre(e,t,kX(s.file,s.start),s.code,n,r,a,i,o)}))}});var Zre="fixReturnTypeInAsyncFunction",eie=[va.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code];function tie(e,t,n){if(Mm(e))return;const r=mc(kX(e,n),uu),i=null==r?void 0:r.type;if(!i)return;const o=t.getTypeFromTypeNode(i),a=t.getAwaitedType(o)||t.getVoidType(),s=t.typeToTypeNode(a,i,void 0);return s?{returnTypeNode:i,returnType:o,promisedTypeNode:s,promisedType:a}:void 0}function nie(e,t,n,r){e.replaceNode(t,n,YC.createTypeReferenceNode("Promise",[r]))}f8({errorCodes:eie,fixIds:[Zre],getCodeActions:function(e){const{sourceFile:t,program:n,span:r}=e,i=n.getTypeChecker(),o=tie(t,n.getTypeChecker(),r.start);if(!o)return;const{returnTypeNode:a,returnType:s,promisedTypeNode:c,promisedType:l}=o,u=r_e.ChangeTracker.with(e,(e=>nie(e,t,a,c)));return[_8(Zre,u,[va.Replace_0_with_Promise_1,i.typeToString(s),i.typeToString(l)],Zre,va.Fix_all_incorrect_return_type_of_an_async_functions)]},getAllCodeActions:e=>b8(e,eie,((t,n)=>{const r=tie(n.file,e.program.getTypeChecker(),n.start);r&&nie(t,n.file,r.returnTypeNode,r.promisedTypeNode)}))});var rie="disableJsDiagnostics",iie="disableJsDiagnostics",oie=q(Object.keys(va),(e=>{const t=va[e];return 1===t.category?t.code:void 0}));function aie(e,t,n,r){const{line:i}=Xa(t,n);r&&!W(r,i)||e.insertCommentBeforeLine(t,i,n," @ts-ignore")}function sie(e,t,n,r,i,o,a){const s=e.symbol.members;for(const c of t)s.has(c.escapedName)||uie(c,e,n,r,i,o,a,void 0)}function cie(e){return{trackSymbol:()=>!1,moduleResolverHost:wQ(e.program,e.host)}}f8({errorCodes:oie,getCodeActions:function(e){const{sourceFile:t,program:n,span:r,host:i,formatContext:o}=e;if(!Mm(t)||!uT(t,n.getCompilerOptions()))return;const a=t.checkJsDirective?"":gY(i,o.options),s=[u8(rie,[v8(t.fileName,[dQ(t.checkJsDirective?Xs(t.checkJsDirective.pos,t.checkJsDirective.end):Gs(0,0),`// @ts-nocheck${a}`)])],va.Disable_checking_for_this_file)];return r_e.isValidLocationToAddComment(t,r.start)&&s.unshift(_8(rie,r_e.ChangeTracker.with(e,(e=>aie(e,t,r.start))),va.Ignore_this_error_message,iie,va.Add_ts_ignore_to_all_error_messages)),s},fixIds:[iie],getAllCodeActions:e=>{const t=new Set;return b8(e,oie,((e,n)=>{r_e.isValidLocationToAddComment(n.file,n.start)&&aie(e,n.file,n.start,t)}))}});var lie=(e=>(e[e.Method=1]="Method",e[e.Property=2]="Property",e[e.All=3]="All",e))(lie||{});function uie(e,t,n,r,i,o,a,s,c=3,l=!1){const _=e.getDeclarations(),d=Se(_),f=r.program.getTypeChecker(),m=wS(r.program.getCompilerOptions()),g=(null==d?void 0:d.kind)??171,h=function(e,t){if(262144&px(e)){const t=e.links.nameType;if(t&&mC(t))return YC.createIdentifier(vc(gC(t)))}return NY(Pc(t),!1)}(e,d),y=d?Qv(d):0;let v=256&y;v|=1&y?1:4&y?4:0,d&&yu(d)&&(v|=512);const b=function(){let e;return v&&(e=_e(e,YC.createModifiersFromModifierFlags(v))),r.program.getCompilerOptions().noImplicitOverride&&d&&qv(d)&&(e=ue(e,YC.createToken(164))),e&&YC.createNodeArray(e)}(),x=f.getWidenedType(f.getTypeOfSymbolAtLocation(e,t)),S=!!(16777216&e.flags),k=!!(33554432&t.flags)||l,T=AQ(n,i);switch(g){case 171:case 172:let n=1;n|=0===T?268435456:0;let i=f.typeToTypeNode(x,t,n,cie(r));if(o){const e=Cie(i,m);e&&(i=e.typeNode,Die(o,e.symbols))}a(YC.createPropertyDeclaration(b,d?w(h):e.getName(),S&&2&c?YC.createToken(58):void 0,i,void 0));break;case 177:case 178:{xn.assertIsDefined(_);let e=f.typeToTypeNode(x,t,void 0,cie(r));const n=Sv(_,d),i=n.secondAccessor?[n.firstAccessor,n.secondAccessor]:[n.firstAccessor];if(o){const t=Cie(e,m);t&&(e=t.typeNode,Die(o,t.symbols))}for(const t of i)if(mE(t))a(YC.createGetAccessorDeclaration(b,w(h),u,E(e),D(s,T,k)));else{xn.assertNode(t,gE,"The counterpart to a getter should be a setter");const n=fv(t),r=n&&qD(n.name)?bc(n.name):void 0;a(YC.createSetAccessorDeclaration(b,w(h),yie(1,[r],[E(e)],1,!1),D(s,T,k)))}break}case 173:case 174:xn.assertIsDefined(_);const l=x.isUnion()?R(x.types,(e=>e.getCallSignatures())):x.getCallSignatures();if(!Q(l))break;if(1===_.length){xn.assert(1===l.length,"One declaration implies one signature");const e=l[0];C(T,e,b,w(h),D(s,T,k));break}for(const e of l)C(T,e,b,w(h));if(!k)if(_.length>l.length){const e=f.getSignatureFromDeclaration(_[_.length-1]);C(T,e,b,w(h),D(s,T))}else xn.assert(_.length===l.length,"Declarations and signatures should match count"),a(function(e,t,n,r,i,o,a,s,c){let l=r[0],u=r[0].minArgumentCount,_=!1;for(const e of r)u=Math.min(e.minArgumentCount,u),JB(e)&&(_=!0),e.parameters.length>=l.parameters.length&&(!JB(e)||JB(l))&&(l=e);const d=l.parameters.length-(JB(l)?1:0),f=l.parameters.map((e=>e.name)),m=yie(d,f,void 0,u,!1);if(_){const e=YC.createParameterDeclaration(void 0,YC.createToken(26),f[d]||"rest",d>=u?YC.createToken(58):void 0,YC.createArrayTypeNode(YC.createKeywordTypeNode(159)),void 0);m.push(e)}return function(e,t,n,r,i,o,a,s){return YC.createMethodDeclaration(e,void 0,t,n?YC.createToken(58):void 0,void 0,i,o,s||vie(a))}(a,i,o,0,m,function(e,t,n,r){if(p(e)){const i=t.getUnionType(O(e,t.getReturnTypeOfSignature));return t.typeToTypeNode(i,r,1,cie(n))}}(r,e,t,n),s,c)}(f,r,t,l,w(h),S&&!!(1&c),b,T,s))}function C(e,n,i,s,l){const u=_ie(174,r,e,n,l,s,i,S&&!!(1&c),t,o);u&&a(u)}function w(e){return qD(e)&&"constructor"===e.escapedText?YC.createComputedPropertyName(YC.createStringLiteral(bc(e),0===T)):NY(e,!1)}function D(e,t,n){return n?void 0:NY(e,!1)||vie(t)}function E(e){return NY(e,!1)}}function _ie(e,t,n,r,i,o,a,s,c,l){const u=t.program,_=u.getTypeChecker(),d=wS(u.getCompilerOptions()),p=Mm(c),f=524545|(0===n?268435456:0),m=_.signatureToSignatureDeclaration(r,e,c,f,cie(t));if(!m)return;let g=p?void 0:m.typeParameters,h=m.parameters,y=p?void 0:NY(m.type);if(l){if(g){const e=L(g,(e=>{let t=e.constraint,n=e.default;if(t){const e=Cie(t,d);e&&(t=e.typeNode,Die(l,e.symbols))}if(n){const e=Cie(n,d);e&&(n=e.typeNode,Die(l,e.symbols))}return YC.updateTypeParameterDeclaration(e,e.modifiers,e.name,t,n)}));g!==e&&(g=sI(YC.createNodeArray(e,g.hasTrailingComma),g))}const e=L(h,(e=>{let t=p?void 0:e.type;if(t){const e=Cie(t,d);e&&(t=e.typeNode,Die(l,e.symbols))}return YC.updateParameterDeclaration(e,e.modifiers,e.dotDotDotToken,e.name,p?void 0:e.questionToken,t,e.initializer)}));if(h!==e&&(h=sI(YC.createNodeArray(e,h.hasTrailingComma),h)),y){const e=Cie(y,d);e&&(y=e.typeNode,Die(l,e.symbols))}}const v=s?YC.createToken(58):void 0,b=m.asteriskToken;return nP(m)?YC.updateFunctionExpression(m,a,m.asteriskToken,lt(o,qD),g,h,y,i??m.body):rP(m)?YC.updateArrowFunction(m,a,g,h,y,m.equalsGreaterThanToken,i??m.body):dE(m)?YC.updateMethodDeclaration(m,a,b,o??YC.createIdentifier(""),v,g,h,y,i):HP(m)?YC.updateFunctionDeclaration(m,a,m.asteriskToken,lt(o,qD),g,h,y,i??m.body):void 0}function die(e,t,n,r,i,o,a){const s=AQ(t.sourceFile,t.preferences),c=wS(t.program.getCompilerOptions()),l=cie(t),u=t.program.getTypeChecker(),_=Mm(a),{typeArguments:d,arguments:p,parent:f}=r,m=_?void 0:u.getContextualType(r),g=O(p,(e=>qD(e)?e.text:GE(e)&&qD(e.name)?e.name.text:void 0)),h=_?[]:O(p,(e=>u.getTypeAtLocation(e))),{argumentTypeNodes:y,argumentTypeParameters:v}=gie(u,n,h,a,c,1,l),b=o?YC.createNodeArray(YC.createModifiersFromModifierFlags(o)):void 0,x=pP(f)?YC.createToken(42):void 0,S=_?void 0:function(e,t,n){const r=new Set(t.map((e=>e[0]))),i=new Map(t);if(n){const i=n.filter((n=>!t.some((t=>{var r;return e.getTypeAtLocation(n)===(null==(r=t[1])?void 0:r.argumentType)})))),o=r.size+i.length;for(let e=0;r.size{var t;return YC.createTypeParameterDeclaration(void 0,e,null==(t=i.get(e))?void 0:t.constraint)}))}(u,v,d),k=yie(p.length,g,y,void 0,_),T=_||void 0===m?void 0:u.typeToTypeNode(m,a,void 0,l);switch(e){case 174:return YC.createMethodDeclaration(b,x,i,void 0,S,k,T,vie(s));case 173:return YC.createMethodSignature(b,i,void 0,S,k,void 0===T?YC.createKeywordTypeNode(159):T);case 262:return xn.assert("string"==typeof i||qD(i),"Unexpected name"),YC.createFunctionDeclaration(b,x,i,S,k,T,bie(va.Function_not_implemented.message,s));default:xn.fail("Unexpected kind")}}function pie(e){return 84+e<=90?String.fromCharCode(84+e):`T${e}`}function fie(e,t,n,r,i,o,a){let s=e.typeToTypeNode(n,r,o,a);if(s&&zE(s)){const e=Cie(s,i);e&&(Die(t,e.symbols),s=e.typeNode)}return NY(s)}function mie(e){return e.isUnionOrIntersection()?e.types.some(mie):262144&e.flags}function gie(e,t,n,r,i,o,a){const s=[],c=new Map;for(let u=0;u=r?YC.createToken(58):void 0,i?void 0:(null==n?void 0:n[s])||YC.createKeywordTypeNode(159),void 0);o.push(l)}return o}function vie(e){return bie(va.Method_not_implemented.message,e)}function bie(e,t){return YC.createBlock([YC.createThrowStatement(YC.createNewExpression(YC.createIdentifier("Error"),void 0,[YC.createStringLiteral(e,0===t)]))],!0)}function xie(e,t,n){const r=Hf(t);if(!r)return;const i=Tie(r,"compilerOptions");if(void 0===i)return void e.insertNodeAtObjectStart(t,r,kie("compilerOptions",YC.createObjectLiteralExpression(n.map((([e,t])=>kie(e,t))),!0)));const o=i.initializer;if(HE(o))for(const[r,i]of n){const n=Tie(o,r);void 0===n?e.insertNodeAtObjectStart(t,o,kie(r,i)):e.replaceNode(t,n.initializer,i)}}function Sie(e,t,n,r){xie(e,t,[[n,r]])}function kie(e,t){return YC.createPropertyAssignment(YC.createStringLiteral(e),t)}function Tie(e,t){return S(e.properties,(e=>BN(e)&&!!e.name&&wD(e.name)&&e.name.text===t))}function Cie(e,t){let n;const r=qB(e,(function e(r){if(df(r)&&r.qualifier){const i=bb(r.qualifier),o=FZ(i.symbol,t),a=o!==i.text?wie(r.qualifier,YC.createIdentifier(o)):r.qualifier;n=ue(n,i.symbol);const s=VB(r.typeArguments,e,wu);return YC.createTypeReferenceNode(a,s)}return ZB(r,e,void 0)}),wu);if(n&&r)return{typeNode:r,symbols:n}}function wie(e,t){return 80===e.kind?t:YC.createQualifiedName(wie(e.left,t),e.right)}function Die(e,t){t.forEach((t=>e.addImportFromExportedSymbol(t,!0)))}function Eie(e,t){const n=js(t);let r=kX(e,t.start);for(;r.ende.replaceNode(t,n,r)));return u8(jie,i,[va.Replace_import_with_0,i[0].textChanges[0].newText])}function Bie(e,t){const n=e.program.getTypeChecker().getTypeAtLocation(t);if(!(n.symbol&&td(n.symbol)&&n.symbol.links.originatingImport))return[];const r=[],i=n.symbol.links.originatingImport;if(uf(i)||pe(r,function(e,t){const n=Sd(t),r=wg(t),i=e.program.getCompilerOptions(),o=[];return o.push(Rie(e,n,t,EQ(r.name,void 0,t.moduleSpecifier,AQ(n,e.preferences)))),1===DS(i)&&o.push(Rie(e,n,t,YC.createImportEqualsDeclaration(void 0,!1,r.name,YC.createExternalModuleReference(t.moduleSpecifier)))),o}(e,i)),Xu(t)&&(!Dc(t.parent)||t.parent.name!==t)){const n=e.sourceFile,i=r_e.ChangeTracker.with(e,(e=>e.replaceNode(n,t,YC.createPropertyAccessExpression(t,"default"),{})));r.push(u8(jie,i,va.Use_synthetic_default_member))}return r}f8({errorCodes:[va.This_expression_is_not_callable.code,va.This_expression_is_not_constructable.code],getCodeActions:function(e){const t=e.sourceFile,n=va.This_expression_is_not_callable.code===e.errorCode?213:214,r=mc(kX(t,e.span.start),(e=>e.kind===n));if(!r)return[];return Bie(e,r.expression)}}),f8({errorCodes:[va.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,va.Type_0_does_not_satisfy_the_constraint_1.code,va.Type_0_is_not_assignable_to_type_1.code,va.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code,va.Type_predicate_0_is_not_assignable_to_1.code,va.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code,va._0_index_type_1_is_not_assignable_to_2_index_type_3.code,va.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code,va.Property_0_in_type_1_is_not_assignable_to_type_2.code,va.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code,va.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code],getCodeActions:function(e){const t=mc(kX(e.sourceFile,e.span.start),(t=>t.getStart()===e.span.start&&t.getEnd()===e.span.start+e.span.length));return t?Bie(e,t):[]}});var Jie="strictClassInitialization",zie="addMissingPropertyDefiniteAssignmentAssertions",$ie="addMissingPropertyUndefinedType",qie="addMissingPropertyInitializer",Vie=[va.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];function Uie(e,t){const n=kX(e,t);if(qD(n)&&uE(n.parent)){const e=kv(n.parent);if(e)return{type:e,prop:n.parent,isJs:Mm(n.parent)}}}function Kie(e,t,n){MY(n);const r=YC.updatePropertyDeclaration(n,n.modifiers,n.name,YC.createToken(54),n.type,n.initializer);e.replaceNode(t,n,r)}function Wie(e,t,n){const r=YC.createKeywordTypeNode(157),i=FE(n.type)?n.type.types.concat(r):[n.type,r],o=YC.createUnionTypeNode(i);n.isJs?e.addJSDocTags(t,n.prop,[YC.createJSDocTypeTag(void 0,YC.createJSDocTypeExpression(o))]):e.replaceNode(t,n.type,o)}function Hie(e,t,n,r){MY(n);const i=YC.updatePropertyDeclaration(n,n.modifiers,n.name,n.questionToken,n.type,r);e.replaceNode(t,n,i)}function Gie(e,t){return Xie(e,e.getTypeFromTypeNode(t.type))}function Xie(e,t){if(512&t.flags)return t===e.getFalseType()||t===e.getFalseType(!0)?YC.createFalse():YC.createTrue();if(t.isStringLiteral())return YC.createStringLiteral(t.value);if(t.isNumberLiteral())return YC.createNumericLiteral(t.value);if(2048&t.flags)return YC.createBigIntLiteral(t.value);if(t.isUnion())return g(t.types,(t=>Xie(e,t)));if(t.isClass()){const e=Cx(t.symbol);if(!e||Bv(e,64))return;const n=pv(e);if(n&&n.parameters.length)return;return YC.createNewExpression(YC.createIdentifier(t.symbol.name),void 0,void 0)}return e.isArrayLikeType(t)?YC.createArrayLiteralExpression():void 0}f8({errorCodes:Vie,getCodeActions:function(e){const t=Uie(e.sourceFile,e.span.start);if(!t)return;const n=[];return ue(n,function(e,t){const n=r_e.ChangeTracker.with(e,(n=>Wie(n,e.sourceFile,t)));return _8(Jie,n,[va.Add_undefined_type_to_property_0,t.prop.name.getText()],$ie,va.Add_undefined_type_to_all_uninitialized_properties)}(e,t)),ue(n,function(e,t){if(t.isJs)return;const n=r_e.ChangeTracker.with(e,(n=>Kie(n,e.sourceFile,t.prop)));return _8(Jie,n,[va.Add_definite_assignment_assertion_to_property_0,t.prop.getText()],zie,va.Add_definite_assignment_assertions_to_all_uninitialized_properties)}(e,t)),ue(n,function(e,t){if(t.isJs)return;const n=Gie(e.program.getTypeChecker(),t.prop);if(!n)return;const r=r_e.ChangeTracker.with(e,(r=>Hie(r,e.sourceFile,t.prop,n)));return _8(Jie,r,[va.Add_initializer_to_property_0,t.prop.name.getText()],qie,va.Add_initializers_to_all_uninitialized_properties)}(e,t)),n},fixIds:[zie,$ie,qie],getAllCodeActions:e=>b8(e,Vie,((t,n)=>{const r=Uie(n.file,n.start);if(r)switch(e.fixId){case zie:Kie(t,n.file,r.prop);break;case $ie:Wie(t,n.file,r);break;case qie:const i=Gie(e.program.getTypeChecker(),r.prop);if(!i)return;Hie(t,n.file,r.prop,i);break;default:xn.fail(JSON.stringify(e.fixId))}}))});var Qie="requireInTs",Yie=[va.require_call_may_be_converted_to_an_import.code];function Zie(e,t,n){const{allowSyntheticDefaults:r,defaultImportName:i,namedImports:o,statement:a,required:s}=n;e.replaceNode(t,a,i&&!r?YC.createImportEqualsDeclaration(void 0,!1,i,YC.createExternalModuleReference(s)):YC.createImportDeclaration(void 0,YC.createImportClause(!1,i,o),s,void 0))}function eoe(e,t,n){const{parent:r}=kX(e,n);Jm(r,!0)||xn.failBadSyntaxKind(r);const i=ut(r.parent,KP),o=lt(i.name,qD),a=VE(i.name)?function(e){const t=[];for(const n of e.elements){if(!qD(n.name)||n.initializer)return;t.push(YC.createImportSpecifier(!1,lt(n.propertyName,qD),n.name))}if(t.length)return YC.createNamedImports(t)}(i.name):void 0;if(o||a)return{allowSyntheticDefaults:AS(t.getCompilerOptions()),defaultImportName:o,namedImports:a,statement:ut(i.parent.parent,EP),required:Te(r.arguments)}}f8({errorCodes:Yie,getCodeActions(e){const t=eoe(e.sourceFile,e.program,e.span.start);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>Zie(n,e.sourceFile,t)));return[_8(Qie,n,va.Convert_require_to_import,Qie,va.Convert_all_require_to_import)]},fixIds:[Qie],getAllCodeActions:e=>b8(e,Yie,((t,n)=>{const r=eoe(n.file,e.program,n.start);r&&Zie(t,e.sourceFile,r)}))});var toe="useDefaultImport",noe=[va.Import_may_be_converted_to_a_default_import.code];function roe(e,t){const n=kX(e,t);if(!qD(n))return;const{parent:r}=n;if(rN(r)&&SN(r.moduleReference))return{importNode:r,name:n,moduleSpecifier:r.moduleReference.expression};if(_N(r)&&iN(r.parent.parent)){const e=r.parent.parent;return{importNode:e,name:n,moduleSpecifier:e.moduleSpecifier}}}function ioe(e,t,n,r){e.replaceNode(t,n.importNode,EQ(n.name,void 0,n.moduleSpecifier,AQ(t,r)))}f8({errorCodes:noe,getCodeActions(e){const{sourceFile:t,span:{start:n}}=e,r=roe(t,n);if(!r)return;const i=r_e.ChangeTracker.with(e,(n=>ioe(n,t,r,e.preferences)));return[_8(toe,i,va.Convert_to_default_import,toe,va.Convert_all_to_default_imports)]},fixIds:[toe],getAllCodeActions:e=>b8(e,noe,((t,n)=>{const r=roe(n.file,n.start);r&&ioe(t,n.file,r,e.preferences)}))});var ooe="useBigintLiteral",aoe=[va.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code];function soe(e,t,n){const r=lt(kX(t,n.start),TD);if(!r)return;const i=r.getText(t)+"n";e.replaceNode(t,r,YC.createBigIntLiteral(i))}f8({errorCodes:aoe,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>soe(t,e.sourceFile,e.span)));if(t.length>0)return[_8(ooe,t,va.Convert_to_a_bigint_numeric_literal,ooe,va.Convert_all_to_bigint_numeric_literals)]},fixIds:[ooe],getAllCodeActions:e=>b8(e,aoe,((e,t)=>soe(e,t.file,t)))});var coe="fixAddModuleReferTypeMissingTypeof",loe=[va.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];function uoe(e,t){const n=kX(e,t);return xn.assert(102===n.kind,"This token should be an ImportKeyword"),xn.assert(205===n.parent.kind,"Token parent should be an ImportType"),n.parent}function _oe(e,t,n){const r=YC.updateImportTypeNode(n,n.argument,n.attributes,n.qualifier,n.typeArguments,!0);e.replaceNode(t,n,r)}f8({errorCodes:loe,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=uoe(t,n.start),i=r_e.ChangeTracker.with(e,(e=>_oe(e,t,r)));return[_8(coe,i,va.Add_missing_typeof,coe,va.Add_missing_typeof)]},fixIds:[coe],getAllCodeActions:e=>b8(e,loe,((t,n)=>_oe(t,e.sourceFile,uoe(n.file,n.start))))});var doe="wrapJsxInFragment",poe=[va.JSX_expressions_must_have_one_parent_element.code];function foe(e,t){let n=kX(e,t).parent.parent;if((uP(n)||(n=n.parent,uP(n)))&&Nd(n.operatorToken))return n}function moe(e,t,n){const r=function(e){const t=[];let n=e;for(;;){if(uP(n)&&Nd(n.operatorToken)&&28===n.operatorToken.kind){if(t.push(n.left),T_(n.right))return t.push(n.right),t;if(uP(n.right)){n=n.right;continue}return}return}}(n);r&&e.replaceNode(t,n,YC.createJsxFragment(YC.createJsxOpeningFragment(),r,YC.createJsxJsxClosingFragment()))}f8({errorCodes:poe,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=foe(t,n.start);if(!r)return;const i=r_e.ChangeTracker.with(e,(e=>moe(e,t,r)));return[_8(doe,i,va.Wrap_in_JSX_fragment,doe,va.Wrap_all_unparented_JSX_in_JSX_fragment)]},fixIds:[doe],getAllCodeActions:e=>b8(e,poe,((t,n)=>{const r=foe(e.sourceFile,n.start);r&&moe(t,e.sourceFile,r)}))});var goe="wrapDecoratorInParentheses",hoe=[va.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];function yoe(e,t,n){const r=mc(kX(t,n),cE);xn.assert(!!r,"Expected position to be owned by a decorator.");const i=YC.createParenthesizedExpression(r.expression);e.replaceNode(t,r.expression,i)}f8({errorCodes:hoe,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>yoe(t,e.sourceFile,e.span.start)));return[_8(goe,t,va.Wrap_in_parentheses,goe,va.Wrap_all_invalid_decorator_expressions_in_parentheses)]},fixIds:[goe],getAllCodeActions:e=>b8(e,hoe,((e,t)=>yoe(e,t.file,t.start)))});var voe="fixConvertToMappedObjectType",boe=[va.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];function xoe(e,t){const n=lt(kX(e,t).parent.parent,vE);if(!n)return;const r=XP(n.parent)?n.parent:lt(n.parent.parent,QP);return r?{indexSignature:n,container:r}:void 0}function Soe(e,t,{indexSignature:n,container:r}){const i=(XP(r)?r.members:r.type.members).filter((e=>!vE(e))),o=Te(n.parameters),a=YC.createTypeParameterDeclaration(void 0,ut(o.name,qD),o.type),s=YC.createMappedTypeNode(Kv(n)?YC.createModifier(148):void 0,a,void 0,n.questionToken,n.type,void 0),c=YC.createIntersectionTypeNode([...Ch(r),s,...i.length?[YC.createTypeLiteralNode(i)]:u]);var l,_;e.replaceNode(t,r,(l=r,_=c,YC.createTypeAliasDeclaration(l.modifiers,l.name,l.typeParameters,_)))}f8({errorCodes:boe,getCodeActions:function(e){const{sourceFile:t,span:n}=e,r=xoe(t,n.start);if(!r)return;const i=r_e.ChangeTracker.with(e,(e=>Soe(e,t,r))),o=bc(r.container.name);return[_8(voe,i,[va.Convert_0_to_mapped_object_type,o],voe,[va.Convert_0_to_mapped_object_type,o])]},fixIds:[voe],getAllCodeActions:e=>b8(e,boe,((e,t)=>{const n=xoe(t.file,t.start);n&&Soe(e,t.file,n)}))});var koe="removeAccidentalCallParentheses";f8({errorCodes:[va.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code],getCodeActions(e){const t=mc(kX(e.sourceFile,e.span.start),QE);if(!t)return;const n=r_e.ChangeTracker.with(e,(n=>{n.deleteRange(e.sourceFile,{pos:t.expression.end,end:t.end})}));return[u8(koe,n,va.Remove_parentheses)]},fixIds:[koe]});var Toe="removeUnnecessaryAwait",Coe=[va.await_has_no_effect_on_the_type_of_this_expression.code];function woe(e,t,n){const r=lt(kX(t,n.start),(e=>135===e.kind)),i=r&<(r.parent,sP);if(!i)return;let o=i;if(tP(i.parent)&&qD(Bx(i.expression,!1))){const e=EX(i.parent.pos,t);e&&105!==e.kind&&(o=i.parent)}e.replaceNode(t,o,i.expression)}f8({errorCodes:Coe,getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>woe(t,e.sourceFile,e.span)));if(t.length>0)return[_8(Toe,t,va.Remove_unnecessary_await,Toe,va.Remove_all_unnecessary_uses_of_await)]},fixIds:[Toe],getAllCodeActions:e=>b8(e,Coe,((e,t)=>woe(e,t.file,t)))});var Doe=[va.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code],Eoe="splitTypeOnlyImport";function Poe(e,t){return mc(kX(e,t.start),iN)}function Noe(e,t,n){if(!t)return;const r=xn.checkDefined(t.importClause);e.replaceNode(n.sourceFile,t,YC.updateImportDeclaration(t,t.modifiers,YC.updateImportClause(r,r.isTypeOnly,r.name,void 0),t.moduleSpecifier,t.attributes)),e.insertNodeAfter(n.sourceFile,t,YC.createImportDeclaration(void 0,YC.updateImportClause(r,r.isTypeOnly,void 0,r.namedBindings),t.moduleSpecifier,t.attributes))}f8({errorCodes:Doe,fixIds:[Eoe],getCodeActions:function(e){const t=r_e.ChangeTracker.with(e,(t=>Noe(t,Poe(e.sourceFile,e.span),e)));if(t.length)return[_8(Eoe,t,va.Split_into_two_separate_import_declarations,Eoe,va.Split_all_invalid_type_only_imports)]},getAllCodeActions:e=>b8(e,Doe,((t,n)=>{Noe(t,Poe(e.sourceFile,n),e)}))});var Foe="fixConvertConstToLet",Aoe=[va.Cannot_assign_to_0_because_it_is_a_constant.code];function Ioe(e,t,n){var r;const i=n.getTypeChecker().getSymbolAtLocation(kX(e,t));if(void 0===i)return;const o=lt(null==(r=null==i?void 0:i.valueDeclaration)?void 0:r.parent,WP);if(void 0===o)return;const a=uX(o,87,e);return void 0!==a?{symbol:i,token:a}:void 0}function Ooe(e,t,n){e.replaceNode(t,n,YC.createToken(121))}f8({errorCodes:Aoe,getCodeActions:function(e){const{sourceFile:t,span:n,program:r}=e,i=Ioe(t,n.start,r);if(void 0===i)return;const o=r_e.ChangeTracker.with(e,(e=>Ooe(e,t,i.token)));return[d8(Foe,o,va.Convert_const_to_let,Foe,va.Convert_all_const_to_let)]},getAllCodeActions:e=>{const{program:t}=e,n=new Map;return y8(r_e.ChangeTracker.with(e,(r=>{x8(e,Aoe,(e=>{const i=Ioe(e.file,e.start,t);if(i&&Fx(n,OB(i.symbol)))return Ooe(r,e.file,i.token)}))})))},fixIds:[Foe]});var Moe="fixExpectedComma",Loe=[va._0_expected.code];function joe(e,t,n){const r=kX(e,t);return 27===r.kind&&r.parent&&(HE(r.parent)||WE(r.parent))?{node:r}:void 0}function Roe(e,t,{node:n}){const r=YC.createToken(28);e.replaceNode(t,n,r)}f8({errorCodes:Loe,getCodeActions(e){const{sourceFile:t}=e,n=joe(t,e.span.start,e.errorCode);if(!n)return;const r=r_e.ChangeTracker.with(e,(e=>Roe(e,t,n)));return[_8(Moe,r,[va.Change_0_to_1,";",","],Moe,[va.Change_0_to_1,";",","])]},fixIds:[Moe],getAllCodeActions:e=>b8(e,Loe,((t,n)=>{const r=joe(n.file,n.start,n.code);r&&Roe(t,e.sourceFile,r)}))});var Boe="addVoidToPromise",Joe=[va.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,va.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code];function zoe(e,t,n,r,i){const o=kX(t,n.start);if(!qD(o)||!QE(o.parent)||o.parent.expression!==o||0!==o.parent.arguments.length)return;const a=r.getTypeChecker(),s=a.getSymbolAtLocation(o),c=null==s?void 0:s.valueDeclaration;if(!c||!sE(c)||!YE(c.parent.parent))return;if(null==i?void 0:i.has(c))return;null==i||i.add(c);const l=function(e){var t;if(!Mm(e))return e.typeArguments;if(tP(e.parent)){const n=null==(t=ol(e.parent))?void 0:t.typeExpression.type;if(n&&xE(n)&&qD(n.typeName)&&"Promise"===bc(n.typeName))return n.typeArguments}}(c.parent.parent);if(Q(l)){const n=l[0],r=!FE(n)&&!ME(n)&&ME(YC.createUnionTypeNode([n,YC.createKeywordTypeNode(116)]).types[0]);r&&e.insertText(t,n.pos,"("),e.insertText(t,n.end,r?") | void":" | void")}else{const n=a.getResolvedSignature(o.parent),r=null==n?void 0:n.parameters[0],i=r&&a.getTypeOfSymbolAtLocation(r,c.parent.parent);Mm(c)?(!i||3&i.flags)&&(e.insertText(t,c.parent.parent.end,")"),e.insertText(t,as(t.text,c.parent.parent.pos),"/** @type {Promise} */(")):(!i||2&i.flags)&&e.insertText(t,c.parent.parent.expression.end,"")}}f8({errorCodes:Joe,fixIds:[Boe],getCodeActions(e){const t=r_e.ChangeTracker.with(e,(t=>zoe(t,e.sourceFile,e.span,e.program)));if(t.length>0)return[_8("addVoidToPromise",t,va.Add_void_to_Promise_resolved_without_a_value,Boe,va.Add_void_to_all_Promises_resolved_without_a_value)]},getAllCodeActions:e=>b8(e,Joe,((t,n)=>zoe(t,n.file,n,e.program,new Set)))});var $oe={};o($oe,{CompletionKind:()=>Aae,CompletionSource:()=>Koe,SortText:()=>Uoe,StringCompletions:()=>cse,SymbolOriginInfoKind:()=>Woe,createCompletionDetails:()=>Nae,createCompletionDetailsForSymbol:()=>Pae,getCompletionEntriesFromSymbols:()=>Cae,getCompletionEntryDetails:()=>Dae,getCompletionEntrySymbol:()=>Fae,getCompletionsAtPosition:()=>tae,getPropertiesForObjectExpression:()=>Kae,moduleSpecifierResolutionCacheAttemptLimit:()=>Voe,moduleSpecifierResolutionLimit:()=>qoe});var qoe=100,Voe=1e3,Uoe={LocalDeclarationPriority:"10",LocationPriority:"11",OptionalMember:"12",MemberDeclaredBySpreadAssignment:"13",SuggestedClassMembers:"14",GlobalsOrKeywords:"15",AutoImportSuggestions:"16",ClassMemberSnippets:"17",JavascriptIdentifiers:"18",Deprecated:e=>"z"+e,ObjectLiteralProperty:(e,t)=>`${e}\0${t}\0`,SortBelow:e=>e+"1"},Koe=(e=>(e.ThisProperty="ThisProperty/",e.ClassMemberSnippet="ClassMemberSnippet/",e.TypeOnlyAlias="TypeOnlyAlias/",e.ObjectLiteralMethodSnippet="ObjectLiteralMethodSnippet/",e.SwitchCases="SwitchCases/",e.ObjectLiteralMemberWithComma="ObjectLiteralMemberWithComma/",e))(Koe||{}),Woe=(e=>(e[e.ThisType=1]="ThisType",e[e.SymbolMember=2]="SymbolMember",e[e.Export=4]="Export",e[e.Promise=8]="Promise",e[e.Nullable=16]="Nullable",e[e.ResolvedExport=32]="ResolvedExport",e[e.TypeOnlyAlias=64]="TypeOnlyAlias",e[e.ObjectLiteralMethod=128]="ObjectLiteralMethod",e[e.Ignore=256]="Ignore",e[e.ComputedPropertyName=512]="ComputedPropertyName",e[e.SymbolMemberNoExport=2]="SymbolMemberNoExport",e[e.SymbolMemberExport=6]="SymbolMemberExport",e))(Woe||{});function Hoe(e){return!!(e&&4&e.kind)}function Goe(e){return!(!e||32!==e.kind)}function Xoe(e){return(Hoe(e)||Goe(e))&&!!e.isFromPackageJson}function Qoe(e){return!!(e&&64&e.kind)}function Yoe(e){return!!(e&&128&e.kind)}function Zoe(e){return!!(e&&512&e.kind)}function eae(e,t,n,r,i,o,a,s,c){var l,u,_;const d=Yn(),p=a||KS(ES(r.getCompilerOptions()));let f=!1,m=0,g=0,h=0,y=0;const v=c({tryResolve:function(e,t){if(t){const t=n.getModuleSpecifierForBestExportInfo(e,i,s);return t&&m++,t||"failed"}const r=p||o.allowIncompleteCompletions&&gf,resolvedAny:()=>g>0,resolvedBeyondLimit:()=>g>qoe}),b=y?` (${(h/y*100).toFixed(1)}% hit rate)`:"";return null==(l=t.log)||l.call(t,`${e}: resolved ${g} module specifiers, plus ${m} ambient and ${h} from cache${b}`),null==(u=t.log)||u.call(t,`${e}: response is ${f?"incomplete":"complete"}`),null==(_=t.log)||_.call(t,`${e}: ${Yn()-d}`),v}function tae(e,t,n,r,i,o,a,s,c,l,u=!1){var _;const{previousToken:d}=Mae(i,r);if(a&&!AX(r,i,d)&&!function(e,t,n,r){switch(t){case".":case"@":return!0;case'"':case"'":case"`":return!!n&&YY(n)&&r===n.getStart(e)+1;case"#":return!!n&&VD(n)&&!!Zf(n);case"<":return!!n&&30===n.kind&&(!uP(n.parent)||Qae(n.parent));case"/":return!!n&&($_(n)?!!Tg(n):44===n.kind&&wN(n.parent));case" ":return!!n&&nE(n)&&307===n.parent.kind;default:return xn.assertNever(t)}}(r,a,d,i))return;if(" "===a)return o.includeCompletionsForImportStatements&&o.includeCompletionsWithInsertText?{isGlobalCompletion:!0,isMemberCompletion:!1,isNewIdentifierLocation:!0,isIncomplete:!0,entries:[]}:void 0;const p=t.getCompilerOptions(),f=t.getTypeChecker(),m=o.allowIncompleteCompletions?null==(_=e.getIncompleteCompletionsCache)?void 0:_.call(e):void 0;if(m&&3===s&&d&&qD(d)){const n=function(e,t,n,r,i,o,a,s){const c=e.get();if(!c)return;const l=xX(t,s),u=n.text.toLowerCase(),_=i0(t,i,r,o,a),d=eae("continuePreviousIncompleteResponse",i,a8.createImportSpecifierResolver(t,r,i,o),r,n.getStart(),o,!1,wT(n),(e=>{const n=q(c.entries,(n=>{var o;if(!n.hasAction||!n.source||!n.data||rae(n.data))return n;if(!sse(n.name,u))return;const{origin:a}=xn.checkDefined(Lae(n.name,n.data,r,i)),s=_.get(t.path,n.data.exportMapKey),c=s&&e.tryResolve(s,!Os(By(a.moduleSymbol.name)));if("skipped"===c)return n;if(!c||"failed"===c)return void(null==(o=i.log)||o.call(i,`Unexpected failure resolving auto import for '${n.name}' from '${n.source}'`));const l={...a,kind:32,moduleSpecifier:c.moduleSpecifier};return n.data=bae(l),n.source=Tae(l),n.sourceDisplay=[lY(l.moduleSpecifier)],n}));return e.skippedAny()||(c.isIncomplete=void 0),n}));return c.entries=d,c.flags=4|(c.flags||0),c.optionalReplacementSpan=lae(l),c}(m,r,d,t,e,o,c,i);if(n)return n}else null==m||m.clear();const g=cse.getStringLiteralCompletions(r,i,d,p,e,t,n,o,u);if(g)return g;if(d&&Nl(d.parent)&&(83===d.kind||88===d.kind||80===d.kind))return function(e){const t=function(e){const t=[],n=new Map;let r=e;for(;r&&!cu(r);){if($P(r)){const e=r.label.text;n.has(e)||(n.set(e,!0),t.push({name:e,kindModifiers:"",kind:"label",sortText:Uoe.LocationPriority}))}r=r.parent}return t}(e);if(t.length)return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:t}}(d.parent);const h=Oae(t,n,r,p,i,o,void 0,e,l,c);var y;if(h)switch(h.kind){case 0:const a=function(e,t,n,r,i,o,a,s,c,l){const{symbols:u,contextToken:_,completionKind:d,isInSnippetScope:p,isNewIdentifierLocation:f,location:m,propertyAccessToConvert:g,keywordFilters:h,symbolToOriginInfoMap:y,recommendedCompletion:v,isJsxInitializer:b,isTypeOnlyLocation:x,isJsxIdentifierExpected:S,isRightOfOpenTag:k,isRightOfDotOrQuestionDot:T,importStatementCompletion:C,insideJsDocTagTypeExpression:w,symbolToSortTextMap:D,hasUnresolvedAutoImports:E}=o;let P=o.literals;const N=n.getTypeChecker();if(1===bS(e.scriptKind)){const t=function(e,t){const n=mc(e,(e=>{switch(e.kind){case 287:return!0;case 44:case 32:case 80:case 211:return!1;default:return"quit"}}));if(n){const e=!!uX(n,32,t),r=n.parent.openingElement.tagName.getText(t)+(e?"":">");return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,optionalReplacementSpan:aQ(n.tagName),entries:[{name:r,kind:"class",kindModifiers:void 0,sortText:Uoe.LocationPriority}]}}}(m,e);if(t)return t}const F=mc(_,MN);if(F&&(rE(_)||_h(_,F.expression))){const e=HZ(N,F.parent.clauses);P=P.filter((t=>!e.hasValue(t))),u.forEach(((t,n)=>{if(t.valueDeclaration&&$N(t.valueDeclaration)){const r=N.getConstantValue(t.valueDeclaration);void 0!==r&&e.hasValue(r)&&(y[n]={kind:256})}}))}const A=[],I=uae(e,r);if(I&&!f&&(!u||0===u.length)&&0===h)return;const O=Cae(u,A,void 0,_,m,c,e,t,n,wS(r),i,d,a,r,s,x,g,S,b,C,v,y,D,S,k,l);if(0!==h)for(const t of Jae(h,!w&&Im(e)))(x&&fQ(Ba(t.name))||!x&&("abstract"===(M=t.name)||"async"===M||"await"===M||"declare"===M||"module"===M||"namespace"===M||"type"===M||"satisfies"===M||"as"===M)||!O.has(t.name))&&(O.add(t.name),ie(A,t,nae,void 0,!0));var M;for(const e of function(e,t){const n=[];if(e){const r=e.getSourceFile(),i=e.parent,o=r.getLineAndCharacterOfPosition(e.end).line,a=r.getLineAndCharacterOfPosition(t).line;(iN(i)||gN(i)&&i.moduleSpecifier)&&e===i.moduleSpecifier&&o===a&&n.push({name:Ra(132),kind:"keyword",kindModifiers:"",sortText:Uoe.GlobalsOrKeywords})}return n}(_,c))O.has(e.name)||(O.add(e.name),ie(A,e,nae,void 0,!0));for(const t of P){const n=gae(e,a,t);O.add(n.name),ie(A,n,nae,void 0,!0)}let L;if(I||function(e,t,n,r,i){I7(e).forEach(((e,o)=>{if(e===t)return;const a=vc(o);!n.has(a)&&Ts(a,r)&&(n.add(a),ie(i,{name:a,kind:"warning",kindModifiers:"",sortText:Uoe.JavascriptIdentifiers,isFromUncheckedFile:!0},nae))}))}(e,m.pos,O,wS(r),A),a.includeCompletionsWithInsertText&&_&&!k&&!T&&(L=mc(_,tN))){const i=_ae(L,e,a,r,t,n,s);i&&A.push(i.entry)}return{flags:o.flags,isGlobalCompletion:p,isIncomplete:!(!a.allowIncompleteCompletions||!E)||void 0,isMemberCompletion:fae(d),isNewIdentifierLocation:f,optionalReplacementSpan:lae(m),entries:A}}(r,e,t,p,n,h,o,l,i,u);return(null==a?void 0:a.isIncomplete)&&(null==m||m.set(a)),a;case 1:return iae([...Wce.getJSDocTagNameCompletions(),...oae(r,i,f,p,o,!0)]);case 2:return iae([...Wce.getJSDocTagCompletions(),...oae(r,i,f,p,o,!1)]);case 3:return iae(Wce.getJSDocParameterNameCompletions(h.tag));case 4:return y=h.keywordCompletions,{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:h.isNewIdentifierLocation,entries:y.slice()};default:return xn.assertNever(h)}}function nae(e,t){var n,r;let i=$t(e.sortText,t.sortText);return 0===i&&(i=$t(e.name,t.name)),0===i&&(null==(n=e.data)?void 0:n.moduleSpecifier)&&(null==(r=t.data)?void 0:r.moduleSpecifier)&&(i=Xk(e.data.moduleSpecifier,t.data.moduleSpecifier)),0===i?-1:i}function rae(e){return!!(null==e?void 0:e.moduleSpecifier)}function iae(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:e}}function oae(e,t,n,r,i,o){const a=kX(e,t);if(!F_(a)&&!oF(a))return[];const s=oF(a)?a:a.parent;if(!oF(s))return[];const c=s.parent;if(!cu(c))return[];const l=Im(e),u=i.includeCompletionsWithSnippetText||void 0,_=N(s.tags,(e=>xF(e)&&e.getEnd()<=t));return q(c.parameters,(e=>{if(!Oc(e).length){if(qD(e.name)){const t={tabstop:1},a=e.name.text;let s=sae(a,e.initializer,e.dotDotDotToken,l,!1,!1,n,r,i),c=u?sae(a,e.initializer,e.dotDotDotToken,l,!1,!0,n,r,i,t):void 0;return o&&(s=s.slice(1),c&&(c=c.slice(1))),{name:s,kind:"parameter",sortText:Uoe.LocationPriority,insertText:u?c:void 0,isSnippet:u}}if(e.parent.parameters.indexOf(e)===_){const t=`param${_}`,a=aae(t,e.name,e.initializer,e.dotDotDotToken,l,!1,n,r,i),s=u?aae(t,e.name,e.initializer,e.dotDotDotToken,l,!0,n,r,i):void 0;let c=a.join($b(r)+"* "),d=null==s?void 0:s.join($b(r)+"* ");return o&&(c=c.slice(1),d&&(d=d.slice(1))),{name:c,kind:"parameter",sortText:Uoe.LocationPriority,insertText:u?d:void 0,isSnippet:u}}}}))}function aae(e,t,n,r,i,o,a,s,c){return i?l(e,t,n,r,{tabstop:1}):[sae(e,n,r,i,!1,o,a,s,c,{tabstop:1})];function l(e,t,n,r,l){if(VE(t)&&!r){const _={tabstop:l.tabstop},d=sae(e,n,r,i,!0,o,a,s,c,_);let p=[];for(const n of t.elements){const t=u(e,n,_);if(!t){p=void 0;break}p.push(...t)}if(p)return l.tabstop=_.tabstop,[d,...p]}return[sae(e,n,r,i,!1,o,a,s,c,l)]}function u(e,t,n){if(!t.propertyName&&qD(t.name)||qD(t.name)){const r=t.propertyName?Mp(t.propertyName):t.name.text;if(!r)return;return[sae(`${e}.${r}`,t.initializer,t.dotDotDotToken,i,!1,o,a,s,c,n)]}if(t.propertyName){const r=Mp(t.propertyName);return r&&l(`${e}.${r}`,t.name,t.initializer,t.dotDotDotToken,n)}}}function sae(e,t,n,r,i,o,a,s,c,l){if(o&&xn.assertIsDefined(l),t&&(e=function(e,t){const n=t.getText().trim();return n.includes("\n")||n.length>80?`[${e}]`:`[${e}=${n}]`}(e,t)),o&&(e=KT(e)),r){let r="*";if(i)xn.assert(!n,"Cannot annotate a rest parameter with type 'Object'."),r="Object";else{if(t){const e=a.getTypeAtLocation(t.parent);if(!(16385&e.flags)){const n=t.getSourceFile(),i=0===AQ(n,c)?268435456:0,l=a.typeToTypeNode(e,mc(t,cu),i);if(l){const e=o?vae({removeComments:!0,module:s.module,target:s.target}):rq({removeComments:!0,module:s.module,target:s.target});iw(l,1),r=e.printNode(4,l,n)}}}o&&"*"===r&&(r=`\${${l.tabstop++}:${r}}`)}return`@param {${!i&&n?"...":""}${r}} ${e} ${o?`\${${l.tabstop++}}`:""}`}return`@param ${e} ${o?`\${${l.tabstop++}}`:""}`}function cae(e,t,n){return{kind:4,keywordCompletions:Jae(e,t),isNewIdentifierLocation:n}}function lae(e){return 80===(null==e?void 0:e.kind)?aQ(e):void 0}function uae(e,t){return!Im(e)||!!uT(e,t)}function _ae(e,t,n,r,i,o,a){const s=e.clauses,c=o.getTypeChecker(),l=c.getTypeAtLocation(e.parent.expression);if(l&&l.isUnion()&&x(l.types,(e=>e.isLiteral()))){const u=HZ(c,s),_=wS(r),d=AQ(t,n),p=a8.createImportAdder(t,o,n,i),f=[];for(const t of l.types)if(1024&t.flags){xn.assert(t.symbol,"An enum member type should have a symbol"),xn.assert(t.symbol.parent,"An enum member type should have a parent symbol (the enum symbol)");const n=t.symbol.valueDeclaration&&c.getConstantValue(t.symbol.valueDeclaration);if(void 0!==n){if(u.hasValue(n))continue;u.addValue(n)}const r=a8.typeToAutoImportableTypeNode(c,p,t,e,_);if(!r)return;const i=dae(r,_,d);if(!i)return;f.push(i)}else if(!u.hasValue(t.value))switch(typeof t.value){case"object":f.push(t.value.negative?YC.createPrefixUnaryExpression(41,YC.createBigIntLiteral({negative:!1,base10Value:t.value.base10Value})):YC.createBigIntLiteral(t.value));break;case"number":f.push(t.value<0?YC.createPrefixUnaryExpression(41,YC.createNumericLiteral(-t.value)):YC.createNumericLiteral(t.value));break;case"string":f.push(YC.createStringLiteral(t.value,0===d))}if(0===f.length)return;const m=O(f,(e=>YC.createCaseClause(e,[]))),g=gY(i,null==a?void 0:a.options),h=vae({removeComments:!0,module:r.module,target:r.target,newLine:qZ(g)}),y=a?e=>h.printAndFormatNode(4,e,t,a):e=>h.printNode(4,e,t),v=O(m,((e,t)=>n.includeCompletionsWithSnippetText?`${y(e)}$${t+1}`:`${y(e)}`)).join(g);return{entry:{name:`${h.printNode(4,m[0],t)} ...`,kind:"",sortText:Uoe.GlobalsOrKeywords,insertText:v,hasAction:p.hasFixes()||void 0,source:"SwitchCases/",isSnippet:!!n.includeCompletionsWithSnippetText||void 0},importAdder:p}}}function dae(e,t,n){switch(e.kind){case 183:return pae(e.typeName,t,n);case 199:const r=dae(e.objectType,t,n),i=dae(e.indexType,t,n);return r&&i&&YC.createElementAccessExpression(r,i);case 201:const o=e.literal;switch(o.kind){case 11:return YC.createStringLiteral(o.text,0===n);case 9:return YC.createNumericLiteral(o.text,o.numericLiteralFlags)}return;case 196:const a=dae(e.type,t,n);return a&&(qD(a)?a:YC.createParenthesizedExpression(a));case 186:return pae(e.exprName,t,n);case 205:xn.fail("We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.")}}function pae(e,t,n){if(qD(e))return e;const r=vc(e.right.escapedText);return tC(r,t)?YC.createPropertyAccessExpression(pae(e.left,t,n),r):YC.createElementAccessExpression(pae(e.left,t,n),YC.createStringLiteral(r,0===n))}function fae(e){switch(e){case 0:case 3:case 2:return!0;default:return!1}}function mae(e,t,n){return"object"==typeof n?ST(n)+"n":st(n)?XY(e,t,n):JSON.stringify(n)}function gae(e,t,n){return{name:mae(e,t,n),kind:"string",kindModifiers:"",sortText:Uoe.LocationPriority}}function hae(e,t,n,r,i,o,a,s,c,l,u,_,d,p,f,m,g,h,y,v,b,k,T,C){var w,D;let E,P,N,F,A,I,O,M=oQ(n,o),L=Tae(_);const j=c.getTypeChecker(),R=_&&function(e){return!!(16&e.kind)}(_),B=_&&function(e){return!!(2&e.kind)}(_)||u;if(_&&function(e){return!!(1&e.kind)}(_))E=u?`this${R?"?.":""}[${Sae(a,y,l)}]`:`this${R?"?.":"."}${l}`;else if((B||R)&&p){E=B?u?`[${Sae(a,y,l)}]`:`[${l}]`:l,(R||p.questionDotToken)&&(E=`?.${E}`);const e=uX(p,25,a)||uX(p,29,a);if(!e)return;const t=an(l,p.name.text)?p.name.end:e.end;M=Xs(e.getStart(a),t)}if(f&&(void 0===E&&(E=l),E=`{${E}}`,"boolean"!=typeof f&&(M=aQ(f,a))),_&&function(e){return!!(8&e.kind)}(_)&&p){void 0===E&&(E=l);const e=EX(p.pos,a);let t="";e&&cZ(e.end,e.parent,a)&&(t=";"),t+=`(await ${p.expression.getText()})`,E=u?`${t}${E}`:`${t}${R?"?.":"."}${E}`,M=Xs((lt(p.parent,sP)?p.parent:p.expression).getStart(a),p.end)}if(Goe(_)&&(A=[lY(_.moduleSpecifier)],m&&(({insertText:E,replacementSpan:M}=function(e,t,n,r,i,o,a){const s=t.replacementSpan,c=KT(XY(i,a,n.moduleSpecifier)),l=n.isDefaultExport?1:"export="===n.exportName?2:0,u=a.includeCompletionsWithSnippetText?"$1":"",_=a8.getImportKind(i,l,o,!0),d=t.couldBeTypeOnlyImportSpecifier,p=t.isTopLevelTypeOnly?` ${Ra(156)} `:" ",f=d?`${Ra(156)} `:"",m=r?";":"";switch(_){case 3:return{replacementSpan:s,insertText:`import${p}${KT(e)}${u} = require(${c})${m}`};case 1:return{replacementSpan:s,insertText:`import${p}${KT(e)}${u} from ${c}${m}`};case 2:return{replacementSpan:s,insertText:`import${p}* as ${KT(e)} from ${c}${m}`};case 0:return{replacementSpan:s,insertText:`import${p}{ ${f}${KT(e)}${u} } from ${c}${m}`}}}(l,m,_,g,a,h,y)),F=!!y.includeCompletionsWithSnippetText||void 0)),64===(null==_?void 0:_.kind)&&(I=!0),0===v&&r&&28!==(null==(w=EX(r.pos,a,r))?void 0:w.kind)&&(dE(r.parent.parent)||mE(r.parent.parent)||gE(r.parent.parent)||zN(r.parent)||(null==(D=mc(r.parent,BN))?void 0:D.getLastToken(a))===r||JN(r.parent)&&Xa(a,r.getEnd()).line!==Xa(a,o).line)&&(L="ObjectLiteralMemberWithComma/",I=!0),y.includeCompletionsWithClassMemberSnippets&&y.includeCompletionsWithInsertText&&3===v&&function(e,t,n){if(Mm(t))return!1;return!!(106500&e.flags)&&(gu(t)||t.parent&&t.parent.parent&&mu(t.parent)&&t===t.parent.name&&t.parent.getLastToken(n)===t.parent.name&&gu(t.parent.parent)||t.parent&&IF(t)&&gu(t.parent))}(e,i,a)){let t;const n=yae(s,c,h,y,l,e,i,o,r,b);if(!n)return;({insertText:E,filterText:P,isSnippet:F,importAdder:t}=n),((null==t?void 0:t.hasFixes())||n.eraseRange)&&(I=!0,L="ClassMemberSnippet/")}if(_&&Yoe(_)&&(({insertText:E,isSnippet:F,labelDetails:O}=_),y.useLabelDetailsInCompletionEntries||(l+=O.detail,O=void 0),L="ObjectLiteralMethodSnippet/",t=Uoe.SortBelow(t)),k&&!T&&y.includeCompletionsWithSnippetText&&y.jsxAttributeCompletionStyle&&"none"!==y.jsxAttributeCompletionStyle&&(!NN(i.parent)||!i.parent.initializer)){let t="braces"===y.jsxAttributeCompletionStyle;const n=j.getTypeOfSymbolAtLocation(e,i);"auto"!==y.jsxAttributeCompletionStyle||528&n.flags||1048576&n.flags&&S(n.types,(e=>!!(528&e.flags)))||(402653316&n.flags||1048576&n.flags&&x(n.types,(e=>!!(402686084&e.flags||QX(e))))?(E=`${KT(l)}=${XY(a,y,"$1")}`,F=!0):t=!0),t&&(E=`${KT(l)}={$1}`,F=!0)}if(void 0!==E&&!y.includeCompletionsWithInsertText)return;(Hoe(_)||Goe(_))&&(N=bae(_),I=!m);const J=mc(i,Lx);if(275===(null==J?void 0:J.kind)){const e=Ba(l);J&&e&&(135===e||Ih(e))&&(E=`${l} as ${l}_`)}return{name:l,kind:Hue.getSymbolKind(j,e,i),kindModifiers:Hue.getSymbolModifiers(j,e),sortText:t,source:L,hasAction:!!I||void 0,isRecommended:kae(e,d,j)||void 0,insertText:E,filterText:P,replacementSpan:M,sourceDisplay:A,labelDetails:O,isSnippet:F,isPackageJsonImport:Xoe(_)||void 0,isImportStatementCompletion:!!m||void 0,data:N,...C?{symbol:e}:void 0}}function yae(e,t,n,r,i,o,a,s,c,l){const u=mc(a,gu);if(!u)return;let _,d=i;const p=i,f=t.getTypeChecker(),m=a.getSourceFile(),g=vae({removeComments:!0,module:n.module,target:n.target,omitTrailingSemicolon:!1,newLine:qZ(gY(e,null==l?void 0:l.options))}),h=a8.createImportAdder(m,t,r,e);let y;if(r.includeCompletionsWithSnippetText){_=!0;const e=YC.createEmptyStatement();y=YC.createBlock([e],!0),Fw(e,{kind:0,order:0})}else y=YC.createBlock([],!0);let v=0;const{modifiers:b,range:x,decorators:S}=function(e,t,n){if(!e||Xa(t,n).line>Xa(t,e.getEnd()).line)return{modifiers:0};let r,i,o=0;const a={pos:n,end:n};if(uE(e.parent)&&(i=function(e){if(iu(e))return e.kind;if(qD(e)){const t=xc(e);if(t&&tu(t))return t}}(e))){e.parent.modifiers&&(o|=98303&ib(e.parent.modifiers),r=e.parent.modifiers.filter(cE)||[],a.pos=Math.min(...e.parent.modifiers.map((e=>e.getStart(t)))));const n=ob(i);o&n||(o|=n,a.pos=Math.min(a.pos,e.getStart(t))),e.parent.name!==e&&(a.end=e.parent.name.getStart(t))}return{modifiers:o,decorators:r,range:a.pos{let t=0;k&&(t|=64),mu(e)&&1===f.getMemberOverrideModifierStatus(u,e,o)&&(t|=16),T.length||(v=e.modifierFlagsCache|t),e=YC.replaceModifiers(e,v),T.push(e)}),y,a8.PreserveOptionalFlags.Property,!!k),T.length){const e=8192&o.flags;let t=17|v;t|=e?1024:136;const n=b&t;if(b&~t)return;if(4&v&&1&n&&(v&=-5),0===n||1&n||(v&=-2),v|=n,T=T.map((e=>YC.replaceModifiers(e,v))),null==S?void 0:S.length){const e=T[T.length-1];lI(e)&&(T[T.length-1]=YC.replaceDecoratorsAndModifiers(e,S.concat(Ac(e)||[])))}const r=131073;d=l?g.printAndFormatSnippetList(r,YC.createNodeArray(T),m,l):g.printSnippetList(r,YC.createNodeArray(T),m)}return{insertText:d,filterText:p,isSnippet:_,importAdder:h,eraseRange:x}}function vae(e){let t;const n=r_e.createWriter($b(e)),r=rq(e,n),i={...n,write:e=>o(e,(()=>n.write(e))),nonEscapingWrite:n.write,writeLiteral:e=>o(e,(()=>n.writeLiteral(e))),writeStringLiteral:e=>o(e,(()=>n.writeStringLiteral(e))),writeSymbol:(e,t)=>o(e,(()=>n.writeSymbol(e,t))),writeParameter:e=>o(e,(()=>n.writeParameter(e))),writeComment:e=>o(e,(()=>n.writeComment(e))),writeProperty:e=>o(e,(()=>n.writeProperty(e)))};return{printSnippetList:function(e,n,r){const i=a(e,n,r);return t?r_e.applyChanges(i,t):i},printAndFormatSnippetList:function(e,n,r,i){const o={text:a(e,n,r),getLineAndCharacterOfPosition(e){return Xa(this,e)}},s=UZ(i,r),c=R(n,(e=>{const t=r_e.assignPositionsToNode(e);return A_e.formatNodeGivenIndentation(t,o,r.languageVariant,0,0,{...i,options:s})})),l=t?ve(Z(c,t),((e,t)=>Ft(e.span,t.span))):c;return r_e.applyChanges(o.text,l)},printNode:function(e,n,r){const i=s(e,n,r);return t?r_e.applyChanges(i,t):i},printAndFormatNode:function(e,n,r,i){const o={text:s(e,n,r),getLineAndCharacterOfPosition(e){return Xa(this,e)}},a=UZ(i,r),c=r_e.assignPositionsToNode(n),l=A_e.formatNodeGivenIndentation(c,o,r.languageVariant,0,0,{...i,options:a}),u=t?ve(Z(l,t),((e,t)=>Ft(e.span,t.span))):l;return r_e.applyChanges(o.text,u)}};function o(e,r){const i=KT(e);if(i!==e){const e=n.getTextPos();r();const o=n.getTextPos();t=ue(t||(t=[]),{newText:i,span:{start:e,length:o-e}})}else r()}function a(e,n,o){return t=void 0,i.clear(),r.writeList(e,n,o,i),i.getText()}function s(e,n,o){return t=void 0,i.clear(),r.writeNode(e,n,o,i),i.getText()}}function bae(e){const t=e.fileName?void 0:By(e.moduleSymbol.name),n=!!e.isFromPackageJson||void 0;return Goe(e)?{exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,ambientModuleName:t,fileName:e.fileName,isPackageJsonImport:n}:{exportName:e.exportName,exportMapKey:e.exportMapKey,fileName:e.fileName,ambientModuleName:e.fileName?void 0:By(e.moduleSymbol.name),isPackageJsonImport:!!e.isFromPackageJson||void 0}}function xae(e,t,n){const r="default"===e.exportName,i=!!e.isPackageJsonImport;return rae(e)?{kind:32,exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,symbolName:t,fileName:e.fileName,moduleSymbol:n,isDefaultExport:r,isFromPackageJson:i}:{kind:4,exportName:e.exportName,exportMapKey:e.exportMapKey,symbolName:t,fileName:e.fileName,moduleSymbol:n,isDefaultExport:r,isFromPackageJson:i}}function Sae(e,t,n){return/^\d+$/.test(n)?n:XY(e,t,n)}function kae(e,t,n){return e===t||!!(1048576&e.flags)&&n.getExportSymbolOfSymbol(e)===t}function Tae(e){return Hoe(e)?By(e.moduleSymbol.name):Goe(e)?e.moduleSpecifier:1===(null==e?void 0:e.kind)?"ThisProperty/":64===(null==e?void 0:e.kind)?"TypeOnlyAlias/":void 0}function Cae(e,t,n,r,i,o,a,s,c,l,u,_,d,p,f,m,g,h,y,v,b,x,S,k,T,C=!1){const w=Yn(),D=function(e,t){if(!e)return;const n=mc(e,(e=>zf(e)||ise(e)||Eu(e)?"quit":(sE(e)||aE(e))&&!vE(e.parent))),r=mc(t,(e=>zf(e)||ise(e)||Eu(e)?"quit":KP(e)));return n||r}(r,i),E=lZ(a),P=c.getTypeChecker(),N=new Map;for(let u=0;ue.getSourceFile()===i.getSourceFile())));N.set(O,R),ie(t,j,nae,void 0,!0)}return u("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(Yn()-w)),{has:e=>N.has(e),add:e=>N.set(e,!0)};function F(e,t){var n;let r=e.flags;if(!qN(i)){if(mN(i.parent))return!0;if(lt(D,KP)&&e.valueDeclaration===D)return!1;const o=e.valueDeclaration??(null==(n=e.declarations)?void 0:n[0]);if(D&&o&&(aE(D)&&aE(o)||sE(D)&&sE(o))){const e=o.pos,t=sE(D)?D.parent.parameters:OE(D.parent)?void 0:D.parent.typeParameters;if(e>=D.pos&&t&&emae(n,a,e)===i.name));return void 0!==v?{type:"literal",literal:v}:g(l,((e,t)=>{const n=p[t],r=jae(e,wS(s),n,d,c.isJsxIdentifierExpected);return r&&r.name===i.name&&("ClassMemberSnippet/"===i.source&&106500&e.flags||"ObjectLiteralMethodSnippet/"===i.source&&8196&e.flags||Tae(n)===i.source||"ObjectLiteralMemberWithComma/"===i.source)?{type:"symbol",symbol:e,location:_,origin:n,contextToken:f,previousToken:m,isJsxInitializer:h,isTypeOnlyLocation:y}:void 0}))||{type:"none"}}function Dae(e,t,n,r,i,o,a,s,c){const l=e.getTypeChecker(),u=e.getCompilerOptions(),{name:_,source:d,data:p}=i,{previousToken:f,contextToken:m}=Mae(r,n);if(AX(n,r,f))return cse.getStringLiteralCompletionDetails(_,n,r,f,e,o,c,s);const g=wae(e,t,n,r,i,o,s);switch(g.type){case"request":{const{request:e}=g;switch(e.kind){case 1:return Wce.getJSDocTagNameCompletionDetails(_);case 2:return Wce.getJSDocTagCompletionDetails(_);case 3:return Wce.getJSDocParameterNameCompletionDetails(_);case 4:return Q(e.keywordCompletions,(e=>e.name===_))?Eae(_,"keyword",5):void 0;default:return xn.assertNever(e)}}case"symbol":{const{symbol:t,location:i,contextToken:f,origin:m,previousToken:h}=g,{codeActions:y,sourceDisplay:v}=function(e,t,n,r,i,o,a,s,c,l,u,_,d,p,f,m){if((null==p?void 0:p.moduleSpecifier)&&u&&Yae(n||u,c).replacementSpan)return{codeActions:void 0,sourceDisplay:[lY(p.moduleSpecifier)]};if("ClassMemberSnippet/"===f){const{importAdder:r,eraseRange:u}=yae(a,o,s,d,e,i,t,l,n,_);if((null==r?void 0:r.hasFixes())||u)return{sourceDisplay:void 0,codeActions:[{changes:r_e.ChangeTracker.with({host:a,formatContext:_,preferences:d},(e=>{r&&r.writeFixes(e),u&&e.deleteRange(c,u)})),description:(null==r?void 0:r.hasFixes())?VZ([va.Includes_imports_of_types_referenced_by_0,e]):VZ([va.Update_modifiers_of_0,e])}]}}if(Qoe(r)){const e=a8.getPromoteTypeOnlyCompletionAction(c,r.declaration.name,o,a,_,d);return xn.assertIsDefined(e,"Expected to have a code action for promoting type-only alias"),{codeActions:[e],sourceDisplay:void 0}}if("ObjectLiteralMemberWithComma/"===f&&n){const t=r_e.ChangeTracker.with({host:a,formatContext:_,preferences:d},(e=>e.insertText(c,n.end,",")));if(t)return{sourceDisplay:void 0,codeActions:[{changes:t,description:VZ([va.Add_missing_comma_for_object_member_completion_0,e])}]}}if(!r||!Hoe(r)&&!Goe(r))return{codeActions:void 0,sourceDisplay:void 0};const g=r.isFromPackageJson?a.getPackageJsonAutoImportProvider().getTypeChecker():o.getTypeChecker(),{moduleSymbol:h}=r,y=g.getMergedSymbol(mx(i.exportSymbol||i,g)),v=30===(null==n?void 0:n.kind)&&D_(n.parent),{moduleSpecifier:b,codeAction:x}=a8.getImportCompletionAction(y,h,null==p?void 0:p.exportMapKey,c,e,v,a,o,_,u&&qD(u)?u.getStart(c):l,d,m);return xn.assert(!(null==p?void 0:p.moduleSpecifier)||b===p.moduleSpecifier),{sourceDisplay:[lY(b)],codeActions:[x]}}(_,i,f,m,t,e,o,u,n,r,h,a,s,p,d,c);return Pae(t,Zoe(m)?m.symbolName:t.name,l,n,i,c,y,v)}case"literal":{const{literal:e}=g;return Eae(mae(n,s,e),"string","string"==typeof e?8:7)}case"cases":{const t=_ae(m.parent,n,s,e.getCompilerOptions(),o,e,void 0);if(null==t?void 0:t.importAdder.hasFixes()){const{entry:e,importAdder:n}=t,r=r_e.ChangeTracker.with({host:o,formatContext:a,preferences:s},n.writeFixes);return{name:e.name,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0,codeActions:[{changes:r,description:VZ([va.Includes_imports_of_types_referenced_by_0,_])}]}}return{name:_,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0}}case"none":return Bae().some((e=>e.name===_))?Eae(_,"keyword",5):void 0;default:xn.assertNever(g)}}function Eae(e,t,n){return Nae(e,"",t,[tY(e,n)])}function Pae(e,t,n,r,i,o,a,s){const{displayParts:c,documentation:l,symbolKind:u,tags:_}=n.runWithCancellationToken(o,(t=>Hue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,e,r,i,i,7)));return Nae(t,Hue.getSymbolModifiers(n,e),u,c,l,_,a,s)}function Nae(e,t,n,r,i,o,a,s){return{name:e,kindModifiers:t,kind:n,displayParts:r,documentation:i,tags:o,codeActions:a,source:s,sourceDisplay:s}}function Fae(e,t,n,r,i,o,a){const s=wae(e,t,n,r,i,o,a);return"symbol"===s.type?s.symbol:void 0}var Aae=(e=>(e[e.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",e[e.Global=1]="Global",e[e.PropertyAccess=2]="PropertyAccess",e[e.MemberLike=3]="MemberLike",e[e.String=4]="String",e[e.None=5]="None",e))(Aae||{});function Iae(e,t,n){const r=n.getAccessibleSymbolChain(e,t,-1,!1);return r?Te(r):e.parent&&(function(e){var t;return!!(null==(t=e.declarations)?void 0:t.some((e=>307===e.kind)))}(e.parent)?e:Iae(e.parent,t,n))}function Oae(e,t,n,r,i,o,a,s,c,l){const u=e.getTypeChecker(),_=uae(n,r);let d=Yn(),p=kX(n,i);t("getCompletionData: Get current token: "+(Yn()-d)),d=Yn();const m=qX(n,i,p);t("getCompletionData: Is inside comment: "+(Yn()-d));let h=!1,y=!1,v=!1;if(m){if(VX(n,i)){if(64===n.text.charCodeAt(i-1))return{kind:1};{const e=GG(i,n);if(!/[^*|\s(/)]/.test(n.text.substring(e,i)))return{kind:2}}}const e=function(e,t){return mc(e,(e=>!(!F_(e)||!YG(e,t))||!!oF(e)&&"quit"))}(p,i);if(e){if(e.tagName.pos<=i&&i<=e.tagName.end)return{kind:1};if(AF(e))y=!0;else{const t=function(e){if(function(e){switch(e.kind){case 341:case 348:case 342:case 344:case 346:case 349:case 350:return!0;case 345:return!!e.constraint;default:return!1}}(e)){const t=CF(e)?e.constraint:e.typeExpression;return t&&309===t.kind?t:void 0}if(cF(e)||PF(e))return e.class}(e);if(t&&(p=kX(n,i),p&&(dh(p)||348===p.parent.kind&&p.parent.name===p)||(h=ge(t))),!h&&xF(e)&&(Nd(e.name)||e.name.pos<=i&&i<=e.name.end))return{kind:3,tag:e}}}if(!h&&!y)return void t("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.")}d=Yn();const b=!h&&!y&&Im(n),x=Mae(i,n),k=x.previousToken;let T=x.contextToken;t("getCompletionData: Get previous token: "+(Yn()-d));let C,w,D=p,E=!1,P=!1,N=!1,A=!1,I=!1,O=!1,M=xX(n,i),L=0,j=!1,B=0;if(T){const e=Yae(T,n);if(e.keywordCompletion){if(e.isKeywordOnlyCompletion)return{kind:4,keywordCompletions:[(J=e.keywordCompletion,{name:Ra(J),kind:"keyword",kindModifiers:"",sortText:Uoe.GlobalsOrKeywords})],isNewIdentifierLocation:e.isNewIdentifierLocation};L=function(e){if(156===e)return 8;xn.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters")}(e.keywordCompletion)}if(e.replacementSpan&&o.includeCompletionsForImportStatements&&o.includeCompletionsWithInsertText&&(B|=2,w=e,j=e.isNewIdentifierLocation),!e.replacementSpan&&function(e){const r=Yn(),o=function(e){return(ED(e)||Hl(e))&&(ZG(e,i)||i===e.end&&(!!e.isUnterminated||ED(e)))}(e)||function(e){const t=e.parent,r=t.kind;switch(e.kind){case 28:return 260===r||261===(o=e).parent.kind&&!JX(o,n,u)||243===r||266===r||de(r)||264===r||207===r||265===r||gu(t)&&!!t.typeParameters&&t.typeParameters.end>=e.pos;case 25:case 23:return 207===r;case 59:return 208===r;case 21:return 299===r||de(r);case 19:return 266===r;case 30:return 263===r||231===r||264===r||265===r||pu(r);case 126:return 172===r&&!gu(t.parent);case 26:return 169===r||!!t.parent&&207===t.parent.kind;case 125:case 123:case 124:return 169===r&&!fE(t.parent);case 130:return 276===r||281===r||274===r;case 139:case 153:return!Xae(e);case 80:if(276===r&&e===t.name&&"type"===e.text)return!1;if(mc(e.parent,KP)&&function(e,t){return n.getLineEndOfPosition(e.getEnd())k.end))}(e)||function(e){if(9===e.kind){const t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(e)||function(e){if(12===e.kind)return!0;if(32===e.kind&&e.parent){if(M===e.parent&&(286===M.kind||285===M.kind))return!1;if(286===e.parent.kind)return 286!==M.parent.kind;if(287===e.parent.kind||285===e.parent.kind)return!!e.parent.parent&&284===e.parent.parent.kind}return!1}(e)||CD(e);return t("getCompletionsAtPosition: isCompletionListBlocker: "+(Yn()-r)),o}(T))return t("Returning an empty list because completion was requested in an invalid position."),L?cae(L,b,le()):void 0;let r=T.parent;if(25===T.kind||29===T.kind)switch(E=25===T.kind,P=29===T.kind,r.kind){case 211:if(C=r,D=C.expression,Nd(jx(C))||(QE(D)||cu(D))&&D.end===T.pos&&D.getChildCount(n)&&22!==De(D.getChildren(n)).kind)return;break;case 166:D=r.left;break;case 267:D=r.name;break;case 205:D=r;break;case 236:D=r.getFirstToken(n),xn.assert(102===D.kind||105===D.kind);break;default:return}else if(!w){if(r&&211===r.kind&&(T=r,r=r.parent),p.parent===M)switch(p.kind){case 32:284!==p.parent.kind&&286!==p.parent.kind||(M=p);break;case 44:285===p.parent.kind&&(M=p)}switch(r.kind){case 287:44===T.kind&&(A=!0,M=T);break;case 226:if(!Qae(r))break;case 285:case 284:case 286:O=!0,30===T.kind&&(N=!0,M=T);break;case 294:case 293:(20===k.kind||80===k.kind&&291===k.parent.kind)&&(O=!0);break;case 291:if(r.initializer===k&&k.endCQ(t?s.getPackageJsonAutoImportProvider():e,s)));if(E||P)!function(){V=2;const e=df(D),t=e&&!D.isTypeOf||wf(D.parent)||JX(T,n,u),r=vG(D);if(ou(D)||e||GE(D)){const n=ZP(D.parent);n&&(j=!0);let i=u.getSymbolAtLocation(D);if(i&&(i=mx(i,u),1920&i.flags)){const a=u.getExportsOfModule(i);xn.assertEachIsDefined(a,"getExportsOfModule() should all be defined");const s=t=>u.isValidPropertyAccess(e?D:D.parent,t.name),c=e=>ose(e,u),l=n?e=>{var t;return!!(1920&e.flags)&&!(null==(t=e.declarations)?void 0:t.every((e=>e.parent===D.parent)))}:r?e=>c(e)||s(e):t||h?c:s;for(const e of a)l(e)&&K.push(e);if(!t&&!h&&i.declarations&&i.declarations.some((e=>307!==e.kind&&267!==e.kind&&266!==e.kind))){let e=u.getTypeOfSymbolAtLocation(i,D).getNonOptionalType(),t=!1;if(e.isNullableType()){const n=E&&!P&&!1!==o.includeAutomaticOptionalChainCompletions;(n||P)&&(e=e.getNonNullableType(),n&&(t=!0))}ie(e,!!(65536&D.flags),t)}return}}if(!t||vv(D)){u.tryGetThisTypeAt(D,!1);let e=u.getTypeAtLocation(D).getNonOptionalType();if(t)ie(e.getNonNullableType(),!1,!1);else{let t=!1;if(e.isNullableType()){const n=E&&!P&&!1!==o.includeAutomaticOptionalChainCompletions;(n||P)&&(e=e.getNonNullableType(),n&&(t=!0))}ie(e,!!(65536&D.flags),t)}}}();else if(N)K=u.getJsxIntrinsicTagNamesAt(M),xn.assertEachIsDefined(K,"getJsxIntrinsicTagNames() should all be defined"),se(),V=1,L=0;else if(A){const e=T.parent.parent.openingElement.tagName,t=u.getSymbolAtLocation(e);t&&(K=[t]),V=1,L=0}else if(!se())return L?cae(L,b,j):void 0;t("getCompletionData: Semantic work: "+(Yn()-z));const te=k&&function(e,t,n,r){const{parent:i}=e;switch(e.kind){case 80:return GY(e,r);case 64:switch(i.kind){case 260:return r.getContextualType(i.initializer);case 226:return r.getTypeAtLocation(i.left);case 291:return r.getContextualTypeForJsxAttribute(i);default:return}case 105:return r.getContextualType(i);case 84:const o=lt(i,MN);return o?eZ(o,r):void 0;case 19:return!IN(i)||kN(i.parent)||DN(i.parent)?void 0:r.getContextualTypeForJsxAttribute(i.parent);default:const a=due.getArgumentInfoForCompletions(e,t,n,r);return a?r.getContextualTypeForArgumentAtIndex(a.invocation,a.argumentIndex):QY(e.kind)&&uP(i)&&QY(i.operatorToken.kind)?r.getTypeAtLocation(i.left):r.getContextualType(e,4)||r.getContextualType(e)}}(k,i,n,u),ne=lt(k,$_)||O?[]:q(te&&(te.isUnion()?te.types:[te]),(e=>!e.isLiteral()||1024&e.flags?void 0:e.value)),re=k&&te&&function(e,t,n){return g(t&&(t.isUnion()?t.types:[t]),(t=>{const r=t&&t.symbol;return r&&424&r.flags&&!Tx(r)?Iae(r,e,n):void 0}))}(k,te,u);return{kind:0,symbols:K,completionKind:V,isInSnippetScope:v,propertyAccessToConvert:C,isNewIdentifierLocation:j,location:M,keywordFilters:L,literals:ne,symbolToOriginInfoMap:W,recommendedCompletion:re,previousToken:k,contextToken:T,isJsxInitializer:I,insideJsDocTagTypeExpression:h,symbolToSortTextMap:H,isTypeOnlyLocation:X,isJsxIdentifierExpected:O,isRightOfOpenTag:N,isRightOfDotOrQuestionDot:E||P,importStatementCompletion:w,hasUnresolvedAutoImports:U,flags:B};function ie(e,t,n){j=!!e.getStringIndexType(),P&&Q(e.getCallSignatures())&&(j=!0);const r=205===D.kind?D:D.parent;if(_)for(const t of e.getApparentProperties())u.isValidPropertyAccessForCompletions(r,e,t)&&oe(t,!1,n);else K.push(...F(Hae(e,u),(t=>u.isValidPropertyAccessForCompletions(r,e,t))));if(t&&o.includeCompletionsWithInsertText){const t=u.getPromisedTypeOfPromise(e);if(t)for(const e of t.getApparentProperties())u.isValidPropertyAccessForCompletions(r,t,e)&&oe(e,!0,n)}}function oe(t,r,a){var c;const l=g(t.declarations,(e=>lt(Pc(e),oE)));if(l){const r=ae(l.expression),a=r&&u.getSymbolAtLocation(r),f=a&&Iae(a,T,u),m=f&&OB(f);if(m&&Fx(G,m)){const t=K.length;K.push(f);const r=f.parent;if(r&&nd(r)&&u.tryGetMemberInModuleExportsAndProperties(f.name,r)===f){const a=Os(By(r.name))?null==(c=kd(r))?void 0:c.fileName:void 0,{moduleSpecifier:l}=($||($=a8.createImportSpecifierResolver(n,e,s,o))).getModuleSpecifierForBestExportInfo([{exportKind:0,moduleFileName:a,isFromPackageJson:!1,moduleSymbol:r,symbol:f,targetFlags:mx(f,u).flags}],i,wT(M))||{};if(l){const e={kind:p(6),moduleSymbol:r,isDefaultExport:!1,symbolName:f.name,exportName:f.name,fileName:a,moduleSpecifier:l};W[t]=e}}else W[t]={kind:p(2)}}else if(o.includeCompletionsWithInsertText){if(m&&G.has(m))return;d(t),_(t),K.push(t)}}else d(t),_(t),K.push(t);function _(e){(function(e){return!!(e.valueDeclaration&&256&Qv(e.valueDeclaration)&&gu(e.valueDeclaration.parent))})(e)&&(H[OB(e)]=Uoe.LocalDeclarationPriority)}function d(e){o.includeCompletionsWithInsertText&&(r&&Fx(G,OB(e))?W[K.length]={kind:p(8)}:a&&(W[K.length]={kind:16}))}function p(e){return a?16|e:e}}function ae(e){return qD(e)?e:GE(e)?ae(e.expression):void 0}function se(){const t=function(){const e=function(e){if(!e)return;const t=e.parent;switch(e.kind){case 19:if(CE(t))return t;break;case 27:case 28:case 80:if(171===t.kind&&CE(t.parent))return t.parent}}(T);if(!e)return 0;const t=(AE(e.parent)?e.parent:void 0)||e,n=Gae(t,u);if(!n)return 0;const r=u.getTypeFromTypeNode(t),i=Hae(n,u),o=Hae(r,u),a=new Set;return o.forEach((e=>a.add(e.escapedName))),K=Z(K,F(i,(e=>!a.has(e.escapedName)))),V=0,j=!0,1}()||function(){if(26===(null==T?void 0:T.kind))return 0;const t=K.length,a=function(e,t,n){var r;if(e){const{parent:i}=e;switch(e.kind){case 19:case 28:if(HE(i)||VE(i))return i;break;case 42:return dE(i)?lt(i.parent,HE):void 0;case 134:return lt(i.parent,HE);case 80:if("async"===e.text&&JN(e.parent))return e.parent.parent;{if(HE(e.parent.parent)&&(zN(e.parent)||JN(e.parent)&&Xa(n,e.getEnd()).line!==Xa(n,t).line))return e.parent.parent;const r=mc(i,BN);if((null==r?void 0:r.getLastToken(n))===e&&HE(r.parent))return r.parent}break;default:if((null==(r=i.parent)?void 0:r.parent)&&(dE(i.parent)||mE(i.parent)||gE(i.parent))&&HE(i.parent.parent))return i.parent.parent;if(zN(i)&&HE(i.parent))return i.parent;const o=mc(i,BN);if(59!==e.kind&&(null==o?void 0:o.getLastToken(n))===e&&HE(o.parent))return o.parent}}}(T,i,n);if(!a)return 0;let l,_;if(V=0,210===a.kind){const e=function(e,t){const n=t.getContextualType(e);if(n)return n;const r=ah(e.parent);return uP(r)&&64===r.operatorToken.kind&&e===r.left?t.getTypeAtLocation(r):Xu(r)?t.getContextualType(r):void 0}(a,u);if(void 0===e)return 67108864&a.flags?2:0;const t=u.getContextualType(a,4),n=(t||e).getStringIndexType(),r=(t||e).getNumberIndexType();if(j=!!n||!!r,l=Kae(e,t,a,u),_=a.properties,0===l.length&&!r)return 0}else{xn.assert(206===a.kind),j=!1;const e=sy(a.parent);if(!If(e))return xn.fail("Root declaration is not variable-like.");let t=L_(e)||!!kv(e)||250===e.parent.parent.kind;if(t||169!==e.kind||(Xu(e.parent)?t=!!u.getContextualType(e.parent):174!==e.parent.kind&&178!==e.parent.kind||(t=Xu(e.parent.parent)&&!!u.getContextualType(e.parent.parent))),t){const e=u.getTypeAtLocation(a);if(!e)return 2;l=u.getPropertiesOfType(e).filter((t=>u.isPropertyAccessible(a,!1,!1,e,t))),_=a.elements}}if(l&&l.length>0){const n=function(e,t){if(0===t.length)return e;const n=new Set,r=new Set;for(const e of t){if(303!==e.kind&&304!==e.kind&&208!==e.kind&&174!==e.kind&&177!==e.kind&&178!==e.kind&&305!==e.kind)continue;if(ge(e))continue;let t;if(zN(e))pe(e,n);else if(KE(e)&&e.propertyName)80===e.propertyName.kind&&(t=e.propertyName.escapedText);else{const n=Pc(e);t=n&&Wh(n)?Gh(n):void 0}void 0!==t&&r.add(t)}const i=e.filter((e=>!r.has(e.escapedName)));return me(n,i),i}(l,xn.checkDefined(_));K=Z(K,n),fe(),210===a.kind&&o.includeCompletionsWithObjectLiteralMethodSnippets&&o.includeCompletionsWithInsertText&&(function(e){for(let t=e;t{if(!(8196&t.flags))return;const n=jae(t,wS(r),void 0,0,!1);if(!n)return;const{name:i}=n,a=function(e,t,n,r,i,o,a,s){const c=a.includeCompletionsWithSnippetText||void 0;let l=t;const u=n.getSourceFile(),_=function(e,t,n,r,i,o){const a=e.getDeclarations();if(!a||!a.length)return;const s=r.getTypeChecker(),c=a[0],l=NY(Pc(c),!1),u=s.getWidenedType(s.getTypeOfSymbolAtLocation(e,t)),_=33554432|(0===AQ(n,o)?268435456:0);switch(c.kind){case 171:case 172:case 173:case 174:{let e=1048576&u.flags&&u.types.length<10?s.getUnionType(u.types,2):u;if(1048576&e.flags){const t=F(e.types,(e=>s.getSignaturesOfType(e,0).length>0));if(1!==t.length)return;e=t[0]}if(1!==s.getSignaturesOfType(e,0).length)return;const n=s.typeToTypeNode(e,t,_,a8.getNoopSymbolTrackerWithResolver({program:r,host:i}));if(!n||!SE(n))return;let a;if(o.includeCompletionsWithSnippetText){const e=YC.createEmptyStatement();a=YC.createBlock([e],!0),Fw(e,{kind:0,order:0})}else a=YC.createBlock([],!0);const c=n.parameters.map((e=>YC.createParameterDeclaration(void 0,e.dotDotDotToken,e.name,void 0,void 0,e.initializer)));return YC.createMethodDeclaration(void 0,void 0,l,void 0,void 0,c,void 0,a)}default:return}}(e,n,u,r,i,a);if(!_)return;const d=vae({removeComments:!0,module:o.module,target:o.target,omitTrailingSemicolon:!1,newLine:qZ(gY(i,null==s?void 0:s.options))});l=s?d.printAndFormatSnippetList(80,YC.createNodeArray([_],!0),u,s):d.printSnippetList(80,YC.createNodeArray([_],!0),u);const p=rq({removeComments:!0,module:o.module,target:o.target,omitTrailingSemicolon:!0}),f=YC.createMethodSignature(void 0,"",_.questionToken,_.typeParameters,_.parameters,_.type);return{isSnippet:c,insertText:l,labelDetails:{detail:p.printNode(4,f,u)}}}(t,i,p,e,s,r,o,c);if(!a)return;const l={kind:128,...a};B|=32,W[K.length]=l,K.push(t)})))}var d,p;return 1}()||(w?(j=!0,ce(),1):0)||function(){if(!T)return 0;const e=19===T.kind||28===T.kind?lt(T.parent,Lx):gQ(T)?lt(T.parent.parent,Lx):void 0;if(!e)return 0;gQ(T)||(L=8);const{moduleSpecifier:t}=275===e.kind?e.parent.parent:e.parent;if(!t)return j=!0,275===e.kind?2:0;const n=u.getSymbolAtLocation(t);if(!n)return j=!0,2;V=3,j=!1;const r=u.getExportsAndPropertiesOfModule(n),i=new Set(e.elements.filter((e=>!ge(e))).map((e=>(e.propertyName||e.name).escapedText))),o=r.filter((e=>"default"!==e.escapedName&&!i.has(e.escapedName)));return K=Z(K,o),o.length||(L=0),1}()||function(){if(void 0===T)return 0;const e=19===T.kind||28===T.kind?lt(T.parent,lN):59===T.kind?lt(T.parent.parent,lN):void 0;if(void 0===e)return 0;const t=new Set(e.elements.map(xC));return K=F(u.getTypeAtLocation(e).getApparentProperties(),(e=>!t.has(e.escapedName))),1}()||function(){var e;const t=!T||19!==T.kind&&28!==T.kind?void 0:lt(T.parent,hN);if(!t)return 0;const n=mc(t,_n(qN,ZP));return V=5,j=!1,null==(e=n.locals)||e.forEach(((e,t)=>{var r,i;K.push(e),(null==(i=null==(r=n.symbol)?void 0:r.exports)?void 0:i.has(t))&&(H[OB(e)]=Uoe.OptionalMember)})),1}()||(function(e){if(e){const t=e.parent;switch(e.kind){case 21:case 28:return fE(e.parent)?e.parent:void 0;default:if(ue(e))return t.parent}}}(T)?(V=5,j=!0,L=4,1):0)||function(){const e=function(e,t,n,r){switch(n.kind){case 352:return lt(n.parent,Ax);case 1:const t=lt(we(ut(n.parent,qN).statements),Ax);if(t&&!uX(t,20,e))return t;break;case 81:if(lt(n.parent,uE))return mc(n,gu);break;case 80:if(xc(n))return;if(uE(n.parent)&&n.parent.initializer===n)return;if(Xae(n))return mc(n,Ax)}if(t){if(137===n.kind||qD(t)&&uE(t.parent)&&gu(n))return mc(t,gu);switch(t.kind){case 64:return;case 27:case 20:return Xae(n)&&n.parent.name===n?n.parent.parent:lt(n,Ax);case 19:case 28:return lt(t.parent,Ax);default:if(Ax(n)){if(Xa(e,t.getEnd()).line!==Xa(e,r).line)return n;const i=gu(t.parent.parent)?qae:$ae;return i(t.kind)||42===t.kind||qD(t)&&i(xc(t)??0)?t.parent.parent:void 0}return}}}(n,T,M,i);if(!e)return 0;if(V=3,j=!0,L=42===T.kind?0:gu(e)?2:3,!gu(e))return 1;const t=27===T.kind?T.parent.parent:T.parent;let r=mu(t)?Qv(t):0;if(80===T.kind&&!ge(T))switch(T.getText()){case"private":r|=2;break;case"static":r|=256;break;case"override":r|=16}if(pE(t)&&(r|=256),!(2&r)){const t=R(gu(e)&&16&r?fn(Sh(e)):Ch(e),(t=>{const n=u.getTypeAtLocation(t);return 256&r?(null==n?void 0:n.symbol)&&u.getPropertiesOfType(u.getTypeOfSymbolAtLocation(n.symbol,e)):n&&u.getPropertiesOfType(n)}));K=Z(K,function(e,t,n){const r=new Set;for(const e of t){if(172!==e.kind&&174!==e.kind&&177!==e.kind&&178!==e.kind)continue;if(ge(e))continue;if(Rv(e,2))continue;if(Jv(e)!==!!(256&n))continue;const t=Kh(e.name);t&&r.add(t)}return e.filter((e=>!(r.has(e.escapedName)||!e.declarations||2&fx(e)||e.valueDeclaration&&Zl(e.valueDeclaration))))}(t,e.members,r)),f(K,((e,t)=>{const n=null==e?void 0:e.valueDeclaration;if(n&&mu(n)&&n.name&&oE(n.name)){const n={kind:512,symbolName:u.symbolToString(e)};W[t]=n}}))}return 1}()||function(){const e=function(e){if(e){const t=e.parent;switch(e.kind){case 32:case 31:case 44:case 80:case 211:case 292:case 291:case 293:if(t&&(285===t.kind||286===t.kind)){if(32===e.kind){const r=EX(e.pos,n,void 0);if(!t.typeArguments||r&&44===r.kind)break}return t}if(291===t.kind)return t.parent.parent;break;case 11:if(t&&(291===t.kind||293===t.kind))return t.parent.parent;break;case 20:if(t&&294===t.kind&&t.parent&&291===t.parent.kind)return t.parent.parent.parent;if(t&&293===t.kind)return t.parent.parent}}}(T),t=e&&u.getContextualType(e.attributes);if(!t)return 0;const r=e&&u.getContextualType(e.attributes,4);return K=Z(K,function(e,t){const n=new Set,r=new Set;for(const e of t)ge(e)||(291===e.kind?n.add(lC(e.name)):AN(e)&&pe(e,r));const i=e.filter((e=>!n.has(e.escapedName)));return me(r,i),i}(Kae(t,r,e.attributes,u),e.attributes.properties)),fe(),V=3,j=!1,1}()||(function(){L=function(e){if(e){let t;const n=mc(e.parent,(e=>gu(e)?"quit":!(!uu(e)||t!==e.body)||(t=e,!1)));return n&&n}}(T)?5:1,V=1,j=le(),k!==T&&xn.assert(!!k,"Expected 'contextToken' to be defined when different from 'previousToken'.");const e=k!==T?k.getStart():i,t=function(e,t,n){let r=e;for(;r&&!oX(r,t,n);)r=r.parent;return r}(T,e,n)||n;v=function(e){switch(e.kind){case 307:case 228:case 294:case 241:return!0;default:return b_(e)}}(t);const r=2887656|(X?0:111551),a=k&&!wT(k);K=Z(K,u.getSymbolsInScope(t,r)),xn.assertEachIsDefined(K,"getSymbolsInScope() should all be defined");for(let e=0;ee.getSourceFile()===n))||(H[OB(t)]=Uoe.GlobalsOrKeywords),a&&!(111551&t.flags)){const n=t.declarations&&S(t.declarations,Ul);if(n){const t={kind:64,declaration:n};W[e]=t}}}if(o.includeCompletionsWithInsertText&&307!==t.kind){const e=u.tryGetThisTypeAt(t,!1,gu(t.parent)?t:void 0);if(e&&!function(e,t,n){const r=n.resolveName("self",void 0,111551,!1);if(r&&n.getTypeOfSymbolAtLocation(r,t)===e)return!0;const i=n.resolveName("global",void 0,111551,!1);if(i&&n.getTypeOfSymbolAtLocation(i,t)===e)return!0;const o=n.resolveName("globalThis",void 0,111551,!1);return!(!o||n.getTypeOfSymbolAtLocation(o,t)!==e)}(e,n,u))for(const t of Hae(e,u))W[K.length]={kind:1},K.push(t),H[OB(t)]=Uoe.SuggestedClassMembers}ce(),X&&(L=T&&Qu(T.parent)?6:7)}(),1);return 1===t}function ce(){var t,r;if(!function(){var t;return!!w||!!o.includeCompletionsForModuleExports&&(!(!n.externalModuleIndicator&&!n.commonJsModuleIndicator)||!!TQ(e.getCompilerOptions())||(null==(t=e.getSymlinkCache)?void 0:t.call(e).hasAnySymlinks())||!!e.getCompilerOptions().paths||SQ(e))}())return;if(xn.assert(!(null==a?void 0:a.data),"Should not run 'collectAutoImports' when faster path is available via `data`"),a&&!a.source)return;B|=1;const c=k===T&&w?"":k&&qD(k)?k.text.toLowerCase():"",u=null==(t=s.getModuleSpecifierCache)?void 0:t.call(s),_=i0(n,s,e,o,l),d=null==(r=s.getPackageJsonAutoImportProvider)?void 0:r.call(s),p=a?void 0:bZ(n,o,s);function f(t){const r=lt(t.moduleSymbol.valueDeclaration,qN);if(!r){const r=By(t.moduleSymbol.name);return(!fH.nodeCoreModules.has(r)||an(r,"node:")===$Z(n,e))&&(!p||p.allowsImportingAmbientModule(t.moduleSymbol,ee(t.isFromPackageJson)))}return t0(t.isFromPackageJson?d:e,n,r,o,p,ee(t.isFromPackageJson),u)}eae("collectAutoImports",s,$||($=a8.createImportSpecifierResolver(n,e,s,o)),e,i,o,!!w,wT(M),(e=>{_.search(n.path,N,((e,t)=>{if(!Ts(e,wS(s.getCompilationSettings())))return!1;if(!a&&Mh(e))return!1;if(!(X||w||111551&t))return!1;if(X&&!(790504&t))return!1;const n=e.charCodeAt(0);return(!N||!(n<65||n>90))&&(!!a||sse(e,c))}),((t,n,r,i)=>{if(a&&!Q(t,(e=>a.source===By(e.moduleSymbol.name))))return;if(!(t=F(t,f)).length)return;const o=e.tryResolve(t,r)||{};if("failed"===o)return;let s,c=t[0];"skipped"!==o&&({exportInfo:c=t[0],moduleSpecifier:s}=o);const l=1===c.exportKind;!function(e,t){const n=OB(e);H[n]!==Uoe.GlobalsOrKeywords&&(W[K.length]=t,H[n]=w?Uoe.LocationPriority:Uoe.AutoImportSuggestions,K.push(e))}(l&&Ab(xn.checkDefined(c.symbol))||xn.checkDefined(c.symbol),{kind:s?32:4,moduleSpecifier:s,symbolName:n,exportMapKey:i,exportName:2===c.exportKind?"export=":xn.checkDefined(c.symbol).name,fileName:c.moduleFileName,isDefaultExport:l,moduleSymbol:c.moduleSymbol,isFromPackageJson:c.isFromPackageJson})})),U=e.skippedAny(),B|=e.resolvedAny()?8:0,B|=e.resolvedBeyondLimit()?16:0}))}function le(){if(T){const e=T.parent.kind,t=Uae(T);switch(t){case 28:return 213===e||176===e||214===e||209===e||226===e||184===e||210===e;case 21:return 213===e||176===e||214===e||217===e||196===e;case 23:return 209===e||181===e||167===e;case 144:case 145:case 102:return!0;case 25:return 267===e;case 19:return 263===e||210===e;case 64:return 260===e||226===e;case 16:return 228===e;case 17:return 239===e;case 134:return 174===e||304===e;case 42:return 174===e}if(qae(t))return!0}return!1}function ue(e){return!!e.parent&&sE(e.parent)&&fE(e.parent.parent)&&(nu(e.kind)||dh(e))}function _e(e,t){return 64!==e.kind&&(27===e.kind||!ix(e.end,t,n))}function de(e){return pu(e)&&176!==e}function pe(e,t){const n=e.expression,r=u.getSymbolAtLocation(n),i=r&&u.getTypeOfSymbolAtLocation(r,n),o=i&&i.properties;o&&o.forEach((e=>{t.add(e.name)}))}function fe(){K.forEach((e=>{if(16777216&e.flags){const t=OB(e);H[t]=H[t]??Uoe.OptionalMember}}))}function me(e,t){if(0!==e.size)for(const n of t)e.has(n.name)&&(H[OB(n)]=Uoe.MemberDeclaredBySpreadAssignment)}function ge(e){return e.getStart(n)<=i&&i<=e.getEnd()}}function Mae(e,t){const n=EX(e,t);return n&&e<=n.end&&(hl(n)||Ph(n.kind))?{contextToken:EX(n.getFullStart(),t,void 0),previousToken:n}:{contextToken:n,previousToken:n}}function Lae(e,t,n,r){const i=t.isPackageJsonImport?r.getPackageJsonAutoImportProvider():n,o=i.getTypeChecker(),a=t.ambientModuleName?o.tryFindAmbientModule(t.ambientModuleName):t.fileName?o.getMergedSymbol(xn.checkDefined(i.getSourceFile(t.fileName)).symbol):void 0;if(!a)return;let s="export="===t.exportName?o.resolveExternalModuleSymbol(a):o.tryGetMemberInModuleExportsAndProperties(t.exportName,a);return s?(s="default"===t.exportName&&Ab(s)||s,{symbol:s,origin:xae(t,e,a)}):void 0}function jae(e,t,n,r,i){if(function(e){return!!(e&&256&e.kind)}(n))return;const o=function(e){return Hoe(e)||Goe(e)||Zoe(e)}(n)?n.symbolName:e.name;if(void 0===o||1536&e.flags&&Km(o.charCodeAt(0))||Yh(e))return;const a={name:o,needsConvertPropertyAccess:!1};if(Ts(o,t,i?1:0)||e.valueDeclaration&&Zl(e.valueDeclaration))return a;switch(r){case 3:return Zoe(n)?{name:n.symbolName,needsConvertPropertyAccess:!1}:void 0;case 0:return{name:JSON.stringify(o),needsConvertPropertyAccess:!1};case 2:case 1:return 32===o.charCodeAt(0)?void 0:{name:o,needsConvertPropertyAccess:!0};case 5:case 4:return a;default:xn.assertNever(r)}}var Rae=[],Bae=bt((()=>{const e=[];for(let t=83;t<=165;t++)e.push({name:Ra(t),kind:"keyword",kindModifiers:"",sortText:Uoe.GlobalsOrKeywords});return e}));function Jae(e,t){if(!t)return zae(e);const n=e+8+1;return Rae[n]||(Rae[n]=zae(e).filter((e=>!function(e){switch(e){case 128:case 133:case 163:case 136:case 138:case 94:case 162:case 119:case 140:case 120:case 142:case 143:case 144:case 145:case 146:case 150:case 151:case 164:case 123:case 124:case 125:case 148:case 154:case 155:case 156:case 158:case 159:return!0;default:return!1}}(Ba(e.name)))))}function zae(e){return Rae[e]||(Rae[e]=Bae().filter((t=>{const n=Ba(t.name);switch(e){case 0:return!1;case 1:return Vae(n)||138===n||144===n||156===n||145===n||128===n||fQ(n)&&157!==n;case 5:return Vae(n);case 2:return qae(n);case 3:return $ae(n);case 4:return nu(n);case 6:return fQ(n)||87===n;case 7:return fQ(n);case 8:return 156===n;default:return xn.assertNever(e)}})))}function $ae(e){return 148===e}function qae(e){switch(e){case 128:case 129:case 137:case 139:case 153:case 134:case 138:case 164:return!0;default:return ru(e)}}function Vae(e){return 134===e||135===e||160===e||130===e||152===e||156===e||!Ah(e)&&!qae(e)}function Uae(e){return qD(e)?xc(e)??0:e.kind}function Kae(e,t,n,r){const i=t&&t!==e,o=!i||3&t.flags?e:r.getUnionType([e,t]),a=function(e,t,n){return e.isUnion()?n.getAllPossiblePropertiesOfTypes(F(e.types,(e=>!(402784252&e.flags||n.isArrayLikeType(e)||n.isTypeInvalidDueToUnionDiscriminant(e,t)||n.typeHasCallOrConstructSignatures(e)||e.isClass()&&Wae(e.getApparentProperties()))))):e.getApparentProperties()}(o,n,r);return o.isClass()&&Wae(a)?[]:i?F(a,(function(e){return!p(e.declarations)||Q(e.declarations,(e=>e.parent!==n))})):a}function Wae(e){return Q(e,(e=>!!(6&fx(e))))}function Hae(e,t){return e.isUnion()?xn.checkEachDefined(t.getAllPossiblePropertiesOfTypes(e.types),"getAllPossiblePropertiesOfTypes() should all be defined"):xn.checkEachDefined(e.getApparentProperties(),"getApparentProperties() should all be defined")}function Gae(e,t){if(!e)return;if(wu(e)&&B_(e.parent))return t.getTypeArgumentConstraint(e);const n=Gae(e.parent,t);if(n)switch(e.kind){case 171:return t.getTypeOfPropertyOfContextualType(n,e.symbol.escapedName);case 193:case 187:case 192:return n}}function Xae(e){return e.parent&&Tu(e.parent)&&Ax(e.parent.parent)}function Qae({left:e}){return Nd(e)}function Yae(e,t){var n,r,i;let o,a=!1;const s=function(){const n=e.parent;if(rN(n)){const r=n.getLastToken(t);return qD(e)&&r!==e?(o=161,void(a=!0)):(o=156===e.kind?void 0:156,rse(n.moduleReference)?n:void 0)}if(tse(n,e)&&nse(n.parent))return n;if(!pN(n)&&!_N(n))return gN(n)&&42===e.kind||hN(n)&&20===e.kind?(a=!0,void(o=161)):nE(e)&&qN(n)?(o=156,e):nE(e)&&iN(n)?(o=156,rse(n.moduleSpecifier)?n:void 0):void 0;if(n.parent.isTypeOnly||19!==e.kind&&102!==e.kind&&28!==e.kind||(o=156),nse(n)){if(20!==e.kind&&80!==e.kind)return n.parent.parent;a=!0,o=161}}();return{isKeywordOnlyCompletion:a,keywordCompletion:o,isNewIdentifierLocation:!(!s&&156!==o),isTopLevelTypeOnly:!!(null==(r=null==(n=lt(s,iN))?void 0:n.importClause)?void 0:r.isTypeOnly)||!!(null==(i=lt(s,rN))?void 0:i.isTypeOnly),couldBeTypeOnlyImportSpecifier:!!s&&tse(s,e),replacementSpan:Zae(s)}}function Zae(e){var t;if(!e)return;const n=mc(e,_n(iN,rN,AF))??e,r=n.getSourceFile();if(Xb(n,r))return aQ(n,r);xn.assert(102!==n.kind&&276!==n.kind);const i=272===n.kind||351===n.kind?ese(null==(t=n.importClause)?void 0:t.namedBindings)??n.moduleSpecifier:n.moduleReference,o={pos:n.getFirstToken().getStart(),end:i.pos};return Xb(o,r)?lQ(o):void 0}function ese(e){var t;return S(null==(t=lt(e,pN))?void 0:t.elements,(t=>{var n;return!t.propertyName&&Mh(t.name.text)&&28!==(null==(n=EX(t.name.pos,e.getSourceFile(),e))?void 0:n.kind)}))}function tse(e,t){return fN(e)&&(e.isTypeOnly||t===e.name&&gQ(t))}function nse(e){if(!rse(e.parent.parent.moduleSpecifier)||e.parent.name)return!1;if(pN(e)){const t=ese(e);return(t?e.elements.indexOf(t):e.elements.length)<2}return!0}function rse(e){var t;return!!Nd(e)||!(null==(t=lt(SN(e)?e.expression:e,$_))?void 0:t.text)}function ise(e){return e.parent&&rP(e.parent)&&(e.parent.body===e||39===e.kind)}function ose(e,t,n=new Map){return r(e)||r(mx(e.exportSymbol||e,t));function r(e){return!!(788968&e.flags)||t.isUnknownSymbol(e)||!!(1536&e.flags)&&Fx(n,OB(e))&&t.getExportsOfModule(e).some((e=>ose(e,t,n)))}}function ase(e,t){const n=mx(e,t).declarations;return!!p(n)&&x(n,zZ)}function sse(e,t){if(0===t.length)return!0;let n,r=!1,i=0;const o=e.length;for(let s=0;sdse,getStringLiteralCompletions:()=>_se});var lse={directory:0,script:1,"external module name":2};function use(){const e=new Map;return{add:function(t){const n=e.get(t.name);(!n||lse[n.kind]t>=e.pos&&t<=e.end));if(!a)return;const s=e.text.slice(a.pos,t),c=Mse.exec(s);if(!c)return;const[,l,u,_]=c,d=Ro(e.path),p="path"===u?Cse(_,d,kse(n,0,e),r,!0,e.path):"types"===u?Ose(r,n,d,Nse(_),kse(n,1,e)):xn.fail();return xse(_,a.pos+l.length,$e(p.values()))}(e,t,r,i);return n&&pse(n)}if(AX(e,t,n)){if(!n||!$_(n))return;return function(e,t,n,r,i,o,a,s,c,l){if(void 0===e)return;const u=sQ(t,c);switch(e.kind){case 0:return pse(e.paths);case 1:{const _=[];return Cae(e.symbols,_,t,t,n,c,n,r,i,99,o,4,s,a,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,l),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:e.hasIndexSignature,optionalReplacementSpan:u,entries:_}}case 2:{const n=15===t.kind?96:an(Gd(t),"'")?39:34,r=e.types.map((e=>({name:Fy(e.value,n),kindModifiers:"",kind:"string",sortText:Uoe.LocationPriority,replacementSpan:oQ(t,c)})));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:e.isNewIdentifier,optionalReplacementSpan:u,entries:r}}default:return xn.assertNever(e)}}(mse(e,n,t,o,i,s),n,e,i,o,a,r,s,t,c)}}function dse(e,t,n,r,i,o,a,s){if(!r||!$_(r))return;const c=mse(t,r,n,i,o,s);return c&&function(e,t,n,r,i,o){switch(n.kind){case 0:{const t=S(n.paths,(t=>t.name===e));return t&&Nae(e,fse(t.extension),t.kind,[lY(e)])}case 1:{const a=S(n.symbols,(t=>t.name===e));return a&&Pae(a,a.name,i,r,t,o)}case 2:return S(n.types,(t=>t.value===e))?Nae(e,"","string",[lY(e)]):void 0;default:return xn.assertNever(n)}}(e,r,c,t,i.getTypeChecker(),a)}function pse(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!0,entries:e.map((({name:e,kind:t,span:n,extension:r})=>({name:e,kind:t,kindModifiers:fse(r),sortText:Uoe.LocationPriority,replacementSpan:n})))}}function fse(e){switch(e){case".d.ts":return".d.ts";case".js":return".js";case".json":return".json";case".jsx":return".jsx";case".ts":return".ts";case".tsx":return".tsx";case".d.mts":return".d.mts";case".mjs":return".mjs";case".mts":return".mts";case".d.cts":return".d.cts";case".cjs":return".cjs";case".cts":return".cts";case".tsbuildinfo":return xn.fail("Extension .tsbuildinfo is unsupported.");case void 0:return"";default:return xn.assertNever(e)}}function mse(e,t,n,r,i,o){const a=r.getTypeChecker(),s=gse(t.parent);switch(s.kind){case 201:{const c=gse(s.parent);return 205===c.kind?{kind:0,paths:Sse(e,t,r,i,o)}:function e(t){switch(t.kind){case 233:case 183:{const e=mc(s,(e=>e.parent===t));return e?{kind:2,types:yse(a.getTypeArgumentConstraint(e)),isNewIdentifier:!1}:void 0}case 199:const{indexType:i,objectType:o}=t;if(!YG(i,n))return;return hse(a.getTypeFromTypeNode(o));case 192:{const n=e(gse(t.parent));if(!n)return;const i=(r=s,q(t.types,(e=>e!==r&&JE(e)&&wD(e.literal)?e.literal.text:void 0)));return 1===n.kind?{kind:1,symbols:n.symbols.filter((e=>!D(i,e.name))),hasIndexSignature:n.hasIndexSignature}:{kind:2,types:n.types.filter((e=>!D(i,e.value))),isNewIdentifier:!1}}default:return}var r}(c)}case 303:return HE(s.parent)&&s.name===t?function(e,t){const n=e.getContextualType(t);if(!n)return;return{kind:1,symbols:Kae(n,e.getContextualType(t,4),t,e),hasIndexSignature:ZY(n)}}(a,s.parent):c()||c(0);case 212:{const{expression:e,argumentExpression:n}=s;return t===lh(n)?hse(a.getTypeAtLocation(e)):void 0}case 213:case 214:case 291:if(!function(e){return QE(e.parent)&&Se(e.parent.arguments)===e&&qD(e.parent.expression)&&"require"===e.parent.expression.escapedText}(t)&&!uf(s)){const r=due.getArgumentInfoForCompletions(291===s.kind?s.parent:t,n,e,a);return r&&function(e,t,n,r){let i=!1;const o=new Map,a=D_(e)?xn.checkDefined(mc(t.parent,NN)):t,s=R(r.getCandidateSignaturesForStringLiteralCompletions(e,a),(t=>{if(!JB(t)&&n.argumentCount>t.parameters.length)return;let s=t.getTypeParameterAtPosition(n.argumentIndex);if(D_(e)){const e=r.getTypeOfPropertyOfType(s,uC(a.name));e&&(s=e)}return i=i||!!(4&s.flags),yse(s,o)}));return p(s)?{kind:2,types:s,isNewIdentifier:i}:void 0}(r.invocation,t,r,a)||c(0)}case 272:case 278:case 283:case 351:return{kind:0,paths:Sse(e,t,r,i,o)};case 296:const l=HZ(a,s.parent.clauses),u=c();if(!u)return;return{kind:2,types:u.types.filter((e=>!l.hasValue(e.value))),isNewIdentifier:!1};default:return c()||c(0)}function c(e=4){const n=yse(GY(t,a,e));if(n.length)return{kind:2,types:n,isNewIdentifier:!1}}}function gse(e){switch(e.kind){case 196:return oh(e);case 217:return ah(e);default:return e}}function hse(e){return e&&{kind:1,symbols:F(e.getApparentProperties(),(e=>!(e.valueDeclaration&&Zl(e.valueDeclaration)))),hasIndexSignature:ZY(e)}}function yse(e,t=new Map){return e?(e=bQ(e)).isUnion()?R(e.types,(e=>yse(e,t))):!e.isStringLiteral()||1024&e.flags||!Fx(t,e.value)?u:[e]:u}function vse(e,t,n){return{name:e,kind:t,extension:n}}function bse(e){return vse(e,"directory",void 0)}function xse(e,t,n){const r=function(e,t){const n=Math.max(e.lastIndexOf(xo),e.lastIndexOf(So)),r=-1!==n?n+1:0,i=e.length-r;return 0===i||Ts(e.substr(r,i),99)?void 0:Gs(t+r,i)}(e,t),i=0===e.length?void 0:Gs(t,e.length);return n.map((({name:e,kind:t,extension:n})=>e.includes(xo)||e.includes(So)?{name:e,kind:t,extension:n,span:i}:{name:e,kind:t,extension:n,span:r}))}function Sse(e,t,n,r,i){return xse(t.text,t.getStart(e)+1,function(e,t,n,r,i){const o=Vo(t.text),a=$_(t)?n.getModeForUsageLocation(e,t):void 0,s=e.path,c=Ro(s),l=n.getCompilerOptions(),_=n.getTypeChecker(),d=kse(l,1,e,_,i,a);return function(e){if(e&&e.length>=2&&46===e.charCodeAt(0)){const t=e.length>=3&&46===e.charCodeAt(1)?2:1,n=e.charCodeAt(t);return 47===n||92===n}return!1}(o)||!l.baseUrl&&!l.paths&&(wo(o)||Co(o))?function(e,t,n,r,i,o){return n.rootDirs?function(e,t,n,r,i,o,a){return ne(R(function(e,t,n,r){const i=g(e=e.map((e=>ea(Xo(wo(e)?e:Ko(t,e))))),(e=>la(e,n,t,r)?n.substr(e.length):void 0));return ne([...e.map((e=>Ko(e,i))),n].map((e=>Zo(e))),Et,Mt)}(e,i.project||o.getCurrentDirectory(),n,!(o.useCaseSensitiveFileNames&&o.useCaseSensitiveFileNames())),(e=>$e(Cse(t,e,r,o,!0,a).values()))),((e,t)=>e.name===t.name&&e.kind===t.kind&&e.extension===t.extension))}(n.rootDirs,e,t,o,n,r,i):$e(Cse(e,t,o,r,!0,i).values())}(o,c,l,r,s,d):function(e,t,n,r,i,o,a){const{baseUrl:s,paths:c}=r,l=use(),_=ES(r);if(s){const t=Xo(Ko(i.getCurrentDirectory(),s));Cse(e,t,o,i,!1,void 0,l)}if(c){const t=rv(r,i);Dse(l,e,t,o,i,c)}const d=Nse(e);for(const t of function(e,t,n){const r=n.getAmbientModules().map((e=>By(e.name))).filter((t=>an(t,e)&&!t.includes("*")));if(void 0!==t){const e=ea(t);return r.map((t=>sn(t,e)))}return r}(e,d,a))l.add(vse(t,"external module name",void 0));if(Ose(i,r,t,d,o,l),DQ(_)){let a=!1;if(void 0===d)for(const e of function(e,t){if(!e.readFile||!e.fileExists)return u;const n=[];for(const r of gZ(t,e)){const t=Bb(r,e);for(const e of Lse){const r=t[e];if(r)for(const e in r)Le(r,e)&&!an(e,"@types/")&&n.push(e)}}return n}(i,t)){const t=vse(e,"external module name",void 0);l.has(t.name)||(a=!0,l.add(t))}if(!a){let a=t=>{const n=Ko(t,"node_modules");pZ(i,n)&&Cse(e,n,o,i,!1,void 0,l)};if(d&&IS(r)){const t=a;a=a=>{const s=$o(e);s.shift();let c=s.shift();if(!c)return t(a);if(an(c,"@")){const e=s.shift();if(!e)return t(a);c=Ko(c,e)}const u=Ko(a,"node_modules",c),_=Ko(u,"package.json");if(dZ(i,_)){const t=Bb(_,i).exports;if(t){if("object"!=typeof t||null===t)return;const a=Re(t),c=s.join("/")+(s.length&&Oo(e)?"/":""),_=rj(r,n);return void Ese(l,!0,c,u,o,i,a,(e=>fn(Pse(t[e],_))),rR)}}return t(a)}}ga(t,a)}}return $e(l.values())}(o,c,a,l,r,d,_)}(e,t,n,r,i))}function kse(e,t,n,r,i,o){return{extensionsToSearch:j(Tse(e,r)),referenceKind:t,importingSourceFile:n,endingPreference:null==i?void 0:i.importModuleSpecifierEnding,resolutionMode:o}}function Tse(e,t){const n=t?q(t.getAmbientModules(),(e=>{const t=e.name.slice(1,-1);if(t.startsWith("*.")&&!t.includes("/"))return t.slice(1)})):[],r=[...zk(e),n];return DQ(ES(e))?$k(e,r):r}function Cse(e,t,n,r,i,o,a=use()){var s;void 0===e&&(e=""),Oo(e=Vo(e))||(e=Ro(e)),""===e&&(e="."+xo);const c=Wo(t,e=ea(e)),l=Oo(c)?c:Ro(c);if(!i){const e=hZ(l,r);if(e){const t=Bb(e,r).typesVersions;if("object"==typeof t){const i=null==(s=XL(t))?void 0:s.paths;if(i){const t=Ro(e);if(Dse(a,c.slice(ea(t).length),t,n,r,i))return a}}}}const u=!(r.useCaseSensitiveFileNames&&r.useCaseSensitiveFileNames());if(!pZ(r,l))return a;const _=_Z(r,l,n.extensionsToSearch,void 0,["./*"]);if(_)for(let e of _){if(e=Xo(e),o&&0===ca(e,o,t,u))continue;const{name:i,extension:s}=wse(Bo(e),r.getCompilationSettings(),n,!1);a.add(vse(i,"script",s))}const d=uZ(r,l);if(d)for(const e of d){const t=Bo(Xo(e));"@types"!==t&&a.add(bse(t))}return a}function wse(e,t,n,r){const i=JR.tryGetRealFileNameForNonJsDeclarationFileName(e);if(i)return{name:i,extension:lT(i)};if(0===n.referenceKind)return{name:e,extension:lT(e)};let o=$R({importModuleSpecifierEnding:n.endingPreference},t,n.importingSourceFile).getAllowedEndingsInPreferredOrder(n.resolutionMode);if(r&&(o=o.filter((e=>0!==e&&1!==e))),3===o[0]){if(Io(e,Bk))return{name:e,extension:lT(e)};const n=JR.tryGetJSExtensionForFile(e,t);return n?{name:tT(e,n),extension:n}:{name:e,extension:lT(e)}}if(!r&&(0===o[0]||1===o[0])&&Io(e,[".js",".jsx",".ts",".tsx",".d.ts"]))return{name:Yk(e),extension:lT(e)};const a=JR.tryGetJSExtensionForFile(e,t);return a?{name:tT(e,a),extension:a}:{name:e,extension:lT(e)}}function Dse(e,t,n,r,i,o){return Ese(e,!1,t,n,r,i,Re(o),(e=>o[e]),((e,t)=>{const n=nT(e),r=nT(t),i="object"==typeof n?n.prefix.length:e.length;return Nt("object"==typeof r?r.prefix.length:t.length,i)}))}function Ese(e,t,n,r,i,o,a,s,c){let l,u=[];for(const e of a){if("."===e)continue;const a=e.replace(/^\.\//,""),_=s(e);if(_){const s=nT(a);if(!s)continue;const d="object"==typeof s&&ln(s,n);d&&(void 0===l||-1===c(e,l))&&(l=e,u=u.filter((e=>!e.matchedPattern))),"string"!=typeof s&&void 0!==l&&1===c(e,l)||u.push({matchedPattern:d,results:Fse(a,_,n,r,i,t&&d,o).map((({name:e,kind:t,extension:n})=>vse(e,t,n)))})}}return u.forEach((t=>t.results.forEach((t=>e.add(t))))),void 0!==l}function Pse(e,t){if("string"==typeof e)return e;if(e&&"object"==typeof e&&!ot(e))for(const n in e)if("default"===n||t.includes(n)||aR(t,n))return Pse(e[n],t)}function Nse(e){return jse(e)?Oo(e)?e:Ro(e):void 0}function Fse(e,t,n,r,i,o,a){if(!Wt(e,"*"))return e.includes("*")?u:l(e,"script");const s=e.slice(0,e.length-1),c=cn(n,s);return void 0===c?"/"===e[e.length-2]?l(s,"directory"):R(t,(e=>{var t;return null==(t=Ase("",r,e,i,o,a))?void 0:t.map((({name:e,...t})=>({name:s+e,...t})))})):R(t,(e=>Ase(c,r,e,i,o,a)));function l(e,t){return an(e,n)?[{name:Zo(e),kind:t,extension:void 0}]:u}}function Ase(e,t,n,r,i,o){if(!o.readDirectory)return;const a=nT(n);if(void 0===a||st(a))return;const s=Wo(a.prefix),c=Oo(a.prefix)?s:Ro(s),l=Oo(a.prefix)?"":Bo(s),_=jse(e),d=_?Oo(e)?e:Ro(e):void 0,p=_?Ko(c,l+d):c,f=Xo(a.suffix),m=f&&tv("_"+f),h=m?[tT(f,m),f]:[f],y=Xo(Ko(t,p)),v=_?y:ea(y)+l,b=f?h.map((e=>"**/*"+e)):["./*"];return[...q(_Z(o,y,r.extensionsToSearch,void 0,b),(e=>{const t=(n=e,g(h,(e=>{const t=(o=e,an(r=Xo(n),i=v)&&Wt(r,o)?r.slice(i.length,r.length-o.length):void 0);var r,i,o;return void 0===t?void 0:Ise(t)})));var n;if(t){if(jse(t))return bse($o(Ise(t))[1]);const{name:e,extension:n}=wse(t,o.getCompilationSettings(),r,i);return vse(e,"script",n)}})),...f?u:q(uZ(o,y),(e=>"node_modules"===e?void 0:bse(e)))]}function Ise(e){return e[0]===xo?e.slice(1):e}function Ose(e,t,n,r,i,o=use()){const a=new Map,s=fZ((()=>QL(t,e)))||u;for(const e of s)c(e);for(const t of gZ(n,e))c(Ko(Ro(t),"node_modules/@types"));return o;function c(n){if(pZ(e,n))for(const s of uZ(e,n)){const c=hR(s);if(!t.types||D(t.types,c))if(void 0===r)a.has(c)||(o.add(vse(c,"external module name",void 0)),a.set(c,!0));else{const t=Ko(n,s),a=ak(r,c,Wy(e));void 0!==a&&Cse(a,t,i,e,!1,void 0,o)}}}}var Mse=/^(\/\/\/\s*{const i=t.getSymbolAtLocation(n);if(i){const t=OB(i).toString();let n=r.get(t);n||r.set(t,n=[]),n.push(e)}}));return r}(e,n,r);return(o,a,s)=>{const{directImports:c,indirectUsers:l}=function(e,t,n,{exportingModuleSymbol:r,exportKind:i},o,a){const s=hQ(),c=hQ(),l=[],u=!!r.globalExports,_=u?void 0:[];return function e(t){const n=m(t);if(n)for(const t of n)if(s(t))switch(a&&a.throwIfCancellationRequested(),t.kind){case 213:if(uf(t)){f(mc(r=t,Xse)||r.getSourceFile(),!!d(r,!0));break}if(!u){const e=t.parent;if(2===i&&260===e.kind){const{name:t}=e;if(80===t.kind){l.push(t);break}}}break;case 80:break;case 271:p(t,t.name,Bv(t,32),!1);break;case 272:case 351:l.push(t);const n=t.importClause&&t.importClause.namedBindings;n&&274===n.kind?p(t,n.name,!1,!0):!u&&Dg(t)&&f(Gse(t));break;case 278:t.exportClause?280===t.exportClause.kind?f(Gse(t),!0):l.push(t):e(Hse(t,o));break;case 205:!u&&t.isTypeOf&&!t.qualifier&&d(t)&&f(t.getSourceFile(),!0),l.push(t);break;default:xn.failBadSyntaxKind(t,"Unexpected import kind.")}var r}(r),{directImports:l,indirectUsers:function(){if(u)return e;if(r.declarations)for(const e of r.declarations)fp(e)&&t.has(e.getSourceFile().fileName)&&f(e);return _.map(Sd)}()};function d(e,t=!1){return mc(e,(e=>t&&Xse(e)?"quit":cI(e)&&Q(e.modifiers,UD)))}function p(e,t,n,r){if(2===i)r||l.push(e);else if(!u){const r=Gse(e);xn.assert(307===r.kind||267===r.kind),n||function(e,t,n){const r=n.getSymbolAtLocation(t);return!!Vse(e,(e=>{if(!gN(e))return;const{exportClause:t,moduleSpecifier:i}=e;return!i&&t&&hN(t)&&t.elements.some((e=>n.getExportSpecifierLocalTargetSymbol(e)===r))}))}(r,t,o)?f(r,!0):f(r)}}function f(e,t=!1){if(xn.assert(!u),!c(e))return;if(_.push(e),!t)return;const n=o.getMergedSymbol(e.symbol);if(!n)return;xn.assert(!!(1536&n.flags));const r=m(n);if(r)for(const e of r)zE(e)||f(Gse(e),!0)}function m(e){return n.get(OB(e).toString())}}(e,t,i,a,n,r);return{indirectUsers:l,...$se(c,o,a.exportKind,n,s)}}}o(Rse,{Core:()=>oce,DefinitionKind:()=>Yse,EntryKind:()=>Zse,ExportKind:()=>Jse,FindReferencesUse:()=>ace,ImportExport:()=>zse,createImportTracker:()=>Bse,findModuleReferences:()=>qse,findReferenceOrRenameEntries:()=>uce,findReferencedSymbols:()=>sce,getContextNode:()=>rce,getExportInfo:()=>Wse,getImplementationsAtPosition:()=>cce,getImportOrExportSymbol:()=>Kse,getReferenceEntriesForNode:()=>_ce,getTextSpanOfEntry:()=>Sce,isContextWithStartAndEndNode:()=>tce,isDeclarationOfSymbol:()=>Tce,isWriteAccessForReference:()=>kce,nodeEntry:()=>ece,toContextSpan:()=>ice,toHighlightSpan:()=>bce,toReferenceEntry:()=>gce,toRenameLocation:()=>mce});var Jse=(e=>(e[e.Named=0]="Named",e[e.Default=1]="Default",e[e.ExportEquals=2]="ExportEquals",e))(Jse||{}),zse=(e=>(e[e.Import=0]="Import",e[e.Export=1]="Export",e))(zse||{});function $se(e,t,n,r,i){const o=[],a=[];function s(e,t){o.push([e,t])}if(e)for(const t of e)c(t);return{importSearches:o,singleReferences:a};function c(e){if(271===e.kind)return void(Qse(e)&&l(e.name));if(80===e.kind)return void l(e);if(205===e.kind){if(e.qualifier){const n=bb(e.qualifier);n.escapedText===Sc(t)&&a.push(n)}else 2===n&&a.push(e.argument.literal);return}if(11!==e.moduleSpecifier.kind)return;if(278===e.kind)return void(e.exportClause&&hN(e.exportClause)&&u(e.exportClause));const{name:o,namedBindings:c}=e.importClause||{name:void 0,namedBindings:void 0};if(c)switch(c.kind){case 274:l(c.name);break;case 275:0!==n&&1!==n||u(c);break;default:xn.assertNever(c)}!o||1!==n&&2!==n||i&&o.escapedText!==MQ(t)||s(o,r.getSymbolAtLocation(o))}function l(e){2!==n||i&&!_(e.escapedText)||s(e,r.getSymbolAtLocation(e))}function u(e){if(e)for(const n of e.elements){const{name:e,propertyName:o}=n;_((o||e).escapedText)&&(o?(a.push(o),i&&e.escapedText!==t.escapedName||s(e,r.getSymbolAtLocation(e))):s(e,281===n.kind&&n.propertyName?r.getExportSpecifierLocalTargetSymbol(n):r.getSymbolAtLocation(e)))}}function _(e){return e===t.escapedName||0!==n&&"default"===e}}function qse(e,t,n){var r;const i=[],o=e.getTypeChecker();for(const a of t){const t=n.valueDeclaration;if(307===(null==t?void 0:t.kind)){for(const n of a.referencedFiles)e.getSourceFileFromReference(a,n)===t&&i.push({kind:"reference",referencingFile:a,ref:n});for(const n of a.typeReferenceDirectives){const o=null==(r=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(n,a))?void 0:r.resolvedTypeReferenceDirective;void 0!==o&&o.resolvedFileName===t.fileName&&i.push({kind:"reference",referencingFile:a,ref:n})}}Use(a,((e,t)=>{o.getSymbolAtLocation(t)===n&&i.push(ly(e)?{kind:"implicit",literal:t,referencingFile:a}:{kind:"import",literal:t})}))}return i}function Vse(e,t){return f(307===e.kind?e.statements:e.body.statements,(e=>t(e)||Xse(e)&&f(e.body&&e.body.statements,t)))}function Use(e,t){if(e.externalModuleIndicator||void 0!==e.imports)for(const n of e.imports)t(kg(n),n);else Vse(e,(e=>{switch(e.kind){case 278:case 272:{const n=e;n.moduleSpecifier&&wD(n.moduleSpecifier)&&t(n,n.moduleSpecifier);break}case 271:{const n=e;Qse(n)&&t(n,n.moduleReference.expression);break}}}))}function Kse(e,t,n,r){return r?i():i()||function(){if(!function(e){const{parent:t}=e;switch(t.kind){case 271:return t.name===e&&Qse(t);case 276:return!t.propertyName;case 273:case 274:return xn.assert(t.name===e),!0;case 208:return Mm(e)&&$m(t.parent.parent);default:return!1}}(e))return;let r=n.getImmediateAliasedSymbol(t);if(!r)return;if(r=function(e,t){if(e.declarations)for(const n of e.declarations){if(yN(n)&&!n.propertyName&&!n.parent.parent.moduleSpecifier)return t.getExportSpecifierLocalTargetSymbol(n)||e;if(GE(n)&&og(n.expression)&&!VD(n.name))return t.getSymbolAtLocation(n);if(JN(n)&&uP(n.parent.parent)&&2===ag(n.parent.parent))return t.getExportSpecifierLocalTargetSymbol(n.name)}return e}(r,n),"export="===r.escapedName&&(r=function(e,t){var n,r;if(2097152&e.flags)return t.getImmediateAliasedSymbol(e);const i=xn.checkDefined(e.valueDeclaration);return mN(i)?null==(n=lt(i.expression,p_))?void 0:n.symbol:uP(i)?null==(r=lt(i.right,p_))?void 0:r.symbol:qN(i)?i.symbol:void 0}(r,n),void 0===r))return;const i=MQ(r);return void 0===i||"default"===i||i===t.escapedName?{kind:0,symbol:r}:void 0}();function i(){var i;const{parent:s}=e,c=s.parent;if(t.exportSymbol)return 211===s.kind?(null==(i=t.declarations)?void 0:i.some((e=>e===s)))&&uP(c)?u(c,!1):void 0:o(t.exportSymbol,a(s));{const i=function(e,t){const n=KP(e)?e:KE(e)?ac(e):void 0;return n?e.name!==t||RN(n.parent)?void 0:EP(n.parent.parent)?n.parent.parent:void 0:e}(s,e);if(i&&Bv(i,32)){if(rN(i)&&i.moduleReference===e){if(r)return;return{kind:0,symbol:n.getSymbolAtLocation(i.name)}}return o(t,a(i))}if(dN(s))return o(t,0);if(mN(s))return l(s);if(mN(c))return l(c);if(uP(s))return u(s,!0);if(uP(c))return u(c,!0);if(wF(s)||_F(s))return o(t,0)}function l(e){if(!e.symbol.parent)return;const n=e.isExportEquals?2:1;return{kind:1,symbol:t,exportInfo:{exportingModuleSymbol:e.symbol.parent,exportKind:n}}}function u(e,r){let i;switch(ag(e)){case 1:i=0;break;case 2:i=2;break;default:return}const a=r?n.getSymbolAtLocation(Mx(ut(e.left,Ox))):t;return a&&o(a,i)}}function o(e,t){const r=Wse(e,t,n);return r&&{kind:1,symbol:e,exportInfo:r}}function a(e){return Bv(e,2048)?1:0}}function Wse(e,t,n){const r=e.parent;if(!r)return;const i=n.getMergedSymbol(r);return nd(i)?{exportingModuleSymbol:i,exportKind:t}:void 0}function Hse(e,t){return t.getMergedSymbol(Gse(e).symbol)}function Gse(e){if(213===e.kind)return e.getSourceFile();const{parent:t}=e;return 307===t.kind?t:(xn.assert(268===t.kind),ut(t.parent,Xse))}function Xse(e){return 267===e.kind&&11===e.name.kind}function Qse(e){return 283===e.moduleReference.kind&&11===e.moduleReference.expression.kind}var Yse=(e=>(e[e.Symbol=0]="Symbol",e[e.Label=1]="Label",e[e.Keyword=2]="Keyword",e[e.This=3]="This",e[e.String=4]="String",e[e.TripleSlashReference=5]="TripleSlashReference",e))(Yse||{}),Zse=(e=>(e[e.Span=0]="Span",e[e.Node=1]="Node",e[e.StringLiteral=2]="StringLiteral",e[e.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",e[e.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal",e))(Zse||{});function ece(e,t=1){return{kind:t,node:e.name||e,context:nce(e)}}function tce(e){return e&&void 0===e.kind}function nce(e){if(h_(e))return rce(e);if(e.parent){if(!h_(e.parent)&&!mN(e.parent)){if(Mm(e)){const t=uP(e.parent)?e.parent:Ox(e.parent)&&uP(e.parent.parent)&&e.parent.parent.left===e.parent?e.parent.parent:void 0;if(t&&0!==ag(t))return rce(t)}if(CN(e.parent)||wN(e.parent))return e.parent.parent;if(TN(e.parent)||$P(e.parent)||Nl(e.parent))return e.parent;if($_(e)){const t=Tg(e);if(t){const e=mc(t,(e=>h_(e)||b_(e)||F_(e)));return h_(e)?rce(e):e}}const t=mc(e,oE);return t?rce(t.parent):void 0}return e.parent.name===e||fE(e.parent)||mN(e.parent)||(Vl(e.parent)||KE(e.parent))&&e.parent.propertyName===e||90===e.kind&&Bv(e.parent,2080)?rce(e.parent):void 0}}function rce(e){if(e)switch(e.kind){case 260:return WP(e.parent)&&1===e.parent.declarations.length?EP(e.parent.parent)?e.parent.parent:i_(e.parent.parent)?rce(e.parent.parent):e.parent:e;case 208:return rce(e.parent.parent);case 276:return e.parent.parent.parent;case 281:case 274:return e.parent.parent;case 273:case 280:return e.parent;case 226:return NP(e.parent)?e.parent:e;case 250:case 249:return{start:e.initializer,end:e.expression};case 303:case 304:return tQ(e.parent)?rce(mc(e.parent,(e=>uP(e)||i_(e)))):e;case 255:return{start:S(e.getChildren(e.getSourceFile()),(e=>109===e.kind)),end:e.caseBlock};default:return e}}function ice(e,t,n){if(!n)return;const r=tce(n)?xce(n.start,t,n.end):xce(n,t);return r.start!==e.start||r.length!==e.length?{contextSpan:r}:void 0}var oce,ace=(e=>(e[e.Other=0]="Other",e[e.References=1]="References",e[e.Rename=2]="Rename",e))(ace||{});function sce(e,t,n,r,i){const o=xX(r,i),a={use:1},s=oce.getReferencedSymbolsForNode(i,o,e,n,t,a),c=e.getTypeChecker(),l=oce.getAdjustedNode(o,a),u=function(e){return 90===e.kind||!!ph(e)||fh(e)||137===e.kind&&fE(e.parent)}(l)?c.getSymbolAtLocation(l):void 0;return s&&s.length?q(s,(({definition:e,references:n})=>e&&{definition:c.runWithCancellationToken(t,(t=>function(e,t,n){const r=(()=>{switch(e.type){case 0:{const{symbol:r}=e,{displayParts:i,kind:o}=fce(r,t,n),a=i.map((e=>e.text)).join(""),s=r.declarations&&Se(r.declarations);return{...pce(s?Pc(s)||s:n),name:a,kind:o,displayParts:i,context:rce(s)}}case 1:{const{node:t}=e;return{...pce(t),name:t.text,kind:"label",displayParts:[tY(t.text,17)]}}case 2:{const{node:t}=e,n=Ra(t.kind);return{...pce(t),name:n,kind:"keyword",displayParts:[{text:n,kind:"keyword"}]}}case 3:{const{node:n}=e,r=t.getSymbolAtLocation(n),i=r&&Hue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,r,n.getSourceFile(),UG(n),n).displayParts||[lY("this")];return{...pce(n),name:"this",kind:"var",displayParts:i}}case 4:{const{node:t}=e;return{...pce(t),name:t.text,kind:"var",displayParts:[tY(Gd(t),8)]}}case 5:return{textSpan:lQ(e.reference),sourceFile:e.file,name:e.reference.fileName,kind:"string",displayParts:[tY(`"${e.reference.fileName}"`,8)]};default:return xn.assertNever(e)}})(),{sourceFile:i,textSpan:o,name:a,kind:s,displayParts:c,context:l}=r;return{containerKind:"",containerName:"",fileName:i.fileName,kind:s,name:a,textSpan:o,displayParts:c,...ice(o,i,l)}}(e,t,o))),references:n.map((e=>function(e,t){const n=gce(e);return t?{...n,isDefinition:0!==e.kind&&Tce(e.node,t)}:n}(e,u)))})):void 0}function cce(e,t,n,r,i){const o=xX(r,i);let a;const s=lce(e,t,n,o,i);if(211===o.parent.kind||208===o.parent.kind||212===o.parent.kind||108===o.kind)a=s&&[...s];else if(s){const r=rt(s),i=new Map;for(;!r.isEmpty();){const o=r.dequeue();if(!Fx(i,IB(o.node)))continue;a=ue(a,o);const s=lce(e,t,n,o.node,o.node.pos);s&&r.enqueue(...s)}}const c=e.getTypeChecker();return O(a,(e=>function(e,t){const n=hce(e);if(0!==e.kind){const{node:r}=e;return{...n,...vce(r,t)}}return{...n,kind:"",displayParts:[]}}(e,c)))}function lce(e,t,n,r,i){if(307===r.kind)return;const o=e.getTypeChecker();if(304===r.parent.kind){const e=[];return oce.getReferenceEntriesForShorthandPropertyAssignment(r,o,(t=>e.push(ece(t)))),e}if(108===r.kind||um(r.parent)){const e=o.getSymbolAtLocation(r);return e.valueDeclaration&&[ece(e.valueDeclaration)]}return _ce(i,r,e,n,t,{implementations:!0,use:1})}function uce(e,t,n,r,i,o,a){return O(dce(oce.getReferencedSymbolsForNode(i,r,e,n,t,o)),(t=>a(t,r,e.getTypeChecker())))}function _ce(e,t,n,r,i,o={},a=new Set(r.map((e=>e.fileName)))){return dce(oce.getReferencedSymbolsForNode(e,t,n,r,i,o,a))}function dce(e){return e&&R(e,(e=>e.references))}function pce(e){const t=e.getSourceFile();return{sourceFile:t,textSpan:xce(oE(e)?e.expression:e,t)}}function fce(e,t,n){const r=oce.getIntersectingMeaningFromDeclarations(n,e),i=e.declarations&&Se(e.declarations)||n,{displayParts:o,symbolKind:a}=Hue.getSymbolDisplayPartsDocumentationAndSymbolKind(t,e,i.getSourceFile(),i,i,r);return{displayParts:o,kind:a}}function mce(e,t,n,r,i){return{...hce(e),...r&&yce(e,t,n,i)}}function gce(e){const t=hce(e);if(0===e.kind)return{...t,isWriteAccess:!1};const{kind:n,node:r}=e;return{...t,isWriteAccess:kce(r),isInString:2===n||void 0}}function hce(e){if(0===e.kind)return{textSpan:e.textSpan,fileName:e.fileName};{const t=e.node.getSourceFile(),n=xce(e.node,t);return{textSpan:n,fileName:t.fileName,...ice(n,t,e.context)}}}function yce(e,t,n,r){if(0!==e.kind&&(qD(t)||$_(t))){const{node:r,kind:i}=e,o=r.parent,a=t.text,s=JN(o);if(s||jQ(o)&&o.name===r&&void 0===o.dotDotDotToken){const e={prefixText:a+": "},t={suffixText:": "+a};if(3===i)return e;if(4===i)return t;if(s){const n=o.parent;return HE(n)&&uP(n.parent)&&og(n.parent.left)?e:t}return e}if(fN(o)&&!o.propertyName)return D((yN(t.parent)?n.getExportSpecifierLocalTargetSymbol(t.parent):n.getSymbolAtLocation(t)).declarations,o)?{prefixText:a+" as "}:GH;if(yN(o)&&!o.propertyName)return t===e.node||n.getSymbolAtLocation(t)===n.getSymbolAtLocation(e.node)?{prefixText:a+" as "}:{suffixText:" as "+a}}if(0!==e.kind&&TD(e.node)&&Ox(e.node.parent)){const e=IQ(r);return{prefixText:e,suffixText:e}}return GH}function vce(e,t){const n=t.getSymbolAtLocation(h_(e)&&e.name?e.name:e);return n?fce(n,t,e):210===e.kind?{kind:"interface",displayParts:[iY(21),lY("object literal"),iY(22)]}:231===e.kind?{kind:"local class",displayParts:[iY(21),lY("anonymous local class"),iY(22)]}:{kind:KG(e),displayParts:[]}}function bce(e){const t=hce(e);if(0===e.kind)return{fileName:t.fileName,span:{textSpan:t.textSpan,kind:"reference"}};const n=kce(e.node),r={textSpan:t.textSpan,kind:n?"writtenReference":"reference",isInString:2===e.kind||void 0,...t.contextSpan&&{contextSpan:t.contextSpan}};return{fileName:t.fileName,span:r}}function xce(e,t,n){let r=e.getStart(t),i=(n||e).getEnd();return $_(e)&&i-r>2&&(xn.assert(void 0===n),r+=1,i-=1),269===(null==n?void 0:n.kind)&&(i=n.getFullStart()),Xs(r,i)}function Sce(e){return 0===e.kind?e.textSpan:xce(e.node,e.node.getSourceFile())}function kce(e){const t=ph(e);return!!t&&function(e){if(33554432&e.flags)return!0;switch(e.kind){case 226:case 208:case 263:case 231:case 90:case 266:case 306:case 281:case 273:case 271:case 276:case 264:case 338:case 346:case 291:case 267:case 270:case 274:case 280:case 169:case 304:case 265:case 168:return!0;case 303:return!tQ(e.parent);case 262:case 218:case 176:case 174:case 177:case 178:return!!e.body;case 260:case 172:return!!e.initializer||RN(e.parent);case 173:case 171:case 348:case 341:return!1;default:return xn.failBadSyntaxKind(e)}}(t)||90===e.kind||yx(e)}function Tce(e,t){var n;if(!t)return!1;const r=ph(e)||(90===e.kind?e.parent:fh(e)||137===e.kind&&fE(e.parent)?e.parent.parent:void 0),i=r&&uP(r)?r.left:void 0;return!(!r||!(null==(n=t.declarations)?void 0:n.some((e=>e===r||e===i))))}(e=>{function t(e,t){return 1===t.use?e=vX(e):2===t.use&&(e=bX(e)),e}function n(e,t,n){let r;const i=t.get(e.path)||u;for(const e of i)if(cV(e)){const t=n.getSourceFileByPath(e.file),i=uV(n,e);lV(i)&&(r=ue(r,{kind:0,fileName:t.fileName,textSpan:lQ(i)}))}return r}function r(e,t,n){if(e.parent&&nN(e.parent)){const e=n.getAliasedSymbol(t),r=n.getMergedSymbol(e);if(e!==r)return r}}function i(e,t,n,r,i,a){const c=1536&e.flags&&e.declarations&&S(e.declarations,qN);if(!c)return;const u=e.exports.get("export="),_=s(t,e,!!u,n,a);if(!u||!a.has(c.fileName))return _;const d=t.getTypeChecker();return o(t,_,l(e=mx(u,d),void 0,n,a,d,r,i))}function o(e,...t){let n;for(const r of t)if(r&&r.length)if(n)for(const t of r){if(!t.definition||0!==t.definition.type){n.push(t);continue}const r=t.definition.symbol,i=T(n,(e=>!!e.definition&&0===e.definition.type&&e.definition.symbol===r));if(-1===i){n.push(t);continue}const o=n[i];n[i]={definition:o.definition,references:o.references.concat(t.references).sort(((t,n)=>{const r=a(e,t),i=a(e,n);if(r!==i)return Nt(r,i);const o=Sce(t),s=Sce(n);return o.start!==s.start?Nt(o.start,s.start):Nt(o.length,s.length)}))}}else n=r;return n}function a(e,t){const n=0===t.kind?e.getSourceFile(t.fileName):t.node.getSourceFile();return e.getSourceFiles().indexOf(n)}function s(e,t,n,r,i){xn.assert(!!t.valueDeclaration);const o=q(qse(e,r,t),(e=>{if("import"===e.kind){const t=e.literal.parent;if(JE(t)){const e=ut(t.parent,zE);if(n&&!e.qualifier)return}return ece(e.literal)}return"implicit"===e.kind?ece(e.literal.text!==G_&&jI(e.referencingFile,(e=>2&e.transformFlags?kN(e)||TN(e)||DN(e)?e:void 0:"skip"))||e.referencingFile.statements[0]||e.referencingFile):{kind:0,fileName:e.referencingFile.fileName,textSpan:lQ(e.ref)}}));if(t.declarations)for(const e of t.declarations)switch(e.kind){case 307:break;case 267:i.has(e.getSourceFile().fileName)&&o.push(ece(e.name));break;default:xn.assert(!!(33554432&t.flags),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}const a=t.exports.get("export=");if(null==a?void 0:a.declarations)for(const e of a.declarations){const t=e.getSourceFile();if(i.has(t.fileName)){const n=uP(e)&&GE(e.left)?e.left.expression:mN(e)?xn.checkDefined(uX(e,95,t)):Pc(e)||e;o.push(ece(n))}}return o.length?[{definition:{type:0,symbol:t},references:o}]:u}function c(e){return 148===e.kind&&jE(e.parent)&&148===e.parent.operator}function l(e,t,n,r,i,o,a){const s=t&&function(e,t,n,r){const{parent:i}=t;return yN(i)&&r?L(t,e,i,n):g(e.declarations,(r=>{if(!r.parent){if(33554432&e.flags)return;xn.fail(`Unexpected symbol at ${xn.formatSyntaxKind(t.kind)}: ${xn.formatSymbol(e)}`)}return CE(r.parent)&&FE(r.parent.parent)?n.getPropertyOfType(n.getTypeFromTypeNode(r.parent.parent),e.name):void 0}))}(e,t,i,!Z(a))||e,c=t?G(t,s):7,l=[],u=new y(n,r,t?function(e){switch(e.kind){case 176:case 137:return 1;case 80:if(gu(e.parent))return xn.assert(e.parent.name===e),2;default:return 0}}(t):0,i,o,c,a,l),d=Z(a)&&s.declarations?S(s.declarations,yN):void 0;if(d)M(d.name,s,d,u.createSearch(t,e,void 0),u,!0,!0);else if(t&&90===t.kind&&"default"===s.escapedName&&s.parent)j(t,s,u),v(t,s,{exportingModuleSymbol:s.parent,exportKind:1},u);else{const e=u.createSearch(t,s,void 0,{allSearchSymbols:t?U(s,t,i,2===a.use,!!a.providePrefixAndSuffixTextForRename,!!a.implementations):[s]});_(s,u,e)}return l}function _(e,t,n){const r=function(e){const{declarations:t,flags:n,parent:r,valueDeclaration:i}=e;if(i&&(218===i.kind||231===i.kind))return i;if(!t)return;if(8196&n){const e=S(t,(e=>Rv(e,2)||Zl(e)));return e?Eh(e,263):void 0}if(t.some(jQ))return;const o=r&&!(262144&e.flags);if(o&&(!nd(r)||r.globalExports))return;let a;for(const e of t){const t=UG(e);if(a&&a!==t)return;if(!t||307===t.kind&&!Zp(t))return;if(a=t,nP(a)){let e;for(;e=zg(a);)a=e}}return o?a.getSourceFile():a}(e);if(r)A(r,r.getSourceFile(),n,t,!(qN(r)&&!D(t.sourceFiles,r)));else for(const e of t.sourceFiles)t.cancellationToken.throwIfCancellationRequested(),k(e,n,t)}let d;var m;function h(e){if(!(33555968&e.flags))return;const t=e.declarations&&S(e.declarations,(e=>!qN(e)&&!ZP(e)));return t&&t.symbol}e.getReferencedSymbolsForNode=function(e,a,_,d,p,f={},m=new Set(d.map((e=>e.fileName)))){var h,y;if(qN(a=t(a,f))){const t=Cce.getReferenceAtPosition(a,e,_);if(!(null==t?void 0:t.file))return;const r=_.getTypeChecker().getMergedSymbol(t.file.symbol);if(r)return s(_,r,!1,d,m);const i=_.getFileIncludeReasons();if(!i)return;return[{definition:{type:5,reference:t.reference,file:a},references:n(t.file,i,_)||u}]}if(!f.implementations){const e=function(e,t,n){if(fQ(e.kind)){if(116===e.kind&&aP(e.parent))return;if(148===e.kind&&!c(e))return;return function(e,t,n,r){const i=R(e,(e=>(n.throwIfCancellationRequested(),q(w(e,Ra(t),e),(e=>{if(e.kind===t&&(!r||r(e)))return ece(e)})))));return i.length?[{definition:{type:2,node:i[0].node},references:i}]:void 0}(t,e.kind,n,148===e.kind?c:void 0)}if(_f(e.parent)&&e.parent.name===e)return function(e,t){const n=R(e,(e=>(t.throwIfCancellationRequested(),q(w(e,"meta",e),(e=>{const t=e.parent;if(_f(t))return ece(t)})))));return n.length?[{definition:{type:2,node:n[0].node},references:n}]:void 0}(t,n);if(QD(e)&&pE(e.parent))return[{definition:{type:2,node:e},references:[ece(e)]}];if(OG(e)){const t=AG(e.parent,e.text);return t&&P(t.parent,t)}return MG(e)?P(e.parent,e):WG(e)?function(e,t,n){let r=rm(e,!1,!1),i=256;switch(r.kind){case 174:case 173:if($f(r)){i&=Zv(r),r=r.parent;break}case 172:case 171:case 176:case 177:case 178:i&=Zv(r),r=r.parent;break;case 307:if(qI(r)||V(e))return;case 262:case 218:break;default:return}const o=R(307===r.kind?t:[r.getSourceFile()],(e=>(n.throwIfCancellationRequested(),w(e,"this",qN(r)?e:r).filter((e=>{if(!WG(e))return!1;const t=rm(e,!1,!1);if(!p_(t))return!1;switch(r.kind){case 218:case 262:return r.symbol===t.symbol;case 174:case 173:return $f(r)&&r.symbol===t.symbol;case 231:case 263:case 210:return t.parent&&p_(t.parent)&&r.symbol===t.parent.symbol&&Jv(t)===!!i;case 307:return 307===t.kind&&!qI(t)&&!V(e)}}))))).map((e=>ece(e)));return[{definition:{type:3,node:g(o,(e=>sE(e.node.parent)?e.node:void 0))||e},references:o}]}(e,t,n):108===e.kind?function(e){let t=sm(e,!1);if(!t)return;let n=256;switch(t.kind){case 172:case 171:case 174:case 173:case 176:case 177:case 178:n&=Zv(t),t=t.parent;break;default:return}const r=q(w(t.getSourceFile(),"super",t),(e=>{if(108!==e.kind)return;const r=sm(e,!1);return r&&Jv(r)===!!n&&r.parent.symbol===t.symbol?ece(e):void 0}));return[{definition:{type:0,symbol:t.symbol},references:r}]}(e):void 0}(a,d,p);if(e)return e}const v=_.getTypeChecker(),b=v.getSymbolAtLocation(fE(a)&&a.parent.name||a);if(!b){if(!f.implementations&&$_(a)){if(LQ(a)){const e=_.getFileIncludeReasons(),t=null==(y=null==(h=_.getResolvedModuleFromModuleSpecifier(a))?void 0:h.resolvedModule)?void 0:y.resolvedFileName,r=t?_.getSourceFile(t):void 0;if(r)return[{definition:{type:4,node:a},references:n(r,e,_)||u}]}return function(e,t,n,r){const i=mX(e,n),o=R(t,(t=>(r.throwIfCancellationRequested(),q(w(t,e.text),(r=>{if($_(r)&&r.text===e.text){if(!i)return PD(r)&&!Xb(r,t)?void 0:ece(r,2);{const e=mX(r,n);if(i!==n.getStringType()&&(i===e||function(e,t){if(lE(e.parent))return t.getPropertyOfType(t.getTypeAtLocation(e.parent.parent),e.text)}(r,n)))return ece(r,2)}}})))));return[{definition:{type:4,node:e},references:o}]}(a,d,v,p)}return}if("export="===b.escapedName)return s(_,b.parent,!1,d,m);const x=i(b,_,d,p,f,m);if(x&&!(33554432&b.flags))return x;const S=r(a,b,v),k=S&&i(S,_,d,p,f,m);return o(_,x,l(b,a,d,m,v,p,f),k)},e.getAdjustedNode=t,e.getReferencesForFileName=function(e,t,r,i=new Set(r.map((e=>e.fileName)))){var o,a;const c=null==(o=t.getSourceFile(e))?void 0:o.symbol;if(c)return(null==(a=s(t,c,!1,r,i)[0])?void 0:a.references)||u;const l=t.getFileIncludeReasons(),_=t.getSourceFile(e);return _&&l&&n(_,l,t)||u},(m=d||(d={}))[m.None=0]="None",m[m.Constructor=1]="Constructor",m[m.Class=2]="Class";class y{constructor(e,t,n,r,i,o,a,s){this.sourceFiles=e,this.sourceFilesSet=t,this.specialSearchKind=n,this.checker=r,this.cancellationToken=i,this.searchMeaning=o,this.options=a,this.result=s,this.inheritsFromCache=new Map,this.markSeenContainingTypeReference=hQ(),this.markSeenReExportRHS=hQ(),this.symbolIdToReferences=[],this.sourceFileToSeenSymbols=[]}includesSourceFile(e){return this.sourceFilesSet.has(e.fileName)}getImportSearches(e,t){return this.importTracker||(this.importTracker=Bse(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(e,t,2===this.options.use)}createSearch(e,t,n,r={}){const{text:i=By(Sc(Ab(t)||h(t)||t)),allSearchSymbols:o=[t]}=r,a=yc(i),s=this.options.implementations&&e?function(e,t,n){const r=BG(e)?e.parent:void 0,i=r&&n.getTypeAtLocation(r.expression),o=q(i&&(i.isUnionOrIntersection()?i.types:i.symbol===t.parent?void 0:[i]),(e=>e.symbol&&96&e.symbol.flags?e.symbol:void 0));return 0===o.length?void 0:o}(e,t,this.checker):void 0;return{symbol:t,comingFrom:n,text:i,escapedText:a,parents:s,allSearchSymbols:o,includes:e=>D(o,e)}}referenceAdder(e){const t=OB(e);let n=this.symbolIdToReferences[t];return n||(n=this.symbolIdToReferences[t]=[],this.result.push({definition:{type:0,symbol:e},references:n})),(e,t)=>n.push(ece(e,t))}addStringOrCommentReference(e,t){this.result.push({definition:void 0,references:[{kind:0,fileName:e,textSpan:t}]})}markSearchedSymbols(e,t){const n=IB(e),r=this.sourceFileToSeenSymbols[n]||(this.sourceFileToSeenSymbols[n]=new Set);let i=!1;for(const e of t)i=W(r,OB(e))||i;return i}}function v(e,t,n,r){const{importSearches:i,singleReferences:o,indirectUsers:a}=r.getImportSearches(t,n);if(o.length){const e=r.referenceAdder(t);for(const t of o)b(t,r)&&e(t)}for(const[e,t]of i)N(e.getSourceFile(),r.createSearch(e,t,1),r);if(a.length){let i;switch(n.exportKind){case 0:i=r.createSearch(e,t,1);break;case 1:i=2===r.options.use?void 0:r.createSearch(e,t,1,{text:"default"})}if(i)for(const e of a)k(e,i,r)}}function b(e,t){return!(!I(e,t)||2===t.options.use&&(!qD(e)||Vl(e.parent)&&"default"===e.escapedText))}function x(e,t){if(e.declarations)for(const n of e.declarations){const r=n.getSourceFile();N(r,t.createSearch(n,e,0),t,t.includesSourceFile(r))}}function k(e,t,n){void 0!==I7(e).get(t.escapedText)&&N(e,t,n)}function C(e,t,n,r,i=n){const o=rc(e.parent,e.parent.parent)?Te(t.getSymbolsOfParameterPropertyDeclaration(e.parent,e.text)):t.getSymbolAtLocation(e);if(o)for(const a of w(n,o.name,i)){if(!qD(a)||a===e||a.escapedText!==e.escapedText)continue;const n=t.getSymbolAtLocation(a);if(n===o||t.getShorthandAssignmentValueSymbol(a.parent)===o||yN(a.parent)&&L(a,n,a.parent,t)===o){const e=r(a);if(e)return e}}}function w(e,t,n=e){return q(E(e,t,n),(t=>{const n=xX(e,t);return n===e?void 0:n}))}function E(e,t,n=e){const r=[];if(!t||!t.length)return r;const i=e.text,o=i.length,a=t.length;let s=i.indexOf(t,n.pos);for(;s>=0&&!(s>n.end);){const e=s+a;0!==s&&ks(i.charCodeAt(s-1),99)||e!==o&&ks(i.charCodeAt(e),99)||r.push(s),s=i.indexOf(t,s+a+1)}return r}function P(e,t){const n=e.getSourceFile(),r=t.text,i=q(w(n,r,e),(e=>e===t||OG(e)&&AG(e,r)===t?ece(e):void 0));return[{definition:{type:1,node:t},references:i}]}function N(e,t,n,r=!0){return n.cancellationToken.throwIfCancellationRequested(),A(e,e,t,n,r)}function A(e,t,n,r,i){if(r.markSearchedSymbols(t,n.allSearchSymbols))for(const o of E(t,n.text,e))O(t,o,n,r,i)}function I(e,t){return!!(yG(e)&t.searchMeaning)}function O(e,t,n,r,i){const o=xX(e,t);if(!function(e,t){switch(e.kind){case 81:if(WN(e.parent))return!0;case 80:return e.text.length===t.length;case 15:case 11:{const n=e;return(qG(n)||zG(e)||VG(e)||QE(e.parent)&&sg(e.parent)&&e.parent.arguments[1]===e)&&n.text.length===t.length}case 9:return qG(e)&&e.text.length===t.length;case 90:return"default".length===t.length;default:return!1}}(o,n.text))return void(!r.options.implementations&&(r.options.findInStrings&&AX(e,t)||r.options.findInComments&&rQ(e,t))&&r.addStringOrCommentReference(e.fileName,Gs(t,n.text.length)));if(!I(o,r))return;let a=r.checker.getSymbolAtLocation(o);if(!a)return;const s=o.parent;if(fN(s)&&s.propertyName===o)return;if(yN(s))return xn.assert(80===o.kind),void M(o,a,s,n,r,i);if(Al(s)&&s.isNameFirst&&s.typeExpression&&aF(s.typeExpression.type)&&s.typeExpression.type.jsDocPropertyTags&&p(s.typeExpression.type.jsDocPropertyTags))return void function(e,t,n,r){const i=r.referenceAdder(n.symbol);j(t,n.symbol,r),f(e,(e=>{iE(e.name)&&i(e.name.left)}))}(s.typeExpression.type.jsDocPropertyTags,o,n,r);const c=function(e,t,n,r){const{checker:i}=r;return K(t,n,i,!1,2!==r.options.use||!!r.options.providePrefixAndSuffixTextForRename,((n,r,i,o)=>(i&&H(t)!==H(i)&&(i=void 0),e.includes(i||r||n)?{symbol:!r||6&px(n)?n:r,kind:o}:void 0)),(t=>!(e.parents&&!e.parents.some((e=>$(t.parent,e,r.inheritsFromCache,i))))))}(n,a,o,r);if(c){switch(r.specialSearchKind){case 0:i&&j(o,c,r);break;case 1:!function(e,t,n,r){xG(e)&&j(e,n.symbol,r);const i=()=>r.referenceAdder(n.symbol);if(gu(e.parent))xn.assert(90===e.kind||e.parent.name===e),function(e,t,n){const r=B(e);if(r&&r.declarations)for(const e of r.declarations){const r=uX(e,137,t);xn.assert(176===e.kind&&!!r),n(r)}e.exports&&e.exports.forEach((e=>{const t=e.valueDeclaration;if(t&&174===t.kind){const e=t.body;e&&Y(e,110,(e=>{xG(e)&&n(e)}))}}))}(n.symbol,t,i());else{const t=pb(NG(e).parent);t&&(function(e,t){const n=B(e.symbol);if(n&&n.declarations)for(const e of n.declarations){xn.assert(176===e.kind);const n=e.body;n&&Y(n,108,(e=>{bG(e)&&t(e)}))}}(t,i()),function(e,t){if(function(e){return!!B(e.symbol)}(e))return;const n=e.symbol,r=t.createSearch(void 0,n,void 0);_(n,t,r)}(t,r))}}(o,e,n,r);break;case 2:!function(e,t,n){j(e,t.symbol,n);const r=e.parent;if(2===n.options.use||!gu(r))return;xn.assert(r.name===e);const i=n.referenceAdder(t.symbol);for(const e of r.members)bu(e)&&Jv(e)&&e.body&&e.body.forEachChild((function e(t){110===t.kind?i(t):cu(t)||gu(t)||t.forEachChild(e)}))}(o,n,r);break;default:xn.assertNever(r.specialSearchKind)}Mm(o)&&KE(o.parent)&&$m(o.parent.parent.parent)&&(a=o.parent.symbol,!a)||function(e,t,n,r){const i=Kse(e,t,r.checker,1===n.comingFrom);if(!i)return;const{symbol:o}=i;0===i.kind?Z(r.options)||x(o,r):v(e,o,i.exportInfo,r)}(o,a,n,r)}else!function({flags:e,valueDeclaration:t},n,r){const i=r.checker.getShorthandAssignmentValueSymbol(t),o=t&&Pc(t);33554432&e||!o||!n.includes(i)||j(o,i,r)}(a,n,r)}function M(e,t,n,r,i,o,a){xn.assert(!a||!!i.options.providePrefixAndSuffixTextForRename,"If alwaysGetReferences is true, then prefix/suffix text must be enabled");const{parent:s,propertyName:c,name:l}=n,u=s.parent,_=L(e,t,n,i.checker);if(a||r.includes(_)){if(c?e===c?(u.moduleSpecifier||d(),o&&2!==i.options.use&&i.markSeenReExportRHS(l)&&j(l,xn.checkDefined(n.symbol),i)):i.markSeenReExportRHS(e)&&d():2===i.options.use&&"default"===l.escapedText||d(),!Z(i.options)||a){const t="default"===e.escapedText||"default"===n.name.escapedText?1:0,r=xn.checkDefined(n.symbol),o=Wse(r,t,i.checker);o&&v(e,r,o,i)}if(1!==r.comingFrom&&u.moduleSpecifier&&!c&&!Z(i.options)){const e=i.checker.getExportSpecifierLocalTargetSymbol(n);e&&x(e,i)}}function d(){o&&j(e,_,i)}}function L(e,t,n,r){return function(e,t){const{parent:n,propertyName:r,name:i}=t;return xn.assert(r===e||i===e),r?r===e:!n.parent.moduleSpecifier}(e,n)&&r.getExportSpecifierLocalTargetSymbol(n)||t}function j(e,t,n){const{kind:r,symbol:i}="kind"in t?t:{kind:void 0,symbol:t};if(2===n.options.use&&90===e.kind)return;const o=n.referenceAdder(i);n.options.implementations?function(e,t,n){if(dh(e)&&(33554432&(r=e.parent).flags?!XP(r)&&!QP(r):If(r)?L_(r):uu(r)?r.body:gu(r)||d_(r)))return void t(e);var r;if(80!==e.kind)return;304===e.parent.kind&&X(e,n.checker,t);const i=J(e);if(i)return void t(i);const o=mc(e,(e=>!iE(e.parent)&&!wu(e.parent)&&!ku(e.parent))),a=o.parent;if(M_(a)&&a.type===o&&n.markSeenContainingTypeReference(a))if(L_(a))s(a.initializer);else if(cu(a)&&a.body){const e=a.body;241===e.kind?Pf(e,(e=>{e.expression&&s(e.expression)})):s(e)}else Qu(a)&&s(a.expression);function s(e){z(e)&&t(e)}}(e,o,n):o(e,r)}function B(e){return e.members&&e.members.get("__constructor")}function J(e){return qD(e)||GE(e)?J(e.parent):hP(e)?lt(e.parent.parent,_n(gu,XP)):void 0}function z(e){switch(e.kind){case 217:return z(e.expression);case 219:case 218:case 210:case 231:case 209:return!0;default:return!1}}function $(e,t,n,r){if(e===t)return!0;const i=OB(e)+","+OB(t),o=n.get(i);if(void 0!==o)return o;n.set(i,!1);const a=!!e.declarations&&e.declarations.some((e=>Ch(e).some((e=>{const i=r.getTypeAtLocation(e);return!!i&&!!i.symbol&&$(i.symbol,t,n,r)}))));return n.set(i,a),a}function V(e){return 80===e.kind&&169===e.parent.kind&&e.parent.name===e}function U(e,t,n,r,i,o){const a=[];return K(e,t,n,r,!(r&&i),((t,n,r)=>{r&&H(e)!==H(r)&&(r=void 0),a.push(r||n||t)}),(()=>!o)),a}function K(e,t,n,i,o,a,s){const c=O7(t);if(c){const e=n.getShorthandAssignmentValueSymbol(t.parent);if(e&&i)return a(e,void 0,void 0,3);const r=n.getContextualType(c.parent),o=r&&g(M7(c,n,r,!0),(e=>d(e,4)));if(o)return o;const s=function(e,t){return tQ(e.parent.parent)?t.getPropertySymbolOfDestructuringAssignment(e):void 0}(t,n),l=s&&a(s,void 0,void 0,4);if(l)return l;const u=e&&a(e,void 0,void 0,3);if(u)return u}const l=r(t,e,n);if(l){const e=a(l,void 0,void 0,1);if(e)return e}const u=d(e);if(u)return u;if(e.valueDeclaration&&rc(e.valueDeclaration,e.valueDeclaration.parent)){const t=n.getSymbolsOfParameterPropertyDeclaration(ut(e.valueDeclaration,sE),e.name);return xn.assert(2===t.length&&!!(1&t[0].flags)&&!!(4&t[1].flags)),d(1&e.flags?t[1]:t[0])}const _=Y_(e,281);if(!i||_&&!_.propertyName){const e=_&&n.getExportSpecifierLocalTargetSymbol(_);if(e){const t=a(e,void 0,void 0,1);if(t)return t}}if(!i){let r;return r=o?jQ(t.parent)?RQ(n,t.parent):void 0:p(e,n),r&&d(r,4)}if(xn.assert(i),o){const t=p(e,n);return t&&d(t,4)}function d(e,t){return g(n.getRootSymbols(e),(r=>a(e,r,void 0,t)||(r.parent&&96&r.parent.flags&&s(r)?function(e,t,n,r){const i=new Map;return function e(o){if(96&o.flags&&Fx(i,OB(o)))return g(o.declarations,(i=>g(Ch(i),(i=>{const o=n.getTypeAtLocation(i),a=o&&o.symbol&&n.getPropertyOfType(o,t);return o&&a&&(g(n.getRootSymbols(a),r)||e(o.symbol))}))))}(e)}(r.parent,r.name,n,(n=>a(e,r,n,t))):void 0)))}function p(e,t){const n=Y_(e,208);if(n&&jQ(n))return RQ(t,n)}}function H(e){return!!e.valueDeclaration&&!!(256&Qv(e.valueDeclaration))}function G(e,t){let n=yG(e);const{declarations:r}=t;if(r){let e;do{e=n;for(const e of r){const t=hG(e);t&n&&(n|=t)}}while(n!==e)}return n}function X(e,t,n){const r=t.getSymbolAtLocation(e),i=t.getShorthandAssignmentValueSymbol(r.valueDeclaration);if(i)for(const e of i.getDeclarations())1&hG(e)&&n(e)}function Y(e,t,n){LI(e,(e=>{e.kind===t&&n(e),Y(e,t,n)}))}function Z(e){return 2===e.use&&e.providePrefixAndSuffixTextForRename}e.eachExportReference=function(e,t,n,r,i,o,a,s){const c=Bse(e,new Set(e.map((e=>e.fileName))),t,n),{importSearches:l,indirectUsers:u,singleReferences:_}=c(r,{exportKind:a?1:0,exportingModuleSymbol:i},!1);for(const[e]of l)s(e);for(const e of _)qD(e)&&zE(e.parent)&&s(e);for(const e of u)for(const n of w(e,a?"default":o)){const e=t.getSymbolAtLocation(n),i=Q(null==e?void 0:e.declarations,(e=>!!lt(e,mN)));!qD(n)||Vl(n.parent)||e!==r&&!i||s(n)}},e.isSymbolReferencedInFile=function(e,t,n,r=n){return C(e,t,n,(()=>!0),r)||!1},e.eachSymbolReferenceInFile=C,e.getTopMostDeclarationNamesInFile=function(e,t){return F(w(t,e),(e=>!!ph(e))).reduce(((e,t)=>{const n=function(e){let t=0;for(;e;)e=UG(e),t++;return t}(t);return Q(e.declarationNames)&&n!==e.depth?ne===i))&&r(t,a))return!0}return!1},e.getIntersectingMeaningFromDeclarations=G,e.getReferenceEntriesForShorthandPropertyAssignment=X})(oce||(oce={}));var Cce={};function wce(e,t,n,r,i){var o;const a=Ece(t,n,e),s=a&&[(c=a.reference.fileName,l=a.fileName,_=a.unverified,{fileName:l,textSpan:Xs(0,0),kind:"script",name:c,containerName:void 0,containerKind:void 0,unverified:_})]||u;var c,l,_;if(null==a?void 0:a.file)return s;const d=xX(t,n);if(d===t)return;const{parent:p}=d,m=e.getTypeChecker();if(164===d.kind||qD(d)&&gF(p)&&p.tagName===d)return function(e,t){const n=mc(t,mu);if(!n||!n.name)return;const r=mc(n,gu);if(!r)return;const i=Sh(r);if(!i)return;const o=lh(i.expression),a=mP(o)?o.symbol:e.getSymbolAtLocation(o);if(!a)return;const s=vc(Lp(n.name)),c=zv(n)?e.getPropertyOfType(e.getTypeOfSymbol(a),s):e.getPropertyOfType(e.getDeclaredTypeOfSymbol(a),s);return c?Lce(e,c,t):void 0}(m,d)||u;if(OG(d)){const e=AG(d.parent,d.text);return e?[Rce(m,e,"label",d.text,void 0)]:void 0}switch(d.kind){case 107:const e=mc(d.parent,(e=>pE(e)?"quit":uu(e)));return e?[zce(m,e)]:void 0;case 90:if(!LN(d.parent))break;case 84:const n=mc(d.parent,zP);if(n)return[Bce(n,t)]}if(135===d.kind){const e=mc(d,(e=>uu(e)));return e&&Q(e.modifiers,(e=>134===e.kind))?[zce(m,e)]:void 0}if(127===d.kind){const e=mc(d,(e=>uu(e)));return e&&e.asteriskToken?[zce(m,e)]:void 0}if(QD(d)&&pE(d.parent)){const e=d.parent.parent,{symbol:t,failedAliasResolution:n}=Mce(e,m,i),r=F(e.members,pE),o=t?m.symbolToString(t,e):"",a=d.getSourceFile();return O(r,(e=>{let{pos:t}=Wb(e);return t=as(a.text,t),Rce(m,e,"constructor","static {}",o,!1,n,{start:t,length:"static".length})}))}let{symbol:g,failedAliasResolution:h}=Mce(d,m,i),y=d;if(r&&h){const e=f([d,...(null==g?void 0:g.declarations)||u],(e=>mc(e,Tp))),t=e&&Sg(e);t&&(({symbol:g,failedAliasResolution:h}=Mce(t,m,i)),y=t)}if(!g&&LQ(y)){const n=null==(o=e.getResolvedModuleFromModuleSpecifier(y,t))?void 0:o.resolvedModule;if(n)return[{name:y.text,fileName:n.resolvedFileName,containerName:void 0,containerKind:void 0,kind:"script",textSpan:Gs(0,0),failedAliasResolution:h,isAmbient:QI(n.resolvedFileName),unverified:y!==d}]}if(!g)return Z(s,function(e,t){return q(t.getIndexInfosAtLocation(e),(e=>e.declaration&&zce(t,e.declaration)))}(d,m));if(r&&x(g.declarations,(e=>e.getSourceFile().fileName===t.fileName)))return;const v=function(e,t){const n=function(e){const t=mc(e,(e=>!BG(e))),n=null==t?void 0:t.parent;return n&&zu(n)&&mm(n)===t?n:void 0}(t),r=n&&e.getResolvedSignature(n);return lt(r&&r.declaration,(e=>cu(e)&&!SE(e)))}(m,d);if(v&&(!D_(d.parent)||!function(e){switch(e.kind){case 176:case 185:case 179:case 180:return!0;default:return!1}}(v))){const e=zce(m,v,h);if(m.getRootSymbols(g).some((e=>function(e,t){var n;return e===t.symbol||e===t.symbol.parent||mb(t.parent)||!zu(t.parent)&&e===(null==(n=lt(t.parent,p_))?void 0:n.symbol)}(e,v))))return[e];{const t=Lce(m,g,d,h,v)||u;return 108===d.kind?[e,...t]:[...t,e]}}if(304===d.parent.kind){const e=m.getShorthandAssignmentValueSymbol(g.valueDeclaration);return Z((null==e?void 0:e.declarations)?e.declarations.map((t=>jce(t,m,e,d,!1,h))):u,Dce(m,d))}if(au(d)&&KE(p)&&VE(p.parent)&&d===(p.propertyName||p.name)){const e=xQ(d),t=m.getTypeAtLocation(p.parent);return void 0===e?u:R(t.isUnion()?t.types:[t],(t=>{const n=t.getProperty(e);return n&&Lce(m,n,d)}))}const b=Dce(m,d);return Z(s,b.length?b:Lce(m,g,d,h))}function Dce(e,t){const n=O7(t);if(n){const r=n&&e.getContextualType(n.parent);if(r)return R(M7(n,e,r,!1),(n=>Lce(e,n,t)))}return u}function Ece(e,t,n){var r,i;const o=$ce(e.referencedFiles,t);if(o){const t=n.getSourceFileFromReference(e,o);return t&&{reference:o,fileName:t.fileName,file:t,unverified:!1}}const a=$ce(e.typeReferenceDirectives,t);if(a){const t=null==(r=n.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a,e))?void 0:r.resolvedTypeReferenceDirective,i=t&&n.getSourceFile(t.resolvedFileName);return i&&{reference:a,fileName:i.fileName,file:i,unverified:!1}}const s=$ce(e.libReferenceDirectives,t);if(s){const e=n.getLibFileFromReference(s);return e&&{reference:s,fileName:e.fileName,file:e,unverified:!1}}if(e.imports.length||e.moduleAugmentations.length){const r=SX(e,t);let o;if(LQ(r)&&Os(r.text)&&(o=n.getResolvedModuleFromModuleSpecifier(r,e))){const t=null==(i=o.resolvedModule)?void 0:i.resolvedFileName,a=t||Wo(Ro(e.fileName),r.text);return{file:n.getSourceFile(a),fileName:a,reference:{pos:r.getStart(),end:r.getEnd(),fileName:r.text},unverified:!t}}}}o(Cce,{createDefinitionInfo:()=>jce,findReferenceInPosition:()=>$ce,getDefinitionAndBoundSpan:()=>Oce,getDefinitionAtPosition:()=>wce,getReferenceAtPosition:()=>Ece,getTypeDefinitionAtPosition:()=>Ace});var Pce=new Set(["Array","ArrayLike","ReadonlyArray","Promise","PromiseLike","Iterable","IterableIterator","AsyncIterable","Set","WeakSet","ReadonlySet","Map","WeakMap","ReadonlyMap","Partial","Required","Readonly","Pick","Omit"]);function Nce(e,t){if(!t.aliasSymbol)return!1;const n=t.aliasSymbol.name;if(!Pce.has(n))return!1;const r=e.resolveName(n,void 0,788968,!1);return!!r&&r===t.aliasSymbol}function Fce(e,t,n,r){var i,o;if(4&wx(t)&&function(e,t){const n=t.symbol.name;if(!Pce.has(n))return!1;const r=e.resolveName(n,void 0,788968,!1);return!!r&&r===t.target.symbol}(e,t))return Ice(e.getTypeArguments(t)[0],e,n,r);if(Nce(e,t)&&t.aliasTypeArguments)return Ice(t.aliasTypeArguments[0],e,n,r);if(32&wx(t)&&t.target&&Nce(e,t.target)){const a=null==(o=null==(i=t.aliasSymbol)?void 0:i.declarations)?void 0:o[0];if(a&&QP(a)&&xE(a.type)&&a.type.typeArguments)return Ice(e.getTypeAtLocation(a.type.typeArguments[0]),e,n,r)}return[]}function Ace(e,t,n){const r=xX(t,n);if(r===t)return;if(_f(r.parent)&&r.parent.name===r)return Ice(e.getTypeAtLocation(r.parent),e,r.parent,!1);const{symbol:i,failedAliasResolution:o}=Mce(r,e,!1);if(!i)return;const a=e.getTypeOfSymbolAtLocation(i,r),s=function(e,t,n){if(t.symbol===e||e.valueDeclaration&&t.symbol&&KP(e.valueDeclaration)&&e.valueDeclaration.initializer===t.symbol.valueDeclaration){const e=t.getCallSignatures();if(1===e.length)return n.getReturnTypeOfSignature(Te(e))}}(i,a,e),c=s&&Ice(s,e,r,o),[l,u]=c&&0!==c.length?[s,c]:[a,Ice(a,e,r,o)];return u.length?[...Fce(e,l,r,o),...u]:!(111551&i.flags)&&788968&i.flags?Lce(e,mx(i,e),r,o):void 0}function Ice(e,t,n,r){return R(!e.isUnion()||32&e.flags?[e]:e.types,(e=>e.symbol&&Lce(t,e.symbol,n,r)))}function Oce(e,t,n){const r=wce(e,t,n);if(!r||0===r.length)return;const i=$ce(t.referencedFiles,n)||$ce(t.typeReferenceDirectives,n)||$ce(t.libReferenceDirectives,n);if(i)return{definitions:r,textSpan:lQ(i)};const o=xX(t,n);return{definitions:r,textSpan:Gs(o.getStart(),o.getWidth())}}function Mce(e,t,n){const r=t.getSymbolAtLocation(e);let i=!1;if((null==r?void 0:r.declarations)&&2097152&r.flags&&!n&&function(e,t){return 80===e.kind&&(e.parent===t||274!==t.kind)}(e,r.declarations[0])){const e=t.getAliasedSymbol(r);if(e.declarations)return{symbol:e};i=!0}return{symbol:r,failedAliasResolution:i}}function Lce(e,t,n,r,i){const o=F(t.declarations,(e=>e!==i)),a=function(){if(32&t.flags&&!(19&t.flags)&&(xG(n)||137===n.kind)){const e=S(o,gu);return e&&c(e.members,!0)}}()||(SG(n)||$G(n)?c(o,!1):void 0);if(a)return a;const s=F(o,(e=>!function(e){if(!Hm(e))return!1;const t=mc(e,(e=>!!mb(e)||!Hm(e)&&"quit"));return!!t&&5===ag(t)}(e)));return O(Q(s)?s:o,(i=>jce(i,e,t,n,!1,r)));function c(i,o){if(!i)return;const a=i.filter(o?fE:cu),s=a.filter((e=>!!e.body));return a.length?0!==s.length?s.map((r=>jce(r,e,t,n))):[jce(De(a),e,t,n,!1,r)]:void 0}}function jce(e,t,n,r,i,o){const a=t.symbolToString(n),s=Hue.getSymbolKind(t,n,r),c=n.parent?t.symbolToString(n.parent,r):"";return Rce(t,e,s,a,c,i,o)}function Rce(e,t,n,r,i,o,a,s){const c=t.getSourceFile();return s||(s=aQ(Pc(t)||t,c)),{fileName:c.fileName,textSpan:s,kind:n,name:r,containerKind:void 0,containerName:i,...Rse.toContextSpan(s,c,Rse.getContextNode(t)),isLocal:!Jce(e,t),isAmbient:!!(33554432&t.flags),unverified:o,failedAliasResolution:a}}function Bce(e,t){const n=Rse.getContextNode(e),r=aQ(tce(n)?n.start:n,t);return{fileName:t.fileName,textSpan:r,kind:"keyword",name:"switch",containerKind:void 0,containerName:"",...Rse.toContextSpan(r,t,n),isLocal:!0,isAmbient:!1,unverified:!1,failedAliasResolution:void 0}}function Jce(e,t){if(e.isDeclarationVisible(t))return!0;if(!t.parent)return!1;if(L_(t.parent)&&t.parent.initializer===t)return Jce(e,t.parent);switch(t.kind){case 172:case 177:case 178:case 174:if(Rv(t,2))return!1;case 176:case 303:case 304:case 210:case 231:case 219:case 218:return Jce(e,t.parent);default:return!1}}function zce(e,t,n){return jce(t,e,t.symbol,t,!1,n)}function $ce(e,t){return S(e,(e=>Js(e,t)))}var qce={};function Vce(e){return"literals"===e.includeInlayParameterNameHints}function Uce(e){return!0===e.interactiveInlayHints}function Kce(e){const{file:t,program:n,span:r,cancellationToken:i,preferences:o}=e,a=t.text,s=n.getCompilerOptions(),c=AQ(t,o),l=n.getTypeChecker(),u=[];return function e(n){if(n&&0!==n.getFullWidth()){switch(n.kind){case 267:case 263:case 264:case 262:case 231:case 218:case 174:case 219:i.throwIfCancellationRequested()}if(Us(r,n.pos,n.getFullWidth())&&(!wu(n)||hP(n)))return o.includeInlayVariableTypeHints&&KP(n)||o.includeInlayPropertyDeclarationTypeHints&&uE(n)?function(e){if(void 0===e.initializer&&(!uE(e)||1&l.getTypeAtLocation(e).flags)||Eu(e.name)||KP(e)&&!v(e))return;if(kv(e))return;const t=l.getTypeAtLocation(e);if(p(t))return;const n=y(t);if(n){const t="string"==typeof n?n:n.map((e=>e.text)).join("");if(!1===o.includeInlayVariableTypeHintsWhenTypeMatchesName&&Dt(e.name.getText(),t))return;d(n,e.name.end)}}(n):o.includeInlayEnumMemberValueHints&&$N(n)?function(e){if(e.initializer)return;const t=l.getConstantValue(e);var n,r;void 0!==t&&(n=t.toString(),r=e.end,u.push({text:`= ${n}`,position:r,kind:"Enum",whitespaceBefore:!0}))}(n):function(e){return"literals"===e.includeInlayParameterNameHints||"all"===e.includeInlayParameterNameHints}(o)&&(QE(n)||YE(n))?function(e){const t=e.arguments;if(!t||!t.length)return;const n=[],r=l.getResolvedSignatureForSignatureHelp(e,n);if(!r||!n.length)return;let i=0;for(const e of t){const t=lh(e);if(Vce(o)&&!g(t)){i++;continue}let n=0;if(fP(t)){const e=l.getTypeAtLocation(t.expression);if(l.isTupleType(e)){const{elementFlags:t,fixedLength:r}=e.target;if(0===r)continue;const i=T(t,(e=>!(1&e)));(i<0?r:i)>0&&(n=i<0?r:i)}}const a=l.getParameterIdentifierInfoAtPosition(r,i);if(i+=n||1,a){const{parameter:n,parameterName:r,isRestParameter:i}=a;if(!o.includeInlayParameterNameHintsWhenArgumentMatchesName&&f(t,r)&&!i)continue;const s=vc(r);if(m(t,s))continue;_(s,n,e.getStart(),i)}}}(n):(o.includeInlayFunctionParameterTypeHints&&uu(n)&&$T(n)&&function(e){const t=l.getSignatureFromDeclaration(e);if(t)for(let n=0;nnew RegExp(`^\\s?/\\*\\*?\\s?${e}\\s?\\*\\/\\s?$`))(n);return Q(r,(e=>i.test(a.substring(e.pos,e.end))))}function g(e){switch(e.kind){case 224:{const t=e.operand;return Bl(t)||qD(t)&&qT(t.escapedText)}case 112:case 97:case 106:case 15:case 228:return!0;case 80:{const t=e.escapedText;return function(e){return"undefined"===e}(t)||qT(t)}}return Bl(e)}function h(e){const t=e.valueDeclaration;if(!t||!sE(t))return;const n=l.getTypeOfSymbolAtLocation(e,t);return p(n)?void 0:y(n)}function y(e){if(!Uce(o))return function(e){const n=eq();return dd((r=>{const i=l.typeToTypeNode(e,void 0,71286784);xn.assertIsDefined(i,"should always get typenode"),n.writeNode(4,i,t,r)}))}(e);const n=l.typeToTypeNode(e,void 0,71286784);xn.assertIsDefined(n,"should always get typenode");const r=[];return i(n),r;function i(e){var t,n;if(!e)return;const o=Ra(e.kind);if(o)r.push({text:o});else if(Bl(e))r.push({text:u(e)});else switch(e.kind){case 80:xn.assertNode(e,qD);const o=bc(e),c=e.symbol&&e.symbol.declarations&&e.symbol.declarations.length&&Pc(e.symbol.declarations[0]);c?r.push(b(o,c)):r.push({text:o});break;case 166:xn.assertNode(e,iE),i(e.left),r.push({text:"."}),i(e.right);break;case 182:xn.assertNode(e,bE),e.assertsModifier&&r.push({text:"asserts "}),i(e.parameterName),e.type&&(r.push({text:" is "}),i(e.type));break;case 183:xn.assertNode(e,xE),i(e.typeName),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 168:xn.assertNode(e,aE),e.modifiers&&s(e.modifiers," "),i(e.name),e.constraint&&(r.push({text:" extends "}),i(e.constraint)),e.default&&(r.push({text:" = "}),i(e.default));break;case 169:xn.assertNode(e,sE),e.modifiers&&s(e.modifiers," "),e.dotDotDotToken&&r.push({text:"..."}),i(e.name),e.questionToken&&r.push({text:"?"}),e.type&&(r.push({text:": "}),i(e.type));break;case 185:xn.assertNode(e,kE),r.push({text:"new "}),a(e),r.push({text:" => "}),i(e.type);break;case 186:xn.assertNode(e,TE),r.push({text:"typeof "}),i(e.exprName),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 187:xn.assertNode(e,CE),r.push({text:"{"}),e.members.length&&(r.push({text:" "}),s(e.members,"; "),r.push({text:" "})),r.push({text:"}"});break;case 188:xn.assertNode(e,wE),i(e.elementType),r.push({text:"[]"});break;case 189:xn.assertNode(e,DE),r.push({text:"["}),s(e.elements,", "),r.push({text:"]"});break;case 202:xn.assertNode(e,EE),e.dotDotDotToken&&r.push({text:"..."}),i(e.name),e.questionToken&&r.push({text:"?"}),r.push({text:": "}),i(e.type);break;case 190:xn.assertNode(e,PE),i(e.type),r.push({text:"?"});break;case 191:xn.assertNode(e,NE),r.push({text:"..."}),i(e.type);break;case 192:xn.assertNode(e,FE),s(e.types," | ");break;case 193:xn.assertNode(e,AE),s(e.types," & ");break;case 194:xn.assertNode(e,IE),i(e.checkType),r.push({text:" extends "}),i(e.extendsType),r.push({text:" ? "}),i(e.trueType),r.push({text:" : "}),i(e.falseType);break;case 195:xn.assertNode(e,OE),r.push({text:"infer "}),i(e.typeParameter);break;case 196:xn.assertNode(e,ME),r.push({text:"("}),i(e.type),r.push({text:")"});break;case 198:xn.assertNode(e,jE),r.push({text:`${Ra(e.operator)} `}),i(e.type);break;case 199:xn.assertNode(e,RE),i(e.objectType),r.push({text:"["}),i(e.indexType),r.push({text:"]"});break;case 200:xn.assertNode(e,BE),r.push({text:"{ "}),e.readonlyToken&&(40===e.readonlyToken.kind?r.push({text:"+"}):41===e.readonlyToken.kind&&r.push({text:"-"}),r.push({text:"readonly "})),r.push({text:"["}),i(e.typeParameter),e.nameType&&(r.push({text:" as "}),i(e.nameType)),r.push({text:"]"}),e.questionToken&&(40===e.questionToken.kind?r.push({text:"+"}):41===e.questionToken.kind&&r.push({text:"-"}),r.push({text:"?"})),r.push({text:": "}),e.type&&i(e.type),r.push({text:"; }"});break;case 201:xn.assertNode(e,JE),i(e.literal);break;case 184:xn.assertNode(e,SE),a(e),r.push({text:" => "}),i(e.type);break;case 205:xn.assertNode(e,zE),e.isTypeOf&&r.push({text:"typeof "}),r.push({text:"import("}),i(e.argument),e.assertions&&(r.push({text:", { assert: "}),s(e.assertions.assertClause.elements,", "),r.push({text:" }"})),r.push({text:")"}),e.qualifier&&(r.push({text:"."}),i(e.qualifier)),e.typeArguments&&(r.push({text:"<"}),s(e.typeArguments,", "),r.push({text:">"}));break;case 171:xn.assertNode(e,lE),(null==(t=e.modifiers)?void 0:t.length)&&(s(e.modifiers," "),r.push({text:" "})),i(e.name),e.questionToken&&r.push({text:"?"}),e.type&&(r.push({text:": "}),i(e.type));break;case 181:xn.assertNode(e,vE),r.push({text:"["}),s(e.parameters,", "),r.push({text:"]"}),e.type&&(r.push({text:": "}),i(e.type));break;case 173:xn.assertNode(e,_E),(null==(n=e.modifiers)?void 0:n.length)&&(s(e.modifiers," "),r.push({text:" "})),i(e.name),e.questionToken&&r.push({text:"?"}),a(e),e.type&&(r.push({text:": "}),i(e.type));break;case 179:xn.assertNode(e,hE),a(e),e.type&&(r.push({text:": "}),i(e.type));break;case 207:xn.assertNode(e,UE),r.push({text:"["}),s(e.elements,", "),r.push({text:"]"});break;case 206:xn.assertNode(e,VE),r.push({text:"{"}),e.elements.length&&(r.push({text:" "}),s(e.elements,", "),r.push({text:" "})),r.push({text:"}"});break;case 208:xn.assertNode(e,KE),i(e.name);break;case 224:xn.assertNode(e,cP),r.push({text:Ra(e.operator)}),i(e.operand);break;case 203:xn.assertNode(e,qE),i(e.head),e.templateSpans.forEach(i);break;case 16:xn.assertNode(e,ND),r.push({text:u(e)});break;case 204:xn.assertNode(e,$E),i(e.type),i(e.literal);break;case 17:xn.assertNode(e,FD),r.push({text:u(e)});break;case 18:xn.assertNode(e,AD),r.push({text:u(e)});break;case 197:xn.assertNode(e,LE),r.push({text:"this"});break;default:xn.failBadSyntaxKind(e)}}function a(e){e.typeParameters&&(r.push({text:"<"}),s(e.typeParameters,", "),r.push({text:">"})),r.push({text:"("}),s(e.parameters,", "),r.push({text:")"})}function s(e,t){e.forEach(((e,n)=>{n>0&&r.push({text:t}),i(e)}))}function u(e){switch(e.kind){case 11:return 0===c?`'${Fy(e.text,39)}'`:`"${Fy(e.text,34)}"`;case 16:case 17:case 18:{const t=e.rawText??Sy(Fy(e.text,96));switch(e.kind){case 16:return"`"+t+"${";case 17:return"}"+t+"${";case 18:return"}"+t+"`"}}}return e.text}}function v(e){if((ay(e)||KP(e)&&af(e))&&e.initializer){const t=lh(e.initializer);return!(g(t)||YE(t)||HE(t)||Qu(t))}return!0}function b(e,t){const n=t.getSourceFile();return{text:e,span:aQ(t,n),file:n.fileName}}}o(qce,{provideInlayHints:()=>Kce});var Wce={};o(Wce,{getDocCommentTemplateAtPosition:()=>ule,getJSDocParameterNameCompletionDetails:()=>lle,getJSDocParameterNameCompletions:()=>cle,getJSDocTagCompletionDetails:()=>sle,getJSDocTagCompletions:()=>ale,getJSDocTagNameCompletionDetails:()=>ole,getJSDocTagNameCompletions:()=>ile,getJsDocCommentsFromDeclarations:()=>Qce,getJsDocTagsFromDeclarations:()=>Zce});var Hce,Gce,Xce=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","import","inheritdoc","inner","instance","interface","kind","lends","license","link","linkcode","linkplain","listens","member","memberof","method","mixes","module","name","namespace","overload","override","package","param","private","prop","property","protected","public","readonly","requires","returns","satisfies","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"];function Qce(e,t){const n=[];return WQ(e,(e=>{for(const r of function(e){switch(e.kind){case 341:case 348:return[e];case 338:case 346:return[e,e.parent];case 323:if(hF(e.parent))return[e.parent.parent];default:return Bg(e)}}(e)){const i=oF(r)&&r.tags&&S(r.tags,(e=>327===e.kind&&("inheritDoc"===e.tagName.escapedText||"inheritdoc"===e.tagName.escapedText)));if(void 0===r.comment&&!i||oF(r)&&346!==e.kind&&338!==e.kind&&r.tags&&r.tags.some((e=>346===e.kind||338===e.kind))&&!r.tags.some((e=>341===e.kind||342===e.kind)))continue;let o=r.comment?nle(r.comment,t):[];i&&i.comment&&(o=o.concat(nle(i.comment,t))),D(n,o,Yce)||n.push(o)}})),j(b(n,[hY()]))}function Yce(e,t){return E(e,t,((e,t)=>e.kind===t.kind&&e.text===t.text))}function Zce(e,t){const n=[];return WQ(e,(e=>{const r=ll(e);if(!r.some((e=>346===e.kind||338===e.kind))||r.some((e=>341===e.kind||342===e.kind)))for(const e of r)n.push({name:e.tagName.text,text:rle(e,t)}),n.push(...ele(tle(e),t))})),n}function ele(e,t){return R(e,(e=>Z([{name:e.tagName.text,text:rle(e,t)}],ele(tle(e),t))))}function tle(e){return Al(e)&&e.isNameFirst&&e.typeExpression&&aF(e.typeExpression.type)?e.typeExpression.type.jsDocPropertyTags:void 0}function nle(e,t){return"string"==typeof e?[lY(e)]:R(e,(e=>321===e.kind?[lY(e.text)]:mY(e,t)))}function rle(e,t){const{comment:n,kind:r}=e,i=function(e){switch(e){case 341:return aY;case 348:return sY;case 345:return _Y;case 346:case 338:return uY;default:return lY}}(r);switch(r){case 349:const r=e.typeExpression;return r?o(r):void 0===n?void 0:nle(n,t);case 329:case 328:return o(e.class);case 345:const a=e,s=[];if(a.constraint&&s.push(lY(a.constraint.getText())),p(a.typeParameters)){p(s)&&s.push(nY());const e=a.typeParameters[a.typeParameters.length-1];f(a.typeParameters,(t=>{s.push(i(t.getText())),e!==t&&s.push(iY(28),nY())}))}return n&&s.push(nY(),...nle(n,t)),s;case 344:case 350:return o(e.typeExpression);case 346:case 338:case 348:case 341:case 347:const{name:c}=e;return c?o(c):void 0===n?void 0:nle(n,t);default:return void 0===n?void 0:nle(n,t)}function o(e){return r=e.getText(),n?r.match(/^https?$/)?[lY(r),...nle(n,t)]:[i(r),nY(),...nle(n,t)]:[lY(r)];var r}}function ile(){return Hce||(Hce=O(Xce,(e=>({name:e,kind:"keyword",kindModifiers:"",sortText:$oe.SortText.LocationPriority}))))}var ole=sle;function ale(){return Gce||(Gce=O(Xce,(e=>({name:`@${e}`,kind:"keyword",kindModifiers:"",sortText:$oe.SortText.LocationPriority}))))}function sle(e){return{name:e,kind:"",kindModifiers:"",displayParts:[lY(e)],documentation:u,tags:void 0,codeActions:void 0}}function cle(e){if(!qD(e.name))return u;const t=e.name.text,n=e.parent,r=n.parent;return cu(r)?q(r.parameters,(r=>{if(!qD(r.name))return;const i=r.name.text;return n.tags.some((t=>t!==e&&xF(t)&&qD(t.name)&&t.name.escapedText===i))||void 0!==t&&!an(i,t)?void 0:{name:i,kind:"parameter",kindModifiers:"",sortText:$oe.SortText.LocationPriority}})):[]}function lle(e){return{name:e,kind:"parameter",kindModifiers:"",displayParts:[lY(e)],documentation:u,tags:void 0,codeActions:void 0}}function ule(e,t,n,r){const i=kX(t,n),o=mc(i,oF);if(o&&(void 0!==o.comment||p(o.tags)))return;const a=i.getStart(t);if(!o&&a_le(e,t)))}(i,r);if(!s)return;const{commentOwner:c,parameters:l,hasReturn:u}=s,_=we(O_(c)&&c.jsDoc?c.jsDoc:void 0);if(c.getStart(t){const a=80===e.kind?e.text:"param"+o;return`${n} * @param ${t?i?"{...any} ":"{any} ":""}${a}${r}`})).join("")}(l||[],f,d,e):"")+(u?function(e,t){return`${e} * @returns${t}`}(d,e):""),g=p(ll(c))>0;if(m&&!g){const t="/**"+e+d+" * ";return{newText:t+e+m+d+" */"+(a===n?e+d:""),caretOffset:t.length}}return{newText:"/** */",caretOffset:3}}function _le(e,t){switch(e.kind){case 262:case 218:case 174:case 176:case 173:case 219:const n=e;return{commentOwner:e,parameters:n.parameters,hasReturn:dle(n,t)};case 303:return _le(e.initializer,t);case 263:case 264:case 266:case 306:case 265:return{commentOwner:e};case 171:{const n=e;return n.type&&SE(n.type)?{commentOwner:e,parameters:n.type.parameters,hasReturn:dle(n.type,t)}:{commentOwner:e}}case 243:{const n=e.declarationList.declarations,r=1===n.length&&n[0].initializer?function(e){for(;217===e.kind;)e=e.expression;switch(e.kind){case 218:case 219:return e;case 231:return S(e.members,fE)}}(n[0].initializer):void 0;return r?{commentOwner:e,parameters:r.parameters,hasReturn:dle(r,t)}:{commentOwner:e}}case 307:return"quit";case 267:return 267===e.parent.kind?void 0:{commentOwner:e};case 244:return _le(e.expression,t);case 226:{const n=e;return 0===ag(n)?"quit":cu(n.right)?{commentOwner:e,parameters:n.right.parameters,hasReturn:dle(n.right,t)}:{commentOwner:e}}case 172:const r=e.initializer;if(r&&(nP(r)||rP(r)))return{commentOwner:e,parameters:r.parameters,hasReturn:dle(r,t)}}}function dle(e,t){return!!(null==t?void 0:t.generateReturnInDocTemplate)&&(SE(e)||rP(e)&&Xu(e.body)||uu(e)&&e.body&&DP(e.body)&&!!Pf(e.body,(e=>e)))}var ple={};function fle(e,t,n,r,i,o){return r_e.ChangeTracker.with({host:r,formatContext:i,preferences:o},(r=>{const i=t.map((t=>function(e,t){const n=[{parse:()=>JI("__mapcode_content_nodes.ts",t,e.languageVersion,!0,e.scriptKind),body:e=>e.statements},{parse:()=>JI("__mapcode_class_content_nodes.ts",`class __class {\n${t}\n}`,e.languageVersion,!0,e.scriptKind),body:e=>e.statements[0].members}],r=[];for(const{parse:e,body:t}of n){const n=e(),i=t(n);if(i.length&&0===n.parseDiagnostics.length)return i;i.length&&r.push({sourceFile:n,body:i})}const{body:i}=r.sort(((e,t)=>e.sourceFile.parseDiagnostics.length-t.sourceFile.parseDiagnostics.length))[0];return i}(e,t))),o=n&&j(n);for(const t of i)mle(e,r,t,o)}))}function mle(e,t,n,r){mu(n[0])||ku(n[0])?function(e,t,n,r){let i;if(i=r&&r.length?f(r,(t=>mc(kX(e,t.start),_n(gu,XP)))):S(e.statements,_n(gu,XP)),!i)return;const o=i.members.find((e=>n.some((t=>gle(t,e)))));if(o){const r=k(i.members,(e=>n.some((t=>gle(t,e)))));return f(n,hle),void t.replaceNodeRangeWithNodes(e,o,r,n)}f(n,hle),t.insertNodesAfter(e,i.members[i.members.length-1],n)}(e,t,n,r):function(e,t,n,r){if(!(null==r?void 0:r.length))return void t.insertNodesAtEndOfFile(e,n,!1);for(const i of r){const r=mc(kX(e,i.start),(e=>_n(DP,qN)(e)&&Q(e.statements,(e=>n.some((t=>gle(t,e)))))));if(r){const i=r.statements.find((e=>n.some((t=>gle(t,e)))));if(i){const o=k(r.statements,(e=>n.some((t=>gle(t,e)))));return f(n,hle),void t.replaceNodeRangeWithNodes(e,i,o,n)}}}let i=e.statements;for(const t of r){const n=mc(kX(e,t.start),DP);if(n){i=n.statements;break}}f(n,hle),t.insertNodesAfter(e,i[i.length-1],n)}(e,t,n,r)}function gle(e,t){var n,r,i,o,a,s;return e.kind===t.kind&&(176===e.kind?e.kind===t.kind:Dc(e)&&Dc(t)?e.name.getText()===t.name.getText():FP(e)&&FP(t)||IP(e)&&IP(t)?e.expression.getText()===t.expression.getText():OP(e)&&OP(t)?(null==(n=e.initializer)?void 0:n.getText())===(null==(r=t.initializer)?void 0:r.getText())&&(null==(i=e.incrementor)?void 0:i.getText())===(null==(o=t.incrementor)?void 0:o.getText())&&(null==(a=e.condition)?void 0:a.getText())===(null==(s=t.condition)?void 0:s.getText()):i_(e)&&i_(t)?e.expression.getText()===t.expression.getText()&&e.initializer.getText()===t.initializer.getText():$P(e)&&$P(t)?e.label.getText()===t.label.getText():e.getText()===t.getText())}function hle(e){yle(e),e.parent=void 0}function yle(e){e.pos=-1,e.end=-1,e.forEachChild(yle)}o(ple,{mapCode:()=>fle});var vle={};function ble(e,t,n,r,i,o){const a=r_e.ChangeTracker.fromContext({host:n,formatContext:t,preferences:i}),s="SortAndCombine"===o||"All"===o,c=s,l="RemoveUnused"===o||"All"===o,u=e.statements.filter(iN),_=Sle(e,u),{comparersToTest:d,typeOrdersToTest:f}=xle(i),m=d[0],g={moduleSpecifierComparer:"boolean"==typeof i.organizeImportsIgnoreCase?m:void 0,namedImportComparer:"boolean"==typeof i.organizeImportsIgnoreCase?m:void 0,typeOrder:i.organizeImportsTypeOrder};if("boolean"!=typeof i.organizeImportsIgnoreCase&&({comparer:g.moduleSpecifierComparer}=Ole(_,d)),!g.typeOrder||"boolean"!=typeof i.organizeImportsIgnoreCase){const e=Mle(u,d,f);if(e){const{namedImportComparer:t,typeOrder:n}=e;g.namedImportComparer=g.namedImportComparer??t,g.typeOrder=g.typeOrder??n}}_.forEach((e=>y(e,g))),"RemoveUnused"!==o&&function(e){const t=[],n=e.statements,r=p(n);let i=0,o=0;for(;iSle(e,t)))}(e).forEach((e=>v(e,g.namedImportComparer)));for(const t of e.statements.filter(sp))t.body&&(Sle(e,t.body.statements.filter(iN)).forEach((e=>y(e,g))),"RemoveUnused"!==o&&v(t.body.statements.filter(gN),g.namedImportComparer));return a.getChanges();function h(r,i){if(0===p(r))return;iw(r[0],1024);const o=c?He(r,(e=>Tle(e.moduleSpecifier))):[r],l=R(s?ve(o,((e,t)=>Nle(e[0].moduleSpecifier,t[0].moduleSpecifier,g.moduleSpecifierComparer??m))):o,(e=>Tle(e[0].moduleSpecifier)||void 0===e[0].moduleSpecifier?i(e):e));if(0===l.length)a.deleteNodes(e,r,{leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.Include},!0);else{const i={leadingTriviaOption:r_e.LeadingTriviaOption.Exclude,trailingTriviaOption:r_e.TrailingTriviaOption.Include,suffix:gY(n,t.options)};a.replaceNodeWithNodes(e,r[0],l,i);const o=a.nodeHasTrailingComment(e,r[0],i);a.deleteNodes(e,r.slice(1),{trailingTriviaOption:r_e.TrailingTriviaOption.Include},o)}}function y(t,n){const i=n.moduleSpecifierComparer??m,o=n.namedImportComparer??m,a=$le({organizeImportsTypeOrder:n.typeOrder??"last"},o);h(t,(t=>(l&&(t=function(e,t,n){const r=n.getTypeChecker(),i=n.getCompilerOptions(),o=r.getJsxNamespace(t),a=r.getJsxFragmentFactory(t),s=!!(2&t.transformFlags),c=[];for(const n of e){const{importClause:e,moduleSpecifier:r}=n;if(!e){c.push(n);continue}let{name:i,namedBindings:o}=e;if(i&&!l(i)&&(i=void 0),o)if(_N(o))l(o.name)||(o=void 0);else{const e=o.elements.filter((e=>l(e.name)));e.lengthKle(e,t,i)))),t)))}function v(e,t){const n=$le(i,t);h(e,(e=>Dle(e,n)))}}function xle(e){return{comparersToTest:"boolean"==typeof e.organizeImportsIgnoreCase?[Jle(e,e.organizeImportsIgnoreCase)]:[Jle(e,!0),Jle(e,!1)],typeOrdersToTest:e.organizeImportsTypeOrder?[e.organizeImportsTypeOrder]:["last","inline","first"]}}function Sle(e,t){const n=Cs(e.languageVersion,!1,e.languageVariant),r=[];let i=0;for(const o of t)r[i]&&kle(e,o,n)&&i++,r[i]||(r[i]=[]),r[i].push(o);return r}function kle(e,t,n){const r=t.getFullStart(),i=t.getStart();n.setText(e.text,r,i-r);let o=0;for(;n.getTokenStart()=2))return!0;return!1}function Tle(e){return void 0!==e&&$_(e)?e.text:void 0}function Cle(e){let t;const n={defaultImports:[],namespaceImports:[],namedImports:[]},r={defaultImports:[],namespaceImports:[],namedImports:[]};for(const i of e){if(void 0===i.importClause){t=t||i;continue}const e=i.importClause.isTypeOnly?n:r,{name:o,namedBindings:a}=i.importClause;o&&e.defaultImports.push(i),a&&(_N(a)?e.namespaceImports.push(i):e.namedImports.push(i))}return{importWithoutClause:t,typeOnlyImports:n,regularImports:r}}function wle(e,t,n,r){if(0===e.length)return e;const i=Ge(e,(e=>{if(e.attributes){let t=e.attributes.token+" ";for(const n of he(e.attributes.elements,((e,t)=>Mt(e.name.text,t.name.text))))t+=n.name.text+":",t+=$_(n.value)?`"${n.value.text}"`:n.value.getText()+" ";return t}return""})),o=[];for(const e in i){const a=i[e],{importWithoutClause:s,typeOnlyImports:c,regularImports:l}=Cle(a);s&&o.push(s);for(const e of[l,c]){const i=e===c,{defaultImports:a,namespaceImports:s,namedImports:l}=e;if(!i&&1===a.length&&1===s.length&&0===l.length){const e=a[0];o.push(Ele(e,e.importClause.name,s[0].importClause.namedBindings));continue}const _=ve(s,((e,n)=>t(e.importClause.namedBindings.name.text,n.importClause.namedBindings.name.text)));for(const e of _)o.push(Ele(e,void 0,e.importClause.namedBindings));const d=Se(a),p=Se(l),f=d??p;if(!f)continue;let m;const g=[];if(1===a.length)m=a[0].importClause.name;else for(const e of a)g.push(YC.createImportSpecifier(!1,YC.createIdentifier("default"),e.importClause.name));g.push(...Ile(l));const h=YC.createNodeArray(ve(g,n),null==p?void 0:p.importClause.namedBindings.elements.hasTrailingComma),y=0===h.length?m?void 0:YC.createNamedImports(u):p?YC.updateNamedImports(p.importClause.namedBindings,h):YC.createNamedImports(h);r&&y&&(null==p?void 0:p.importClause.namedBindings)&&!Xb(p.importClause.namedBindings,r)&&iw(y,2),i&&m&&y?(o.push(Ele(f,m,void 0)),o.push(Ele(p??f,void 0,y))):o.push(Ele(f,m,y))}}return o}function Dle(e,t){if(0===e.length)return e;const{exportWithoutClause:n,namedExports:r,typeOnlyExports:i}=function(e){let t;const n=[],r=[];for(const i of e)void 0===i.exportClause?t=t||i:i.isTypeOnly?r.push(i):n.push(i);return{exportWithoutClause:t,namedExports:n,typeOnlyExports:r}}(e),o=[];n&&o.push(n);for(const e of[r,i]){if(0===e.length)continue;const n=[];n.push(...R(e,(e=>e.exportClause&&hN(e.exportClause)?e.exportClause.elements:u)));const r=ve(n,t),i=e[0];o.push(YC.updateExportDeclaration(i,i.modifiers,i.isTypeOnly,i.exportClause&&(hN(i.exportClause)?YC.updateNamedExports(i.exportClause,r):YC.updateNamespaceExport(i.exportClause,i.exportClause.name)),i.moduleSpecifier,i.attributes))}return o}function Ele(e,t,n){return YC.updateImportDeclaration(e,e.modifiers,YC.updateImportClause(e.importClause,e.importClause.isTypeOnly,t,n),e.moduleSpecifier,e.attributes)}function Ple(e,t,n,r){switch(null==r?void 0:r.organizeImportsTypeOrder){case"first":return Vt(t.isTypeOnly,e.isTypeOnly)||n(e.name.text,t.name.text);case"inline":return n(e.name.text,t.name.text);default:return Vt(e.isTypeOnly,t.isTypeOnly)||n(e.name.text,t.name.text)}}function Nle(e,t,n){const r=void 0===e?void 0:Tle(e),i=void 0===t?void 0:Tle(t);return Vt(void 0===r,void 0===i)||Vt(Os(r),Os(i))||n(r,i)}function Fle(e){var t;switch(e.kind){case 271:return null==(t=lt(e.moduleReference,SN))?void 0:t.expression;case 272:return e.moduleSpecifier;case 243:return e.declarationList.declarations[0].initializer.arguments[0]}}function Ale(e,t){const n=wD(t)&&t.text;return st(n)&&Q(e.moduleAugmentations,(e=>wD(e)&&e.text===n))}function Ile(e){return R(e,(e=>O(function(e){var t;return(null==(t=e.importClause)?void 0:t.namedBindings)&&pN(e.importClause.namedBindings)?e.importClause.namedBindings.elements:void 0}(e),(e=>e.name&&e.propertyName&&e.name.escapedText===e.propertyName.escapedText?YC.updateImportSpecifier(e,e.isTypeOnly,void 0,e.name):e))))}function Ole(e,t){const n=[];return e.forEach((e=>{n.push(e.map((e=>Tle(Fle(e))||"")))})),jle(n,t)}function Mle(e,t,n){let r=!1;const i=e.filter((e=>{var t,n;const i=null==(n=lt(null==(t=e.importClause)?void 0:t.namedBindings,pN))?void 0:n.elements;return!!(null==i?void 0:i.length)&&(!r&&i.some((e=>e.isTypeOnly))&&i.some((e=>!e.isTypeOnly))&&(r=!0),!0)}));if(0===i.length)return;const o=i.map((e=>{var t,n;return null==(n=lt(null==(t=e.importClause)?void 0:t.namedBindings,pN))?void 0:n.elements})).filter((e=>void 0!==e));if(!r||0===n.length){const e=jle(o.map((e=>e.map((e=>e.name.text)))),t);return{namedImportComparer:e.comparer,typeOrder:1===n.length?n[0]:void 0,isSorted:e.isSorted}}const a={first:1/0,last:1/0,inline:1/0},s={first:t[0],last:t[0],inline:t[0]};for(const e of t){const t={first:0,last:0,inline:0};for(const r of o)for(const i of n)t[i]=(t[i]??0)+Lle(r,((t,n)=>Ple(t,n,e,{organizeImportsTypeOrder:i})));for(const r of n){const n=r;t[n]0&&n++;return n}function jle(e,t){let n,r=1/0;for(const i of t){let t=0;for(const n of e)n.length<=1||(t+=Lle(n,i));tPle(t,r,n,e)}function qle(e,t,n){const{comparersToTest:r,typeOrdersToTest:i}=xle(t),o=Mle([e],r,i);let a,s=$le(t,r[0]);if("boolean"!=typeof t.organizeImportsIgnoreCase||!t.organizeImportsTypeOrder)if(o){const{namedImportComparer:e,typeOrder:t,isSorted:n}=o;a=n,s=$le({organizeImportsTypeOrder:t},e)}else if(n){const e=Mle(n.statements.filter(iN),r,i);if(e){const{namedImportComparer:t,typeOrder:n,isSorted:r}=e;a=r,s=$le({organizeImportsTypeOrder:n},t)}}return{specifierComparer:s,isSorted:a}}function Vle(e,t,n){const r=Ae(e,t,mt,((e,t)=>Kle(e,t,n)));return r<0?~r:r}function Ule(e,t,n){const r=Ae(e,t,mt,n);return r<0?~r:r}function Kle(e,t,n){return Nle(Fle(e),Fle(t),n)||function(e,t){return Nt(Rle(e),Rle(t))}(e,t)}function Wle(e,t,n,r){const i=Ble(t);return wle(e,i,$le({organizeImportsTypeOrder:null==r?void 0:r.organizeImportsTypeOrder},i),n)}function Hle(e,t,n){return Dle(e,((e,r)=>Ple(e,r,Ble(t),{organizeImportsTypeOrder:(null==n?void 0:n.organizeImportsTypeOrder)??"last"})))}function Gle(e,t,n){return Nle(e,t,Ble(!!n))}o(vle,{compareImportsOrRequireStatements:()=>Kle,compareModuleSpecifiers:()=>Gle,getDetectionLists:()=>xle,getImportDeclarationInsertionIndex:()=>Vle,getImportSpecifierInsertionIndex:()=>Ule,getNamedImportSpecifierComparerWithDetection:()=>qle,getOrganizeImportsStringComparerWithDetection:()=>zle,organizeImports:()=>ble,testCoalesceExports:()=>Hle,testCoalesceImports:()=>Wle});var Xle={};function Qle(e,t){const n=[];return function(e,t,n){let r=40,i=0;const o=[...e.statements,e.endOfFileToken],a=o.length;for(;i...")}(e);case 288:return function(e){const n=Xs(e.openingFragment.getStart(t),e.closingFragment.getEnd());return iue(n,"code",n,!1,"<>...")}(e);case 285:case 286:return function(e){if(0!==e.properties.length)return nue(e.getStart(t),e.getEnd(),"code")}(e.attributes);case 228:case 15:return function(e){if(15!==e.kind||0!==e.text.length)return nue(e.getStart(t),e.getEnd(),"code")}(e);case 207:return i(e,!1,!KE(e.parent),23);case 219:return function(e){if(DP(e.body)||tP(e.body)||ix(e.body.getFullStart(),e.body.getEnd(),t))return;return iue(Xs(e.body.getFullStart(),e.body.getEnd()),"code",aQ(e))}(e);case 213:return function(e){if(!e.arguments.length)return;const n=uX(e,21,t),r=uX(e,22,t);return n&&r&&!ix(n.pos,r.pos,t)?rue(n,r,e,t,!1,!0):void 0}(e);case 217:return function(e){if(ix(e.getStart(),e.getEnd(),t))return;return iue(Xs(e.getStart(),e.getEnd()),"code",aQ(e))}(e);case 275:case 279:case 300:return function(e){if(!e.elements.length)return;const n=uX(e,19,t),r=uX(e,20,t);return n&&r&&!ix(n.pos,r.pos,t)?rue(n,r,e,t,!1,!1):void 0}(e)}var n;function r(e,t=19){return i(e,!1,!WE(e.parent)&&!QE(e.parent),t)}function i(n,r=!1,i=!0,o=19,a=(19===o?20:24)){const s=uX(e,o,t),c=uX(e,a,t);return s&&c&&rue(s,c,n,t,r,i)}}(i,e);a&&n.push(a),r--,QE(i)?(r++,s(i.expression),r--,i.arguments.forEach(s),null==(o=i.typeArguments)||o.forEach(s)):FP(i)&&i.elseStatement&&FP(i.elseStatement)?(s(i.expression),s(i.thenStatement),r++,s(i.elseStatement),r--):i.forEachChild(s),r++}}(e,t,n),function(e,t){const n=[],r=e.getLineStarts();for(const i of r){const r=e.getLineEndOfPosition(i),o=Zle(e.text.substring(i,r));if(o&&!qX(e,i))if(o[1]){const e=n.pop();e&&(e.textSpan.length=r-e.textSpan.start,e.hintSpan.length=r-e.textSpan.start,t.push(e))}else{const t=Xs(e.text.indexOf("//",i),r);n.push(iue(t,"region",t,!1,o[2]||"#region"))}}}(e,n),n.sort(((e,t)=>e.textSpan.start-t.textSpan.start))}o(Xle,{collectElements:()=>Qle});var Yle=/^#(end)?region(?:\s+(.*))?(?:\r)?$/;function Zle(e){return an(e=e.trimStart(),"//")?(e=e.slice(2).trim(),Yle.exec(e)):null}function eue(e,t,n,r){const i=vs(t.text,e);if(!i)return;let o=-1,a=-1,s=0;const c=t.getFullText();for(const{kind:e,pos:t,end:u}of i)switch(n.throwIfCancellationRequested(),e){case 2:if(Zle(c.slice(t,u))){l(),s=0;break}0===s&&(o=t),a=u,s++;break;case 3:l(),r.push(nue(t,u,"comment")),s=0;break;default:xn.assertNever(e)}function l(){s>1&&r.push(nue(o,a,"comment"))}l()}function tue(e,t,n,r){DD(e)||eue(e.pos,t,n,r)}function nue(e,t,n){return iue(Xs(e,t),n)}function rue(e,t,n,r,i=!1,o=!0){return iue(Xs(o?e.getFullStart():e.getStart(r),t.getEnd()),"code",aQ(n,r),i)}function iue(e,t,n=e,r=!1,i="..."){return{textSpan:e,kind:t,hintSpan:n,bannerText:i,autoCollapse:r}}var oue={};function aue(e,t,n,r){const i=bX(xX(t,n));if(_ue(i)){const n=function(e,t,n,r,i){const o=t.getSymbolAtLocation(e);if(!o){if($_(e)){const r=mX(e,t);if(r&&(128&r.flags||1048576&r.flags&&x(r.types,(e=>!!(128&e.flags)))))return cue(e.text,e.text,"string","",e,n)}else if(LG(e)){const t=Gd(e);return cue(t,t,"label","",e,n)}return}const{declarations:a}=o;if(!a||0===a.length)return;if(a.some((e=>function(e,t){const n=t.getSourceFile();return e.isSourceFileDefaultLibrary(n)&&Ao(n.fileName,".d.ts")}(r,e))))return lue(va.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(qD(e)&&"default"===e.escapedText&&o.parent&&1536&o.parent.flags)return;if($_(e)&&Tg(e))return i.allowRenameOfImportPath?function(e,t,n){if(!Os(e.text))return lue(va.You_cannot_rename_a_module_via_a_global_import);const r=n.declarations&&S(n.declarations,qN);if(!r)return;const i=Wt(e.text,"/index")||Wt(e.text,"/index.js")?void 0:Gt(Yk(r.fileName),"/index"),o=void 0===i?r.fileName:i,a=void 0===i?"module":"directory",s=e.text.lastIndexOf("/")+1,c=Gs(e.getStart(t)+1+s,e.text.length-s);return{canRename:!0,fileToRename:o,kind:a,displayName:o,fullDisplayName:e.text,kindModifiers:"",triggerSpan:c}}(e,n,o):void 0;const s=function(e,t,n,r){if(!r.providePrefixAndSuffixTextForRename&&2097152&t.flags){const e=t.declarations&&S(t.declarations,(e=>fN(e)));e&&!e.propertyName&&(t=n.getAliasedSymbol(t))}const{declarations:i}=t;if(!i)return;const o=sue(e.path);if(void 0===o)return Q(i,(e=>SZ(e.getSourceFile().path)))?va.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:void 0;for(const e of i){const t=sue(e.getSourceFile().path);if(t){const e=Math.min(o.length,t.length);for(let n=0;n<=e;n++)if(0!==Mt(o[n],t[n]))return va.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder}}}(n,o,t,i);if(s)return lue(s);const c=Hue.getSymbolKind(t,o,e),l=kY(e)||$h(e)&&167===e.parent.kind?By(Hh(e)):void 0;return cue(l||t.symbolToString(o),l||t.getFullyQualifiedName(o),c,Hue.getSymbolModifiers(t,o),e,n)}(i,e.getTypeChecker(),t,e,r);if(n)return n}return lue(va.You_cannot_rename_this_element)}function sue(e){const t=$o(e),n=t.lastIndexOf("node_modules");if(-1!==n)return t.slice(0,n+2)}function cue(e,t,n,r,i,o){return{canRename:!0,fileToRename:void 0,kind:n,displayName:e,fullDisplayName:t,kindModifiers:r,triggerSpan:uue(i,o)}}function lue(e){return{canRename:!1,localizedErrorMessage:tS(e)}}function uue(e,t){let n=e.getStart(t),r=e.getWidth(t);return $_(e)&&(n+=1,r-=2),Gs(n,r)}function _ue(e){switch(e.kind){case 80:case 81:case 11:case 15:case 110:return!0;case 9:return qG(e);default:return!1}}o(oue,{getRenameInfo:()=>aue,nodeIsEligibleForRename:()=>_ue});var due={};function pue(e,t,n,r,i){const o=e.getTypeChecker(),a=wX(t,n);if(!a)return;const s=!!r&&"characterTyped"===r.kind;if(s&&(AX(t,n,a)||qX(t,n)))return;const c=!!r&&"invoked"===r.kind,l=function(e,t,n,r,i){for(let o=e;!qN(o)&&(i||!DP(o));o=o.parent){xn.assert(XG(o.parent,o),"Not a subspan",(()=>`Child: ${xn.formatSyntaxKind(o.kind)}, parent: ${xn.formatSyntaxKind(o.parent.kind)}`));const e=yue(o,t,n,r);if(e)return e}}(a,n,t,o,c);if(!l)return;i.throwIfCancellationRequested();const u=function({invocation:e,argumentCount:t},n,r,i,o){switch(e.kind){case 0:{if(o&&!function(e,t,n){if(!$u(t))return!1;const r=t.getChildren(n);switch(e.kind){case 21:return D(r,e);case 28:{const t=_X(e);return!!t&&D(r,t)}case 30:return fue(e,n,t.expression);default:return!1}}(i,e.node,r))return;const a=[],s=n.getResolvedSignatureForSignatureHelp(e.node,a,t);return 0===a.length?void 0:{kind:0,candidates:a,resolvedSignature:s}}case 1:{const{called:a}=e;if(o&&!fue(i,r,qD(a)?a.parent:a))return;const s=zX(a,t,n);if(0!==s.length)return{kind:0,candidates:s,resolvedSignature:Te(s)};const c=n.getSymbolAtLocation(a);return c&&{kind:1,symbol:c}}case 2:return{kind:0,candidates:[e.signature],resolvedSignature:e.signature};default:return xn.assertNever(e)}}(l,o,t,a,s);return i.throwIfCancellationRequested(),u?o.runWithCancellationToken(i,(e=>0===u.kind?Nue(u.candidates,u.resolvedSignature,l,t,e):function(e,{argumentCount:t,argumentsSpan:n,invocation:r,argumentIndex:i},o,a){const s=a.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e);if(s)return{items:[Fue(e,s,a,Eue(r),o)],applicableSpan:n,selectedItemIndex:0,argumentIndex:i,argumentCount:t}}(u.symbol,l,t,e))):Im(t)?function(e,t,n){if(2===e.invocation.kind)return;const r=Due(e.invocation),i=GE(r)?r.name.text:void 0,o=t.getTypeChecker();return void 0===i?void 0:g(t.getSourceFiles(),(t=>g(t.getNamedDeclarations().get(i),(r=>{const i=r.symbol&&o.getTypeOfSymbolAtLocation(r.symbol,r),a=i&&i.getCallSignatures();if(a&&a.length)return o.runWithCancellationToken(n,(n=>Nue(a,a[0],e,t,n,!0)))}))))}(l,e,i):void 0}function fue(e,t,n){const r=e.getFullStart();let i=e.parent;for(;i;){const e=EX(r,t,i,!0);if(e)return XG(n,e);i=i.parent}return xn.fail("Could not find preceding token")}function mue(e,t,n,r){const i=hue(e,t,n,r);return!i||i.isTypeParameterList||0!==i.invocation.kind?void 0:{invocation:i.invocation.node,argumentCount:i.argumentCount,argumentIndex:i.argumentIndex}}function gue(e,t,n,r){const i=function(e,t,n){if(30===e.kind||21===e.kind)return{list:wue(e.parent,e,t),argumentIndex:0};{const t=_X(e);return t&&{list:t,argumentIndex:Sue(n,t,e)}}}(e,n,r);if(!i)return;const{list:o,argumentIndex:a}=i,s=function(e,t){return kue(e,t,void 0)}(r,o);0!==a&&xn.assertLessThan(a,s);const c=function(e,t){const n=e.getFullStart();return Gs(n,as(t.text,e.getEnd(),!1)-n)}(o,n);return{list:o,argumentIndex:a,argumentCount:s,argumentsSpan:c}}function hue(e,t,n,r){const{parent:i}=e;if($u(i)){const t=i,o=gue(e,0,n,r);if(!o)return;const{list:a,argumentIndex:s,argumentCount:c,argumentsSpan:l}=o;return{isTypeParameterList:!!i.typeArguments&&i.typeArguments.pos===a.pos,invocation:{kind:0,node:t},argumentsSpan:l,argumentIndex:s,argumentCount:c}}if(PD(e)&&ZE(i))return YX(e,t,n)?Tue(i,0,n):void 0;if(ND(e)&&215===i.parent.kind){const r=i,o=r.parent;return xn.assert(228===r.kind),Tue(o,YX(e,t,n)?0:1,n)}if(CP(i)&&ZE(i.parent.parent)){const r=i,o=i.parent.parent;if(AD(e)&&!YX(e,t,n))return;const a=function(e,t,n,r){return xn.assert(n>=t.getStart(),"Assumed 'position' could not occur before node."),$l(t)?YX(t,n,r)?0:e+2:e+1}(r.parent.templateSpans.indexOf(r),e,t,n);return Tue(o,a,n)}if(D_(i)){const e=i.attributes.pos;return{isTypeParameterList:!1,invocation:{kind:0,node:i},argumentsSpan:Gs(e,as(n.text,i.attributes.end,!1)-e),argumentIndex:0,argumentCount:1}}{const t=$X(e,n);if(t){const{called:r,nTypeArguments:i}=t;return{isTypeParameterList:!0,invocation:{kind:1,called:r},argumentsSpan:Xs(r.getStart(n),e.end),argumentIndex:i,argumentCount:i+1}}return}}function yue(e,t,n,r){return function(e,t,n,r){const i=function(e){switch(e.kind){case 21:case 28:return e;default:return mc(e.parent,(e=>!!sE(e)||!(KE(e)||VE(e)||UE(e))&&"quit"))}}(e);if(void 0===i)return;const o=function(e,t,n,r){const{parent:i}=e;switch(i.kind){case 217:case 174:case 218:case 219:const n=gue(e,0,t,r);if(!n)return;const{argumentIndex:o,argumentCount:a,argumentsSpan:s}=n,c=dE(i)?r.getContextualTypeForObjectLiteralElement(i):r.getContextualType(i);return c&&{contextualType:c,argumentIndex:o,argumentCount:a,argumentsSpan:s};case 226:{const t=vue(i),n=r.getContextualType(t),o=21===e.kind?0:bue(i)-1,a=bue(t);return n&&{contextualType:n,argumentIndex:o,argumentCount:a,argumentsSpan:aQ(i)}}default:return}}(i,n,0,r);if(void 0===o)return;const{contextualType:a,argumentIndex:s,argumentCount:c,argumentsSpan:l}=o,u=a.getNonNullableType(),_=u.symbol;if(void 0===_)return;const d=we(u.getCallSignatures());var p;return void 0!==d?{isTypeParameterList:!1,invocation:{kind:2,signature:d,node:e,symbol:(p=_,"__type"===p.name&&g(p.declarations,(e=>{var t;return SE(e)?null==(t=lt(e.parent,p_))?void 0:t.symbol:void 0}))||p)},argumentsSpan:l,argumentIndex:s,argumentCount:c}:void 0}(e,0,n,r)||hue(e,t,n,r)}function vue(e){return uP(e.parent)?vue(e.parent):e}function bue(e){return uP(e.left)?bue(e.left)+1:2}function xue(e,t){const n=t.getTypeAtLocation(e.expression);if(t.isTupleType(n)){const{elementFlags:e,fixedLength:t}=n.target;if(0===t)return 0;const r=T(e,(e=>!(1&e)));return r<0?t:r}return 0}function Sue(e,t,n){return kue(e,t,n)}function kue(e,t,n){const r=t.getChildren();let i=0,o=!1;for(const t of r){if(n&&t===n)return o||28!==t.kind||i++,i;fP(t)?(i+=xue(t,e),o=!0):28===t.kind?o?o=!1:i++:(i++,o=!0)}return n?i:r.length&&28===De(r).kind?i+1:i}function Tue(e,t,n){const r=PD(e.template)?1:e.template.templateSpans.length+1;return 0!==t&&xn.assertLessThan(t,r),{isTypeParameterList:!1,invocation:{kind:0,node:e},argumentsSpan:Cue(e,n),argumentIndex:t,argumentCount:r}}function Cue(e,t){const n=e.template,r=n.getStart();let i=n.getEnd();return 228===n.kind&&0===De(n.templateSpans).literal.getFullWidth()&&(i=as(t.text,i,!1)),Gs(r,i-r)}function wue(e,t,n){const r=e.getChildren(n),i=r.indexOf(t);return xn.assert(i>=0&&r.length>i+1),r[i+1]}function Due(e){return 0===e.kind?mm(e.node):e.called}function Eue(e){return 0===e.kind?e.node:1===e.kind?e.called:e.node}o(due,{getArgumentInfoForCompletions:()=>mue,getSignatureHelpItems:()=>pue});var Pue=70246400;function Nue(e,t,{isTypeParameterList:n,argumentCount:r,argumentsSpan:i,invocation:o,argumentIndex:a},s,c,l){var _;const d=Eue(o),p=2===o.kind?o.symbol:c.getSymbolAtLocation(Due(o))||l&&(null==(_=t.declaration)?void 0:_.symbol),f=p?bY(c,p,l?s:void 0,void 0):u,m=O(e,(e=>function(e,t,n,r,i,o){return O((n?Oue:Mue)(e,r,i,o),(({isVariadic:n,parameters:o,prefix:a,suffix:s})=>{const c=[...t,...a],l=[...s,...Iue(e,i,r)],u=e.getDocumentationComment(r),_=e.getJsDocTags();return{isVariadic:n,prefixDisplayParts:c,suffixDisplayParts:l,separatorDisplayParts:Aue,parameters:o,documentation:u,tags:_}}))}(e,f,n,c,d,s)));0!==a&&xn.assertLessThan(a,r);let g=0,h=0;for(let n=0;n1)){let e=0;for(const t of i){if(t.isVariadic||t.parameters.length>=r){g=h+e;break}e++}}h+=i.length}xn.assert(-1!==g);const y={items:B(m,mt),applicableSpan:i,selectedItemIndex:g,argumentIndex:a,argumentCount:r},v=y.items[g];if(v.isVariadic){const e=T(v.parameters,(e=>!!e.isRest));-1Lue(e,n,r,i,a))),c=e.getDocumentationComment(n),l=e.getJsDocTags(n);return{isVariadic:!1,prefixDisplayParts:[...o,iY(30)],suffixDisplayParts:[iY(32)],separatorDisplayParts:Aue,parameters:s,documentation:c,tags:l}}var Aue=[iY(28),nY()];function Iue(e,t,n){return yY((r=>{r.writePunctuation(":"),r.writeSpace(" ");const i=n.getTypePredicateOfSignature(e);i?n.writeTypePredicate(i,t,void 0,r):n.writeType(n.getReturnTypeOfSignature(e),t,void 0,r)}))}function Oue(e,t,n,r){const i=(e.target||e).typeParameters,o=eq(),a=(i||u).map((e=>Lue(e,t,n,r,o))),s=e.thisParameter?[t.symbolToParameterDeclaration(e.thisParameter,n,Pue)]:[];return t.getExpandedParameters(e).map((e=>{const i=YC.createNodeArray([...s,...O(e,(e=>t.symbolToParameterDeclaration(e,n,Pue)))]),c=yY((e=>{o.writeList(2576,i,r,e)}));return{isVariadic:!1,parameters:a,prefix:[iY(30)],suffix:[iY(32),...c]}}))}function Mue(e,t,n,r){const i=eq(),o=yY((o=>{if(e.typeParameters&&e.typeParameters.length){const a=YC.createNodeArray(e.typeParameters.map((e=>t.typeParameterToDeclaration(e,n,Pue))));i.writeList(53776,a,r,o)}})),a=t.getExpandedParameters(e),s=t.hasEffectiveRestParameter(e)?1===a.length?e=>!0:e=>{var t;return!!(e.length&&32768&(null==(t=lt(e[e.length-1],td))?void 0:t.links.checkFlags))}:e=>!1;return a.map((e=>({isVariadic:s(e),parameters:e.map((e=>function(e,t,n,r,i){const o=yY((o=>{const a=t.symbolToParameterDeclaration(e,n,Pue);i.writeNode(4,a,r,o)})),a=t.isOptionalParameter(e.valueDeclaration),s=td(e)&&!!(32768&e.links.checkFlags);return{name:e.name,documentation:e.getDocumentationComment(t),displayParts:o,isOptional:a,isRest:s}}(e,t,n,r,i))),prefix:[...o,iY(21)],suffix:[iY(22)]})))}function Lue(e,t,n,r,i){const o=yY((o=>{const a=t.typeParameterToDeclaration(e,n,Pue);i.writeNode(4,a,r,o)}));return{name:e.symbol.name,documentation:e.symbol.getDocumentationComment(t),displayParts:o,isOptional:!1,isRest:!1}}var jue={};function Rue(e,t){var n,r;let i={textSpan:Xs(t.getFullStart(),t.getEnd())},o=t;e:for(;;){const i=zue(o);if(!i.length)break;for(let c=0;ce)break e;const d=Ee(bs(t.text,u.end));if(d&&2===d.kind&&s(d.pos,d.end),Bue(t,e,u)){if(a_(u)&&uu(o)&&!ix(u.getStart(t),u.getEnd(),t)&&a(u.getStart(t),u.getEnd()),DP(u)||CP(u)||ND(u)||AD(u)||l&&ND(l)||WP(u)&&EP(o)||IF(u)&&WP(o)||KP(u)&&IF(o)&&1===i.length||UN(u)||sF(u)||aF(u)){o=u;break}CP(o)&&_&&ql(_)&&a(u.getFullStart()-"${".length,_.getStart()+"}".length);const e=IF(u)&&Uue(l)&&Kue(_)&&!ix(l.getStart(),_.getStart(),t);let s=e?l.getEnd():u.getStart();const c=e?_.getStart():Wue(t,u);if(O_(u)&&(null==(n=u.jsDoc)?void 0:n.length)&&a(Te(u.jsDoc).getStart(),c),IF(u)){const e=u.getChildren()[0];e&&O_(e)&&(null==(r=e.jsDoc)?void 0:r.length)&&e.getStart()!==u.pos&&(s=Math.min(s,Te(e.jsDoc).getStart()))}a(s,c),(wD(u)||qu(u))&&a(s+1,c-1),o=u;break}if(c===i.length-1)break e}}return i;function a(t,n){if(t!==n){const r=Xs(t,n);(!i||!VQ(r,i.textSpan)&&Ws(r,e))&&(i={textSpan:r,...i&&{parent:i}})}}function s(e,n){a(e,n);let r=e;for(;47===t.text.charCodeAt(r);)r++;a(r,n)}}function Bue(e,t,n){return xn.assert(n.pos<=t),tRue});var Jue=_n(iN,rN);function zue(e){var t;if(qN(e))return $ue(e.getChildAt(0).getChildren(),Jue);if(BE(e)){const[t,...n]=e.getChildren(),r=xn.checkDefined(n.pop());xn.assertEqual(t.kind,19),xn.assertEqual(r.kind,20);const i=$ue(n,(t=>t===e.readonlyToken||148===t.kind||t===e.questionToken||58===t.kind));return[t,Vue(que($ue(i,(({kind:e})=>23===e||168===e||24===e)),(({kind:e})=>59===e))),r]}if(lE(e)){const n=$ue(e.getChildren(),(t=>t===e.name||D(e.modifiers,t))),r=320===(null==(t=n[0])?void 0:t.kind)?n[0]:void 0,i=que(r?n.slice(1):n,(({kind:e})=>59===e));return r?[r,Vue(i)]:i}if(sE(e)){const t=$ue(e.getChildren(),(t=>t===e.dotDotDotToken||t===e.name));return que($ue(t,(n=>n===t[0]||n===e.questionToken)),(({kind:e})=>64===e))}return KE(e)?que(e.getChildren(),(({kind:e})=>64===e)):e.getChildren()}function $ue(e,t){const n=[];let r;for(const i of e)t(i)?(r=r||[],r.push(i)):(r&&(n.push(Vue(r)),r=void 0),n.push(i));return r&&n.push(Vue(r)),n}function que(e,t,n=!0){if(e.length<2)return e;const r=T(e,t);if(-1===r)return e;const i=e.slice(0,r),o=e[r],a=De(e),s=n&&27===a.kind,c=e.slice(r+1,s?e.length-1:void 0),l=ce([i.length?Vue(i):void 0,o,c.length?Vue(c):void 0]);return s?l.concat(a):l}function Vue(e){return xn.assertGreaterThanOrEqual(e.length,1),FT(_I.createSyntaxList(e),e[0].pos,De(e).end)}function Uue(e){const t=e&&e.kind;return 19===t||23===t||21===t||286===t}function Kue(e){const t=e&&e.kind;return 20===t||24===t||22===t||287===t}function Wue(e,t){switch(t.kind){case 341:case 338:case 348:case 346:case 343:return e.getLineEndOfPosition(t.getStart());default:return t.getEnd()}}var Hue={};o(Hue,{getSymbolDisplayPartsDocumentationAndSymbolKind:()=>t_e,getSymbolKind:()=>Xue,getSymbolModifiers:()=>Zue});var Gue=70246400;function Xue(e,t,n){const r=Que(e,t,n);if(""!==r)return r;const i=gx(t);return 32&i?Y_(t,231)?"local class":"class":384&i?"enum":524288&i?"type":64&i?"interface":262144&i?"type parameter":8&i?"enum member":2097152&i?"alias":1536&i?"module":r}function Que(e,t,n){const r=e.getRootSymbols(t);if(1===r.length&&8192&Te(r).flags&&0!==e.getTypeOfSymbolAtLocation(t,n).getNonNullableType().getCallSignatures().length)return"method";if(e.isUndefinedSymbol(t))return"var";if(e.isArgumentsSymbol(t))return"local var";if(110===n.kind&&Xu(n)||bv(n))return"parameter";const i=gx(t);if(3&i)return YQ(t)?"parameter":t.valueDeclaration&&af(t.valueDeclaration)?"const":t.valueDeclaration&&of(t.valueDeclaration)?"using":t.valueDeclaration&&rf(t.valueDeclaration)?"await using":f(t.declarations,cf)?"let":n_e(t)?"local var":"var";if(16&i)return n_e(t)?"local function":"function";if(32768&i)return"getter";if(65536&i)return"setter";if(8192&i)return"method";if(16384&i)return"constructor";if(131072&i)return"index";if(4&i){if(33554432&i&&6&t.links.checkFlags){const r=f(e.getRootSymbols(t),(e=>{if(98311&e.getFlags())return"property"}));return r||(e.getTypeOfSymbolAtLocation(t,n).getCallSignatures().length?"method":"property")}return"property"}return""}function Yue(e){if(e.declarations&&e.declarations.length){const[t,...n]=e.declarations,r=KX(t,p(n)&&zZ(t)&&Q(n,(e=>!zZ(e)))?65536:0);if(r)return r.split(",")}return[]}function Zue(e,t){if(!t)return"";const n=new Set(Yue(t));if(2097152&t.flags){const r=e.getAliasedSymbol(t);r!==t&&f(Yue(r),(e=>{n.add(e)}))}return 16777216&t.flags&&n.add("optional"),n.size>0?$e(n.values()).join(","):""}function e_e(e,t,n,r,i,o,a,s){var c;const l=[];let _=[],d=[];const p=gx(t);let m=1&a?Que(e,t,i):"",h=!1;const y=110===i.kind&&Cm(i)||bv(i);let v,b,x=!1;if(110===i.kind&&!y)return{displayParts:[rY(110)],documentation:[],symbolKind:"primitive type",tags:void 0};if(""!==m||32&p||2097152&p){if("getter"===m||"setter"===m){const e=S(t.declarations,(e=>e.name===i));if(e)switch(e.kind){case 177:m="getter";break;case 178:m="setter";break;case 172:m="accessor";break;default:xn.assertNever(e)}else m="property"}let n,a;if(o??(o=y?e.getTypeAtLocation(i):e.getTypeOfSymbolAtLocation(t,i)),i.parent&&211===i.parent.kind){const e=i.parent.name;(e===i||e&&0===e.getFullWidth())&&(i=i.parent)}if($u(i)?a=i:(bG(i)||xG(i)||i.parent&&(D_(i.parent)||ZE(i.parent))&&cu(t.valueDeclaration))&&(a=i.parent),a){n=e.getResolvedSignature(a);const i=214===a.kind||QE(a)&&108===a.expression.kind,s=i?o.getConstructSignatures():o.getCallSignatures();if(!n||D(s,n.target)||D(s,n)||(n=s.length?s[0]:void 0),n){switch(i&&32&p?(m="constructor",P(o.symbol,m)):2097152&p?(m="alias",N(m),l.push(nY()),i&&(4&n.flags&&(l.push(rY(128)),l.push(nY())),l.push(rY(105)),l.push(nY())),E(t)):P(t,m),m){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":l.push(iY(59)),l.push(nY()),16&wx(o)||!o.symbol||(pe(l,bY(e,o.symbol,r,void 0,5)),l.push(hY())),i&&(4&n.flags&&(l.push(rY(128)),l.push(nY())),l.push(rY(105)),l.push(nY())),F(n,s,262144);break;default:F(n,s)}h=!0,x=s.length>1}}else if($G(i)&&!(98304&p)||137===i.kind&&176===i.parent.kind){const r=i.parent;if(t.declarations&&S(t.declarations,(e=>e===(137===i.kind?r.parent:r)))){const i=176===r.kind?o.getNonNullableType().getConstructSignatures():o.getNonNullableType().getCallSignatures();n=e.isImplementationOfOverload(r)?i[0]:e.getSignatureFromDeclaration(r),176===r.kind?(m="constructor",P(o.symbol,m)):P(179!==r.kind||2048&o.symbol.flags||4096&o.symbol.flags?t:o.symbol,m),n&&F(n,i),h=!0,x=i.length>1}}}if(32&p&&!h&&!y&&(C(),Y_(t,231)?N("local class"):l.push(rY(86)),l.push(nY()),E(t),A(t,n)),64&p&&2&a&&(T(),l.push(rY(120)),l.push(nY()),E(t),A(t,n)),524288&p&&2&a&&(T(),l.push(rY(156)),l.push(nY()),E(t),A(t,n),l.push(nY()),l.push(oY(64)),l.push(nY()),pe(l,vY(e,i.parent&&Dl(i.parent)?e.getTypeAtLocation(i.parent):e.getDeclaredTypeOfSymbol(t),r,8388608))),384&p&&(T(),Q(t.declarations,(e=>YP(e)&&tf(e)))&&(l.push(rY(87)),l.push(nY())),l.push(rY(94)),l.push(nY()),E(t)),1536&p&&!y){T();const e=Y_(t,267),n=e&&e.name&&80===e.name.kind;l.push(rY(n?145:144)),l.push(nY()),E(t)}if(262144&p&&2&a)if(T(),l.push(iY(21)),l.push(lY("type parameter")),l.push(iY(22)),l.push(nY()),E(t),t.parent)w(),E(t.parent,r),A(t.parent,r);else{const r=Y_(t,168);if(void 0===r)return xn.fail();const i=r.parent;if(i)if(cu(i)){w();const t=e.getSignatureFromDeclaration(i);180===i.kind?(l.push(rY(105)),l.push(nY())):179!==i.kind&&i.name&&E(i.symbol),pe(l,xY(e,t,n,32))}else QP(i)&&(w(),l.push(rY(156)),l.push(nY()),E(i.symbol),A(i.symbol,n))}if(8&p){m="enum member",P(t,"enum member");const n=null==(c=t.declarations)?void 0:c[0];if(306===(null==n?void 0:n.kind)){const t=e.getConstantValue(n);void 0!==t&&(l.push(nY()),l.push(oY(64)),l.push(nY()),l.push(tY(rp(t),"number"==typeof t?7:8)))}}if(2097152&t.flags){if(T(),!h||0===_.length&&0===d.length){const n=e.getAliasedSymbol(t);if(n!==t&&n.declarations&&n.declarations.length>0){const i=n.declarations[0],s=Pc(i);if(s&&!h){const c=cp(i)&&Bv(i,128),u="default"!==t.name&&!c,_=e_e(e,n,Sd(i),r,s,o,a,u?t:n);l.push(..._.displayParts),l.push(hY()),v=_.documentation,b=_.tags}else v=n.getContextualDocumentationComment(i,e),b=n.getJsDocTags(e)}}if(t.declarations)switch(t.declarations[0].kind){case 270:l.push(rY(95)),l.push(nY()),l.push(rY(145));break;case 277:l.push(rY(95)),l.push(nY()),l.push(rY(t.declarations[0].isExportEquals?64:90));break;case 281:l.push(rY(95));break;default:l.push(rY(102))}l.push(nY()),E(t),f(t.declarations,(t=>{if(271===t.kind){const n=t;if(Em(n))l.push(nY()),l.push(oY(64)),l.push(nY()),l.push(rY(149)),l.push(iY(21)),l.push(tY(Gd(Pm(n)),8)),l.push(iY(22));else{const t=e.getSymbolAtLocation(n.moduleReference);t&&(l.push(nY()),l.push(oY(64)),l.push(nY()),E(t,r))}return!0}}))}if(!h)if(""!==m){if(o)if(y?(T(),l.push(rY(110))):P(t,m),"property"===m||"accessor"===m||"getter"===m||"setter"===m||"JSX attribute"===m||3&p||"local var"===m||"index"===m||"using"===m||"await using"===m||y){if(l.push(iY(59)),l.push(nY()),o.symbol&&262144&o.symbol.flags&&"index"!==m){const t=yY((t=>{const n=e.typeParameterToDeclaration(o,r,Gue);k().writeNode(4,n,Sd(hc(r)),t)}));pe(l,t)}else pe(l,vY(e,o,r));if(td(t)&&t.links.target&&td(t.links.target)&&t.links.target.links.tupleLabelDeclaration){const e=t.links.target.links.tupleLabelDeclaration;xn.assertNode(e.name,qD),l.push(nY()),l.push(iY(21)),l.push(lY(bc(e.name))),l.push(iY(22))}}else if(16&p||8192&p||16384&p||131072&p||98304&p||"method"===m){const e=o.getNonNullableType().getCallSignatures();e.length&&(F(e[0],e),x=e.length>1)}}else m=Xue(e,t,i);if(0!==_.length||x||(_=t.getContextualDocumentationComment(r,e)),0===_.length&&4&p&&t.parent&&t.declarations&&f(t.parent.declarations,(e=>307===e.kind)))for(const n of t.declarations){if(!n.parent||226!==n.parent.kind)continue;const t=e.getSymbolAtLocation(n.parent.right);if(t&&(_=t.getDocumentationComment(e),d=t.getJsDocTags(e),_.length>0))break}if(0===_.length&&qD(i)&&t.valueDeclaration&&KE(t.valueDeclaration)){const n=t.valueDeclaration,r=n.parent,i=n.propertyName||n.name;if(qD(i)&&VE(r)){const t=Hh(i),n=e.getTypeAtLocation(r);_=g(n.isUnion()?n.types:[n],(n=>{const r=n.getProperty(t);return r?r.getDocumentationComment(e):void 0}))||u}}return 0!==d.length||x||(d=t.getContextualJsDocTags(r,e)),0===_.length&&v&&(_=v),0===d.length&&b&&(d=b),{displayParts:l,documentation:_,symbolKind:m,tags:0===d.length?void 0:d};function k(){return eq()}function T(){l.length&&l.push(hY()),C()}function C(){s&&(N("alias"),l.push(nY()))}function w(){l.push(nY()),l.push(rY(103)),l.push(nY())}function E(r,i){let o;s&&r===t&&(r=s),"index"===m&&(o=e.getIndexInfosOfIndexSymbol(r));let a=[];131072&r.flags&&o?(r.parent&&(a=bY(e,r.parent)),a.push(iY(23)),o.forEach(((t,n)=>{a.push(...vY(e,t.keyType)),n!==o.length-1&&(a.push(nY()),a.push(iY(52)),a.push(nY()))})),a.push(iY(24))):a=bY(e,r,i||n,void 0,7),pe(l,a),16777216&t.flags&&l.push(iY(58))}function P(e,t){T(),t&&(N(t),e&&!Q(e.declarations,(e=>rP(e)||(nP(e)||mP(e))&&!e.name))&&(l.push(nY()),E(e)))}function N(e){switch(e){case"var":case"function":case"let":case"const":case"constructor":case"using":case"await using":return void l.push(cY(e));default:return l.push(iY(21)),l.push(cY(e)),void l.push(iY(22))}}function F(t,n,i=0){pe(l,xY(e,t,r,32|i)),n.length>1&&(l.push(nY()),l.push(iY(21)),l.push(oY(40)),l.push(tY((n.length-1).toString(),7)),l.push(nY()),l.push(lY(2===n.length?"overload":"overloads")),l.push(iY(22))),_=t.getDocumentationComment(e),d=t.getJsDocTags(),n.length>1&&0===_.length&&0===d.length&&(_=n[0].getDocumentationComment(e),d=n[0].getJsDocTags().filter((e=>"deprecated"!==e.name)))}function A(t,n){const r=yY((r=>{const i=e.symbolToTypeParameterDeclarations(t,n,Gue);k().writeList(53776,i,Sd(hc(n)),r)}));pe(l,r)}}function t_e(e,t,n,r,i,o=yG(i),a){return e_e(e,t,n,r,i,void 0,o,a)}function n_e(e){return!e.parent&&f(e.declarations,(e=>{if(218===e.kind)return!0;if(260!==e.kind&&262!==e.kind)return!1;for(let t=e.parent;!zf(t);t=t.parent)if(307===t.kind||268===t.kind)return!1;return!0}))}var r_e={};function i_e(e){const t=e.__pos;return xn.assert("number"==typeof t),t}function o_e(e,t){xn.assert("number"==typeof t),e.__pos=t}function a_e(e){const t=e.__end;return xn.assert("number"==typeof t),t}function s_e(e,t){xn.assert("number"==typeof t),e.__end=t}o(r_e,{ChangeTracker:()=>v_e,LeadingTriviaOption:()=>c_e,TrailingTriviaOption:()=>l_e,applyChanges:()=>k_e,assignPositionsToNode:()=>w_e,createWriter:()=>E_e,deleteNode:()=>N_e,isThisTypeAnnotatable:()=>h_e,isValidLocationToAddComment:()=>P_e});var c_e=(e=>(e[e.Exclude=0]="Exclude",e[e.IncludeAll=1]="IncludeAll",e[e.JSDoc=2]="JSDoc",e[e.StartLine=3]="StartLine",e))(c_e||{}),l_e=(e=>(e[e.Exclude=0]="Exclude",e[e.ExcludeWhitespace=1]="ExcludeWhitespace",e[e.Include=2]="Include",e))(l_e||{});function u_e(e,t){return as(e,t,!1,!0)}var __e={leadingTriviaOption:0,trailingTriviaOption:0};function d_e(e,t,n,r){return{pos:p_e(e,t,r),end:m_e(e,n,r)}}function p_e(e,t,n,r=!1){var i,o;const{leadingTriviaOption:a}=n;if(0===a)return t.getStart(e);if(3===a){const n=t.getStart(e),r=GG(n,e);return YG(t,r)?r:n}if(2===a){const n=vf(t,e.text);if(null==n?void 0:n.length)return GG(n[0].pos,e)}const s=t.getFullStart(),c=t.getStart(e);if(s===c)return c;const l=GG(s,e);if(GG(c,e)===l)return 1===a?s:c;if(r){const t=(null==(i=vs(e.text,s))?void 0:i[0])||(null==(o=bs(e.text,s))?void 0:o[0]);if(t)return as(e.text,t.end,!0,!0)}const u=s>0?1:0;let _=wd(_v(e,l)+u,e);return _=u_e(e.text,_),wd(_v(e,_),e)}function f_e(e,t,n){const{end:r}=t,{trailingTriviaOption:i}=n;if(2===i){const n=bs(e.text,r);if(n){const r=_v(e,t.end);for(const t of n){if(2===t.kind||_v(e,t.pos)>r)break;if(_v(e,t.end)>r)return as(e.text,t.end,!0,!0)}}}}function m_e(e,t,n){var r;const{end:i}=t,{trailingTriviaOption:o}=n;if(0===o)return i;if(1===o){const t=Z(bs(e.text,i),vs(e.text,i));return(null==(r=null==t?void 0:t[t.length-1])?void 0:r.end)||i}const a=f_e(e,t,n);if(a)return a;const s=as(e.text,i,!0);return s===i||2!==o&&!Za(e.text.charCodeAt(s-1))?i:s}function g_e(e,t){return!!t&&!!e.parent&&(28===t.kind||27===t.kind&&210===e.parent.kind)}function h_e(e){return nP(e)||HP(e)}var y_e,v_e=class e{constructor(e,t){this.newLineCharacter=e,this.formatContext=t,this.changes=[],this.classesWithNodesInsertedAtStart=new Map,this.deletedNodes=[]}static fromContext(t){return new e(gY(t.host,t.formatContext.options),t.formatContext)}static with(t,n){const r=e.fromContext(t);return n(r),r.getChanges()}pushRaw(e,t){xn.assertEqual(e.fileName,t.fileName);for(const n of t.textChanges)this.changes.push({kind:3,sourceFile:e,text:n.newText,range:uQ(n.span)})}deleteRange(e,t){this.changes.push({kind:0,sourceFile:e,range:t})}delete(e,t){this.deletedNodes.push({sourceFile:e,node:t})}deleteNode(e,t,n={leadingTriviaOption:1}){this.deleteRange(e,d_e(e,t,t,n))}deleteNodes(e,t,n={leadingTriviaOption:1},r){for(const i of t){const t=p_e(e,i,n,r),o=m_e(e,i,n);this.deleteRange(e,{pos:t,end:o}),r=!!f_e(e,i,n)}}deleteModifier(e,t){this.deleteRange(e,{pos:t.getStart(e),end:as(e.text,t.end,!0)})}deleteNodeRange(e,t,n,r={leadingTriviaOption:1}){const i=p_e(e,t,r),o=m_e(e,n,r);this.deleteRange(e,{pos:i,end:o})}deleteNodeRangeExcludingEnd(e,t,n,r={leadingTriviaOption:1}){const i=p_e(e,t,r),o=void 0===n?e.text.length:p_e(e,n,r);this.deleteRange(e,{pos:i,end:o})}replaceRange(e,t,n,r={}){this.changes.push({kind:1,sourceFile:e,range:t,options:r,node:n})}replaceNode(e,t,n,r=__e){this.replaceRange(e,d_e(e,t,t,r),n,r)}replaceNodeRange(e,t,n,r,i=__e){this.replaceRange(e,d_e(e,t,n,i),r,i)}replaceRangeWithNodes(e,t,n,r={}){this.changes.push({kind:2,sourceFile:e,range:t,options:r,nodes:n})}replaceNodeWithNodes(e,t,n,r=__e){this.replaceRangeWithNodes(e,d_e(e,t,t,r),n,r)}replaceNodeWithText(e,t,n){this.replaceRangeWithText(e,d_e(e,t,t,__e),n)}replaceNodeRangeWithNodes(e,t,n,r,i=__e){this.replaceRangeWithNodes(e,d_e(e,t,n,i),r,i)}nodeHasTrailingComment(e,t,n=__e){return!!f_e(e,t,n)}nextCommaToken(e,t){const n=DX(t,t.parent,e);return n&&28===n.kind?n:void 0}replacePropertyAssignment(e,t,n){const r=this.nextCommaToken(e,t)?"":","+this.newLineCharacter;this.replaceNode(e,t,n,{suffix:r})}insertNodeAt(e,t,n,r={}){this.replaceRange(e,qb(t),n,r)}insertNodesAt(e,t,n,r={}){this.replaceRangeWithNodes(e,qb(t),n,r)}insertNodeAtTopOfFile(e,t,n){this.insertAtTopOfFile(e,t,n)}insertNodesAtTopOfFile(e,t,n){this.insertAtTopOfFile(e,t,n)}insertAtTopOfFile(e,t,n){const r=function(e){let t;for(const n of e.statements){if(!pf(n))break;t=n}let n=0;const r=e.text;if(t)return n=t.end,c(),n;const i=xs(r);void 0!==i&&(n=i.length,c());const o=vs(r,n);if(!o)return n;let a,s;for(const t of o){if(3===t.kind){if($d(r,t.pos)){a={range:t,pinnedOrTripleSlash:!0};continue}}else if(zd(r,t.pos,t.end)){a={range:t,pinnedOrTripleSlash:!0};continue}if(a){if(a.pinnedOrTripleSlash)break;if(e.getLineAndCharacterOfPosition(t.pos).line>=e.getLineAndCharacterOfPosition(a.range.end).line+2)break}if(e.statements.length&&(void 0===s&&(s=e.getLineAndCharacterOfPosition(e.statements[0].getStart()).line),sst(e.comment)?YC.createJSDocText(e.comment):e.comment)),r=Ee(t.jsDoc);return r&&ix(r.pos,r.end,e)&&0===p(n)?void 0:YC.createNodeArray(b(n,YC.createJSDocText("\n")))}replaceJSDocComment(e,t,n){this.insertJsdocCommentBefore(e,function(e){if(219!==e.kind)return e;const t=172===e.parent.kind?e.parent:e.parent.parent;return t.jsDoc=e.jsDoc,t}(t),YC.createJSDocComment(this.createJSDocText(e,t),YC.createNodeArray(n)))}addJSDocTags(e,t,n){const r=B(t.jsDoc,(e=>e.tags)),i=n.filter((e=>!r.some(((t,n)=>{const i=function(e,t){if(e.kind===t.kind)switch(e.kind){case 341:{const n=e,r=t;return qD(n.name)&&qD(r.name)&&n.name.escapedText===r.name.escapedText?YC.createJSDocParameterTag(void 0,r.name,!1,r.typeExpression,r.isNameFirst,n.comment):void 0}case 342:return YC.createJSDocReturnTag(void 0,t.typeExpression,e.comment);case 344:return YC.createJSDocTypeTag(void 0,t.typeExpression,e.comment)}}(t,e);return i&&(r[n]=i),!!i}))));this.replaceJSDocComment(e,t,[...r,...i])}filterJSDocTags(e,t,n){this.replaceJSDocComment(e,t,F(B(t.jsDoc,(e=>e.tags)),n))}replaceRangeWithText(e,t,n){this.changes.push({kind:3,sourceFile:e,range:t,text:n})}insertText(e,t,n){this.replaceRangeWithText(e,qb(t),n)}tryInsertTypeAnnotation(e,t,n){let r;if(cu(t)){if(r=uX(t,22,e),!r){if(!rP(t))return!1;r=Te(t.parameters)}}else r=(260===t.kind?t.exclamationToken:t.questionToken)??t.name;return this.insertNodeAt(e,r.end,n,{prefix:": "}),!0}tryInsertThisTypeAnnotation(e,t,n){const r=uX(t,21,e).getStart(e)+1,i=t.parameters.length?", ":"";this.insertNodeAt(e,r,n,{prefix:"this: ",suffix:i})}insertTypeParameters(e,t,n){const r=(uX(t,21,e)||Te(t.parameters)).getStart(e);this.insertNodesAt(e,r,n,{prefix:"<",suffix:">",joiner:", "})}getOptionsForInsertNodeBefore(e,t,n){return b_(e)||mu(e)?{suffix:n?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:KP(e)?{suffix:", "}:sE(e)?sE(t)?{suffix:", "}:{}:wD(e)&&iN(e.parent)||pN(e)?{suffix:", "}:fN(e)?{suffix:","+(n?this.newLineCharacter:" ")}:xn.failBadSyntaxKind(e)}insertNodeAtConstructorStart(e,t,n){const r=Se(t.body.statements);r&&t.body.multiLine?this.insertNodeBefore(e,r,n):this.replaceConstructorBody(e,t,[n,...t.body.statements])}insertNodeAtConstructorStartAfterSuperCall(e,t,n){const r=S(t.body.statements,(e=>NP(e)&&lf(e.expression)));r&&t.body.multiLine?this.insertNodeAfter(e,r,n):this.replaceConstructorBody(e,t,[...t.body.statements,n])}insertNodeAtConstructorEnd(e,t,n){const r=we(t.body.statements);r&&t.body.multiLine?this.insertNodeAfter(e,r,n):this.replaceConstructorBody(e,t,[...t.body.statements,n])}replaceConstructorBody(e,t,n){this.replaceNode(e,t.body,YC.createBlock(n,!0))}insertNodeAtEndOfScope(e,t,n){const r=p_e(e,t.getLastToken(),{});this.insertNodeAt(e,r,n,{prefix:Za(e.text.charCodeAt(t.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})}insertMemberAtStart(e,t,n){this.insertNodeAtStartWorker(e,t,n)}insertNodeAtObjectStart(e,t,n){this.insertNodeAtStartWorker(e,t,n)}insertNodeAtStartWorker(e,t,n){const r=this.guessIndentationFromExistingMembers(e,t)??this.computeIndentationForNewMember(e,t);this.insertNodeAt(e,S_e(t).pos,n,this.getInsertNodeAtStartInsertOptions(e,t,r))}guessIndentationFromExistingMembers(e,t){let n,r=t;for(const i of S_e(t)){if(Qb(r,i,e))return;const t=i.getStart(e),o=A_e.SmartIndenter.findFirstNonWhitespaceColumn(GG(t,e),t,e,this.formatContext.options);if(void 0===n)n=o;else if(o!==n)return;r=i}return n}computeIndentationForNewMember(e,t){const n=t.getStart(e);return A_e.SmartIndenter.findFirstNonWhitespaceColumn(GG(n,e),n,e,this.formatContext.options)+(this.formatContext.options.indentSize??4)}getInsertNodeAtStartInsertOptions(e,t,n){const r=0===S_e(t).length,i=Fx(this.classesWithNodesInsertedAtStart,IB(t),{node:t,sourceFile:e}),o=HE(t)&&(!ef(e)||!r);return{indentation:n,prefix:(HE(t)&&ef(e)&&r&&!i?",":"")+this.newLineCharacter,suffix:o?",":XP(t)&&r?";":""}}insertNodeAfterComma(e,t,n){const r=this.insertNodeAfterWorker(e,this.nextCommaToken(e,t)||t,n);this.insertNodeAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAfter(e,t,n){const r=this.insertNodeAfterWorker(e,t,n);this.insertNodeAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAtEndOfList(e,t,n){this.insertNodeAt(e,t.end,n,{prefix:", "})}insertNodesAfter(e,t,n){const r=this.insertNodeAfterWorker(e,t,Te(n));this.insertNodesAt(e,r,n,this.getInsertNodeAfterOptions(e,t))}insertNodeAfterWorker(e,t,n){var r,i;return i=n,((lE(r=t)||uE(r))&&Tu(i)&&167===i.name.kind||v_(r)&&v_(i))&&59!==e.text.charCodeAt(t.end-1)&&this.replaceRange(e,qb(t.end),YC.createToken(27)),m_e(e,t,{})}getInsertNodeAfterOptions(e,t){const n=this.getInsertNodeAfterOptionsWorker(t);return{...n,prefix:t.end===e.end&&b_(t)?n.prefix?`\n${n.prefix}`:"\n":n.prefix}}getInsertNodeAfterOptionsWorker(e){switch(e.kind){case 263:case 267:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 260:case 11:case 80:return{prefix:", "};case 303:return{suffix:","+this.newLineCharacter};case 95:return{prefix:" "};case 169:return{};default:return xn.assert(b_(e)||Tu(e)),{suffix:this.newLineCharacter}}}insertName(e,t,n){if(xn.assert(!t.name),219===t.kind){const r=uX(t,39,e),i=uX(t,21,e);i?(this.insertNodesAt(e,i.getStart(e),[YC.createToken(100),YC.createIdentifier(n)],{joiner:" "}),N_e(this,e,r)):(this.insertText(e,Te(t.parameters).getStart(e),`function ${n}(`),this.replaceRange(e,r,YC.createToken(22))),241!==t.body.kind&&(this.insertNodesAt(e,t.body.getStart(e),[YC.createToken(19),YC.createToken(107)],{joiner:" ",suffix:" "}),this.insertNodesAt(e,t.body.end,[YC.createToken(27),YC.createToken(20)],{joiner:" "}))}else{const r=uX(t,218===t.kind?100:86,e).end;this.insertNodeAt(e,r,YC.createIdentifier(n),{prefix:" "})}}insertExportModifier(e,t){this.insertText(e,t.getStart(e),"export ")}insertImportSpecifierAtIndex(e,t,n,r){const i=n.elements[r-1];i?this.insertNodeInListAfter(e,i,t):this.insertNodeBefore(e,n.elements[0],t,!ix(n.elements[0].getStart(),n.parent.parent.getStart(),e))}insertNodeInListAfter(e,t,n,r=A_e.SmartIndenter.getContainingList(t,e)){if(!r)return void xn.fail("node is not a list element");const i=Qd(r,t);if(i<0)return;const o=t.getEnd();if(i!==r.length-1){const o=kX(e,t.end);if(o&&g_e(t,o)){const t=r[i+1],a=u_e(e.text,t.getFullStart()),s=`${Ra(o.kind)}${e.text.substring(o.end,a)}`;this.insertNodesAt(e,a,[n],{suffix:s})}}else{const a=t.getStart(e),s=GG(a,e);let c,l=!1;if(1===r.length)c=28;else{const n=EX(t.pos,e);c=g_e(t,n)?n.kind:28,l=GG(r[i-1].getStart(e),e)!==s}if(!function(e,t){let n=t;for(;n{const[n,r]=function(e,t){const n=uX(e,19,t),r=uX(e,20,t);return[null==n?void 0:n.end,null==r?void 0:r.end]}(e,t);if(void 0!==n&&void 0!==r){const i=0===S_e(e).length,o=ix(n,r,t);i&&o&&n!==r-1&&this.deleteRange(t,qb(n,r-1)),o&&this.insertText(t,r-1,this.newLineCharacter)}}))}finishDeleteDeclarations(){const e=new Set;for(const{sourceFile:t,node:n}of this.deletedNodes)this.deletedNodes.some((e=>e.sourceFile===t&&QG(e.node,n)))||(ot(n)?this.deleteRange(t,hT(t,n)):T_e.deleteDeclaration(this,e,t,n));e.forEach((t=>{const n=t.getSourceFile(),r=A_e.SmartIndenter.getContainingList(t,n);if(t!==De(r))return;const i=C(r,(t=>!e.has(t)),r.length-2);-1!==i&&this.deleteRange(n,{pos:r[i].end,end:b_e(n,r[i+1])})}))}getChanges(e){this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();const t=y_e.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,e);return this.newFileChanges&&this.newFileChanges.forEach(((e,n)=>{t.push(y_e.newFileChanges(n,e,this.newLineCharacter,this.formatContext))})),t}createNewFile(e,t,n){this.insertStatementsInNewFile(t,n,e)}};function b_e(e,t){return as(e.text,p_e(e,t,{leadingTriviaOption:1}),!1,!0)}function x_e(e,t,n,r){const i=b_e(e,r);if(void 0===n||ix(m_e(e,t,{}),i,e))return i;const o=EX(r.getStart(e),e);if(g_e(t,o)){const r=EX(t.getStart(e),e);if(g_e(n,r)){const t=as(e.text,o.getEnd(),!0,!0);if(ix(r.getStart(e),o.getStart(e),e))return Za(e.text.charCodeAt(t-1))?t-1:t;if(Za(e.text.charCodeAt(t)))return t}}return i}function S_e(e){return HE(e)?e.properties:e.members}function k_e(e,t){for(let n=t.length-1;n>=0;n--){const{span:r,newText:i}=t[n];e=`${e.substring(0,r.start)}${i}${e.substring(js(r))}`}return e}(e=>{function t(e,t,r,i){const o=R(t,(e=>e.statements.map((t=>4===t?"":n(t,e.oldFile,r).text)))).join(r),a=JI("any file name",o,{languageVersion:99,jsDocParsingMode:1},!0,e);return k_e(o,A_e.formatDocument(a,i))+r}function n(e,t,n){const r=E_e(n);return rq({newLine:qZ(n),neverAsciiEscape:!0,preserveSourceNewlines:!0,terminateUnterminatedLiterals:!0},r).writeNode(4,e,t,r),{text:r.getText(),node:w_e(e)}}e.getTextChangesFromChanges=function(e,t,r,i){return q(He(e,(e=>e.sourceFile.path)),(e=>{const o=e[0].sourceFile,a=ve(e,((e,t)=>e.range.pos-t.range.pos||e.range.end-t.range.end));for(let e=0;e`${JSON.stringify(a[e].range)} and ${JSON.stringify(a[e+1].range)}`));const s=q(a,(e=>{const a=lQ(e.range),s=1===e.kind?Sd(fc(e.node))??e.sourceFile:2===e.kind?Sd(fc(e.nodes[0]))??e.sourceFile:e.sourceFile,c=function(e,t,r,i,o,a){var s;if(0===e.kind)return"";if(3===e.kind)return e.text;const{options:c={},range:{pos:l}}=e,u=e=>function(e,t,r,i,{indentation:o,prefix:a,delta:s},c,l,u){const{node:_,text:d}=n(e,t,c);u&&u(_,d);const p=UZ(l,t),f=void 0!==o?o:A_e.SmartIndenter.getIndentation(i,r,p,a===c||GG(i,t)===i);void 0===s&&(s=A_e.SmartIndenter.shouldIndentChildNode(p,e)&&p.indentSize||0);const m={text:d,getLineAndCharacterOfPosition(e){return Xa(this,e)}};return k_e(d,A_e.formatNodeGivenIndentation(_,m,t.languageVariant,f,s,{...l,options:p}))}(e,t,r,l,c,i,o,a),_=2===e.kind?e.nodes.map((e=>Ht(u(e),i))).join((null==(s=e.options)?void 0:s.joiner)||i):u(e.node),d=void 0!==c.indentation||GG(l,t)===l?_:_.replace(/^\s+/,"");return(c.prefix||"")+d+(!c.suffix||Wt(d,c.suffix)?"":c.suffix)}(e,s,o,t,r,i);if(a.length!==c.length||!jZ(s.text,c,a.start))return dQ(a,c)}));return s.length>0?{fileName:o.fileName,textChanges:s}:void 0}))},e.newFileChanges=function(e,n,r,i){const o=t(Pk(e),n,r,i);return{fileName:e,textChanges:[dQ(Gs(0,0),o)],isNewFile:!0}},e.newFileChangesWorker=t,e.getNonformattedText=n})(y_e||(y_e={}));var T_e,C_e={...C$,factory:JC(1|C$.factory.flags,C$.factory.baseFactory)};function w_e(e){const t=ZB(e,w_e,C_e,D_e,w_e),n=ly(t)?t:Object.create(t);return FT(n,i_e(e),a_e(e)),n}function D_e(e,t,n,r,i){const o=VB(e,t,n,r,i);if(!o)return o;xn.assert(e);const a=o===e?YC.createNodeArray(o.slice(0)):o;return FT(a,i_e(e),a_e(e)),a}function E_e(e){let t=0;const n=Vy(e);function r(e,r){if(r||!function(e){return as(e,0)===e.length}(e)){t=n.getTextPos();let r=0;for(;Qa(e.charCodeAt(e.length-r-1));)r++;t-=r}}return{onBeforeEmitNode:e=>{e&&o_e(e,t)},onAfterEmitNode:e=>{e&&s_e(e,t)},onBeforeEmitNodeArray:e=>{e&&o_e(e,t)},onAfterEmitNodeArray:e=>{e&&s_e(e,t)},onBeforeEmitToken:e=>{e&&o_e(e,t)},onAfterEmitToken:e=>{e&&s_e(e,t)},write:function(e){n.write(e),r(e,!1)},writeComment:function(e){n.writeComment(e)},writeKeyword:function(e){n.writeKeyword(e),r(e,!1)},writeOperator:function(e){n.writeOperator(e),r(e,!1)},writePunctuation:function(e){n.writePunctuation(e),r(e,!1)},writeTrailingSemicolon:function(e){n.writeTrailingSemicolon(e),r(e,!1)},writeParameter:function(e){n.writeParameter(e),r(e,!1)},writeProperty:function(e){n.writeProperty(e),r(e,!1)},writeSpace:function(e){n.writeSpace(e),r(e,!1)},writeStringLiteral:function(e){n.writeStringLiteral(e),r(e,!1)},writeSymbol:function(e,t){n.writeSymbol(e,t),r(e,!1)},writeLine:function(e){n.writeLine(e)},increaseIndent:function(){n.increaseIndent()},decreaseIndent:function(){n.decreaseIndent()},getText:function(){return n.getText()},rawWrite:function(e){n.rawWrite(e),r(e,!1)},writeLiteral:function(e){n.writeLiteral(e),r(e,!0)},getTextPos:function(){return n.getTextPos()},getLine:function(){return n.getLine()},getColumn:function(){return n.getColumn()},getIndent:function(){return n.getIndent()},isAtStartOfLine:function(){return n.isAtStartOfLine()},hasTrailingComment:()=>n.hasTrailingComment(),hasTrailingWhitespace:()=>n.hasTrailingWhitespace(),clear:function(){n.clear(),t=0}}}function P_e(e,t){return!(qX(e,t)||AX(e,t)||MX(e,t)||LX(e,t))}function N_e(e,t,n,r={leadingTriviaOption:1}){const i=p_e(t,n,r),o=m_e(t,n,r);e.deleteRange(t,{pos:i,end:o})}function F_e(e,t,n,r){const i=xn.checkDefined(A_e.SmartIndenter.getContainingList(r,n)),o=Qd(i,r);xn.assert(-1!==o),1!==i.length?(xn.assert(!t.has(r),"Deleting a node twice"),t.add(r),e.deleteRange(n,{pos:b_e(n,r),end:o===i.length-1?m_e(n,r,{}):x_e(n,r,i[o-1],i[o+1])})):N_e(e,n,r)}(e=>{function t(e,t,n){if(n.parent.name){const r=xn.checkDefined(kX(t,n.pos-1));e.deleteRange(t,{pos:r.getStart(t),end:n.end})}else N_e(e,t,Eh(n,272))}e.deleteDeclaration=function(e,n,r,i){switch(i.kind){case 169:{const t=i.parent;rP(t)&&1===t.parameters.length&&!uX(t,21,r)?e.replaceNodeWithText(r,i,"()"):F_e(e,n,r,i);break}case 272:case 271:N_e(e,r,i,{leadingTriviaOption:r.imports.length&&i===Te(r.imports).parent||i===S(r.statements,kp)?0:O_(i)?2:3});break;case 208:const o=i.parent;207===o.kind&&i!==De(o.elements)?N_e(e,r,i):F_e(e,n,r,i);break;case 260:!function(e,t,n,r){const{parent:i}=r;if(299===i.kind)return void e.deleteNodeRange(n,uX(i,21,n),uX(i,22,n));if(1!==i.declarations.length)return void F_e(e,t,n,r);const o=i.parent;switch(o.kind){case 250:case 249:e.replaceNode(n,r,YC.createObjectLiteralExpression());break;case 248:N_e(e,n,i);break;case 243:N_e(e,n,o,{leadingTriviaOption:O_(o)?2:3});break;default:xn.assertNever(o)}}(e,n,r,i);break;case 168:F_e(e,n,r,i);break;case 276:const a=i.parent;1===a.elements.length?t(e,r,a):F_e(e,n,r,i);break;case 274:t(e,r,i);break;case 27:N_e(e,r,i,{trailingTriviaOption:0});break;case 100:N_e(e,r,i,{leadingTriviaOption:0});break;case 263:case 262:N_e(e,r,i,{leadingTriviaOption:O_(i)?2:3});break;default:i.parent?oN(i.parent)&&i.parent.name===i?function(e,t,n){if(n.namedBindings){const r=n.name.getStart(t),i=kX(t,n.name.end);if(i&&28===i.kind){const n=as(t.text,i.end,!1,!0);e.deleteRange(t,{pos:r,end:n})}else N_e(e,t,n.name)}else N_e(e,t,n.parent)}(e,r,i.parent):QE(i.parent)&&D(i.parent.arguments,i)?F_e(e,n,r,i):N_e(e,r,i):N_e(e,r,i)}}})(T_e||(T_e={}));var A_e={};o(A_e,{FormattingContext:()=>O_e,FormattingRequestKind:()=>I_e,RuleAction:()=>J_e,RuleFlags:()=>z_e,SmartIndenter:()=>lpe,anyContext:()=>B_e,createTextRangeWithKind:()=>ppe,formatDocument:()=>ype,formatNodeGivenIndentation:()=>kpe,formatOnClosingCurly:()=>hpe,formatOnEnter:()=>fpe,formatOnOpeningCurly:()=>gpe,formatOnSemicolon:()=>mpe,formatSelection:()=>vpe,getAllRules:()=>$_e,getFormatContext:()=>npe,getFormattingScanner:()=>j_e,getIndentationString:()=>Epe,getRangeOfEnclosingComment:()=>Dpe});var I_e=(e=>(e[e.FormatDocument=0]="FormatDocument",e[e.FormatSelection=1]="FormatSelection",e[e.FormatOnEnter=2]="FormatOnEnter",e[e.FormatOnSemicolon=3]="FormatOnSemicolon",e[e.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",e[e.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace",e))(I_e||{}),O_e=class{constructor(e,t,n){this.sourceFile=e,this.formattingRequestKind=t,this.options=n}updateContext(e,t,n,r,i){this.currentTokenSpan=xn.checkDefined(e),this.currentTokenParent=xn.checkDefined(t),this.nextTokenSpan=xn.checkDefined(n),this.nextTokenParent=xn.checkDefined(r),this.contextNode=xn.checkDefined(i),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0}ContextNodeAllOnSameLine(){return void 0===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine}NextNodeAllOnSameLine(){return void 0===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine}TokensAreOnSameLine(){if(void 0===this.tokensAreOnSameLine){const e=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,t=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=e===t}return this.tokensAreOnSameLine}ContextNodeBlockIsOnOneLine(){return void 0===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine}NextNodeBlockIsOnOneLine(){return void 0===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine}NodeIsOnOneLine(e){return this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line===this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line}BlockIsOnOneLine(e){const t=uX(e,19,this.sourceFile),n=uX(e,20,this.sourceFile);return!(!t||!n)&&this.sourceFile.getLineAndCharacterOfPosition(t.getEnd()).line===this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line}},M_e=Cs(99,!1,0),L_e=Cs(99,!1,1);function j_e(e,t,n,r,i){const o=1===t?L_e:M_e;o.setText(e),o.resetTokenState(n);let a,s,c,l,u,_=!0;const d=i({advance:function(){u=void 0,o.getTokenFullStart()!==n?_=!!s&&4===De(s).kind:o.scan(),a=void 0,s=void 0;let e=o.getTokenFullStart();for(;ea,lastTrailingTriviaWasNewLine:()=>_,skipToEndOf:function(e){o.resetTokenState(e.end),c=o.getTokenFullStart(),l=void 0,u=void 0,_=!1,a=void 0,s=void 0},skipToStartOf:function(e){o.resetTokenState(e.pos),c=o.getTokenFullStart(),l=void 0,u=void 0,_=!1,a=void 0,s=void 0},getTokenFullStart:()=>(null==u?void 0:u.token.pos)??o.getTokenStart(),getStartPos:()=>(null==u?void 0:u.token.pos)??o.getTokenStart()});return u=void 0,o.setText(void 0),d;function p(){const e=u?u.token.kind:o.getToken();return 1!==e&&!Rh(e)}function f(){return 1===(u?u.token.kind:o.getToken())}function m(e,t){return Ll(t)&&e.token.kind!==t.kind&&(e.token.kind=t.kind),e}}var R_e,B_e=u,J_e=(e=>(e[e.None=0]="None",e[e.StopProcessingSpaceActions=1]="StopProcessingSpaceActions",e[e.StopProcessingTokenActions=2]="StopProcessingTokenActions",e[e.InsertSpace=4]="InsertSpace",e[e.InsertNewLine=8]="InsertNewLine",e[e.DeleteSpace=16]="DeleteSpace",e[e.DeleteToken=32]="DeleteToken",e[e.InsertTrailingSemicolon=64]="InsertTrailingSemicolon",e[e.StopAction=3]="StopAction",e[e.ModifySpaceAction=28]="ModifySpaceAction",e[e.ModifyTokenAction=96]="ModifyTokenAction",e))(J_e||{}),z_e=(e=>(e[e.None=0]="None",e[e.CanDeleteNewLines=1]="CanDeleteNewLines",e))(z_e||{});function $_e(){const e=[];for(let t=0;t<=165;t++)1!==t&&e.push(t);function t(...t){return{tokens:e.filter((e=>!t.some((t=>t===e)))),isSpecific:!1}}const n={tokens:e,isSpecific:!1},r=V_e([...e,3]),i=V_e([...e,1]),o=K_e(83,165),a=K_e(30,79),s=[103,104,165,130,142,152],c=[80,...pQ],l=r,u=V_e([80,32,3,86,95,102]),_=V_e([22,3,92,113,98,93,85]);return[q_e("IgnoreBeforeComment",n,[2,3],B_e,1),q_e("IgnoreAfterLineComment",2,n,B_e,1),q_e("NotSpaceBeforeColon",n,59,[Ede,nde,rde],16),q_e("SpaceAfterColon",59,n,[Ede,nde,Ode],4),q_e("NoSpaceBeforeQuestionMark",n,58,[Ede,nde,rde],16),q_e("SpaceAfterQuestionMarkInConditionalOperator",58,n,[Ede,ade],4),q_e("NoSpaceAfterQuestionMark",58,n,[Ede,ode],16),q_e("NoSpaceBeforeDot",n,[25,29],[Ede,tpe],16),q_e("NoSpaceAfterDot",[25,29],n,[Ede],16),q_e("NoSpaceBetweenImportParenInImportType",102,21,[Ede,Dde],16),q_e("NoSpaceAfterUnaryPrefixOperator",[46,47,55,54],[9,10,80,21,23,19,110,105],[Ede,nde],16),q_e("NoSpaceAfterUnaryPreincrementOperator",46,[80,21,110,105],[Ede],16),q_e("NoSpaceAfterUnaryPredecrementOperator",47,[80,21,110,105],[Ede],16),q_e("NoSpaceBeforeUnaryPostincrementOperator",[80,22,24,105],46,[Ede,Yde],16),q_e("NoSpaceBeforeUnaryPostdecrementOperator",[80,22,24,105],47,[Ede,Yde],16),q_e("SpaceAfterPostincrementWhenFollowedByAdd",46,40,[Ede,tde],4),q_e("SpaceAfterAddWhenFollowedByUnaryPlus",40,40,[Ede,tde],4),q_e("SpaceAfterAddWhenFollowedByPreincrement",40,46,[Ede,tde],4),q_e("SpaceAfterPostdecrementWhenFollowedBySubtract",47,41,[Ede,tde],4),q_e("SpaceAfterSubtractWhenFollowedByUnaryMinus",41,41,[Ede,tde],4),q_e("SpaceAfterSubtractWhenFollowedByPredecrement",41,47,[Ede,tde],4),q_e("NoSpaceAfterCloseBrace",20,[28,27],[Ede],16),q_e("NewLineBeforeCloseBraceInBlockContext",r,20,[ude],8),q_e("SpaceAfterCloseBrace",20,t(22),[Ede,vde],4),q_e("SpaceBetweenCloseBraceAndElse",20,93,[Ede],4),q_e("SpaceBetweenCloseBraceAndWhile",20,117,[Ede],4),q_e("NoSpaceBetweenEmptyBraceBrackets",19,20,[Ede,xde],16),q_e("SpaceAfterConditionalClosingParen",22,23,[bde],4),q_e("NoSpaceBetweenFunctionKeywordAndStar",100,42,[gde],16),q_e("SpaceAfterStarInGeneratorDeclaration",42,80,[gde],4),q_e("SpaceAfterFunctionInFuncDecl",100,n,[fde],4),q_e("NewLineAfterOpenBraceInBlockContext",19,n,[ude],8),q_e("SpaceAfterGetSetInMember",[139,153],80,[fde],4),q_e("NoSpaceBetweenYieldKeywordAndStar",127,42,[Ede,Xde],16),q_e("SpaceBetweenYieldOrYieldStarAndOperand",[127,42],n,[Ede,Xde],4),q_e("NoSpaceBetweenReturnAndSemicolon",107,27,[Ede],16),q_e("SpaceAfterCertainKeywords",[115,111,105,91,107,114,135],n,[Ede],4),q_e("SpaceAfterLetConstInVariableDeclaration",[121,87],n,[Ede,Jde],4),q_e("NoSpaceBeforeOpenParenInFuncCall",n,21,[Ede,Sde,kde],16),q_e("SpaceBeforeBinaryKeywordOperator",n,s,[Ede,tde],4),q_e("SpaceAfterBinaryKeywordOperator",s,n,[Ede,tde],4),q_e("SpaceAfterVoidOperator",116,n,[Ede,Gde],4),q_e("SpaceBetweenAsyncAndOpenParen",134,21,[wde,Ede],4),q_e("SpaceBetweenAsyncAndFunctionKeyword",134,[100,80],[Ede],4),q_e("NoSpaceBetweenTagAndTemplateString",[80,22],[15,16],[Ede],16),q_e("SpaceBeforeJsxAttribute",n,80,[Ade,Ede],4),q_e("SpaceBeforeSlashInJsxOpeningElement",n,44,[Lde,Ede],4),q_e("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement",44,32,[Lde,Ede],16),q_e("NoSpaceBeforeEqualInJsxAttribute",n,64,[Ide,Ede],16),q_e("NoSpaceAfterEqualInJsxAttribute",64,n,[Ide,Ede],16),q_e("NoSpaceBeforeJsxNamespaceColon",80,59,[Mde],16),q_e("NoSpaceAfterJsxNamespaceColon",59,80,[Mde],16),q_e("NoSpaceAfterModuleImport",[144,149],21,[Ede],16),q_e("SpaceAfterCertainTypeScriptKeywords",[128,129,86,138,90,94,95,96,139,119,102,120,144,145,123,125,124,148,153,126,156,161,143,140],n,[Ede],4),q_e("SpaceBeforeCertainTypeScriptKeywords",n,[96,119,161],[Ede],4),q_e("SpaceAfterModuleName",11,19,[$de],4),q_e("SpaceBeforeArrow",n,39,[Ede],4),q_e("SpaceAfterArrow",39,n,[Ede],4),q_e("NoSpaceAfterEllipsis",26,80,[Ede],16),q_e("NoSpaceAfterOptionalParameters",58,[22,28],[Ede,nde],16),q_e("NoSpaceBetweenEmptyInterfaceBraceBrackets",19,20,[Ede,qde],16),q_e("NoSpaceBeforeOpenAngularBracket",c,30,[Ede,Kde],16),q_e("NoSpaceBetweenCloseParenAndAngularBracket",22,30,[Ede,Kde],16),q_e("NoSpaceAfterOpenAngularBracket",30,n,[Ede,Kde],16),q_e("NoSpaceBeforeCloseAngularBracket",n,32,[Ede,Kde],16),q_e("NoSpaceAfterCloseAngularBracket",32,[21,23,32,28],[Ede,Kde,mde,Hde],16),q_e("SpaceBeforeAt",[22,80],60,[Ede],4),q_e("NoSpaceAfterAt",60,n,[Ede],16),q_e("SpaceAfterDecorator",n,[128,80,95,90,86,126,125,123,124,139,153,23,42],[Rde],4),q_e("NoSpaceBeforeNonNullAssertionOperator",n,54,[Ede,Qde],16),q_e("NoSpaceAfterNewKeywordOnConstructorSignature",105,21,[Ede,Vde],16),q_e("SpaceLessThanAndNonJSXTypeAnnotation",30,30,[Ede],4),q_e("SpaceAfterConstructor",137,21,[H_e("insertSpaceAfterConstructor"),Ede],4),q_e("NoSpaceAfterConstructor",137,21,[X_e("insertSpaceAfterConstructor"),Ede],16),q_e("SpaceAfterComma",28,n,[H_e("insertSpaceAfterCommaDelimiter"),Ede,Nde,Tde,Cde],4),q_e("NoSpaceAfterComma",28,n,[X_e("insertSpaceAfterCommaDelimiter"),Ede,Nde],16),q_e("SpaceAfterAnonymousFunctionKeyword",[100,42],21,[H_e("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),fde],4),q_e("NoSpaceAfterAnonymousFunctionKeyword",[100,42],21,[X_e("insertSpaceAfterFunctionKeywordForAnonymousFunctions"),fde],16),q_e("SpaceAfterKeywordInControl",o,21,[H_e("insertSpaceAfterKeywordsInControlFlowStatements"),bde],4),q_e("NoSpaceAfterKeywordInControl",o,21,[X_e("insertSpaceAfterKeywordsInControlFlowStatements"),bde],16),q_e("SpaceAfterOpenParen",21,n,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],4),q_e("SpaceBeforeCloseParen",n,22,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],4),q_e("SpaceBetweenOpenParens",21,21,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],4),q_e("NoSpaceBetweenParens",21,22,[Ede],16),q_e("NoSpaceAfterOpenParen",21,n,[X_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],16),q_e("NoSpaceBeforeCloseParen",n,22,[X_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"),Ede],16),q_e("SpaceAfterOpenBracket",23,n,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ede],4),q_e("SpaceBeforeCloseBracket",n,24,[H_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ede],4),q_e("NoSpaceBetweenBrackets",23,24,[Ede],16),q_e("NoSpaceAfterOpenBracket",23,n,[X_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ede],16),q_e("NoSpaceBeforeCloseBracket",n,24,[X_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"),Ede],16),q_e("SpaceAfterOpenBrace",19,n,[Y_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),cde],4),q_e("SpaceBeforeCloseBrace",n,20,[Y_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),cde],4),q_e("NoSpaceBetweenEmptyBraceBrackets",19,20,[Ede,xde],16),q_e("NoSpaceAfterOpenBrace",19,n,[G_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Ede],16),q_e("NoSpaceBeforeCloseBrace",n,20,[G_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"),Ede],16),q_e("SpaceBetweenEmptyBraceBrackets",19,20,[H_e("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")],4),q_e("NoSpaceBetweenEmptyBraceBrackets",19,20,[G_e("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"),Ede],16),q_e("SpaceAfterTemplateHeadAndMiddle",[16,17],n,[H_e("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Pde],4,1),q_e("SpaceBeforeTemplateMiddleAndTail",n,[17,18],[H_e("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Ede],4),q_e("NoSpaceAfterTemplateHeadAndMiddle",[16,17],n,[X_e("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Pde],16,1),q_e("NoSpaceBeforeTemplateMiddleAndTail",n,[17,18],[X_e("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"),Ede],16),q_e("SpaceAfterOpenBraceInJsxExpression",19,n,[H_e("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ede,Fde],4),q_e("SpaceBeforeCloseBraceInJsxExpression",n,20,[H_e("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ede,Fde],4),q_e("NoSpaceAfterOpenBraceInJsxExpression",19,n,[X_e("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ede,Fde],16),q_e("NoSpaceBeforeCloseBraceInJsxExpression",n,20,[X_e("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"),Ede,Fde],16),q_e("SpaceAfterSemicolonInFor",27,n,[H_e("insertSpaceAfterSemicolonInForStatements"),Ede,Z_e],4),q_e("NoSpaceAfterSemicolonInFor",27,n,[X_e("insertSpaceAfterSemicolonInForStatements"),Ede,Z_e],16),q_e("SpaceBeforeBinaryOperator",n,a,[H_e("insertSpaceBeforeAndAfterBinaryOperators"),Ede,tde],4),q_e("SpaceAfterBinaryOperator",a,n,[H_e("insertSpaceBeforeAndAfterBinaryOperators"),Ede,tde],4),q_e("NoSpaceBeforeBinaryOperator",n,a,[X_e("insertSpaceBeforeAndAfterBinaryOperators"),Ede,tde],16),q_e("NoSpaceAfterBinaryOperator",a,n,[X_e("insertSpaceBeforeAndAfterBinaryOperators"),Ede,tde],16),q_e("SpaceBeforeOpenParenInFuncDecl",n,21,[H_e("insertSpaceBeforeFunctionParenthesis"),Ede,fde],4),q_e("NoSpaceBeforeOpenParenInFuncDecl",n,21,[X_e("insertSpaceBeforeFunctionParenthesis"),Ede,fde],16),q_e("NewLineBeforeOpenBraceInControl",_,19,[H_e("placeOpenBraceOnNewLineForControlBlocks"),bde,lde],8,1),q_e("NewLineBeforeOpenBraceInFunction",l,19,[H_e("placeOpenBraceOnNewLineForFunctions"),fde,lde],8,1),q_e("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock",u,19,[H_e("placeOpenBraceOnNewLineForFunctions"),hde,lde],8,1),q_e("SpaceAfterTypeAssertion",32,n,[H_e("insertSpaceAfterTypeAssertion"),Ede,Wde],4),q_e("NoSpaceAfterTypeAssertion",32,n,[X_e("insertSpaceAfterTypeAssertion"),Ede,Wde],16),q_e("SpaceBeforeTypeAnnotation",n,[58,59],[H_e("insertSpaceBeforeTypeAnnotation"),Ede,ide],4),q_e("NoSpaceBeforeTypeAnnotation",n,[58,59],[X_e("insertSpaceBeforeTypeAnnotation"),Ede,ide],16),q_e("NoOptionalSemicolon",27,i,[W_e("semicolons","remove"),Zde],32),q_e("OptionalSemicolon",n,i,[W_e("semicolons","insert"),epe],64),q_e("NoSpaceBeforeSemicolon",n,27,[Ede],16),q_e("SpaceBeforeOpenBraceInControl",_,19,[Q_e("placeOpenBraceOnNewLineForControlBlocks"),bde,zde,sde],4,1),q_e("SpaceBeforeOpenBraceInFunction",l,19,[Q_e("placeOpenBraceOnNewLineForFunctions"),fde,dde,zde,sde],4,1),q_e("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock",u,19,[Q_e("placeOpenBraceOnNewLineForFunctions"),hde,zde,sde],4,1),q_e("NoSpaceBeforeComma",n,28,[Ede],16),q_e("NoSpaceBeforeOpenBracket",t(134,84),23,[Ede],16),q_e("NoSpaceAfterCloseBracket",24,n,[Ede,jde],16),q_e("SpaceAfterSemicolon",27,n,[Ede],4),q_e("SpaceBetweenForAndAwaitKeyword",99,135,[Ede],4),q_e("SpaceBetweenDotDotDotAndTypeName",26,c,[Ede],16),q_e("SpaceBetweenStatements",[22,92,93,84],n,[Ede,Nde,ede],4),q_e("SpaceAfterTryCatchFinally",[113,85,98],19,[Ede],4)]}function q_e(e,t,n,r,i,o=0){return{leftTokenRange:U_e(t),rightTokenRange:U_e(n),rule:{debugName:e,context:r,action:i,flags:o}}}function V_e(e){return{tokens:e,isSpecific:!0}}function U_e(e){return"number"==typeof e?V_e([e]):ot(e)?V_e(e):e}function K_e(e,t,n=[]){const r=[];for(let i=e;i<=t;i++)D(n,i)||r.push(i);return V_e(r)}function W_e(e,t){return n=>n.options&&n.options[e]===t}function H_e(e){return t=>t.options&&Le(t.options,e)&&!!t.options[e]}function G_e(e){return t=>t.options&&Le(t.options,e)&&!t.options[e]}function X_e(e){return t=>!t.options||!Le(t.options,e)||!t.options[e]}function Q_e(e){return t=>!t.options||!Le(t.options,e)||!t.options[e]||t.TokensAreOnSameLine()}function Y_e(e){return t=>!t.options||!Le(t.options,e)||!!t.options[e]}function Z_e(e){return 248===e.contextNode.kind}function ede(e){return!Z_e(e)}function tde(e){switch(e.contextNode.kind){case 226:return 28!==e.contextNode.operatorToken.kind;case 227:case 194:case 234:case 281:case 276:case 182:case 192:case 193:case 238:return!0;case 208:case 265:case 271:case 277:case 260:case 169:case 306:case 172:case 171:return 64===e.currentTokenSpan.kind||64===e.nextTokenSpan.kind;case 249:case 168:return 103===e.currentTokenSpan.kind||103===e.nextTokenSpan.kind||64===e.currentTokenSpan.kind||64===e.nextTokenSpan.kind;case 250:return 165===e.currentTokenSpan.kind||165===e.nextTokenSpan.kind}return!1}function nde(e){return!tde(e)}function rde(e){return!ide(e)}function ide(e){const t=e.contextNode.kind;return 172===t||171===t||169===t||260===t||pu(t)}function ode(e){return!function(e){return uE(e.contextNode)&&e.contextNode.questionToken}(e)}function ade(e){return 227===e.contextNode.kind||194===e.contextNode.kind}function sde(e){return e.TokensAreOnSameLine()||dde(e)}function cde(e){return 206===e.contextNode.kind||200===e.contextNode.kind||function(e){return _de(e)&&(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}(e)}function lde(e){return dde(e)&&!(e.NextNodeAllOnSameLine()||e.NextNodeBlockIsOnOneLine())}function ude(e){return _de(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}function _de(e){return pde(e.contextNode)}function dde(e){return pde(e.nextTokenParent)}function pde(e){if(yde(e))return!0;switch(e.kind){case 241:case 269:case 210:case 268:return!0}return!1}function fde(e){switch(e.contextNode.kind){case 262:case 174:case 173:case 177:case 178:case 179:case 218:case 176:case 219:case 264:return!0}return!1}function mde(e){return!fde(e)}function gde(e){return 262===e.contextNode.kind||218===e.contextNode.kind}function hde(e){return yde(e.contextNode)}function yde(e){switch(e.kind){case 263:case 231:case 264:case 266:case 187:case 267:case 278:case 279:case 272:case 275:return!0}return!1}function vde(e){switch(e.currentTokenParent.kind){case 263:case 267:case 266:case 299:case 268:case 255:return!0;case 241:{const t=e.currentTokenParent.parent;if(!t||219!==t.kind&&218!==t.kind)return!0}}return!1}function bde(e){switch(e.contextNode.kind){case 245:case 255:case 248:case 249:case 250:case 247:case 258:case 246:case 254:case 299:return!0;default:return!1}}function xde(e){return 210===e.contextNode.kind}function Sde(e){return function(e){return 213===e.contextNode.kind}(e)||function(e){return 214===e.contextNode.kind}(e)}function kde(e){return 28!==e.currentTokenSpan.kind}function Tde(e){return 24!==e.nextTokenSpan.kind}function Cde(e){return 22!==e.nextTokenSpan.kind}function wde(e){return 219===e.contextNode.kind}function Dde(e){return 205===e.contextNode.kind}function Ede(e){return e.TokensAreOnSameLine()&&12!==e.contextNode.kind}function Pde(e){return 12!==e.contextNode.kind}function Nde(e){return 284!==e.contextNode.kind&&288!==e.contextNode.kind}function Fde(e){return 294===e.contextNode.kind||293===e.contextNode.kind}function Ade(e){return 291===e.nextTokenParent.kind||295===e.nextTokenParent.kind&&291===e.nextTokenParent.parent.kind}function Ide(e){return 291===e.contextNode.kind}function Ode(e){return 295!==e.nextTokenParent.kind}function Mde(e){return 295===e.nextTokenParent.kind}function Lde(e){return 285===e.contextNode.kind}function jde(e){return!fde(e)&&!dde(e)}function Rde(e){return e.TokensAreOnSameLine()&&Wv(e.contextNode)&&Bde(e.currentTokenParent)&&!Bde(e.nextTokenParent)}function Bde(e){for(;e&&Xu(e);)e=e.parent;return e&&170===e.kind}function Jde(e){return 261===e.currentTokenParent.kind&&e.currentTokenParent.getStart(e.sourceFile)===e.currentTokenSpan.pos}function zde(e){return 2!==e.formattingRequestKind}function $de(e){return 267===e.contextNode.kind}function qde(e){return 187===e.contextNode.kind}function Vde(e){return 180===e.contextNode.kind}function Ude(e,t){if(30!==e.kind&&32!==e.kind)return!1;switch(t.kind){case 183:case 216:case 265:case 263:case 231:case 264:case 262:case 218:case 219:case 174:case 173:case 179:case 180:case 213:case 214:case 233:return!0;default:return!1}}function Kde(e){return Ude(e.currentTokenSpan,e.currentTokenParent)||Ude(e.nextTokenSpan,e.nextTokenParent)}function Wde(e){return 216===e.contextNode.kind}function Hde(e){return!Wde(e)}function Gde(e){return 116===e.currentTokenSpan.kind&&222===e.currentTokenParent.kind}function Xde(e){return 229===e.contextNode.kind&&void 0!==e.contextNode.expression}function Qde(e){return 235===e.contextNode.kind}function Yde(e){return!function(e){switch(e.contextNode.kind){case 245:case 248:case 249:case 250:case 246:case 247:return!0;default:return!1}}(e)}function Zde(e){let t=e.nextTokenSpan.kind,n=e.nextTokenSpan.pos;if(Rh(t)){const r=e.nextTokenParent===e.currentTokenParent?DX(e.currentTokenParent,mc(e.currentTokenParent,(e=>!e.parent)),e.sourceFile):e.nextTokenParent.getFirstToken(e.sourceFile);if(!r)return!0;t=r.kind,n=r.getStart(e.sourceFile)}return e.sourceFile.getLineAndCharacterOfPosition(e.currentTokenSpan.pos).line===e.sourceFile.getLineAndCharacterOfPosition(n).line?20===t||1===t:240!==t&&27!==t&&(264===e.contextNode.kind||265===e.contextNode.kind?!lE(e.currentTokenParent)||!!e.currentTokenParent.type||21!==t:uE(e.currentTokenParent)?!e.currentTokenParent.initializer:248!==e.currentTokenParent.kind&&242!==e.currentTokenParent.kind&&240!==e.currentTokenParent.kind&&23!==t&&21!==t&&40!==t&&41!==t&&44!==t&&14!==t&&28!==t&&228!==t&&16!==t&&15!==t&&25!==t)}function epe(e){return cZ(e.currentTokenSpan.end,e.currentTokenParent,e.sourceFile)}function tpe(e){return!GE(e.contextNode)||!TD(e.contextNode.expression)||e.contextNode.expression.getText().includes(".")}function npe(e,t){return{options:e,getRules:(void 0===R_e&&(R_e=function(e){const t=function(e){const t=new Array(upe*upe),n=new Array(t.length);for(const r of e){const e=r.leftTokenRange.isSpecific&&r.rightTokenRange.isSpecific;for(const i of r.leftTokenRange.tokens)for(const o of r.rightTokenRange.tokens){const a=ipe(i,o);let s=t[a];void 0===s&&(s=t[a]=[]),dpe(s,r.rule,e,n,a)}}return t}(e);return e=>{const n=t[ipe(e.currentTokenSpan.kind,e.nextTokenSpan.kind)];if(n){const t=[];let r=0;for(const i of n){const n=~rpe(r);i.action&n&&x(i.context,(t=>t(e)))&&(t.push(i),r|=i.action)}if(t.length)return t}}}($_e())),R_e),host:t}}function rpe(e){let t=0;return 1&e&&(t|=28),2&e&&(t|=96),28&e&&(t|=28),96&e&&(t|=96),t}function ipe(e,t){return xn.assert(e<=165&&t<=165,"Must compute formatting context from tokens"),e*upe+t}var ope,ape,spe,cpe,lpe,upe=166,_pe=((ope=_pe||{})[ope.StopRulesSpecific=0]="StopRulesSpecific",ope[ope.StopRulesAny=5]="StopRulesAny",ope[ope.ContextRulesSpecific=10]="ContextRulesSpecific",ope[ope.ContextRulesAny=15]="ContextRulesAny",ope[ope.NoContextRulesSpecific=20]="NoContextRulesSpecific",ope[ope.NoContextRulesAny=25]="NoContextRulesAny",ope);function dpe(e,t,n,r,i){const o=3&t.action?n?0:_pe.StopRulesAny:t.context!==B_e?n?_pe.ContextRulesSpecific:_pe.ContextRulesAny:n?_pe.NoContextRulesSpecific:_pe.NoContextRulesAny,a=r[i]||0;e.splice(function(e,t){let n=0;for(let r=0;r<=t;r+=5)n+=31&e,e>>=5;return n}(a,o),0,t),r[i]=function(e,t){const n=1+(e>>t&31);return xn.assert((31&n)===n,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),e&~(31<xn.formatSyntaxKind(n)}),r}function fpe(e,t,n){const r=t.getLineAndCharacterOfPosition(e).line;if(0===r)return[];let i=Ed(r,t);for(;Ya(t.text.charCodeAt(i));)i--;return Za(t.text.charCodeAt(i))&&i--,Cpe({pos:wd(r-1,t),end:i+1},t,n,2)}function mpe(e,t,n){return Tpe(xpe(bpe(e,27,t)),t,n,3)}function gpe(e,t,n){const r=bpe(e,19,t);return r?Cpe({pos:GG(xpe(r.parent).getStart(t),t),end:e},t,n,4):[]}function hpe(e,t,n){return Tpe(xpe(bpe(e,20,t)),t,n,5)}function ype(e,t){return Cpe({pos:0,end:e.text.length},e,t,0)}function vpe(e,t,n,r){return Cpe({pos:GG(e,n),end:t},n,r,1)}function bpe(e,t,n){const r=EX(e,n);return r&&r.kind===t&&e===r.getEnd()?r:void 0}function xpe(e){let t=e;for(;t&&t.parent&&t.parent.end===e.end&&!Spe(t.parent,t);)t=t.parent;return t}function Spe(e,t){switch(e.kind){case 263:case 264:return XG(e.members,t);case 267:const n=e.body;return!!n&&268===n.kind&&XG(n.statements,t);case 307:case 241:case 268:return XG(e.statements,t);case 299:return XG(e.block.statements,t)}return!1}function kpe(e,t,n,r,i,o){const a={pos:e.pos,end:e.end};return j_e(t.text,n,a.pos,a.end,(n=>wpe(a,e,r,i,n,o,1,(e=>!1),t)))}function Tpe(e,t,n,r){return e?Cpe({pos:GG(e.getStart(t),t),end:e.end},t,n,r):[]}function Cpe(e,t,n,r){const i=function(e,t){return function n(r){const i=LI(r,(n=>eX(n.getStart(t),n.end,e)&&n));if(i){const e=n(i);if(e)return e}return r}(t)}(e,t);return j_e(t.text,t.languageVariant,function(e,t,n){const r=e.getStart(n);if(r===t.pos&&e.end===t.end)return r;const i=EX(t.pos,n);return i?i.end>=t.pos?e.pos:i.end:e.pos}(i,e,t),e.end,(o=>wpe(e,i,lpe.getIndentationForNode(i,e,t,n.options),function(e,t,n){let r,i=-1;for(;e;){const o=n.getLineAndCharacterOfPosition(e.getStart(n)).line;if(-1!==i&&o!==i)break;if(lpe.shouldIndentChildNode(t,e,r,n))return t.indentSize;i=o,r=e,e=e.parent}return 0}(i,n.options,t),o,n,r,function(e,t){if(!e.length)return i;const n=e.filter((e=>nX(t,e.start,e.start+e.length))).sort(((e,t)=>e.start-t.start));if(!n.length)return i;let r=0;return e=>{for(;;){if(r>=n.length)return!1;const t=n[r];if(e.end<=t.start)return!1;if(iX(e.pos,e.end,t.start,t.start+t.length))return!0;r++}};function i(){return!1}}(t.parseDiagnostics,e),t)))}function wpe(e,t,n,r,i,{options:o,getRules:a,host:s},c,l,u){var _;const d=new O_e(u,c,o);let p,f,g,h,y,v=-1;const b=[];if(i.advance(),i.isOnToken()){const a=u.getLineAndCharacterOfPosition(t.getStart(u)).line;let s=a;Wv(t)&&(s=u.getLineAndCharacterOfPosition(Ud(t,u)).line),function t(n,r,a,s,c,_){if(!nX(e,n.getStart(u),n.getEnd()))return;const d=k(n,a,c,_);let m=r;for(LI(n,(e=>{g(e,-1,n,d,a,s,!1)}),(t=>{!function(t,r,a,s){xn.assert(jl(t)),xn.assert(!ly(t));const c=function(e,t){switch(e.kind){case 176:case 262:case 218:case 174:case 173:case 219:case 179:case 180:case 184:case 185:case 177:case 178:if(e.typeParameters===t)return 30;if(e.parameters===t)return 21;break;case 213:case 214:if(e.typeArguments===t)return 30;if(e.arguments===t)return 21;break;case 263:case 231:case 264:case 265:if(e.typeParameters===t)return 30;break;case 183:case 215:case 186:case 233:case 205:if(e.typeArguments===t)return 30;break;case 187:return 19}return 0}(r,t);let l=s,_=a;if(!nX(e,t.pos,t.end))return void(t.endt.pos)break;if(e.token.kind===c){let t;if(_=u.getLineAndCharacterOfPosition(e.token.pos).line,h(e,r,s,r),-1!==v)t=v;else{const n=GG(e.token.pos,u);t=lpe.findFirstNonWhitespaceColumn(n,e.token.pos,u,o)}l=k(r,a,t,o.indentSize)}else h(e,r,s,r)}let d=-1;for(let e=0;eMath.min(n.end,e.end))break;h(t,n,d,n)}function g(r,a,s,c,l,_,d,p){if(xn.assert(!ly(r)),Nd(r)||Ad(s,r))return a;const f=r.getStart(u),g=u.getLineAndCharacterOfPosition(f).line;let b=g;Wv(r)&&(b=u.getLineAndCharacterOfPosition(Ud(r,u)).line);let x=-1;if(d&&XG(e,s)&&(x=function(e,t,n,r,i){if(nX(r,e,t)||tX(r,e,t)){if(-1!==i)return i}else{const t=u.getLineAndCharacterOfPosition(e).line,r=GG(e,u),i=lpe.findFirstNonWhitespaceColumn(r,e,u,o);if(t!==n||e===i){const e=lpe.getBaseIndentation(o);return e>i?e:i}}return-1}(f,r.end,l,e,a),-1!==x&&(a=x)),!nX(e,r.pos,r.end))return r.ende.end)return a;if(t.token.end>f){t.token.pos>f&&i.skipToStartOf(r);break}h(t,n,c,n)}if(!i.isOnToken()||i.getTokenFullStart()>=e.end)return a;if(Ll(r)){const e=i.readTokenInfo(r);if(12!==r.kind)return xn.assert(e.token.end===r.end,"Token end is child end"),h(e,n,c,r),a}const S=170===r.kind?g:_,k=function(e,t,n,r,i,a){const s=lpe.shouldIndentChildNode(o,e)?o.indentSize:0;return a===t?{indentation:t===y?v:i.getIndentation(),delta:Math.min(o.indentSize,i.getDelta(e)+s)}:-1===n?21===e.kind&&t===y?{indentation:v,delta:i.getDelta(e)}:lpe.childStartsOnTheSameLineWithElseInIfStatement(r,e,t,u)||lpe.childIsUnindentedBranchOfConditionalExpression(r,e,t,u)||lpe.argumentStartsOnSameLineAsPreviousArgument(r,e,t,u)?{indentation:i.getIndentation(),delta:s}:{indentation:i.getIndentation()+i.getDelta(e),delta:s}:{indentation:n,delta:s}}(r,g,x,n,c,S);return t(r,m,g,b,k.indentation,k.delta),m=n,p&&209===s.kind&&-1===a&&(a=k.indentation),a}function h(t,n,r,o,a){xn.assert(XG(n,t.token));const s=i.lastTrailingTriviaWasNewLine();let c=!1;t.leadingTrivia&&w(t.leadingTrivia,n,m,r);let _=0;const d=XG(e,t.token),g=u.getLineAndCharacterOfPosition(t.token.pos);if(d){const e=l(t.token),i=f;if(_=D(t.token,g,n,m,r),!e)if(0===_){const e=i&&u.getLineAndCharacterOfPosition(i.end).line;c=s&&g.line!==e}else c=1===_}if(t.trailingTrivia&&(p=De(t.trailingTrivia).end,w(t.trailingTrivia,n,m,r)),c){const e=d&&!l(t.token)?r.getIndentationForToken(g.line,t.token.kind,o,!!a):-1;let n=!0;if(t.leadingTrivia){const i=r.getIndentationForComment(t.token.kind,e,o);n=C(t.leadingTrivia,i,n,(e=>P(e.pos,i,!1)))}-1!==e&&n&&(P(t.token.pos,e,1===_),y=g.line,v=e)}i.advance(),m=n}}(t,t,a,s,n,r)}const x=i.getCurrentLeadingTrivia();if(x){const r=lpe.nodeWillIndentChild(o,t,void 0,u,!1)?n+o.indentSize:n;C(x,r,!0,(e=>{D(e,u.getLineAndCharacterOfPosition(e.pos),t,t,void 0),P(e.pos,r,!1)})),!1!==o.trimTrailingWhitespace&&function(t){let n=f?f.end:e.pos;for(const e of t)HX(e.kind)&&(n=e.end){const e=i.isOnEOF()?i.readEOFTokenRange():i.isOnToken()?i.readTokenInfo(t).token:void 0;if(e&&e.pos===p){const n=(null==(_=EX(e.end,u,t))?void 0:_.parent)||g;E(e,u.getLineAndCharacterOfPosition(e.pos).line,n,f,h,g,n,void 0)}}return b;function k(e,t,n,r){return{getIndentationForComment:(e,t,r)=>{switch(e){case 20:case 24:case 22:return n+i(r)}return-1!==t?t:n},getIndentationForToken:(r,o,a,s)=>!s&&function(n,r,i){switch(r){case 19:case 20:case 22:case 93:case 117:case 60:return!1;case 44:case 32:switch(i.kind){case 286:case 287:case 285:return!1}break;case 23:case 24:if(200!==i.kind)return!1}return t!==n&&!(Wv(e)&&r===function(e){if(cI(e)){const t=S(e.modifiers,iu,T(e.modifiers,cE));if(t)return t.kind}switch(e.kind){case 263:return 86;case 264:return 120;case 262:return 100;case 266:return 266;case 177:return 139;case 178:return 153;case 174:if(e.asteriskToken)return 42;case 172:case 169:const t=Pc(e);if(t)return t.kind}}(e))}(r,o,a)?n+i(a):n,getIndentation:()=>n,getDelta:i,recomputeIndentation:(t,i)=>{lpe.shouldIndentChildNode(o,i,e,u)&&(n+=t?o.indentSize:-o.indentSize,r=lpe.shouldIndentChildNode(o,e)?o.indentSize:0)}};function i(t){return lpe.nodeWillIndentChild(o,e,t,u,!0)?r:0}}function C(t,n,r,i){for(const o of t){const t=XG(e,o);switch(o.kind){case 3:t&&N(o,n,!r),r=!1;break;case 2:r&&t&&i(o),r=!1;break;case 4:r=!0}}return r}function w(t,n,r,i){for(const o of t)HX(o.kind)&&XG(e,o)&&D(o,u.getLineAndCharacterOfPosition(o.pos),n,r,i)}function D(t,n,r,i,o){let a=0;return l(t)||(f?a=E(t,n.line,r,f,h,g,i,o):F(u.getLineAndCharacterOfPosition(e.pos).line,n.line)),f=t,p=t.end,g=r,h=n.line,a}function E(e,t,n,r,i,c,l,_){d.updateContext(r,c,e,n,l);const p=a(d);let f=!1!==d.options.trimTrailingWhitespace,g=0;return p?m(p,(a=>{if(g=function(e,t,n,r,i){const a=i!==n;switch(e.action){case 1:return 0;case 16:if(t.end!==r.pos)return O(t.end,r.pos-t.end),a?2:0;break;case 32:O(t.pos,t.end-t.pos);break;case 8:if(1!==e.flags&&n!==i)return 0;if(1!=i-n)return M(t.end,r.pos-t.end,gY(s,o)),a?0:1;break;case 4:if(1!==e.flags&&n!==i)return 0;if(1!=r.pos-t.end||32!==u.text.charCodeAt(t.end))return M(t.end,r.pos-t.end," "),a?2:0;break;case 64:c=t.end,";"&&b.push(_Q(c,0,";"))}var c;return 0}(a,r,i,e,t),_)switch(g){case 2:n.getStart(u)===e.pos&&_.recomputeIndentation(!1,l);break;case 1:n.getStart(u)===e.pos&&_.recomputeIndentation(!0,l);break;default:xn.assert(0===g)}f=f&&!(16&a.action)&&1!==a.flags})):f=f&&1!==e.kind,t!==i&&f&&F(i,t,r),g}function P(e,t,n){const r=Epe(t,o);if(n)M(e,0,r);else{const n=u.getLineAndCharacterOfPosition(e),i=wd(n.line,u);(t!==function(e,t){let n=0;for(let r=0;r0){const e=Epe(r,o);M(t,n.character,e)}else O(t,n.character)}}function F(e,t,n){for(let r=e;rt)continue;const i=A(e,t);-1!==i&&(xn.assert(i===e||!Ya(u.text.charCodeAt(i-1))),O(i,t+1-i))}}function A(e,t){let n=t;for(;n>=e&&Ya(u.text.charCodeAt(n));)n--;return n!==t?n+1:-1}function I(e,t,n){F(u.getLineAndCharacterOfPosition(e).line,u.getLineAndCharacterOfPosition(t).line+1,n)}function O(e,t){t&&b.push(_Q(e,t,""))}function M(e,t,n){(t||n)&&b.push(_Q(e,t,n))}}function Dpe(e,t,n,r=kX(e,t)){const i=mc(r,oF);if(i&&(r=i.parent),r.getStart(e)<=t&&tZG(n,t)||t===n.end&&(2===n.kind||t===e.getFullWidth())))}function Epe(e,t){if((!ape||ape.tabSize!==t.tabSize||ape.indentSize!==t.indentSize)&&(ape={tabSize:t.tabSize,indentSize:t.indentSize},spe=cpe=void 0),t.convertTabsToSpaces){let n;const r=Math.floor(e/t.indentSize),i=e%t.indentSize;return cpe||(cpe=[]),void 0===cpe[r]?(n=vQ(" ",t.indentSize*r),cpe[r]=n):n=cpe[r],i?n+vQ(" ",i):n}{const n=Math.floor(e/t.tabSize),r=e-n*t.tabSize;let i;return spe||(spe=[]),void 0===spe[n]?spe[n]=i=vQ("\t",n):i=spe[n],r?i+vQ(" ",r):i}}(e=>{let t;var n;function r(e){return e.baseIndentSize||0}function i(e,t,n,i,s,c,l){var f;let m=e.parent;for(;m;){let r=!0;if(n){const t=e.getStart(s);r=tn.end}const h=o(m,e,s),y=h.line===t.line||d(m,e,t.line,s);if(r){const n=null==(f=p(e,s))?void 0:f[0];let r=g(e,s,l,!!n&&u(n,s).line>h.line);if(-1!==r)return r+i;if(r=a(e,m,t,y,s,l),-1!==r)return r+i}k(l,m,e,s,c)&&!y&&(i+=l.indentSize);const v=_(m,e,t.line,s);m=(e=m).parent,t=v?s.getLineAndCharacterOfPosition(e.getStart(s)):h}return i+r(l)}function o(e,t,n){const r=p(t,n),i=r?r.pos:e.getStart(n);return n.getLineAndCharacterOfPosition(i)}function a(e,t,n,r,i,o){return!h_(e)&&!v_(e)||307!==t.kind&&r?-1:y(n,i,o)}let s;var c;function l(e,t,n,r){const i=DX(e,t,r);return i?19===i.kind?1:20===i.kind&&n===u(i,r).line?2:0:0}function u(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function _(e,t,n,r){return!(!QE(e)||!D(e.arguments,t))&&Xa(r,e.expression.getEnd()).line===n}function d(e,t,n,r){if(245===e.kind&&e.elseStatement===t){const t=uX(e,93,r);return xn.assert(void 0!==t),u(t,r).line===n}return!1}function p(e,t){return e.parent&&f(e.getStart(t),e.getEnd(),e.parent,t)}function f(e,t,n,r){switch(n.kind){case 183:return i(n.typeArguments);case 210:return i(n.properties);case 209:case 275:case 279:case 206:case 207:return i(n.elements);case 187:return i(n.members);case 262:case 218:case 219:case 174:case 173:case 179:case 176:case 185:case 180:return i(n.typeParameters)||i(n.parameters);case 177:return i(n.parameters);case 263:case 231:case 264:case 265:case 345:return i(n.typeParameters);case 214:case 213:return i(n.typeArguments)||i(n.arguments);case 261:return i(n.declarations)}function i(i){return i&&tX(function(e,t,n){const r=e.getChildren(n);for(let e=1;e=0&&t=0;o--)if(28!==e[o].kind){if(n.getLineAndCharacterOfPosition(e[o].end).line!==i.line)return y(i,n,r);i=u(e[o],n)}return-1}function y(e,t,n){const r=t.getPositionOfLineAndCharacter(e.line,0);return b(r,r+e.character,t,n)}function v(e,t,n,r){let i=0,o=0;for(let a=e;at.text.length)return r(n);if(0===n.indentStyle)return 0;const a=EX(e,t,void 0,!0),s=Dpe(t,e,a||null);if(s&&3===s.kind)return function(e,t,n,r){const i=Xa(e,t).line-1,o=Xa(e,r.pos).line;if(xn.assert(o>=0),i<=o)return b(wd(o,e),t,e,n);const a=wd(i,e),{column:s,character:c}=v(a,t,e,n);return 0===s?s:42===e.text.charCodeAt(a+c)?s-1:s}(t,e,n,s);if(!a)return r(n);if(GX(a.kind)&&a.getStart(t)<=e&&e0&&Qa(e.text.charCodeAt(r));)r--;return b(GG(r,e),r,e,n)}(t,e,n);if(28===a.kind&&226!==a.parent.kind){const e=function(e,t,n){const r=cX(e);return r&&r.listItemIndex>0?h(r.list.getChildren(),r.listItemIndex-1,t,n):-1}(a,t,n);if(-1!==e)return e}const p=function(e,t,n){return t&&f(e,e,t,n)}(e,a.parent,t);if(p&&!XG(p,a)){const e=[218,219].includes(_.parent.kind)?0:n.indentSize;return m(p,t,n)+e}return function(e,t,n,o,a,s){let c,_=n;for(;_;){if(oX(_,t,e)&&k(s,_,c,e,!0)){const t=u(_,e),r=l(n,_,o,e);return i(_,t,void 0,0!==r?a&&2===r?s.indentSize:0:o!==t.line?s.indentSize:0,e,!0,s)}const r=g(_,e,s,!0);if(-1!==r)return r;c=_,_=_.parent}return r(s)}(t,e,a,c,o,n)},e.getIndentationForNode=function(e,t,n,r){const o=n.getLineAndCharacterOfPosition(e.getStart(n));return i(e,o,t,0,n,!1,r)},e.getBaseIndentation=r,(c=s||(s={}))[c.Unknown=0]="Unknown",c[c.OpenBrace=1]="OpenBrace",c[c.CloseBrace=2]="CloseBrace",e.isArgumentAndStartLineOverlapsExpressionBeingCalled=_,e.childStartsOnTheSameLineWithElseInIfStatement=d,e.childIsUnindentedBranchOfConditionalExpression=function(e,t,n,r){if(_P(e)&&(t===e.whenTrue||t===e.whenFalse)){const i=Xa(r,e.condition.end).line;if(t===e.whenTrue)return n===i;{const t=u(e.whenTrue,r).line,o=Xa(r,e.whenTrue.end).line;return i===t&&o===n}}return!1},e.argumentStartsOnSameLineAsPreviousArgument=function(e,t,n,r){if($u(e)){if(!e.arguments)return!1;const i=S(e.arguments,(e=>e.pos===t.pos));if(!i)return!1;const o=e.arguments.indexOf(i);if(0===o)return!1;if(n===Xa(r,e.arguments[o-1].getEnd()).line)return!0}return!1},e.getContainingList=p,e.findFirstNonWhitespaceCharacterAndColumn=v,e.findFirstNonWhitespaceColumn=b,e.nodeWillIndentChild=x,e.shouldIndentChildNode=k})(lpe||(lpe={}));var Ppe={};function Npe(e,t,n,r,i,o,a,s){const c=r_e.ChangeTracker.with({host:i,formatContext:a,preferences:o},(c=>function(e,t,n,r,i,o,a,s,c){let l;t.length!==n.length&&(l=1===t.length?t:[t.join("\n")]);const u=[];let _=e.text;for(let e=n.length-1;e>=0;e--){const{pos:r,end:i}=n[e];_=l?_.slice(0,r)+l[0]+_.slice(i):_.slice(0,r)+t[e]+_.slice(i)}xn.checkDefined(i.runWithTemporaryFileUpdate).call(i,e.fileName,_,((n,l,_)=>{const d=a8.createImportAdder(_,n,o,i);if(null==r?void 0:r.range){xn.assert(r.range.length===t.length),r.range.forEach((e=>{const t=r.file.statements,n=T(t,(t=>t.end>e.pos));if(-1===n)return;let i=T(t,(t=>t.end>=e.end),n);-1!==i&&e.end<=t[i].getStart()&&i--,u.push(...t.slice(n,-1===i?t.length:i+1))}));const o=q6(r.file,u,l.getTypeChecker(),Z6(_,u,l.getTypeChecker()));xn.assertIsDefined(l);const a=!GZ(e.fileName,l,i,!!r.file.commonJsModuleIndicator);b6(r.file,o.targetFileImportsFromOldFile,c,a),r3(r.file,o.oldImportsNeededByTargetFile,o.targetFileImportsFromOldFile,l.getTypeChecker(),n,d)}else{const e={sourceFile:_,program:l,cancellationToken:s,host:i,preferences:o,formatContext:a};LI(_,(function t(n){qD(n)&&!(null==l?void 0:l.getTypeChecker().resolveName(n.text,n,-1,!1))&&d.addImportForUnresolvedIdentifier(e,n,!0),n.forEachChild(t)}))}d.writeFixes(c,AQ(r?r.file:e,o))})),n.forEach(((n,r)=>{c.replaceRangeWithText(e,{pos:n.pos,end:n.end},l?l[0]:t[r])}))}(e,t,n,r,i,o,a,s,c)));return{edits:c,fixId:"providePostPasteEdits"}}o(Ppe,{pasteEditsProvider:()=>Npe});var Fpe,Ape={};function Ipe(e,t,n,r,i){let o=t?"DeprecationError: ":"DeprecationWarning: ";return o+=`'${e}' `,o+=r?`has been deprecated since v${r}`:"is deprecated",o+=t?" and can no longer be used.":n?` and will no longer be usable after v${n}.`:".",o+=i?` ${Yx(i,[e])}`:"",o}function Ope(e,t={}){const n="string"==typeof t.typeScriptVersion?new Nn(t.typeScriptVersion):t.typeScriptVersion??Fpe??(Fpe=new Nn(c)),r="string"==typeof t.errorAfter?new Nn(t.errorAfter):t.errorAfter,i="string"==typeof t.warnAfter?new Nn(t.warnAfter):t.warnAfter,o="string"==typeof t.since?new Nn(t.since):t.since??i,a=t.error||r&&n.compareTo(r)>=0,s=!i||n.compareTo(i)>=0;return a?function(e,t,n,r){const i=Ipe(e,!0,t,n,r);return()=>{throw new TypeError(i)}}(e,r,o,t.message):s?function(e,t,n,r){let i=!1;return()=>{i||(xn.log.warn(Ipe(e,!1,t,n,r)),i=!0)}}(e,r,o,t.message):_t}function Mpe(e,t,n,r){if(Object.defineProperty(s,"name",{...Object.getOwnPropertyDescriptor(s,"name"),value:e}),r)for(const n of Object.keys(r)){const a=+n;!isNaN(a)&&Le(t,`${a}`)&&(t[a]=(i=t[a],function(e,t){return function(){return e(),t.apply(this,arguments)}}(Ope((null==(o={...r[a],name:e})?void 0:o.name)??xn.getFunctionName(i),o),i)))}var i,o;const a=function(e,t){return n=>{for(let r=0;Le(e,`${r}`)&&Le(t,`${r}`);r++)if((0,t[r])(n))return r}}(t,n);return s;function s(...e){const n=a(e),r=void 0!==n?t[n]:void 0;if("function"==typeof r)return r(...e);throw new TypeError("Invalid arguments")}}function Lpe(e){return{overload:t=>({bind:n=>({finish:()=>Mpe(e,t,n),deprecate:r=>({finish:()=>Mpe(e,t,n,r)})})})}}o(Ape,{ANONYMOUS:()=>tZ,AccessFlags:()=>si,AssertionLevel:()=>Ct,AssignmentDeclarationKind:()=>hi,AssignmentKind:()=>Qg,Associativity:()=>_y,BreakpointResolver:()=>R7,BuilderFileEmit:()=>EV,BuilderProgramKind:()=>GV,BuilderState:()=>wV,CallHierarchy:()=>J7,CharacterCodes:()=>Ii,CheckFlags:()=>ei,CheckMode:()=>DB,ClassificationType:()=>fG,ClassificationTypeNames:()=>pG,CommentDirectiveType:()=>Mr,Comparison:()=>l,CompletionInfoFlags:()=>aG,CompletionTriggerKind:()=>YH,Completions:()=>$oe,ContainerFlags:()=>NR,ContextFlags:()=>Ur,Debug:()=>xn,DiagnosticCategory:()=>yi,Diagnostics:()=>va,DocumentHighlights:()=>l0,ElementFlags:()=>ai,EmitFlags:()=>ji,EmitHint:()=>zi,EmitOnly:()=>Br,EndOfLineState:()=>lG,ExitStatus:()=>zr,ExportKind:()=>ZZ,Extension:()=>Oi,ExternalEmitHelpers:()=>Ji,FileIncludeKind:()=>jr,FilePreprocessingDiagnosticsKind:()=>Rr,FileSystemEntryKind:()=>fo,FileWatcherEventKind:()=>Xi,FindAllReferences:()=>Rse,FlattenLevel:()=>rz,FlowFlags:()=>Or,ForegroundColorEscapeSequences:()=>Fq,FunctionFlags:()=>Bh,GeneratedIdentifierFlags:()=>Fr,GetLiteralTextFlags:()=>tp,GoToDefinition:()=>Cce,HighlightSpanKind:()=>eG,IdentifierNameMap:()=>AJ,IdentifierNameMultiMap:()=>IJ,ImportKind:()=>YZ,ImportsNotUsedAsValues:()=>Di,IndentStyle:()=>tG,IndexFlags:()=>ci,IndexKind:()=>di,InferenceFlags:()=>mi,InferencePriority:()=>fi,InlayHintKind:()=>ZH,InlayHints:()=>qce,InternalEmitFlags:()=>Ri,InternalSymbolName:()=>ti,IntersectionFlags:()=>Vr,InvalidatedProjectKind:()=>qK,JSDocParsingMode:()=>Wi,JsDoc:()=>Wce,JsTyping:()=>fH,JsxEmit:()=>wi,JsxFlags:()=>Pr,JsxReferenceKind:()=>li,LanguageFeatureMinimumTarget:()=>Bi,LanguageServiceMode:()=>HH,LanguageVariant:()=>Fi,LexicalEnvironmentFlags:()=>qi,ListFormat:()=>Vi,LogLevel:()=>Sn,MapCode:()=>ple,MemberOverrideStatus:()=>$r,ModifierFlags:()=>Er,ModuleDetectionKind:()=>xi,ModuleInstanceState:()=>wR,ModuleKind:()=>Ci,ModuleResolutionKind:()=>bi,ModuleSpecifierEnding:()=>Uk,NavigateTo:()=>I1,NavigationBar:()=>V1,NewLineKind:()=>Ei,NodeBuilderFlags:()=>Kr,NodeCheckFlags:()=>ni,NodeFactoryFlags:()=>jC,NodeFlags:()=>Dr,NodeResolutionFeatures:()=>Cj,ObjectFlags:()=>ii,OperationCanceledException:()=>Lr,OperatorPrecedence:()=>gy,OrganizeImports:()=>vle,OrganizeImportsMode:()=>QH,OuterExpressionKinds:()=>$i,OutliningElementsCollector:()=>Xle,OutliningSpanKind:()=>sG,OutputFileType:()=>cG,PackageJsonAutoImportPreference:()=>WH,PackageJsonDependencyGroup:()=>KH,PatternMatchKind:()=>L0,PollingInterval:()=>Qi,PollingWatchKind:()=>Ti,PragmaKindFlags:()=>Ui,PrivateIdentifierKind:()=>zw,ProcessLevel:()=>wz,ProgramUpdateLevel:()=>cq,QuotePreference:()=>NQ,RegularExpressionFlags:()=>Ar,RelationComparisonResult:()=>Nr,Rename:()=>oue,ScriptElementKind:()=>_G,ScriptElementKindModifier:()=>dG,ScriptKind:()=>Pi,ScriptSnapshot:()=>JH,ScriptTarget:()=>Ni,SemanticClassificationFormat:()=>XH,SemanticMeaning:()=>gG,SemicolonPreference:()=>nG,SignatureCheckMode:()=>EB,SignatureFlags:()=>_i,SignatureHelp:()=>due,SignatureInfo:()=>DV,SignatureKind:()=>ui,SmartSelectionRange:()=>jue,SnippetKind:()=>Li,StatisticType:()=>AW,StructureIsReused:()=>Jr,SymbolAccessibility:()=>Gr,SymbolDisplay:()=>Hue,SymbolDisplayPartKind:()=>oG,SymbolFlags:()=>Zr,SymbolFormatFlags:()=>Hr,SyntaxKind:()=>wr,SyntheticSymbolKind:()=>Xr,Ternary:()=>gi,ThrottledCancellationToken:()=>P7,TokenClass:()=>uG,TokenFlags:()=>Ir,TransformFlags:()=>Mi,TypeFacts:()=>CB,TypeFlags:()=>ri,TypeFormatFlags:()=>Wr,TypeMapKind:()=>pi,TypePredicateKind:()=>Qr,TypeReferenceSerializationKind:()=>Yr,UnionReduction:()=>qr,UpToDateStatusType:()=>mK,VarianceFlags:()=>oi,Version:()=>Nn,VersionRange:()=>An,WatchDirectoryFlags:()=>Ai,WatchDirectoryKind:()=>ki,WatchFileKind:()=>Si,WatchLogLevel:()=>gq,WatchType:()=>ZU,accessPrivateIdentifier:()=>ez,addDisposableResourceHelper:()=>vD,addEmitFlags:()=>ow,addEmitHelper:()=>Cw,addEmitHelpers:()=>ww,addInternalEmitFlags:()=>sw,addNodeFactoryPatcher:()=>BC,addObjectAllocatorPatcher:()=>Xx,addRange:()=>pe,addRelatedInfo:()=>fT,addSyntheticLeadingComment:()=>yw,addSyntheticTrailingComment:()=>xw,addToSeen:()=>Fx,advancedAsyncSuperHelper:()=>SD,affectsDeclarationPathOptionDeclarations:()=>kO,affectsEmitOptionDeclarations:()=>SO,allKeysStartWithDot:()=>tR,altDirectorySeparator:()=>So,and:()=>un,append:()=>ue,appendIfUnique:()=>me,arrayFrom:()=>$e,arrayIsEqualTo:()=>se,arrayIsHomogeneous:()=>ET,arrayIsSorted:()=>ae,arrayOf:()=>ze,arrayReverseIterator:()=>ye,arrayToMap:()=>Ue,arrayToMultiMap:()=>We,arrayToNumericMap:()=>Ke,arraysEqual:()=>E,assertType:()=>pn,assign:()=>qe,assignHelper:()=>Xw,asyncDelegator:()=>Zw,asyncGeneratorHelper:()=>Yw,asyncSuperHelper:()=>xD,asyncValues:()=>eD,attachFileToDiagnostics:()=>oS,awaitHelper:()=>Qw,awaiterHelper:()=>nD,base64decode:()=>jb,base64encode:()=>Lb,binarySearch:()=>Ae,binarySearchKey:()=>Ie,bindSourceFile:()=>IR,breakIntoCharacterSpans:()=>Y0,breakIntoWordSpans:()=>Z0,buildLinkParts:()=>mY,buildOpts:()=>AO,buildOverload:()=>Lpe,bundlerModuleNameResolver:()=>wj,canBeConvertedToAsync:()=>k1,canHaveDecorators:()=>lI,canHaveExportModifier:()=>ZT,canHaveFlowNode:()=>jg,canHaveIllegalDecorators:()=>MA,canHaveIllegalModifiers:()=>LA,canHaveIllegalType:()=>IA,canHaveIllegalTypeParameters:()=>OA,canHaveJSDoc:()=>Rg,canHaveLocals:()=>f_,canHaveModifiers:()=>cI,canHaveSymbol:()=>p_,canIncludeBindAndCheckDiagnsotics:()=>vT,canJsonReportNoInputFiles:()=>tL,canProduceDiagnostics:()=>o$,canUsePropertyAccess:()=>tC,canWatchAffectingLocation:()=>hU,canWatchAtTypes:()=>fU,canWatchDirectoryOrFile:()=>pU,cartesianProduct:()=>gn,cast:()=>ut,chainBundle:()=>CJ,chainDiagnosticMessages:()=>uS,changeAnyExtension:()=>na,changeCompilerHostLikeToUseCache:()=>Dq,changeExtension:()=>tT,changeFullExtension:()=>ra,changesAffectModuleResolution:()=>id,changesAffectingProgramStructure:()=>ad,characterToRegularExpressionFlag:()=>$a,childIsDecorated:()=>vm,classElementOrClassElementParameterIsDecorated:()=>xm,classHasClassThisAssignment:()=>mz,classHasDeclaredOrExplicitlyAssignedName:()=>Sz,classHasExplicitlyAssignedName:()=>xz,classOrConstructorParameterIsDecorated:()=>bm,classPrivateFieldGetHelper:()=>gD,classPrivateFieldInHelper:()=>yD,classPrivateFieldSetHelper:()=>hD,classicNameResolver:()=>vR,classifier:()=>i8,cleanExtendedConfigCache:()=>_q,clear:()=>I,clearMap:()=>xx,clearSharedExtendedConfigFileWatcher:()=>uq,climbPastPropertyAccess:()=>NG,climbPastPropertyOrElementAccess:()=>FG,clone:()=>Xe,cloneCompilerOptions:()=>eQ,closeFileWatcher:()=>dx,closeFileWatcherOf:()=>vq,codefix:()=>a8,collapseTextChangeRangesAcrossMultipleVersions:()=>tc,collectExternalModuleInfo:()=>PJ,combine:()=>_e,combinePaths:()=>Ko,commandLineOptionOfCustomType:()=>NO,commentPragmas:()=>Ki,commonOptionsWithBuild:()=>gO,commonPackageFolders:()=>_k,compact:()=>ce,compareBooleans:()=>Vt,compareDataObjects:()=>bx,compareDiagnostics:()=>pS,compareDiagnosticsSkipRelatedInformation:()=>fS,compareEmitHelpers:()=>qw,compareNumberOfDirectorySeparators:()=>Xk,comparePaths:()=>ca,comparePathsCaseInsensitive:()=>sa,comparePathsCaseSensitive:()=>aa,comparePatternKeys:()=>rR,compareProperties:()=>qt,compareStringsCaseInsensitive:()=>It,compareStringsCaseInsensitiveEslintCompatible:()=>Ot,compareStringsCaseSensitive:()=>Mt,compareStringsCaseSensitiveUI:()=>$t,compareTextSpans:()=>Ft,compareValues:()=>Nt,compileOnSaveCommandLineOption:()=>lO,compilerOptionsAffectDeclarationPath:()=>YS,compilerOptionsAffectEmit:()=>QS,compilerOptionsAffectSemanticDiagnostics:()=>XS,compilerOptionsDidYouMeanDiagnostics:()=>WO,compilerOptionsIndicateEsModules:()=>TQ,compose:()=>Tt,computeCommonSourceDirectoryOfFilenames:()=>Sq,computeLineAndCharacterOfPosition:()=>Wa,computeLineOfPosition:()=>Ha,computeLineStarts:()=>qa,computePositionOfLineAndCharacter:()=>Ua,computeSignature:()=>ZV,computeSignatureWithDiagnostics:()=>YV,computeSuggestionDiagnostics:()=>p1,computedOptions:()=>CS,concatenate:()=>Z,concatenateDiagnosticMessageChains:()=>_S,configDirTemplateSubstitutionOptions:()=>EO,configDirTemplateSubstitutionWatchOptions:()=>PO,consumesNodeCoreModules:()=>xZ,contains:()=>D,containsIgnoredPath:()=>JT,containsObjectRestOrSpread:()=>aI,containsParseError:()=>xd,containsPath:()=>la,convertCompilerOptionsForTelemetry:()=>IL,convertCompilerOptionsFromJson:()=>aL,convertJsonOption:()=>fL,convertToBase64:()=>Mb,convertToJson:()=>TM,convertToObject:()=>kM,convertToOptionsWithAbsolutePaths:()=>jM,convertToRelativePath:()=>pa,convertToTSConfig:()=>DM,convertTypeAcquisitionFromJson:()=>sL,copyComments:()=>RY,copyEntries:()=>_d,copyLeadingComments:()=>qY,copyProperties:()=>Ye,copyTrailingAsLeadingComments:()=>UY,copyTrailingComments:()=>VY,couldStartTrivia:()=>os,countWhere:()=>N,createAbstractBuilder:()=>uU,createAccessorPropertyBackingField:()=>eI,createAccessorPropertyGetRedirector:()=>tI,createAccessorPropertySetRedirector:()=>nI,createBaseNodeFactory:()=>NC,createBinaryExpressionTrampoline:()=>KA,createBindingHelper:()=>_D,createBuildInfo:()=>G$,createBuilderProgram:()=>eU,createBuilderProgramUsingProgramBuildInfo:()=>oU,createBuilderStatusReporter:()=>kK,createCacheWithRedirects:()=>uj,createCacheableExportInfoMap:()=>e0,createCachedDirectoryStructureHost:()=>sq,createClassNamedEvaluationHelperBlock:()=>vz,createClassThisAssignmentBlock:()=>pz,createClassifier:()=>c0,createCommentDirectivesMap:()=>qd,createCompilerDiagnostic:()=>cS,createCompilerDiagnosticForInvalidCustomType:()=>RO,createCompilerDiagnosticFromMessageChain:()=>lS,createCompilerHost:()=>kq,createCompilerHostFromProgramHost:()=>tK,createCompilerHostWorker:()=>wq,createDetachedDiagnostic:()=>nS,createDiagnosticCollection:()=>by,createDiagnosticForFileFromMessageChain:()=>Up,createDiagnosticForNode:()=>Rp,createDiagnosticForNodeArray:()=>Bp,createDiagnosticForNodeArrayFromMessageChain:()=>$p,createDiagnosticForNodeFromMessageChain:()=>zp,createDiagnosticForNodeInSourceFile:()=>Jp,createDiagnosticForRange:()=>Wp,createDiagnosticMessageChainFromDiagnostic:()=>Kp,createDiagnosticReporter:()=>PU,createDocumentPositionMapper:()=>bJ,createDocumentRegistry:()=>T0,createDocumentRegistryInternal:()=>C0,createEmitAndSemanticDiagnosticsBuilderProgram:()=>lU,createEmitHelperFactory:()=>$w,createEmptyExports:()=>VF,createEvaluator:()=>kC,createExpressionForJsxElement:()=>GF,createExpressionForJsxFragment:()=>XF,createExpressionForObjectLiteralElementLike:()=>tA,createExpressionForPropertyName:()=>eA,createExpressionFromEntityName:()=>ZF,createExternalHelpersImportDeclarationIfNeeded:()=>bA,createFileDiagnostic:()=>aS,createFileDiagnosticFromMessageChain:()=>Vp,createFlowNode:()=>FR,createForOfBindingStatement:()=>QF,createFutureSourceFile:()=>QZ,createGetCanonicalFileName:()=>tn,createGetIsolatedDeclarationErrors:()=>c$,createGetSourceFile:()=>Tq,createGetSymbolAccessibilityDiagnosticForNode:()=>s$,createGetSymbolAccessibilityDiagnosticForNodeName:()=>a$,createGetSymbolWalker:()=>BR,createIncrementalCompilerHost:()=>_K,createIncrementalProgram:()=>dK,createJsxFactoryExpression:()=>HF,createLanguageService:()=>A7,createLanguageServiceSourceFile:()=>w7,createMemberAccessForPropertyName:()=>UF,createModeAwareCache:()=>pj,createModeAwareCacheKey:()=>dj,createModuleNotFoundChain:()=>gd,createModuleResolutionCache:()=>hj,createModuleResolutionLoader:()=>Xq,createModuleResolutionLoaderUsingGlobalCache:()=>CU,createModuleSpecifierResolutionHost:()=>CQ,createMultiMap:()=>et,createNameResolver:()=>wC,createNodeConverters:()=>IC,createNodeFactory:()=>JC,createOptionNameMap:()=>OO,createOverload:()=>Mpe,createPackageJsonImportFilter:()=>bZ,createPackageJsonInfo:()=>vZ,createParenthesizerRules:()=>FC,createPatternMatcher:()=>R0,createPrinter:()=>rq,createPrinterWithDefaults:()=>Z$,createPrinterWithRemoveComments:()=>eq,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>tq,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>nq,createProgram:()=>gV,createProgramHost:()=>iK,createPropertyNameNodeForIdentifierOrLiteral:()=>HT,createQueue:()=>rt,createRange:()=>qb,createRedirectedBuilderProgram:()=>sU,createResolutionCache:()=>wU,createRuntimeTypeSerializer:()=>Iz,createScanner:()=>Cs,createSemanticDiagnosticsBuilderProgram:()=>cU,createSet:()=>it,createSolutionBuilder:()=>DK,createSolutionBuilderHost:()=>CK,createSolutionBuilderWithWatch:()=>EK,createSolutionBuilderWithWatchHost:()=>wK,createSortedArray:()=>re,createSourceFile:()=>JI,createSourceMapGenerator:()=>nJ,createSourceMapSource:()=>ZC,createSuperAccessVariableStatement:()=>jz,createSymbolTable:()=>ed,createSymlinkCache:()=>ik,createSyntacticTypeNodeBuilder:()=>pH,createSystemWatchFunctions:()=>ho,createTextChange:()=>dQ,createTextChangeFromStartLength:()=>_Q,createTextChangeRange:()=>Zs,createTextRangeFromNode:()=>cQ,createTextRangeFromSpan:()=>uQ,createTextSpan:()=>Gs,createTextSpanFromBounds:()=>Xs,createTextSpanFromNode:()=>aQ,createTextSpanFromRange:()=>lQ,createTextSpanFromStringLiteralLikeContent:()=>sQ,createTextWriter:()=>Vy,createTokenRange:()=>Gb,createTypeChecker:()=>LB,createTypeReferenceDirectiveResolutionCache:()=>yj,createTypeReferenceResolutionLoader:()=>Zq,createWatchCompilerHost:()=>pK,createWatchCompilerHostOfConfigFile:()=>sK,createWatchCompilerHostOfFilesAndCompilerOptions:()=>cK,createWatchFactory:()=>eK,createWatchHost:()=>YU,createWatchProgram:()=>fK,createWatchStatusReporter:()=>IU,createWriteFileMeasuringIO:()=>Cq,declarationNameToString:()=>Ap,decodeMappings:()=>_J,decodedTextSpanIntersectsWith:()=>Ks,decorateHelper:()=>Uw,deduplicate:()=>ne,defaultIncludeSpec:()=>VM,defaultInitCompilerOptions:()=>jO,defaultMaximumTruncationLength:()=>X_,diagnosticCategoryName:()=>vi,diagnosticToString:()=>VZ,diagnosticsEqualityComparer:()=>hS,directoryProbablyExists:()=>zb,directorySeparator:()=>xo,displayPart:()=>tY,displayPartsToString:()=>S7,disposeEmitNodes:()=>nw,disposeResourcesHelper:()=>bD,documentSpansEqual:()=>UQ,dumpTracingLegend:()=>Cr,elementAt:()=>xe,elideNodes:()=>XA,emitComments:()=>Fv,emitDetachedComments:()=>Av,emitFiles:()=>H$,emitFilesAndReportErrors:()=>HU,emitFilesAndReportErrorsAndGetExitStatus:()=>GU,emitModuleKindIsNonNodeESM:()=>$S,emitNewLineBeforeLeadingCommentOfPosition:()=>Nv,emitNewLineBeforeLeadingComments:()=>Ev,emitNewLineBeforeLeadingCommentsOfPosition:()=>Pv,emitResolverSkipsTypeChecking:()=>W$,emitSkippedWithNoDiagnostics:()=>hV,emptyArray:()=>u,emptyFileSystemEntries:()=>_T,emptyMap:()=>_,emptyOptions:()=>GH,emptySet:()=>d,endsWith:()=>Wt,ensurePathIsNonModuleName:()=>ta,ensureScriptKind:()=>Ek,ensureTrailingDirectorySeparator:()=>ea,entityNameToString:()=>jp,enumerateInsertsAndDeletes:()=>mn,equalOwnProperties:()=>Ve,equateStringsCaseInsensitive:()=>Dt,equateStringsCaseSensitive:()=>Et,equateValues:()=>wt,esDecorateHelper:()=>Hw,escapeJsxAttributeString:()=>Ry,escapeLeadingUnderscores:()=>yc,escapeNonAsciiString:()=>Iy,escapeSnippetText:()=>KT,escapeString:()=>Fy,escapeTemplateSubstitution:()=>Sy,evaluatorResult:()=>SC,every:()=>x,executeCommandLine:()=>HW,expandPreOrPostfixIncrementOrDecrementExpression:()=>nA,explainFiles:()=>$U,explainIfFileIsRedirectAndImpliedFormat:()=>qU,exportAssignmentIsAlias:()=>vh,exportStarHelper:()=>mD,expressionResultIsUnused:()=>BT,extend:()=>Qe,extendsHelper:()=>rD,extensionFromPath:()=>sT,extensionIsTS:()=>oT,extensionsNotSupportingExtensionlessResolution:()=>Jk,externalHelpersModuleNameText:()=>G_,factory:()=>YC,fileExtensionIs:()=>Ao,fileExtensionIsOneOf:()=>Io,fileIncludeReasonToDiagnostics:()=>KU,fileShouldUseJavaScriptRequire:()=>GZ,filter:()=>F,filterMutate:()=>A,filterSemanticDiagnostics:()=>vV,find:()=>S,findAncestor:()=>mc,findBestPatternMatch:()=>on,findChildOfKind:()=>uX,findComputedPropertyNameCacheAssignment:()=>rI,findConfigFile:()=>bq,findConstructorDeclaration:()=>CC,findContainingList:()=>_X,findDiagnosticForNode:()=>TZ,findFirstNonJsxWhitespaceToken:()=>CX,findIndex:()=>T,findLast:()=>k,findLastIndex:()=>C,findListItemInfo:()=>cX,findMap:()=>w,findModifier:()=>zQ,findNextToken:()=>DX,findPackageJson:()=>hZ,findPackageJsons:()=>gZ,findPrecedingMatchingToken:()=>RX,findPrecedingToken:()=>EX,findSuperStatementIndexPath:()=>JJ,findTokenOnLeftOfPosition:()=>wX,findUseStrictPrologue:()=>sA,first:()=>Te,firstDefined:()=>g,firstDefinedIterator:()=>h,firstIterator:()=>Ce,firstOrOnly:()=>PZ,firstOrUndefined:()=>Se,firstOrUndefinedIterator:()=>ke,fixupCompilerOptions:()=>A1,flatMap:()=>R,flatMapIterator:()=>J,flatMapToMutable:()=>B,flatten:()=>j,flattenCommaList:()=>oI,flattenDestructuringAssignment:()=>iz,flattenDestructuringBinding:()=>sz,flattenDiagnosticMessageText:()=>Jq,forEach:()=>f,forEachAncestor:()=>cd,forEachAncestorDirectory:()=>ga,forEachChild:()=>LI,forEachChildRecursively:()=>jI,forEachEmittedFile:()=>E$,forEachEnclosingBlockScopeContainer:()=>Fp,forEachEntry:()=>ld,forEachExternalModuleToImportFrom:()=>n0,forEachImportClauseDeclaration:()=>Eg,forEachKey:()=>ud,forEachLeadingCommentRange:()=>fs,forEachNameInAccessChainWalkingLeft:()=>Rx,forEachNameOfDefaultExport:()=>s0,forEachPropertyAssignment:()=>Kf,forEachResolvedProjectReference:()=>tV,forEachReturnStatement:()=>Pf,forEachRight:()=>m,forEachTrailingCommentRange:()=>ms,forEachTsConfigPropArray:()=>Xf,forEachUnique:()=>WQ,forEachYieldExpression:()=>Nf,forSomeAncestorDirectory:()=>Dx,formatColorAndReset:()=>Lq,formatDiagnostic:()=>Nq,formatDiagnostics:()=>Pq,formatDiagnosticsWithColorAndContext:()=>Bq,formatGeneratedName:()=>ZA,formatGeneratedNamePart:()=>YA,formatLocation:()=>Rq,formatMessage:()=>sS,formatStringFromArgs:()=>Yx,formatting:()=>A_e,fullTripleSlashAMDReferencePathRegEx:()=>kf,fullTripleSlashReferencePathRegEx:()=>bf,generateDjb2Hash:()=>Hi,generateTSConfig:()=>LM,generatorHelper:()=>uD,getAdjustedReferenceLocation:()=>vX,getAdjustedRenameLocation:()=>bX,getAliasDeclarationFromName:()=>hh,getAllAccessorDeclarations:()=>Sv,getAllDecoratorsOfClass:()=>WJ,getAllDecoratorsOfClassElement:()=>HJ,getAllJSDocTags:()=>dl,getAllJSDocTagsOfKind:()=>pl,getAllKeys:()=>Be,getAllProjectOutputs:()=>V$,getAllSuperTypeNodes:()=>Ch,getAllowJSCompilerOption:()=>JS,getAllowSyntheticDefaultImports:()=>AS,getAncestor:()=>Eh,getAnyExtensionFromPath:()=>zo,getAreDeclarationMapsEnabled:()=>BS,getAssignedExpandoInitializer:()=>Qm,getAssignedName:()=>Nc,getAssignedNameOfIdentifier:()=>hz,getAssignmentDeclarationKind:()=>ag,getAssignmentDeclarationPropertyAccessKind:()=>gg,getAssignmentTargetKind:()=>Zg,getAutomaticTypeDirectiveNames:()=>oj,getBaseFileName:()=>Bo,getBinaryOperatorPrecedence:()=>yy,getBuildInfo:()=>Q$,getBuildInfoFileVersionMap:()=>aU,getBuildInfoText:()=>X$,getBuildOrderFromAnyBuildOrder:()=>SK,getBuilderCreationParameters:()=>XV,getBuilderFileEmit:()=>PV,getCanonicalDiagnostic:()=>Hp,getCheckFlags:()=>px,getClassExtendsHeritageElement:()=>kh,getClassLikeDeclarationOfSymbol:()=>Cx,getCombinedLocalAndExportSymbolFlags:()=>gx,getCombinedModifierFlags:()=>cc,getCombinedNodeFlags:()=>uc,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>lc,getCommentRange:()=>fw,getCommonSourceDirectory:()=>$$,getCommonSourceDirectoryOfConfig:()=>q$,getCompilerOptionValue:()=>ZS,getCompilerOptionsDiffValue:()=>OM,getConditions:()=>rj,getConfigFileParsingDiagnostics:()=>dV,getConstantValue:()=>kw,getContainerFlags:()=>jR,getContainerNode:()=>UG,getContainingClass:()=>Zf,getContainingClassExcludingClassDecorators:()=>nm,getContainingClassStaticBlock:()=>em,getContainingFunction:()=>Qf,getContainingFunctionDeclaration:()=>Yf,getContainingFunctionOrClassStaticBlock:()=>tm,getContainingNodeArray:()=>zT,getContainingObjectLiteralElement:()=>O7,getContextualTypeFromParent:()=>GY,getContextualTypeFromParentOrAncestorTypeNode:()=>mX,getCurrentTime:()=>bK,getDeclarationDiagnostics:()=>l$,getDeclarationEmitExtensionForPath:()=>tv,getDeclarationEmitOutputFilePath:()=>Zy,getDeclarationEmitOutputFilePathWorker:()=>ev,getDeclarationFileExtension:()=>YI,getDeclarationFromName:()=>ph,getDeclarationModifierFlagsFromSymbol:()=>fx,getDeclarationOfKind:()=>Y_,getDeclarationsOfKind:()=>Z_,getDeclaredExpandoInitializer:()=>Xm,getDecorators:()=>Fc,getDefaultCompilerOptions:()=>k7,getDefaultFormatCodeSettings:()=>rG,getDefaultLibFileName:()=>Ls,getDefaultLibFilePath:()=>L7,getDefaultLikeExportInfo:()=>o0,getDefaultLikeExportNameFromDeclaration:()=>IZ,getDiagnosticText:()=>eM,getDiagnosticsWithinSpan:()=>CZ,getDirectoryPath:()=>Ro,getDirectoryToWatchFailedLookupLocation:()=>yU,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>xU,getDocumentPositionMapper:()=>u1,getDocumentSpansEqualityComparer:()=>KQ,getESModuleInterop:()=>FS,getEditsForFileRename:()=>E0,getEffectiveBaseTypeNode:()=>Sh,getEffectiveConstraintOfTypeParameter:()=>gl,getEffectiveContainerForJSDocTemplateTag:()=>qg,getEffectiveImplementsTypeNodes:()=>Th,getEffectiveInitializer:()=>Gm,getEffectiveJSDocHost:()=>Kg,getEffectiveModifierFlags:()=>Qv,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>Yv,getEffectiveModifierFlagsNoCache:()=>nb,getEffectiveReturnTypeNode:()=>Cv,getEffectiveSetAccessorTypeAnnotationNode:()=>Dv,getEffectiveTypeAnnotationNode:()=>kv,getEffectiveTypeParameterDeclarations:()=>ml,getEffectiveTypeRoots:()=>QL,getElementOrPropertyAccessArgumentExpressionOrName:()=>fg,getElementOrPropertyAccessName:()=>mg,getElementsOfBindingOrAssignmentPattern:()=>FA,getEmitDeclarations:()=>LS,getEmitFlags:()=>Yd,getEmitHelpers:()=>Ew,getEmitModuleDetectionKind:()=>PS,getEmitModuleKind:()=>DS,getEmitModuleResolutionKind:()=>ES,getEmitScriptTarget:()=>wS,getEmitStandardClassFields:()=>GS,getEnclosingBlockScopeContainer:()=>Np,getEnclosingContainer:()=>Pp,getEncodedSemanticClassifications:()=>h0,getEncodedSyntacticClassifications:()=>S0,getEndLinePosition:()=>Ed,getEntityNameFromTypeNode:()=>fm,getEntrypointsFromPackageJsonInfo:()=>Uj,getErrorCountForSummary:()=>MU,getErrorSpanForNode:()=>Qp,getErrorSummaryText:()=>BU,getEscapedTextOfIdentifierOrLiteral:()=>Gh,getEscapedTextOfJsxAttributeName:()=>lC,getEscapedTextOfJsxNamespacedName:()=>dC,getExpandoInitializer:()=>Ym,getExportAssignmentExpression:()=>bh,getExportInfoMap:()=>i0,getExportNeedsImportStarHelper:()=>wJ,getExpressionAssociativity:()=>dy,getExpressionPrecedence:()=>fy,getExternalHelpersModuleName:()=>yA,getExternalModuleImportEqualsDeclarationExpression:()=>Pm,getExternalModuleName:()=>Cg,getExternalModuleNameFromDeclaration:()=>Xy,getExternalModuleNameFromPath:()=>Qy,getExternalModuleNameLiteral:()=>kA,getExternalModuleRequireArgument:()=>Nm,getFallbackOptions:()=>yq,getFileEmitOutput:()=>CV,getFileMatcherPatterns:()=>kk,getFileNamesFromConfigSpecs:()=>xL,getFileWatcherEventKind:()=>so,getFilesInErrorForSummary:()=>LU,getFirstConstructorWithBody:()=>pv,getFirstIdentifier:()=>bb,getFirstNonSpaceCharacterPosition:()=>EY,getFirstProjectOutput:()=>K$,getFixableErrorSpanExpression:()=>DZ,getFormatCodeSettingsForWriting:()=>UZ,getFullWidth:()=>pd,getFunctionFlags:()=>Jh,getHeritageClause:()=>Dh,getHostSignatureFromJSDoc:()=>Ug,getIdentifierAutoGenerate:()=>Rw,getIdentifierGeneratedImportReference:()=>Jw,getIdentifierTypeArguments:()=>Lw,getImmediatelyInvokedFunctionExpression:()=>cm,getImpliedNodeFormatForFile:()=>pV,getImpliedNodeFormatForFileWorker:()=>fV,getImportNeedsImportDefaultHelper:()=>EJ,getImportNeedsImportStarHelper:()=>DJ,getIndentSize:()=>qy,getIndentString:()=>$y,getInferredLibraryNameResolveFrom:()=>iV,getInitializedVariables:()=>lx,getInitializerOfBinaryExpression:()=>hg,getInitializerOfBindingOrAssignmentElement:()=>CA,getInterfaceBaseTypeNodes:()=>wh,getInternalEmitFlags:()=>Zd,getInvokedExpression:()=>mm,getIsolatedModules:()=>NS,getJSDocAugmentsTag:()=>Jc,getJSDocClassTag:()=>$c,getJSDocCommentRanges:()=>vf,getJSDocCommentsAndTags:()=>Bg,getJSDocDeprecatedTag:()=>Yc,getJSDocDeprecatedTagNoCache:()=>Zc,getJSDocEnumTag:()=>el,getJSDocHost:()=>Wg,getJSDocImplementsTags:()=>zc,getJSDocOverloadTags:()=>Vg,getJSDocOverrideTagNoCache:()=>Qc,getJSDocParameterTags:()=>Oc,getJSDocParameterTagsNoCache:()=>Mc,getJSDocPrivateTag:()=>Uc,getJSDocPrivateTagNoCache:()=>Kc,getJSDocProtectedTag:()=>Wc,getJSDocProtectedTagNoCache:()=>Hc,getJSDocPublicTag:()=>qc,getJSDocPublicTagNoCache:()=>Vc,getJSDocReadonlyTag:()=>Gc,getJSDocReadonlyTagNoCache:()=>Xc,getJSDocReturnTag:()=>nl,getJSDocReturnType:()=>sl,getJSDocRoot:()=>Hg,getJSDocSatisfiesExpressionType:()=>sC,getJSDocSatisfiesTag:()=>il,getJSDocTags:()=>ll,getJSDocTagsNoCache:()=>ul,getJSDocTemplateTag:()=>rl,getJSDocThisTag:()=>tl,getJSDocType:()=>al,getJSDocTypeAliasName:()=>AA,getJSDocTypeAssertionType:()=>dA,getJSDocTypeParameterDeclarations:()=>wv,getJSDocTypeParameterTags:()=>jc,getJSDocTypeParameterTagsNoCache:()=>Rc,getJSDocTypeTag:()=>ol,getJSXImplicitImportBase:()=>tk,getJSXRuntimeImport:()=>nk,getJSXTransformEnabled:()=>ek,getKeyForCompilerOptions:()=>lj,getLanguageVariant:()=>bS,getLastChild:()=>Nx,getLeadingCommentRanges:()=>vs,getLeadingCommentRangesOfNode:()=>yf,getLeftmostAccessExpression:()=>jx,getLeftmostExpression:()=>Bx,getLibraryNameFromLibFileName:()=>oV,getLineAndCharacterOfPosition:()=>Xa,getLineInfo:()=>aJ,getLineOfLocalPosition:()=>_v,getLineOfLocalPositionFromLineMap:()=>dv,getLineStartPositionForPosition:()=>GG,getLineStarts:()=>Ka,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>sx,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>ax,getLinesBetweenPositions:()=>Ga,getLinesBetweenRangeEndAndRangeStart:()=>tx,getLinesBetweenRangeEndPositions:()=>nx,getLiteralText:()=>np,getLocalNameForExternalImport:()=>SA,getLocalSymbolForExportDefault:()=>Ab,getLocaleSpecificMessage:()=>tS,getLocaleTimeString:()=>AU,getMappedContextSpan:()=>QQ,getMappedDocumentSpan:()=>XQ,getMappedLocation:()=>GQ,getMatchedFileSpec:()=>VU,getMatchedIncludeSpec:()=>UU,getMeaningFromDeclaration:()=>hG,getMeaningFromLocation:()=>yG,getMembersOfDeclaration:()=>Af,getModeForFileReference:()=>zq,getModeForResolutionAtIndex:()=>$q,getModeForUsageLocation:()=>Vq,getModifiedTime:()=>Zi,getModifiers:()=>Ac,getModuleInstanceState:()=>DR,getModuleNameStringLiteralAt:()=>TV,getModuleSpecifierEndingPreference:()=>Wk,getModuleSpecifierResolverHost:()=>wQ,getNameForExportedSymbol:()=>FZ,getNameFromImportAttribute:()=>xC,getNameFromIndexInfo:()=>Ip,getNameFromPropertyName:()=>xQ,getNameOfAccessExpression:()=>Mx,getNameOfCompilerOptionValue:()=>FM,getNameOfDeclaration:()=>Pc,getNameOfExpando:()=>eg,getNameOfJSDocTypedef:()=>wc,getNameOfScriptTarget:()=>HS,getNameOrArgument:()=>pg,getNameTable:()=>I7,getNamesForExportedSymbol:()=>NZ,getNamespaceDeclarationNode:()=>wg,getNewLineCharacter:()=>$b,getNewLineKind:()=>qZ,getNewLineOrDefaultFromHost:()=>gY,getNewTargetContainer:()=>am,getNextJSDocCommentLocation:()=>zg,getNodeChildren:()=>zF,getNodeForGeneratedName:()=>QA,getNodeId:()=>IB,getNodeKind:()=>KG,getNodeModifiers:()=>KX,getNodeModulePathParts:()=>XT,getNonAssignedNameOfDeclaration:()=>Ec,getNonAssignmentOperatorForCompoundAssignment:()=>jJ,getNonAugmentationDeclaration:()=>gp,getNonDecoratorTokenPosOfNode:()=>Ud,getNormalizedAbsolutePath:()=>Go,getNormalizedAbsolutePathWithoutRoot:()=>Qo,getNormalizedPathComponents:()=>Ho,getObjectFlags:()=>wx,getOperator:()=>my,getOperatorAssociativity:()=>py,getOperatorPrecedence:()=>hy,getOptionFromName:()=>GO,getOptionsForLibraryResolution:()=>vj,getOptionsNameMap:()=>MO,getOrCreateEmitNode:()=>tw,getOrCreateExternalHelpersModuleNameIfNeeded:()=>xA,getOrUpdate:()=>K,getOriginalNode:()=>fc,getOriginalNodeId:()=>SJ,getOriginalSourceFile:()=>uy,getOutputDeclarationFileName:()=>M$,getOutputDeclarationFileNameWorker:()=>L$,getOutputExtension:()=>I$,getOutputFileNames:()=>U$,getOutputJSFileNameWorker:()=>R$,getOutputPathsFor:()=>F$,getOutputPathsForBundle:()=>N$,getOwnEmitOutputFilePath:()=>Yy,getOwnKeys:()=>Re,getOwnValues:()=>Je,getPackageJsonInfo:()=>Qj,getPackageJsonTypesVersionsPaths:()=>XL,getPackageJsonsVisibleToFile:()=>yZ,getPackageNameFromTypesPackageName:()=>gR,getPackageScopeForPath:()=>Hj,getParameterSymbolFromJSDoc:()=>$g,getParameterTypeNode:()=>QT,getParentNodeInSpan:()=>BQ,getParseTreeNode:()=>hc,getParsedCommandLineOfConfigFile:()=>tM,getPathComponents:()=>$o,getPathComponentsRelativeTo:()=>_a,getPathFromPathComponents:()=>qo,getPathUpdater:()=>P0,getPathsBasePath:()=>rv,getPatternFromSpec:()=>bk,getPendingEmitKind:()=>NV,getPositionOfLineAndCharacter:()=>Va,getPossibleGenericSignatures:()=>zX,getPossibleOriginalInputExtensionForExtension:()=>nv,getPossibleTypeArgumentsInfo:()=>$X,getPreEmitDiagnostics:()=>Eq,getPrecedingNonSpaceCharacterPosition:()=>PY,getPrivateIdentifier:()=>YJ,getProperties:()=>zJ,getProperty:()=>je,getPropertyArrayElementValue:()=>Wf,getPropertyAssignmentAliasLikeExpression:()=>xh,getPropertyNameForPropertyNameNode:()=>Kh,getPropertyNameForUniqueESSymbol:()=>Xh,getPropertyNameFromType:()=>gC,getPropertyNameOfBindingOrAssignmentElement:()=>EA,getPropertySymbolFromBindingElement:()=>RQ,getPropertySymbolsFromContextualType:()=>M7,getQuoteFromPreference:()=>IQ,getQuotePreference:()=>AQ,getRangesWhere:()=>Y,getRefactorContextSpan:()=>wZ,getReferencedFileLocation:()=>uV,getRegexFromPattern:()=>Tk,getRegularExpressionForWildcard:()=>hk,getRegularExpressionsForWildcards:()=>yk,getRelativePathFromDirectory:()=>da,getRelativePathFromFile:()=>fa,getRelativePathToDirectoryOrUrl:()=>ma,getRenameLocation:()=>$Y,getReplacementSpanForContextToken:()=>oQ,getResolutionDiagnostic:()=>SV,getResolutionModeOverride:()=>Kq,getResolveJsonModule:()=>MS,getResolvePackageJsonExports:()=>IS,getResolvePackageJsonImports:()=>OS,getResolvedExternalModuleName:()=>Hy,getRestIndicatorOfBindingOrAssignmentElement:()=>DA,getRestParameterElementType:()=>Ff,getRightMostAssignedExpression:()=>ng,getRootDeclaration:()=>sy,getRootDirectoryOfResolutionCache:()=>SU,getRootLength:()=>jo,getRootPathSplitLength:()=>kU,getScriptKind:()=>TY,getScriptKindFromFileName:()=>Pk,getScriptTargetFeatures:()=>ep,getSelectedEffectiveModifierFlags:()=>Hv,getSelectedSyntacticModifierFlags:()=>Gv,getSemanticClassifications:()=>m0,getSemanticJsxChildren:()=>vy,getSetAccessorTypeAnnotationNode:()=>mv,getSetAccessorValueParameter:()=>fv,getSetExternalModuleIndicator:()=>TS,getShebang:()=>xs,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>Og,getSingleVariableOfVariableStatement:()=>Mg,getSnapshotText:()=>yQ,getSnippetElement:()=>Nw,getSourceFileOfModule:()=>kd,getSourceFileOfNode:()=>Sd,getSourceFilePathInNewDir:()=>av,getSourceFilePathInNewDirWorker:()=>sv,getSourceFileVersionAsHashFromText:()=>nK,getSourceFilesToEmit:()=>iv,getSourceMapRange:()=>cw,getSourceMapper:()=>l1,getSourceTextOfNodeFromSourceFile:()=>Kd,getSpanOfTokenAtPosition:()=>Gp,getSpellingSuggestion:()=>Ut,getStartPositionOfLine:()=>wd,getStartPositionOfRange:()=>ox,getStartsOnNewLine:()=>dw,getStaticPropertiesAndClassStaticBlock:()=>qJ,getStrictOptionValue:()=>WS,getStringComparer:()=>Lt,getSubPatternFromSpec:()=>xk,getSuperCallFromStatement:()=>RJ,getSuperContainer:()=>sm,getSupportedCodeFixes:()=>T7,getSupportedExtensions:()=>zk,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>$k,getSwitchedType:()=>eZ,getSymbolId:()=>OB,getSymbolNameForPrivateIdentifier:()=>Qh,getSymbolParentOrFail:()=>OZ,getSymbolTarget:()=>CY,getSyntacticClassifications:()=>x0,getSyntacticModifierFlags:()=>Zv,getSyntacticModifierFlagsNoCache:()=>rb,getSynthesizedDeepClone:()=>NY,getSynthesizedDeepCloneWithReplacements:()=>FY,getSynthesizedDeepClones:()=>IY,getSynthesizedDeepClonesWithReplacements:()=>OY,getSyntheticLeadingComments:()=>gw,getSyntheticTrailingComments:()=>vw,getTargetLabel:()=>AG,getTargetOfBindingOrAssignmentElement:()=>wA,getTemporaryModuleResolutionState:()=>Wj,getTextOfConstantValue:()=>rp,getTextOfIdentifierOrLiteral:()=>Hh,getTextOfJSDocComment:()=>fl,getTextOfJsxAttributeName:()=>uC,getTextOfJsxNamespacedName:()=>pC,getTextOfNode:()=>Gd,getTextOfNodeFromSourceText:()=>Hd,getTextOfPropertyName:()=>Lp,getThisContainer:()=>rm,getThisParameter:()=>gv,getTokenAtPosition:()=>kX,getTokenPosOfNode:()=>Vd,getTokenSourceMapRange:()=>uw,getTouchingPropertyName:()=>xX,getTouchingToken:()=>SX,getTrailingCommentRanges:()=>bs,getTrailingSemicolonDeferringWriter:()=>Uy,getTransformFlagsSubtreeExclusions:()=>HC,getTransformers:()=>g$,getTsBuildInfoEmitOutputFilePath:()=>P$,getTsConfigObjectLiteralExpression:()=>Hf,getTsConfigPropArrayElementValue:()=>Gf,getTypeAnnotationNode:()=>Tv,getTypeArgumentOrTypeParameterList:()=>WX,getTypeKeywordOfTypeOnlyImport:()=>qQ,getTypeNode:()=>Ow,getTypeNodeIfAccessible:()=>nZ,getTypeParameterFromJsDoc:()=>Gg,getTypeParameterOwner:()=>nc,getTypesPackageName:()=>fR,getUILocale:()=>Jt,getUniqueName:()=>zY,getUniqueSymbolId:()=>DY,getUseDefineForClassFields:()=>zS,getWatchErrorSummaryDiagnosticMessage:()=>jU,getWatchFactory:()=>hq,group:()=>He,groupBy:()=>Ge,guessIndentation:()=>z_,handleNoEmitOptions:()=>yV,handleWatchOptionsConfigDirTemplateSubstitution:()=>KM,hasAbstractModifier:()=>qv,hasAccessorModifier:()=>Uv,hasAmbientModifier:()=>Vv,hasChangesInResolutions:()=>bd,hasChildOfKind:()=>lX,hasContextSensitiveParameters:()=>$T,hasDecorators:()=>Wv,hasDocComment:()=>VX,hasDynamicName:()=>Vh,hasEffectiveModifier:()=>Rv,hasEffectiveModifiers:()=>Lv,hasEffectiveReadonlyModifier:()=>Kv,hasExtension:()=>Fo,hasIndexSignature:()=>ZY,hasInferredType:()=>PC,hasInitializer:()=>L_,hasInvalidEscape:()=>Ty,hasJSDocNodes:()=>O_,hasJSDocParameterTags:()=>Bc,hasJSFileExtension:()=>qk,hasJsonModuleEmitEnabled:()=>qS,hasOnlyExpressionInitializer:()=>j_,hasOverrideModifier:()=>$v,hasPossibleExternalModuleReference:()=>Dp,hasProperty:()=>Le,hasPropertyAccessExpressionWithName:()=>IG,hasQuestionToken:()=>Pg,hasRecordedExternalHelpers:()=>vA,hasResolutionModeOverride:()=>yC,hasRestParameter:()=>V_,hasScopeMarker:()=>t_,hasStaticModifier:()=>zv,hasSyntacticModifier:()=>Bv,hasSyntacticModifiers:()=>jv,hasTSFileExtension:()=>Vk,hasTabstop:()=>nC,hasTrailingDirectorySeparator:()=>Oo,hasType:()=>M_,hasTypeArguments:()=>Xg,hasZeroOrOneAsteriskCharacter:()=>rk,helperString:()=>Vw,hostGetCanonicalFileName:()=>Wy,hostUsesCaseSensitiveFileNames:()=>Ky,idText:()=>bc,identifierIsThisKeyword:()=>xv,identifierToKeywordKind:()=>xc,identity:()=>mt,identitySourceMapConsumer:()=>xJ,ignoreSourceNewlines:()=>Aw,ignoredPaths:()=>co,importDefaultHelper:()=>fD,importFromModuleSpecifier:()=>kg,importStarHelper:()=>pD,indexOfAnyCharCode:()=>P,indexOfNode:()=>Qd,indicesOf:()=>te,inferredTypesContainingFile:()=>rV,injectClassNamedEvaluationHelperBlockIfMissing:()=>kz,injectClassThisAssignmentIfMissing:()=>gz,insertImports:()=>$Q,insertLeadingStatement:()=>YF,insertSorted:()=>ie,insertStatementAfterCustomPrologue:()=>Jd,insertStatementAfterStandardPrologue:()=>Bd,insertStatementsAfterCustomPrologue:()=>Rd,insertStatementsAfterStandardPrologue:()=>jd,intersperse:()=>b,intrinsicTagNameToString:()=>fC,introducesArgumentsExoticObject:()=>Bf,inverseJsxOptionMap:()=>_O,isAbstractConstructorSymbol:()=>Tx,isAbstractModifier:()=>YD,isAccessExpression:()=>Ox,isAccessibilityModifier:()=>ZX,isAccessor:()=>hu,isAccessorModifier:()=>eE,isAliasSymbolDeclaration:()=>gh,isAliasableExpression:()=>yh,isAmbientModule:()=>sp,isAmbientPropertyDeclaration:()=>vp,isAnonymousFunctionDefinition:()=>ny,isAnyDirectorySeparator:()=>To,isAnyImportOrBareOrAccessedRequire:()=>Tp,isAnyImportOrReExport:()=>Ep,isAnyImportOrRequireStatement:()=>Cp,isAnyImportSyntax:()=>kp,isAnySupportedFileExtension:()=>cT,isApplicableVersionedTypesKey:()=>aR,isArgumentExpressionOfElementAccess:()=>JG,isArray:()=>ot,isArrayBindingElement:()=>Nu,isArrayBindingOrAssignmentElement:()=>ju,isArrayBindingOrAssignmentPattern:()=>Lu,isArrayBindingPattern:()=>UE,isArrayLiteralExpression:()=>WE,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>tQ,isArrayTypeNode:()=>wE,isArrowFunction:()=>rP,isAsExpression:()=>yP,isAssertClause:()=>sN,isAssertEntry:()=>cN,isAssertionExpression:()=>Qu,isAssertsKeyword:()=>HD,isAssignmentDeclaration:()=>Hm,isAssignmentExpression:()=>mb,isAssignmentOperator:()=>db,isAssignmentPattern:()=>Pu,isAssignmentTarget:()=>eh,isAsteriskToken:()=>jD,isAsyncFunction:()=>zh,isAsyncModifier:()=>WD,isAutoAccessorPropertyDeclaration:()=>yu,isAwaitExpression:()=>sP,isAwaitKeyword:()=>GD,isBigIntLiteral:()=>CD,isBinaryExpression:()=>uP,isBinaryOperatorToken:()=>UA,isBindableObjectDefinePropertyCall:()=>sg,isBindableStaticAccessExpression:()=>ug,isBindableStaticElementAccessExpression:()=>_g,isBindableStaticNameExpression:()=>dg,isBindingElement:()=>KE,isBindingElementOfBareOrAccessedRequire:()=>qm,isBindingName:()=>su,isBindingOrAssignmentElement:()=>Au,isBindingOrAssignmentPattern:()=>Iu,isBindingPattern:()=>Eu,isBlock:()=>DP,isBlockLike:()=>XZ,isBlockOrCatchScoped:()=>op,isBlockScope:()=>bp,isBlockScopedContainerTopLevel:()=>dp,isBooleanLiteral:()=>_u,isBreakOrContinueStatement:()=>Nl,isBreakStatement:()=>RP,isBuild:()=>WW,isBuildInfoFile:()=>D$,isBuilderProgram:()=>JU,isBundle:()=>VN,isCallChain:()=>xl,isCallExpression:()=>QE,isCallExpressionTarget:()=>bG,isCallLikeExpression:()=>zu,isCallLikeOrFunctionLikeExpression:()=>Ju,isCallOrNewExpression:()=>$u,isCallOrNewExpressionTarget:()=>SG,isCallSignatureDeclaration:()=>hE,isCallToHelper:()=>kD,isCaseBlock:()=>tN,isCaseClause:()=>MN,isCaseKeyword:()=>rE,isCaseOrDefaultClause:()=>E_,isCatchClause:()=>RN,isCatchClauseVariableDeclaration:()=>VT,isCatchClauseVariableDeclarationOrBindingElement:()=>ap,isCheckJsEnabledForFile:()=>uT,isChildOfNodeWithKind:()=>Ef,isCircularBuildOrder:()=>xK,isClassDeclaration:()=>GP,isClassElement:()=>mu,isClassExpression:()=>mP,isClassInstanceProperty:()=>vu,isClassLike:()=>gu,isClassMemberModifier:()=>ru,isClassNamedEvaluationHelperBlock:()=>bz,isClassOrTypeElement:()=>Tu,isClassStaticBlockDeclaration:()=>pE,isClassThisAssignmentBlock:()=>fz,isCollapsedRange:()=>Hb,isColonToken:()=>JD,isCommaExpression:()=>lA,isCommaListExpression:()=>TP,isCommaSequence:()=>uA,isCommaToken:()=>OD,isComment:()=>HX,isCommonJsExportPropertyAssignment:()=>jf,isCommonJsExportedExpression:()=>Lf,isCompoundAssignment:()=>LJ,isComputedNonLiteralName:()=>Op,isComputedPropertyName:()=>oE,isConciseBody:()=>o_,isConditionalExpression:()=>_P,isConditionalTypeNode:()=>IE,isConstAssertion:()=>TC,isConstTypeReference:()=>Dl,isConstructSignatureDeclaration:()=>yE,isConstructorDeclaration:()=>fE,isConstructorTypeNode:()=>kE,isContextualKeyword:()=>Ah,isContinueStatement:()=>jP,isCustomPrologue:()=>ff,isDebuggerStatement:()=>UP,isDeclaration:()=>h_,isDeclarationBindingElement:()=>Fu,isDeclarationFileName:()=>QI,isDeclarationName:()=>dh,isDeclarationNameOfEnumOrNamespace:()=>cx,isDeclarationReadonly:()=>nf,isDeclarationStatement:()=>y_,isDeclarationWithTypeParameterChildren:()=>Sp,isDeclarationWithTypeParameters:()=>xp,isDecorator:()=>cE,isDecoratorTarget:()=>TG,isDefaultClause:()=>LN,isDefaultImport:()=>Dg,isDefaultModifier:()=>KD,isDefaultedExpandoInitializer:()=>Zm,isDeleteExpression:()=>iP,isDeleteTarget:()=>uh,isDeprecatedDeclaration:()=>zZ,isDestructuringAssignment:()=>hb,isDiagnosticWithLocation:()=>kZ,isDiskPathRoot:()=>Do,isDoStatement:()=>AP,isDocumentRegistryEntry:()=>k0,isDotDotDotToken:()=>ID,isDottedName:()=>xb,isDynamicName:()=>Uh,isESSymbolIdentifier:()=>ey,isEffectiveExternalModule:()=>hp,isEffectiveModuleDeclaration:()=>up,isEffectiveStrictModeSourceFile:()=>yp,isElementAccessChain:()=>bl,isElementAccessExpression:()=>XE,isEmittedFileOfProgram:()=>mq,isEmptyArrayLiteral:()=>Fb,isEmptyBindingElement:()=>oc,isEmptyBindingPattern:()=>ic,isEmptyObjectLiteral:()=>Nb,isEmptyStatement:()=>PP,isEmptyStringLiteral:()=>Sm,isEntityName:()=>ou,isEntityNameExpression:()=>vb,isEnumConst:()=>tf,isEnumDeclaration:()=>YP,isEnumMember:()=>$N,isEqualityOperatorKind:()=>QY,isEqualsGreaterThanToken:()=>$D,isExclamationToken:()=>RD,isExcludedFile:()=>SL,isExclusivelyTypeOnlyImportOrExport:()=>qq,isExpandoPropertyDeclaration:()=>hC,isExportAssignment:()=>mN,isExportDeclaration:()=>gN,isExportModifier:()=>UD,isExportName:()=>oA,isExportNamespaceAsDefaultDeclaration:()=>Wd,isExportOrDefaultModifier:()=>HA,isExportSpecifier:()=>yN,isExportsIdentifier:()=>rg,isExportsOrModuleExportsOrAlias:()=>LR,isExpression:()=>Xu,isExpressionNode:()=>Tm,isExpressionOfExternalModuleImportEqualsDeclaration:()=>VG,isExpressionOfOptionalChainRoot:()=>Tl,isExpressionStatement:()=>NP,isExpressionWithTypeArguments:()=>hP,isExpressionWithTypeArgumentsInClassExtendsClause:()=>yb,isExternalModule:()=>qI,isExternalModuleAugmentation:()=>fp,isExternalModuleImportEqualsDeclaration:()=>Em,isExternalModuleIndicator:()=>r_,isExternalModuleNameRelative:()=>Os,isExternalModuleReference:()=>SN,isExternalModuleSymbol:()=>nd,isExternalOrCommonJsModule:()=>Zp,isFileLevelReservedGeneratedIdentifier:()=>Yl,isFileLevelUniqueName:()=>Pd,isFileProbablyExternalModule:()=>mI,isFirstDeclarationOfSymbolParameter:()=>YQ,isFixablePromiseHandler:()=>y1,isForInOrOfStatement:()=>i_,isForInStatement:()=>MP,isForInitializer:()=>s_,isForOfStatement:()=>LP,isForStatement:()=>OP,isFullSourceFile:()=>Am,isFunctionBlock:()=>zf,isFunctionBody:()=>a_,isFunctionDeclaration:()=>HP,isFunctionExpression:()=>nP,isFunctionExpressionOrArrowFunction:()=>UT,isFunctionLike:()=>cu,isFunctionLikeDeclaration:()=>uu,isFunctionLikeKind:()=>pu,isFunctionLikeOrClassStaticBlockDeclaration:()=>lu,isFunctionOrConstructorTypeNode:()=>Du,isFunctionOrModuleBlock:()=>fu,isFunctionSymbol:()=>xg,isFunctionTypeNode:()=>SE,isFutureReservedKeyword:()=>Oh,isGeneratedIdentifier:()=>Xl,isGeneratedPrivateIdentifier:()=>Ql,isGetAccessor:()=>I_,isGetAccessorDeclaration:()=>mE,isGetOrSetAccessorDeclaration:()=>yl,isGlobalDeclaration:()=>BZ,isGlobalScopeAugmentation:()=>pp,isGlobalSourceFile:()=>Yp,isGrammarError:()=>Ad,isHeritageClause:()=>jN,isHoistedFunction:()=>mf,isHoistedVariableStatement:()=>hf,isIdentifier:()=>qD,isIdentifierANonContextualKeyword:()=>jh,isIdentifierName:()=>mh,isIdentifierOrThisTypeNode:()=>RA,isIdentifierPart:()=>ks,isIdentifierStart:()=>Ss,isIdentifierText:()=>Ts,isIdentifierTypePredicate:()=>Vf,isIdentifierTypeReference:()=>DT,isIfStatement:()=>FP,isIgnoredFileFromWildCardWatching:()=>fq,isImplicitGlob:()=>vk,isImportAttribute:()=>uN,isImportAttributeName:()=>Gl,isImportAttributes:()=>lN,isImportCall:()=>uf,isImportClause:()=>oN,isImportDeclaration:()=>iN,isImportEqualsDeclaration:()=>rN,isImportKeyword:()=>nE,isImportMeta:()=>_f,isImportOrExportSpecifier:()=>Vl,isImportOrExportSpecifierName:()=>kY,isImportSpecifier:()=>fN,isImportTypeAssertionContainer:()=>aN,isImportTypeNode:()=>zE,isImportableFile:()=>t0,isInComment:()=>qX,isInCompoundLikeAssignment:()=>th,isInExpressionContext:()=>Cm,isInJSDoc:()=>Rm,isInJSFile:()=>Mm,isInJSXText:()=>LX,isInJsonFile:()=>Lm,isInNonReferenceComment:()=>rQ,isInReferenceComment:()=>nQ,isInRightSideOfInternalImportEqualsDeclaration:()=>vG,isInString:()=>AX,isInTemplateString:()=>MX,isInTopLevelContext:()=>om,isInTypeQuery:()=>vv,isIncrementalCompilation:()=>RS,isIndexSignatureDeclaration:()=>vE,isIndexedAccessTypeNode:()=>RE,isInferTypeNode:()=>OE,isInfinityOrNaNString:()=>qT,isInitializedProperty:()=>VJ,isInitializedVariable:()=>ux,isInsideJsxElement:()=>jX,isInsideJsxElementOrAttribute:()=>IX,isInsideNodeModules:()=>SZ,isInsideTemplateLiteral:()=>YX,isInstanceOfExpression:()=>Eb,isInstantiatedModule:()=>MB,isInterfaceDeclaration:()=>XP,isInternalDeclaration:()=>W_,isInternalModuleImportEqualsDeclaration:()=>Fm,isInternalName:()=>rA,isIntersectionTypeNode:()=>AE,isIntrinsicJsxName:()=>Jy,isIterationStatement:()=>Zu,isJSDoc:()=>oF,isJSDocAllType:()=>QN,isJSDocAugmentsTag:()=>cF,isJSDocAuthorTag:()=>lF,isJSDocCallbackTag:()=>_F,isJSDocClassTag:()=>uF,isJSDocCommentContainingNode:()=>N_,isJSDocConstructSignature:()=>Ng,isJSDocDeprecatedTag:()=>yF,isJSDocEnumTag:()=>bF,isJSDocFunctionType:()=>nF,isJSDocImplementsTag:()=>PF,isJSDocImportTag:()=>AF,isJSDocIndexSignature:()=>Bm,isJSDocLikeText:()=>fI,isJSDocLink:()=>HN,isJSDocLinkCode:()=>GN,isJSDocLinkLike:()=>q_,isJSDocLinkPlain:()=>XN,isJSDocMemberName:()=>WN,isJSDocNameReference:()=>KN,isJSDocNamepathType:()=>iF,isJSDocNamespaceBody:()=>u_,isJSDocNode:()=>P_,isJSDocNonNullableType:()=>eF,isJSDocNullableType:()=>ZN,isJSDocOptionalParameter:()=>rC,isJSDocOptionalType:()=>tF,isJSDocOverloadTag:()=>hF,isJSDocOverrideTag:()=>gF,isJSDocParameterTag:()=>xF,isJSDocPrivateTag:()=>pF,isJSDocPropertyLikeTag:()=>Al,isJSDocPropertyTag:()=>EF,isJSDocProtectedTag:()=>fF,isJSDocPublicTag:()=>dF,isJSDocReadonlyTag:()=>mF,isJSDocReturnTag:()=>SF,isJSDocSatisfiesExpression:()=>aC,isJSDocSatisfiesTag:()=>NF,isJSDocSeeTag:()=>vF,isJSDocSignature:()=>sF,isJSDocTag:()=>F_,isJSDocTemplateTag:()=>CF,isJSDocThisTag:()=>kF,isJSDocThrowsTag:()=>FF,isJSDocTypeAlias:()=>Fg,isJSDocTypeAssertion:()=>_A,isJSDocTypeExpression:()=>UN,isJSDocTypeLiteral:()=>aF,isJSDocTypeTag:()=>TF,isJSDocTypedefTag:()=>wF,isJSDocUnknownTag:()=>DF,isJSDocUnknownType:()=>YN,isJSDocVariadicType:()=>rF,isJSXTagName:()=>km,isJsonEqual:()=>bT,isJsonSourceFile:()=>ef,isJsxAttribute:()=>NN,isJsxAttributeLike:()=>C_,isJsxAttributeName:()=>_C,isJsxAttributes:()=>FN,isJsxChild:()=>T_,isJsxClosingElement:()=>wN,isJsxClosingFragment:()=>PN,isJsxElement:()=>kN,isJsxExpression:()=>IN,isJsxFragment:()=>DN,isJsxNamespacedName:()=>ON,isJsxOpeningElement:()=>CN,isJsxOpeningFragment:()=>EN,isJsxOpeningLikeElement:()=>D_,isJsxOpeningLikeElementTagName:()=>CG,isJsxSelfClosingElement:()=>TN,isJsxSpreadAttribute:()=>AN,isJsxTagNameExpression:()=>k_,isJsxText:()=>DD,isJumpStatementTarget:()=>OG,isKeyword:()=>Ph,isKeywordOrPunctuation:()=>Fh,isKnownSymbol:()=>Yh,isLabelName:()=>LG,isLabelOfLabeledStatement:()=>MG,isLabeledStatement:()=>$P,isLateVisibilityPaintedStatement:()=>wp,isLeftHandSideExpression:()=>Vu,isLeftHandSideOfAssignment:()=>gb,isLet:()=>cf,isLineBreak:()=>Za,isLiteralComputedPropertyDeclarationName:()=>fh,isLiteralExpression:()=>Bl,isLiteralExpressionOfObject:()=>Jl,isLiteralImportTypeNode:()=>df,isLiteralKind:()=>Rl,isLiteralLikeAccess:()=>cg,isLiteralLikeElementAccess:()=>lg,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>qG,isLiteralTypeLikeExpression:()=>$A,isLiteralTypeLiteral:()=>Gu,isLiteralTypeNode:()=>JE,isLocalName:()=>iA,isLogicalOperator:()=>sb,isLogicalOrCoalescingAssignmentExpression:()=>lb,isLogicalOrCoalescingAssignmentOperator:()=>cb,isLogicalOrCoalescingBinaryExpression:()=>_b,isLogicalOrCoalescingBinaryOperator:()=>ub,isMappedTypeNode:()=>BE,isMemberName:()=>hl,isMetaProperty:()=>xP,isMethodDeclaration:()=>dE,isMethodOrAccessor:()=>bu,isMethodSignature:()=>_E,isMinusToken:()=>LD,isMissingDeclaration:()=>vN,isMissingPackageJsonInfo:()=>sj,isModifier:()=>iu,isModifierKind:()=>tu,isModifierLike:()=>Su,isModuleAugmentationExternal:()=>mp,isModuleBlock:()=>eN,isModuleBody:()=>c_,isModuleDeclaration:()=>ZP,isModuleExportsAccessExpression:()=>og,isModuleIdentifier:()=>ig,isModuleName:()=>zA,isModuleOrEnumDeclaration:()=>d_,isModuleReference:()=>S_,isModuleSpecifierLike:()=>LQ,isModuleWithStringLiteralName:()=>cp,isNameOfFunctionDeclaration:()=>$G,isNameOfModuleDeclaration:()=>zG,isNamedClassElement:()=>xu,isNamedDeclaration:()=>Dc,isNamedEvaluation:()=>iy,isNamedEvaluationSource:()=>ry,isNamedExportBindings:()=>Fl,isNamedExports:()=>hN,isNamedImportBindings:()=>__,isNamedImports:()=>pN,isNamedImportsOrExports:()=>Lx,isNamedTupleMember:()=>EE,isNamespaceBody:()=>l_,isNamespaceExport:()=>dN,isNamespaceExportDeclaration:()=>nN,isNamespaceImport:()=>_N,isNamespaceReexportDeclaration:()=>Dm,isNewExpression:()=>YE,isNewExpressionTarget:()=>xG,isNoSubstitutionTemplateLiteral:()=>PD,isNode:()=>Il,isNodeArray:()=>jl,isNodeArrayMultiLine:()=>rx,isNodeDescendantOf:()=>_h,isNodeKind:()=>Ol,isNodeLikeSystem:()=>bn,isNodeModulesDirectory:()=>ha,isNodeWithPossibleHoistedDeclaration:()=>nh,isNonContextualKeyword:()=>Ih,isNonExportDefaultModifier:()=>GA,isNonGlobalAmbientModule:()=>lp,isNonGlobalDeclaration:()=>JZ,isNonNullAccess:()=>oC,isNonNullChain:()=>Pl,isNonNullExpression:()=>bP,isNonStaticMethodOrAccessorWithPrivateName:()=>UJ,isNotEmittedOrPartiallyEmittedNode:()=>Yu,isNotEmittedStatement:()=>bN,isNullishCoalesce:()=>wl,isNumber:()=>ct,isNumericLiteral:()=>TD,isNumericLiteralName:()=>WT,isObjectBindingElementWithoutPropertyName:()=>jQ,isObjectBindingOrAssignmentElement:()=>Mu,isObjectBindingOrAssignmentPattern:()=>Ou,isObjectBindingPattern:()=>VE,isObjectLiteralElement:()=>R_,isObjectLiteralElementLike:()=>Cu,isObjectLiteralExpression:()=>HE,isObjectLiteralMethod:()=>$f,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>qf,isObjectTypeDeclaration:()=>Ax,isOctalDigit:()=>is,isOmittedExpression:()=>gP,isOptionalChain:()=>Sl,isOptionalChainRoot:()=>kl,isOptionalDeclaration:()=>iC,isOptionalJSDocPropertyLikeTag:()=>eC,isOptionalTypeNode:()=>PE,isOuterExpression:()=>pA,isOutermostOptionalChain:()=>Cl,isOverrideModifier:()=>ZD,isPackageJsonInfo:()=>aj,isPackedArrayLiteral:()=>RT,isParameter:()=>sE,isParameterPropertyDeclaration:()=>rc,isParameterPropertyModifier:()=>nu,isParenthesizedExpression:()=>tP,isParenthesizedTypeNode:()=>ME,isParseTreeNode:()=>gc,isPartOfParameterDeclaration:()=>ay,isPartOfTypeNode:()=>wf,isPartOfTypeQuery:()=>wm,isPartiallyEmittedExpression:()=>kP,isPatternMatch:()=>ln,isPinnedComment:()=>$d,isPlainJsFile:()=>Td,isPlusToken:()=>MD,isPossiblyTypeArgumentPosition:()=>JX,isPostfixUnaryExpression:()=>lP,isPrefixUnaryExpression:()=>cP,isPrimitiveLiteralValue:()=>DC,isPrivateIdentifier:()=>VD,isPrivateIdentifierClassElementDeclaration:()=>Zl,isPrivateIdentifierPropertyAccessExpression:()=>eu,isPrivateIdentifierSymbol:()=>Zh,isProgramBundleEmitBuildInfo:()=>HV,isProgramUptoDate:()=>_V,isPrologueDirective:()=>pf,isPropertyAccessChain:()=>vl,isPropertyAccessEntityNameExpression:()=>Sb,isPropertyAccessExpression:()=>GE,isPropertyAccessOrQualifiedName:()=>Bu,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>Ru,isPropertyAssignment:()=>BN,isPropertyDeclaration:()=>uE,isPropertyName:()=>au,isPropertyNameLiteral:()=>Wh,isPropertySignature:()=>lE,isProtoSetter:()=>ty,isPrototypeAccess:()=>Tb,isPrototypePropertyAssignment:()=>yg,isPunctuation:()=>Nh,isPushOrUnshiftIdentifier:()=>oy,isQualifiedName:()=>iE,isQuestionDotToken:()=>zD,isQuestionOrExclamationToken:()=>jA,isQuestionOrPlusOrMinusToken:()=>JA,isQuestionToken:()=>BD,isRawSourceMap:()=>lJ,isReadonlyKeyword:()=>XD,isReadonlyKeywordOrPlusOrMinusToken:()=>BA,isRecognizedTripleSlashComment:()=>zd,isReferenceFileLocation:()=>lV,isReferencedFile:()=>cV,isRegularExpressionLiteral:()=>ED,isRequireCall:()=>Jm,isRequireVariableStatement:()=>Um,isRestParameter:()=>U_,isRestTypeNode:()=>NE,isReturnStatement:()=>BP,isReturnStatementWithFixablePromiseHandler:()=>h1,isRightSideOfAccessExpression:()=>wb,isRightSideOfInstanceofExpression:()=>Pb,isRightSideOfPropertyAccess:()=>BG,isRightSideOfQualifiedName:()=>RG,isRightSideOfQualifiedNameOrPropertyAccess:()=>Cb,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>Db,isRootedDiskPath:()=>wo,isSameEntityName:()=>tg,isSatisfiesExpression:()=>vP,isScopeMarker:()=>e_,isSemicolonClassElement:()=>wP,isSetAccessor:()=>A_,isSetAccessorDeclaration:()=>gE,isShebangTrivia:()=>_s,isShiftOperatorOrHigher:()=>qA,isShorthandAmbientModuleSymbol:()=>_p,isShorthandPropertyAssignment:()=>JN,isSignedNumericLiteral:()=>qh,isSimpleCopiableExpression:()=>OJ,isSimpleInlineableExpression:()=>MJ,isSimpleParameter:()=>tz,isSimpleParameterList:()=>nz,isSingleOrDoubleQuote:()=>Km,isSourceFile:()=>qN,isSourceFileFromLibrary:()=>WZ,isSourceFileJS:()=>Im,isSourceFileNotJS:()=>Om,isSourceFileNotJson:()=>jm,isSourceMapping:()=>pJ,isSpecialPropertyDeclaration:()=>vg,isSpreadAssignment:()=>zN,isSpreadElement:()=>fP,isStatement:()=>b_,isStatementButNotDeclaration:()=>v_,isStatementOrBlock:()=>x_,isStatementWithLocals:()=>Cd,isStatic:()=>Jv,isStaticModifier:()=>QD,isString:()=>st,isStringAKeyword:()=>Lh,isStringANonContextualKeyword:()=>Mh,isStringAndEmptyAnonymousObjectIntersection:()=>QX,isStringDoubleQuoted:()=>Wm,isStringLiteral:()=>wD,isStringLiteralLike:()=>$_,isStringLiteralOrJsxExpression:()=>w_,isStringLiteralOrTemplate:()=>YY,isStringOrNumericLiteralLike:()=>$h,isStringOrRegularExpressionOrTemplateLiteral:()=>GX,isStringTextContainingNode:()=>Hl,isSuperCall:()=>lf,isSuperKeyword:()=>tE,isSuperOrSuperProperty:()=>lm,isSuperProperty:()=>um,isSupportedSourceFileName:()=>Hk,isSwitchStatement:()=>zP,isSyntaxList:()=>IF,isSyntheticExpression:()=>SP,isSyntheticReference:()=>xN,isTagName:()=>jG,isTaggedTemplateExpression:()=>ZE,isTaggedTemplateTag:()=>kG,isTemplateExpression:()=>dP,isTemplateHead:()=>ND,isTemplateLiteral:()=>qu,isTemplateLiteralKind:()=>zl,isTemplateLiteralToken:()=>$l,isTemplateLiteralTypeNode:()=>qE,isTemplateLiteralTypeSpan:()=>$E,isTemplateMiddle:()=>FD,isTemplateMiddleOrTemplateTail:()=>ql,isTemplateSpan:()=>CP,isTemplateTail:()=>AD,isTextWhiteSpaceLike:()=>HQ,isThis:()=>WG,isThisContainerOrFunctionBlock:()=>im,isThisIdentifier:()=>yv,isThisInTypeQuery:()=>bv,isThisInitializedDeclaration:()=>dm,isThisInitializedObjectBindingExpression:()=>pm,isThisProperty:()=>_m,isThisTypeNode:()=>LE,isThisTypeParameter:()=>GT,isThisTypePredicate:()=>Uf,isThrowStatement:()=>qP,isToken:()=>Ll,isTokenKind:()=>Ml,isTraceEnabled:()=>jL,isTransientSymbol:()=>td,isTrivia:()=>Rh,isTryStatement:()=>VP,isTupleTypeNode:()=>DE,isTypeAlias:()=>Ag,isTypeAliasDeclaration:()=>QP,isTypeAssertionExpression:()=>eP,isTypeDeclaration:()=>YT,isTypeElement:()=>ku,isTypeKeyword:()=>fQ,isTypeKeywordToken:()=>mQ,isTypeKeywordTokenOrIdentifier:()=>gQ,isTypeLiteralNode:()=>CE,isTypeNode:()=>wu,isTypeNodeKind:()=>Ix,isTypeOfExpression:()=>oP,isTypeOnlyExportDeclaration:()=>Kl,isTypeOnlyImportDeclaration:()=>Ul,isTypeOnlyImportOrExportDeclaration:()=>Wl,isTypeOperatorNode:()=>jE,isTypeParameterDeclaration:()=>aE,isTypePredicateNode:()=>bE,isTypeQueryNode:()=>TE,isTypeReferenceNode:()=>xE,isTypeReferenceType:()=>B_,isTypeUsableAsPropertyName:()=>mC,isUMDExportSymbol:()=>Ex,isUnaryExpression:()=>Ku,isUnaryExpressionWithWrite:()=>Hu,isUnicodeIdentifierStart:()=>Ma,isUnionTypeNode:()=>FE,isUrl:()=>Co,isValidBigIntString:()=>CT,isValidESSymbolDeclaration:()=>Rf,isValidTypeOnlyAliasUseSite:()=>wT,isValueSignatureDeclaration:()=>rh,isVarAwaitUsing:()=>rf,isVarConst:()=>af,isVarConstLike:()=>sf,isVarUsing:()=>of,isVariableDeclaration:()=>KP,isVariableDeclarationInVariableStatement:()=>Mf,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>$m,isVariableDeclarationInitializedToRequire:()=>zm,isVariableDeclarationList:()=>WP,isVariableLike:()=>If,isVariableLikeOrAccessor:()=>Of,isVariableStatement:()=>EP,isVoidExpression:()=>aP,isWatchSet:()=>_x,isWhileStatement:()=>IP,isWhiteSpaceLike:()=>Qa,isWhiteSpaceSingleLine:()=>Ya,isWithStatement:()=>JP,isWriteAccess:()=>yx,isWriteOnlyAccess:()=>hx,isYieldExpression:()=>pP,jsxModeNeedsExplicitImport:()=>KZ,keywordPart:()=>rY,last:()=>De,lastOrUndefined:()=>we,length:()=>p,libMap:()=>fO,libs:()=>pO,lineBreakPart:()=>hY,linkNamePart:()=>pY,linkPart:()=>fY,linkTextPart:()=>dY,listFiles:()=>zU,loadModuleFromGlobalCache:()=>SR,loadWithModeAwareCache:()=>eV,makeIdentifierFromModuleName:()=>ip,makeImport:()=>EQ,makeStringLiteral:()=>PQ,mangleScopedPackageName:()=>mR,map:()=>O,mapAllOrFail:()=>$,mapDefined:()=>q,mapDefinedEntries:()=>U,mapDefinedIterator:()=>V,mapEntries:()=>X,mapIterator:()=>M,mapOneOrMany:()=>EZ,mapToDisplayParts:()=>yY,matchFiles:()=>Ck,matchPatternOrExact:()=>dT,matchedText:()=>rn,matchesExclude:()=>TL,maybeBind:()=>Ze,maybeSetLocalizedDiagnosticMessages:()=>eS,memoize:()=>bt,memoizeCached:()=>kt,memoizeOne:()=>xt,memoizeWeak:()=>St,metadataHelper:()=>Kw,min:()=>At,minAndMax:()=>mT,missingFileModifiedTime:()=>Yi,modifierToFlag:()=>ob,modifiersToFlags:()=>ib,moduleOptionDeclaration:()=>yO,moduleResolutionIsEqualTo:()=>md,moduleResolutionNameAndModeGetter:()=>Gq,moduleResolutionOptionDeclarations:()=>TO,moduleResolutionSupportsPackageJsonExportsAndImports:()=>KS,moduleResolutionUsesNodeModules:()=>DQ,moduleSpecifierToValidIdentifier:()=>LZ,moduleSpecifiers:()=>JR,moduleSymbolToValidIdentifier:()=>MZ,moveEmitHelpers:()=>Pw,moveRangeEnd:()=>Vb,moveRangePastDecorators:()=>Kb,moveRangePastModifiers:()=>Wb,moveRangePos:()=>Ub,moveSyntheticComments:()=>Sw,mutateMap:()=>kx,mutateMapSkippingNewValues:()=>Sx,needsParentheses:()=>HY,needsScopeMarker:()=>n_,newCaseClauseTracker:()=>HZ,newPrivateEnvironment:()=>QJ,noEmitNotification:()=>k$,noEmitSubstitution:()=>S$,noTransformers:()=>m$,noTruncationMaximumTruncationLength:()=>Q_,nodeCanBeDecorated:()=>gm,nodeHasName:()=>Cc,nodeIsDecorated:()=>hm,nodeIsMissing:()=>Nd,nodeIsPresent:()=>Fd,nodeIsSynthesized:()=>ly,nodeModuleNameResolver:()=>Dj,nodeModulesPathPart:()=>Ij,nodeNextJsonConfigResolver:()=>Ej,nodeOrChildIsDecorated:()=>ym,nodeOverlapsWithStartEnd:()=>rX,nodePosToString:()=>Dd,nodeSeenTracker:()=>hQ,nodeStartsNewLexicalEnvironment:()=>cy,nodeToDisplayParts:()=>SY,noop:()=>_t,noopFileWatcher:()=>XU,normalizePath:()=>Xo,normalizeSlashes:()=>Vo,not:()=>dn,notImplemented:()=>vt,notImplementedResolver:()=>Y$,nullNodeConverters:()=>MC,nullParenthesizerRules:()=>AC,nullTransformationContext:()=>C$,objectAllocator:()=>Hx,operatorPart:()=>oY,optionDeclarations:()=>bO,optionMapToObject:()=>EM,optionsAffectingProgramStructure:()=>wO,optionsForBuild:()=>FO,optionsForWatch:()=>mO,optionsHaveChanges:()=>sd,optionsHaveModuleResolutionChanges:()=>od,or:()=>_n,orderedRemoveItem:()=>Qt,orderedRemoveItemAt:()=>Yt,packageIdToPackageName:()=>hd,packageIdToString:()=>yd,paramHelper:()=>Ww,parameterIsThisKeyword:()=>hv,parameterNamePart:()=>aY,parseBaseNodeFactory:()=>uI,parseBigInt:()=>kT,parseBuildCommand:()=>ZO,parseCommandLine:()=>HO,parseCommandLineWorker:()=>VO,parseConfigFileTextToJson:()=>rM,parseConfigFileWithSystem:()=>OU,parseConfigHostFromCompilerHostLike:()=>bV,parseCustomTypeOption:()=>JO,parseIsolatedEntityName:()=>zI,parseIsolatedJSDocComment:()=>UI,parseJSDocTypeExpressionForTests:()=>KI,parseJsonConfigFileContent:()=>BM,parseJsonSourceFileConfigFileContent:()=>JM,parseJsonText:()=>$I,parseListTypeOption:()=>zO,parseNodeFactory:()=>_I,parseNodeModuleFromPath:()=>Mj,parsePackageName:()=>eR,parsePseudoBigInt:()=>xT,parseValidBigInt:()=>TT,pasteEdits:()=>Ppe,patchWriteFileEnsuringDirectory:()=>yo,pathContainsNodeModules:()=>Oj,pathIsAbsolute:()=>Eo,pathIsBareSpecifier:()=>No,pathIsRelative:()=>Po,patternText:()=>nn,perfLogger:()=>tr,performIncrementalCompilation:()=>lK,performance:()=>nr,plainJSErrors:()=>mV,positionBelongsToNode:()=>oX,positionIsASICandidate:()=>cZ,positionIsSynthesized:()=>iT,positionsAreOnSameLine:()=>ix,preProcessFile:()=>s1,probablyUsesSemicolons:()=>lZ,processCommentPragmas:()=>ZI,processPragmasIntoFields:()=>eO,processTaggedTemplateExpression:()=>Dz,programContainsEsModules:()=>kQ,programContainsModules:()=>SQ,projectReferenceIsEqualTo:()=>fd,propKeyHelper:()=>sD,propertyNamePart:()=>sY,pseudoBigIntToString:()=>ST,punctuationPart:()=>iY,pushIfUnique:()=>fe,quote:()=>XY,quotePreferenceFromString:()=>FQ,rangeContainsPosition:()=>YG,rangeContainsPositionExclusive:()=>ZG,rangeContainsRange:()=>XG,rangeContainsRangeExclusive:()=>QG,rangeContainsStartEnd:()=>tX,rangeEndIsOnSameLineAsRangeStart:()=>ex,rangeEndPositionsAreOnSameLine:()=>Yb,rangeEquals:()=>be,rangeIsOnSingleLine:()=>Xb,rangeOfNode:()=>gT,rangeOfTypeParameters:()=>hT,rangeOverlapsWithStartEnd:()=>nX,rangeStartIsOnSameLineAsRangeEnd:()=>Zb,rangeStartPositionsAreOnSameLine:()=>Qb,readBuilderProgram:()=>uK,readConfigFile:()=>nM,readHelper:()=>oD,readJson:()=>Bb,readJsonConfigFile:()=>iM,readJsonOrUndefined:()=>Rb,reduceEachLeadingCommentRange:()=>gs,reduceEachTrailingCommentRange:()=>hs,reduceLeft:()=>Oe,reduceLeftIterator:()=>y,reducePathComponents:()=>Uo,refactor:()=>B2,regExpEscape:()=>ck,regularExpressionFlagToCharacter:()=>za,relativeComplement:()=>le,removeAllComments:()=>rw,removeEmitHelper:()=>Dw,removeExtension:()=>eT,removeFileExtension:()=>Yk,removeIgnoredPath:()=>_U,removeMinAndVersionNumbers:()=>Xt,removeOptionality:()=>BX,removePrefix:()=>sn,removeSuffix:()=>Ht,removeTrailingDirectorySeparator:()=>Zo,repeatString:()=>vQ,replaceElement:()=>Fe,replaceFirstStar:()=>bC,resolutionExtensionIsTSOrJson:()=>aT,resolveConfigFileProjectName:()=>gK,resolveJSModule:()=>Tj,resolveLibrary:()=>bj,resolveModuleName:()=>Sj,resolveModuleNameFromCache:()=>xj,resolvePackageNameToPackageJson:()=>ij,resolvePath:()=>Wo,resolveProjectReferencePath:()=>xV,resolveTripleslashReference:()=>xq,resolveTypeReferenceDirective:()=>tj,resolvingEmptyArray:()=>H_,restHelper:()=>tD,returnFalse:()=>dt,returnNoopFileWatcher:()=>QU,returnTrue:()=>pt,returnUndefined:()=>ft,returnsPromise:()=>g1,runInitializersHelper:()=>Gw,sameFlatMap:()=>z,sameMap:()=>L,sameMapping:()=>dJ,scanShebangTrivia:()=>ds,scanTokenAtPosition:()=>Xp,scanner:()=>mG,screenStartingMessageCodes:()=>FU,semanticDiagnosticsOptionDeclarations:()=>xO,serializeCompilerOptions:()=>AM,server:()=>jpe,servicesVersion:()=>s7,setCommentRange:()=>mw,setConfigFileInOptions:()=>zM,setConstantValue:()=>Tw,setEachParent:()=>MT,setEmitFlags:()=>iw,setFunctionNameHelper:()=>cD,setGetSourceFileAsHashVersioned:()=>rK,setIdentifierAutoGenerate:()=>jw,setIdentifierGeneratedImportReference:()=>Bw,setIdentifierTypeArguments:()=>Mw,setInternalEmitFlags:()=>aw,setLocalizedDiagnosticMessages:()=>Zx,setModuleDefaultHelper:()=>dD,setNodeChildren:()=>$F,setNodeFlags:()=>IT,setObjectAllocator:()=>Qx,setOriginalNode:()=>ew,setParent:()=>OT,setParentRecursive:()=>LT,setPrivateIdentifier:()=>ZJ,setSnippetElement:()=>Fw,setSourceMapRange:()=>lw,setStackTraceLimit:()=>Gi,setStartsOnNewLine:()=>pw,setSyntheticLeadingComments:()=>hw,setSyntheticTrailingComments:()=>bw,setSys:()=>bo,setSysLog:()=>_o,setTextRange:()=>sI,setTextRangeEnd:()=>NT,setTextRangePos:()=>PT,setTextRangePosEnd:()=>FT,setTextRangePosWidth:()=>AT,setTokenSourceMapRange:()=>_w,setTypeNode:()=>Iw,setUILocale:()=>zt,setValueDeclaration:()=>bg,shouldAllowImportingTsExtension:()=>xR,shouldPreserveConstEnums:()=>jS,shouldUseUriStyleNodeCoreModules:()=>$Z,showModuleSpecifier:()=>Px,signatureHasLiteralTypes:()=>zB,signatureHasRestParameter:()=>JB,signatureToDisplayParts:()=>xY,single:()=>Pe,singleElementArray:()=>fn,singleIterator:()=>H,singleOrMany:()=>Ne,singleOrUndefined:()=>Ee,skipAlias:()=>mx,skipAssertions:()=>gA,skipConstraint:()=>bQ,skipOuterExpressions:()=>fA,skipParentheses:()=>lh,skipPartiallyEmittedExpressions:()=>El,skipTrivia:()=>as,skipTypeChecking:()=>yT,skipTypeParentheses:()=>ch,skipWhile:()=>vn,sliceAfter:()=>pT,some:()=>Q,sort:()=>he,sortAndDeduplicate:()=>oe,sortAndDeduplicateDiagnostics:()=>Ms,sourceFileAffectingCompilerOptions:()=>CO,sourceFileMayBeEmitted:()=>ov,sourceMapCommentRegExp:()=>iJ,sourceMapCommentRegExpDontCareLineStart:()=>rJ,spacePart:()=>nY,spanMap:()=>G,spreadArrayHelper:()=>aD,stableSort:()=>ve,startEndContainsRange:()=>eX,startEndOverlapsWithStartEnd:()=>iX,startOnNewLine:()=>hA,startTracing:()=>Tr,startsWith:()=>an,startsWithDirectory:()=>ua,startsWithUnderscore:()=>RZ,startsWithUseStrict:()=>cA,stringContainsAt:()=>jZ,stringToToken:()=>Ba,stripQuotes:()=>By,supportedDeclarationExtensions:()=>Rk,supportedJSExtensions:()=>Ok,supportedJSExtensionsFlat:()=>Mk,supportedLocaleDirectories:()=>dc,supportedTSExtensions:()=>Nk,supportedTSExtensionsFlat:()=>Fk,supportedTSImplementationExtensions:()=>Bk,suppressLeadingAndTrailingTrivia:()=>MY,suppressLeadingTrivia:()=>LY,suppressTrailingTrivia:()=>jY,symbolEscapedNameNoDefault:()=>MQ,symbolName:()=>Sc,symbolNameNoDefault:()=>OQ,symbolPart:()=>eY,symbolToDisplayParts:()=>bY,syntaxMayBeASICandidate:()=>sZ,syntaxRequiresTrailingSemicolonOrASI:()=>aZ,sys:()=>vo,sysLog:()=>uo,tagNamesAreEquivalent:()=>sO,takeWhile:()=>yn,targetOptionDeclaration:()=>hO,templateObjectHelper:()=>iD,testFormatSettings:()=>iG,textChangeRangeIsUnchanged:()=>Ys,textChangeRangeNewSpan:()=>Qs,textChanges:()=>r_e,textOrKeywordPart:()=>cY,textPart:()=>lY,textRangeContainsPositionInclusive:()=>Js,textSpanContainsPosition:()=>Bs,textSpanContainsTextSpan:()=>zs,textSpanEnd:()=>js,textSpanIntersection:()=>Hs,textSpanIntersectsWith:()=>Us,textSpanIntersectsWithPosition:()=>Ws,textSpanIntersectsWithTextSpan:()=>Vs,textSpanIsEmpty:()=>Rs,textSpanOverlap:()=>qs,textSpanOverlapsWith:()=>$s,textSpansEqual:()=>VQ,textToKeywordObj:()=>Sa,timestamp:()=>Yn,toArray:()=>at,toBuilderFileEmit:()=>rU,toBuilderStateFileInfoForMultiEmit:()=>nU,toEditorSettings:()=>b7,toFileNameLowerCase:()=>yt,toLowerCase:()=>gt,toPath:()=>Yo,toProgramEmitPending:()=>iU,tokenIsIdentifierOrKeyword:()=>ba,tokenIsIdentifierOrKeywordOrGreaterThan:()=>xa,tokenToString:()=>Ra,trace:()=>LL,tracing:()=>or,tracingEnabled:()=>ar,transform:()=>j7,transformClassFields:()=>Fz,transformDeclarations:()=>_$,transformECMAScriptModule:()=>r$,transformES2015:()=>Yz,transformES2016:()=>Xz,transformES2017:()=>Lz,transformES2018:()=>Rz,transformES2019:()=>Bz,transformES2020:()=>Jz,transformES2021:()=>zz,transformESDecorators:()=>Mz,transformESNext:()=>$z,transformGenerators:()=>Zz,transformJsx:()=>Hz,transformLegacyDecorators:()=>Oz,transformModule:()=>e$,transformNamedEvaluation:()=>Cz,transformNodeModule:()=>i$,transformNodes:()=>T$,transformSystemModule:()=>n$,transformTypeScript:()=>Nz,transpile:()=>F1,transpileDeclaration:()=>w1,transpileModule:()=>C1,transpileOptionValueCompilerOptions:()=>DO,tryAddToSet:()=>W,tryAndIgnoreErrors:()=>fZ,tryCast:()=>lt,tryDirectoryExists:()=>pZ,tryExtractTSExtension:()=>Ib,tryFileExists:()=>dZ,tryGetClassExtendingExpressionWithTypeArguments:()=>pb,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>fb,tryGetDirectories:()=>uZ,tryGetExtensionFromPath:()=>lT,tryGetImportFromModuleSpecifier:()=>Tg,tryGetJSDocSatisfiesTypeNode:()=>cC,tryGetModuleNameFromFile:()=>TA,tryGetModuleSpecifierFromDeclaration:()=>Sg,tryGetNativePerformanceHooks:()=>Xn,tryGetPropertyAccessOrIdentifierToString:()=>kb,tryGetPropertyNameOfBindingOrAssignmentElement:()=>PA,tryGetSourceMappingURL:()=>sJ,tryGetTextOfPropertyName:()=>Mp,tryIOAndConsumeErrors:()=>mZ,tryParseJson:()=>Jb,tryParsePattern:()=>nT,tryParsePatterns:()=>rT,tryParseRawSourceMap:()=>uJ,tryReadDirectory:()=>_Z,tryReadFile:()=>oM,tryRemoveDirectoryPrefix:()=>ak,tryRemoveExtension:()=>Zk,tryRemovePrefix:()=>cn,tryRemoveSuffix:()=>Gt,typeAcquisitionDeclarations:()=>IO,typeAliasNamePart:()=>uY,typeDirectiveIsEqualTo:()=>vd,typeKeywords:()=>pQ,typeParameterNamePart:()=>_Y,typeToDisplayParts:()=>vY,unchangedPollThresholds:()=>ro,unchangedTextChangeRange:()=>ec,unescapeLeadingUnderscores:()=>vc,unmangleScopedPackageName:()=>hR,unorderedRemoveItem:()=>en,unorderedRemoveItemAt:()=>Zt,unreachableCodeIsError:()=>VS,unsetNodeChildren:()=>qF,unusedLabelIsError:()=>US,unwrapInnermostStatementOfLabel:()=>Jf,unwrapParenthesizedExpression:()=>EC,updateErrorForNoInputFiles:()=>nL,updateLanguageServiceSourceFile:()=>D7,updateMissingFilePathsWatch:()=>dq,updateResolutionField:()=>KL,updateSharedExtendedConfigFileWatcher:()=>lq,updateSourceFile:()=>VI,updateWatchingWildcardDirectories:()=>pq,usesExtensionsOnImports:()=>Kk,usingSingleLineStringWriter:()=>dd,utf16EncodeAsString:()=>Ps,validateLocaleAndSetLanguage:()=>pc,valuesHelper:()=>lD,version:()=>c,versionMajorMinor:()=>s,visitArray:()=>UB,visitCommaListElements:()=>YB,visitEachChild:()=>ZB,visitFunctionBody:()=>XB,visitIterationBody:()=>QB,visitLexicalEnvironment:()=>WB,visitNode:()=>qB,visitNodes:()=>VB,visitParameterList:()=>HB,walkUpBindingElementsAndPatterns:()=>ac,walkUpLexicalEnvironments:()=>XJ,walkUpOuterExpressions:()=>mA,walkUpParenthesizedExpressions:()=>ah,walkUpParenthesizedTypes:()=>oh,walkUpParenthesizedTypesAndGetParentAndChild:()=>sh,whitespaceOrMapCommentRegExp:()=>oJ,writeCommentRange:()=>Iv,writeFile:()=>cv,writeFileEnsuringDirectories:()=>uv,zipWith:()=>v});var jpe={};o(jpe,{ActionInvalidate:()=>yH,ActionPackageInstalled:()=>vH,ActionSet:()=>hH,ActionWatchTypingLocations:()=>TH,Arguments:()=>mH,AutoImportProviderProject:()=>jfe,AuxiliaryProject:()=>Mfe,CharRangeSection:()=>vge,CloseFileWatcherEvent:()=>rme,CommandNames:()=>Qme,ConfigFileDiagEvent:()=>Qfe,ConfiguredProject:()=>Rfe,ConfiguredProjectLoadKind:()=>kme,CreateDirectoryWatcherEvent:()=>nme,CreateFileWatcherEvent:()=>tme,Errors:()=>Upe,EventBeginInstallTypes:()=>xH,EventEndInstallTypes:()=>SH,EventInitializationFailed:()=>kH,EventTypesRegistry:()=>bH,ExternalProject:()=>Bfe,GcTimer:()=>sfe,InferredProject:()=>Ofe,LargeFileReferencedEvent:()=>Xfe,LineIndex:()=>kge,LineLeaf:()=>Cge,LineNode:()=>Tge,LogLevel:()=>Wpe,Msg:()=>Gpe,OpenFileInfoTelemetryEvent:()=>eme,Project:()=>Ife,ProjectInfoTelemetryEvent:()=>Zfe,ProjectKind:()=>Dfe,ProjectLanguageServiceStateEvent:()=>Yfe,ProjectLoadingFinishEvent:()=>Gfe,ProjectLoadingStartEvent:()=>Hfe,ProjectService:()=>Jme,ProjectsUpdatedInBackgroundEvent:()=>Wfe,ScriptInfo:()=>kfe,ScriptVersionCache:()=>xge,Session:()=>dge,TextStorage:()=>xfe,ThrottledOperations:()=>afe,TypingsCache:()=>wfe,TypingsInstallerAdapter:()=>Dge,allFilesAreJsOrDts:()=>Nfe,allRootFilesAreJsOrDts:()=>Pfe,asNormalizedPath:()=>Zpe,convertCompilerOptions:()=>_me,convertFormatOptions:()=>ume,convertScriptKindName:()=>mme,convertTypeAcquisition:()=>pme,convertUserPreferences:()=>gme,convertWatchOptions:()=>dme,countEachFileTypes:()=>Efe,createInstallTypingsRequest:()=>Xpe,createModuleSpecifierCache:()=>qme,createNormalizedPathMap:()=>efe,createPackageJsonCache:()=>Vme,createSortedArray:()=>ofe,emptyArray:()=>Hpe,findArgument:()=>wH,forEachResolvedProjectReferenceProject:()=>Tme,formatDiagnosticToProtocol:()=>Xme,formatMessage:()=>Yme,getBaseConfigFileName:()=>cfe,getLocationInNewDocument:()=>gge,hasArgument:()=>CH,hasNoTypeScriptSource:()=>Ffe,indent:()=>PH,isBackgroundProject:()=>qfe,isConfigFile:()=>zme,isConfiguredProject:()=>zfe,isDynamicFileName:()=>Sfe,isExternalProject:()=>$fe,isInferredProject:()=>Jfe,isInferredProjectName:()=>tfe,isProjectDeferredClose:()=>Vfe,makeAutoImportProviderProjectName:()=>rfe,makeAuxiliaryProjectName:()=>ife,makeInferredProjectName:()=>nfe,maxFileSize:()=>Kfe,maxProgramSizeForNonTsFiles:()=>Ufe,normalizedPathToPath:()=>Ype,nowString:()=>DH,nullCancellationToken:()=>Ume,nullTypingsInstaller:()=>Tfe,protocol:()=>ufe,removeSorted:()=>lfe,stringifyIndented:()=>NH,toEvent:()=>Zme,toNormalizedPath:()=>Qpe,tryConvertScriptKindName:()=>fme,typingsInstaller:()=>Rpe,updateProjectIfDirty:()=>Fme});var Rpe={};o(Rpe,{TypingsInstaller:()=>qpe,getNpmCommandForInstallation:()=>$pe,installNpmPackages:()=>zpe,typingsName:()=>Vpe});var Bpe={isEnabled:()=>!1,writeLine:_t};function Jpe(e,t,n,r){try{const r=Sj(t,Ko(e,"index.d.ts"),{moduleResolution:2},n);return r.resolvedModule&&r.resolvedModule.resolvedFileName}catch(n){return void(r.isEnabled()&&r.writeLine(`Failed to resolve ${t} in folder '${e}': ${n.message}`))}}function zpe(e,t,n,r){let i=!1;for(let o=n.length;o>0;){const a=$pe(e,t,n,o);o=a.remaining,i=r(a.command)||i}return i}function $pe(e,t,n,r){const i=n.length-r;let o,a=r;for(;o=`${e} install --ignore-scripts ${(a===n.length?n:n.slice(i,i+a)).join(" ")} --save-dev --user-agent="typesInstaller/${t}"`,!(o.length<8e3);)a-=Math.floor(a/2);return{command:o,remaining:r-a}}var qpe=class{constructor(e,t,n,r,i,o=Bpe){this.installTypingHost=e,this.globalCachePath=t,this.safeListPath=n,this.typesMapLocation=r,this.throttleLimit=i,this.log=o,this.packageNameToTypingLocation=new Map,this.missingTypingsSet=new Set,this.knownCachesSet=new Set,this.projectWatchers=new Map,this.pendingRunRequests=[],this.installRunCount=1,this.inFlightRequestCount=0,this.latestDistTag="latest",this.log.isEnabled()&&this.log.writeLine(`Global cache location '${t}', safe file path '${n}', types map path ${r}`),this.processCacheLocation(this.globalCachePath)}handleRequest(e){switch(e.kind){case"discover":this.install(e);break;case"closeProject":this.closeProject(e);break;case"typesRegistry":{const e={};this.typesRegistry.forEach(((t,n)=>{e[n]=t}));const t={kind:bH,typesRegistry:e};this.sendResponse(t);break}case"installPackage":this.installPackage(e);break;default:xn.assertNever(e)}}closeProject(e){this.closeWatchers(e.projectName)}closeWatchers(e){this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}'`),this.projectWatchers.get(e)?(this.projectWatchers.delete(e),this.sendResponse({kind:TH,projectName:e,files:[]}),this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}' - done.`)):this.log.isEnabled()&&this.log.writeLine(`No watchers are registered for project '${e}'`)}install(e){this.log.isEnabled()&&this.log.writeLine(`Got install request${NH(e)}`),e.cachePath&&(this.log.isEnabled()&&this.log.writeLine(`Request specifies cache path '${e.cachePath}', loading cached information...`),this.processCacheLocation(e.cachePath)),void 0===this.safeList&&this.initializeSafeList();const t=fH.discoverTypings(this.installTypingHost,this.log.isEnabled()?e=>this.log.writeLine(e):void 0,e.fileNames,e.projectRootPath,this.safeList,this.packageNameToTypingLocation,e.typeAcquisition,e.unresolvedImports,this.typesRegistry,e.compilerOptions);this.watchFiles(e.projectName,t.filesToWatch),t.newTypingNames.length?this.installTypings(e,e.cachePath||this.globalCachePath,t.cachedTypingPaths,t.newTypingNames):(this.sendResponse(this.createSetTypings(e,t.cachedTypingPaths)),this.log.isEnabled()&&this.log.writeLine("No new typings were requested as a result of typings discovery"))}installPackage(e){const{fileName:t,packageName:n,projectName:r,projectRootPath:i,id:o}=e,a=ga(Ro(t),(e=>{if(this.installTypingHost.fileExists(Ko(e,"package.json")))return e}))||i;if(a)this.installWorker(-1,[n],a,(e=>{const t={kind:vH,projectName:r,id:o,success:e,message:e?`Package ${n} installed.`:`There was an error installing ${n}.`};this.sendResponse(t)}));else{const e={kind:vH,projectName:r,id:o,success:!1,message:"Could not determine a project root path."};this.sendResponse(e)}}initializeSafeList(){if(this.typesMapLocation){const e=fH.loadTypesMap(this.installTypingHost,this.typesMapLocation);if(e)return this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`),void(this.safeList=e);this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`)}this.safeList=fH.loadSafeList(this.installTypingHost,this.safeListPath)}processCacheLocation(e){if(this.log.isEnabled()&&this.log.writeLine(`Processing cache location '${e}'`),this.knownCachesSet.has(e))return void(this.log.isEnabled()&&this.log.writeLine("Cache location was already processed..."));const t=Ko(e,"package.json"),n=Ko(e,"package-lock.json");if(this.log.isEnabled()&&this.log.writeLine(`Trying to find '${t}'...`),this.installTypingHost.fileExists(t)&&this.installTypingHost.fileExists(n)){const r=JSON.parse(this.installTypingHost.readFile(t)),i=JSON.parse(this.installTypingHost.readFile(n));if(this.log.isEnabled()&&(this.log.writeLine(`Loaded content of '${t}':${NH(r)}`),this.log.writeLine(`Loaded content of '${n}':${NH(i)}`)),r.devDependencies&&i.dependencies)for(const t in r.devDependencies){if(!Le(i.dependencies,t))continue;const n=Bo(t);if(!n)continue;const r=Jpe(e,n,this.installTypingHost,this.log);if(!r){this.missingTypingsSet.add(n);continue}const o=this.packageNameToTypingLocation.get(n);if(o){if(o.typingLocation===r)continue;this.log.isEnabled()&&this.log.writeLine(`New typing for package ${n} from '${r}' conflicts with existing typing file '${o}'`)}this.log.isEnabled()&&this.log.writeLine(`Adding entry into typings cache: '${n}' => '${r}'`);const a=je(i.dependencies,t),s=a&&a.version;if(!s)continue;const c={typingLocation:r,version:new Nn(s)};this.packageNameToTypingLocation.set(n,c)}}this.log.isEnabled()&&this.log.writeLine(`Finished processing cache location '${e}'`),this.knownCachesSet.add(e)}filterTypings(e){return q(e,(e=>{const t=mR(e);if(this.missingTypingsSet.has(t))return void(this.log.isEnabled()&&this.log.writeLine(`'${e}':: '${t}' is in missingTypingsSet - skipping...`));const n=fH.validatePackageName(e);if(n!==fH.NameValidationResult.Ok)return this.missingTypingsSet.add(t),void(this.log.isEnabled()&&this.log.writeLine(fH.renderPackageNameValidationFailure(n,e)));if(this.typesRegistry.has(t)){if(!this.packageNameToTypingLocation.get(t)||!fH.isTypingUpToDate(this.packageNameToTypingLocation.get(t),this.typesRegistry.get(t)))return t;this.log.isEnabled()&&this.log.writeLine(`'${e}':: '${t}' already has an up-to-date typing - skipping...`)}else this.log.isEnabled()&&this.log.writeLine(`'${e}':: Entry for package '${t}' does not exist in local types registry - skipping...`)}))}ensurePackageDirectoryExists(e){const t=Ko(e,"package.json");this.log.isEnabled()&&this.log.writeLine(`Npm config file: ${t}`),this.installTypingHost.fileExists(t)||(this.log.isEnabled()&&this.log.writeLine(`Npm config file: '${t}' is missing, creating new one...`),this.ensureDirectoryExists(e,this.installTypingHost),this.installTypingHost.writeFile(t,'{ "private": true }'))}installTypings(e,t,n,r){this.log.isEnabled()&&this.log.writeLine(`Installing typings ${JSON.stringify(r)}`);const i=this.filterTypings(r);if(0===i.length)return this.log.isEnabled()&&this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"),void this.sendResponse(this.createSetTypings(e,n));this.ensurePackageDirectoryExists(t);const o=this.installRunCount;this.installRunCount++,this.sendResponse({kind:xH,eventId:o,typingsInstallerVersion:c,projectName:e.projectName});const a=i.map(Vpe);this.installTypingsAsync(o,a,t,(r=>{try{if(!r){this.log.isEnabled()&&this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(i)}`);for(const e of i)this.missingTypingsSet.add(e);return}this.log.isEnabled()&&this.log.writeLine(`Installed typings ${JSON.stringify(a)}`);const l=[];for(const e of i){const n=Jpe(t,e,this.installTypingHost,this.log);if(!n){this.missingTypingsSet.add(e);continue}const r=this.typesRegistry.get(e),i={typingLocation:n,version:new Nn(r[`ts${s}`]||r[this.latestDistTag])};this.packageNameToTypingLocation.set(e,i),l.push(n)}this.log.isEnabled()&&this.log.writeLine(`Installed typing files ${JSON.stringify(l)}`),this.sendResponse(this.createSetTypings(e,n.concat(l)))}finally{const t={kind:SH,eventId:o,projectName:e.projectName,packagesToInstall:a,installSuccess:r,typingsInstallerVersion:c};this.sendResponse(t)}}))}ensureDirectoryExists(e,t){const n=Ro(e);t.directoryExists(n)||this.ensureDirectoryExists(n,t),t.directoryExists(e)||t.createDirectory(e)}watchFiles(e,t){if(!t.length)return void this.closeWatchers(e);const n=this.projectWatchers.get(e),r=new Set(t);!n||ud(r,(e=>!n.has(e)))||ud(n,(e=>!r.has(e)))?(this.projectWatchers.set(e,r),this.sendResponse({kind:TH,projectName:e,files:t})):this.sendResponse({kind:TH,projectName:e,files:void 0})}createSetTypings(e,t){return{projectName:e.projectName,typeAcquisition:e.typeAcquisition,compilerOptions:e.compilerOptions,typings:t,unresolvedImports:e.unresolvedImports,kind:hH}}installTypingsAsync(e,t,n,r){this.pendingRunRequests.unshift({requestId:e,packageNames:t,cwd:n,onRequestCompleted:r}),this.executeWithThrottling()}executeWithThrottling(){for(;this.inFlightRequestCount{this.inFlightRequestCount--,e.onRequestCompleted(t),this.executeWithThrottling()}))}}};function Vpe(e){return`@types/${e}@ts${s}`}var Upe,Kpe,Wpe=(e=>(e[e.terse=0]="terse",e[e.normal=1]="normal",e[e.requestTime=2]="requestTime",e[e.verbose=3]="verbose",e))(Wpe||{}),Hpe=[],Gpe=(e=>(e.Err="Err",e.Info="Info",e.Perf="Perf",e))(Gpe||{});function Xpe(e,t,n,r){return{projectName:e.getProjectName(),fileNames:e.getFileNames(!0,!0).concat(e.getExcludedFiles()),compilerOptions:e.getCompilationSettings(),typeAcquisition:t,unresolvedImports:n,projectRootPath:e.getCurrentDirectory(),cachePath:r,kind:"discover"}}function Qpe(e){return Xo(e)}function Ype(e,t,n){return n(wo(e)?e:Go(e,t))}function Zpe(e){return e}function efe(){const e=new Map;return{get:t=>e.get(t),set(t,n){e.set(t,n)},contains:t=>e.has(t),remove(t){e.delete(t)}}}function tfe(e){return/dev\/null\/inferredProject\d+\*/.test(e)}function nfe(e){return`/dev/null/inferredProject${e}*`}function rfe(e){return`/dev/null/autoImportProviderProject${e}*`}function ife(e){return`/dev/null/auxiliaryProject${e}*`}function ofe(){return[]}(Kpe=Upe||(Upe={})).ThrowNoProject=function(){throw new Error("No Project.")},Kpe.ThrowProjectLanguageServiceDisabled=function(){throw new Error("The project's language service is disabled.")},Kpe.ThrowProjectDoesNotContainDocument=function(e,t){throw new Error(`Project '${t.getProjectName()}' does not contain document '${e}'`)};var afe=class e{constructor(e,t){this.host=e,this.pendingTimeouts=new Map,this.logger=t.hasLevel(3)?t:void 0}schedule(t,n,r){const i=this.pendingTimeouts.get(t);i&&this.host.clearTimeout(i),this.pendingTimeouts.set(t,this.host.setTimeout(e.run,n,t,this,r)),this.logger&&this.logger.info(`Scheduled: ${t}${i?", Cancelled earlier one":""}`)}cancel(e){const t=this.pendingTimeouts.get(e);return!!t&&(this.host.clearTimeout(t),this.pendingTimeouts.delete(e))}static run(e,t,n){var r,i;null==(r=tr)||r.logStartScheduledOperation(e),t.pendingTimeouts.delete(e),t.logger&&t.logger.info(`Running: ${e}`),n(),null==(i=tr)||i.logStopScheduledOperation()}},sfe=class e{constructor(e,t,n){this.host=e,this.delay=t,this.logger=n}scheduleCollect(){this.host.gc&&void 0===this.timerId&&(this.timerId=this.host.setTimeout(e.run,this.delay,this))}static run(e){var t,n;e.timerId=void 0,null==(t=tr)||t.logStartScheduledOperation("GC collect");const r=e.logger.hasLevel(2),i=r&&e.host.getMemoryUsage();if(e.host.gc(),r){const t=e.host.getMemoryUsage();e.logger.perftrc(`GC::before ${i}, after ${t}`)}null==(n=tr)||n.logStopScheduledOperation()}};function cfe(e){const t=Bo(e);return"tsconfig.json"===t||"jsconfig.json"===t?t:void 0}function lfe(e,t,n){if(!e||0===e.length)return;if(e[0]===t)return void e.splice(0,1);const r=Ae(e,t,mt,n);r>=0&&e.splice(r,1)}var ufe={};o(ufe,{ClassificationType:()=>fG,CommandTypes:()=>_fe,CompletionTriggerKind:()=>YH,IndentStyle:()=>mfe,JsxEmit:()=>gfe,ModuleKind:()=>hfe,ModuleResolutionKind:()=>yfe,NewLineKind:()=>vfe,OrganizeImportsMode:()=>QH,PollingWatchKind:()=>ffe,ScriptTarget:()=>bfe,SemicolonPreference:()=>nG,WatchDirectoryKind:()=>pfe,WatchFileKind:()=>dfe});var _fe=(e=>(e.JsxClosingTag="jsxClosingTag",e.LinkedEditingRange="linkedEditingRange",e.Brace="brace",e.BraceFull="brace-full",e.BraceCompletion="braceCompletion",e.GetSpanOfEnclosingComment="getSpanOfEnclosingComment",e.Change="change",e.Close="close",e.Completions="completions",e.CompletionInfo="completionInfo",e.CompletionsFull="completions-full",e.CompletionDetails="completionEntryDetails",e.CompletionDetailsFull="completionEntryDetails-full",e.CompileOnSaveAffectedFileList="compileOnSaveAffectedFileList",e.CompileOnSaveEmitFile="compileOnSaveEmitFile",e.Configure="configure",e.Definition="definition",e.DefinitionFull="definition-full",e.DefinitionAndBoundSpan="definitionAndBoundSpan",e.DefinitionAndBoundSpanFull="definitionAndBoundSpan-full",e.Implementation="implementation",e.ImplementationFull="implementation-full",e.EmitOutput="emit-output",e.Exit="exit",e.FileReferences="fileReferences",e.FileReferencesFull="fileReferences-full",e.Format="format",e.Formatonkey="formatonkey",e.FormatFull="format-full",e.FormatonkeyFull="formatonkey-full",e.FormatRangeFull="formatRange-full",e.Geterr="geterr",e.GeterrForProject="geterrForProject",e.SemanticDiagnosticsSync="semanticDiagnosticsSync",e.SyntacticDiagnosticsSync="syntacticDiagnosticsSync",e.SuggestionDiagnosticsSync="suggestionDiagnosticsSync",e.NavBar="navbar",e.NavBarFull="navbar-full",e.Navto="navto",e.NavtoFull="navto-full",e.NavTree="navtree",e.NavTreeFull="navtree-full",e.DocumentHighlights="documentHighlights",e.DocumentHighlightsFull="documentHighlights-full",e.Open="open",e.Quickinfo="quickinfo",e.QuickinfoFull="quickinfo-full",e.References="references",e.ReferencesFull="references-full",e.Reload="reload",e.Rename="rename",e.RenameInfoFull="rename-full",e.RenameLocationsFull="renameLocations-full",e.Saveto="saveto",e.SignatureHelp="signatureHelp",e.SignatureHelpFull="signatureHelp-full",e.FindSourceDefinition="findSourceDefinition",e.Status="status",e.TypeDefinition="typeDefinition",e.ProjectInfo="projectInfo",e.ReloadProjects="reloadProjects",e.Unknown="unknown",e.OpenExternalProject="openExternalProject",e.OpenExternalProjects="openExternalProjects",e.CloseExternalProject="closeExternalProject",e.SynchronizeProjectList="synchronizeProjectList",e.ApplyChangedToOpenFiles="applyChangedToOpenFiles",e.UpdateOpen="updateOpen",e.EncodedSyntacticClassificationsFull="encodedSyntacticClassifications-full",e.EncodedSemanticClassificationsFull="encodedSemanticClassifications-full",e.Cleanup="cleanup",e.GetOutliningSpans="getOutliningSpans",e.GetOutliningSpansFull="outliningSpans",e.TodoComments="todoComments",e.Indentation="indentation",e.DocCommentTemplate="docCommentTemplate",e.CompilerOptionsDiagnosticsFull="compilerOptionsDiagnostics-full",e.NameOrDottedNameSpan="nameOrDottedNameSpan",e.BreakpointStatement="breakpointStatement",e.CompilerOptionsForInferredProjects="compilerOptionsForInferredProjects",e.GetCodeFixes="getCodeFixes",e.GetCodeFixesFull="getCodeFixes-full",e.GetCombinedCodeFix="getCombinedCodeFix",e.GetCombinedCodeFixFull="getCombinedCodeFix-full",e.ApplyCodeActionCommand="applyCodeActionCommand",e.GetSupportedCodeFixes="getSupportedCodeFixes",e.GetApplicableRefactors="getApplicableRefactors",e.GetEditsForRefactor="getEditsForRefactor",e.GetMoveToRefactoringFileSuggestions="getMoveToRefactoringFileSuggestions",e.GetPasteEdits="getPasteEdits",e.GetEditsForRefactorFull="getEditsForRefactor-full",e.OrganizeImports="organizeImports",e.OrganizeImportsFull="organizeImports-full",e.GetEditsForFileRename="getEditsForFileRename",e.GetEditsForFileRenameFull="getEditsForFileRename-full",e.ConfigurePlugin="configurePlugin",e.SelectionRange="selectionRange",e.SelectionRangeFull="selectionRange-full",e.ToggleLineComment="toggleLineComment",e.ToggleLineCommentFull="toggleLineComment-full",e.ToggleMultilineComment="toggleMultilineComment",e.ToggleMultilineCommentFull="toggleMultilineComment-full",e.CommentSelection="commentSelection",e.CommentSelectionFull="commentSelection-full",e.UncommentSelection="uncommentSelection",e.UncommentSelectionFull="uncommentSelection-full",e.PrepareCallHierarchy="prepareCallHierarchy",e.ProvideCallHierarchyIncomingCalls="provideCallHierarchyIncomingCalls",e.ProvideCallHierarchyOutgoingCalls="provideCallHierarchyOutgoingCalls",e.ProvideInlayHints="provideInlayHints",e.WatchChange="watchChange",e.MapCode="mapCode",e))(_fe||{}),dfe=(e=>(e.FixedPollingInterval="FixedPollingInterval",e.PriorityPollingInterval="PriorityPollingInterval",e.DynamicPriorityPolling="DynamicPriorityPolling",e.FixedChunkSizePolling="FixedChunkSizePolling",e.UseFsEvents="UseFsEvents",e.UseFsEventsOnParentDirectory="UseFsEventsOnParentDirectory",e))(dfe||{}),pfe=(e=>(e.UseFsEvents="UseFsEvents",e.FixedPollingInterval="FixedPollingInterval",e.DynamicPriorityPolling="DynamicPriorityPolling",e.FixedChunkSizePolling="FixedChunkSizePolling",e))(pfe||{}),ffe=(e=>(e.FixedInterval="FixedInterval",e.PriorityInterval="PriorityInterval",e.DynamicPriority="DynamicPriority",e.FixedChunkSize="FixedChunkSize",e))(ffe||{}),mfe=(e=>(e.None="None",e.Block="Block",e.Smart="Smart",e))(mfe||{}),gfe=(e=>(e.None="none",e.Preserve="preserve",e.ReactNative="react-native",e.React="react",e.ReactJSX="react-jsx",e.ReactJSXDev="react-jsxdev",e))(gfe||{}),hfe=(e=>(e.None="none",e.CommonJS="commonjs",e.AMD="amd",e.UMD="umd",e.System="system",e.ES6="es6",e.ES2015="es2015",e.ES2020="es2020",e.ES2022="es2022",e.ESNext="esnext",e.Node16="node16",e.NodeNext="nodenext",e.Preserve="preserve",e))(hfe||{}),yfe=(e=>(e.Classic="classic",e.Node="node",e.NodeJs="node",e.Node10="node10",e.Node16="node16",e.NodeNext="nodenext",e.Bundler="bundler",e))(yfe||{}),vfe=(e=>(e.Crlf="Crlf",e.Lf="Lf",e))(vfe||{}),bfe=(e=>(e.ES3="es3",e.ES5="es5",e.ES6="es6",e.ES2015="es2015",e.ES2016="es2016",e.ES2017="es2017",e.ES2018="es2018",e.ES2019="es2019",e.ES2020="es2020",e.ES2021="es2021",e.ES2022="es2022",e.ES2023="es2023",e.ESNext="esnext",e.JSON="json",e.Latest="esnext",e))(bfe||{}),xfe=class{constructor(e,t,n){this.host=e,this.info=t,this.isOpen=!1,this.ownFileText=!1,this.pendingReloadFromDisk=!1,this.version=n||0}getVersion(){return this.svc?`SVC-${this.version}-${this.svc.getSnapshotVersion()}`:`Text-${this.version}`}hasScriptVersionCache_TestOnly(){return void 0!==this.svc}resetSourceMapInfo(){this.info.sourceFileLike=void 0,this.info.closeSourceMapFileWatcher(),this.info.sourceMapFilePath=void 0,this.info.declarationInfoPath=void 0,this.info.sourceInfos=void 0,this.info.documentPositionMapper=void 0}useText(e){this.svc=void 0,this.text=e,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo(),this.version++}edit(e,t,n){this.switchToScriptVersionCache().edit(e,t-e,n),this.ownFileText=!1,this.text=void 0,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo()}reload(e){return xn.assert(void 0!==e),this.pendingReloadFromDisk=!1,!this.text&&this.svc&&(this.text=yQ(this.svc.getSnapshot())),this.text!==e&&(this.useText(e),this.ownFileText=!1,!0)}reloadWithFileText(e){const{text:t,fileSize:n}=e||!this.info.isDynamicOrHasMixedContent()?this.getFileTextAndSize(e):{text:"",fileSize:void 0},r=this.reload(t);return this.fileSize=n,this.ownFileText=!e||e===this.info.fileName,this.ownFileText&&this.info.mTime===Yi.getTime()&&(this.info.mTime=(this.host.getModifiedTime(this.info.fileName)||Yi).getTime()),r}scheduleReloadIfNeeded(){return!this.pendingReloadFromDisk&&!this.ownFileText&&(this.pendingReloadFromDisk=!0)}delayReloadFromFileIntoText(){this.pendingReloadFromDisk=!0}getTelemetryFileSize(){return this.fileSize?this.fileSize:this.text?this.text.length:this.svc?this.svc.getSnapshot().getLength():this.getSnapshot().getLength()}getSnapshot(){var e;return(null==(e=this.tryUseScriptVersionCache())?void 0:e.getSnapshot())||(this.textSnapshot??(this.textSnapshot=JH.fromString(xn.checkDefined(this.text))))}getAbsolutePositionAndLineText(e){const t=this.tryUseScriptVersionCache();if(t)return t.getAbsolutePositionAndLineText(e);const n=this.getLineMap();return e<=n.length?{absolutePosition:n[e-1],lineText:this.text.substring(n[e-1],n[e])}:{absolutePosition:this.text.length,lineText:void 0}}lineToTextSpan(e){const t=this.tryUseScriptVersionCache();if(t)return t.lineToTextSpan(e);const n=this.getLineMap();return Xs(n[e],e+1void 0===t?t=this.host.readFile(n)||"":t;if(!Vk(this.info.fileName)){const e=this.host.getFileSize?this.host.getFileSize(n):r().length;if(e>Kfe)return xn.assert(!!this.info.containingProjects.length),this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${n} for info ${this.info.fileName}: fileSize: ${e}`),this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(n,e),{text:"",fileSize:e}}return{text:r()}}switchToScriptVersionCache(){return this.svc&&!this.pendingReloadFromDisk||(this.svc=xge.fromString(this.getOrLoadText()),this.textSnapshot=void 0,this.version++),this.svc}tryUseScriptVersionCache(){return this.svc&&!this.pendingReloadFromDisk||this.getOrLoadText(),this.isOpen?(this.svc||this.textSnapshot||(this.svc=xge.fromString(xn.checkDefined(this.text)),this.textSnapshot=void 0),this.svc):this.svc}getOrLoadText(){return(void 0===this.text||this.pendingReloadFromDisk)&&(xn.assert(!this.svc||this.pendingReloadFromDisk,"ScriptVersionCache should not be set when reloading from disk"),this.reloadWithFileText()),this.text}getLineMap(){return xn.assert(!this.svc,"ScriptVersionCache should not be set"),this.lineMap||(this.lineMap=qa(xn.checkDefined(this.text)))}getLineInfo(){const e=this.tryUseScriptVersionCache();if(e)return{getLineCount:()=>e.getLineCount(),getLineText:t=>e.getAbsolutePositionAndLineText(t+1).lineText};const t=this.getLineMap();return aJ(this.text,t)}};function Sfe(e){return"^"===e[0]||(e.includes("walkThroughSnippet:/")||e.includes("untitled:/"))&&"^"===Bo(e)[0]||e.includes(":^")&&!e.includes(xo)}var kfe=class{constructor(e,t,n,r,i,o){this.host=e,this.fileName=t,this.scriptKind=n,this.hasMixedContent=r,this.path=i,this.containingProjects=[],this.isDynamic=Sfe(t),this.textStorage=new xfe(e,this,o),(r||this.isDynamic)&&(this.realpath=this.path),this.scriptKind=n||Pk(t)}isDynamicOrHasMixedContent(){return this.hasMixedContent||this.isDynamic}isScriptOpen(){return this.textStorage.isOpen}open(e){this.textStorage.isOpen=!0,void 0!==e&&this.textStorage.reload(e)&&this.markContainingProjectsAsDirty()}close(e=!0){this.textStorage.isOpen=!1,e&&this.textStorage.scheduleReloadIfNeeded()&&this.markContainingProjectsAsDirty()}getSnapshot(){return this.textStorage.getSnapshot()}ensureRealPath(){if(void 0===this.realpath&&(this.realpath=this.path,this.host.realpath)){xn.assert(!!this.containingProjects.length);const e=this.containingProjects[0],t=this.host.realpath(this.path);t&&(this.realpath=e.toPath(t),this.realpath!==this.path&&e.projectService.realpathToScriptInfos.add(this.realpath,this))}}getRealpathIfDifferent(){return this.realpath&&this.realpath!==this.path?this.realpath:void 0}isSymlink(){return this.realpath&&this.realpath!==this.path}getFormatCodeSettings(){return this.formatSettings}getPreferences(){return this.preferences}attachToProject(e){const t=!this.isAttached(e);return t&&(this.containingProjects.push(e),e.getCompilerOptions().preserveSymlinks||this.ensureRealPath(),e.onFileAddedOrRemoved(this.isSymlink())),t}isAttached(e){switch(this.containingProjects.length){case 0:return!1;case 1:return this.containingProjects[0]===e;case 2:return this.containingProjects[0]===e||this.containingProjects[1]===e;default:return D(this.containingProjects,e)}}detachFromProject(e){switch(this.containingProjects.length){case 0:return;case 1:this.containingProjects[0]===e&&(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;case 2:this.containingProjects[0]===e?(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects[0]=this.containingProjects.pop()):this.containingProjects[1]===e&&(e.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;default:Qt(this.containingProjects,e)&&e.onFileAddedOrRemoved(this.isSymlink())}}detachAllProjects(){for(const e of this.containingProjects){zfe(e)&&e.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName,this.path,2);const t=e.getRootFilesMap().get(this.path);e.removeFile(this,!1,!1),e.onFileAddedOrRemoved(this.isSymlink()),t&&!Jfe(e)&&e.addMissingFileRoot(t.fileName)}I(this.containingProjects)}getDefaultProject(){switch(this.containingProjects.length){case 0:return Upe.ThrowNoProject();case 1:return Vfe(this.containingProjects[0])||qfe(this.containingProjects[0])?Upe.ThrowNoProject():this.containingProjects[0];default:let e,t,n,r;for(let i=0;i!e.isOrphan()))}isContainedByBackgroundProject(){return Q(this.containingProjects,qfe)}lineToTextSpan(e){return this.textStorage.lineToTextSpan(e)}lineOffsetToPosition(e,t,n){return this.textStorage.lineOffsetToPosition(e,t,n)}positionToLineOffset(e){!function(e){xn.assert("number"==typeof e,`Expected position ${e} to be a number.`),xn.assert(e>=0,"Expected position to be non-negative.")}(e);const t=this.textStorage.positionToLineOffset(e);return function(e){xn.assert("number"==typeof e.line,`Expected line ${e.line} to be a number.`),xn.assert("number"==typeof e.offset,`Expected offset ${e.offset} to be a number.`),xn.assert(e.line>0,"Expected line to be non-"+(0===e.line?"zero":"negative")),xn.assert(e.offset>0,"Expected offset to be non-"+(0===e.offset?"zero":"negative"))}(t),t}isJavaScript(){return 1===this.scriptKind||2===this.scriptKind}closeSourceMapFileWatcher(){this.sourceMapFilePath&&!st(this.sourceMapFilePath)&&(vq(this.sourceMapFilePath),this.sourceMapFilePath=void 0)}},Tfe={isKnownTypesPackageName:dt,installPackage:vt,enqueueInstallTypingsRequest:_t,attach:_t,onProjectClosed:_t,globalTypingsCacheLocation:void 0};function Cfe(e,t){if(e===t)return!0;if(0===(e||Hpe).length&&0===(t||Hpe).length)return!0;const n=new Map;let r=0;for(const t of e)!0!==n.get(t)&&(n.set(t,!0),r++);for(const e of t){const t=n.get(e);if(void 0===t)return!1;!0===t&&(n.set(e,!1),r--)}return 0===r}var wfe=class{constructor(e){this.installer=e,this.perProjectCache=new Map}isKnownTypesPackageName(e){return this.installer.isKnownTypesPackageName(e)}installPackage(e){return this.installer.installPackage(e)}enqueueInstallTypingsForProject(e,t,n){const r=e.getTypeAcquisition();if(!r||!r.enable)return;const i=this.perProjectCache.get(e.getProjectName());var o,a,s,c;!n&&i&&(s=r,c=i.typeAcquisition,s.enable===c.enable&&Cfe(s.include,c.include)&&Cfe(s.exclude,c.exclude))&&!function(e,t){return JS(e)!==JS(t)}(e.getCompilationSettings(),i.compilerOptions)&&((o=t)===(a=i.unresolvedImports)||se(o,a))||(this.perProjectCache.set(e.getProjectName(),{compilerOptions:e.getCompilationSettings(),typeAcquisition:r,typings:i?i.typings:Hpe,unresolvedImports:t,poisoned:!0}),this.installer.enqueueInstallTypingsRequest(e,r,t))}updateTypingsForProject(e,t,n,r,i){const o=he(i);return this.perProjectCache.set(e,{compilerOptions:t,typeAcquisition:n,typings:o,unresolvedImports:r,poisoned:!1}),n&&n.enable?o:Hpe}onProjectClosed(e){this.perProjectCache.delete(e.getProjectName())&&this.installer.onProjectClosed(e)}},Dfe=(e=>(e[e.Inferred=0]="Inferred",e[e.Configured=1]="Configured",e[e.External=2]="External",e[e.AutoImportProvider=3]="AutoImportProvider",e[e.Auxiliary=4]="Auxiliary",e))(Dfe||{});function Efe(e,t=!1){const n={js:0,jsSize:0,jsx:0,jsxSize:0,ts:0,tsSize:0,tsx:0,tsxSize:0,dts:0,dtsSize:0,deferred:0,deferredSize:0};for(const r of e){const e=t?r.textStorage.getTelemetryFileSize():0;switch(r.scriptKind){case 1:n.js+=1,n.jsSize+=e;break;case 2:n.jsx+=1,n.jsxSize+=e;break;case 3:QI(r.fileName)?(n.dts+=1,n.dtsSize+=e):(n.ts+=1,n.tsSize+=e);break;case 4:n.tsx+=1,n.tsxSize+=e;break;case 7:n.deferred+=1,n.deferredSize+=e}}return n}function Pfe(e){const t=Efe(e.getRootScriptInfos());return 0===t.ts&&0===t.tsx}function Nfe(e){const t=Efe(e.getScriptInfos());return 0===t.ts&&0===t.tsx}function Ffe(e){return!e.some((e=>Ao(e,".ts")&&!QI(e)||Ao(e,".tsx")))}function Afe(e){return void 0!==e.generatedFilePath}var Ife=class e{constructor(e,t,n,r,i,o,a,s,c,l,u){switch(this.projectKind=t,this.projectService=n,this.documentRegistry=r,this.compilerOptions=a,this.compileOnSaveEnabled=s,this.watchOptions=c,this.rootFilesMap=new Map,this.plugins=[],this.cachedUnresolvedImportsPerFile=new Map,this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1,this.lastReportedVersion=0,this.projectProgramVersion=0,this.projectStateVersion=0,this.isInitialLoadPending=dt,this.dirty=!1,this.typingFiles=Hpe,this.moduleSpecifierCache=qme(this),this.createHash=Ze(this.projectService.host,this.projectService.host.createHash),this.globalCacheResolutionModuleName=fH.nonRelativeModuleNameForTypingCache,this.updateFromProjectInProgress=!1,this.projectName=e,this.directoryStructureHost=l,this.currentDirectory=this.projectService.getNormalizedAbsolutePath(u),this.getCanonicalFileName=this.projectService.toCanonicalFileName,this.jsDocParsingMode=this.projectService.jsDocParsingMode,this.cancellationToken=new P7(this.projectService.cancellationToken,this.projectService.throttleWaitMilliseconds),this.compilerOptions?(i||JS(this.compilerOptions)||this.projectService.hasDeferredExtension())&&(this.compilerOptions.allowNonTsExtensions=!0):(this.compilerOptions={target:1,jsx:1},this.compilerOptions.allowNonTsExtensions=!0,this.compilerOptions.allowJs=!0),n.serverMode){case 0:this.languageServiceEnabled=!0;break;case 1:this.languageServiceEnabled=!0,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;case 2:this.languageServiceEnabled=!1,this.compilerOptions.noResolve=!0,this.compilerOptions.types=[];break;default:xn.assertNever(n.serverMode)}this.setInternalCompilerOptionsForEmittingJsFiles();const _=this.projectService.host;this.projectService.logger.loggingEnabled()?this.trace=e=>this.writeLog(e):_.trace&&(this.trace=e=>_.trace(e)),this.realpath=Ze(_,_.realpath),this.resolutionCache=wU(this,this.currentDirectory,!0),this.languageService=A7(this,this.documentRegistry,this.projectService.serverMode),o&&this.disableLanguageService(o),this.markAsDirty(),qfe(this)||(this.projectService.pendingEnsureProjectForOpenFiles=!0),this.projectService.onProjectCreation(this)}getResolvedProjectReferenceToRedirect(e){}isNonTsProject(){return Fme(this),Nfe(this)}isJsOnlyProject(){return Fme(this),function(e){const t=Efe(e.getScriptInfos());return t.js>0&&0===t.ts&&0===t.tsx}(this)}static resolveModule(t,n,r,i){return e.importServicePluginSync({name:t},[n],r,i).resolvedModule}static importServicePluginSync(e,t,n,r){let i,o;xn.assertIsDefined(n.require);for(const a of t){const t=Vo(n.resolvePath(Ko(a,"node_modules")));r(`Loading ${e.name} from ${a} (resolved to ${t})`);const s=n.require(t,e.name);if(!s.error){o=s.module;break}const c=s.error.stack||s.error.message||JSON.stringify(s.error);(i??(i=[])).push(`Failed to load module '${e.name}' from ${t}: ${c}`)}return{pluginConfigEntry:e,resolvedModule:o,errorLogs:i}}static async importServicePluginAsync(e,t,n,r){let i,o;xn.assertIsDefined(n.importPlugin);for(const a of t){const t=Ko(a,"node_modules");let s;r(`Dynamically importing ${e.name} from ${a} (resolved to ${t})`);try{s=await n.importPlugin(t,e.name)}catch(e){s={module:void 0,error:e}}if(!s.error){o=s.module;break}const c=s.error.stack||s.error.message||JSON.stringify(s.error);(i??(i=[])).push(`Failed to dynamically import module '${e.name}' from ${t}: ${c}`)}return{pluginConfigEntry:e,resolvedModule:o,errorLogs:i}}isKnownTypesPackageName(e){return this.typingsCache.isKnownTypesPackageName(e)}installPackage(e){return this.typingsCache.installPackage({...e,projectName:this.projectName,projectRootPath:this.toPath(this.currentDirectory)})}getGlobalTypingsCacheLocation(){return this.getGlobalCache()}get typingsCache(){return this.projectService.typingsCache}getSymlinkCache(){return this.symlinks||(this.symlinks=ik(this.getCurrentDirectory(),this.getCanonicalFileName)),this.program&&!this.symlinks.hasProcessedResolutions()&&this.symlinks.setSymlinksFromResolutions(this.program.forEachResolvedModule,this.program.forEachResolvedTypeReferenceDirective,this.program.getAutomaticTypeDirectiveResolutions()),this.symlinks}getCompilationSettings(){return this.compilerOptions}getCompilerOptions(){return this.getCompilationSettings()}getNewLine(){return this.projectService.host.newLine}getProjectVersion(){return this.projectStateVersion.toString()}getProjectReferences(){}getScriptFileNames(){if(!this.rootFilesMap.size)return u;let e;return this.rootFilesMap.forEach((t=>{(this.languageServiceEnabled||t.info&&t.info.isScriptOpen())&&(e||(e=[])).push(t.fileName)})),pe(e,this.typingFiles)||u}getOrCreateScriptInfoAndAttachToProject(e){const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);if(t){const e=this.rootFilesMap.get(t.path);e&&e.info!==t&&(e.info=t),t.attachToProject(this)}return t}getScriptKind(e){const t=this.projectService.getScriptInfoForPath(this.toPath(e));return t&&t.scriptKind}getScriptVersion(e){const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);return t&&t.getLatestVersion()}getScriptSnapshot(e){const t=this.getOrCreateScriptInfoAndAttachToProject(e);if(t)return t.getSnapshot()}getCancellationToken(){return this.cancellationToken}getCurrentDirectory(){return this.currentDirectory}getDefaultLibFileName(){return Ko(Ro(Xo(this.projectService.getExecutingFilePath())),Ls(this.compilerOptions))}useCaseSensitiveFileNames(){return this.projectService.host.useCaseSensitiveFileNames}readDirectory(e,t,n,r,i){return this.directoryStructureHost.readDirectory(e,t,n,r,i)}readFile(e){return this.projectService.host.readFile(e)}writeFile(e,t){return this.projectService.host.writeFile(e,t)}fileExists(e){const t=this.toPath(e);return!this.isWatchedMissingFile(t)&&this.directoryStructureHost.fileExists(e)}resolveModuleNameLiterals(e,t,n,r,i,o){return this.resolutionCache.resolveModuleNameLiterals(e,t,n,r,i,o)}getModuleResolutionCache(){return this.resolutionCache.getModuleResolutionCache()}resolveTypeReferenceDirectiveReferences(e,t,n,r,i,o){return this.resolutionCache.resolveTypeReferenceDirectiveReferences(e,t,n,r,i,o)}resolveLibrary(e,t,n,r){return this.resolutionCache.resolveLibrary(e,t,n,r)}directoryExists(e){return this.directoryStructureHost.directoryExists(e)}getDirectories(e){return this.directoryStructureHost.getDirectories(e)}getCachedDirectoryStructureHost(){}toPath(e){return Yo(e,this.currentDirectory,this.projectService.toCanonicalFileName)}watchDirectoryOfFailedLookupLocation(e,t,n){return this.projectService.watchFactory.watchDirectory(e,t,n,this.projectService.getWatchOptions(this),ZU.FailedLookupLocations,this)}watchAffectingFileLocation(e,t){return this.projectService.watchFactory.watchFile(e,t,2e3,this.projectService.getWatchOptions(this),ZU.AffectingFileLocation,this)}clearInvalidateResolutionOfFailedLookupTimer(){return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`)}scheduleInvalidateResolutionsOfFailedLookupLocations(){this.projectService.throttledOperations.schedule(`${this.getProjectName()}FailedLookupInvalidation`,1e3,(()=>{this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}))}invalidateResolutionsOfFailedLookupLocations(){this.clearInvalidateResolutionOfFailedLookupTimer()&&this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&(this.markAsDirty(),this.projectService.delayEnsureProjectForOpenFiles())}onInvalidatedResolution(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}watchTypeRootsDirectory(e,t,n){return this.projectService.watchFactory.watchDirectory(e,t,n,this.projectService.getWatchOptions(this),ZU.TypeRoots,this)}hasChangedAutomaticTypeDirectiveNames(){return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames()}onChangedAutomaticTypeDirectiveNames(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}getGlobalCache(){return this.getTypeAcquisition().enable?this.projectService.typingsInstaller.globalTypingsCacheLocation:void 0}fileIsOpen(e){return this.projectService.openFiles.has(e)}writeLog(e){this.projectService.logger.info(e)}log(e){this.writeLog(e)}error(e){this.projectService.logger.msg(e,"Err")}setInternalCompilerOptionsForEmittingJsFiles(){0!==this.projectKind&&2!==this.projectKind||(this.compilerOptions.noEmitForJsFiles=!0)}getGlobalProjectErrors(){return F(this.projectErrors,(e=>!e.file))||Hpe}getAllProjectErrors(){return this.projectErrors||Hpe}setProjectErrors(e){this.projectErrors=e}getLanguageService(e=!0){return e&&Fme(this),this.languageService}getSourceMapper(){return this.getLanguageService().getSourceMapper()}clearSourceMapperCache(){this.languageService.clearSourceMapperCache()}getDocumentPositionMapper(e,t){return this.projectService.getDocumentPositionMapper(this,e,t)}getSourceFileLike(e){return this.projectService.getSourceFileLike(e,this)}shouldEmitFile(e){return e&&!e.isDynamicOrHasMixedContent()&&!this.program.isSourceOfProjectReferenceRedirect(e.path)}getCompileOnSaveAffectedFileList(e){return this.languageServiceEnabled?(Fme(this),this.builderState=wV.create(this.program,this.builderState,!0),q(wV.getFilesAffectedBy(this.builderState,this.program,e.path,this.cancellationToken,this.projectService.host),(e=>this.shouldEmitFile(this.projectService.getScriptInfoForPath(e.path))?e.fileName:void 0))):[]}emitFile(e,t){if(!this.languageServiceEnabled||!this.shouldEmitFile(e))return{emitSkipped:!0,diagnostics:Hpe};const{emitSkipped:n,diagnostics:r,outputFiles:i}=this.getLanguageService().getEmitOutput(e.fileName);if(!n){for(const e of i)t(Go(e.name,this.currentDirectory),e.text,e.writeByteOrderMark);if(this.builderState&&LS(this.compilerOptions)){const t=i.filter((e=>QI(e.name)));if(1===t.length){const n=this.program.getSourceFile(e.fileName),r=this.projectService.host.createHash?this.projectService.host.createHash(t[0].text):Hi(t[0].text);wV.updateSignatureOfFile(this.builderState,r,n.resolvedPath)}}}return{emitSkipped:n,diagnostics:r}}enableLanguageService(){this.languageServiceEnabled||2===this.projectService.serverMode||(this.languageServiceEnabled=!0,this.lastFileExceededProgramSize=void 0,this.projectService.onUpdateLanguageServiceStateForProject(this,!0))}cleanupProgram(){if(this.program){for(const e of this.program.getSourceFiles())this.detachScriptInfoIfNotRoot(e.fileName);this.program.forEachResolvedProjectReference((e=>this.detachScriptInfoFromProject(e.sourceFile.fileName))),this.program=void 0}}disableLanguageService(e){this.languageServiceEnabled&&(xn.assert(2!==this.projectService.serverMode),this.languageService.cleanupSemanticCache(),this.languageServiceEnabled=!1,this.cleanupProgram(),this.lastFileExceededProgramSize=e,this.builderState=void 0,this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.resolutionCache.closeTypeRootsWatch(),this.clearGeneratedFileWatch(),this.projectService.verifyDocumentRegistry(),this.projectService.onUpdateLanguageServiceStateForProject(this,!1))}getProjectName(){return this.projectName}removeLocalTypingsFromTypeAcquisition(e){return e&&e.include?{...e,include:this.removeExistingTypings(e.include)}:e}getExternalFiles(e){return he(R(this.plugins,(t=>{if("function"==typeof t.module.getExternalFiles)try{return t.module.getExternalFiles(this,e||0)}catch(e){this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`),e.stack&&this.projectService.logger.info(e.stack)}})))}getSourceFile(e){if(this.program)return this.program.getSourceFileByPath(e)}getSourceFileOrConfigFile(e){const t=this.program.getCompilerOptions();return e===t.configFilePath?t.configFile:this.getSourceFile(e)}close(){var e;this.projectService.typingsCache.onProjectClosed(this),this.closeWatchingTypingLocations(),this.cleanupProgram(),f(this.externalFiles,(e=>this.detachScriptInfoIfNotRoot(e))),this.rootFilesMap.forEach((e=>{var t;return null==(t=e.info)?void 0:t.detachFromProject(this)})),this.projectService.pendingEnsureProjectForOpenFiles=!0,this.rootFilesMap=void 0,this.externalFiles=void 0,this.program=void 0,this.builderState=void 0,this.resolutionCache.clear(),this.resolutionCache=void 0,this.cachedUnresolvedImportsPerFile=void 0,null==(e=this.packageJsonWatches)||e.forEach((e=>{e.projects.delete(this),e.close()})),this.packageJsonWatches=void 0,this.moduleSpecifierCache.clear(),this.moduleSpecifierCache=void 0,this.directoryStructureHost=void 0,this.exportMapCache=void 0,this.projectErrors=void 0,this.plugins.length=0,this.missingFilesMap&&(xx(this.missingFilesMap,dx),this.missingFilesMap=void 0),this.clearGeneratedFileWatch(),this.clearInvalidateResolutionOfFailedLookupTimer(),this.autoImportProviderHost&&this.autoImportProviderHost.close(),this.autoImportProviderHost=void 0,this.noDtsResolutionProject&&this.noDtsResolutionProject.close(),this.noDtsResolutionProject=void 0,this.languageService.dispose(),this.languageService=void 0}detachScriptInfoIfNotRoot(e){const t=this.projectService.getScriptInfo(e);t&&!this.isRoot(t)&&t.detachFromProject(this)}isClosed(){return void 0===this.rootFilesMap}hasRoots(){var e;return!!(null==(e=this.rootFilesMap)?void 0:e.size)}isOrphan(){return!1}getRootFiles(){return this.rootFilesMap&&$e(V(this.rootFilesMap.values(),(e=>{var t;return null==(t=e.info)?void 0:t.fileName})))}getRootFilesMap(){return this.rootFilesMap}getRootScriptInfos(){return $e(V(this.rootFilesMap.values(),(e=>e.info)))}getScriptInfos(){return this.languageServiceEnabled?O(this.program.getSourceFiles(),(e=>{const t=this.projectService.getScriptInfoForPath(e.resolvedPath);return xn.assert(!!t,"getScriptInfo",(()=>`scriptInfo for a file '${e.fileName}' Path: '${e.path}' / '${e.resolvedPath}' is missing.`)),t})):this.getRootScriptInfos()}getExcludedFiles(){return Hpe}getFileNames(e,t){if(!this.program)return[];if(!this.languageServiceEnabled){let e=this.getRootFiles();if(this.compilerOptions){const t=L7(this.compilerOptions);t&&(e||(e=[])).push(t)}return e}const n=[];for(const t of this.program.getSourceFiles())e&&this.program.isSourceFileFromExternalLibrary(t)||n.push(t.fileName);if(!t){const e=this.program.getCompilerOptions().configFile;if(e&&(n.push(e.fileName),e.extendedSourceFiles))for(const t of e.extendedSourceFiles)n.push(t)}return n}getFileNamesWithRedirectInfo(e){return this.getFileNames().map((t=>({fileName:t,isSourceOfProjectReferenceRedirect:e&&this.isSourceOfProjectReferenceRedirect(t)})))}hasConfigFile(e){if(this.program&&this.languageServiceEnabled){const t=this.program.getCompilerOptions().configFile;if(t){if(e===t.fileName)return!0;if(t.extendedSourceFiles)for(const n of t.extendedSourceFiles)if(e===n)return!0}}return!1}containsScriptInfo(e){if(this.isRoot(e))return!0;if(!this.program)return!1;const t=this.program.getSourceFileByPath(e.path);return!!t&&t.resolvedPath===e.path}containsFile(e,t){const n=this.projectService.getScriptInfoForNormalizedPath(e);return!(!n||!n.isScriptOpen()&&t)&&this.containsScriptInfo(n)}isRoot(e){var t,n;return(null==(n=null==(t=this.rootFilesMap)?void 0:t.get(e.path))?void 0:n.info)===e}addRoot(e,t){xn.assert(!this.isRoot(e)),this.rootFilesMap.set(e.path,{fileName:t||e.fileName,info:e}),e.attachToProject(this),this.markAsDirty()}addMissingFileRoot(e){const t=this.projectService.toPath(e);this.rootFilesMap.set(t,{fileName:e}),this.markAsDirty()}removeFile(e,t,n){this.isRoot(e)&&this.removeRoot(e),t?this.resolutionCache.removeResolutionsOfFile(e.path):this.resolutionCache.invalidateResolutionOfFile(e.path),this.cachedUnresolvedImportsPerFile.delete(e.path),n&&e.detachFromProject(this),this.markAsDirty()}registerFileUpdate(e){(this.updatedFileNames||(this.updatedFileNames=new Set)).add(e)}markFileAsDirty(e){this.markAsDirty(),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.changedFilesForExportMapCache||(this.changedFilesForExportMapCache=new Set)).add(e)}markAsDirty(){this.dirty||(this.projectStateVersion++,this.dirty=!0)}markAutoImportProviderAsDirty(){var e;this.autoImportProviderHost||(this.autoImportProviderHost=void 0),null==(e=this.autoImportProviderHost)||e.markAsDirty()}onAutoImportProviderSettingsChanged(){var e;!1===this.autoImportProviderHost?this.autoImportProviderHost=void 0:null==(e=this.autoImportProviderHost)||e.markAsDirty()}onPackageJsonChange(){this.moduleSpecifierCache.clear(),this.autoImportProviderHost&&this.autoImportProviderHost.markAsDirty()}onFileAddedOrRemoved(e){this.hasAddedorRemovedFiles=!0,e&&(this.hasAddedOrRemovedSymlinks=!0)}onDiscoveredSymlink(){this.hasAddedOrRemovedSymlinks=!0}updateFromProject(){Fme(this)}updateGraph(){var e,t,n,r;null==(e=or)||e.push(or.Phase.Session,"updateGraph",{name:this.projectName,kind:Dfe[this.projectKind]}),null==(t=tr)||t.logStartUpdateGraph(),this.resolutionCache.startRecordingFilesWithChangedResolutions();const i=this.updateGraphWorker(),o=this.hasAddedorRemovedFiles;this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1;const a=this.resolutionCache.finishRecordingFilesWithChangedResolutions()||Hpe;for(const e of a)this.cachedUnresolvedImportsPerFile.delete(e);this.languageServiceEnabled&&0===this.projectService.serverMode&&!this.isOrphan()?((i||a.length)&&(this.lastCachedUnresolvedImportsList=function(e,t){var n,r;const i=e.getSourceFiles();null==(n=or)||n.push(or.Phase.Session,"getUnresolvedImports",{count:i.length});const o=e.getTypeChecker().getAmbientModules().map((e=>By(e.getName()))),a=oe(R(i,(n=>function(e,t,n,r){return K(r,t.path,(()=>{let r;return e.forEachResolvedModule((({resolvedModule:e},t)=>{e&&aT(e.extension)||Os(t)||n.some((e=>e===t))||(r=ue(r,eR(t).packageName))}),t),r||Hpe}))}(e,n,o,t))));return null==(r=or)||r.pop(),a}(this.program,this.cachedUnresolvedImportsPerFile)),this.projectService.typingsCache.enqueueInstallTypingsForProject(this,this.lastCachedUnresolvedImportsList,o)):this.lastCachedUnresolvedImportsList=void 0;const s=0===this.projectProgramVersion&&i;return i&&this.projectProgramVersion++,o&&this.markAutoImportProviderAsDirty(),s&&this.getPackageJsonAutoImportProvider(),null==(n=tr)||n.logStopUpdateGraph(),null==(r=or)||r.pop(),!i}updateTypingFiles(e){mn(e,this.typingFiles,Lt(!this.useCaseSensitiveFileNames()),_t,(e=>this.detachScriptInfoFromProject(e)))&&(this.typingFiles=e,this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))}closeWatchingTypingLocations(){this.typingWatchers&&xx(this.typingWatchers,dx),this.typingWatchers=void 0}onTypingInstallerWatchInvoke(){this.typingWatchers.isInvoked=!0,this.projectService.updateTypingsForProject({projectName:this.getProjectName(),kind:yH})}watchTypingLocations(e){if(!e)return void(this.typingWatchers.isInvoked=!1);if(!e.length)return void this.closeWatchingTypingLocations();const t=new Map(this.typingWatchers);this.typingWatchers||(this.typingWatchers=new Map),this.typingWatchers.isInvoked=!1;const n=(e,n)=>{const r=this.toPath(e);t.delete(r),this.typingWatchers.has(r)||this.typingWatchers.set(r,"FileWatcher"===n?this.projectService.watchFactory.watchFile(e,(()=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):this.onTypingInstallerWatchInvoke()),2e3,this.projectService.getWatchOptions(this),ZU.TypingInstallerLocationFile,this):this.projectService.watchFactory.watchDirectory(e,(e=>this.typingWatchers.isInvoked?this.writeLog("TypingWatchers already invoked"):Ao(e,".json")?ca(e,Ko(this.projectService.typingsInstaller.globalTypingsCacheLocation,"package.json"),!this.useCaseSensitiveFileNames())?this.writeLog("Ignoring package.json change at global typings location"):void this.onTypingInstallerWatchInvoke():this.writeLog("Ignoring files that are not *.json")),1,this.projectService.getWatchOptions(this),ZU.TypingInstallerLocationDirectory,this))};for(const t of e){const e=Bo(t);if("package.json"!==e&&"bower.json"!==e)if(la(this.currentDirectory,t,this.currentDirectory,!this.useCaseSensitiveFileNames())){const e=t.indexOf(xo,this.currentDirectory.length+1);n(-1!==e?t.substr(0,e):t,"DirectoryWatcher")}else la(this.projectService.typingsInstaller.globalTypingsCacheLocation,t,this.currentDirectory,!this.useCaseSensitiveFileNames())?n(this.projectService.typingsInstaller.globalTypingsCacheLocation,"DirectoryWatcher"):n(t,"DirectoryWatcher");else n(t,"FileWatcher")}t.forEach(((e,t)=>{e.close(),this.typingWatchers.delete(t)}))}getCurrentProgram(){return this.program}removeExistingTypings(e){const t=oj(this.getCompilerOptions(),this.directoryStructureHost);return e.filter((e=>!t.includes(e)))}updateGraphWorker(){var e,t;const n=this.languageService.getCurrentProgram();xn.assert(n===this.program),xn.assert(!this.isClosed(),"Called update graph worker of closed project"),this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`);const r=Yn(),{hasInvalidatedResolutions:i,hasInvalidatedLibResolutions:o}=this.resolutionCache.createHasInvalidatedResolutions(dt,dt);this.hasInvalidatedResolutions=i,this.hasInvalidatedLibResolutions=o,this.resolutionCache.startCachingPerDirectoryResolution(),this.dirty=!1,this.updateFromProjectInProgress=!0,this.program=this.languageService.getProgram(),this.updateFromProjectInProgress=!1,null==(e=or)||e.push(or.Phase.Session,"finishCachingPerDirectoryResolution"),this.resolutionCache.finishCachingPerDirectoryResolution(this.program,n),null==(t=or)||t.pop(),xn.assert(void 0===n||void 0!==this.program);let a=!1;if(this.program&&(!n||this.program!==n&&2!==this.program.structureIsReused)){if(a=!0,n){for(const e of n.getSourceFiles()){const t=this.program.getSourceFileByPath(e.resolvedPath);(!t||e.resolvedPath===e.path&&t.resolvedPath!==e.path)&&this.detachScriptInfoFromProject(e.fileName,!!this.program.getSourceFileByPath(e.path),!0)}n.forEachResolvedProjectReference((e=>{this.program.getResolvedProjectReferenceByPath(e.sourceFile.path)||this.detachScriptInfoFromProject(e.sourceFile.fileName,void 0,!0)}))}if(this.rootFilesMap.forEach(((e,t)=>{var n;const r=this.program.getSourceFileByPath(t),i=e.info;r&&(null==(n=e.info)?void 0:n.path)!==r.resolvedPath&&(e.info=this.projectService.getScriptInfo(r.fileName),xn.assert(e.info.isAttached(this)),null==i||i.detachFromProject(this))})),dq(this.program,this.missingFilesMap||(this.missingFilesMap=new Map),((e,t)=>this.addMissingFileWatcher(e,t))),this.generatedFilesMap){const e=this.compilerOptions.outFile;Afe(this.generatedFilesMap)?e&&this.isValidGeneratedFileWatcher(Yk(e)+".d.ts",this.generatedFilesMap)||this.clearGeneratedFileWatch():e?this.clearGeneratedFileWatch():this.generatedFilesMap.forEach(((e,t)=>{const n=this.program.getSourceFileByPath(t);n&&n.resolvedPath===t&&this.isValidGeneratedFileWatcher(ev(n.fileName,this.compilerOptions,this.currentDirectory,this.program.getCommonSourceDirectory(),this.getCanonicalFileName),e)||(vq(e),this.generatedFilesMap.delete(t))}))}this.languageServiceEnabled&&0===this.projectService.serverMode&&this.resolutionCache.updateTypeRootsWatch()}this.projectService.verifyProgram(this),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.exportMapCache.releaseSymbols(),this.hasAddedorRemovedFiles||n&&!this.program.structureIsReused?this.exportMapCache.clear():this.changedFilesForExportMapCache&&n&&this.program&&ud(this.changedFilesForExportMapCache,(e=>{const t=n.getSourceFileByPath(e),r=this.program.getSourceFileByPath(e);return t&&r?this.exportMapCache.onFileChanged(t,r,!!this.getTypeAcquisition().enable):(this.exportMapCache.clear(),!0)}))),this.changedFilesForExportMapCache&&this.changedFilesForExportMapCache.clear(),(this.hasAddedOrRemovedSymlinks||this.program&&!this.program.structureIsReused&&this.getCompilerOptions().preserveSymlinks)&&(this.symlinks=void 0,this.moduleSpecifierCache.clear());const s=this.externalFiles||Hpe;this.externalFiles=this.getExternalFiles(),mn(this.externalFiles,s,Lt(!this.useCaseSensitiveFileNames()),(e=>{const t=this.projectService.getOrCreateScriptInfoNotOpenedByClient(e,this.currentDirectory,this.directoryStructureHost,!1);null==t||t.attachToProject(this)}),(e=>this.detachScriptInfoFromProject(e)));const c=Yn()-r;return this.sendPerformanceEvent("UpdateGraph",c),this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${a}${this.program?` structureIsReused:: ${Jr[this.program.structureIsReused]}`:""} Elapsed: ${c}ms`),this.projectService.logger.isTestLogger?this.program!==n?this.print(!0,this.hasAddedorRemovedFiles,!0):this.writeLog("Same program as before"):this.hasAddedorRemovedFiles?this.print(!0,!0,!1):this.program!==n&&this.writeLog("Different program with same set of files"),this.projectService.verifyDocumentRegistry(),a}sendPerformanceEvent(e,t){this.projectService.sendPerformanceEvent(e,t)}detachScriptInfoFromProject(e,t,n){const r=this.projectService.getScriptInfo(e);r&&(r.detachFromProject(this),t||this.resolutionCache.removeResolutionsOfFile(r.path,n))}addMissingFileWatcher(e,t){var n;if(zfe(this)){const t=this.projectService.configFileExistenceInfoCache.get(e);if(null==(n=null==t?void 0:t.config)?void 0:n.projects.has(this.canonicalConfigFilePath))return XU}const r=this.projectService.watchFactory.watchFile(Go(t,this.currentDirectory),((t,n)=>{zfe(this)&&this.getCachedDirectoryStructureHost().addOrDeleteFile(t,e,n),0===n&&this.missingFilesMap.has(e)&&(this.missingFilesMap.delete(e),r.close(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))}),500,this.projectService.getWatchOptions(this),ZU.MissingFile,this);return r}isWatchedMissingFile(e){return!!this.missingFilesMap&&this.missingFilesMap.has(e)}addGeneratedFileWatch(e,t){if(this.compilerOptions.outFile)this.generatedFilesMap||(this.generatedFilesMap=this.createGeneratedFileWatcher(e));else{const n=this.toPath(t);if(this.generatedFilesMap){if(Afe(this.generatedFilesMap))return void xn.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);if(this.generatedFilesMap.has(n))return}else this.generatedFilesMap=new Map;this.generatedFilesMap.set(n,this.createGeneratedFileWatcher(e))}}createGeneratedFileWatcher(e){return{generatedFilePath:this.toPath(e),watcher:this.projectService.watchFactory.watchFile(e,(()=>{this.clearSourceMapperCache(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}),2e3,this.projectService.getWatchOptions(this),ZU.MissingGeneratedFile,this)}}isValidGeneratedFileWatcher(e,t){return this.toPath(e)===t.generatedFilePath}clearGeneratedFileWatch(){this.generatedFilesMap&&(Afe(this.generatedFilesMap)?vq(this.generatedFilesMap):xx(this.generatedFilesMap,vq),this.generatedFilesMap=void 0)}getScriptInfoForNormalizedPath(e){const t=this.projectService.getScriptInfoForPath(this.toPath(e));return t&&!t.isAttached(this)?Upe.ThrowProjectDoesNotContainDocument(e,this):t}getScriptInfo(e){return this.projectService.getScriptInfo(e)}filesToString(e){return this.filesToStringWorker(e,!0,!1)}filesToStringWorker(e,t,n){if(this.isInitialLoadPending())return"\tFiles (0) InitialLoadPending\n";if(!this.program)return"\tFiles (0) NoProgram\n";const r=this.program.getSourceFiles();let i=`\tFiles (${r.length})\n`;if(e){for(const e of r)i+=`\t${e.fileName}${n?` ${e.version} ${JSON.stringify(e.text)}`:""}\n`;t&&(i+="\n\n",$U(this.program,(e=>i+=`\t${e}\n`)))}return i}print(e,t,n){var r;this.writeLog(`Project '${this.projectName}' (${Dfe[this.projectKind]})`),this.writeLog(this.filesToStringWorker(e&&this.projectService.logger.hasLevel(3),t&&this.projectService.logger.hasLevel(3),n&&this.projectService.logger.hasLevel(3))),this.writeLog("-----------------------------------------------"),this.autoImportProviderHost&&this.autoImportProviderHost.print(!1,!1,!1),null==(r=this.noDtsResolutionProject)||r.print(!1,!1,!1)}setCompilerOptions(e){var t;if(e){e.allowNonTsExtensions=!0;const n=this.compilerOptions;this.compilerOptions=e,this.setInternalCompilerOptionsForEmittingJsFiles(),null==(t=this.noDtsResolutionProject)||t.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()),id(n,e)&&(this.cachedUnresolvedImportsPerFile.clear(),this.lastCachedUnresolvedImportsList=void 0,this.resolutionCache.onChangesAffectModuleResolution(),this.moduleSpecifierCache.clear()),this.markAsDirty()}}setWatchOptions(e){this.watchOptions=e}getWatchOptions(){return this.watchOptions}setTypeAcquisition(e){e&&(this.typeAcquisition=this.removeLocalTypingsFromTypeAcquisition(e))}getTypeAcquisition(){return this.typeAcquisition||{}}getChangesSinceVersion(e,t){var n,r;const i=t?e=>$e(e.entries(),(([e,t])=>({fileName:e,isSourceOfProjectReferenceRedirect:t}))):e=>$e(e.keys());this.isInitialLoadPending()||Fme(this);const o={projectName:this.getProjectName(),version:this.projectProgramVersion,isInferred:Jfe(this),options:this.getCompilationSettings(),languageServiceDisabled:!this.languageServiceEnabled,lastFileExceededProgramSize:this.lastFileExceededProgramSize},a=this.updatedFileNames;if(this.updatedFileNames=void 0,this.lastReportedFileNames&&e===this.lastReportedVersion){if(this.projectProgramVersion===this.lastReportedVersion&&!a)return{info:o,projectErrors:this.getGlobalProjectErrors()};const e=this.lastReportedFileNames,r=(null==(n=this.externalFiles)?void 0:n.map((e=>({fileName:Qpe(e),isSourceOfProjectReferenceRedirect:!1}))))||Hpe,s=Ue(this.getFileNamesWithRedirectInfo(!!t).concat(r),(e=>e.fileName),(e=>e.isSourceOfProjectReferenceRedirect)),c=new Map,l=new Map,u=a?$e(a.keys()):[],_=[];return ld(s,((n,r)=>{e.has(r)?t&&n!==e.get(r)&&_.push({fileName:r,isSourceOfProjectReferenceRedirect:n}):c.set(r,n)})),ld(e,((e,t)=>{s.has(t)||l.set(t,e)})),this.lastReportedFileNames=s,this.lastReportedVersion=this.projectProgramVersion,{info:o,changes:{added:i(c),removed:i(l),updated:t?u.map((e=>({fileName:e,isSourceOfProjectReferenceRedirect:this.isSourceOfProjectReferenceRedirect(e)}))):u,updatedRedirects:t?_:void 0},projectErrors:this.getGlobalProjectErrors()}}{const e=this.getFileNamesWithRedirectInfo(!!t),n=(null==(r=this.externalFiles)?void 0:r.map((e=>({fileName:Qpe(e),isSourceOfProjectReferenceRedirect:!1}))))||Hpe,i=e.concat(n);return this.lastReportedFileNames=Ue(i,(e=>e.fileName),(e=>e.isSourceOfProjectReferenceRedirect)),this.lastReportedVersion=this.projectProgramVersion,{info:o,files:t?i:i.map((e=>e.fileName)),projectErrors:this.getGlobalProjectErrors()}}}removeRoot(e){this.rootFilesMap.delete(e.path)}isSourceOfProjectReferenceRedirect(e){return!!this.program&&this.program.isSourceOfProjectReferenceRedirect(e)}getGlobalPluginSearchPaths(){return[...this.projectService.pluginProbeLocations,Ko(this.projectService.getExecutingFilePath(),"../../..")]}enableGlobalPlugins(e){if(!this.projectService.globalPlugins.length)return;const t=this.projectService.host;if(!t.require&&!t.importPlugin)return void this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");const n=this.getGlobalPluginSearchPaths();for(const t of this.projectService.globalPlugins)t&&(e.plugins&&e.plugins.some((e=>e.name===t))||(this.projectService.logger.info(`Loading global plugin ${t}`),this.enablePlugin({name:t,global:!0},n)))}enablePlugin(e,t){this.projectService.requestEnablePlugin(this,e,t)}enableProxy(e,t){try{if("function"!=typeof e)return void this.projectService.logger.info(`Skipped loading plugin ${t.name} because it did not expose a proper factory function`);const n={config:t,project:this,languageService:this.languageService,languageServiceHost:this,serverHost:this.projectService.host,session:this.projectService.session},r=e({typescript:Ape}),i=r.create(n);for(const e of Object.keys(this.languageService))e in i||(this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${e} in created LS. Patching.`),i[e]=this.languageService[e]);this.projectService.logger.info("Plugin validation succeeded"),this.languageService=i,this.plugins.push({name:t.name,module:r})}catch(e){this.projectService.logger.info(`Plugin activation failed: ${e}`)}}onPluginConfigurationChanged(e,t){this.plugins.filter((t=>t.name===e)).forEach((e=>{e.module.onConfigurationChanged&&e.module.onConfigurationChanged(t)}))}refreshDiagnostics(){this.projectService.sendProjectsUpdatedInBackgroundEvent()}getPackageJsonsVisibleToFile(e,t){return 0!==this.projectService.serverMode?Hpe:this.projectService.getPackageJsonsVisibleToFile(e,this,t)}getNearestAncestorDirectoryWithPackageJson(e){return this.projectService.getNearestAncestorDirectoryWithPackageJson(e)}getPackageJsonsForAutoImport(e){return this.getPackageJsonsVisibleToFile(Ko(this.currentDirectory,rV),e)}getPackageJsonCache(){return this.projectService.packageJsonCache}getCachedExportInfoMap(){return this.exportMapCache||(this.exportMapCache=e0(this))}clearCachedExportInfoMap(){var e;null==(e=this.exportMapCache)||e.clear()}getModuleSpecifierCache(){return this.moduleSpecifierCache}includePackageJsonAutoImports(){return 0!==this.projectService.includePackageJsonAutoImports()&&this.languageServiceEnabled&&!SZ(this.currentDirectory)&&this.isDefaultProjectForOpenFiles()?this.projectService.includePackageJsonAutoImports():0}getHostForAutoImportProvider(){var e,t;return this.program?{fileExists:this.program.fileExists,directoryExists:this.program.directoryExists,realpath:this.program.realpath||(null==(e=this.projectService.host.realpath)?void 0:e.bind(this.projectService.host)),getCurrentDirectory:this.getCurrentDirectory.bind(this),readFile:this.projectService.host.readFile.bind(this.projectService.host),getDirectories:this.projectService.host.getDirectories.bind(this.projectService.host),trace:null==(t=this.projectService.host.trace)?void 0:t.bind(this.projectService.host),useCaseSensitiveFileNames:this.program.useCaseSensitiveFileNames(),readDirectory:this.projectService.host.readDirectory.bind(this.projectService.host)}:this.projectService.host}getPackageJsonAutoImportProvider(){var e,t,n;if(!1===this.autoImportProviderHost)return;if(0!==this.projectService.serverMode)return void(this.autoImportProviderHost=!1);if(this.autoImportProviderHost)return Fme(this.autoImportProviderHost),this.autoImportProviderHost.isEmpty()?(this.autoImportProviderHost.close(),void(this.autoImportProviderHost=void 0)):this.autoImportProviderHost.getCurrentProgram();const r=this.includePackageJsonAutoImports();if(r){null==(e=or)||e.push(or.Phase.Session,"getPackageJsonAutoImportProvider");const i=Yn();if(this.autoImportProviderHost=jfe.create(r,this,this.getHostForAutoImportProvider(),this.documentRegistry),this.autoImportProviderHost)return Fme(this.autoImportProviderHost),this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider",Yn()-i),null==(t=or)||t.pop(),this.autoImportProviderHost.getCurrentProgram();null==(n=or)||n.pop()}}isDefaultProjectForOpenFiles(){return!!ld(this.projectService.openFiles,((e,t)=>this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(t))===this))}watchNodeModulesForPackageJsonChanges(e){return this.projectService.watchPackageJsonsInNodeModules(e,this)}getIncompleteCompletionsCache(){return this.projectService.getIncompleteCompletionsCache()}getNoDtsResolutionProject(e){return xn.assert(0===this.projectService.serverMode),this.noDtsResolutionProject||(this.noDtsResolutionProject=new Mfe(this.projectService,this.documentRegistry,this.getCompilerOptionsForNoDtsResolutionProject(),this.currentDirectory)),this.noDtsResolutionProject.rootFile!==e&&(this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject,[e]),this.noDtsResolutionProject.rootFile=e),this.noDtsResolutionProject}runWithTemporaryFileUpdate(e,t,n){var r,i,o,a;const s=this.program,c=xn.checkDefined(null==(r=this.program)?void 0:r.getSourceFile(e),"Expected file to be part of program"),l=xn.checkDefined(c.getText());null==(i=this.getScriptInfo(e))||i.editContent(0,l.length,t),this.updateGraph();try{n(this.program,s,null==(o=this.program)?void 0:o.getSourceFile(e))}finally{null==(a=this.getScriptInfo(e))||a.editContent(0,this.program.getSourceFile(e).getText().length,l)}}getCompilerOptionsForNoDtsResolutionProject(){return{...this.getCompilerOptions(),noDtsResolution:!0,allowJs:!0,maxNodeModuleJsDepth:3,diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:u,lib:u,noLib:!0}}},Ofe=class extends Ife{constructor(e,t,n,r,i,o,a){super(e.newInferredProjectName(),0,e,t,void 0,void 0,n,!1,r,e.host,o),this._isJsInferredProject=!1,this.typeAcquisition=a,this.projectRootPath=i&&e.toCanonicalFileName(i),i||e.useSingleInferredProject||(this.canonicalCurrentDirectory=e.toCanonicalFileName(this.currentDirectory)),this.enableGlobalPlugins(this.getCompilerOptions())}toggleJsInferredProject(e){e!==this._isJsInferredProject&&(this._isJsInferredProject=e,this.setCompilerOptions())}setCompilerOptions(e){if(!e&&!this.getCompilationSettings())return;const t=eQ(e||this.getCompilationSettings());this._isJsInferredProject&&"number"!=typeof t.maxNodeModuleJsDepth?t.maxNodeModuleJsDepth=2:this._isJsInferredProject||(t.maxNodeModuleJsDepth=void 0),t.allowJs=!0,super.setCompilerOptions(t)}addRoot(e){xn.assert(e.isScriptOpen()),this.projectService.startWatchingConfigFilesForInferredProjectRoot(e),!this._isJsInferredProject&&e.isJavaScript()?this.toggleJsInferredProject(!0):this.isOrphan()&&this._isJsInferredProject&&!e.isJavaScript()&&this.toggleJsInferredProject(!1),super.addRoot(e)}removeRoot(e){this.projectService.stopWatchingConfigFilesForScriptInfo(e),super.removeRoot(e),!this.isOrphan()&&this._isJsInferredProject&&e.isJavaScript()&&x(this.getRootScriptInfos(),(e=>!e.isJavaScript()))&&this.toggleJsInferredProject(!1)}isOrphan(){return!this.hasRoots()}isProjectWithSingleRoot(){return!this.projectRootPath&&!this.projectService.useSingleInferredProject||1===this.getRootScriptInfos().length}close(){f(this.getRootScriptInfos(),(e=>this.projectService.stopWatchingConfigFilesForScriptInfo(e))),super.close()}getTypeAcquisition(){return this.typeAcquisition||{enable:Pfe(this),include:u,exclude:u}}},Mfe=class extends Ife{constructor(e,t,n,r){super(e.newAuxiliaryProjectName(),4,e,t,!1,void 0,n,!1,void 0,e.host,r)}isOrphan(){return!0}scheduleInvalidateResolutionsOfFailedLookupLocations(){}},Lfe=class e extends Ife{constructor(e,t,n,r){super(e.projectService.newAutoImportProviderProjectName(),3,e.projectService,n,!1,void 0,r,!1,e.getWatchOptions(),e.projectService.host,e.currentDirectory),this.hostProject=e,this.rootFileNames=t,this.useSourceOfProjectReferenceRedirect=Ze(this.hostProject,this.hostProject.useSourceOfProjectReferenceRedirect),this.getParsedCommandLine=Ze(this.hostProject,this.hostProject.getParsedCommandLine)}static getRootFileNames(e,t,n,r){var i,o;if(!e)return u;const a=t.getCurrentProgram();if(!a)return u;const s=Yn();let c,l;const _=Ko(t.currentDirectory,rV),d=t.getPackageJsonsForAutoImport(Ko(t.currentDirectory,_));for(const e of d)null==(i=e.dependencies)||i.forEach(((e,t)=>y(t))),null==(o=e.peerDependencies)||o.forEach(((e,t)=>y(t)));let p=0;if(c){const i=t.getSymlinkCache();for(const o of $e(c.keys())){if(2===e&&p>this.maxDependencies)return t.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`),u;const s=ij(o,t.currentDirectory,r,n,a.getModuleResolutionCache());if(s){const e=v(s,a,i);if(e){p+=h(e);continue}}if(!f([t.currentDirectory,t.getGlobalTypingsCacheLocation()],(e=>{if(e){const t=ij(`@types/${o}`,e,r,n,a.getModuleResolutionCache());if(t){const e=v(t,a,i);return p+=h(e),!0}}}))&&s&&r.allowJs&&r.maxNodeModuleJsDepth){const e=v(s,a,i,!0);p+=h(e)}}}const m=a.getResolvedProjectReferences();let g=0;return(null==m?void 0:m.length)&&t.projectService.getHostPreferences().includeCompletionsForModuleExports&&m.forEach((e=>{if(null==e?void 0:e.commandLine.options.outFile)g+=h(b([tT(e.commandLine.options.outFile,".d.ts")]));else if(e){const n=bt((()=>q$(e.commandLine,!t.useCaseSensitiveFileNames())));g+=h(b(q(e.commandLine.fileNames,(r=>QI(r)||Ao(r,".json")||a.getSourceFile(r)?void 0:M$(r,e.commandLine,!t.useCaseSensitiveFileNames(),n)))))}})),(null==l?void 0:l.size)&&t.log(`AutoImportProviderProject: found ${l.size} root files in ${p} dependencies ${g} referenced projects in ${Yn()-s} ms`),l?$e(l.values()):u;function h(e){return(null==e?void 0:e.length)?(l??(l=new Set),e.forEach((e=>l.add(e))),1):0}function y(e){an(e,"@types/")||(c||(c=new Set)).add(e)}function v(e,i,o,a){var s;const c=Uj(e,r,n,i.getModuleResolutionCache(),a);if(c){const r=null==(s=n.realpath)?void 0:s.call(n,e.packageDirectory),i=r?t.toPath(r):void 0,a=i&&i!==t.toPath(e.packageDirectory);return a&&o.setSymlinkedDirectory(e.packageDirectory,{real:ea(r),realPath:ea(i)}),b(c,a?t=>t.replace(e.packageDirectory,r):void 0)}}function b(e,t){return q(e,(e=>{const n=t?t(e):e;if(!(a.getSourceFile(n)||t&&a.getSourceFile(e)))return n}))}}static create(t,n,r,i){if(0===t)return;const o={...n.getCompilerOptions(),...this.compilerOptionsOverrides},a=this.getRootFileNames(t,n,r,o);return a.length?new e(n,a,i,o):void 0}isEmpty(){return!Q(this.rootFileNames)}isOrphan(){return!0}updateGraph(){let t=this.rootFileNames;t||(t=e.getRootFileNames(this.hostProject.includePackageJsonAutoImports(),this.hostProject,this.hostProject.getHostForAutoImportProvider(),this.getCompilationSettings())),this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this,t),this.rootFileNames=t;const n=this.getCurrentProgram(),r=super.updateGraph();return n&&n!==this.getCurrentProgram()&&this.hostProject.clearCachedExportInfoMap(),r}scheduleInvalidateResolutionsOfFailedLookupLocations(){}hasRoots(){var e;return!!(null==(e=this.rootFileNames)?void 0:e.length)}markAsDirty(){this.rootFileNames=void 0,super.markAsDirty()}getScriptFileNames(){return this.rootFileNames||u}getLanguageService(){throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`.")}onAutoImportProviderSettingsChanged(){throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead.")}onPackageJsonChange(){throw new Error("package.json changes should be notified on an AutoImportProvider's host project")}getHostForAutoImportProvider(){throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead.")}getProjectReferences(){return this.hostProject.getProjectReferences()}includePackageJsonAutoImports(){return 0}getSymlinkCache(){return this.hostProject.getSymlinkCache()}getModuleResolutionCache(){var e;return null==(e=this.hostProject.getCurrentProgram())?void 0:e.getModuleResolutionCache()}};Lfe.maxDependencies=10,Lfe.compilerOptionsOverrides={diagnostics:!1,skipLibCheck:!0,sourceMap:!1,types:u,lib:u,noLib:!0};var jfe=Lfe,Rfe=class extends Ife{constructor(e,t,n,r,i,o){super(e,1,n,r,!1,void 0,{},!1,void 0,i,Ro(e)),this.canonicalConfigFilePath=t,this.openFileWatchTriggered=new Map,this.canConfigFileJsonReportNoInputFiles=!1,this.isInitialLoadPending=pt,this.sendLoadingProjectFinish=!1,this.pendingUpdateLevel=2,this.pendingUpdateReason=o}setCompilerHost(e){this.compilerHost=e}getCompilerHost(){return this.compilerHost}useSourceOfProjectReferenceRedirect(){return this.languageServiceEnabled}getParsedCommandLine(e){const t=Xo(e),n=this.projectService.toCanonicalFileName(t);let r=this.projectService.configFileExistenceInfoCache.get(n);return r||this.projectService.configFileExistenceInfoCache.set(n,r={exists:this.projectService.host.fileExists(t)}),this.projectService.ensureParsedConfigUptoDate(t,n,r,this),this.languageServiceEnabled&&0===this.projectService.serverMode&&this.projectService.watchWildcards(t,r,this),r.exists?r.config.parsedCommandLine:void 0}onReleaseParsedCommandLine(e){this.releaseParsedConfig(this.projectService.toCanonicalFileName(Xo(e)))}releaseParsedConfig(e){this.projectService.stopWatchingWildCards(e,this),this.projectService.releaseParsedConfig(e,this)}updateGraph(){if(this.deferredClose)return!1;const e=this.dirty;this.isInitialLoadPending=dt;const t=this.pendingUpdateLevel;let n;switch(this.pendingUpdateLevel=0,t){case 1:this.openFileWatchTriggered.clear(),n=this.projectService.reloadFileNamesOfConfiguredProject(this);break;case 2:this.openFileWatchTriggered.clear();const e=xn.checkDefined(this.pendingUpdateReason);this.projectService.reloadConfiguredProject(this,e),n=!0;break;default:n=super.updateGraph()}return this.compilerHost=void 0,this.projectService.sendProjectLoadingFinishEvent(this),this.projectService.sendProjectTelemetry(this),2!==t&&(!n||e&&this.triggerFileForConfigFileDiag&&2!==this.getCurrentProgram().structureIsReused)?this.triggerFileForConfigFileDiag||this.projectService.sendConfigFileDiagEvent(this,void 0,!1):this.triggerFileForConfigFileDiag=void 0,n}getCachedDirectoryStructureHost(){return this.directoryStructureHost}getConfigFilePath(){return this.getProjectName()}getProjectReferences(){return this.projectReferences}updateReferences(e){this.projectReferences=e,this.potentialProjectReferences=void 0}setPotentialProjectReference(e){xn.assert(this.isInitialLoadPending()),(this.potentialProjectReferences||(this.potentialProjectReferences=new Set)).add(e)}getResolvedProjectReferenceToRedirect(e){const t=this.getCurrentProgram();return t&&t.getResolvedProjectReferenceToRedirect(e)}forEachResolvedProjectReference(e){var t;return null==(t=this.getCurrentProgram())?void 0:t.forEachResolvedProjectReference(e)}enablePluginsWithOptions(e){var t;if(this.plugins.length=0,!(null==(t=e.plugins)?void 0:t.length)&&!this.projectService.globalPlugins.length)return;const n=this.projectService.host;if(!n.require&&!n.importPlugin)return void this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded");const r=this.getGlobalPluginSearchPaths();if(this.projectService.allowLocalPluginLoads){const e=Ro(this.canonicalConfigFilePath);this.projectService.logger.info(`Local plugin loading enabled; adding ${e} to search paths`),r.unshift(e)}if(e.plugins)for(const t of e.plugins)this.enablePlugin(t,r);return this.enableGlobalPlugins(e)}getGlobalProjectErrors(){return F(this.projectErrors,(e=>!e.file))||Hpe}getAllProjectErrors(){return this.projectErrors||Hpe}setProjectErrors(e){this.projectErrors=e}close(){this.projectService.configFileExistenceInfoCache.forEach(((e,t)=>this.releaseParsedConfig(t))),this.projectErrors=void 0,this.openFileWatchTriggered.clear(),this.compilerHost=void 0,super.close()}markAsDirty(){this.deferredClose||super.markAsDirty()}isSolution(){return 0===this.getRootFilesMap().size&&!this.canConfigFileJsonReportNoInputFiles}isOrphan(){return!!this.deferredClose}getEffectiveTypeRoots(){return QL(this.getCompilationSettings(),this)||[]}updateErrorOnNoInputFiles(e){nL(e,this.getConfigFilePath(),this.getCompilerOptions().configFile.configFileSpecs,this.projectErrors,this.canConfigFileJsonReportNoInputFiles)}},Bfe=class extends Ife{constructor(e,t,n,r,i,o,a,s){super(e,2,t,n,!0,i,r,o,s,t.host,Ro(a||Vo(e))),this.externalProjectName=e,this.compileOnSaveEnabled=o,this.excludedFiles=[],this.enableGlobalPlugins(this.getCompilerOptions())}updateGraph(){const e=super.updateGraph();return this.projectService.sendProjectTelemetry(this),e}getExcludedFiles(){return this.excludedFiles}};function Jfe(e){return 0===e.projectKind}function zfe(e){return 1===e.projectKind}function $fe(e){return 2===e.projectKind}function qfe(e){return 3===e.projectKind||4===e.projectKind}function Vfe(e){return zfe(e)&&!!e.deferredClose}var Ufe=20971520,Kfe=4194304,Wfe="projectsUpdatedInBackground",Hfe="projectLoadingStart",Gfe="projectLoadingFinish",Xfe="largeFileReferenced",Qfe="configFileDiag",Yfe="projectLanguageServiceState",Zfe="projectInfo",eme="openFileInfo",tme="createFileWatcher",nme="createDirectoryWatcher",rme="closeFileWatcher",ime="*ensureProjectForOpenFiles*";function ome(e){const t=new Map;for(const n of e)if("object"==typeof n.type){const e=n.type;e.forEach((e=>{xn.assert("number"==typeof e)})),t.set(n.name,e)}return t}var ame=ome(bO),sme=ome(mO),cme=new Map(Object.entries({none:0,block:1,smart:2})),lme={jquery:{match:/jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i,types:["jquery"]},WinJS:{match:/^(.*\/winjs-[.\d]+)\/js\/base\.js$/i,exclude:[["^",1,"/.*"]],types:["winjs"]},Kendo:{match:/^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i,exclude:[["^",1,"/.*"]],types:["kendo-ui"]},"Office Nuget":{match:/^(.*\/office\/1)\/excel-\d+\.debug\.js$/i,exclude:[["^",1,"/.*"]],types:["office"]},References:{match:/^(.*\/_references\.js)$/i,exclude:[["^",1,"$"]]}};function ume(e){return st(e.indentStyle)&&(e.indentStyle=cme.get(e.indentStyle.toLowerCase()),xn.assert(void 0!==e.indentStyle)),e}function _me(e){return ame.forEach(((t,n)=>{const r=e[n];st(r)&&(e[n]=t.get(r.toLowerCase()))})),e}function dme(e,t){let n,r;return mO.forEach((i=>{const o=e[i.name];if(void 0===o)return;const a=sme.get(i.name);(n||(n={}))[i.name]=a?st(o)?a.get(o.toLowerCase()):o:fL(i,o,t||"",r||(r=[]))})),n&&{watchOptions:n,errors:r}}function pme(e){let t;return IO.forEach((n=>{const r=e[n.name];void 0!==r&&((t||(t={}))[n.name]=r)})),t}function fme(e){return st(e)?mme(e):e}function mme(e){switch(e){case"JS":return 1;case"JSX":return 2;case"TS":return 3;case"TSX":return 4;default:return 0}}function gme(e){const{lazyConfiguredProjectsFromExternalProject:t,...n}=e;return n}var hme={getFileName:e=>e,getScriptKind:(e,t)=>{let n;if(t){const r=zo(e);r&&Q(t,(e=>e.extension===r&&(n=e.scriptKind,!0)))}return n},hasMixedContent:(e,t)=>Q(t,(t=>t.isMixedContent&&Ao(e,t.extension)))},yme={getFileName:e=>e.fileName,getScriptKind:e=>fme(e.scriptKind),hasMixedContent:e=>!!e.hasMixedContent};function vme(e,t){for(const n of t)if(n.getProjectName()===e)return n}var bme={close:_t};function xme(e,t){if(t&&!Sme(e))return t.get(e.path)}function Sme(e){return!!e.configFileInfo}var kme=(e=>(e[e.Find=0]="Find",e[e.Create=1]="Create",e[e.Reload=2]="Reload",e))(kme||{});function Tme(e,t,n,r,i,o,a,s){var c;const l=null==(c=e.getCurrentProgram())?void 0:c.getResolvedProjectReferences();if(!l)return;const u=t?e.getResolvedProjectReferenceToRedirect(t):void 0;if(u){const t=Qpe(u.sourceFile.fileName),n=e.projectService.findConfiguredProjectByProjectName(t,o);if(n){const e=d(n);if(e)return e}else if(0!==r){const t=Cme(l,e.getCompilerOptions(),((e,t)=>u===e?_(e,t):void 0),r,e.projectService);if(t)return t}}return Cme(l,e.getCompilerOptions(),((e,t)=>u!==e?_(e,t):void 0),r,e.projectService);function _(t,c){const l=e.projectService.findCreateOrReloadConfiguredProject(Qpe(t.sourceFile.fileName),c,i,o,a,s);return l&&(c===r?n(l.project,l.sentConfigFileDiag):d(l.project))}function d(e){let t=!1;switch(r){case 1:t=Ime(e,a);break;case 2:t=e.projectService.reloadConfiguredProjectClearingSemanticCache(e,i,s);break;case 0:break;default:xn.assertNever(r)}const o=n(e,t);if(o)return o}}function Cme(e,t,n,r,i,o){const a=t.disableReferencedProjectLoad?0:r;return f(e,(e=>{if(!e)return;const t=Qpe(e.sourceFile.fileName),r=i.toCanonicalFileName(t),s=null==o?void 0:o.get(r);if(void 0!==s&&s>=a)return;return n(e,a)||((o||(o=new Map)).set(r,a),e.references&&Cme(e.references,e.commandLine.options,n,a,i,o))}))}function wme(e,t){return e.potentialProjectReferences&&ud(e.potentialProjectReferences,t)}function Dme(e,t,n){const r=n&&e.projectService.configuredProjects.get(n);return r&&t(r)}function Eme(e,t){return function(e,t,n,r){return e.getCurrentProgram()?e.forEachResolvedProjectReference(t):e.isInitialLoadPending()?wme(e,r):f(e.getProjectReferences(),n)}(e,(n=>Dme(e,t,n.sourceFile.path)),(n=>Dme(e,t,e.toPath(xV(n)))),(n=>Dme(e,t,n)))}function Pme(e,t){return`${st(t)?`Config: ${t} `:t?`Project: ${t.getProjectName()} `:""}WatchType: ${e}`}function Nme(e){return!e.isScriptOpen()&&void 0!==e.mTime}function Fme(e){return e.invalidateResolutionsOfFailedLookupLocations(),e.dirty&&!e.updateGraph()}function Ame(e,t,n){if(!n&&(e.invalidateResolutionsOfFailedLookupLocations(),!e.dirty))return!1;e.triggerFileForConfigFileDiag=t;const r=e.pendingUpdateLevel;if(e.updateGraph(),!e.triggerFileForConfigFileDiag&&!n)return 2===r;const i=e.projectService.sendConfigFileDiagEvent(e,t,n);return e.triggerFileForConfigFileDiag=void 0,i}function Ime(e,t){if(t){if(Ame(e,t,!1))return!0}else Fme(e);return!1}function Ome(e){return`Creating possible configured project for ${e.fileName} to open`}function Mme(e){return`User requested reload projects: ${e}`}function Lme(e){zfe(e)&&(e.projectOptions=!0)}function jme(e){let t=1;return()=>e(t++)}function Rme(){return{idToCallbacks:new Map,pathToId:new Map}}var Bme=class e{constructor(e){var t;this.filenameToScriptInfo=new Map,this.nodeModulesWatchers=new Map,this.filenameToScriptInfoVersion=new Map,this.allJsFilesForOpenFileTelemetry=new Map,this.externalProjectToConfiguredProjectMap=new Map,this.externalProjects=[],this.inferredProjects=[],this.configuredProjects=new Map,this.newInferredProjectName=jme(nfe),this.newAutoImportProviderProjectName=jme(rfe),this.newAuxiliaryProjectName=jme(ife),this.openFiles=new Map,this.configFileForOpenFiles=new Map,this.rootOfInferredProjects=new Set,this.openFilesWithNonRootedDiskPath=new Map,this.compilerOptionsForInferredProjectsPerProjectRoot=new Map,this.watchOptionsForInferredProjectsPerProjectRoot=new Map,this.typeAcquisitionForInferredProjectsPerProjectRoot=new Map,this.projectToSizeMap=new Map,this.configFileExistenceInfoCache=new Map,this.safelist=lme,this.legacySafelist=new Map,this.pendingProjectUpdates=new Map,this.pendingEnsureProjectForOpenFiles=!1,this.seenProjects=new Map,this.sharedExtendedConfigFileWatchers=new Map,this.extendedConfigCache=new Map,this.baseline=_t,this.verifyDocumentRegistry=_t,this.verifyProgram=_t,this.onProjectCreation=_t,this.host=e.host,this.logger=e.logger,this.cancellationToken=e.cancellationToken,this.useSingleInferredProject=e.useSingleInferredProject,this.useInferredProjectPerProjectRoot=e.useInferredProjectPerProjectRoot,this.typingsInstaller=e.typingsInstaller||Tfe,this.throttleWaitMilliseconds=e.throttleWaitMilliseconds,this.eventHandler=e.eventHandler,this.suppressDiagnosticEvents=e.suppressDiagnosticEvents,this.globalPlugins=e.globalPlugins||Hpe,this.pluginProbeLocations=e.pluginProbeLocations||Hpe,this.allowLocalPluginLoads=!!e.allowLocalPluginLoads,this.typesMapLocation=void 0===e.typesMapLocation?Ko(Ro(this.getExecutingFilePath()),"typesMap.json"):e.typesMapLocation,this.session=e.session,this.jsDocParsingMode=e.jsDocParsingMode,void 0!==e.serverMode?this.serverMode=e.serverMode:this.serverMode=0,this.host.realpath&&(this.realpathToScriptInfos=et()),this.currentDirectory=Qpe(this.host.getCurrentDirectory()),this.toCanonicalFileName=tn(this.host.useCaseSensitiveFileNames),this.globalCacheLocationDirectoryPath=this.typingsInstaller.globalTypingsCacheLocation?ea(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)):void 0,this.throttledOperations=new afe(this.host,this.logger),this.typesMapLocation?this.loadTypesMap():this.logger.info("No types map provided; using the default"),this.typingsInstaller.attach(this),this.typingsCache=new wfe(this.typingsInstaller),this.hostConfiguration={formatCodeOptions:rG(this.host.newLine),preferences:GH,hostInfo:"Unknown host",extraFileExtensions:[]},this.documentRegistry=C0(this.host.useCaseSensitiveFileNames,this.currentDirectory,this.jsDocParsingMode,this);const n=this.logger.hasLevel(3)?2:this.logger.loggingEnabled()?1:0,r=0!==n?e=>this.logger.info(e):_t;this.packageJsonCache=Vme(this),this.watchFactory=0!==this.serverMode?{watchFile:QU,watchDirectory:QU}:hq(function(e,t){if(!t||!e.eventHandler||!e.session)return;const n=Rme(),r=Rme(),i=Rme();let o=1;return e.session.addProtocolHandler("watchChange",(e=>{var t;return ot(t=e.arguments)?t.forEach(s):s(t),{responseRequired:!1}})),{watchFile:function(e,t){return a(n,e,t,(t=>({eventName:tme,data:{id:t,path:e}})))},watchDirectory:function(e,t,n){return a(n?i:r,e,t,(t=>({eventName:nme,data:{id:t,path:e,recursive:!!n,ignoreUpdate:!e.endsWith("/node_modules")||void 0}})))},getCurrentDirectory:()=>e.host.getCurrentDirectory(),useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames};function a({pathToId:t,idToCallbacks:n},r,i,a){const s=e.toPath(r);let c=t.get(s);c||t.set(s,c=o++);let l=n.get(c);return l||(n.set(c,l=new Set),e.eventHandler(a(c))),l.add(i),{close(){const r=n.get(c);(null==r?void 0:r.delete(i))&&(r.size||(n.delete(c),t.delete(s),e.eventHandler({eventName:rme,data:{id:c}})))}}}function s({id:e,created:t,deleted:n,updated:r}){c(e,t,0),c(e,n,2),c(e,r,1)}function c(e,t,o){(null==t?void 0:t.length)&&(l(n,e,t,((e,t)=>e(t,o))),l(r,e,t,((e,t)=>e(t))),l(i,e,t,((e,t)=>e(t))))}function l(e,t,n,r){var i;null==(i=e.idToCallbacks.get(t))||i.forEach((e=>{n.forEach((t=>r(e,Vo(t))))}))}}(this,e.canUseWatchEvents)||this.host,n,r,Pme),null==(t=e.incrementalVerifier)||t.call(e,this)}toPath(e){return Yo(e,this.currentDirectory,this.toCanonicalFileName)}getExecutingFilePath(){return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath())}getNormalizedAbsolutePath(e){return Go(e,this.host.getCurrentDirectory())}setDocument(e,t,n){xn.checkDefined(this.getScriptInfoForPath(t)).cacheSourceFile={key:e,sourceFile:n}}getDocument(e,t){const n=this.getScriptInfoForPath(t);return n&&n.cacheSourceFile&&n.cacheSourceFile.key===e?n.cacheSourceFile.sourceFile:void 0}ensureInferredProjectsUpToDate_TestOnly(){this.ensureProjectStructuresUptoDate()}getCompilerOptionsForInferredProjects(){return this.compilerOptionsForInferredProjects}onUpdateLanguageServiceStateForProject(e,t){if(!this.eventHandler)return;const n={eventName:Yfe,data:{project:e,languageServiceEnabled:t}};this.eventHandler(n)}loadTypesMap(){try{const e=this.host.readFile(this.typesMapLocation);if(void 0===e)return void this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`);const t=JSON.parse(e);for(const e of Object.keys(t.typesMap))t.typesMap[e].match=new RegExp(t.typesMap[e].match,"i");this.safelist=t.typesMap;for(const e in t.simpleMap)Le(t.simpleMap,e)&&this.legacySafelist.set(e,t.simpleMap[e].toLowerCase())}catch(e){this.logger.info(`Error loading types map: ${e}`),this.safelist=lme,this.legacySafelist.clear()}}updateTypingsForProject(e){const t=this.findProject(e.projectName);if(t)switch(e.kind){case hH:return void t.updateTypingFiles(this.typingsCache.updateTypingsForProject(e.projectName,e.compilerOptions,e.typeAcquisition,e.unresolvedImports,e.typings));case yH:return void this.typingsCache.enqueueInstallTypingsForProject(t,t.lastCachedUnresolvedImportsList,!0)}}watchTypingLocations(e){var t;null==(t=this.findProject(e.projectName))||t.watchTypingLocations(e.files)}delayEnsureProjectForOpenFiles(){this.openFiles.size&&(this.pendingEnsureProjectForOpenFiles=!0,this.throttledOperations.schedule(ime,2500,(()=>{0!==this.pendingProjectUpdates.size?this.delayEnsureProjectForOpenFiles():this.pendingEnsureProjectForOpenFiles&&(this.ensureProjectForOpenFiles(),this.sendProjectsUpdatedInBackgroundEvent())})))}delayUpdateProjectGraph(e){if(Vfe(e))return;if(e.markAsDirty(),qfe(e))return;const t=e.getProjectName();this.pendingProjectUpdates.set(t,e),this.throttledOperations.schedule(t,250,(()=>{this.pendingProjectUpdates.delete(t)&&Fme(e)}))}hasPendingProjectUpdate(e){return this.pendingProjectUpdates.has(e.getProjectName())}sendProjectsUpdatedInBackgroundEvent(){if(!this.eventHandler)return;const e={eventName:Wfe,data:{openFiles:$e(this.openFiles.keys(),(e=>this.getScriptInfoForPath(e).fileName))}};this.eventHandler(e)}sendLargeFileReferencedEvent(e,t){if(!this.eventHandler)return;const n={eventName:Xfe,data:{file:e,fileSize:t,maxFileSize:Kfe}};this.eventHandler(n)}sendProjectLoadingStartEvent(e,t){if(!this.eventHandler)return;e.sendLoadingProjectFinish=!0;const n={eventName:Hfe,data:{project:e,reason:t}};this.eventHandler(n)}sendProjectLoadingFinishEvent(e){if(!this.eventHandler||!e.sendLoadingProjectFinish)return;e.sendLoadingProjectFinish=!1;const t={eventName:Gfe,data:{project:e}};this.eventHandler(t)}sendPerformanceEvent(e,t){this.performanceEventHandler&&this.performanceEventHandler({kind:e,durationMs:t})}delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(e){this.delayUpdateProjectGraph(e),this.delayEnsureProjectForOpenFiles()}delayUpdateProjectGraphs(e,t){if(e.length){for(const n of e)t&&n.clearSourceMapperCache(),this.delayUpdateProjectGraph(n);this.delayEnsureProjectForOpenFiles()}}setCompilerOptionsForInferredProjects(e,t){xn.assert(void 0===t||this.useInferredProjectPerProjectRoot,"Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled");const n=_me(e),r=dme(e,t),i=pme(e);n.allowNonTsExtensions=!0;const o=t&&this.toCanonicalFileName(t);o?(this.compilerOptionsForInferredProjectsPerProjectRoot.set(o,n),this.watchOptionsForInferredProjectsPerProjectRoot.set(o,r||!1),this.typeAcquisitionForInferredProjectsPerProjectRoot.set(o,i)):(this.compilerOptionsForInferredProjects=n,this.watchOptionsForInferredProjects=r,this.typeAcquisitionForInferredProjects=i);for(const e of this.inferredProjects)(o?e.projectRootPath!==o:e.projectRootPath&&this.compilerOptionsForInferredProjectsPerProjectRoot.has(e.projectRootPath))||(e.setCompilerOptions(n),e.setTypeAcquisition(i),e.setWatchOptions(null==r?void 0:r.watchOptions),e.setProjectErrors(null==r?void 0:r.errors),e.compileOnSaveEnabled=n.compileOnSave,e.markAsDirty(),this.delayUpdateProjectGraph(e));this.delayEnsureProjectForOpenFiles()}findProject(e){if(void 0!==e)return tfe(e)?vme(e,this.inferredProjects):this.findExternalProjectByProjectName(e)||this.findConfiguredProjectByProjectName(Qpe(e))}forEachProject(e){this.externalProjects.forEach(e),this.configuredProjects.forEach(e),this.inferredProjects.forEach(e)}forEachEnabledProject(e){this.forEachProject((t=>{!t.isOrphan()&&t.languageServiceEnabled&&e(t)}))}getDefaultProjectForFile(e,t){return t?this.ensureDefaultProjectForFile(e):this.tryGetDefaultProjectForFile(e)}tryGetDefaultProjectForFile(e){const t=st(e)?this.getScriptInfoForNormalizedPath(e):e;return t&&!t.isOrphan()?t.getDefaultProject():void 0}tryGetDefaultProjectForEnsuringConfiguredProjectForFile(e){var t;const n=st(e)?this.getScriptInfoForNormalizedPath(e):e;if(n)return(null==(t=this.pendingOpenFileProjectUpdates)?void 0:t.delete(n.path))&&(this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(n,1),n.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(n,this.openFiles.get(n.path))),this.tryGetDefaultProjectForFile(n)}ensureDefaultProjectForFile(e){return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(e)||this.doEnsureDefaultProjectForFile(e)}doEnsureDefaultProjectForFile(e){this.ensureProjectStructuresUptoDate();const t=st(e)?this.getScriptInfoForNormalizedPath(e):e;return t?t.getDefaultProject():(this.logErrorForScriptInfoNotFound(st(e)?e:e.fileName),Upe.ThrowNoProject())}getScriptInfoEnsuringProjectsUptoDate(e){return this.ensureProjectStructuresUptoDate(),this.getScriptInfo(e)}ensureProjectStructuresUptoDate(){let e=this.pendingEnsureProjectForOpenFiles;this.pendingProjectUpdates.clear();const t=t=>{e=Fme(t)||e};this.externalProjects.forEach(t),this.configuredProjects.forEach(t),this.inferredProjects.forEach(t),e&&this.ensureProjectForOpenFiles()}getFormatCodeOptions(e){const t=this.getScriptInfoForNormalizedPath(e);return t&&t.getFormatCodeSettings()||this.hostConfiguration.formatCodeOptions}getPreferences(e){const t=this.getScriptInfoForNormalizedPath(e);return{...this.hostConfiguration.preferences,...t&&t.getPreferences()}}getHostFormatCodeOptions(){return this.hostConfiguration.formatCodeOptions}getHostPreferences(){return this.hostConfiguration.preferences}onSourceFileChanged(e,t){xn.assert(!e.isScriptOpen()),2===t?this.handleDeletedFile(e,!0):(e.deferredDelete&&(e.deferredDelete=void 0),e.delayReloadNonMixedContentFile(),this.delayUpdateProjectGraphs(e.containingProjects,!1),this.handleSourceMapProjects(e))}handleSourceMapProjects(e){if(e.sourceMapFilePath)if(st(e.sourceMapFilePath)){const t=this.getScriptInfoForPath(e.sourceMapFilePath);this.delayUpdateSourceInfoProjects(null==t?void 0:t.sourceInfos)}else this.delayUpdateSourceInfoProjects(e.sourceMapFilePath.sourceInfos);this.delayUpdateSourceInfoProjects(e.sourceInfos),e.declarationInfoPath&&this.delayUpdateProjectsOfScriptInfoPath(e.declarationInfoPath)}delayUpdateSourceInfoProjects(e){e&&e.forEach(((e,t)=>this.delayUpdateProjectsOfScriptInfoPath(t)))}delayUpdateProjectsOfScriptInfoPath(e){const t=this.getScriptInfoForPath(e);t&&this.delayUpdateProjectGraphs(t.containingProjects,!0)}handleDeletedFile(e,t){xn.assert(!e.isScriptOpen()),this.delayUpdateProjectGraphs(e.containingProjects,!1),this.handleSourceMapProjects(e),e.detachAllProjects(),t?(e.delayReloadNonMixedContentFile(),e.deferredDelete=!0):this.deleteScriptInfo(e)}watchWildcardDirectory(e,t,n,r){let i=this.watchFactory.watchDirectory(e,(t=>{const i=this.toPath(t),a=r.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(t,i);if("package.json"===Bo(i)&&!SZ(i)&&(a&&a.fileExists||!a&&this.host.fileExists(t))){const e=this.getNormalizedAbsolutePath(t);this.logger.info(`Config: ${n} Detected new package.json: ${e}`),this.packageJsonCache.addOrUpdate(e,i),this.watchPackageJsonFile(e,i,o)}const s=this.findConfiguredProjectByProjectName(n);fq({watchedDirPath:this.toPath(e),fileOrDirectory:t,fileOrDirectoryPath:i,configFileName:n,extraFileExtensions:this.hostConfiguration.extraFileExtensions,currentDirectory:this.currentDirectory,options:r.parsedCommandLine.options,program:(null==s?void 0:s.getCurrentProgram())||r.parsedCommandLine.fileNames,useCaseSensitiveFileNames:this.host.useCaseSensitiveFileNames,writeLog:e=>this.logger.info(e),toPath:e=>this.toPath(e),getScriptKind:s?e=>s.getScriptKind(e):void 0})||(2!==r.updateLevel&&(r.updateLevel=1),r.projects.forEach(((e,t)=>{var r;if(!e)return;const o=this.getConfiguredProjectByCanonicalConfigFilePath(t);if(!o)return;if(s!==o&&this.getHostPreferences().includeCompletionsForModuleExports){const e=this.toPath(n);S(null==(r=o.getCurrentProgram())?void 0:r.getResolvedProjectReferences(),(t=>(null==t?void 0:t.sourceFile.path)===e))&&o.markAutoImportProviderAsDirty()}const a=s===o?1:0;if(!(o.pendingUpdateLevel>a))if(this.openFiles.has(i))if(xn.checkDefined(this.getScriptInfoForPath(i)).isAttached(o)){const e=Math.max(a,o.openFileWatchTriggered.get(i)||0);o.openFileWatchTriggered.set(i,e)}else o.pendingUpdateLevel=a,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(o);else o.pendingUpdateLevel=a,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(o)})))}),t,this.getWatchOptionsFromProjectWatchOptions(r.parsedCommandLine.watchOptions,Ro(n)),ZU.WildcardDirectory,n);const o={packageJsonWatches:void 0,close(){var e;i&&(i.close(),i=void 0,null==(e=o.packageJsonWatches)||e.forEach((e=>{e.projects.delete(o),e.close()})),o.packageJsonWatches=void 0)}};return o}delayUpdateProjectsFromParsedConfigOnConfigFileChange(e,t){const n=this.configFileExistenceInfoCache.get(e);if(!(null==n?void 0:n.config))return!1;let r=!1;return n.config.updateLevel=2,n.config.projects.forEach(((n,i)=>{var o;const a=this.getConfiguredProjectByCanonicalConfigFilePath(i);if(a)if(r=!0,i===e){if(a.isInitialLoadPending())return;a.pendingUpdateLevel=2,a.pendingUpdateReason=t,this.delayUpdateProjectGraph(a),a.markAutoImportProviderAsDirty()}else{const t=this.toPath(e);a.resolutionCache.removeResolutionsFromProjectReferenceRedirects(t),this.delayUpdateProjectGraph(a),this.getHostPreferences().includeCompletionsForModuleExports&&S(null==(o=a.getCurrentProgram())?void 0:o.getResolvedProjectReferences(),(e=>(null==e?void 0:e.sourceFile.path)===t))&&a.markAutoImportProviderAsDirty()}})),r}onConfigFileChanged(e,t,n){const r=this.configFileExistenceInfoCache.get(t),i=this.getConfiguredProjectByCanonicalConfigFilePath(t),o=null==i?void 0:i.deferredClose;2===n?(r.exists=!1,i&&(i.deferredClose=!0)):(r.exists=!0,o&&(i.deferredClose=void 0,i.markAsDirty())),this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(t,"Change in config file detected");const a=new Set(i?[i]:void 0);this.openFiles.forEach(((t,n)=>{var i,o;const s=this.configFileForOpenFiles.get(n);if(!(null==(i=r.openFilesImpactedByConfigFile)?void 0:i.has(n)))return;this.configFileForOpenFiles.delete(n);const c=this.getScriptInfoForPath(n),l=this.getConfigFileNameForFile(c,!1);if(!l)return;const u=this.findConfiguredProjectByProjectName(l)??this.createConfiguredProject(l,`Change in config file ${e} detected, ${Ome(c)}`);(null==(o=this.pendingOpenFileProjectUpdates)?void 0:o.has(n))||(this.pendingOpenFileProjectUpdates??(this.pendingOpenFileProjectUpdates=new Map)).set(n,s),W(a,u)&&u.isInitialLoadPending()&&this.delayUpdateProjectGraph(u)})),this.delayEnsureProjectForOpenFiles()}removeProject(e){switch(this.logger.info("`remove Project::"),e.print(!0,!0,!1),e.close(),xn.shouldAssert(1)&&this.filenameToScriptInfo.forEach((t=>xn.assert(!t.isAttached(e),"Found script Info still attached to project",(()=>`${e.projectName}: ScriptInfos still attached: ${JSON.stringify($e(V(this.filenameToScriptInfo.values(),(t=>t.isAttached(e)?{fileName:t.fileName,projects:t.containingProjects.map((e=>e.projectName)),hasMixedContent:t.hasMixedContent}:void 0))),void 0," ")}`)))),this.pendingProjectUpdates.delete(e.getProjectName()),e.projectKind){case 2:en(this.externalProjects,e),this.projectToSizeMap.delete(e.getProjectName());break;case 1:this.configuredProjects.delete(e.canonicalConfigFilePath),this.projectToSizeMap.delete(e.canonicalConfigFilePath);break;case 0:en(this.inferredProjects,e)}}assignOrphanScriptInfoToInferredProject(e,t){xn.assert(e.isOrphan());const n=this.getOrCreateInferredProjectForProjectRootPathIfEnabled(e,t)||this.getOrCreateSingleInferredProjectIfEnabled()||this.getOrCreateSingleInferredWithoutProjectRoot(e.isDynamic?t||this.currentDirectory:Ro(wo(e.fileName)?e.fileName:Go(e.fileName,t?this.getNormalizedAbsolutePath(t):this.currentDirectory)));if(n.addRoot(e),e.containingProjects[0]!==n&&(Qt(e.containingProjects,n),e.containingProjects.unshift(n)),n.updateGraph(),!this.useSingleInferredProject&&!n.projectRootPath)for(const e of this.inferredProjects){if(e===n||e.isOrphan())continue;const t=e.getRootScriptInfos();xn.assert(1===t.length||!!e.projectRootPath),1===t.length&&f(t[0].containingProjects,(e=>e!==t[0].containingProjects[0]&&!e.isOrphan()))&&e.removeFile(t[0],!0,!0)}return n}assignOrphanScriptInfosToInferredProject(){this.openFiles.forEach(((e,t)=>{const n=this.getScriptInfoForPath(t);n.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(n,e)}))}closeOpenFile(e,t){var n;const r=!e.isDynamic&&this.host.fileExists(e.fileName);e.close(r),this.stopWatchingConfigFilesForScriptInfo(e);const i=this.toCanonicalFileName(e.fileName);this.openFilesWithNonRootedDiskPath.get(i)===e&&this.openFilesWithNonRootedDiskPath.delete(i);let o=!1;for(const t of e.containingProjects){if(zfe(t)){e.hasMixedContent&&e.registerFileUpdate();const n=t.openFileWatchTriggered.get(e.path);void 0!==n&&(t.openFileWatchTriggered.delete(e.path),t.pendingUpdateLevelthis.onConfigFileChanged(e,t,r)),2e3,this.getWatchOptionsFromProjectWatchOptions(null==(i=null==(r=null==o?void 0:o.config)?void 0:r.parsedCommandLine)?void 0:i.watchOptions,Ro(e)),ZU.ConfigFile,n));const a=o.config.projects;a.set(n.canonicalConfigFilePath,a.get(n.canonicalConfigFilePath)||!1)}releaseParsedConfig(e,t){var n,r,i;const o=this.configFileExistenceInfoCache.get(e);(null==(n=o.config)?void 0:n.projects.delete(t.canonicalConfigFilePath))&&((null==(r=o.config)?void 0:r.projects.size)||(o.config=void 0,uq(e,this.sharedExtendedConfigFileWatchers),xn.checkDefined(o.watcher),(null==(i=o.openFilesImpactedByConfigFile)?void 0:i.size)?o.inferredProjectRoots?pU($o(Ro(e)))||(o.watcher.close(),o.watcher=bme):(o.watcher.close(),o.watcher=void 0):(o.watcher.close(),this.configFileExistenceInfoCache.delete(e))))}stopWatchingConfigFilesForScriptInfo(e){if(0!==this.serverMode)return;const t=this.rootOfInferredProjects.delete(e),n=e.isScriptOpen();n&&!t||this.forEachConfigFileLocation(e,(r=>{var i,o,a;const s=this.configFileExistenceInfoCache.get(r);if(s){if(n){if(!(null==(i=null==s?void 0:s.openFilesImpactedByConfigFile)?void 0:i.has(e.path)))return}else if(!(null==(o=s.openFilesImpactedByConfigFile)?void 0:o.delete(e.path)))return;t&&(s.inferredProjectRoots--,!s.watcher||s.config||s.inferredProjectRoots||(s.watcher.close(),s.watcher=void 0)),(null==(a=s.openFilesImpactedByConfigFile)?void 0:a.size)||s.config||(xn.assert(!s.watcher),this.configFileExistenceInfoCache.delete(r))}}))}startWatchingConfigFilesForInferredProjectRoot(e){0===this.serverMode&&(xn.assert(e.isScriptOpen()),this.rootOfInferredProjects.add(e),this.forEachConfigFileLocation(e,((t,n)=>{let r=this.configFileExistenceInfoCache.get(t);r?r.inferredProjectRoots=(r.inferredProjectRoots??0)+1:(r={exists:this.host.fileExists(n),inferredProjectRoots:1},this.configFileExistenceInfoCache.set(t,r)),(r.openFilesImpactedByConfigFile??(r.openFilesImpactedByConfigFile=new Set)).add(e.path),r.watcher||(r.watcher=pU($o(Ro(t)))?this.watchFactory.watchFile(n,((e,r)=>this.onConfigFileChanged(n,t,r)),2e3,this.hostConfiguration.watchOptions,ZU.ConfigFileForInferredRoot):bme)})))}forEachConfigFileLocation(e,t){if(0!==this.serverMode)return;xn.assert(!e.containingProjects||this.openFiles.has(e.path));const n=this.openFiles.get(e.path);if(xn.checkDefined(this.getScriptInfo(e.path)).isDynamic)return;let r=Ro(e.fileName);const i=()=>la(n,r,this.currentDirectory,!this.host.useCaseSensitiveFileNames),o=!n||!i();let a=!Sme(e);do{if(a){const e=Ype(r,this.currentDirectory,this.toCanonicalFileName),n=Ko(r,"tsconfig.json");let i=t(Ko(e,"tsconfig.json"),n);if(i)return n;const o=Ko(r,"jsconfig.json");if(i=t(Ko(e,"jsconfig.json"),o),i)return o;if(ha(e))break}const e=Ro(r);if(e===r)break;r=e,a=!0}while(o||i())}findDefaultConfiguredProject(e){var t;return e.isScriptOpen()?null==(t=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(e,0))?void 0:t.defaultProject:void 0}getConfigFileNameForFileFromCache(e,t){if(t){const t=xme(e,this.pendingOpenFileProjectUpdates);if(void 0!==t)return t}return xme(e,this.configFileForOpenFiles)}setConfigFileNameForFileInCache(e,t){this.openFiles.has(e.path)&&(Sme(e)||this.configFileForOpenFiles.set(e.path,t||!1))}getConfigFileNameForFile(e,t){const n=this.getConfigFileNameForFileFromCache(e,t);if(void 0!==n)return n||void 0;if(t)return;const r=this.forEachConfigFileLocation(e,((t,n)=>this.configFileExists(n,t,e)));return this.logger.info(`getConfigFileNameForFile:: File: ${e.fileName} ProjectRootPath: ${this.openFiles.get(e.path)}:: Result: ${r}`),this.setConfigFileNameForFileInCache(e,r),r}printProjects(){this.logger.hasLevel(1)&&(this.logger.startGroup(),this.externalProjects.forEach($me),this.configuredProjects.forEach($me),this.inferredProjects.forEach($me),this.logger.info("Open files: "),this.openFiles.forEach(((e,t)=>{const n=this.getScriptInfoForPath(t);this.logger.info(`\tFileName: ${n.fileName} ProjectRootPath: ${e}`),this.logger.info(`\t\tProjects: ${n.containingProjects.map((e=>e.getProjectName()))}`)})),this.logger.endGroup())}findConfiguredProjectByProjectName(e,t){const n=this.toCanonicalFileName(e),r=this.getConfiguredProjectByCanonicalConfigFilePath(n);return t?r:(null==r?void 0:r.deferredClose)?void 0:r}getConfiguredProjectByCanonicalConfigFilePath(e){return this.configuredProjects.get(e)}findExternalProjectByProjectName(e){return vme(e,this.externalProjects)}getFilenameForExceededTotalSizeLimitForNonTsFiles(e,t,n,r){if(t&&t.disableSizeLimit||!this.host.getFileSize)return;let i=Ufe;this.projectToSizeMap.set(e,0),this.projectToSizeMap.forEach((e=>i-=e||0));let o=0;for(const e of n){const t=r.getFileName(e);if(!Vk(t)&&(o+=this.host.getFileSize(t),o>Ufe||o>i)){const e=n.map((e=>r.getFileName(e))).filter((e=>!Vk(e))).map((e=>({name:e,size:this.host.getFileSize(e)}))).sort(((e,t)=>t.size-e.size)).slice(0,5);return this.logger.info(`Non TS file size exceeded limit (${o}). Largest files: ${e.map((e=>`${e.name}:${e.size}`)).join(", ")}`),t}}this.projectToSizeMap.set(e,o)}createExternalProject(e,t,n,r,i){const o=_me(n),a=dme(n,Ro(Vo(e))),s=new Bfe(e,this,this.documentRegistry,o,this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e,o,t,yme),void 0===n.compileOnSave||n.compileOnSave,void 0,null==a?void 0:a.watchOptions);return s.setProjectErrors(null==a?void 0:a.errors),s.excludedFiles=i,this.addFilesToNonInferredProject(s,t,yme,r),this.externalProjects.push(s),s}sendProjectTelemetry(e){if(this.seenProjects.has(e.projectName))return void Lme(e);if(this.seenProjects.set(e.projectName,!0),!this.eventHandler||!this.host.createSHA256Hash)return void Lme(e);const t=zfe(e)?e.projectOptions:void 0;Lme(e);const n={projectId:this.host.createSHA256Hash(e.projectName),fileStats:Efe(e.getScriptInfos(),!0),compilerOptions:IL(e.getCompilationSettings()),typeAcquisition:function({enable:e,include:t,exclude:n}){return{enable:e,include:void 0!==t&&0!==t.length,exclude:void 0!==n&&0!==n.length}}(e.getTypeAcquisition()),extends:t&&t.configHasExtendsProperty,files:t&&t.configHasFilesProperty,include:t&&t.configHasIncludeProperty,exclude:t&&t.configHasExcludeProperty,compileOnSave:e.compileOnSaveEnabled,configFileName:zfe(e)&&cfe(e.getConfigFilePath())||"other",projectType:e instanceof Bfe?"external":"configured",languageServiceEnabled:e.languageServiceEnabled,version:c};this.eventHandler({eventName:Zfe,data:n})}addFilesToNonInferredProject(e,t,n,r){this.updateNonInferredProjectFiles(e,t,n),e.setTypeAcquisition(r),e.markAsDirty()}createConfiguredProject(e,t){var n;null==(n=or)||n.instant(or.Phase.Session,"createConfiguredProject",{configFilePath:e}),this.logger.info(`Creating configuration project ${e}`);const r=this.toCanonicalFileName(e);let i=this.configFileExistenceInfoCache.get(r);i?i.exists=!0:this.configFileExistenceInfoCache.set(r,i={exists:!0}),i.config||(i.config={cachedDirectoryStructureHost:sq(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),projects:new Map,updateLevel:2});const o=new Rfe(e,r,this,this.documentRegistry,i.config.cachedDirectoryStructureHost,t);return xn.assert(!this.configuredProjects.has(r)),this.configuredProjects.set(r,o),this.createConfigFileWatcherForParsedConfig(e,r,o),o}loadConfiguredProject(e,t){var n,r;null==(n=or)||n.push(or.Phase.Session,"loadConfiguredProject",{configFilePath:e.canonicalConfigFilePath}),this.sendProjectLoadingStartEvent(e,t);const i=Xo(e.getConfigFilePath()),o=this.ensureParsedConfigUptoDate(i,e.canonicalConfigFilePath,this.configFileExistenceInfoCache.get(e.canonicalConfigFilePath),e),a=o.config.parsedCommandLine;xn.assert(!!a.fileNames);const s=a.options;e.projectOptions||(e.projectOptions={configHasExtendsProperty:void 0!==a.raw.extends,configHasFilesProperty:void 0!==a.raw.files,configHasIncludeProperty:void 0!==a.raw.include,configHasExcludeProperty:void 0!==a.raw.exclude}),e.canConfigFileJsonReportNoInputFiles=tL(a.raw),e.setProjectErrors(a.options.configFile.parseDiagnostics),e.updateReferences(a.projectReferences);const c=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e.canonicalConfigFilePath,s,a.fileNames,hme);c?(e.disableLanguageService(c),this.configFileExistenceInfoCache.forEach(((t,n)=>this.stopWatchingWildCards(n,e)))):(e.setCompilerOptions(s),e.setWatchOptions(a.watchOptions),e.enableLanguageService(),this.watchWildcards(i,o,e)),e.enablePluginsWithOptions(s);const l=a.fileNames.concat(e.getExternalFiles(2));this.updateRootAndOptionsOfNonInferredProject(e,l,hme,s,a.typeAcquisition,a.compileOnSave,a.watchOptions),null==(r=or)||r.pop()}ensureParsedConfigUptoDate(e,t,n,r){var i,o,a;if(n.config){if(!n.config.updateLevel)return n;if(1===n.config.updateLevel)return this.reloadFileNamesOfParsedConfig(e,n.config),n}const s=(null==(i=n.config)?void 0:i.cachedDirectoryStructureHost)||sq(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),c=oM(e,(e=>this.host.readFile(e))),l=$I(e,st(c)?c:""),u=l.parseDiagnostics;st(c)||u.push(c);const _=Ro(e),d=JM(l,s,_,void 0,e,void 0,this.hostConfiguration.extraFileExtensions,this.extendedConfigCache);d.errors.length&&u.push(...d.errors),this.logger.info(`Config: ${e} : ${JSON.stringify({rootNames:d.fileNames,options:d.options,watchOptions:d.watchOptions,projectReferences:d.projectReferences},void 0," ")}`);const p=null==(o=n.config)?void 0:o.parsedCommandLine;return n.config?(n.config.parsedCommandLine=d,n.config.watchedDirectoriesStale=!0,n.config.updateLevel=void 0):n.config={parsedCommandLine:d,cachedDirectoryStructureHost:s,projects:new Map},p||bT(this.getWatchOptionsFromProjectWatchOptions(void 0,_),this.getWatchOptionsFromProjectWatchOptions(d.watchOptions,_))||(null==(a=n.watcher)||a.close(),n.watcher=void 0),this.createConfigFileWatcherForParsedConfig(e,t,r),lq(t,d.options,this.sharedExtendedConfigFileWatchers,((t,n)=>this.watchFactory.watchFile(t,(()=>{var e;_q(this.extendedConfigCache,n,(e=>this.toPath(e)));let r=!1;null==(e=this.sharedExtendedConfigFileWatchers.get(n))||e.projects.forEach((e=>{r=this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(e,`Change in extended config file ${t} detected`)||r})),r&&this.delayEnsureProjectForOpenFiles()}),2e3,this.hostConfiguration.watchOptions,ZU.ExtendedConfigFile,e)),(e=>this.toPath(e))),n}watchWildcards(e,{exists:t,config:n},r){if(n.projects.set(r.canonicalConfigFilePath,!0),t){if(n.watchedDirectories&&!n.watchedDirectoriesStale)return;n.watchedDirectoriesStale=!1,pq(n.watchedDirectories||(n.watchedDirectories=new Map),n.parsedCommandLine.wildcardDirectories,((t,r)=>this.watchWildcardDirectory(t,r,e,n)))}else{if(n.watchedDirectoriesStale=!1,!n.watchedDirectories)return;xx(n.watchedDirectories,vq),n.watchedDirectories=void 0}}stopWatchingWildCards(e,t){const n=this.configFileExistenceInfoCache.get(e);n.config&&n.config.projects.get(t.canonicalConfigFilePath)&&(n.config.projects.set(t.canonicalConfigFilePath,!1),ld(n.config.projects,mt)||(n.config.watchedDirectories&&(xx(n.config.watchedDirectories,vq),n.config.watchedDirectories=void 0),n.config.watchedDirectoriesStale=void 0))}updateNonInferredProjectFiles(e,t,n){var r;const i=e.getRootFilesMap(),o=new Map;for(const a of t){const t=n.getFileName(a),s=Qpe(t);let c;if(Sfe(s)||e.fileExists(t)){const t=n.getScriptKind(a,this.hostConfiguration.extraFileExtensions),r=n.hasMixedContent(a,this.hostConfiguration.extraFileExtensions),o=xn.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(s,e.currentDirectory,t,r,e.directoryStructureHost,!1));c=o.path;const l=i.get(c);l&&l.info===o?l.fileName=s:(e.addRoot(o,s),o.isScriptOpen()&&this.removeRootOfInferredProjectIfNowPartOfOtherProject(o))}else{c=Ype(s,this.currentDirectory,this.toCanonicalFileName);const t=i.get(c);t?((null==(r=t.info)?void 0:r.path)===c&&(e.removeFile(t.info,!1,!0),t.info=void 0),t.fileName=s):i.set(c,{fileName:s})}o.set(c,!0)}i.size>o.size&&i.forEach(((t,n)=>{o.has(n)||(t.info?e.removeFile(t.info,e.fileExists(t.info.fileName),!0):i.delete(n))}))}updateRootAndOptionsOfNonInferredProject(e,t,n,r,i,o,a){e.setCompilerOptions(r),e.setWatchOptions(a),void 0!==o&&(e.compileOnSaveEnabled=o),this.addFilesToNonInferredProject(e,t,n,i)}reloadFileNamesOfConfiguredProject(e){const t=this.reloadFileNamesOfParsedConfig(e.getConfigFilePath(),this.configFileExistenceInfoCache.get(e.canonicalConfigFilePath).config);return e.updateErrorOnNoInputFiles(t),this.updateNonInferredProjectFiles(e,t.concat(e.getExternalFiles(1)),hme),e.markAsDirty(),e.updateGraph()}reloadFileNamesOfParsedConfig(e,t){if(void 0===t.updateLevel)return t.parsedCommandLine.fileNames;xn.assert(1===t.updateLevel);const n=xL(t.parsedCommandLine.options.configFile.configFileSpecs,Ro(e),t.parsedCommandLine.options,t.cachedDirectoryStructureHost,this.hostConfiguration.extraFileExtensions);return t.parsedCommandLine={...t.parsedCommandLine,fileNames:n},n}setFileNamesOfAutpImportProviderOrAuxillaryProject(e,t){this.updateNonInferredProjectFiles(e,t,hme)}reloadConfiguredProjectClearingSemanticCache(e,t,n){return!!W(n,e)&&(this.clearSemanticCache(e),this.reloadConfiguredProject(e,Mme(t)),!0)}reloadConfiguredProject(e,t){e.isInitialLoadPending=dt,e.pendingUpdateReason=void 0,e.pendingUpdateLevel=0,e.getCachedDirectoryStructureHost().clearCache(),this.loadConfiguredProject(e,t),Ame(e,e.triggerFileForConfigFileDiag??e.getConfigFilePath(),!0)}clearSemanticCache(e){e.originalConfiguredProjects=void 0,e.resolutionCache.clear(),e.getLanguageService(!1).cleanupSemanticCache(),e.cleanupProgram(),e.markAsDirty()}sendConfigFileDiagEvent(e,t,n){if(!this.eventHandler||this.suppressDiagnosticEvents)return!1;const r=e.getLanguageService().getCompilerOptionsDiagnostics();return r.push(...e.getAllProjectErrors()),!(!n&&r.length===(e.configDiagDiagnosticsReported??0)||(e.configDiagDiagnosticsReported=r.length,this.eventHandler({eventName:Qfe,data:{configFileName:e.getConfigFilePath(),diagnostics:r,triggerFile:t??e.getConfigFilePath()}}),0))}getOrCreateInferredProjectForProjectRootPathIfEnabled(e,t){if(!this.useInferredProjectPerProjectRoot||e.isDynamic&&void 0===t)return;if(t){const e=this.toCanonicalFileName(t);for(const t of this.inferredProjects)if(t.projectRootPath===e)return t;return this.createInferredProject(t,!1,t)}let n;for(const t of this.inferredProjects)t.projectRootPath&&la(t.projectRootPath,e.path,this.host.getCurrentDirectory(),!this.host.useCaseSensitiveFileNames)&&(n&&n.projectRootPath.length>t.projectRootPath.length||(n=t));return n}getOrCreateSingleInferredProjectIfEnabled(){if(this.useSingleInferredProject)return this.inferredProjects.length>0&&void 0===this.inferredProjects[0].projectRootPath?this.inferredProjects[0]:this.createInferredProject("",!0)}getOrCreateSingleInferredWithoutProjectRoot(e){xn.assert(!this.useSingleInferredProject);const t=this.toCanonicalFileName(this.getNormalizedAbsolutePath(e));for(const e of this.inferredProjects)if(!e.projectRootPath&&e.isOrphan()&&e.canonicalCurrentDirectory===t)return e;return this.createInferredProject(e)}createInferredProject(e,t,n){const r=n&&this.compilerOptionsForInferredProjectsPerProjectRoot.get(n)||this.compilerOptionsForInferredProjects;let i,o;n&&(i=this.watchOptionsForInferredProjectsPerProjectRoot.get(n),o=this.typeAcquisitionForInferredProjectsPerProjectRoot.get(n)),void 0===i&&(i=this.watchOptionsForInferredProjects),void 0===o&&(o=this.typeAcquisitionForInferredProjects),i=i||void 0;const a=new Ofe(this,this.documentRegistry,r,null==i?void 0:i.watchOptions,n,e,o);return a.setProjectErrors(null==i?void 0:i.errors),t?this.inferredProjects.unshift(a):this.inferredProjects.push(a),a}getOrCreateScriptInfoNotOpenedByClient(e,t,n,r){return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(Qpe(e),t,void 0,void 0,n,r)}getScriptInfo(e){return this.getScriptInfoForNormalizedPath(Qpe(e))}getScriptInfoOrConfig(e){const t=Qpe(e),n=this.getScriptInfoForNormalizedPath(t);if(n)return n;const r=this.configuredProjects.get(this.toPath(e));return r&&r.getCompilerOptions().configFile}logErrorForScriptInfoNotFound(e){const t=$e(V(this.filenameToScriptInfo.entries(),(e=>e[1].deferredDelete?void 0:e)),(([e,t])=>({path:e,fileName:t.fileName})));this.logger.msg(`Could not find file ${JSON.stringify(e)}.\nAll files are: ${JSON.stringify(t)}`,"Err")}getSymlinkedProjects(e){let t;if(this.realpathToScriptInfos){const t=e.getRealpathIfDifferent();t&&f(this.realpathToScriptInfos.get(t),n),f(this.realpathToScriptInfos.get(e.path),n)}return t;function n(n){if(n!==e)for(const r of n.containingProjects)!r.languageServiceEnabled||r.isOrphan()||r.getCompilerOptions().preserveSymlinks||e.isAttached(r)||(t?ld(t,((e,t)=>t!==n.path&&D(e,r)))||t.add(n.path,r):(t=et(),t.add(n.path,r)))}}watchClosedScriptInfo(e){if(xn.assert(!e.fileWatcher),!(e.isDynamicOrHasMixedContent()||this.globalCacheLocationDirectoryPath&&an(e.path,this.globalCacheLocationDirectoryPath))){const t=e.fileName.indexOf("/node_modules/");this.host.getModifiedTime&&-1!==t?(e.mTime=this.getModifiedTime(e),e.fileWatcher=this.watchClosedScriptInfoInNodeModules(e.fileName.substring(0,t))):e.fileWatcher=this.watchFactory.watchFile(e.fileName,((t,n)=>this.onSourceFileChanged(e,n)),500,this.hostConfiguration.watchOptions,ZU.ClosedScriptInfo)}}createNodeModulesWatcher(e,t){let n=this.watchFactory.watchDirectory(e,(e=>{var n;const i=_U(this.toPath(e));if(!i)return;const o=Bo(i);if(!(null==(n=r.affectedModuleSpecifierCacheProjects)?void 0:n.size)||"package.json"!==o&&"node_modules"!==o||r.affectedModuleSpecifierCacheProjects.forEach((e=>{var t;null==(t=e.getModuleSpecifierCache())||t.clear()})),r.refreshScriptInfoRefCount)if(t===i)this.refreshScriptInfosInDirectory(t);else{const e=this.filenameToScriptInfo.get(i);e?Nme(e)&&this.refreshScriptInfo(e):Fo(i)||this.refreshScriptInfosInDirectory(i)}}),1,this.hostConfiguration.watchOptions,ZU.NodeModules);const r={refreshScriptInfoRefCount:0,affectedModuleSpecifierCacheProjects:void 0,close:()=>{var e;!n||r.refreshScriptInfoRefCount||(null==(e=r.affectedModuleSpecifierCacheProjects)?void 0:e.size)||(n.close(),n=void 0,this.nodeModulesWatchers.delete(t))}};return this.nodeModulesWatchers.set(t,r),r}watchPackageJsonsInNodeModules(e,t){var n;const r=this.toPath(e),i=this.nodeModulesWatchers.get(r)||this.createNodeModulesWatcher(e,r);return xn.assert(!(null==(n=i.affectedModuleSpecifierCacheProjects)?void 0:n.has(t))),(i.affectedModuleSpecifierCacheProjects||(i.affectedModuleSpecifierCacheProjects=new Set)).add(t),{close:()=>{var e;null==(e=i.affectedModuleSpecifierCacheProjects)||e.delete(t),i.close()}}}watchClosedScriptInfoInNodeModules(e){const t=e+"/node_modules",n=this.toPath(t),r=this.nodeModulesWatchers.get(n)||this.createNodeModulesWatcher(t,n);return r.refreshScriptInfoRefCount++,{close:()=>{r.refreshScriptInfoRefCount--,r.close()}}}getModifiedTime(e){return(this.host.getModifiedTime(e.fileName)||Yi).getTime()}refreshScriptInfo(e){const t=this.getModifiedTime(e);if(t!==e.mTime){const n=so(e.mTime,t);e.mTime=t,this.onSourceFileChanged(e,n)}}refreshScriptInfosInDirectory(e){e+=xo,this.filenameToScriptInfo.forEach((t=>{Nme(t)&&an(t.path,e)&&this.refreshScriptInfo(t)}))}stopWatchingScriptInfo(e){e.fileWatcher&&(e.fileWatcher.close(),e.fileWatcher=void 0)}getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(e,t,n,r,i,o){if(wo(e)||Sfe(e))return this.getOrCreateScriptInfoWorker(e,t,!1,void 0,n,!!r,i,o);return this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(e))||void 0}getOrCreateScriptInfoForNormalizedPath(e,t,n,r,i,o){return this.getOrCreateScriptInfoWorker(e,this.currentDirectory,t,n,r,!!i,o,!1)}getOrCreateScriptInfoWorker(e,t,n,r,i,o,a,s){xn.assert(void 0===r||n,"ScriptInfo needs to be opened by client to be able to set its user defined content");const c=Ype(e,t,this.toCanonicalFileName);let l=this.filenameToScriptInfo.get(c);if(l){if(l.deferredDelete){if(xn.assert(!l.isDynamic),!n&&!(a||this.host).fileExists(e))return s?l:void 0;l.deferredDelete=void 0}}else{const r=Sfe(e);if(xn.assert(wo(e)||r||n,"",(()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:$e(this.openFilesWithNonRootedDiskPath.keys())})}\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`)),xn.assert(!wo(e)||this.currentDirectory===t||!this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(e)),"",(()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:$e(this.openFilesWithNonRootedDiskPath.keys())})}\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names`)),xn.assert(!r||this.currentDirectory===t||this.useInferredProjectPerProjectRoot,"",(()=>`${JSON.stringify({fileName:e,currentDirectory:t,hostCurrentDirectory:this.currentDirectory,openKeys:$e(this.openFilesWithNonRootedDiskPath.keys())})}\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`)),!n&&!r&&!(a||this.host).fileExists(e))return;l=new kfe(this.host,e,i,o,c,this.filenameToScriptInfoVersion.get(c)),this.filenameToScriptInfo.set(l.path,l),this.filenameToScriptInfoVersion.delete(l.path),n?wo(e)||r&&this.currentDirectory===t||this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(e),l):this.watchClosedScriptInfo(l)}return n&&(this.stopWatchingScriptInfo(l),l.open(r),o&&l.registerFileUpdate()),l}getScriptInfoForNormalizedPath(e){return!wo(e)&&this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(e))||this.getScriptInfoForPath(Ype(e,this.currentDirectory,this.toCanonicalFileName))}getScriptInfoForPath(e){const t=this.filenameToScriptInfo.get(e);return t&&t.deferredDelete?void 0:t}getDocumentPositionMapper(e,t,n){const r=this.getOrCreateScriptInfoNotOpenedByClient(t,e.currentDirectory,this.host,!1);if(!r)return void(n&&e.addGeneratedFileWatch(t,n));if(r.getSnapshot(),st(r.sourceMapFilePath)){const t=this.getScriptInfoForPath(r.sourceMapFilePath);if(t&&(t.getSnapshot(),void 0!==t.documentPositionMapper))return t.sourceInfos=this.addSourceInfoToSourceMap(n,e,t.sourceInfos),t.documentPositionMapper?t.documentPositionMapper:void 0;r.sourceMapFilePath=void 0}else{if(r.sourceMapFilePath)return void(r.sourceMapFilePath.sourceInfos=this.addSourceInfoToSourceMap(n,e,r.sourceMapFilePath.sourceInfos));if(void 0!==r.sourceMapFilePath)return}let i,o=(t,n)=>{const r=this.getOrCreateScriptInfoNotOpenedByClient(t,e.currentDirectory,this.host,!0);if(i=r||n,!r||r.deferredDelete)return;const o=r.getSnapshot();return void 0!==r.documentPositionMapper?r.documentPositionMapper:yQ(o)};const a=e.projectName,s=u1({getCanonicalFileName:this.toCanonicalFileName,log:e=>this.logger.info(e),getSourceFileLike:e=>this.getSourceFileLike(e,a,r)},r.fileName,r.textStorage.getLineInfo(),o);return o=void 0,i?st(i)?r.sourceMapFilePath={watcher:this.addMissingSourceMapFile(e.currentDirectory===this.currentDirectory?i:Go(i,e.currentDirectory),r.path),sourceInfos:this.addSourceInfoToSourceMap(n,e)}:(r.sourceMapFilePath=i.path,i.declarationInfoPath=r.path,i.deferredDelete||(i.documentPositionMapper=s||!1),i.sourceInfos=this.addSourceInfoToSourceMap(n,e,i.sourceInfos)):r.sourceMapFilePath=!1,s}addSourceInfoToSourceMap(e,t,n){if(e){const r=this.getOrCreateScriptInfoNotOpenedByClient(e,t.currentDirectory,t.directoryStructureHost,!1);(n||(n=new Set)).add(r.path)}return n}addMissingSourceMapFile(e,t){return this.watchFactory.watchFile(e,(()=>{const e=this.getScriptInfoForPath(t);e&&e.sourceMapFilePath&&!st(e.sourceMapFilePath)&&(this.delayUpdateProjectGraphs(e.containingProjects,!0),this.delayUpdateSourceInfoProjects(e.sourceMapFilePath.sourceInfos),e.closeSourceMapFileWatcher())}),2e3,this.hostConfiguration.watchOptions,ZU.MissingSourceMapFile)}getSourceFileLike(e,t,n){const r=t.projectName?t:this.findProject(t);if(r){const t=r.toPath(e),n=r.getSourceFile(t);if(n&&n.resolvedPath===t)return n}const i=this.getOrCreateScriptInfoNotOpenedByClient(e,(r||this).currentDirectory,r?r.directoryStructureHost:this.host,!1);if(i){if(n&&st(n.sourceMapFilePath)&&i!==n){const e=this.getScriptInfoForPath(n.sourceMapFilePath);e&&(e.sourceInfos??(e.sourceInfos=new Set)).add(i.path)}return i.cacheSourceFile?i.cacheSourceFile.sourceFile:(i.sourceFileLike||(i.sourceFileLike={get text(){return xn.fail("shouldnt need text"),""},getLineAndCharacterOfPosition:e=>{const t=i.positionToLineOffset(e);return{line:t.line-1,character:t.offset-1}},getPositionOfLineAndCharacter:(e,t,n)=>i.lineOffsetToPosition(e+1,t+1,n)}),i.sourceFileLike)}}setPerformanceEventHandler(e){this.performanceEventHandler=e}setHostConfiguration(e){var t;if(e.file){const t=this.getScriptInfoForNormalizedPath(Qpe(e.file));t&&(t.setOptions(ume(e.formatOptions),e.preferences),this.logger.info(`Host configuration update for file ${e.file}`))}else{if(void 0!==e.hostInfo&&(this.hostConfiguration.hostInfo=e.hostInfo,this.logger.info(`Host information ${e.hostInfo}`)),e.formatOptions&&(this.hostConfiguration.formatCodeOptions={...this.hostConfiguration.formatCodeOptions,...ume(e.formatOptions)},this.logger.info("Format host information updated")),e.preferences){const{lazyConfiguredProjectsFromExternalProject:t,includePackageJsonAutoImports:n,includeCompletionsForModuleExports:r}=this.hostConfiguration.preferences;this.hostConfiguration.preferences={...this.hostConfiguration.preferences,...e.preferences},t&&!this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject&&this.externalProjectToConfiguredProjectMap.forEach((e=>e.forEach((e=>{e.deferredClose||e.isClosed()||2!==e.pendingUpdateLevel||this.hasPendingProjectUpdate(e)||e.updateGraph()})))),n===e.preferences.includePackageJsonAutoImports&&!!r==!!e.preferences.includeCompletionsForModuleExports||this.forEachProject((e=>{e.onAutoImportProviderSettingsChanged()}))}if(e.extraFileExtensions&&(this.hostConfiguration.extraFileExtensions=e.extraFileExtensions,this.reloadProjects(),this.logger.info("Host file extension mappings updated")),e.watchOptions){const n=null==(t=dme(e.watchOptions))?void 0:t.watchOptions,r=KM(n,this.currentDirectory);this.hostConfiguration.watchOptions=r,this.hostConfiguration.beforeSubstitution=r===n?void 0:n,this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`)}}}getWatchOptions(e){return this.getWatchOptionsFromProjectWatchOptions(e.getWatchOptions(),e.getCurrentDirectory())}getWatchOptionsFromProjectWatchOptions(e,t){const n=this.hostConfiguration.beforeSubstitution?KM(this.hostConfiguration.beforeSubstitution,t):this.hostConfiguration.watchOptions;return e&&n?{...n,...e}:e||n}closeLog(){this.logger.close()}reloadProjects(){this.logger.info("reload projects."),this.filenameToScriptInfo.forEach((e=>{this.openFiles.has(e.path)||e.fileWatcher&&this.onSourceFileChanged(e,this.host.fileExists(e.fileName)?e.deferredDelete?0:1:2)})),this.pendingProjectUpdates.forEach(((e,t)=>{this.throttledOperations.cancel(t),this.pendingProjectUpdates.delete(t)})),this.throttledOperations.cancel(ime),this.pendingOpenFileProjectUpdates=void 0,this.pendingEnsureProjectForOpenFiles=!1,this.configFileExistenceInfoCache.forEach((e=>{e.config&&(e.config.updateLevel=2)})),this.configFileForOpenFiles.clear(),this.externalProjects.forEach((e=>{this.clearSemanticCache(e),e.updateGraph()}));const e=new Set,t=new Set;this.externalProjectToConfiguredProjectMap.forEach(((n,r)=>{const i=`Reloading configured project in external project: ${r}`;n.forEach((n=>{this.getHostPreferences().lazyConfiguredProjectsFromExternalProject?(n.isInitialLoadPending()||(this.clearSemanticCache(n),n.pendingUpdateLevel=2,n.pendingUpdateReason=Mme(i)),t.add(n)):this.reloadConfiguredProjectClearingSemanticCache(n,i,e)}))})),this.openFiles.forEach(((n,r)=>{const i=this.getScriptInfoForPath(r);S(i.containingProjects,$fe)||this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(i,2,e,t)})),t.forEach((t=>e.add(t))),this.inferredProjects.forEach((e=>this.clearSemanticCache(e))),this.ensureProjectForOpenFiles(),this.cleanupProjectsAndScriptInfos(e,new Set(this.openFiles.keys()),new Set(this.externalProjectToConfiguredProjectMap.keys())),this.logger.info("After reloading projects.."),this.printProjects()}removeRootOfInferredProjectIfNowPartOfOtherProject(e){xn.assert(e.containingProjects.length>0);const t=e.containingProjects[0];!t.isOrphan()&&Jfe(t)&&t.isRoot(e)&&f(e.containingProjects,(e=>e!==t&&!e.isOrphan()))&&t.removeFile(e,!0,!0)}ensureProjectForOpenFiles(){this.logger.info("Before ensureProjectForOpenFiles:"),this.printProjects();const e=this.pendingOpenFileProjectUpdates;this.pendingOpenFileProjectUpdates=void 0,null==e||e.forEach(((e,t)=>this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(t),1))),this.openFiles.forEach(((e,t)=>{const n=this.getScriptInfoForPath(t);n.isOrphan()?this.assignOrphanScriptInfoToInferredProject(n,e):this.removeRootOfInferredProjectIfNowPartOfOtherProject(n)})),this.pendingEnsureProjectForOpenFiles=!1,this.inferredProjects.forEach(Fme),this.logger.info("After ensureProjectForOpenFiles:"),this.printProjects()}openClientFile(e,t,n,r){return this.openClientFileWithNormalizedPath(Qpe(e),t,n,!1,r?Qpe(r):void 0)}getOriginalLocationEnsuringConfiguredProject(e,t){const n=e.isSourceOfProjectReferenceRedirect(t.fileName),r=n?t:e.getSourceMapper().tryGetSourcePosition(t);if(!r)return;const{fileName:i}=r,o=this.getScriptInfo(i);if(!o&&!this.host.fileExists(i))return;const a={fileName:Qpe(i),path:this.toPath(i)},s=this.getConfigFileNameForFile(a,!1);if(!s)return;let c=this.findConfiguredProjectByProjectName(s);if(!c){if(e.getCompilerOptions().disableReferencedProjectLoad)return n?t:(null==o?void 0:o.containingProjects.length)?r:t;c=this.createConfiguredProject(s,`Creating project for original file: ${a.fileName}${t!==r?" for location: "+t.fileName:""}`)}Fme(c);const l=e=>{const t=this.getScriptInfo(i);return t&&e.containsScriptInfo(t)&&!e.isSourceOfProjectReferenceRedirect(t.path)};if(c.isSolution()||!l(c)){if(c=Tme(c,i,(e=>l(e)?e:void 0),1,`Creating project referenced in solution ${c.projectName} to find possible configured project for original file: ${a.fileName}${t!==r?" for location: "+t.fileName:""}`),!c)return;if(c===e)return r}_(c);const u=this.getScriptInfo(i);if(u&&u.containingProjects.length)return u.containingProjects.forEach((e=>{zfe(e)&&_(e)})),r;function _(t){(e.originalConfiguredProjects??(e.originalConfiguredProjects=new Set)).add(t.canonicalConfigFilePath)}}fileExists(e){return!!this.getScriptInfoForNormalizedPath(e)||this.host.fileExists(e)}findExternalProjectContainingOpenScriptInfo(e){return S(this.externalProjects,(t=>(Fme(t),t.containsScriptInfo(e))))}getOrCreateOpenScriptInfo(e,t,n,r,i){const o=this.getOrCreateScriptInfoWorker(e,i?this.getNormalizedAbsolutePath(i):this.currentDirectory,!0,t,n,!!r,void 0,!0);return this.openFiles.set(o.path,i),o}assignProjectToOpenedScriptInfo(e){let t,n,r,i;if(!this.findExternalProjectContainingOpenScriptInfo(e)&&0===this.serverMode){const o=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(e,1);o&&(r=o.seenProjects,i=o.sentConfigDiag,o.defaultProject&&(t=o.defaultProject.getConfigFilePath(),n=o.defaultProject.getAllProjectErrors()))}return e.containingProjects.forEach(Fme),e.isOrphan()&&(null==r||r.forEach((t=>{i.has(t)||this.sendConfigFileDiagEvent(t,e.fileName,!0)})),xn.assert(this.openFiles.has(e.path)),this.assignOrphanScriptInfoToInferredProject(e,this.openFiles.get(e.path))),xn.assert(!e.isOrphan()),{configFileName:t,configFileErrors:n,retainProjects:r}}findCreateOrReloadConfiguredProject(e,t,n,r,i,o,a,s){let c=this.findConfiguredProjectByProjectName(e,r),l=!1;switch(t){case 0:if(!c)return;break;case 1:c??(c=this.createConfiguredProject(e,n)),l=!a&&Ime(c,i);break;case 2:c??(c=this.createConfiguredProject(e,Mme(n))),l=!s&&this.reloadConfiguredProjectClearingSemanticCache(c,n,o),!s||s.has(c)||o.has(c)||(c.pendingUpdateLevel=2,c.pendingUpdateReason=Mme(n),s.add(c));break;default:xn.assertNever(t)}return{project:c,sentConfigFileDiag:l}}tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t,n,r){const i=this.getConfigFileNameForFile(e,0===t);if(!i)return;const o=this.findCreateOrReloadConfiguredProject(i,t,Ome(e),n,e.fileName,r);if(!o)return;const a=new Set,s=new Set(o.sentConfigFileDiag?[o.project]:void 0);let c,l;var u;return _(u=o.project)||function(i){Tme(i,e.path,((e,t)=>(t&&s.add(e),_(e))),t,`Creating project referenced in solution ${i.projectName} to find possible configured project for ${e.fileName} to open`,n,e.fileName,r)}(u),{defaultProject:c??l,sentConfigDiag:s,seenProjects:a};function _(t){if(!W(a,t))return;const n=t.containsScriptInfo(e);if(n&&!t.isSourceOfProjectReferenceRedirect(e.path))return c=t;l??(l=n?t:void 0)}}tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(e,t,n,r){const i=0===t,o=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(e,t,i,n);if(!o)return;const{defaultProject:a,seenProjects:s}=o;return a&&function(e,t,n,r,i,o,a,s){for(;;){if(!t.isInitialLoadPending()&&(!t.getCompilerOptions().composite||t.getCompilerOptions().disableSolutionSearching))return;const c=t.projectService.getConfigFileNameForFile({fileName:t.getConfigFilePath(),path:e.path,configFileInfo:!0},0===r);if(!c)return;const l=t.projectService.findCreateOrReloadConfiguredProject(c,r,i,o,void 0,a,!0,s);if(!l)return;l.project.isInitialLoadPending()&&t.getCompilerOptions().composite&&l.project.setPotentialProjectReference(t.canonicalConfigFilePath);const u=n(l.project);if(u)return u;t=l.project}}(e,a,(e=>{s.add(e)}),t,`Creating project possibly referencing default composite project ${a.getProjectName()} of open file ${e.fileName}`,i,n,r),o}loadAncestorProjectTree(e){e=e||U(this.configuredProjects,((e,t)=>t.isInitialLoadPending()?void 0:[e,!0]));const t=new Set;for(const n of $e(this.configuredProjects.values()))wme(n,(t=>e.has(t)))&&Fme(n),this.ensureProjectChildren(n,e,t)}ensureProjectChildren(e,t,n){var r;if(!W(n,e.canonicalConfigFilePath))return;if(e.getCompilerOptions().disableReferencedProjectLoad)return;const i=null==(r=e.getCurrentProgram())?void 0:r.getResolvedProjectReferences();if(i)for(const r of i){if(!r)continue;const i=tV(r.references,(e=>t.has(e.sourceFile.path)?e:void 0));if(!i)continue;const o=Qpe(r.sourceFile.fileName),a=this.findConfiguredProjectByProjectName(o)??this.createConfiguredProject(o,`Creating project referenced by : ${e.projectName} as it references project ${i.sourceFile.fileName}`);Fme(a),this.ensureProjectChildren(a,t,n)}}cleanupConfiguredProjects(e,t,n){this.getOrphanConfiguredProjects(e,n,t).forEach((e=>this.removeProject(e)))}cleanupProjectsAndScriptInfos(e,t,n){this.cleanupConfiguredProjects(e,n,t);for(const e of this.inferredProjects.slice())e.isOrphan()&&this.removeProject(e);this.removeOrphanScriptInfos()}openClientFileWithNormalizedPath(e,t,n,r,i){const o=this.getOrCreateOpenScriptInfo(e,t,n,r,i),{retainProjects:a,...s}=this.assignProjectToOpenedScriptInfo(o);return this.cleanupProjectsAndScriptInfos(a,new Set([o.path]),void 0),this.telemetryOnOpenFile(o),this.printProjects(),s}getOrphanConfiguredProjects(e,t,n){const r=new Set(this.configuredProjects.values()),i=e=>{!e.originalConfiguredProjects||!zfe(e)&&e.isOrphan()||e.originalConfiguredProjects.forEach(((e,t)=>{const n=this.getConfiguredProjectByCanonicalConfigFilePath(t);return n&&s(n)}))};return null==e||e.forEach(s),this.inferredProjects.forEach(i),this.externalProjects.forEach(i),this.externalProjectToConfiguredProjectMap.forEach(((e,t)=>{(null==n?void 0:n.has(t))||e.forEach(s)})),this.openFiles.forEach(((e,n)=>{if(null==t?void 0:t.has(n))return;const r=this.getScriptInfoForPath(n);if(S(r.containingProjects,$fe))return;const i=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(r,0);(null==i?void 0:i.defaultProject)&&(null==i||i.seenProjects.forEach(s))})),this.configuredProjects.forEach((e=>{r.has(e)&&(a(e)||Eme(e,o))&&s(e)})),r;function o(e){return!r.has(e)||a(e)}function a(e){var t,n;return(e.deferredClose||e.projectService.hasPendingProjectUpdate(e))&&!!(null==(n=null==(t=e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath))?void 0:t.openFilesImpactedByConfigFile)?void 0:n.size)}function s(e){r.delete(e)&&(i(e),Eme(e,s))}}removeOrphanScriptInfos(){const e=new Map(this.filenameToScriptInfo);this.filenameToScriptInfo.forEach((t=>{if(!t.deferredDelete){if(!t.isScriptOpen()&&t.isOrphan()&&!t.isContainedByBackgroundProject()){if(!t.sourceMapFilePath)return;let e;if(st(t.sourceMapFilePath)){const n=this.filenameToScriptInfo.get(t.sourceMapFilePath);e=null==n?void 0:n.sourceInfos}else e=t.sourceMapFilePath.sourceInfos;if(!e)return;if(!ud(e,(e=>{const t=this.getScriptInfoForPath(e);return!!t&&(t.isScriptOpen()||!t.isOrphan())})))return}if(e.delete(t.path),t.sourceMapFilePath){let n;if(st(t.sourceMapFilePath)){const r=this.filenameToScriptInfo.get(t.sourceMapFilePath);(null==r?void 0:r.deferredDelete)?t.sourceMapFilePath={watcher:this.addMissingSourceMapFile(r.fileName,t.path),sourceInfos:r.sourceInfos}:e.delete(t.sourceMapFilePath),n=null==r?void 0:r.sourceInfos}else n=t.sourceMapFilePath.sourceInfos;n&&n.forEach(((t,n)=>e.delete(n)))}}})),e.forEach((e=>this.deleteScriptInfo(e)))}telemetryOnOpenFile(e){if(0!==this.serverMode||!this.eventHandler||!e.isJavaScript()||!Fx(this.allJsFilesForOpenFileTelemetry,e.path))return;const t=this.ensureDefaultProjectForFile(e);if(!t.languageServiceEnabled)return;const n=t.getSourceFile(e.path),r=!!n&&!!n.checkJsDirective;this.eventHandler({eventName:eme,data:{info:{checkJs:r}}})}closeClientFile(e,t){const n=this.getScriptInfoForNormalizedPath(Qpe(e)),r=!!n&&this.closeOpenFile(n,t);return t||this.printProjects(),r}collectChanges(e,t,n,r){for(const i of t){const t=S(e,(e=>e.projectName===i.getProjectName()));r.push(i.getChangesSinceVersion(t&&t.version,n))}}synchronizeProjectList(e,t){const n=[];return this.collectChanges(e,this.externalProjects,t,n),this.collectChanges(e,V(this.configuredProjects.values(),(e=>e.deferredClose?void 0:e)),t,n),this.collectChanges(e,this.inferredProjects,t,n),n}applyChangesInOpenFiles(e,t,n){let r,i,o=!1;if(e)for(const t of e){const e=this.getOrCreateOpenScriptInfo(Qpe(t.fileName),t.content,fme(t.scriptKind),t.hasMixedContent,t.projectRootPath?Qpe(t.projectRootPath):void 0);(r||(r=[])).push(e)}if(t)for(const e of t){const t=this.getScriptInfo(e.fileName);xn.assert(!!t),this.applyChangesToFile(t,e.changes)}if(n)for(const e of n)o=this.closeClientFile(e,!0)||o;null==r||r.forEach((e=>{var t;return null==(t=this.assignProjectToOpenedScriptInfo(e).retainProjects)?void 0:t.forEach((e=>(i??(i=new Set)).add(e)))})),o&&this.assignOrphanScriptInfosToInferredProject(),r?(this.cleanupProjectsAndScriptInfos(i,new Set(r.map((e=>e.path))),void 0),r.forEach((e=>this.telemetryOnOpenFile(e))),this.printProjects()):p(n)&&this.printProjects()}applyChangesToFile(e,t){for(const n of t)e.editContent(n.span.start,n.span.start+n.span.length,n.newText)}closeExternalProject(e,t){const n=Qpe(e);if(this.externalProjectToConfiguredProjectMap.get(n))this.externalProjectToConfiguredProjectMap.delete(n);else{const t=this.findExternalProjectByProjectName(e);t&&this.removeProject(t)}t&&(this.cleanupConfiguredProjects(),this.printProjects())}openExternalProjects(e){const t=new Set(this.externalProjects.map((e=>e.getProjectName())));this.externalProjectToConfiguredProjectMap.forEach(((e,n)=>t.add(n)));for(const n of e)this.openExternalProject(n,!1),t.delete(n.projectFileName);t.forEach((e=>this.closeExternalProject(e,!1))),this.cleanupConfiguredProjects(),this.printProjects()}static escapeFilenameForRegex(e){return e.replace(this.filenameEscapeRegexp,"\\$&")}resetSafeList(){this.safelist=lme}applySafeList(e){const t=e.typeAcquisition;xn.assert(!!t,"proj.typeAcquisition should be set by now");const n=this.applySafeListWorker(e,e.rootFiles,t);return(null==n?void 0:n.excludedFiles)??[]}applySafeListWorker(t,n,r){if(!1===r.enable||r.disableFilenameBasedTypeAcquisition)return;const i=r.include||(r.include=[]),o=[],a=n.map((e=>Vo(e.fileName)));for(const t of Object.keys(this.safelist)){const n=this.safelist[t];for(const r of a)if(n.match.test(r)){if(this.logger.info(`Excluding files based on rule ${t} matching file '${r}'`),n.types)for(const e of n.types)i.includes(e)||i.push(e);if(n.exclude)for(const i of n.exclude){const a=r.replace(n.match,((...n)=>i.map((r=>"number"==typeof r?st(n[r])?e.escapeFilenameForRegex(n[r]):(this.logger.info(`Incorrect RegExp specification in safelist rule ${t} - not enough groups`),"\\*"):r)).join("")));o.includes(a)||o.push(a)}else{const t=e.escapeFilenameForRegex(r);o.includes(t)||o.push(t)}}}const s=o.map((e=>new RegExp(e,"i")));let c,l;for(let e=0;et.test(a[e]))))u(e);else{if(r.enable){const t=Bo(yt(a[e]));if(Ao(t,"js")){const n=Xt(Yk(t)),r=this.legacySafelist.get(n);if(void 0!==r){this.logger.info(`Excluded '${a[e]}' because it matched ${n} from the legacy safelist`),u(e),i.includes(r)||i.push(r);continue}}}/^.+[.-]min\.js$/.test(a[e])?u(e):null==c||c.push(n[e])}return l?{rootFiles:c,excludedFiles:l}:void 0;function u(e){l||(xn.assert(!c),c=n.slice(0,e),l=[]),l.push(a[e])}}openExternalProject(e,t){const n=this.findExternalProjectByProjectName(e.projectFileName);let r,i=[];for(const t of e.rootFiles){const n=Qpe(t.fileName);if(cfe(n)){if(0===this.serverMode&&this.host.fileExists(n)){let t=this.findConfiguredProjectByProjectName(n);t||(t=this.createConfiguredProject(n,`Creating configured project in external project: ${e.projectFileName}`),this.getHostPreferences().lazyConfiguredProjectsFromExternalProject||t.updateGraph()),(r??(r=new Set)).add(t),xn.assert(!t.isClosed())}}else i.push(t)}if(r)this.externalProjectToConfiguredProjectMap.set(e.projectFileName,r),n&&this.removeProject(n);else{this.externalProjectToConfiguredProjectMap.delete(e.projectFileName);const t=e.typeAcquisition||{};t.include=t.include||[],t.exclude=t.exclude||[],void 0===t.enable&&(t.enable=Ffe(i.map((e=>e.fileName))));const r=this.applySafeListWorker(e,i,t),o=(null==r?void 0:r.excludedFiles)??[];if(i=(null==r?void 0:r.rootFiles)??i,n){n.excludedFiles=o;const r=_me(e.options),a=dme(e.options,n.getCurrentDirectory()),s=this.getFilenameForExceededTotalSizeLimitForNonTsFiles(e.projectFileName,r,i,yme);s?n.disableLanguageService(s):n.enableLanguageService(),n.setProjectErrors(null==a?void 0:a.errors),this.updateRootAndOptionsOfNonInferredProject(n,i,yme,r,t,e.options.compileOnSave,null==a?void 0:a.watchOptions),n.updateGraph()}else this.createExternalProject(e.projectFileName,i,e.options,t,o).updateGraph()}t&&(this.cleanupConfiguredProjects(r,new Set(e.projectFileName)),this.printProjects())}hasDeferredExtension(){for(const e of this.hostConfiguration.extraFileExtensions)if(7===e.scriptKind)return!0;return!1}requestEnablePlugin(e,t,n){if(this.host.importPlugin||this.host.require)if(this.logger.info(`Enabling plugin ${t.name} from candidate paths: ${n.join(",")}`),!t.name||Os(t.name)||/[\\/]\.\.?($|[\\/])/.test(t.name))this.logger.info(`Skipped loading plugin ${t.name||JSON.stringify(t)} because only package name is allowed plugin name`);else{if(this.host.importPlugin){const r=Ife.importServicePluginAsync(t,n,this.host,(e=>this.logger.info(e)));this.pendingPluginEnablements??(this.pendingPluginEnablements=new Map);let i=this.pendingPluginEnablements.get(e);return i||this.pendingPluginEnablements.set(e,i=[]),void i.push(r)}this.endEnablePlugin(e,Ife.importServicePluginSync(t,n,this.host,(e=>this.logger.info(e))))}else this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded")}endEnablePlugin(e,{pluginConfigEntry:t,resolvedModule:n,errorLogs:r}){var i;if(n){const r=null==(i=this.currentPluginConfigOverrides)?void 0:i.get(t.name);if(r){const e=t.name;(t=r).name=e}e.enableProxy(n,t)}else f(r,(e=>this.logger.info(e))),this.logger.info(`Couldn't find ${t.name}`)}hasNewPluginEnablementRequests(){return!!this.pendingPluginEnablements}hasPendingPluginEnablements(){return!!this.currentPluginEnablementPromise}async waitForPendingPlugins(){for(;this.currentPluginEnablementPromise;)await this.currentPluginEnablementPromise}enableRequestedPlugins(){this.pendingPluginEnablements&&this.enableRequestedPluginsAsync()}async enableRequestedPluginsAsync(){if(this.currentPluginEnablementPromise&&await this.waitForPendingPlugins(),!this.pendingPluginEnablements)return;const e=$e(this.pendingPluginEnablements.entries());this.pendingPluginEnablements=void 0,this.currentPluginEnablementPromise=this.enableRequestedPluginsWorker(e),await this.currentPluginEnablementPromise}async enableRequestedPluginsWorker(e){xn.assert(void 0===this.currentPluginEnablementPromise);let t=!1;await Promise.all(O(e,(async([e,n])=>{const r=await Promise.all(n);if(e.isClosed()||Vfe(e))this.logger.info(`Cancelling plugin enabling for ${e.getProjectName()} as it is ${e.isClosed()?"closed":"deferred close"}`);else{t=!0;for(const t of r)this.endEnablePlugin(e,t);this.delayUpdateProjectGraph(e)}}))),this.currentPluginEnablementPromise=void 0,t&&this.sendProjectsUpdatedInBackgroundEvent()}configurePlugin(e){this.forEachEnabledProject((t=>t.onPluginConfigurationChanged(e.pluginName,e.configuration))),this.currentPluginConfigOverrides=this.currentPluginConfigOverrides||new Map,this.currentPluginConfigOverrides.set(e.pluginName,e.configuration)}getPackageJsonsVisibleToFile(e,t,n){const r=this.packageJsonCache,i=n&&this.toPath(n),o=[],a=e=>{switch(r.directoryHasPackageJson(e)){case 3:return r.searchDirectoryAndAncestors(e),a(e);case-1:const n=Ko(e,"package.json");this.watchPackageJsonFile(n,this.toPath(n),t);const i=r.getInDirectory(e);i&&o.push(i)}if(i&&i===e)return!0};return ga(Ro(e),a),o}getNearestAncestorDirectoryWithPackageJson(e){return ga(e,(e=>{switch(this.packageJsonCache.directoryHasPackageJson(e)){case-1:return e;case 0:return;case 3:return this.host.fileExists(Ko(e,"package.json"))?e:void 0}}))}watchPackageJsonFile(e,t,n){xn.assert(void 0!==n);let r=(this.packageJsonFilesMap??(this.packageJsonFilesMap=new Map)).get(t);if(!r){let n=this.watchFactory.watchFile(e,((e,n)=>{switch(n){case 0:case 1:this.packageJsonCache.addOrUpdate(e,t),this.onPackageJsonChange(r);break;case 2:this.packageJsonCache.delete(t),this.onPackageJsonChange(r),r.projects.clear(),r.close()}}),250,this.hostConfiguration.watchOptions,ZU.PackageJson);r={projects:new Set,close:()=>{var e;!r.projects.size&&n&&(n.close(),n=void 0,null==(e=this.packageJsonFilesMap)||e.delete(t),this.packageJsonCache.invalidate(t))}},this.packageJsonFilesMap.set(t,r)}r.projects.add(n),(n.packageJsonWatches??(n.packageJsonWatches=new Set)).add(r)}onPackageJsonChange(e){e.projects.forEach((e=>{var t;return null==(t=e.onPackageJsonChange)?void 0:t.call(e)}))}includePackageJsonAutoImports(){switch(this.hostConfiguration.preferences.includePackageJsonAutoImports){case"on":return 1;case"off":return 0;default:return 2}}getIncompleteCompletionsCache(){return this.incompleteCompletionsCache||(this.incompleteCompletionsCache=function(){let e;return{get:()=>e,set(t){e=t},clear(){e=void 0}}}())}};Bme.filenameEscapeRegexp=/[-/\\^$*+?.()|[\]{}]/g;var Jme=Bme;function zme(e){return void 0!==e.kind}function $me(e){e.print(!1,!1,!1)}function qme(e){let t,n,r;const i={get(e,t,i,o){if(n&&r===a(e,i,o))return n.get(t)},set(n,r,i,a,c,l,u){if(o(n,i,a).set(r,s(c,l,u,!1)),u)for(const n of l)if(n.isInNodeModules){const r=n.path.substring(0,n.path.indexOf(Ij)+Ij.length-1),i=e.toPath(r);(null==t?void 0:t.has(i))||(t||(t=new Map)).set(i,e.watchNodeModulesForPackageJsonChanges(r))}},setModulePaths(e,t,n,r,i){const a=o(e,n,r),c=a.get(t);c?c.modulePaths=i:a.set(t,s(void 0,i,void 0,void 0))},setBlockedByPackageJsonDependencies(e,t,n,r,i){const a=o(e,n,r),c=a.get(t);c?c.isBlockedByPackageJsonDependencies=i:a.set(t,s(void 0,void 0,void 0,i))},clear(){null==t||t.forEach(dx),null==n||n.clear(),null==t||t.clear(),r=void 0},count:()=>n?n.size:0};return xn.isDebugging&&Object.defineProperty(i,"__cache",{get:()=>n}),i;function o(e,t,o){const s=a(e,t,o);return n&&r!==s&&i.clear(),r=s,n||(n=new Map)}function a(e,t,n){return`${e},${t.importModuleSpecifierEnding},${t.importModuleSpecifierPreference},${n.overrideImportMode}`}function s(e,t,n,r){return{kind:e,modulePaths:t,moduleSpecifiers:n,isBlockedByPackageJsonDependencies:r}}}function Vme(e){const t=new Map,n=new Map;return{addOrUpdate:r,invalidate:function(e){t.delete(e),n.delete(Ro(e))},delete:e=>{t.delete(e),n.set(Ro(e),!0)},getInDirectory:n=>t.get(e.toPath(Ko(n,"package.json")))||void 0,directoryHasPackageJson:t=>i(e.toPath(t)),searchDirectoryAndAncestors:t=>{ga(t,(t=>{const o=e.toPath(t);if(3!==i(o))return!0;const a=Ko(t,"package.json");dZ(e,a)?r(a,Ko(o,"package.json")):n.set(o,!0)}))}};function r(r,i){const o=xn.checkDefined(vZ(r,e.host));t.set(i,o),n.delete(Ro(i))}function i(e){return t.has(Ko(e,"package.json"))?-1:n.has(e)?0:3}}var Ume={isCancellationRequested:()=>!1,setRequest:()=>{},resetRequest:()=>{}};function Kme(e,t){if((Jfe(e)||$fe(e))&&e.isJsOnlyProject()){const n=e.getScriptInfoForNormalizedPath(t);return n&&!n.isJavaScript()}return!1}function Wme(e,t,n){const r=t.getScriptInfoForNormalizedPath(e);return{start:r.positionToLineOffset(n.start),end:r.positionToLineOffset(n.start+n.length),text:Jq(n.messageText,"\n"),code:n.code,category:vi(n),reportsUnnecessary:n.reportsUnnecessary,reportsDeprecated:n.reportsDeprecated,source:n.source,relatedInformation:O(n.relatedInformation,Hme)}}function Hme(e){return e.file?{span:{start:Gme(Xa(e.file,e.start)),end:Gme(Xa(e.file,e.start+e.length)),file:e.file.fileName},message:Jq(e.messageText,"\n"),category:vi(e),code:e.code}:{message:Jq(e.messageText,"\n"),category:vi(e),code:e.code}}function Gme(e){return{line:e.line+1,offset:e.character+1}}function Xme(e,t){const n=e.file&&Gme(Xa(e.file,e.start)),r=e.file&&Gme(Xa(e.file,e.start+e.length)),i=Jq(e.messageText,"\n"),{code:o,source:a}=e,s={start:n,end:r,text:i,code:o,category:vi(e),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,source:a,relatedInformation:O(e.relatedInformation,Hme)};return t?{...s,fileName:e.file&&e.file.fileName}:s}var Qme=_fe;function Yme(e,t,n,r){const i=t.hasLevel(3),o=JSON.stringify(e);return i&&t.info(`${e.type}:${NH(e)}`),`Content-Length: ${1+n(o,"utf8")}\r\n\r\n${o}${r}`}function Zme(e,t){return{seq:0,type:"event",event:e,body:t}}function ege(e){return it((({textSpan:e})=>e.start+100003*e.length),KQ(e))}function tge(e,t,n){for(const r of ot(e)?e:e.projects)n(r,t);!ot(e)&&e.symLinkedProjects&&e.symLinkedProjects.forEach(((e,t)=>{for(const r of e)n(r,t)}))}function nge(e,t,n,r,i,o){const a=new Map,s=rt();s.enqueue({project:t,location:n}),tge(e,n.fileName,((e,t)=>{const r={fileName:t,pos:n.pos};s.enqueue({project:e,location:r})}));const c=t.projectService,l=t.getCancellationToken(),u=function(e,t,n){const r=e.getLanguageService().getDefinitionAtPosition(t.fileName,t.pos,!1,n),i=r&&Se(r);return i&&!i.isLocal?{fileName:i.fileName,pos:i.textSpan.start}:void 0}(t,n,r),_=bt((()=>t.isSourceOfProjectReferenceRedirect(u.fileName)?u:t.getLanguageService().getSourceMapper().tryGetGeneratedPosition(u))),d=bt((()=>t.isSourceOfProjectReferenceRedirect(u.fileName)?u:t.getLanguageService().getSourceMapper().tryGetSourcePosition(u))),p=new Set;e:for(;!s.isEmpty();){for(;!s.isEmpty();){if(l.isCancellationRequested())break e;const{project:e,location:t}=s.dequeue();if(a.has(e))continue;if(ige(e,t))continue;if(Fme(e),!e.containsFile(Qpe(t.fileName)))continue;const n=f(e,t);a.set(e,n??Hpe),p.add(oge(e))}u&&(c.loadAncestorProjectTree(p),c.forEachEnabledProject((e=>{if(l.isCancellationRequested())return;if(a.has(e))return;const t=rge(u,e,_,d);t&&s.enqueue({project:e,location:t})})))}return 1===a.size?Ce(a.values()):a;function f(e,t){const n=i(e,t);if(n){for(const t of n)o(t,(t=>{const n=c.getOriginalLocationEnsuringConfiguredProject(e,t);if(!n)return;const r=c.getScriptInfo(n.fileName);for(const e of r.containingProjects)e.isOrphan()||a.has(e)||s.enqueue({project:e,location:n});const i=c.getSymlinkedProjects(r);i&&i.forEach(((e,t)=>{for(const r of e)r.isOrphan()||a.has(r)||s.enqueue({project:r,location:{fileName:t,pos:n.pos}})}))}));return n}}}function rge(e,t,n,r){if(t.containsFile(Qpe(e.fileName))&&!ige(t,e))return e;const i=n();if(i&&t.containsFile(Qpe(i.fileName)))return i;const o=r();return o&&t.containsFile(Qpe(o.fileName))?o:void 0}function ige(e,t){if(!t)return!1;const n=e.getLanguageService().getProgram();if(!n)return!1;const r=n.getSourceFile(t.fileName);return!!r&&r.resolvedPath!==r.path&&r.resolvedPath!==e.toPath(t.fileName)}function oge(e){return zfe(e)?e.canonicalConfigFilePath:e.getProjectName()}function age({fileName:e,textSpan:t}){return{fileName:e,pos:t.start}}function sge(e,t){return GQ(e,t.getSourceMapper(),(e=>t.projectService.fileExists(e)))}function cge(e,t){return XQ(e,t.getSourceMapper(),(e=>t.projectService.fileExists(e)))}function lge(e,t){return QQ(e,t.getSourceMapper(),(e=>t.projectService.fileExists(e)))}var uge=["openExternalProject","openExternalProjects","closeExternalProject","synchronizeProjectList","emit-output","compileOnSaveAffectedFileList","compileOnSaveEmitFile","compilerOptionsDiagnostics-full","encodedSemanticClassifications-full","semanticDiagnosticsSync","suggestionDiagnosticsSync","geterrForProject","reload","reloadProjects","getCodeFixes","getCodeFixes-full","getCombinedCodeFix","getCombinedCodeFix-full","applyCodeActionCommand","getSupportedCodeFixes","getApplicableRefactors","getMoveToRefactoringFileSuggestions","getEditsForRefactor","getEditsForRefactor-full","organizeImports","organizeImports-full","getEditsForFileRename","getEditsForFileRename-full","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","getPasteEdits"],_ge=[...uge,"definition","definition-full","definitionAndBoundSpan","definitionAndBoundSpan-full","typeDefinition","implementation","implementation-full","references","references-full","rename","renameLocations-full","rename-full","quickinfo","quickinfo-full","completionInfo","completions","completions-full","completionEntryDetails","completionEntryDetails-full","signatureHelp","signatureHelp-full","navto","navto-full","documentHighlights","documentHighlights-full"],dge=class e{constructor(e){this.changeSeq=0,this.handlers=new Map(Object.entries({status:()=>{const e={version:c};return this.requiredResponse(e)},openExternalProject:e=>(this.projectService.openExternalProject(e.arguments,!0),this.requiredResponse(!0)),openExternalProjects:e=>(this.projectService.openExternalProjects(e.arguments.projects),this.requiredResponse(!0)),closeExternalProject:e=>(this.projectService.closeExternalProject(e.arguments.projectFileName,!0),this.requiredResponse(!0)),synchronizeProjectList:e=>{const t=this.projectService.synchronizeProjectList(e.arguments.knownProjects,e.arguments.includeProjectReferenceRedirectInfo);if(!t.some((e=>e.projectErrors&&0!==e.projectErrors.length)))return this.requiredResponse(t);const n=O(t,(e=>e.projectErrors&&0!==e.projectErrors.length?{info:e.info,changes:e.changes,files:e.files,projectErrors:this.convertToDiagnosticsWithLinePosition(e.projectErrors,void 0)}:e));return this.requiredResponse(n)},updateOpen:e=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(e.arguments.openFiles&&M(e.arguments.openFiles,(e=>({fileName:e.file,content:e.fileContent,scriptKind:e.scriptKindName,projectRootPath:e.projectRootPath}))),e.arguments.changedFiles&&M(e.arguments.changedFiles,(e=>({fileName:e.fileName,changes:V(ye(e.textChanges),(t=>{const n=xn.checkDefined(this.projectService.getScriptInfo(e.fileName)),r=n.lineOffsetToPosition(t.start.line,t.start.offset),i=n.lineOffsetToPosition(t.end.line,t.end.offset);return r>=0?{span:{start:r,length:i-r},newText:t.newText}:void 0}))}))),e.arguments.closedFiles),this.requiredResponse(!0)),applyChangedToOpenFiles:e=>(this.changeSeq++,this.projectService.applyChangesInOpenFiles(e.arguments.openFiles,e.arguments.changedFiles&&M(e.arguments.changedFiles,(e=>({fileName:e.fileName,changes:ye(e.changes)}))),e.arguments.closedFiles),this.requiredResponse(!0)),exit:()=>(this.exit(),this.notRequired()),definition:e=>this.requiredResponse(this.getDefinition(e.arguments,!0)),"definition-full":e=>this.requiredResponse(this.getDefinition(e.arguments,!1)),definitionAndBoundSpan:e=>this.requiredResponse(this.getDefinitionAndBoundSpan(e.arguments,!0)),"definitionAndBoundSpan-full":e=>this.requiredResponse(this.getDefinitionAndBoundSpan(e.arguments,!1)),findSourceDefinition:e=>this.requiredResponse(this.findSourceDefinition(e.arguments)),"emit-output":e=>this.requiredResponse(this.getEmitOutput(e.arguments)),typeDefinition:e=>this.requiredResponse(this.getTypeDefinition(e.arguments)),implementation:e=>this.requiredResponse(this.getImplementation(e.arguments,!0)),"implementation-full":e=>this.requiredResponse(this.getImplementation(e.arguments,!1)),references:e=>this.requiredResponse(this.getReferences(e.arguments,!0)),"references-full":e=>this.requiredResponse(this.getReferences(e.arguments,!1)),rename:e=>this.requiredResponse(this.getRenameLocations(e.arguments,!0)),"renameLocations-full":e=>this.requiredResponse(this.getRenameLocations(e.arguments,!1)),"rename-full":e=>this.requiredResponse(this.getRenameInfo(e.arguments)),open:e=>(this.openClientFile(Qpe(e.arguments.file),e.arguments.fileContent,mme(e.arguments.scriptKindName),e.arguments.projectRootPath?Qpe(e.arguments.projectRootPath):void 0),this.notRequired()),quickinfo:e=>this.requiredResponse(this.getQuickInfoWorker(e.arguments,!0)),"quickinfo-full":e=>this.requiredResponse(this.getQuickInfoWorker(e.arguments,!1)),getOutliningSpans:e=>this.requiredResponse(this.getOutliningSpans(e.arguments,!0)),outliningSpans:e=>this.requiredResponse(this.getOutliningSpans(e.arguments,!1)),todoComments:e=>this.requiredResponse(this.getTodoComments(e.arguments)),indentation:e=>this.requiredResponse(this.getIndentation(e.arguments)),nameOrDottedNameSpan:e=>this.requiredResponse(this.getNameOrDottedNameSpan(e.arguments)),breakpointStatement:e=>this.requiredResponse(this.getBreakpointStatement(e.arguments)),braceCompletion:e=>this.requiredResponse(this.isValidBraceCompletion(e.arguments)),docCommentTemplate:e=>this.requiredResponse(this.getDocCommentTemplate(e.arguments)),getSpanOfEnclosingComment:e=>this.requiredResponse(this.getSpanOfEnclosingComment(e.arguments)),fileReferences:e=>this.requiredResponse(this.getFileReferences(e.arguments,!0)),"fileReferences-full":e=>this.requiredResponse(this.getFileReferences(e.arguments,!1)),format:e=>this.requiredResponse(this.getFormattingEditsForRange(e.arguments)),formatonkey:e=>this.requiredResponse(this.getFormattingEditsAfterKeystroke(e.arguments)),"format-full":e=>this.requiredResponse(this.getFormattingEditsForDocumentFull(e.arguments)),"formatonkey-full":e=>this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(e.arguments)),"formatRange-full":e=>this.requiredResponse(this.getFormattingEditsForRangeFull(e.arguments)),completionInfo:e=>this.requiredResponse(this.getCompletions(e.arguments,"completionInfo")),completions:e=>this.requiredResponse(this.getCompletions(e.arguments,"completions")),"completions-full":e=>this.requiredResponse(this.getCompletions(e.arguments,"completions-full")),completionEntryDetails:e=>this.requiredResponse(this.getCompletionEntryDetails(e.arguments,!1)),"completionEntryDetails-full":e=>this.requiredResponse(this.getCompletionEntryDetails(e.arguments,!0)),compileOnSaveAffectedFileList:e=>this.requiredResponse(this.getCompileOnSaveAffectedFileList(e.arguments)),compileOnSaveEmitFile:e=>this.requiredResponse(this.emitFile(e.arguments)),signatureHelp:e=>this.requiredResponse(this.getSignatureHelpItems(e.arguments,!0)),"signatureHelp-full":e=>this.requiredResponse(this.getSignatureHelpItems(e.arguments,!1)),"compilerOptionsDiagnostics-full":e=>this.requiredResponse(this.getCompilerOptionsDiagnostics(e.arguments)),"encodedSyntacticClassifications-full":e=>this.requiredResponse(this.getEncodedSyntacticClassifications(e.arguments)),"encodedSemanticClassifications-full":e=>this.requiredResponse(this.getEncodedSemanticClassifications(e.arguments)),cleanup:()=>(this.cleanup(),this.requiredResponse(!0)),semanticDiagnosticsSync:e=>this.requiredResponse(this.getSemanticDiagnosticsSync(e.arguments)),syntacticDiagnosticsSync:e=>this.requiredResponse(this.getSyntacticDiagnosticsSync(e.arguments)),suggestionDiagnosticsSync:e=>this.requiredResponse(this.getSuggestionDiagnosticsSync(e.arguments)),geterr:e=>(this.errorCheck.startNew((t=>this.getDiagnostics(t,e.arguments.delay,e.arguments.files))),this.notRequired()),geterrForProject:e=>(this.errorCheck.startNew((t=>this.getDiagnosticsForProject(t,e.arguments.delay,e.arguments.file))),this.notRequired()),change:e=>(this.change(e.arguments),this.notRequired()),configure:e=>(this.projectService.setHostConfiguration(e.arguments),this.doOutput(void 0,"configure",e.seq,!0),this.notRequired()),reload:e=>(this.reload(e.arguments,e.seq),this.requiredResponse({reloadFinished:!0})),saveto:e=>{const t=e.arguments;return this.saveToTmp(t.file,t.tmpfile),this.notRequired()},close:e=>{const t=e.arguments;return this.closeClientFile(t.file),this.notRequired()},navto:e=>this.requiredResponse(this.getNavigateToItems(e.arguments,!0)),"navto-full":e=>this.requiredResponse(this.getNavigateToItems(e.arguments,!1)),brace:e=>this.requiredResponse(this.getBraceMatching(e.arguments,!0)),"brace-full":e=>this.requiredResponse(this.getBraceMatching(e.arguments,!1)),navbar:e=>this.requiredResponse(this.getNavigationBarItems(e.arguments,!0)),"navbar-full":e=>this.requiredResponse(this.getNavigationBarItems(e.arguments,!1)),navtree:e=>this.requiredResponse(this.getNavigationTree(e.arguments,!0)),"navtree-full":e=>this.requiredResponse(this.getNavigationTree(e.arguments,!1)),documentHighlights:e=>this.requiredResponse(this.getDocumentHighlights(e.arguments,!0)),"documentHighlights-full":e=>this.requiredResponse(this.getDocumentHighlights(e.arguments,!1)),compilerOptionsForInferredProjects:e=>(this.setCompilerOptionsForInferredProjects(e.arguments),this.requiredResponse(!0)),projectInfo:e=>this.requiredResponse(this.getProjectInfo(e.arguments)),reloadProjects:()=>(this.projectService.reloadProjects(),this.notRequired()),jsxClosingTag:e=>this.requiredResponse(this.getJsxClosingTag(e.arguments)),linkedEditingRange:e=>this.requiredResponse(this.getLinkedEditingRange(e.arguments)),getCodeFixes:e=>this.requiredResponse(this.getCodeFixes(e.arguments,!0)),"getCodeFixes-full":e=>this.requiredResponse(this.getCodeFixes(e.arguments,!1)),getCombinedCodeFix:e=>this.requiredResponse(this.getCombinedCodeFix(e.arguments,!0)),"getCombinedCodeFix-full":e=>this.requiredResponse(this.getCombinedCodeFix(e.arguments,!1)),applyCodeActionCommand:e=>this.requiredResponse(this.applyCodeActionCommand(e.arguments)),getSupportedCodeFixes:e=>this.requiredResponse(this.getSupportedCodeFixes(e.arguments)),getApplicableRefactors:e=>this.requiredResponse(this.getApplicableRefactors(e.arguments)),getEditsForRefactor:e=>this.requiredResponse(this.getEditsForRefactor(e.arguments,!0)),getMoveToRefactoringFileSuggestions:e=>this.requiredResponse(this.getMoveToRefactoringFileSuggestions(e.arguments)),getPasteEdits:e=>this.requiredResponse(this.getPasteEdits(e.arguments)),"getEditsForRefactor-full":e=>this.requiredResponse(this.getEditsForRefactor(e.arguments,!1)),organizeImports:e=>this.requiredResponse(this.organizeImports(e.arguments,!0)),"organizeImports-full":e=>this.requiredResponse(this.organizeImports(e.arguments,!1)),getEditsForFileRename:e=>this.requiredResponse(this.getEditsForFileRename(e.arguments,!0)),"getEditsForFileRename-full":e=>this.requiredResponse(this.getEditsForFileRename(e.arguments,!1)),configurePlugin:e=>(this.configurePlugin(e.arguments),this.doOutput(void 0,"configurePlugin",e.seq,!0),this.notRequired()),selectionRange:e=>this.requiredResponse(this.getSmartSelectionRange(e.arguments,!0)),"selectionRange-full":e=>this.requiredResponse(this.getSmartSelectionRange(e.arguments,!1)),prepareCallHierarchy:e=>this.requiredResponse(this.prepareCallHierarchy(e.arguments)),provideCallHierarchyIncomingCalls:e=>this.requiredResponse(this.provideCallHierarchyIncomingCalls(e.arguments)),provideCallHierarchyOutgoingCalls:e=>this.requiredResponse(this.provideCallHierarchyOutgoingCalls(e.arguments)),toggleLineComment:e=>this.requiredResponse(this.toggleLineComment(e.arguments,!0)),"toggleLineComment-full":e=>this.requiredResponse(this.toggleLineComment(e.arguments,!1)),toggleMultilineComment:e=>this.requiredResponse(this.toggleMultilineComment(e.arguments,!0)),"toggleMultilineComment-full":e=>this.requiredResponse(this.toggleMultilineComment(e.arguments,!1)),commentSelection:e=>this.requiredResponse(this.commentSelection(e.arguments,!0)),"commentSelection-full":e=>this.requiredResponse(this.commentSelection(e.arguments,!1)),uncommentSelection:e=>this.requiredResponse(this.uncommentSelection(e.arguments,!0)),"uncommentSelection-full":e=>this.requiredResponse(this.uncommentSelection(e.arguments,!1)),provideInlayHints:e=>this.requiredResponse(this.provideInlayHints(e.arguments)),mapCode:e=>this.requiredResponse(this.mapCode(e.arguments))})),this.host=e.host,this.cancellationToken=e.cancellationToken,this.typingsInstaller=e.typingsInstaller||Tfe,this.byteLength=e.byteLength,this.hrtime=e.hrtime,this.logger=e.logger,this.canUseEvents=e.canUseEvents,this.suppressDiagnosticEvents=e.suppressDiagnosticEvents,this.noGetErrOnBackgroundUpdate=e.noGetErrOnBackgroundUpdate;const{throttleWaitMilliseconds:t}=e;this.eventHandler=this.canUseEvents?e.eventHandler||(e=>this.defaultEventHandler(e)):void 0;const n={executeWithRequestId:(e,t)=>this.executeWithRequestId(e,t),getCurrentRequestId:()=>this.currentRequestId,getServerHost:()=>this.host,logError:(e,t)=>this.logError(e,t),sendRequestCompletedEvent:e=>this.sendRequestCompletedEvent(e),isCancellationRequested:()=>this.cancellationToken.isCancellationRequested()};this.errorCheck=new class{constructor(e){this.operationHost=e}startNew(e){this.complete(),this.requestId=this.operationHost.getCurrentRequestId(),this.executeAction(e)}complete(){void 0!==this.requestId&&(this.operationHost.sendRequestCompletedEvent(this.requestId),this.requestId=void 0),this.setTimerHandle(void 0),this.setImmediateId(void 0)}immediate(e,t){const n=this.requestId;xn.assert(n===this.operationHost.getCurrentRequestId(),"immediate: incorrect request id"),this.setImmediateId(this.operationHost.getServerHost().setImmediate((()=>{this.immediateId=void 0,this.operationHost.executeWithRequestId(n,(()=>this.executeAction(t)))}),e))}delay(e,t,n){const r=this.requestId;xn.assert(r===this.operationHost.getCurrentRequestId(),"delay: incorrect request id"),this.setTimerHandle(this.operationHost.getServerHost().setTimeout((()=>{this.timerHandle=void 0,this.operationHost.executeWithRequestId(r,(()=>this.executeAction(n)))}),t,e))}executeAction(e){var t,n,r,i,o,a;let s=!1;try{this.operationHost.isCancellationRequested()?(s=!0,null==(t=or)||t.instant(or.Phase.Session,"stepCanceled",{seq:this.requestId,early:!0})):(null==(n=or)||n.push(or.Phase.Session,"stepAction",{seq:this.requestId}),e(this),null==(r=or)||r.pop())}catch(e){null==(i=or)||i.popAll(),s=!0,e instanceof Lr?null==(o=or)||o.instant(or.Phase.Session,"stepCanceled",{seq:this.requestId}):(null==(a=or)||a.instant(or.Phase.Session,"stepError",{seq:this.requestId,message:e.message}),this.operationHost.logError(e,`delayed processing of request ${this.requestId}`))}!s&&this.hasPendingWork()||this.complete()}setTimerHandle(e){void 0!==this.timerHandle&&this.operationHost.getServerHost().clearTimeout(this.timerHandle),this.timerHandle=e}setImmediateId(e){void 0!==this.immediateId&&this.operationHost.getServerHost().clearImmediate(this.immediateId),this.immediateId=e}hasPendingWork(){return!!this.timerHandle||!!this.immediateId}}(n);const r={host:this.host,logger:this.logger,cancellationToken:this.cancellationToken,useSingleInferredProject:e.useSingleInferredProject,useInferredProjectPerProjectRoot:e.useInferredProjectPerProjectRoot,typingsInstaller:this.typingsInstaller,throttleWaitMilliseconds:t,eventHandler:this.eventHandler,suppressDiagnosticEvents:this.suppressDiagnosticEvents,globalPlugins:e.globalPlugins,pluginProbeLocations:e.pluginProbeLocations,allowLocalPluginLoads:e.allowLocalPluginLoads,typesMapLocation:e.typesMapLocation,serverMode:e.serverMode,session:this,canUseWatchEvents:e.canUseWatchEvents,incrementalVerifier:e.incrementalVerifier};switch(this.projectService=new Jme(r),this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)),this.gcTimer=new sfe(this.host,7e3,this.logger),this.projectService.serverMode){case 0:break;case 1:uge.forEach((e=>this.handlers.set(e,(e=>{throw new Error(`Request: ${e.command} not allowed in LanguageServiceMode.PartialSemantic`)}))));break;case 2:_ge.forEach((e=>this.handlers.set(e,(e=>{throw new Error(`Request: ${e.command} not allowed in LanguageServiceMode.Syntactic`)}))));break;default:xn.assertNever(this.projectService.serverMode)}}sendRequestCompletedEvent(e){this.event({request_seq:e},"requestCompleted")}addPerformanceData(e,t){this.performanceData||(this.performanceData={}),this.performanceData[e]=(this.performanceData[e]??0)+t}performanceEventHandler(e){switch(e.kind){case"UpdateGraph":this.addPerformanceData("updateGraphDurationMs",e.durationMs);break;case"CreatePackageJsonAutoImportProvider":this.addPerformanceData("createAutoImportProviderProgramDurationMs",e.durationMs)}}defaultEventHandler(e){switch(e.eventName){case Wfe:this.projectsUpdatedInBackgroundEvent(e.data.openFiles);break;case Hfe:this.event({projectName:e.data.project.getProjectName(),reason:e.data.reason},e.eventName);break;case Gfe:this.event({projectName:e.data.project.getProjectName()},e.eventName);break;case Xfe:case tme:case nme:case rme:this.event(e.data,e.eventName);break;case Qfe:this.event({triggerFile:e.data.triggerFile,configFile:e.data.configFileName,diagnostics:O(e.data.diagnostics,(e=>Xme(e,!0)))},e.eventName);break;case Yfe:this.event({projectName:e.data.project.getProjectName(),languageServiceEnabled:e.data.languageServiceEnabled},e.eventName);break;case Zfe:{const t="telemetry";this.event({telemetryEventName:e.eventName,payload:e.data},t);break}}}projectsUpdatedInBackgroundEvent(e){this.projectService.logger.info(`got projects updated in background ${e}`),e.length&&(this.suppressDiagnosticEvents||this.noGetErrOnBackgroundUpdate||(this.projectService.logger.info(`Queueing diagnostics update for ${e}`),this.errorCheck.startNew((t=>this.updateErrorCheck(t,e,100,!0)))),this.event({openFiles:e},Wfe))}logError(e,t){this.logErrorWorker(e,t)}logErrorWorker(e,t,n){let r="Exception on executing command "+t;if(e.message&&(r+=":\n"+PH(e.message),e.stack&&(r+="\n"+PH(e.stack))),this.logger.hasLevel(3)){if(n)try{const{file:e,project:t}=this.getFileAndProject(n),i=t.getScriptInfoForNormalizedPath(e);if(i){const e=yQ(i.getSnapshot());r+=`\n\nFile text of ${n.file}:${PH(e)}\n`}}catch{}if(e.ProgramFiles){r+=`\n\nProgram files: ${JSON.stringify(e.ProgramFiles)}\n`,r+="\n\nProjects::\n";let t=0;const n=e=>{r+=`\nProject '${e.projectName}' (${Dfe[e.projectKind]}) ${t}\n`,r+=e.filesToString(!0),r+="\n-----------------------------------------------\n",t++};this.projectService.externalProjects.forEach(n),this.projectService.configuredProjects.forEach(n),this.projectService.inferredProjects.forEach(n)}}this.logger.msg(r,"Err")}send(e){"event"!==e.type||this.canUseEvents?this.writeMessage(e):this.logger.hasLevel(3)&&this.logger.info(`Session does not support events: ignored event: ${NH(e)}`)}writeMessage(e){var t;const n=Yme(e,this.logger,this.byteLength,this.host.newLine);null==(t=tr)||t.logEvent(`Response message size: ${n.length}`),this.host.write(n)}event(e,t){this.send(Zme(t,e))}doOutput(e,t,n,r,i){const o={seq:0,type:"response",command:t,request_seq:n,success:r,performanceData:this.performanceData};if(r){let t;if(ot(e))o.body=e,t=e.metadata,delete e.metadata;else if("object"==typeof e)if(e.metadata){const{metadata:n,...r}=e;o.body=r,t=n}else o.body=e;else o.body=e;t&&(o.metadata=t)}else xn.assert(void 0===e);i&&(o.message=i),this.send(o)}semanticCheck(e,t){var n,r;null==(n=or)||n.push(or.Phase.Session,"semanticCheck",{file:e,configFilePath:t.canonicalConfigFilePath});const i=Kme(t,e)?Hpe:t.getLanguageService().getSemanticDiagnostics(e).filter((e=>!!e.file));this.sendDiagnosticsEvent(e,t,i,"semanticDiag"),null==(r=or)||r.pop()}syntacticCheck(e,t){var n,r;null==(n=or)||n.push(or.Phase.Session,"syntacticCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.sendDiagnosticsEvent(e,t,t.getLanguageService().getSyntacticDiagnostics(e),"syntaxDiag"),null==(r=or)||r.pop()}suggestionCheck(e,t){var n,r;null==(n=or)||n.push(or.Phase.Session,"suggestionCheck",{file:e,configFilePath:t.canonicalConfigFilePath}),this.sendDiagnosticsEvent(e,t,t.getLanguageService().getSuggestionDiagnostics(e),"suggestionDiag"),null==(r=or)||r.pop()}sendDiagnosticsEvent(e,t,n,r){try{this.event({file:e,diagnostics:n.map((n=>Wme(e,t,n)))},r)}catch(e){this.logError(e,r)}}updateErrorCheck(e,t,n,r=!0){xn.assert(!this.suppressDiagnosticEvents);const i=this.changeSeq,o=Math.min(n,200);let a=0;const s=()=>{a++,t.length>a&&e.delay("checkOne",o,c)},c=()=>{if(this.changeSeq!==i)return;let n=t[a];if(st(n)&&(n=this.toPendingErrorCheck(n),!n))return void s();const{fileName:o,project:c}=n;Fme(c),c.containsFile(o,r)&&(this.syntacticCheck(o,c),this.changeSeq===i&&(0===c.projectService.serverMode?e.immediate("semanticCheck",(()=>{this.semanticCheck(o,c),this.changeSeq===i&&(this.getPreferences(o).disableSuggestions?s():e.immediate("suggestionCheck",(()=>{this.suggestionCheck(o,c),s()})))})):s()))};t.length>a&&this.changeSeq===i&&e.delay("checkOne",n,c)}cleanProjects(e,t){if(t){this.logger.info(`cleaning ${e}`);for(const e of t)e.getLanguageService(!1).cleanupSemanticCache(),e.cleanupProgram()}}cleanup(){this.cleanProjects("inferred projects",this.projectService.inferredProjects),this.cleanProjects("configured projects",$e(this.projectService.configuredProjects.values())),this.cleanProjects("external projects",this.projectService.externalProjects),this.host.gc&&(this.logger.info("host.gc()"),this.host.gc())}getEncodedSyntacticClassifications(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e);return n.getEncodedSyntacticClassifications(t,e)}getEncodedSemanticClassifications(e){const{file:t,project:n}=this.getFileAndProject(e),r="2020"===e.format?"2020":"original";return n.getLanguageService().getEncodedSemanticClassifications(t,e,r)}getProject(e){return void 0===e?void 0:this.projectService.findProject(e)}getConfigFileAndProject(e){const t=this.getProject(e.projectFileName),n=Qpe(e.file);return{configFile:t&&t.hasConfigFile(n)?n:void 0,project:t}}getConfigFileDiagnostics(e,t,n){const r=F(Z(t.getAllProjectErrors(),t.getLanguageService().getCompilerOptionsDiagnostics()),(t=>!!t.file&&t.file.fileName===e));return n?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(r):O(r,(e=>Xme(e,!1)))}convertToDiagnosticsWithLinePositionFromDiagnosticFile(e){return e.map((e=>({message:Jq(e.messageText,this.host.newLine),start:e.start,length:e.length,category:vi(e),code:e.code,source:e.source,startLocation:e.file&&Gme(Xa(e.file,e.start)),endLocation:e.file&&Gme(Xa(e.file,e.start+e.length)),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,relatedInformation:O(e.relatedInformation,Hme)})))}getCompilerOptionsDiagnostics(e){const t=this.getProject(e.projectFileName);return this.convertToDiagnosticsWithLinePosition(F(t.getLanguageService().getCompilerOptionsDiagnostics(),(e=>!e.file)),void 0)}convertToDiagnosticsWithLinePosition(e,t){return e.map((e=>({message:Jq(e.messageText,this.host.newLine),start:e.start,length:e.length,category:vi(e),code:e.code,source:e.source,startLocation:t&&t.positionToLineOffset(e.start),endLocation:t&&t.positionToLineOffset(e.start+e.length),reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,relatedInformation:O(e.relatedInformation,Hme)})))}getDiagnosticsWorker(e,t,n,r){const{project:i,file:o}=this.getFileAndProject(e);if(t&&Kme(i,o))return Hpe;const a=i.getScriptInfoForNormalizedPath(o),s=n(i,o);return r?this.convertToDiagnosticsWithLinePosition(s,a):s.map((e=>Wme(o,i,e)))}getDefinition(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=this.mapDefinitionInfoLocations(i.getLanguageService().getDefinitionAtPosition(r,o)||Hpe,i);return n?this.mapDefinitionInfo(a,i):a.map(e.mapToOriginalLocation)}mapDefinitionInfoLocations(e,t){return e.map((e=>{const n=cge(e,t);return n?{...n,containerKind:e.containerKind,containerName:e.containerName,kind:e.kind,name:e.name,failedAliasResolution:e.failedAliasResolution,...e.unverified&&{unverified:e.unverified}}:e}))}getDefinitionAndBoundSpan(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=xn.checkDefined(i.getScriptInfo(r)),s=i.getLanguageService().getDefinitionAndBoundSpan(r,o);if(!s||!s.definitions)return{definitions:Hpe,textSpan:void 0};const c=this.mapDefinitionInfoLocations(s.definitions,i),{textSpan:l}=s;return n?{definitions:this.mapDefinitionInfo(c,i),textSpan:pge(l,a)}:{definitions:c.map(e.mapToOriginalLocation),textSpan:l}}findSourceDefinition(e){var t;const{file:n,project:r}=this.getFileAndProject(e),i=this.getPositionInFile(e,n),o=r.getLanguageService().getDefinitionAtPosition(n,i);let a=this.mapDefinitionInfoLocations(o||Hpe,r).slice();if(0===this.projectService.serverMode&&(!Q(a,(e=>Qpe(e.fileName)!==n&&!e.isAmbient))||Q(a,(e=>!!e.failedAliasResolution)))){const e=it((e=>e.textSpan.start),KQ(this.host.useCaseSensitiveFileNames));null==a||a.forEach((t=>e.add(t)));const o=r.getNoDtsResolutionProject(n),u=o.getLanguageService(),_=null==(t=u.getDefinitionAtPosition(n,i,!0,!1))?void 0:t.filter((e=>Qpe(e.fileName)!==n));if(Q(_))for(const t of _){if(t.unverified){const n=c(t,r.getLanguageService().getProgram(),u.getProgram());if(Q(n)){for(const t of n)e.add(t);continue}}e.add(t)}else{const t=a.filter((e=>Qpe(e.fileName)!==n&&e.isAmbient));for(const a of Q(t)?t:function(){const e=r.getLanguageService(),t=xX(e.getProgram().getSourceFile(n),i);return($_(t)||qD(t))&&Ox(t.parent)&&Rx(t,(r=>{var i;if(r===t)return;const o=null==(i=e.getDefinitionAtPosition(n,r.getStart(),!0,!1))?void 0:i.filter((e=>Qpe(e.fileName)!==n&&e.isAmbient)).map((e=>({fileName:e.fileName,name:Hh(t)})));return Q(o)?o:void 0}))||Hpe}()){const t=s(a.fileName,n,o);if(!t)continue;const r=this.projectService.getOrCreateScriptInfoNotOpenedByClient(t,o.currentDirectory,o.directoryStructureHost,!1);if(!r)continue;o.containsScriptInfo(r)||(o.addRoot(r),o.updateGraph());const i=u.getProgram(),c=xn.checkDefined(i.getSourceFile(t));for(const t of l(a.name,c,i))e.add(t)}}a=$e(e.values())}return a=a.filter((e=>!e.isAmbient&&!e.failedAliasResolution)),this.mapDefinitionInfo(a,r);function s(e,t,n){var i,o,a;const s=XT(e);if(s&&e.lastIndexOf(Ij)===s.topLevelNodeModulesIndex){const c=e.substring(0,s.packageRootIndex),l=null==(i=r.getModuleResolutionCache())?void 0:i.getPackageJsonInfoCache(),u=r.getCompilationSettings(),_=Hj(Go(c+"/package.json",r.getCurrentDirectory()),Wj(l,r,u));if(!_)return;const d=Uj(_,{moduleResolution:2},r,r.getModuleResolutionCache()),p=gR(hR(e.substring(s.topLevelPackageNameIndex+1,s.packageRootIndex))),f=r.toPath(e);if(d&&Q(d,(e=>r.toPath(e)===f)))return null==(o=n.resolutionCache.resolveSingleModuleNameWithoutWatching(p,t).resolvedModule)?void 0:o.resolvedFileName;{const r=`${p}/${Yk(e.substring(s.packageRootIndex+1))}`;return null==(a=n.resolutionCache.resolveSingleModuleNameWithoutWatching(r,t).resolvedModule)?void 0:a.resolvedFileName}}}function c(e,t,r){var o;const a=r.getSourceFile(e.fileName);if(!a)return;const s=xX(t.getSourceFile(n),i),c=t.getTypeChecker().getSymbolAtLocation(s),u=c&&Y_(c,276);return u?l((null==(o=u.propertyName)?void 0:o.text)||u.name.text,a,r):void 0}function l(e,t,n){return q(Rse.Core.getTopMostDeclarationNamesInFile(e,t),(e=>{const t=n.getTypeChecker().getSymbolAtLocation(e),r=ph(e);if(t&&r)return Cce.createDefinitionInfo(r,n.getTypeChecker(),t,r,!0)}))}}getEmitOutput(e){const{file:t,project:n}=this.getFileAndProject(e);if(!n.shouldEmitFile(n.getScriptInfo(t)))return{emitSkipped:!0,outputFiles:[],diagnostics:[]};const r=n.getLanguageService().getEmitOutput(t);return e.richResponse?{...r,diagnostics:e.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(r.diagnostics):r.diagnostics.map((e=>Xme(e,!0)))}:r}mapJSDocTagInfo(e,t,n){return e?e.map((e=>{var r;return{...e,text:n?this.mapDisplayParts(e.text,t):null==(r=e.text)?void 0:r.map((e=>e.text)).join("")}})):[]}mapDisplayParts(e,t){return e?e.map((e=>"linkName"!==e.kind?e:{...e,target:this.toFileSpan(e.target.fileName,e.target.textSpan,t)})):[]}mapSignatureHelpItems(e,t,n){return e.map((e=>({...e,documentation:this.mapDisplayParts(e.documentation,t),parameters:e.parameters.map((e=>({...e,documentation:this.mapDisplayParts(e.documentation,t)}))),tags:this.mapJSDocTagInfo(e.tags,t,n)})))}mapDefinitionInfo(e,t){return e.map((e=>({...this.toFileSpanWithContext(e.fileName,e.textSpan,e.contextSpan,t),...e.unverified&&{unverified:e.unverified}})))}static mapToOriginalLocation(e){return e.originalFileName?(xn.assert(void 0!==e.originalTextSpan,"originalTextSpan should be present if originalFileName is"),{...e,fileName:e.originalFileName,textSpan:e.originalTextSpan,targetFileName:e.fileName,targetTextSpan:e.textSpan,contextSpan:e.originalContextSpan,targetContextSpan:e.contextSpan}):e}toFileSpan(e,t,n){const r=n.getLanguageService(),i=r.toLineColumnOffset(e,t.start),o=r.toLineColumnOffset(e,js(t));return{file:e,start:{line:i.line+1,offset:i.character+1},end:{line:o.line+1,offset:o.character+1}}}toFileSpanWithContext(e,t,n,r){const i=this.toFileSpan(e,t,r),o=n&&this.toFileSpan(e,n,r);return o?{...i,contextStart:o.start,contextEnd:o.end}:i}getTypeDefinition(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getPositionInFile(e,t),i=this.mapDefinitionInfoLocations(n.getLanguageService().getTypeDefinitionAtPosition(t,r)||Hpe,n);return this.mapDefinitionInfo(i,n)}mapImplementationLocations(e,t){return e.map((e=>{const n=cge(e,t);return n?{...n,kind:e.kind,displayParts:e.displayParts}:e}))}getImplementation(t,n){const{file:r,project:i}=this.getFileAndProject(t),o=this.getPositionInFile(t,r),a=this.mapImplementationLocations(i.getLanguageService().getImplementationAtPosition(r,o)||Hpe,i);return n?a.map((({fileName:e,textSpan:t,contextSpan:n})=>this.toFileSpanWithContext(e,t,n,i))):a.map(e.mapToOriginalLocation)}getSyntacticDiagnosticsSync(e){const{configFile:t}=this.getConfigFileAndProject(e);return t?Hpe:this.getDiagnosticsWorker(e,!1,((e,t)=>e.getLanguageService().getSyntacticDiagnostics(t)),!!e.includeLinePosition)}getSemanticDiagnosticsSync(e){const{configFile:t,project:n}=this.getConfigFileAndProject(e);return t?this.getConfigFileDiagnostics(t,n,!!e.includeLinePosition):this.getDiagnosticsWorker(e,!0,((e,t)=>e.getLanguageService().getSemanticDiagnostics(t).filter((e=>!!e.file))),!!e.includeLinePosition)}getSuggestionDiagnosticsSync(e){const{configFile:t}=this.getConfigFileAndProject(e);return t?Hpe:this.getDiagnosticsWorker(e,!0,((e,t)=>e.getLanguageService().getSuggestionDiagnostics(t)),!!e.includeLinePosition)}getJsxClosingTag(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=n.getJsxClosingTagAtPosition(t,r);return void 0===i?void 0:{newText:i.newText,caretOffset:0}}getLinkedEditingRange(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=n.getLinkedEditingRangeAtPosition(t,r),o=this.projectService.getScriptInfoForNormalizedPath(t);if(void 0!==o&&void 0!==i)return function(e,t){const n=e.ranges.map((e=>({start:t.positionToLineOffset(e.start),end:t.positionToLineOffset(e.start+e.length)})));return e.wordPattern?{ranges:n,wordPattern:e.wordPattern}:{ranges:n}}(i,o)}getDocumentHighlights(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.getPositionInFile(e,n),o=r.getLanguageService().getDocumentHighlights(n,i,e.filesToSearch);return o?t?o.map((({fileName:e,highlightSpans:t})=>{const n=r.getScriptInfo(e);return{file:e,highlightSpans:t.map((({textSpan:e,kind:t,contextSpan:r})=>({...fge(e,r,n),kind:t})))}})):o:Hpe}provideInlayHints(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.projectService.getScriptInfoForNormalizedPath(t);return n.getLanguageService().provideInlayHints(t,e,this.getPreferences(t)).map((e=>{const{position:t,displayParts:n}=e;return{...e,position:r.positionToLineOffset(t),displayParts:null==n?void 0:n.map((({text:e,span:t,file:n})=>{if(t){xn.assertIsDefined(n,"Target file should be defined together with its span.");const r=this.projectService.getScriptInfo(n);return{text:e,span:{start:r.positionToLineOffset(t.start),end:r.positionToLineOffset(t.start+t.length),file:n}}}return{text:e}}))}}))}mapCode(e){var t;const n=this.getHostFormatOptions(),r=this.getHostPreferences(),{file:i,languageService:o}=this.getFileAndLanguageServiceForSyntacticOperation(e),a=this.projectService.getScriptInfoForNormalizedPath(i),s=null==(t=e.mapping.focusLocations)?void 0:t.map((e=>e.map((e=>{const t=a.lineOffsetToPosition(e.start.line,e.start.offset);return{start:t,length:a.lineOffsetToPosition(e.end.line,e.end.offset)-t}})))),c=o.mapCode(i,e.mapping.contents,s,n,r);return this.mapTextChangesToCodeEdits(c)}setCompilerOptionsForInferredProjects(e){this.projectService.setCompilerOptionsForInferredProjects(e.options,e.projectRootPath)}getProjectInfo(e){return this.getProjectInfoWorker(e.file,e.projectFileName,e.needFileNameList,!1)}getProjectInfoWorker(e,t,n,r){const{project:i}=this.getFileAndProjectWorker(e,t);return Fme(i),{configFileName:i.getProjectName(),languageServiceDisabled:!i.languageServiceEnabled,fileNames:n?i.getFileNames(!1,r):void 0}}getRenameInfo(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getPositionInFile(e,t),i=this.getPreferences(t);return n.getLanguageService().getRenameInfo(t,r,i)}getProjects(e,t,n){let r,i;if(e.projectFileName){const t=this.getProject(e.projectFileName);t&&(r=[t])}else{const o=t?this.projectService.getScriptInfoEnsuringProjectsUptoDate(e.file):this.projectService.getScriptInfo(e.file);if(!o)return n?Hpe:(this.projectService.logErrorForScriptInfoNotFound(e.file),Upe.ThrowNoProject());t||this.projectService.ensureDefaultProjectForFile(o),r=o.containingProjects,i=this.projectService.getSymlinkedProjects(o)}return r=F(r,(e=>e.languageServiceEnabled&&!e.isOrphan())),n||r&&r.length||i?i?{projects:r,symLinkedProjects:i}:r:(this.projectService.logErrorForScriptInfoNotFound(e.file??e.projectFileName),Upe.ThrowNoProject())}getDefaultProject(e){if(e.projectFileName){const t=this.getProject(e.projectFileName);if(t)return t;if(!e.file)return Upe.ThrowNoProject()}return this.projectService.getScriptInfo(e.file).getDefaultProject()}getRenameLocations(e,t){const n=Qpe(e.file),r=this.getPositionInFile(e,n),i=this.getProjects(e),o=this.getDefaultProject(e),a=this.getPreferences(n),s=this.mapRenameInfo(o.getLanguageService().getRenameInfo(n,r,a),xn.checkDefined(this.projectService.getScriptInfo(n)));if(!s.canRename)return t?{info:s,locs:[]}:[];const c=function(e,t,n,r,i,o,a){const s=nge(e,t,n,!0,((e,t)=>e.getLanguageService().findRenameLocations(t.fileName,t.pos,r,i,o)),((e,t)=>t(age(e))));if(ot(s))return s;const c=[],l=ege(a);return s.forEach(((e,t)=>{for(const n of e)l.has(n)||sge(age(n),t)||(c.push(n),l.add(n))})),c}(i,o,{fileName:e.file,pos:r},!!e.findInStrings,!!e.findInComments,a,this.host.useCaseSensitiveFileNames);return t?{info:s,locs:this.toSpanGroups(c)}:c}mapRenameInfo(e,t){if(e.canRename){const{canRename:n,fileToRename:r,displayName:i,fullDisplayName:o,kind:a,kindModifiers:s,triggerSpan:c}=e;return{canRename:n,fileToRename:r,displayName:i,fullDisplayName:o,kind:a,kindModifiers:s,triggerSpan:pge(c,t)}}return e}toSpanGroups(e){const t=new Map;for(const{fileName:n,textSpan:r,contextSpan:i,originalContextSpan:o,originalTextSpan:a,originalFileName:s,...c}of e){let e=t.get(n);e||t.set(n,e={file:n,locs:[]});const o=xn.checkDefined(this.projectService.getScriptInfo(n));e.locs.push({...fge(r,i,o),...c})}return $e(t.values())}getReferences(e,t){const n=Qpe(e.file),r=this.getProjects(e),i=this.getPositionInFile(e,n),o=function(e,t,n,r,i){var o,a;const s=nge(e,t,n,!1,((e,t)=>(i.info(`Finding references to ${t.fileName} position ${t.pos} in project ${e.getProjectName()}`),e.getLanguageService().findReferences(t.fileName,t.pos))),((e,t)=>{t(age(e.definition));for(const n of e.references)t(age(n))}));if(ot(s))return s;const c=s.get(t);if(void 0===(null==(a=null==(o=null==c?void 0:c[0])?void 0:o.references[0])?void 0:a.isDefinition))s.forEach((e=>{for(const t of e)for(const e of t.references)delete e.isDefinition}));else{const e=ege(r);for(const t of c)for(const n of t.references)if(n.isDefinition){e.add(n);break}const t=new Set;for(;;){let n=!1;if(s.forEach(((r,i)=>{t.has(i)||i.getLanguageService().updateIsDefinitionOfReferencedSymbols(r,e)&&(t.add(i),n=!0)})),!n)break}s.forEach(((e,n)=>{if(!t.has(n))for(const t of e)for(const e of t.references)e.isDefinition=!1}))}const l=[],u=ege(r);return s.forEach(((e,t)=>{for(const n of e){const e=sge(age(n.definition),t),i=void 0===e?n.definition:{...n.definition,textSpan:Gs(e.pos,n.definition.textSpan.length),fileName:e.fileName,contextSpan:lge(n.definition,t)};let o=S(l,(e=>UQ(e.definition,i,r)));o||(o={definition:i,references:[]},l.push(o));for(const e of n.references)u.has(e)||sge(age(e),t)||(u.add(e),o.references.push(e))}})),l.filter((e=>0!==e.references.length))}(r,this.getDefaultProject(e),{fileName:e.file,pos:i},this.host.useCaseSensitiveFileNames,this.logger);if(!t)return o;const a=this.getPreferences(n),s=this.getDefaultProject(e),c=s.getScriptInfoForNormalizedPath(n),l=s.getLanguageService().getQuickInfoAtPosition(n,i),u=l?S7(l.displayParts):"",_=l&&l.textSpan,d=_?c.positionToLineOffset(_.start).offset:0,p=_?c.getSnapshot().getText(_.start,js(_)):"";return{refs:R(o,(e=>e.references.map((e=>hge(this.projectService,e,a))))),symbolName:p,symbolStartOffset:d,symbolDisplayString:u}}getFileReferences(e,t){const n=this.getProjects(e),r=e.file,i=this.getPreferences(Qpe(r)),o=[],a=ege(this.host.useCaseSensitiveFileNames);return tge(n,void 0,(e=>{if(e.getCancellationToken().isCancellationRequested())return;const t=e.getLanguageService().getFileReferences(r);if(t)for(const e of t)a.has(e)||(o.push(e),a.add(e))})),t?{refs:o.map((e=>hge(this.projectService,e,i))),symbolName:`"${e.file}"`}:o}openClientFile(e,t,n,r){this.projectService.openClientFileWithNormalizedPath(e,t,n,!1,r)}getPosition(e,t){return void 0!==e.position?e.position:t.lineOffsetToPosition(e.line,e.offset)}getPositionInFile(e,t){const n=this.projectService.getScriptInfoForNormalizedPath(t);return this.getPosition(e,n)}getFileAndProject(e){return this.getFileAndProjectWorker(e.file,e.projectFileName)}getFileAndLanguageServiceForSyntacticOperation(e){const{file:t,project:n}=this.getFileAndProject(e);return{file:t,languageService:n.getLanguageService(!1)}}getFileAndProjectWorker(e,t){const n=Qpe(e);return{file:n,project:this.getProject(t)||this.projectService.ensureDefaultProjectForFile(n)}}getOutliningSpans(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getOutliningSpans(n);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return i.map((t=>({textSpan:pge(t.textSpan,e),hintSpan:pge(t.hintSpan,e),bannerText:t.bannerText,autoCollapse:t.autoCollapse,kind:t.kind})))}return i}getTodoComments(e){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().getTodoComments(t,e.descriptors)}getDocCommentTemplate(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getDocCommentTemplateAtPosition(t,r,this.getPreferences(t),this.getFormatOptions(t))}getSpanOfEnclosingComment(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.onlyMultiLine,i=this.getPositionInFile(e,t);return n.getSpanOfEnclosingComment(t,i,r)}getIndentation(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t),i=e.options?ume(e.options):this.getFormatOptions(t);return{position:r,indentation:n.getIndentationAtPosition(t,r,i)}}getBreakpointStatement(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getBreakpointStatementAtPosition(t,r)}getNameOrDottedNameSpan(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.getNameOrDottedNameSpan(t,r,r)}isValidBraceCompletion(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.getPositionInFile(e,t);return n.isValidBraceCompletionAtPosition(t,r,e.openingBrace.charCodeAt(0))}getQuickInfoWorker(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=r.getLanguageService().getQuickInfoAtPosition(n,this.getPosition(e,i));if(!o)return;const a=!!this.getPreferences(n).displayPartsForJSDoc;if(t){const e=S7(o.displayParts);return{kind:o.kind,kindModifiers:o.kindModifiers,start:i.positionToLineOffset(o.textSpan.start),end:i.positionToLineOffset(js(o.textSpan)),displayString:e,documentation:a?this.mapDisplayParts(o.documentation,r):S7(o.documentation),tags:this.mapJSDocTagInfo(o.tags,r,a)}}return a?o:{...o,tags:this.mapJSDocTagInfo(o.tags,r,!1)}}getFormattingEditsForRange(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.projectService.getScriptInfoForNormalizedPath(t),i=r.lineOffsetToPosition(e.line,e.offset),o=r.lineOffsetToPosition(e.endLine,e.endOffset),a=n.getFormattingEditsForRange(t,i,o,this.getFormatOptions(t));if(a)return a.map((e=>this.convertTextChangeToCodeEdit(e,r)))}getFormattingEditsForRangeFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?ume(e.options):this.getFormatOptions(t);return n.getFormattingEditsForRange(t,e.position,e.endPosition,r)}getFormattingEditsForDocumentFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?ume(e.options):this.getFormatOptions(t);return n.getFormattingEditsForDocument(t,r)}getFormattingEditsAfterKeystrokeFull(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=e.options?ume(e.options):this.getFormatOptions(t);return n.getFormattingEditsAfterKeystroke(t,e.position,e.key,r)}getFormattingEditsAfterKeystroke(e){const{file:t,languageService:n}=this.getFileAndLanguageServiceForSyntacticOperation(e),r=this.projectService.getScriptInfoForNormalizedPath(t),i=r.lineOffsetToPosition(e.line,e.offset),o=this.getFormatOptions(t),a=n.getFormattingEditsAfterKeystroke(t,i,e.key,o);if("\n"===e.key&&(!a||0===a.length||function(e,t){return e.every((e=>js(e.span)({start:r.positionToLineOffset(e.span.start),end:r.positionToLineOffset(js(e.span)),newText:e.newText?e.newText:""})))}getCompletions(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getLanguageService().getCompletionsAtPosition(n,o,{...gme(this.getPreferences(n)),triggerCharacter:e.triggerCharacter,triggerKind:e.triggerKind,includeExternalModuleExports:e.includeExternalModuleExports,includeInsertTextCompletions:e.includeInsertTextCompletions},r.projectService.getFormatCodeOptions(n));if(void 0===a)return;if("completions-full"===t)return a;const s=e.prefix||"",c=q(a.entries,(e=>{if(a.isMemberCompletion||an(e.name.toLowerCase(),s.toLowerCase())){const{name:t,kind:n,kindModifiers:r,sortText:o,insertText:a,filterText:s,replacementSpan:c,hasAction:l,source:u,sourceDisplay:_,labelDetails:d,isSnippet:p,isRecommended:f,isPackageJsonImport:m,isImportStatementCompletion:g,data:h}=e;return{name:t,kind:n,kindModifiers:r,sortText:o,insertText:a,filterText:s,replacementSpan:c?pge(c,i):void 0,isSnippet:p,hasAction:l||void 0,source:u,sourceDisplay:_,labelDetails:d,isRecommended:f,isPackageJsonImport:m,isImportStatementCompletion:g,data:h}}}));return"completions"===t?(a.metadata&&(c.metadata=a.metadata),c):{...a,optionalReplacementSpan:a.optionalReplacementSpan&&pge(a.optionalReplacementSpan,i),entries:c}}getCompletionEntryDetails(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.projectService.getFormatCodeOptions(n),s=!!this.getPreferences(n).displayPartsForJSDoc,c=q(e.entryNames,(e=>{const{name:t,source:i,data:s}="string"==typeof e?{name:e,source:void 0,data:void 0}:e;return r.getLanguageService().getCompletionEntryDetails(n,o,t,a,i,this.getPreferences(n),s?ut(s,yge):void 0)}));return t?s?c:c.map((e=>({...e,tags:this.mapJSDocTagInfo(e.tags,r,!1)}))):c.map((e=>({...e,codeActions:O(e.codeActions,(e=>this.mapCodeAction(e))),documentation:this.mapDisplayParts(e.documentation,r),tags:this.mapJSDocTagInfo(e.tags,r,s)})))}getCompileOnSaveAffectedFileList(e){const t=this.getProjects(e,!0,!0),n=this.projectService.getScriptInfo(e.file);return n?function(e,t,n,r){const i=B(ot(n)?n:n.projects,(t=>r(t,e)));return!ot(n)&&n.symLinkedProjects&&n.symLinkedProjects.forEach(((e,n)=>{const o=t(n);i.push(...R(e,(e=>r(e,o))))})),ne(i,wt)}(n,(e=>this.projectService.getScriptInfoForPath(e)),t,((e,t)=>{if(!e.compileOnSaveEnabled||!e.languageServiceEnabled||e.isOrphan())return;const n=e.getCompilationSettings();return n.noEmit||QI(t.fileName)&&!function(e){return LS(e)||!!e.emitDecoratorMetadata}(n)?void 0:{projectFileName:e.getProjectName(),fileNames:e.getCompileOnSaveAffectedFileList(t),projectUsesOutFile:!!n.outFile}})):Hpe}emitFile(e){const{file:t,project:n}=this.getFileAndProject(e);if(n||Upe.ThrowNoProject(),!n.languageServiceEnabled)return!!e.richResponse&&{emitSkipped:!0,diagnostics:[]};const r=n.getScriptInfo(t),{emitSkipped:i,diagnostics:o}=n.emitFile(r,((e,t,n)=>this.host.writeFile(e,t,n)));return e.richResponse?{emitSkipped:i,diagnostics:e.includeLinePosition?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(o):o.map((e=>Xme(e,!0)))}:!i}getSignatureHelpItems(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getLanguageService().getSignatureHelpItems(n,o,e),s=!!this.getPreferences(n).displayPartsForJSDoc;if(a&&t){const e=a.applicableSpan;return{...a,applicableSpan:{start:i.positionToLineOffset(e.start),end:i.positionToLineOffset(e.start+e.length)},items:this.mapSignatureHelpItems(a.items,r,s)}}return s||!a?a:{...a,items:a.items.map((e=>({...e,tags:this.mapJSDocTagInfo(e.tags,r,!1)})))}}toPendingErrorCheck(e){const t=Qpe(e),n=this.projectService.tryGetDefaultProjectForFile(t);return n&&{fileName:t,project:n}}getDiagnostics(e,t,n){this.suppressDiagnosticEvents||n.length>0&&this.updateErrorCheck(e,n,t)}change(e){const t=this.projectService.getScriptInfo(e.file);xn.assert(!!t),t.textStorage.switchToScriptVersionCache();const n=t.lineOffsetToPosition(e.line,e.offset),r=t.lineOffsetToPosition(e.endLine,e.endOffset);n>=0&&(this.changeSeq++,this.projectService.applyChangesToFile(t,H({span:{start:n,length:r-n},newText:e.insertString})))}reload(e,t){const n=Qpe(e.file),r=void 0===e.tmpfile?void 0:Qpe(e.tmpfile),i=this.projectService.getScriptInfoForNormalizedPath(n);i&&(this.changeSeq++,i.reloadFromFile(r)&&this.doOutput(void 0,"reload",t,!0))}saveToTmp(e,t){const n=this.projectService.getScriptInfo(e);n&&n.saveTo(t)}closeClientFile(e){if(!e)return;const t=Xo(e);this.projectService.closeClientFile(t)}mapLocationNavigationBarItems(e,t){return O(e,(e=>({text:e.text,kind:e.kind,kindModifiers:e.kindModifiers,spans:e.spans.map((e=>pge(e,t))),childItems:this.mapLocationNavigationBarItems(e.childItems,t),indent:e.indent})))}getNavigationBarItems(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getNavigationBarItems(n);return i?t?this.mapLocationNavigationBarItems(i,this.projectService.getScriptInfoForNormalizedPath(n)):i:void 0}toLocationNavigationTree(e,t){return{text:e.text,kind:e.kind,kindModifiers:e.kindModifiers,spans:e.spans.map((e=>pge(e,t))),nameSpan:e.nameSpan&&pge(e.nameSpan,t),childItems:O(e.childItems,(e=>this.toLocationNavigationTree(e,t)))}}getNavigationTree(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=r.getNavigationTree(n);return i?t?this.toLocationNavigationTree(i,this.projectService.getScriptInfoForNormalizedPath(n)):i:void 0}getNavigateToItems(e,t){return R(this.getFullNavigateToItems(e),t?({project:e,navigateToItems:t})=>t.map((t=>{const n=e.getScriptInfo(t.fileName),r={name:t.name,kind:t.kind,kindModifiers:t.kindModifiers,isCaseSensitive:t.isCaseSensitive,matchKind:t.matchKind,file:t.fileName,start:n.positionToLineOffset(t.textSpan.start),end:n.positionToLineOffset(js(t.textSpan))};return t.kindModifiers&&""!==t.kindModifiers&&(r.kindModifiers=t.kindModifiers),t.containerName&&t.containerName.length>0&&(r.containerName=t.containerName),t.containerKind&&t.containerKind.length>0&&(r.containerKind=t.containerKind),r})):({navigateToItems:e})=>e)}getFullNavigateToItems(e){const{currentFileOnly:t,searchValue:n,maxResultCount:r,projectFileName:i}=e;if(t){xn.assertIsDefined(e.file);const{file:t,project:i}=this.getFileAndProject(e);return[{project:i,navigateToItems:i.getLanguageService().getNavigateToItems(n,r,t)}]}const o=this.getHostPreferences(),a=[],s=new Map;return e.file||i?tge(this.getProjects(e),void 0,(e=>c(e))):(this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject((e=>c(e)))),a;function c(e){const t=F(e.getLanguageService().getNavigateToItems(n,r,void 0,e.isNonTsProject(),o.excludeLibrarySymbolsInNavTo),(t=>function(e){const t=e.name;if(!s.has(t))return s.set(t,[e]),!0;const n=s.get(t);for(const t of n)if((r=t)===(i=e)||r&&i&&r.containerKind===i.containerKind&&r.containerName===i.containerName&&r.fileName===i.fileName&&r.isCaseSensitive===i.isCaseSensitive&&r.kind===i.kind&&r.kindModifiers===i.kindModifiers&&r.matchKind===i.matchKind&&r.name===i.name&&r.textSpan.start===i.textSpan.start&&r.textSpan.length===i.textSpan.length)return!1;var r,i;return n.push(e),!0}(t)&&!sge(age(t),e)));t.length&&a.push({project:e,navigateToItems:t})}}getSupportedCodeFixes(e){if(!e)return T7();if(e.file){const{file:t,project:n}=this.getFileAndProject(e);return n.getLanguageService().getSupportedCodeFixes(t)}const t=this.getProject(e.projectFileName);return t||Upe.ThrowNoProject(),t.getLanguageService().getSupportedCodeFixes()}isLocation(e){return void 0!==e.line}extractPositionOrRange(e,t){let n,r;var i;return this.isLocation(e)?n=void 0!==(i=e).position?i.position:t.lineOffsetToPosition(i.line,i.offset):r=this.getRange(e,t),xn.checkDefined(void 0===n?r:n)}getRange(e,t){const{startPosition:n,endPosition:r}=this.getStartAndEndPosition(e,t);return{pos:n,end:r}}getApplicableRefactors(e){const{file:t,project:n}=this.getFileAndProject(e),r=n.getScriptInfoForNormalizedPath(t);return n.getLanguageService().getApplicableRefactors(t,this.extractPositionOrRange(e,r),this.getPreferences(t),e.triggerReason,e.kind,e.includeInteractiveActions).map((e=>({...e,actions:e.actions.map((e=>({...e,range:e.range?{start:Gme({line:e.range.start.line,character:e.range.start.offset}),end:Gme({line:e.range.end.line,character:e.range.end.offset})}:void 0})))})))}getEditsForRefactor(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=r.getScriptInfoForNormalizedPath(n),o=r.getLanguageService().getEditsForRefactor(n,this.getFormatOptions(n),this.extractPositionOrRange(e,i),e.refactor,e.action,this.getPreferences(n),e.interactiveRefactorArguments);if(void 0===o)return{edits:[]};if(t){const{renameFilename:e,renameLocation:t,edits:n}=o;let i;return void 0!==e&&void 0!==t&&(i=gge(yQ(r.getScriptInfoForNormalizedPath(Qpe(e)).getSnapshot()),e,t,n)),{renameLocation:i,renameFilename:e,edits:this.mapTextChangesToCodeEdits(n),notApplicableReason:o.notApplicableReason}}return o}getMoveToRefactoringFileSuggestions(e){const{file:t,project:n}=this.getFileAndProject(e),r=n.getScriptInfoForNormalizedPath(t);return n.getLanguageService().getMoveToRefactoringFileSuggestions(t,this.extractPositionOrRange(e,r),this.getPreferences(t))}getPasteEdits(e){const{file:t,project:n}=this.getFileAndProject(e),r=e.copiedFrom?{file:e.copiedFrom.file,range:e.copiedFrom.spans.map((t=>this.getRange({file:e.copiedFrom.file,startLine:t.start.line,startOffset:t.start.offset,endLine:t.end.line,endOffset:t.end.offset},n.getScriptInfoForNormalizedPath(Qpe(e.copiedFrom.file)))))}:void 0,i=n.getLanguageService().getPasteEdits({targetFile:t,pastedText:e.pastedText,pasteLocations:e.pasteLocations.map((e=>this.getRange({file:t,startLine:e.start.line,startOffset:e.start.offset,endLine:e.end.line,endOffset:e.end.offset},n.getScriptInfoForNormalizedPath(t)))),copiedFrom:r,preferences:this.getPreferences(t)},this.getFormatOptions(t));return i&&this.mapPasteEditsAction(i)}organizeImports(e,t){xn.assert("file"===e.scope.type);const{file:n,project:r}=this.getFileAndProject(e.scope.args),i=r.getLanguageService().organizeImports({fileName:n,mode:e.mode??(e.skipDestructiveCodeActions?"SortAndCombine":void 0),type:"file"},this.getFormatOptions(n),this.getPreferences(n));return t?this.mapTextChangesToCodeEdits(i):i}getEditsForFileRename(e,t){const n=Qpe(e.oldFilePath),r=Qpe(e.newFilePath),i=this.getHostFormatOptions(),o=this.getHostPreferences(),a=new Set,s=[];return this.projectService.loadAncestorProjectTree(),this.projectService.forEachEnabledProject((e=>{const t=e.getLanguageService().getEditsForFileRename(n,r,i,o),c=[];for(const e of t)a.has(e.fileName)||(s.push(e),c.push(e.fileName));for(const e of c)a.add(e)})),t?s.map((e=>this.mapTextChangeToCodeEdit(e))):s}getCodeFixes(e,t){const{file:n,project:r}=this.getFileAndProject(e),i=r.getScriptInfoForNormalizedPath(n),{startPosition:o,endPosition:a}=this.getStartAndEndPosition(e,i);let s;try{s=r.getLanguageService().getCodeFixesAtPosition(n,o,a,e.errorCodes,this.getFormatOptions(n),this.getPreferences(n))}catch(t){const i=r.getLanguageService(),s=[...i.getSyntacticDiagnostics(n),...i.getSemanticDiagnostics(n),...i.getSuggestionDiagnostics(n)].map((e=>Ks(o,a-o,e.start,e.length)&&e.code)),c=e.errorCodes.find((e=>!s.includes(e)));throw void 0!==c&&(t.message=`BADCLIENT: Bad error code, ${c} not found in range ${o}..${a} (found: ${s.join(", ")}); could have caused this error:\n${t.message}`),t}return t?s.map((e=>this.mapCodeFixAction(e))):s}getCombinedCodeFix({scope:e,fixId:t},n){xn.assert("file"===e.type);const{file:r,project:i}=this.getFileAndProject(e.args),o=i.getLanguageService().getCombinedCodeFix({type:"file",fileName:r},t,this.getFormatOptions(r),this.getPreferences(r));return n?{changes:this.mapTextChangesToCodeEdits(o.changes),commands:o.commands}:o}applyCodeActionCommand(e){const t=e.command;for(const e of at(t)){const{file:t,project:n}=this.getFileAndProject(e);n.getLanguageService().applyCodeActionCommand(e,this.getFormatOptions(t)).then((e=>{}),(e=>{}))}return{}}getStartAndEndPosition(e,t){let n,r;return void 0!==e.startPosition?n=e.startPosition:(n=t.lineOffsetToPosition(e.startLine,e.startOffset),e.startPosition=n),void 0!==e.endPosition?r=e.endPosition:(r=t.lineOffsetToPosition(e.endLine,e.endOffset),e.endPosition=r),{startPosition:n,endPosition:r}}mapCodeAction({description:e,changes:t,commands:n}){return{description:e,changes:this.mapTextChangesToCodeEdits(t),commands:n}}mapCodeFixAction({fixName:e,description:t,changes:n,commands:r,fixId:i,fixAllDescription:o}){return{fixName:e,description:t,changes:this.mapTextChangesToCodeEdits(n),commands:r,fixId:i,fixAllDescription:o}}mapPasteEditsAction({edits:e,fixId:t}){return{edits:this.mapTextChangesToCodeEdits(e),fixId:t}}mapTextChangesToCodeEdits(e){return e.map((e=>this.mapTextChangeToCodeEdit(e)))}mapTextChangeToCodeEdit(e){const t=this.projectService.getScriptInfoOrConfig(e.fileName);return!!e.isNewFile==!!t&&(t||this.projectService.logErrorForScriptInfoNotFound(e.fileName),xn.fail("Expected isNewFile for (only) new files. "+JSON.stringify({isNewFile:!!e.isNewFile,hasScriptInfo:!!t}))),t?{fileName:e.fileName,textChanges:e.textChanges.map((e=>function(e,t){return{start:mge(t,e.span.start),end:mge(t,js(e.span)),newText:e.newText}}(e,t)))}:function(e){xn.assert(1===e.textChanges.length);const t=Te(e.textChanges);return xn.assert(0===t.span.start&&0===t.span.length),{fileName:e.fileName,textChanges:[{start:{line:0,offset:0},end:{line:0,offset:0},newText:t.newText}]}}(e)}convertTextChangeToCodeEdit(e,t){return{start:t.positionToLineOffset(e.span.start),end:t.positionToLineOffset(e.span.start+e.span.length),newText:e.newText?e.newText:""}}getBraceMatching(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getPosition(e,i),a=r.getBraceMatchingAtPosition(n,o);return a?t?a.map((e=>pge(e,i))):a:void 0}getDiagnosticsForProject(e,t,n){if(this.suppressDiagnosticEvents)return;const{fileNames:r,languageServiceDisabled:i}=this.getProjectInfoWorker(n,void 0,!0,!0);if(i)return;const o=r.filter((e=>!e.includes("lib.d.ts")));if(0===o.length)return;const a=[],s=[],c=[],l=[],u=Qpe(n),_=this.projectService.ensureDefaultProjectForFile(u);for(const e of o)this.getCanonicalFileName(e)===this.getCanonicalFileName(n)?a.push(e):this.projectService.getScriptInfo(e).isScriptOpen()?s.push(e):QI(e)?l.push(e):c.push(e);const d=[...a,...s,...c,...l].map((e=>({fileName:e,project:_})));this.updateErrorCheck(e,d,t,!1)}configurePlugin(e){this.projectService.configurePlugin(e)}getSmartSelectionRange(e,t){const{locations:n}=e,{file:r,languageService:i}=this.getFileAndLanguageServiceForSyntacticOperation(e),o=xn.checkDefined(this.projectService.getScriptInfo(r));return O(n,(e=>{const n=this.getPosition(e,o),a=i.getSmartSelectionRange(r,n);return t?this.mapSelectionRange(a,o):a}))}toggleLineComment(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfo(n),o=this.getRange(e,i),a=r.toggleLineComment(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map((t=>this.convertTextChangeToCodeEdit(t,e)))}return a}toggleMultilineComment(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.toggleMultilineComment(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map((t=>this.convertTextChangeToCodeEdit(t,e)))}return a}commentSelection(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.commentSelection(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map((t=>this.convertTextChangeToCodeEdit(t,e)))}return a}uncommentSelection(e,t){const{file:n,languageService:r}=this.getFileAndLanguageServiceForSyntacticOperation(e),i=this.projectService.getScriptInfoForNormalizedPath(n),o=this.getRange(e,i),a=r.uncommentSelection(n,o);if(t){const e=this.projectService.getScriptInfoForNormalizedPath(n);return a.map((t=>this.convertTextChangeToCodeEdit(t,e)))}return a}mapSelectionRange(e,t){const n={textSpan:pge(e.textSpan,t)};return e.parent&&(n.parent=this.mapSelectionRange(e.parent,t)),n}getScriptInfoFromProjectService(e){const t=Qpe(e);return this.projectService.getScriptInfoForNormalizedPath(t)||(this.projectService.logErrorForScriptInfoNotFound(t),Upe.ThrowNoProject())}toProtocolCallHierarchyItem(e){const t=this.getScriptInfoFromProjectService(e.file);return{name:e.name,kind:e.kind,kindModifiers:e.kindModifiers,file:e.file,containerName:e.containerName,span:pge(e.span,t),selectionSpan:pge(e.selectionSpan,t)}}toProtocolCallHierarchyIncomingCall(e){const t=this.getScriptInfoFromProjectService(e.from.file);return{from:this.toProtocolCallHierarchyItem(e.from),fromSpans:e.fromSpans.map((e=>pge(e,t)))}}toProtocolCallHierarchyOutgoingCall(e,t){return{to:this.toProtocolCallHierarchyItem(e.to),fromSpans:e.fromSpans.map((e=>pge(e,t)))}}prepareCallHierarchy(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.projectService.getScriptInfoForNormalizedPath(t);if(r){const i=this.getPosition(e,r),o=n.getLanguageService().prepareCallHierarchy(t,i);return o&&EZ(o,(e=>this.toProtocolCallHierarchyItem(e)))}}provideCallHierarchyIncomingCalls(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getScriptInfoFromProjectService(t);return n.getLanguageService().provideCallHierarchyIncomingCalls(t,this.getPosition(e,r)).map((e=>this.toProtocolCallHierarchyIncomingCall(e)))}provideCallHierarchyOutgoingCalls(e){const{file:t,project:n}=this.getFileAndProject(e),r=this.getScriptInfoFromProjectService(t);return n.getLanguageService().provideCallHierarchyOutgoingCalls(t,this.getPosition(e,r)).map((e=>this.toProtocolCallHierarchyOutgoingCall(e,r)))}getCanonicalFileName(e){return Xo(this.host.useCaseSensitiveFileNames?e:yt(e))}exit(){}notRequired(){return{responseRequired:!1}}requiredResponse(e){return{response:e,responseRequired:!0}}addProtocolHandler(e,t){if(this.handlers.has(e))throw new Error(`Protocol handler already exists for command "${e}"`);this.handlers.set(e,t)}setCurrentRequest(e){xn.assert(void 0===this.currentRequestId),this.currentRequestId=e,this.cancellationToken.setRequest(e)}resetCurrentRequest(e){xn.assert(this.currentRequestId===e),this.currentRequestId=void 0,this.cancellationToken.resetRequest(e)}executeWithRequestId(e,t){try{return this.setCurrentRequest(e),t()}finally{this.resetCurrentRequest(e)}}executeCommand(e){const t=this.handlers.get(e.command);if(t){const n=this.executeWithRequestId(e.seq,(()=>t(e)));return this.projectService.enableRequestedPlugins(),n}return this.logger.msg(`Unrecognized JSON command:${NH(e)}`,"Err"),this.doOutput(void 0,"unknown",e.seq,!1,`Unrecognized JSON command: ${e.command}`),{responseRequired:!1}}onMessage(e){var t,n,r,i,o,a,s,c,l,u,_;let d,p,f;this.gcTimer.scheduleCollect(),this.performanceData=void 0,this.logger.hasLevel(2)&&(d=this.hrtime(),this.logger.hasLevel(3)&&this.logger.info(`request:${PH(this.toStringMessage(e))}`));try{p=this.parseMessage(e),f=p.arguments&&p.arguments.file?p.arguments:void 0,null==(t=or)||t.instant(or.Phase.Session,"request",{seq:p.seq,command:p.command}),null==(n=tr)||n.logStartCommand(""+p.command,this.toStringMessage(e).substring(0,100)),null==(r=or)||r.push(or.Phase.Session,"executeCommand",{seq:p.seq,command:p.command},!0);const{response:s,responseRequired:c}=this.executeCommand(p);if(null==(i=or)||i.pop(),this.logger.hasLevel(2)){const e=(m=this.hrtime(d),(1e9*m[0]+m[1])/1e6).toFixed(4);c?this.logger.perftrc(`${p.seq}::${p.command}: elapsed time (in milliseconds) ${e}`):this.logger.perftrc(`${p.seq}::${p.command}: async elapsed time (in milliseconds) ${e}`)}null==(o=tr)||o.logStopCommand(""+p.command,"Success"),null==(a=or)||a.instant(or.Phase.Session,"response",{seq:p.seq,command:p.command,success:!!s}),s?this.doOutput(s,p.command,p.seq,!0):c&&this.doOutput(void 0,p.command,p.seq,!1,"No content available.")}catch(t){if(null==(s=or)||s.popAll(),t instanceof Lr)return null==(c=tr)||c.logStopCommand(""+(p&&p.command),"Canceled: "+t),null==(l=or)||l.instant(or.Phase.Session,"commandCanceled",{seq:null==p?void 0:p.seq,command:null==p?void 0:p.command}),void this.doOutput({canceled:!0},p.command,p.seq,!0);this.logErrorWorker(t,this.toStringMessage(e),f),null==(u=tr)||u.logStopCommand(""+(p&&p.command),"Error: "+t),null==(_=or)||_.instant(or.Phase.Session,"commandError",{seq:null==p?void 0:p.seq,command:null==p?void 0:p.command,message:t.message}),this.doOutput(void 0,p?p.command:"unknown",p?p.seq:0,!1,"Error processing request. "+t.message+"\n"+t.stack)}var m}parseMessage(e){return JSON.parse(e)}toStringMessage(e){return e}getFormatOptions(e){return this.projectService.getFormatCodeOptions(e)}getPreferences(e){return this.projectService.getPreferences(e)}getHostFormatOptions(){return this.projectService.getHostFormatCodeOptions()}getHostPreferences(){return this.projectService.getHostPreferences()}};function pge(e,t){return{start:t.positionToLineOffset(e.start),end:t.positionToLineOffset(js(e))}}function fge(e,t,n){const r=pge(e,n),i=t&&pge(t,n);return i?{...r,contextStart:i.start,contextEnd:i.end}:r}function mge(e,t){return zme(e)?{line:(n=e.getLineAndCharacterOfPosition(t)).line+1,offset:n.character+1}:e.positionToLineOffset(t);var n}function gge(e,t,n,r){const i=function(e,t,n){for(const{fileName:r,textChanges:i}of n)if(r===t)for(let t=i.length-1;t>=0;t--){const{newText:n,span:{start:r,length:o}}=i[t];e=e.slice(0,r)+n+e.slice(r+o)}return e}(e,t,r),{line:o,character:a}=Wa(qa(i),n);return{line:o+1,offset:a+1}}function hge(e,{fileName:t,textSpan:n,contextSpan:r,isWriteAccess:i,isDefinition:o},{disableLineTextInReferences:a}){const s=xn.checkDefined(e.getScriptInfo(t)),c=fge(n,r,s),l=a?void 0:function(e,t){const n=e.lineToTextSpan(t.start.line-1);return e.getSnapshot().getText(n.start,js(n)).replace(/\r|\n/g,"")}(s,c);return{file:t,...c,lineText:l,isWriteAccess:i,isDefinition:o}}function yge(e){return void 0===e||e&&"object"==typeof e&&"string"==typeof e.exportName&&(void 0===e.fileName||"string"==typeof e.fileName)&&(void 0===e.ambientModuleName||"string"==typeof e.ambientModuleName&&(void 0===e.isPackageJsonImport||"boolean"==typeof e.isPackageJsonImport))}var vge=(e=>(e[e.PreStart=0]="PreStart",e[e.Start=1]="Start",e[e.Entire=2]="Entire",e[e.Mid=3]="Mid",e[e.End=4]="End",e[e.PostEnd=5]="PostEnd",e))(vge||{}),bge=class e{constructor(){this.changes=[],this.versions=new Array(e.maxVersions),this.minVersion=0,this.currentVersion=0}versionToIndex(t){if(!(tthis.currentVersion))return t%e.maxVersions}currentVersionToIndex(){return this.currentVersion%e.maxVersions}edit(t,n,r){this.changes.push(new class{constructor(e,t,n){this.pos=e,this.deleteLen=t,this.insertedText=n}getTextChangeRange(){return Zs(Gs(this.pos,this.deleteLen),this.insertedText?this.insertedText.length:0)}}(t,n,r)),(this.changes.length>e.changeNumberThreshold||n>e.changeLengthThreshold||r&&r.length>e.changeLengthThreshold)&&this.getSnapshot()}getSnapshot(){return this._getSnapshot()}_getSnapshot(){let t=this.versions[this.currentVersionToIndex()];if(this.changes.length>0){let n=t.index;for(const e of this.changes)n=n.edit(e.pos,e.deleteLen,e.insertedText);t=new Sge(this.currentVersion+1,this,n,this.changes),this.currentVersion=t.version,this.versions[this.currentVersionToIndex()]=t,this.changes=[],this.currentVersion-this.minVersion>=e.maxVersions&&(this.minVersion=this.currentVersion-e.maxVersions+1)}return t}getSnapshotVersion(){return this._getSnapshot().version}getAbsolutePositionAndLineText(e){return this._getSnapshot().index.lineNumberToInfo(e)}lineOffsetToPosition(e,t){return this._getSnapshot().index.absolutePositionOfStartOfLine(e)+(t-1)}positionToLineOffset(e){return this._getSnapshot().index.positionToLineOffset(e)}lineToTextSpan(e){const t=this._getSnapshot().index,{lineText:n,absolutePosition:r}=t.lineNumberToInfo(e+1);return Gs(r,void 0!==n?n.length:t.absolutePositionOfStartOfLine(e+2)-r)}getTextChangesBetweenVersions(e,t){if(!(e=this.minVersion){const n=[];for(let r=e+1;r<=t;r++){const e=this.versions[this.versionToIndex(r)];for(const t of e.changesSincePreviousVersion)n.push(t.getTextChangeRange())}return tc(n)}}getLineCount(){return this._getSnapshot().index.getLineCount()}static fromString(t){const n=new e,r=new Sge(0,n,new kge);n.versions[n.currentVersion]=r;const i=kge.linesFromText(t);return r.index.load(i.lines),n}};bge.changeNumberThreshold=8,bge.changeLengthThreshold=256,bge.maxVersions=8;var xge=bge,Sge=class e{constructor(e,t,n,r=Hpe){this.version=e,this.cache=t,this.index=n,this.changesSincePreviousVersion=r}getText(e,t){return this.index.getText(e,t-e)}getLength(){return this.index.getLength()}getChangeRange(t){if(t instanceof e&&this.cache===t.cache)return this.version<=t.version?ec:this.cache.getTextChangesBetweenVersions(t.version,this.version)}},kge=class e{constructor(){this.checkEdits=!1}absolutePositionOfStartOfLine(e){return this.lineNumberToInfo(e).absolutePosition}positionToLineOffset(e){const{oneBasedLine:t,zeroBasedColumn:n}=this.root.charOffsetToLineInfo(1,e);return{line:t,offset:n+1}}positionToColumnAndLineText(e){return this.root.charOffsetToLineInfo(1,e)}getLineCount(){return this.root.lineCount()}lineNumberToInfo(e){if(e<=this.getLineCount()){const{position:t,leaf:n}=this.root.lineNumberToInfo(e,0);return{absolutePosition:t,lineText:n&&n.text}}return{absolutePosition:this.root.charCount(),lineText:void 0}}load(t){if(t.length>0){const n=[];for(let e=0;e0&&e{n=n.concat(r.text.substring(e,e+t))}}),n}getLength(){return this.root.charCount()}every(e,t,n){n||(n=this.root.charCount());const r={goSubtree:!0,done:!1,leaf(t,n,r){e(r,t,n)||(this.done=!0)}};return this.walk(t,n-t,r),!r.done}edit(t,n,r){if(0===this.root.charCount())return xn.assert(0===n),void 0!==r?(this.load(e.linesFromText(r).lines),this):void 0;{let e;if(this.checkEdits){const i=this.getText(0,this.root.charCount());e=i.slice(0,t)+r+i.slice(t+n)}const i=new class{constructor(){this.goSubtree=!0,this.lineIndex=new kge,this.endBranch=[],this.state=2,this.initialText="",this.trailingText="",this.lineIndex.root=new Tge,this.startPath=[this.lineIndex.root],this.stack=[this.lineIndex.root]}get done(){return!1}insertLines(e,t){t&&(this.trailingText=""),e=e?this.initialText+e+this.trailingText:this.initialText+this.trailingText;const n=kge.linesFromText(e).lines;let r,i;n.length>1&&""===n[n.length-1]&&n.pop();for(let e=this.endBranch.length-1;e>=0;e--)this.endBranch[e].updateCounts(),0===this.endBranch[e].charCount()&&(i=this.endBranch[e],r=e>0?this.endBranch[e-1]:this.branchNode);i&&r.remove(i);const o=this.startPath[this.startPath.length-1];if(n.length>0)if(o.text=n[0],n.length>1){let e=new Array(n.length-1),t=o;for(let t=1;t=0;){const n=this.startPath[r];e=n.insertAt(t,e),r--,t=n}let i=e.length;for(;i>0;){const t=new Tge;t.add(this.lineIndex.root),e=t.insertAt(this.lineIndex.root,e),i=e.length,this.lineIndex.root=t}this.lineIndex.root.updateCounts()}else for(let e=this.startPath.length-2;e>=0;e--)this.startPath[e].updateCounts();else{this.startPath[this.startPath.length-2].remove(o);for(let e=this.startPath.length-2;e>=0;e--)this.startPath[e].updateCounts()}return this.lineIndex}post(e,t,n){n===this.lineCollectionAtBranch&&(this.state=4),this.stack.pop()}pre(e,t,n,r,i){const o=this.stack[this.stack.length-1];let a;function s(e){return e.isLeaf()?new Cge(""):new Tge}switch(2===this.state&&1===i&&(this.state=1,this.branchNode=o,this.lineCollectionAtBranch=n),i){case 0:this.goSubtree=!1,4!==this.state&&o.add(n);break;case 1:4===this.state?this.goSubtree=!1:(a=s(n),o.add(a),this.startPath.push(a));break;case 2:4!==this.state?(a=s(n),o.add(a),this.startPath.push(a)):n.isLeaf()||(a=s(n),o.add(a),this.endBranch.push(a));break;case 3:this.goSubtree=!1;break;case 4:4!==this.state?this.goSubtree=!1:n.isLeaf()||(a=s(n),o.add(a),this.endBranch.push(a));break;case 5:this.goSubtree=!1,1!==this.state&&o.add(n)}this.goSubtree&&this.stack.push(a)}leaf(e,t,n){1===this.state?this.initialText=n.text.substring(0,e):2===this.state?(this.initialText=n.text.substring(0,e),this.trailingText=n.text.substring(e+t)):this.trailingText=n.text.substring(e+t)}};let o=!1;if(t>=this.root.charCount()){t=this.root.charCount()-1;const e=this.getText(t,1);r=r?e+r:e,n=0,o=!0}else if(n>0){const e=t+n,{zeroBasedColumn:i,lineText:o}=this.positionToColumnAndLineText(e);0===i&&(n+=o.length,r=r?r+o:o)}if(this.root.walk(t,n,i),i.insertLines(r,o),this.checkEdits){const t=i.lineIndex.getText(0,i.lineIndex.getLength());xn.assert(e===t,"buffer edit mismatch")}return i.lineIndex}}static buildTreeFromBottom(e){if(e.length<4)return new Tge(e);const t=new Array(Math.ceil(e.length/4));let n=0;for(let r=0;r0?n[r]=i:n.pop(),{lines:n,lineMap:t}}},Tge=class e{constructor(e=[]){this.children=e,this.totalChars=0,this.totalLines=0,e.length&&this.updateCounts()}isLeaf(){return!1}updateCounts(){this.totalChars=0,this.totalLines=0;for(const e of this.children)this.totalChars+=e.charCount(),this.totalLines+=e.lineCount()}execWalk(e,t,n,r,i){return n.pre&&n.pre(e,t,this.children[r],this,i),n.goSubtree?(this.children[r].walk(e,t,n),n.post&&n.post(e,t,this.children[r],this,i)):n.goSubtree=!0,n.done}skipChild(e,t,n,r,i){r.pre&&!r.done&&(r.pre(e,t,this.children[n],this,i),r.goSubtree=!0)}walk(e,t,n){let r=0,i=this.children[r].charCount(),o=e;for(;o>=i;)this.skipChild(o,t,r,n,0),o-=i,r++,i=this.children[r].charCount();if(o+t<=i){if(this.execWalk(o,t,n,r,2))return}else{if(this.execWalk(o,i-o,n,r,1))return;let e=t-(i-o);for(r++,i=this.children[r].charCount();e>i;){if(this.execWalk(0,i,n,r,3))return;e-=i,r++,i=this.children[r].charCount()}if(e>0&&this.execWalk(0,e,n,r,4))return}if(n.pre){const e=this.children.length;if(rt)return n.isLeaf()?{oneBasedLine:e,zeroBasedColumn:t,lineText:n.text}:n.charOffsetToLineInfo(e,t);t-=n.charCount(),e+=n.lineCount()}const n=this.lineCount();return 0===n?{oneBasedLine:1,zeroBasedColumn:0,lineText:void 0}:{oneBasedLine:n,zeroBasedColumn:xn.checkDefined(this.lineNumberToInfo(n,0).leaf).charCount(),lineText:void 0}}lineNumberToInfo(e,t){for(const n of this.children){const r=n.lineCount();if(r>=e)return n.isLeaf()?{position:t,leaf:n}:n.lineNumberToInfo(e,t);e-=r,t+=n.charCount()}return{position:t,leaf:void 0}}splitAfter(t){let n;const r=this.children.length,i=++t;if(t=0;e--)0===a[e].children.length&&a.pop()}t&&a.push(t),this.updateCounts();for(let e=0;e{(this.packageInstalledPromise??(this.packageInstalledPromise=new Map)).set(this.packageInstallId,{resolve:e,reject:t})}));return this.installer.send(t),n}attach(e){this.projectService=e,this.installer=this.createInstallerProcess()}onProjectClosed(e){this.installer.send({projectName:e.getProjectName(),kind:"closeProject"})}enqueueInstallTypingsRequest(e,t,n){const r=Xpe(e,t,n);this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling throttled operation:${NH(r)}`),this.activeRequestCount0?this.activeRequestCount--:xn.fail("TIAdapter:: Received too many responses");!this.requestQueue.isEmpty();){const e=this.requestQueue.dequeue();if(this.requestMap.get(e.projectName)===e){this.requestMap.delete(e.projectName),this.scheduleRequest(e);break}this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Skipping defunct request for: ${e.projectName}`)}this.projectService.updateTypingsForProject(e),this.event(e,"setTypings");break;case TH:this.projectService.watchTypingLocations(e)}}scheduleRequest(t){this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Scheduling request for: ${t.projectName}`),this.activeRequestCount++,this.host.setTimeout((()=>{this.logger.hasLevel(3)&&this.logger.info(`TIAdapter:: Sending request:${NH(t)}`),this.installer.send(t)}),e.requestDelayMillis,`${t.projectName}::${t.kind}`)}};wge.requestDelayMillis=100;var Dge=wge,Ege={};o(Ege,{ActionInvalidate:()=>yH,ActionPackageInstalled:()=>vH,ActionSet:()=>hH,ActionWatchTypingLocations:()=>TH,Arguments:()=>mH,AutoImportProviderProject:()=>jfe,AuxiliaryProject:()=>Mfe,CharRangeSection:()=>vge,CloseFileWatcherEvent:()=>rme,CommandNames:()=>Qme,ConfigFileDiagEvent:()=>Qfe,ConfiguredProject:()=>Rfe,ConfiguredProjectLoadKind:()=>kme,CreateDirectoryWatcherEvent:()=>nme,CreateFileWatcherEvent:()=>tme,Errors:()=>Upe,EventBeginInstallTypes:()=>xH,EventEndInstallTypes:()=>SH,EventInitializationFailed:()=>kH,EventTypesRegistry:()=>bH,ExternalProject:()=>Bfe,GcTimer:()=>sfe,InferredProject:()=>Ofe,LargeFileReferencedEvent:()=>Xfe,LineIndex:()=>kge,LineLeaf:()=>Cge,LineNode:()=>Tge,LogLevel:()=>Wpe,Msg:()=>Gpe,OpenFileInfoTelemetryEvent:()=>eme,Project:()=>Ife,ProjectInfoTelemetryEvent:()=>Zfe,ProjectKind:()=>Dfe,ProjectLanguageServiceStateEvent:()=>Yfe,ProjectLoadingFinishEvent:()=>Gfe,ProjectLoadingStartEvent:()=>Hfe,ProjectService:()=>Jme,ProjectsUpdatedInBackgroundEvent:()=>Wfe,ScriptInfo:()=>kfe,ScriptVersionCache:()=>xge,Session:()=>dge,TextStorage:()=>xfe,ThrottledOperations:()=>afe,TypingsCache:()=>wfe,TypingsInstallerAdapter:()=>Dge,allFilesAreJsOrDts:()=>Nfe,allRootFilesAreJsOrDts:()=>Pfe,asNormalizedPath:()=>Zpe,convertCompilerOptions:()=>_me,convertFormatOptions:()=>ume,convertScriptKindName:()=>mme,convertTypeAcquisition:()=>pme,convertUserPreferences:()=>gme,convertWatchOptions:()=>dme,countEachFileTypes:()=>Efe,createInstallTypingsRequest:()=>Xpe,createModuleSpecifierCache:()=>qme,createNormalizedPathMap:()=>efe,createPackageJsonCache:()=>Vme,createSortedArray:()=>ofe,emptyArray:()=>Hpe,findArgument:()=>wH,forEachResolvedProjectReferenceProject:()=>Tme,formatDiagnosticToProtocol:()=>Xme,formatMessage:()=>Yme,getBaseConfigFileName:()=>cfe,getLocationInNewDocument:()=>gge,hasArgument:()=>CH,hasNoTypeScriptSource:()=>Ffe,indent:()=>PH,isBackgroundProject:()=>qfe,isConfigFile:()=>zme,isConfiguredProject:()=>zfe,isDynamicFileName:()=>Sfe,isExternalProject:()=>$fe,isInferredProject:()=>Jfe,isInferredProjectName:()=>tfe,isProjectDeferredClose:()=>Vfe,makeAutoImportProviderProjectName:()=>rfe,makeAuxiliaryProjectName:()=>ife,makeInferredProjectName:()=>nfe,maxFileSize:()=>Kfe,maxProgramSizeForNonTsFiles:()=>Ufe,normalizedPathToPath:()=>Ype,nowString:()=>DH,nullCancellationToken:()=>Ume,nullTypingsInstaller:()=>Tfe,protocol:()=>ufe,removeSorted:()=>lfe,stringifyIndented:()=>NH,toEvent:()=>Zme,toNormalizedPath:()=>Qpe,tryConvertScriptKindName:()=>fme,typingsInstaller:()=>Rpe,updateProjectIfDirty:()=>Fme}),"undefined"!=typeof console&&(xn.loggingHost={log(e,t){switch(e){case 1:return console.error(t);case 2:return console.warn(t);case 3:case 4:return console.log(t)}}})})({get exports(){return o},set exports(t){o=t,e.exports&&(e.exports=t)}})},8911:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=8911,e.exports=t},2266:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.COMPILER_VERSION=void 0,i(n(6581),t);var o=n(6258);Object.defineProperty(t,"COMPILER_VERSION",{enumerable:!0,get:function(){return o.COMPILER_VERSION}}),n(7696)},7696:function(e,t,n){"use strict";var r,i,o,a,s,c,l,u,_,d,p,f,m,g,h,y,v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const b=v(n(651)),x=()=>{},S=async()=>{};null!==(r=b.default.copy)&&void 0!==r||(b.default.copy=S),null!==(i=b.default.copySync)&&void 0!==i||(b.default.copySync=x),null!==(o=b.default.existsSync)&&void 0!==o||(b.default.existsSync=()=>!1),null!==(a=b.default.outputFile)&&void 0!==a||(b.default.outputFile=S),null!==(s=b.default.outputFileSync)&&void 0!==s||(b.default.outputFileSync=x),null!==(c=b.default.pathExists)&&void 0!==c||(b.default.pathExists=async()=>!1),null!==(l=b.default.pathExistsSync)&&void 0!==l||(b.default.pathExistsSync=()=>!1),null!==(u=b.default.readdir)&&void 0!==u||(b.default.readdir=async()=>[]),null!==(_=b.default.readdirSync)&&void 0!==_||(b.default.readdirSync=()=>[]),null!==(d=b.default.readFileSync)&&void 0!==d||(b.default.readFileSync=()=>Buffer.from("")),null!==(p=b.default.readJson)&&void 0!==p||(b.default.readJson=S),null!==(f=b.default.readJSONSync)&&void 0!==f||(b.default.readJSONSync=x),null!==(m=b.default.realpathSync)&&void 0!==m||(b.default.realpathSync=e=>e),null!==(g=b.default.removeSync)&&void 0!==g||(b.default.removeSync=x),null!==(h=b.default.stat)&&void 0!==h||(b.default.stat=()=>({})),null!==(y=b.default.statSync)&&void 0!==y||(b.default.statSync=()=>({}))},440:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualFileSystem=t.PATH_SEP=void 0,t.pathJoin=o;const r=n(2287),i=n(2991);function o(...e){let n=e[0];for(let r=1;re.length>0))}writeFile(e,t){const n=this.getPathParts(e),o=n.pop();let a=this.root;for(const e of n){const t=(0,i.getOrSetDefault)(a.children,e,(()=>({name:e,children:new Map})));(0,r.assert)("children"in t),a=t}a.children.set(o,{name:o,content:t})}get(e){const t=this.getPathParts(e),n=t.pop();let r=this.root;for(const e of t){const t=r.children.get(e);if(!t)return;if(!("children"in t))return;r=t}return r.children.get(n)}readFile(e){const t=this.get(e);if(t&&"content"in t)return t.content}fileExists(e){const t=this.get(e);return void 0!==t&&"content"in t}directoryExists(e){const t=this.get(e);return void 0!==t&&"children"in t}getDirectories(e){const t=new Array,n=this.get(e);if(n&&"children"in n)for(const[r,i]of n.children)"children"in i&&t.push(o(e,r));return t}getFilePaths(){const e=new Array,t=(n,r="")=>{for(const[i,o]of n.children)"children"in o?t(o,`${r}/${i}`):e.push(`${r}/${i}`)};return t(this.root),e}}},1614:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualProject=void 0;const i=n(9861),o=n(4744),a=n(1979),s=n(440),c=n(9665),l=n(2179),u=n(6258),_=n(7783),d=n(2287),p=n(7856),f=n(3115),m=n(4502),g=n(4567),h=r(n(2137)),y=s.PATH_SEP,v=(0,s.pathJoin)(y,"src"),b=(0,s.pathJoin)(y,"out"),x=(0,s.pathJoin)(v,"playground.tsx"),S=(0,s.pathJoin)(y,u.NODE_MODULES),k=(0,s.pathJoin)(S,u.RBXTS_SCOPE),T=(0,s.pathJoin)(y,"include");t.VirtualProject=class{constructor(){this.nodeModulesPathMapping=new Map,this.data={isPackage:!1,nodeModulesPath:S,projectOptions:Object.assign({},u.DEFAULT_PROJECT_OPTIONS,{rojo:"",type:u.ProjectType.Model,optimizedLoops:!0}),projectPath:y,rojoConfigPath:void 0,tsConfigPath:""},this.compilerOptions={allowSyntheticDefaultImports:!0,downlevelIteration:!0,noLib:!0,strict:!0,target:h.default.ScriptTarget.ESNext,module:h.default.ModuleKind.CommonJS,moduleResolution:h.default.ModuleResolutionKind.Node10,moduleDetection:h.default.ModuleDetectionKind.Force,typeRoots:[k],resolveJsonModule:!0,experimentalDecorators:!0,rootDir:v,outDir:b,jsx:h.default.JsxEmit.React,jsxFactory:"React.createElement",jsxFragmentFactory:"React.Fragment"},(0,c.validateCompilerOptions)(this.compilerOptions,this.data.projectPath),this.vfs=new s.VirtualFileSystem;this.compilerHost=h.default.createCompilerHostWorker(this.compilerOptions,void 0,{getExecutingFilePath:()=>"/index.js",getCurrentDirectory:()=>"/"}),this.compilerHost.readFile=e=>this.vfs.readFile(e),this.compilerHost.fileExists=e=>this.vfs.fileExists(e),this.compilerHost.directoryExists=e=>this.vfs.directoryExists(e),this.compilerHost.getDirectories=e=>this.vfs.getDirectories(e),this.compilerHost.useCaseSensitiveFileNames=()=>!0,this.compilerHost.getCurrentDirectory=()=>s.PATH_SEP,this.rojoResolver=a.RojoResolver.fromTree(y,{$path:b,include:{$path:T,node_modules:{$className:"Folder","@rbxts":{$path:k}}}}),this.pkgRojoResolvers=this.compilerOptions.typeRoots.map(a.RojoResolver.synthetic)}compileSource(e){this.vfs.writeFile(x,e);const t=this.vfs.getFilePaths().filter((e=>e.endsWith(h.default.Extension.Ts)||e.endsWith(h.default.Extension.Tsx)||e.endsWith(h.default.Extension.Dts)));this.program=h.default.createProgram(t,this.compilerOptions,this.compilerHost,this.program),this.typeChecker=this.program.getTypeChecker();const n=(0,g.createTransformServices)(this.typeChecker),r=new o.PathTranslator(v,b,void 0,!1,this.data.projectOptions.luau),a=this.program.getSourceFile(x);(0,d.assert)(a);const s=new Array;if(s.push(...h.default.getPreEmitDiagnostics(this.program,a)),s.push(...(0,l.getCustomPreEmitDiagnostics)(this.data,a)),(0,p.hasErrors)(s))throw new _.DiagnosticError(s);const c=new f.MultiTransformState,u=this.data.projectOptions.type,y=new f.TransformState(this.program,this.data,n,r,c,this.compilerOptions,this.rojoResolver,this.pkgRojoResolvers,this.nodeModulesPathMapping,void 0,this.typeChecker,u,a),S=(0,f.transformSourceFile)(y,a);if(s.push(...m.DiagnosticService.flush()),(0,p.hasErrors)(s))throw new _.DiagnosticError(s);return(0,i.renderAST)(S)}setMapping(e,t){this.nodeModulesPathMapping.set(e,t)}}},4141:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cleanup=function(e){const t=e.outDir;i.default.pathExistsSync(t)&&s(e,t)};const i=r(n(651)),o=r(n(6470)),a=n(3710);function s(e,t){if(i.default.pathExistsSync(t))for(const n of i.default.readdirSync(t)){const r=o.default.join(t,n);if(i.default.statSync(r).isDirectory()){if(".git"===n)continue;s(e,r)}(0,a.tryRemoveOutput)(e,r)}}},648:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProgramFactory=function(e,t){return(n,r=t,l=function(e,t){var n;const r=c.default.createIncrementalCompilerHost(t);let o="";o+=`version=${a.COMPILER_VERSION},`,o+=`type=${String(e.projectOptions.type)},`,o+=`isPackage=${String(e.isPackage)},`,o+=`plugins=${JSON.stringify(null!==(n=t.plugins)&&void 0!==n?n:[])},`,e.rojoConfigPath&&i.default.existsSync(e.rojoConfigPath)&&(o+=i.default.readFileSync(e.rojoConfigPath).toString()),(0,s.assert)(r.createHash);const l=r.createHash;return r.createHash=e=>l(o+e),r}(e,t),u=c.default.readBuilderProgram(t,(0,o.createReadBuildProgramHost)()))=>c.default.createEmitAndSemanticDiagnosticsBuilderProgram(n,r,l,u)};const i=r(n(651)),o=n(1627),a=n(6258),s=n(2287),c=r(n(2137))},2230:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProjectData=function(e,t){var n;const r=a.default.dirname(e),d=u.default.findPackageJson(r,u.default.sys);if(!d)throw new l.ProjectError("Unable to find package.json");let p=!1;try{const e=JSON.parse(o.default.readFileSync(d).toString());p=_.test(null!==(n=e.name)&&void 0!==n?n:"")}catch{}t.includePath=a.default.resolve(t.includePath||a.default.join(r,"include"));const f=a.default.join(a.default.dirname(d),c.NODE_MODULES);let m;if(t.rojo)m=a.default.resolve(t.rojo);else{const{path:e,warnings:t}=i.RojoResolver.findRojoConfigFilePath(r);m=e;for(const e of t)s.LogService.warn(e)}return{tsConfigPath:e,isPackage:p,nodeModulesPath:f,projectOptions:t,projectPath:r,rojoConfigPath:m}};const i=n(1979),o=r(n(651)),a=r(n(6470)),s=n(761),c=n(6258),l=n(3333),u=r(n(2137)),_=/^@[a-z0-9-]*\//},6020:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProjectProgram=function(e,t){const{fileNames:n,options:o}=(0,i.getParsedCommandLine)(e);return(0,r.createProgramFactory)(e,o)(n,o,t)};const r=n(648),i=n(5607)},5607:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedCommandLine=function(e){const t=c.default.getParsedCommandLineOfConfigFile(e.tsConfigPath,{},{fileExists:c.default.sys.fileExists,getCurrentDirectory:c.default.sys.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:e=>{throw new a.DiagnosticError([e])},readDirectory:c.default.sys.readDirectory,readFile:c.default.sys.readFile,useCaseSensitiveFileNames:c.default.sys.useCaseSensitiveFileNames});if(void 0===t)throw new s.ProjectError("Unable to load TS program!");if(t.errors.length>0)throw new a.DiagnosticError(t.errors);return(globalThis.RBXTSC_DEV||void 0!==i.default.url())&&(t.options.incremental=!1,t.options.tsBuildInfoFile=void 0),(0,o.validateCompilerOptions)(t.options,e.projectPath),t};const i=r(n(651)),o=n(9665),a=n(7783),s=n(3333),c=r(n(2137))},3710:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.tryRemoveOutput=function(e,t){(function(e,t){if(t.endsWith(a.DTS_EXT)&&!e.declaration)return!0;for(const n of e.getInputPaths(t))if(i.default.pathExistsSync(n))return!1;return e.buildInfoOutputPath!==t})(e,t)&&(i.default.removeSync(t),o.LogService.writeLineIfVerbose(`remove ${t}`))};const i=r(n(651)),o=n(761),a=n(6258)},9665:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateCompilerOptions=function(e,t){var n,r;const o=new Array;e.noLib!==p&&o.push(`${g('"noLib"')} must be ${g("true")}`),e.strict!==f&&o.push(`${g('"strict"')} must be ${g("true")}`),e.target,e.module!==u&&o.push(`${g('"module"')} must be ${g("commonjs")}`),e.moduleDetection!==_&&o.push(`${g('"moduleDetection"')} must be ${g('"force"')}`),e.moduleResolution!==d&&o.push(`${g('"moduleResolution"')} must be ${g('"Node"')}`),e.allowSyntheticDefaultImports!==m&&o.push(`${g('"allowSyntheticDefaultImports"')} must be ${g("true")}`);const h=a.default.join(t,s.NODE_MODULES,s.RBXTS_SCOPE);void 0!==e.typeRoots&&function(e,t){const n=a.default.resolve(e);for(const e of t)if(a.default.resolve(e)===n)return!0;return!1}(h,e.typeRoots)||o.push(`${g('"typeRoots"')} must contain ${g(h)}`);for(const c of null!==(n=e.types)&&void 0!==n?n:[])(null!==(r=e.typeRoots)&&void 0!==r?r:["node_modules/@rbxts"]).some((e=>{const n=a.default.resolve(t,e,c);return i.default.existsSync(n)||i.default.existsSync(n+s.DTS_EXT)}))||o.push(`${g('"types"')} ${g(c)} were not found. Make sure the path is relative to \`typeRoots\``);if(void 0===e.rootDir&&void 0===e.rootDirs&&o.push(`${g('"rootDir"')} or ${g('"rootDirs"')} must be defined`),void 0===e.outDir&&o.push(`${g('"outDir"')} must be defined`),void 0!==e.importsNotUsedAsValues){const t=e.importsNotUsedAsValues===l.default.ImportsNotUsedAsValues.Preserve?"true":"false";o.push(`${g('"importsNotUsedAsValues"')} is no longer supported, use ${g(`"verbatimModuleSyntax": ${t}`)} instead`)}if(o.length>0)throw new c.ProjectError(['Invalid "tsconfig.json" configuration!',"https://roblox-ts.com/docs/quick-start#project-folder-setup",o.map((e=>`- ${e}\n`)).join("")].join("\n"))};const i=r(n(651)),o=r(n(1391)),a=r(n(6470)),s=n(6258),c=n(3333),l=r(n(2137)),u=(l.default.ScriptTarget.ESNext,l.default.ModuleKind.CommonJS),_=l.default.ModuleDetectionKind.Force,d=l.default.ModuleResolutionKind.Node10,p=!0,f=!0,m=!0;function g(e){return o.default.yellow(e)}},6581:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1614),t),i(n(4141),t),i(n(2230),t),i(n(6020),t)},8405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileUsesCommentDirectives=function(e,t){var n;if(e.projectOptions.allowCommentDirectives)return[];const i=new Array;for(const e of null!==(n=t.commentDirectives)&&void 0!==n?n:[])i.push(r.errors.noCommentDirectives({sourceFile:t,range:e.range}));const o=t.pragmas.get("ts-nocheck");if(o)for(const e of Array.isArray(o)?o:[o])i.push(r.errors.noCommentDirectives({sourceFile:t,range:e.range}));return i};const r=n(7370)},1627:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createReadBuildProgramHost=function(){return{getCurrentDirectory:i.default.sys.getCurrentDirectory,readFile:i.default.sys.readFile,useCaseSensitiveFileNames:()=>i.default.sys.useCaseSensitiveFileNames}};const i=r(n(2137))},2179:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCustomPreEmitDiagnostics=function(e,t){const n=new Array;for(const i of r)n.push(...i(e,t));return n};const r=[n(8405).fileUsesCommentDirectives]},1164:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lazy=void 0,t.Lazy=class{constructor(e){this.getValue=e,this.isInitialized=!1}get(){return this.isInitialized||(this.isInitialized=!0,this.value=this.getValue()),this.value}set(e){this.isInitialized=!0,this.value=e}}},761:function(e,t,n){"use strict";var r=n(4155),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;const o=i(n(1391));class a{static write(e){this.partial=!e.endsWith("\n"),r.stdout.write(e)}static writeLine(...e){this.partial&&this.write("\n");for(const t of e)this.write(t+"\n")}static writeLineIfVerbose(...e){this.verbose&&this.writeLine(...e)}static warn(e){this.writeLine(`${o.default.yellow("Compiler Warning:")} ${e}`)}static fatal(e){this.writeLine(e),r.exit(1)}}t.LogService=a,a.verbose=!1,a.partial=!1},6258:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PROJECT_OPTIONS=t.ProjectType=t.PARENT_FIELD=t.FILENAME_WARNINGS=t.MODULE_SUBEXT=t.CLIENT_SUBEXT=t.SERVER_SUBEXT=t.INIT_NAME=t.INDEX_NAME=t.DTS_EXT=t.D_EXT=t.TSX_EXT=t.TS_EXT=t.RBXTS_SCOPE=t.NODE_MODULES=t.COMPILER_VERSION=t.INCLUDE_PATH=t.PACKAGE_ROOT=void 0;const i=r(n(6470));t.PACKAGE_ROOT=i.default.join("/","..",".."),t.INCLUDE_PATH=i.default.join(t.PACKAGE_ROOT,"include"),t.COMPILER_VERSION=n(5402).version,t.NODE_MODULES="node_modules",t.RBXTS_SCOPE="@rbxts",t.TS_EXT=".ts",t.TSX_EXT=".tsx",t.D_EXT=".d",t.DTS_EXT=t.D_EXT+t.TS_EXT,t.INDEX_NAME="index",t.INIT_NAME="init",t.SERVER_SUBEXT=".server",t.CLIENT_SUBEXT=".client",t.MODULE_SUBEXT="",t.FILENAME_WARNINGS=new Map;for(const e of[t.SERVER_SUBEXT,t.CLIENT_SUBEXT,t.MODULE_SUBEXT])for(const n of[t.TS_EXT,t.TSX_EXT,t.DTS_EXT])t.FILENAME_WARNINGS.set(t.INIT_NAME+e+n,t.INDEX_NAME+e+n);var o;t.PARENT_FIELD="Parent",function(e){e.Game="game",e.Model="model",e.Package="package"}(o||(t.ProjectType=o={})),t.DEFAULT_PROJECT_OPTIONS={includePath:"",rojo:void 0,type:void 0,watch:!1,usePolling:!1,verbose:!1,noInclude:!1,logTruthyChanges:!1,writeOnlyChanged:!1,writeTransformedFiles:!1,optimizedLoops:!0,allowCommentDirectives:!1,luau:!0}},7370:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.warnings=t.errors=void 0,t.getDiagnosticId=function(e){return e.id};const i=r(n(1391)),o=n(8597),a=n(7253),s=n(9889),c=r(n(2137));function l(e){return"Suggestion: "+i.default.yellow(e)}let u=0;function _(e,...t){return d(e,void 0,...t)}function d(e,t,...n){const r=(i,...a)=>(c.default.DiagnosticCategory.Error,t&&n.push(...t(...a)),(0,o.createDiagnosticWithLocation)(r.id,n.filter((e=>!1!==e)).join("\n"),e,i));return r.id=u++,r}function p(e,...t){return(0,s.createTextDiagnostic)(t.filter((e=>!1!==e)).join("\n"),e)}function f(...e){return _(c.default.DiagnosticCategory.Error,...e)}function m(e,...t){return d(c.default.DiagnosticCategory.Error,e,...t)}function g(...e){return p(c.default.DiagnosticCategory.Error,...e)}function h(...e){return _(c.default.DiagnosticCategory.Warning,...e)}t.errors={noInvalidIdentifier:f("Invalid Luau identifier!","Luau identifiers must start with a letter and only contain letters, numbers, and underscores.","Reserved Luau keywords cannot be used as identifiers."),noReservedIdentifier:f("Cannot use identifier reserved for compiler internal usage."),noReservedClassFields:f("Cannot use class field reserved for compiler internal usage."),noClassMetamethods:f("Metamethods cannot be used in class definitions!"),noForInStatement:f("for-in loop statements are not supported!"),noLabeledStatement:f("labels are not supported!"),noDebuggerStatement:f("`debugger` is not supported!"),noNullLiteral:f("`null` is not supported!",l("Use `undefined` instead.")),noPrivateIdentifier:f("Private identifiers are not supported!"),noTypeOfExpression:f("`typeof` operator is not supported!",l("Use `typeIs(value, type)` or `typeOf(value)` instead.")),noRegex:f("Regular expressions are not supported!"),noBigInt:f("BigInt literals are not supported!"),noAny:f("Using values of type `any` is not supported!",l("Use `unknown` instead.")),noVar:f("`var` keyword is not supported!",l("Use `let` or `const` instead.")),noGetterSetter:f("Getters and Setters are not supported!",(0,a.issue)(457)),noAutoAccessorModifiers:f("Getters and Setters are not supported!","The `accessor` keyword requires generating get/set accessors",(0,a.issue)(457)),noEqualsEquals:f("operator `==` is not supported!",l("Use `===` instead.")),noExclamationEquals:f("operator `!=` is not supported!",l("Use `!==` instead.")),noEnumMerging:f("Enum merging is not supported!"),noNamespaceMerging:f("Namespace merging is not supported!"),noSpreadDestructuring:f("Operator `...` is not supported for destructuring!"),noFunctionExpressionName:f("Function expression names are not supported!"),noPrecedingSpreadElement:f("Spread element must come last in a list of arguments!"),noLuaTupleDestructureAssignmentExpression:f("Cannot destructure LuaTuple expression outside of an ExpressionStatement!"),noExportAssignmentLet:f("Cannot use `export =` on a `let` variable!",l("Use `const` instead.")),noGlobalThis:f("`globalThis` is not supported!"),noArguments:f("`arguments` is not supported!"),noPrototype:f("`prototype` is not supported!"),noRobloxSymbolInstanceof:f("The `instanceof` operator can only be used on roblox-ts classes!",l('Use `typeIs(myThing, "TypeToCheck") instead')),noNonNumberStringRelationOperator:f("Relation operators can only be used on number or string types!"),noInstanceMethodCollisions:f("Static methods cannot use the same name as instance methods!"),noStaticMethodCollisions:f("Instance methods cannot use the same name as static methods!"),noUnaryPlus:f("Unary `+` is not supported!",l("Use `tonumber(x)` instead.")),noNonNumberUnaryMinus:f("Unary `-` is only supported for number types!"),noAwaitForOf:f("`await` is not supported in for-of loops!"),noAsyncGeneratorFunctions:f("Async generator functions are not supported!"),noNonStringModuleSpecifier:f("Module specifiers must be a string literal."),noIterableIteration:f("Iterating on Iterable is not supported! You must use a more specific type."),noMixedTypeCall:f("Attempted to call a function with mixed types! All definitions must either be a method or a callback."),noIndexWithoutCall:f("Cannot index a method without calling it!",l("Use the form `() => a.b()` instead of `a.b`.")),noCommentDirectives:f("Usage of `@ts-ignore`, `@ts-expect-error`, and `@ts-nocheck` are not supported!","roblox-ts needs type and symbol info to compile correctly.",l("Consider using type assertions or `declare` statements.")),noOptionalMacroCall:f("Macro methods can not be optionally called!",l("Macros always exist. Use a normal call.")),noConstructorMacroWithoutNew:f("Cannot index a constructor macro without using the `new` operator!"),noMacroExtends:f("Cannot extend from a macro class!",l("Store an instance of the macro class in a property.")),noMacroUnion:f("Macro cannot be applied to a union type!"),noMacroObjectSpread:f("Macro classes cannot be used in an object spread!",l("Did you mean to use an array spread? `[ ...exp ]`")),noVarArgsMacroSpread:f("Macros which use variadic arguments do not support spread expressions!",(0,a.issue)(1149)),noRangeMacroOutsideForOf:f("$range() macro is only valid as an expression of a for-of loop!"),noTupleMacroOutsideReturn:f("$tuple() macro is only valid as an expression of a return statement!"),noModuleSpecifierFile:f("Could not find file for import. Did you forget to `npm install`?"),noInvalidModule:f("You can only use npm scopes that are listed in your typeRoots."),noUnscopedModule:f("You cannot use modules directly under node_modules."),noNonModuleImport:f("Cannot import a non-ModuleScript!"),noIsolatedImport:f("Attempted to import a file inside of an isolated container from outside!"),noServerImport:f("Cannot import a server file from a shared or client location!",l("Move the file you want to import to a shared location.")),noPrecedingJsxSpreadElement:f("JSX spread expression must come last in children!"),expectedMethodGotFunction:f("Attempted to assign non-method where method was expected."),expectedFunctionGotMethod:f("Attempted to assign method where non-method was expected."),noRojoData:m(((e,t)=>[`Could not find Rojo data. There is no $path in your Rojo config that covers ${e}`,t&&l("Did you forget to add a custom npm scope to your default.project.json?")])),noPackageImportWithoutScope:m(((e,t)=>["Imported package Roblox path is missing an npm scope!",`Package path: ${e}`,`Roblox path: ${t.join(".")}`,l('You might need to update your "node_modules" in default.project.json to match:\n"node_modules": {\n\t"$className": "Folder",\n\t"@rbxts": {\n\t\t"$path": "node_modules/@rbxts"\n\t}\n}')])),incorrectFileName:(e,t,n)=>g(`Incorrect file name: \`${e}\`!`,`Full path: ${n}`,l(`Change \`${e}\` to \`${t}\`.`)),rojoPathInSrc:(e,t)=>g("Invalid Rojo configuration. $path fields should be relative to out directory.",l(`Change the value of $path from "${e}" to "${t}".`))},t.warnings={truthyChange:e=>h(`Value will be checked against ${e}`),stringOffsetChange:e=>h(`String macros no longer offset inputs: ${e}`),transformerNotFound:(e,t)=>function(...e){return p(c.default.DiagnosticCategory.Warning,...e)}(`Transformer \`${e}\` was not found!`,"More info: "+t,l("Did you forget to install the package?")),runtimeLibUsedInReplicatedFirst:h("This statement would generate a call to the runtime library. The runtime library should not be used from ReplicatedFirst.")}},7783:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticError=void 0;const r=n(779),i=n(8301);class o extends r.LoggableError{constructor(e){super(),this.diagnostics=e}toString(){return(0,i.formatDiagnostics)(this.diagnostics)}}t.DiagnosticError=o},779:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggableError=void 0;const r=n(761);t.LoggableError=class{constructor(){}log(){r.LogService.writeLine(this.toString())}}},3333:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectError=void 0;const r=n(7783),i=n(9889);class o extends r.DiagnosticError{constructor(e){super([(0,i.createTextDiagnostic)(e)])}}t.ProjectError=o},2287:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error(`Assertion Failed! ${null!=t?t:""}\nThis is a compiler bug! Please submit a bug report here:\nhttps://github.com/roblox-ts/roblox-ts/issues`)}},8597:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDiagnosticWithLocation=function(e,t,n,r){const i=" roblox-ts";return"kind"in r?{category:n,code:i,messageText:t,id:e,file:r.getSourceFile(),start:r.getStart(),length:r.getWidth()}:{category:n,code:i,messageText:t,id:e,file:r.sourceFile,start:r.range.pos,length:r.range.end}}},7253:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.issue=function(e){return"More information: "+i.default.grey(`https://github.com/roblox-ts/roblox-ts/issues/${e}`)};const i=r(n(1391))},9889:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createTextDiagnostic=function(e,t=i.default.DiagnosticCategory.Error){return{category:t,code:" roblox-ts",file:void 0,messageText:e,start:void 0,length:void 0}};const i=r(n(2137))},2532:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findLastIndex=function(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}},8301:function(e,t,n){"use strict";var r=n(4155),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.formatDiagnostics=function(e){return a.default.formatDiagnosticsWithColorAndContext(e,{getCurrentDirectory:()=>r.cwd(),getCanonicalFileName:e=>e,getNewLine:()=>o.EOL})};const o=n(7435),a=i(n(2137))},4998:function(e,t,n){"use strict";var r,i,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getCanonicalFileName=void 0;const a=o(n(2137));t.getCanonicalFileName=a.default.createGetCanonicalFileName(null===(i=null===(r=a.default.sys)||void 0===r?void 0:r.useCaseSensitiveFileNames)||void 0===i||i)},2991:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOrSetDefault=function(e,t,n){let r=e.get(t);return void 0===r&&(r=n(),e.set(t,r)),r}},7856:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hasErrors=function(e){return e.some((e=>e.category===i.default.DiagnosticCategory.Error))};const i=r(n(2137))},2420:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isPathDescendantOf=function(e,t){return t===e||!i.default.relative(t,e).startsWith("..")};const i=r(n(6470))},4502:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticService=void 0;const r=n(7856);class i{static addSingleDiagnostic(e){this.singleDiagnostics.has(e.code)||(this.singleDiagnostics.add(e.code),this.addDiagnostic(e))}static addDiagnostic(e){this.diagnostics.push(e)}static addDiagnostics(e){this.diagnostics.push(...e)}static addDiagnosticWithCache(e,t,n){n.has(e)||(n.add(e),this.addDiagnostic(t))}static flush(){const e=this.diagnostics;return this.diagnostics=[],this.singleDiagnostics.clear(),e}static hasErrors(){return(0,r.hasErrors)(this.diagnostics)}}t.DiagnosticService=i,i.diagnostics=new Array,i.singleDiagnostics=new Set},1677:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MacroManager=t.NOMINAL_LUA_TUPLE_NAME=t.SYMBOL_NAMES=void 0;const i=n(3333),o=n(2287),a=n(6662),s=n(8221),c=n(8503),l=n(153),u=n(6219),_=r(n(2137));function d(e,t){return e.getTypeAtLocation((0,u.skipUpwards)(t))}t.SYMBOL_NAMES={globalThis:"globalThis",ArrayConstructor:"ArrayConstructor",SetConstructor:"SetConstructor",MapConstructor:"MapConstructor",WeakSetConstructor:"WeakSetConstructor",WeakMapConstructor:"WeakMapConstructor",ReadonlyMapConstructor:"ReadonlyMapConstructor",ReadonlySetConstructor:"ReadonlySetConstructor",Array:"Array",Generator:"Generator",IterableFunction:"IterableFunction",LuaTuple:"LuaTuple",Map:"Map",Object:"Object",ReadonlyArray:"ReadonlyArray",ReadonlyMap:"ReadonlyMap",ReadonlySet:"ReadonlySet",ReadVoxelsArray:"ReadVoxelsArray",Set:"Set",String:"String",TemplateStringsArray:"TemplateStringsArray",WeakMap:"WeakMap",WeakSet:"WeakSet",Iterable:"Iterable",$range:"$range",$tuple:"$tuple"},t.NOMINAL_LUA_TUPLE_NAME="_nominal_LuaTuple";const p=new Set([t.SYMBOL_NAMES.ReadonlyArray,t.SYMBOL_NAMES.Array,t.SYMBOL_NAMES.ReadonlyMap,t.SYMBOL_NAMES.WeakMap,t.SYMBOL_NAMES.Map,t.SYMBOL_NAMES.ReadonlySet,t.SYMBOL_NAMES.WeakSet,t.SYMBOL_NAMES.Set,t.SYMBOL_NAMES.String]);function f(e,t){var n;for(const r of null!==(n=e.declarations)&&void 0!==n?n:[])if(t(r))return r;throw new i.ProjectError("")}function m(e,t,n){const r=e.resolveName(t,void 0,n,!1);if(r)return r;throw new i.ProjectError(`MacroManager could not find symbol for ${t}\nYou may need to update your @rbxts/compiler-types!`)}function g(e){for(const t of e.members)if(_.default.isConstructSignatureDeclaration(t))return(0,o.assert)(t.symbol),t.symbol;throw new i.ProjectError(`MacroManager could not find constructor for ${e.name.text}\nYou may need to update your @rbxts/compiler-types!`)}t.MacroManager=class{constructor(e){var n,r,u;this.symbols=new Map,this.identifierMacros=new Map,this.callMacros=new Map,this.constructorMacros=new Map,this.propertyCallMacros=new Map;for(const[t,n]of Object.entries(c.IDENTIFIER_MACROS)){const r=m(e,t,_.default.SymbolFlags.Variable);this.identifierMacros.set(r,n)}for(const[t,n]of Object.entries(a.CALL_MACROS)){const r=m(e,t,_.default.SymbolFlags.Function);this.callMacros.set(r,n)}for(const[t,n]of Object.entries(s.CONSTRUCTOR_MACROS)){const r=g(f(m(e,t,_.default.SymbolFlags.Interface),_.default.isInterfaceDeclaration));this.constructorMacros.set(r,n)}for(const[t,r]of Object.entries(l.PROPERTY_CALL_MACROS)){const a=m(e,t,_.default.SymbolFlags.Interface),s=new Map;for(const t of null!==(n=a.declarations)&&void 0!==n?n:[])if(_.default.isInterfaceDeclaration(t))for(const n of t.members)if(_.default.isMethodSignature(n)&&_.default.isIdentifier(n.name)){const t=d(e,n).symbol;(0,o.assert)(t),s.set(n.name.text,t)}for(const[e,n]of Object.entries(r)){const r=s.get(e);if(!r)throw new i.ProjectError(`MacroManager could not find method for ${t}.${e}\nYou may need to update your @rbxts/compiler-types!`);this.propertyCallMacros.set(r,n)}}for(const n of Object.values(t.SYMBOL_NAMES)){const t=e.resolveName(n,void 0,_.default.SymbolFlags.All,!1);if(!t)throw new i.ProjectError(`MacroManager could not find symbol for ${n}\nYou may need to update your @rbxts/compiler-types!`);this.symbols.set(n,t)}const p=null===(u=null===(r=this.symbols.get(t.SYMBOL_NAMES.LuaTuple))||void 0===r?void 0:r.declarations)||void 0===u?void 0:u.find((e=>_.default.isTypeAliasDeclaration(e)));if(p){const n=e.getTypeAtLocation(p).getProperty(t.NOMINAL_LUA_TUPLE_NAME);n&&this.symbols.set(t.NOMINAL_LUA_TUPLE_NAME,n)}}getSymbolOrThrow(e){const t=this.symbols.get(e);return(0,o.assert)(t),t}isMacroOnlyClass(e){return this.symbols.get(e.name)===e&&p.has(e.name)}getIdentifierMacro(e){return this.identifierMacros.get(e)}getCallMacro(e){return this.callMacros.get(e)}getConstructorMacro(e){return this.constructorMacros.get(e)}getPropertyCallMacro(e){const t=this.propertyCallMacros.get(e);return!t&&e.parent&&this.symbols.get(e.parent.name)===e.parent&&this.isMacroOnlyClass(e.parent)&&(0,o.assert)(!1,`Macro ${e.parent.name}.${e.name}() is not implemented!`),t}}},8570:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiTransformState=void 0,t.MultiTransformState=class{constructor(){this.isMethodCache=new Map,this.isDefinedAsLetCache=new Map,this.isReportedByNoAnyCache=new Set,this.isReportedByMultipleDefinitionsCache=new Set,this.getModuleExportsCache=new Map,this.getModuleExportsAliasMapCache=new Map}}},7196:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransformState=void 0;const s=o(n(9861)),c=n(1979),l=a(n(6470)),u=n(6258),_=n(7370),d=n(2287),p=n(4998),f=n(2991),m=n(4502),g=n(8446),h=n(4160),y=n(6219),v=n(2161),b=a(n(2137));t.TransformState=class{debugRender(e){const t=new s.RenderState;return(0,s.solveTempIds)(t,e),(0,s.render)(t,e)}debugRenderList(e){const t=new s.RenderState;return(0,s.solveTempIds)(t,e),(0,s.renderStatements)(t,e)}constructor(e,t,n,r,i,o,a,s,c,l,u,_,d){this.program=e,this.data=t,this.services=n,this.pathTranslator=r,this.multiTransformState=i,this.compilerOptions=o,this.rojoResolver=a,this.pkgRojoResolvers=s,this.nodeModulesPathMapping=c,this.runtimeLibRbxPath=l,this.typeChecker=u,this.projectType=_,this.hasExportEquals=!1,this.hasExportFrom=!1,this.classIdentifierMap=new Map,this.tryUsesStack=new Array,this.prereqStatementsStack=new Array,this.hoistsByStatement=new Map,this.isHoisted=new Map,this.getTypeCache=new Map,this.usesRuntimeLib=!1,this.moduleIdBySymbol=new Map,this.symbolToIdMap=new Map,this.classElementToObjectKeyMap=new Map,this.sourceFileText=d.getFullText(),this.resolver=u.getEmitResolver(d);const p=this.pathTranslator.getOutputPath(d.fileName),f=this.rojoResolver.getRbxPathFromFilePath(p);this.isInReplicatedFirst=void 0!==f&&"ReplicatedFirst"===f[0]}pushTryUsesStack(){const e={usesReturn:!1,usesBreak:!1,usesContinue:!1};return this.tryUsesStack.push(e),e}markTryUses(e){0!==this.tryUsesStack.length&&(this.tryUsesStack[this.tryUsesStack.length-1][e]=!0)}popTryUsesStack(){this.tryUsesStack.pop()}prereq(e){s.default.list.push(this.prereqStatementsStack[this.prereqStatementsStack.length-1],e)}prereqList(e){s.default.list.pushList(this.prereqStatementsStack[this.prereqStatementsStack.length-1],e)}pushPrereqStatementsStack(){const e=s.default.list.make();return this.prereqStatementsStack.push(e),e}popPrereqStatementsStack(){const e=this.prereqStatementsStack.pop();return(0,d.assert)(e),e}getLeadingComments(e){var t;const n=null!==(t=b.default.getLeadingCommentRanges(this.sourceFileText,e.pos))&&void 0!==t?t:[];return s.default.list.make(...n.map((e=>s.default.comment(this.sourceFileText.substring(e.pos+2,e.kind===b.default.SyntaxKind.SingleLineCommentTrivia?e.end:e.end-2)))))}capturePrereqs(e){return this.pushPrereqStatementsStack(),e(),this.popPrereqStatementsStack()}capture(e){let t;const n=this.capturePrereqs((()=>t=e()));return[t,n]}noPrereqs(e){let t;const n=this.capturePrereqs((()=>t=e()));return(0,d.assert)(s.default.list.isEmpty(n)),t}getType(e){return(0,f.getOrSetDefault)(this.getTypeCache,e,(()=>this.typeChecker.getTypeAtLocation((0,y.skipUpwards)(e))))}TS(e,t){return this.usesRuntimeLib=!0,this.projectType===u.ProjectType.Game&&this.isInReplicatedFirst&&m.DiagnosticService.addDiagnostic(_.warnings.runtimeLibUsedInReplicatedFirst(e)),s.default.property(s.default.globals.TS,t)}createRuntimeLibImport(e){if(this.runtimeLibRbxPath){if(this.projectType===u.ProjectType.Game){const e=this.runtimeLibRbxPath[0];(0,d.assert)(e);let t=(0,g.createGetService)(e);for(let e=1;ee===c.RbxPathParent?u.PARENT_FIELD:e)))])}):(m.DiagnosticService.addDiagnostic(_.errors.noRojoData(e,l.default.relative(this.data.projectPath,t),!1)),s.default.create(s.default.SyntaxKind.VariableDeclaration,{left:s.default.globals.TS,right:s.default.none()}))}}return s.default.create(s.default.SyntaxKind.VariableDeclaration,{left:s.default.globals.TS,right:s.default.create(s.default.SyntaxKind.ComputedIndexExpression,{expression:s.default.globals._G,index:s.default.globals.script})})}pushToVar(e,t){const n=s.default.tempId(t||e&&(0,v.valueToIdStr)(e));return this.prereq(s.default.create(s.default.SyntaxKind.VariableDeclaration,{left:n,right:e})),n}pushToVarIfComplex(e,t){return s.default.isSimple(e)?e:this.pushToVar(e,t)}pushToVarIfNonId(e,t){return s.default.isAnyIdentifier(e)?e:this.pushToVar(e,t)}getModuleExports(e){return(0,f.getOrSetDefault)(this.multiTransformState.getModuleExportsCache,e,(()=>this.typeChecker.getExportsOfModule(e)))}getModuleExportsAliasMap(e){return(0,f.getOrSetDefault)(this.multiTransformState.getModuleExportsAliasMapCache,e,(()=>{var t;const n=new Map;for(const r of this.getModuleExports(e)){const e=b.default.skipAlias(r,this.typeChecker),i=null===(t=r.getDeclarations())||void 0===t?void 0:t[0];i&&b.default.isExportSpecifier(i)?n.set(e,i.name.text):n.set(e,r.name)}return n}))}getModuleSymbolFromNode(e){const t=(0,y.getModuleAncestor)(e),n=this.typeChecker.getSymbolAtLocation(b.default.isSourceFile(t)?t:t.name);return(0,d.assert)(n),n}getModuleIdFromSymbol(e){const t=this.moduleIdBySymbol.get(e);return(0,d.assert)(t),t}setModuleIdBySymbol(e,t){this.moduleIdBySymbol.set(e,t)}getModuleIdFromNode(e){const t=this.getModuleSymbolFromNode(e);return this.getModuleIdFromSymbol(t)}getModuleIdPropertyAccess(e){if(e.valueDeclaration){const t=this.getModuleSymbolFromNode(e.valueDeclaration),n=this.getModuleExportsAliasMap(t).get(e);if(n)return s.default.property(this.getModuleIdFromSymbol(t),n)}}guessVirtualPath(e){var t,n,r;const i=null===(n=(t=this.program).getSymlinkCache)||void 0===n?void 0:n.call(t).getSymlinkedDirectoriesByRealpath();if(!i)return;const o=e;for(;;){const t=b.default.ensureTrailingDirectorySeparator(l.default.dirname(e));if(e===t)break;e=t;const n=null===(r=i.get(b.default.toPath(e,this.program.getCurrentDirectory(),p.getCanonicalFileName)))||void 0===r?void 0:r[0];if(n)return l.default.join(n,l.default.relative(e,o))}}setClassElementObjectKey(e,t){(0,d.assert)(!this.classElementToObjectKeyMap.has(e)),this.classElementToObjectKeyMap.set(e,t)}getClassElementObjectKey(e){return this.classElementToObjectKeyMap.get(e)}}},3115:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSourceFile=void 0,i(n(1677),t),i(n(8570),t),i(n(7196),t);var o=n(8228);Object.defineProperty(t,"transformSourceFile",{enumerable:!0,get:function(){return o.transformSourceFile}})},6662:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CALL_MACROS=void 0;const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6453),c=n(3842),l=n(410),u=new Set(["nil","boolean","string","number","table","userdata","function","thread","vector","buffer"]);t.CALL_MACROS={assert:(e,t,n,r)=>(r[0]=(0,l.createTruthinessChecks)(e,r[0],t.arguments[0]),i.default.call(i.default.globals.assert,r)),typeOf:(e,t,n,r)=>i.default.call(i.default.globals.typeof,r),typeIs:(e,t,n,r)=>{const[o,a]=r,s=i.default.isStringLiteral(a)&&u.has(a.value)?i.default.globals.type:i.default.globals.typeof;return i.default.binary(i.default.call(s,[o]),"==",a)},classIs:(e,t,n,r)=>{const[o,a]=r;return i.default.binary(i.default.property((0,s.convertToIndexableExpression)(o),"ClassName"),"==",a)},identity:(e,t,n,r)=>r[0],$range:(e,t)=>(a.DiagnosticService.addDiagnostic(o.errors.noRangeMacroOutsideForOf(t.expression)),i.default.none()),$tuple:(e,t)=>(a.DiagnosticService.addDiagnostic(o.errors.noTupleMacroOutsideReturn(t)),i.default.none()),$getModuleTree:(e,t)=>{const n=(0,c.getImportParts)(e,t.getSourceFile(),t.arguments[0]);return i.default.array([n.shift(),i.default.array(n)])}}},8221:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTRUCTOR_MACROS=void 0;const i=r(n(9861)),o=n(2287),a=n(6671),s=n(7034),c=r(n(2137));function l(e,t,n){return i.default.call(i.default.globals.setmetatable,[n(e,t),i.default.map([[i.default.strings.__mode,i.default.strings.k]])])}const u=(e,t)=>{if(!t.arguments||0===t.arguments.length)return i.default.set();const n=t.arguments[0];if(c.default.isArrayLiteralExpression(n)&&!n.elements.some(c.default.isSpreadElement))return i.default.set((0,s.ensureTransformOrder)(e,n.elements));{const t=e.pushToVar(i.default.set(),"set"),r=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(i.default.tempId(),r),expression:(0,a.transformExpression)(e,n),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:r}),operator:"=",right:i.default.bool(!0)}))})),t}},_=(e,t)=>{if(!t.arguments||0===t.arguments.length)return i.default.map();const n=t.arguments[0],r=(0,a.transformExpression)(e,n);if(i.default.isArray(r)&&i.default.list.every(r.members,(e=>i.default.isArray(e)))){const e=i.default.list.toArray(r.members).map((e=>((0,o.assert)(i.default.isArray(e)&&i.default.list.isNonEmpty(e.members)),[e.members.head.value,e.members.head.next.value])));return i.default.map(e)}{const t=e.pushToVar(i.default.map(),"map"),n=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(i.default.tempId(),n),expression:r,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:i.default.number(1)})}),operator:"=",right:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:i.default.number(2)})}))})),t}};t.CONSTRUCTOR_MACROS={ArrayConstructor:(e,t)=>{if(t.arguments&&t.arguments.length>0){const n=(0,s.ensureTransformOrder)(e,t.arguments);return i.default.call(i.default.globals.table.create,n)}return i.default.array()},SetConstructor:u,MapConstructor:_,WeakSetConstructor:(e,t)=>l(e,t,u),WeakMapConstructor:(e,t)=>l(e,t,_),ReadonlyMapConstructor:_,ReadonlySetConstructor:u}},8503:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDENTIFIER_MACROS=void 0,t.IDENTIFIER_MACROS={Promise:(e,t)=>e.TS(t,"Promise")}},153:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTY_CALL_MACROS=void 0;const i=r(n(9861)),o=n(2287),a=n(6453),s=n(6409),c=n(9582),l=n(1915),u=n(2161),_=r(n(2137));function d(e){return(t,n,r,o)=>{let a=o[0];return i.default.isSimple(a)||(a=i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:a})),i.default.binary(r,e,a)}}const p=new Map([["+","add"],["-","sub"],["*","mul"],["/","div"],["//","idiv"]]);function f(...e){const t={};for(const n of e){const e=p.get(n);(0,o.assert)(e),t[e]=d(n)}return t}function m(e){return(t,n,r,o)=>i.default.call(e,[r,...o])}const g={size:(e,t,n)=>i.default.unary("#",n),byte:m(i.default.globals.string.byte),find:m(i.default.globals.string.find),format:m(i.default.globals.string.format),gmatch:m(i.default.globals.string.gmatch),gsub:m(i.default.globals.string.gsub),lower:m(i.default.globals.string.lower),match:m(i.default.globals.string.match),rep:m(i.default.globals.string.rep),reverse:m(i.default.globals.string.reverse),split:m(i.default.globals.string.split),sub:m(i.default.globals.string.sub),upper:m(i.default.globals.string.upper)};function h(e,t){return(n,r,o,a)=>{o=n.pushToVarIfComplex(o,"exp");const s=n.pushToVar(i.default.bool(t),"result"),c=n.pushToVarIfNonId(a[0],"callback"),l=i.default.tempId("k"),u=i.default.tempId("v"),_=i.default.call(c,e(l,u,o));return n.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(l,u),expression:o,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:t?i.default.unary("not",_):_,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:s,operator:"=",right:i.default.bool(!t)}),i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}))})),s}}const y={size:(e,t,n)=>i.default.unary("#",n)},v={isEmpty:(e,t,n)=>i.default.binary(i.default.unary("#",n),"==",i.default.number(0)),join:(e,t,n,r)=>{r=function(e,t,n){for(let r=0;r{const o=[n,(0,c.offset)(r[0],1),(0,c.offset)(r[1],1),(0,c.offset)(r[2],1)];return r[3]&&o.push(r[3]),i.default.call(i.default.globals.table.move,o)},includes:(e,t,n,r)=>{const o=[n,r[0]];return r[1]&&o.push((0,c.offset)(r[1],1)),i.default.binary(i.default.call(i.default.globals.table.find,o),"~=",i.default.nil())},indexOf:(e,t,n,r)=>{const o=[n,r[0]];return r.length>1&&o.push((0,c.offset)(r[1],1)),(0,c.offset)(i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.call(i.default.globals.table.find,o),operator:"or",right:i.default.number(0)}),-1)},every:(b=(e,t,n)=>[t,(0,c.offset)(e,-1),n],h(b,!0)),some:h(((e,t,n)=>[t,(0,c.offset)(e,-1),n]),!1),forEach:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("k"),l=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(a,l),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(o,[l,(0,c.offset)(a,-1),n])}))})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil()},map:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVar(i.default.call(i.default.globals.table.create,[i.default.unary("#",n)]),"newValue"),a=e.pushToVarIfNonId(r[0],"callback"),s=i.default.tempId("k"),l=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s,l),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:o,index:s}),operator:"=",right:i.default.call(a,[l,(0,c.offset)(s,-1),n])}))})),o},mapFiltered:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVar(i.default.array(),"newValue"),a=e.pushToVarIfNonId(r[0],"callback"),s=e.pushToVar(i.default.number(0),"length"),l=i.default.tempId("k"),u=i.default.tempId("v"),_=i.default.tempId("result");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(l,u),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:_,right:i.default.call(a,[u,(0,c.offset)(l,-1),n])}),i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(_,"~=",i.default.nil()),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:s,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:o,index:s}),operator:"=",right:_})),elseBody:i.default.list.make()}))})),o},filterUndefined:(e,t,n)=>{n=e.pushToVarIfComplex(n,"exp");const r=e.pushToVar(i.default.number(0),"length"),o=i.default.tempId("i");e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(o),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(o,">",r),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:o})),elseBody:i.default.list.make()}))}));const s=e.pushToVar(i.default.array(),"result"),c=e.pushToVar(i.default.number(0),"resultLength"),l=i.default.tempId("i"),u=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.NumericForStatement,{id:l,start:i.default.number(1),end:r,step:void 0,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:u,right:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:l})}),i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(u,"~=",i.default.nil()),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:c,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:s,index:c}),operator:"=",right:u})),elseBody:i.default.list.make()}))})),s},filter:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVar(i.default.array(),"newValue"),a=e.pushToVarIfNonId(r[0],"callback"),s=e.pushToVar(i.default.number(0),"length"),l=i.default.tempId("k"),u=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(l,u),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.call(a,[u,(0,c.offset)(l,-1),n]),operator:"==",right:i.default.bool(!0)}),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:s,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:o,index:s}),operator:"=",right:u})),elseBody:i.default.list.make()}))})),o},reduce:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");let o=i.default.number(1);const s=i.default.unary("#",n),l=i.default.unary("#",n);let u;r.length<2?(e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(l,"==",i.default.number(0)),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.error,[i.default.string("Attempted to call `ReadonlyArray.reduce()` on an empty array without an initialValue.")])})),elseBody:i.default.list.make()})),u=e.pushToVar(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),"result"),o=(0,c.offset)(o,1)):u=e.pushToVar(r[1],"result");const _=e.pushToVar(r[0],"callback"),d=i.default.tempId("i");return e.prereq(i.default.create(i.default.SyntaxKind.NumericForStatement,{id:d,start:o,end:s,step:void 0,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:u,operator:"=",right:i.default.call(_,[u,i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:d}),(0,c.offset)(d,-1),n])}))})),u},find:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("i"),s=i.default.tempId("v"),l=e.pushToVar(void 0,"result");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{expression:n,ids:i.default.list.make(a,s),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.call(o,[s,(0,c.offset)(a,-1),n]),operator:"==",right:i.default.bool(!0)}),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:l,operator:"=",right:s}),i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}))})),l},findIndex:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("i"),s=i.default.tempId("v"),l=e.pushToVar(i.default.number(-1),"result");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{expression:n,ids:i.default.list.make(a,s),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.call(o,[s,(0,c.offset)(a,-1),n]),operator:"==",right:i.default.bool(!0)}),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:l,operator:"=",right:(0,c.offset)(a,-1)}),i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}))})),l}};var b;const x={push:(e,t,n,r)=>{if(0===r.length)return i.default.unary("#",n);n=e.pushToVarIfComplex(n,"exp");for(let t=0;t{n=e.pushToVarIfComplex(n,"exp");let r=i.default.unary("#",n);const o=!(0,s.isUsedAsStatement)(t);let c;return o&&(r=e.pushToVar(r,"length"),c=e.pushToVar(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r}),"result")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r}),operator:"=",right:i.default.nil()})),o?c:i.default.none()},shift:(e,t,n)=>i.default.call(i.default.globals.table.remove,[n,i.default.number(1)]),unshift:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");for(let t=r.length-1;t>=0;t--){const o=r[t];e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.insert,[n,i.default.number(1),o])}))}return(0,s.isUsedAsStatement)(t)?i.default.none():i.default.unary("#",n)},insert:(e,t,n,r)=>i.default.call(i.default.globals.table.insert,[n,(0,c.offset)(r[0],1),r[1]]),remove:(e,t,n,r)=>i.default.call(i.default.globals.table.remove,[n,(0,c.offset)(r[0],1)]),unorderedRemove:(e,t,n,r)=>{const o=e.pushToVarIfComplex((0,c.offset)(r[0],1),"index");n=e.pushToVarIfComplex(n,"exp");const l=e.pushToVar(i.default.unary("#",n),"length"),u=!(0,s.isUsedAsStatement)(t),_=e.pushToVar(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),"value");return e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(_,"~=",i.default.nil()),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),operator:"=",right:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:l})}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:l}),operator:"=",right:i.default.nil()})),elseBody:i.default.list.make()})),u?_:i.default.none()},sort:(e,t,n,r)=>{const o=!(0,s.isUsedAsStatement)(t);return o&&(n=e.pushToVarIfComplex(n,"exp")),r.unshift(n),e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.sort,r)})),o?n:i.default.none()},clear:(e,t,n)=>(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.clear,[n])})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil())},S={isEmpty:(e,t,n)=>i.default.binary(i.default.call(i.default.globals.next,[n]),"==",i.default.nil()),size:(e,t,n)=>{const r=e.pushToVar(i.default.number(0),"size");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(i.default.tempId()),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}))})),r},has:(e,t,n,r)=>{const o=i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r[0]});return i.default.binary(o,"~=",i.default.nil())}},k={delete:(e,t,n,r)=>{const o=e.pushToVarIfComplex(r[0],"value"),c=!(0,s.isUsedAsStatement)(t);let l;return c&&(n=e.pushToVarIfNonId(n,"exp"),l=e.pushToVar(i.default.create(i.default.SyntaxKind.BinaryExpression,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:o}),operator:"~=",right:i.default.nil()}),"valueExisted")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),operator:"=",right:i.default.nil()})),c?l:i.default.none()},clear:(e,t,n)=>(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.clear,[n])})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil())},T={...S,forEach:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(a),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(o,[a,a,n])}))})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil()}},C={...k,add:(e,t,n,r)=>{const o=!(0,s.isUsedAsStatement)(t);return o&&(n=e.pushToVarIfComplex(n,"exp")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r[0]}),operator:"=",right:i.default.bool(!0)})),o?n:i.default.none()}},w={...S,forEach:(e,t,n,r)=>{n=e.pushToVarIfComplex(n,"exp");const o=e.pushToVarIfNonId(r[0],"callback"),a=i.default.tempId("k"),c=i.default.tempId("v");return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(a,c),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(o,[c,a,n])}))})),(0,s.isUsedAsStatement)(t)?i.default.none():i.default.nil()},get:(e,t,n,r)=>i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:r[0]})},D={...k,set:(e,t,n,r)=>{const[o,c]=r,l=!(0,s.isUsedAsStatement)(t);return l&&(n=e.pushToVarIfComplex(n,"exp")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,a.convertToIndexableExpression)(n),index:o}),operator:"=",right:c})),l?n:i.default.none()}},E={then:(e,t,n,r)=>i.default.create(i.default.SyntaxKind.MethodCallExpression,{expression:(0,a.convertToIndexableExpression)(n),name:"andThen",args:i.default.list.make(...r)})};function P(e,t){return(n,r,o,a)=>{const[s,c]=n.capture((()=>t(n,r,o,a)));let l=i.default.list.size(c);if(l>0){const t=function(e,t){if(i.default.list.isNonEmpty(e)){const n=e.head.value;if(i.default.isVariableDeclaration(n)&&!i.default.list.isList(n.left)&&i.default.isTemporaryIdentifier(n.left)&&n.right===t)return!0}return!1}(c,o);let n;t&&(n=i.default.list.shift(c),l--),l>1?(i.default.list.unshift(c,(u=e,i.default.comment(` â–¼ ${u} â–¼`))),t&&n&&i.default.list.unshift(c,n),i.default.list.push(c,function(e){return i.default.comment(` â–² ${e} â–²`)}(e))):t&&n&&i.default.list.unshift(c,n)}var u;return n.prereqList(c),s}}t.PROPERTY_CALL_MACROS={CFrame:f("+","-","*"),UDim:f("+","-"),UDim2:f("+","-"),Vector2:f("+","-","*","/","//"),Vector2int16:f("+","-","*","/"),Vector3:f("+","-","*","/","//"),Vector3int16:f("+","-","*","/"),Number:f("//"),String:g,ArrayLike:y,ReadonlyArray:v,Array:x,ReadonlySet:T,Set:C,ReadonlyMap:w,Map:D,Promise:E};for(const[e,n]of Object.entries(t.PROPERTY_CALL_MACROS))for(const[t,r]of Object.entries(n))n[t]=P(`${e}.${t}`,r)},7598:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformArrayAssignmentPattern=function e(t,n,r){let m=0;const g=new Array,h=(0,_.getAccessorForBindingType)(t,n,t.typeChecker.getTypeOfAssignmentPattern(n));for(let _ of n.elements){if(f.default.isOmittedExpression(_))h(t,r,m,g,!0);else if(f.default.isSpreadElement(_))s.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(_));else{let n;f.default.isBinaryExpression(_)&&(n=(0,p.skipDownwards)(_.right),_=(0,p.skipDownwards)(_.left));const o=h(t,r,m,g,!1);if(f.default.isIdentifier(_)||f.default.isElementAccessExpression(_)||f.default.isPropertyAccessExpression(_)){const e=(0,u.transformWritableExpression)(t,_,void 0!==n);t.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:e,operator:"=",right:o})),n&&t.prereq((0,l.transformInitializer)(t,e,n))}else if(f.default.isArrayLiteralExpression(_)){const r=t.pushToVar(o,"binding");n&&t.prereq((0,l.transformInitializer)(t,r,n)),e(t,_,r)}else if(f.default.isObjectLiteralExpression(_)){const e=t.pushToVar(o,"binding");n&&t.prereq((0,l.transformInitializer)(t,e,n)),(0,c.transformObjectAssignmentPattern)(t,_,e)}else(0,a.assert)(!1,`transformArrayAssignmentPattern invalid element: ${(0,d.getKindName)(_.kind)}`)}m++}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(2865),l=n(1782),u=n(7010),_=n(3550),d=n(2036),p=n(6219),f=r(n(2137))},2396:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformArrayBindingPattern=function e(t,n,r){(0,u.validateNotAnyType)(t,n);let d=0;const p=new Array,f=(0,l.getAccessorForBindingType)(t,n,t.getType(n));for(const l of n.elements){if(_.default.isOmittedExpression(l))f(t,r,d,p,!0);else{if(l.dotDotDotToken)return void o.DiagnosticService.addDiagnostic(i.errors.noSpreadDestructuring(l));const n=l.name,u=f(t,r,d,p,!1);if(_.default.isIdentifier(n)){const e=(0,s.transformVariable)(t,n,u);l.initializer&&t.prereq((0,c.transformInitializer)(t,e,l.initializer))}else{const r=t.pushToVar(u,"binding");l.initializer&&t.prereq((0,c.transformInitializer)(t,r,l.initializer)),_.default.isArrayBindingPattern(n)?e(t,n,r):(0,a.transformObjectBindingPattern)(t,n,r)}}d++}};const i=n(7370),o=n(4502),a=n(5235),s=n(8007),c=n(1782),l=n(3550),u=n(3972),_=r(n(2137))},1822:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformBindingName=function(e,t,n){let r;return c.default.isIdentifier(t)?r=(0,s.transformIdentifierDefined)(e,t):(r=i.default.tempId("binding"),i.default.list.pushList(n,e.capturePrereqs((()=>{c.default.isArrayBindingPattern(t)?(0,o.transformArrayBindingPattern)(e,t,r):(0,a.transformObjectBindingPattern)(e,t,r)})))),r};const i=r(n(9861)),o=n(2396),a=n(5235),s=n(6848),c=r(n(2137))},2865:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformObjectAssignmentPattern=function e(t,n,r){for(const m of n.properties)if(f.default.isShorthandPropertyAssignment(m)){const e=m.name,o=(0,_.objectAccessor)(t,r,t.typeChecker.getTypeOfAssignmentPattern(n),e),s=(0,u.transformWritableExpression)(t,e,void 0!==m.objectAssignmentInitializer);t.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:s,operator:"=",right:o})),(0,a.assert)(i.default.isAnyIdentifier(s)),m.objectAssignmentInitializer&&t.prereq((0,l.transformInitializer)(t,s,m.objectAssignmentInitializer))}else{if(f.default.isSpreadAssignment(m))return void s.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(m));if(f.default.isPropertyAssignment(m)){const o=m.name;let s,g=m.initializer;f.default.isBinaryExpression(m.initializer)&&(s=(0,p.skipDownwards)(m.initializer.right),g=(0,p.skipDownwards)(m.initializer.left));const h=(0,_.objectAccessor)(t,r,t.typeChecker.getTypeOfAssignmentPattern(n),o);if(f.default.isIdentifier(g)||f.default.isElementAccessExpression(g)||f.default.isPropertyAccessExpression(g)){const e=(0,u.transformWritableExpression)(t,g,void 0!==s);t.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:e,operator:"=",right:h})),s&&t.prereq((0,l.transformInitializer)(t,e,s))}else if(f.default.isArrayLiteralExpression(g)){const e=t.pushToVar(h,"binding");s&&t.prereq((0,l.transformInitializer)(t,e,s)),(0,a.assert)(f.default.isIdentifier(o)),(0,c.transformArrayAssignmentPattern)(t,g,e)}else if(f.default.isObjectLiteralExpression(g)){const n=t.pushToVar(h,"binding");s&&t.prereq((0,l.transformInitializer)(t,n,s)),e(t,g,n)}else(0,a.assert)(!1,`transformObjectAssignmentPattern invalid initializer: ${(0,d.getKindName)(g.kind)}`)}else(0,a.assert)(!1,`transformObjectAssignmentPattern invalid property: ${(0,d.getKindName)(m.kind)}`)}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(7598),l=n(1782),u=n(7010),_=n(529),d=n(2036),p=n(6219),f=r(n(2137))},5235:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformObjectBindingPattern=function e(t,n,r){(0,_.validateNotAnyType)(t,n);for(const _ of n.elements){if(_.dotDotDotToken)return void a.DiagnosticService.addDiagnostic(i.errors.noSpreadDestructuring(_));const p=_.name,f=_.propertyName;if(d.default.isIdentifier(p)){const e=(0,u.objectAccessor)(t,r,t.getType(n),null!=f?f:p),i=(0,c.transformVariable)(t,p,e);_.initializer&&t.prereq((0,l.transformInitializer)(t,i,_.initializer))}else{(0,o.assert)(f);const i=(0,u.objectAccessor)(t,r,t.getType(n),f),a=t.pushToVar(i,"binding");_.initializer&&t.prereq((0,l.transformInitializer)(t,a,_.initializer)),d.default.isArrayBindingPattern(p)?(0,s.transformArrayBindingPattern)(t,p,a):e(t,p,a)}}};const i=n(7370),o=n(2287),a=n(4502),s=n(2396),c=n(8007),l=n(1782),u=n(529),_=n(3972),d=r(n(2137))},7759:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformImplicitClassConstructor=function(e,t,n){const r=i.default.list.make();let o=!1;return(0,d.getExtendsNode)(t)&&(o=!0,i.default.list.push(r,i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.property(i.default.globals.super,m),[i.default.globals.self,i.default.create(i.default.SyntaxKind.VarArgsLiteral,{})])}))),i.default.list.pushList(r,g(e,t)),i.default.list.make(i.default.create(i.default.SyntaxKind.MethodDeclaration,{expression:n,name:m,statements:r,parameters:i.default.list.make(),hasDotDotDot:o}))},t.transformClassConstructor=function(e,t,n){const{statements:r,parameters:o,hasDotDotDot:a}=(0,l.transformParameters)(e,t),s=(0,p.getStatements)(t.body),u=s.findIndex((e=>f.default.isExpressionStatement(e)&&f.default.isSuperCall(e.expression)));i.default.list.pushList(r,(0,_.transformStatementList)(e,t.body,s.slice(0,u+1)));for(const n of t.parameters)if(f.default.isParameterPropertyDeclaration(n,n.parent)){const t=(0,c.transformIdentifierDefined)(e,n.name);i.default.list.push(r,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(i.default.globals.self,t.name),operator:"=",right:t}))}return i.default.list.pushList(r,g(e,t.parent)),i.default.list.pushList(r,(0,_.transformStatementList)(e,t.body,s.slice(u+1))),i.default.list.make(i.default.create(i.default.SyntaxKind.MethodDeclaration,{expression:n,name:m,statements:r,parameters:o,hasDotDotDot:a}))};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(6848),l=n(7937),u=n(5671),_=n(8043),d=n(9655),p=n(1441),f=r(n(2137)),m="constructor";function g(e,t){const n=i.default.list.make();for(const r of t.members){if(!f.default.isPropertyDeclaration(r))continue;if(f.default.hasStaticModifier(r))continue;const c=r.name;if(f.default.isPrivateIdentifier(c)){a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(t));continue}const l=r.initializer;if(!l)continue;const[_,d]=e.capture((()=>(0,u.transformPropertyName)(e,c)));i.default.list.pushList(n,d);const[p,m]=e.capture((()=>(0,s.transformExpression)(e,l)));i.default.list.pushList(n,m),i.default.list.push(n,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:i.default.globals.self,index:_}),operator:"=",right:p}))}return n}},5082:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformClassLikeDeclaration=function(e,t){const n=b.default.isClassExpression(t),r=i.default.list.make(),S=b.default.hasSyntacticModifier(t,b.default.ModifierFlags.ExportDefault);t.name&&(0,y.validateIdentifier)(e,t.name);const k=n&&void 0!==t.name;let T,C;T=k?i.default.tempId("class"):t.name?(0,d.transformIdentifierDefined)(e,t.name):S?i.default.id("default"):i.default.tempId("class"),C=k?(0,d.transformIdentifierDefined)(e,t.name):T,e.classIdentifierMap.set(t,C),function(e,t){if(t.name){const n=e.typeChecker.getSymbolAtLocation(t.name);return(0,a.assert)(n),!0===e.isHoisted.get(n)}return!1}(e,t)||i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:T,right:void 0}));const w=i.default.list.make();i.default.list.pushList(w,function(e,t,n,r){const o=b.default.hasAbstractModifier(t),a=i.default.list.make(),s=(0,g.getExtendsNode)(t);if(o&&!s)i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:i.default.map()}));else{const o=i.default.list.make();if(i.default.list.push(o,i.default.create(i.default.SyntaxKind.MapField,{index:i.default.strings.__tostring,value:(c=i.default.isTemporaryIdentifier(n)?"Anonymous":n.name,i.default.create(i.default.SyntaxKind.FunctionExpression,{statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.string(c)})),parameters:i.default.list.make(),hasDotDotDot:!1}))})),s){const[t,n]=e.capture((()=>(0,_.transformExpression)(e,s.expression))),r=i.default.id("super");i.default.list.pushList(a,n),i.default.list.push(a,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:t})),i.default.list.push(o,i.default.create(i.default.SyntaxKind.MapField,{index:i.default.strings.__index,value:r}))}const l=i.default.call(i.default.globals.setmetatable,[i.default.map(),i.default.create(i.default.SyntaxKind.Map,{fields:o})]);r&&t.name?i.default.list.push(a,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:(0,d.transformIdentifierDefined)(e,t.name),right:l})):i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:l})),i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(n,"__index"),operator:"=",right:n}))}var c;if(!o){const e=i.default.list.make();i.default.list.push(e,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.globals.self,right:i.default.call(i.default.globals.setmetatable,[i.default.map(),n])})),i.default.list.push(e,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.binary(i.default.create(i.default.SyntaxKind.MethodCallExpression,{expression:i.default.globals.self,name:"constructor",args:i.default.list.make(i.default.create(i.default.SyntaxKind.VarArgsLiteral,{}))}),"or",i.default.globals.self)})),i.default.list.push(a,i.default.create(i.default.SyntaxKind.FunctionDeclaration,{name:i.default.property(n,"new"),parameters:i.default.list.make(),hasDotDotDot:!0,statements:e,localize:!1}))}return a}(e,t,C,n));const D=(0,m.findConstructor)(t);D?i.default.list.pushList(w,(0,c.transformClassConstructor)(e,D,C)):i.default.list.pushList(w,(0,c.transformImplicitClassConstructor)(e,t,C));for(const e of t.members)if((b.default.isPropertyDeclaration(e)||b.default.isMethodDeclaration(e))&&(b.default.isIdentifier(e.name)||b.default.isStringLiteral(e.name))&&i.default.isReservedClassField(e.name.text)&&s.DiagnosticService.addDiagnostic(o.errors.noReservedClassFields(e.name)),b.default.isAutoAccessorPropertyDeclaration(e)){const t=b.default.getModifiers(e).find((e=>e.kind===b.default.SyntaxKind.AccessorKeyword));s.DiagnosticService.addDiagnostic(o.errors.noAutoAccessorModifiers(t))}const E=new Array,P=new Array;for(const n of t.members)if((0,v.validateMethodAssignment)(e,n),!(b.default.isConstructorDeclaration(n)||b.default.isIndexSignatureDeclaration(n)||b.default.isSemicolonClassElement(n)))if(b.default.isMethodDeclaration(n))E.push(n);else if(b.default.isPropertyDeclaration(n)){if(!b.default.hasStaticModifier(n))continue;P.push(n)}else b.default.isAccessor(n)?s.DiagnosticService.addDiagnostic(o.errors.noGetterSetter(n)):b.default.isClassStaticBlockDeclaration(n)?P.push(n):(0,a.assert)(!1,`ClassMember kind not implemented: ${(0,h.getKindName)(n.kind)}`);const N=e.typeChecker.getTypeOfSymbolAtLocation(t.symbol,t),F=e.typeChecker.getDeclaredTypeOfSymbol(t.symbol);for(const t of E){(b.default.isIdentifier(t.name)||b.default.isStringLiteral(t.name))&&(i.default.isMetamethod(t.name.text)&&s.DiagnosticService.addDiagnostic(o.errors.noClassMetamethods(t.name)),b.default.hasStaticModifier(t)?void 0!==F.getProperty(t.name.text)&&s.DiagnosticService.addDiagnostic(o.errors.noInstanceMethodCollisions(t)):void 0!==N.getProperty(t.name.text)&&s.DiagnosticService.addDiagnostic(o.errors.noStaticMethodCollisions(t)));const[n,r]=e.capture((()=>(0,f.transformMethodDeclaration)(e,t,{name:"name",value:C})));i.default.list.pushList(w,r),i.default.list.pushList(w,n)}const A=F.getProperty(x);A&&A.flags&b.default.SymbolFlags.Method&&i.default.list.push(w,i.default.create(i.default.SyntaxKind.MethodDeclaration,{expression:C,name:"__tostring",hasDotDotDot:!1,parameters:i.default.list.make(),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.create(i.default.SyntaxKind.MethodCallExpression,{expression:i.default.globals.self,name:x,args:i.default.list.make()})}))}));for(const t of P)if(b.default.isClassStaticBlockDeclaration(t))i.default.list.pushList(w,(0,p.transformBlock)(e,t.body));else{const[n,r]=e.capture((()=>(0,u.transformPropertyDeclaration)(e,t,C)));i.default.list.pushList(w,r),i.default.list.pushList(w,n)}return k&&i.default.list.push(w,i.default.create(i.default.SyntaxKind.Assignment,{left:T,operator:"=",right:C})),i.default.list.pushList(w,(0,l.transformDecorators)(e,t,T)),i.default.list.push(r,i.default.create(i.default.SyntaxKind.DoStatement,{statements:w})),{statements:r,name:T}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(7759),l=n(4541),u=n(5616),_=n(6671),d=n(6848),p=n(2852),f=n(8111),m=n(9564),g=n(9655),h=n(2036),y=n(837),v=n(4735),b=r(n(2137)),x="toString"},4541:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformDecorators=function(e,t,n){const r=i.default.list.make();for(const o of t.members)_.default.hasStaticModifier(o)||(_.default.isMethodDeclaration(o)&&o.body?i.default.list.pushList(r,m(e,o,n)):_.default.isPropertyDeclaration(o)&&i.default.list.pushList(r,g(e,o,n)));for(const o of t.members)_.default.hasStaticModifier(o)&&(_.default.isMethodDeclaration(o)&&o.body?i.default.list.pushList(r,m(e,o,n)):_.default.isPropertyDeclaration(o)&&i.default.list.pushList(r,g(e,o,n)));return i.default.list.pushList(r,function(e,t,n){const[r,o]=f(e,t,(e=>i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:i.default.binary(i.default.call(e,[n]),"or",n)})))),a=i.default.list.make();i.default.list.pushList(a,r);const s=(0,u.findConstructor)(t);return s&&i.default.list.pushList(a,h(e,s,n)),i.default.list.pushList(a,o),a}(e,t,n)),r};const i=r(n(9861)),o=n(2287),a=n(6671),s=n(5671),c=n(6453),l=n(5708),u=n(9564),_=r(n(2137));function d(e){var t,n;return null!==(n=null===(t=_.default.getDecorators(e))||void 0===t?void 0:t.length)&&void 0!==n?n:0}function p(e,t,n,r){if(!(0,l.expressionMightMutate)(e,r,n.expression))return!0;if(!t)return!1;const i=n.parent;if(_.default.isMethodDeclaration(i)&&i.parameters.some((e=>d(e)>0)))return!1;if(_.default.isClassLike(i)){const e=(0,u.findConstructor)(i);if(e&&e.parameters.some((e=>d(e)>0)))return!1}if(_.default.isParameter(i)){const e=i.parent.parameters;for(let t=e.findIndex((e=>e===i))+1;t0)return!1}return!0}function f(e,t,n){var r;const o=i.default.list.make(),s=i.default.list.make(),l=null!==(r=_.default.getDecorators(t))&&void 0!==r?r:[];for(let t=0;t(0,a.transformExpression)(e,r.expression)));i.default.list.pushList(o,_);const d=t===l.length-1;if(!p(e,d,r,u)){const e=i.default.tempId("decorator");i.default.list.push(o,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:e,right:u})),u=e}i.default.list.unshiftList(s,n((0,c.convertToIndexableExpression)(u)))}return[o,s]}function m(e,t,n){const[r,a]=f(e,t,(r=>{const a=i.default.list.make(),s=i.default.tempId("descriptor"),c=e.getClassElementObjectKey(t);return(0,o.assert)(c,"Did not find method key for method decorator"),i.default.list.push(a,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:s,right:i.default.call(r,[n,c,i.default.map([[i.default.string("value"),i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:c})]])])})),i.default.list.push(a,i.default.create(i.default.SyntaxKind.IfStatement,{condition:s,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:c}),operator:"=",right:i.default.property(s,"value")})),elseBody:i.default.list.make()})),a})),s=i.default.list.make();return i.default.list.pushList(s,r),i.default.list.pushList(s,h(e,t,n)),i.default.list.pushList(s,a),s}function g(e,t,n){const[r,o]=f(e,t,(r=>{const o=e.noPrereqs((()=>(0,s.transformPropertyName)(e,t.name)));return i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(r,[n,o])}))})),a=i.default.list.make();return i.default.list.pushList(a,r),i.default.list.pushList(a,o),a}function h(e,t,n){const r=i.default.list.make(),a=i.default.list.make();for(let s=0;s{const a=t.name?e.getClassElementObjectKey(t):i.default.nil();return(0,o.assert)(a,"Did not find method key for parameter decorator"),i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(r,[n,a,i.default.number(s)])}))}));i.default.list.pushList(r,l),i.default.list.unshiftList(a,u)}const s=i.default.list.make();return i.default.list.pushList(s,r),i.default.list.pushList(s,a),s}},5616:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPropertyDeclaration=function(e,t,n){return l.default.hasStaticModifier(t)?l.default.isPrivateIdentifier(t.name)?(a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(t)),i.default.list.make()):t.initializer?i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:(0,c.transformPropertyName)(e,t.name)}),operator:"=",right:(0,s.transformExpression)(e,t.initializer)})):i.default.list.make():i.default.list.make()};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(5671),l=r(n(2137))},250:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformArrayLiteralExpression=function(e,t){if(!t.elements.find((e=>u.default.isSpreadElement(e))))return i.default.array((0,s.ensureTransformOrder)(e,t.elements));const n=(0,l.createArrayPointer)("array"),r=i.default.tempId("length");let _=!1,d=0;function p(){const t=i.default.unary("#",n.value);_?e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:t})):(e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:t})),_=!0),d=0}for(let s=0;s(0,a.transformExpression)(e,_)));i.default.isArray(n.value)&&!i.default.list.isEmpty(o)&&((0,l.disableArrayInline)(e,n),p()),i.default.isArray(n.value)?i.default.list.push(n.value.members,t):(e.prereqList(o),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n.value,index:i.default.binary(r,"+",i.default.number(d+1))}),operator:"=",right:t}))),d++}}return n.value};const i=r(n(9861)),o=n(2287),a=n(6671),s=n(7034),c=n(3901),l=n(274),u=r(n(2137))},7075:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformAwaitExpression=function(e,t){return i.default.call(e.TS(t,"await"),[(0,o.transformExpression)(e,(0,a.skipDownwards)(t.expression))])};const i=r(n(9861)),o=n(6671),a=n(6219)},8e3:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformBinaryExpression=function(e,t){const n=t.operatorToken.kind;if((0,T.validateNotAnyType)(e,t.left),(0,T.validateNotAnyType)(e,t.right),n===C.default.SyntaxKind.EqualsEqualsToken)return s.DiagnosticService.addDiagnostic(o.errors.noEqualsEquals(t)),i.default.none();if(n===C.default.SyntaxKind.ExclamationEqualsToken)return s.DiagnosticService.addDiagnostic(o.errors.noExclamationEquals(t)),i.default.none();if(n===C.default.SyntaxKind.AmpersandAmpersandToken||n===C.default.SyntaxKind.BarBarToken||n===C.default.SyntaxKind.QuestionQuestionToken)return(0,d.transformLogical)(e,t);if(C.default.isLogicalOrCoalescingAssignmentExpression(t))return(0,p.transformLogicalOrCoalescingAssignmentExpression)(e,t);if(C.default.isAssignmentOperator(n)){if(C.default.isArrayLiteralExpression(t.left)){const n=(0,u.transformExpression)(e,t.right);if(0===t.left.elements.length)return(0,x.isUsedAsStatement)(t)&&i.default.isArray(n)&&i.default.list.isEmpty(n.members)?i.default.none():n;if(i.default.isCall(n)&&(0,k.isLuaTupleType)(e)(e.getType(t.right)))return w(e,t.left,n),(0,x.isUsedAsStatement)(t)||s.DiagnosticService.addDiagnostic(o.errors.noLuaTupleDestructureAssignmentExpression(t)),i.default.none();if(i.default.isArray(n)&&!i.default.list.isEmpty(n.members)&&(0,x.isUsedAsStatement)(t))return w(e,t.left,n.members),i.default.none();const r=e.pushToVar(n,"binding");return(0,c.transformArrayAssignmentPattern)(e,t.left,r),r}if(C.default.isObjectLiteralExpression(t.left)){const n=(0,u.transformExpression)(e,t.right);if(0===t.left.properties.length)return(0,x.isUsedAsStatement)(t)&&i.default.isMap(n)&&i.default.list.isEmpty(n.fields)?i.default.none():n;const r=e.pushToVar(n,"binding");return(0,l.transformObjectAssignmentPattern)(e,t.left,r),r}const r=e.getType(t.left),a=e.getType(t.right),_=(0,m.getSimpleAssignmentOperator)(r,n,a),{writable:d,readable:p,value:g}=(0,f.transformWritableAssignment)(e,t.left,t.right,!0,void 0===_);return void 0!==_?(0,m.createAssignmentExpression)(e,d,_,(0,v.getAssignableValue)(_,g,a)):(0,m.createCompoundAssignmentExpression)(e,t,d,r,p,n,g,a)}const[r,a]=(0,y.ensureTransformOrder)(e,[t.left,t.right]);if(n===C.default.SyntaxKind.InKeyword)return i.default.binary(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,g.convertToIndexableExpression)(a),index:r}),"~=",i.default.nil());if(n===C.default.SyntaxKind.InstanceOfKeyword)return(0,k.isPossiblyType)(e.getType(t.right),(0,k.isRobloxType)(e))&&s.DiagnosticService.addDiagnostic(o.errors.noRobloxSymbolInstanceof(t.right)),i.default.call(e.TS(t,"instanceof"),[r,a]);const _=e.getType(t.left),b=e.getType(t.right);return n!==C.default.SyntaxKind.LessThanToken&&n!==C.default.SyntaxKind.LessThanEqualsToken&&n!==C.default.SyntaxKind.GreaterThanToken&&n!==C.default.SyntaxKind.GreaterThanEqualsToken||((0,k.isDefinitelyType)(_,k.isStringType)||(0,k.isDefinitelyType)(_,k.isNumberType))&&((0,k.isDefinitelyType)(b,k.isStringType)||(0,k.isDefinitelyType)(_,k.isNumberType))||s.DiagnosticService.addDiagnostic(o.errors.noNonNumberStringRelationOperator(t)),(0,h.createBinaryFromOperator)(e,t,r,_,n,a,b)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(7598),l=n(2865),u=n(6671),_=n(1782),d=n(5741),p=n(5260),f=n(7010),m=n(6614),g=n(6453),h=n(3262),y=n(7034),v=n(9957),b=n(2036),x=n(6409),S=n(6219),k=n(1915),T=n(3972),C=r(n(2137));function w(e,t,n){const r=i.default.list.make(),u=i.default.list.make(),d=i.default.list.make(),p=e.capturePrereqs((()=>{for(let n of t.elements)if(C.default.isOmittedExpression(n))i.default.list.push(u,i.default.tempId());else if(C.default.isSpreadElement(n))s.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(n));else{let t;if(C.default.isBinaryExpression(n)&&(t=(0,S.skipDownwards)(n.right),n=(0,S.skipDownwards)(n.left)),C.default.isIdentifier(n)||C.default.isElementAccessExpression(n)||C.default.isPropertyAccessExpression(n)){const[r,o]=e.capture((()=>(0,f.transformWritableExpression)(e,n,!0)));i.default.list.pushList(d,o),i.default.list.push(u,r),t&&e.prereq((0,_.transformInitializer)(e,r,t))}else if(C.default.isArrayLiteralExpression(n)){const o=i.default.tempId("binding");i.default.list.push(r,o),i.default.list.push(u,o),t&&e.prereq((0,_.transformInitializer)(e,o,t)),(0,c.transformArrayAssignmentPattern)(e,n,o)}else if(C.default.isObjectLiteralExpression(n)){const o=i.default.tempId("binding");i.default.list.push(r,o),i.default.list.push(u,o),t&&e.prereq((0,_.transformInitializer)(e,o,t)),(0,l.transformObjectAssignmentPattern)(e,n,o)}else(0,a.assert)(!1,`transformOptimizedArrayAssignmentPattern invalid element: ${(0,b.getKindName)(n.kind)}`)}}));i.default.list.isEmpty(r)||e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:void 0})),e.prereqList(d),(0,a.assert)(!i.default.list.isEmpty(u)),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:u,operator:"=",right:n})),e.prereqList(p)}},2157:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformTrueKeyword=function(){return i.default.create(i.default.SyntaxKind.TrueLiteral,{})},t.transformFalseKeyword=function(){return i.default.create(i.default.SyntaxKind.FalseLiteral,{})};const i=r(n(9861))},4698:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformCallExpressionInner=function(e,t,n,r){if(b.default.isImportCall(t))return(0,l.transformImportExpression)(e,t);if((0,h.validateNotAnyType)(e,t.expression),b.default.isSuperCall(t))return i.default.call(i.default.property((0,d.convertToIndexableExpression)(n),"constructor"),[i.default.globals.self,...(0,p.ensureTransformOrder)(e,t.arguments)]);const o=e.typeChecker.getNonOptionalType(e.getType(t.expression)),a=(0,g.getFirstDefinedSymbol)(e,o);if(a){const i=e.services.macroManager.getCallMacro(a);if(i)return x(i,e,t,n,r)}const[s,c]=e.capture((()=>(0,p.ensureTransformOrder)(e,r)));S(e,o,s,r),!i.default.list.isEmpty(c)&&(0,f.expressionMightMutate)(e,n,t.expression)&&(n=e.pushToVar(n,"fn")),e.prereqList(c);const u=i.default.call((0,d.convertToIndexableExpression)(n),s);return(0,v.wrapReturnIfLuaTuple)(e,t,u)},t.transformPropertyCallExpressionInner=function(e,t,n,r,o,a){if((0,h.validateNotAnyType)(e,n.expression),(0,h.validateNotAnyType)(e,t.expression),b.default.isSuperProperty(n))return i.default.call(i.default.property((0,d.convertToIndexableExpression)(r),n.name.text),[i.default.globals.self,...(0,p.ensureTransformOrder)(e,t.arguments)]);const s=e.typeChecker.getNonOptionalType(e.getType(t.expression)),c=(0,g.getFirstDefinedSymbol)(e,s);if(c){const n=e.services.macroManager.getPropertyCallMacro(c);if(n)return x(n,e,t,r,a)}const[l,u]=e.capture((()=>(0,p.ensureTransformOrder)(e,a)));let _;return S(e,s,l,a),!i.default.list.isEmpty(u)&&(0,f.expressionMightMutate)(e,r,n.expression)&&(r=e.pushToVar(r)),e.prereqList(u),(0,m.isMethod)(e,n)?i.default.isValidIdentifier(o)?_=i.default.create(i.default.SyntaxKind.MethodCallExpression,{name:o,expression:(0,d.convertToIndexableExpression)(r),args:i.default.list.make(...l)}):(r=e.pushToVarIfComplex(r),l.unshift(r),_=i.default.call(i.default.property((0,d.convertToIndexableExpression)(r),o),l)):_=i.default.call(i.default.property((0,d.convertToIndexableExpression)(r),o),l),(0,v.wrapReturnIfLuaTuple)(e,t,_)},t.transformElementCallExpressionInner=function(e,t,n,r,o,a){if((0,h.validateNotAnyType)(e,n.expression),(0,h.validateNotAnyType)(e,n.argumentExpression),(0,h.validateNotAnyType)(e,t.expression),b.default.isSuperProperty(n))return i.default.call(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,d.convertToIndexableExpression)(r),index:(0,c.transformExpression)(e,n.argumentExpression)}),[i.default.globals.self,...(0,p.ensureTransformOrder)(e,t.arguments)]);const s=e.typeChecker.getNonOptionalType(e.getType(t.expression)),l=(0,g.getFirstDefinedSymbol)(e,s);if(l){const n=e.services.macroManager.getPropertyCallMacro(l);if(n)return x(n,e,t,r,a)}const[[u,...y],k]=e.capture((()=>(0,p.ensureTransformOrder)(e,[o,...a])));S(e,s,y,a),!i.default.list.isEmpty(k)&&(0,f.expressionMightMutate)(e,r,n.expression)&&(r=e.pushToVar(r)),e.prereqList(k),(0,m.isMethod)(e,n)&&(r=e.pushToVarIfComplex(r),y.unshift(r));const T=i.default.call(i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,d.convertToIndexableExpression)(r),index:(0,_.addOneIfArrayType)(e,e.typeChecker.getNonOptionalType(e.getType(n.expression)),u)}),y);return(0,v.wrapReturnIfLuaTuple)(e,t,T)},t.transformCallExpression=function(e,t){return(0,u.transformOptionalChain)(e,t)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(7637),u=n(8087),_=n(8576),d=n(6453),p=n(7034),f=n(5708),m=n(833),g=n(1915),h=n(3972),y=n(2161),v=n(1511),b=r(n(2137));function x(e,t,n,r,c){let l;const u=t.capturePrereqs((()=>{l=(0,p.ensureTransformOrder)(t,c);const e=c[c.length-1];if(e&&b.default.isSpreadElement(e)){const r=t.typeChecker.getSignaturesOfType(t.getType(n.expression),b.default.SignatureKind.Call)[0],c=r.parameters[r.parameters.length-1].valueDeclaration;if(c&&b.default.isParameter(c)&&c.dotDotDotToken)return void s.DiagnosticService.addDiagnostic(o.errors.noVarArgsMacroSpread(e));const u=t.getType(e.expression);(0,a.assert)(t.typeChecker.isTupleType(u));const _=u.target.elementFlags.length,d=l.pop(),p=i.default.list.make();for(let e=l.length;e<_;e++){const t=i.default.tempId(`spread${e}`);l.push(t),i.default.list.push(p,t)}t.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:p,right:d}))}for(let e=0;e(0,o.transformExpression)(e,t.whenTrue))),[u,_]=e.capture((()=>(0,o.transformExpression)(e,t.whenFalse)));if((0,s.isUsedAsStatement)(t))return i.default.list.pushList(l,(0,c.wrapExpressionStatement)(r)),i.default.list.pushList(_,(0,c.wrapExpressionStatement)(u)),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,a.createTruthinessChecks)(e,n,t.condition),statements:l,elseBody:_})),i.default.none();if(i.default.list.isEmpty(l)&&i.default.list.isEmpty(_))return i.default.create(i.default.SyntaxKind.IfExpression,{condition:(0,a.createTruthinessChecks)(e,n,t.condition),expression:r,alternative:u});const d=i.default.tempId("result");return e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:d,right:void 0})),i.default.list.push(l,i.default.create(i.default.SyntaxKind.Assignment,{left:d,operator:"=",right:r})),i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:d,operator:"=",right:u})),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,a.createTruthinessChecks)(e,n,t.condition),statements:l,elseBody:_})),d};const i=r(n(9861)),o=n(6671),a=n(410),s=n(6409),c=n(6837)},7484:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformDeleteExpression=function(e,t){return(0,o.transformExpression)(e,t.expression),(0,a.isUsedAsStatement)(t)?i.default.none():i.default.bool(!0)};const i=r(n(9861)),o=n(6671),a=n(6409)},8010:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformElementAccessExpressionInner=function(e,t,n,r){(0,f.validateNotAnyType)(e,t.expression),(0,f.validateNotAnyType)(e,t.argumentExpression);const a=e.typeChecker.getNonOptionalType(e.getType(t.expression));(0,s.addIndexDiagnostics)(e,t,a);const[u,g]=e.capture((()=>(0,o.transformExpression)(e,r)));return i.default.list.isEmpty(g)||((0,p.isLuaTupleType)(e)(a)&&(n=i.default.array([n])),n=e.pushToVar(n,"exp"),e.prereqList(g)),i.default.isCall(n)&&(0,p.isLuaTupleType)(e)(a)?(i.default.isNumberLiteral(u)&&0===Number(u.value)||(n=i.default.call(i.default.globals.select,[(0,_.offset)(u,1),n])),i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:n})):m.default.isDeleteExpression((0,d.skipUpwards)(t).parent)?(e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,l.convertToIndexableExpression)(n),index:(0,c.addOneIfArrayType)(e,a,u)}),operator:"=",right:i.default.nil()})),i.default.none()):i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,l.convertToIndexableExpression)(n),index:(0,c.addOneIfArrayType)(e,a,u)})},t.transformElementAccessExpression=function(e,t){const n=(0,u.getConstantValueLiteral)(e,t);return n||(0,a.transformOptionalChain)(e,t)};const i=r(n(9861)),o=n(6671),a=n(8087),s=n(5949),c=n(8576),l=n(6453),u=n(835),_=n(9582),d=n(6219),p=n(1915),f=n(3972),m=r(n(2137))},6671:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformExpression=function(e,t){const n=V.get(t.kind);if(n)return n(e,t);(0,a.assert)(!1,`Unknown expression: ${(0,J.getKindName)(t.kind)}`)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(250),l=n(7075),u=n(8e3),_=n(2157),d=n(4698),p=n(9365),f=n(1392),m=n(7484),g=n(8010),h=n(8998),y=n(6848),v=n(8279),b=n(7441),x=n(650),S=n(1406),k=n(7517),T=n(8732),C=n(2572),w=n(2578),D=n(4104),E=n(6484),P=n(8685),N=n(9760),F=n(7480),A=n(4379),I=n(8946),O=n(8141),M=n(8652),L=n(2772),j=n(1471),R=n(1475),B=n(7895),J=n(2036),z=r(n(2137)),$=()=>i.default.none(),q=e=>(t,n)=>(s.DiagnosticService.addDiagnostic(e(n)),$()),V=(U=[[z.default.SyntaxKind.BigIntLiteral,q(o.errors.noBigInt)],[z.default.SyntaxKind.NullKeyword,q(o.errors.noNullLiteral)],[z.default.SyntaxKind.PrivateIdentifier,q(o.errors.noPrivateIdentifier)],[z.default.SyntaxKind.RegularExpressionLiteral,q(o.errors.noRegex)],[z.default.SyntaxKind.TypeOfExpression,q(o.errors.noTypeOfExpression)],[z.default.SyntaxKind.ImportKeyword,$],[z.default.SyntaxKind.ArrayLiteralExpression,c.transformArrayLiteralExpression],[z.default.SyntaxKind.ArrowFunction,h.transformFunctionExpression],[z.default.SyntaxKind.AsExpression,L.transformTypeExpression],[z.default.SyntaxKind.AwaitExpression,l.transformAwaitExpression],[z.default.SyntaxKind.BinaryExpression,u.transformBinaryExpression],[z.default.SyntaxKind.CallExpression,d.transformCallExpression],[z.default.SyntaxKind.ClassExpression,p.transformClassExpression],[z.default.SyntaxKind.ConditionalExpression,f.transformConditionalExpression],[z.default.SyntaxKind.DeleteExpression,m.transformDeleteExpression],[z.default.SyntaxKind.ElementAccessExpression,g.transformElementAccessExpression],[z.default.SyntaxKind.ExpressionWithTypeArguments,L.transformTypeExpression],[z.default.SyntaxKind.FalseKeyword,_.transformFalseKeyword],[z.default.SyntaxKind.FunctionExpression,h.transformFunctionExpression],[z.default.SyntaxKind.Identifier,y.transformIdentifier],[z.default.SyntaxKind.JsxElement,v.transformJsxElement],[z.default.SyntaxKind.JsxExpression,b.transformJsxExpression],[z.default.SyntaxKind.JsxFragment,x.transformJsxFragment],[z.default.SyntaxKind.JsxSelfClosingElement,S.transformJsxSelfClosingElement],[z.default.SyntaxKind.NewExpression,k.transformNewExpression],[z.default.SyntaxKind.NonNullExpression,L.transformTypeExpression],[z.default.SyntaxKind.NoSubstitutionTemplateLiteral,T.transformNoSubstitutionTemplateLiteral],[z.default.SyntaxKind.NumericLiteral,C.transformNumericLiteral],[z.default.SyntaxKind.ObjectLiteralExpression,w.transformObjectLiteralExpression],[z.default.SyntaxKind.OmittedExpression,D.transformOmittedExpression],[z.default.SyntaxKind.ParenthesizedExpression,E.transformParenthesizedExpression],[z.default.SyntaxKind.PostfixUnaryExpression,j.transformPostfixUnaryExpression],[z.default.SyntaxKind.PrefixUnaryExpression,j.transformPrefixUnaryExpression],[z.default.SyntaxKind.PropertyAccessExpression,P.transformPropertyAccessExpression],[z.default.SyntaxKind.SatisfiesExpression,L.transformTypeExpression],[z.default.SyntaxKind.SpreadElement,N.transformSpreadElement],[z.default.SyntaxKind.StringLiteral,F.transformStringLiteral],[z.default.SyntaxKind.SuperKeyword,A.transformSuperKeyword],[z.default.SyntaxKind.TaggedTemplateExpression,I.transformTaggedTemplateExpression],[z.default.SyntaxKind.TemplateExpression,O.transformTemplateExpression],[z.default.SyntaxKind.ThisKeyword,M.transformThisExpression],[z.default.SyntaxKind.TrueKeyword,_.transformTrueKeyword],[z.default.SyntaxKind.TypeAssertionExpression,L.transformTypeExpression],[z.default.SyntaxKind.VoidExpression,R.transformVoidExpression],[z.default.SyntaxKind.YieldExpression,B.transformYieldExpression]],new Map(U));var U},8998:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformFunctionExpression=function(e,t){t.name&&a.DiagnosticService.addDiagnostic(o.errors.noFunctionExpressionName(t.name));let{statements:n,parameters:r,hasDotDotDot:d}=(0,c.transformParameters)(e,t);const p=t.body;if(_.default.isFunctionBody(p))i.default.list.pushList(n,(0,l.transformStatementList)(e,p,p.statements));else{const[t,r]=e.capture((()=>(0,s.transformReturnStatementInner)(e,p)));i.default.list.pushList(n,r),i.default.list.pushList(n,t)}const f=_.default.hasSyntacticModifier(t,_.default.ModifierFlags.Async);t.asteriskToken&&(f&&a.DiagnosticService.addDiagnostic(o.errors.noAsyncGeneratorFunctions(t)),n=(0,u.wrapStatementsAsGenerator)(e,t,n));let m=i.default.create(i.default.SyntaxKind.FunctionExpression,{hasDotDotDot:d,parameters:r,statements:n});return f&&(m=i.default.call(e.TS(t,"async"),[m])),m};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(5807),c=n(7937),l=n(8043),u=n(6442),_=r(n(2137))},6848:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformIdentifierDefined=g,t.transformIdentifier=function(e,t){var n;if(!t.parent||m.default.positionIsSynthesized(t.pos))return i.default.create(i.default.SyntaxKind.Identifier,{name:t.text});const r=m.default.isShorthandPropertyAssignment(t.parent)?e.typeChecker.getShorthandAssignmentValueSymbol(t.parent):e.typeChecker.getSymbolAtLocation(t);if((0,a.assert)(r),e.typeChecker.isUndefinedSymbol(r))return i.default.nil();e.typeChecker.isArgumentsSymbol(r)?l.DiagnosticService.addDiagnostic(o.errors.noArguments(t)):r===e.services.macroManager.getSymbolOrThrow(c.SYMBOL_NAMES.globalThis)&&l.DiagnosticService.addDiagnostic(o.errors.noGlobalThis(t));const h=e.services.macroManager.getIdentifierMacro(r);if(h)return h(e,t);const y=(0,f.getFirstConstructSymbol)(e,t);y&&e.services.macroManager.getConstructorMacro(y)&&(m.default.isClassLike(t.parent.parent.parent)&&(null===(n=(0,_.getExtendsNode)(t.parent.parent.parent))||void 0===n?void 0:n.expression)===t?l.DiagnosticService.addDiagnostic(o.errors.noMacroExtends(t)):l.DiagnosticService.addDiagnostic(o.errors.noConstructorMacroWithoutNew(t)));const v=(0,p.skipUpwards)(t).parent;if((!m.default.isCallExpression(v)||(0,p.skipDownwards)(v.expression)!=t)&&e.services.macroManager.getCallMacro(r))return l.DiagnosticService.addDiagnostic(o.errors.noIndexWithoutCall(t)),i.default.none();if(r.valueDeclaration&&r.valueDeclaration.getSourceFile()===t.getSourceFile()&&void 0===(0,p.getAncestor)(r.valueDeclaration,(e=>m.default.isModuleDeclaration(e)&&!(0,u.isNamespace)(e)))){const t=e.getModuleIdPropertyAccess(r);if(t&&(0,d.isSymbolMutable)(e,r))return t}return function(e,t,n){var r;if(void 0!==e.isHoisted.get(n))return;const i=null!==(r=n.valueDeclaration)&&void 0!==r?r:function(e){var t;for(const n of null!==(t=e.declarations)&&void 0!==t?t:[])if((0,p.getAncestor)(n,m.default.isAnyImportSyntax))return n}(n);if(!i||(0,p.getAncestor)(i,m.default.isParameter)||m.default.isShorthandPropertyAssignment(i))return;if(m.default.isClassLike(i)&&(0,p.isAncestorOf)(i,t))return;const o=(0,p.getAncestor)(i,m.default.isStatement);if(!o||m.default.isForStatement(o)||m.default.isForOfStatement(o)||m.default.isTryStatement(o))return;const a=o.parent;if(!a||!(0,u.isBlockLike)(a))return;const c=function(e,t){for(;t.parent&&t.parent!==e;)t=t.parent;return t.parent?t:void 0}(a,t);if(!c||!m.default.isStatement(c))return;const l=a.statements.indexOf(o),_=a.statements.indexOf(c);_>l||_===l&&(m.default.isFunctionDeclaration(o)&&!m.default.hasSyntacticModifier(o,m.default.ModifierFlags.Async)||m.default.isClassDeclaration(o)||m.default.isVariableStatement(o)&&(0,p.getAncestor)(t,(e=>m.default.isStatement(e)||m.default.isFunctionLikeDeclaration(e)))===o)||((0,s.getOrSetDefault)(e.hoistsByStatement,c,(()=>new Array)).push(t),e.isHoisted.set(n,!0))}(e,t,r),g(e,t)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(2991),c=n(3115),l=n(4502),u=n(226),_=n(9655),d=n(3527),p=n(6219),f=n(1915),m=r(n(2137));function g(e,t){const n=m.default.isShorthandPropertyAssignment(t.parent)?e.typeChecker.getShorthandAssignmentValueSymbol(t.parent):e.typeChecker.getSymbolAtLocation(t);(0,a.assert)(n);return e.symbolToIdMap.get(n)||i.default.create(i.default.SyntaxKind.Identifier,{name:t.text})}},7637:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformImportExpression=function(e,t){const n=t.arguments[0];if(!n||!c.default.isStringLiteral(n))return a.DiagnosticService.addDiagnostic(o.errors.noNonStringModuleSpecifier(t)),i.default.none();const r=(0,s.createImportExpression)(e,t.getSourceFile(),n),l=i.default.id("resolve");return i.default.call(i.default.property(e.TS(t,"Promise"),"new"),[i.default.create(i.default.SyntaxKind.FunctionExpression,{hasDotDotDot:!1,parameters:i.default.list.make(l),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(l,[r])}))})])};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(3842),c=r(n(2137))},8279:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxElement=function(e,t){return(0,r.transformJsx)(e,t,t.openingElement.tagName,t.openingElement.attributes,t.children)};const r=n(4487)},7441:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxExpression=function(e,t){if(t.expression){const n=(0,o.transformExpression)(e,t.expression);return t.dotDotDotToken?i.default.call(i.default.globals.unpack,[n]):n}return i.default.none()};const i=r(n(9861)),o=n(6671)},650:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxFragment=function(e,t){var n;const r=e.resolver.getJsxFactoryEntity(t);(0,o.assert)(r,"Expected jsxFactoryEntity to be defined");const u=(0,c.convertToIndexableExpression)((0,s.transformEntityName)(e,r)),_=null!==(n=e.resolver.getJsxFragmentFactoryEntity(t))&&void 0!==n?n:l.default.parseIsolatedEntityName("Fragment",l.default.ScriptTarget.ESNext);(0,o.assert)(_,"Unable to find valid jsxFragmentFactoryEntity");const d=[(0,s.transformEntityName)(e,_)],p=(0,a.transformJsxChildren)(e,t.children);return p.length>0&&d.push(i.default.nil()),d.push(...p),i.default.call(u,d)};const i=r(n(9861)),o=n(2287),a=n(3340),s=n(2583),c=n(6453),l=r(n(2137))},1406:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxSelfClosingElement=function(e,t){return(0,r.transformJsx)(e,t,t.tagName,t.attributes,[])};const r=n(4487)},7517:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformNewExpression=function(e,t){(0,l.validateNotAnyType)(e,t.expression);const n=(0,c.getFirstConstructSymbol)(e,t.expression);if(n){const r=e.services.macroManager.getConstructorMacro(n);if(r)return r(e,t)}const r=(0,a.convertToIndexableExpression)((0,o.transformExpression)(e,t.expression)),u=t.arguments?(0,s.ensureTransformOrder)(e,t.arguments):[];return i.default.call(i.default.property(r,"new"),u)};const i=r(n(9861)),o=n(6671),a=n(6453),s=n(7034),c=n(1915),l=n(3972)},8732:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformNoSubstitutionTemplateLiteral=function(e,t){return i.default.create(i.default.SyntaxKind.InterpolatedString,{parts:i.default.list.make((0,o.transformInterpolatedStringPart)(t))})};const i=r(n(9861)),o=n(1993)},2572:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformNumericLiteral=function(e,t){return i.default.create(i.default.SyntaxKind.NumberLiteral,{value:t.getText()})};const i=r(n(9861))},2578:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformObjectLiteralExpression=function(e,t){const n=(0,_.createMapPointer)("object");for(const r of t.properties)if((0,p.validateMethodAssignment)(e,r),f.default.isPropertyAssignment(r)){if(f.default.isPrivateIdentifier(r.name)){a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(r.name));continue}m(e,n,r.name,r.initializer)}else f.default.isShorthandPropertyAssignment(r)?m(e,n,r.name,r.name):f.default.isSpreadAssignment(r)?g(e,n,r):f.default.isMethodDeclaration(r)?e.prereqList((0,c.transformMethodDeclaration)(e,r,n)):a.DiagnosticService.addDiagnostic(o.errors.noGetterSetter(r));return n.value};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(8111),l=n(5671),u=n(410),_=n(274),d=n(1915),p=n(4735),f=r(n(2137));function m(e,t,n,r){let[o,a]=e.capture((()=>(0,l.transformPropertyName)(e,n)));const[c,u]=e.capture((()=>(0,s.transformExpression)(e,r)));i.default.list.isEmpty(a)&&i.default.list.isEmpty(u)||((0,_.disableMapInline)(e,t),e.prereqList(a),o=e.pushToVar(o,"left")),e.prereqList(u),(0,_.assignToMapPointer)(e,t,o,c)}function g(e,t,n){const r=e.typeChecker.getNonOptionalType(e.getType(n.expression)),c=(0,d.getFirstDefinedSymbol)(e,r);c&&e.services.macroManager.isMacroOnlyClass(c)&&a.DiagnosticService.addDiagnostic(o.errors.noMacroObjectSpread(n));const l=e.getType(n.expression),p=(0,d.isDefinitelyType)(l,d.isObjectType);if(p&&i.default.isMap(t.value)&&i.default.list.isEmpty(t.value.fields))return t.value=e.pushToVar(i.default.call(i.default.globals.table.clone,[(0,s.transformExpression)(e,n.expression)]),t.name),void e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.setmetatable,[t.value,i.default.nil()])}));(0,_.disableMapInline)(e,t);let f=(0,s.transformExpression)(e,n.expression);p||(f=e.pushToVarIfComplex(f,"spread"));const m=i.default.tempId("k"),g=i.default.tempId("v");let h=i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(m,g),expression:f,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t.value,index:m}),operator:"=",right:g}))});p||(h=i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,u.createTruthinessChecks)(e,f,n.expression),statements:i.default.list.make(h),elseBody:i.default.list.make()})),e.prereq(h)}},4104:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformOmittedExpression=function(){return i.default.nil()};const i=r(n(9861))},6484:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformParenthesizedExpression=function(e,t){const n=(0,o.transformExpression)(e,(0,a.skipDownwards)(t.expression));return i.default.isSimple(n)?n:i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:n})};const i=r(n(9861)),o=n(6671),a=n(6219)},8685:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPropertyAccessExpressionInner=function(e,t,n,r){return(0,u.validateNotAnyType)(e,t.expression),(0,a.addIndexDiagnostics)(e,t,e.typeChecker.getNonOptionalType(e.getType(t))),_.default.isDeleteExpression((0,l.skipUpwards)(t).parent)?(e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property((0,s.convertToIndexableExpression)(n),r),operator:"=",right:i.default.nil()})),i.default.none()):i.default.property((0,s.convertToIndexableExpression)(n),r)},t.transformPropertyAccessExpression=function(e,t){const n=(0,c.getConstantValueLiteral)(e,t);return n||(0,o.transformOptionalChain)(e,t)};const i=r(n(9861)),o=n(8087),a=n(5949),s=n(6453),c=n(835),l=n(6219),u=n(3972),_=r(n(2137))},9760:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSpreadElement=function(e,t){(0,_.validateNotAnyType)(e,t.expression),(0,a.assert)(!d.default.isArrayLiteralExpression(t.parent)&&t.parent.arguments),t.parent.arguments[t.parent.arguments.length-1]!==t&&s.DiagnosticService.addDiagnostic(o.errors.noPrecedingSpreadElement(t));const n=(0,c.transformExpression)(e,t.expression),r=e.getType(t.expression);if((0,u.isDefinitelyType)(r,(0,u.isArrayType)(e)))return i.default.call(i.default.globals.unpack,[n]);{const o=(0,l.getAddIterableToArrayBuilder)(e,t.expression,r),a=e.pushToVar(i.default.array(),"array"),s=e.pushToVar(i.default.number(0),"length");return e.prereqList(o(e,n,a,s,0,!1)),i.default.call(i.default.globals.unpack,[a])}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(3901),u=n(1915),_=n(3972),d=r(n(2137))},7480:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformStringLiteral=function(e,t){return i.default.string((0,o.createStringFromLiteral)(t))};const i=r(n(9861)),o=n(4397)},4379:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSuperKeyword=function(){return i.default.globals.super};const i=r(n(9861))},8946:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformTaggedTemplateExpression=function(e,t){const n=(0,o.transformExpression)(e,t.tag);if(c.default.isTemplateExpression(t.template)){const r=new Array;r.push(i.default.string(t.template.head.text));for(const e of t.template.templateSpans)r.push(i.default.string(e.literal.text));const o=(0,s.ensureTransformOrder)(e,t.template.templateSpans.map((e=>e.expression)));return i.default.call((0,a.convertToIndexableExpression)(n),[i.default.array(r),...o])}return i.default.call((0,a.convertToIndexableExpression)(n),[i.default.array([i.default.string(t.template.text)])])};const i=r(n(9861)),o=n(6671),a=n(6453),s=n(7034),c=r(n(2137))},8141:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformTemplateExpression=function(e,t){const n=i.default.list.make();t.head.text.length>0&&i.default.list.push(n,(0,o.transformInterpolatedStringPart)(t.head));const r=(0,a.ensureTransformOrder)(e,t.templateSpans.map((e=>e.expression)));for(let e=0;e0&&i.default.list.push(n,(0,o.transformInterpolatedStringPart)(a.literal))}return i.default.create(i.default.SyntaxKind.InterpolatedString,{parts:n})};const i=r(n(9861)),o=n(1993),a=n(7034)},8652:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformThisExpression=function(e,t){const n=e.typeChecker.getSymbolAtLocation(t);if(n===e.services.macroManager.getSymbolOrThrow(a.SYMBOL_NAMES.globalThis)&&s.DiagnosticService.addDiagnostic(o.errors.noGlobalThis(t)),n){const n=c.default.getThisContainer(t,!1,!1);if((c.default.hasStaticModifier(n)||c.default.isClassStaticBlockDeclaration(n))&&!c.default.isMethodDeclaration(n)&&c.default.isClassLike(n.parent)){const t=e.classIdentifierMap.get(n.parent);if(t)return t}}return i.default.globals.self};const i=r(n(9861)),o=n(7370),a=n(3115),s=n(4502),c=r(n(2137))},2772:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformTypeExpression=function(e,t){return(0,r.transformExpression)(e,t.expression)};const r=n(6671)},1471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPostfixUnaryExpression=function(e,t){(0,d.validateNotAnyType)(e,t.operand);const n=(0,c.transformWritableExpression)(e,t.operand,!0),r=i.default.tempId("original");return e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:n})),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:t.operator===p.default.SyntaxKind.PlusPlusToken?"+=":t.operator===p.default.SyntaxKind.MinusMinusToken?"-=":(0,l.assertNever)(t.operator,"transformPostfixUnaryExpression"),right:i.default.number(1)})),r},t.transformPrefixUnaryExpression=function(e,t){if((0,d.validateNotAnyType)(e,t.operand),t.operator===p.default.SyntaxKind.PlusPlusToken||t.operator===p.default.SyntaxKind.MinusMinusToken){const n=(0,c.transformWritableExpression)(e,t.operand,!0),r=t.operator===p.default.SyntaxKind.PlusPlusToken?"+=":"-=";return e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:r,right:i.default.number(1)})),n}if(t.operator===p.default.SyntaxKind.PlusToken)return a.DiagnosticService.addDiagnostic(o.errors.noUnaryPlus(t)),(0,s.transformExpression)(e,t.operand);if(t.operator===p.default.SyntaxKind.MinusToken)return(0,_.isDefinitelyType)(e.getType(t.operand),_.isNumberType)||a.DiagnosticService.addDiagnostic(o.errors.noNonNumberUnaryMinus(t)),i.default.unary("-",(0,s.transformExpression)(e,t.operand));if(t.operator===p.default.SyntaxKind.ExclamationToken){const n=(0,u.createTruthinessChecks)(e,(0,s.transformExpression)(e,t.operand),t.operand);return i.default.unary("not",n)}return t.operator===p.default.SyntaxKind.TildeToken?i.default.call(i.default.property(i.default.globals.bit32,"bnot"),[(0,s.transformExpression)(e,t.operand)]):(0,l.assertNever)(t.operator,"transformPrefixUnaryExpression")};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(7010),l=n(9225),u=n(410),_=n(1915),d=n(3972),p=r(n(2137))},1475:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformVoidExpression=function(e,t){return e.prereqList((0,o.transformExpressionStatementInner)(e,(0,a.skipDownwards)(t.expression))),i.default.create(i.default.SyntaxKind.NilLiteral,{})};const i=r(n(9861)),o=n(7858),a=n(6219)},7895:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformYieldExpression=function(e,t){if(!t.expression)return i.default.call(i.default.globals.coroutine.yield,[]);const n=(0,o.transformExpression)(e,t.expression);if(t.asteriskToken){const r=i.default.tempId("result"),o=i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{}));let c=i.default.none();if(!(0,s.isUsedAsStatement)(t)){const t=e.pushToVar(void 0,"returnValue");i.default.list.unshift(o,i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:i.default.property(r,"value")})),c=t}return e.prereq(i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(r),expression:i.default.property((0,a.convertToIndexableExpression)(n),"next"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.property(r,"done"),statements:o,elseBody:i.default.list.make()}),i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.coroutine.yield,[i.default.property(r,"value")])}))})),c}return i.default.call(i.default.globals.coroutine.yield,[n])};const i=r(n(9861)),o=n(6671),a=n(6453),s=n(6409)},4487:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsx=function(e,t,n,r,d){const p=e.resolver.getJsxFactoryEntity(t);(0,o.assert)(p,"Expected jsxFactoryEntity to be defined");const f=(0,u.convertToIndexableExpression)((0,l.transformEntityName)(e,p)),m=(0,c.transformJsxTagName)(e,n);let g;r.properties.length>0&&(g=(0,_.createMapPointer)("attributes"),(0,a.transformJsxAttributes)(e,r,g));const h=(0,s.transformJsxChildren)(e,d),y=[m];return g?y.push(g.value):h.length>0&&y.push(i.default.nil()),y.push(...h),i.default.call(f,y)};const i=r(n(9861)),o=n(2287),a=n(1472),s=n(3340),c=n(1974),l=n(2583),u=n(6453),_=n(274)},1472:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxAttributes=function(e,t,n){for(const r of t.properties)if(_.default.isJsxAttribute(r))p(e,r,n);else{const c=e.typeChecker.getNonOptionalType(e.getType(r.expression)),_=(0,u.getFirstDefinedSymbol)(e,c);_&&e.services.macroManager.isMacroOnlyClass(_)&&a.DiagnosticService.addDiagnostic(o.errors.noMacroObjectSpread(r));const p=(0,s.transformExpression)(e,r.expression);if(r===t.properties[0]&&(0,u.isDefinitelyType)(c,u.isObjectType)){n.value=e.pushToVar(i.default.call(i.default.globals.table.clone,[p]),n.name),e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.setmetatable,[n.value,i.default.nil()])}));continue}(0,l.disableMapInline)(e,n),e.prereq(d(e,n.value,p,r.expression))}};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(410),l=n(274),u=n(1915),_=r(n(2137));function d(e,t,n,r){const o=(0,u.isDefinitelyType)(e.getType(r),u.isObjectType);o||(n=e.pushToVarIfComplex(n,"attribute"));const a=i.default.tempId("k"),s=i.default.tempId("v");let l=i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(a,s),expression:n,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:a}),operator:"=",right:s}))});return o||(l=i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,c.createTruthinessChecks)(e,n,r),statements:i.default.list.make(l),elseBody:i.default.list.make()})),l}function p(e,t,n){let r=t.initializer;r&&_.default.isJsxExpression(r)&&(r=r.expression);const[o,a]=r?e.capture((()=>(0,s.transformExpression)(e,r))):[i.default.bool(!0),i.default.list.make()];i.default.list.isEmpty(a)||((0,l.disableMapInline)(e,n),e.prereqList(a));const c=_.default.isIdentifier(t.name)?t.name.text:_.default.getTextOfJsxNamespacedName(t.name),u=i.default.string(c);(0,l.assignToMapPointer)(e,n,u,o)}},3340:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxChildren=function(e,t){const n=(0,a.findLastIndex)(t,(e=>!_.default.isJsxText(e)||!e.containsOnlyTriviaWhiteSpaces));for(let e=0;e!_.default.isJsxText(e)||!e.containsOnlyTriviaWhiteSpaces)).filter((e=>!_.default.isJsxExpression(e)||void 0!==e.expression)),((e,t)=>{var n;if(_.default.isJsxText(t)){const e=null!==(n=(0,u.fixupWhitespaceAndDecodeEntities)(t.text))&&void 0!==n?n:"";return i.default.string(e.replace(/\\/g,"\\\\"))}return(0,c.transformExpression)(e,t)}))};const i=r(n(9861)),o=n(7370),a=n(2532),s=n(4502),c=n(6671),l=n(7034),u=n(6226),_=r(n(2137))},1974:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformJsxTagName=function(e,t){const[n,r]=e.capture((()=>function(e,t){if(l.default.isIdentifier(t)){const e=t.text[0];if(e===e.toLowerCase())return i.default.string(t.text)}return l.default.isPropertyAccessExpression(t)?(l.default.isPrivateIdentifier(t.name)&&a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(t.name)),i.default.property((0,c.convertToIndexableExpression)((0,s.transformExpression)(e,t.expression)),t.name.text)):l.default.isJsxNamespacedName(t)?i.default.string(l.default.getTextOfJsxNamespacedName(t)):(0,s.transformExpression)(e,t)}(e,t)));let u=n;return i.default.list.isEmpty(r)||(e.prereqList(r),u=e.pushToVarIfComplex(u,"tagName")),u};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(6453),l=r(n(2137))},2852:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformBlock=function(e,t){return i.default.list.make(i.default.create(i.default.SyntaxKind.DoStatement,{statements:(0,o.transformStatementList)(e,t,t.statements)}))};const i=r(n(9861)),o=n(8043)},3489:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformBreakStatement=function(e,t){return t.label?(a.DiagnosticService.addDiagnostic(o.errors.noLabeledStatement(t.label)),i.default.list.make()):(0,s.isBreakBlockedByTryStatement)(t)?(e.markTryUses("usesBreak"),i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:e.TS(t,"TRY_BREAK")}))):i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{}))};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(965)},9015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformClassDeclaration=function(e,t){return(0,r.transformClassLikeDeclaration)(e,t).statements};const r=n(5082)},254:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformContinueStatement=function(e,t){return t.label?(a.DiagnosticService.addDiagnostic(o.errors.noLabeledStatement(t.label)),i.default.list.make()):(0,s.isBreakBlockedByTryStatement)(t)?(e.markTryUses("usesContinue"),i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:e.TS(t,"TRY_CONTINUE")}))):i.default.list.make(i.default.create(i.default.SyntaxKind.ContinueStatement,{}))};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(965)},299:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformDoStatement=function(e,{expression:t,statement:n}){const r=(0,a.transformStatementList)(e,n,(0,c.getStatements)(n));let u=!0;l.default.isPrefixUnaryExpression(t)&&t.operator===l.default.SyntaxKind.ExclamationToken&&(t=t.operand,u=!1);const[_,d]=e.capture((()=>(0,s.createTruthinessChecks)(e,(0,o.transformExpression)(e,t),t))),p=i.default.list.make();return i.default.list.push(p,i.default.create(i.default.SyntaxKind.DoStatement,{statements:r})),i.default.list.pushList(p,d),i.default.list.make(i.default.create(i.default.SyntaxKind.RepeatStatement,{statements:p,condition:u?i.default.unary("not",_):_}))};const i=r(n(9861)),o=n(6671),a=n(8043),s=n(410),c=n(1441),l=r(n(2137))},9915:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformEnumDeclaration=function(e,t){if(f.default.hasSyntacticModifier(t,f.default.ModifierFlags.Const)&&!0!==e.compilerOptions.preserveConstEnums)return i.default.list.make();const n=e.typeChecker.getSymbolAtLocation(t.name);if(n&&(0,d.hasMultipleDefinitions)(n,(e=>f.default.isEnumDeclaration(e)&&!f.default.hasSyntacticModifier(e,f.default.ModifierFlags.Const))))return s.DiagnosticService.addDiagnosticWithCache(n,o.errors.noEnumMerging(t),e.multiTransformState.isReportedByMultipleDefinitionsCache),i.default.list.make();(0,p.validateIdentifier)(e,t.name);const r=(0,l.transformIdentifierDefined)(e,t.name),g=void 0!==n&&!0===e.isHoisted.get(n);if(t.members.every((t=>!m(e,t)))){const n=i.default.map(t.members.map((t=>[e.pushToVarIfComplex((0,u.transformPropertyName)(e,t.name)),i.default.string(e.typeChecker.getConstantValue(t))])));return i.default.list.make(g?i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:n}):i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:n}))}const h=e.capturePrereqs((()=>{const n=e.pushToVar(i.default.map(),"inverse");e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:i.default.call(i.default.globals.setmetatable,[i.default.map(),i.default.map([[i.default.strings.__index,n]])])}));for(const o of t.members){const t=(0,u.transformPropertyName)(e,o.name),s=(0,_.expressionMightMutate)(e,t,f.default.isComputedPropertyName(o.name)?o.name.expression:o.name)?e.pushToVar(t):t,l=e.typeChecker.getConstantValue(o);let d;"string"==typeof l?d=i.default.string(l):"number"==typeof l?d=i.default.number(l):((0,a.assert)(o.initializer),d=e.pushToVarIfComplex((0,c.transformExpression)(e,o.initializer),"value")),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:r,index:s}),operator:"=",right:d})),m(e,o)&&e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:d}),operator:"=",right:s}))}})),y=i.default.list.make(i.default.create(i.default.SyntaxKind.DoStatement,{statements:h}));return g||i.default.list.unshift(y,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:void 0})),y};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(6848),u=n(5671),_=n(5708),d=n(1871),p=n(837),f=r(n(2137));function m(e,t){return"string"!=typeof e.typeChecker.getConstantValue(t)}},6602:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformExportAssignment=function(e,t){const n=e.typeChecker.getSymbolAtLocation(t.expression);return n&&(0,c.isSymbolMutable)(e,n)&&a.DiagnosticService.addDiagnostic(o.errors.noExportAssignmentLet(t)),n&&!(0,l.isSymbolOfValue)(u.default.skipAlias(n,e.typeChecker))?i.default.list.make():t.isExportEquals?function(e,t){e.hasExportEquals=!0;const n=t.getSourceFile();return n.statements[n.statements.length-1]===t?i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:(0,s.transformExpression)(e,t.expression)})):i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:e.getModuleIdFromNode(t),right:(0,s.transformExpression)(e,t.expression)}))}(e,t):function(e,t){const n=i.default.list.make(),[r,o]=e.capture((()=>(0,s.transformExpression)(e,t.expression)));return i.default.list.pushList(n,o),i.default.list.push(n,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.id("default"),right:r})),n}(e,t)};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(3527),l=n(1205),u=r(n(2137))},9337:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformExportDeclaration=function(e,t){return t.isTypeOnly?i.default.list.make():t.moduleSpecifier?function(e,t){var n;(0,o.assert)(t.moduleSpecifier&&l.default.isStringLiteral(t.moduleSpecifier));const r=i.default.list.make();let c;const _=t.exportClause,d=function(e,t){let n=0;if(t&&l.default.isNamedExports(t))for(const r of t.elements)u(e,r)&&n++;else n++;return n}(e,_);if(1===d)c=(0,s.createImportExpression)(e,t.getSourceFile(),t.moduleSpecifier);else if(d>1){const n=t.moduleSpecifier.text.split("/");c=i.default.tempId((0,a.cleanModuleName)(n[n.length-1])),i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:c,right:(0,s.createImportExpression)(e,t.getSourceFile(),t.moduleSpecifier)}))}if(!c)return r;const p=e.getModuleIdFromNode(t);if(_)if(l.default.isNamedExports(_))for(const t of _.elements)u(e,t)&&i.default.list.push(r,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(p,t.name.text),operator:"=",right:i.default.property(c,(null!==(n=t.propertyName)&&void 0!==n?n:t.name).text)}));else i.default.list.push(r,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(p,_.name.text),operator:"=",right:c}));else{const e=i.default.tempId("k"),t=i.default.tempId("v");i.default.list.push(r,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(e,t),expression:i.default.binary(c,"or",i.default.map()),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:p,index:e}),operator:"=",right:t}))}))}return e.hasExportFrom=!0,r}(e,t):i.default.list.make()};const i=r(n(9861)),o=n(2287),a=n(6073),s=n(3842),c=n(1205),l=r(n(2137));function u(e,t){if(t.isTypeOnly)return!1;if(e.resolver.isReferencedAliasDeclaration(t))return!0;const n=e.typeChecker.getSymbolAtLocation(t.name);return!(!n||!(0,c.isSymbolOfValue)(l.default.skipAlias(n,e.typeChecker)))}},7858:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformExpressionStatementInner=f,t.transformExpressionStatement=function(e,t){return f(e,(0,_.skipDownwards)(t.expression))};const i=r(n(9861)),o=n(6671),a=n(5260),s=n(7010),c=n(226),l=n(6614),u=n(9957),_=n(6219),d=n(6837),p=r(n(2137));function f(e,t){if(p.default.isBinaryExpression(t)){const n=t.operatorToken.kind;if(p.default.isLogicalOrCoalescingAssignmentExpression(t))return(0,a.transformLogicalOrCoalescingAssignmentExpressionStatement)(e,t);if(p.default.isAssignmentOperator(n)&&!p.default.isArrayLiteralExpression(t.left)&&!p.default.isObjectLiteralExpression(t.left)){const r=e.getType(t.left),o=e.getType(t.right),a=(0,l.getSimpleAssignmentOperator)(r,n,o),{writable:c,readable:_,value:d}=(0,s.transformWritableAssignment)(e,t.left,t.right,void 0===a,void 0===a);return void 0!==a?i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:c,operator:a,right:(0,u.getAssignableValue)(a,d,o)})):i.default.list.make((0,l.createCompoundAssignmentStatement)(e,t,c,r,_,n,d,o))}}else if((p.default.isPrefixUnaryExpression(t)||p.default.isPostfixUnaryExpression(t))&&(0,c.isUnaryAssignmentOperator)(t.operator))return i.default.list.make(function(e,t){const n=(0,s.transformWritableExpression)(e,t.operand,!1),r=t.operator===p.default.SyntaxKind.PlusPlusToken?"+=":"-=";return i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:r,right:i.default.number(1)})}(e,t));return(0,d.wrapExpressionStatement)((0,o.transformExpression)(e,t))}},5869:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformForOfRangeMacro=j,t.transformForOfStatement=function(e,t){if(t.awaitModifier&&c.DiagnosticService.addDiagnostic(o.errors.noAwaitForOf(t)),T.default.isVariableDeclarationList(t.initializer)){const n=t.initializer.declarations[0].name;T.default.isIdentifier(n)&&(0,S.validateIdentifier)(e,n)}const n=function(e,t){const n=(0,b.skipDownwards)(t.expression);if(T.default.isCallExpression(n)){const t=(0,x.getFirstDefinedSymbol)(e,e.getType(n.expression));if(t&&t===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.$range))return n}}(e,t);if(n)return j(e,t,n);const r=i.default.list.make(),[l,u]=e.capture((()=>(0,d.transformExpression)(e,t.expression)));i.default.list.pushList(r,u);const _=e.getType(t.expression),p=(0,f.transformStatementList)(e,t.statement,(0,v.getStatements)(t.statement)),m=function(e,t,n){return(0,x.isDefinitelyType)(n,(0,x.isArrayType)(e))?E:(0,x.isDefinitelyType)(n,(0,x.isSetType)(e))?P:(0,x.isDefinitelyType)(n,(0,x.isMapType)(e))?A:(0,x.isDefinitelyType)(n,x.isStringType)?I:(0,x.isDefinitelyType)(n,(0,x.isIterableFunctionLuaTupleType)(e))?(e=>(t,n,r,o)=>{if(T.default.isVariableDeclarationList(r)){const e=r.declarations[0].name;if(T.default.isArrayBindingPattern(e))return M(t,e,n,o)}else if(T.default.isArrayLiteralExpression(r))return M(t,r,n,o);const s=new Array,c=e.getCallSignatures()[0].getReturnType();(0,a.assert)(c&&c.aliasTypeArguments&&1===c.aliasTypeArguments.length,"Incorrect LuaTuple type arguments");const l=c.aliasTypeArguments[0];if(!T.default.isVariableDeclarationList(r)||!t.typeChecker.isTupleType(l)||l.target.combinedFlags&T.default.ElementFlags.Rest){const e=t.pushToVar(o,(0,k.valueToIdStr)(o)||"iterFunc"),a=i.default.list.make(),s=i.default.list.make(),c=D(t,r,s);return i.default.list.push(a,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:c,right:i.default.array([i.default.call(e)])})),i.default.list.push(a,i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(i.default.unary("#",c),"==",i.default.number(0)),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()})),i.default.list.pushList(a,s),i.default.list.pushList(a,n),i.default.list.make(i.default.create(i.default.SyntaxKind.WhileStatement,{condition:i.default.bool(!0),statements:a}))}{const e=l.target;for(let t=0;t{for(const e of s)i.default.list.push(r,e);return i.default.list.push(o,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:u,right:i.default.array(s)})),n}));return _(t,n,r,o)})(n):(0,x.isDefinitelyType)(n,(0,x.isIterableFunctionType)(e))?O:(0,x.isDefinitelyType)(n,(0,x.isGeneratorType)(e))?L:(0,x.isDefinitelyType)(n,(0,x.isIterableType)(e))?(c.DiagnosticService.addDiagnostic(o.errors.noIterableIteration(t)),()=>i.default.list.make()):n.isUnion()?(c.DiagnosticService.addDiagnostic(o.errors.noMacroUnion(t)),()=>i.default.list.make()):void(0,a.assert)(!1,`ForOf iteration type not implemented: ${e.typeChecker.typeToString(n)}`)}(e,t.expression,_);return i.default.list.pushList(r,m(e,p,t.initializer,l)),r};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(3115),c=n(4502),l=n(7598),u=n(1822),_=n(2865),d=n(6671),p=n(1782),f=n(8043),m=n(7010),g=n(6453),h=n(7034),y=n(2036),v=n(1441),b=n(6219),x=n(1915),S=n(837),k=n(2161),T=r(n(2137));function C(e){return(t,n,r,o)=>{const a=i.default.list.make(),s=i.default.list.make(),c=e(t,r,o,a,s);return i.default.list.unshiftList(n,s),i.default.list.make(i.default.create(i.default.SyntaxKind.ForStatement,{ids:a,expression:c,statements:n}))}}function w(e,t,n,r){if(T.default.isArrayLiteralExpression(t)){const[o,a]=e.capture((()=>{const n=e.pushToVar(r,"binding");return(0,l.transformArrayAssignmentPattern)(e,t,n),n}));return i.default.list.pushList(n,a),o}if(T.default.isObjectLiteralExpression(t)){const[o,a]=e.capture((()=>{const n=e.pushToVar(r,"binding");return(0,_.transformObjectAssignmentPattern)(e,t,n),n}));return i.default.list.pushList(n,a),o}{const o=(0,m.transformWritableExpression)(e,t,!1);i.default.list.push(n,i.default.create(i.default.SyntaxKind.Assignment,{left:o,operator:"=",right:r}))}}function D(e,t,n){if(T.default.isVariableDeclarationList(t))return(0,u.transformBindingName)(e,t.declarations[0].name,n);if(T.default.isArrayLiteralExpression(t)){const r=i.default.tempId("binding");return i.default.list.pushList(n,e.capturePrereqs((()=>(0,l.transformArrayAssignmentPattern)(e,t,r)))),r}if(T.default.isObjectLiteralExpression(t)){const r=i.default.tempId("binding");return i.default.list.pushList(n,e.capturePrereqs((()=>(0,_.transformObjectAssignmentPattern)(e,t,r)))),r}{const r=i.default.tempId("v"),o=(0,m.transformWritableExpression)(e,t,!1);return i.default.list.push(n,i.default.create(i.default.SyntaxKind.Assignment,{left:o,operator:"=",right:r})),r}}const E=C(((e,t,n,r,o)=>(i.default.list.push(r,i.default.tempId()),i.default.list.push(r,D(e,t,o)),n))),P=C(((e,t,n,r,o)=>(i.default.list.push(r,D(e,t,o)),n)));function N(e,t,n,r){for(const a of t.elements)if(T.default.isOmittedExpression(a))i.default.list.push(n,i.default.tempId());else if(T.default.isSpreadElement(a))c.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(a));else{const t=(0,u.transformBindingName)(e,a.name,r);a.initializer&&i.default.list.push(r,(0,p.transformInitializer)(e,t,a.initializer)),i.default.list.push(n,t)}}function F(e,t,n,r){i.default.list.pushList(r,e.capturePrereqs((()=>{for(let r of t.elements)if(T.default.isOmittedExpression(r))i.default.list.push(n,i.default.tempId());else if(T.default.isSpreadElement(r))c.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(r));else{let t;T.default.isBinaryExpression(r)&&(t=(0,b.skipDownwards)(r.right),r=(0,b.skipDownwards)(r.left));const o=i.default.tempId("binding");if(T.default.isIdentifier(r)||T.default.isElementAccessExpression(r)||T.default.isPropertyAccessExpression(r)){const n=(0,m.transformWritableExpression)(e,r,void 0!==t);e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:o})),t&&e.prereq((0,p.transformInitializer)(e,n,t))}else T.default.isArrayLiteralExpression(r)?(t&&e.prereq((0,p.transformInitializer)(e,o,t)),(0,l.transformArrayAssignmentPattern)(e,r,o)):T.default.isObjectLiteralExpression(r)?(t&&e.prereq((0,p.transformInitializer)(e,o,t)),(0,_.transformObjectAssignmentPattern)(e,r,o)):(0,a.assert)(!1,`transformInLineArrayAssignmentPattern invalid element: ${(0,y.getKindName)(r.kind)}`);i.default.list.push(n,o)}})))}const A=C(((e,t,n,r,o)=>{if(T.default.isVariableDeclarationList(t)){const i=t.declarations[0].name;if(T.default.isArrayBindingPattern(i))return N(e,i,r,o),n}else if(T.default.isArrayLiteralExpression(t))return F(e,t,r,o),n;const a=i.default.tempId("k"),s=i.default.tempId("v");if(i.default.list.push(r,a),i.default.list.push(r,s),T.default.isVariableDeclarationList(t)){const n=i.default.list.make();i.default.list.push(o,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:D(e,t,n),right:i.default.array([a,s])})),i.default.list.pushList(o,n)}else w(e,t,o,i.default.array([a,s]));return n})),I=C(((e,t,n,r,o)=>(i.default.list.push(r,D(e,t,o)),i.default.call(i.default.globals.string.gmatch,[n,i.default.globals.utf8.charpattern])))),O=C(((e,t,n,r,o)=>(i.default.list.push(r,D(e,t,o)),n)));function M(e,t,n,r){const o=i.default.list.make(),a=i.default.list.make();return T.default.isArrayBindingPattern(t)?N(e,t,o,a):F(e,t,o,a),i.default.list.unshiftList(n,a),i.default.list.make(i.default.create(i.default.SyntaxKind.ForStatement,{ids:o,expression:r,statements:n}))}const L=C(((e,t,n,r,o)=>{const a=i.default.tempId("result");if(i.default.list.push(r,a),i.default.list.push(o,i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.property(a,"done"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()})),T.default.isVariableDeclarationList(t)){const n=i.default.list.make();i.default.list.push(o,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:D(e,t,n),right:i.default.property(a,"value")})),i.default.list.pushList(o,n)}else w(e,t,o,i.default.property(a,"value"));return i.default.property((0,g.convertToIndexableExpression)(n),"next")}));function j(e,t,n){const r=i.default.list.make(),o=i.default.list.make(),a=D(e,t.initializer,o),[[s,c,l],u]=e.capture((()=>(0,h.ensureTransformOrder)(e,n.arguments)));return i.default.list.pushList(r,u),i.default.list.pushList(o,(0,f.transformStatementList)(e,t.statement,(0,v.getStatements)(t.statement))),i.default.list.push(r,i.default.create(i.default.SyntaxKind.NumericForStatement,{id:a,start:s,end:c,step:void 0===l||i.default.isNumberLiteral(l)?l:i.default.binary(l,"or",i.default.number(1)),statements:o})),r}},9430:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformForStatement=function(e,t){if(e.data.projectOptions.optimizedLoops){const n=function(e,t){const{initializer:n,condition:r,incrementor:o,statement:a}=t;if(!n||!v.default.isVariableDeclarationList(n)||1!==n.declarations.length)return;const{name:s,initializer:u}=n.declarations[0];if(!v.default.isIdentifier(s)||void 0===u)return;const _=e.typeChecker.getSymbolAtLocation(s);if(!_)return;if(!T(e,u))return;if(!o)return;const p=function(e,t,n){return v.default.isBinaryExpression(t)&&v.default.isIdentifier(t.left)&&e.typeChecker.getSymbolAtLocation(t.left)===n&&t.operatorToken.kind===v.default.SyntaxKind.PlusEqualsToken&&v.default.isNumericLiteral(t.right)&&T(e,t.right)?Number(t.right.getText()):v.default.isBinaryExpression(t)&&t.operatorToken.kind===v.default.SyntaxKind.MinusEqualsToken&&v.default.isNumericLiteral(t.right)&&T(e,t.right)?-Number(t.right.getText()):(v.default.isPostfixUnaryExpression(t)||v.default.isPrefixUnaryExpression(t))&&v.default.isIdentifier(t.operand)&&e.typeChecker.getSymbolAtLocation(t.operand)===n&&t.operator===v.default.SyntaxKind.PlusPlusToken?1:(v.default.isPostfixUnaryExpression(t)||v.default.isPrefixUnaryExpression(t))&&v.default.isIdentifier(t.operand)&&e.typeChecker.getSymbolAtLocation(t.operand)===n&&t.operator===v.default.SyntaxKind.MinusMinusToken?-1:void 0}(e,o,_);if(void 0===p)return;if(!r||!v.default.isBinaryExpression(r))return;if(r.operatorToken.kind===v.default.SyntaxKind.LessThanToken||r.operatorToken.kind===v.default.SyntaxKind.LessThanEqualsToken){if(p<0)return}else{if(r.operatorToken.kind!==v.default.SyntaxKind.GreaterThanToken&&r.operatorToken.kind!==v.default.SyntaxKind.GreaterThanEqualsToken)return;if(p>0)return}if(!T(e,r.right))return;if(function(e,t,n){return!0===v.default.FindAllReferences.Core.eachSymbolReferenceInFile(t,e.typeChecker,t.getSourceFile(),(e=>{const t=(0,h.skipUpwards)(e).parent;return!(!v.default.isAssignmentExpression(t)||(0,h.skipDownwards)(t.left)!==e)||!(!v.default.isUnaryExpressionWithWrite(t)||(0,h.skipDownwards)(t.operand)!==e)}),n)}(e,s,a))return;const f=i.default.list.make(),y=(0,l.transformIdentifierDefined)(e,s),[b,x]=e.capture((()=>(0,c.transformExpression)(e,u)));i.default.list.pushList(f,x);let[S,k]=e.capture((()=>(0,c.transformExpression)(e,r.right)));i.default.list.pushList(f,k);const C=i.default.number(p),w=(0,d.transformStatementList)(e,a,(0,m.getStatements)(a));return r.operatorToken.kind===v.default.SyntaxKind.LessThanToken?S=(0,g.offset)(S,-1):r.operatorToken.kind===v.default.SyntaxKind.GreaterThanToken&&(S=(0,g.offset)(S,1)),i.default.list.push(f,i.default.create(i.default.SyntaxKind.NumericForStatement,{id:y,start:b,end:S,step:C,statements:w})),f}(e,t);if(n)return n}return function(e,t){const{initializer:n,condition:r,incrementor:g,statement:h}=t,y=i.default.list.make(),b=i.default.list.make(),T=i.default.list.make(),C=n&&v.default.isVariableDeclarationList(n)?(0,f.getDeclaredVariables)(n):[],w=new Set,D=new Set;if(n&&v.default.isVariableDeclarationList(n))for(const r of C){const i=e.typeChecker.getSymbolAtLocation(r);(0,a.assert)(i),k(e,t,r)&&w.add(i),S(e,n,r)&&D.add(i)}if(n)if(v.default.isVariableDeclarationList(n)){(0,_.isVarDeclaration)(n)&&s.DiagnosticService.addDiagnostic(o.errors.noVar(t));for(const t of C){const n=e.typeChecker.getSymbolAtLocation(t);if((0,a.assert)(n),w.has(n))if(D.has(n))e.symbolToIdMap.set(n,i.default.tempId(t.getText()));else{const r=i.default.tempId(`${t.getText()}Copy`);e.symbolToIdMap.set(n,r)}}for(const t of n.declarations){const[n,r]=e.capture((()=>{const n=i.default.list.make(),[r,o]=e.capture((()=>(0,_.transformVariableDeclaration)(e,t)));return i.default.list.pushList(n,o),i.default.list.pushList(n,r),n}));i.default.list.pushList(y,r),i.default.list.pushList(y,n)}for(const t of C){const n=e.typeChecker.getSymbolAtLocation(t);if((0,a.assert)(n),w.has(n)){let r;if(D.has(n))r=e.symbolToIdMap.get(n),(0,a.assert)(r);else{r=i.default.tempId(t.getText());const o=e.symbolToIdMap.get(n);(0,a.assert)(o),i.default.list.push(y,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:o}))}e.symbolToIdMap.delete(n);const o=(0,l.transformIdentifierDefined)(e,t);i.default.list.push(b,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:o,right:r})),i.default.list.push(T,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:o}))}}}else{const[t,r]=e.capture((()=>(0,u.transformExpressionStatementInner)(e,n)));i.default.list.pushList(y,r),i.default.list.pushList(y,t)}if(g){const t=i.default.tempId("shouldIncrement");i.default.list.push(y,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:t,right:i.default.bool(!1)}));const n=i.default.list.make(),[r,o]=e.capture((()=>(0,u.transformExpressionStatementInner)(e,g)));i.default.list.pushList(n,o),i.default.list.pushList(n,r),i.default.list.push(b,i.default.create(i.default.SyntaxKind.IfStatement,{condition:t,statements:n,elseBody:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:i.default.bool(!0)}))}))}let[E,P]=e.capture((()=>r?(0,p.createTruthinessChecks)(e,(0,c.transformExpression)(e,r),r):i.default.bool(!0)));return i.default.list.pushList(b,P),i.default.list.isEmpty(b)||(r&&i.default.list.push(b,i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.unary("not",E),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()})),E=i.default.bool(!0)),i.default.list.pushList(b,(0,d.transformStatementList)(e,h,(0,m.getStatements)(h))),i.default.list.isNonEmpty(b)&&i.default.list.isNonEmpty(T)&&x(b,b.head,T),b.tail&&i.default.isFinalStatement(b.tail.value)||i.default.list.pushList(b,T),i.default.list.push(y,i.default.create(i.default.SyntaxKind.WhileStatement,{condition:E,statements:b})),y.head===y.tail?y:i.default.list.make(i.default.create(i.default.SyntaxKind.DoStatement,{statements:y}))}(e,t)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(6848),u=n(7858),_=n(8007),d=n(8043),p=n(410),f=n(6117),m=n(1441),g=n(9582),h=n(6219),y=n(1915),v=r(n(2137));function b(e,t){i.default.list.isNonEmpty(e.statements)&&x(e.statements,e.statements.head,t),i.default.list.isList(e.elseBody)?i.default.list.isNonEmpty(e.elseBody)&&x(e.elseBody,e.elseBody.head,t):b(e.elseBody,t)}function x(e,t,n){(0,a.assert)(!i.default.list.isEmpty(e));const r=t.value;if(i.default.isContinueStatement(r)){const o=i.default.list.clone(n);i.default.list.forEach(o,(e=>e.parent=r.parent)),t.prev?t.prev.next=o.head:t===e.head&&(e.head=o.head),t.prev=o.tail,o.tail.next=t}i.default.isDoStatement(r)?i.default.list.isNonEmpty(r.statements)&&x(r.statements,r.statements.head,n):i.default.isIfStatement(r)&&b(r,n),t.next&&x(e,t.next,n)}function S(e,t,n){return!v.default.FindAllReferences.Core.isSymbolReferencedInFile(n,e.typeChecker,n.getSourceFile(),t)}function k(e,t,n){return v.default.FindAllReferences.Core.eachSymbolReferenceInFile(n,e.typeChecker,n.getSourceFile(),(e=>{if(v.default.isWriteAccess(e)&&(!t.incrementor||!(0,h.isAncestorOf)(t.incrementor,e)))return!0;const n=(0,h.getAncestor)(e,(e=>e===t||v.default.isFunctionLike(e)));return!(!n||n===t)||void 0}),t)}function T(e,t){if(v.default.isNumericLiteral(t))return Number.isInteger(Number(t.getText()));if(v.default.isBinaryExpression(t)){if(t.operatorToken.kind===v.default.SyntaxKind.PlusToken||t.operatorToken.kind===v.default.SyntaxKind.MinusToken||t.operatorToken.kind===v.default.SyntaxKind.AsteriskToken||t.operatorToken.kind===v.default.SyntaxKind.AsteriskAsteriskToken)return T(e,t.left)&&T(e,t.right)}else if(v.default.isPrefixUnaryExpression(t)){if(t.operator===v.default.SyntaxKind.PlusToken||t.operator===v.default.SyntaxKind.MinusToken)return T(e,t.operand)}else{if(function(e,t){if(v.default.isCallExpression(t)){const n=e.typeChecker.getNonOptionalType(e.getType(t.expression)),r=(0,y.getFirstDefinedSymbol)(e,n);if(r&&e.services.macroManager.getPropertyCallMacro(r)&&"size"===r.name)return!0}return!1}(e,t))return!0;if((0,y.isDefinitelyType)(e.getType(t),(e=>e.isNumberLiteral()&&Number.isInteger(e.value))))return!0}return!1}},2797:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformFunctionDeclaration=function(e,t){if(!t.body)return i.default.list.make();const n=p.default.hasSyntacticModifier(t,p.default.ModifierFlags.ExportDefault);(0,a.assert)(t.name||n),t.name&&(0,_.validateIdentifier)(e,t.name);const r=t.name?(0,c.transformIdentifierDefined)(e,t.name):i.default.id("default");let{statements:f,parameters:m,hasDotDotDot:g}=(0,l.transformParameters)(e,t);i.default.list.pushList(f,(0,u.transformStatementList)(e,t.body,t.body.statements));let h=n;if(t.name){const n=e.typeChecker.getSymbolAtLocation(t.name);(0,a.assert)(n),h=!0!==e.isHoisted.get(n)}const y=p.default.hasSyntacticModifier(t,p.default.ModifierFlags.Async);if(t.asteriskToken&&(y&&s.DiagnosticService.addDiagnostic(o.errors.noAsyncGeneratorFunctions(t)),f=(0,d.wrapStatementsAsGenerator)(e,t,f)),y){const n=i.default.call(e.TS(t,"async"),[i.default.create(i.default.SyntaxKind.FunctionExpression,{hasDotDotDot:g,parameters:m,statements:f})]);return h?i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:n})):i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:n}))}return i.default.list.make(i.default.create(i.default.SyntaxKind.FunctionDeclaration,{localize:h,name:r,statements:f,parameters:m,hasDotDotDot:g}))};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6848),l=n(7937),u=n(8043),_=n(837),d=n(6442),p=r(n(2137))},9770:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformIfStatementInner=u,t.transformIfStatement=function(e,t){return i.default.list.make(u(e,t))};const i=r(n(9861)),o=n(6671),a=n(8043),s=n(410),c=n(1441),l=r(n(2137));function u(e,t){const n=(0,s.createTruthinessChecks)(e,(0,o.transformExpression)(e,t.expression),t.expression),r=(0,a.transformStatementList)(e,t.thenStatement,(0,c.getStatements)(t.thenStatement)),_=t.elseStatement;let d;if(void 0===_)d=i.default.list.make();else if(l.default.isIfStatement(_)){const[t,n]=e.capture((()=>u(e,_)));if(i.default.list.isEmpty(n))d=t;else{const e=i.default.list.make();i.default.list.pushList(e,n),i.default.list.push(e,t),d=e}}else d=(0,a.transformStatementList)(e,_,(0,c.getStatements)(_));return i.default.create(i.default.SyntaxKind.IfStatement,{condition:n,statements:r,elseBody:d})}},8677:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformImportDeclaration=function(e,t){const n=t.importClause;if(n&&n.isTypeOnly)return i.default.list.make();const r=i.default.list.make();(0,a.assert)(p.default.isStringLiteral(t.moduleSpecifier));const f=new o.Lazy((()=>(0,l.createImportExpression)(e,t.getSourceFile(),t.moduleSpecifier)));if(n){const o=function(e,t){let n=0;if(t.name){const r=(0,u.getOriginalSymbolOfNode)(e.typeChecker,t.name);!e.resolver.isReferencedAliasDeclaration(t)||r&&!(0,d.isSymbolOfValue)(r)||n++}if(t.namedBindings)if(p.default.isNamespaceImport(t.namedBindings))n++;else for(const r of t.namedBindings.elements){const t=(0,u.getOriginalSymbolOfNode)(e.typeChecker,r.name);!e.resolver.isReferencedAliasDeclaration(r)||t&&!(0,d.isSymbolOfValue)(t)||n++}return n}(e,n);if(o>1){const e=t.moduleSpecifier.text.split("/"),n=i.default.tempId((0,c.cleanModuleName)(e[e.length-1]));i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:n,right:f.get()})),f.set(n)}const a=n.name;if(a){const o=(0,u.getOriginalSymbolOfNode)(e.typeChecker,a);if(e.resolver.isReferencedAliasDeclaration(n)&&(!o||(0,d.isSymbolOfValue)(o))){const n=(0,_.getSourceFileFromModuleSpecifier)(e,t.moduleSpecifier),o=n&&e.typeChecker.getSymbolAtLocation(n);o&&e.getModuleExports(o).some((e=>"default"===e.name))?i.default.list.pushList(r,e.capturePrereqs((()=>(0,s.transformVariable)(e,a,i.default.property(f.get(),"default"))))):i.default.list.pushList(r,e.capturePrereqs((()=>(0,s.transformVariable)(e,a,f.get()))))}}const l=n.namedBindings;if(l)if(p.default.isNamespaceImport(l))i.default.list.pushList(r,e.capturePrereqs((()=>(0,s.transformVariable)(e,l.name,f.get()))));else for(const t of l.elements){const n=(0,u.getOriginalSymbolOfNode)(e.typeChecker,t.name);!e.resolver.isReferencedAliasDeclaration(t)||n&&!(0,d.isSymbolOfValue)(n)||i.default.list.pushList(r,e.capturePrereqs((()=>{var n;return(0,s.transformVariable)(e,t.name,i.default.property(f.get(),(null!==(n=t.propertyName)&&void 0!==n?n:t.name).text))})))}}if(!n||e.compilerOptions.verbatimModuleSyntax&&i.default.list.isEmpty(r)){const e=f.get();i.default.isCallExpression(e)&&i.default.list.push(r,i.default.create(i.default.SyntaxKind.CallStatement,{expression:e}))}return r};const i=r(n(9861)),o=n(1164),a=n(2287),s=n(8007),c=n(6073),l=n(3842),u=n(9525),_=n(4164),d=n(1205),p=r(n(2137))},4789:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformImportEqualsDeclaration=function(e,t){const{moduleReference:n}=t;if(u.default.isExternalModuleReference(n)){(0,o.assert)(u.default.isStringLiteral(n.expression));const r=(0,c.createImportExpression)(e,t.getSourceFile(),n.expression),s=i.default.list.make(),_=e.typeChecker.getSymbolAtLocation(t.name);return(0,o.assert)(_),(0,l.isSymbolOfValue)(u.default.skipAlias(_,e.typeChecker))&&i.default.list.pushList(s,e.capturePrereqs((()=>(0,a.transformVariable)(e,t.name,r)))),e.compilerOptions.verbatimModuleSyntax&&i.default.list.isEmpty(s)&&i.default.isCallExpression(r)&&i.default.list.push(s,i.default.create(i.default.SyntaxKind.CallStatement,{expression:r})),s}return e.capturePrereqs((()=>(0,a.transformVariable)(e,t.name,(0,s.transformEntityName)(e,n))))};const i=r(n(9861)),o=n(2287),a=n(8007),s=n(2583),c=n(3842),l=n(1205),u=r(n(2137))},6389:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformModuleDeclaration=function(e,t){if(!g.default.isInstantiatedModule(t,!1))return i.default.list.make();const n=e.typeChecker.getSymbolAtLocation(t.name);return n&&(0,_.hasMultipleDefinitions)(n,(e=>function(e){const t=g.default.canHaveModifiers(e)?g.default.getModifiers(e):void 0;return!(null==t?void 0:t.some((e=>e.kind===g.default.SyntaxKind.DeclareKeyword)))&&(!(!g.default.isModuleDeclaration(e)||!g.default.isInstantiatedModule(e,!1))||(!(!g.default.isFunctionDeclaration(e)||!e.body)||!!g.default.isClassDeclaration(e)))}(e)))?(c.DiagnosticService.addDiagnosticWithCache(n,o.errors.noNamespaceMerging(t),e.multiTransformState.isReportedByMultipleDefinitionsCache),i.default.list.make()):((0,a.assert)(!g.default.isStringLiteral(t.name)),(0,a.assert)(t.body&&!g.default.isIdentifier(t.body)),y(e,t.name,t.body))};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(2991),c=n(4502),l=n(6848),u=n(8043),_=n(1871),d=n(3527),p=n(1205),f=n(6219),m=n(837),g=r(n(2137));function h(e){var t;for(const n of null!==(t=e.getDeclarations())&&void 0!==t?t:[]){const e=(0,f.getAncestor)(n,g.default.isStatement);if(e){const t=g.default.canHaveModifiers(e)?g.default.getModifiers(e):void 0;if(g.default.isFunctionDeclaration(e)&&!e.body)continue;if(g.default.isTypeAliasDeclaration(e))continue;if(g.default.isInterfaceDeclaration(e))continue;if(null==t?void 0:t.some((e=>e.kind===g.default.SyntaxKind.DeclareKeyword)))continue;return e}}}function y(e,t,n){const r=e.typeChecker.getSymbolAtLocation(t);(0,a.assert)(r),(0,m.validateIdentifier)(e,t);const o=(0,l.transformIdentifierDefined)(e,t),c=i.default.list.make(),_=i.default.list.make(),f=i.default.tempId("container");e.setModuleIdBySymbol(r,f),e.isHoisted.get(r)?i.default.list.push(c,i.default.create(i.default.SyntaxKind.Assignment,{left:o,operator:"=",right:i.default.map()})):i.default.list.push(c,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:o,right:i.default.map()}));const v=e.getModuleExports(r);if(v.length>0&&i.default.list.push(_,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:f,right:o})),g.default.isModuleBlock(n)){const t=new Map;if(v.length>0)for(const n of v){const r=g.default.skipAlias(n,e.typeChecker);if((0,p.isSymbolOfValue)(r)&&!(0,d.isSymbolMutable)(e,r)){const e=h(n);e&&(0,s.getOrSetDefault)(t,e,(()=>[])).push(n.name)}}i.default.list.pushList(_,(0,u.transformStatementList)(e,n,n.statements,{id:f,mapping:t}))}else i.default.list.pushList(_,y(e,n.name,n.body)),i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(f,n.name.text),operator:"=",right:(0,l.transformIdentifierDefined)(e,n.name)}));return i.default.list.push(c,i.default.create(i.default.SyntaxKind.DoStatement,{statements:_})),c}},5807:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformReturnStatementInner=d,t.transformReturnStatement=function(e,t){return t.expression?d(e,t.expression):(0,c.isReturnBlockedByTryStatement)(t)?(e.markTryUses("usesReturn"),i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.list.make(e.TS(t,"TRY_RETURN"),i.default.array())}))):i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.nil()}))};const i=r(n(9861)),o=n(3115),a=n(6671),s=n(7034),c=n(965),l=n(6219),u=n(1915),_=r(n(2137));function d(e,t){const n=i.default.list.make();let r;if(_.default.isCallExpression(t)&&function(e,t){if(_.default.isCallExpression(t)){const n=(0,u.getFirstDefinedSymbol)(e,e.getType(t.expression));if(n&&n===e.services.macroManager.getSymbolOrThrow(o.SYMBOL_NAMES.$tuple))return!0}return!1}(e,t)){const[o,a]=e.capture((()=>(0,s.ensureTransformOrder)(e,t.arguments)));i.default.list.pushList(n,a),r=i.default.list.make(...o)}else r=(0,a.transformExpression)(e,(0,l.skipDownwards)(t)),(0,u.isLuaTupleType)(e)(e.getType(t))&&!function(e,t,n){return i.default.isCall(n)&&(0,u.isLuaTupleType)(e)(e.typeChecker.getTypeAtLocation((0,l.skipDownwards)(t)))}(e,t,r)&&(r=i.default.isArray(r)?r.members:i.default.call(i.default.globals.unpack,[r]));return(0,c.isReturnBlockedByTryStatement)(t)?(e.markTryUses("usesReturn"),i.default.list.push(n,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.list.make(e.TS(t,"TRY_RETURN"),i.default.create(i.default.SyntaxKind.Array,{members:i.default.list.isList(r)?r:i.default.list.make(r)}))}))):i.default.list.push(n,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:r})),n}},4318:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformStatement=function(e,t){const n=F.default.canHaveModifiers(t)?F.default.getModifiers(t):void 0;if(null==n?void 0:n.some((e=>e.kind===F.default.SyntaxKind.DeclareKeyword)))return A();const r=O.get(t.kind);if(r)return r(e,t);(0,a.assert)(!1,`Unknown statement: ${(0,N.getKindName)(t.kind)}`)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(2852),l=n(3489),u=n(9015),_=n(254),d=n(299),p=n(9915),f=n(6602),m=n(9337),g=n(7858),h=n(5869),y=n(9430),v=n(2797),b=n(9770),x=n(8677),S=n(4789),k=n(6389),T=n(5807),C=n(9753),w=n(6518),D=n(3785),E=n(8007),P=n(3847),N=n(2036),F=r(n(2137)),A=()=>i.default.list.make(),I=e=>(t,n)=>(s.DiagnosticService.addDiagnostic(e(n)),A()),O=(M=[[F.default.SyntaxKind.InterfaceDeclaration,A],[F.default.SyntaxKind.TypeAliasDeclaration,A],[F.default.SyntaxKind.EmptyStatement,A],[F.default.SyntaxKind.ForInStatement,I(o.errors.noForInStatement)],[F.default.SyntaxKind.LabeledStatement,I(o.errors.noLabeledStatement)],[F.default.SyntaxKind.DebuggerStatement,I(o.errors.noDebuggerStatement)],[F.default.SyntaxKind.Block,c.transformBlock],[F.default.SyntaxKind.BreakStatement,l.transformBreakStatement],[F.default.SyntaxKind.ClassDeclaration,u.transformClassDeclaration],[F.default.SyntaxKind.ContinueStatement,_.transformContinueStatement],[F.default.SyntaxKind.DoStatement,d.transformDoStatement],[F.default.SyntaxKind.EnumDeclaration,p.transformEnumDeclaration],[F.default.SyntaxKind.ExportAssignment,f.transformExportAssignment],[F.default.SyntaxKind.ExportDeclaration,m.transformExportDeclaration],[F.default.SyntaxKind.ExpressionStatement,g.transformExpressionStatement],[F.default.SyntaxKind.ForOfStatement,h.transformForOfStatement],[F.default.SyntaxKind.ForStatement,y.transformForStatement],[F.default.SyntaxKind.FunctionDeclaration,v.transformFunctionDeclaration],[F.default.SyntaxKind.IfStatement,b.transformIfStatement],[F.default.SyntaxKind.ImportDeclaration,x.transformImportDeclaration],[F.default.SyntaxKind.ImportEqualsDeclaration,S.transformImportEqualsDeclaration],[F.default.SyntaxKind.ModuleDeclaration,k.transformModuleDeclaration],[F.default.SyntaxKind.ReturnStatement,T.transformReturnStatement],[F.default.SyntaxKind.SwitchStatement,C.transformSwitchStatement],[F.default.SyntaxKind.ThrowStatement,w.transformThrowStatement],[F.default.SyntaxKind.TryStatement,D.transformTryStatement],[F.default.SyntaxKind.VariableStatement,E.transformVariableStatement],[F.default.SyntaxKind.WhileStatement,P.transformWhileStatement]],new Map(M));var M},9753:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSwitchStatement=function(e,t){const n=e.pushToVarIfComplex((0,o.transformExpression)(e,t.expression),"exp"),r=i.default.tempId("fallthrough");let s=!1;const u=i.default.list.make();let _=!1;for(let o=0;o(0,o.transformExpression)(e,t)));s=i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:s});let l=i.default.binary(n,"==",s);if(a)if(i.default.list.isEmpty(c))l=i.default.binary(r,"or",l);else{const e=i.default.unary("not",r);i.default.list.push(c,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:l})),c=i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:e,statements:c,elseBody:i.default.list.make()})),l=r}return{condition:l,prereqStatements:c}}(e,t.expression,n,r,l),p=t.statements.filter((e=>!c.default.isEmptyStatement(e))),f=p[0],m=1===p.length&&c.default.isBlock(f)?(0,a.transformStatementList)(e,f,f.statements):(0,a.transformStatementList)(e,t,t.statements),g=void 0===m.tail||!i.default.isFinalStatement(m.tail.value);g&&u&&i.default.list.push(m,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:i.default.bool(!0)}));const h=i.default.list.make(),y=(0,s.createHoistDeclaration)(e,t);return y&&i.default.list.push(h,y),i.default.list.push(h,i.default.create(i.default.SyntaxKind.IfStatement,{condition:_,statements:m,elseBody:i.default.list.make()})),{canFallThroughFrom:g,prereqs:d,clauseStatements:h}}},6518:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformThrowStatement=function(e,t){const n=new Array;return void 0!==t.expression&&n.push((0,o.transformExpression)(e,t.expression)),i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.error,n)}))};const i=r(n(9861)),o=n(6671)},3785:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformTryStatement=function(e,t){const n=i.default.list.make(),r=i.default.tempId("exitType"),_=i.default.tempId("returns"),d=e.pushTryUsesStack();return i.default.list.push(n,function(e,t,n,r,c){const l=new Array;return l.push(i.default.create(i.default.SyntaxKind.FunctionExpression,{parameters:i.default.list.make(),hasDotDotDot:!1,statements:(0,s.transformStatementList)(e,t.tryBlock,t.tryBlock.statements)})),t.catchClause?l.push(function(e,t){const n=i.default.list.make(),r=i.default.list.make();return t.variableDeclaration&&i.default.list.push(n,(0,a.transformBindingName)(e,t.variableDeclaration.name,r)),i.default.list.pushList(r,(0,s.transformStatementList)(e,t.block,t.block.statements)),i.default.create(i.default.SyntaxKind.FunctionExpression,{parameters:n,hasDotDotDot:!1,statements:r})}(e,t.catchClause)):((0,o.assert)(t.finallyBlock),l.push(i.default.nil())),t.finallyBlock&&l.push(i.default.create(i.default.SyntaxKind.FunctionExpression,{parameters:i.default.list.make(),hasDotDotDot:!1,statements:(0,s.transformStatementList)(e,t.finallyBlock,t.finallyBlock.statements)})),c.usesReturn||c.usesBreak||c.usesContinue?i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.list.make(n,r),right:i.default.call(e.TS(t,"try"),l)}):i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(e.TS(t,"try"),l)})}(e,t,r,_,d)),e.popTryUsesStack(),i.default.list.pushList(n,function(e,t,n,r,o){const a=new Array;if(!o.usesReturn&&!o.usesBreak&&!o.usesContinue)return i.default.list.make();const s=(0,c.isReturnBlockedByTryStatement)(t.parent),_=(0,c.isBreakBlockedByTryStatement)(t.parent);if(o.usesReturn&&s&&e.markTryUses("usesReturn"),o.usesBreak&&_&&e.markTryUses("usesBreak"),o.usesContinue&&_&&e.markTryUses("usesContinue"),o.usesReturn)if(s){if(a.push({condition:l(e,t,n,"TRY_RETURN"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.list.make(n,r)}))}),_)return u(n,a)}else a.push({condition:l(e,t,n,"TRY_RETURN"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.call(i.default.globals.unpack,[r])}))});return(o.usesBreak||o.usesContinue)&&(_?a.push({statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:n}))}):(o.usesBreak&&a.push({condition:l(e,t,n,"TRY_BREAK"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{}))}),o.usesContinue&&a.push({condition:l(e,t,n,"TRY_CONTINUE"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.ContinueStatement,{}))}))),u(n,a)}(e,t,r,_,d)),n};const i=r(n(9861)),o=n(2287),a=n(1822),s=n(8043),c=n(965);function l(e,t,n,r){return i.default.binary(n,"==",e.TS(t,r))}function u(e,t){(0,o.assert)(t.length>0);let n=i.default.create(i.default.SyntaxKind.IfStatement,{condition:e,statements:t[t.length-1].statements,elseBody:i.default.list.make()});for(let r=t.length-2;r>=0;r--)n=i.default.create(i.default.SyntaxKind.IfStatement,{condition:t[r].condition||e,statements:t[r].statements,elseBody:n});return i.default.list.make(n)}},8007:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformVariable=b,t.transformVariableDeclaration=S,t.isVarDeclaration=k,t.transformVariableDeclarationList=T,t.transformVariableStatement=function(e,t){return T(e,t.declarationList)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(2396),l=n(5235),u=n(6671),_=n(6848),d=n(1782),p=n(9254),f=n(4953),m=n(3527),g=n(1915),h=n(837),y=n(6837),v=r(n(2137));function b(e,t,n){(0,h.validateIdentifier)(e,t);const r=e.typeChecker.getSymbolAtLocation(t);if((0,a.assert)(r),(0,m.isSymbolMutable)(e,r)){const t=e.getModuleIdPropertyAccess(r);if(t)return n&&e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:n})),t}const o=(0,_.transformIdentifierDefined)(e,t);return(0,f.checkVariableHoist)(e,t,r),!0===e.isHoisted.get(r)?n&&e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:o,operator:"=",right:n})):e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:o,right:n})),o}function x(e,t,n){return e.capturePrereqs((()=>{const r=i.default.list.make(),u=e.capturePrereqs((()=>{for(const n of t.elements)if(v.default.isOmittedExpression(n))i.default.list.push(r,i.default.tempId());else{if(n.dotDotDotToken)return void s.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(n));if(v.default.isIdentifier(n.name)){(0,h.validateIdentifier)(e,n.name);const t=(0,_.transformIdentifierDefined)(e,n.name);i.default.list.push(r,t),n.initializer&&e.prereq((0,d.transformInitializer)(e,t,n.initializer))}else{const t=i.default.tempId("binding");i.default.list.push(r,t),n.initializer&&e.prereq((0,d.transformInitializer)(e,t,n.initializer)),v.default.isArrayBindingPattern(n.name)?(0,c.transformArrayBindingPattern)(e,n.name,t):(0,l.transformObjectBindingPattern)(e,n.name,t)}}}));(0,a.assert)(!i.default.list.isEmpty(r)),e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:r,right:n})),e.prereqList(u)}))}function S(e,t){const n=i.default.list.make();let r;t.initializer&&i.default.list.pushList(n,e.capturePrereqs((()=>r=(0,u.transformExpression)(e,t.initializer))));const o=t.name;if(v.default.isIdentifier(o))i.default.list.pushList(n,e.capturePrereqs((()=>b(e,o,r))));else{if((0,a.assert)(t.initializer&&r),0===o.elements.length)return i.default.isArray(r)&&i.default.list.isEmpty(r.members)||i.default.list.pushList(n,(0,y.wrapExpressionStatement)(r)),n;v.default.isArrayBindingPattern(o)?i.default.isCall(r)&&(0,g.isLuaTupleType)(e)(e.getType(t.initializer))&&!(0,p.arrayBindingPatternContainsHoists)(e,o)?i.default.list.pushList(n,x(e,o,r)):!i.default.isArray(r)||i.default.list.isEmpty(r.members)||(0,p.arrayBindingPatternContainsHoists)(e,o)?i.default.list.pushList(n,e.capturePrereqs((()=>(0,c.transformArrayBindingPattern)(e,o,e.pushToVar(r,"binding"))))):i.default.list.pushList(n,x(e,o,r.members)):i.default.list.pushList(n,e.capturePrereqs((()=>(0,l.transformObjectBindingPattern)(e,o,e.pushToVar(r,"binding")))))}return n}function k(e){return!(e.flags&v.default.NodeFlags.Const||e.flags&v.default.NodeFlags.Let)}function T(e,t){k(t)&&s.DiagnosticService.addDiagnostic(o.errors.noVar(t));const n=i.default.list.make();for(const r of t.declarations){const[t,o]=e.capture((()=>S(e,r)));i.default.list.pushList(n,o),i.default.list.pushList(n,t)}return n}},3847:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformWhileStatement=function(e,t){const n=i.default.list.make();let[r,l]=e.capture((()=>(0,s.createTruthinessChecks)(e,(0,o.transformExpression)(e,t.expression),t.expression)));return i.default.list.isEmpty(l)||(i.default.list.pushList(n,l),i.default.list.push(n,i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.unary("not",r),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()})),r=i.default.bool(!0)),i.default.list.pushList(n,(0,a.transformStatementList)(e,t.statement,(0,c.getStatements)(t.statement))),i.default.list.make(i.default.create(i.default.SyntaxKind.WhileStatement,{condition:r,statements:n}))};const i=r(n(9861)),o=n(6671),a=n(8043),s=n(410),c=n(1441)},2583:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformEntityName=function e(t,n){return c.default.isIdentifier(n)?((0,s.validateIdentifier)(t,n),(0,o.transformIdentifier)(t,n)):function(t,n){return i.default.property((0,a.convertToIndexableExpression)(e(t,n.left)),n.right.text)}(t,n)};const i=r(n(9861)),o=n(6848),a=n(6453),s=n(837),c=r(n(2137))},1782:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformInitializer=function(e,t,n){return i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(t,"==",i.default.nil()),elseBody:i.default.list.make(),statements:e.capturePrereqs((()=>{e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:(0,o.transformExpression)(e,n)}))}))})};const i=r(n(9861)),o=n(6671)},1993:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformInterpolatedStringPart=function(e){return i.default.create(i.default.SyntaxKind.InterpolatedStringPart,{text:(0,o.createStringFromLiteral)(e)})};const i=r(n(9861)),o=n(4397)},5741:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformLogical=function(e,t){if(t.operatorToken.kind===_.default.SyntaxKind.AmpersandAmpersandToken)return f(e,t,t.operatorToken.kind,"and",((t,n)=>(0,s.createTruthinessChecks)(e,t,n)));if(t.operatorToken.kind===_.default.SyntaxKind.BarBarToken)return f(e,t,t.operatorToken.kind,"or",((t,n)=>i.default.unary("not",(0,s.createTruthinessChecks)(e,t,n))));if(t.operatorToken.kind===_.default.SyntaxKind.QuestionQuestionToken){const n=e=>i.default.binary(e,"==",i.default.nil());if(!(0,u.isPossiblyType)(e.getType(t),(0,u.isBooleanLiteralType)(e,!1)))return f(e,t,t.operatorToken.kind,"or",n);const r=d(e,t,_.default.SyntaxKind.QuestionQuestionToken,!1),o=i.default.tempId("condition");return p(e,r,o,n),o}(0,o.assert)(!1,`Operator not implemented: ${(0,l.getKindName)(t.operatorToken.kind)}`)};const i=r(n(9861)),o=n(2287),a=n(6671),s=n(410),c=n(4160),l=n(2036),u=n(1915),_=r(n(2137));function d(e,t,n,r){return function(e,t){const n=new Array;for(;_.default.isBinaryExpression(e)&&e.operatorToken.kind===t;)n.unshift(e.right),e=e.left;return n.unshift(e),n}(t,n).map(((t,n,o)=>{const c=e.getType(t),[l,u]=e.capture((()=>(0,a.transformExpression)(e,t)));let _=!1;if(r){const e=np(e,t,n,r,o+1))),elseBody:i.default.list.make()}))}function f(e,t,n,r,o){const a=d(e,t,n,!0);if(function(e,t){for(let n=0;nl(e,t)))};const i=r(n(9861)),o=n(6671),a=n(7010),s=n(410),c=r(n(2137));function l(e,t){const n=t.operatorToken.kind;return n===c.default.SyntaxKind.QuestionQuestionEqualsToken?function(e,t,n){const r=(0,a.transformWritableExpression)(e,t,!0),[s,c]=e.capture((()=>(0,o.transformExpression)(e,n))),l=i.default.list.make();return i.default.list.pushList(l,c),i.default.list.push(l,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:s})),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(r,"==",i.default.nil()),statements:l,elseBody:i.default.list.make()})),r}(e,t.left,t.right):n===c.default.SyntaxKind.AmpersandAmpersandEqualsToken?function(e,t,n){const r=(0,a.transformWritableExpression)(e,t,!0),[c,l]=e.capture((()=>(0,o.transformExpression)(e,n))),u=e.pushToVar(r,"condition"),_=i.default.list.make();return i.default.list.pushList(_,l),i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:u,operator:"=",right:c})),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:(0,s.createTruthinessChecks)(e,r,t),statements:_,elseBody:i.default.list.make()})),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:u})),r}(e,t.left,t.right):function(e,t,n){const r=(0,a.transformWritableExpression)(e,t,!0),[c,l]=e.capture((()=>(0,o.transformExpression)(e,n))),u=e.pushToVar(r,"condition"),_=i.default.list.make();return i.default.list.pushList(_,l),i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:u,operator:"=",right:c})),e.prereq(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.unary("not",(0,s.createTruthinessChecks)(e,r,t)),statements:_,elseBody:i.default.list.make()})),e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:u})),r}(e,t.left,t.right)}},8111:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformMethodDeclaration=function(e,t,n){const r=i.default.list.make();if(!t.body)return i.default.list.make();if((0,a.assert)(t.name),f.default.isPrivateIdentifier(t.name))return s.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(t.name)),i.default.list.make();let{statements:m,parameters:g,hasDotDotDot:h}=(0,c.transformParameters)(e,t);i.default.list.pushList(m,(0,u.transformStatementList)(e,t.body,t.body.statements));let y=(0,l.transformPropertyName)(e,t.name);if(f.default.hasDecorators(t)||t.parameters.some((e=>f.default.hasDecorators(e)))){if(!i.default.isSimplePrimitive(y)){const e=i.default.tempId("key");i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:e,right:y})),y=e}e.setClassElementObjectKey(t,y)}const v=f.default.hasSyntacticModifier(t,f.default.ModifierFlags.Async);if(t.asteriskToken&&(v&&s.DiagnosticService.addDiagnostic(o.errors.noAsyncGeneratorFunctions(t)),m=(0,p.wrapStatementsAsGenerator)(e,t,m)),!v&&i.default.isStringLiteral(y)&&!i.default.isMap(n.value)&&i.default.isValidIdentifier(y.value))return(0,_.isMethod)(e,t)?(i.default.list.shift(g),i.default.list.push(r,i.default.create(i.default.SyntaxKind.MethodDeclaration,{expression:n.value,name:y.value,statements:m,parameters:g,hasDotDotDot:h}))):i.default.list.push(r,i.default.create(i.default.SyntaxKind.FunctionDeclaration,{name:i.default.property(n.value,y.value),localize:!1,statements:m,parameters:g,hasDotDotDot:h})),r;let b=i.default.create(i.default.SyntaxKind.FunctionExpression,{statements:m,parameters:g,hasDotDotDot:h});return v&&(b=i.default.call(e.TS(t,"async"),[b])),i.default.list.pushList(r,e.capturePrereqs((()=>(0,d.assignToMapPointer)(e,n,y,b)))),r};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(7937),l=n(5671),u=n(8043),_=n(833),d=n(274),p=n(6442),f=r(n(2137))},8087:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.flattenOptionalChain=w,t.transformOptionalChain=function(e,t){const{chain:n,expression:r}=w(e,t);return F(e,n,(0,l.transformExpression)(e,r))};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(4698),c=n(8010),l=n(6671),u=n(8685),_=n(8576),d=n(6453),p=n(7034),f=n(833),m=n(6409),g=n(6219),h=n(1915),y=n(1511),v=r(n(2137));var b;function x(e,t){return{node:t,kind:b.PropertyAccess,optional:void 0!==t.questionDotToken,type:e.getType(t.expression),name:t.name.text}}function S(e,t){return{node:t,kind:b.ElementAccess,optional:void 0!==t.questionDotToken,type:e.getType(t.expression),expression:t.argumentExpression}}function k(e,t){return{node:t,kind:b.Call,optional:void 0!==t.questionDotToken,type:e.getType(t.expression),args:t.arguments}}function T(e,t,n){return{node:t,expression:n,kind:b.PropertyCall,optional:void 0!==n.questionDotToken,type:e.getType(t.expression),name:n.name.text,callType:e.getType(t),callOptional:void 0!==t.questionDotToken,args:t.arguments}}function C(e,t,n){return{node:t,expression:n,kind:b.ElementCall,optional:void 0!==n.questionDotToken,type:e.getType(n),argumentExpression:n.argumentExpression,callType:e.getType(t),callOptional:void 0!==t.questionDotToken,args:t.arguments}}function w(e,t){const n=new Array;for(;;)if(v.default.isPropertyAccessExpression(t))n.unshift(x(e,t)),t=t.expression;else if(v.default.isElementAccessExpression(t))n.unshift(S(e,t)),t=t.expression;else{if(!v.default.isCallExpression(t))break;{const r=(0,g.skipDownwards)(t.expression);v.default.isPropertyAccessExpression(r)?(n.unshift(T(e,t,r)),t=r.expression):v.default.isElementAccessExpression(r)?(n.unshift(C(e,t,r)),t=r.expression):(n.unshift(k(e,t)),t=r)}}return{chain:n,expression:t}}function D(e,t,n){return n.kind===b.PropertyAccess?(0,u.transformPropertyAccessExpressionInner)(e,n.node,t,n.name):n.kind===b.ElementAccess?(0,c.transformElementAccessExpressionInner)(e,n.node,t,n.expression):n.kind===b.Call?(0,s.transformCallExpressionInner)(e,n.node,t,n.args):n.kind===b.PropertyCall?(0,s.transformPropertyCallExpressionInner)(e,n.node,n.expression,t,n.name,n.args):(0,s.transformElementCallExpressionInner)(e,n.node,n.expression,t,n.argumentExpression,n.args)}function E(e,t,n,r){return void 0===t?t=e.pushToVar(n,r.parent&&v.default.isVariableDeclaration(r.parent)&&v.default.isIdentifier(r.parent.name)?r.parent.name.text:"result"):t!==n&&e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:"=",right:n})),t}function P(e,t){return i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(e,"~=",i.default.nil()),statements:t,elseBody:i.default.list.make()})}function N(e){return e.kind===b.PropertyCall||e.kind===b.ElementCall}function F(e,t,n,r,s=0){if(s>=t.length)return n;const c=t[s];if(c.optional||N(c)&&c.callOptional){let u,g=!1,x=!1;if(N(c)&&(g=(0,f.isMethod)(e,c.expression),x=v.default.isSuperProperty(c.expression),c.callOptional&&g&&!x&&(u=e.pushToVar(n,"self"),n=u),c.optional&&(r=E(e,r,n,t[t.length-1].node),n=r),c.callOptional))if(c.kind===b.PropertyCall)n=i.default.property((0,d.convertToIndexableExpression)(n),c.name);else{const t=e.getType(c.expression.expression);n=i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:(0,d.convertToIndexableExpression)(n),index:(0,_.addOneIfArrayType)(e,t,(0,l.transformExpression)(e,c.argumentExpression))})}const[S,k]=e.capture((()=>{r=E(e,r,n,t[t.length-1].node);const[l,_]=e.capture((()=>{let n;if(N(c)&&c.callOptional){const t=e.typeChecker.getNonOptionalType(e.getType(c.node.expression)),s=(0,h.getFirstDefinedSymbol)(e,t);if(s&&e.services.macroManager.getPropertyCallMacro(s))return a.DiagnosticService.addDiagnostic(o.errors.noOptionalMacroCall(c.node)),i.default.none();const l=(0,p.ensureTransformOrder)(e,c.args);g&&(x?l.unshift(i.default.globals.self):l.unshift(u)),n=(0,y.wrapReturnIfLuaTuple)(e,c.node,i.default.call(r,l))}else n=D(e,r,c);return F(e,t,n,r,s+1)})),d=!i.default.isNone(l)&&!(0,m.isUsedAsStatement)(c.node);return r!==l&&d?i.default.list.push(_,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"=",right:l})):i.default.isCall(l)&&i.default.list.push(_,i.default.create(i.default.SyntaxKind.CallStatement,{expression:l})),e.prereq(P(r,_)),d?r:i.default.none()}));return N(c)&&c.optional&&c.callOptional?e.prereq(P(r,k)):e.prereqList(k),S}return F(e,t,D(e,n,c),r,s+1)}!function(e){e[e.PropertyAccess=0]="PropertyAccess",e[e.ElementAccess=1]="ElementAccess",e[e.Call=2]="Call",e[e.PropertyCall=3]="PropertyCall",e[e.ElementCall=4]="ElementCall"}(b||(b={}))},7937:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformParameters=function(e,t){const n=i.default.list.make(),r=i.default.list.make();let o=!1;(0,_.isMethod)(e,t)&&i.default.list.push(n,i.default.globals.self);for(const a of t.parameters){if(p.default.isThisIdentifier(a.name))continue;if(a.dotDotDotToken&&p.default.isArrayBindingPattern(a.name)){const t=e.capturePrereqs((()=>f(e,n,a.name)));i.default.list.pushList(r,t);continue}let t;if(p.default.isIdentifier(a.name)?(t=(0,l.transformIdentifierDefined)(e,a.name),(0,d.validateIdentifier)(e,a.name)):t=i.default.tempId("param"),a.dotDotDotToken?(o=!0,i.default.list.push(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:t,right:i.default.create(i.default.SyntaxKind.Array,{members:i.default.list.make(i.default.create(i.default.SyntaxKind.VarArgsLiteral,{}))})}))):i.default.list.push(n,t),a.initializer&&i.default.list.push(r,(0,u.transformInitializer)(e,t,a.initializer)),!p.default.isIdentifier(a.name)){const n=a.name;p.default.isArrayBindingPattern(n)?i.default.list.pushList(r,e.capturePrereqs((()=>(0,s.transformArrayBindingPattern)(e,n,t)))):i.default.list.pushList(r,e.capturePrereqs((()=>(0,c.transformObjectBindingPattern)(e,n,t))))}}return{parameters:n,statements:r,hasDotDotDot:o}};const i=r(n(9861)),o=n(7370),a=n(4502),s=n(2396),c=n(5235),l=n(6848),u=n(1782),_=n(833),d=n(837),p=r(n(2137));function f(e,t,n){for(const r of n.elements)if(p.default.isOmittedExpression(r))i.default.list.push(t,i.default.tempId());else{if(r.dotDotDotToken)return void a.DiagnosticService.addDiagnostic(o.errors.noSpreadDestructuring(r));const n=r.name;if(p.default.isIdentifier(n)){const o=(0,l.transformIdentifierDefined)(e,n);(0,d.validateIdentifier)(e,n),i.default.list.push(t,o),r.initializer&&e.prereq((0,u.transformInitializer)(e,o,r.initializer))}else{const o=i.default.tempId("param");i.default.list.push(t,o),r.initializer&&e.prereq((0,u.transformInitializer)(e,o,r.initializer)),p.default.isArrayBindingPattern(n)?(0,s.transformArrayBindingPattern)(e,n,o):(0,c.transformObjectBindingPattern)(e,n,o)}}}},5671:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPropertyName=function(e,t){return a.default.isIdentifier(t)?i.default.string(t.text):(0,o.transformExpression)(e,a.default.isComputedPropertyName(t)?t.expression:t)};const i=r(n(9861)),o=n(6671),a=r(n(2137))},8228:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformSourceFile=function(e,t){const n=e.typeChecker.getSymbolAtLocation(t);(0,s.assert)(n),e.setModuleIdBySymbol(n,i.default.globals.exports);const r=(0,l.transformStatementList)(e,t,t.statements,void 0);!function(e,t,n,r){const o=function(e,t){const n=new Set;for(const r of t.statements)if(f.default.isExportDeclaration(r)&&r.moduleSpecifier)if(r.exportClause){if(f.default.isNamespaceExport(r.exportClause)){const t=e.typeChecker.getSymbolAtLocation(r.exportClause.name);t&&n.add(t)}}else{const t=(0,u.getOriginalSymbolOfNode)(e.typeChecker,r.moduleSpecifier);t&&e.getModuleExports(t).forEach((e=>n.add(e)))}return n}(e,t);let a=e.hasExportFrom;const s=new Array;if(!e.hasExportEquals)for(const t of e.getModuleExports(n)){if(o.has(t))continue;if(t.flags&f.default.SymbolFlags.Prototype)continue;if(g(t))continue;const n=f.default.skipAlias(t,e.typeChecker);(0,d.isSymbolOfValue)(n)&&((0,_.isSymbolMutable)(e,n)?a=!0:h(t)||s.push(m(e,t)))}if(e.hasExportEquals){const e=t.statements[t.statements.length-1];f.default.isExportAssignment(e)&&e.isExportEquals||i.default.list.push(r,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.globals.exports}))}else if(a){i.default.list.unshift(r,i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.globals.exports,right:i.default.map()}));for(const[e,t]of s)i.default.list.push(r,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(i.default.globals.exports,e),operator:"=",right:t}));i.default.list.push(r,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.globals.exports}))}else if(s.length>0){const e=i.default.list.make();for(const[t,n]of s)i.default.list.push(e,i.default.create(i.default.SyntaxKind.MapField,{index:i.default.string(t),value:n}));i.default.list.push(r,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.create(i.default.SyntaxKind.Map,{fields:e})}))}}(e,t,n,r);const c=function(e){for(;e&&i.default.isComment(e.value);)e=e.prev;return e}(r.tail);if(!c||!i.default.isReturnStatement(c.value)){const n=e.pathTranslator.getOutputPath(t.fileName);e.rojoResolver.getRbxTypeFromFilePath(n)===o.RbxType.ModuleScript&&i.default.list.push(r,i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.nil()}))}const p=i.default.list.make();i.default.list.push(p,i.default.comment(` Compiled with roblox-ts v${a.COMPILER_VERSION}`)),e.usesRuntimeLib&&i.default.list.push(p,e.createRuntimeLibImport(t));const y=i.default.list.make();for(;r.head&&i.default.isComment(r.head.value)&&r.head.value.text.startsWith("!");)i.default.list.push(y,i.default.list.shift(r));return i.default.list.unshiftList(r,p),i.default.list.unshiftList(r,y),r};const i=r(n(9861)),o=n(1979),a=n(6258),s=n(2287),c=n(6848),l=n(8043),u=n(9525),_=n(3527),d=n(1205),p=n(6219),f=r(n(2137));function m(e,t){var n,r;const o=null===(n=t.getDeclarations())||void 0===n?void 0:n[0];if(o&&f.default.isExportSpecifier(o))return[o.name.text,(0,c.transformIdentifierDefined)(e,null!==(r=o.propertyName)&&void 0!==r?r:o.name)];{let e=t.name;return"default"===t.name&&o&&(f.default.isFunctionDeclaration(o)||f.default.isClassDeclaration(o))&&o.name&&(e=o.name.text),[t.name,i.default.id(e)]}}function g(e){if(e.declarations)for(const t of e.declarations)if(f.default.isExportSpecifier(t)){const e=t.parent.parent;if(f.default.isExportDeclaration(e)&&e.moduleSpecifier)return!0}return!1}function h(e){var t,n;return null!==(n=null===(t=e.declarations)||void 0===t?void 0:t.every((e=>{const t=(0,p.getAncestor)(e,f.default.isStatement),n=t&&f.default.canHaveModifiers(t)?f.default.getModifiers(t):void 0;return null==n?void 0:n.some((e=>e.kind===f.default.SyntaxKind.DeclareKeyword))})))&&void 0!==n&&n}},8043:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformStatementList=function(e,t,n,r){var c;const l=i.default.list.make();for(const t of n){const[n,s]=e.capture((()=>(0,o.transformStatement)(e,t)));!0!==e.compilerOptions.removeComments&&i.default.list.pushList(l,e.getLeadingComments(t));const u=(0,a.createHoistDeclaration)(e,t);u&&i.default.list.push(l,u),i.default.list.pushList(l,s),i.default.list.pushList(l,n);const _=null===(c=n.tail)||void 0===c?void 0:c.value;if(_&&i.default.isFinalStatement(_))break;if(r){const e=r.id,n=r.mapping.get(t);if(void 0!==n)for(const t of n)i.default.list.push(l,i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.property(e,t),operator:"=",right:i.default.id(t)}))}}if(!0!==e.compilerOptions.removeComments){const r=function(e,t){if(t.length>0){const e=t[t.length-1],n=e.parent.getLastToken();if(n&&!s.default.isNodeDescendantOf(n,e))return n}else if(e)return e.getLastToken()}(t,n);r&&i.default.list.pushList(l,e.getLeadingComments(r))}return l};const i=r(n(9861)),o=n(4318),a=n(6749),s=r(n(2137))},7010:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformWritableExpression=f,t.transformWritableAssignment=function(e,t,n,r=!1,o=!1){const a=f(e,t,r),[s,l]=e.capture((()=>(0,c.transformExpression)(e,n))),u=!o||i.default.list.isEmpty(l)?a:e.pushToVar(a,"readable");return e.prereqList(l),{writable:a,readable:u,value:s}};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6671),l=n(8576),u=n(6453),_=n(7034),d=n(6219),p=r(n(2137));function f(e,t,n){if(p.default.isPrototypeAccess(t)&&s.DiagnosticService.addDiagnostic(o.errors.noPrototype(t)),p.default.isPropertyAccessExpression(t)){const r=(0,c.transformExpression)(e,t.expression);return i.default.property(n?e.pushToVarIfNonId(r,"exp"):(0,u.convertToIndexableExpression)(r),t.name.text)}if(p.default.isElementAccessExpression(t)){const[r,o]=(0,_.ensureTransformOrder)(e,[t.expression,t.argumentExpression]),a=(0,l.addOneIfArrayType)(e,e.getType(t.expression),o);return i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n?e.pushToVarIfNonId(r,"exp"):(0,u.convertToIndexableExpression)(r),index:n?e.pushToVarIfComplex(a,"index"):a})}{const n=(0,c.transformExpression)(e,(0,d.skipDownwards)(t));return(0,a.assert)(i.default.isWritableExpression(n)),n}}},226:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isBlockLike=function(e){return e.kind===i.default.SyntaxKind.SourceFile||e.kind===i.default.SyntaxKind.Block||e.kind===i.default.SyntaxKind.ModuleBlock||e.kind===i.default.SyntaxKind.CaseClause||e.kind===i.default.SyntaxKind.DefaultClause},t.isUnaryAssignmentOperator=function(e){return e===i.default.SyntaxKind.PlusPlusToken||e===i.default.SyntaxKind.MinusMinusToken},t.isTemplateLiteralType=function(e){return"texts"in e&&"types"in e&&!!(e.flags&i.default.TypeFlags.TemplateLiteral)},t.isNamespace=function(e){return i.default.isModuleDeclaration(e)&&!!(e.flags&i.default.NodeFlags.Namespace)};const i=r(n(2137))},5949:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.addIndexDiagnostics=function(e,t,n){const r=(0,l.getFirstDefinedSymbol)(e,n);(r&&e.services.macroManager.getPropertyCallMacro(r)||!(0,s.isValidMethodIndexWithoutCall)(e,(0,c.skipUpwards)(t))&&(0,a.isMethod)(e,t))&&o.DiagnosticService.addDiagnostic(i.errors.noIndexWithoutCall(t)),u.default.isPrototypeAccess(t)&&o.DiagnosticService.addDiagnostic(i.errors.noPrototype(t))};const i=n(7370),o=n(4502),a=n(833),s=n(7011),c=n(6219),l=n(1915),u=r(n(2137))},8576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addOneIfArrayType=function(e,t,n){return(0,i.isDefinitelyType)(t,(0,i.isArrayType)(e),i.isUndefinedType)?(0,r.offset)(n,1):n};const r=n(9582),i=n(1915)},9254:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.arrayBindingPatternContainsHoists=function(e,t){for(const n of t.elements)if(o.default.isBindingElement(n)&&o.default.isIdentifier(n.name)){const t=e.typeChecker.getSymbolAtLocation(n.name);if(t&&((0,i.checkVariableHoist)(e,n.name,t),e.isHoisted.get(t)))return!0}return!1};const i=n(4953),o=r(n(2137))},9225:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.assertNever=function(e,t){!function(e){const t=u(JSON.parse((0,i.spawnSync)("npm ls typescript --json").stdout.toString()));a.LogService.fatal(o.default.red(`Exhaustive assertion failed! ${e}`)+o.default.yellow("\nThis is usually caused by a TypeScript version mismatch.")+o.default.yellow("\nMake sure that all TS versions in your project are the same.")+o.default.yellow("\nYou can check the list of installed versions with `npm list typescript`")+(t?o.default.yellow(`\nTry running \`npm install typescript@=${t}\``):""))}(`${t}, value was ${"object"==typeof e&&"kind"in e&&c.default.isNode(e)?`a TS node of kind ${(0,s.getKindName)(e.kind)}`:l.default.inspect(e)}`)};const i=n(651),o=r(n(1391)),a=n(761),s=n(2036),c=r(n(2137)),l=r(n(651));function u(e){if("roblox-ts"===e.name&&e.dependencies.typescript)return e.dependencies.typescript.version;for(const[,t]of Object.entries(e.dependencies)){const e=u(t);if(e)return e}}},6614:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSimpleAssignmentOperator=function(e,t,n){return t===s.default.SyntaxKind.PlusEqualsToken?(0,a.isDefinitelyType)(e,a.isStringType)||(0,a.isDefinitelyType)(n,a.isStringType)?"..=":"+=":c.get(t)},t.createAssignmentExpression=l,t.createCompoundAssignmentStatement=function(e,t,n,r,a,s,c,l){return i.default.create(i.default.SyntaxKind.Assignment,{left:n,operator:"=",right:(0,o.createBinaryFromOperator)(e,t,a,r,s,c,l)})},t.createCompoundAssignmentExpression=function(e,t,n,r,i,a,s,c){return l(e,n,"=",(0,o.createBinaryFromOperator)(e,t,i,r,a,s,c))};const i=r(n(9861)),o=n(3262),a=n(1915),s=r(n(2137)),c=new Map([[s.default.SyntaxKind.MinusEqualsToken,"-="],[s.default.SyntaxKind.AsteriskEqualsToken,"*="],[s.default.SyntaxKind.SlashEqualsToken,"/="],[s.default.SyntaxKind.AsteriskAsteriskEqualsToken,"^="],[s.default.SyntaxKind.PercentEqualsToken,"%="],[s.default.SyntaxKind.PlusPlusToken,"+="],[s.default.SyntaxKind.MinusMinusToken,"-="],[s.default.SyntaxKind.EqualsToken,"="]]);function l(e,t,n,r){return e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:t,operator:n,right:r})),t}},3550:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAccessorForBindingType=function(e,t,n){return(0,c.isDefinitelyType)(n,(0,c.isArrayType)(e))?_:(0,c.isDefinitelyType)(n,c.isStringType)?d:(0,c.isDefinitelyType)(n,(0,c.isSetType)(e))?p:(0,c.isDefinitelyType)(n,(0,c.isMapType)(e))?f:(0,c.isDefinitelyType)(n,(0,c.isIterableFunctionLuaTupleType)(e))?m:(0,c.isDefinitelyType)(n,(0,c.isIterableFunctionType)(e))?g:(0,c.isDefinitelyType)(n,(0,c.isIterableType)(e))?(s.DiagnosticService.addDiagnostic(o.errors.noIterableIteration(t)),()=>i.default.none()):(0,c.isDefinitelyType)(n,(0,c.isGeneratorType)(e))||(0,c.isDefinitelyType)(n,c.isObjectType)||l.default.isThis(t)?h:void(0,a.assert)(!1,`Destructuring not supported for type: ${e.typeChecker.typeToString(n)}`)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(1915),l=r(n(2137));function u(e){return e[e.length-1]}const _=(e,t,n)=>i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:i.default.number(n+1)}),d=(e,t,n,r,o)=>{let a;0===r.length?(a=e.pushToVar(i.default.call(i.default.globals.string.gmatch,[t,i.default.globals.utf8.charpattern]),"matcher"),r.push(a)):a=r[0];const s=i.default.call(a);return o?(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:s})),i.default.none()):s},p=(e,t,n,r,o)=>{const a=[t],s=u(r);s&&a.push(s);const c=i.default.call(i.default.globals.next,a);if(o)return e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:c})),i.default.none();{const t=e.pushToVar(c,"value");return r.push(t),t}},f=(e,t,n,r)=>{const o=[t],a=u(r);a&&o.push(a);const s=i.default.tempId("k"),c=i.default.tempId("v"),l=i.default.list.make(s,c);return e.prereq(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:l,right:i.default.call(i.default.globals.next,o)})),r.push(s),i.default.create(i.default.SyntaxKind.Array,{members:l})},m=(e,t,n,r,o)=>{const a=i.default.call(t);return o?(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:a})),i.default.none()):i.default.array([a])},g=(e,t,n,r,o)=>{const a=i.default.call(t);return o?(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:a})),i.default.none()):a},h=(e,t,n,r,o)=>{const a=i.default.call(i.default.property(t,"next"));return o?(e.prereq(i.default.create(i.default.SyntaxKind.CallStatement,{expression:a})),i.default.none()):i.default.property(a,"value")}},529:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.objectAccessor=void 0;const i=r(n(9861)),o=n(7370),a=n(4502),s=n(6671),c=n(5949),l=n(8576),u=n(9225),_=r(n(2137));t.objectAccessor=(e,t,n,r)=>((0,c.addIndexDiagnostics)(e,r,e.getType(r)),_.default.isIdentifier(r)?i.default.property(t,r.text):_.default.isComputedPropertyName(r)?i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:(0,l.addOneIfArrayType)(e,n,(0,s.transformExpression)(e,r.expression))}):_.default.isNumericLiteral(r)||_.default.isStringLiteral(r)||_.default.isNoSubstitutionTemplateLiteral(r)?i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t,index:(0,s.transformExpression)(e,r)}):_.default.isPrivateIdentifier(r)?(a.DiagnosticService.addDiagnostic(o.errors.noPrivateIdentifier(r)),i.default.none()):(0,u.assertNever)(r,"objectAccessor"))},4953:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkVariableHoist=function(e,t,n){if(void 0!==e.isHoisted.get(n))return;const r=(0,o.getAncestor)(t,a.default.isStatement);if(!r)return;const s=r.parent;if(!a.default.isCaseClause(s))return;const c=s.parent;!0===a.default.FindAllReferences.Core.eachSymbolReferenceInFile(t,e.typeChecker,t.getSourceFile(),(e=>{if(!(0,o.isAncestorOf)(s,e))return!0}),c)&&((0,i.getOrSetDefault)(e.hoistsByStatement,r.parent,(()=>new Array)).push(t),e.isHoisted.set(n,!0))};const i=n(2991),o=n(6219),a=r(n(2137))},6073:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanModuleName=function(e){return e.replace(/\W/g,"_")}},6453:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.convertToIndexableExpression=function(e){return i.default.isIndexableExpression(e)?e:i.default.create(i.default.SyntaxKind.ParenthesizedExpression,{expression:e})};const i=r(n(9861))},3262:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createBinaryFromOperator=function(e,t,n,r,d,p,f){const m=u.get(d);if(void 0!==m)return i.default.binary(n,m,p);if(d===l.default.SyntaxKind.PlusToken||d===l.default.SyntaxKind.PlusEqualsToken)return function(e,t,n,r){const o=(0,s.isDefinitelyType)(t,s.isStringType),a=(0,s.isDefinitelyType)(r,s.isStringType);return o||a?i.default.binary(o?e:i.default.call(i.default.globals.tostring,[e]),"..",a?n:i.default.call(i.default.globals.tostring,[n])):i.default.binary(e,"+",n)}(n,r,p,f);const g=_.get(d);return void 0!==g?i.default.call(i.default.property(i.default.globals.bit32,g),[n,p]):d===l.default.SyntaxKind.CommaToken?(e.prereqList((0,c.wrapExpressionStatement)(n)),p):void(0,o.assert)(!1,`createBinaryFromOperator unknown operator: ${(0,a.getKindName)(d)}`)};const i=r(n(9861)),o=n(2287),a=n(2036),s=n(1915),c=n(6837),l=r(n(2137)),u=new Map([[l.default.SyntaxKind.LessThanToken,"<"],[l.default.SyntaxKind.GreaterThanToken,">"],[l.default.SyntaxKind.LessThanEqualsToken,"<="],[l.default.SyntaxKind.GreaterThanEqualsToken,">="],[l.default.SyntaxKind.EqualsEqualsEqualsToken,"=="],[l.default.SyntaxKind.ExclamationEqualsEqualsToken,"~="],[l.default.SyntaxKind.MinusToken,"-"],[l.default.SyntaxKind.AsteriskToken,"*"],[l.default.SyntaxKind.SlashToken,"/"],[l.default.SyntaxKind.AsteriskAsteriskToken,"^"],[l.default.SyntaxKind.PercentToken,"%"]]),_=new Map([[l.default.SyntaxKind.AmpersandToken,"band"],[l.default.SyntaxKind.BarToken,"bor"],[l.default.SyntaxKind.CaretToken,"bxor"],[l.default.SyntaxKind.LessThanLessThanToken,"lshift"],[l.default.SyntaxKind.GreaterThanGreaterThanGreaterThanToken,"rshift"],[l.default.SyntaxKind.GreaterThanGreaterThanToken,"arshift"],[l.default.SyntaxKind.AmpersandEqualsToken,"band"],[l.default.SyntaxKind.BarEqualsToken,"bor"],[l.default.SyntaxKind.CaretEqualsToken,"bxor"],[l.default.SyntaxKind.LessThanLessThanEqualsToken,"lshift"],[l.default.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken,"rshift"],[l.default.SyntaxKind.GreaterThanGreaterThanEqualsToken,"arshift"]])},8446:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createGetService=function(e){return i.default.create(i.default.SyntaxKind.MethodCallExpression,{expression:i.default.globals.game,name:"GetService",args:i.default.list.make(i.default.string(e))})};const i=r(n(9861))},6749:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createHoistDeclaration=function(e,t){const n=e.hoistsByStatement.get(t);if(n&&n.length>0)return n.forEach((t=>(0,a.validateIdentifier)(e,t))),i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.list.make(...n.map((t=>(0,o.transformIdentifierDefined)(e,t)))),right:void 0})};const i=r(n(9861)),o=n(6848),a=n(837)},3842:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getImportParts=y,t.createImportExpression=function(e,t,n){const r=y(e,t,n);return r.unshift(i.default.globals.script),i.default.call(e.TS(n.parent,"import"),r)};const i=r(n(9861)),o=n(1979),a=r(n(6470)),s=n(6258),c=n(7370),l=n(2287),u=n(4998),_=n(4502),d=n(8446),p=n(4160),f=n(4164),m=r(n(2137));function g(e,t){const n=o.RojoResolver.relative(e,t),r=new Array;let a=0;for(;n[a]===o.RbxPathParent;)r.push(s.PARENT_FIELD),a++;const c=[(0,p.propertyAccessExpressionChain)(i.default.globals.script,r)];for(;ae.capture((()=>n(e,t))))),l=(0,o.findLastIndex)(r,(([,e])=>!i.default.list.isEmpty(e))),u=new Array;for(let n=0;ni.default.binary(e,t,n)))},t.propertyAccessExpressionChain=function(e,t){return t.reduce(((e,t)=>i.default.property(e,t)),(0,o.convertToIndexableExpression)(e))};const i=r(n(9861)),o=n(6453)},5708:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.expressionMightMutate=function e(t,n,r){if(i.default.isTemporaryIdentifier(n))return!1;if(i.default.isParenthesizedExpression(n))return e(t,n.expression);if(i.default.isSimplePrimitive(n))return!1;if(i.default.isFunctionExpression(n))return!1;if(i.default.isVarArgsLiteral(n))return!1;if(i.default.isIfExpression(n))return e(t,n.condition)||e(t,n.expression)||e(t,n.alternative);if(i.default.isBinaryExpression(n))return e(t,n.left)||e(t,n.right);if(i.default.isUnaryExpression(n))return e(t,n.expression);if(i.default.isArray(n)||i.default.isSet(n))return i.default.list.some(n.members,(n=>e(t,n)));if(i.default.isMap(n))return i.default.list.some(n.fields,(n=>e(t,n.index)||e(t,n.value)));if(r&&(r=(0,a.skipDownwards)(r),s.default.isIdentifier(r))){const e=t.typeChecker.getSymbolAtLocation(r);if(e&&!(0,o.isSymbolMutable)(t,e))return!1}return!0};const i=r(n(9861)),o=n(3527),a=n(6219),s=r(n(2137))},9564:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findConstructor=function(e){return e.members.find((e=>i.default.isConstructorDeclaration(e)&&void 0!==e.body))};const i=r(n(2137))},6226:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixupWhitespaceAndDecodeEntities=function(e){let t,n=0,r=-1;for(let a=0;a{if(o)return i.default.utf16EncodeAsString(parseInt(o,10));if(s)return i.default.utf16EncodeAsString(parseInt(s,16));{const t=a.get(c);return t?i.default.utf16EncodeAsString(t):e}}));return void 0===e?n:e+" "+n}const a=new Map(Object.entries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}))},3901:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAddIterableToArrayBuilder=function(e,t,n){return(0,l.isDefinitelyType)(n,(0,l.isArrayType)(e))?_:(0,l.isDefinitelyType)(n,l.isStringType)?d:(0,l.isDefinitelyType)(n,(0,l.isSetType)(e))?p:(0,l.isDefinitelyType)(n,(0,l.isMapType)(e))?f:(0,l.isDefinitelyType)(n,(0,l.isIterableFunctionLuaTupleType)(e))?g:(0,l.isDefinitelyType)(n,(0,l.isIterableFunctionType)(e))?m:(0,l.isDefinitelyType)(n,(0,l.isGeneratorType)(e))?h:(0,l.isDefinitelyType)(n,(0,l.isIterableType)(e))?(s.DiagnosticService.addDiagnostic(o.errors.noIterableIteration(t)),()=>i.default.list.make()):n.isUnion()?(s.DiagnosticService.addDiagnostic(o.errors.noMacroUnion(t)),()=>i.default.list.make()):void(0,a.assert)(!1,`Iteration type not implemented: ${e.typeChecker.typeToString(n)}`)};const i=r(n(9861)),o=n(7370),a=n(2287),s=n(4502),c=n(6453),l=n(1915),u=n(2161),_=(e,t,n,r,o,a)=>{const s=i.default.list.make(),c=e.pushToVarIfNonId(t,"array");let l=i.default.unary("#",c);return a&&(l=e.pushToVar(l,(0,u.valueToIdStr)(c)+"Length")),i.default.list.push(s,i.default.create(i.default.SyntaxKind.CallStatement,{expression:i.default.call(i.default.globals.table.move,[c,i.default.number(1),l,i.default.binary(r,"+",i.default.number(o+1)),n])})),a&&i.default.list.push(s,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:l})),s},d=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("char");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s),expression:i.default.call(i.default.globals.string.gmatch,[t,i.default.globals.utf8.charpattern]),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:s}))})),a},p=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("v");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s),expression:t,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:s}))})),a},f=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("k"),c=i.default.tempId("v");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s,c),expression:t,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:i.default.array([s,c])}))})),a},m=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("result");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s),expression:t,statements:i.default.list.make(i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:s}))})),a},g=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=e.pushToVar(t,"iterFunc"),c=i.default.tempId("results");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.WhileStatement,{condition:i.default.bool(!0),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:c,right:i.default.array([i.default.call(s)])}),i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.binary(i.default.unary("#",c),"==",i.default.number(0)),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}),i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:c}))})),a},h=(e,t,n,r,o)=>{const a=i.default.list.make();o>0&&i.default.list.push(a,i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(o)}));const s=i.default.tempId("result");return i.default.list.push(a,i.default.create(i.default.SyntaxKind.ForStatement,{ids:i.default.list.make(s),expression:i.default.property((0,c.convertToIndexableExpression)(t),"next"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.IfStatement,{condition:i.default.property(s,"done"),statements:i.default.list.make(i.default.create(i.default.SyntaxKind.BreakStatement,{})),elseBody:i.default.list.make()}),i.default.create(i.default.SyntaxKind.Assignment,{left:r,operator:"+=",right:i.default.number(1)}),i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:n,index:r}),operator:"=",right:i.default.property(s,"value")}))})),a}},9957:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAssignableValue=function(e,t,n){return"..="!==e||(0,o.isDefinitelyType)(n,o.isStringType)?t:i.default.call(i.default.globals.tostring,[t])};const i=r(n(9861)),o=n(1915)},835:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getConstantValueLiteral=function(e,t){const n=e.typeChecker.getConstantValue(t);if(void 0!==n)return"string"==typeof n?i.default.string(n):i.default.number(n)};const i=r(n(9861))},6117:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getDeclaredVariables=function(e){const t=new Array;if(i.default.isVariableDeclarationList(e))for(const n of e.declarations)o(n.name,t);else o(e.name,t);return t};const i=r(n(2137));function o(e,t){if(i.default.isIdentifier(e))t.push(e);else if(i.default.isObjectBindingPattern(e))for(const n of e.elements)o(n.name,t);else if(i.default.isArrayBindingPattern(e))for(const n of e.elements)i.default.isOmittedExpression(n)||o(n.name,t)}},9655:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getExtendsNode=function(e){var t;for(const n of null!==(t=e.heritageClauses)&&void 0!==t?t:[])if(n.token===i.default.SyntaxKind.ExtendsKeyword)return n.types[0]};const i=r(n(2137))},2036:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getKindName=function(e){return e===i.default.SyntaxKind.FirstAssignment?"EqualsToken":e===i.default.SyntaxKind.FirstCompoundAssignment?"PlusEqualsToken":e===i.default.SyntaxKind.LastReservedWord?"WithKeyword":e===i.default.SyntaxKind.FirstKeyword?"BreakKeyword":e===i.default.SyntaxKind.FirstFutureReservedWord?"ImplementsKeyword":e===i.default.SyntaxKind.LastFutureReservedWord?"YieldKeyword":e===i.default.SyntaxKind.FirstTypeNode?"TypePredicate":e===i.default.SyntaxKind.LastTypeNode?"ImportType":e===i.default.SyntaxKind.FirstPunctuation?"OpenBraceToken":e===i.default.SyntaxKind.FirstToken?"Unknown":e===i.default.SyntaxKind.FirstTriviaToken?"SingleLineCommentTrivia":e===i.default.SyntaxKind.LastTriviaToken?"ConflictMarkerTrivia":e===i.default.SyntaxKind.FirstLiteralToken?"NumericLiteral":e===i.default.SyntaxKind.FirstTemplateToken?"NoSubstitutionTemplateLiteral":e===i.default.SyntaxKind.LastTemplateToken?"TemplateTail":e===i.default.SyntaxKind.FirstBinaryOperator?"LessThanToken":e===i.default.SyntaxKind.LastBinaryOperator?"CaretEqualsToken":e===i.default.SyntaxKind.FirstStatement?"VariableStatement":e===i.default.SyntaxKind.LastStatement?"DebuggerStatement":e===i.default.SyntaxKind.FirstNode?"QualifiedName":e===i.default.SyntaxKind.FirstJSDocNode?"JSDocTypeExpression":e===i.default.SyntaxKind.FirstJSDocTagNode?"JSDocTag":e===i.default.SyntaxKind.LastJSDocTagNode?"JSDocPropertyTag":e===i.default.SyntaxKind.FirstContextualKeyword?"AbstractKeyword":e===i.default.SyntaxKind.LastContextualKeyword?"OfKeyword":i.default.SyntaxKind[e]};const i=r(n(2137))},9525:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getOriginalSymbolOfNode=function(e,t){const n=e.getSymbolAtLocation(t);return n?i.default.skipAlias(n,e):n};const i=r(n(2137))},4164:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceFileFromModuleSpecifier=function(e,t){var n;const r=null!==(n=e.typeChecker.getSymbolAtLocation(t))&&void 0!==n?n:e.typeChecker.resolveExternalModuleName(t);if(r){const n=r.valueDeclaration;if(n&&i.default.isModuleDeclaration(n)&&i.default.isStringLiteralLike(n.name)){const r=t.getSourceFile(),i=e.program.getModeForUsageLocation(r,n.name),o=e.program.getResolvedModule(r,n.name.text,i);if(o&&o.resolvedModule)return e.program.getSourceFile(o.resolvedModule.resolvedFileName)}if(n&&i.default.isSourceFile(n))return n}if(i.default.isStringLiteralLike(t)){const n=t.getSourceFile(),r=i.default.resolveModuleName(t.text,n.path,e.compilerOptions,i.default.sys);if(r.resolvedModule)return e.program.getSourceFile(r.resolvedModule.resolvedFileName)}};const i=r(n(2137))},1441:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getStatements=function(e){return i.default.isBlock(e)?e.statements:[e]};const i=r(n(2137))},1871:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasMultipleDefinitions=function(e,t){var n;let r=0;for(const i of null!==(n=e.getDeclarations())&&void 0!==n?n:[])if(t(i)&&(r++,r>1))return!0;return!1}},965:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReturnBlockedByTryStatement=function(e){const t=i.default.findAncestor(e,(e=>i.default.isTryStatement(e)||i.default.isFunctionLikeDeclaration(e)));return void 0!==t&&i.default.isTryStatement(t)},t.isBreakBlockedByTryStatement=function(e){const t=i.default.findAncestor(e,(e=>i.default.isTryStatement(e)||i.default.isIterationStatement(e,!1)||i.default.isSwitchStatement(e)));return void 0!==t&&i.default.isTryStatement(t)};const i=r(n(2137))},833:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isMethodFromType=_,t.isMethod=function(e,t){return _(e,t,e.getType(t))};const i=n(7370),o=n(2991),a=n(4502),s=n(6219),c=n(1915),l=r(n(2137));function u(e,t){if(l.default.isFunctionLike(t)){const n=function(e){const t=e[0];if(t){const e=t.name;if(l.default.isIdentifier(e)&&l.default.isThisIdentifier(e))return e}}(t.parameters);if(n)return!(e.getType(n).flags&l.default.TypeFlags.Void);if(l.default.isFunctionDeclaration(t))return!1;if(l.default.isMethodDeclaration(t)||l.default.isMethodSignature(t))return!0;if(l.default.isFunctionExpression(t)){const e=(0,s.skipUpwards)(t).parent;if(l.default.isPropertyAssignment(e)){const t=(0,s.skipUpwards)(e).parent;if(l.default.isObjectLiteralExpression(t))return!0}}return!1}return!1}function _(e,t,n){let r=!1;return(0,c.walkTypes)(n,(n=>{n.symbol&&(r||(r=(0,o.getOrSetDefault)(e.multiTransformState.isMethodCache,n.symbol,(()=>function(e,t,n){var r;let o=!1,s=!1;for(const t of n.getCallSignatures()){const n=null===(r=t.thisParameter)||void 0===r?void 0:r.valueDeclaration;n?e.getType(n).flags&l.default.TypeFlags.Void?s=!0:o=!0:t.declaration&&(u(e,t.declaration)?o=!0:s=!0)}return o&&s&&a.DiagnosticService.addDiagnostic(i.errors.noMixedTypeCall(t)),o}(e,t,n)))))})),r}},3527:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isSymbolMutable=function(e,t){return(0,i.getOrSetDefault)(e.multiTransformState.isDefinedAsLetCache,t,(()=>{if(t.valueDeclaration){if(a.default.isParameter(t.valueDeclaration))return!0;const e=(0,o.getAncestor)(t.valueDeclaration,a.default.isVariableDeclarationList);if(e)return!!(e.flags&a.default.NodeFlags.Let)}return!1}))};const i=n(2991),o=n(6219),a=r(n(2137))},1205:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isSymbolOfValue=function(e){return!(!(e.flags&i.default.SymbolFlags.Value)||e.flags&i.default.SymbolFlags.ConstEnum)};const i=r(n(2137))},6409:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isUsedAsStatement=function e(t){const n=(0,i.skipUpwards)(t),r=n.parent;return!!o.default.isExpressionStatement(r)||(!(!o.default.isForStatement(r)||r.condition===n)||!(!o.default.isDeleteExpression(r)||!e(r)))};const i=n(6219),o=r(n(2137))},7011:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidMethodIndexWithoutCall=function(e,t){const{parent:n}=t;if(a.default.isBinaryExpression(n))return!0;if(a.default.isPrefixUnaryExpression(n))return!0;if(a.default.isCallExpression(n)){const t=e.typeChecker.getNonOptionalType(e.getType(n.expression)),r=(0,o.getFirstDefinedSymbol)(e,t);if(r){const t=e.services.macroManager.getCallMacro(r);if(t===i.CALL_MACROS.typeIs||t===i.CALL_MACROS.typeOf)return!0}}return!1};const i=n(6662),o=n(1915),a=r(n(2137))},9582:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.offset=function(e,t){if(0===t)return e;if(i.default.isBinaryExpression(e)&&("+"===e.operator||"-"===e.operator)){const n=o(e.right);if(void 0!==n){const r=n+t*("-"===e.operator?-1:1);return 0===r?e.left:i.default.binary(e.left,e.operator,i.default.number(r))}}const n=o(e);return void 0!==n?i.default.number(n+t):i.default.binary(e,t>0?"+":"-",i.default.number(Math.abs(t)))};const i=r(n(9861));function o(e){if(i.default.isNumberLiteral(e))return Number(e.value);if(i.default.isUnaryExpression(e)&&"-"===e.operator){const t=o(e.expression);if(void 0!==t)return-t}}},274:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createMapPointer=function(e){return{name:e,value:i.default.map()}},t.createArrayPointer=function(e){return{name:e,value:i.default.array()}},t.assignToMapPointer=function(e,t,n,r){i.default.isMap(t.value)?i.default.list.push(t.value.fields,i.default.create(i.default.SyntaxKind.MapField,{index:n,value:r})):e.prereq(i.default.create(i.default.SyntaxKind.Assignment,{left:i.default.create(i.default.SyntaxKind.ComputedIndexExpression,{expression:t.value,index:n}),operator:"=",right:r}))},t.disableMapInline=function(e,t){i.default.isMap(t.value)&&(t.value=e.pushToVar(t.value,t.name))},t.disableArrayInline=function(e,t){i.default.isArray(t.value)&&(t.value=e.pushToVar(t.value,t.name))};const i=r(n(9861))},6219:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAncestorOf=function(e,t){do{if(e===t)return!0;t=t.parent}while(t);return!1},t.skipDownwards=function(e){for(;i.default.isNonNullExpression(e)||i.default.isParenthesizedExpression(e)||i.default.isAsExpression(e)||i.default.isTypeAssertionExpression(e)||i.default.isSatisfiesExpression(e);)e=e.expression;return e},t.skipUpwards=function(e){let t=e.parent;for(;t&&(i.default.isNonNullExpression(t)||i.default.isParenthesizedExpression(t)||i.default.isAsExpression(t)||i.default.isTypeAssertionExpression(t)||i.default.isSatisfiesExpression(t));)t=(e=t).parent;return e},t.getAncestor=o,t.getModuleAncestor=function(e){return o(e,a)};const i=r(n(2137));function o(e,t){let n=e;for(;n&&!t(n);)n=n.parent;return n}function a(e){return i.default.isSourceFile(e)||i.default.isModuleDeclaration(e)}},1915:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isDefinitelyType=function(e,...t){var n;return p(null!==(n=e.getConstraint())&&void 0!==n?n:e,t)},t.isPossiblyType=function(e,...t){var n;return f(null!==(n=e.getConstraint())&&void 0!==n?n:e,t)},t.isDefinedType=m,t.isAnyType=function(e){return t=>t===e.typeChecker.getAnyType()},t.isBooleanType=g,t.isBooleanLiteralType=function(e,t){return n=>n.flags&u.default.TypeFlags.BooleanLiteral?n===(t?e.typeChecker.getTrueType():e.typeChecker.getFalseType()):g(n)},t.isNumberType=h,t.isNumberLiteralType=function(e){return t=>t.isNumberLiteral()?t.value===e:h(t)},t.isNaNType=function(e){return h(e)&&!e.isNumberLiteral()},t.isStringType=y,t.isArrayType=function(e){return t=>!(t.flags&u.default.TypeFlags.Any)&&(e.typeChecker.isTupleType(t)||e.typeChecker.isArrayLikeType(t)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.ReadonlyArray)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Array)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.ReadVoxelsArray)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.TemplateStringsArray))},t.isSetType=function(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Set)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.ReadonlySet)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.WeakSet)},t.isMapType=function(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Map)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.ReadonlyMap)||t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.WeakMap)},t.isGeneratorType=function(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Generator)},t.isIterableFunctionType=v,t.isLuaTupleType=b,t.isIterableFunctionLuaTupleType=function(e){return t=>{if(v(e)(t)){const n=S(e,t)[0];return void 0!==n&&b(e)(n)}return!1}},t.isIterableType=function(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.Iterable)},t.isObjectType=function(e){return!!(e.flags&u.default.TypeFlags.Object)},t.isUndefinedType=x,t.isEmptyStringType=function(e){return e.isStringLiteral()?""===e.value:(0,l.isTemplateLiteralType)(e)?0===e.texts.length||e.texts.every((e=>0===e.length)):y(e)},t.isRobloxType=function(e){const t=i.default.join(e.data.nodeModulesPath,o.RBXTS_SCOPE,"types");return e=>{var n,r,i;return null!==(i=null===(r=null===(n=e.symbol)||void 0===n?void 0:n.declarations)||void 0===r?void 0:r.some((e=>{var n;const r=null===(n=e.getSourceFile())||void 0===n?void 0:n.fileName;return void 0!==r&&(0,a.isPathDescendantOf)(r,t)})))&&void 0!==i&&i}},t.walkTypes=function e(t,n){if(t.isUnionOrIntersection())for(const r of t.types)e(r,n);else{const r=t.getConstraint();r&&r!==t?e(r,n):n(t)}},t.getFirstConstructSymbol=function(e,t){const n=e.getType(t);if(n.symbol){const e=n.symbol.getDeclarations();if(e)for(const t of e)if(u.default.isInterfaceDeclaration(t))for(const e of t.members)if(u.default.isConstructSignatureDeclaration(e))return e.symbol}},t.getFirstDefinedSymbol=function(e,t){if(!t.isUnionOrIntersection())return t.symbol;for(const n of t.types)if(n.symbol&&!e.typeChecker.isUndefinedSymbol(n.symbol))return n.symbol},t.getTypeArguments=S;const i=r(n(6470)),o=n(6258),a=n(2420),s=n(3115),c=n(1677),l=n(226),u=r(n(2137));function _(e,t){var n;for(const r of null!==(n=t.getBaseTypes())&&void 0!==n?n:[])e.push(r),r.isClassOrInterface()&&_(e,r)}function d(e){const t=new Array;return _(t,e),t}function p(e,t){return e.isUnion()?e.types.every((e=>p(e,t))):e.isIntersection()?e.types.some((e=>p(e,t))):!(!e.isClassOrInterface()||!d(e).some((e=>p(e,t))))||t.some((t=>t(e)))}function f(e,t){return e.isUnionOrIntersection()?e.types.some((e=>f(e,t))):!(!e.isClassOrInterface()||!d(e).some((e=>f(e,t))))||!!(e.flags&(u.default.TypeFlags.TypeVariable|u.default.TypeFlags.AnyOrUnknown))||(m(e)?1!==t.length||t[0]!==x:t.some((t=>t(e))))}function m(e){return e.flags===u.default.TypeFlags.Object&&0===e.getProperties().length&&0===e.getCallSignatures().length&&0===e.getConstructSignatures().length&&void 0===e.getNumberIndexType()&&void 0===e.getStringIndexType()}function g(e){return!!(e.flags&(u.default.TypeFlags.Boolean|u.default.TypeFlags.BooleanLiteral))}function h(e){return!!(e.flags&(u.default.TypeFlags.Number|u.default.TypeFlags.NumberLike|u.default.TypeFlags.NumberLiteral))}function y(e){return!!(e.flags&(u.default.TypeFlags.String|u.default.TypeFlags.StringLike|u.default.TypeFlags.StringLiteral))}function v(e){return t=>t.symbol===e.services.macroManager.getSymbolOrThrow(s.SYMBOL_NAMES.IterableFunction)}function b(e){return t=>t.getProperty(c.NOMINAL_LUA_TUPLE_NAME)===e.services.macroManager.getSymbolOrThrow(c.NOMINAL_LUA_TUPLE_NAME)}function x(e){return!!(e.flags&(u.default.TypeFlags.Undefined|u.default.TypeFlags.Void))}function S(e,t){var n;return null!==(n=e.typeChecker.getTypeArguments(t))&&void 0!==n?n:[]}},837:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateIdentifier=function(e,t){i.default.isValidIdentifier(t.text)?i.default.isReservedIdentifier(t.text)&&a.DiagnosticService.addDiagnostic(o.errors.noReservedIdentifier(t)):a.DiagnosticService.addDiagnostic(o.errors.noInvalidIdentifier(t))};const i=r(n(9861)),o=n(7370),a=n(4502)},4735:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateMethodAssignment=function(e,t){if(c.default.isClassElement(t)&&c.default.isClassLike(t.parent)&&t.name)for(const n of c.default.getAllSuperTypeNodes(t.parent))_(e,t,n);else c.default.isObjectLiteralElementLike(t)&&(c.default.isSpreadAssignment(t)?c.default.isObjectLiteralExpression(t.expression)||function(e,t){const n=e.getType(t.expression),r=e.typeChecker.getContextualType(t.expression);if(r)for(const i of n.getProperties()){const o=e.typeChecker.getTypeOfPropertyOfType(n,i.name),a=e.typeChecker.getTypeOfPropertyOfType(r,i.name);o&&a&&u(e,t,o,a)}}(e,t):function(e,t){const n=e.getType(t),r=e.typeChecker.getContextualTypeForObjectLiteralElement(t);r&&r!==n&&u(e,t,n,r)}(e,t))};const i=n(7370),o=n(4502),a=n(833),s=n(1915),c=r(n(2137));function l(e){let t=!1;return(0,s.walkTypes)(e,(e=>{t||(t=e.getCallSignatures().length>0)})),t}function u(e,t,n,r){if(l(n)&&l(r)){const s=(0,a.isMethodFromType)(e,t,r);(0,a.isMethodFromType)(e,t,n)!==s&&(s?o.DiagnosticService.addDiagnostic(i.errors.expectedMethodGotFunction(t)):o.DiagnosticService.addDiagnostic(i.errors.expectedFunctionGotMethod(t)))}}function _(e,t,n){const r=c.default.getPropertyNameForPropertyNameNode(t.name);if(!r)return;const i=e.getType(t),o=e.typeChecker.getTypeOfPropertyOfType(e.getType(n),r);o&&u(e,t,i,o)}},3972:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateNotAnyType=function(e,t){l.default.isSpreadElement(t)&&(t=(0,s.skipDownwards)(t.expression));let n=e.getType(t);if((0,c.isDefinitelyType)(n,(0,c.isArrayType)(e))){const t=e.typeChecker.getIndexTypeOfType(n,l.default.IndexKind.Number);t&&(n=t)}if((0,c.isDefinitelyType)(n,(0,c.isAnyType)(e))){const n=(0,a.getOriginalSymbolOfNode)(e.typeChecker,t);n?e.multiTransformState.isReportedByNoAnyCache.has(n)||(e.multiTransformState.isReportedByNoAnyCache.add(n),o.DiagnosticService.addDiagnostic(i.errors.noAny(t))):o.DiagnosticService.addDiagnostic(i.errors.noAny(t))}};const i=n(7370),o=n(4502),a=n(9525),s=n(6219),c=n(1915),l=r(n(2137))},2161:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.valueToIdStr=function(e){const t=o(e);return void 0!==t&&i.default.isValidIdentifier(t)?(n=t).charAt(0).toLowerCase()+n.slice(1):"";var n};const i=r(n(9861));function o(e){return i.default.isIdentifier(e)||i.default.isPropertyAccessExpression(e)?e.name:i.default.isCallExpression(e)&&i.default.isPropertyAccessExpression(e.expression)&&"new"===e.expression.name?o(e.expression.expression):void 0}},6837:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapExpressionStatement=function(e){return i.default.isTemporaryIdentifier(e)||i.default.isNone(e)?i.default.list.make():i.default.isCall(e)?i.default.list.make(i.default.create(i.default.SyntaxKind.CallStatement,{expression:e})):i.default.list.make(i.default.create(i.default.SyntaxKind.VariableDeclaration,{left:i.default.tempId(),right:e}))};const i=r(n(9861))},1511:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapReturnIfLuaTuple=function(e,t,n){return(0,s.isLuaTupleType)(e)(e.getType(t))&&function(e,t,n){if(!i.default.isCall(n))return!0;const r=(0,a.skipUpwards)(t),s=r.parent;return!c.default.isExpressionStatement(s)&&((!c.default.isForStatement(s)||s.condition===r)&&(!(c.default.isVariableDeclaration(s)&&c.default.isArrayBindingPattern(s.name)&&!(0,o.arrayBindingPatternContainsHoists)(e,s.name))&&((!c.default.isAssignmentExpression(s)||!c.default.isArrayLiteralExpression(s.left))&&(!c.default.isElementAccessExpression(s)&&(!c.default.isReturnStatement(s)&&!c.default.isVoidExpression(s))))))}(e,t,n)?i.default.array([n]):n};const i=r(n(9861)),o=n(9254),a=n(6219),s=n(1915),c=r(n(2137))},6442:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapStatementsAsGenerator=function(e,t,n){return i.default.list.make(i.default.create(i.default.SyntaxKind.ReturnStatement,{expression:i.default.call(e.TS(t,"generator"),[i.default.create(i.default.SyntaxKind.FunctionExpression,{hasDotDotDot:!1,parameters:i.default.list.make(),statements:n})])}))};const i=r(n(9861))},651:function(e){"use strict";e.exports={}},1199:function(){},1551:function(){},1586:function(){},1744:function(){},4562:function(e,t,n){"use strict";const{normalizeIPv6:r,normalizeIPv4:i,removeDotSegments:o,recomposeAuthority:a,normalizeComponentEncoding:s}=n(9316),c=n(7732);function l(e,t,n,r){const i={};return r||(e=p(u(e,n),n),t=p(u(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=o(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=o(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=o(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=o(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function u(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),i=[],s=c[(r.scheme||n.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(n,r),void 0!==n.path&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),void 0!==n.scheme&&(n.path=n.path.split("%3A").join(":")))),"suffix"!==r.reference&&n.scheme&&i.push(n.scheme,":");const l=a(n,r);if(void 0!==l&&("suffix"!==r.reference&&i.push("//"),i.push(l),n.path&&"/"!==n.path.charAt(0)&&i.push("/")),void 0!==n.path){let e=n.path;r.absolutePath||s&&s.absolutePath||(e=o(e)),void 0===l&&(e=e.replace(/^\/\//u,"/%2F")),i.push(e)}return void 0!==n.query&&i.push("?",n.query),void 0!==n.fragment&&i.push("#",n.fragment),i.join("")}const _=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(e,t){const n=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=-1!==e.indexOf("%");let s=!1;"suffix"===n.reference&&(e=(n.scheme?n.scheme+":":"")+"//"+e);const l=e.match(d);if(l){if(o.scheme=l[1],o.userinfo=l[3],o.host=l[4],o.port=parseInt(l[5],10),o.path=l[6]||"",o.query=l[7],o.fragment=l[8],isNaN(o.port)&&(o.port=l[5]),o.host){const e=i(o.host);if(!1===e.isIPV4){const t=r(e.host,{isIPV4:!1});o.host=t.host.toLowerCase(),s=t.isIPV6}else o.host=e.host,s=!0}void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||o.path||void 0!==o.query?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==o.reference&&(o.error=o.error||"URI is not a "+n.reference+" reference.");const e=c[(n.scheme||o.scheme||"").toLowerCase()];if(!(n.unicodeSupport||e&&e.unicodeSupport)&&o.host&&(n.domainHost||e&&e.domainHost)&&!1===s&&function(e){let t=0;for(let n=0,r=e.length;n126||_[t])return!0;return!1}(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(a&&void 0!==o.scheme&&(o.scheme=unescape(o.scheme)),a&&void 0!==o.host&&(o.host=unescape(o.host)),void 0!==o.path&&o.path.length&&(o.path=escape(unescape(o.path))),void 0!==o.fragment&&o.fragment.length&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),e&&e.parse&&e.parse(o,n)}else o.error=o.error||"URI can not be parsed.";return o}const f={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=u(p(e,t),t):"object"==typeof e&&(e=p(u(e,t),t)),e},resolve:function(e,t,n){const r=Object.assign({scheme:"null"},n);return u(l(p(e,r),p(t,r),r,!0),{...r,skipEscape:!0})},resolveComponents:l,equal:function(e,t,n){return"string"==typeof e?(e=unescape(e),e=u(s(p(e,n),!0),{...n,skipEscape:!0})):"object"==typeof e&&(e=u(s(e,!0),{...n,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=u(s(p(t,n),!0),{...n,skipEscape:!0})):"object"==typeof t&&(t=u(s(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:u,parse:p};e.exports=f,e.exports.default=f,e.exports.fastUri=f},7732:function(e){"use strict";const t=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function i(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function o(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const a={scheme:"http",domainHost:!0,parse:i,serialize:o},s={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=r(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(r(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){const[t,n]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:a,https:{scheme:"https",domainHost:a.domainHost,parse:i,serialize:o},ws:s,wss:{scheme:"wss",domainHost:s.domainHost,parse:s.parse,serialize:s.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(n);if(r){const n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const i=`${n}:${t.nid||e.nid}`,o=c[i];e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),i=`${n}:${t.nid||r}`,o=c[i];o&&(e=o.serialize(e,t));const a=e,s=e.nss;return a.path=`${r||t.nid}:${s}`,t.skipEscape=!0,a},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,n){const r=e;return r.uuid=r.nss,r.nss=void 0,n.tolerant||r.uuid&&t.test(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=c},2039:function(e){"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},9316:function(e,t,n){"use strict";const{HEX:r}=n(2039);function i(e){if(c(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[n]=t;return n?{host:s(n,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function o(e,t=!1){let n="",i=!0;for(const t of e){if(void 0===r[t])return;"0"!==t&&!0===i&&(i=!1),i||(n+=t)}return t&&0===n.length&&(n="0"),n}function a(e,t={}){if(c(e,":")<2)return{host:e,isIPV6:!1};const n=function(e){let t=0;const n={error:!1,address:"",zone:""},r=[],i=[];let a=!1,s=!1,c=!1;function l(){if(i.length){if(!1===a){const e=o(i);if(void 0===e)return n.error=!0,!1;r.push(e)}i.length=0}return!0}for(let o=0;o7){n.error=!0;break}o-1>=0&&":"===e[o-1]&&(s=!0)}}return i.length&&(a?n.zone=i.join(""):c?r.push(i.join("")):r.push(o(i))),n.address=r.join(""),n}(e);if(n.error)return{host:e,isIPV6:!1};{let e=n.address,t=n.address;return n.zone&&(e+="%"+n.zone,t+="%25"+n.zone),{host:e,escapedHost:t,isIPV6:!0}}}function s(e,t){let n="",r=!0;const i=e.length;for(let o=0;o0})).map((function(e){return"-- ".concat(e)})).join("\n")}postMessage({source:n})}else"writeFile"===e.data.type?t.vfs.writeFile(e.data.filePath,e.data.content):"setMapping"===e.data.type&&t.setMapping(e.data.typingsPath,e.data.mainPath)})),console.log("roblox-ts@".concat(e.COMPILER_VERSION))}()}(); \ No newline at end of file