ensloppify 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2026, https://github.com/Strikeless
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # EnsloppifyJS
2
+ A TS/JS library providing a simple framework for modifying ("patching") external JavaScript source code in a browser or Node.js.
@@ -0,0 +1,16 @@
1
+ var vi=Object.create;var se=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var gi=Object.getOwnPropertyNames;var bi=Object.getPrototypeOf,Si=Object.prototype.hasOwnProperty;var K=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(i){throw e=0,i}};var ki=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of gi(e))!Si.call(t,r)&&r!==i&&se(t,r,{get:()=>e[r],enumerable:!(s=yi(e,r))||s.enumerable});return t};var wi=(t,e,i)=>(i=t!=null?vi(bi(t)):{},ki(e||!t||!t.__esModule?se(i,"default",{value:t,enumerable:!0}):i,t));var ei=K((js,ti)=>{"use strict";var Nt=Object.defineProperty,ps=Object.getOwnPropertyDescriptor,ls=Object.getOwnPropertyNames,fs=Object.prototype.hasOwnProperty,ct=(t,e)=>Nt(t,"name",{value:e,configurable:!0}),ds=(t,e)=>{for(var i in e)Nt(t,i,{get:e[i],enumerable:!0})},ms=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ls(e))!fs.call(t,r)&&r!==i&&Nt(t,r,{get:()=>e[r],enumerable:!(s=ps(e,r))||s.enumerable});return t},xs=t=>ms(Nt({},"__esModule",{value:!0}),t),Ze={};ds(Ze,{default:()=>ys,getValue:()=>$e});ti.exports=xs(Ze);var Je=ct(t=>t!==null&&typeof t=="object","isObject"),Ye=ct((t,e,i)=>typeof i.join=="function"?i.join(t):t[0]+e+t[1],"join"),vs=ct((t,e,i)=>typeof i.split=="function"?i.split(t):t.split(e),"split"),Qt=ct((t,e={},i)=>typeof i?.isValid=="function"?i.isValid(t,e):!0,"isValid"),Xe=ct(t=>Je(t)||typeof t=="function","isValidObject"),$e=ct((t,e,i={})=>{if(Je(i)||(i={default:i}),!Xe(t))return typeof i.default<"u"?i.default:t;typeof e=="number"&&(e=String(e));let s=Array.isArray(e),r=typeof e=="string",n=i.separator||".",o=i.joinChar||(typeof n=="string"?n:".");if(!r&&!s)return t;let h=t[e];if(h===void 0&&typeof t.get=="function"&&(h=t.get(e)),h!==void 0)return Qt(e,t,i)?h:i.default;let u=s?e:vs(e,n,i),c=u.length,p=0;do{let m=u[p];for(typeof m!="string"&&(m=String(m));m&&m.slice(-1)==="\\";)m=Ye([m.slice(0,-1),u[++p]||""],o,i);if(h=t[m],h===void 0&&typeof t.get=="function"&&(h=t.get(m)),h!==void 0){if(!Qt(m,t,i))return i.default;t=h}else{let g=!1,k=p+1;for(;k<c;)if(m=Ye([m,u[k++]],o,i),h=t[m],h===void 0&&typeof t.get=="function"&&(h=t.get(m)),g=h!==void 0){if(!Qt(m,t,i))return i.default;t=h,p=k-1;break}if(!g)return i.default}}while(++p<c&&Xe(t));return p===c?t:i.default},"getValue"),ys=$e;/*!
2
+ * get-value <https://github.com/jonschlinkert/get-value>
3
+ *
4
+ * Copyright (c) 2014-present, Jon Schlinkert.
5
+ * Released under the MIT License.
6
+ */});var Yt=K(ii=>{"use strict";function Lt(t){if(!t||typeof t!="object")return t;switch(t.type){case"StringLiteral":t.type="Literal",t.raw=`"${t.value}"`;break;case"NumericLiteral":t.type="Literal",t.raw=String(t.value);break;case"BooleanLiteral":t.type="Literal",t.raw=String(t.value);break;case"NullLiteral":t.type="Literal",t.value=null,t.raw="null";break;case"RegExpLiteral":t.type="Literal",t.value=new RegExp(t.pattern,t.flags),t.regex={pattern:t.pattern,flags:t.flags},t.raw=`/${t.pattern}/${t.flags}`;break;case"BigIntLiteral":t.type="Literal",t.value=BigInt(t.value),t.raw=`${t.value}n`,t.bigint=t.value;break;default:break}t.properties&&(t.properties=t.properties.map(e=>{let i=Lt(e);return e.type==="ObjectProperty"&&(i.type="Property",i.kind="init"),i}));for(let[e,i]of Object.entries(t))e==="type"||i==null||typeof i!="object"||(Array.isArray(i)?t[e]=i.map(s=>Lt(s)):t[e]=Lt(i));return t}ii.forEscodegen=Lt});var vt=K(nt=>{"use strict";var{defineProperty:gs}=Reflect,bs=new Set(["constructor","prototype","__proto__","__defineGetter__"]);nt.isSafeKey=t=>bs.has(t)===!1;nt.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);nt.isEmpty=t=>t==null||Array.isArray(t)&&t.length===0;nt.define=(t,e,i)=>gs(t,e,{value:i,enumerable:!1});nt.isPlainObject=t=>t?.constructor===Object||nt.isObject(t)&&t.constructor===void 0});var Xt=K((Ws,ri)=>{"use strict";var Ss=Yt(),si=vt();ri.exports=t=>{class e extends t{constructor(...s){super(...s),this.state={},this.generate=this.options.generate}ArrowFunctionExpression(s,r){return this.FunctionExpression(s,r)}CallExpression(s,r,n){let o=this.visit(s.callee,r,s),h=[];if(o===e.FAIL||typeof o!="function")return this.state.fail=!0,e.FAIL;let u=s.callee.object?this.visit(s.callee.object,r,s.callee):null;u===e.FAIL&&(u=null);for(let c of s.arguments){let p=this.visit(c,r,s);if(p===e.FAIL||this.state.fail)return this.state.fail=!0,e.FAIL;c.type==="SpreadElement"?h.push(...p):h.push(p)}if(!this.state.noExecute)return o.apply(u,h)}ExpressionStatement(s,r,n){return this.visit(s.expression,r,n)}FunctionExpression(s,r){this.insideFunction=!0,this.functionParams=s.params;let n=this.createContext(r);for(let u=0;u<s.params.length;u++){let c=s.params[u];if(c.type==="Identifier")n[c.name]={};else return this.state.fail=!0,e.FAIL}let o=u=>{let c=this.state.noExecute;if(this.state.noExecute=!0,this.visit(u,n,s)===e.FAIL||this.state.fail===!0)return this.state.fail=!0,e.FAIL;this.state.noExecute=c};if(s.body.body){for(let u of s.body.body)if(o(u),this.state.noExecute)return}else this.options.prefix&&o(s.body);if(this.functionParams=null,this.insideFunction=!1,typeof this.generate!="function")throw new TypeError('Expected options.generate to be the "generate" function from "escodegen"');this.generate&&this.options.generator==="escodegen"&&(s=Ss.forEscodegen(s));let h=(u=s.body?.type==="ObjectExpression")=>{if(u){let m=s.body;s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:m}]}}if(this.options.prefix)return Function(this.options.prefix,"return "+this.generate(s))(r);let c=Object.keys(r),p=Object.values(r);return Function(c.join(", "),"return "+this.generate(s))(...p)};try{return h()}catch(u){if(u.message.includes("Unexpected token ':'"))return h(!0);throw u}}MemberExpression(s,r){let n=s.object?.name;this.options.prefix&&n&&!n.startsWith(this.options.prefix)&&(s.object.name=`${this.options.prefix}.${n}`);let o=this.visit(s.object,r,s)??r[s.object.name];if(!o||this.state.fail)return e.FAIL;if(s.property.type==="Identifier"&&s.computed===!1){if(si.isSafeKey(s.property.name)){let c=o?.[s.property.name];return o!=null&&typeof c=="function"?c.bind(o):c}if(this.options.strictUnsafe)throw new TypeError(`Unsafe property name: ${s.property.name}`);return this.state.fail=!0,e.FAIL}let h=this.visit(s.property,r,s);if(h===null||!si.isSafeKey(h))return;let u=o?.[h];return typeof u=="function"?u.bind(o):u}NewExpression(s,r){let n=this.visit(s.callee,r,s),o=[];if(n===e.FAIL||this.state.fail||typeof n!="function")return this.state.fail=!0,e.FAIL;for(let h of s.arguments){let u=this.visit(h,r,s);if(u===e.FAIL||this.state.fail)return this.state.fail=!0,e.FAIL;h.type==="SpreadElement"?o.push(...u):o.push(u)}return new n(...o)}OptionalCallExpression(s,r){return this.CallExpression(s,r)}ReturnStatement(s,r){return this.visit(s.argument,r,s)}TaggedTemplateExpression(s,r){let n=this.visit(s.tag,r,s),o=s.quasi.quasis.map(u=>this.visit(u,r,s)),h=s.quasi.expressions.map(u=>this.visit(u,r,s));return n(...[o].concat(h))}}return e}});var oi=K((Hs,ni)=>{"use strict";var ks=Xt(),ws=Yt(),ai=vt();ni.exports=t=>{class e extends ks(t){AwaitExpression(s,r,n){return this.visit(s.argument,r,n)}async CallExpression(s,r){let n=await this.visit(s.callee,r,s),o=[];if(n===e.FAIL||typeof n!="function")return this.state.fail=!0,e.FAIL;let h=s.callee.object?await this.visit(s.callee.object,r,s.callee):null;h===e.FAIL&&(h=null);for(let u of s.arguments){let c=await this.visit(u,r,s);if(c===e.FAIL)return this.state.fail=!0,e.FAIL;u.type==="SpreadElement"?o.push(...c):o.push(c)}if(!this.state.noExecute)return n.apply(h,o)}async FunctionExpression(s,r,n){this.insideFunction=!0,this.functionParams=s.params;let o=this.createContext(r);for(let c=0;c<s.params.length;c++){let p=s.params[c];if(p.type==="Identifier")o[p.name]={};else return this.state.fail=!0,e.FAIL}let h=async c=>{let p=this.state.noExecute;if(this.state.noExecute=!0,await this.visit(c,o,s)===e.FAIL||this.state.fail===!0)return this.state.fail=!0,e.FAIL;this.state.noExecute=p};if(s.body.body){for(let c of s.body.body)if(await h(c),this.state.noExecute)return}else this.options.prefix&&await h(s.body);if(this.functionParams=null,this.insideFunction=!1,typeof this.generate!="function")throw new TypeError('Expected options.generate to be the "generate" function from "escodegen"');this.generate&&this.options.generator==="escodegen"&&(s=ws.forEscodegen(s));let u=(c=s.body?.type==="ObjectExpression")=>{if(c){let g=s.body;s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:g}]}}if(this.options.prefix)return Function(this.options.prefix,"return "+this.generate(s))(r);let p=Object.keys(r),m=Object.values(r);return Function(p.join(", "),"return "+this.generate(s))(...m)};try{return u()}catch(c){if(c.message.includes("Unexpected token ':'"))return u(!0);throw c}}async MemberExpression(s,r,n){let o=s.object?.name;this.options.prefix&&o&&!o.startsWith(this.options.prefix)&&(s.object.name=`${this.options.prefix}.${o}`);let h=await this.visit(s.object,r,s)??r[s.object.name];if(!h||this.state.fail)return e.FAIL;if(s.property.type==="Identifier"&&s.computed===!1){if(ai.isSafeKey(s.property.name)){let p=h?.[s.property.name];return h!=null&&typeof p=="function"?p.bind(h):p}if(this.options?.strictUnsafe)throw new TypeError(`Unsafe property name: ${s.property.name}`);return this.state.fail=!0,e.FAIL}let u=await this.visit(s.property,r,s);if(u===null||!ai.isSafeKey(u))return;let c=h?.[u];return typeof c=="function"?c.bind(h):c}async NewExpression(s,r){let n=await this.visit(s.callee,r,s),o=[];if(n===e.FAIL||this.state.fail||typeof n!="function")return this.state.fail=!0,e.FAIL;for(let h of s.arguments){let u=await this.visit(h,r,s);if(u===e.FAIL||this.state.fail)return this.state.fail=!0,e.FAIL;h.type==="SpreadElement"?o.push(...u):o.push(u)}return new n(...o)}async TaggedTemplateExpression(s,r){let n=await this.visit(s.tag,r,s),o=await Promise.all(s.quasi.quasis.map(u=>this.visit(u,r,s))),h=await Promise.all(s.quasi.expressions.map(u=>this.visit(u,r,s)));return n(...[o].concat(h))}}return e}});var Zt=K((Ks,ui)=>{"use strict";var Cs=(t,e={})=>{let i=[],s=[],r=(o,h,u)=>{if(Reflect.defineProperty(o,"parent",{value:u}),h(o,u),o.right&&r(o.right,h,o),o.left&&r(o.left,h,o),o.object&&r(o.object,h,o),o.callee&&r(o.callee,h,o),o.argument&&r(o.argument,h,o),o.property&&r(o.property,h,o),o.alternate&&r(o.alternate,h,o),o.consequent&&r(o.consequent,h,o),o.test&&r(o.test,h,o),o.expressions){let c=o.expressions.length;for(let p=0;p<c;p++)r(o.quasis[p],h,o),r(o.expressions[p],h,o);r(o.quasis[c],h,o);return}o.properties&&n(o.properties,h,o),o.arguments&&n(o.arguments,h,o),o.elements&&n(o.elements,h,o),o.body&&n(o.body,h,o)},n=(o,h,u)=>{i.push(u);for(let c of o)r(c,h,u);i.pop()};return r(t,(o,h)=>{if(o.type==="Identifier")if(o===h?.property){if(e.withMembers!==!0||s.length===0)return;s.push(`${s.pop()}.${o.name}`)}else s.includes(o.name)||s.push(o.name)}),[...new Set(s)].reverse()};ui.exports=Cs});var pi=K((zs,ci)=>{"use strict";var{default:Jt}=ei(),Es=Xt(),_s=oi(),As=Zt(),pt=vt(),Is=1e4,hi=50,$t=class t{static FAIL=Symbol("fail");static ExpressionSync=t;static variables=(e,i)=>As(e,i);static evaluate=(e,i,s)=>new t(e,s).evaluate(i);constructor(e,i={},{created:s=!1}={}){if(this.options={maxExpressionDepth:hi,maxArrayLength:Is,...i},this.visitors={...this.options.visitors},this.tree=e,this.state={stackDepth:0,expressionDepth:0,seenObjects:new WeakSet,templateLiterals:new Set},this.stack=[],this.seen=new Set,i.functions&&!s){let n=(this.constructor.isAsync?_s:Es)(this.constructor);return new n(e,i,{created:!0})}}incrementDepth(){if(this.state.expressionDepth++,this.state.expressionDepth>hi)throw new RangeError("Maximum expression depth exceeded")}decrementDepth(){this.state.expressionDepth--}createContext(e){return typeof e=="function"?e:pt.isPlainObject(e)?{...e}:e}visit(e,i,s){this.incrementDepth();try{Reflect.defineProperty(e,"parent",{configurable:!0,enumerable:!1,writable:!0,value:e.parent||s});let r=this.visitors[e.type]||this[e.type];if(typeof r!="function"){let c=`${e.type==="CallExpression"?"Functions are":`visitor "${e.type}" is`} not supported`;throw new TypeError(c)}let n=["Identifier","BinaryExpression"];n.includes(e.type)||this.stack.push(e);let o=r.call(this,e,i,s),h=u=>{if(u instanceof Promise)return u.then(c=>h(c));if(n.includes(e.type)||this.stack.pop(),!this.state.fail)return u};return h(o)}finally{this.decrementDepth()}}evaluate(e){return this.visit(this.tree,e||{})}isRegExpOperator(e,i){return e.operator==="="&&e.right?.operator==="~"&&this.options.regexOperator!==!1}assignment(e){switch(e.operator){default:throw new SyntaxError(`Assignment expression "${e.operator}" is not supported`)}}assignOperation(e,i,s){switch(e){case"=":return s;case"+=":return i+s;case"-=":return i-s;case"*=":return i*s;case"/=":return i/s;case"%=":return i%s;case"**=":return i**s;case"<<=":return i<<s;case">>=":return i>>s;case">>>=":return i>>>s;case"&=":return i&s;case"^=":return i^s;case"|=":return i|s;case"&&=":return i&&s;case"||=":return i||s;case"??=":return i??s;default:throw new SyntaxError(`Assignment operator "${e}" is not supported`)}}postfix(e,i){switch(e.operator){case"++":return i+1;case"--":return i-1;default:return i}}prefix(e,i){switch(e.operator){case"++":return i+1;case"--":return i-1;default:return i}}unset(e,i){if(e.type==="Identifier"){let n=e.name;return this.options.prefix&&!n.startsWith(this.options.prefix)&&(n=`${this.options.prefix}.${n}`),i!=null&&(deletePath(i,n),delete i[n]),!0}let s=this.visit(e.object,i,e),r=n=>{if(pt.isObject(n)){Reflect.deleteProperty(n,e.property.name);let o=e.object.name;return o&&this.options.prefix&&!o.startsWith(this.options.prefix)&&(e.object.name=`${this.options.prefix}.${e.object.name}`),i[e.object.name]=n,!0}};return s instanceof Promise?s.then(n=>r(n)):r(s)}comparison(e,i,s,r,n){let o=this.options.booleanLogicalOperators===!0;if(typeof e=="symbol"||typeof s=="symbol")return this.state.fail=!0,t.FAIL;let h=c=>{if(typeof c=="symbol"){this.state.fail=!0;return}return c},u=()=>h(typeof s=="function"?s():s);if(i==="in"){let c=u();return!this.options.strict&&(typeof c=="string"||Array.isArray(c))?c.includes(e):e in c}switch(n.operator){case"+":return e+u();case"-":return e-u();case"/":return e/u();case"*":return e*u();case"%":return e%u();case"**":return e**u();case"instanceof":return e instanceof u();case"<":return e<u();case">":return e>u();case"<=":return e<=u();case">=":return e>=u();case"!==":return e!==u();case"===":return e===u();case"!=":return e!=u();case"==":return e==u();case"<<":return e<<u();case">>":return e>>u();case">>>":return e>>>u();case"&":return e&u();case"|":return e|u();case"^":return e^u();case"&&":return o?!!(e&&u()):e&&u();case"||":return o?!!(e||u()):e||u();case"??":return o?!!(e??u()):e??u()}}AssignmentExpression(e,i,s){if(this.isRegExpOperator(e,i)){let r=this.visit(e.left,i,e),n=this.visit(e.right.argument,i,e.right);if(n instanceof RegExp)return n.test(r)}try{return this.assignment(e,i,s)}catch{throw new SyntaxError(`Assignment expression "${e.operator}" is not supported`)}}ArrayExpression(e,i,s){let r=[];for(let n of e.elements){if(r.length>=this.options.maxArrayLength)throw new RangeError("Maximum array length exceeded");let o=this.visit(n,i,e);if(this.state.fail||o===t.FAIL)return this.state.fail=!0,t.FAIL;if(n.type==="SpreadElement"){let h=o;if(Array.isArray(h)){if(r.length+h.length>this.options.maxArrayLength)throw new RangeError("Maximum array length exceeded");r.push(...h)}}else r.push(o)}return r}BigIntLiteral(e){return BigInt(e.value)}BinaryExpression(e,i){let s=this.visit(e.left,i,e),r=()=>this.visit(e.right,i,e);return s instanceof Promise?s.then(n=>this.comparison(n,e.operator,r,i,e)):this.comparison(s,e.operator,r,i,e)}BlockStatement(e,i,s){let r=[];for(let n of e.body)r.push(this.visit(n,i,e));return r}BooleanLiteral(e){return e.value}ConditionalExpression(e,i){let{test:s,consequent:r,alternate:n}=e,o=this.visit(s,i,e);return this.visit(o?r:n,i,e)}Identifier(e,i,s){if(!pt.isSafeKey(e.name))return;if(i==null&&this.options.strict!==!1)throw new TypeError(`Cannot read property '${e.name}' of undefined`);if(e.name==="undefined"&&this.stack.length===0)return;if(this.options.prefix&&!e.name.startsWith(this.options.prefix)&&(!this.insideFunction||!this.functionParams?.some(n=>n.name===e.name))&&(e.name=`${this.options.prefix}.${e.name}`),i!=null){if(this.options.prefix&&pt.isPlainObject(i)&&!i[this.options.prefix]&&(i={...i,[this.options.prefix]:i}),typeof i?.lookup=="function"){let o=i.lookup(e.name);if(o!==void 0)return o}let n=i[e.name]??Jt(i,e.name);if(n!==void 0)return n;if(hasOwnProperty.call(i,e.name))return}let r=()=>{if(this.options.strict!==!1)throw new ReferenceError(`${e.name} is undefined`);return this.state.fail=!0,t.FAIL};if(s?.type==="ObjectProperty"&&s.shorthand===!0||this.stack.some(n=>n.type==="ArrayExpression"||n.type==="ObjectExpression"))return r();if(this.options.strict===!0&&this.options.functions!==!0)throw new TypeError(`Cannot read property '${e.name}' of undefined`)}Literal(e){return e.value}LogicalExpression(e,i,s){return this.BinaryExpression(e,i,s)}MemberExpression(e,i,s){let{computed:r,object:n,property:o,unset:h}=e;n.name&&this.options.prefix&&!n.name.startsWith(this.options.prefix)&&(n.name=`${this.options.prefix}.${n.name}`);let u=this.visit(n,i,e)??i[n.name],c=r?i:u;if(!pt.isSafeKey(o.name))return this.state.fail=!0,t.FAIL;let p;if(h)p=u;else if(e.optional){let m=g=>this.visit(o,c||{},e);p=o instanceof Promise?o.then(g=>m(g)):m(o)}else p=this.visit(o,c,e);if(p===void 0&&o.name&&c&&(p=c[o.name]),!!pt.isSafeKey(p))return r&&u&&p!=null?u[p]:p}NullLiteral(e){return null}NumericLiteral(e){return e.value}ObjectExpression(e,i){let s={};for(let r of e.properties){let{key:n,type:o,value:h}=r;if(o==="SpreadElement")Object.assign(s,this.visit(r,i,e));else{let u=r.computed?this.visit(n,i,r):n.value||n.name,c=this.visit(h,i,r);r.shorthand&&this.options.prefix&&(r.shorthand=!1),s[u]=c}}return s}OptionalMemberExpression(e,i){let s=this.visit(e.object,i,e),r=n=>this.visit(e.property,n||{},e);return s instanceof Promise?s.then(n=>r(n)):r(s)}RegExpLiteral(e){return new RegExp(e.pattern,e.flags)}SequenceExpression(e,i,s){let r=e.expressions.length;for(let n=0;n<r-1;n++)this.visit(e.expressions[n],i,e);return this.visit(e.expressions[r-1],i,e)}SpreadElement(e,i){return this.visit(e.argument,i,e)}StringLiteral(e,i){return this.options.allowContextStringLiterals===!0?i[e.value]??e.value:e.value}TemplateElement(e){return e.value.cooked}TemplateLiteral(e,i){let s=e.expressions.length,r="";for(let n=0;n<s;n++)r+=this.visit(e.quasis[n],i,e),r+=this.visit(e.expressions[n],i,e);return r+=this.visit(e.quasis[s],i,e),r}ThisExpression(e,i){if(!i)throw new TypeError('Cannot read property "this" of undefined');let s=this.options.prefix?`${this.options.prefix}.this`:"this";return Jt(i,s)??Jt(i,"this")}UnaryExpression(e,i){let s=e.operator!=="delete"&&this.visit(e.argument,i,e),r=n=>{switch(e.operator){case"delete":return this.unset(e.argument,i,e);case"typeof":return typeof n;case"void":return;case"~":return~n;case"!":return!n;case"+":return+n;case"-":return-n;default:break}};return s instanceof Promise?s.then(n=>r(n)):r(s)}UpdateExpression(e,i,s){let r=this.visit(e.argument,i,e),n=o=>{let h=e.prefix?this.prefix(e,o):this.postfix(e,o),u=e.argument.name;return u&&this.options.prefix&&!u.startsWith(this.options.prefix)&&(e.argument.name=`${this.options.prefix}.${e.argument.name}`),i[e.argument.name]=h,h};return r instanceof Promise?r.then(o=>n(o)):n(r)}ExpressionStatement(e,i){return this.visit(e.expression,i,e)}};ci.exports=$t});var di=K((Qs,fi)=>{"use strict";var te=pi(),Ps=Zt(),li=vt(),Vt=class t extends te{static isAsync=!0;static Expression=t;static ExpressionSync=te;static variables=(e,i)=>Ps(e,i);static evaluate=(e,i,s)=>new t(e,s).evaluate(i);async evaluate(e){return this.visit(this.tree,e||{})}async comparison(e,i,s,r,n){let o=this.options.booleanLogicalOperators===!0;if(typeof e=="symbol"&&e===t.FAIL)return this.state.fail=!0,t.FAIL;if(typeof s=="symbol"&&s===t.FAIL)return this.state.fail=!0,t.FAIL;let h=c=>{if(typeof c=="symbol"&&c===t.FAIL){this.state.fail=!0;return}return c},u=()=>h(typeof s=="function"?s():s);switch(i){case"+":return e+await u();case"-":return e-await u();case"/":return e/await u();case"*":return e*await u();case"%":return e%await u();case"**":return e**await u();case"<":return e<await u();case">":return e>await u();case"<=":return e<=await u();case">=":return e>=await u();case"instanceof":return e instanceof await u();case"in":{let c=await u();return!this.options.strict&&(typeof c=="string"||Array.isArray(c))?c.includes(e):e in c}case"!==":return e!==await u();case"===":return e===await u();case"!=":return e!=await u();case"==":return e==await u();case"<<":return e<<await u();case">>":return e>>await u();case">>>":return e>>>await u();case"&":return e&await u();case"|":return e|await u();case"^":return e^await u();case"&&":return o?!!(e&&await u()):e&&await u();case"||":return o?!!(e||await u()):e||await u();case"??":return o?!!(e??await u()):e??await u()}}async ArrayExpression(e,i,s){let r=[];for(let n of e.elements){let o=await this.visit(n,i,e);if(o===t.FAIL)return this.state.fail=!0,t.FAIL;n.type==="SpreadElement"?r.push(...o):r.push(o)}return r}async AssignmentExpression(e,i,s){if(this.isRegExpOperator(e,i)){let r=await this.visit(e.left,i,e),n=await this.visit(e.right.argument,i,e.right);if(n instanceof RegExp)return n.test(r)}try{return this.assignment(e,i,s)}catch{throw new SyntaxError(`Assignment expression "${e.operator}" is not supported`)}}async BinaryExpression(e,i){let s=await this.visit(e.left,i,e),r=()=>this.visit(e.right,i,e);return this.comparison(s,e.operator,r,i,e)}async BlockStatement(e,i,s){let r=[];for(let n of e.body)r.push(await this.visit(n,i,e));return r}async ConditionalExpression(e,i){let{test:s,consequent:r,alternate:n}=e,o=await this.visit(s,i,e);return this.visit(o?r:n,i,e)}async MemberExpression(e,i,s){let{computed:r,object:n,property:o,unset:h}=e;n.name&&this.options.prefix&&!n.name.startsWith(this.options.prefix)&&(n.name=`${this.options.prefix}.${n.name}`);let u=await this.visit(n,i,e)??i[n.name],c=r?i:u;if(!li.isSafeKey(o.name))return this.state.fail=!0,t.FAIL;let p=h?u:await this.visit(o,e.optional?c||{}:c,e);if(p===void 0&&o.name&&c&&(p=c[o.name]),!!li.isSafeKey(p))return r&&u&&p!=null?u[p]:p}async ObjectExpression(e,i){let s={};for(let r of e.properties){let{key:n,type:o,value:h}=r;if(o==="SpreadElement")Object.assign(s,await this.visit(r,i,e));else{let u=r.computed?await this.visit(n,i,r):n.value||n.name,c=await this.visit(h,i,r);r.shorthand&&this.options.prefix&&(r.shorthand=!1),s[u]=c}}return s}async SequenceExpression(e,i,s){let r=e.expressions.length;for(let n=0;n<r-1;n++)await this.visit(e.expressions[n],i,e);return this.visit(e.expressions[r-1],i,e)}async TemplateLiteral(e,i){let s=e.expressions.length,r="";for(let n=0;n<s;n++)r+=await this.visit(e.quasis[n],i,e),r+=await this.visit(e.expressions[n],i,e);return r+=await this.visit(e.quasis[s],i,e),r}async YieldExpression(e,i){throw new SyntaxError("YieldExpression is not supported yet")}};Vt.evaluate.sync=(...t)=>te.evaluate(...t);fi.exports=Vt});var xi=K((Ys,mi)=>{"use strict";mi.exports=di()});var Ci=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],he=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Ei="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",ce="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Ft={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Rt="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",_i={5:Rt,"5module":Rt+" export import",6:Rt+" const class extends export import super"},pe=/^in(stanceof)?$/,Ai=new RegExp("["+ce+"]"),Ii=new RegExp("["+ce+Ei+"]");function Dt(t,e){for(var i=65536,s=0;s<e.length;s+=2){if(i+=e[s],i>t)return!1;if(i+=e[s+1],i>=t)return!0}return!1}function M(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&Ai.test(String.fromCharCode(t)):e===!1?!1:Dt(t,he)}function Z(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&Ii.test(String.fromCharCode(t)):e===!1?!1:Dt(t,he)||Dt(t,Ci)}var b=function(e,i){i===void 0&&(i={}),this.label=e,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function V(t,e){return new b(t,{beforeExpr:!0,binop:e})}var T={beforeExpr:!0},N={startsExpr:!0},Ut={};function y(t,e){return e===void 0&&(e={}),e.keyword=t,Ut[t]=new b(t,e)}var a={num:new b("num",N),regexp:new b("regexp",N),string:new b("string",N),name:new b("name",N),privateId:new b("privateId",N),eof:new b("eof"),bracketL:new b("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new b("]"),braceL:new b("{",{beforeExpr:!0,startsExpr:!0}),braceR:new b("}"),parenL:new b("(",{beforeExpr:!0,startsExpr:!0}),parenR:new b(")"),comma:new b(",",T),semi:new b(";",T),colon:new b(":",T),dot:new b("."),question:new b("?",T),questionDot:new b("?."),arrow:new b("=>",T),template:new b("template"),invalidTemplate:new b("invalidTemplate"),ellipsis:new b("...",T),backQuote:new b("`",N),dollarBraceL:new b("${",{beforeExpr:!0,startsExpr:!0}),eq:new b("=",{beforeExpr:!0,isAssign:!0}),assign:new b("_=",{beforeExpr:!0,isAssign:!0}),incDec:new b("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new b("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:V("||",1),logicalAND:V("&&",2),bitwiseOR:V("|",3),bitwiseXOR:V("^",4),bitwiseAND:V("&",5),equality:V("==/!=/===/!==",6),relational:V("</>/<=/>=",7),bitShift:V("<</>>/>>>",8),plusMin:new b("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:V("%",10),star:V("*",10),slash:V("/",10),starstar:new b("**",{beforeExpr:!0}),coalesce:V("??",1),_break:y("break"),_case:y("case",T),_catch:y("catch"),_continue:y("continue"),_debugger:y("debugger"),_default:y("default",T),_do:y("do",{isLoop:!0,beforeExpr:!0}),_else:y("else",T),_finally:y("finally"),_for:y("for",{isLoop:!0}),_function:y("function",N),_if:y("if"),_return:y("return",T),_switch:y("switch"),_throw:y("throw",T),_try:y("try"),_var:y("var"),_const:y("const"),_while:y("while",{isLoop:!0}),_with:y("with"),_new:y("new",{beforeExpr:!0,startsExpr:!0}),_this:y("this",N),_super:y("super",N),_class:y("class",N),_extends:y("extends",T),_export:y("export"),_import:y("import",N),_null:y("null",N),_true:y("true",N),_false:y("false",N),_in:y("in",{beforeExpr:!0,binop:7}),_instanceof:y("instanceof",{beforeExpr:!0,binop:7}),_typeof:y("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:y("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:y("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},I=/\r\n?|\n|\u2028|\u2029/,wt=new RegExp(I.source,"g");function U(t){return t===10||t===13||t===8232||t===8233}function le(t,e,i){i===void 0&&(i=t.length);for(var s=e;s<i;s++){var r=t.charCodeAt(s);if(U(r))return s<i-1&&r===13&&t.charCodeAt(s+1)===10?s+2:s+1}return-1}var fe=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,_=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,de=Object.prototype,Pi=de.hasOwnProperty,Ni=de.toString,ot=Object.hasOwn||(function(t,e){return Pi.call(t,e)}),re=Array.isArray||(function(t){return Ni.call(t)==="[object Array]"}),ae=Object.create(null);function X(t){return ae[t]||(ae[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function z(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}var Li=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ft=function(e,i){this.line=e,this.column=i};ft.prototype.offset=function(e){return new ft(this.line,this.column+e)};var it=function(e,i,s){this.start=i,this.end=s,e.sourceFile!==null&&(this.source=e.sourceFile)};function ut(t,e){for(var i=1,s=0;;){var r=le(t,s,e);if(r<0)return new ft(i,e-s);++i,s=r}}var tt={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ne=!1;function Vi(t){var e={};for(var i in tt)e[i]=t&&ot(t,i)?t[i]:tt[i];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!ne&&typeof console=="object"&&console.warn&&(ne=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
7
+ Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),(!t||t.allowHashBang==null)&&(e.allowHashBang=e.ecmaVersion>=14),re(e.onToken)){var s=e.onToken;e.onToken=function(r){return s.push(r)}}if(re(e.onComment)&&(e.onComment=Ti(e,e.onComment)),e.sourceType==="commonjs"&&e.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}function Ti(t,e){return function(i,s,r,n,o,h){var u={type:i?"Block":"Line",value:s,start:r,end:n};t.locations&&(u.loc=new it(this,o,h)),t.ranges&&(u.range=[r,n]),e.push(u)}}var et=1,st=2,jt=4,me=8,qt=16,xe=32,Ct=64,ve=128,rt=256,dt=512,ye=1024,Et=et|st|rt;function Gt(t,e){return st|(t?jt:0)|(e?me:0)}var gt=0,Wt=1,Y=2,ge=3,be=4,Se=5,E=function(e,i,s){this.options=e=Vi(e),this.sourceFile=e.sourceFile,this.keywords=X(_i[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var r="";e.allowReserved!==!0&&(r=Ft[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module"&&(r+=" await")),this.reservedWords=X(r);var n=(r?r+" ":"")+Ft.strict;this.reservedWordsStrict=X(n),this.reservedWordsStrictBind=X(n+" "+Ft.strictBind),this.input=String(i),this.containsEsc=!1,this.pos=s||0,this.curLine=1,e.startLocation?(this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line):s?(this.lineStart=this.input.lastIndexOf(`
8
+ `,s-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(I).length)):this.lineStart=0,this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType==="module",this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?st:et),this.regexpState=null,this.privateNameStack=[]},R={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};E.prototype.parse=function(){var e=this,i=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(i)})};R.inFunction.get=function(){return(this.currentVarScope().flags&st)>0};R.inGenerator.get=function(){return(this.currentVarScope().flags&me)>0};R.inAsync.get=function(){return(this.currentVarScope().flags&jt)>0};R.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],i=e.flags;if(i&(rt|dt))return!1;if(i&st)return(i&jt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};R.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&et)};R.allowSuper.get=function(){var t=this.currentThisScope(),e=t.flags;return(e&Ct)>0||this.options.allowSuperOutsideMethod};R.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ve)>0};R.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};R.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],i=e.flags;if(i&(rt|dt)||i&st&&!(i&qt))return!0}return!1};R.allowUsing.get=function(){var t=this.currentScope(),e=t.flags;return!(e&ye||!this.inModule&&e&et)};R.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&rt)>0};E.extend=function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];for(var s=this,r=0;r<e.length;r++)s=e[r](s);return s};E.parse=function(e,i){return new this(i,e).parse()};E.parseExpressionAt=function(e,i,s){var r=new this(s,e,i);return r.nextToken(),r.parseExpression()};E.tokenizer=function(e,i){return new this(i,e)};Object.defineProperties(E.prototype,R);var P=E.prototype,Fi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;P.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){_.lastIndex=t,t+=_.exec(this.input)[0].length;var e=Fi.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){_.lastIndex=t+e[0].length;var i=_.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||I.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}t+=e[0].length,_.lastIndex=t,t+=_.exec(this.input)[0].length,this.input[t]===";"&&t++}};P.eat=function(t){return this.type===t?(this.next(),!0):!1};P.isContextual=function(t){return this.type===a.name&&this.value===t&&!this.containsEsc};P.eatContextual=function(t){return this.isContextual(t)?(this.next(),!0):!1};P.catchStackOverflow=function(t){try{return t()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,"Not enough stack space to parse input");else throw e}};P.expectContextual=function(t){this.eatContextual(t)||this.unexpected()};P.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||I.test(this.input.slice(this.lastTokEnd,this.start))};P.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};P.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};P.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0};P.expect=function(t){this.eat(t)||this.unexpected()};P.unexpected=function(t){this.raise(t??this.start,"Unexpected token")};var _t=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};P.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")}};P.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,s=t.doubleProto;if(!e)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};P.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};P.isSimpleAssignTarget=function(t){return t.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(t.expression):t.type==="Identifier"||t.type==="MemberExpression"};var d=E.prototype;d.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==a.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var s=0,r=Object.keys(this.undefinedExports);s<r.length;s+=1){var n=r[s];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(t,"Program")};var Ht={kind:"loop"},Ri={kind:"switch"};d.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;_.lastIndex=this.pos;var e=_.exec(this.input),i=this.pos+e[0].length,s=this.fullCharCodeAt(i);if(s===91||s===92)return!0;if(t)return!1;if(s===123)return!0;if(M(s)){var r=i;do i+=s<=65535?1:2;while(Z(s=this.fullCharCodeAt(i)));if(s===92)return!0;var n=this.input.slice(r,i);if(!pe.test(n))return!0}return!1};d.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;_.lastIndex=this.pos;var t=_.exec(this.input),e=this.pos+t[0].length,i;return!I.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!(Z(i=this.fullCharCodeAt(e+8))||i===92))};d.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;_.lastIndex=this.pos;var i=_.exec(this.input),s=this.pos+i[0].length;if(I.test(this.input.slice(this.pos,s)))return!1;if(t){var r=s+5,n;if(this.input.slice(s,r)!=="using"||r===this.input.length||Z(n=this.fullCharCodeAt(r))||n===92)return!1;_.lastIndex=r;var o=_.exec(this.input);if(s=r+o[0].length,o&&I.test(this.input.slice(r,s)))return!1}var h=this.fullCharCodeAt(s);if(!M(h)&&h!==92)return!1;var u=s;do s+=h<=65535?1:2;while(Z(h=this.fullCharCodeAt(s)));if(h===92)return!0;var c=this.input.slice(u,s);if(pe.test(c))return!1;if(e&&!t&&c==="of"){_.lastIndex=s;var p=_.exec(this.input);if(s=s+p[0].length,this.input.charCodeAt(s)!==61||(h=this.input.charCodeAt(s+1))===61||h===62)return!1}return!0};d.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)};d.isUsing=function(t){return this.isUsingKeyword(!1,t)};d.parseStatement=function(t,e,i){var s=this.type,r=this.startNode(),n;switch(this.isLet(t)&&(s=a._var,n="let"),s){case a._break:case a._continue:return this.parseBreakContinueStatement(r,s.keyword);case a._debugger:return this.parseDebuggerStatement(r);case a._do:return this.parseDoStatement(r);case a._for:return this.parseForStatement(r);case a._function:return t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!t);case a._class:return t&&this.unexpected(),this.parseClass(r,!0);case a._if:return this.parseIfStatement(r);case a._return:return this.parseReturnStatement(r);case a._switch:return this.parseSwitchStatement(r);case a._throw:return this.parseThrowStatement(r);case a._try:return this.parseTryStatement(r);case a._const:case a._var:return n=n||this.value,t&&n!=="var"&&this.unexpected(),this.parseVarStatement(r,n);case a._while:return this.parseWhileStatement(r);case a._with:return this.parseWithStatement(r);case a.braceL:return this.parseBlock(!0,r);case a.semi:return this.parseEmptyStatement(r);case a._export:case a._import:if(this.options.ecmaVersion>10&&s===a._import){_.lastIndex=this.pos;var o=_.exec(this.input),h=this.pos+o[0].length,u=this.input.charCodeAt(h);if(u===40||u===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===a._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!t);var c=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(c)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),t&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),c==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(r,!1,c),this.semicolon(),this.finishNode(r,"VariableDeclaration");var p=this.value,m=this.parseExpression();return s===a.name&&m.type==="Identifier"&&this.eat(a.colon)?this.parseLabeledStatement(r,p,m,t):this.parseExpressionStatement(r,m)}};d.parseBreakContinueStatement=function(t,e){var i=e==="break";this.next(),this.eat(a.semi)||this.insertSemicolon()?t.label=null:this.type!==a.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var r=this.labels[s];if((t.label==null||r.name===t.label.name)&&(r.kind!=null&&(i||r.kind==="loop")||t.label&&i))break}return s===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")};d.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")};d.parseDoStatement=function(t){return this.next(),this.labels.push(Ht),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(a._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(a.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")};d.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ht),this.enterScope(0),this.expect(a.parenL),this.type===a.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===a._var||this.type===a._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(t,s,e)}var n=this.isContextual("let"),o=!1,h=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(h){var u=this.startNode();return this.next(),h==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(u,!0,h),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(t,u,e)}var c=this.containsEsc,p=new _t,m=this.start,g=e>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);return this.type===a._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(e>-1?(this.type===a._in&&this.unexpected(e),t.await=!0):o&&this.options.ecmaVersion>=8&&(g.start===m&&!c&&g.type==="Identifier"&&g.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(t.await=!1)),n&&o&&this.raise(g.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(g,!1,p),this.checkLValPattern(g),this.parseForIn(t,g)):(this.checkExpressionErrors(p,!0),e>-1&&this.unexpected(e),this.parseFor(t,g))};d.parseForAfterInit=function(t,e,i){return(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&e.declarations.length===1?(this.type===a._in?((e.kind==="using"||e.kind==="await using")&&!e.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&i>-1&&this.unexpected(i)):this.options.ecmaVersion>=9&&(t.await=i>-1),this.parseForIn(t,e)):(i>-1&&this.unexpected(i),this.parseFor(t,e))};d.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,lt|(i?0:Bt),!1,e)};d.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(a._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")};d.parseReturnStatement=function(t){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(a.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")};d.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(a.braceL),this.labels.push(Ri),this.enterScope(ye);for(var e,i=!1;this.type!==a.braceR;)if(this.type===a._case||this.type===a._default){var s=this.type===a._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),s?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(a.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")};d.parseThrowStatement=function(t){return this.next(),I.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Oi=[];d.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e=t.type==="Identifier";return this.enterScope(e?xe:0),this.checkLValPattern(t,e?be:Y),this.expect(a.parenR),t};d.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===a._catch){var e=this.startNode();this.next(),this.eat(a.parenL)?e.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0)),e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(a._finally)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")};d.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")};d.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Ht),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};d.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")};d.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};d.parseLabeledStatement=function(t,e,i,s){for(var r=0,n=this.labels;r<n.length;r+=1){var o=n[r];o.name===e&&this.raise(i.start,"Label '"+e+"' is already declared")}for(var h=this.type.isLoop?"loop":this.type===a._switch?"switch":null,u=this.labels.length-1;u>=0;u--){var c=this.labels[u];if(c.statementStart===t.start)c.statementStart=this.start,c.kind=h;else break}return this.labels.push({name:e,kind:h,statementStart:this.start}),t.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")};d.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};d.parseBlock=function(t,e,i){for(t===void 0&&(t=!0),e===void 0&&(e=this.startNode()),e.body=[],this.expect(a.braceL),t&&this.enterScope(0);this.type!==a.braceR;){var s=this.parseStatement(null);e.body.push(s)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")};d.parseFor=function(t,e){return t.init=e,this.expect(a.semi),t.test=this.type===a.semi?null:this.parseExpression(),this.expect(a.semi),t.update=this.type===a.parenR?null:this.parseExpression(),this.expect(a.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")};d.parseForIn=function(t,e){var i=this.type===a._in;return this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(a.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")};d.parseVar=function(t,e,i,s){for(t.declarations=[],t.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(a.eq)?r.init=this.parseMaybeAssign(e):!s&&i==="const"&&!(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&(i==="using"||i==="await using")&&this.options.ecmaVersion>=17&&this.type!==a._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):!s&&r.id.type!=="Identifier"&&!(e&&(this.type===a._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,t.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(a.comma))break}return t};d.parseVarId=function(t,e){t.id=e==="using"||e==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?Wt:Y,!1)};var lt=1,Bt=2,ke=4;d.parseFunction=function(t,e,i,s,r){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===a.star&&e&Bt&&this.unexpected(),t.generator=this.eat(a.star)),this.options.ecmaVersion>=8&&(t.async=!!s),e&lt&&(t.id=e&ke&&this.type!==a.name?null:this.parseIdent(),t.id&&!(e&Bt)&&this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?Wt:Y:ge));var n=this.yieldPos,o=this.awaitPos,h=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gt(t.async,t.generator)),e&lt||(t.id=this.type===a.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,r),this.yieldPos=n,this.awaitPos=o,this.awaitIdentPos=h,this.finishNode(t,e&lt?"FunctionDeclaration":"FunctionExpression")};d.parseFunctionParams=function(t){this.expect(a.parenL),t.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};d.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(a.braceL);this.type!==a.braceR;){var o=this.parseClassElement(t.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(n&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),n=!0):o.key&&o.key.type==="PrivateIdentifier"&&Di(s,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),t.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")};d.parseClassElement=function(t){if(this.eat(a.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,o="method",h=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===a.star?h=!0:s="static"}if(i.static=h,!s&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(e>=9||!n)&&this.eat(a.star)&&(r=!0),!s&&!n&&!r){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:s=u)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),e<13||this.type===a.parenL||o!=="method"||r||n){var c=!i.static&&bt(i,"constructor"),p=c&&t;c&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=c?"constructor":o,this.parseClassMethod(i,r,n,p)}else this.parseClassField(i);return i};d.isClassElementNameStart=function(){return this.type===a.name||this.type===a.privateId||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword};d.parseClassElementName=function(t){this.type===a.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};d.parseClassMethod=function(t,e,i,s){var r=t.key;t.kind==="constructor"?(e&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):t.static&&bt(t,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var n=t.value=this.parseMethod(e,i,s);return t.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),t.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),t.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(t,"MethodDefinition")};d.parseClassField=function(t){return bt(t,"constructor")?this.raise(t.key.start,"Classes can't have a field named 'constructor'"):t.static&&bt(t,"prototype")&&this.raise(t.key.start,"Classes can't have a static field named 'prototype'"),this.eat(a.eq)?(this.enterScope(dt|Ct),t.value=this.parseMaybeAssign(),this.exitScope()):t.value=null,this.semicolon(),this.finishNode(t,"PropertyDefinition")};d.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;for(this.labels=[],this.enterScope(rt|Ct);this.type!==a.braceR;){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")};d.parseClassId=function(t,e){this.type===a.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,Y,!1)):(e===!0&&this.unexpected(),t.id=null)};d.parseClassSuper=function(t){t.superClass=this.eat(a._extends)?this.parseExprSubscripts(null,!1):null};d.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared};d.exitClassBody=function(){var t=this.privateNameStack.pop(),e=t.declared,i=t.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1],n=0;n<i.length;++n){var o=i[n];ot(e,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function Di(t,e){var i=e.key.name,s=t[i],r="true";return e.type==="MethodDefinition"&&(e.kind==="get"||e.kind==="set")&&(r=(e.static?"s":"i")+e.kind),s==="iget"&&r==="iset"||s==="iset"&&r==="iget"||s==="sget"&&r==="sset"||s==="sset"&&r==="sget"?(t[i]="true",!1):s?!0:(t[i]=r,!1)}function bt(t,e){var i=t.computed,s=t.key;return!i&&(s.type==="Identifier"&&s.name===e||s.type==="Literal"&&s.value===e)}d.parseExportAllDeclaration=function(t,e){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==a.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration")};d.parseExport=function(t,e){if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(t,e);if(this.eat(a._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())t.declaration=this.parseExportDeclaration(t),t.declaration.type==="VariableDeclaration"?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id,t.declaration.id.start),t.specifiers=[],t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[]);else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==a.string&&this.unexpected(),t.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause());else{for(var i=0,s=t.specifiers;i<s.length;i+=1){var r=s[i];this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal"&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}t.source=null,this.options.ecmaVersion>=16&&(t.attributes=[])}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")};d.parseExportDeclaration=function(t){return this.parseStatement(null)};d.parseExportDefaultDeclaration=function(){var t;if(this.type===a._function||(t=this.isAsyncFunction())){var e=this.startNode();return this.next(),t&&this.next(),this.parseFunction(e,lt|ke,!1,t)}else if(this.type===a._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else{var s=this.parseMaybeAssign();return this.semicolon(),s}};d.checkExport=function(t,e,i){t&&(typeof e!="string"&&(e=e.type==="Identifier"?e.name:e.value),ot(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)};d.checkPatternExport=function(t,e){var i=e.type;if(i==="Identifier")this.checkExport(t,e,e.start);else if(i==="ObjectPattern")for(var s=0,r=e.properties;s<r.length;s+=1){var n=r[s];this.checkPatternExport(t,n)}else if(i==="ArrayPattern")for(var o=0,h=e.elements;o<h.length;o+=1){var u=h[o];u&&this.checkPatternExport(t,u)}else i==="Property"?this.checkPatternExport(t,e.value):i==="AssignmentPattern"?this.checkPatternExport(t,e.left):i==="RestElement"&&this.checkPatternExport(t,e.argument)};d.checkVariableExport=function(t,e){if(t)for(var i=0,s=e;i<s.length;i+=1){var r=s[i];this.checkPatternExport(t,r.id)}};d.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};d.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")};d.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(a.braceL);!this.eat(a.braceR);){if(i)i=!1;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;e.push(this.parseExportSpecifier(t))}return e};d.parseImport=function(t){return this.next(),this.type===a.string?(t.specifiers=Oi,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===a.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")};d.parseImportSpecifier=function(){var t=this.startNode();return t.imported=this.parseModuleExportName(),this.eatContextual("as")?t.local=this.parseIdent():(this.checkUnreserved(t.imported),t.local=t.imported),this.checkLValSimple(t.local,Y),this.finishNode(t,"ImportSpecifier")};d.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,Y),this.finishNode(t,"ImportDefaultSpecifier")};d.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,Y),this.finishNode(t,"ImportNamespaceSpecifier")};d.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===a.name&&(t.push(this.parseImportDefaultSpecifier()),!this.eat(a.comma)))return t;if(this.type===a.star)return t.push(this.parseImportNamespaceSpecifier()),t;for(this.expect(a.braceL);!this.eat(a.braceR);){if(e)e=!1;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;t.push(this.parseImportSpecifier())}return t};d.parseWithClause=function(){var t=[];if(!this.eat(a._with))return t;this.expect(a.braceL);for(var e={},i=!0;!this.eat(a.braceR);){if(i)i=!1;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;var s=this.parseImportAttribute(),r=s.key.type==="Identifier"?s.key.name:s.key.value;ot(e,r)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+r+"'"),e[r]=!0,t.push(s)}return t};d.parseImportAttribute=function(){var t=this.startNode();return t.key=this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(a.colon),this.type!==a.string&&this.unexpected(),t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")};d.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===a.string){var t=this.parseLiteral(this.value);return Li.test(t.value)&&this.raise(t.start,"An export name cannot include a lone surrogate."),t}return this.parseIdent(!0)};d.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)};d.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var O=E.prototype;O.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&t.name==="await"&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];this.toAssignable(n,e),n.type==="RestElement"&&(n.argument.type==="ArrayPattern"||n.argument.type==="ObjectPattern")&&this.raise(n.argument.start,"Unexpected token")}break;case"Property":t.kind!=="init"&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern"&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":t.operator!=="="&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t};O.toAssignableList=function(t,e){for(var i=t.length,s=0;s<i;s++){var r=t[s];r&&this.toAssignable(r,e)}if(i){var n=t[i-1];this.options.ecmaVersion===6&&e&&n&&n.type==="RestElement"&&n.argument.type!=="Identifier"&&this.unexpected(n.argument.start)}return t};O.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")};O.parseRestBinding=function(){var t=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==a.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")};O.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case a.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(a.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case a.braceL:return this.parseObj(!0)}return this.parseIdent()};O.parseBindingList=function(t,e,i,s){for(var r=[],n=!0;!this.eat(t);)if(n?n=!1:this.expect(a.comma),e&&this.type===a.comma)r.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===a.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),r.push(o),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}else r.push(this.parseAssignableListItem(s))}return r};O.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e};O.parseBindingListItem=function(t){return t};O.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(a.eq))return i;var s=this.startNodeAt(t,e);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")};O.checkLValSimple=function(t,e,i){e===void 0&&(e=gt);var s=e!==gt;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(s?"Binding ":"Assigning to ")+t.name+" in strict mode"),s&&(e===Y&&t.name==="let"&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(ot(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),e!==Se&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(s?"Binding":"Assigning to")+" rvalue")}};O.checkLValPattern=function(t,e,i){switch(e===void 0&&(e=gt),t.type){case"ObjectPattern":for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];this.checkLValInnerPattern(n,e,i)}break;case"ArrayPattern":for(var o=0,h=t.elements;o<h.length;o+=1){var u=h[o];u&&this.checkLValInnerPattern(u,e,i)}break;default:this.checkLValSimple(t,e,i)}};O.checkLValInnerPattern=function(t,e,i){switch(e===void 0&&(e=gt),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var B=function(e,i,s,r,n){this.token=e,this.isExpr=!!i,this.preserveSpace=!!s,this.override=r,this.generator=!!n},C={b_stat:new B("{",!1),b_expr:new B("{",!0),b_tmpl:new B("${",!1),p_stat:new B("(",!1),p_expr:new B("(",!0),q_tmpl:new B("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new B("function",!1),f_expr:new B("function",!0),f_expr_gen:new B("function",!0,!1,null,!0),f_gen:new B("function",!1,!1,null,!0)},ht=E.prototype;ht.initialContext=function(){return[C.b_stat]};ht.curContext=function(){return this.context[this.context.length-1]};ht.braceIsBlock=function(t){var e=this.curContext();return e===C.f_expr||e===C.f_stat?!0:t===a.colon&&(e===C.b_stat||e===C.b_expr)?!e.isExpr:t===a._return||t===a.name&&this.exprAllowed?I.test(this.input.slice(this.lastTokEnd,this.start)):t===a._else||t===a.semi||t===a.eof||t===a.parenR||t===a.arrow?!0:t===a.braceL?e===C.b_stat:t===a._var||t===a._const||t===a.name?!1:!this.exprAllowed};ht.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if(e.token==="function")return e.generator}return!1};ht.updateContext=function(t){var e,i=this.type;i.keyword&&t===a.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr};ht.overrideContext=function(t){this.curContext()!==t&&(this.context[this.context.length-1]=t)};a.parenR.updateContext=a.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var t=this.context.pop();t===C.b_stat&&this.curContext().token==="function"&&(t=this.context.pop()),this.exprAllowed=!t.isExpr};a.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?C.b_stat:C.b_expr),this.exprAllowed=!0};a.dollarBraceL.updateContext=function(){this.context.push(C.b_tmpl),this.exprAllowed=!0};a.parenL.updateContext=function(t){var e=t===a._if||t===a._for||t===a._with||t===a._while;this.context.push(e?C.p_stat:C.p_expr),this.exprAllowed=!0};a.incDec.updateContext=function(){};a._function.updateContext=a._class.updateContext=function(t){t.beforeExpr&&t!==a._else&&!(t===a.semi&&this.curContext()!==C.p_stat)&&!(t===a._return&&I.test(this.input.slice(this.lastTokEnd,this.start)))&&!((t===a.colon||t===a.braceL)&&this.curContext()===C.b_stat)?this.context.push(C.f_expr):this.context.push(C.f_stat),this.exprAllowed=!1};a.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};a.backQuote.updateContext=function(){this.curContext()===C.q_tmpl?this.context.pop():this.context.push(C.q_tmpl),this.exprAllowed=!1};a.star.updateContext=function(t){if(t===a._function){var e=this.context.length-1;this.context[e]===C.f_expr?this.context[e]=C.f_expr_gen:this.context[e]=C.f_gen}this.exprAllowed=!0};a.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==a.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var x=E.prototype;x.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&t.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var s=t.key,r;switch(s.type){case"Identifier":r=s.name;break;case"Literal":r=String(s.value);break;default:return}var n=t.kind;if(this.options.ecmaVersion>=6){r==="__proto__"&&n==="init"&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),e.proto=!0);return}r="$"+r;var o=e[r];if(o){var h;n==="init"?h=this.strict&&o.init||o.get||o.set:h=o.init||o[n],h&&this.raiseRecoverable(s.start,"Redefinition of property")}else o=e[r]={init:!1,get:!1,set:!1};o[n]=!0}};x.parseExpression=function(t,e){var i=this;return this.catchStackOverflow(function(){var s=i.start,r=i.startLoc,n=i.parseMaybeAssign(t,e);if(i.type===a.comma){var o=i.startNodeAt(s,r);for(o.expressions=[n];i.eat(a.comma);)o.expressions.push(i.parseMaybeAssign(t,e));return i.finishNode(o,"SequenceExpression")}return n})};x.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var s=!1,r=-1,n=-1,o=-1;e?(r=e.parenthesizedAssign,n=e.trailingComma,o=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1):(e=new _t,s=!0);var h=this.start,u=this.startLoc;(this.type===a.parenL||this.type===a.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await");var c=this.parseMaybeConditional(t,e);if(i&&(c=i.call(this,c,h,u)),this.type.isAssign){var p=this.startNodeAt(h,u);return p.operator=this.value,this.type===a.eq&&(c=this.toAssignable(c,!1,e)),s||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=c.start&&(e.shorthandAssign=-1),this.type===a.eq?this.checkLValPattern(c):this.checkLValSimple(c),p.left=c,this.next(),p.right=this.parseMaybeAssign(t),o>-1&&(e.doubleProto=o),this.finishNode(p,"AssignmentExpression")}else s&&this.checkExpressionErrors(e,!0);return r>-1&&(e.parenthesizedAssign=r),n>-1&&(e.trailingComma=n),c};x.parseMaybeConditional=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(!(r.type==="ArrowFunctionExpression"&&r.start===i)&&this.eat(a.question)){var n=this.startNodeAt(i,s);return n.test=r,n.consequent=this.parseMaybeAssign(),this.expect(a.colon),n.alternate=this.parseMaybeAssign(t),this.finishNode(n,"ConditionalExpression")}return r};x.parseExprOps=function(t,e){var i=this.start,s=this.startLoc,r=this.parseMaybeUnary(e,!1,!1,t);return this.checkExpressionErrors(e)||r.start===i&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,i,s,-1,t)};x.parseExprOp=function(t,e,i,s,r){var n=this.type.binop;if(n!=null&&(!r||this.type!==a._in)&&n>s){var o=this.type===a.logicalOR||this.type===a.logicalAND,h=this.type===a.coalesce;h&&(n=a.logicalAND.binop);var u=this.value;this.next();var c=this.start,p=this.startLoc,m=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),c,p,n,r),g=this.buildBinary(e,i,t,m,u,o||h);return(o&&this.type===a.coalesce||h&&(this.type===a.logicalOR||this.type===a.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(g,e,i,s,r)}return t};x.buildBinary=function(t,e,i,s,r,n){s.type==="PrivateIdentifier"&&this.raise(s.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(t,e);return o.left=i,o.operator=r,o.right=s,this.finishNode(o,n?"LogicalExpression":"BinaryExpression")};x.parseMaybeUnary=function(t,e,i,s){var r=this.start,n=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(s),e=!0;else if(this.type.prefix){var h=this.startNode(),u=this.type===a.incDec;h.operator=this.value,h.prefix=!0,this.next(),h.argument=this.parseMaybeUnary(null,!0,u,s),this.checkExpressionErrors(t,!0),u?this.checkLValSimple(h.argument):this.strict&&h.operator==="delete"&&we(h.argument)?this.raiseRecoverable(h.start,"Deleting local variable in strict mode"):h.operator==="delete"&&Mt(h.argument)?this.raiseRecoverable(h.start,"Private fields can not be deleted"):e=!0,o=this.finishNode(h,u?"UpdateExpression":"UnaryExpression")}else if(!e&&this.type===a.privateId)(s||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==a._in&&this.unexpected();else{if(o=this.parseExprSubscripts(t,s),this.checkExpressionErrors(t))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(r,n);c.operator=this.value,c.prefix=!1,c.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(c,"UpdateExpression")}}if(!i&&!(o.type==="ArrowFunctionExpression"&&o.start===r)&&this.eat(a.starstar))if(e)this.unexpected(this.lastTokStart);else return this.buildBinary(r,n,o,this.parseMaybeUnary(null,!1,!1,s),"**",!1);else return o};function we(t){return t.type==="Identifier"||t.type==="ParenthesizedExpression"&&we(t.expression)}function Mt(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&Mt(t.expression)||t.type==="ParenthesizedExpression"&&Mt(t.expression)}x.parseExprSubscripts=function(t,e){var i=this.start,s=this.startLoc,r=this.parseExprAtom(t,e);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;var n=this.parseSubscripts(r,i,s,!1,e);return t&&n.type==="MemberExpression"&&(t.parenthesizedAssign>=n.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=n.start&&(t.parenthesizedBind=-1),t.trailingComma>=n.start&&(t.trailingComma=-1)),n};x.parseSubscripts=function(t,e,i,s,r){for(var n=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,o=!1;;){var h=this.parseSubscript(t,e,i,s,n,o,r);if(h.optional&&(o=!0),h===t||h.type==="ArrowFunctionExpression"){if(o){var u=this.startNodeAt(e,i);u.expression=h,h=this.finishNode(u,"ChainExpression")}return h}t=h}};x.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(a.arrow)};x.parseSubscriptAsyncArrow=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,s)};x.parseSubscript=function(t,e,i,s,r,n,o){var h=this.options.ecmaVersion>=11,u=h&&this.eat(a.questionDot);s&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(a.bracketL);if(c||u&&this.type!==a.parenL&&this.type!==a.backQuote||this.eat(a.dot)){var p=this.startNodeAt(e,i);p.object=t,c?(p.property=this.parseExpression(),this.expect(a.bracketR)):this.type===a.privateId&&t.type!=="Super"?p.property=this.parsePrivateIdent():p.property=this.parseIdent(this.options.allowReserved!=="never"),p.computed=!!c,h&&(p.optional=u),t=this.finishNode(p,"MemberExpression")}else if(!s&&this.eat(a.parenL)){var m=new _t,g=this.yieldPos,k=this.awaitPos,L=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var W=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1,m);if(r&&!u&&this.shouldParseAsyncArrow())return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=g,this.awaitPos=k,this.awaitIdentPos=L,this.parseSubscriptAsyncArrow(e,i,W,o);this.checkExpressionErrors(m,!0),this.yieldPos=g||this.yieldPos,this.awaitPos=k||this.awaitPos,this.awaitIdentPos=L||this.awaitIdentPos;var H=this.startNodeAt(e,i);H.callee=t,H.arguments=W,h&&(H.optional=u),t=this.finishNode(H,"CallExpression")}else if(this.type===a.backQuote){(u||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var D=this.startNodeAt(e,i);D.tag=t,D.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(D,"TaggedTemplateExpression")}return t};x.parseExprAtom=function(t,e,i){this.type===a.slash&&this.readRegexp();var s,r=this.potentialArrowAt===this.start;switch(this.type){case a._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type===a.parenL&&!this.allowDirectSuper&&this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==a.dot&&this.type!==a.bracketL&&this.type!==a.parenL&&this.unexpected(),this.finishNode(s,"Super");case a._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case a.name:var n=this.start,o=this.startLoc,h=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!h&&u.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(C.f_expr),this.parseFunction(this.startNodeAt(n,o),0,!1,!0,e);if(r&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(n,o),[u],!1,e);if(this.options.ecmaVersion>=8&&u.name==="async"&&this.type===a.name&&!h&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return u=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(a.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,o),[u],!0,e)}return u;case a.regexp:var c=this.value;return s=this.parseLiteral(c.value),s.regex={pattern:c.pattern,flags:c.flags},s;case a.num:case a.string:return this.parseLiteral(this.value);case a._null:case a._true:case a._false:return s=this.startNode(),s.value=this.type===a._null?null:this.type===a._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case a.parenL:var p=this.start,m=this.parseParenAndDistinguishExpression(r,e);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(m)&&(t.parenthesizedAssign=p),t.parenthesizedBind<0&&(t.parenthesizedBind=p)),m;case a.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(a.bracketR,!0,!0,t),this.finishNode(s,"ArrayExpression");case a.braceL:return this.overrideContext(C.b_expr),this.parseObj(!1,t);case a._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case a._class:return this.parseClass(this.startNode(),!1);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};x.parseExprAtomDefault=function(){this.unexpected()};x.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===a.parenL&&!t)return this.parseDynamicImport(e);if(this.type===a.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}else this.unexpected()};x.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(a.parenR)?t.options=null:(this.expect(a.comma),this.afterTrailingComma(a.parenR)?t.options=null:(t.options=this.parseMaybeAssign(),this.eat(a.parenR)||(this.expect(a.comma),this.afterTrailingComma(a.parenR)||this.unexpected())));else if(!this.eat(a.parenR)){var e=this.start;this.eat(a.comma)&&this.eat(a.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")};x.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="meta"&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")};x.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110&&(e.bigint=e.value!=null?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")};x.parseParenExpression=function(){this.expect(a.parenL);var t=this.parseExpression();return this.expect(a.parenR),t};x.shouldParseArrow=function(t){return!this.canInsertSemicolon()};x.parseParenAndDistinguishExpression=function(t,e){var i=this.start,s=this.startLoc,r,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,h=this.startLoc,u=[],c=!0,p=!1,m=new _t,g=this.yieldPos,k=this.awaitPos,L;for(this.yieldPos=0,this.awaitPos=0;this.type!==a.parenR;)if(c?c=!1:this.expect(a.comma),n&&this.afterTrailingComma(a.parenR,!0)){p=!0;break}else if(this.type===a.ellipsis){L=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else u.push(this.parseMaybeAssign(!1,m,this.parseParenItem));var W=this.lastTokEnd,H=this.lastTokEndLoc;if(this.expect(a.parenR),t&&this.shouldParseArrow(u)&&this.eat(a.arrow))return this.checkPatternErrors(m,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=g,this.awaitPos=k,this.parseParenArrowList(i,s,u,e);(!u.length||p)&&this.unexpected(this.lastTokStart),L&&this.unexpected(L),this.checkExpressionErrors(m,!0),this.yieldPos=g||this.yieldPos,this.awaitPos=k||this.awaitPos,u.length>1?(r=this.startNodeAt(o,h),r.expressions=u,this.finishNodeAt(r,"SequenceExpression",W,H)):r=u[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var D=this.startNodeAt(i,s);return D.expression=r,this.finishNode(D,"ParenthesizedExpression")}else return r};x.parseParenItem=function(t){return t};x.parseParenArrowList=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,s)};var Bi=[];x.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===a.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;return t.property=this.parseIdent(!0),t.property.name!=="target"&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block"),this.finishNode(t,"MetaProperty")}var s=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),t.callee.type==="Super"&&this.raiseRecoverable(s,"Invalid use of 'super'"),this.eat(a.parenL)?t.arguments=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1):t.arguments=Bi,this.finishNode(t,"NewExpression")};x.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===a.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,`
9
+ `),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
10
+ `),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};x.parseTemplate=function(t){t===void 0&&(t={});var e=t.isTagged;e===void 0&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:e});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")};x.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!I.test(this.input.slice(this.lastTokEnd,this.start))};x.parseObj=function(t,e){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(t,e);t||this.checkPropClash(n,r,e),i.properties.push(n)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")};x.parseProperty=function(t,e){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return t?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,e),this.type===a.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(t||e)&&(n=this.start,o=this.startLoc),t||(s=this.eat(a.star)));var h=this.containsEsc;return this.parsePropertyName(i),!t&&!h&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,t,s,r,n,o,e,h),this.finishNode(i,"Property")};x.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var i=t.kind==="get"?0:1;if(t.value.params.length!==i){var s=t.value.start;t.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else t.kind==="set"&&t.value.params[0].type==="RestElement"&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")};x.parsePropertyValue=function(t,e,i,s,r,n,o,h){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),t.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(e&&this.unexpected(),t.method=!0,t.value=this.parseMethod(i,s),t.kind="init"):!e&&!h&&this.options.ecmaVersion>=5&&!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(t)):this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(t.key),t.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e?t.value=this.parseMaybeDefault(r,n,this.copyNode(t.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,n,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.kind="init",t.shorthand=!0):this.unexpected()};x.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(a.bracketR),t.key;t.computed=!1}return t.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};x.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};x.parseMethod=function(t,e,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=t),this.options.ecmaVersion>=8&&(s.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gt(e,s.generator)|Ct|(i?ve:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};x.parseArrowExpression=function(t,e,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Gt(i,!1)|qt),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(t,"ArrowFunctionExpression")};x.parseFunctionBody=function(t,e,i,s){var r=e&&this.type!==a.braceL,n=this.strict,o=!1;if(r)t.body=this.parseMaybeAssign(s),t.expression=!0,this.checkParams(t,!1);else{var h=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);(!n||h)&&(o=this.strictDirective(this.end),o&&h&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var u=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(t,!n&&!o&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,Se),t.body=this.parseBlock(!1,void 0,o&&!n),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=u}this.exitScope()};x.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1){var s=i[e];if(s.type!=="Identifier")return!1}return!0};x.checkParams=function(t,e){for(var i=Object.create(null),s=0,r=t.params;s<r.length;s+=1){var n=r[s];this.checkLValInnerPattern(n,Wt,e?null:i)}};x.parseExprList=function(t,e,i,s){for(var r=[],n=!0;!this.eat(t);){if(n)n=!1;else if(this.expect(a.comma),e&&this.afterTrailingComma(t))break;var o=void 0;i&&this.type===a.comma?o=null:this.type===a.ellipsis?(o=this.parseSpread(s),s&&this.type===a.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):o=this.parseMaybeAssign(!1,s),r.push(o)}return r};x.checkUnreserved=function(t){var e=t.start,i=t.end,s=t.name;if(this.inGenerator&&s==="yield"&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&s==="await"&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Et)&&s==="arguments"&&this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(s==="arguments"||s==="await")&&this.raise(e,"Cannot use "+s+" in class static initialization block"),this.keywords.test(s)&&this.raise(e,"Unexpected keyword '"+s+"'"),!(this.options.ecmaVersion<6&&this.input.slice(e,i).indexOf("\\")!==-1)){var r=this.strict?this.reservedWordsStrict:this.reservedWords;r.test(s)&&(!this.inAsync&&s==="await"&&this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+s+"' is reserved"))}};x.parseIdent=function(t){var e=this.parseIdentNode();return this.next(!!t),this.finishNode(e,"Identifier"),t||(this.checkUnreserved(e),e.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=e.start)),e};x.parseIdentNode=function(){var t=this.startNode();return this.type===a.name?t.name=this.value:this.type.keyword?(t.name=this.type.keyword,(t.name==="class"||t.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=a.name):this.unexpected(),t};x.parsePrivateIdent=function(){var t=this.startNode();return this.type===a.privateId?t.name=this.value:this.unexpected(),this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(t)),t};x.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===a.semi||this.canInsertSemicolon()||this.type!==a.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(a.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")};x.parseAwait=function(t){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var St=E.prototype;St.raise=function(t,e){var i=ut(this.input,t);e+=" ("+i.line+":"+i.column+")",this.sourceFile&&(e+=" in "+this.sourceFile);var s=new SyntaxError(e);throw s.pos=t,s.loc=i,s.raisedAt=this.pos,s};St.raiseRecoverable=St.raise;St.curPosition=function(){if(this.options.locations)return new ft(this.curLine,this.pos-this.lineStart)};var J=E.prototype,Mi=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};J.enterScope=function(t){this.scopeStack.push(new Mi(t))};J.exitScope=function(){this.scopeStack.pop()};J.treatFunctionsAsVarInScope=function(t){return t.flags&st||!this.inModule&&t.flags&et};J.declareName=function(t,e,i){var s=!1;if(e===Y){var r=this.currentScope();s=r.lexical.indexOf(t)>-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&r.flags&et&&delete this.undefinedExports[t]}else if(e===be){var n=this.currentScope();n.lexical.push(t)}else if(e===ge){var o=this.currentScope();this.treatFunctionsAsVar?s=o.lexical.indexOf(t)>-1:s=o.lexical.indexOf(t)>-1||o.var.indexOf(t)>-1,o.functions.push(t)}else for(var h=this.scopeStack.length-1;h>=0;--h){var u=this.scopeStack[h];if(u.lexical.indexOf(t)>-1&&!(u.flags&xe&&u.lexical[0]===t)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(t)>-1){s=!0;break}if(u.var.push(t),this.inModule&&u.flags&et&&delete this.undefinedExports[t],u.flags&Et)break}s&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")};J.checkLocalExport=function(t){this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1&&(this.undefinedExports[t.name]=t)};J.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};J.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(Et|dt|rt))return e}};J.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(Et|dt|rt)&&!(e.flags&qt))return e}};var $=function(e,i,s){this.type="",this.start=i,this.end=0,e.options.locations&&(this.loc=new it(e,s)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[i,0])},mt=E.prototype;mt.startNode=function(){return new $(this,this.start,this.startLoc)};mt.startNodeAt=function(t,e){return new $(this,t,e)};function Ce(t,e,i,s){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=s),this.options.ranges&&(t.range[1]=i),t}mt.finishNode=function(t,e){return Ce.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};mt.finishNodeAt=function(t,e,i,s){return Ce.call(this,t,e,i,s)};mt.copyNode=function(t){var e=new $(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var Ui="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Ee="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",_e=Ee+" Extended_Pictographic",Ae=_e,Ie=Ae+" EBase EComp EMod EPres ExtPict",Pe=Ie,ji=Pe,qi={9:Ee,10:_e,11:Ae,12:Ie,13:Pe,14:ji},Gi="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Wi={9:"",10:"",11:"",12:"",13:"",14:Gi},oe="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Ne="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Le=Ne+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ve=Le+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Te=Ve+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Fe=Te+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Hi=Fe+" "+Ui,Ki={9:Ne,10:Le,11:Ve,12:Te,13:Fe,14:Hi},Re={};function zi(t){var e=Re[t]={binary:X(qi[t]+" "+oe),binaryOfStrings:X(Wi[t]),nonBinary:{General_Category:X(oe),Script:X(Ki[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}for(yt=0,Ot=[9,10,11,12,13,14];yt<Ot.length;yt+=1)ue=Ot[yt],zi(ue);var ue,yt,Ot,f=E.prototype,kt=function(e,i){this.parent=e,this.base=i||this};kt.prototype.separatedFrom=function(e){for(var i=this;i;i=i.parent)for(var s=e;s;s=s.parent)if(i.base===s.base&&i!==s)return!0;return!1};kt.prototype.sibling=function(){return new kt(this.parent,this.base)};var j=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Re[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};j.prototype.reset=function(e,i,s){var r=s.indexOf("v")!==-1,n=s.indexOf("u")!==-1;this.start=e|0,this.source=i+"",this.flags=s,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};j.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};j.prototype.at=function(e,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(e>=r)return-1;var n=s.charCodeAt(e);if(!(i||this.switchU)||n<=55295||n>=57344||e+1>=r)return n;var o=s.charCodeAt(e+1);return o>=56320&&o<=57343?(n<<10)+o-56613888:n};j.prototype.nextIndex=function(e,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(e>=r)return r;var n=s.charCodeAt(e),o;return!(i||this.switchU)||n<=55295||n>=57344||e+1>=r||(o=s.charCodeAt(e+1))<56320||o>57343?e+1:e+2};j.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)};j.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)};j.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)};j.prototype.eat=function(e,i){return i===void 0&&(i=!1),this.current(i)===e?(this.advance(i),!0):!1};j.prototype.eatChars=function(e,i){i===void 0&&(i=!1);for(var s=this.pos,r=0,n=e;r<n.length;r+=1){var o=n[r],h=this.at(s,i);if(h===-1||h!==o)return!1;s=this.nextIndex(s,i)}return this.pos=s,!0};f.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,s=!1,r=!1,n=0;n<i.length;n++){var o=i.charAt(n);e.indexOf(o)===-1&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(o,n+1)>-1&&this.raise(t.start,"Duplicate regular expression flag"),o==="u"&&(s=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(t.start,"Invalid regular expression flag")};function Qi(t){for(var e in t)return!0;return!1}f.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&Qi(t.groupNames)&&(t.switchN=!0,this.regexp_pattern(t))};f.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames=Object.create(null),t.backReferenceNames.length=0,t.branchID=null,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1){var s=i[e];t.groupNames[s]||t.raise("Invalid named capture referenced")}};f.regexp_disjunction=function(t){var e=this.options.ecmaVersion>=16;for(e&&(t.branchID=new kt(t.branchID,null)),this.regexp_alternative(t);t.eat(124);)e&&(t.branchID=t.branchID.sibling()),this.regexp_alternative(t);e&&(t.branchID=t.branchID.parent),this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")};f.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););};f.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))?(this.regexp_eatQuantifier(t),!0):!1};f.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1};f.regexp_eatQuantifier=function(t,e){return e===void 0&&(e=!1),this.regexp_eatQuantifierPrefix(t,e)?(t.eat(63),!0):!1};f.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)};f.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(t)&&(s=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue),t.eat(125)))return r!==-1&&r<s&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1};f.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)};f.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1};f.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(t),s=t.eat(45);if(i||s){for(var r=0;r<i.length;r++){var n=i.charAt(r);i.indexOf(n,r+1)>-1&&t.raise("Duplicate regular expression modifiers")}if(s){var o=this.regexp_eatModifiers(t);!i&&!o&&t.current()===58&&t.raise("Invalid regular expression modifiers");for(var h=0;h<o.length;h++){var u=o.charAt(h);(o.indexOf(u,h+1)>-1||i.indexOf(u)>-1)&&t.raise("Duplicate regular expression modifiers")}}}}if(t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}}t.pos=e}return!1};f.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):t.current()===63&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1};f.regexp_eatModifiers=function(t){for(var e="",i=0;(i=t.current())!==-1&&Yi(i);)e+=z(i),t.advance();return e};function Yi(t){return t===105||t===109||t===115}f.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)};f.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1};f.regexp_eatSyntaxCharacter=function(t){var e=t.current();return Oe(e)?(t.lastIntValue=e,t.advance(),!0):!1};function Oe(t){return t===36||t>=40&&t<=43||t===46||t===63||t>=91&&t<=94||t>=123&&t<=125}f.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;(i=t.current())!==-1&&!Oe(i);)t.advance();return t.pos!==e};f.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return e!==-1&&e!==36&&!(e>=40&&e<=43)&&e!==46&&e!==63&&e!==91&&e!==94&&e!==124?(t.advance(),!0):!1};f.regexp_groupSpecifier=function(t){if(t.eat(63)){this.regexp_eatGroupName(t)||t.raise("Invalid group");var e=this.options.ecmaVersion>=16,i=t.groupNames[t.lastStringValue];if(i)if(e)for(var s=0,r=i;s<r.length;s+=1){var n=r[s];n.separatedFrom(t.branchID)||t.raise("Duplicate capture group name")}else t.raise("Duplicate capture group name");e?(i||(t.groupNames[t.lastStringValue]=[])).push(t.branchID):t.groupNames[t.lastStringValue]=!0}};f.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1};f.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=z(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=z(t.lastIntValue);return!0}return!1};f.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),Xi(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)};function Xi(t){return M(t,!0)||t===36||t===95}f.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),Zi(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)};function Zi(t){return Z(t,!0)||t===36||t===95||t===8204||t===8205}f.regexp_eatAtomEscape=function(t){return this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t)?!0:(t.switchU&&(t.current()===99&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)};f.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1};f.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1};f.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)};f.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1};f.regexp_eatZero=function(t){return t.current()===48&&!At(t.lookahead())?(t.lastIntValue=0,t.advance(),!0):!1};f.regexp_eatControlEscape=function(t){var e=t.current();return e===116?(t.lastIntValue=9,t.advance(),!0):e===110?(t.lastIntValue=10,t.advance(),!0):e===118?(t.lastIntValue=11,t.advance(),!0):e===102?(t.lastIntValue=12,t.advance(),!0):e===114?(t.lastIntValue=13,t.advance(),!0):!1};f.regexp_eatControlLetter=function(t){var e=t.current();return De(e)?(t.lastIntValue=e%32,t.advance(),!0):!1};function De(t){return t>=65&&t<=90||t>=97&&t<=122}f.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){e===void 0&&(e=!1);var i=t.pos,s=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var r=t.lastIntValue;if(s&&r>=55296&&r<=56319){var n=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var o=t.lastIntValue;if(o>=56320&&o<=57343)return t.lastIntValue=(r-55296)*1024+(o-56320)+65536,!0}t.pos=n,t.lastIntValue=r}return!0}if(s&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&Ji(t.lastIntValue))return!0;s&&t.raise("Invalid unicode escape"),t.pos=i}return!1};function Ji(t){return t>=0&&t<=1114111}f.regexp_eatIdentityEscape=function(t){if(t.switchU)return this.regexp_eatSyntaxCharacter(t)?!0:t.eat(47)?(t.lastIntValue=47,!0):!1;var e=t.current();return e!==99&&(!t.switchN||e!==107)?(t.lastIntValue=e,t.advance(),!0):!1};f.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do t.lastIntValue=10*t.lastIntValue+(e-48),t.advance();while((e=t.current())>=48&&e<=57);return!0}return!1};var Be=0,Q=1,F=2;f.regexp_eatCharacterClassEscape=function(t){var e=t.current();if($i(e))return t.lastIntValue=-1,t.advance(),Q;var i=!1;if(t.switchU&&this.options.ecmaVersion>=9&&((i=e===80)||e===112)){t.lastIntValue=-1,t.advance();var s;if(t.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(t))&&t.eat(125))return i&&s===F&&t.raise("Invalid property name"),s;t.raise("Invalid property name")}return Be};function $i(t){return t===100||t===68||t===115||t===83||t===119||t===87}f.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var s=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,i,s),Q}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,r)}return Be};f.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){ot(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")};f.regexp_validateUnicodePropertyNameOrValue=function(t,e){if(t.unicodeProperties.binary.test(e))return Q;if(t.switchV&&t.unicodeProperties.binaryOfStrings.test(e))return F;t.raise("Invalid property name")};f.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";Me(e=t.current());)t.lastStringValue+=z(e),t.advance();return t.lastStringValue!==""};function Me(t){return De(t)||t===95}f.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";ts(e=t.current());)t.lastStringValue+=z(e),t.advance();return t.lastStringValue!==""};function ts(t){return Me(t)||At(t)}f.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)};f.regexp_eatCharacterClass=function(t){if(t.eat(91)){var e=t.eat(94),i=this.regexp_classContents(t);return t.eat(93)||t.raise("Unterminated character class"),e&&i===F&&t.raise("Negated character class may contain strings"),!0}return!1};f.regexp_classContents=function(t){return t.current()===93?Q:t.switchV?this.regexp_classSetExpression(t):(this.regexp_nonEmptyClassRanges(t),Q)};f.regexp_nonEmptyClassRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;t.switchU&&(e===-1||i===-1)&&t.raise("Invalid character class"),e!==-1&&i!==-1&&e>i&&t.raise("Range out of order in character class")}}};f.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(i===99||qe(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var s=t.current();return s!==93?(t.lastIntValue=s,t.advance(),!0):!1};f.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)};f.regexp_classSetExpression=function(t){var e=Q,i;if(!this.regexp_eatClassSetRange(t))if(i=this.regexp_eatClassSetOperand(t)){i===F&&(e=F);for(var s=t.pos;t.eatChars([38,38]);){if(t.current()!==38&&(i=this.regexp_eatClassSetOperand(t))){i!==F&&(e=Q);continue}t.raise("Invalid character in character class")}if(s!==t.pos)return e;for(;t.eatChars([45,45]);)this.regexp_eatClassSetOperand(t)||t.raise("Invalid character in character class");if(s!==t.pos)return e}else t.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(t)){if(i=this.regexp_eatClassSetOperand(t),!i)return e;i===F&&(e=F)}};f.regexp_eatClassSetRange=function(t){var e=t.pos;if(this.regexp_eatClassSetCharacter(t)){var i=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassSetCharacter(t)){var s=t.lastIntValue;return i!==-1&&s!==-1&&i>s&&t.raise("Range out of order in character class"),!0}t.pos=e}return!1};f.regexp_eatClassSetOperand=function(t){return this.regexp_eatClassSetCharacter(t)?Q:this.regexp_eatClassStringDisjunction(t)||this.regexp_eatNestedClass(t)};f.regexp_eatNestedClass=function(t){var e=t.pos;if(t.eat(91)){var i=t.eat(94),s=this.regexp_classContents(t);if(t.eat(93))return i&&s===F&&t.raise("Negated character class may contain strings"),s;t.pos=e}if(t.eat(92)){var r=this.regexp_eatCharacterClassEscape(t);if(r)return r;t.pos=e}return null};f.regexp_eatClassStringDisjunction=function(t){var e=t.pos;if(t.eatChars([92,113])){if(t.eat(123)){var i=this.regexp_classStringDisjunctionContents(t);if(t.eat(125))return i}else t.raise("Invalid escape");t.pos=e}return null};f.regexp_classStringDisjunctionContents=function(t){for(var e=this.regexp_classString(t);t.eat(124);)this.regexp_classString(t)===F&&(e=F);return e};f.regexp_classString=function(t){for(var e=0;this.regexp_eatClassSetCharacter(t);)e++;return e===1?Q:F};f.regexp_eatClassSetCharacter=function(t){var e=t.pos;if(t.eat(92))return this.regexp_eatCharacterEscape(t)||this.regexp_eatClassSetReservedPunctuator(t)?!0:t.eat(98)?(t.lastIntValue=8,!0):(t.pos=e,!1);var i=t.current();return i<0||i===t.lookahead()&&es(i)||is(i)?!1:(t.advance(),t.lastIntValue=i,!0)};function es(t){return t===33||t>=35&&t<=38||t>=42&&t<=44||t===46||t>=58&&t<=64||t===94||t===96||t===126}function is(t){return t===40||t===41||t===45||t===47||t>=91&&t<=93||t>=123&&t<=125}f.regexp_eatClassSetReservedPunctuator=function(t){var e=t.current();return ss(e)?(t.lastIntValue=e,t.advance(),!0):!1};function ss(t){return t===33||t===35||t===37||t===38||t===44||t===45||t>=58&&t<=62||t===64||t===96||t===126}f.regexp_eatClassControlLetter=function(t){var e=t.current();return At(e)||e===95?(t.lastIntValue=e%32,t.advance(),!0):!1};f.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1};f.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;At(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e};function At(t){return t>=48&&t<=57}f.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Ue(i=t.current());)t.lastIntValue=16*t.lastIntValue+je(i),t.advance();return t.pos!==e};function Ue(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function je(t){return t>=65&&t<=70?10+(t-65):t>=97&&t<=102?10+(t-97):t-48}f.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=e*64+i*8+t.lastIntValue:t.lastIntValue=e*8+i}else t.lastIntValue=e;return!0}return!1};f.regexp_eatOctalDigit=function(t){var e=t.current();return qe(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)};function qe(t){return t>=48&&t<=55}f.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var s=0;s<e;++s){var r=t.current();if(!Ue(r))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+je(r),t.advance()}return!0};var xt=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new it(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},v=E.prototype;v.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new xt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};v.getToken=function(){return this.next(),new xt(this)};typeof Symbol<"u"&&(v[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===a.eof,value:e}}}});v.nextToken=function(){var t=this.curContext();if((!t||!t.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(a.eof);if(t.override)return t.override(this);this.readToken(this.fullCharCodeAtPos())};v.readToken=function(t){return M(t,this.options.ecmaVersion>=6)||t===92?this.readWord():this.getTokenFromCode(t)};v.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var i=this.input.charCodeAt(t+1);return i<=56319||i>=57344?e:(e<<10)+i-56613888};v.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};v.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=e;(s=le(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())};v.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!U(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())};v.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(t>8&&t<14||t>=5760&&fe.test(String.fromCharCode(t)))++this.pos;else break t}}};v.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)};v.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&t===46&&e===46?(this.pos+=3,this.finishToken(a.ellipsis)):(++this.pos,this.finishToken(a.dot))};v.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):t===61?this.finishOp(a.assign,2):this.finishOp(a.slash,1)};v.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,s=t===42?a.star:a.modulo;return this.options.ecmaVersion>=7&&t===42&&e===42&&(++i,s=a.starstar,e=this.input.charCodeAt(this.pos+2)),e===61?this.finishOp(a.assign,i+1):this.finishOp(s,i)};v.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(a.assign,3)}return this.finishOp(t===124?a.logicalOR:a.logicalAND,2)}return e===61?this.finishOp(a.assign,2):this.finishOp(t===124?a.bitwiseOR:a.bitwiseAND,1)};v.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(a.assign,2):this.finishOp(a.bitwiseXOR,1)};v.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?e===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||I.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(a.incDec,2):e===61?this.finishOp(a.assign,2):this.finishOp(a.plusMin,1)};v.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(a.assign,i+1):this.finishOp(a.bitShift,i)):e===33&&t===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(e===61&&(i=2),this.finishOp(a.relational,i))};v.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(a.equality,this.input.charCodeAt(this.pos+2)===61?3:2):t===61&&e===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(a.arrow)):this.finishOp(t===61?a.eq:a.prefix,1)};v.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(a.questionDot,2)}if(e===63){if(t>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(a.assign,3)}return this.finishOp(a.coalesce,2)}}return this.finishOp(a.question,1)};v.readToken_numberSign=function(){var t=this.options.ecmaVersion,e=35;if(t>=13&&(++this.pos,e=this.fullCharCodeAtPos(),M(e,!0)||e===92))return this.finishToken(a.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+z(e)+"'")};v.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(a.parenL);case 41:return++this.pos,this.finishToken(a.parenR);case 59:return++this.pos,this.finishToken(a.semi);case 44:return++this.pos,this.finishToken(a.comma);case 91:return++this.pos,this.finishToken(a.bracketL);case 93:return++this.pos,this.finishToken(a.bracketR);case 123:return++this.pos,this.finishToken(a.braceL);case 125:return++this.pos,this.finishToken(a.braceR);case 58:return++this.pos,this.finishToken(a.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(a.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(a.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+z(t)+"'")};v.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)};v.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(I.test(s)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if(s==="[")e=!0;else if(s==="]"&&e)e=!1;else if(s==="/"&&!e)break;t=s==="\\"}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var n=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(n);var h=this.regexpState||(this.regexpState=new j(this));h.reset(i,r,o),this.validateRegExpFlags(h),this.validateRegExpPattern(h);var u=null;try{u=new RegExp(r,o)}catch{}return this.finishToken(a.regexp,{pattern:r,flags:o,value:u})};v.readInt=function(t,e,i){for(var s=this.options.ecmaVersion>=12&&e===void 0,r=i&&this.input.charCodeAt(this.pos)===48,n=this.pos,o=0,h=0,u=0,c=e??1/0;u<c;++u,++this.pos){var p=this.input.charCodeAt(this.pos),m=void 0;if(s&&p===95){r&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),h===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),u===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),h=p;continue}if(p>=97?m=p-97+10:p>=65?m=p-65+10:p>=48&&p<=57?m=p-48:m=1/0,m>=t)break;h=p,o=o*t+m}return s&&h===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||e!=null&&this.pos-n!==e?null:o};function rs(t,e){return e?parseInt(t,8):parseFloat(t.replace(/_/g,""))}function Ge(t){return typeof BigInt!="function"?null:BigInt(t.replace(/_/g,""))}v.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return i==null&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=Ge(this.input.slice(e,this.pos)),++this.pos):M(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,i)};v.readNumber=function(t){var e=this.pos;!t&&this.readInt(10,void 0,!0)===null&&this.raise(e,"Invalid number");var i=this.pos-e>=2&&this.input.charCodeAt(e)===48;i&&this.strict&&this.raise(e,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&s===110){var r=Ge(this.input.slice(e,this.pos));return++this.pos,M(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,r)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),s===46&&!i&&(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),(s===69||s===101)&&!i&&(s=this.input.charCodeAt(++this.pos),(s===43||s===45)&&++this.pos,this.readInt(10)===null&&this.raise(e,"Invalid number")),M(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=rs(this.input.slice(e,this.pos),i);return this.finishToken(a.num,n)};v.readCodePoint=function(){var t=this.input.charCodeAt(this.pos),e;if(t===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else e=this.readHexChar(4);return e};v.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===t)break;s===92?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(U(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(a.string,e)};var We={};v.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===We)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};v.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw We;this.raise(t,e)};v.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===a.template||this.type===a.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(a.dollarBraceL)):(++this.pos,this.finishToken(a.backQuote)):(t+=this.input.slice(e,this.pos),this.finishToken(a.template,t));if(i===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(U(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:t+=`
11
+ `;break;default:t+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}};v.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
12
+ `&&++this.pos;case`
13
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};v.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
14
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return z(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),(s!=="0"||e===56||e===57)&&(this.strict||t)&&this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return U(e)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(e)}};v.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return i===null&&this.invalidStringToken(e,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(Z(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,t+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(e?M:Z)(o,s)||this.invalidStringToken(n,"Invalid Unicode escape"),t+=z(o),i=this.pos}else break;e=!1}return t+this.input.slice(i,this.pos)};v.readWord=function(){var t=this.readWord1(),e=a.name;return this.keywords.test(t)&&(e=Ut[t]),this.finishToken(e,t)};var as="8.18.0";E.acorn={Parser:E,version:as,defaultOptions:tt,Position:ft,SourceLocation:it,getLineInfo:ut,Node:$,TokenType:b,tokTypes:a,keywordTypes:Ut,TokContext:B,tokContexts:C,isIdentifierChar:Z,isIdentifierStart:M,Token:xt,isNewLine:U,lineBreak:I,lineBreakG:wt,nonASCIIwhitespace:fe};function He(t,e){return E.parse(t,e)}var It="\u2716";function q(t){return t.name===It}function Ke(){}var w=function(e,i){if(i===void 0&&(i={}),this.toks=this.constructor.BaseParser.tokenizer(e,i),this.options=this.toks.options,this.input=this.toks.input,this.tok=this.last={type:a.eof,start:0,end:0},this.tok.validateRegExpFlags=Ke,this.tok.validateRegExpPattern=Ke,this.options.locations){var s=this.toks.curPosition();this.tok.loc=new it(this.toks,s,s)}this.ahead=[],this.context=[],this.curIndent=0,this.curLineStart=0,this.nextLineStart=this.lineEnd(this.curLineStart)+1,this.inAsync=!1,this.inGenerator=!1,this.inFunction=!1};w.prototype.startNode=function(){return new $(this.toks,this.tok.start,this.options.locations?this.tok.loc.start:null)};w.prototype.storeCurrentPos=function(){return this.options.locations?[this.tok.start,this.tok.loc.start]:this.tok.start};w.prototype.startNodeAt=function(e){return this.options.locations?new $(this.toks,e[0],e[1]):new $(this.toks,e)};w.prototype.finishNode=function(e,i){return e.type=i,e.end=this.last.end,this.options.locations&&(e.loc.end=this.last.loc.end),this.options.ranges&&(e.range[1]=this.last.end),e};w.prototype.dummyNode=function(e){var i=this.startNode();return i.type=e,i.end=i.start,this.options.locations&&(i.loc.end=i.loc.start),this.options.ranges&&(i.range[1]=i.start),this.last={type:a.name,start:i.start,end:i.start,loc:i.loc},i};w.prototype.dummyIdent=function(){var e=this.dummyNode("Identifier");return e.name=It,e};w.prototype.dummyString=function(){var e=this.dummyNode("Literal");return e.value=e.raw=It,e};w.prototype.eat=function(e){return this.tok.type===e?(this.next(),!0):!1};w.prototype.isContextual=function(e){return this.tok.type===a.name&&this.tok.value===e};w.prototype.eatContextual=function(e){return this.tok.value===e&&this.eat(a.name)};w.prototype.canInsertSemicolon=function(){return this.tok.type===a.eof||this.tok.type===a.braceR||I.test(this.input.slice(this.last.end,this.tok.start))};w.prototype.semicolon=function(){return this.eat(a.semi)};w.prototype.expect=function(e){if(this.eat(e))return!0;for(var i=1;i<=2;i++)if(this.lookAhead(i).type===e){for(var s=0;s<i;s++)this.next();return!0}};w.prototype.pushCx=function(){this.context.push(this.curIndent)};w.prototype.popCx=function(){this.curIndent=this.context.pop()};w.prototype.lineEnd=function(e){for(;e<this.input.length&&!U(this.input.charCodeAt(e));)++e;return e};w.prototype.indentationAfter=function(e){for(var i=0;;++e){var s=this.input.charCodeAt(e);if(s===32)++i;else if(s===9)i+=this.options.tabSize;else return i}};w.prototype.closes=function(e,i,s,r){return this.tok.type===e||this.tok.type===a.eof?!0:s!==this.curLineStart&&this.curIndent<i&&this.tokenStartsLine()&&(!r||this.nextLineStart>=this.input.length||this.indentationAfter(this.nextLineStart)<i)};w.prototype.tokenStartsLine=function(){for(var e=this.tok.start-1;e>=this.curLineStart;--e){var i=this.input.charCodeAt(e);if(i!==9&&i!==32)return!1}return!0};w.prototype.extend=function(e,i){this[e]=i(this[e])};w.prototype.parse=function(){return this.next(),this.parseTopLevel()};w.extend=function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];for(var s=this,r=0;r<e.length;r++)s=e[r](s);return s};w.parse=function(e,i){return new this(e,i).parse()};w.BaseParser=E;var Pt=w.prototype;function os(t){return t<14&&t>8||t===32||t===160||U(t)}Pt.next=function(){if(this.last=this.tok,this.ahead.length?this.tok=this.ahead.shift():this.tok=this.readToken(),this.tok.start>=this.nextLineStart){for(;this.tok.start>=this.nextLineStart;)this.curLineStart=this.nextLineStart,this.nextLineStart=this.lineEnd(this.curLineStart)+1;this.curIndent=this.indentationAfter(this.curLineStart)}};Pt.readToken=function(){for(;;)try{return this.toks.next(),this.toks.type===a.dot&&this.input.substr(this.toks.end,1)==="."&&this.options.ecmaVersion>=6&&(this.toks.end++,this.toks.type=a.ellipsis),new xt(this.toks)}catch(n){if(!(n instanceof SyntaxError))throw n;var t=n.message,e=n.raisedAt,i=!0;if(/unterminated/i.test(t))if(e=this.lineEnd(n.pos+1),/string/.test(t))i={start:n.pos,end:e,type:a.string,value:this.input.slice(n.pos+1,e)};else if(/regular expr/i.test(t)){var s=this.input.slice(n.pos,e);try{s=new RegExp(s)}catch{}i={start:n.pos,end:e,type:a.regexp,value:s}}else/template/.test(t)?i={start:n.pos,end:e,type:a.template,value:this.input.slice(n.pos,e)}:i=!1;else if(/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix|numeric separator/i.test(t))for(;e<this.input.length&&!os(this.input.charCodeAt(e));)++e;else if(/character escape|expected hexadecimal/i.test(t))for(;e<this.input.length;){var r=this.input.charCodeAt(e++);if(r===34||r===39||U(r))break}else if(/unexpected character/i.test(t))e++,i=!1;else if(/regular expression/i.test(t))i=!0;else throw n;if(this.resetTo(e),i===!0&&(i={start:e,end:e,type:a.name,value:It}),i)return this.options.locations&&(i.loc=new it(this.toks,ut(this.input,i.start),ut(this.input,i.end))),i}};Pt.resetTo=function(t){this.toks.pos=t,this.toks.containsEsc=!1;var e=this.input.charAt(t-1);if(this.toks.exprAllowed=!e||/[[{(,;:?/*=+\-~!|&%^<>]/.test(e)||/[enwfd]/.test(e)&&/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(t-10,t)),this.options.locations){this.toks.curLine=1,this.toks.lineStart=wt.lastIndex=0;for(var i;(i=wt.exec(this.input))&&i.index<t;)++this.toks.curLine,this.toks.lineStart=i.index+i[0].length}};Pt.lookAhead=function(t){for(;t>this.ahead.length;)this.ahead.push(this.readToken());return this.ahead[t-1]};var A=w.prototype;A.parseTopLevel=function(){var t=this.startNodeAt(this.options.locations?[0,ut(this.input,0)]:0);for(t.body=[];this.tok.type!==a.eof;)t.body.push(this.parseStatement());return this.toks.adaptDirectivePrologue(t.body),this.last=this.tok,t.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(t,"Program")};A.parseStatement=function(){var t=this.tok.type,e=this.startNode(),i;switch(this.toks.isLet()&&(t=a._var,i="let"),t){case a._break:case a._continue:this.next();var s=t===a._break;return this.semicolon()||this.canInsertSemicolon()?e.label=null:(e.label=this.tok.type===a.name?this.parseIdent():null,this.semicolon()),this.finishNode(e,s?"BreakStatement":"ContinueStatement");case a._debugger:return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement");case a._do:return this.next(),e.body=this.parseStatement(),e.test=this.eat(a._while)?this.parseParenExpression():this.dummyIdent(),this.semicolon(),this.finishNode(e,"DoWhileStatement");case a._for:this.next();var r=this.options.ecmaVersion>=9&&this.eatContextual("await");if(this.pushCx(),this.expect(a.parenL),this.tok.type===a.semi)return this.parseFor(e,null);var n=this.toks.isLet(),o=this.toks.isAwaitUsing(!0),h=!o&&this.toks.isUsing(!0);if(n||this.tok.type===a._var||this.tok.type===a._const||h||o){var u=n?"let":h?"using":o?"await using":this.tok.value,c=this.startNode();return h||o?(o&&this.next(),this.parseVar(c,!0,u)):c=this.parseVar(c,!0,u),c.declarations.length===1&&(this.tok.type===a._in||this.isContextual("of"))?(this.options.ecmaVersion>=9&&this.tok.type!==a._in&&(e.await=r),this.parseForIn(e,c)):this.parseFor(e,c)}var p=this.parseExpression(!0);return this.tok.type===a._in||this.isContextual("of")?(this.options.ecmaVersion>=9&&this.tok.type!==a._in&&(e.await=r),this.parseForIn(e,this.toAssignable(p))):this.parseFor(e,p);case a._function:return this.next(),this.parseFunction(e,!0);case a._if:return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(),e.alternate=this.eat(a._else)?this.parseStatement():null,this.finishNode(e,"IfStatement");case a._return:return this.next(),this.eat(a.semi)||this.canInsertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement");case a._switch:var m=this.curIndent,g=this.curLineStart;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.pushCx(),this.expect(a.braceL);for(var k;!this.closes(a.braceR,m,g,!0);)if(this.tok.type===a._case||this.tok.type===a._default){var L=this.tok.type===a._case;k&&this.finishNode(k,"SwitchCase"),e.cases.push(k=this.startNode()),k.consequent=[],this.next(),L?k.test=this.parseExpression():k.test=null,this.expect(a.colon)}else k||(e.cases.push(k=this.startNode()),k.consequent=[],k.test=null),k.consequent.push(this.parseStatement());return k&&this.finishNode(k,"SwitchCase"),this.popCx(),this.eat(a.braceR),this.finishNode(e,"SwitchStatement");case a._throw:return this.next(),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement");case a._try:if(this.next(),e.block=this.parseBlock(),e.handler=null,this.tok.type===a._catch){var W=this.startNode();this.next(),this.eat(a.parenL)?(W.param=this.toAssignable(this.parseExprAtom(),!0),this.expect(a.parenR)):W.param=null,W.body=this.parseBlock(),e.handler=this.finishNode(W,"CatchClause")}return e.finalizer=this.eat(a._finally)?this.parseBlock():null,!e.handler&&!e.finalizer?e.block:this.finishNode(e,"TryStatement");case a._var:case a._const:return this.parseVar(e,!1,i||this.tok.value);case a._while:return this.next(),e.test=this.parseParenExpression(),e.body=this.parseStatement(),this.finishNode(e,"WhileStatement");case a._with:return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(),this.finishNode(e,"WithStatement");case a.braceL:return this.parseBlock();case a.semi:return this.next(),this.finishNode(e,"EmptyStatement");case a._class:return this.parseClass(!0);case a._import:if(this.options.ecmaVersion>10){var H=this.lookAhead(1).type;if(H===a.parenL||H===a.dot)return e.expression=this.parseExpression(),this.semicolon(),this.finishNode(e,"ExpressionStatement")}return this.parseImport();case a._export:return this.parseExport();default:if(this.toks.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,!0,!0);if(this.toks.isUsing(!1))return this.parseVar(e,!1,"using");if(this.toks.isAwaitUsing(!1))return this.next(),this.parseVar(e,!1,"await using");var D=this.parseExpression();return q(D)?(this.next(),this.tok.type===a.eof?this.finishNode(e,"EmptyStatement"):this.parseStatement()):t===a.name&&D.type==="Identifier"&&this.eat(a.colon)?(e.body=this.parseStatement(),e.label=D,this.finishNode(e,"LabeledStatement")):(e.expression=D,this.semicolon(),this.finishNode(e,"ExpressionStatement"))}};A.parseBlock=function(){var t=this.startNode();this.pushCx(),this.expect(a.braceL);var e=this.curIndent,i=this.curLineStart;for(t.body=[];!this.closes(a.braceR,e,i,!0);)t.body.push(this.parseStatement());return this.popCx(),this.eat(a.braceR),this.finishNode(t,"BlockStatement")};A.parseFor=function(t,e){return t.init=e,t.test=t.update=null,this.eat(a.semi)&&this.tok.type!==a.semi&&(t.test=this.parseExpression()),this.eat(a.semi)&&this.tok.type!==a.parenR&&(t.update=this.parseExpression()),this.popCx(),this.expect(a.parenR),t.body=this.parseStatement(),this.finishNode(t,"ForStatement")};A.parseForIn=function(t,e){var i=this.tok.type===a._in?"ForInStatement":"ForOfStatement";return this.next(),t.left=e,t.right=this.parseExpression(),this.popCx(),this.expect(a.parenR),t.body=this.parseStatement(),this.finishNode(t,i)};A.parseVar=function(t,e,i){t.kind=i,this.next(),t.declarations=[];do{var s=this.startNode();s.id=this.options.ecmaVersion>=6?this.toAssignable(this.parseExprAtom(),!0):this.parseIdent(),s.init=this.eat(a.eq)?this.parseMaybeAssign(e):null,t.declarations.push(this.finishNode(s,"VariableDeclarator"))}while(this.eat(a.comma));if(!t.declarations.length){var r=this.startNode();r.id=this.dummyIdent(),t.declarations.push(this.finishNode(r,"VariableDeclarator"))}return e||this.semicolon(),this.finishNode(t,"VariableDeclaration")};A.parseClass=function(t){var e=this.startNode();this.next(),this.tok.type===a.name?e.id=this.parseIdent():t===!0?e.id=this.dummyIdent():e.id=null,e.superClass=this.eat(a._extends)?this.parseExpression():null,e.body=this.startNode(),e.body.body=[],this.pushCx();var i=this.curIndent+1,s=this.curLineStart;for(this.eat(a.braceL),this.curIndent+1<i&&(i=this.curIndent,s=this.curLineStart);!this.closes(a.braceR,i,s);){var r=this.parseClassElement();r&&e.body.body.push(r)}return this.popCx(),this.eat(a.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.semicolon(),this.finishNode(e.body,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};A.parseClassElement=function(){if(this.eat(a.semi))return null;var t=this.options,e=t.ecmaVersion,i=t.locations,s=this.curIndent,r=this.curLineStart,n=this.startNode(),o="",h=!1,u=!1,c="method",p=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.toks.type===a.star?p=!0:o="static"}if(n.static=p,!o&&e>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.toks.type===a.star)&&!this.canInsertSemicolon()?u=!0:o="async"),!o){h=this.eat(a.star);var m=this.toks.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?c=m:o=m)}if(o)n.computed=!1,n.key=this.startNodeAt(i?[this.toks.lastTokStart,this.toks.lastTokStartLoc]:this.toks.lastTokStart),n.key.name=o,this.finishNode(n.key,"Identifier");else if(this.parseClassElementName(n),q(n.key))return q(this.parseMaybeAssign())&&this.next(),this.eat(a.comma),null;if(e<13||this.toks.type===a.parenL||c!=="method"||h||u){var g=!n.computed&&!n.static&&!h&&!u&&c==="method"&&(n.key.type==="Identifier"&&n.key.name==="constructor"||n.key.type==="Literal"&&n.key.value==="constructor");n.kind=g?"constructor":c,n.value=this.parseMethod(h,u),this.finishNode(n,"MethodDefinition")}else{if(this.eat(a.eq))if(this.curLineStart!==r&&this.curIndent<=s&&this.tokenStartsLine())n.value=null;else{var k=this.inAsync,L=this.inGenerator;this.inAsync=!1,this.inGenerator=!1,n.value=this.parseMaybeAssign(),this.inAsync=k,this.inGenerator=L}else n.value=null;this.semicolon(),this.finishNode(n,"PropertyDefinition")}return n};A.parseClassStaticBlock=function(t){var e=this.curIndent,i=this.curLineStart;for(t.body=[],this.pushCx();!this.closes(a.braceR,e,i,!0);)t.body.push(this.parseStatement());return this.popCx(),this.eat(a.braceR),this.finishNode(t,"StaticBlock")};A.isClassElementNameStart=function(){return this.toks.isClassElementNameStart()};A.parseClassElementName=function(t){this.toks.type===a.privateId?(t.computed=!1,t.key=this.parsePrivateIdent()):this.parsePropertyName(t)};A.parseFunction=function(t,e,i){var s=this.inAsync,r=this.inGenerator,n=this.inFunction;return this.initFunction(t),this.options.ecmaVersion>=6&&(t.generator=this.eat(a.star)),this.options.ecmaVersion>=8&&(t.async=!!i),this.tok.type===a.name?t.id=this.parseIdent():e===!0&&(t.id=this.dummyIdent()),this.inAsync=t.async,this.inGenerator=t.generator,this.inFunction=!0,t.params=this.parseFunctionParams(),t.body=this.parseBlock(),this.toks.adaptDirectivePrologue(t.body.body),this.inAsync=s,this.inGenerator=r,this.inFunction=n,this.finishNode(t,e?"FunctionDeclaration":"FunctionExpression")};A.parseExport=function(){var t=this.startNode();if(this.next(),this.eat(a.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?t.exported=this.parseExprAtom():t.exported=null),t.source=this.eatContextual("from")?this.parseExprAtom():this.dummyString(),this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(a._default)){var e;if(this.tok.type===a._function||(e=this.toks.isAsyncFunction())){var i=this.startNode();this.next(),e&&this.next(),t.declaration=this.parseFunction(i,"nullableID",e)}else this.tok.type===a._class?t.declaration=this.parseClass("nullableID"):(t.declaration=this.parseMaybeAssign(),this.semicolon());return this.finishNode(t,"ExportDefaultDeclaration")}return this.tok.type.keyword||this.toks.isLet()||this.toks.isAsyncFunction()?(t.declaration=this.parseStatement(),t.specifiers=[],t.source=null):(t.declaration=null,t.specifiers=this.parseExportSpecifierList(),t.source=this.eatContextual("from")?this.parseExprAtom():null,this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon()),this.finishNode(t,"ExportNamedDeclaration")};A.parseImport=function(){var t=this.startNode();if(this.next(),this.tok.type===a.string)t.specifiers=[],t.source=this.parseExprAtom();else{var e;this.tok.type===a.name&&this.tok.value!=="from"&&(e=this.startNode(),e.local=this.parseIdent(),this.finishNode(e,"ImportDefaultSpecifier"),this.eat(a.comma)),t.specifiers=this.parseImportSpecifiers(),t.source=this.eatContextual("from")&&this.tok.type===a.string?this.parseExprAtom():this.dummyString(),e&&t.specifiers.unshift(e)}return this.options.ecmaVersion>=16&&(t.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(t,"ImportDeclaration")};A.parseImportSpecifiers=function(){var t=[];if(this.tok.type===a.star){var e=this.startNode();this.next(),e.local=this.eatContextual("as")?this.parseIdent():this.dummyIdent(),t.push(this.finishNode(e,"ImportNamespaceSpecifier"))}else{var i=this.curIndent,s=this.curLineStart,r=this.nextLineStart;for(this.pushCx(),this.eat(a.braceL),this.curLineStart>r&&(r=this.curLineStart);!this.closes(a.braceR,i+(this.curLineStart<=r?1:0),s);){var n=this.startNode();if(this.eat(a.star))n.local=this.eatContextual("as")?this.parseModuleExportName():this.dummyIdent(),this.finishNode(n,"ImportNamespaceSpecifier");else{if(this.isContextual("from")||(n.imported=this.parseModuleExportName(),q(n.imported)))break;n.local=this.eatContextual("as")?this.parseModuleExportName():n.imported,this.finishNode(n,"ImportSpecifier")}t.push(n),this.eat(a.comma)}this.eat(a.braceR),this.popCx()}return t};A.parseWithClause=function(){var t=[];if(!this.eat(a._with))return t;var e=this.curIndent,i=this.curLineStart,s=this.nextLineStart;for(this.pushCx(),this.eat(a.braceL),this.curLineStart>s&&(s=this.curLineStart);!this.closes(a.braceR,e+(this.curLineStart<=s?1:0),i);){var r=this.startNode();if(r.key=this.tok.type===a.string?this.parseExprAtom():this.parseIdent(),this.eat(a.colon))this.tok.type===a.string?r.value=this.parseExprAtom():r.value=this.dummyString();else{if(q(r.key))break;if(this.tok.type===a.string)r.value=this.parseExprAtom();else break}t.push(this.finishNode(r,"ImportAttribute")),this.eat(a.comma)}return this.eat(a.braceR),this.popCx(),t};A.parseExportSpecifierList=function(){var t=[],e=this.curIndent,i=this.curLineStart,s=this.nextLineStart;for(this.pushCx(),this.eat(a.braceL),this.curLineStart>s&&(s=this.curLineStart);!this.closes(a.braceR,e+(this.curLineStart<=s?1:0),i)&&!this.isContextual("from");){var r=this.startNode();if(r.local=this.parseModuleExportName(),q(r.local))break;r.exported=this.eatContextual("as")?this.parseModuleExportName():r.local,this.finishNode(r,"ExportSpecifier"),t.push(r),this.eat(a.comma)}return this.eat(a.braceR),this.popCx(),t};A.parseModuleExportName=function(){return this.options.ecmaVersion>=13&&this.tok.type===a.string?this.parseExprAtom():this.parseIdent()};var S=w.prototype;S.checkLVal=function(t){if(!t)return t;switch(t.type){case"Identifier":case"MemberExpression":return t;case"ParenthesizedExpression":return t.expression=this.checkLVal(t.expression),t;default:return this.dummyIdent()}};S.parseExpression=function(t){var e=this.storeCurrentPos(),i=this.parseMaybeAssign(t);if(this.tok.type===a.comma){var s=this.startNodeAt(e);for(s.expressions=[i];this.eat(a.comma);)s.expressions.push(this.parseMaybeAssign(t));return this.finishNode(s,"SequenceExpression")}return i};S.parseParenExpression=function(){this.pushCx(),this.expect(a.parenL);var t=this.parseExpression();return this.popCx(),this.expect(a.parenR),t};S.parseMaybeAssign=function(t){if(this.inGenerator&&this.toks.isContextual("yield")){var e=this.startNode();return this.next(),this.semicolon()||this.canInsertSemicolon()||this.tok.type!==a.star&&!this.tok.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(a.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")}var i=this.storeCurrentPos(),s=this.parseMaybeConditional(t);if(this.tok.type.isAssign){var r=this.startNodeAt(i);return r.operator=this.tok.value,r.left=this.tok.type===a.eq?this.toAssignable(s):this.checkLVal(s),this.next(),r.right=this.parseMaybeAssign(t),this.finishNode(r,"AssignmentExpression")}return s};S.parseMaybeConditional=function(t){var e=this.storeCurrentPos(),i=this.parseExprOps(t);if(this.eat(a.question)){var s=this.startNodeAt(e);return s.test=i,s.consequent=this.parseMaybeAssign(),s.alternate=this.expect(a.colon)?this.parseMaybeAssign(t):this.dummyIdent(),this.finishNode(s,"ConditionalExpression")}return i};S.parseExprOps=function(t){var e=this.storeCurrentPos(),i=this.curIndent,s=this.curLineStart;return this.parseExprOp(this.parseMaybeUnary(!1),e,-1,t,i,s)};S.parseExprOp=function(t,e,i,s,r,n){if(this.curLineStart!==n&&this.curIndent<r&&this.tokenStartsLine())return t;var o=this.tok.type.binop;if(o!=null&&(!s||this.tok.type!==a._in)&&o>i){var h=this.startNodeAt(e);if(h.left=t,h.operator=this.tok.value,this.next(),this.curLineStart!==n&&this.curIndent<r&&this.tokenStartsLine())h.right=this.dummyIdent();else{var u=this.storeCurrentPos();h.right=this.parseExprOp(this.parseMaybeUnary(!1),u,o,s,r,n)}return this.finishNode(h,/&&|\|\||\?\?/.test(h.operator)?"LogicalExpression":"BinaryExpression"),this.parseExprOp(h,e,i,s,r,n)}return t};S.parseMaybeUnary=function(t){var e=this.storeCurrentPos(),i;if(this.options.ecmaVersion>=8&&this.toks.isContextual("await")&&(this.inAsync||this.toks.inModule&&this.options.ecmaVersion>=13||!this.inFunction&&this.options.allowAwaitOutsideFunction))i=this.parseAwait(),t=!0;else if(this.tok.type.prefix){var s=this.startNode(),r=this.tok.type===a.incDec;r||(t=!0),s.operator=this.tok.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(!0),r&&(s.argument=this.checkLVal(s.argument)),i=this.finishNode(s,r?"UpdateExpression":"UnaryExpression")}else if(this.tok.type===a.ellipsis){var n=this.startNode();this.next(),n.argument=this.parseMaybeUnary(t),i=this.finishNode(n,"SpreadElement")}else if(!t&&this.tok.type===a.privateId)i=this.parsePrivateIdent();else for(i=this.parseExprSubscripts();this.tok.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(e);o.operator=this.tok.value,o.prefix=!1,o.argument=this.checkLVal(i),this.next(),i=this.finishNode(o,"UpdateExpression")}if(!t&&this.eat(a.starstar)){var h=this.startNodeAt(e);return h.operator="**",h.left=i,h.right=this.parseMaybeUnary(!1),this.finishNode(h,"BinaryExpression")}return i};S.parseExprSubscripts=function(){var t=this.storeCurrentPos();return this.parseSubscripts(this.parseExprAtom(),t,!1,this.curIndent,this.curLineStart)};S.parseSubscripts=function(t,e,i,s,r){for(var n=this.options.ecmaVersion>=11,o=!1;;){if(this.curLineStart!==r&&this.curIndent<=s&&this.tokenStartsLine())if(this.tok.type===a.dot&&this.curIndent===s)--s;else break;var h=t.type==="Identifier"&&t.name==="async"&&!this.canInsertSemicolon(),u=n&&this.eat(a.questionDot);if(u&&(o=!0),u&&this.tok.type!==a.parenL&&this.tok.type!==a.bracketL&&this.tok.type!==a.backQuote||this.eat(a.dot)){var c=this.startNodeAt(e);c.object=t,this.curLineStart!==r&&this.curIndent<=s&&this.tokenStartsLine()?c.property=this.dummyIdent():c.property=this.parsePropertyAccessor()||this.dummyIdent(),c.computed=!1,n&&(c.optional=u),t=this.finishNode(c,"MemberExpression")}else if(this.tok.type===a.bracketL){this.pushCx(),this.next();var p=this.startNodeAt(e);p.object=t,p.property=this.parseExpression(),p.computed=!0,n&&(p.optional=u),this.popCx(),this.expect(a.bracketR),t=this.finishNode(p,"MemberExpression")}else if(!i&&this.tok.type===a.parenL){var m=this.parseExprList(a.parenR);if(h&&this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(e),m,!0);var g=this.startNodeAt(e);g.callee=t,g.arguments=m,n&&(g.optional=u),t=this.finishNode(g,"CallExpression")}else if(this.tok.type===a.backQuote){var k=this.startNodeAt(e);k.tag=t,k.quasi=this.parseTemplate(),t=this.finishNode(k,"TaggedTemplateExpression")}else break}if(o){var L=this.startNodeAt(e);L.expression=t,t=this.finishNode(L,"ChainExpression")}return t};S.parseExprAtom=function(){var t;switch(this.tok.type){case a._this:case a._super:var e=this.tok.type===a._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,e);case a.name:var i=this.storeCurrentPos(),s=this.parseIdent(),r=!1;if(s.name==="async"&&!this.canInsertSemicolon()){if(this.eat(a._function))return this.toks.overrideContext(C.f_expr),this.parseFunction(this.startNodeAt(i),!1,!0);this.tok.type===a.name&&(s=this.parseIdent(),r=!0)}return this.eat(a.arrow)?this.parseArrowExpression(this.startNodeAt(i),[s],r):s;case a.regexp:t=this.startNode();var n=this.tok.value;return t.regex={pattern:n.pattern,flags:n.flags},t.value=n.value,t.raw=this.input.slice(this.tok.start,this.tok.end),this.next(),this.finishNode(t,"Literal");case a.num:case a.string:return t=this.startNode(),t.value=this.tok.value,t.raw=this.input.slice(this.tok.start,this.tok.end),this.tok.type===a.num&&t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal");case a._null:case a._true:case a._false:return t=this.startNode(),t.value=this.tok.type===a._null?null:this.tok.type===a._true,t.raw=this.tok.type.keyword,this.next(),this.finishNode(t,"Literal");case a.parenL:var o=this.storeCurrentPos();this.next();var h=this.parseExpression();if(this.expect(a.parenR),this.eat(a.arrow)){var u=h.expressions||[h];return u.length&&q(u[u.length-1])&&u.pop(),this.parseArrowExpression(this.startNodeAt(o),u)}if(this.options.preserveParens){var c=this.startNodeAt(o);c.expression=h,h=this.finishNode(c,"ParenthesizedExpression")}return h;case a.bracketL:return t=this.startNode(),t.elements=this.parseExprList(a.bracketR,!0),this.finishNode(t,"ArrayExpression");case a.braceL:return this.toks.overrideContext(C.b_expr),this.parseObj();case a._class:return this.parseClass(!1);case a._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.dummyIdent();default:return this.dummyIdent()}};S.parseExprImport=function(){var t=this.startNode(),e=this.parseIdent(!0);switch(this.tok.type){case a.parenL:return this.parseDynamicImport(t);case a.dot:return t.meta=e,this.parseImportMeta(t);default:return t.name="import",this.finishNode(t,"Identifier")}};S.parseDynamicImport=function(t){var e=this.parseExprList(a.parenR);return t.source=e[0]||this.dummyString(),t.options=e[1]||null,this.finishNode(t,"ImportExpression")};S.parseImportMeta=function(t){return this.next(),t.property=this.parseIdent(!0),this.finishNode(t,"MetaProperty")};S.parseNew=function(){var t=this.startNode(),e=this.curIndent,i=this.curLineStart,s=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(a.dot))return t.meta=s,t.property=this.parseIdent(!0),this.finishNode(t,"MetaProperty");var r=this.storeCurrentPos();return t.callee=this.parseSubscripts(this.parseExprAtom(),r,!0,e,i),this.tok.type===a.parenL?t.arguments=this.parseExprList(a.parenR):t.arguments=[],this.finishNode(t,"NewExpression")};S.parseTemplateElement=function(){var t=this.startNode();return this.tok.type===a.invalidTemplate?t.value={raw:this.tok.value,cooked:null}:t.value={raw:this.input.slice(this.tok.start,this.tok.end).replace(/\r\n?/g,`
15
+ `),cooked:this.tok.value},this.next(),t.tail=this.tok.type===a.backQuote,this.finishNode(t,"TemplateElement")};S.parseTemplate=function(){var t=this.startNode();this.next(),t.expressions=[];var e=this.parseTemplateElement();for(t.quasis=[e];!e.tail;)this.next(),t.expressions.push(this.parseExpression()),this.expect(a.braceR)?e=this.parseTemplateElement():(e=this.startNode(),e.value={cooked:"",raw:""},e.tail=!0,this.finishNode(e,"TemplateElement")),t.quasis.push(e);return this.expect(a.backQuote),this.finishNode(t,"TemplateLiteral")};S.parseObj=function(){var t=this.startNode();t.properties=[],this.pushCx();var e=this.curIndent+1,i=this.curLineStart;for(this.eat(a.braceL),this.curIndent+1<e&&(e=this.curIndent,i=this.curLineStart);!this.closes(a.braceR,e,i);){var s=this.startNode(),r=void 0,n=void 0,o=void 0;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis)){s.argument=this.parseMaybeAssign(),t.properties.push(this.finishNode(s,"SpreadElement")),this.eat(a.comma);continue}if(this.options.ecmaVersion>=6&&(o=this.storeCurrentPos(),s.method=!1,s.shorthand=!1,r=this.eat(a.star)),this.parsePropertyName(s),this.toks.isAsyncProp(s)?(n=!0,r=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(s)):n=!1,q(s.key)){q(this.parseMaybeAssign())&&this.next(),this.eat(a.comma);continue}if(this.eat(a.colon))s.kind="init",s.value=this.parseMaybeAssign();else if(this.options.ecmaVersion>=6&&(this.tok.type===a.parenL||this.tok.type===a.braceL))s.kind="init",s.method=!0,s.value=this.parseMethod(r,n);else if(this.options.ecmaVersion>=5&&s.key.type==="Identifier"&&!s.computed&&(s.key.name==="get"||s.key.name==="set")&&this.tok.type!==a.comma&&this.tok.type!==a.braceR&&this.tok.type!==a.eq)s.kind=s.key.name,this.parsePropertyName(s),s.value=this.parseMethod(!1);else{if(s.kind="init",this.options.ecmaVersion>=6)if(this.eat(a.eq)){var h=this.startNodeAt(o);h.operator="=",h.left=s.key,h.right=this.parseMaybeAssign(),s.value=this.finishNode(h,"AssignmentExpression")}else s.value=s.key;else s.value=this.dummyIdent();s.shorthand=!0}t.properties.push(this.finishNode(s,"Property")),this.eat(a.comma)}return this.popCx(),this.eat(a.braceR)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),this.finishNode(t,"ObjectExpression")};S.parsePropertyName=function(t){if(this.options.ecmaVersion>=6)if(this.eat(a.bracketL)){t.computed=!0,t.key=this.parseExpression(),this.expect(a.bracketR);return}else t.computed=!1;var e=this.tok.type===a.num||this.tok.type===a.string?this.parseExprAtom():this.parseIdent();t.key=e||this.dummyIdent()};S.parsePropertyAccessor=function(){if(this.tok.type===a.name||this.tok.type.keyword)return this.parseIdent();if(this.tok.type===a.privateId)return this.parsePrivateIdent()};S.parseIdent=function(){var t=this.tok.type===a.name?this.tok.value:this.tok.type.keyword;if(!t)return this.dummyIdent();this.tok.type.keyword&&(this.toks.type=a.name);var e=this.startNode();return this.next(),e.name=t,this.finishNode(e,"Identifier")};S.parsePrivateIdent=function(){var t=this.startNode();return t.name=this.tok.value,this.next(),this.finishNode(t,"PrivateIdentifier")};S.initFunction=function(t){t.id=null,t.params=[],this.options.ecmaVersion>=6&&(t.generator=!1,t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)};S.toAssignable=function(t,e){if(!(!t||t.type==="Identifier"||t.type==="MemberExpression"&&!e))if(t.type==="ParenthesizedExpression")this.toAssignable(t.expression,e);else{if(this.options.ecmaVersion<6)return this.dummyIdent();if(t.type==="ObjectExpression"){t.type="ObjectPattern";for(var i=0,s=t.properties;i<s.length;i+=1){var r=s[i];this.toAssignable(r,e)}}else if(t.type==="ArrayExpression")t.type="ArrayPattern",this.toAssignableList(t.elements,e);else if(t.type==="Property")this.toAssignable(t.value,e);else if(t.type==="SpreadElement")t.type="RestElement",this.toAssignable(t.argument,e);else if(t.type==="AssignmentExpression")t.type="AssignmentPattern",delete t.operator;else return this.dummyIdent()}return t};S.toAssignableList=function(t,e){for(var i=0,s=t;i<s.length;i+=1){var r=s[i];this.toAssignable(r,e)}return t};S.parseFunctionParams=function(t){return t=this.parseExprList(a.parenR),this.toAssignableList(t,!0)};S.parseMethod=function(t,e){var i=this.startNode(),s=this.inAsync,r=this.inGenerator,n=this.inFunction;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=!!t),this.options.ecmaVersion>=8&&(i.async=!!e),this.inAsync=i.async,this.inGenerator=i.generator,this.inFunction=!0,i.params=this.parseFunctionParams(),i.body=this.parseBlock(),this.toks.adaptDirectivePrologue(i.body.body),this.inAsync=s,this.inGenerator=r,this.inFunction=n,this.finishNode(i,"FunctionExpression")};S.parseArrowExpression=function(t,e,i){var s=this.inAsync,r=this.inGenerator,n=this.inFunction;return this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.inAsync=t.async,this.inGenerator=!1,this.inFunction=!0,t.params=this.toAssignableList(e,!0),t.expression=this.tok.type!==a.braceL,t.expression?t.body=this.parseMaybeAssign():(t.body=this.parseBlock(),this.toks.adaptDirectivePrologue(t.body.body)),this.inAsync=s,this.inGenerator=r,this.inFunction=n,this.finishNode(t,"ArrowFunctionExpression")};S.parseExprList=function(t,e){this.pushCx();var i=this.curIndent,s=this.curLineStart,r=[];for(this.next();!this.closes(t,i+1,s);){if(this.eat(a.comma)){r.push(e?null:this.dummyIdent());continue}var n=this.parseMaybeAssign();if(q(n)){if(this.closes(t,i,s))break;this.next()}else r.push(n);this.eat(a.comma)}return this.popCx(),this.eat(t)||(this.last.end=this.tok.start,this.options.locations&&(this.last.loc.end=this.tok.loc.start)),r};S.parseAwait=function(){var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(),this.finishNode(t,"AwaitExpression")};tt.tabSize=4;function ze(t,e){return w.parse(t,e)}var G=class t{static CLEAN_SOURCE_AST_CACHE=null;_key;_source;_sourceType;_sourceOriginCanonicalUrl;_isSourceClean=!0;_ast=null;_isAstOutdated=!0;get key(){return this._key}get source(){return this._source}get sourceType(){return this._sourceType}get sourceOriginCanonicalUrl(){return this._sourceOriginCanonicalUrl}get isSourceClean(){return this._isSourceClean}get ast(){return this._ast}get isAstOutdated(){return this._isAstOutdated}set source(e){this._source=e,this._isSourceClean=!1,this._isAstOutdated=!0}static enableAstCache(){t.CLEAN_SOURCE_AST_CACHE=new Map}static disableAstCache(){t.CLEAN_SOURCE_AST_CACHE=null}static ofModuleSource(e,i){return new t(i,e,"module",i)}static async ofScriptElement(e,i){let s=e.src!=null?new URL(e.src,e.baseURI).href:e.ownerDocument.URL,r=e.src!=null?s:e,n=e.src!=null?await i(s):e.textContent,o;switch(e.type){case"script":o="script";break;case"module":o="module";break;default:o="script";break}return new t(r,n,o,s)}constructor(e,i,s,r){this._key=e,this._source=i,this._sourceType=s,this._sourceOriginCanonicalUrl=r;let n=t.CLEAN_SOURCE_AST_CACHE?.get(e);typeof n<"u"&&(this._ast=n,this._isAstOutdated=!1)}parseAstIfOutdated(){if(!this._isAstOutdated)return this._ast;let e={...tt,ecmaVersion:"latest",sourceType:this.sourceType,strict:!1,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,allowHashBang:!0,allowReserved:!0,checkPrivateFields:!1};try{this._ast=He(this.source,e)}catch{this._ast=ze(this.source,e)}return this._isSourceClean&&t.CLEAN_SOURCE_AST_CACHE?.set(this._key,this._ast),this._isAstOutdated=!1,this._ast}};var Kt=class{patchImplementations;patchedBlobUrls=new Map;matchingPatchFunctionsCache=new Map;constructor(e){this.patchImplementations=e}async patchScriptElementToBlobUrl(e,i){let s=await G.ofScriptElement(e,i);return await this.patchDataToBlobUrl(s)}async patchDataToBlobUrl(e){let i=this.patchedBlobUrls.get(e.key);switch(i){case void 0:break;case null:return null;default:return i}let s=await this.getPatchedSource(e);if(s==null)return this.patchedBlobUrls.set(e.key,null),null;let r=new URL(URL.createObjectURL(new Blob([s],{type:"text/javascript"})));return this.patchedBlobUrls.set(e.key,r),r}revokePatchedBlobUrls(){for(let e of this.patchedBlobUrls.values())e!=null&&URL.revokeObjectURL(e.href);this.patchedBlobUrls.clear()}async needsPatching(e,i={exceptPatchFunctions:[]}){return(await this.getMatchingPatchFunctions(e,i)).length>0}async getMatchingPatchFunctions(e,i={exceptPatchFunctions:[]}){return(await this.getAllMatchingPatchFunctions(e)).filter(r=>!i.exceptPatchFunctions.includes(r))}async getAllMatchingPatchFunctions(e){let i=this.matchingPatchFunctionsCache.get(e.key);if(typeof i<"u")return i;let s=async o=>{if(o instanceof RegExp)return o.test(e.sourceOriginCanonicalUrl);if(typeof o=="string")return e.sourceOriginCanonicalUrl.includes(o);if(typeof o=="function")return await o(e,this)},n=(await Promise.all(this.patchImplementations.map(async([o,h])=>({patchConditionMatches:await s(o),patchFunction:h})))).filter(o=>o.patchConditionMatches).map(o=>o.patchFunction);return this.matchingPatchFunctionsCache.set(e.key,n),n}async getPatchedSource(e){let i=await this.getMatchingPatchFunctions(e);if(i.length==0)return null;for(let s of i)await s(e,this);return e.source}};function Qe(t,e,i,s,r){i||(i=l),(function n(o,h,u){var c=u||o.type;hs(i,c,o,h,n),e[c]&&e[c](o,h)})(t,s,r)}function zt(t,e,i){i(t,e)}function at(t,e,i){}function hs(t,e,i,s,r){if(t[e]==null)throw new Error("No walker function defined for node type "+e);t[e](i,s,r)}var l={};l.Program=l.BlockStatement=l.StaticBlock=function(t,e,i){for(var s=0,r=t.body;s<r.length;s+=1){var n=r[s];i(n,e,"Statement")}};l.Statement=zt;l.EmptyStatement=at;l.ExpressionStatement=l.ParenthesizedExpression=l.ChainExpression=function(t,e,i){return i(t.expression,e,"Expression")};l.IfStatement=function(t,e,i){i(t.test,e,"Expression"),i(t.consequent,e,"Statement"),t.alternate&&i(t.alternate,e,"Statement")};l.LabeledStatement=function(t,e,i){return i(t.body,e,"Statement")};l.BreakStatement=l.ContinueStatement=at;l.WithStatement=function(t,e,i){i(t.object,e,"Expression"),i(t.body,e,"Statement")};l.SwitchStatement=function(t,e,i){i(t.discriminant,e,"Expression");for(var s=0,r=t.cases;s<r.length;s+=1){var n=r[s];i(n,e)}};l.SwitchCase=function(t,e,i){t.test&&i(t.test,e,"Expression");for(var s=0,r=t.consequent;s<r.length;s+=1){var n=r[s];i(n,e,"Statement")}};l.ReturnStatement=l.YieldExpression=l.AwaitExpression=function(t,e,i){t.argument&&i(t.argument,e,"Expression")};l.ThrowStatement=l.SpreadElement=function(t,e,i){return i(t.argument,e,"Expression")};l.TryStatement=function(t,e,i){i(t.block,e,"Statement"),t.handler&&i(t.handler,e),t.finalizer&&i(t.finalizer,e,"Statement")};l.CatchClause=function(t,e,i){t.param&&i(t.param,e,"Pattern"),i(t.body,e,"Statement")};l.WhileStatement=l.DoWhileStatement=function(t,e,i){i(t.test,e,"Expression"),i(t.body,e,"Statement")};l.ForStatement=function(t,e,i){t.init&&i(t.init,e,"ForInit"),t.test&&i(t.test,e,"Expression"),t.update&&i(t.update,e,"Expression"),i(t.body,e,"Statement")};l.ForInStatement=l.ForOfStatement=function(t,e,i){i(t.left,e,"ForInit"),i(t.right,e,"Expression"),i(t.body,e,"Statement")};l.ForInit=function(t,e,i){t.type==="VariableDeclaration"?i(t,e):i(t,e,"Expression")};l.DebuggerStatement=at;l.FunctionDeclaration=function(t,e,i){return i(t,e,"Function")};l.VariableDeclaration=function(t,e,i){for(var s=0,r=t.declarations;s<r.length;s+=1){var n=r[s];i(n,e)}};l.VariableDeclarator=function(t,e,i){i(t.id,e,"Pattern"),t.init&&i(t.init,e,"Expression")};l.Function=function(t,e,i){t.id&&i(t.id,e,"Pattern");for(var s=0,r=t.params;s<r.length;s+=1){var n=r[s];i(n,e,"Pattern")}i(t.body,e,t.expression?"Expression":"Statement")};l.Pattern=function(t,e,i){t.type==="Identifier"?i(t,e,"VariablePattern"):t.type==="MemberExpression"?i(t,e,"MemberPattern"):i(t,e)};l.VariablePattern=at;l.MemberPattern=zt;l.RestElement=function(t,e,i){return i(t.argument,e,"Pattern")};l.ArrayPattern=function(t,e,i){for(var s=0,r=t.elements;s<r.length;s+=1){var n=r[s];n&&i(n,e,"Pattern")}};l.ObjectPattern=function(t,e,i){for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];n.type==="Property"?(n.computed&&i(n.key,e,"Expression"),i(n.value,e,"Pattern")):n.type==="RestElement"&&i(n.argument,e,"Pattern")}};l.Expression=zt;l.ThisExpression=l.Super=l.MetaProperty=at;l.ArrayExpression=function(t,e,i){for(var s=0,r=t.elements;s<r.length;s+=1){var n=r[s];n&&i(n,e,"Expression")}};l.ObjectExpression=function(t,e,i){for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];i(n,e)}};l.FunctionExpression=l.ArrowFunctionExpression=l.FunctionDeclaration;l.SequenceExpression=function(t,e,i){for(var s=0,r=t.expressions;s<r.length;s+=1){var n=r[s];i(n,e,"Expression")}};l.TemplateLiteral=function(t,e,i){for(var s=0,r=t.quasis;s<r.length;s+=1){var n=r[s];i(n,e)}for(var o=0,h=t.expressions;o<h.length;o+=1){var u=h[o];i(u,e,"Expression")}};l.TemplateElement=at;l.UnaryExpression=l.UpdateExpression=function(t,e,i){i(t.argument,e,"Expression")};l.BinaryExpression=l.LogicalExpression=function(t,e,i){i(t.left,e,"Expression"),i(t.right,e,"Expression")};l.AssignmentExpression=l.AssignmentPattern=function(t,e,i){i(t.left,e,"Pattern"),i(t.right,e,"Expression")};l.ConditionalExpression=function(t,e,i){i(t.test,e,"Expression"),i(t.consequent,e,"Expression"),i(t.alternate,e,"Expression")};l.NewExpression=l.CallExpression=function(t,e,i){if(i(t.callee,e,"Expression"),t.arguments)for(var s=0,r=t.arguments;s<r.length;s+=1){var n=r[s];i(n,e,"Expression")}};l.MemberExpression=function(t,e,i){i(t.object,e,"Expression"),t.computed&&i(t.property,e,"Expression")};l.ExportNamedDeclaration=l.ExportDefaultDeclaration=function(t,e,i){if(t.declaration&&i(t.declaration,e,t.type==="ExportNamedDeclaration"||t.declaration.id?"Statement":"Expression"),t.source&&i(t.source,e,"Expression"),t.attributes)for(var s=0,r=t.attributes;s<r.length;s+=1){var n=r[s];i(n,e)}};l.ExportAllDeclaration=function(t,e,i){if(t.exported&&i(t.exported,e),i(t.source,e,"Expression"),t.attributes)for(var s=0,r=t.attributes;s<r.length;s+=1){var n=r[s];i(n,e)}};l.ImportAttribute=function(t,e,i){i(t.value,e,"Expression")};l.ImportDeclaration=function(t,e,i){for(var s=0,r=t.specifiers;s<r.length;s+=1){var n=r[s];i(n,e)}if(i(t.source,e,"Expression"),t.attributes)for(var o=0,h=t.attributes;o<h.length;o+=1){var u=h[o];i(u,e)}};l.ImportExpression=function(t,e,i){i(t.source,e,"Expression"),t.options&&i(t.options,e,"Expression")};l.ImportSpecifier=l.ImportDefaultSpecifier=l.ImportNamespaceSpecifier=l.Identifier=l.PrivateIdentifier=l.Literal=at;l.TaggedTemplateExpression=function(t,e,i){i(t.tag,e,"Expression"),i(t.quasi,e,"Expression")};l.ClassDeclaration=l.ClassExpression=function(t,e,i){return i(t,e,"Class")};l.Class=function(t,e,i){t.id&&i(t.id,e,"Pattern"),t.superClass&&i(t.superClass,e,"Expression"),i(t.body,e)};l.ClassBody=function(t,e,i){for(var s=0,r=t.body;s<r.length;s+=1){var n=r[s];i(n,e)}};l.MethodDefinition=l.PropertyDefinition=l.Property=function(t,e,i){t.computed&&i(t.key,e,"Expression"),t.value&&i(t.value,e,"Expression")};var Tt=wi(xi(),1);async function ee(t,e,i=[]){let s=ie(t),r=[],n=async o=>{r.push(o);let h=await e(o.resolvedSourceUrl),u=G.ofModuleSource(h,o.resolvedSourceUrl),c=await ee(u,e,i.concat(o.resolvedSourceUrl));r.push(...c)};return await Promise.all(s.filter(o=>!i.includes(o.resolvedSourceUrl)).map(o=>n(o))),r}function ie(t){let e=t.parseAstIfOutdated(),i=[],s=r=>{if((0,Tt.variables)(r).length>0)throw new Error("TODO: Import source expression uses variables, this is not yet supported.");let h=Tt.evaluate.sync(r,{},{functions:!1,strict:!0}).toString(),u=Ns(h,t);u!=null&&i.push({resolvedSourceUrl:u,sourceValue:h,sourceValueStartIndex:r.start,sourceValueEndIndex:r.end})};return Qe(e,{ImportExpression(r){s(r.source)},ImportDeclaration(r){s(r.source)}}),i}function Ns(t,e){try{return new URL(t,e.sourceOriginCanonicalUrl).href}catch{return null}}function Ls(t){let e=Vs(t),i=async(r,n)=>{let o=ie(r);for(let h of o){let u=await e(h.resolvedSourceUrl),c=G.ofModuleSource(u,h.resolvedSourceUrl),p=await n.patchDataToBlobUrl(c);p!=null&&(r.source=Ts(r.source,h.sourceValueStartIndex,h.sourceValueEndIndex,`"${p.href}"`))}};return[async(r,n)=>{let o=await ee(r,e);for(let h of o){let u=await e(h.resolvedSourceUrl),c=G.ofModuleSource(u,h.resolvedSourceUrl);if(await n.needsPatching(c,{exceptPatchFunctions:[i]}))return!0}return!1},i]}function Vs(t){let e=new Map;return async i=>{let s=e.get(i);if(typeof s<"u")return s;let r=await t(i);return e.set(i,r),r}}function Ts(t,e,i,s){let r=t.slice(0,e),n=t.slice(i+1);return r+s+n}export{G as SourcePatchScriptData,Kt as SourcePatcher,Ls as patchModuleImportsRecursively};
16
+ //# sourceMappingURL=index.mjs.map