mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-26 04:54:40 +03:00
5997d5c6e9
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
35 lines
180 KiB
JavaScript
35 lines
180 KiB
JavaScript
"use strict";var Nr=Object.create;var Fe=Object.defineProperty,_r=Object.defineProperties,Ir=Object.getOwnPropertyDescriptor,Pr=Object.getOwnPropertyDescriptors,Or=Object.getOwnPropertyNames,pt=Object.getOwnPropertySymbols,Mr=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable;var ft=(u,e,r)=>e in u?Fe(u,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[e]=r,dt=(u,e)=>{for(var r in e||={})mt.call(e,r)&&ft(u,r,e[r]);if(pt)for(var r of pt(e))Lr.call(e,r)&&ft(u,r,e[r]);return u},xt=(u,e)=>_r(u,Pr(e));var _=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports);var Rr=(u,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let h of Or(e))!mt.call(u,h)&&h!==r&&Fe(u,h,{get:()=>e[h],enumerable:!(s=Ir(e,h))||s.enumerable});return u};var Dt=(u,e,r)=>(r=u!=null?Nr(Mr(u)):{},Rr(e||!u||!u.__esModule?Fe(r,"default",{value:u,enumerable:!0}):r,u));var ee=_(be=>{var fe=class extends Error{constructor(e,r,s){super(s),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},we=class extends fe{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};be.CommanderError=fe;be.InvalidArgumentError=we});var me=_(Be=>{var{InvalidArgumentError:Xr}=ee(),ke=class{constructor(e,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e,this.parseArg=(r,s)=>{if(!e.includes(r))throw new Xr(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(r,s):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Jr(u){let e=u.name()+(u.variadic===!0?"...":"");return u.required?"<"+e+">":"["+e+"]"}Be.Argument=ke;Be.humanReadableArgName=Jr});var Ne=_(Et=>{var{humanReadableArgName:Ur}=me(),Te=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){let r=e.commands.filter(s=>!s._hidden);if(e._hasImplicitHelpCommand()){let[,s,h]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),l=e.createCommand(s).helpOption(!1);l.description(e._helpCommandDescription),h&&l.arguments(h),r.push(l)}return this.sortSubcommands&&r.sort((s,h)=>s.name().localeCompare(h.name())),r}visibleOptions(e){let r=e.options.filter(l=>!l.hidden),s=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),h=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(s||h){let l;s?h?l=e.createOption(e._helpFlags,e._helpDescription):l=e.createOption(e._helpShortFlag,e._helpDescription):l=e.createOption(e._helpLongFlag,e._helpDescription),r.push(l)}if(this.sortOptions){let l=o=>o.short?o.short.replace(/^-/,""):o.long.replace(/^--/,"");r.sort((o,D)=>l(o).localeCompare(l(D)))}return r}visibleArguments(e){return e._argsDescription&&e._args.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e._args.find(r=>r.description)?e._args:[]}subcommandTerm(e){let r=e._args.map(s=>Ur(s)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((s,h)=>Math.max(s,r.subcommandTerm(h).length),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((s,h)=>Math.max(s,r.optionTerm(h).length),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((s,h)=>Math.max(s,r.argumentTerm(h).length),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let s="";for(let h=e.parent;h;h=h.parent)s=h.name()+" "+s;return s+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.description()}optionDescription(e){let r=[];return e.argChoices&&!e.negate&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&!e.negate&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(s=>JSON.stringify(s)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let s=`(${r.join(", ")})`;return e.description?`${e.description} ${s}`:s}return e.description}formatHelp(e,r){let s=r.padWidth(e,r),h=r.helpWidth||80,l=2,o=2;function D(i,n){if(n){let a=`${i.padEnd(s+o)}${n}`;return r.wrap(a,h-l,s+o)}return i}function m(i){return i.join(`
|
|
`).replace(/^/gm," ".repeat(l))}let f=[`Usage: ${r.commandUsage(e)}`,""],p=r.commandDescription(e);p.length>0&&(f=f.concat([p,""]));let d=r.visibleArguments(e).map(i=>D(r.argumentTerm(i),r.argumentDescription(i)));d.length>0&&(f=f.concat(["Arguments:",m(d),""]));let c=r.visibleOptions(e).map(i=>D(r.optionTerm(i),r.optionDescription(i)));c.length>0&&(f=f.concat(["Options:",m(c),""]));let t=r.visibleCommands(e).map(i=>D(r.subcommandTerm(i),r.subcommandDescription(i)));return t.length>0&&(f=f.concat(["Commands:",m(t),""])),f.join(`
|
|
`)}padWidth(e,r){return Math.max(r.longestOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}wrap(e,r,s,h=40){if(e.match(/[\n]\s+/))return e;let l=r-s;if(l<h)return e;let o=e.substr(0,s),D=e.substr(s),m=" ".repeat(s),f=new RegExp(".{1,"+(l-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g"),p=D.match(f)||[];return o+p.map((d,c)=>(d.slice(-1)===`
|
|
`&&(d=d.slice(0,d.length-1)),(c>0?m:"")+d.trimRight())).join(`
|
|
`)}};Et.Help=Te});var Pe=_(Ie=>{var{InvalidArgumentError:zr}=ee(),_e=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let s=gt(e);this.short=s.shortFlag,this.long=s.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e,this.parseArg=(r,s)=>{if(!e.includes(r))throw new zr(`Allowed choices are ${e.join(", ")}.`);return this.variadic?this._concatValue(r,s):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Hr(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}};function Hr(u){return u.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function gt(u){let e,r,s=u.split(/[ |,]+/);return s.length>1&&!/^[[<]/.test(s[1])&&(e=s.shift()),r=s.shift(),!e&&/^-[^-]$/.test(r)&&(e=r,r=void 0),{shortFlag:e,longFlag:r}}Ie.Option=_e;Ie.splitOptionFlags=gt});var Ct=_(vt=>{function jr(u,e){if(Math.abs(u.length-e.length)>3)return Math.max(u.length,e.length);let r=[];for(let s=0;s<=u.length;s++)r[s]=[s];for(let s=0;s<=e.length;s++)r[0][s]=s;for(let s=1;s<=e.length;s++)for(let h=1;h<=u.length;h++){let l=1;u[h-1]===e[s-1]?l=0:l=1,r[h][s]=Math.min(r[h-1][s]+1,r[h][s-1]+1,r[h-1][s-1]+l),h>1&&s>1&&u[h-1]===e[s-2]&&u[h-2]===e[s-1]&&(r[h][s]=Math.min(r[h][s],r[h-2][s-2]+1))}return r[u.length][e.length]}function Vr(u,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=u.startsWith("--");r&&(u=u.slice(2),e=e.map(o=>o.slice(2)));let s=[],h=3,l=.4;return e.forEach(o=>{if(o.length<=1)return;let D=jr(u,o),m=Math.max(u.length,o.length);(m-D)/m>l&&(D<h?(h=D,s=[o]):D===h&&s.push(o))}),s.sort((o,D)=>o.localeCompare(D)),r&&(s=s.map(o=>`--${o}`)),s.length>1?`
|
|
(Did you mean one of ${s.join(", ")}?)`:s.length===1?`
|
|
(Did you mean ${s[0]}?)`:""}vt.suggestSimilar=Vr});var wt=_(Ft=>{var Kr=require("events").EventEmitter,Oe=require("child_process"),$=require("path"),Me=require("fs"),{Argument:$r,humanReadableArgName:Gr}=me(),{CommanderError:Le}=ee(),{Help:Wr}=Ne(),{Option:qr,splitOptionFlags:Yr}=Pe(),{suggestSimilar:At}=Ct(),te=class extends Kr{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!1,this._outputConfiguration={writeOut:r=>process.stdout.write(r),writeErr:r=>process.stderr.write(r),getOutHelpWidth:()=>process.stdout.isTTY?process.stdout.columns:void 0,getErrHelpWidth:()=>process.stderr.isTTY?process.stderr.columns:void 0,outputError:(r,s)=>s(r)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,r,s){let h=r,l=s;typeof h=="object"&&h!==null&&(l=h,h=null),l=l||{};let[,o,D]=e.match(/([^ ]+) *(.*)/),m=this.createCommand(o);return h&&(m.description(h),m._executableHandler=!0),l.isDefault&&(this._defaultCommandName=m._name),m._hidden=!!(l.noHelp||l.hidden),m._executableFile=l.executableFile||null,D&&m.arguments(D),this.commands.push(m),m.parent=this,m.copyInheritedSettings(this),h?this:m}createCommand(e){return new te(e)}createHelp(){return Object.assign(new Wr,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,r){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function s(h){h.forEach(l=>{if(l._executableHandler&&!l._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${l.name()}`);s(l.commands)})}return s(e.commands),r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,r){return new $r(e,r)}argument(e,r,s,h){let l=this.createArgument(e,r);return typeof s=="function"?l.default(h).argParser(s):l.default(s),this.addArgument(l),this}arguments(e){return e.split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this._args.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,r){return e===!1?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=r||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return this._addImplicitHelpCommand===void 0?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,r){let s=["preAction","postAction"];if(!s.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
Expecting one of '${s.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,s){this._exitCallback&&this._exitCallback(new Le(e,r,s)),process.exit(e)}action(e){let r=s=>{let h=this._args.length,l=s.slice(0,h);return this._storeOptionsAsProperties?l[h]=this:l[h]=this.opts(),l.push(this),e.apply(this,l)};return this._actionHandler=r,this}createOption(e,r){return new qr(e,r)}addOption(e){let r=e.name(),s=e.attributeName(),h=e.defaultValue;if(e.negate||e.optional||e.required||typeof h=="boolean"){if(e.negate){let o=e.long.replace(/^--no-/,"--");h=this._findOption(o)?this.getOptionValue(s):!0}h!==void 0&&this.setOptionValueWithSource(s,h,"default")}this.options.push(e);let l=(o,D,m)=>{let f=this.getOptionValue(s);if(o!==null&&e.parseArg)try{o=e.parseArg(o,f===void 0?h:f)}catch(p){if(p.code==="commander.invalidArgument"){let d=`${D} ${p.message}`;this._displayError(p.exitCode,p.code,d)}throw p}else o!==null&&e.variadic&&(o=e._concatValue(o,f));typeof f=="boolean"||typeof f>"u"?o==null?this.setOptionValueWithSource(s,e.negate?!1:h||!0,m):this.setOptionValueWithSource(s,o,m):o!==null&&this.setOptionValueWithSource(s,e.negate?!1:o,m)};return this.on("option:"+r,o=>{let D=`error: option '${e.flags}' argument '${o}' is invalid.`;l(o,D,"cli")}),e.envVar&&this.on("optionEnv:"+r,o=>{let D=`error: option '${e.flags}' value '${o}' from env '${e.envVar}' is invalid.`;l(o,D,"env")}),this}_optionEx(e,r,s,h,l){let o=this.createOption(r,s);if(o.makeOptionMandatory(!!e.mandatory),typeof h=="function")o.default(l).argParser(h);else if(h instanceof RegExp){let D=h;h=(m,f)=>{let p=D.exec(m);return p?p[0]:f},o.default(l).argParser(h)}else o.default(h);return this.addOption(o)}option(e,r,s,h){return this._optionEx({},e,r,s,h)}requiredOption(e,r,s,h){return this._optionEx({mandatory:!0},e,r,s,h)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,r){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this}setOptionValueWithSource(e,r,s){return this.setOptionValue(e,r),this._optionValueSources[e]=s,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");r=r||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(r.from="electron")),this.rawArgs=e.slice();let s;switch(r.from){case void 0:case"node":this._scriptPath=e[1],s=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],s=e.slice(2)):s=e.slice(1);break;case"user":s=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._scriptPath&&require.main&&(this._scriptPath=require.main.filename),this._name=this._name||this._scriptPath&&$.basename(this._scriptPath,$.extname(this._scriptPath)),s}parse(e,r){let s=this._prepareUserArgs(e,r);return this._parseCommand([],s),this}async parseAsync(e,r){let s=this._prepareUserArgs(e,r);return await this._parseCommand([],s),this}_executeSubCommand(e,r){r=r.slice();let s=!1,h=[".js",".ts",".tsx",".mjs",".cjs"];this._checkForMissingMandatoryOptions();let l=this._scriptPath;!l&&require.main&&(l=require.main.filename);let o;try{let c=Me.realpathSync(l);o=$.dirname(c)}catch{o="."}let D=$.basename(l,$.extname(l))+"-"+e._name;e._executableFile&&(D=e._executableFile);let m=$.join(o,D);Me.existsSync(m)?D=m:h.forEach(c=>{Me.existsSync(`${m}${c}`)&&(D=`${m}${c}`)}),s=h.includes($.extname(D));let f;process.platform!=="win32"?s?(r.unshift(D),r=St(process.execArgv).concat(r),f=Oe.spawn(process.argv[0],r,{stdio:"inherit"})):f=Oe.spawn(D,r,{stdio:"inherit"}):(r.unshift(D),r=St(process.execArgv).concat(r),f=Oe.spawn(process.execPath,r,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(c=>{process.on(c,()=>{f.killed===!1&&f.exitCode===null&&f.kill(c)})});let d=this._exitCallback;d?f.on("close",()=>{d(new Le(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):f.on("close",process.exit.bind(process)),f.on("error",c=>{if(c.code==="ENOENT"){let t=`'${D}' does not exist
|
|
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(t)}else if(c.code==="EACCES")throw new Error(`'${D}' not executable`);if(!d)process.exit(1);else{let t=new Le(1,"commander.executeSubCommandAsync","(error)");t.nestedError=c,d(t)}}),this.runningCommand=f}_dispatchSubcommand(e,r,s){let h=this._findCommand(e);if(h||this.help({error:!0}),h._executableHandler)this._executeSubCommand(h,r.concat(s));else return h._parseCommand(r,s)}_checkNumberOfArguments(){this._args.forEach((e,r)=>{e.required&&this.args[r]==null&&this.missingArgument(e.name())}),!(this._args.length>0&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){let e=(s,h,l)=>{let o=h;if(h!==null&&s.parseArg)try{o=s.parseArg(h,l)}catch(D){if(D.code==="commander.invalidArgument"){let m=`error: command-argument value '${h}' is invalid for argument '${s.name()}'. ${D.message}`;this._displayError(D.exitCode,D.code,m)}throw D}return o};this._checkNumberOfArguments();let r=[];this._args.forEach((s,h)=>{let l=s.defaultValue;s.variadic?h<this.args.length?(l=this.args.slice(h),s.parseArg&&(l=l.reduce((o,D)=>e(s,D,o),s.defaultValue))):l===void 0&&(l=[]):h<this.args.length&&(l=this.args[h],s.parseArg&&(l=e(s,l,s.defaultValue))),r[h]=l}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let s=e,h=[];return Re(this).reverse().filter(l=>l._lifeCycleHooks[r]!==void 0).forEach(l=>{l._lifeCycleHooks[r].forEach(o=>{h.push({hookedCommand:l,callback:o})})}),r==="postAction"&&h.reverse(),h.forEach(l=>{s=this._chainOrCall(s,()=>l.callback(l.hookedCommand,this))}),s}_parseCommand(e,r){let s=this.parseOptions(r);if(this._parseOptionsEnv(),e=e.concat(s.operands),r=s.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return e.length===1&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return yt(this,r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),yt(this,s.unknown),this._checkForMissingMandatoryOptions();let h=()=>{s.unknown.length>0&&this.unknownOption(s.unknown[0])},l=`command:${this.name()}`;if(this._actionHandler){h(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&this.parent.emit(l,e,r),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(l))h(),this._processArguments(),this.parent.emit(l,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(h(),this._processArguments())}else this.commands.length?(h(),this.help({error:!0})):(h(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})}parseOptions(e){let r=[],s=[],h=r,l=e.slice();function o(m){return m.length>1&&m[0]==="-"}let D=null;for(;l.length;){let m=l.shift();if(m==="--"){h===s&&h.push(m),h.push(...l);break}if(D&&!o(m)){this.emit(`option:${D.name()}`,m);continue}if(D=null,o(m)){let f=this._findOption(m);if(f){if(f.required){let p=l.shift();p===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,p)}else if(f.optional){let p=null;l.length>0&&!o(l[0])&&(p=l.shift()),this.emit(`option:${f.name()}`,p)}else this.emit(`option:${f.name()}`);D=f.variadic?f:null;continue}}if(m.length>2&&m[0]==="-"&&m[1]!=="-"){let f=this._findOption(`-${m[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,m.slice(2)):(this.emit(`option:${f.name()}`),l.unshift(`-${m.slice(2)}`));continue}}if(/^--[^=]+=/.test(m)){let f=m.indexOf("="),p=this._findOption(m.slice(0,f));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,m.slice(f+1));continue}}if(o(m)&&(h=s),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&s.length===0){if(this._findCommand(m)){r.push(m),l.length>0&&s.push(...l);break}else if(m===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(m),l.length>0&&r.push(...l);break}else if(this._defaultCommandName){s.push(m),l.length>0&&s.push(...l);break}}if(this._passThroughOptions){h.push(m),l.length>0&&h.push(...l);break}h.push(m)}return{operands:r,unknown:s}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let s=0;s<r;s++){let h=this.options[s].attributeName();e[h]=h===this._versionOptionName?this._version:this[h]}return e}return this._optionValues}_displayError(e,r,s){this._outputConfiguration.outputError(`${s}
|
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
`),this.outputHelp({error:!0})),this._exit(e,r,s)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in process.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,process.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}missingArgument(e){let r=`error: missing required argument '${e}'`;this._displayError(1,"commander.missingArgument",r)}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this._displayError(1,"commander.optionMissingArgument",r)}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this._displayError(1,"commander.missingMandatoryOptionValue",r)}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let h=[],l=this;do{let o=l.createHelp().visibleOptions(l).filter(D=>D.long).map(D=>D.long);h=h.concat(o),l=l.parent}while(l&&!l._enablePositionalOptions);r=At(e,h)}let s=`error: unknown option '${e}'${r}`;this._displayError(1,"commander.unknownOption",s)}_excessArguments(e){if(this._allowExcessArguments)return;let r=this._args.length,s=r===1?"":"s",l=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${s} but got ${e.length}.`;this._displayError(1,"commander.excessArguments",l)}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let h=[];this.createHelp().visibleCommands(this).forEach(l=>{h.push(l.name()),l.alias()&&h.push(l.alias())}),r=At(e,h)}let s=`error: unknown command '${e}'${r}`;this._displayError(1,"commander.unknownCommand",s)}version(e,r,s){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",s=s||"output the version number";let h=this.createOption(r,s);return this._versionOptionName=h.attributeName(),this.options.push(h),this.on("option:"+h.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
`),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this._args.map(s=>Gr(s));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpInformation(e){let r=this.createHelp();return r.helpWidth===void 0&&(r.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),r.formatHelp(this,r)}_getHelpContext(e){e=e||{};let r={error:!!e.error},s;return r.error?s=h=>this._outputConfiguration.writeErr(h):s=h=>this._outputConfiguration.writeOut(h),r.write=e.write||s,r.command=this,r}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let s=this._getHelpContext(e);Re(this).reverse().forEach(l=>l.emit("beforeAllHelp",s)),this.emit("beforeHelp",s);let h=this.helpInformation(s);if(r&&(h=r(h),typeof h!="string"&&!Buffer.isBuffer(h)))throw new Error("outputHelp callback must return a string or a Buffer");s.write(h),this.emit(this._helpLongFlag),this.emit("afterHelp",s),Re(this).forEach(l=>l.emit("afterAllHelp",s))}helpOption(e,r){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=r||this._helpDescription;let s=Yr(this._helpFlags);return this._helpShortFlag=s.shortFlag,this._helpLongFlag=s.longFlag,this}help(e){this.outputHelp(e);let r=process.exitCode||0;r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let s=["beforeAll","before","after","afterAll"];if(!s.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
Expecting one of '${s.join("', '")}'`);let h=`${e}Help`;return this.on(h,l=>{let o;typeof r=="function"?o=r({error:l.error,command:l.command}):o=r,o&&l.write(`${o}
|
|
`)}),this}};function yt(u,e){u._hasHelpOption&&e.find(s=>s===u._helpLongFlag||s===u._helpShortFlag)&&(u.outputHelp(),u._exit(0,"commander.helpDisplayed","(outputHelp)"))}function St(u){return u.map(e=>{if(!e.startsWith("--inspect"))return e;let r,s="127.0.0.1",h="9229",l;return(l=e.match(/^(--inspect(-brk)?)$/))!==null?r=l[1]:(l=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=l[1],/^\d+$/.test(l[3])?h=l[3]:s=l[3]):(l=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=l[1],s=l[3],h=l[4]),r&&h!=="0"?`${r}=${s}:${parseInt(h)+1}`:e})}function Re(u){let e=[];for(let r=u;r;r=r.parent)e.push(r);return e}Ft.Command=te});var Tt=_((J,Bt)=>{var{Argument:Qr}=me(),{Command:bt}=wt(),{CommanderError:Zr,InvalidArgumentError:kt}=ee(),{Help:es}=Ne(),{Option:ts}=Pe();J=Bt.exports=new bt;J.program=J;J.Argument=Qr;J.Command=bt;J.CommanderError=Zr;J.Help=es;J.InvalidArgumentError=kt;J.InvalidOptionArgumentError=kt;J.Option=ts});var Nt=_((ie,Xe)=>{(function(e,r){typeof ie=="object"&&typeof Xe=="object"?Xe.exports=r():typeof define=="function"&&define.amd?define([],r):typeof ie=="object"?ie.esprima=r():e.esprima=r()})(ie,function(){return function(u){var e={};function r(s){if(e[s])return e[s].exports;var h=e[s]={exports:{},id:s,loaded:!1};return u[s].call(h.exports,h,h.exports,r),h.loaded=!0,h.exports}return r.m=u,r.c=e,r.p="",r(0)}([function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(1),h=r(3),l=r(8),o=r(15);function D(c,t,i){var n=null,a=function(B,T){i&&i(B,T),n&&n.visit(B,T)},x=typeof i=="function"?a:null,E=!1;if(t){E=typeof t.comment=="boolean"&&t.comment;var C=typeof t.attachComment=="boolean"&&t.attachComment;(E||C)&&(n=new s.CommentHandler,n.attach=C,t.comment=!0,x=a)}var y=!1;t&&typeof t.sourceType=="string"&&(y=t.sourceType==="module");var S;t&&typeof t.jsx=="boolean"&&t.jsx?S=new h.JSXParser(c,t,x):S=new l.Parser(c,t,x);var w=y?S.parseModule():S.parseScript(),b=w;return E&&n&&(b.comments=n.comments),S.config.tokens&&(b.tokens=S.tokens),S.config.tolerant&&(b.errors=S.errorHandler.errors),b}e.parse=D;function m(c,t,i){var n=t||{};return n.sourceType="module",D(c,n,i)}e.parseModule=m;function f(c,t,i){var n=t||{};return n.sourceType="script",D(c,n,i)}e.parseScript=f;function p(c,t,i){var n=new o.Tokenizer(c,t),a;a=[];try{for(;;){var x=n.getNextToken();if(!x)break;i&&(x=i(x)),a.push(x)}}catch(E){n.errorHandler.tolerate(E)}return n.errorHandler.tolerant&&(a.errors=n.errors()),a}e.tokenize=p;var d=r(2);e.Syntax=d.Syntax,e.version="4.0.1"},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(2),h=function(){function l(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return l.prototype.insertInnerComments=function(o,D){if(o.type===s.Syntax.BlockStatement&&o.body.length===0){for(var m=[],f=this.leading.length-1;f>=0;--f){var p=this.leading[f];D.end.offset>=p.start&&(m.unshift(p.comment),this.leading.splice(f,1),this.trailing.splice(f,1))}m.length&&(o.innerComments=m)}},l.prototype.findTrailingComments=function(o){var D=[];if(this.trailing.length>0){for(var m=this.trailing.length-1;m>=0;--m){var f=this.trailing[m];f.start>=o.end.offset&&D.unshift(f.comment)}return this.trailing.length=0,D}var p=this.stack[this.stack.length-1];if(p&&p.node.trailingComments){var d=p.node.trailingComments[0];d&&d.range[0]>=o.end.offset&&(D=p.node.trailingComments,delete p.node.trailingComments)}return D},l.prototype.findLeadingComments=function(o){for(var D=[],m;this.stack.length>0;){var f=this.stack[this.stack.length-1];if(f&&f.start>=o.start.offset)m=f.node,this.stack.pop();else break}if(m){for(var p=m.leadingComments?m.leadingComments.length:0,d=p-1;d>=0;--d){var c=m.leadingComments[d];c.range[1]<=o.start.offset&&(D.unshift(c),m.leadingComments.splice(d,1))}return m.leadingComments&&m.leadingComments.length===0&&delete m.leadingComments,D}for(var d=this.leading.length-1;d>=0;--d){var f=this.leading[d];f.start<=o.start.offset&&(D.unshift(f.comment),this.leading.splice(d,1))}return D},l.prototype.visitNode=function(o,D){if(!(o.type===s.Syntax.Program&&o.body.length>0)){this.insertInnerComments(o,D);var m=this.findTrailingComments(D),f=this.findLeadingComments(D);f.length>0&&(o.leadingComments=f),m.length>0&&(o.trailingComments=m),this.stack.push({node:o,start:D.start.offset})}},l.prototype.visitComment=function(o,D){var m=o.type[0]==="L"?"Line":"Block",f={type:m,value:o.value};if(o.range&&(f.range=o.range),o.loc&&(f.loc=o.loc),this.comments.push(f),this.attach){var p={comment:{type:m,value:o.value,range:[D.start.offset,D.end.offset]},start:D.start.offset};o.loc&&(p.comment.loc=o.loc),o.type=m,this.leading.push(p),this.trailing.push(p)}},l.prototype.visit=function(o,D){o.type==="LineComment"?this.visitComment(o,D):o.type==="BlockComment"?this.visitComment(o,D):this.attach&&this.visitNode(o,D)},l}();e.CommentHandler=h},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(u,e,r){"use strict";var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])};return function(i,n){t(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(e,"__esModule",{value:!0});var h=r(4),l=r(5),o=r(6),D=r(7),m=r(8),f=r(13),p=r(14);f.TokenName[100]="JSXIdentifier",f.TokenName[101]="JSXText";function d(t){var i;switch(t.type){case o.JSXSyntax.JSXIdentifier:var n=t;i=n.name;break;case o.JSXSyntax.JSXNamespacedName:var a=t;i=d(a.namespace)+":"+d(a.name);break;case o.JSXSyntax.JSXMemberExpression:var x=t;i=d(x.object)+"."+d(x.property);break;default:break}return i}var c=function(t){s(i,t);function i(n,a,x){return t.call(this,n,a,x)||this}return i.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)},i.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},i.prototype.finishJSX=function(){this.nextToken()},i.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},i.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},i.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},i.prototype.scanXHTMLEntity=function(n){for(var a="&",x=!0,E=!1,C=!1,y=!1;!this.scanner.eof()&&x&&!E;){var S=this.scanner.source[this.scanner.index];if(S===n)break;if(E=S===";",a+=S,++this.scanner.index,!E)switch(a.length){case 2:C=S==="#";break;case 3:C&&(y=S==="x",x=y||h.Character.isDecimalDigit(S.charCodeAt(0)),C=C&&!y);break;default:x=x&&!(C&&!h.Character.isDecimalDigit(S.charCodeAt(0))),x=x&&!(y&&!h.Character.isHexDigit(S.charCodeAt(0)));break}}if(x&&E&&a.length>2){var w=a.substr(1,a.length-2);C&&w.length>1?a=String.fromCharCode(parseInt(w.substr(1),10)):y&&w.length>2?a=String.fromCharCode(parseInt("0"+w.substr(1),16)):!C&&!y&&p.XHTMLEntities[w]&&(a=p.XHTMLEntities[w])}return a},i.prototype.lexJSX=function(){var n=this.scanner.source.charCodeAt(this.scanner.index);if(n===60||n===62||n===47||n===58||n===61||n===123||n===125){var a=this.scanner.source[this.scanner.index++];return{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(n===34||n===39){for(var x=this.scanner.index,E=this.scanner.source[this.scanner.index++],C="";!this.scanner.eof();){var y=this.scanner.source[this.scanner.index++];if(y===E)break;y==="&"?C+=this.scanXHTMLEntity(E):C+=y}return{type:8,value:C,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(n===46){var S=this.scanner.source.charCodeAt(this.scanner.index+1),w=this.scanner.source.charCodeAt(this.scanner.index+2),a=S===46&&w===46?"...":".",x=this.scanner.index;return this.scanner.index+=a.length,{type:7,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(n===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(h.Character.isIdentifierStart(n)&&n!==92){var x=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var y=this.scanner.source.charCodeAt(this.scanner.index);if(h.Character.isIdentifierPart(y)&&y!==92)++this.scanner.index;else if(y===45)++this.scanner.index;else break}var b=this.scanner.source.slice(x,this.scanner.index);return{type:100,value:b,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}return this.scanner.lex()},i.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var n=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(n)),n},i.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var n=this.scanner.index,a="";!this.scanner.eof();){var x=this.scanner.source[this.scanner.index];if(x==="{"||x==="<")break;++this.scanner.index,a+=x,h.Character.isLineTerminator(x.charCodeAt(0))&&(++this.scanner.lineNumber,x==="\r"&&this.scanner.source[this.scanner.index]===`
|
|
`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var E={type:101,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index};return a.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(E)),E},i.prototype.peekJSXToken=function(){var n=this.scanner.saveState();this.scanner.scanComments();var a=this.lexJSX();return this.scanner.restoreState(n),a},i.prototype.expectJSX=function(n){var a=this.nextJSXToken();(a.type!==7||a.value!==n)&&this.throwUnexpectedToken(a)},i.prototype.matchJSX=function(n){var a=this.peekJSXToken();return a.type===7&&a.value===n},i.prototype.parseJSXIdentifier=function(){var n=this.createJSXNode(),a=this.nextJSXToken();return a.type!==100&&this.throwUnexpectedToken(a),this.finalize(n,new l.JSXIdentifier(a.value))},i.prototype.parseJSXElementName=function(){var n=this.createJSXNode(),a=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=a;this.expectJSX(":");var E=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXNamespacedName(x,E))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var C=a;this.expectJSX(".");var y=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXMemberExpression(C,y))}return a},i.prototype.parseJSXAttributeName=function(){var n=this.createJSXNode(),a,x=this.parseJSXIdentifier();if(this.matchJSX(":")){var E=x;this.expectJSX(":");var C=this.parseJSXIdentifier();a=this.finalize(n,new l.JSXNamespacedName(E,C))}else a=x;return a},i.prototype.parseJSXStringLiteralAttribute=function(){var n=this.createJSXNode(),a=this.nextJSXToken();a.type!==8&&this.throwUnexpectedToken(a);var x=this.getTokenRaw(a);return this.finalize(n,new D.Literal(a.value,x))},i.prototype.parseJSXExpressionAttribute=function(){var n=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var a=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(n,new l.JSXExpressionContainer(a))},i.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},i.prototype.parseJSXNameValueAttribute=function(){var n=this.createJSXNode(),a=this.parseJSXAttributeName(),x=null;return this.matchJSX("=")&&(this.expectJSX("="),x=this.parseJSXAttributeValue()),this.finalize(n,new l.JSXAttribute(a,x))},i.prototype.parseJSXSpreadAttribute=function(){var n=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var a=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(n,new l.JSXSpreadAttribute(a))},i.prototype.parseJSXAttributes=function(){for(var n=[];!this.matchJSX("/")&&!this.matchJSX(">");){var a=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();n.push(a)}return n},i.prototype.parseJSXOpeningElement=function(){var n=this.createJSXNode();this.expectJSX("<");var a=this.parseJSXElementName(),x=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(n,new l.JSXOpeningElement(a,E,x))},i.prototype.parseJSXBoundaryElement=function(){var n=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var a=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(n,new l.JSXClosingElement(a))}var x=this.parseJSXElementName(),E=this.parseJSXAttributes(),C=this.matchJSX("/");return C&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(n,new l.JSXOpeningElement(x,C,E))},i.prototype.parseJSXEmptyExpression=function(){var n=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(n,new l.JSXEmptyExpression)},i.prototype.parseJSXExpressionContainer=function(){var n=this.createJSXNode();this.expectJSX("{");var a;return this.matchJSX("}")?(a=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),a=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(n,new l.JSXExpressionContainer(a))},i.prototype.parseJSXChildren=function(){for(var n=[];!this.scanner.eof();){var a=this.createJSXChildNode(),x=this.nextJSXText();if(x.start<x.end){var E=this.getTokenRaw(x),C=this.finalize(a,new l.JSXText(x.value,E));n.push(C)}if(this.scanner.source[this.scanner.index]==="{"){var y=this.parseJSXExpressionContainer();n.push(y)}else break}return n},i.prototype.parseComplexJSXElement=function(n){for(var a=[];!this.scanner.eof();){n.children=n.children.concat(this.parseJSXChildren());var x=this.createJSXChildNode(),E=this.parseJSXBoundaryElement();if(E.type===o.JSXSyntax.JSXOpeningElement){var C=E;if(C.selfClosing){var y=this.finalize(x,new l.JSXElement(C,[],null));n.children.push(y)}else a.push(n),n={node:x,opening:C,closing:null,children:[]}}if(E.type===o.JSXSyntax.JSXClosingElement){n.closing=E;var S=d(n.opening.name),w=d(n.closing.name);if(S!==w&&this.tolerateError("Expected corresponding JSX closing tag for %0",S),a.length>0){var y=this.finalize(n.node,new l.JSXElement(n.opening,n.children,n.closing));n=a[a.length-1],n.children.push(y),a.pop()}else break}}return n},i.prototype.parseJSXElement=function(){var n=this.createJSXNode(),a=this.parseJSXOpeningElement(),x=[],E=null;if(!a.selfClosing){var C=this.parseComplexJSXElement({node:n,opening:a,closing:E,children:x});x=C.children,E=C.closing}return this.finalize(n,new l.JSXElement(a,x,E))},i.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var n=this.parseJSXElement();return this.finishJSX(),n},i.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")},i}(m.Parser);e.JSXParser=c},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(s){return s<65536?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10))+String.fromCharCode(56320+(s-65536&1023))},isWhiteSpace:function(s){return s===32||s===9||s===11||s===12||s===160||s>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(s)>=0},isLineTerminator:function(s){return s===10||s===13||s===8232||s===8233},isIdentifierStart:function(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s===92||s>=128&&r.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(s))},isIdentifierPart:function(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s>=48&&s<=57||s===92||s>=128&&r.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(s))},isDecimalDigit:function(s){return s>=48&&s<=57},isHexDigit:function(s){return s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102},isOctalDigit:function(s){return s>=48&&s<=55}}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(6),h=function(){function n(a){this.type=s.JSXSyntax.JSXClosingElement,this.name=a}return n}();e.JSXClosingElement=h;var l=function(){function n(a,x,E){this.type=s.JSXSyntax.JSXElement,this.openingElement=a,this.children=x,this.closingElement=E}return n}();e.JSXElement=l;var o=function(){function n(){this.type=s.JSXSyntax.JSXEmptyExpression}return n}();e.JSXEmptyExpression=o;var D=function(){function n(a){this.type=s.JSXSyntax.JSXExpressionContainer,this.expression=a}return n}();e.JSXExpressionContainer=D;var m=function(){function n(a){this.type=s.JSXSyntax.JSXIdentifier,this.name=a}return n}();e.JSXIdentifier=m;var f=function(){function n(a,x){this.type=s.JSXSyntax.JSXMemberExpression,this.object=a,this.property=x}return n}();e.JSXMemberExpression=f;var p=function(){function n(a,x){this.type=s.JSXSyntax.JSXAttribute,this.name=a,this.value=x}return n}();e.JSXAttribute=p;var d=function(){function n(a,x){this.type=s.JSXSyntax.JSXNamespacedName,this.namespace=a,this.name=x}return n}();e.JSXNamespacedName=d;var c=function(){function n(a,x,E){this.type=s.JSXSyntax.JSXOpeningElement,this.name=a,this.selfClosing=x,this.attributes=E}return n}();e.JSXOpeningElement=c;var t=function(){function n(a){this.type=s.JSXSyntax.JSXSpreadAttribute,this.argument=a}return n}();e.JSXSpreadAttribute=t;var i=function(){function n(a,x){this.type=s.JSXSyntax.JSXText,this.value=a,this.raw=x}return n}();e.JSXText=i},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(2),h=function(){function g(v){this.type=s.Syntax.ArrayExpression,this.elements=v}return g}();e.ArrayExpression=h;var l=function(){function g(v){this.type=s.Syntax.ArrayPattern,this.elements=v}return g}();e.ArrayPattern=l;var o=function(){function g(v,A,k){this.type=s.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=k,this.async=!1}return g}();e.ArrowFunctionExpression=o;var D=function(){function g(v,A,k){this.type=s.Syntax.AssignmentExpression,this.operator=v,this.left=A,this.right=k}return g}();e.AssignmentExpression=D;var m=function(){function g(v,A){this.type=s.Syntax.AssignmentPattern,this.left=v,this.right=A}return g}();e.AssignmentPattern=m;var f=function(){function g(v,A,k){this.type=s.Syntax.ArrowFunctionExpression,this.id=null,this.params=v,this.body=A,this.generator=!1,this.expression=k,this.async=!0}return g}();e.AsyncArrowFunctionExpression=f;var p=function(){function g(v,A,k){this.type=s.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=k,this.generator=!1,this.expression=!1,this.async=!0}return g}();e.AsyncFunctionDeclaration=p;var d=function(){function g(v,A,k){this.type=s.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=k,this.generator=!1,this.expression=!1,this.async=!0}return g}();e.AsyncFunctionExpression=d;var c=function(){function g(v){this.type=s.Syntax.AwaitExpression,this.argument=v}return g}();e.AwaitExpression=c;var t=function(){function g(v,A,k){var M=v==="||"||v==="&&";this.type=M?s.Syntax.LogicalExpression:s.Syntax.BinaryExpression,this.operator=v,this.left=A,this.right=k}return g}();e.BinaryExpression=t;var i=function(){function g(v){this.type=s.Syntax.BlockStatement,this.body=v}return g}();e.BlockStatement=i;var n=function(){function g(v){this.type=s.Syntax.BreakStatement,this.label=v}return g}();e.BreakStatement=n;var a=function(){function g(v,A){this.type=s.Syntax.CallExpression,this.callee=v,this.arguments=A}return g}();e.CallExpression=a;var x=function(){function g(v,A){this.type=s.Syntax.CatchClause,this.param=v,this.body=A}return g}();e.CatchClause=x;var E=function(){function g(v){this.type=s.Syntax.ClassBody,this.body=v}return g}();e.ClassBody=E;var C=function(){function g(v,A,k){this.type=s.Syntax.ClassDeclaration,this.id=v,this.superClass=A,this.body=k}return g}();e.ClassDeclaration=C;var y=function(){function g(v,A,k){this.type=s.Syntax.ClassExpression,this.id=v,this.superClass=A,this.body=k}return g}();e.ClassExpression=y;var S=function(){function g(v,A){this.type=s.Syntax.MemberExpression,this.computed=!0,this.object=v,this.property=A}return g}();e.ComputedMemberExpression=S;var w=function(){function g(v,A,k){this.type=s.Syntax.ConditionalExpression,this.test=v,this.consequent=A,this.alternate=k}return g}();e.ConditionalExpression=w;var b=function(){function g(v){this.type=s.Syntax.ContinueStatement,this.label=v}return g}();e.ContinueStatement=b;var B=function(){function g(){this.type=s.Syntax.DebuggerStatement}return g}();e.DebuggerStatement=B;var T=function(){function g(v,A){this.type=s.Syntax.ExpressionStatement,this.expression=v,this.directive=A}return g}();e.Directive=T;var N=function(){function g(v,A){this.type=s.Syntax.DoWhileStatement,this.body=v,this.test=A}return g}();e.DoWhileStatement=N;var O=function(){function g(){this.type=s.Syntax.EmptyStatement}return g}();e.EmptyStatement=O;var q=function(){function g(v){this.type=s.Syntax.ExportAllDeclaration,this.source=v}return g}();e.ExportAllDeclaration=q;var ye=function(){function g(v){this.type=s.Syntax.ExportDefaultDeclaration,this.declaration=v}return g}();e.ExportDefaultDeclaration=ye;var Ri=function(){function g(v,A,k){this.type=s.Syntax.ExportNamedDeclaration,this.declaration=v,this.specifiers=A,this.source=k}return g}();e.ExportNamedDeclaration=Ri;var Xi=function(){function g(v,A){this.type=s.Syntax.ExportSpecifier,this.exported=A,this.local=v}return g}();e.ExportSpecifier=Xi;var Ji=function(){function g(v){this.type=s.Syntax.ExpressionStatement,this.expression=v}return g}();e.ExpressionStatement=Ji;var Ui=function(){function g(v,A,k){this.type=s.Syntax.ForInStatement,this.left=v,this.right=A,this.body=k,this.each=!1}return g}();e.ForInStatement=Ui;var zi=function(){function g(v,A,k){this.type=s.Syntax.ForOfStatement,this.left=v,this.right=A,this.body=k}return g}();e.ForOfStatement=zi;var Hi=function(){function g(v,A,k,M){this.type=s.Syntax.ForStatement,this.init=v,this.test=A,this.update=k,this.body=M}return g}();e.ForStatement=Hi;var ji=function(){function g(v,A,k,M){this.type=s.Syntax.FunctionDeclaration,this.id=v,this.params=A,this.body=k,this.generator=M,this.expression=!1,this.async=!1}return g}();e.FunctionDeclaration=ji;var Vi=function(){function g(v,A,k,M){this.type=s.Syntax.FunctionExpression,this.id=v,this.params=A,this.body=k,this.generator=M,this.expression=!1,this.async=!1}return g}();e.FunctionExpression=Vi;var Ki=function(){function g(v){this.type=s.Syntax.Identifier,this.name=v}return g}();e.Identifier=Ki;var $i=function(){function g(v,A,k){this.type=s.Syntax.IfStatement,this.test=v,this.consequent=A,this.alternate=k}return g}();e.IfStatement=$i;var Gi=function(){function g(v,A){this.type=s.Syntax.ImportDeclaration,this.specifiers=v,this.source=A}return g}();e.ImportDeclaration=Gi;var Wi=function(){function g(v){this.type=s.Syntax.ImportDefaultSpecifier,this.local=v}return g}();e.ImportDefaultSpecifier=Wi;var qi=function(){function g(v){this.type=s.Syntax.ImportNamespaceSpecifier,this.local=v}return g}();e.ImportNamespaceSpecifier=qi;var Yi=function(){function g(v,A){this.type=s.Syntax.ImportSpecifier,this.local=v,this.imported=A}return g}();e.ImportSpecifier=Yi;var Qi=function(){function g(v,A){this.type=s.Syntax.LabeledStatement,this.label=v,this.body=A}return g}();e.LabeledStatement=Qi;var Zi=function(){function g(v,A){this.type=s.Syntax.Literal,this.value=v,this.raw=A}return g}();e.Literal=Zi;var er=function(){function g(v,A){this.type=s.Syntax.MetaProperty,this.meta=v,this.property=A}return g}();e.MetaProperty=er;var tr=function(){function g(v,A,k,M,Se){this.type=s.Syntax.MethodDefinition,this.key=v,this.computed=A,this.value=k,this.kind=M,this.static=Se}return g}();e.MethodDefinition=tr;var ir=function(){function g(v){this.type=s.Syntax.Program,this.body=v,this.sourceType="module"}return g}();e.Module=ir;var rr=function(){function g(v,A){this.type=s.Syntax.NewExpression,this.callee=v,this.arguments=A}return g}();e.NewExpression=rr;var sr=function(){function g(v){this.type=s.Syntax.ObjectExpression,this.properties=v}return g}();e.ObjectExpression=sr;var nr=function(){function g(v){this.type=s.Syntax.ObjectPattern,this.properties=v}return g}();e.ObjectPattern=nr;var ar=function(){function g(v,A,k,M,Se,Tr){this.type=s.Syntax.Property,this.key=A,this.computed=k,this.value=M,this.kind=v,this.method=Se,this.shorthand=Tr}return g}();e.Property=ar;var or=function(){function g(v,A,k,M){this.type=s.Syntax.Literal,this.value=v,this.raw=A,this.regex={pattern:k,flags:M}}return g}();e.RegexLiteral=or;var ur=function(){function g(v){this.type=s.Syntax.RestElement,this.argument=v}return g}();e.RestElement=ur;var hr=function(){function g(v){this.type=s.Syntax.ReturnStatement,this.argument=v}return g}();e.ReturnStatement=hr;var lr=function(){function g(v){this.type=s.Syntax.Program,this.body=v,this.sourceType="script"}return g}();e.Script=lr;var cr=function(){function g(v){this.type=s.Syntax.SequenceExpression,this.expressions=v}return g}();e.SequenceExpression=cr;var pr=function(){function g(v){this.type=s.Syntax.SpreadElement,this.argument=v}return g}();e.SpreadElement=pr;var fr=function(){function g(v,A){this.type=s.Syntax.MemberExpression,this.computed=!1,this.object=v,this.property=A}return g}();e.StaticMemberExpression=fr;var mr=function(){function g(){this.type=s.Syntax.Super}return g}();e.Super=mr;var dr=function(){function g(v,A){this.type=s.Syntax.SwitchCase,this.test=v,this.consequent=A}return g}();e.SwitchCase=dr;var xr=function(){function g(v,A){this.type=s.Syntax.SwitchStatement,this.discriminant=v,this.cases=A}return g}();e.SwitchStatement=xr;var Dr=function(){function g(v,A){this.type=s.Syntax.TaggedTemplateExpression,this.tag=v,this.quasi=A}return g}();e.TaggedTemplateExpression=Dr;var Er=function(){function g(v,A){this.type=s.Syntax.TemplateElement,this.value=v,this.tail=A}return g}();e.TemplateElement=Er;var gr=function(){function g(v,A){this.type=s.Syntax.TemplateLiteral,this.quasis=v,this.expressions=A}return g}();e.TemplateLiteral=gr;var vr=function(){function g(){this.type=s.Syntax.ThisExpression}return g}();e.ThisExpression=vr;var Cr=function(){function g(v){this.type=s.Syntax.ThrowStatement,this.argument=v}return g}();e.ThrowStatement=Cr;var Ar=function(){function g(v,A,k){this.type=s.Syntax.TryStatement,this.block=v,this.handler=A,this.finalizer=k}return g}();e.TryStatement=Ar;var yr=function(){function g(v,A){this.type=s.Syntax.UnaryExpression,this.operator=v,this.argument=A,this.prefix=!0}return g}();e.UnaryExpression=yr;var Sr=function(){function g(v,A,k){this.type=s.Syntax.UpdateExpression,this.operator=v,this.argument=A,this.prefix=k}return g}();e.UpdateExpression=Sr;var Fr=function(){function g(v,A){this.type=s.Syntax.VariableDeclaration,this.declarations=v,this.kind=A}return g}();e.VariableDeclaration=Fr;var wr=function(){function g(v,A){this.type=s.Syntax.VariableDeclarator,this.id=v,this.init=A}return g}();e.VariableDeclarator=wr;var br=function(){function g(v,A){this.type=s.Syntax.WhileStatement,this.test=v,this.body=A}return g}();e.WhileStatement=br;var kr=function(){function g(v,A){this.type=s.Syntax.WithStatement,this.object=v,this.body=A}return g}();e.WithStatement=kr;var Br=function(){function g(v,A){this.type=s.Syntax.YieldExpression,this.argument=v,this.delegate=A}return g}();e.YieldExpression=Br},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(9),h=r(10),l=r(11),o=r(7),D=r(12),m=r(2),f=r(13),p="ArrowParameterPlaceHolder",d=function(){function c(t,i,n){i===void 0&&(i={}),this.config={range:typeof i.range=="boolean"&&i.range,loc:typeof i.loc=="boolean"&&i.loc,source:null,tokens:typeof i.tokens=="boolean"&&i.tokens,comment:typeof i.comment=="boolean"&&i.comment,tolerant:typeof i.tolerant=="boolean"&&i.tolerant},this.config.loc&&i.source&&i.source!==null&&(this.config.source=String(i.source)),this.delegate=n,this.errorHandler=new h.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new D.Scanner(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return c.prototype.throwError=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var a=Array.prototype.slice.call(arguments,1),x=t.replace(/%(\d)/g,function(S,w){return s.assert(w<a.length,"Message reference must be in range"),a[w]}),E=this.lastMarker.index,C=this.lastMarker.line,y=this.lastMarker.column+1;throw this.errorHandler.createError(E,C,y,x)},c.prototype.tolerateError=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var a=Array.prototype.slice.call(arguments,1),x=t.replace(/%(\d)/g,function(S,w){return s.assert(w<a.length,"Message reference must be in range"),a[w]}),E=this.lastMarker.index,C=this.scanner.lineNumber,y=this.lastMarker.column+1;this.errorHandler.tolerateError(E,C,y,x)},c.prototype.unexpectedTokenError=function(t,i){var n=i||l.Messages.UnexpectedToken,a;if(t?(i||(n=t.type===2?l.Messages.UnexpectedEOS:t.type===3?l.Messages.UnexpectedIdentifier:t.type===6?l.Messages.UnexpectedNumber:t.type===8?l.Messages.UnexpectedString:t.type===10?l.Messages.UnexpectedTemplate:l.Messages.UnexpectedToken,t.type===4&&(this.scanner.isFutureReservedWord(t.value)?n=l.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(t.value)&&(n=l.Messages.StrictReservedWord))),a=t.value):a="ILLEGAL",n=n.replace("%0",a),t&&typeof t.lineNumber=="number"){var x=t.start,E=t.lineNumber,C=this.lastMarker.index-this.lastMarker.column,y=t.start-C+1;return this.errorHandler.createError(x,E,y,n)}else{var x=this.lastMarker.index,E=this.lastMarker.line,y=this.lastMarker.column+1;return this.errorHandler.createError(x,E,y,n)}},c.prototype.throwUnexpectedToken=function(t,i){throw this.unexpectedTokenError(t,i)},c.prototype.tolerateUnexpectedToken=function(t,i){this.errorHandler.tolerate(this.unexpectedTokenError(t,i))},c.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var t=this.scanner.scanComments();if(t.length>0&&this.delegate)for(var i=0;i<t.length;++i){var n=t[i],a=void 0;a={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(a.range=n.range),this.config.loc&&(a.loc=n.loc);var x={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(a,x)}}},c.prototype.getTokenRaw=function(t){return this.scanner.source.slice(t.start,t.end)},c.prototype.convertToken=function(t){var i={type:f.TokenName[t.type],value:this.getTokenRaw(t)};if(this.config.range&&(i.range=[t.start,t.end]),this.config.loc&&(i.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),t.type===9){var n=t.pattern,a=t.flags;i.regex={pattern:n,flags:a}}return i},c.prototype.nextToken=function(){var t=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var i=this.scanner.lex();return this.hasLineTerminator=t.lineNumber!==i.lineNumber,i&&this.context.strict&&i.type===3&&this.scanner.isStrictModeReservedWord(i.value)&&(i.type=4),this.lookahead=i,this.config.tokens&&i.type!==2&&this.tokens.push(this.convertToken(i)),t},c.prototype.nextRegexToken=function(){this.collectComments();var t=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(t))),this.lookahead=t,this.nextToken(),t},c.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},c.prototype.startNode=function(t,i){i===void 0&&(i=0);var n=t.start-t.lineStart,a=t.lineNumber;return n<0&&(n+=i,a--),{index:t.start,line:a,column:n}},c.prototype.finalize=function(t,i){if(this.config.range&&(i.range=[t.index,this.lastMarker.index]),this.config.loc&&(i.loc={start:{line:t.line,column:t.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(i.loc.source=this.config.source)),this.delegate){var n={start:{line:t.line,column:t.column,offset:t.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(i,n)}return i},c.prototype.expect=function(t){var i=this.nextToken();(i.type!==7||i.value!==t)&&this.throwUnexpectedToken(i)},c.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var t=this.lookahead;t.type===7&&t.value===","?this.nextToken():t.type===7&&t.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(t)):this.tolerateUnexpectedToken(t,l.Messages.UnexpectedToken)}else this.expect(",")},c.prototype.expectKeyword=function(t){var i=this.nextToken();(i.type!==4||i.value!==t)&&this.throwUnexpectedToken(i)},c.prototype.match=function(t){return this.lookahead.type===7&&this.lookahead.value===t},c.prototype.matchKeyword=function(t){return this.lookahead.type===4&&this.lookahead.value===t},c.prototype.matchContextualKeyword=function(t){return this.lookahead.type===3&&this.lookahead.value===t},c.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var t=this.lookahead.value;return t==="="||t==="*="||t==="**="||t==="/="||t==="%="||t==="+="||t==="-="||t==="<<="||t===">>="||t===">>>="||t==="&="||t==="^="||t==="|="},c.prototype.isolateCoverGrammar=function(t){var i=this.context.isBindingElement,n=this.context.isAssignmentTarget,a=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=t.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=i,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=a,x},c.prototype.inheritCoverGrammar=function(t){var i=this.context.isBindingElement,n=this.context.isAssignmentTarget,a=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&i,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=a||this.context.firstCoverInitializedNameError,x},c.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},c.prototype.parsePrimaryExpression=function(){var t=this.createNode(),i,n,a;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),i=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(t,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(n.value,a));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(n.value==="true",a));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.Literal(null,a));break;case 10:i=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,i=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":i=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":i=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),a=this.getTokenRaw(n),i=this.finalize(t,new o.RegexLiteral(n.regex,a,n.pattern,n.flags));break;default:i=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?i=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?i=this.finalize(t,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?i=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),i=this.finalize(t,new o.ThisExpression)):this.matchKeyword("class")?i=this.parseClassExpression():i=this.throwUnexpectedToken(this.nextToken()));break;default:i=this.throwUnexpectedToken(this.nextToken())}return i},c.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var i=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new o.SpreadElement(i))},c.prototype.parseArrayInitializer=function(){var t=this.createNode(),i=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),i.push(n)}else i.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new o.ArrayExpression(i))},c.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var a=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=i,this.context.allowStrictDirective=n,a},c.prototype.parsePropertyMethodFunction=function(){var t=!1,i=this.createNode(),n=this.context.allowYield;this.context.allowYield=!0;var a=this.parseFormalParameters(),x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(i,new o.FunctionExpression(null,a.params,x,t))},c.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),i=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var a=this.parseFormalParameters(),x=this.parsePropertyMethod(a);return this.context.allowYield=i,this.context.await=n,this.finalize(t,new o.AsyncFunctionExpression(null,a.params,x))},c.prototype.parseObjectPropertyKey=function(){var t=this.createNode(),i=this.nextToken(),n;switch(i.type){case 8:case 6:this.context.strict&&i.octal&&this.tolerateUnexpectedToken(i,l.Messages.StrictOctalLiteral);var a=this.getTokenRaw(i);n=this.finalize(t,new o.Literal(i.value,a));break;case 3:case 1:case 5:case 4:n=this.finalize(t,new o.Identifier(i.value));break;case 7:i.value==="["?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(i);break;default:n=this.throwUnexpectedToken(i)}return n},c.prototype.isPropertyKey=function(t,i){return t.type===m.Syntax.Identifier&&t.name===i||t.type===m.Syntax.Literal&&t.value===i},c.prototype.parseObjectProperty=function(t){var i=this.createNode(),n=this.lookahead,a,x=null,E=null,C=!1,y=!1,S=!1,w=!1;if(n.type===3){var b=n.value;this.nextToken(),C=this.match("["),w=!this.hasLineTerminator&&b==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),x=w?this.parseObjectPropertyKey():this.finalize(i,new o.Identifier(b))}else this.match("*")?this.nextToken():(C=this.match("["),x=this.parseObjectPropertyKey());var B=this.qualifiedPropertyName(this.lookahead);if(n.type===3&&!w&&n.value==="get"&&B)a="get",C=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,E=this.parseGetterMethod();else if(n.type===3&&!w&&n.value==="set"&&B)a="set",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseSetterMethod();else if(n.type===7&&n.value==="*"&&B)a="init",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseGeneratorMethod(),y=!0;else if(x||this.throwUnexpectedToken(this.lookahead),a="init",this.match(":")&&!w)!C&&this.isPropertyKey(x,"__proto__")&&(t.value&&this.tolerateError(l.Messages.DuplicateProtoProperty),t.value=!0),this.nextToken(),E=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))E=w?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),y=!0;else if(n.type===3){var b=this.finalize(i,new o.Identifier(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),S=!0;var T=this.isolateCoverGrammar(this.parseAssignmentExpression);E=this.finalize(i,new o.AssignmentPattern(b,T))}else S=!0,E=b}else this.throwUnexpectedToken(this.nextToken());return this.finalize(i,new o.Property(a,x,C,E,y,S))},c.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var i=[],n={value:!1};!this.match("}");)i.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new o.ObjectExpression(i))},c.prototype.parseTemplateHead=function(){s.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),i=this.nextToken(),n=i.value,a=i.cooked;return this.finalize(t,new o.TemplateElement({raw:n,cooked:a},i.tail))},c.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var t=this.createNode(),i=this.nextToken(),n=i.value,a=i.cooked;return this.finalize(t,new o.TemplateElement({raw:n,cooked:a},i.tail))},c.prototype.parseTemplateLiteral=function(){var t=this.createNode(),i=[],n=[],a=this.parseTemplateHead();for(n.push(a);!a.tail;)i.push(this.parseExpression()),a=this.parseTemplateElement(),n.push(a);return this.finalize(t,new o.TemplateLiteral(n,i))},c.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case m.Syntax.Identifier:case m.Syntax.MemberExpression:case m.Syntax.RestElement:case m.Syntax.AssignmentPattern:break;case m.Syntax.SpreadElement:t.type=m.Syntax.RestElement,this.reinterpretExpressionAsPattern(t.argument);break;case m.Syntax.ArrayExpression:t.type=m.Syntax.ArrayPattern;for(var i=0;i<t.elements.length;i++)t.elements[i]!==null&&this.reinterpretExpressionAsPattern(t.elements[i]);break;case m.Syntax.ObjectExpression:t.type=m.Syntax.ObjectPattern;for(var i=0;i<t.properties.length;i++)this.reinterpretExpressionAsPattern(t.properties[i].value);break;case m.Syntax.AssignmentExpression:t.type=m.Syntax.AssignmentPattern,delete t.operator,this.reinterpretExpressionAsPattern(t.left);break;default:break}},c.prototype.parseGroupExpression=function(){var t;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),t={type:p,params:[],async:!1};else{var i=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:p,params:[t],async:!1};else{var a=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var x=[];for(this.context.isAssignmentTarget=!1,x.push(t);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var E=0;E<x.length;E++)this.reinterpretExpressionAsPattern(x[E]);a=!0,t={type:p,params:x,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),x.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var E=0;E<x.length;E++)this.reinterpretExpressionAsPattern(x[E]);a=!0,t={type:p,params:x,async:!1}}else x.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(a)break}a||(t=this.finalize(this.startNode(i),new o.SequenceExpression(x)))}if(!a){if(this.expect(")"),this.match("=>")&&(t.type===m.Syntax.Identifier&&t.name==="yield"&&(a=!0,t={type:p,params:[t],async:!1}),!a)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),t.type===m.Syntax.SequenceExpression)for(var E=0;E<t.expressions.length;E++)this.reinterpretExpressionAsPattern(t.expressions[E]);else this.reinterpretExpressionAsPattern(t);var C=t.type===m.Syntax.SequenceExpression?t.expressions:[t];t={type:p,params:C,async:!1}}this.context.isBindingElement=!1}}}return t},c.prototype.parseArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var i=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(t.push(i),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),t},c.prototype.isIdentifierName=function(t){return t.type===3||t.type===4||t.type===1||t.type===5},c.prototype.parseIdentifierName=function(){var t=this.createNode(),i=this.nextToken();return this.isIdentifierName(i)||this.throwUnexpectedToken(i),this.finalize(t,new o.Identifier(i.value))},c.prototype.parseNewExpression=function(){var t=this.createNode(),i=this.parseIdentifierName();s.assert(i.name==="new","New expression must start with `new`");var n;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var a=this.parseIdentifierName();n=new o.MetaProperty(i,a)}else this.throwUnexpectedToken(this.lookahead);else{var x=this.isolateCoverGrammar(this.parseLeftHandSideExpression),E=this.match("(")?this.parseArguments():[];n=new o.NewExpression(x,E),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,n)},c.prototype.parseAsyncArgument=function(){var t=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,t},c.prototype.parseAsyncArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var i=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(t.push(i),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),t},c.prototype.parseLeftHandSideExpressionAllowCall=function(){var t=this.lookahead,i=this.matchContextualKeyword("async"),n=this.context.allowIn;this.context.allowIn=!0;var a;for(this.matchKeyword("super")&&this.context.inFunctionBody?(a=this.createNode(),this.nextToken(),a=this.finalize(a,new o.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):a=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var x=this.parseIdentifierName();a=this.finalize(this.startNode(t),new o.StaticMemberExpression(a,x))}else if(this.match("(")){var E=i&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var C=E?this.parseAsyncArguments():this.parseArguments();if(a=this.finalize(this.startNode(t),new o.CallExpression(a,C)),E&&this.match("=>")){for(var y=0;y<C.length;++y)this.reinterpretExpressionAsPattern(C[y]);a={type:p,params:C,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var x=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),a=this.finalize(this.startNode(t),new o.ComputedMemberExpression(a,x))}else if(this.lookahead.type===10&&this.lookahead.head){var S=this.parseTemplateLiteral();a=this.finalize(this.startNode(t),new o.TaggedTemplateExpression(a,S))}else break;return this.context.allowIn=n,a},c.prototype.parseSuper=function(){var t=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(t,new o.Super)},c.prototype.parseLeftHandSideExpression=function(){s.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var t=this.startNode(this.lookahead),i=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),i=this.finalize(t,new o.ComputedMemberExpression(i,n))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var n=this.parseIdentifierName();i=this.finalize(t,new o.StaticMemberExpression(i,n))}else if(this.lookahead.type===10&&this.lookahead.head){var a=this.parseTemplateLiteral();i=this.finalize(t,new o.TaggedTemplateExpression(i,a))}else break;return i},c.prototype.parseUpdateExpression=function(){var t,i=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(i),a=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&t.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(l.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment);var x=!0;t=this.finalize(n,new o.UpdateExpression(a.value,t,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(t=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&t.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(l.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var E=this.nextToken().value,x=!1;t=this.finalize(this.startNode(i),new o.UpdateExpression(E,t,x))}return t},c.prototype.parseAwaitExpression=function(){var t=this.createNode();this.nextToken();var i=this.parseUnaryExpression();return this.finalize(t,new o.AwaitExpression(i))},c.prototype.parseUnaryExpression=function(){var t;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var i=this.startNode(this.lookahead),n=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),t=this.finalize(i,new o.UnaryExpression(n.value,t)),this.context.strict&&t.operator==="delete"&&t.argument.type===m.Syntax.Identifier&&this.tolerateError(l.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?t=this.parseAwaitExpression():t=this.parseUpdateExpression();return t},c.prototype.parseExponentiationExpression=function(){var t=this.lookahead,i=this.inheritCoverGrammar(this.parseUnaryExpression);if(i.type!==m.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=i,a=this.isolateCoverGrammar(this.parseExponentiationExpression);i=this.finalize(this.startNode(t),new o.BinaryExpression("**",n,a))}return i},c.prototype.binaryPrecedence=function(t){var i=t.value,n;return t.type===7?n=this.operatorPrecedence[i]||0:t.type===4?n=i==="instanceof"||this.context.allowIn&&i==="in"?7:0:n=0,n},c.prototype.parseBinaryExpression=function(){var t=this.lookahead,i=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,a=this.binaryPrecedence(n);if(a>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var x=[t,this.lookahead],E=i,C=this.isolateCoverGrammar(this.parseExponentiationExpression),y=[E,n.value,C],S=[a];a=this.binaryPrecedence(this.lookahead),!(a<=0);){for(;y.length>2&&a<=S[S.length-1];){C=y.pop();var w=y.pop();S.pop(),E=y.pop(),x.pop();var b=this.startNode(x[x.length-1]);y.push(this.finalize(b,new o.BinaryExpression(w,E,C)))}y.push(this.nextToken().value),S.push(a),x.push(this.lookahead),y.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var B=y.length-1;i=y[B];for(var T=x.pop();B>1;){var N=x.pop(),O=T&&T.lineStart,b=this.startNode(N,O),w=y[B-1];i=this.finalize(b,new o.BinaryExpression(w,y[B-2],i)),B-=2,T=N}}return i},c.prototype.parseConditionalExpression=function(){var t=this.lookahead,i=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var x=this.isolateCoverGrammar(this.parseAssignmentExpression);i=this.finalize(this.startNode(t),new o.ConditionalExpression(i,a,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return i},c.prototype.checkPatternParam=function(t,i){switch(i.type){case m.Syntax.Identifier:this.validateParam(t,i,i.name);break;case m.Syntax.RestElement:this.checkPatternParam(t,i.argument);break;case m.Syntax.AssignmentPattern:this.checkPatternParam(t,i.left);break;case m.Syntax.ArrayPattern:for(var n=0;n<i.elements.length;n++)i.elements[n]!==null&&this.checkPatternParam(t,i.elements[n]);break;case m.Syntax.ObjectPattern:for(var n=0;n<i.properties.length;n++)this.checkPatternParam(t,i.properties[n].value);break;default:break}t.simple=t.simple&&i instanceof o.Identifier},c.prototype.reinterpretAsCoverFormalsList=function(t){var i=[t],n,a=!1;switch(t.type){case m.Syntax.Identifier:break;case p:i=t.params,a=t.async;break;default:return null}n={simple:!0,paramSet:{}};for(var x=0;x<i.length;++x){var E=i[x];E.type===m.Syntax.AssignmentPattern?E.right.type===m.Syntax.YieldExpression&&(E.right.argument&&this.throwUnexpectedToken(this.lookahead),E.right.type=m.Syntax.Identifier,E.right.name="yield",delete E.right.argument,delete E.right.delegate):a&&E.type===m.Syntax.Identifier&&E.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(n,E),i[x]=E}if(this.context.strict||!this.context.allowYield)for(var x=0;x<i.length;++x){var E=i[x];E.type===m.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(n.message===l.Messages.StrictParamDupe){var C=this.context.strict?n.stricted:n.firstRestricted;this.throwUnexpectedToken(C,n.message)}return{simple:n.simple,params:i,stricted:n.stricted,firstRestricted:n.firstRestricted,message:n.message}},c.prototype.parseAssignmentExpression=function(){var t;if(!this.context.allowYield&&this.matchKeyword("yield"))t=this.parseYieldExpression();else{var i=this.lookahead,n=i;if(t=this.parseConditionalExpression(),n.type===3&&n.lineNumber===this.lookahead.lineNumber&&n.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var a=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(a),t={type:p,params:[a],async:!0}}if(t.type===p||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=t.async,E=this.reinterpretAsCoverFormalsList(t);if(E){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var C=this.context.strict,y=this.context.allowStrictDirective;this.context.allowStrictDirective=E.simple;var S=this.context.allowYield,w=this.context.await;this.context.allowYield=!0,this.context.await=x;var b=this.startNode(i);this.expect("=>");var B=void 0;if(this.match("{")){var T=this.context.allowIn;this.context.allowIn=!0,B=this.parseFunctionSourceElements(),this.context.allowIn=T}else B=this.isolateCoverGrammar(this.parseAssignmentExpression);var N=B.type!==m.Syntax.BlockStatement;this.context.strict&&E.firstRestricted&&this.throwUnexpectedToken(E.firstRestricted,E.message),this.context.strict&&E.stricted&&this.tolerateUnexpectedToken(E.stricted,E.message),t=x?this.finalize(b,new o.AsyncArrowFunctionExpression(E.params,B,N)):this.finalize(b,new o.ArrowFunctionExpression(E.params,B,N)),this.context.strict=C,this.context.allowStrictDirective=y,this.context.allowYield=S,this.context.await=w}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(l.Messages.InvalidLHSInAssignment),this.context.strict&&t.type===m.Syntax.Identifier){var O=t;this.scanner.isRestrictedWord(O.name)&&this.tolerateUnexpectedToken(n,l.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(O.name)&&this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var q=n.value,ye=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(i),new o.AssignmentExpression(q,t,ye)),this.context.firstCoverInitializedNameError=null}}return t},c.prototype.parseExpression=function(){var t=this.lookahead,i=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(i);this.lookahead.type!==2&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(t),new o.SequenceExpression(n))}return i},c.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.Messages.IllegalExportDeclaration),t=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,l.Messages.IllegalImportDeclaration),t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement();break}else t=this.parseStatement();return t},c.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var i=[];!this.match("}");)i.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new o.BlockStatement(i))},c.prototype.parseLexicalBinding=function(t,i){var n=this.createNode(),a=[],x=this.parsePattern(a,t);this.context.strict&&x.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(x.name)&&this.tolerateError(l.Messages.StrictVarName);var E=null;return t==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),E=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(l.Messages.DeclarationMissingInitializer,"const")):(!i.inFor&&x.type!==m.Syntax.Identifier||this.match("="))&&(this.expect("="),E=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(x,E))},c.prototype.parseBindingList=function(t,i){for(var n=[this.parseLexicalBinding(t,i)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(t,i));return n},c.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var i=this.scanner.lex();return this.scanner.restoreState(t),i.type===3||i.type===7&&i.value==="["||i.type===7&&i.value==="{"||i.type===4&&i.value==="let"||i.type===4&&i.value==="yield"},c.prototype.parseLexicalDeclaration=function(t){var i=this.createNode(),n=this.nextToken().value;s.assert(n==="let"||n==="const","Lexical declaration must be either let or const");var a=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(i,new o.VariableDeclaration(a,n))},c.prototype.parseBindingRestElement=function(t,i){var n=this.createNode();this.expect("...");var a=this.parsePattern(t,i);return this.finalize(n,new o.RestElement(a))},c.prototype.parseArrayPattern=function(t,i){var n=this.createNode();this.expect("[");for(var a=[];!this.match("]");)if(this.match(","))this.nextToken(),a.push(null);else{if(this.match("...")){a.push(this.parseBindingRestElement(t,i));break}else a.push(this.parsePatternWithDefault(t,i));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(a))},c.prototype.parsePropertyPattern=function(t,i){var n=this.createNode(),a=!1,x=!1,E=!1,C,y;if(this.lookahead.type===3){var S=this.lookahead;C=this.parseVariableIdentifier();var w=this.finalize(n,new o.Identifier(S.value));if(this.match("=")){t.push(S),x=!0,this.nextToken();var b=this.parseAssignmentExpression();y=this.finalize(this.startNode(S),new o.AssignmentPattern(w,b))}else this.match(":")?(this.expect(":"),y=this.parsePatternWithDefault(t,i)):(t.push(S),x=!0,y=w)}else a=this.match("["),C=this.parseObjectPropertyKey(),this.expect(":"),y=this.parsePatternWithDefault(t,i);return this.finalize(n,new o.Property("init",C,a,y,E,x))},c.prototype.parseObjectPattern=function(t,i){var n=this.createNode(),a=[];for(this.expect("{");!this.match("}");)a.push(this.parsePropertyPattern(t,i)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(a))},c.prototype.parsePattern=function(t,i){var n;return this.match("[")?n=this.parseArrayPattern(t,i):this.match("{")?n=this.parseObjectPattern(t,i):(this.matchKeyword("let")&&(i==="const"||i==="let")&&this.tolerateUnexpectedToken(this.lookahead,l.Messages.LetInLexicalBinding),t.push(this.lookahead),n=this.parseVariableIdentifier(i)),n},c.prototype.parsePatternWithDefault=function(t,i){var n=this.lookahead,a=this.parsePattern(t,i);if(this.match("=")){this.nextToken();var x=this.context.allowYield;this.context.allowYield=!0;var E=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=x,a=this.finalize(this.startNode(n),new o.AssignmentPattern(a,E))}return a},c.prototype.parseVariableIdentifier=function(t){var i=this.createNode(),n=this.nextToken();return n.type===4&&n.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):n.type!==3?this.context.strict&&n.type===4&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,l.Messages.StrictReservedWord):(this.context.strict||n.value!=="let"||t!=="var")&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&n.type===3&&n.value==="await"&&this.tolerateUnexpectedToken(n),this.finalize(i,new o.Identifier(n.value))},c.prototype.parseVariableDeclaration=function(t){var i=this.createNode(),n=[],a=this.parsePattern(n,"var");this.context.strict&&a.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(l.Messages.StrictVarName);var x=null;return this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):a.type!==m.Syntax.Identifier&&!t.inFor&&this.expect("="),this.finalize(i,new o.VariableDeclarator(a,x))},c.prototype.parseVariableDeclarationList=function(t){var i={inFor:t.inFor},n=[];for(n.push(this.parseVariableDeclaration(i));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(i));return n},c.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var i=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(i,"var"))},c.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new o.EmptyStatement)},c.prototype.parseExpressionStatement=function(){var t=this.createNode(),i=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ExpressionStatement(i))},c.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(l.Messages.StrictFunction),this.parseStatement()},c.prototype.parseIfStatement=function(){var t=this.createNode(),i,n=null;this.expectKeyword("if"),this.expect("(");var a=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),i=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new o.IfStatement(a,i,n))},c.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var i=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=i,this.expectKeyword("while"),this.expect("(");var a=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new o.DoWhileStatement(n,a))},c.prototype.parseWhileStatement=function(){var t=this.createNode(),i;this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var a=this.context.inIteration;this.context.inIteration=!0,i=this.parseStatement(),this.context.inIteration=a}return this.finalize(t,new o.WhileStatement(n,i))},c.prototype.parseForStatement=function(){var t=null,i=null,n=null,a=!0,x,E,C=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){t=this.createNode(),this.nextToken();var y=this.context.allowIn;this.context.allowIn=!1;var S=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=y,S.length===1&&this.matchKeyword("in")){var w=S[0];w.init&&(w.id.type===m.Syntax.ArrayPattern||w.id.type===m.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(l.Messages.ForInOfLoopInitializer,"for-in"),t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.nextToken(),x=t,E=this.parseExpression(),t=null}else S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.nextToken(),x=t,E=this.parseAssignmentExpression(),t=null,a=!1):(t=this.finalize(t,new o.VariableDeclaration(S,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){t=this.createNode();var b=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")t=this.finalize(t,new o.Identifier(b)),this.nextToken(),x=t,E=this.parseExpression(),t=null;else{var y=this.context.allowIn;this.context.allowIn=!1;var S=this.parseBindingList(b,{inFor:!0});this.context.allowIn=y,S.length===1&&S[0].init===null&&this.matchKeyword("in")?(t=this.finalize(t,new o.VariableDeclaration(S,b)),this.nextToken(),x=t,E=this.parseExpression(),t=null):S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(t=this.finalize(t,new o.VariableDeclaration(S,b)),this.nextToken(),x=t,E=this.parseAssignmentExpression(),t=null,a=!1):(this.consumeSemicolon(),t=this.finalize(t,new o.VariableDeclaration(S,b)))}}else{var B=this.lookahead,y=this.context.allowIn;if(this.context.allowIn=!1,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=y,this.matchKeyword("in"))(!this.context.isAssignmentTarget||t.type===m.Syntax.AssignmentExpression)&&this.tolerateError(l.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(t),x=t,E=this.parseExpression(),t=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||t.type===m.Syntax.AssignmentExpression)&&this.tolerateError(l.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(t),x=t,E=this.parseAssignmentExpression(),t=null,a=!1;else{if(this.match(",")){for(var T=[t];this.match(",");)this.nextToken(),T.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(B),new o.SequenceExpression(T))}this.expect(";")}}typeof x>"u"&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(n=this.parseExpression()));var N;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),N=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var O=this.context.inIteration;this.context.inIteration=!0,N=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=O}return typeof x>"u"?this.finalize(C,new o.ForStatement(t,i,n,N)):a?this.finalize(C,new o.ForInStatement(x,E,N)):this.finalize(C,new o.ForOfStatement(x,E,N))},c.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var i=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();i=n;var a="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,a)||this.throwError(l.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),i===null&&!this.context.inIteration&&this.throwError(l.Messages.IllegalContinue),this.finalize(t,new o.ContinueStatement(i))},c.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var i=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),a="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,a)||this.throwError(l.Messages.UnknownLabel,n.name),i=n}return this.consumeSemicolon(),i===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(l.Messages.IllegalBreak),this.finalize(t,new o.BreakStatement(i))},c.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(l.Messages.IllegalReturn);var t=this.createNode();this.expectKeyword("return");var i=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,n=i?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(t,new o.ReturnStatement(n))},c.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(l.Messages.StrictModeWith);var t=this.createNode(),i;this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),i=this.parseStatement()),this.finalize(t,new o.WithStatement(n,i))},c.prototype.parseSwitchCase=function(){var t=this.createNode(),i;this.matchKeyword("default")?(this.nextToken(),i=null):(this.expectKeyword("case"),i=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new o.SwitchCase(i,n))},c.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var i=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var a=[],x=!1;for(this.expect("{");!this.match("}");){var E=this.parseSwitchCase();E.test===null&&(x&&this.throwError(l.Messages.MultipleDefaultsInSwitch),x=!0),a.push(E)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new o.SwitchStatement(i,a))},c.prototype.parseLabelledStatement=function(){var t=this.createNode(),i=this.parseExpression(),n;if(i.type===m.Syntax.Identifier&&this.match(":")){this.nextToken();var a=i,x="$"+a.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,x)&&this.throwError(l.Messages.Redeclaration,"Label",a.name),this.context.labelSet[x]=!0;var E=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),E=this.parseClassDeclaration();else if(this.matchKeyword("function")){var C=this.lookahead,y=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(C,l.Messages.StrictFunction):y.generator&&this.tolerateUnexpectedToken(C,l.Messages.GeneratorInLegacyContext),E=y}else E=this.parseStatement();delete this.context.labelSet[x],n=new o.LabeledStatement(a,E)}else this.consumeSemicolon(),n=new o.ExpressionStatement(i);return this.finalize(t,n)},c.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(l.Messages.NewlineAfterThrow);var i=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ThrowStatement(i))},c.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var i=[],n=this.parsePattern(i),a={},x=0;x<i.length;x++){var E="$"+i[x].value;Object.prototype.hasOwnProperty.call(a,E)&&this.tolerateError(l.Messages.DuplicateBinding,i[x].value),a[E]=!0}this.context.strict&&n.type===m.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(l.Messages.StrictCatchVariable),this.expect(")");var C=this.parseBlock();return this.finalize(t,new o.CatchClause(n,C))},c.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},c.prototype.parseTryStatement=function(){var t=this.createNode();this.expectKeyword("try");var i=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,a=this.matchKeyword("finally")?this.parseFinallyClause():null;return!n&&!a&&this.throwError(l.Messages.NoCatchOrFinally),this.finalize(t,new o.TryStatement(i,n,a))},c.prototype.parseDebuggerStatement=function(){var t=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(t,new o.DebuggerStatement)},c.prototype.parseStatement=function(){var t;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:t=this.parseExpressionStatement();break;case 7:var i=this.lookahead.value;i==="{"?t=this.parseBlock():i==="("?t=this.parseExpressionStatement():i===";"?t=this.parseEmptyStatement():t=this.parseExpressionStatement();break;case 3:t=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":t=this.parseBreakStatement();break;case"continue":t=this.parseContinueStatement();break;case"debugger":t=this.parseDebuggerStatement();break;case"do":t=this.parseDoWhileStatement();break;case"for":t=this.parseForStatement();break;case"function":t=this.parseFunctionDeclaration();break;case"if":t=this.parseIfStatement();break;case"return":t=this.parseReturnStatement();break;case"switch":t=this.parseSwitchStatement();break;case"throw":t=this.parseThrowStatement();break;case"try":t=this.parseTryStatement();break;case"var":t=this.parseVariableStatement();break;case"while":t=this.parseWhileStatement();break;case"with":t=this.parseWithStatement();break;default:t=this.parseExpressionStatement();break}break;default:t=this.throwUnexpectedToken(this.lookahead)}return t},c.prototype.parseFunctionSourceElements=function(){var t=this.createNode();this.expect("{");var i=this.parseDirectivePrologues(),n=this.context.labelSet,a=this.context.inIteration,x=this.context.inSwitch,E=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)i.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=a,this.context.inSwitch=x,this.context.inFunctionBody=E,this.finalize(t,new o.BlockStatement(i))},c.prototype.validateParam=function(t,i,n){var a="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(t.stricted=i,t.message=l.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(t.paramSet,a)&&(t.stricted=i,t.message=l.Messages.StrictParamDupe)):t.firstRestricted||(this.scanner.isRestrictedWord(n)?(t.firstRestricted=i,t.message=l.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(t.firstRestricted=i,t.message=l.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(t.paramSet,a)&&(t.stricted=i,t.message=l.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(t.paramSet,a,{value:!0,enumerable:!0,writable:!0,configurable:!0}):t.paramSet[a]=!0},c.prototype.parseRestElement=function(t){var i=this.createNode();this.expect("...");var n=this.parsePattern(t);return this.match("=")&&this.throwError(l.Messages.DefaultRestParameter),this.match(")")||this.throwError(l.Messages.ParameterAfterRestParameter),this.finalize(i,new o.RestElement(n))},c.prototype.parseFormalParameter=function(t){for(var i=[],n=this.match("...")?this.parseRestElement(i):this.parsePatternWithDefault(i),a=0;a<i.length;a++)this.validateParam(t,i[a],i[a].value);t.simple=t.simple&&n instanceof o.Identifier,t.params.push(n)},c.prototype.parseFormalParameters=function(t){var i;if(i={simple:!0,params:[],firstRestricted:t},this.expect("("),!this.match(")"))for(i.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(i),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:i.simple,params:i.params,stricted:i.stricted,firstRestricted:i.firstRestricted,message:i.message}},c.prototype.matchAsyncFunction=function(){var t=this.matchContextualKeyword("async");if(t){var i=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(i),t=i.lineNumber===n.lineNumber&&n.type===4&&n.value==="function"}return t},c.prototype.parseFunctionDeclaration=function(t){var i=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var a=n?!1:this.match("*");a&&this.nextToken();var x,E=null,C=null;if(!t||!this.match("(")){var y=this.lookahead;E=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(y.value)&&this.tolerateUnexpectedToken(y,l.Messages.StrictFunctionName):this.scanner.isRestrictedWord(y.value)?(C=y,x=l.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(y.value)&&(C=y,x=l.Messages.StrictReservedWord)}var S=this.context.await,w=this.context.allowYield;this.context.await=n,this.context.allowYield=!a;var b=this.parseFormalParameters(C),B=b.params,T=b.stricted;C=b.firstRestricted,b.message&&(x=b.message);var N=this.context.strict,O=this.context.allowStrictDirective;this.context.allowStrictDirective=b.simple;var q=this.parseFunctionSourceElements();return this.context.strict&&C&&this.throwUnexpectedToken(C,x),this.context.strict&&T&&this.tolerateUnexpectedToken(T,x),this.context.strict=N,this.context.allowStrictDirective=O,this.context.await=S,this.context.allowYield=w,n?this.finalize(i,new o.AsyncFunctionDeclaration(E,B,q)):this.finalize(i,new o.FunctionDeclaration(E,B,q,a))},c.prototype.parseFunctionExpression=function(){var t=this.createNode(),i=this.matchContextualKeyword("async");i&&this.nextToken(),this.expectKeyword("function");var n=i?!1:this.match("*");n&&this.nextToken();var a,x=null,E,C=this.context.await,y=this.context.allowYield;if(this.context.await=i,this.context.allowYield=!n,!this.match("(")){var S=this.lookahead;x=!this.context.strict&&!n&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(S.value)&&this.tolerateUnexpectedToken(S,l.Messages.StrictFunctionName):this.scanner.isRestrictedWord(S.value)?(E=S,a=l.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(S.value)&&(E=S,a=l.Messages.StrictReservedWord)}var w=this.parseFormalParameters(E),b=w.params,B=w.stricted;E=w.firstRestricted,w.message&&(a=w.message);var T=this.context.strict,N=this.context.allowStrictDirective;this.context.allowStrictDirective=w.simple;var O=this.parseFunctionSourceElements();return this.context.strict&&E&&this.throwUnexpectedToken(E,a),this.context.strict&&B&&this.tolerateUnexpectedToken(B,a),this.context.strict=T,this.context.allowStrictDirective=N,this.context.await=C,this.context.allowYield=y,i?this.finalize(t,new o.AsyncFunctionExpression(x,b,O)):this.finalize(t,new o.FunctionExpression(x,b,O,n))},c.prototype.parseDirective=function(){var t=this.lookahead,i=this.createNode(),n=this.parseExpression(),a=n.type===m.Syntax.Literal?this.getTokenRaw(t).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(i,a?new o.Directive(n,a):new o.ExpressionStatement(n))},c.prototype.parseDirectivePrologues=function(){for(var t=null,i=[];;){var n=this.lookahead;if(n.type!==8)break;var a=this.parseDirective();i.push(a);var x=a.directive;if(typeof x!="string")break;x==="use strict"?(this.context.strict=!0,t&&this.tolerateUnexpectedToken(t,l.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,l.Messages.IllegalLanguageModeDirective)):!t&&n.octal&&(t=n)}return i},c.prototype.qualifiedPropertyName=function(t){switch(t.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return t.value==="[";default:break}return!1},c.prototype.parseGetterMethod=function(){var t=this.createNode(),i=!1,n=this.context.allowYield;this.context.allowYield=!i;var a=this.parseFormalParameters();a.params.length>0&&this.tolerateError(l.Messages.BadGetterArity);var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.parseSetterMethod=function(){var t=this.createNode(),i=!1,n=this.context.allowYield;this.context.allowYield=!i;var a=this.parseFormalParameters();a.params.length!==1?this.tolerateError(l.Messages.BadSetterArity):a.params[0]instanceof o.RestElement&&this.tolerateError(l.Messages.BadSetterRestParameter);var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.parseGeneratorMethod=function(){var t=this.createNode(),i=!0,n=this.context.allowYield;this.context.allowYield=!0;var a=this.parseFormalParameters();this.context.allowYield=!1;var x=this.parsePropertyMethod(a);return this.context.allowYield=n,this.finalize(t,new o.FunctionExpression(null,a.params,x,i))},c.prototype.isStartOfExpression=function(){var t=!0,i=this.lookahead.value;switch(this.lookahead.type){case 7:t=i==="["||i==="("||i==="{"||i==="+"||i==="-"||i==="!"||i==="~"||i==="++"||i==="--"||i==="/"||i==="/=";break;case 4:t=i==="class"||i==="delete"||i==="function"||i==="let"||i==="new"||i==="super"||i==="this"||i==="typeof"||i==="void"||i==="yield";break;default:break}return t},c.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var i=null,n=!1;if(!this.hasLineTerminator){var a=this.context.allowYield;this.context.allowYield=!1,n=this.match("*"),n?(this.nextToken(),i=this.parseAssignmentExpression()):this.isStartOfExpression()&&(i=this.parseAssignmentExpression()),this.context.allowYield=a}return this.finalize(t,new o.YieldExpression(i,n))},c.prototype.parseClassElement=function(t){var i=this.lookahead,n=this.createNode(),a="",x=null,E=null,C=!1,y=!1,S=!1,w=!1;if(this.match("*"))this.nextToken();else{C=this.match("["),x=this.parseObjectPropertyKey();var b=x;if(b.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(i=this.lookahead,S=!0,C=this.match("["),this.match("*")?this.nextToken():x=this.parseObjectPropertyKey()),i.type===3&&!this.hasLineTerminator&&i.value==="async"){var B=this.lookahead.value;B!==":"&&B!=="("&&B!=="*"&&(w=!0,i=this.lookahead,x=this.parseObjectPropertyKey(),i.type===3&&i.value==="constructor"&&this.tolerateUnexpectedToken(i,l.Messages.ConstructorIsAsync))}}var T=this.qualifiedPropertyName(this.lookahead);return i.type===3?i.value==="get"&&T?(a="get",C=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,E=this.parseGetterMethod()):i.value==="set"&&T&&(a="set",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseSetterMethod()):i.type===7&&i.value==="*"&&T&&(a="init",C=this.match("["),x=this.parseObjectPropertyKey(),E=this.parseGeneratorMethod(),y=!0),!a&&x&&this.match("(")&&(a="init",E=w?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),y=!0),a||this.throwUnexpectedToken(this.lookahead),a==="init"&&(a="method"),C||(S&&this.isPropertyKey(x,"prototype")&&this.throwUnexpectedToken(i,l.Messages.StaticPrototype),!S&&this.isPropertyKey(x,"constructor")&&((a!=="method"||!y||E&&E.generator)&&this.throwUnexpectedToken(i,l.Messages.ConstructorSpecialMethod),t.value?this.throwUnexpectedToken(i,l.Messages.DuplicateConstructor):t.value=!0,a="constructor")),this.finalize(n,new o.MethodDefinition(x,C,E,a,S))},c.prototype.parseClassElementList=function(){var t=[],i={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(i));return this.expect("}"),t},c.prototype.parseClassBody=function(){var t=this.createNode(),i=this.parseClassElementList();return this.finalize(t,new o.ClassBody(i))},c.prototype.parseClassDeclaration=function(t){var i=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var a=t&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),x=null;this.matchKeyword("extends")&&(this.nextToken(),x=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var E=this.parseClassBody();return this.context.strict=n,this.finalize(i,new o.ClassDeclaration(a,x,E))},c.prototype.parseClassExpression=function(){var t=this.createNode(),i=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=this.lookahead.type===3?this.parseVariableIdentifier():null,a=null;this.matchKeyword("extends")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=i,this.finalize(t,new o.ClassExpression(n,a,x))},c.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),i=this.parseDirectivePrologues();this.lookahead.type!==2;)i.push(this.parseStatementListItem());return this.finalize(t,new o.Module(i))},c.prototype.parseScript=function(){for(var t=this.createNode(),i=this.parseDirectivePrologues();this.lookahead.type!==2;)i.push(this.parseStatementListItem());return this.finalize(t,new o.Script(i))},c.prototype.parseModuleSpecifier=function(){var t=this.createNode();this.lookahead.type!==8&&this.throwError(l.Messages.InvalidModuleSpecifier);var i=this.nextToken(),n=this.getTokenRaw(i);return this.finalize(t,new o.Literal(i.value,n))},c.prototype.parseImportSpecifier=function(){var t=this.createNode(),i,n;return this.lookahead.type===3?(i=this.parseVariableIdentifier(),n=i,this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseVariableIdentifier())):(i=this.parseIdentifierName(),n=i,this.matchContextualKeyword("as")?(this.nextToken(),n=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(t,new o.ImportSpecifier(n,i))},c.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},c.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),i=this.parseIdentifierName();return this.finalize(t,new o.ImportDefaultSpecifier(i))},c.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(l.Messages.NoAsAfterImportNamespace),this.nextToken();var i=this.parseIdentifierName();return this.finalize(t,new o.ImportNamespaceSpecifier(i))},c.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalImportDeclaration);var t=this.createNode();this.expectKeyword("import");var i,n=[];if(this.lookahead.type===8)i=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}this.nextToken(),i=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new o.ImportDeclaration(n,i))},c.prototype.parseExportSpecifier=function(){var t=this.createNode(),i=this.parseIdentifierName(),n=i;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(t,new o.ExportSpecifier(i,n))},c.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(l.Messages.IllegalExportDeclaration);var t=this.createNode();this.expectKeyword("export");var i;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.matchKeyword("class")){var n=this.parseClassDeclaration(!0);i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.matchContextualKeyword("async")){var n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else{this.matchContextualKeyword("from")&&this.throwError(l.Messages.UnexpectedToken,this.lookahead.value);var n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),i=this.finalize(t,new o.ExportDefaultDeclaration(n))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}this.nextToken();var x=this.parseModuleSpecifier();this.consumeSemicolon(),i=this.finalize(t,new o.ExportAllDeclaration(x))}else if(this.lookahead.type===4){var n=void 0;switch(this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}i=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction()){var n=this.parseFunctionDeclaration();i=this.finalize(t,new o.ExportNamedDeclaration(n,[],null))}else{var E=[],C=null,y=!1;for(this.expect("{");!this.match("}");)y=y||this.matchKeyword("default"),E.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),C=this.parseModuleSpecifier(),this.consumeSemicolon();else if(y){var a=this.lookahead.value?l.Messages.UnexpectedToken:l.Messages.MissingFromClause;this.throwError(a,this.lookahead.value)}else this.consumeSemicolon();i=this.finalize(t,new o.ExportNamedDeclaration(null,E,C))}return i},c}();e.Parser=d},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function r(s,h){if(!s)throw new Error("ASSERT: "+h)}e.assert=r},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function s(){this.errors=[],this.tolerant=!1}return s.prototype.recordError=function(h){this.errors.push(h)},s.prototype.tolerate=function(h){if(this.tolerant)this.recordError(h);else throw h},s.prototype.constructError=function(h,l){var o=new Error(h);try{throw o}catch(D){Object.create&&Object.defineProperty&&(o=Object.create(D),Object.defineProperty(o,"column",{value:l}))}return o},s.prototype.createError=function(h,l,o,D){var m="Line "+l+": "+D,f=this.constructError(m,o);return f.index=h,f.lineNumber=l,f.description=D,f},s.prototype.throwError=function(h,l,o,D){throw this.createError(h,l,o,D)},s.prototype.tolerateError=function(h,l,o,D){var m=this.createError(h,l,o,D);if(this.tolerant)this.recordError(m);else throw m},s}();e.ErrorHandler=r},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(9),h=r(4),l=r(11);function o(f){return"0123456789abcdef".indexOf(f.toLowerCase())}function D(f){return"01234567".indexOf(f)}var m=function(){function f(p,d){this.source=p,this.errorHandler=d,this.trackComment=!1,this.isModule=!1,this.length=p.length,this.index=0,this.lineNumber=p.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return f.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},f.prototype.restoreState=function(p){this.index=p.index,this.lineNumber=p.lineNumber,this.lineStart=p.lineStart},f.prototype.eof=function(){return this.index>=this.length},f.prototype.throwUnexpectedToken=function(p){return p===void 0&&(p=l.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},f.prototype.tolerateUnexpectedToken=function(p){p===void 0&&(p=l.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},f.prototype.skipSingleLineComment=function(p){var d=[],c,t;for(this.trackComment&&(d=[],c=this.index-p,t={start:{line:this.lineNumber,column:this.index-this.lineStart-p},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,h.Character.isLineTerminator(i)){if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart-1};var n={multiLine:!1,slice:[c+p,this.index-1],range:[c,this.index-1],loc:t};d.push(n)}return i===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d}}if(this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!1,slice:[c+p,this.index],range:[c,this.index],loc:t};d.push(n)}return d},f.prototype.skipMultiLineComment=function(){var p=[],d,c;for(this.trackComment&&(p=[],d=this.index-2,c={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var t=this.source.charCodeAt(this.index);if(h.Character.isLineTerminator(t))t===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(t===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){c.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[d+2,this.index-2],range:[d,this.index],loc:c};p.push(i)}return p}++this.index}else++this.index}if(this.trackComment){c.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[d+2,this.index],range:[d,this.index],loc:c};p.push(i)}return this.tolerateUnexpectedToken(),p},f.prototype.scanComments=function(){var p;this.trackComment&&(p=[]);for(var d=this.index===0;!this.eof();){var c=this.source.charCodeAt(this.index);if(h.Character.isWhiteSpace(c))++this.index;else if(h.Character.isLineTerminator(c))++this.index,c===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,d=!0;else if(c===47)if(c=this.source.charCodeAt(this.index+1),c===47){this.index+=2;var t=this.skipSingleLineComment(2);this.trackComment&&(p=p.concat(t)),d=!0}else if(c===42){this.index+=2;var t=this.skipMultiLineComment();this.trackComment&&(p=p.concat(t))}else break;else if(d&&c===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var t=this.skipSingleLineComment(3);this.trackComment&&(p=p.concat(t))}else break;else if(c===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var t=this.skipSingleLineComment(4);this.trackComment&&(p=p.concat(t))}else break;else break}return p},f.prototype.isFutureReservedWord=function(p){switch(p){case"enum":case"export":case"import":case"super":return!0;default:return!1}},f.prototype.isStrictModeReservedWord=function(p){switch(p){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},f.prototype.isRestrictedWord=function(p){return p==="eval"||p==="arguments"},f.prototype.isKeyword=function(p){switch(p.length){case 2:return p==="if"||p==="in"||p==="do";case 3:return p==="var"||p==="for"||p==="new"||p==="try"||p==="let";case 4:return p==="this"||p==="else"||p==="case"||p==="void"||p==="with"||p==="enum";case 5:return p==="while"||p==="break"||p==="catch"||p==="throw"||p==="const"||p==="yield"||p==="class"||p==="super";case 6:return p==="return"||p==="typeof"||p==="delete"||p==="switch"||p==="export"||p==="import";case 7:return p==="default"||p==="finally"||p==="extends";case 8:return p==="function"||p==="continue"||p==="debugger";case 10:return p==="instanceof";default:return!1}},f.prototype.codePointAt=function(p){var d=this.source.charCodeAt(p);if(d>=55296&&d<=56319){var c=this.source.charCodeAt(p+1);if(c>=56320&&c<=57343){var t=d;d=(t-55296)*1024+c-56320+65536}}return d},f.prototype.scanHexEscape=function(p){for(var d=p==="u"?4:2,c=0,t=0;t<d;++t)if(!this.eof()&&h.Character.isHexDigit(this.source.charCodeAt(this.index)))c=c*16+o(this.source[this.index++]);else return null;return String.fromCharCode(c)},f.prototype.scanUnicodeCodePointEscape=function(){var p=this.source[this.index],d=0;for(p==="}"&&this.throwUnexpectedToken();!this.eof()&&(p=this.source[this.index++],!!h.Character.isHexDigit(p.charCodeAt(0)));)d=d*16+o(p);return(d>1114111||p!=="}")&&this.throwUnexpectedToken(),h.Character.fromCodePoint(d)},f.prototype.getIdentifier=function(){for(var p=this.index++;!this.eof();){var d=this.source.charCodeAt(this.index);if(d===92)return this.index=p,this.getComplexIdentifier();if(d>=55296&&d<57343)return this.index=p,this.getComplexIdentifier();if(h.Character.isIdentifierPart(d))++this.index;else break}return this.source.slice(p,this.index)},f.prototype.getComplexIdentifier=function(){var p=this.codePointAt(this.index),d=h.Character.fromCodePoint(p);this.index+=d.length;var c;for(p===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,c=this.scanUnicodeCodePointEscape()):(c=this.scanHexEscape("u"),(c===null||c==="\\"||!h.Character.isIdentifierStart(c.charCodeAt(0)))&&this.throwUnexpectedToken()),d=c);!this.eof()&&(p=this.codePointAt(this.index),!!h.Character.isIdentifierPart(p));)c=h.Character.fromCodePoint(p),d+=c,this.index+=c.length,p===92&&(d=d.substr(0,d.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,c=this.scanUnicodeCodePointEscape()):(c=this.scanHexEscape("u"),(c===null||c==="\\"||!h.Character.isIdentifierPart(c.charCodeAt(0)))&&this.throwUnexpectedToken()),d+=c);return d},f.prototype.octalToDecimal=function(p){var d=p!=="0",c=D(p);return!this.eof()&&h.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=!0,c=c*8+D(this.source[this.index++]),"0123".indexOf(p)>=0&&!this.eof()&&h.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(c=c*8+D(this.source[this.index++]))),{code:c,octal:d}},f.prototype.scanIdentifier=function(){var p,d=this.index,c=this.source.charCodeAt(d)===92?this.getComplexIdentifier():this.getIdentifier();if(c.length===1?p=3:this.isKeyword(c)?p=4:c==="null"?p=5:c==="true"||c==="false"?p=1:p=3,p!==3&&d+c.length!==this.index){var t=this.index;this.index=d,this.tolerateUnexpectedToken(l.Messages.InvalidEscapedReservedWord),this.index=t}return{type:p,value:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},f.prototype.scanPunctuator=function(){var p=this.index,d=this.source[this.index];switch(d){case"(":case"{":d==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,d="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:d=this.source.substr(this.index,4),d===">>>="?this.index+=4:(d=d.substr(0,3),d==="==="||d==="!=="||d===">>>"||d==="<<="||d===">>="||d==="**="?this.index+=3:(d=d.substr(0,2),d==="&&"||d==="||"||d==="=="||d==="!="||d==="+="||d==="-="||d==="*="||d==="/="||d==="++"||d==="--"||d==="<<"||d===">>"||d==="&="||d==="|="||d==="^="||d==="%="||d==="<="||d===">="||d==="=>"||d==="**"?this.index+=2:(d=this.source[this.index],"<>=!+-*%&|^/".indexOf(d)>=0&&++this.index)))}return this.index===p&&this.throwUnexpectedToken(),{type:7,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanHexLiteral=function(p){for(var d="";!this.eof()&&h.Character.isHexDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),h.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+d,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanBinaryLiteral=function(p){for(var d="",c;!this.eof()&&(c=this.source[this.index],!(c!=="0"&&c!=="1"));)d+=this.source[this.index++];return d.length===0&&this.throwUnexpectedToken(),this.eof()||(c=this.source.charCodeAt(this.index),(h.Character.isIdentifierStart(c)||h.Character.isDecimalDigit(c))&&this.throwUnexpectedToken()),{type:6,value:parseInt(d,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanOctalLiteral=function(p,d){var c="",t=!1;for(h.Character.isOctalDigit(p.charCodeAt(0))?(t=!0,c="0"+this.source[this.index++]):++this.index;!this.eof()&&h.Character.isOctalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];return!t&&c.length===0&&this.throwUnexpectedToken(),(h.Character.isIdentifierStart(this.source.charCodeAt(this.index))||h.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(c,8),octal:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},f.prototype.isImplicitOctalLiteral=function(){for(var p=this.index+1;p<this.length;++p){var d=this.source[p];if(d==="8"||d==="9")return!1;if(!h.Character.isOctalDigit(d.charCodeAt(0)))return!0}return!0},f.prototype.scanNumericLiteral=function(){var p=this.index,d=this.source[p];s.assert(h.Character.isDecimalDigit(d.charCodeAt(0))||d===".","Numeric literal must start with a decimal digit or a decimal point");var c="";if(d!=="."){if(c=this.source[this.index++],d=this.source[this.index],c==="0"){if(d==="x"||d==="X")return++this.index,this.scanHexLiteral(p);if(d==="b"||d==="B")return++this.index,this.scanBinaryLiteral(p);if(d==="o"||d==="O")return this.scanOctalLiteral(d,p);if(d&&h.Character.isOctalDigit(d.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(d,p)}for(;h.Character.isDecimalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];d=this.source[this.index]}if(d==="."){for(c+=this.source[this.index++];h.Character.isDecimalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];d=this.source[this.index]}if(d==="e"||d==="E")if(c+=this.source[this.index++],d=this.source[this.index],(d==="+"||d==="-")&&(c+=this.source[this.index++]),h.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;h.Character.isDecimalDigit(this.source.charCodeAt(this.index));)c+=this.source[this.index++];else this.throwUnexpectedToken();return h.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(c),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanStringLiteral=function(){var p=this.index,d=this.source[p];s.assert(d==="'"||d==='"',"String literal must starts with a quote"),++this.index;for(var c=!1,t="";!this.eof();){var i=this.source[this.index++];if(i===d){d="";break}else if(i==="\\")if(i=this.source[this.index++],!i||!h.Character.isLineTerminator(i.charCodeAt(0)))switch(i){case"u":if(this.source[this.index]==="{")++this.index,t+=this.scanUnicodeCodePointEscape();else{var n=this.scanHexEscape(i);n===null&&this.throwUnexpectedToken(),t+=n}break;case"x":var a=this.scanHexEscape(i);a===null&&this.throwUnexpectedToken(l.Messages.InvalidHexEscapeSequence),t+=a;break;case"n":t+=`
|
|
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;case"8":case"9":t+=i,this.tolerateUnexpectedToken();break;default:if(i&&h.Character.isOctalDigit(i.charCodeAt(0))){var x=this.octalToDecimal(i);c=x.octal||c,t+=String.fromCharCode(x.code)}else t+=i;break}else++this.lineNumber,i==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index;else{if(h.Character.isLineTerminator(i.charCodeAt(0)))break;t+=i}}return d!==""&&(this.index=p,this.throwUnexpectedToken()),{type:8,value:t,octal:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.scanTemplate=function(){var p="",d=!1,c=this.index,t=this.source[c]==="`",i=!1,n=2;for(++this.index;!this.eof();){var a=this.source[this.index++];if(a==="`"){n=1,i=!0,d=!0;break}else if(a==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,d=!0;break}p+=a}else if(a==="\\")if(a=this.source[this.index++],h.Character.isLineTerminator(a.charCodeAt(0)))++this.lineNumber,a==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index;else switch(a){case"n":p+=`
|
|
`;break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,p+=this.scanUnicodeCodePointEscape();else{var x=this.index,E=this.scanHexEscape(a);E!==null?p+=E:(this.index=x,p+=a)}break;case"x":var C=this.scanHexEscape(a);C===null&&this.throwUnexpectedToken(l.Messages.InvalidHexEscapeSequence),p+=C;break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+="\v";break;default:a==="0"?(h.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral),p+="\0"):h.Character.isOctalDigit(a.charCodeAt(0))?this.throwUnexpectedToken(l.Messages.TemplateOctalLiteral):p+=a;break}else h.Character.isLineTerminator(a.charCodeAt(0))?(++this.lineNumber,a==="\r"&&this.source[this.index]===`
|
|
`&&++this.index,this.lineStart=this.index,p+=`
|
|
`):p+=a}return d||this.throwUnexpectedToken(),t||this.curlyStack.pop(),{type:10,value:this.source.slice(c+1,this.index-n),cooked:p,head:t,tail:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:c,end:this.index}},f.prototype.testRegExp=function(p,d){var c="\uFFFF",t=p,i=this;d.indexOf("u")>=0&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(n,a,x){var E=parseInt(a||x,16);return E>1114111&&i.throwUnexpectedToken(l.Messages.InvalidRegExp),E<=65535?String.fromCharCode(E):c}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c));try{RegExp(t)}catch{this.throwUnexpectedToken(l.Messages.InvalidRegExp)}try{return new RegExp(p,d)}catch{return null}},f.prototype.scanRegExpBody=function(){var p=this.source[this.index];s.assert(p==="/","Regular expression literal must start with a slash");for(var d=this.source[this.index++],c=!1,t=!1;!this.eof();)if(p=this.source[this.index++],d+=p,p==="\\")p=this.source[this.index++],h.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d+=p;else if(h.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(l.Messages.UnterminatedRegExp);else if(c)p==="]"&&(c=!1);else if(p==="/"){t=!0;break}else p==="["&&(c=!0);return t||this.throwUnexpectedToken(l.Messages.UnterminatedRegExp),d.substr(1,d.length-2)},f.prototype.scanRegExpFlags=function(){for(var p="",d="";!this.eof();){var c=this.source[this.index];if(!h.Character.isIdentifierPart(c.charCodeAt(0)))break;if(++this.index,c==="\\"&&!this.eof())if(c=this.source[this.index],c==="u"){++this.index;var t=this.index,i=this.scanHexEscape("u");if(i!==null)for(d+=i,p+="\\u";t<this.index;++t)p+=this.source[t];else this.index=t,d+="u",p+="\\u";this.tolerateUnexpectedToken()}else p+="\\",this.tolerateUnexpectedToken();else d+=c,p+=c}return d},f.prototype.scanRegExp=function(){var p=this.index,d=this.scanRegExpBody(),c=this.scanRegExpFlags(),t=this.testRegExp(d,c);return{type:9,value:"",pattern:d,flags:c,regex:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},f.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var p=this.source.charCodeAt(this.index);return h.Character.isIdentifierStart(p)?this.scanIdentifier():p===40||p===41||p===59?this.scanPunctuator():p===39||p===34?this.scanStringLiteral():p===46?h.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():h.Character.isDecimalDigit(p)?this.scanNumericLiteral():p===96||p===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():p>=55296&&p<57343&&h.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},f}();e.Scanner=m},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="<end>",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(u,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(u,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(10),h=r(12),l=r(13),o=function(){function m(){this.values=[],this.curly=this.paren=-1}return m.prototype.beforeFunctionExpression=function(f){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(f)>=0},m.prototype.isRegexStart=function(){var f=this.values[this.values.length-1],p=f!==null;switch(f){case"this":case"]":p=!1;break;case")":var d=this.values[this.paren-1];p=d==="if"||d==="while"||d==="for"||d==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var c=this.values[this.curly-4];p=c?!this.beforeFunctionExpression(c):!1}else if(this.values[this.curly-4]==="function"){var c=this.values[this.curly-5];p=c?!this.beforeFunctionExpression(c):!0}break;default:break}return p},m.prototype.push=function(f){f.type===7||f.type===4?(f.value==="{"?this.curly=this.values.length:f.value==="("&&(this.paren=this.values.length),this.values.push(f.value)):this.values.push(null)},m}(),D=function(){function m(f,p){this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new h.Scanner(f,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new o}return m.prototype.errors=function(){return this.errorHandler.errors},m.prototype.getNextToken=function(){if(this.buffer.length===0){var f=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p<f.length;++p){var d=f[p],c=this.scanner.source.slice(d.slice[0],d.slice[1]),t={type:d.multiLine?"BlockComment":"LineComment",value:c};this.trackRange&&(t.range=d.range),this.trackLoc&&(t.loc=d.loc),this.buffer.push(t)}if(!this.scanner.eof()){var i=void 0;this.trackLoc&&(i={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var n=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),a=n?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(a);var x={type:l.TokenName[a.type],value:this.scanner.source.slice(a.start,a.end)};if(this.trackRange&&(x.range=[a.start,a.end]),this.trackLoc&&(i.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},x.loc=i),a.type===9){var E=a.pattern,C=a.flags;x.regex={pattern:E,flags:C}}this.buffer.push(x)}}return this.buffer.shift()},m}();e.Tokenizer=D}])})});var xe=_(I=>{function is(u){return Array.isArray?Array.isArray(u):de(u)==="[object Array]"}I.isArray=is;function rs(u){return typeof u=="boolean"}I.isBoolean=rs;function ss(u){return u===null}I.isNull=ss;function ns(u){return u==null}I.isNullOrUndefined=ns;function as(u){return typeof u=="number"}I.isNumber=as;function os(u){return typeof u=="string"}I.isString=os;function us(u){return typeof u=="symbol"}I.isSymbol=us;function hs(u){return u===void 0}I.isUndefined=hs;function ls(u){return de(u)==="[object RegExp]"}I.isRegExp=ls;function cs(u){return typeof u=="object"&&u!==null}I.isObject=cs;function ps(u){return de(u)==="[object Date]"}I.isDate=ps;function fs(u){return de(u)==="[object Error]"||u instanceof Error}I.isError=fs;function ms(u){return typeof u=="function"}I.isFunction=ms;function ds(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||typeof u=="symbol"||typeof u>"u"}I.isPrimitive=ds;I.isBuffer=require("buffer").Buffer.isBuffer;function de(u){return Object.prototype.toString.call(u)}});var Xt=_((Hn,Rt)=>{var _t=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],F,It=u=>u<1e5?u<100?u<10?0:1:u<1e4?u<1e3?2:3:4:u<1e7?u<1e6?5:6:u<1e9?u<1e8?7:8:9;function Pt(u,e){if(u===e)return 0;if(~~u===u&&~~e===e){if(u===0||e===0)return u<e?-1:1;if(u<0||e<0){if(e>=0)return-1;if(u>=0)return 1;u=-u,e=-e}let h=It(u),l=It(e),o=0;return h<l?(u*=_t[l-h-1],e/=10,o=-1):h>l&&(e*=_t[h-l-1],u/=10,o=1),u===e?o:u<e?-1:1}let r=String(u),s=String(e);return r===s?0:r<s?-1:1}function xs(u){let e=0;for(;u>=32;)e|=u&1,u>>=1;return u+e}function Ot(u,e,r,s){let h=e+1;if(h===r)return 1;if(s(u[h++],u[e])<0){for(;h<r&&s(u[h],u[h-1])<0;)h++;Mt(u,e,h),Mt(F,e,h)}else for(;h<r&&s(u[h],u[h-1])>=0;)h++;return h-e}function Mt(u,e,r){for(r--;e<r;){let s=u[e];u[e++]=u[r],u[r--]=s}}function Lt(u,e,r,s,h){for(s===e&&s++;s<r;s++){let l=u[s],o=F[s],D=e,m=s;for(;D<m;){let p=D+m>>>1;h(l,u[p])<0?m=p:D=p+1}let f=s-D;switch(f){case 3:u[D+3]=u[D+2],F[D+3]=F[D+2];case 2:u[D+2]=u[D+1],F[D+2]=F[D+1];case 1:u[D+1]=u[D],F[D+1]=F[D];break;default:for(;f>0;)u[D+f]=u[D+f-1],F[D+f]=F[D+f-1],f--}u[D]=l,F[D]=o}}function Je(u,e,r,s,h,l){let o=0,D=0,m=1;if(l(u,e[r+h])>0){for(D=s-h;m<D&&l(u,e[r+h+m])>0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=h,m+=h}else{for(D=h+1;m<D&&l(u,e[r+h-m])<=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D);let f=o;o=h-m,m=h-f}for(o++;o<m;){let f=o+(m-o>>>1);l(u,e[r+f])>0?o=f+1:m=f}return m}function Ue(u,e,r,s,h,l){let o=0,D=0,m=1;if(l(u,e[r+h])<0){for(D=h+1;m<D&&l(u,e[r+h-m])<0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D);let f=o;o=h-m,m=h-f}else{for(D=s-h;m<D&&l(u,e[r+h+m])>=0;)o=m,m=(m<<1)+1,m<=0&&(m=D);m>D&&(m=D),o+=h,m+=h}for(o++;o<m;){let f=o+(m-o>>>1);l(u,e[r+f])<0?m=f:o=f+1}return m}var ze=class{constructor(e,r){this.array=e,this.compare=r;let{length:s}=e;this.length=s,this.minGallop=7,this.tmpStorageLength=s<2*256?s>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=s<120?5:s<1542?10:s<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,r){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=r,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]<this.runLength[e+1]&&e--;else if(this.runLength[e]>this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]<this.runLength[e+1]&&e--,this.mergeAt(e)}}mergeAt(e){let{compare:r}=this,{array:s}=this,h=this.runStart[e],l=this.runLength[e],o=this.runStart[e+1],D=this.runLength[e+1];this.runLength[e]=l+D,e===this.stackSize-3&&(this.runStart[e+1]=this.runStart[e+2],this.runLength[e+1]=this.runLength[e+2]),this.stackSize--;let m=Ue(s[o],s,h,l,0,r);h+=m,l-=m,l!==0&&(D=Je(s[h+l-1],s,o,D,D-1,r),D!==0&&(l<=D?this.mergeLow(h,l,o,D):this.mergeHigh(h,l,o,D)))}mergeLow(e,r,s,h){let{compare:l}=this,{array:o}=this,{tmp:D}=this,{tmpIndex:m}=this,f=0;for(f=0;f<r;f++)D[f]=o[e+f],m[f]=F[e+f];let p=0,d=s,c=e;if(o[c]=o[d],F[c]=F[d],c++,d++,--h===0){for(f=0;f<r;f++)o[c+f]=D[p+f],F[c+f]=m[p+f];return}if(r===1){for(f=0;f<h;f++)o[c+f]=o[d+f],F[c+f]=F[d+f];o[c+h]=D[p],F[c+h]=m[p];return}let{minGallop:t}=this;for(;;){let i=0,n=0,a=!1;do if(l(o[d],D[p])<0){if(o[c]=o[d],F[c]=F[d],c++,d++,n++,i=0,--h===0){a=!0;break}}else if(o[c]=D[p],F[c]=m[p],c++,p++,i++,n=0,--r===1){a=!0;break}while((i|n)<t);if(a)break;do{if(i=Ue(o[d],D,p,r,0,l),i!==0){for(f=0;f<i;f++)o[c+f]=D[p+f],F[c+f]=m[p+f];if(c+=i,p+=i,r-=i,r<=1){a=!0;break}}if(o[c]=o[d],F[c]=F[d],c++,d++,--h===0){a=!0;break}if(n=Je(D[p],o,d,h,0,l),n!==0){for(f=0;f<n;f++)o[c+f]=o[d+f],F[c+f]=F[d+f];if(c+=n,d+=n,h-=n,h===0){a=!0;break}}if(o[c]=D[p],F[c]=m[p],c++,p++,--r===1){a=!0;break}t--}while(i>=7||n>=7);if(a)break;t<0&&(t=0),t+=2}if(this.minGallop=t,t<1&&(this.minGallop=1),r===1){for(f=0;f<h;f++)o[c+f]=o[d+f],F[c+f]=F[d+f];o[c+h]=D[p],F[c+h]=m[p]}else{if(r===0)throw new Error("mergeLow preconditions were not respected");for(f=0;f<r;f++)o[c+f]=D[p+f],F[c+f]=m[p+f]}}mergeHigh(e,r,s,h){let{compare:l}=this,{array:o}=this,{tmp:D}=this,{tmpIndex:m}=this,f=0;for(f=0;f<h;f++)D[f]=o[s+f],m[f]=F[s+f];let p=e+r-1,d=h-1,c=s+h-1,t=0,i=0;if(o[c]=o[p],F[c]=F[p],c--,p--,--r===0){for(t=c-(h-1),f=0;f<h;f++)o[t+f]=D[f],F[t+f]=m[f];return}if(h===1){for(c-=r,p-=r,i=c+1,t=p+1,f=r-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d];return}let{minGallop:n}=this;for(;;){let a=0,x=0,E=!1;do if(l(D[d],o[p])<0){if(o[c]=o[p],F[c]=F[p],c--,p--,a++,x=0,--r===0){E=!0;break}}else if(o[c]=D[d],F[c]=m[d],c--,d--,x++,a=0,--h===1){E=!0;break}while((a|x)<n);if(E)break;do{if(a=r-Ue(D[d],o,e,r,r-1,l),a!==0){for(c-=a,p-=a,r-=a,i=c+1,t=p+1,f=a-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];if(r===0){E=!0;break}}if(o[c]=D[d],F[c]=m[d],c--,d--,--h===1){E=!0;break}if(x=h-Je(o[p],D,0,h,h-1,l),x!==0){for(c-=x,d-=x,h-=x,i=c+1,t=d+1,f=0;f<x;f++)o[i+f]=D[t+f],F[i+f]=m[t+f];if(h<=1){E=!0;break}}if(o[c]=o[p],F[c]=F[p],c--,p--,--r===0){E=!0;break}n--}while(a>=7||x>=7);if(E)break;n<0&&(n=0),n+=2}if(this.minGallop=n,n<1&&(this.minGallop=1),h===1){for(c-=r,p-=r,i=c+1,t=p+1,f=r-1;f>=0;f--)o[i+f]=o[t+f],F[i+f]=F[t+f];o[c]=D[d],F[c]=m[d]}else{if(h===0)throw new Error("mergeHigh preconditions were not respected");for(t=c-(h-1),f=0;f<h;f++)o[t+f]=D[f],F[t+f]=m[f]}}};function Ds(u,e,r,s){if(!Array.isArray(u))throw new TypeError(`The "array" argument must be an array. Received ${u}`);F=[];let{length:h}=u,l=0;for(;l<h;)F[l]=l++;e?typeof e!="function"&&(s=r,r=e,e=Pt):e=Pt,r||(r=0),s||(s=h);let o=s-r;if(o<2)return F;let D=0;if(o<32)return D=Ot(u,r,s,e),Lt(u,r,s,r+D,e),F;let m=new ze(u,e),f=xs(o);do{if(D=Ot(u,r,s,e),D<f){let p=o;p>f&&(p=f),Lt(u,r,r+p,r+D,e),D=p}m.pushRun(r,D),m.mergeRuns(),o-=D,r+=D}while(o!==0);return m.forceMergeRuns(),F}Rt.exports={sort:Ds}});var Ut=_((jn,Jt)=>{"use strict";var Es=Object.prototype.hasOwnProperty;Jt.exports=(u,e)=>Es.call(u,e)});var se=_((Vn,Qt)=>{var Ve=Ut(),{isObject:zt,isArray:gs,isString:vs,isNumber:Cs}=xe(),Ke="before",jt="after-prop",Vt="after-colon",Kt="after-value",$t="after",Gt="before-all",Wt="after-all",As="[",ys="]",Ss="{",Fs="}",ws=",",bs="",ks="-",$e=[Ke,jt,Vt,Kt,$t],Bs=[Ke,Gt,Wt].map(Symbol.for),qt=":",Ht=void 0,re=(u,e)=>Symbol.for(u+qt+e),De=(u,e,r)=>Object.defineProperty(u,e,{value:r,writable:!0,configurable:!0}),je=(u,e,r,s,h,l)=>{let o=re(h,s);if(!Ve(e,o))return;let D=r===s?o:re(h,r);De(u,D,e[o]),l&&delete e[o]},Yt=(u,e,r,s,h)=>{$e.forEach(l=>{je(u,e,r,s,l,h)})},Ts=(u,e,r)=>{e!==r&&$e.forEach(s=>{let h=re(s,r);if(!Ve(u,h)){je(u,u,r,e,s,!0);return}let l=u[h];delete u[h],je(u,u,r,e,s,!0),De(u,re(s,e),l)})},He=(u,e)=>{Bs.forEach(r=>{let s=e[r];s&&De(u,r,s)})},Ns=(u,e,r)=>(r.forEach(s=>{!vs(s)&&!Cs(s)||Ve(e,s)&&(u[s]=e[s],Yt(u,e,s,s))}),u);Qt.exports={SYMBOL_PREFIXES:$e,PREFIX_BEFORE:Ke,PREFIX_AFTER_PROP:jt,PREFIX_AFTER_COLON:Vt,PREFIX_AFTER_VALUE:Kt,PREFIX_AFTER:$t,PREFIX_BEFORE_ALL:Gt,PREFIX_AFTER_ALL:Wt,BRACKET_OPEN:As,BRACKET_CLOSE:ys,CURLY_BRACKET_OPEN:Ss,CURLY_BRACKET_CLOSE:Fs,COLON:qt,COMMA:ws,MINUS:ks,EMPTY:bs,UNDEFINED:Ht,symbol:re,define:De,copy_comments:Yt,swap_comments:Ts,assign_non_prop_comments:He,assign(u,e,r){if(!zt(u))throw new TypeError("Cannot convert undefined or null to object");if(!zt(e))return u;if(r===Ht)r=Object.keys(e),He(u,e);else if(gs(r))r.length===0&&He(u,e);else throw new TypeError("keys must be array or undefined");return Ns(u,e,r)}}});var Ge=_((Kn,ri)=>{var{isArray:_s}=xe(),{sort:Is}=Xt(),{SYMBOL_PREFIXES:Ps,UNDEFINED:Zt,symbol:Os,copy_comments:Ms,swap_comments:ii}=se(),Ls=u=>{let{length:e}=u,r=0,s=e/2;for(;r<s;r++)ii(u,r,e-r-1)},ei=(u,e,r,s,h)=>{Ms(u,e,r+s,r,h)},Y=(u,e,r,s,h,l)=>{if(h>0){let D=s;for(;D-- >0;)ei(u,e,r+D,h,l);return}let o=0;for(;o<s;){let D=o++;ei(u,e,r+D,h,l)}},ti=(u,e)=>{Ps.forEach(r=>{let s=Os(r,e);delete u[s]})},Rs=(u,e)=>{let r=e;for(;r in u;)r=u[r];return r},Q=class extends Array{splice(...e){let{length:r}=this,s=super.splice(...e),[h,l,...o]=e;h<0&&(h+=r),arguments.length===1?l=r-h:l=Math.min(r-h,l);let{length:D}=o,m=D-l,f=h+l,p=r-f;return Y(this,this,f,p,m,!0),s}slice(...e){let{length:r}=this,s=super.slice(...e);if(!s.length)return new Q;let[h,l]=e;return l===Zt?l=r:l<0&&(l+=r),h<0?h+=r:h===Zt&&(h=0),Y(s,this,h,l-h,-h),s}unshift(...e){let{length:r}=this,s=super.unshift(...e),{length:h}=e;return h>0&&Y(this,this,0,r,h,!0),s}shift(){let e=super.shift(),{length:r}=this;return ti(this,0),Y(this,this,1,r,-1,!0),e}reverse(){return super.reverse(),Ls(this),this}pop(){let e=super.pop();return ti(this,this.length),e}concat(...e){let{length:r}=this,s=super.concat(...e);return e.length&&(Y(s,this,0,this.length,0),e.forEach(h=>{let l=r;r+=_s(h)?h.length:1,h instanceof Q&&Y(s,h,0,h.length,l)})),s}sort(...e){let r=Is(this,...e.slice(0,1)),s=Object.create(null);return r.forEach((h,l)=>{if(h===l)return;let o=Rs(s,h);o!==l&&(s[l]=o,ii(this,l,o))}),this}};ri.exports={CommentArray:Q}});var vi=_(($n,gi)=>{var Xs=Nt(),{CommentArray:Js}=Ge(),{PREFIX_BEFORE:ge,PREFIX_AFTER_PROP:Us,PREFIX_AFTER_COLON:zs,PREFIX_AFTER_VALUE:oi,PREFIX_AFTER:qe,PREFIX_BEFORE_ALL:Hs,PREFIX_AFTER_ALL:js,BRACKET_OPEN:Vs,BRACKET_CLOSE:si,CURLY_BRACKET_OPEN:Ks,CURLY_BRACKET_CLOSE:ni,COLON:ui,COMMA:hi,MINUS:ai,EMPTY:$s,UNDEFINED:Ae,define:Ye,assign_non_prop_comments:Gs}=se(),li=u=>Xs.tokenize(u,{comment:!0,loc:!0}),Qe=[],V=null,U=null,Ze=[],K,ci=!1,pi=!1,ne=null,ae=null,P=null,fi,ve=null,mi=()=>{Ze.length=Qe.length=0,ae=null,K=Ae},Ws=()=>{mi(),ne.length=0,U=V=ne=ae=P=ve=null},et=u=>Symbol.for(K!==Ae?u+ui+K:u),tt=(u,e)=>ve?ve(u,e):e,di=()=>{let u=new SyntaxError(`Unexpected token ${P.value.slice(0,1)}`);throw Object.assign(u,P.loc.start),u},xi=()=>{let u=new SyntaxError("Unexpected end of JSON input");throw Object.assign(u,ae?ae.loc.end:{line:1,column:0}),u},X=()=>{let u=ne[++fi];pi=P&&u&&P.loc.end.line===u.loc.start.line||!1,ae=P,P=u},We=()=>(P||xi(),P.type==="Punctuator"?P.value:P.type),G=u=>We()===u,Ee=u=>{G(u)||di()},it=u=>{Qe.push(V),V=u},rt=()=>{V=Qe.pop()},Di=()=>{if(!U)return;let u=[];for(let r of U)if(r.inline)u.push(r);else break;let{length:e}=u;e&&(e===U.length?U=null:U.splice(0,e),Ye(V,et(qe),u))},j=u=>{U&&(Ye(V,et(u),U),U=null)},z=u=>{let e=[];for(;P&&(G("LineComment")||G("BlockComment"));){let r={...P,inline:pi};e.push(r),X()}if(!ci&&e.length){if(u){Ye(V,et(u),e);return}U=e}},Ce=(u,e)=>{e&&Ze.push(K),K=u},Ei=()=>{K=Ze.pop()},qs=()=>{let u={};it(u),Ce(Ae,!0);let e=!1,r;for(z();!G(ni)&&!(e&&(j(oi),Ee(hi),X(),z(),Di(),G(ni)));)e=!0,Ee("String"),r=JSON.parse(P.value),Ce(r),j(ge),X(),z(Us),Ee(ui),X(),z(zs),u[r]=tt(r,st()),z();return e&&j(qe),X(),K=void 0,e||j(ge),rt(),Ei(),u},Ys=()=>{let u=new Js;it(u),Ce(Ae,!0);let e=!1,r=0;for(z();!G(si)&&!(e&&(j(oi),Ee(hi),X(),z(),Di(),G(si)));)e=!0,Ce(r),j(ge),u[r]=tt(r,st()),r++,z();return e&&j(qe),X(),K=void 0,e||j(ge),rt(),Ei(),u};function st(){let u=We();if(u===Ks)return X(),qs();if(u===Vs)return X(),Ys();let e=$s;u===ai&&(X(),u=We(),e=ai);let r;switch(u){case"String":case"Boolean":case"Null":case"Numeric":return r=P.value,X(),JSON.parse(e+r);default:}}var Qs=u=>Object(u)===u,Zs=(u,e,r)=>{mi(),ne=li(u),ve=e,ci=r,ne.length||xi(),fi=-1,X(),it({}),z(Hs);let s=st();return z(js),P&&di(),!r&&s!==null&&(Qs(s)||(s=new Object(s)),Gs(s,V)),rt(),s=tt("",s),Ws(),s};gi.exports={parse:Zs,tokenize:li}});var Ai=_((Gn,Ci)=>{"use strict";var H="",nt;Ci.exports=en;function en(u,e){if(typeof u!="string")throw new TypeError("expected a string");if(e===1)return u;if(e===2)return u+u;var r=u.length*e;if(nt!==u||typeof nt>"u")nt=u,H="";else if(H.length>=r)return H.substr(0,r);for(;r>H.length&&e>1;)e&1&&(H+=u),e>>=1,u+=u;return H+=u,H=H.substr(0,r),H}});var Ii=_((Wn,_i)=>{var{isArray:ut,isObject:yi,isFunction:ot,isNumber:tn,isString:rn}=xe(),sn=Ai(),{PREFIX_BEFORE_ALL:nn,PREFIX_BEFORE:Si,PREFIX_AFTER_PROP:an,PREFIX_AFTER_COLON:on,PREFIX_AFTER_VALUE:un,PREFIX_AFTER:ht,PREFIX_AFTER_ALL:hn,BRACKET_OPEN:ln,BRACKET_CLOSE:cn,CURLY_BRACKET_OPEN:pn,CURLY_BRACKET_CLOSE:fn,COLON:mn,COMMA:Fi,EMPTY:R,UNDEFINED:dn}=se(),at=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,lt=" ",W=`
|
|
`,wi="null",bi=u=>`${Si}:${u}`,xn=u=>`${an}:${u}`,Dn=u=>`${on}:${u}`,ki=u=>`${un}:${u}`,Bi=u=>`${ht}:${u}`,En={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},gn=u=>(at.lastIndex=0,at.test(u)?u.replace(at,e=>{let r=En[e];return typeof r=="string"?r:e}):u),Ti=u=>`"${gn(u)}"`,vn=(u,e)=>e?`//${u}`:`/*${u}*/`,L=(u,e,r,s)=>{let h=u[Symbol.for(e)];if(!h||!h.length)return R;let l=!1,o=h.reduce((D,{inline:m,type:f,value:p})=>{let d=m?lt:W+r;return l=f==="LineComment",D+d+vn(p,l)},R);return s||l?o+W+r:o},Z=null,ue=R,Cn=()=>{Z=null,ue=R},oe=(u,e,r)=>u?e?u+e.trim()+W+r:u.trimRight()+W+r:e?e.trimRight()+W+r:R,Ni=(u,e,r)=>{let s=L(e,Si,r+ue,!0);return oe(s,u,r)},An=(u,e)=>{let r=e+ue,{length:s}=u,h=R,l=R;for(let o=0;o<s;o++){o!==0&&(h+=Fi);let D=oe(l,L(u,bi(o),r),r);h+=D||W+r,h+=ct(o,u,r)||wi,h+=L(u,ki(o),r),l=L(u,Bi(o),r)}return h+=oe(l,L(u,ht,r),r),ln+Ni(h,u,e)+cn},yn=(u,e)=>{if(!u)return"null";let r=e+ue,s=R,h=R,l=!0,o=ut(Z)?Z:Object.keys(u),D=m=>{let f=ct(m,u,r);if(f===dn)return;l||(s+=Fi),l=!1;let p=oe(h,L(u,bi(m),r),r);s+=p||W+r,s+=Ti(m)+L(u,xn(m),r)+mn+L(u,Dn(m),r)+lt+f+L(u,ki(m),r),h=L(u,Bi(m),r)};return o.forEach(D),s+=oe(h,L(u,ht,r),r),pn+Ni(s,u,e)+fn};function ct(u,e,r){let s=e[u];switch(yi(s)&&ot(s.toJSON)&&(s=s.toJSON(u)),ot(Z)&&(s=Z.call(e,u,s)),typeof s){case"string":return Ti(s);case"number":return Number.isFinite(s)?String(s):wi;case"boolean":case"null":return String(s);case"object":return ut(s)?An(s,r):yn(s,r);default:}}var Sn=u=>rn(u)?u:tn(u)?sn(lt,u):R,{toString:Fn}=Object.prototype,wn=["[object Number]","[object String]","[object Boolean]"],bn=u=>{if(typeof u!="object")return!1;let e=Fn.call(u);return wn.includes(e)};_i.exports=(u,e,r)=>{let s=Sn(r);if(!s)return JSON.stringify(u,e);!ot(e)&&!ut(e)&&(e=null),Z=e,ue=s;let h=bn(u)?JSON.stringify(u):ct("",{"":u},R);return Cn(),yi(u)?L(u,nn,R).trimLeft()+h+L(u,hn,R).trimRight():h}});var Oi=_((qn,Pi)=>{var{parse:kn,tokenize:Bn}=vi(),Tn=Ii(),{CommentArray:Nn}=Ge(),{assign:_n}=se();Pi.exports={parse:kn,stringify:Tn,tokenize:Bn,CommentArray:Nn,assign:_n}});var pe=Dt(Tt());var le=Dt(Oi()),ce=require("fs/promises"),he=require("path");var In=new Set(["@hcengineering/prod","@hcengineering/pod-front","@hcengineering/pod-server","@hcengineering/pod-account"]);function Pn(u){return e=>!e.projectFolder.startsWith(u)}async function Mi(u,e){let r=(0,le.parse)((await(0,ce.readFile)((0,he.join)(u,e,"rush.json"))).toString()),s=(0,he.join)(u,"rush.json"),h=(0,he.join)(u,"rush_source.json"),l=(0,le.parse)((await(0,ce.readFile)(h)).toString()),o=r.projects.filter(f=>!In.has(f.packageName)),m=l.projects.filter(Pn(e));m.push(...o.map(f=>xt(dt({},f),{projectFolder:(0,he.join)(e,f.projectFolder),shouldPublish:!1}))),l.projects=m,await(0,ce.writeFile)(s,(0,le.stringify)(l,void 0,2))}async function Li(u,e){}console.info("Anticrm Platform Manager");pe.program.version("0.6.0");pe.program.command("rush-sync <root>").description("Synchronized rush.js files with platform.").action(async(u,e)=>{await Mi(process.cwd(),u)});pe.program.command("template-apply <root>").description("Create necessary startup packages").requiredOption("--root <root>","user password","platform").action(async(u,e)=>{await Li(process.cwd(),u)});pe.program.parse(process.argv);
|
|
/*! Bundled license information:
|
|
|
|
repeat-string/index.js:
|
|
(*!
|
|
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
|
*
|
|
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
* Licensed under the MIT License.
|
|
*)
|
|
*/
|