@serverless-devs/s 2.0.95-beta.4 → 2.0.97-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/Makefile +23 -0
  2. package/lib/clean/index.js +35 -31
  3. package/lib/cli/cli-manager.js +12 -18
  4. package/lib/cli/index.js +54 -52
  5. package/lib/component/index.js +51 -144
  6. package/lib/config/add/index.js +42 -38
  7. package/lib/config/delete/index.js +47 -45
  8. package/lib/config/get/index.js +45 -41
  9. package/lib/config/index.js +36 -32
  10. package/lib/core/command/command-manager.js +9 -11
  11. package/lib/core/component/hook.js +4 -4
  12. package/lib/core/component/index.js +13 -13
  13. package/lib/error/human-error.js +5 -5
  14. package/lib/error/human-warning.js +4 -4
  15. package/lib/error/index.js +39 -45
  16. package/lib/index.js +113 -120
  17. package/lib/init/index.js +101 -97
  18. package/lib/init/init-manager.js +66 -19
  19. package/lib/onboarding/index.js +5 -5
  20. package/lib/set/analysis/index.js +38 -34
  21. package/lib/set/index.js +36 -32
  22. package/lib/set/locale/index.js +51 -49
  23. package/lib/set/registry/index.js +50 -48
  24. package/lib/set/workspace/index.js +39 -35
  25. package/lib/specification/parse.js +11 -15
  26. package/lib/update-notifier/index.js +17 -17
  27. package/lib/utils/command-util.js +74 -57
  28. package/lib/utils/common.js +98 -13
  29. package/lib/utils/index.js +3 -3
  30. package/package.json +5 -4
  31. package/readme.md +8 -3
  32. package/.eslintrc.json +0 -112
  33. package/.prettierrc.json +0 -11
  34. package/CODE_OF_CONDUCT.md +0 -5
  35. package/CONTRIBUTING.md +0 -189
  36. package/CONTRIBUTORS.md +0 -148
  37. package/docs/readme.md +0 -94
  38. package/docs/zh/awesome.md +0 -296
  39. package/docs/zh/cicd.md +0 -200
  40. package/docs/zh/cli_design.md +0 -100
  41. package/docs/zh/command/clean.md +0 -63
  42. package/docs/zh/command/cli.md +0 -92
  43. package/docs/zh/command/component.md +0 -76
  44. package/docs/zh/command/config.md +0 -278
  45. package/docs/zh/command/custom.md +0 -73
  46. package/docs/zh/command/init.md +0 -148
  47. package/docs/zh/command/readme.md +0 -76
  48. package/docs/zh/command/set.md +0 -195
  49. package/docs/zh/default_provider_config/alibabacloud.md +0 -82
  50. package/docs/zh/default_provider_config/aws.md +0 -12
  51. package/docs/zh/default_provider_config/azure.md +0 -9
  52. package/docs/zh/default_provider_config/baiducloud.md +0 -8
  53. package/docs/zh/default_provider_config/gcp.md +0 -21
  54. package/docs/zh/default_provider_config/huaweicloud.md +0 -52
  55. package/docs/zh/default_provider_config/readme.md +0 -9
  56. package/docs/zh/default_provider_config/tencentcloud.md +0 -41
  57. package/docs/zh/install.md +0 -52
  58. package/docs/zh/package_dev.md +0 -142
  59. package/docs/zh/quick_start.md +0 -297
  60. package/docs/zh/readme.md +0 -90
  61. package/docs/zh/tool.md +0 -80
  62. package/docs/zh/yaml.md +0 -203
  63. package/docs/zh/yaml_and_cli.md +0 -67
  64. package/jest.setup.ts +0 -37
  65. package/lib/clean/index.d.ts +0 -1
  66. package/lib/cli/cli-manager.d.ts +0 -13
  67. package/lib/cli/index.d.ts +0 -2
  68. package/lib/component/index.d.ts +0 -1
  69. package/lib/config/add/index.d.ts +0 -1
  70. package/lib/config/common/common.d.ts +0 -46
  71. package/lib/config/delete/index.d.ts +0 -2
  72. package/lib/config/get/index.d.ts +0 -1
  73. package/lib/config/index.d.ts +0 -2
  74. package/lib/constants/index.d.ts +0 -0
  75. package/lib/constants/static-variable.d.ts +0 -4
  76. package/lib/core/command/command-manager.d.ts +0 -12
  77. package/lib/core/component/hook.d.ts +0 -17
  78. package/lib/core/component/index.d.ts +0 -53
  79. package/lib/core/index.d.ts +0 -2
  80. package/lib/core/plugin/index.d.ts +0 -13
  81. package/lib/entiry/cli.d.ts +0 -27
  82. package/lib/entiry/index.d.ts +0 -2
  83. package/lib/error/command-error.d.ts +0 -5
  84. package/lib/error/config-delete-error.d.ts +0 -5
  85. package/lib/error/config-error.d.ts +0 -5
  86. package/lib/error/config-get-error.d.ts +0 -5
  87. package/lib/error/human-error.d.ts +0 -13
  88. package/lib/error/human-warning.d.ts +0 -8
  89. package/lib/error/index.d.ts +0 -17
  90. package/lib/error/init-error.d.ts +0 -5
  91. package/lib/error/serverless-error.d.ts +0 -4
  92. package/lib/execDaemon.d.ts +0 -6
  93. package/lib/index.d.ts +0 -2
  94. package/lib/init/index.d.ts +0 -2
  95. package/lib/init/init-config.d.ts +0 -43
  96. package/lib/init/init-manager.d.ts +0 -17
  97. package/lib/onboarding/index.d.ts +0 -2
  98. package/lib/set/analysis/index.d.ts +0 -1
  99. package/lib/set/index.d.ts +0 -1
  100. package/lib/set/locale/index.d.ts +0 -1
  101. package/lib/set/registry/index.d.ts +0 -10
  102. package/lib/set/workspace/index.d.ts +0 -1
  103. package/lib/specification/analysis.d.ts +0 -12
  104. package/lib/specification/index.d.ts +0 -4
  105. package/lib/specification/parse.d.ts +0 -24
  106. package/lib/specification/version.d.ts +0 -35
  107. package/lib/update-notifier/index.d.ts +0 -10
  108. package/lib/utils/command-util.d.ts +0 -18
  109. package/lib/utils/common.d.ts +0 -28
  110. package/lib/utils/core.d.ts +0 -3
  111. package/lib/utils/handler-set-config.d.ts +0 -19
  112. package/lib/utils/i18n/en.d.ts +0 -44
  113. package/lib/utils/i18n/index.d.ts +0 -2
  114. package/lib/utils/i18n/zh.d.ts +0 -44
  115. package/lib/utils/index.d.ts +0 -9
  116. package/lib/utils/logger.d.ts +0 -11
  117. package/lib/utils/storage.d.ts +0 -8
  118. package/lib/utils/url-parser.d.ts +0 -15
  119. package/spec/readme.md +0 -59
  120. package/spec/zh/0.0.1/readme.md +0 -47
  121. package/spec/zh/0.0.1/serverless_package_model/1.purpose_and_goals.md +0 -3
  122. package/spec/zh/0.0.1/serverless_package_model/2.overview_and_terminology.md +0 -14
  123. package/spec/zh/0.0.1/serverless_package_model/3.package_model.md +0 -434
  124. package/spec/zh/0.0.1/serverless_package_model/4.application_scopes.md +0 -3
  125. package/spec/zh/0.0.1/serverless_package_model/5.design_principles.md +0 -3
  126. package/spec/zh/0.0.1/serverless_package_model/readme.md +0 -12
  127. package/spec/zh/0.0.1/serverless_registry_model/1.purpose_and_goals.md +0 -18
  128. package/spec/zh/0.0.1/serverless_registry_model/2.overview_and_terminology.md +0 -18
  129. package/spec/zh/0.0.1/serverless_registry_model/3.registry_model.md +0 -61
  130. package/spec/zh/0.0.1/serverless_registry_model/4.application_scopes.md +0 -6
  131. package/spec/zh/0.0.1/serverless_registry_model/5.design_principles.md +0 -3
  132. package/spec/zh/0.0.1/serverless_registry_model/readme.md +0 -12
  133. package/spec/zh/0.0.1/serverless_user_model/1.purpose_and_goals.md +0 -3
  134. package/spec/zh/0.0.1/serverless_user_model/2.overview_and_terminology.md +0 -16
  135. package/spec/zh/0.0.1/serverless_user_model/3.user_model.md +0 -218
  136. package/spec/zh/0.0.1/serverless_user_model/4.application_scopes.md +0 -4
  137. package/spec/zh/0.0.1/serverless_user_model/5.design_principles.md +0 -3
  138. package/spec/zh/0.0.1/serverless_user_model/readme.md +0 -12
  139. package/test/ci.sh +0 -33
  140. package/test/cli/cli-manager.test.ts +0 -64
  141. package/test/config/get.test.ts +0 -12
  142. package/test/helloworld.test.ts +0 -7
  143. package/test/start-fc-http-nodejs12/code/index.js +0 -47
  144. package/test/start-fc-http-nodejs12/s.yaml +0 -38
  145. package/test/utils/index.test.ts +0 -8
  146. package/test/utils/storage.test.ts +0 -19
  147. package/tsconfig.json +0 -37
package/lib/cli/index.js CHANGED
@@ -1,78 +1,80 @@
1
- var R=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var Ko=R((_r,qc)=>{var hE=require("events").EventEmitter,zo=require("child_process").spawn,vr=require("path"),Xo=require("fs"),Yi=class{constructor(r,n){this.flags=r,this.required=r.includes("<"),this.optional=r.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(r),this.mandatory=!1;let u=Nc(r);this.short=u.shortFlag,this.long=u.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.description=n||"",this.defaultValue=void 0}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return pE(this.name().replace(/^no-/,""))}is(r){return this.short===r||this.long===r}},Tn=class extends Error{constructor(r,n,u){super(u);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=r,this.nestedError=void 0}},Ln=class extends hE{constructor(r){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=r||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._storeOptionsAsPropertiesCalled=!1,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(r,n,u){let a=n,o=u;typeof a=="object"&&a!==null&&(o=a,a=null),o=o||{};let p=r.split(/ +/),g=this.createCommand(p.shift());return a&&(g.description(a),g._executableHandler=!0),o.isDefault&&(this._defaultCommandName=g._name),g._hidden=!!(o.noHelp||o.hidden),g._hasHelpOption=this._hasHelpOption,g._helpFlags=this._helpFlags,g._helpDescription=this._helpDescription,g._helpShortFlag=this._helpShortFlag,g._helpLongFlag=this._helpLongFlag,g._helpCommandName=this._helpCommandName,g._helpCommandnameAndArgs=this._helpCommandnameAndArgs,g._helpCommandDescription=this._helpCommandDescription,g._exitCallback=this._exitCallback,g._storeOptionsAsProperties=this._storeOptionsAsProperties,g._passCommandToAction=this._passCommandToAction,g._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,g._executableFile=o.executableFile||null,this.commands.push(g),g._parseExpectedArgs(p),g.parent=this,a?this:g}createCommand(r){return new Ln(r)}addCommand(r,n){if(!r._name)throw new Error("Command passed to .addCommand() must have a name");function u(a){a.forEach(o=>{if(o._executableHandler&&!o._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${o.name()}`);u(o.commands)})}return u(r.commands),n=n||{},n.isDefault&&(this._defaultCommandName=r._name),(n.noHelp||n.hidden)&&(r._hidden=!0),this.commands.push(r),r.parent=this,this}arguments(r){return this._parseExpectedArgs(r.split(/ +/))}addHelpCommand(r,n){return r===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof r=="string"&&(this._helpCommandName=r.split(" ")[0],this._helpCommandnameAndArgs=r),this._helpCommandDescription=n||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(r){if(!!r.length)return r.forEach(n=>{let u={required:!1,name:"",variadic:!1};switch(n[0]){case"<":u.required=!0,u.name=n.slice(1,-1);break;case"[":u.name=n.slice(1,-1);break}u.name.length>3&&u.name.slice(-3)==="..."&&(u.variadic=!0,u.name=u.name.slice(0,-3)),u.name&&this._args.push(u)}),this._args.forEach((n,u)=>{if(n.variadic&&u<this._args.length-1)throw new Error(`only the last argument can be variadic '${n.name}'`)}),this}exitOverride(r){return r?this._exitCallback=r:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(r,n,u){this._exitCallback&&this._exitCallback(new Tn(r,n,u)),process.exit(r)}action(r){let n=u=>{let a=this._args.length,o=u.slice(0,a);this._passCommandToAction?o[a]=this:o[a]=this.opts(),u.length>a&&o.push(u.slice(a));let p=r.apply(this,o),g=this;for(;g.parent;)g=g.parent;g._actionResults.push(p)};return this._actionHandler=n,this}_checkForOptionNameClash(r){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||r.name()==="help"||this._getOptionValue(r.attributeName())===void 0)return;let u=!0;if(r.negate){let a=r.long.replace(/^--no-/,"--");u=!this._findOption(a)}else if(r.long){let a=r.long.replace(/^--/,"--no-");u=!this._findOption(a)}if(u)throw new Error(`option '${r.name()}' clashes with existing property '${r.attributeName()}' on Command
2
- - call storeOptionsAsProperties(false) to store option values safely,
3
- - or call storeOptionsAsProperties(true) to suppress this check,
4
- - or change option name
5
-
6
- Read more on https://git.io/JJc0W`)}_optionEx(r,n,u,a,o){let p=new Yi(n,u),g=p.name(),v=p.attributeName();if(p.mandatory=!!r.mandatory,this._checkForOptionNameClash(p),typeof a!="function")if(a instanceof RegExp){let c=a;a=(_,b)=>{let I=c.exec(_);return I?I[0]:b}}else o=a,a=null;if(p.negate||p.optional||p.required||typeof o=="boolean"){if(p.negate){let c=p.long.replace(/^--no-/,"--");o=this._findOption(c)?this._getOptionValue(v):!0}o!==void 0&&(this._setOptionValue(v,o),p.defaultValue=o)}return this.options.push(p),this.on("option:"+g,c=>{let _=this._getOptionValue(v);c!==null&&a?c=a(c,_===void 0?o:_):c!==null&&p.variadic&&(_===o||!Array.isArray(_)?c=[c]:c=_.concat(c)),typeof _=="boolean"||typeof _=="undefined"?c==null?this._setOptionValue(v,p.negate?!1:o||!0):this._setOptionValue(v,c):c!==null&&this._setOptionValue(v,p.negate?!1:c)}),this}option(r,n,u,a){return this._optionEx({},r,n,u,a)}requiredOption(r,n,u,a){return this._optionEx({mandatory:!0},r,n,u,a)}combineFlagAndOptionalValue(r){return this._combineFlagAndOptionalValue=r===void 0||r,this}allowUnknownOption(r){return this._allowUnknownOption=r===void 0||r,this}storeOptionsAsProperties(r){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=r===void 0||r,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(r){return this._passCommandToAction=r===void 0||r,this}_setOptionValue(r,n){this._storeOptionsAsProperties?this[r]=n:this._optionValues[r]=n}_getOptionValue(r){return this._storeOptionsAsProperties?this[r]:this._optionValues[r]}parse(r,n){if(r!==void 0&&!Array.isArray(r))throw new Error("first parameter to parse must be array or undefined");n=n||{},r===void 0&&(r=process.argv,process.versions&&process.versions.electron&&(n.from="electron")),this.rawArgs=r.slice();let u;switch(n.from){case void 0:case"node":this._scriptPath=r[1],u=r.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=r[1],u=r.slice(2)):u=r.slice(1);break;case"user":u=r.slice(0);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&vr.basename(this._scriptPath,vr.extname(this._scriptPath)),this._parseCommand([],u),this}parseAsync(r,n){return this.parse(r,n),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(r,n){n=n.slice();let u=!1,a=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let o=this._scriptPath;!o&&process.mainModule&&(o=process.mainModule.filename);let p;try{let I=Xo.realpathSync(o);p=vr.dirname(I)}catch{p="."}let g=vr.basename(o,vr.extname(o))+"-"+r._name;r._executableFile&&(g=r._executableFile);let v=vr.join(p,g);Xo.existsSync(v)?g=v:a.forEach(I=>{Xo.existsSync(`${v}${I}`)&&(g=`${v}${I}`)}),u=a.includes(vr.extname(g));let c;process.platform!=="win32"?u?(n.unshift(g),n=Dc(process.execArgv).concat(n),c=zo(process.argv[0],n,{stdio:"inherit"})):c=zo(g,n,{stdio:"inherit"}):(n.unshift(g),n=Dc(process.execArgv).concat(n),c=zo(process.execPath,n,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(I=>{process.on(I,()=>{c.killed===!1&&c.exitCode===null&&c.kill(I)})});let b=this._exitCallback;b?c.on("close",()=>{b(new Tn(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):c.on("close",process.exit.bind(process)),c.on("error",I=>{if(I.code==="ENOENT"){let P=`'${g}' does not exist
7
- - if '${r._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
8
- - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(P)}else if(I.code==="EACCES")throw new Error(`'${g}' not executable`);if(!b)process.exit(1);else{let P=new Tn(1,"commander.executeSubCommandAsync","(error)");P.nestedError=I,b(P)}}),this.runningCommand=c}_dispatchSubcommand(r,n,u){let a=this._findCommand(r);a||this._helpAndError(),a._executableHandler?this._executeSubCommand(a,n.concat(u)):a._parseCommand(n,u)}_parseCommand(r,n){let u=this.parseOptions(n);if(r=r.concat(u.operands),n=u.unknown,this.args=r.concat(n),r&&this._findCommand(r[0]))this._dispatchSubcommand(r[0],r.slice(1),n);else if(this._lazyHasImplicitHelpCommand()&&r[0]===this._helpCommandName)r.length===1?this.help():this._dispatchSubcommand(r[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Tc(this,n),this._dispatchSubcommand(this._defaultCommandName,r,n);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Tc(this,u.unknown),this._checkForMissingMandatoryOptions(),u.unknown.length>0&&this.unknownOption(u.unknown[0]),this._actionHandler){let a=this.args.slice();this._args.forEach((o,p)=>{o.required&&a[p]==null?this.missingArgument(o.name):o.variadic&&(a[p]=a.splice(p))}),this._actionHandler(a),this.emit("command:"+this.name(),r,n)}else r.length?this._findCommand("*")?this._dispatchSubcommand("*",r,n):this.listenerCount("command:*")?this.emit("command:*",r,n):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(r){if(!!r)return this.commands.find(n=>n._name===r||n._aliases.includes(r))}_findOption(r){return this.options.find(n=>n.is(r))}_checkForMissingMandatoryOptions(){for(let r=this;r;r=r.parent)r.options.forEach(n=>{n.mandatory&&r._getOptionValue(n.attributeName())===void 0&&r.missingMandatoryOptionValue(n)})}parseOptions(r){let n=[],u=[],a=n,o=r.slice();function p(v){return v.length>1&&v[0]==="-"}let g=null;for(;o.length;){let v=o.shift();if(v==="--"){a===u&&a.push(v),a.push(...o);break}if(g&&!p(v)){this.emit(`option:${g.name()}`,v);continue}if(g=null,p(v)){let c=this._findOption(v);if(c){if(c.required){let _=o.shift();_===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,_)}else if(c.optional){let _=null;o.length>0&&!p(o[0])&&(_=o.shift()),this.emit(`option:${c.name()}`,_)}else this.emit(`option:${c.name()}`);g=c.variadic?c:null;continue}}if(v.length>2&&v[0]==="-"&&v[1]!=="-"){let c=this._findOption(`-${v[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,v.slice(2)):(this.emit(`option:${c.name()}`),o.unshift(`-${v.slice(2)}`));continue}}if(/^--[^=]+=/.test(v)){let c=v.indexOf("="),_=this._findOption(v.slice(0,c));if(_&&(_.required||_.optional)){this.emit(`option:${_.name()}`,v.slice(c+1));continue}}v.length>1&&v[0]==="-"&&(a=u),a.push(v)}return{operands:n,unknown:u}}opts(){if(this._storeOptionsAsProperties){let r={},n=this.options.length;for(let u=0;u<n;u++){let a=this.options[u].attributeName();r[a]=a===this._versionOptionName?this._version:this[a]}return r}return this._optionValues}missingArgument(r){let n=`error: missing required argument '${r}'`;console.error(n),this._exit(1,"commander.missingArgument",n)}optionMissingArgument(r,n){let u;n?u=`error: option '${r.flags}' argument missing, got '${n}'`:u=`error: option '${r.flags}' argument missing`,console.error(u),this._exit(1,"commander.optionMissingArgument",u)}missingMandatoryOptionValue(r){let n=`error: required option '${r.flags}' not specified`;console.error(n),this._exit(1,"commander.missingMandatoryOptionValue",n)}unknownOption(r){if(this._allowUnknownOption)return;let n=`error: unknown option '${r}'`;console.error(n),this._exit(1,"commander.unknownOption",n)}unknownCommand(){let r=[this.name()];for(let a=this.parent;a;a=a.parent)r.unshift(a.name());let n=r.join(" "),u=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${n} ${this._helpLongFlag}'.`:"");console.error(u),this._exit(1,"commander.unknownCommand",u)}version(r,n,u){if(r===void 0)return this._version;this._version=r,n=n||"-V, --version",u=u||"output the version number";let a=new Yi(n,u);return this._versionOptionName=a.attributeName(),this.options.push(a),this.on("option:"+a.name(),()=>{process.stdout.write(r+`
9
- `),this._exit(0,"commander.version",r)}),this}description(r,n){return r===void 0&&n===void 0?this._description:(this._description=r,this._argsDescription=n,this)}alias(r){if(r===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),r===n._name)throw new Error("Command alias can't be the same as its name");return n._aliases.push(r),this}aliases(r){return r===void 0?this._aliases:(r.forEach(n=>this.alias(n)),this)}usage(r){if(r===void 0){if(this._usage)return this._usage;let n=this._args.map(u=>Lc(u));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?n:[]).join(" ")}return this._usage=r,this}name(r){return r===void 0?this._name:(this._name=r,this)}prepareCommands(){let r=this.commands.filter(n=>!n._hidden).map(n=>{let u=n._args.map(a=>Lc(a)).join(" ");return[n._name+(n._aliases[0]?"|"+n._aliases[0]:"")+(n.options.length?" [options]":"")+(u?" "+u:""),n._description]});return this._lazyHasImplicitHelpCommand()&&r.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),r}largestCommandLength(){return this.prepareCommands().reduce((n,u)=>Math.max(n,u[0].length),0)}largestOptionLength(){let r=[].slice.call(this.options);return r.push({flags:this._helpFlags}),r.reduce((n,u)=>Math.max(n,u.flags.length),0)}largestArgLength(){return this._args.reduce((r,n)=>Math.max(r,n.name.length),0)}padWidth(){let r=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>r&&(r=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>r&&(r=this.largestCommandLength()),r}optionHelp(){let r=this.padWidth(),u=(process.stdout.columns||80)-r-4;function a(v,c){return Yo(v,r)+" "+Pc(c,u,r+2)}let o=this.options.map(v=>{let c=v.description+(!v.negate&&v.defaultValue!==void 0?" (default: "+JSON.stringify(v.defaultValue)+")":"");return a(v.flags,c)}),p=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),g=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(p||g){let v=this._helpFlags;p?g||(v=this._helpShortFlag):v=this._helpLongFlag,o.push(a(v,this._helpDescription))}return o.join(`
10
- `)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let r=this.prepareCommands(),n=this.padWidth(),a=(process.stdout.columns||80)-n-4;return["Commands:",r.map(o=>{let p=o[1]?" "+o[1]:"";return(p?Yo(o[0],n):o[0])+Pc(p,a,n+2)}).join(`
1
+ "use strict";var P=(i,n)=>()=>(n||i((n={exports:{}}).exports,n),n.exports);var Ko=P((wn,ql)=>{var mE=require("events").EventEmitter,zo=require("child_process").spawn,En=require("path"),Yo=require("fs"),Qi=class{constructor(n,r){this.flags=n,this.required=n.includes("<"),this.optional=n.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(n),this.mandatory=!1;let u=Nl(n);this.short=u.shortFlag,this.long=u.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.description=r||"",this.defaultValue=void 0}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return _E(this.name().replace(/^no-/,""))}is(n){return this.short===n||this.long===n}},Nr=class extends Error{constructor(n,r,u){super(u);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=n,this.nestedError=void 0}},Dr=class extends mE{constructor(n){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=n||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._storeOptionsAsPropertiesCalled=!1,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(n,r,u){let a=r,o=u;typeof a=="object"&&a!==null&&(o=a,a=null),o=o||{};let h=n.split(/ +/),g=this.createCommand(h.shift());return a&&(g.description(a),g._executableHandler=!0),o.isDefault&&(this._defaultCommandName=g._name),g._hidden=!!(o.noHelp||o.hidden),g._hasHelpOption=this._hasHelpOption,g._helpFlags=this._helpFlags,g._helpDescription=this._helpDescription,g._helpShortFlag=this._helpShortFlag,g._helpLongFlag=this._helpLongFlag,g._helpCommandName=this._helpCommandName,g._helpCommandnameAndArgs=this._helpCommandnameAndArgs,g._helpCommandDescription=this._helpCommandDescription,g._exitCallback=this._exitCallback,g._storeOptionsAsProperties=this._storeOptionsAsProperties,g._passCommandToAction=this._passCommandToAction,g._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,g._executableFile=o.executableFile||null,this.commands.push(g),g._parseExpectedArgs(h),g.parent=this,a?this:g}createCommand(n){return new Dr(n)}addCommand(n,r){if(!n._name)throw new Error("Command passed to .addCommand() must have a name");function u(a){a.forEach(o=>{if(o._executableHandler&&!o._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${o.name()}`);u(o.commands)})}return u(n.commands),r=r||{},r.isDefault&&(this._defaultCommandName=n._name),(r.noHelp||r.hidden)&&(n._hidden=!0),this.commands.push(n),n.parent=this,this}arguments(n){return this._parseExpectedArgs(n.split(/ +/))}addHelpCommand(n,r){return n===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof n=="string"&&(this._helpCommandName=n.split(" ")[0],this._helpCommandnameAndArgs=n),this._helpCommandDescription=r||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(n){if(!!n.length)return n.forEach(r=>{let u={required:!1,name:"",variadic:!1};switch(r[0]){case"<":u.required=!0,u.name=r.slice(1,-1);break;case"[":u.name=r.slice(1,-1);break}u.name.length>3&&u.name.slice(-3)==="..."&&(u.variadic=!0,u.name=u.name.slice(0,-3)),u.name&&this._args.push(u)}),this._args.forEach((r,u)=>{if(r.variadic&&u<this._args.length-1)throw new Error(`only the last argument can be variadic '${r.name}'`)}),this}exitOverride(n){return n?this._exitCallback=n:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(n,r,u){this._exitCallback&&this._exitCallback(new Nr(n,r,u)),process.exit(n)}action(n){let r=u=>{let a=this._args.length,o=u.slice(0,a);this._passCommandToAction?o[a]=this:o[a]=this.opts(),u.length>a&&o.push(u.slice(a));let h=n.apply(this,o),g=this;for(;g.parent;)g=g.parent;g._actionResults.push(h)};return this._actionHandler=r,this}_checkForOptionNameClash(n){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||n.name()==="help"||this._getOptionValue(n.attributeName())===void 0)return;let u=!0;if(n.negate){let a=n.long.replace(/^--no-/,"--");u=!this._findOption(a)}else if(n.long){let a=n.long.replace(/^--/,"--no-");u=!this._findOption(a)}if(u)throw new Error(`option '${n.name()}' clashes with existing property '${n.attributeName()}' on Command
2
+ - call storeOptionsAsProperties(false) to store option values safely,
3
+ - or call storeOptionsAsProperties(true) to suppress this check,
4
+ - or change option name
5
+
6
+ Read more on https://git.io/JJc0W`)}_optionEx(n,r,u,a,o){let h=new Qi(r,u),g=h.name(),_=h.attributeName();if(h.mandatory=!!n.mandatory,this._checkForOptionNameClash(h),typeof a!="function")if(a instanceof RegExp){let l=a;a=(m,b)=>{let I=l.exec(m);return I?I[0]:b}}else o=a,a=null;if(h.negate||h.optional||h.required||typeof o=="boolean"){if(h.negate){let l=h.long.replace(/^--no-/,"--");o=this._findOption(l)?this._getOptionValue(_):!0}o!==void 0&&(this._setOptionValue(_,o),h.defaultValue=o)}return this.options.push(h),this.on("option:"+g,l=>{let m=this._getOptionValue(_);l!==null&&a?l=a(l,m===void 0?o:m):l!==null&&h.variadic&&(m===o||!Array.isArray(m)?l=[l]:l=m.concat(l)),typeof m=="boolean"||typeof m=="undefined"?l==null?this._setOptionValue(_,h.negate?!1:o||!0):this._setOptionValue(_,l):l!==null&&this._setOptionValue(_,h.negate?!1:l)}),this}option(n,r,u,a){return this._optionEx({},n,r,u,a)}requiredOption(n,r,u,a){return this._optionEx({mandatory:!0},n,r,u,a)}combineFlagAndOptionalValue(n){return this._combineFlagAndOptionalValue=n===void 0||n,this}allowUnknownOption(n){return this._allowUnknownOption=n===void 0||n,this}storeOptionsAsProperties(n){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=n===void 0||n,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(n){return this._passCommandToAction=n===void 0||n,this}_setOptionValue(n,r){this._storeOptionsAsProperties?this[n]=r:this._optionValues[n]=r}_getOptionValue(n){return this._storeOptionsAsProperties?this[n]:this._optionValues[n]}parse(n,r){if(n!==void 0&&!Array.isArray(n))throw new Error("first parameter to parse must be array or undefined");r=r||{},n===void 0&&(n=process.argv,process.versions&&process.versions.electron&&(r.from="electron")),this.rawArgs=n.slice();let u;switch(r.from){case void 0:case"node":this._scriptPath=n[1],u=n.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=n[1],u=n.slice(2)):u=n.slice(1);break;case"user":u=n.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&En.basename(this._scriptPath,En.extname(this._scriptPath)),this._parseCommand([],u),this}parseAsync(n,r){return this.parse(n,r),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(n,r){r=r.slice();let u=!1,a=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let o=this._scriptPath;!o&&process.mainModule&&(o=process.mainModule.filename);let h;try{let I=Yo.realpathSync(o);h=En.dirname(I)}catch{h="."}let g=En.basename(o,En.extname(o))+"-"+n._name;n._executableFile&&(g=n._executableFile);let _=En.join(h,g);Yo.existsSync(_)?g=_:a.forEach(I=>{Yo.existsSync(`${_}${I}`)&&(g=`${_}${I}`)}),u=a.includes(En.extname(g));let l;process.platform!=="win32"?u?(r.unshift(g),r=Dl(process.execArgv).concat(r),l=zo(process.argv[0],r,{stdio:"inherit"})):l=zo(g,r,{stdio:"inherit"}):(r.unshift(g),r=Dl(process.execArgv).concat(r),l=zo(process.execPath,r,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(I=>{process.on(I,()=>{l.killed===!1&&l.exitCode===null&&l.kill(I)})});let b=this._exitCallback;b?l.on("close",()=>{b(new Nr(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):l.on("close",process.exit.bind(process)),l.on("error",I=>{if(I.code==="ENOENT"){let R=`'${g}' does not exist
7
+ - if '${n._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
8
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(R)}else if(I.code==="EACCES")throw new Error(`'${g}' not executable`);if(!b)process.exit(1);else{let R=new Nr(1,"commander.executeSubCommandAsync","(error)");R.nestedError=I,b(R)}}),this.runningCommand=l}_dispatchSubcommand(n,r,u){let a=this._findCommand(n);a||this._helpAndError(),a._executableHandler?this._executeSubCommand(a,r.concat(u)):a._parseCommand(r,u)}_parseCommand(n,r){let u=this.parseOptions(r);if(n=n.concat(u.operands),r=u.unknown,this.args=n.concat(r),n&&this._findCommand(n[0]))this._dispatchSubcommand(n[0],n.slice(1),r);else if(this._lazyHasImplicitHelpCommand()&&n[0]===this._helpCommandName)n.length===1?this.help():this._dispatchSubcommand(n[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Tl(this,r),this._dispatchSubcommand(this._defaultCommandName,n,r);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Tl(this,u.unknown),this._checkForMissingMandatoryOptions(),u.unknown.length>0&&this.unknownOption(u.unknown[0]),this._actionHandler){let a=this.args.slice();this._args.forEach((o,h)=>{o.required&&a[h]==null?this.missingArgument(o.name):o.variadic&&(a[h]=a.splice(h))}),this._actionHandler(a),this.emit("command:"+this.name(),n,r)}else n.length?this._findCommand("*")?this._dispatchSubcommand("*",n,r):this.listenerCount("command:*")?this.emit("command:*",n,r):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(n){if(!!n)return this.commands.find(r=>r._name===n||r._aliases.includes(n))}_findOption(n){return this.options.find(r=>r.is(n))}_checkForMissingMandatoryOptions(){for(let n=this;n;n=n.parent)n.options.forEach(r=>{r.mandatory&&n._getOptionValue(r.attributeName())===void 0&&n.missingMandatoryOptionValue(r)})}parseOptions(n){let r=[],u=[],a=r,o=n.slice();function h(_){return _.length>1&&_[0]==="-"}let g=null;for(;o.length;){let _=o.shift();if(_==="--"){a===u&&a.push(_),a.push(...o);break}if(g&&!h(_)){this.emit(`option:${g.name()}`,_);continue}if(g=null,h(_)){let l=this._findOption(_);if(l){if(l.required){let m=o.shift();m===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,m)}else if(l.optional){let m=null;o.length>0&&!h(o[0])&&(m=o.shift()),this.emit(`option:${l.name()}`,m)}else this.emit(`option:${l.name()}`);g=l.variadic?l:null;continue}}if(_.length>2&&_[0]==="-"&&_[1]!=="-"){let l=this._findOption(`-${_[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,_.slice(2)):(this.emit(`option:${l.name()}`),o.unshift(`-${_.slice(2)}`));continue}}if(/^--[^=]+=/.test(_)){let l=_.indexOf("="),m=this._findOption(_.slice(0,l));if(m&&(m.required||m.optional)){this.emit(`option:${m.name()}`,_.slice(l+1));continue}}_.length>1&&_[0]==="-"&&(a=u),a.push(_)}return{operands:r,unknown:u}}opts(){if(this._storeOptionsAsProperties){let n={},r=this.options.length;for(let u=0;u<r;u++){let a=this.options[u].attributeName();n[a]=a===this._versionOptionName?this._version:this[a]}return n}return this._optionValues}missingArgument(n){let r=`error: missing required argument '${n}'`;console.error(r),this._exit(1,"commander.missingArgument",r)}optionMissingArgument(n,r){let u;r?u=`error: option '${n.flags}' argument missing, got '${r}'`:u=`error: option '${n.flags}' argument missing`,console.error(u),this._exit(1,"commander.optionMissingArgument",u)}missingMandatoryOptionValue(n){let r=`error: required option '${n.flags}' not specified`;console.error(r),this._exit(1,"commander.missingMandatoryOptionValue",r)}unknownOption(n){if(this._allowUnknownOption)return;let r=`error: unknown option '${n}'`;console.error(r),this._exit(1,"commander.unknownOption",r)}unknownCommand(){let n=[this.name()];for(let a=this.parent;a;a=a.parent)n.unshift(a.name());let r=n.join(" "),u=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${r} ${this._helpLongFlag}'.`:"");console.error(u),this._exit(1,"commander.unknownCommand",u)}version(n,r,u){if(n===void 0)return this._version;this._version=n,r=r||"-V, --version",u=u||"output the version number";let a=new Qi(r,u);return this._versionOptionName=a.attributeName(),this.options.push(a),this.on("option:"+a.name(),()=>{process.stdout.write(n+`
9
+ `),this._exit(0,"commander.version",n)}),this}description(n,r){return n===void 0&&r===void 0?this._description:(this._description=n,this._argsDescription=r,this)}alias(n){if(n===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]),n===r._name)throw new Error("Command alias can't be the same as its name");return r._aliases.push(n),this}aliases(n){return n===void 0?this._aliases:(n.forEach(r=>this.alias(r)),this)}usage(n){if(n===void 0){if(this._usage)return this._usage;let r=this._args.map(u=>Ll(u));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?r:[]).join(" ")}return this._usage=n,this}name(n){return n===void 0?this._name:(this._name=n,this)}prepareCommands(){let n=this.commands.filter(r=>!r._hidden).map(r=>{let u=r._args.map(a=>Ll(a)).join(" ");return[r._name+(r._aliases[0]?"|"+r._aliases[0]:"")+(r.options.length?" [options]":"")+(u?" "+u:""),r._description]});return this._lazyHasImplicitHelpCommand()&&n.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),n}largestCommandLength(){return this.prepareCommands().reduce((r,u)=>Math.max(r,u[0].length),0)}largestOptionLength(){let n=[].slice.call(this.options);return n.push({flags:this._helpFlags}),n.reduce((r,u)=>Math.max(r,u.flags.length),0)}largestArgLength(){return this._args.reduce((n,r)=>Math.max(n,r.name.length),0)}padWidth(){let n=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>n&&(n=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>n&&(n=this.largestCommandLength()),n}optionHelp(){let n=this.padWidth(),u=(process.stdout.columns||80)-n-4;function a(_,l){return Xo(_,n)+" "+Pl(l,u,n+2)}let o=this.options.map(_=>{let l=_.description+(!_.negate&&_.defaultValue!==void 0?" (default: "+JSON.stringify(_.defaultValue)+")":"");return a(_.flags,l)}),h=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),g=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(h||g){let _=this._helpFlags;h?g||(_=this._helpShortFlag):_=this._helpLongFlag,o.push(a(_,this._helpDescription))}return o.join(`
10
+ `)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let n=this.prepareCommands(),r=this.padWidth(),a=(process.stdout.columns||80)-r-4;return["Commands:",n.map(o=>{let h=o[1]?" "+o[1]:"";return(h?Xo(o[0],r):o[0])+Pl(h,a,r+2)}).join(`
11
11
  `).replace(/^/gm," "),""].join(`
12
- `)}helpInformation(){let r=[];if(this._description){r=[this._description,""];let v=this._argsDescription;if(v&&this._args.length){let c=this.padWidth(),b=(process.stdout.columns||80)-c-5;r.push("Arguments:"),this._args.forEach(I=>{r.push(" "+Yo(I.name,c)+" "+Rc(v[I.name]||"",b,c+4))}),r.push("")}}let n=this._name;this._aliases[0]&&(n=n+"|"+this._aliases[0]);let u="";for(let v=this.parent;v;v=v.parent)u=v.name()+" "+u;let a=["Usage: "+u+n+" "+this.usage(),""],o=[],p=this.commandHelp();p&&(o=[p]);let g=[];return(this._hasHelpOption||this.options.length>0)&&(g=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),a.concat(r).concat(g).concat(o).join(`
13
- `)}outputHelp(r){r||(r=u=>u);let n=r(this.helpInformation());if(typeof n!="string"&&!Buffer.isBuffer(n))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(n),this.emit(this._helpLongFlag)}helpOption(r,n){if(typeof r=="boolean")return this._hasHelpOption=r,this;this._helpFlags=r||this._helpFlags,this._helpDescription=n||this._helpDescription;let u=Nc(this._helpFlags);return this._helpShortFlag=u.shortFlag,this._helpLongFlag=u.longFlag,this}help(r){this.outputHelp(r),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};_r=qc.exports=new Ln;_r.program=_r;_r.Command=Ln;_r.Option=Yi;_r.CommanderError=Tn;function pE(i){return i.split("-").reduce((r,n)=>r+n[0].toUpperCase()+n.slice(1))}function Yo(i,r){let n=Math.max(0,r-i.length);return i+Array(n+1).join(" ")}function Rc(i,r,n){let u=new RegExp(".{1,"+(r-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(i.match(u)||[]).map((o,p)=>(o.slice(-1)===`
14
- `&&(o=o.slice(0,o.length-1)),(p>0&&n?Array(n+1).join(" "):"")+o.trimRight())).join(`
15
- `)}function Pc(i,r,n){return i.match(/[\n]\s+/)||r<40?i:Rc(i,r,n)}function Tc(i,r){i._hasHelpOption&&r.find(u=>u===i._helpLongFlag||u===i._helpShortFlag)&&(i.outputHelp(),i._exit(0,"commander.helpDisplayed","(outputHelp)"))}function Lc(i){let r=i.name+(i.variadic===!0?"...":"");return i.required?"<"+r+">":"["+r+"]"}function Nc(i){let r,n,u=i.split(/[ |,]+/);return u.length>1&&!/^[[<]/.test(u[1])&&(r=u.shift()),n=u.shift(),!r&&/^-[^-]$/.test(n)&&(r=n,n=void 0),{shortFlag:r,longFlag:n}}function Dc(i){return i.map(r=>{if(!r.startsWith("--inspect"))return r;let n,u="127.0.0.1",a="9229",o;return(o=r.match(/^(--inspect(-brk)?)$/))!==null?n=o[1]:(o=r.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=o[1],/^\d+$/.test(o[3])?a=o[3]:u=o[3]):(o=r.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=o[1],u=o[3],a=o[4]),n&&a!=="0"?`${n}=${u}:${parseInt(a)+1}`:r})}});var zr=R((Vr,Nn)=>{(function(){var i,r="4.17.21",n=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",o="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",g=500,v="__lodash_placeholder__",c=1,_=2,b=4,I=1,P=2,H=1,re=2,ue=4,X=8,Ie=16,pe=32,le=64,ve=128,K=256,Pr=512,Rt=30,_d="...",yd=800,Ed=16,Ju=1,wd=2,bd=3,ur=1/0,Vt=9007199254740991,Sd=17976931348623157e292,ri=0/0,vt=4294967295,Cd=vt-1,Od=vt>>>1,xd=[["ary",ve],["bind",H],["bindKey",re],["curry",X],["curryRight",Ie],["flip",Pr],["partial",pe],["partialRight",le],["rearg",K]],Tr="[object Arguments]",ni="[object Array]",Ad="[object AsyncFunction]",ln="[object Boolean]",cn="[object Date]",Id="[object DOMException]",ii="[object Error]",si="[object Function]",Zu="[object GeneratorFunction]",ct="[object Map]",fn="[object Number]",Rd="[object Null]",Pt="[object Object]",Qu="[object Promise]",Pd="[object Proxy]",hn="[object RegExp]",ft="[object Set]",pn="[object String]",oi="[object Symbol]",Td="[object Undefined]",dn="[object WeakMap]",Ld="[object WeakSet]",gn="[object ArrayBuffer]",Lr="[object DataView]",Os="[object Float32Array]",xs="[object Float64Array]",As="[object Int8Array]",Is="[object Int16Array]",Rs="[object Int32Array]",Ps="[object Uint8Array]",Ts="[object Uint8ClampedArray]",Ls="[object Uint16Array]",Ns="[object Uint32Array]",Nd=/\b__p \+= '';/g,Dd=/\b(__p \+=) '' \+/g,qd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ea=/&(?:amp|lt|gt|quot|#39);/g,ta=/[&<>"']/g,$d=RegExp(ea.source),Fd=RegExp(ta.source),jd=/<%-([\s\S]+?)%>/g,Md=/<%([\s\S]+?)%>/g,ra=/<%=([\s\S]+?)%>/g,Hd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ud=/^\w*$/,Gd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ds=/[\\^$.*+?()[\]{}|]/g,Wd=RegExp(Ds.source),qs=/^\s+/,Bd=/\s/,kd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vd=/\{\n\/\* \[wrapped with (.+)\] \*/,zd=/,? & /,Xd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Yd=/[()=,{}\[\]\/\s]/,Kd=/\\(\\)?/g,Jd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,na=/\w*$/,Zd=/^[-+]0x[0-9a-f]+$/i,Qd=/^0b[01]+$/i,eg=/^\[object .+?Constructor\]$/,tg=/^0o[0-7]+$/i,rg=/^(?:0|[1-9]\d*)$/,ng=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ui=/($^)/,ig=/['\n\r\u2028\u2029\\]/g,ai="\\ud800-\\udfff",sg="\\u0300-\\u036f",og="\\ufe20-\\ufe2f",ug="\\u20d0-\\u20ff",ia=sg+og+ug,sa="\\u2700-\\u27bf",oa="a-z\\xdf-\\xf6\\xf8-\\xff",ag="\\xac\\xb1\\xd7\\xf7",lg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",cg="\\u2000-\\u206f",fg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ua="A-Z\\xc0-\\xd6\\xd8-\\xde",aa="\\ufe0e\\ufe0f",la=ag+lg+cg+fg,$s="['\u2019]",hg="["+ai+"]",ca="["+la+"]",li="["+ia+"]",fa="\\d+",pg="["+sa+"]",ha="["+oa+"]",pa="[^"+ai+la+fa+sa+oa+ua+"]",Fs="\\ud83c[\\udffb-\\udfff]",dg="(?:"+li+"|"+Fs+")",da="[^"+ai+"]",js="(?:\\ud83c[\\udde6-\\uddff]){2}",Ms="[\\ud800-\\udbff][\\udc00-\\udfff]",Nr="["+ua+"]",ga="\\u200d",ma="(?:"+ha+"|"+pa+")",gg="(?:"+Nr+"|"+pa+")",va="(?:"+$s+"(?:d|ll|m|re|s|t|ve))?",_a="(?:"+$s+"(?:D|LL|M|RE|S|T|VE))?",ya=dg+"?",Ea="["+aa+"]?",mg="(?:"+ga+"(?:"+[da,js,Ms].join("|")+")"+Ea+ya+")*",vg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_g="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wa=Ea+ya+mg,yg="(?:"+[pg,js,Ms].join("|")+")"+wa,Eg="(?:"+[da+li+"?",li,js,Ms,hg].join("|")+")",wg=RegExp($s,"g"),bg=RegExp(li,"g"),Hs=RegExp(Fs+"(?="+Fs+")|"+Eg+wa,"g"),Sg=RegExp([Nr+"?"+ha+"+"+va+"(?="+[ca,Nr,"$"].join("|")+")",gg+"+"+_a+"(?="+[ca,Nr+ma,"$"].join("|")+")",Nr+"?"+ma+"+"+va,Nr+"+"+_a,_g,vg,fa,yg].join("|"),"g"),Cg=RegExp("["+ga+ai+ia+aa+"]"),Og=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xg=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ag=-1,ae={};ae[Os]=ae[xs]=ae[As]=ae[Is]=ae[Rs]=ae[Ps]=ae[Ts]=ae[Ls]=ae[Ns]=!0,ae[Tr]=ae[ni]=ae[gn]=ae[ln]=ae[Lr]=ae[cn]=ae[ii]=ae[si]=ae[ct]=ae[fn]=ae[Pt]=ae[hn]=ae[ft]=ae[pn]=ae[dn]=!1;var se={};se[Tr]=se[ni]=se[gn]=se[Lr]=se[ln]=se[cn]=se[Os]=se[xs]=se[As]=se[Is]=se[Rs]=se[ct]=se[fn]=se[Pt]=se[hn]=se[ft]=se[pn]=se[oi]=se[Ps]=se[Ts]=se[Ls]=se[Ns]=!0,se[ii]=se[si]=se[dn]=!1;var Ig={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Rg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Pg={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Tg={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Lg=parseFloat,Ng=parseInt,ba=typeof global=="object"&&global&&global.Object===Object&&global,Dg=typeof self=="object"&&self&&self.Object===Object&&self,we=ba||Dg||Function("return this")(),Us=typeof Vr=="object"&&Vr&&!Vr.nodeType&&Vr,ar=Us&&typeof Nn=="object"&&Nn&&!Nn.nodeType&&Nn,Sa=ar&&ar.exports===Us,Gs=Sa&&ba.process,Qe=function(){try{var E=ar&&ar.require&&ar.require("util").types;return E||Gs&&Gs.binding&&Gs.binding("util")}catch{}}(),Ca=Qe&&Qe.isArrayBuffer,Oa=Qe&&Qe.isDate,xa=Qe&&Qe.isMap,Aa=Qe&&Qe.isRegExp,Ia=Qe&&Qe.isSet,Ra=Qe&&Qe.isTypedArray;function ke(E,C,S){switch(S.length){case 0:return E.call(C);case 1:return E.call(C,S[0]);case 2:return E.call(C,S[0],S[1]);case 3:return E.call(C,S[0],S[1],S[2])}return E.apply(C,S)}function qg(E,C,S,L){for(var M=-1,Q=E==null?0:E.length;++M<Q;){var ye=E[M];C(L,ye,S(ye),E)}return L}function et(E,C){for(var S=-1,L=E==null?0:E.length;++S<L&&C(E[S],S,E)!==!1;);return E}function $g(E,C){for(var S=E==null?0:E.length;S--&&C(E[S],S,E)!==!1;);return E}function Pa(E,C){for(var S=-1,L=E==null?0:E.length;++S<L;)if(!C(E[S],S,E))return!1;return!0}function zt(E,C){for(var S=-1,L=E==null?0:E.length,M=0,Q=[];++S<L;){var ye=E[S];C(ye,S,E)&&(Q[M++]=ye)}return Q}function ci(E,C){var S=E==null?0:E.length;return!!S&&Dr(E,C,0)>-1}function Ws(E,C,S){for(var L=-1,M=E==null?0:E.length;++L<M;)if(S(C,E[L]))return!0;return!1}function ce(E,C){for(var S=-1,L=E==null?0:E.length,M=Array(L);++S<L;)M[S]=C(E[S],S,E);return M}function Xt(E,C){for(var S=-1,L=C.length,M=E.length;++S<L;)E[M+S]=C[S];return E}function Bs(E,C,S,L){var M=-1,Q=E==null?0:E.length;for(L&&Q&&(S=E[++M]);++M<Q;)S=C(S,E[M],M,E);return S}function Fg(E,C,S,L){var M=E==null?0:E.length;for(L&&M&&(S=E[--M]);M--;)S=C(S,E[M],M,E);return S}function ks(E,C){for(var S=-1,L=E==null?0:E.length;++S<L;)if(C(E[S],S,E))return!0;return!1}var jg=Vs("length");function Mg(E){return E.split("")}function Hg(E){return E.match(Xd)||[]}function Ta(E,C,S){var L;return S(E,function(M,Q,ye){if(C(M,Q,ye))return L=Q,!1}),L}function fi(E,C,S,L){for(var M=E.length,Q=S+(L?1:-1);L?Q--:++Q<M;)if(C(E[Q],Q,E))return Q;return-1}function Dr(E,C,S){return C===C?Zg(E,C,S):fi(E,La,S)}function Ug(E,C,S,L){for(var M=S-1,Q=E.length;++M<Q;)if(L(E[M],C))return M;return-1}function La(E){return E!==E}function Na(E,C){var S=E==null?0:E.length;return S?Xs(E,C)/S:ri}function Vs(E){return function(C){return C==null?i:C[E]}}function zs(E){return function(C){return E==null?i:E[C]}}function Da(E,C,S,L,M){return M(E,function(Q,ye,ie){S=L?(L=!1,Q):C(S,Q,ye,ie)}),S}function Gg(E,C){var S=E.length;for(E.sort(C);S--;)E[S]=E[S].value;return E}function Xs(E,C){for(var S,L=-1,M=E.length;++L<M;){var Q=C(E[L]);Q!==i&&(S=S===i?Q:S+Q)}return S}function Ys(E,C){for(var S=-1,L=Array(E);++S<E;)L[S]=C(S);return L}function Wg(E,C){return ce(C,function(S){return[S,E[S]]})}function qa(E){return E&&E.slice(0,Ma(E)+1).replace(qs,"")}function Ve(E){return function(C){return E(C)}}function Ks(E,C){return ce(C,function(S){return E[S]})}function mn(E,C){return E.has(C)}function $a(E,C){for(var S=-1,L=E.length;++S<L&&Dr(C,E[S],0)>-1;);return S}function Fa(E,C){for(var S=E.length;S--&&Dr(C,E[S],0)>-1;);return S}function Bg(E,C){for(var S=E.length,L=0;S--;)E[S]===C&&++L;return L}var kg=zs(Ig),Vg=zs(Rg);function zg(E){return"\\"+Tg[E]}function Xg(E,C){return E==null?i:E[C]}function qr(E){return Cg.test(E)}function Yg(E){return Og.test(E)}function Kg(E){for(var C,S=[];!(C=E.next()).done;)S.push(C.value);return S}function Js(E){var C=-1,S=Array(E.size);return E.forEach(function(L,M){S[++C]=[M,L]}),S}function ja(E,C){return function(S){return E(C(S))}}function Yt(E,C){for(var S=-1,L=E.length,M=0,Q=[];++S<L;){var ye=E[S];(ye===C||ye===v)&&(E[S]=v,Q[M++]=S)}return Q}function hi(E){var C=-1,S=Array(E.size);return E.forEach(function(L){S[++C]=L}),S}function Jg(E){var C=-1,S=Array(E.size);return E.forEach(function(L){S[++C]=[L,L]}),S}function Zg(E,C,S){for(var L=S-1,M=E.length;++L<M;)if(E[L]===C)return L;return-1}function Qg(E,C,S){for(var L=S+1;L--;)if(E[L]===C)return L;return L}function $r(E){return qr(E)?tm(E):jg(E)}function ht(E){return qr(E)?rm(E):Mg(E)}function Ma(E){for(var C=E.length;C--&&Bd.test(E.charAt(C)););return C}var em=zs(Pg);function tm(E){for(var C=Hs.lastIndex=0;Hs.test(E);)++C;return C}function rm(E){return E.match(Hs)||[]}function nm(E){return E.match(Sg)||[]}var im=function E(C){C=C==null?we:Kt.defaults(we.Object(),C,Kt.pick(we,xg));var S=C.Array,L=C.Date,M=C.Error,Q=C.Function,ye=C.Math,ie=C.Object,Zs=C.RegExp,sm=C.String,tt=C.TypeError,pi=S.prototype,om=Q.prototype,Fr=ie.prototype,di=C["__core-js_shared__"],gi=om.toString,ne=Fr.hasOwnProperty,um=0,Ha=function(){var e=/[^.]+$/.exec(di&&di.keys&&di.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),mi=Fr.toString,am=gi.call(ie),lm=we._,cm=Zs("^"+gi.call(ne).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Sa?C.Buffer:i,Jt=C.Symbol,_i=C.Uint8Array,Ua=vi?vi.allocUnsafe:i,yi=ja(ie.getPrototypeOf,ie),Ga=ie.create,Wa=Fr.propertyIsEnumerable,Ei=pi.splice,Ba=Jt?Jt.isConcatSpreadable:i,vn=Jt?Jt.iterator:i,lr=Jt?Jt.toStringTag:i,wi=function(){try{var e=dr(ie,"defineProperty");return e({},"",{}),e}catch{}}(),fm=C.clearTimeout!==we.clearTimeout&&C.clearTimeout,hm=L&&L.now!==we.Date.now&&L.now,pm=C.setTimeout!==we.setTimeout&&C.setTimeout,bi=ye.ceil,Si=ye.floor,Qs=ie.getOwnPropertySymbols,dm=vi?vi.isBuffer:i,ka=C.isFinite,gm=pi.join,mm=ja(ie.keys,ie),Ee=ye.max,Re=ye.min,vm=L.now,_m=C.parseInt,Va=ye.random,ym=pi.reverse,eo=dr(C,"DataView"),_n=dr(C,"Map"),to=dr(C,"Promise"),jr=dr(C,"Set"),yn=dr(C,"WeakMap"),En=dr(ie,"create"),Ci=yn&&new yn,Mr={},Em=gr(eo),wm=gr(_n),bm=gr(to),Sm=gr(jr),Cm=gr(yn),Oi=Jt?Jt.prototype:i,wn=Oi?Oi.valueOf:i,za=Oi?Oi.toString:i;function h(e){if(he(e)&&!U(e)&&!(e instanceof Y)){if(e instanceof rt)return e;if(ne.call(e,"__wrapped__"))return Xl(e)}return new rt(e)}var Hr=function(){function e(){}return function(t){if(!fe(t))return{};if(Ga)return Ga(t);e.prototype=t;var s=new e;return e.prototype=i,s}}();function xi(){}function rt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}h.templateSettings={escape:jd,evaluate:Md,interpolate:ra,variable:"",imports:{_:h}},h.prototype=xi.prototype,h.prototype.constructor=h,rt.prototype=Hr(xi.prototype),rt.prototype.constructor=rt;function Y(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=vt,this.__views__=[]}function Om(){var e=new Y(this.__wrapped__);return e.__actions__=He(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=He(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=He(this.__views__),e}function xm(){if(this.__filtered__){var e=new Y(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Am(){var e=this.__wrapped__.value(),t=this.__dir__,s=U(e),l=t<0,f=s?e.length:0,d=Mv(0,f,this.__views__),m=d.start,y=d.end,w=y-m,O=l?y:m-1,x=this.__iteratees__,A=x.length,T=0,q=Re(w,this.__takeCount__);if(!s||!l&&f==w&&q==w)return vl(e,this.__actions__);var F=[];e:for(;w--&&T<q;){O+=t;for(var B=-1,j=e[O];++B<A;){var z=x[B],J=z.iteratee,Ye=z.type,$e=J(j);if(Ye==wd)j=$e;else if(!$e){if(Ye==Ju)continue e;break e}}F[T++]=j}return F}Y.prototype=Hr(xi.prototype),Y.prototype.constructor=Y;function cr(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var l=e[t];this.set(l[0],l[1])}}function Im(){this.__data__=En?En(null):{},this.size=0}function Rm(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Pm(e){var t=this.__data__;if(En){var s=t[e];return s===p?i:s}return ne.call(t,e)?t[e]:i}function Tm(e){var t=this.__data__;return En?t[e]!==i:ne.call(t,e)}function Lm(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=En&&t===i?p:t,this}cr.prototype.clear=Im,cr.prototype.delete=Rm,cr.prototype.get=Pm,cr.prototype.has=Tm,cr.prototype.set=Lm;function Tt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var l=e[t];this.set(l[0],l[1])}}function Nm(){this.__data__=[],this.size=0}function Dm(e){var t=this.__data__,s=Ai(t,e);if(s<0)return!1;var l=t.length-1;return s==l?t.pop():Ei.call(t,s,1),--this.size,!0}function qm(e){var t=this.__data__,s=Ai(t,e);return s<0?i:t[s][1]}function $m(e){return Ai(this.__data__,e)>-1}function Fm(e,t){var s=this.__data__,l=Ai(s,e);return l<0?(++this.size,s.push([e,t])):s[l][1]=t,this}Tt.prototype.clear=Nm,Tt.prototype.delete=Dm,Tt.prototype.get=qm,Tt.prototype.has=$m,Tt.prototype.set=Fm;function Lt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var l=e[t];this.set(l[0],l[1])}}function jm(){this.size=0,this.__data__={hash:new cr,map:new(_n||Tt),string:new cr}}function Mm(e){var t=Mi(this,e).delete(e);return this.size-=t?1:0,t}function Hm(e){return Mi(this,e).get(e)}function Um(e){return Mi(this,e).has(e)}function Gm(e,t){var s=Mi(this,e),l=s.size;return s.set(e,t),this.size+=s.size==l?0:1,this}Lt.prototype.clear=jm,Lt.prototype.delete=Mm,Lt.prototype.get=Hm,Lt.prototype.has=Um,Lt.prototype.set=Gm;function fr(e){var t=-1,s=e==null?0:e.length;for(this.__data__=new Lt;++t<s;)this.add(e[t])}function Wm(e){return this.__data__.set(e,p),this}function Bm(e){return this.__data__.has(e)}fr.prototype.add=fr.prototype.push=Wm,fr.prototype.has=Bm;function pt(e){var t=this.__data__=new Tt(e);this.size=t.size}function km(){this.__data__=new Tt,this.size=0}function Vm(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function zm(e){return this.__data__.get(e)}function Xm(e){return this.__data__.has(e)}function Ym(e,t){var s=this.__data__;if(s instanceof Tt){var l=s.__data__;if(!_n||l.length<n-1)return l.push([e,t]),this.size=++s.size,this;s=this.__data__=new Lt(l)}return s.set(e,t),this.size=s.size,this}pt.prototype.clear=km,pt.prototype.delete=Vm,pt.prototype.get=zm,pt.prototype.has=Xm,pt.prototype.set=Ym;function Xa(e,t){var s=U(e),l=!s&&mr(e),f=!s&&!l&&rr(e),d=!s&&!l&&!f&&Br(e),m=s||l||f||d,y=m?Ys(e.length,sm):[],w=y.length;for(var O in e)(t||ne.call(e,O))&&!(m&&(O=="length"||f&&(O=="offset"||O=="parent")||d&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||$t(O,w)))&&y.push(O);return y}function Ya(e){var t=e.length;return t?e[ho(0,t-1)]:i}function Km(e,t){return Hi(He(e),hr(t,0,e.length))}function Jm(e){return Hi(He(e))}function ro(e,t,s){(s!==i&&!dt(e[t],s)||s===i&&!(t in e))&&Nt(e,t,s)}function bn(e,t,s){var l=e[t];(!(ne.call(e,t)&&dt(l,s))||s===i&&!(t in e))&&Nt(e,t,s)}function Ai(e,t){for(var s=e.length;s--;)if(dt(e[s][0],t))return s;return-1}function Zm(e,t,s,l){return Zt(e,function(f,d,m){t(l,f,s(f),m)}),l}function Ka(e,t){return e&&yt(t,be(t),e)}function Qm(e,t){return e&&yt(t,Ge(t),e)}function Nt(e,t,s){t=="__proto__"&&wi?wi(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}function no(e,t){for(var s=-1,l=t.length,f=S(l),d=e==null;++s<l;)f[s]=d?i:jo(e,t[s]);return f}function hr(e,t,s){return e===e&&(s!==i&&(e=e<=s?e:s),t!==i&&(e=e>=t?e:t)),e}function nt(e,t,s,l,f,d){var m,y=t&c,w=t&_,O=t&b;if(s&&(m=f?s(e,l,f,d):s(e)),m!==i)return m;if(!fe(e))return e;var x=U(e);if(x){if(m=Uv(e),!y)return He(e,m)}else{var A=Pe(e),T=A==si||A==Zu;if(rr(e))return El(e,y);if(A==Pt||A==Tr||T&&!f){if(m=w||T?{}:Ml(e),!y)return w?Pv(e,Qm(m,e)):Rv(e,Ka(m,e))}else{if(!se[A])return f?e:{};m=Gv(e,A,y)}}d||(d=new pt);var q=d.get(e);if(q)return q;d.set(e,m),dc(e)?e.forEach(function(j){m.add(nt(j,t,s,j,e,d))}):hc(e)&&e.forEach(function(j,z){m.set(z,nt(j,t,s,z,e,d))});var F=O?w?Co:So:w?Ge:be,B=x?i:F(e);return et(B||e,function(j,z){B&&(z=j,j=e[z]),bn(m,z,nt(j,t,s,z,e,d))}),m}function ev(e){var t=be(e);return function(s){return Ja(s,e,t)}}function Ja(e,t,s){var l=s.length;if(e==null)return!l;for(e=ie(e);l--;){var f=s[l],d=t[f],m=e[f];if(m===i&&!(f in e)||!d(m))return!1}return!0}function Za(e,t,s){if(typeof e!="function")throw new tt(a);return Rn(function(){e.apply(i,s)},t)}function Sn(e,t,s,l){var f=-1,d=ci,m=!0,y=e.length,w=[],O=t.length;if(!y)return w;s&&(t=ce(t,Ve(s))),l?(d=Ws,m=!1):t.length>=n&&(d=mn,m=!1,t=new fr(t));e:for(;++f<y;){var x=e[f],A=s==null?x:s(x);if(x=l||x!==0?x:0,m&&A===A){for(var T=O;T--;)if(t[T]===A)continue e;w.push(x)}else d(t,A,l)||w.push(x)}return w}var Zt=Ol(_t),Qa=Ol(so,!0);function tv(e,t){var s=!0;return Zt(e,function(l,f,d){return s=!!t(l,f,d),s}),s}function Ii(e,t,s){for(var l=-1,f=e.length;++l<f;){var d=e[l],m=t(d);if(m!=null&&(y===i?m===m&&!Xe(m):s(m,y)))var y=m,w=d}return w}function rv(e,t,s,l){var f=e.length;for(s=W(s),s<0&&(s=-s>f?0:f+s),l=l===i||l>f?f:W(l),l<0&&(l+=f),l=s>l?0:mc(l);s<l;)e[s++]=t;return e}function el(e,t){var s=[];return Zt(e,function(l,f,d){t(l,f,d)&&s.push(l)}),s}function Oe(e,t,s,l,f){var d=-1,m=e.length;for(s||(s=Bv),f||(f=[]);++d<m;){var y=e[d];t>0&&s(y)?t>1?Oe(y,t-1,s,l,f):Xt(f,y):l||(f[f.length]=y)}return f}var io=xl(),tl=xl(!0);function _t(e,t){return e&&io(e,t,be)}function so(e,t){return e&&tl(e,t,be)}function Ri(e,t){return zt(t,function(s){return Ft(e[s])})}function pr(e,t){t=er(t,e);for(var s=0,l=t.length;e!=null&&s<l;)e=e[Et(t[s++])];return s&&s==l?e:i}function rl(e,t,s){var l=t(e);return U(e)?l:Xt(l,s(e))}function De(e){return e==null?e===i?Td:Rd:lr&&lr in ie(e)?jv(e):Jv(e)}function oo(e,t){return e>t}function nv(e,t){return e!=null&&ne.call(e,t)}function iv(e,t){return e!=null&&t in ie(e)}function sv(e,t,s){return e>=Re(t,s)&&e<Ee(t,s)}function uo(e,t,s){for(var l=s?Ws:ci,f=e[0].length,d=e.length,m=d,y=S(d),w=1/0,O=[];m--;){var x=e[m];m&&t&&(x=ce(x,Ve(t))),w=Re(x.length,w),y[m]=!s&&(t||f>=120&&x.length>=120)?new fr(m&&x):i}x=e[0];var A=-1,T=y[0];e:for(;++A<f&&O.length<w;){var q=x[A],F=t?t(q):q;if(q=s||q!==0?q:0,!(T?mn(T,F):l(O,F,s))){for(m=d;--m;){var B=y[m];if(!(B?mn(B,F):l(e[m],F,s)))continue e}T&&T.push(F),O.push(q)}}return O}function ov(e,t,s,l){return _t(e,function(f,d,m){t(l,s(f),d,m)}),l}function Cn(e,t,s){t=er(t,e),e=Wl(e,t);var l=e==null?e:e[Et(st(t))];return l==null?i:ke(l,e,s)}function nl(e){return he(e)&&De(e)==Tr}function uv(e){return he(e)&&De(e)==gn}function av(e){return he(e)&&De(e)==cn}function On(e,t,s,l,f){return e===t?!0:e==null||t==null||!he(e)&&!he(t)?e!==e&&t!==t:lv(e,t,s,l,On,f)}function lv(e,t,s,l,f,d){var m=U(e),y=U(t),w=m?ni:Pe(e),O=y?ni:Pe(t);w=w==Tr?Pt:w,O=O==Tr?Pt:O;var x=w==Pt,A=O==Pt,T=w==O;if(T&&rr(e)){if(!rr(t))return!1;m=!0,x=!1}if(T&&!x)return d||(d=new pt),m||Br(e)?$l(e,t,s,l,f,d):$v(e,t,w,s,l,f,d);if(!(s&I)){var q=x&&ne.call(e,"__wrapped__"),F=A&&ne.call(t,"__wrapped__");if(q||F){var B=q?e.value():e,j=F?t.value():t;return d||(d=new pt),f(B,j,s,l,d)}}return T?(d||(d=new pt),Fv(e,t,s,l,f,d)):!1}function cv(e){return he(e)&&Pe(e)==ct}function ao(e,t,s,l){var f=s.length,d=f,m=!l;if(e==null)return!d;for(e=ie(e);f--;){var y=s[f];if(m&&y[2]?y[1]!==e[y[0]]:!(y[0]in e))return!1}for(;++f<d;){y=s[f];var w=y[0],O=e[w],x=y[1];if(m&&y[2]){if(O===i&&!(w in e))return!1}else{var A=new pt;if(l)var T=l(O,x,w,e,t,A);if(!(T===i?On(x,O,I|P,l,A):T))return!1}}return!0}function il(e){if(!fe(e)||Vv(e))return!1;var t=Ft(e)?cm:eg;return t.test(gr(e))}function fv(e){return he(e)&&De(e)==hn}function hv(e){return he(e)&&Pe(e)==ft}function pv(e){return he(e)&&Vi(e.length)&&!!ae[De(e)]}function sl(e){return typeof e=="function"?e:e==null?We:typeof e=="object"?U(e)?al(e[0],e[1]):ul(e):Ac(e)}function lo(e){if(!In(e))return mm(e);var t=[];for(var s in ie(e))ne.call(e,s)&&s!="constructor"&&t.push(s);return t}function dv(e){if(!fe(e))return Kv(e);var t=In(e),s=[];for(var l in e)l=="constructor"&&(t||!ne.call(e,l))||s.push(l);return s}function co(e,t){return e<t}function ol(e,t){var s=-1,l=Ue(e)?S(e.length):[];return Zt(e,function(f,d,m){l[++s]=t(f,d,m)}),l}function ul(e){var t=xo(e);return t.length==1&&t[0][2]?Ul(t[0][0],t[0][1]):function(s){return s===e||ao(s,e,t)}}function al(e,t){return Io(e)&&Hl(t)?Ul(Et(e),t):function(s){var l=jo(s,e);return l===i&&l===t?Mo(s,e):On(t,l,I|P)}}function Pi(e,t,s,l,f){e!==t&&io(t,function(d,m){if(f||(f=new pt),fe(d))gv(e,t,m,s,Pi,l,f);else{var y=l?l(Po(e,m),d,m+"",e,t,f):i;y===i&&(y=d),ro(e,m,y)}},Ge)}function gv(e,t,s,l,f,d,m){var y=Po(e,s),w=Po(t,s),O=m.get(w);if(O){ro(e,s,O);return}var x=d?d(y,w,s+"",e,t,m):i,A=x===i;if(A){var T=U(w),q=!T&&rr(w),F=!T&&!q&&Br(w);x=w,T||q||F?U(y)?x=y:de(y)?x=He(y):q?(A=!1,x=El(w,!0)):F?(A=!1,x=wl(w,!0)):x=[]:Pn(w)||mr(w)?(x=y,mr(y)?x=vc(y):(!fe(y)||Ft(y))&&(x=Ml(w))):A=!1}A&&(m.set(w,x),f(x,w,l,d,m),m.delete(w)),ro(e,s,x)}function ll(e,t){var s=e.length;if(!!s)return t+=t<0?s:0,$t(t,s)?e[t]:i}function cl(e,t,s){t.length?t=ce(t,function(d){return U(d)?function(m){return pr(m,d.length===1?d[0]:d)}:d}):t=[We];var l=-1;t=ce(t,Ve($()));var f=ol(e,function(d,m,y){var w=ce(t,function(O){return O(d)});return{criteria:w,index:++l,value:d}});return Gg(f,function(d,m){return Iv(d,m,s)})}function mv(e,t){return fl(e,t,function(s,l){return Mo(e,l)})}function fl(e,t,s){for(var l=-1,f=t.length,d={};++l<f;){var m=t[l],y=pr(e,m);s(y,m)&&xn(d,er(m,e),y)}return d}function vv(e){return function(t){return pr(t,e)}}function fo(e,t,s,l){var f=l?Ug:Dr,d=-1,m=t.length,y=e;for(e===t&&(t=He(t)),s&&(y=ce(e,Ve(s)));++d<m;)for(var w=0,O=t[d],x=s?s(O):O;(w=f(y,x,w,l))>-1;)y!==e&&Ei.call(y,w,1),Ei.call(e,w,1);return e}function hl(e,t){for(var s=e?t.length:0,l=s-1;s--;){var f=t[s];if(s==l||f!==d){var d=f;$t(f)?Ei.call(e,f,1):mo(e,f)}}return e}function ho(e,t){return e+Si(Va()*(t-e+1))}function _v(e,t,s,l){for(var f=-1,d=Ee(bi((t-e)/(s||1)),0),m=S(d);d--;)m[l?d:++f]=e,e+=s;return m}function po(e,t){var s="";if(!e||t<1||t>Vt)return s;do t%2&&(s+=e),t=Si(t/2),t&&(e+=e);while(t);return s}function V(e,t){return To(Gl(e,t,We),e+"")}function yv(e){return Ya(kr(e))}function Ev(e,t){var s=kr(e);return Hi(s,hr(t,0,s.length))}function xn(e,t,s,l){if(!fe(e))return e;t=er(t,e);for(var f=-1,d=t.length,m=d-1,y=e;y!=null&&++f<d;){var w=Et(t[f]),O=s;if(w==="__proto__"||w==="constructor"||w==="prototype")return e;if(f!=m){var x=y[w];O=l?l(x,w,y):i,O===i&&(O=fe(x)?x:$t(t[f+1])?[]:{})}bn(y,w,O),y=y[w]}return e}var pl=Ci?function(e,t){return Ci.set(e,t),e}:We,wv=wi?function(e,t){return wi(e,"toString",{configurable:!0,enumerable:!1,value:Uo(t),writable:!0})}:We;function bv(e){return Hi(kr(e))}function it(e,t,s){var l=-1,f=e.length;t<0&&(t=-t>f?0:f+t),s=s>f?f:s,s<0&&(s+=f),f=t>s?0:s-t>>>0,t>>>=0;for(var d=S(f);++l<f;)d[l]=e[l+t];return d}function Sv(e,t){var s;return Zt(e,function(l,f,d){return s=t(l,f,d),!s}),!!s}function Ti(e,t,s){var l=0,f=e==null?l:e.length;if(typeof t=="number"&&t===t&&f<=Od){for(;l<f;){var d=l+f>>>1,m=e[d];m!==null&&!Xe(m)&&(s?m<=t:m<t)?l=d+1:f=d}return f}return go(e,t,We,s)}function go(e,t,s,l){var f=0,d=e==null?0:e.length;if(d===0)return 0;t=s(t);for(var m=t!==t,y=t===null,w=Xe(t),O=t===i;f<d;){var x=Si((f+d)/2),A=s(e[x]),T=A!==i,q=A===null,F=A===A,B=Xe(A);if(m)var j=l||F;else O?j=F&&(l||T):y?j=F&&T&&(l||!q):w?j=F&&T&&!q&&(l||!B):q||B?j=!1:j=l?A<=t:A<t;j?f=x+1:d=x}return Re(d,Cd)}function dl(e,t){for(var s=-1,l=e.length,f=0,d=[];++s<l;){var m=e[s],y=t?t(m):m;if(!s||!dt(y,w)){var w=y;d[f++]=m===0?0:m}}return d}function gl(e){return typeof e=="number"?e:Xe(e)?ri:+e}function ze(e){if(typeof e=="string")return e;if(U(e))return ce(e,ze)+"";if(Xe(e))return za?za.call(e):"";var t=e+"";return t=="0"&&1/e==-ur?"-0":t}function Qt(e,t,s){var l=-1,f=ci,d=e.length,m=!0,y=[],w=y;if(s)m=!1,f=Ws;else if(d>=n){var O=t?null:Dv(e);if(O)return hi(O);m=!1,f=mn,w=new fr}else w=t?[]:y;e:for(;++l<d;){var x=e[l],A=t?t(x):x;if(x=s||x!==0?x:0,m&&A===A){for(var T=w.length;T--;)if(w[T]===A)continue e;t&&w.push(A),y.push(x)}else f(w,A,s)||(w!==y&&w.push(A),y.push(x))}return y}function mo(e,t){return t=er(t,e),e=Wl(e,t),e==null||delete e[Et(st(t))]}function ml(e,t,s,l){return xn(e,t,s(pr(e,t)),l)}function Li(e,t,s,l){for(var f=e.length,d=l?f:-1;(l?d--:++d<f)&&t(e[d],d,e););return s?it(e,l?0:d,l?d+1:f):it(e,l?d+1:0,l?f:d)}function vl(e,t){var s=e;return s instanceof Y&&(s=s.value()),Bs(t,function(l,f){return f.func.apply(f.thisArg,Xt([l],f.args))},s)}function vo(e,t,s){var l=e.length;if(l<2)return l?Qt(e[0]):[];for(var f=-1,d=S(l);++f<l;)for(var m=e[f],y=-1;++y<l;)y!=f&&(d[f]=Sn(d[f]||m,e[y],t,s));return Qt(Oe(d,1),t,s)}function _l(e,t,s){for(var l=-1,f=e.length,d=t.length,m={};++l<f;){var y=l<d?t[l]:i;s(m,e[l],y)}return m}function _o(e){return de(e)?e:[]}function yo(e){return typeof e=="function"?e:We}function er(e,t){return U(e)?e:Io(e,t)?[e]:zl(te(e))}var Cv=V;function tr(e,t,s){var l=e.length;return s=s===i?l:s,!t&&s>=l?e:it(e,t,s)}var yl=fm||function(e){return we.clearTimeout(e)};function El(e,t){if(t)return e.slice();var s=e.length,l=Ua?Ua(s):new e.constructor(s);return e.copy(l),l}function Eo(e){var t=new e.constructor(e.byteLength);return new _i(t).set(new _i(e)),t}function Ov(e,t){var s=t?Eo(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function xv(e){var t=new e.constructor(e.source,na.exec(e));return t.lastIndex=e.lastIndex,t}function Av(e){return wn?ie(wn.call(e)):{}}function wl(e,t){var s=t?Eo(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function bl(e,t){if(e!==t){var s=e!==i,l=e===null,f=e===e,d=Xe(e),m=t!==i,y=t===null,w=t===t,O=Xe(t);if(!y&&!O&&!d&&e>t||d&&m&&w&&!y&&!O||l&&m&&w||!s&&w||!f)return 1;if(!l&&!d&&!O&&e<t||O&&s&&f&&!l&&!d||y&&s&&f||!m&&f||!w)return-1}return 0}function Iv(e,t,s){for(var l=-1,f=e.criteria,d=t.criteria,m=f.length,y=s.length;++l<m;){var w=bl(f[l],d[l]);if(w){if(l>=y)return w;var O=s[l];return w*(O=="desc"?-1:1)}}return e.index-t.index}function Sl(e,t,s,l){for(var f=-1,d=e.length,m=s.length,y=-1,w=t.length,O=Ee(d-m,0),x=S(w+O),A=!l;++y<w;)x[y]=t[y];for(;++f<m;)(A||f<d)&&(x[s[f]]=e[f]);for(;O--;)x[y++]=e[f++];return x}function Cl(e,t,s,l){for(var f=-1,d=e.length,m=-1,y=s.length,w=-1,O=t.length,x=Ee(d-y,0),A=S(x+O),T=!l;++f<x;)A[f]=e[f];for(var q=f;++w<O;)A[q+w]=t[w];for(;++m<y;)(T||f<d)&&(A[q+s[m]]=e[f++]);return A}function He(e,t){var s=-1,l=e.length;for(t||(t=S(l));++s<l;)t[s]=e[s];return t}function yt(e,t,s,l){var f=!s;s||(s={});for(var d=-1,m=t.length;++d<m;){var y=t[d],w=l?l(s[y],e[y],y,s,e):i;w===i&&(w=e[y]),f?Nt(s,y,w):bn(s,y,w)}return s}function Rv(e,t){return yt(e,Ao(e),t)}function Pv(e,t){return yt(e,Fl(e),t)}function Ni(e,t){return function(s,l){var f=U(s)?qg:Zm,d=t?t():{};return f(s,e,$(l,2),d)}}function Ur(e){return V(function(t,s){var l=-1,f=s.length,d=f>1?s[f-1]:i,m=f>2?s[2]:i;for(d=e.length>3&&typeof d=="function"?(f--,d):i,m&&qe(s[0],s[1],m)&&(d=f<3?i:d,f=1),t=ie(t);++l<f;){var y=s[l];y&&e(t,y,l,d)}return t})}function Ol(e,t){return function(s,l){if(s==null)return s;if(!Ue(s))return e(s,l);for(var f=s.length,d=t?f:-1,m=ie(s);(t?d--:++d<f)&&l(m[d],d,m)!==!1;);return s}}function xl(e){return function(t,s,l){for(var f=-1,d=ie(t),m=l(t),y=m.length;y--;){var w=m[e?y:++f];if(s(d[w],w,d)===!1)break}return t}}function Tv(e,t,s){var l=t&H,f=An(e);function d(){var m=this&&this!==we&&this instanceof d?f:e;return m.apply(l?s:this,arguments)}return d}function Al(e){return function(t){t=te(t);var s=qr(t)?ht(t):i,l=s?s[0]:t.charAt(0),f=s?tr(s,1).join(""):t.slice(1);return l[e]()+f}}function Gr(e){return function(t){return Bs(Oc(Cc(t).replace(wg,"")),e,"")}}function An(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var s=Hr(e.prototype),l=e.apply(s,t);return fe(l)?l:s}}function Lv(e,t,s){var l=An(e);function f(){for(var d=arguments.length,m=S(d),y=d,w=Wr(f);y--;)m[y]=arguments[y];var O=d<3&&m[0]!==w&&m[d-1]!==w?[]:Yt(m,w);if(d-=O.length,d<s)return Ll(e,t,Di,f.placeholder,i,m,O,i,i,s-d);var x=this&&this!==we&&this instanceof f?l:e;return ke(x,this,m)}return f}function Il(e){return function(t,s,l){var f=ie(t);if(!Ue(t)){var d=$(s,3);t=be(t),s=function(y){return d(f[y],y,f)}}var m=e(t,s,l);return m>-1?f[d?t[m]:m]:i}}function Rl(e){return qt(function(t){var s=t.length,l=s,f=rt.prototype.thru;for(e&&t.reverse();l--;){var d=t[l];if(typeof d!="function")throw new tt(a);if(f&&!m&&ji(d)=="wrapper")var m=new rt([],!0)}for(l=m?l:s;++l<s;){d=t[l];var y=ji(d),w=y=="wrapper"?Oo(d):i;w&&Ro(w[0])&&w[1]==(ve|X|pe|K)&&!w[4].length&&w[9]==1?m=m[ji(w[0])].apply(m,w[3]):m=d.length==1&&Ro(d)?m[y]():m.thru(d)}return function(){var O=arguments,x=O[0];if(m&&O.length==1&&U(x))return m.plant(x).value();for(var A=0,T=s?t[A].apply(this,O):x;++A<s;)T=t[A].call(this,T);return T}})}function Di(e,t,s,l,f,d,m,y,w,O){var x=t&ve,A=t&H,T=t&re,q=t&(X|Ie),F=t&Pr,B=T?i:An(e);function j(){for(var z=arguments.length,J=S(z),Ye=z;Ye--;)J[Ye]=arguments[Ye];if(q)var $e=Wr(j),Ke=Bg(J,$e);if(l&&(J=Sl(J,l,f,q)),d&&(J=Cl(J,d,m,q)),z-=Ke,q&&z<O){var ge=Yt(J,$e);return Ll(e,t,Di,j.placeholder,s,J,ge,y,w,O-z)}var gt=A?s:this,Mt=T?gt[e]:e;return z=J.length,y?J=Zv(J,y):F&&z>1&&J.reverse(),x&&w<z&&(J.length=w),this&&this!==we&&this instanceof j&&(Mt=B||An(Mt)),Mt.apply(gt,J)}return j}function Pl(e,t){return function(s,l){return ov(s,e,t(l),{})}}function qi(e,t){return function(s,l){var f;if(s===i&&l===i)return t;if(s!==i&&(f=s),l!==i){if(f===i)return l;typeof s=="string"||typeof l=="string"?(s=ze(s),l=ze(l)):(s=gl(s),l=gl(l)),f=e(s,l)}return f}}function wo(e){return qt(function(t){return t=ce(t,Ve($())),V(function(s){var l=this;return e(t,function(f){return ke(f,l,s)})})})}function $i(e,t){t=t===i?" ":ze(t);var s=t.length;if(s<2)return s?po(t,e):t;var l=po(t,bi(e/$r(t)));return qr(t)?tr(ht(l),0,e).join(""):l.slice(0,e)}function Nv(e,t,s,l){var f=t&H,d=An(e);function m(){for(var y=-1,w=arguments.length,O=-1,x=l.length,A=S(x+w),T=this&&this!==we&&this instanceof m?d:e;++O<x;)A[O]=l[O];for(;w--;)A[O++]=arguments[++y];return ke(T,f?s:this,A)}return m}function Tl(e){return function(t,s,l){return l&&typeof l!="number"&&qe(t,s,l)&&(s=l=i),t=jt(t),s===i?(s=t,t=0):s=jt(s),l=l===i?t<s?1:-1:jt(l),_v(t,s,l,e)}}function Fi(e){return function(t,s){return typeof t=="string"&&typeof s=="string"||(t=ot(t),s=ot(s)),e(t,s)}}function Ll(e,t,s,l,f,d,m,y,w,O){var x=t&X,A=x?m:i,T=x?i:m,q=x?d:i,F=x?i:d;t|=x?pe:le,t&=~(x?le:pe),t&ue||(t&=~(H|re));var B=[e,t,f,q,A,F,T,y,w,O],j=s.apply(i,B);return Ro(e)&&Bl(j,B),j.placeholder=l,kl(j,e,t)}function bo(e){var t=ye[e];return function(s,l){if(s=ot(s),l=l==null?0:Re(W(l),292),l&&ka(s)){var f=(te(s)+"e").split("e"),d=t(f[0]+"e"+(+f[1]+l));return f=(te(d)+"e").split("e"),+(f[0]+"e"+(+f[1]-l))}return t(s)}}var Dv=jr&&1/hi(new jr([,-0]))[1]==ur?function(e){return new jr(e)}:Bo;function Nl(e){return function(t){var s=Pe(t);return s==ct?Js(t):s==ft?Jg(t):Wg(t,e(t))}}function Dt(e,t,s,l,f,d,m,y){var w=t&re;if(!w&&typeof e!="function")throw new tt(a);var O=l?l.length:0;if(O||(t&=~(pe|le),l=f=i),m=m===i?m:Ee(W(m),0),y=y===i?y:W(y),O-=f?f.length:0,t&le){var x=l,A=f;l=f=i}var T=w?i:Oo(e),q=[e,t,s,l,f,x,A,d,m,y];if(T&&Yv(q,T),e=q[0],t=q[1],s=q[2],l=q[3],f=q[4],y=q[9]=q[9]===i?w?0:e.length:Ee(q[9]-O,0),!y&&t&(X|Ie)&&(t&=~(X|Ie)),!t||t==H)var F=Tv(e,t,s);else t==X||t==Ie?F=Lv(e,t,y):(t==pe||t==(H|pe))&&!f.length?F=Nv(e,t,s,l):F=Di.apply(i,q);var B=T?pl:Bl;return kl(B(F,q),e,t)}function Dl(e,t,s,l){return e===i||dt(e,Fr[s])&&!ne.call(l,s)?t:e}function ql(e,t,s,l,f,d){return fe(e)&&fe(t)&&(d.set(t,e),Pi(e,t,i,ql,d),d.delete(t)),e}function qv(e){return Pn(e)?i:e}function $l(e,t,s,l,f,d){var m=s&I,y=e.length,w=t.length;if(y!=w&&!(m&&w>y))return!1;var O=d.get(e),x=d.get(t);if(O&&x)return O==t&&x==e;var A=-1,T=!0,q=s&P?new fr:i;for(d.set(e,t),d.set(t,e);++A<y;){var F=e[A],B=t[A];if(l)var j=m?l(B,F,A,t,e,d):l(F,B,A,e,t,d);if(j!==i){if(j)continue;T=!1;break}if(q){if(!ks(t,function(z,J){if(!mn(q,J)&&(F===z||f(F,z,s,l,d)))return q.push(J)})){T=!1;break}}else if(!(F===B||f(F,B,s,l,d))){T=!1;break}}return d.delete(e),d.delete(t),T}function $v(e,t,s,l,f,d,m){switch(s){case Lr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gn:return!(e.byteLength!=t.byteLength||!d(new _i(e),new _i(t)));case ln:case cn:case fn:return dt(+e,+t);case ii:return e.name==t.name&&e.message==t.message;case hn:case pn:return e==t+"";case ct:var y=Js;case ft:var w=l&I;if(y||(y=hi),e.size!=t.size&&!w)return!1;var O=m.get(e);if(O)return O==t;l|=P,m.set(e,t);var x=$l(y(e),y(t),l,f,d,m);return m.delete(e),x;case oi:if(wn)return wn.call(e)==wn.call(t)}return!1}function Fv(e,t,s,l,f,d){var m=s&I,y=So(e),w=y.length,O=So(t),x=O.length;if(w!=x&&!m)return!1;for(var A=w;A--;){var T=y[A];if(!(m?T in t:ne.call(t,T)))return!1}var q=d.get(e),F=d.get(t);if(q&&F)return q==t&&F==e;var B=!0;d.set(e,t),d.set(t,e);for(var j=m;++A<w;){T=y[A];var z=e[T],J=t[T];if(l)var Ye=m?l(J,z,T,t,e,d):l(z,J,T,e,t,d);if(!(Ye===i?z===J||f(z,J,s,l,d):Ye)){B=!1;break}j||(j=T=="constructor")}if(B&&!j){var $e=e.constructor,Ke=t.constructor;$e!=Ke&&"constructor"in e&&"constructor"in t&&!(typeof $e=="function"&&$e instanceof $e&&typeof Ke=="function"&&Ke instanceof Ke)&&(B=!1)}return d.delete(e),d.delete(t),B}function qt(e){return To(Gl(e,i,Jl),e+"")}function So(e){return rl(e,be,Ao)}function Co(e){return rl(e,Ge,Fl)}var Oo=Ci?function(e){return Ci.get(e)}:Bo;function ji(e){for(var t=e.name+"",s=Mr[t],l=ne.call(Mr,t)?s.length:0;l--;){var f=s[l],d=f.func;if(d==null||d==e)return f.name}return t}function Wr(e){var t=ne.call(h,"placeholder")?h:e;return t.placeholder}function $(){var e=h.iteratee||Go;return e=e===Go?sl:e,arguments.length?e(arguments[0],arguments[1]):e}function Mi(e,t){var s=e.__data__;return kv(t)?s[typeof t=="string"?"string":"hash"]:s.map}function xo(e){for(var t=be(e),s=t.length;s--;){var l=t[s],f=e[l];t[s]=[l,f,Hl(f)]}return t}function dr(e,t){var s=Xg(e,t);return il(s)?s:i}function jv(e){var t=ne.call(e,lr),s=e[lr];try{e[lr]=i;var l=!0}catch{}var f=mi.call(e);return l&&(t?e[lr]=s:delete e[lr]),f}var Ao=Qs?function(e){return e==null?[]:(e=ie(e),zt(Qs(e),function(t){return Wa.call(e,t)}))}:ko,Fl=Qs?function(e){for(var t=[];e;)Xt(t,Ao(e)),e=yi(e);return t}:ko,Pe=De;(eo&&Pe(new eo(new ArrayBuffer(1)))!=Lr||_n&&Pe(new _n)!=ct||to&&Pe(to.resolve())!=Qu||jr&&Pe(new jr)!=ft||yn&&Pe(new yn)!=dn)&&(Pe=function(e){var t=De(e),s=t==Pt?e.constructor:i,l=s?gr(s):"";if(l)switch(l){case Em:return Lr;case wm:return ct;case bm:return Qu;case Sm:return ft;case Cm:return dn}return t});function Mv(e,t,s){for(var l=-1,f=s.length;++l<f;){var d=s[l],m=d.size;switch(d.type){case"drop":e+=m;break;case"dropRight":t-=m;break;case"take":t=Re(t,e+m);break;case"takeRight":e=Ee(e,t-m);break}}return{start:e,end:t}}function Hv(e){var t=e.match(Vd);return t?t[1].split(zd):[]}function jl(e,t,s){t=er(t,e);for(var l=-1,f=t.length,d=!1;++l<f;){var m=Et(t[l]);if(!(d=e!=null&&s(e,m)))break;e=e[m]}return d||++l!=f?d:(f=e==null?0:e.length,!!f&&Vi(f)&&$t(m,f)&&(U(e)||mr(e)))}function Uv(e){var t=e.length,s=new e.constructor(t);return t&&typeof e[0]=="string"&&ne.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function Ml(e){return typeof e.constructor=="function"&&!In(e)?Hr(yi(e)):{}}function Gv(e,t,s){var l=e.constructor;switch(t){case gn:return Eo(e);case ln:case cn:return new l(+e);case Lr:return Ov(e,s);case Os:case xs:case As:case Is:case Rs:case Ps:case Ts:case Ls:case Ns:return wl(e,s);case ct:return new l;case fn:case pn:return new l(e);case hn:return xv(e);case ft:return new l;case oi:return Av(e)}}function Wv(e,t){var s=t.length;if(!s)return e;var l=s-1;return t[l]=(s>1?"& ":"")+t[l],t=t.join(s>2?", ":" "),e.replace(kd,`{
12
+ `)}helpInformation(){if(this._name==="s")return"";let n=[];if(this._description){n=[this._description,""];let _=this._argsDescription;if(_&&this._args.length){let l=this.padWidth(),b=(process.stdout.columns||80)-l-5;n.push("Arguments:"),this._args.forEach(I=>{n.push(" "+Xo(I.name,l)+" "+Rl(_[I.name]||"",b,l+4))}),n.push("")}}let r=this._name;this._aliases[0]&&(r=r+"|"+this._aliases[0]);let u="";for(let _=this.parent;_;_=_.parent)u=_.name()+" "+u;let a=["Usage: "+u+r+" "+this.usage(),""],o=[],h=this.commandHelp();h&&(o=[h]);let g=[];return(this._hasHelpOption||this.options.length>0)&&(g=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),a.concat(n).concat(g).concat(o).join(`
13
+ `)}outputHelp(n){n||(n=u=>u);let r=n(this.helpInformation());if(typeof r!="string"&&!Buffer.isBuffer(r))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(r),this.emit(this._helpLongFlag)}helpOption(n,r){if(typeof n=="boolean")return this._hasHelpOption=n,this;this._helpFlags=n||this._helpFlags,this._helpDescription=r||this._helpDescription;let u=Nl(this._helpFlags);return this._helpShortFlag=u.shortFlag,this._helpLongFlag=u.longFlag,this}help(n){this.outputHelp(n),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};wn=ql.exports=new Dr;wn.program=wn;wn.Command=Dr;wn.Option=Qi;wn.CommanderError=Nr;function _E(i){return i.split("-").reduce((n,r)=>n+r[0].toUpperCase()+r.slice(1))}function Xo(i,n){let r=Math.max(0,n-i.length);return i+Array(r+1).join(" ")}function Rl(i,n,r){let u=new RegExp(".{1,"+(n-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(i.match(u)||[]).map((o,h)=>(o.slice(-1)===`
14
+ `&&(o=o.slice(0,o.length-1)),(h>0&&r?Array(r+1).join(" "):"")+o.trimRight())).join(`
15
+ `)}function Pl(i,n,r){return i.match(/[\n]\s+/)||n<40?i:Rl(i,n,r)}function Tl(i,n){i._hasHelpOption&&n.find(u=>u===i._helpLongFlag||u===i._helpShortFlag)&&(i.outputHelp(),i._exit(0,"commander.helpDisplayed","(outputHelp)"))}function Ll(i){let n=i.name+(i.variadic===!0?"...":"");return i.required?"<"+n+">":"["+n+"]"}function Nl(i){let n,r,u=i.split(/[ |,]+/);return u.length>1&&!/^[[<]/.test(u[1])&&(n=u.shift()),r=u.shift(),!n&&/^-[^-]$/.test(r)&&(n=r,r=void 0),{shortFlag:n,longFlag:r}}function Dl(i){return i.map(n=>{if(!n.startsWith("--inspect"))return n;let r,u="127.0.0.1",a="9229",o;return(o=n.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=n.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?a=o[3]:u=o[3]):(o=n.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],u=o[3],a=o[4]),r&&a!=="0"?`${r}=${u}:${parseInt(a)+1}`:n})}});var Yn=P((zn,qr)=>{(function(){var i,n="4.17.21",r=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",o="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",g=500,_="__lodash_placeholder__",l=1,m=2,b=4,I=1,R=2,H=1,re=2,ae=4,Q=8,Se=16,se=32,Ne=64,Ae=128,K=256,si=512,bd=30,Sd="...",Cd=800,Od=16,Ju=1,xd=2,Ad=3,ln=1/0,zt=9007199254740991,Id=17976931348623157e292,oi=0/0,yt=4294967295,Rd=yt-1,Pd=yt>>>1,Td=[["ary",Ae],["bind",H],["bindKey",re],["curry",Q],["curryRight",Se],["flip",si],["partial",se],["partialRight",Ne],["rearg",K]],Ln="[object Arguments]",ui="[object Array]",Ld="[object AsyncFunction]",fr="[object Boolean]",hr="[object Date]",Nd="[object DOMException]",ai="[object Error]",ci="[object Function]",Zu="[object GeneratorFunction]",ft="[object Map]",pr="[object Number]",Dd="[object Null]",Lt="[object Object]",Qu="[object Promise]",qd="[object Proxy]",dr="[object RegExp]",ht="[object Set]",gr="[object String]",li="[object Symbol]",$d="[object Undefined]",vr="[object WeakMap]",Fd="[object WeakSet]",mr="[object ArrayBuffer]",Nn="[object DataView]",Os="[object Float32Array]",xs="[object Float64Array]",As="[object Int8Array]",Is="[object Int16Array]",Rs="[object Int32Array]",Ps="[object Uint8Array]",Ts="[object Uint8ClampedArray]",Ls="[object Uint16Array]",Ns="[object Uint32Array]",Md=/\b__p \+= '';/g,jd=/\b(__p \+=) '' \+/g,Hd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ea=/&(?:amp|lt|gt|quot|#39);/g,ta=/[&<>"']/g,Ud=RegExp(ea.source),Gd=RegExp(ta.source),Wd=/<%-([\s\S]+?)%>/g,Bd=/<%([\s\S]+?)%>/g,na=/<%=([\s\S]+?)%>/g,kd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vd=/^\w*$/,zd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ds=/[\\^$.*+?()[\]{}|]/g,Yd=RegExp(Ds.source),qs=/^\s+/,Xd=/\s/,Kd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jd=/\{\n\/\* \[wrapped with (.+)\] \*/,Zd=/,? & /,Qd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eg=/[()=,{}\[\]\/\s]/,tg=/\\(\\)?/g,ng=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ra=/\w*$/,rg=/^[-+]0x[0-9a-f]+$/i,ig=/^0b[01]+$/i,sg=/^\[object .+?Constructor\]$/,og=/^0o[0-7]+$/i,ug=/^(?:0|[1-9]\d*)$/,ag=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fi=/($^)/,cg=/['\n\r\u2028\u2029\\]/g,hi="\\ud800-\\udfff",lg="\\u0300-\\u036f",fg="\\ufe20-\\ufe2f",hg="\\u20d0-\\u20ff",ia=lg+fg+hg,sa="\\u2700-\\u27bf",oa="a-z\\xdf-\\xf6\\xf8-\\xff",pg="\\xac\\xb1\\xd7\\xf7",dg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",gg="\\u2000-\\u206f",vg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ua="A-Z\\xc0-\\xd6\\xd8-\\xde",aa="\\ufe0e\\ufe0f",ca=pg+dg+gg+vg,$s="['\u2019]",mg="["+hi+"]",la="["+ca+"]",pi="["+ia+"]",fa="\\d+",_g="["+sa+"]",ha="["+oa+"]",pa="[^"+hi+ca+fa+sa+oa+ua+"]",Fs="\\ud83c[\\udffb-\\udfff]",yg="(?:"+pi+"|"+Fs+")",da="[^"+hi+"]",Ms="(?:\\ud83c[\\udde6-\\uddff]){2}",js="[\\ud800-\\udbff][\\udc00-\\udfff]",Dn="["+ua+"]",ga="\\u200d",va="(?:"+ha+"|"+pa+")",Eg="(?:"+Dn+"|"+pa+")",ma="(?:"+$s+"(?:d|ll|m|re|s|t|ve))?",_a="(?:"+$s+"(?:D|LL|M|RE|S|T|VE))?",ya=yg+"?",Ea="["+aa+"]?",wg="(?:"+ga+"(?:"+[da,Ms,js].join("|")+")"+Ea+ya+")*",bg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wa=Ea+ya+wg,Cg="(?:"+[_g,Ms,js].join("|")+")"+wa,Og="(?:"+[da+pi+"?",pi,Ms,js,mg].join("|")+")",xg=RegExp($s,"g"),Ag=RegExp(pi,"g"),Hs=RegExp(Fs+"(?="+Fs+")|"+Og+wa,"g"),Ig=RegExp([Dn+"?"+ha+"+"+ma+"(?="+[la,Dn,"$"].join("|")+")",Eg+"+"+_a+"(?="+[la,Dn+va,"$"].join("|")+")",Dn+"?"+va+"+"+ma,Dn+"+"+_a,Sg,bg,fa,Cg].join("|"),"g"),Rg=RegExp("["+ga+hi+ia+aa+"]"),Pg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Tg=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lg=-1,ce={};ce[Os]=ce[xs]=ce[As]=ce[Is]=ce[Rs]=ce[Ps]=ce[Ts]=ce[Ls]=ce[Ns]=!0,ce[Ln]=ce[ui]=ce[mr]=ce[fr]=ce[Nn]=ce[hr]=ce[ai]=ce[ci]=ce[ft]=ce[pr]=ce[Lt]=ce[dr]=ce[ht]=ce[gr]=ce[vr]=!1;var oe={};oe[Ln]=oe[ui]=oe[mr]=oe[Nn]=oe[fr]=oe[hr]=oe[Os]=oe[xs]=oe[As]=oe[Is]=oe[Rs]=oe[ft]=oe[pr]=oe[Lt]=oe[dr]=oe[ht]=oe[gr]=oe[li]=oe[Ps]=oe[Ts]=oe[Ls]=oe[Ns]=!0,oe[ai]=oe[ci]=oe[vr]=!1;var Ng={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Dg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},qg={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$g={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fg=parseFloat,Mg=parseInt,ba=typeof global=="object"&&global&&global.Object===Object&&global,jg=typeof self=="object"&&self&&self.Object===Object&&self,ye=ba||jg||Function("return this")(),Us=typeof zn=="object"&&zn&&!zn.nodeType&&zn,fn=Us&&typeof qr=="object"&&qr&&!qr.nodeType&&qr,Sa=fn&&fn.exports===Us,Gs=Sa&&ba.process,et=function(){try{var E=fn&&fn.require&&fn.require("util").types;return E||Gs&&Gs.binding&&Gs.binding("util")}catch{}}(),Ca=et&&et.isArrayBuffer,Oa=et&&et.isDate,xa=et&&et.isMap,Aa=et&&et.isRegExp,Ia=et&&et.isSet,Ra=et&&et.isTypedArray;function Ve(E,C,S){switch(S.length){case 0:return E.call(C);case 1:return E.call(C,S[0]);case 2:return E.call(C,S[0],S[1]);case 3:return E.call(C,S[0],S[1],S[2])}return E.apply(C,S)}function Hg(E,C,S,L){for(var U=-1,ee=E==null?0:E.length;++U<ee;){var me=E[U];C(L,me,S(me),E)}return L}function tt(E,C){for(var S=-1,L=E==null?0:E.length;++S<L&&C(E[S],S,E)!==!1;);return E}function Ug(E,C){for(var S=E==null?0:E.length;S--&&C(E[S],S,E)!==!1;);return E}function Pa(E,C){for(var S=-1,L=E==null?0:E.length;++S<L;)if(!C(E[S],S,E))return!1;return!0}function Yt(E,C){for(var S=-1,L=E==null?0:E.length,U=0,ee=[];++S<L;){var me=E[S];C(me,S,E)&&(ee[U++]=me)}return ee}function di(E,C){var S=E==null?0:E.length;return!!S&&qn(E,C,0)>-1}function Ws(E,C,S){for(var L=-1,U=E==null?0:E.length;++L<U;)if(S(C,E[L]))return!0;return!1}function le(E,C){for(var S=-1,L=E==null?0:E.length,U=Array(L);++S<L;)U[S]=C(E[S],S,E);return U}function Xt(E,C){for(var S=-1,L=C.length,U=E.length;++S<L;)E[U+S]=C[S];return E}function Bs(E,C,S,L){var U=-1,ee=E==null?0:E.length;for(L&&ee&&(S=E[++U]);++U<ee;)S=C(S,E[U],U,E);return S}function Gg(E,C,S,L){var U=E==null?0:E.length;for(L&&U&&(S=E[--U]);U--;)S=C(S,E[U],U,E);return S}function ks(E,C){for(var S=-1,L=E==null?0:E.length;++S<L;)if(C(E[S],S,E))return!0;return!1}var Wg=Vs("length");function Bg(E){return E.split("")}function kg(E){return E.match(Qd)||[]}function Ta(E,C,S){var L;return S(E,function(U,ee,me){if(C(U,ee,me))return L=ee,!1}),L}function gi(E,C,S,L){for(var U=E.length,ee=S+(L?1:-1);L?ee--:++ee<U;)if(C(E[ee],ee,E))return ee;return-1}function qn(E,C,S){return C===C?rv(E,C,S):gi(E,La,S)}function Vg(E,C,S,L){for(var U=S-1,ee=E.length;++U<ee;)if(L(E[U],C))return U;return-1}function La(E){return E!==E}function Na(E,C){var S=E==null?0:E.length;return S?Ys(E,C)/S:oi}function Vs(E){return function(C){return C==null?i:C[E]}}function zs(E){return function(C){return E==null?i:E[C]}}function Da(E,C,S,L,U){return U(E,function(ee,me,ie){S=L?(L=!1,ee):C(S,ee,me,ie)}),S}function zg(E,C){var S=E.length;for(E.sort(C);S--;)E[S]=E[S].value;return E}function Ys(E,C){for(var S,L=-1,U=E.length;++L<U;){var ee=C(E[L]);ee!==i&&(S=S===i?ee:S+ee)}return S}function Xs(E,C){for(var S=-1,L=Array(E);++S<E;)L[S]=C(S);return L}function Yg(E,C){return le(C,function(S){return[S,E[S]]})}function qa(E){return E&&E.slice(0,ja(E)+1).replace(qs,"")}function ze(E){return function(C){return E(C)}}function Ks(E,C){return le(C,function(S){return E[S]})}function _r(E,C){return E.has(C)}function $a(E,C){for(var S=-1,L=E.length;++S<L&&qn(C,E[S],0)>-1;);return S}function Fa(E,C){for(var S=E.length;S--&&qn(C,E[S],0)>-1;);return S}function Xg(E,C){for(var S=E.length,L=0;S--;)E[S]===C&&++L;return L}var Kg=zs(Ng),Jg=zs(Dg);function Zg(E){return"\\"+$g[E]}function Qg(E,C){return E==null?i:E[C]}function $n(E){return Rg.test(E)}function ev(E){return Pg.test(E)}function tv(E){for(var C,S=[];!(C=E.next()).done;)S.push(C.value);return S}function Js(E){var C=-1,S=Array(E.size);return E.forEach(function(L,U){S[++C]=[U,L]}),S}function Ma(E,C){return function(S){return E(C(S))}}function Kt(E,C){for(var S=-1,L=E.length,U=0,ee=[];++S<L;){var me=E[S];(me===C||me===_)&&(E[S]=_,ee[U++]=S)}return ee}function vi(E){var C=-1,S=Array(E.size);return E.forEach(function(L){S[++C]=L}),S}function nv(E){var C=-1,S=Array(E.size);return E.forEach(function(L){S[++C]=[L,L]}),S}function rv(E,C,S){for(var L=S-1,U=E.length;++L<U;)if(E[L]===C)return L;return-1}function iv(E,C,S){for(var L=S+1;L--;)if(E[L]===C)return L;return L}function Fn(E){return $n(E)?ov(E):Wg(E)}function pt(E){return $n(E)?uv(E):Bg(E)}function ja(E){for(var C=E.length;C--&&Xd.test(E.charAt(C)););return C}var sv=zs(qg);function ov(E){for(var C=Hs.lastIndex=0;Hs.test(E);)++C;return C}function uv(E){return E.match(Hs)||[]}function av(E){return E.match(Ig)||[]}var cv=function E(C){C=C==null?ye:Jt.defaults(ye.Object(),C,Jt.pick(ye,Tg));var S=C.Array,L=C.Date,U=C.Error,ee=C.Function,me=C.Math,ie=C.Object,Zs=C.RegExp,lv=C.String,nt=C.TypeError,mi=S.prototype,fv=ee.prototype,Mn=ie.prototype,_i=C["__core-js_shared__"],yi=fv.toString,ne=Mn.hasOwnProperty,hv=0,Ha=function(){var e=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ei=Mn.toString,pv=yi.call(ie),dv=ye._,gv=Zs("^"+yi.call(ne).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wi=Sa?C.Buffer:i,Zt=C.Symbol,bi=C.Uint8Array,Ua=wi?wi.allocUnsafe:i,Si=Ma(ie.getPrototypeOf,ie),Ga=ie.create,Wa=Mn.propertyIsEnumerable,Ci=mi.splice,Ba=Zt?Zt.isConcatSpreadable:i,yr=Zt?Zt.iterator:i,hn=Zt?Zt.toStringTag:i,Oi=function(){try{var e=mn(ie,"defineProperty");return e({},"",{}),e}catch{}}(),vv=C.clearTimeout!==ye.clearTimeout&&C.clearTimeout,mv=L&&L.now!==ye.Date.now&&L.now,_v=C.setTimeout!==ye.setTimeout&&C.setTimeout,xi=me.ceil,Ai=me.floor,Qs=ie.getOwnPropertySymbols,yv=wi?wi.isBuffer:i,ka=C.isFinite,Ev=mi.join,wv=Ma(ie.keys,ie),_e=me.max,Ie=me.min,bv=L.now,Sv=C.parseInt,Va=me.random,Cv=mi.reverse,eo=mn(C,"DataView"),Er=mn(C,"Map"),to=mn(C,"Promise"),jn=mn(C,"Set"),wr=mn(C,"WeakMap"),br=mn(ie,"create"),Ii=wr&&new wr,Hn={},Ov=_n(eo),xv=_n(Er),Av=_n(to),Iv=_n(jn),Rv=_n(wr),Ri=Zt?Zt.prototype:i,Sr=Ri?Ri.valueOf:i,za=Ri?Ri.toString:i;function p(e){if(he(e)&&!G(e)&&!(e instanceof X)){if(e instanceof rt)return e;if(ne.call(e,"__wrapped__"))return Yc(e)}return new rt(e)}var Un=function(){function e(){}return function(t){if(!fe(t))return{};if(Ga)return Ga(t);e.prototype=t;var s=new e;return e.prototype=i,s}}();function Pi(){}function rt(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}p.templateSettings={escape:Wd,evaluate:Bd,interpolate:na,variable:"",imports:{_:p}},p.prototype=Pi.prototype,p.prototype.constructor=p,rt.prototype=Un(Pi.prototype),rt.prototype.constructor=rt;function X(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=yt,this.__views__=[]}function Pv(){var e=new X(this.__wrapped__);return e.__actions__=He(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=He(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=He(this.__views__),e}function Tv(){if(this.__filtered__){var e=new X(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Lv(){var e=this.__wrapped__.value(),t=this.__dir__,s=G(e),c=t<0,f=s?e.length:0,d=Bm(0,f,this.__views__),v=d.start,y=d.end,w=y-v,O=c?y:v-1,x=this.__iteratees__,A=x.length,T=0,q=Ie(w,this.__takeCount__);if(!s||!c&&f==w&&q==w)return mc(e,this.__actions__);var F=[];e:for(;w--&&T<q;){O+=t;for(var B=-1,M=e[O];++B<A;){var z=x[B],J=z.iteratee,Ke=z.type,$e=J(M);if(Ke==xd)M=$e;else if(!$e){if(Ke==Ju)continue e;break e}}F[T++]=M}return F}X.prototype=Un(Pi.prototype),X.prototype.constructor=X;function pn(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var c=e[t];this.set(c[0],c[1])}}function Nv(){this.__data__=br?br(null):{},this.size=0}function Dv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function qv(e){var t=this.__data__;if(br){var s=t[e];return s===h?i:s}return ne.call(t,e)?t[e]:i}function $v(e){var t=this.__data__;return br?t[e]!==i:ne.call(t,e)}function Fv(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=br&&t===i?h:t,this}pn.prototype.clear=Nv,pn.prototype.delete=Dv,pn.prototype.get=qv,pn.prototype.has=$v,pn.prototype.set=Fv;function Nt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var c=e[t];this.set(c[0],c[1])}}function Mv(){this.__data__=[],this.size=0}function jv(e){var t=this.__data__,s=Ti(t,e);if(s<0)return!1;var c=t.length-1;return s==c?t.pop():Ci.call(t,s,1),--this.size,!0}function Hv(e){var t=this.__data__,s=Ti(t,e);return s<0?i:t[s][1]}function Uv(e){return Ti(this.__data__,e)>-1}function Gv(e,t){var s=this.__data__,c=Ti(s,e);return c<0?(++this.size,s.push([e,t])):s[c][1]=t,this}Nt.prototype.clear=Mv,Nt.prototype.delete=jv,Nt.prototype.get=Hv,Nt.prototype.has=Uv,Nt.prototype.set=Gv;function Dt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var c=e[t];this.set(c[0],c[1])}}function Wv(){this.size=0,this.__data__={hash:new pn,map:new(Er||Nt),string:new pn}}function Bv(e){var t=Wi(this,e).delete(e);return this.size-=t?1:0,t}function kv(e){return Wi(this,e).get(e)}function Vv(e){return Wi(this,e).has(e)}function zv(e,t){var s=Wi(this,e),c=s.size;return s.set(e,t),this.size+=s.size==c?0:1,this}Dt.prototype.clear=Wv,Dt.prototype.delete=Bv,Dt.prototype.get=kv,Dt.prototype.has=Vv,Dt.prototype.set=zv;function dn(e){var t=-1,s=e==null?0:e.length;for(this.__data__=new Dt;++t<s;)this.add(e[t])}function Yv(e){return this.__data__.set(e,h),this}function Xv(e){return this.__data__.has(e)}dn.prototype.add=dn.prototype.push=Yv,dn.prototype.has=Xv;function dt(e){var t=this.__data__=new Nt(e);this.size=t.size}function Kv(){this.__data__=new Nt,this.size=0}function Jv(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function Zv(e){return this.__data__.get(e)}function Qv(e){return this.__data__.has(e)}function em(e,t){var s=this.__data__;if(s instanceof Nt){var c=s.__data__;if(!Er||c.length<r-1)return c.push([e,t]),this.size=++s.size,this;s=this.__data__=new Dt(c)}return s.set(e,t),this.size=s.size,this}dt.prototype.clear=Kv,dt.prototype.delete=Jv,dt.prototype.get=Zv,dt.prototype.has=Qv,dt.prototype.set=em;function Ya(e,t){var s=G(e),c=!s&&yn(e),f=!s&&!c&&rn(e),d=!s&&!c&&!f&&kn(e),v=s||c||f||d,y=v?Xs(e.length,lv):[],w=y.length;for(var O in e)(t||ne.call(e,O))&&!(v&&(O=="length"||f&&(O=="offset"||O=="parent")||d&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||Mt(O,w)))&&y.push(O);return y}function Xa(e){var t=e.length;return t?e[ho(0,t-1)]:i}function tm(e,t){return Bi(He(e),gn(t,0,e.length))}function nm(e){return Bi(He(e))}function no(e,t,s){(s!==i&&!gt(e[t],s)||s===i&&!(t in e))&&qt(e,t,s)}function Cr(e,t,s){var c=e[t];(!(ne.call(e,t)&&gt(c,s))||s===i&&!(t in e))&&qt(e,t,s)}function Ti(e,t){for(var s=e.length;s--;)if(gt(e[s][0],t))return s;return-1}function rm(e,t,s,c){return Qt(e,function(f,d,v){t(c,f,s(f),v)}),c}function Ka(e,t){return e&&wt(t,Ee(t),e)}function im(e,t){return e&&wt(t,Ge(t),e)}function qt(e,t,s){t=="__proto__"&&Oi?Oi(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}function ro(e,t){for(var s=-1,c=t.length,f=S(c),d=e==null;++s<c;)f[s]=d?i:Mo(e,t[s]);return f}function gn(e,t,s){return e===e&&(s!==i&&(e=e<=s?e:s),t!==i&&(e=e>=t?e:t)),e}function it(e,t,s,c,f,d){var v,y=t&l,w=t&m,O=t&b;if(s&&(v=f?s(e,c,f,d):s(e)),v!==i)return v;if(!fe(e))return e;var x=G(e);if(x){if(v=Vm(e),!y)return He(e,v)}else{var A=Re(e),T=A==ci||A==Zu;if(rn(e))return Ec(e,y);if(A==Lt||A==Ln||T&&!f){if(v=w||T?{}:jc(e),!y)return w?qm(e,im(v,e)):Dm(e,Ka(v,e))}else{if(!oe[A])return f?e:{};v=zm(e,A,y)}}d||(d=new dt);var q=d.get(e);if(q)return q;d.set(e,v),dl(e)?e.forEach(function(M){v.add(it(M,t,s,M,e,d))}):hl(e)&&e.forEach(function(M,z){v.set(z,it(M,t,s,z,e,d))});var F=O?w?Co:So:w?Ge:Ee,B=x?i:F(e);return tt(B||e,function(M,z){B&&(z=M,M=e[z]),Cr(v,z,it(M,t,s,z,e,d))}),v}function sm(e){var t=Ee(e);return function(s){return Ja(s,e,t)}}function Ja(e,t,s){var c=s.length;if(e==null)return!c;for(e=ie(e);c--;){var f=s[c],d=t[f],v=e[f];if(v===i&&!(f in e)||!d(v))return!1}return!0}function Za(e,t,s){if(typeof e!="function")throw new nt(a);return Tr(function(){e.apply(i,s)},t)}function Or(e,t,s,c){var f=-1,d=di,v=!0,y=e.length,w=[],O=t.length;if(!y)return w;s&&(t=le(t,ze(s))),c?(d=Ws,v=!1):t.length>=r&&(d=_r,v=!1,t=new dn(t));e:for(;++f<y;){var x=e[f],A=s==null?x:s(x);if(x=c||x!==0?x:0,v&&A===A){for(var T=O;T--;)if(t[T]===A)continue e;w.push(x)}else d(t,A,c)||w.push(x)}return w}var Qt=Oc(Et),Qa=Oc(so,!0);function om(e,t){var s=!0;return Qt(e,function(c,f,d){return s=!!t(c,f,d),s}),s}function Li(e,t,s){for(var c=-1,f=e.length;++c<f;){var d=e[c],v=t(d);if(v!=null&&(y===i?v===v&&!Xe(v):s(v,y)))var y=v,w=d}return w}function um(e,t,s,c){var f=e.length;for(s=W(s),s<0&&(s=-s>f?0:f+s),c=c===i||c>f?f:W(c),c<0&&(c+=f),c=s>c?0:vl(c);s<c;)e[s++]=t;return e}function ec(e,t){var s=[];return Qt(e,function(c,f,d){t(c,f,d)&&s.push(c)}),s}function Ce(e,t,s,c,f){var d=-1,v=e.length;for(s||(s=Xm),f||(f=[]);++d<v;){var y=e[d];t>0&&s(y)?t>1?Ce(y,t-1,s,c,f):Xt(f,y):c||(f[f.length]=y)}return f}var io=xc(),tc=xc(!0);function Et(e,t){return e&&io(e,t,Ee)}function so(e,t){return e&&tc(e,t,Ee)}function Ni(e,t){return Yt(t,function(s){return jt(e[s])})}function vn(e,t){t=tn(t,e);for(var s=0,c=t.length;e!=null&&s<c;)e=e[bt(t[s++])];return s&&s==c?e:i}function nc(e,t,s){var c=t(e);return G(e)?c:Xt(c,s(e))}function De(e){return e==null?e===i?$d:Dd:hn&&hn in ie(e)?Wm(e):n_(e)}function oo(e,t){return e>t}function am(e,t){return e!=null&&ne.call(e,t)}function cm(e,t){return e!=null&&t in ie(e)}function lm(e,t,s){return e>=Ie(t,s)&&e<_e(t,s)}function uo(e,t,s){for(var c=s?Ws:di,f=e[0].length,d=e.length,v=d,y=S(d),w=1/0,O=[];v--;){var x=e[v];v&&t&&(x=le(x,ze(t))),w=Ie(x.length,w),y[v]=!s&&(t||f>=120&&x.length>=120)?new dn(v&&x):i}x=e[0];var A=-1,T=y[0];e:for(;++A<f&&O.length<w;){var q=x[A],F=t?t(q):q;if(q=s||q!==0?q:0,!(T?_r(T,F):c(O,F,s))){for(v=d;--v;){var B=y[v];if(!(B?_r(B,F):c(e[v],F,s)))continue e}T&&T.push(F),O.push(q)}}return O}function fm(e,t,s,c){return Et(e,function(f,d,v){t(c,s(f),d,v)}),c}function xr(e,t,s){t=tn(t,e),e=Wc(e,t);var c=e==null?e:e[bt(ot(t))];return c==null?i:Ve(c,e,s)}function rc(e){return he(e)&&De(e)==Ln}function hm(e){return he(e)&&De(e)==mr}function pm(e){return he(e)&&De(e)==hr}function Ar(e,t,s,c,f){return e===t?!0:e==null||t==null||!he(e)&&!he(t)?e!==e&&t!==t:dm(e,t,s,c,Ar,f)}function dm(e,t,s,c,f,d){var v=G(e),y=G(t),w=v?ui:Re(e),O=y?ui:Re(t);w=w==Ln?Lt:w,O=O==Ln?Lt:O;var x=w==Lt,A=O==Lt,T=w==O;if(T&&rn(e)){if(!rn(t))return!1;v=!0,x=!1}if(T&&!x)return d||(d=new dt),v||kn(e)?$c(e,t,s,c,f,d):Um(e,t,w,s,c,f,d);if(!(s&I)){var q=x&&ne.call(e,"__wrapped__"),F=A&&ne.call(t,"__wrapped__");if(q||F){var B=q?e.value():e,M=F?t.value():t;return d||(d=new dt),f(B,M,s,c,d)}}return T?(d||(d=new dt),Gm(e,t,s,c,f,d)):!1}function gm(e){return he(e)&&Re(e)==ft}function ao(e,t,s,c){var f=s.length,d=f,v=!c;if(e==null)return!d;for(e=ie(e);f--;){var y=s[f];if(v&&y[2]?y[1]!==e[y[0]]:!(y[0]in e))return!1}for(;++f<d;){y=s[f];var w=y[0],O=e[w],x=y[1];if(v&&y[2]){if(O===i&&!(w in e))return!1}else{var A=new dt;if(c)var T=c(O,x,w,e,t,A);if(!(T===i?Ar(x,O,I|R,c,A):T))return!1}}return!0}function ic(e){if(!fe(e)||Jm(e))return!1;var t=jt(e)?gv:sg;return t.test(_n(e))}function vm(e){return he(e)&&De(e)==dr}function mm(e){return he(e)&&Re(e)==ht}function _m(e){return he(e)&&Ki(e.length)&&!!ce[De(e)]}function sc(e){return typeof e=="function"?e:e==null?We:typeof e=="object"?G(e)?ac(e[0],e[1]):uc(e):Al(e)}function co(e){if(!Pr(e))return wv(e);var t=[];for(var s in ie(e))ne.call(e,s)&&s!="constructor"&&t.push(s);return t}function ym(e){if(!fe(e))return t_(e);var t=Pr(e),s=[];for(var c in e)c=="constructor"&&(t||!ne.call(e,c))||s.push(c);return s}function lo(e,t){return e<t}function oc(e,t){var s=-1,c=Ue(e)?S(e.length):[];return Qt(e,function(f,d,v){c[++s]=t(f,d,v)}),c}function uc(e){var t=xo(e);return t.length==1&&t[0][2]?Uc(t[0][0],t[0][1]):function(s){return s===e||ao(s,e,t)}}function ac(e,t){return Io(e)&&Hc(t)?Uc(bt(e),t):function(s){var c=Mo(s,e);return c===i&&c===t?jo(s,e):Ar(t,c,I|R)}}function Di(e,t,s,c,f){e!==t&&io(t,function(d,v){if(f||(f=new dt),fe(d))Em(e,t,v,s,Di,c,f);else{var y=c?c(Po(e,v),d,v+"",e,t,f):i;y===i&&(y=d),no(e,v,y)}},Ge)}function Em(e,t,s,c,f,d,v){var y=Po(e,s),w=Po(t,s),O=v.get(w);if(O){no(e,s,O);return}var x=d?d(y,w,s+"",e,t,v):i,A=x===i;if(A){var T=G(w),q=!T&&rn(w),F=!T&&!q&&kn(w);x=w,T||q||F?G(y)?x=y:pe(y)?x=He(y):q?(A=!1,x=Ec(w,!0)):F?(A=!1,x=wc(w,!0)):x=[]:Lr(w)||yn(w)?(x=y,yn(y)?x=ml(y):(!fe(y)||jt(y))&&(x=jc(w))):A=!1}A&&(v.set(w,x),f(x,w,c,d,v),v.delete(w)),no(e,s,x)}function cc(e,t){var s=e.length;if(!!s)return t+=t<0?s:0,Mt(t,s)?e[t]:i}function lc(e,t,s){t.length?t=le(t,function(d){return G(d)?function(v){return vn(v,d.length===1?d[0]:d)}:d}):t=[We];var c=-1;t=le(t,ze($()));var f=oc(e,function(d,v,y){var w=le(t,function(O){return O(d)});return{criteria:w,index:++c,value:d}});return zg(f,function(d,v){return Nm(d,v,s)})}function wm(e,t){return fc(e,t,function(s,c){return jo(e,c)})}function fc(e,t,s){for(var c=-1,f=t.length,d={};++c<f;){var v=t[c],y=vn(e,v);s(y,v)&&Ir(d,tn(v,e),y)}return d}function bm(e){return function(t){return vn(t,e)}}function fo(e,t,s,c){var f=c?Vg:qn,d=-1,v=t.length,y=e;for(e===t&&(t=He(t)),s&&(y=le(e,ze(s)));++d<v;)for(var w=0,O=t[d],x=s?s(O):O;(w=f(y,x,w,c))>-1;)y!==e&&Ci.call(y,w,1),Ci.call(e,w,1);return e}function hc(e,t){for(var s=e?t.length:0,c=s-1;s--;){var f=t[s];if(s==c||f!==d){var d=f;Mt(f)?Ci.call(e,f,1):vo(e,f)}}return e}function ho(e,t){return e+Ai(Va()*(t-e+1))}function Sm(e,t,s,c){for(var f=-1,d=_e(xi((t-e)/(s||1)),0),v=S(d);d--;)v[c?d:++f]=e,e+=s;return v}function po(e,t){var s="";if(!e||t<1||t>zt)return s;do t%2&&(s+=e),t=Ai(t/2),t&&(e+=e);while(t);return s}function V(e,t){return To(Gc(e,t,We),e+"")}function Cm(e){return Xa(Vn(e))}function Om(e,t){var s=Vn(e);return Bi(s,gn(t,0,s.length))}function Ir(e,t,s,c){if(!fe(e))return e;t=tn(t,e);for(var f=-1,d=t.length,v=d-1,y=e;y!=null&&++f<d;){var w=bt(t[f]),O=s;if(w==="__proto__"||w==="constructor"||w==="prototype")return e;if(f!=v){var x=y[w];O=c?c(x,w,y):i,O===i&&(O=fe(x)?x:Mt(t[f+1])?[]:{})}Cr(y,w,O),y=y[w]}return e}var pc=Ii?function(e,t){return Ii.set(e,t),e}:We,xm=Oi?function(e,t){return Oi(e,"toString",{configurable:!0,enumerable:!1,value:Uo(t),writable:!0})}:We;function Am(e){return Bi(Vn(e))}function st(e,t,s){var c=-1,f=e.length;t<0&&(t=-t>f?0:f+t),s=s>f?f:s,s<0&&(s+=f),f=t>s?0:s-t>>>0,t>>>=0;for(var d=S(f);++c<f;)d[c]=e[c+t];return d}function Im(e,t){var s;return Qt(e,function(c,f,d){return s=t(c,f,d),!s}),!!s}function qi(e,t,s){var c=0,f=e==null?c:e.length;if(typeof t=="number"&&t===t&&f<=Pd){for(;c<f;){var d=c+f>>>1,v=e[d];v!==null&&!Xe(v)&&(s?v<=t:v<t)?c=d+1:f=d}return f}return go(e,t,We,s)}function go(e,t,s,c){var f=0,d=e==null?0:e.length;if(d===0)return 0;t=s(t);for(var v=t!==t,y=t===null,w=Xe(t),O=t===i;f<d;){var x=Ai((f+d)/2),A=s(e[x]),T=A!==i,q=A===null,F=A===A,B=Xe(A);if(v)var M=c||F;else O?M=F&&(c||T):y?M=F&&T&&(c||!q):w?M=F&&T&&!q&&(c||!B):q||B?M=!1:M=c?A<=t:A<t;M?f=x+1:d=x}return Ie(d,Rd)}function dc(e,t){for(var s=-1,c=e.length,f=0,d=[];++s<c;){var v=e[s],y=t?t(v):v;if(!s||!gt(y,w)){var w=y;d[f++]=v===0?0:v}}return d}function gc(e){return typeof e=="number"?e:Xe(e)?oi:+e}function Ye(e){if(typeof e=="string")return e;if(G(e))return le(e,Ye)+"";if(Xe(e))return za?za.call(e):"";var t=e+"";return t=="0"&&1/e==-ln?"-0":t}function en(e,t,s){var c=-1,f=di,d=e.length,v=!0,y=[],w=y;if(s)v=!1,f=Ws;else if(d>=r){var O=t?null:jm(e);if(O)return vi(O);v=!1,f=_r,w=new dn}else w=t?[]:y;e:for(;++c<d;){var x=e[c],A=t?t(x):x;if(x=s||x!==0?x:0,v&&A===A){for(var T=w.length;T--;)if(w[T]===A)continue e;t&&w.push(A),y.push(x)}else f(w,A,s)||(w!==y&&w.push(A),y.push(x))}return y}function vo(e,t){return t=tn(t,e),e=Wc(e,t),e==null||delete e[bt(ot(t))]}function vc(e,t,s,c){return Ir(e,t,s(vn(e,t)),c)}function $i(e,t,s,c){for(var f=e.length,d=c?f:-1;(c?d--:++d<f)&&t(e[d],d,e););return s?st(e,c?0:d,c?d+1:f):st(e,c?d+1:0,c?f:d)}function mc(e,t){var s=e;return s instanceof X&&(s=s.value()),Bs(t,function(c,f){return f.func.apply(f.thisArg,Xt([c],f.args))},s)}function mo(e,t,s){var c=e.length;if(c<2)return c?en(e[0]):[];for(var f=-1,d=S(c);++f<c;)for(var v=e[f],y=-1;++y<c;)y!=f&&(d[f]=Or(d[f]||v,e[y],t,s));return en(Ce(d,1),t,s)}function _c(e,t,s){for(var c=-1,f=e.length,d=t.length,v={};++c<f;){var y=c<d?t[c]:i;s(v,e[c],y)}return v}function _o(e){return pe(e)?e:[]}function yo(e){return typeof e=="function"?e:We}function tn(e,t){return G(e)?e:Io(e,t)?[e]:zc(te(e))}var Rm=V;function nn(e,t,s){var c=e.length;return s=s===i?c:s,!t&&s>=c?e:st(e,t,s)}var yc=vv||function(e){return ye.clearTimeout(e)};function Ec(e,t){if(t)return e.slice();var s=e.length,c=Ua?Ua(s):new e.constructor(s);return e.copy(c),c}function Eo(e){var t=new e.constructor(e.byteLength);return new bi(t).set(new bi(e)),t}function Pm(e,t){var s=t?Eo(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Tm(e){var t=new e.constructor(e.source,ra.exec(e));return t.lastIndex=e.lastIndex,t}function Lm(e){return Sr?ie(Sr.call(e)):{}}function wc(e,t){var s=t?Eo(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function bc(e,t){if(e!==t){var s=e!==i,c=e===null,f=e===e,d=Xe(e),v=t!==i,y=t===null,w=t===t,O=Xe(t);if(!y&&!O&&!d&&e>t||d&&v&&w&&!y&&!O||c&&v&&w||!s&&w||!f)return 1;if(!c&&!d&&!O&&e<t||O&&s&&f&&!c&&!d||y&&s&&f||!v&&f||!w)return-1}return 0}function Nm(e,t,s){for(var c=-1,f=e.criteria,d=t.criteria,v=f.length,y=s.length;++c<v;){var w=bc(f[c],d[c]);if(w){if(c>=y)return w;var O=s[c];return w*(O=="desc"?-1:1)}}return e.index-t.index}function Sc(e,t,s,c){for(var f=-1,d=e.length,v=s.length,y=-1,w=t.length,O=_e(d-v,0),x=S(w+O),A=!c;++y<w;)x[y]=t[y];for(;++f<v;)(A||f<d)&&(x[s[f]]=e[f]);for(;O--;)x[y++]=e[f++];return x}function Cc(e,t,s,c){for(var f=-1,d=e.length,v=-1,y=s.length,w=-1,O=t.length,x=_e(d-y,0),A=S(x+O),T=!c;++f<x;)A[f]=e[f];for(var q=f;++w<O;)A[q+w]=t[w];for(;++v<y;)(T||f<d)&&(A[q+s[v]]=e[f++]);return A}function He(e,t){var s=-1,c=e.length;for(t||(t=S(c));++s<c;)t[s]=e[s];return t}function wt(e,t,s,c){var f=!s;s||(s={});for(var d=-1,v=t.length;++d<v;){var y=t[d],w=c?c(s[y],e[y],y,s,e):i;w===i&&(w=e[y]),f?qt(s,y,w):Cr(s,y,w)}return s}function Dm(e,t){return wt(e,Ao(e),t)}function qm(e,t){return wt(e,Fc(e),t)}function Fi(e,t){return function(s,c){var f=G(s)?Hg:rm,d=t?t():{};return f(s,e,$(c,2),d)}}function Gn(e){return V(function(t,s){var c=-1,f=s.length,d=f>1?s[f-1]:i,v=f>2?s[2]:i;for(d=e.length>3&&typeof d=="function"?(f--,d):i,v&&qe(s[0],s[1],v)&&(d=f<3?i:d,f=1),t=ie(t);++c<f;){var y=s[c];y&&e(t,y,c,d)}return t})}function Oc(e,t){return function(s,c){if(s==null)return s;if(!Ue(s))return e(s,c);for(var f=s.length,d=t?f:-1,v=ie(s);(t?d--:++d<f)&&c(v[d],d,v)!==!1;);return s}}function xc(e){return function(t,s,c){for(var f=-1,d=ie(t),v=c(t),y=v.length;y--;){var w=v[e?y:++f];if(s(d[w],w,d)===!1)break}return t}}function $m(e,t,s){var c=t&H,f=Rr(e);function d(){var v=this&&this!==ye&&this instanceof d?f:e;return v.apply(c?s:this,arguments)}return d}function Ac(e){return function(t){t=te(t);var s=$n(t)?pt(t):i,c=s?s[0]:t.charAt(0),f=s?nn(s,1).join(""):t.slice(1);return c[e]()+f}}function Wn(e){return function(t){return Bs(Ol(Cl(t).replace(xg,"")),e,"")}}function Rr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var s=Un(e.prototype),c=e.apply(s,t);return fe(c)?c:s}}function Fm(e,t,s){var c=Rr(e);function f(){for(var d=arguments.length,v=S(d),y=d,w=Bn(f);y--;)v[y]=arguments[y];var O=d<3&&v[0]!==w&&v[d-1]!==w?[]:Kt(v,w);if(d-=O.length,d<s)return Lc(e,t,Mi,f.placeholder,i,v,O,i,i,s-d);var x=this&&this!==ye&&this instanceof f?c:e;return Ve(x,this,v)}return f}function Ic(e){return function(t,s,c){var f=ie(t);if(!Ue(t)){var d=$(s,3);t=Ee(t),s=function(y){return d(f[y],y,f)}}var v=e(t,s,c);return v>-1?f[d?t[v]:v]:i}}function Rc(e){return Ft(function(t){var s=t.length,c=s,f=rt.prototype.thru;for(e&&t.reverse();c--;){var d=t[c];if(typeof d!="function")throw new nt(a);if(f&&!v&&Gi(d)=="wrapper")var v=new rt([],!0)}for(c=v?c:s;++c<s;){d=t[c];var y=Gi(d),w=y=="wrapper"?Oo(d):i;w&&Ro(w[0])&&w[1]==(Ae|Q|se|K)&&!w[4].length&&w[9]==1?v=v[Gi(w[0])].apply(v,w[3]):v=d.length==1&&Ro(d)?v[y]():v.thru(d)}return function(){var O=arguments,x=O[0];if(v&&O.length==1&&G(x))return v.plant(x).value();for(var A=0,T=s?t[A].apply(this,O):x;++A<s;)T=t[A].call(this,T);return T}})}function Mi(e,t,s,c,f,d,v,y,w,O){var x=t&Ae,A=t&H,T=t&re,q=t&(Q|Se),F=t&si,B=T?i:Rr(e);function M(){for(var z=arguments.length,J=S(z),Ke=z;Ke--;)J[Ke]=arguments[Ke];if(q)var $e=Bn(M),Je=Xg(J,$e);if(c&&(J=Sc(J,c,f,q)),d&&(J=Cc(J,d,v,q)),z-=Je,q&&z<O){var de=Kt(J,$e);return Lc(e,t,Mi,M.placeholder,s,J,de,y,w,O-z)}var vt=A?s:this,Ut=T?vt[e]:e;return z=J.length,y?J=r_(J,y):F&&z>1&&J.reverse(),x&&w<z&&(J.length=w),this&&this!==ye&&this instanceof M&&(Ut=B||Rr(Ut)),Ut.apply(vt,J)}return M}function Pc(e,t){return function(s,c){return fm(s,e,t(c),{})}}function ji(e,t){return function(s,c){var f;if(s===i&&c===i)return t;if(s!==i&&(f=s),c!==i){if(f===i)return c;typeof s=="string"||typeof c=="string"?(s=Ye(s),c=Ye(c)):(s=gc(s),c=gc(c)),f=e(s,c)}return f}}function wo(e){return Ft(function(t){return t=le(t,ze($())),V(function(s){var c=this;return e(t,function(f){return Ve(f,c,s)})})})}function Hi(e,t){t=t===i?" ":Ye(t);var s=t.length;if(s<2)return s?po(t,e):t;var c=po(t,xi(e/Fn(t)));return $n(t)?nn(pt(c),0,e).join(""):c.slice(0,e)}function Mm(e,t,s,c){var f=t&H,d=Rr(e);function v(){for(var y=-1,w=arguments.length,O=-1,x=c.length,A=S(x+w),T=this&&this!==ye&&this instanceof v?d:e;++O<x;)A[O]=c[O];for(;w--;)A[O++]=arguments[++y];return Ve(T,f?s:this,A)}return v}function Tc(e){return function(t,s,c){return c&&typeof c!="number"&&qe(t,s,c)&&(s=c=i),t=Ht(t),s===i?(s=t,t=0):s=Ht(s),c=c===i?t<s?1:-1:Ht(c),Sm(t,s,c,e)}}function Ui(e){return function(t,s){return typeof t=="string"&&typeof s=="string"||(t=ut(t),s=ut(s)),e(t,s)}}function Lc(e,t,s,c,f,d,v,y,w,O){var x=t&Q,A=x?v:i,T=x?i:v,q=x?d:i,F=x?i:d;t|=x?se:Ne,t&=~(x?Ne:se),t&ae||(t&=~(H|re));var B=[e,t,f,q,A,F,T,y,w,O],M=s.apply(i,B);return Ro(e)&&Bc(M,B),M.placeholder=c,kc(M,e,t)}function bo(e){var t=me[e];return function(s,c){if(s=ut(s),c=c==null?0:Ie(W(c),292),c&&ka(s)){var f=(te(s)+"e").split("e"),d=t(f[0]+"e"+(+f[1]+c));return f=(te(d)+"e").split("e"),+(f[0]+"e"+(+f[1]-c))}return t(s)}}var jm=jn&&1/vi(new jn([,-0]))[1]==ln?function(e){return new jn(e)}:Bo;function Nc(e){return function(t){var s=Re(t);return s==ft?Js(t):s==ht?nv(t):Yg(t,e(t))}}function $t(e,t,s,c,f,d,v,y){var w=t&re;if(!w&&typeof e!="function")throw new nt(a);var O=c?c.length:0;if(O||(t&=~(se|Ne),c=f=i),v=v===i?v:_e(W(v),0),y=y===i?y:W(y),O-=f?f.length:0,t&Ne){var x=c,A=f;c=f=i}var T=w?i:Oo(e),q=[e,t,s,c,f,x,A,d,v,y];if(T&&e_(q,T),e=q[0],t=q[1],s=q[2],c=q[3],f=q[4],y=q[9]=q[9]===i?w?0:e.length:_e(q[9]-O,0),!y&&t&(Q|Se)&&(t&=~(Q|Se)),!t||t==H)var F=$m(e,t,s);else t==Q||t==Se?F=Fm(e,t,y):(t==se||t==(H|se))&&!f.length?F=Mm(e,t,s,c):F=Mi.apply(i,q);var B=T?pc:Bc;return kc(B(F,q),e,t)}function Dc(e,t,s,c){return e===i||gt(e,Mn[s])&&!ne.call(c,s)?t:e}function qc(e,t,s,c,f,d){return fe(e)&&fe(t)&&(d.set(t,e),Di(e,t,i,qc,d),d.delete(t)),e}function Hm(e){return Lr(e)?i:e}function $c(e,t,s,c,f,d){var v=s&I,y=e.length,w=t.length;if(y!=w&&!(v&&w>y))return!1;var O=d.get(e),x=d.get(t);if(O&&x)return O==t&&x==e;var A=-1,T=!0,q=s&R?new dn:i;for(d.set(e,t),d.set(t,e);++A<y;){var F=e[A],B=t[A];if(c)var M=v?c(B,F,A,t,e,d):c(F,B,A,e,t,d);if(M!==i){if(M)continue;T=!1;break}if(q){if(!ks(t,function(z,J){if(!_r(q,J)&&(F===z||f(F,z,s,c,d)))return q.push(J)})){T=!1;break}}else if(!(F===B||f(F,B,s,c,d))){T=!1;break}}return d.delete(e),d.delete(t),T}function Um(e,t,s,c,f,d,v){switch(s){case Nn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mr:return!(e.byteLength!=t.byteLength||!d(new bi(e),new bi(t)));case fr:case hr:case pr:return gt(+e,+t);case ai:return e.name==t.name&&e.message==t.message;case dr:case gr:return e==t+"";case ft:var y=Js;case ht:var w=c&I;if(y||(y=vi),e.size!=t.size&&!w)return!1;var O=v.get(e);if(O)return O==t;c|=R,v.set(e,t);var x=$c(y(e),y(t),c,f,d,v);return v.delete(e),x;case li:if(Sr)return Sr.call(e)==Sr.call(t)}return!1}function Gm(e,t,s,c,f,d){var v=s&I,y=So(e),w=y.length,O=So(t),x=O.length;if(w!=x&&!v)return!1;for(var A=w;A--;){var T=y[A];if(!(v?T in t:ne.call(t,T)))return!1}var q=d.get(e),F=d.get(t);if(q&&F)return q==t&&F==e;var B=!0;d.set(e,t),d.set(t,e);for(var M=v;++A<w;){T=y[A];var z=e[T],J=t[T];if(c)var Ke=v?c(J,z,T,t,e,d):c(z,J,T,e,t,d);if(!(Ke===i?z===J||f(z,J,s,c,d):Ke)){B=!1;break}M||(M=T=="constructor")}if(B&&!M){var $e=e.constructor,Je=t.constructor;$e!=Je&&"constructor"in e&&"constructor"in t&&!(typeof $e=="function"&&$e instanceof $e&&typeof Je=="function"&&Je instanceof Je)&&(B=!1)}return d.delete(e),d.delete(t),B}function Ft(e){return To(Gc(e,i,Jc),e+"")}function So(e){return nc(e,Ee,Ao)}function Co(e){return nc(e,Ge,Fc)}var Oo=Ii?function(e){return Ii.get(e)}:Bo;function Gi(e){for(var t=e.name+"",s=Hn[t],c=ne.call(Hn,t)?s.length:0;c--;){var f=s[c],d=f.func;if(d==null||d==e)return f.name}return t}function Bn(e){var t=ne.call(p,"placeholder")?p:e;return t.placeholder}function $(){var e=p.iteratee||Go;return e=e===Go?sc:e,arguments.length?e(arguments[0],arguments[1]):e}function Wi(e,t){var s=e.__data__;return Km(t)?s[typeof t=="string"?"string":"hash"]:s.map}function xo(e){for(var t=Ee(e),s=t.length;s--;){var c=t[s],f=e[c];t[s]=[c,f,Hc(f)]}return t}function mn(e,t){var s=Qg(e,t);return ic(s)?s:i}function Wm(e){var t=ne.call(e,hn),s=e[hn];try{e[hn]=i;var c=!0}catch{}var f=Ei.call(e);return c&&(t?e[hn]=s:delete e[hn]),f}var Ao=Qs?function(e){return e==null?[]:(e=ie(e),Yt(Qs(e),function(t){return Wa.call(e,t)}))}:ko,Fc=Qs?function(e){for(var t=[];e;)Xt(t,Ao(e)),e=Si(e);return t}:ko,Re=De;(eo&&Re(new eo(new ArrayBuffer(1)))!=Nn||Er&&Re(new Er)!=ft||to&&Re(to.resolve())!=Qu||jn&&Re(new jn)!=ht||wr&&Re(new wr)!=vr)&&(Re=function(e){var t=De(e),s=t==Lt?e.constructor:i,c=s?_n(s):"";if(c)switch(c){case Ov:return Nn;case xv:return ft;case Av:return Qu;case Iv:return ht;case Rv:return vr}return t});function Bm(e,t,s){for(var c=-1,f=s.length;++c<f;){var d=s[c],v=d.size;switch(d.type){case"drop":e+=v;break;case"dropRight":t-=v;break;case"take":t=Ie(t,e+v);break;case"takeRight":e=_e(e,t-v);break}}return{start:e,end:t}}function km(e){var t=e.match(Jd);return t?t[1].split(Zd):[]}function Mc(e,t,s){t=tn(t,e);for(var c=-1,f=t.length,d=!1;++c<f;){var v=bt(t[c]);if(!(d=e!=null&&s(e,v)))break;e=e[v]}return d||++c!=f?d:(f=e==null?0:e.length,!!f&&Ki(f)&&Mt(v,f)&&(G(e)||yn(e)))}function Vm(e){var t=e.length,s=new e.constructor(t);return t&&typeof e[0]=="string"&&ne.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function jc(e){return typeof e.constructor=="function"&&!Pr(e)?Un(Si(e)):{}}function zm(e,t,s){var c=e.constructor;switch(t){case mr:return Eo(e);case fr:case hr:return new c(+e);case Nn:return Pm(e,s);case Os:case xs:case As:case Is:case Rs:case Ps:case Ts:case Ls:case Ns:return wc(e,s);case ft:return new c;case pr:case gr:return new c(e);case dr:return Tm(e);case ht:return new c;case li:return Lm(e)}}function Ym(e,t){var s=t.length;if(!s)return e;var c=s-1;return t[c]=(s>1?"& ":"")+t[c],t=t.join(s>2?", ":" "),e.replace(Kd,`{
16
16
  /* [wrapped with `+t+`] */
17
- `)}function Bv(e){return U(e)||mr(e)||!!(Ba&&e&&e[Ba])}function $t(e,t){var s=typeof e;return t=t==null?Vt:t,!!t&&(s=="number"||s!="symbol"&&rg.test(e))&&e>-1&&e%1==0&&e<t}function qe(e,t,s){if(!fe(s))return!1;var l=typeof t;return(l=="number"?Ue(s)&&$t(t,s.length):l=="string"&&t in s)?dt(s[t],e):!1}function Io(e,t){if(U(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||Xe(e)?!0:Ud.test(e)||!Hd.test(e)||t!=null&&e in ie(t)}function kv(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ro(e){var t=ji(e),s=h[t];if(typeof s!="function"||!(t in Y.prototype))return!1;if(e===s)return!0;var l=Oo(s);return!!l&&e===l[0]}function Vv(e){return!!Ha&&Ha in e}var zv=di?Ft:Vo;function In(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Fr;return e===s}function Hl(e){return e===e&&!fe(e)}function Ul(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==i||e in ie(s))}}function Xv(e){var t=Bi(e,function(l){return s.size===g&&s.clear(),l}),s=t.cache;return t}function Yv(e,t){var s=e[1],l=t[1],f=s|l,d=f<(H|re|ve),m=l==ve&&s==X||l==ve&&s==K&&e[7].length<=t[8]||l==(ve|K)&&t[7].length<=t[8]&&s==X;if(!(d||m))return e;l&H&&(e[2]=t[2],f|=s&H?0:ue);var y=t[3];if(y){var w=e[3];e[3]=w?Sl(w,y,t[4]):y,e[4]=w?Yt(e[3],v):t[4]}return y=t[5],y&&(w=e[5],e[5]=w?Cl(w,y,t[6]):y,e[6]=w?Yt(e[5],v):t[6]),y=t[7],y&&(e[7]=y),l&ve&&(e[8]=e[8]==null?t[8]:Re(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function Kv(e){var t=[];if(e!=null)for(var s in ie(e))t.push(s);return t}function Jv(e){return mi.call(e)}function Gl(e,t,s){return t=Ee(t===i?e.length-1:t,0),function(){for(var l=arguments,f=-1,d=Ee(l.length-t,0),m=S(d);++f<d;)m[f]=l[t+f];f=-1;for(var y=S(t+1);++f<t;)y[f]=l[f];return y[t]=s(m),ke(e,this,y)}}function Wl(e,t){return t.length<2?e:pr(e,it(t,0,-1))}function Zv(e,t){for(var s=e.length,l=Re(t.length,s),f=He(e);l--;){var d=t[l];e[l]=$t(d,s)?f[d]:i}return e}function Po(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Bl=Vl(pl),Rn=pm||function(e,t){return we.setTimeout(e,t)},To=Vl(wv);function kl(e,t,s){var l=t+"";return To(e,Wv(l,Qv(Hv(l),s)))}function Vl(e){var t=0,s=0;return function(){var l=vm(),f=Ed-(l-s);if(s=l,f>0){if(++t>=yd)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Hi(e,t){var s=-1,l=e.length,f=l-1;for(t=t===i?l:t;++s<t;){var d=ho(s,f),m=e[d];e[d]=e[s],e[s]=m}return e.length=t,e}var zl=Xv(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Gd,function(s,l,f,d){t.push(f?d.replace(Kd,"$1"):l||s)}),t});function Et(e){if(typeof e=="string"||Xe(e))return e;var t=e+"";return t=="0"&&1/e==-ur?"-0":t}function gr(e){if(e!=null){try{return gi.call(e)}catch{}try{return e+""}catch{}}return""}function Qv(e,t){return et(xd,function(s){var l="_."+s[0];t&s[1]&&!ci(e,l)&&e.push(l)}),e.sort()}function Xl(e){if(e instanceof Y)return e.clone();var t=new rt(e.__wrapped__,e.__chain__);return t.__actions__=He(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function e_(e,t,s){(s?qe(e,t,s):t===i)?t=1:t=Ee(W(t),0);var l=e==null?0:e.length;if(!l||t<1)return[];for(var f=0,d=0,m=S(bi(l/t));f<l;)m[d++]=it(e,f,f+=t);return m}function t_(e){for(var t=-1,s=e==null?0:e.length,l=0,f=[];++t<s;){var d=e[t];d&&(f[l++]=d)}return f}function r_(){var e=arguments.length;if(!e)return[];for(var t=S(e-1),s=arguments[0],l=e;l--;)t[l-1]=arguments[l];return Xt(U(s)?He(s):[s],Oe(t,1))}var n_=V(function(e,t){return de(e)?Sn(e,Oe(t,1,de,!0)):[]}),i_=V(function(e,t){var s=st(t);return de(s)&&(s=i),de(e)?Sn(e,Oe(t,1,de,!0),$(s,2)):[]}),s_=V(function(e,t){var s=st(t);return de(s)&&(s=i),de(e)?Sn(e,Oe(t,1,de,!0),i,s):[]});function o_(e,t,s){var l=e==null?0:e.length;return l?(t=s||t===i?1:W(t),it(e,t<0?0:t,l)):[]}function u_(e,t,s){var l=e==null?0:e.length;return l?(t=s||t===i?1:W(t),t=l-t,it(e,0,t<0?0:t)):[]}function a_(e,t){return e&&e.length?Li(e,$(t,3),!0,!0):[]}function l_(e,t){return e&&e.length?Li(e,$(t,3),!0):[]}function c_(e,t,s,l){var f=e==null?0:e.length;return f?(s&&typeof s!="number"&&qe(e,t,s)&&(s=0,l=f),rv(e,t,s,l)):[]}function Yl(e,t,s){var l=e==null?0:e.length;if(!l)return-1;var f=s==null?0:W(s);return f<0&&(f=Ee(l+f,0)),fi(e,$(t,3),f)}function Kl(e,t,s){var l=e==null?0:e.length;if(!l)return-1;var f=l-1;return s!==i&&(f=W(s),f=s<0?Ee(l+f,0):Re(f,l-1)),fi(e,$(t,3),f,!0)}function Jl(e){var t=e==null?0:e.length;return t?Oe(e,1):[]}function f_(e){var t=e==null?0:e.length;return t?Oe(e,ur):[]}function h_(e,t){var s=e==null?0:e.length;return s?(t=t===i?1:W(t),Oe(e,t)):[]}function p_(e){for(var t=-1,s=e==null?0:e.length,l={};++t<s;){var f=e[t];l[f[0]]=f[1]}return l}function Zl(e){return e&&e.length?e[0]:i}function d_(e,t,s){var l=e==null?0:e.length;if(!l)return-1;var f=s==null?0:W(s);return f<0&&(f=Ee(l+f,0)),Dr(e,t,f)}function g_(e){var t=e==null?0:e.length;return t?it(e,0,-1):[]}var m_=V(function(e){var t=ce(e,_o);return t.length&&t[0]===e[0]?uo(t):[]}),v_=V(function(e){var t=st(e),s=ce(e,_o);return t===st(s)?t=i:s.pop(),s.length&&s[0]===e[0]?uo(s,$(t,2)):[]}),__=V(function(e){var t=st(e),s=ce(e,_o);return t=typeof t=="function"?t:i,t&&s.pop(),s.length&&s[0]===e[0]?uo(s,i,t):[]});function y_(e,t){return e==null?"":gm.call(e,t)}function st(e){var t=e==null?0:e.length;return t?e[t-1]:i}function E_(e,t,s){var l=e==null?0:e.length;if(!l)return-1;var f=l;return s!==i&&(f=W(s),f=f<0?Ee(l+f,0):Re(f,l-1)),t===t?Qg(e,t,f):fi(e,La,f,!0)}function w_(e,t){return e&&e.length?ll(e,W(t)):i}var b_=V(Ql);function Ql(e,t){return e&&e.length&&t&&t.length?fo(e,t):e}function S_(e,t,s){return e&&e.length&&t&&t.length?fo(e,t,$(s,2)):e}function C_(e,t,s){return e&&e.length&&t&&t.length?fo(e,t,i,s):e}var O_=qt(function(e,t){var s=e==null?0:e.length,l=no(e,t);return hl(e,ce(t,function(f){return $t(f,s)?+f:f}).sort(bl)),l});function x_(e,t){var s=[];if(!(e&&e.length))return s;var l=-1,f=[],d=e.length;for(t=$(t,3);++l<d;){var m=e[l];t(m,l,e)&&(s.push(m),f.push(l))}return hl(e,f),s}function Lo(e){return e==null?e:ym.call(e)}function A_(e,t,s){var l=e==null?0:e.length;return l?(s&&typeof s!="number"&&qe(e,t,s)?(t=0,s=l):(t=t==null?0:W(t),s=s===i?l:W(s)),it(e,t,s)):[]}function I_(e,t){return Ti(e,t)}function R_(e,t,s){return go(e,t,$(s,2))}function P_(e,t){var s=e==null?0:e.length;if(s){var l=Ti(e,t);if(l<s&&dt(e[l],t))return l}return-1}function T_(e,t){return Ti(e,t,!0)}function L_(e,t,s){return go(e,t,$(s,2),!0)}function N_(e,t){var s=e==null?0:e.length;if(s){var l=Ti(e,t,!0)-1;if(dt(e[l],t))return l}return-1}function D_(e){return e&&e.length?dl(e):[]}function q_(e,t){return e&&e.length?dl(e,$(t,2)):[]}function $_(e){var t=e==null?0:e.length;return t?it(e,1,t):[]}function F_(e,t,s){return e&&e.length?(t=s||t===i?1:W(t),it(e,0,t<0?0:t)):[]}function j_(e,t,s){var l=e==null?0:e.length;return l?(t=s||t===i?1:W(t),t=l-t,it(e,t<0?0:t,l)):[]}function M_(e,t){return e&&e.length?Li(e,$(t,3),!1,!0):[]}function H_(e,t){return e&&e.length?Li(e,$(t,3)):[]}var U_=V(function(e){return Qt(Oe(e,1,de,!0))}),G_=V(function(e){var t=st(e);return de(t)&&(t=i),Qt(Oe(e,1,de,!0),$(t,2))}),W_=V(function(e){var t=st(e);return t=typeof t=="function"?t:i,Qt(Oe(e,1,de,!0),i,t)});function B_(e){return e&&e.length?Qt(e):[]}function k_(e,t){return e&&e.length?Qt(e,$(t,2)):[]}function V_(e,t){return t=typeof t=="function"?t:i,e&&e.length?Qt(e,i,t):[]}function No(e){if(!(e&&e.length))return[];var t=0;return e=zt(e,function(s){if(de(s))return t=Ee(s.length,t),!0}),Ys(t,function(s){return ce(e,Vs(s))})}function ec(e,t){if(!(e&&e.length))return[];var s=No(e);return t==null?s:ce(s,function(l){return ke(t,i,l)})}var z_=V(function(e,t){return de(e)?Sn(e,t):[]}),X_=V(function(e){return vo(zt(e,de))}),Y_=V(function(e){var t=st(e);return de(t)&&(t=i),vo(zt(e,de),$(t,2))}),K_=V(function(e){var t=st(e);return t=typeof t=="function"?t:i,vo(zt(e,de),i,t)}),J_=V(No);function Z_(e,t){return _l(e||[],t||[],bn)}function Q_(e,t){return _l(e||[],t||[],xn)}var e0=V(function(e){var t=e.length,s=t>1?e[t-1]:i;return s=typeof s=="function"?(e.pop(),s):i,ec(e,s)});function tc(e){var t=h(e);return t.__chain__=!0,t}function t0(e,t){return t(e),e}function Ui(e,t){return t(e)}var r0=qt(function(e){var t=e.length,s=t?e[0]:0,l=this.__wrapped__,f=function(d){return no(d,e)};return t>1||this.__actions__.length||!(l instanceof Y)||!$t(s)?this.thru(f):(l=l.slice(s,+s+(t?1:0)),l.__actions__.push({func:Ui,args:[f],thisArg:i}),new rt(l,this.__chain__).thru(function(d){return t&&!d.length&&d.push(i),d}))});function n0(){return tc(this)}function i0(){return new rt(this.value(),this.__chain__)}function s0(){this.__values__===i&&(this.__values__=gc(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function o0(){return this}function u0(e){for(var t,s=this;s instanceof xi;){var l=Xl(s);l.__index__=0,l.__values__=i,t?f.__wrapped__=l:t=l;var f=l;s=s.__wrapped__}return f.__wrapped__=e,t}function a0(){var e=this.__wrapped__;if(e instanceof Y){var t=e;return this.__actions__.length&&(t=new Y(this)),t=t.reverse(),t.__actions__.push({func:Ui,args:[Lo],thisArg:i}),new rt(t,this.__chain__)}return this.thru(Lo)}function l0(){return vl(this.__wrapped__,this.__actions__)}var c0=Ni(function(e,t,s){ne.call(e,s)?++e[s]:Nt(e,s,1)});function f0(e,t,s){var l=U(e)?Pa:tv;return s&&qe(e,t,s)&&(t=i),l(e,$(t,3))}function h0(e,t){var s=U(e)?zt:el;return s(e,$(t,3))}var p0=Il(Yl),d0=Il(Kl);function g0(e,t){return Oe(Gi(e,t),1)}function m0(e,t){return Oe(Gi(e,t),ur)}function v0(e,t,s){return s=s===i?1:W(s),Oe(Gi(e,t),s)}function rc(e,t){var s=U(e)?et:Zt;return s(e,$(t,3))}function nc(e,t){var s=U(e)?$g:Qa;return s(e,$(t,3))}var _0=Ni(function(e,t,s){ne.call(e,s)?e[s].push(t):Nt(e,s,[t])});function y0(e,t,s,l){e=Ue(e)?e:kr(e),s=s&&!l?W(s):0;var f=e.length;return s<0&&(s=Ee(f+s,0)),zi(e)?s<=f&&e.indexOf(t,s)>-1:!!f&&Dr(e,t,s)>-1}var E0=V(function(e,t,s){var l=-1,f=typeof t=="function",d=Ue(e)?S(e.length):[];return Zt(e,function(m){d[++l]=f?ke(t,m,s):Cn(m,t,s)}),d}),w0=Ni(function(e,t,s){Nt(e,s,t)});function Gi(e,t){var s=U(e)?ce:ol;return s(e,$(t,3))}function b0(e,t,s,l){return e==null?[]:(U(t)||(t=t==null?[]:[t]),s=l?i:s,U(s)||(s=s==null?[]:[s]),cl(e,t,s))}var S0=Ni(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function C0(e,t,s){var l=U(e)?Bs:Da,f=arguments.length<3;return l(e,$(t,4),s,f,Zt)}function O0(e,t,s){var l=U(e)?Fg:Da,f=arguments.length<3;return l(e,$(t,4),s,f,Qa)}function x0(e,t){var s=U(e)?zt:el;return s(e,ki($(t,3)))}function A0(e){var t=U(e)?Ya:yv;return t(e)}function I0(e,t,s){(s?qe(e,t,s):t===i)?t=1:t=W(t);var l=U(e)?Km:Ev;return l(e,t)}function R0(e){var t=U(e)?Jm:bv;return t(e)}function P0(e){if(e==null)return 0;if(Ue(e))return zi(e)?$r(e):e.length;var t=Pe(e);return t==ct||t==ft?e.size:lo(e).length}function T0(e,t,s){var l=U(e)?ks:Sv;return s&&qe(e,t,s)&&(t=i),l(e,$(t,3))}var L0=V(function(e,t){if(e==null)return[];var s=t.length;return s>1&&qe(e,t[0],t[1])?t=[]:s>2&&qe(t[0],t[1],t[2])&&(t=[t[0]]),cl(e,Oe(t,1),[])}),Wi=hm||function(){return we.Date.now()};function N0(e,t){if(typeof t!="function")throw new tt(a);return e=W(e),function(){if(--e<1)return t.apply(this,arguments)}}function ic(e,t,s){return t=s?i:t,t=e&&t==null?e.length:t,Dt(e,ve,i,i,i,i,t)}function sc(e,t){var s;if(typeof t!="function")throw new tt(a);return e=W(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=i),s}}var Do=V(function(e,t,s){var l=H;if(s.length){var f=Yt(s,Wr(Do));l|=pe}return Dt(e,l,t,s,f)}),oc=V(function(e,t,s){var l=H|re;if(s.length){var f=Yt(s,Wr(oc));l|=pe}return Dt(t,l,e,s,f)});function uc(e,t,s){t=s?i:t;var l=Dt(e,X,i,i,i,i,i,t);return l.placeholder=uc.placeholder,l}function ac(e,t,s){t=s?i:t;var l=Dt(e,Ie,i,i,i,i,i,t);return l.placeholder=ac.placeholder,l}function lc(e,t,s){var l,f,d,m,y,w,O=0,x=!1,A=!1,T=!0;if(typeof e!="function")throw new tt(a);t=ot(t)||0,fe(s)&&(x=!!s.leading,A="maxWait"in s,d=A?Ee(ot(s.maxWait)||0,t):d,T="trailing"in s?!!s.trailing:T);function q(ge){var gt=l,Mt=f;return l=f=i,O=ge,m=e.apply(Mt,gt),m}function F(ge){return O=ge,y=Rn(z,t),x?q(ge):m}function B(ge){var gt=ge-w,Mt=ge-O,Ic=t-gt;return A?Re(Ic,d-Mt):Ic}function j(ge){var gt=ge-w,Mt=ge-O;return w===i||gt>=t||gt<0||A&&Mt>=d}function z(){var ge=Wi();if(j(ge))return J(ge);y=Rn(z,B(ge))}function J(ge){return y=i,T&&l?q(ge):(l=f=i,m)}function Ye(){y!==i&&yl(y),O=0,l=w=f=y=i}function $e(){return y===i?m:J(Wi())}function Ke(){var ge=Wi(),gt=j(ge);if(l=arguments,f=this,w=ge,gt){if(y===i)return F(w);if(A)return yl(y),y=Rn(z,t),q(w)}return y===i&&(y=Rn(z,t)),m}return Ke.cancel=Ye,Ke.flush=$e,Ke}var D0=V(function(e,t){return Za(e,1,t)}),q0=V(function(e,t,s){return Za(e,ot(t)||0,s)});function $0(e){return Dt(e,Pr)}function Bi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new tt(a);var s=function(){var l=arguments,f=t?t.apply(this,l):l[0],d=s.cache;if(d.has(f))return d.get(f);var m=e.apply(this,l);return s.cache=d.set(f,m)||d,m};return s.cache=new(Bi.Cache||Lt),s}Bi.Cache=Lt;function ki(e){if(typeof e!="function")throw new tt(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function F0(e){return sc(2,e)}var j0=Cv(function(e,t){t=t.length==1&&U(t[0])?ce(t[0],Ve($())):ce(Oe(t,1),Ve($()));var s=t.length;return V(function(l){for(var f=-1,d=Re(l.length,s);++f<d;)l[f]=t[f].call(this,l[f]);return ke(e,this,l)})}),qo=V(function(e,t){var s=Yt(t,Wr(qo));return Dt(e,pe,i,t,s)}),cc=V(function(e,t){var s=Yt(t,Wr(cc));return Dt(e,le,i,t,s)}),M0=qt(function(e,t){return Dt(e,K,i,i,i,t)});function H0(e,t){if(typeof e!="function")throw new tt(a);return t=t===i?t:W(t),V(e,t)}function U0(e,t){if(typeof e!="function")throw new tt(a);return t=t==null?0:Ee(W(t),0),V(function(s){var l=s[t],f=tr(s,0,t);return l&&Xt(f,l),ke(e,this,f)})}function G0(e,t,s){var l=!0,f=!0;if(typeof e!="function")throw new tt(a);return fe(s)&&(l="leading"in s?!!s.leading:l,f="trailing"in s?!!s.trailing:f),lc(e,t,{leading:l,maxWait:t,trailing:f})}function W0(e){return ic(e,1)}function B0(e,t){return qo(yo(t),e)}function k0(){if(!arguments.length)return[];var e=arguments[0];return U(e)?e:[e]}function V0(e){return nt(e,b)}function z0(e,t){return t=typeof t=="function"?t:i,nt(e,b,t)}function X0(e){return nt(e,c|b)}function Y0(e,t){return t=typeof t=="function"?t:i,nt(e,c|b,t)}function K0(e,t){return t==null||Ja(e,t,be(t))}function dt(e,t){return e===t||e!==e&&t!==t}var J0=Fi(oo),Z0=Fi(function(e,t){return e>=t}),mr=nl(function(){return arguments}())?nl:function(e){return he(e)&&ne.call(e,"callee")&&!Wa.call(e,"callee")},U=S.isArray,Q0=Ca?Ve(Ca):uv;function Ue(e){return e!=null&&Vi(e.length)&&!Ft(e)}function de(e){return he(e)&&Ue(e)}function e1(e){return e===!0||e===!1||he(e)&&De(e)==ln}var rr=dm||Vo,t1=Oa?Ve(Oa):av;function r1(e){return he(e)&&e.nodeType===1&&!Pn(e)}function n1(e){if(e==null)return!0;if(Ue(e)&&(U(e)||typeof e=="string"||typeof e.splice=="function"||rr(e)||Br(e)||mr(e)))return!e.length;var t=Pe(e);if(t==ct||t==ft)return!e.size;if(In(e))return!lo(e).length;for(var s in e)if(ne.call(e,s))return!1;return!0}function i1(e,t){return On(e,t)}function s1(e,t,s){s=typeof s=="function"?s:i;var l=s?s(e,t):i;return l===i?On(e,t,i,s):!!l}function $o(e){if(!he(e))return!1;var t=De(e);return t==ii||t==Id||typeof e.message=="string"&&typeof e.name=="string"&&!Pn(e)}function o1(e){return typeof e=="number"&&ka(e)}function Ft(e){if(!fe(e))return!1;var t=De(e);return t==si||t==Zu||t==Ad||t==Pd}function fc(e){return typeof e=="number"&&e==W(e)}function Vi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Vt}function fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function he(e){return e!=null&&typeof e=="object"}var hc=xa?Ve(xa):cv;function u1(e,t){return e===t||ao(e,t,xo(t))}function a1(e,t,s){return s=typeof s=="function"?s:i,ao(e,t,xo(t),s)}function l1(e){return pc(e)&&e!=+e}function c1(e){if(zv(e))throw new M(u);return il(e)}function f1(e){return e===null}function h1(e){return e==null}function pc(e){return typeof e=="number"||he(e)&&De(e)==fn}function Pn(e){if(!he(e)||De(e)!=Pt)return!1;var t=yi(e);if(t===null)return!0;var s=ne.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&gi.call(s)==am}var Fo=Aa?Ve(Aa):fv;function p1(e){return fc(e)&&e>=-Vt&&e<=Vt}var dc=Ia?Ve(Ia):hv;function zi(e){return typeof e=="string"||!U(e)&&he(e)&&De(e)==pn}function Xe(e){return typeof e=="symbol"||he(e)&&De(e)==oi}var Br=Ra?Ve(Ra):pv;function d1(e){return e===i}function g1(e){return he(e)&&Pe(e)==dn}function m1(e){return he(e)&&De(e)==Ld}var v1=Fi(co),_1=Fi(function(e,t){return e<=t});function gc(e){if(!e)return[];if(Ue(e))return zi(e)?ht(e):He(e);if(vn&&e[vn])return Kg(e[vn]());var t=Pe(e),s=t==ct?Js:t==ft?hi:kr;return s(e)}function jt(e){if(!e)return e===0?e:0;if(e=ot(e),e===ur||e===-ur){var t=e<0?-1:1;return t*Sd}return e===e?e:0}function W(e){var t=jt(e),s=t%1;return t===t?s?t-s:t:0}function mc(e){return e?hr(W(e),0,vt):0}function ot(e){if(typeof e=="number")return e;if(Xe(e))return ri;if(fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qa(e);var s=Qd.test(e);return s||tg.test(e)?Ng(e.slice(2),s?2:8):Zd.test(e)?ri:+e}function vc(e){return yt(e,Ge(e))}function y1(e){return e?hr(W(e),-Vt,Vt):e===0?e:0}function te(e){return e==null?"":ze(e)}var E1=Ur(function(e,t){if(In(t)||Ue(t)){yt(t,be(t),e);return}for(var s in t)ne.call(t,s)&&bn(e,s,t[s])}),_c=Ur(function(e,t){yt(t,Ge(t),e)}),Xi=Ur(function(e,t,s,l){yt(t,Ge(t),e,l)}),w1=Ur(function(e,t,s,l){yt(t,be(t),e,l)}),b1=qt(no);function S1(e,t){var s=Hr(e);return t==null?s:Ka(s,t)}var C1=V(function(e,t){e=ie(e);var s=-1,l=t.length,f=l>2?t[2]:i;for(f&&qe(t[0],t[1],f)&&(l=1);++s<l;)for(var d=t[s],m=Ge(d),y=-1,w=m.length;++y<w;){var O=m[y],x=e[O];(x===i||dt(x,Fr[O])&&!ne.call(e,O))&&(e[O]=d[O])}return e}),O1=V(function(e){return e.push(i,ql),ke(yc,i,e)});function x1(e,t){return Ta(e,$(t,3),_t)}function A1(e,t){return Ta(e,$(t,3),so)}function I1(e,t){return e==null?e:io(e,$(t,3),Ge)}function R1(e,t){return e==null?e:tl(e,$(t,3),Ge)}function P1(e,t){return e&&_t(e,$(t,3))}function T1(e,t){return e&&so(e,$(t,3))}function L1(e){return e==null?[]:Ri(e,be(e))}function N1(e){return e==null?[]:Ri(e,Ge(e))}function jo(e,t,s){var l=e==null?i:pr(e,t);return l===i?s:l}function D1(e,t){return e!=null&&jl(e,t,nv)}function Mo(e,t){return e!=null&&jl(e,t,iv)}var q1=Pl(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=mi.call(t)),e[t]=s},Uo(We)),$1=Pl(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=mi.call(t)),ne.call(e,t)?e[t].push(s):e[t]=[s]},$),F1=V(Cn);function be(e){return Ue(e)?Xa(e):lo(e)}function Ge(e){return Ue(e)?Xa(e,!0):dv(e)}function j1(e,t){var s={};return t=$(t,3),_t(e,function(l,f,d){Nt(s,t(l,f,d),l)}),s}function M1(e,t){var s={};return t=$(t,3),_t(e,function(l,f,d){Nt(s,f,t(l,f,d))}),s}var H1=Ur(function(e,t,s){Pi(e,t,s)}),yc=Ur(function(e,t,s,l){Pi(e,t,s,l)}),U1=qt(function(e,t){var s={};if(e==null)return s;var l=!1;t=ce(t,function(d){return d=er(d,e),l||(l=d.length>1),d}),yt(e,Co(e),s),l&&(s=nt(s,c|_|b,qv));for(var f=t.length;f--;)mo(s,t[f]);return s});function G1(e,t){return Ec(e,ki($(t)))}var W1=qt(function(e,t){return e==null?{}:mv(e,t)});function Ec(e,t){if(e==null)return{};var s=ce(Co(e),function(l){return[l]});return t=$(t),fl(e,s,function(l,f){return t(l,f[0])})}function B1(e,t,s){t=er(t,e);var l=-1,f=t.length;for(f||(f=1,e=i);++l<f;){var d=e==null?i:e[Et(t[l])];d===i&&(l=f,d=s),e=Ft(d)?d.call(e):d}return e}function k1(e,t,s){return e==null?e:xn(e,t,s)}function V1(e,t,s,l){return l=typeof l=="function"?l:i,e==null?e:xn(e,t,s,l)}var wc=Nl(be),bc=Nl(Ge);function z1(e,t,s){var l=U(e),f=l||rr(e)||Br(e);if(t=$(t,4),s==null){var d=e&&e.constructor;f?s=l?new d:[]:fe(e)?s=Ft(d)?Hr(yi(e)):{}:s={}}return(f?et:_t)(e,function(m,y,w){return t(s,m,y,w)}),s}function X1(e,t){return e==null?!0:mo(e,t)}function Y1(e,t,s){return e==null?e:ml(e,t,yo(s))}function K1(e,t,s,l){return l=typeof l=="function"?l:i,e==null?e:ml(e,t,yo(s),l)}function kr(e){return e==null?[]:Ks(e,be(e))}function J1(e){return e==null?[]:Ks(e,Ge(e))}function Z1(e,t,s){return s===i&&(s=t,t=i),s!==i&&(s=ot(s),s=s===s?s:0),t!==i&&(t=ot(t),t=t===t?t:0),hr(ot(e),t,s)}function Q1(e,t,s){return t=jt(t),s===i?(s=t,t=0):s=jt(s),e=ot(e),sv(e,t,s)}function ey(e,t,s){if(s&&typeof s!="boolean"&&qe(e,t,s)&&(t=s=i),s===i&&(typeof t=="boolean"?(s=t,t=i):typeof e=="boolean"&&(s=e,e=i)),e===i&&t===i?(e=0,t=1):(e=jt(e),t===i?(t=e,e=0):t=jt(t)),e>t){var l=e;e=t,t=l}if(s||e%1||t%1){var f=Va();return Re(e+f*(t-e+Lg("1e-"+((f+"").length-1))),t)}return ho(e,t)}var ty=Gr(function(e,t,s){return t=t.toLowerCase(),e+(s?Sc(t):t)});function Sc(e){return Ho(te(e).toLowerCase())}function Cc(e){return e=te(e),e&&e.replace(ng,kg).replace(bg,"")}function ry(e,t,s){e=te(e),t=ze(t);var l=e.length;s=s===i?l:hr(W(s),0,l);var f=s;return s-=t.length,s>=0&&e.slice(s,f)==t}function ny(e){return e=te(e),e&&Fd.test(e)?e.replace(ta,Vg):e}function iy(e){return e=te(e),e&&Wd.test(e)?e.replace(Ds,"\\$&"):e}var sy=Gr(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),oy=Gr(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),uy=Al("toLowerCase");function ay(e,t,s){e=te(e),t=W(t);var l=t?$r(e):0;if(!t||l>=t)return e;var f=(t-l)/2;return $i(Si(f),s)+e+$i(bi(f),s)}function ly(e,t,s){e=te(e),t=W(t);var l=t?$r(e):0;return t&&l<t?e+$i(t-l,s):e}function cy(e,t,s){e=te(e),t=W(t);var l=t?$r(e):0;return t&&l<t?$i(t-l,s)+e:e}function fy(e,t,s){return s||t==null?t=0:t&&(t=+t),_m(te(e).replace(qs,""),t||0)}function hy(e,t,s){return(s?qe(e,t,s):t===i)?t=1:t=W(t),po(te(e),t)}function py(){var e=arguments,t=te(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var dy=Gr(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});function gy(e,t,s){return s&&typeof s!="number"&&qe(e,t,s)&&(t=s=i),s=s===i?vt:s>>>0,s?(e=te(e),e&&(typeof t=="string"||t!=null&&!Fo(t))&&(t=ze(t),!t&&qr(e))?tr(ht(e),0,s):e.split(t,s)):[]}var my=Gr(function(e,t,s){return e+(s?" ":"")+Ho(t)});function vy(e,t,s){return e=te(e),s=s==null?0:hr(W(s),0,e.length),t=ze(t),e.slice(s,s+t.length)==t}function _y(e,t,s){var l=h.templateSettings;s&&qe(e,t,s)&&(t=i),e=te(e),t=Xi({},t,l,Dl);var f=Xi({},t.imports,l.imports,Dl),d=be(f),m=Ks(f,d),y,w,O=0,x=t.interpolate||ui,A="__p += '",T=Zs((t.escape||ui).source+"|"+x.source+"|"+(x===ra?Jd:ui).source+"|"+(t.evaluate||ui).source+"|$","g"),q="//# sourceURL="+(ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ag+"]")+`
18
- `;e.replace(T,function(j,z,J,Ye,$e,Ke){return J||(J=Ye),A+=e.slice(O,Ke).replace(ig,zg),z&&(y=!0,A+=`' +
17
+ `)}function Xm(e){return G(e)||yn(e)||!!(Ba&&e&&e[Ba])}function Mt(e,t){var s=typeof e;return t=t==null?zt:t,!!t&&(s=="number"||s!="symbol"&&ug.test(e))&&e>-1&&e%1==0&&e<t}function qe(e,t,s){if(!fe(s))return!1;var c=typeof t;return(c=="number"?Ue(s)&&Mt(t,s.length):c=="string"&&t in s)?gt(s[t],e):!1}function Io(e,t){if(G(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||Xe(e)?!0:Vd.test(e)||!kd.test(e)||t!=null&&e in ie(t)}function Km(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ro(e){var t=Gi(e),s=p[t];if(typeof s!="function"||!(t in X.prototype))return!1;if(e===s)return!0;var c=Oo(s);return!!c&&e===c[0]}function Jm(e){return!!Ha&&Ha in e}var Zm=_i?jt:Vo;function Pr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Mn;return e===s}function Hc(e){return e===e&&!fe(e)}function Uc(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==i||e in ie(s))}}function Qm(e){var t=Yi(e,function(c){return s.size===g&&s.clear(),c}),s=t.cache;return t}function e_(e,t){var s=e[1],c=t[1],f=s|c,d=f<(H|re|Ae),v=c==Ae&&s==Q||c==Ae&&s==K&&e[7].length<=t[8]||c==(Ae|K)&&t[7].length<=t[8]&&s==Q;if(!(d||v))return e;c&H&&(e[2]=t[2],f|=s&H?0:ae);var y=t[3];if(y){var w=e[3];e[3]=w?Sc(w,y,t[4]):y,e[4]=w?Kt(e[3],_):t[4]}return y=t[5],y&&(w=e[5],e[5]=w?Cc(w,y,t[6]):y,e[6]=w?Kt(e[5],_):t[6]),y=t[7],y&&(e[7]=y),c&Ae&&(e[8]=e[8]==null?t[8]:Ie(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function t_(e){var t=[];if(e!=null)for(var s in ie(e))t.push(s);return t}function n_(e){return Ei.call(e)}function Gc(e,t,s){return t=_e(t===i?e.length-1:t,0),function(){for(var c=arguments,f=-1,d=_e(c.length-t,0),v=S(d);++f<d;)v[f]=c[t+f];f=-1;for(var y=S(t+1);++f<t;)y[f]=c[f];return y[t]=s(v),Ve(e,this,y)}}function Wc(e,t){return t.length<2?e:vn(e,st(t,0,-1))}function r_(e,t){for(var s=e.length,c=Ie(t.length,s),f=He(e);c--;){var d=t[c];e[c]=Mt(d,s)?f[d]:i}return e}function Po(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Bc=Vc(pc),Tr=_v||function(e,t){return ye.setTimeout(e,t)},To=Vc(xm);function kc(e,t,s){var c=t+"";return To(e,Ym(c,i_(km(c),s)))}function Vc(e){var t=0,s=0;return function(){var c=bv(),f=Od-(c-s);if(s=c,f>0){if(++t>=Cd)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Bi(e,t){var s=-1,c=e.length,f=c-1;for(t=t===i?c:t;++s<t;){var d=ho(s,f),v=e[d];e[d]=e[s],e[s]=v}return e.length=t,e}var zc=Qm(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zd,function(s,c,f,d){t.push(f?d.replace(tg,"$1"):c||s)}),t});function bt(e){if(typeof e=="string"||Xe(e))return e;var t=e+"";return t=="0"&&1/e==-ln?"-0":t}function _n(e){if(e!=null){try{return yi.call(e)}catch{}try{return e+""}catch{}}return""}function i_(e,t){return tt(Td,function(s){var c="_."+s[0];t&s[1]&&!di(e,c)&&e.push(c)}),e.sort()}function Yc(e){if(e instanceof X)return e.clone();var t=new rt(e.__wrapped__,e.__chain__);return t.__actions__=He(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function s_(e,t,s){(s?qe(e,t,s):t===i)?t=1:t=_e(W(t),0);var c=e==null?0:e.length;if(!c||t<1)return[];for(var f=0,d=0,v=S(xi(c/t));f<c;)v[d++]=st(e,f,f+=t);return v}function o_(e){for(var t=-1,s=e==null?0:e.length,c=0,f=[];++t<s;){var d=e[t];d&&(f[c++]=d)}return f}function u_(){var e=arguments.length;if(!e)return[];for(var t=S(e-1),s=arguments[0],c=e;c--;)t[c-1]=arguments[c];return Xt(G(s)?He(s):[s],Ce(t,1))}var a_=V(function(e,t){return pe(e)?Or(e,Ce(t,1,pe,!0)):[]}),c_=V(function(e,t){var s=ot(t);return pe(s)&&(s=i),pe(e)?Or(e,Ce(t,1,pe,!0),$(s,2)):[]}),l_=V(function(e,t){var s=ot(t);return pe(s)&&(s=i),pe(e)?Or(e,Ce(t,1,pe,!0),i,s):[]});function f_(e,t,s){var c=e==null?0:e.length;return c?(t=s||t===i?1:W(t),st(e,t<0?0:t,c)):[]}function h_(e,t,s){var c=e==null?0:e.length;return c?(t=s||t===i?1:W(t),t=c-t,st(e,0,t<0?0:t)):[]}function p_(e,t){return e&&e.length?$i(e,$(t,3),!0,!0):[]}function d_(e,t){return e&&e.length?$i(e,$(t,3),!0):[]}function g_(e,t,s,c){var f=e==null?0:e.length;return f?(s&&typeof s!="number"&&qe(e,t,s)&&(s=0,c=f),um(e,t,s,c)):[]}function Xc(e,t,s){var c=e==null?0:e.length;if(!c)return-1;var f=s==null?0:W(s);return f<0&&(f=_e(c+f,0)),gi(e,$(t,3),f)}function Kc(e,t,s){var c=e==null?0:e.length;if(!c)return-1;var f=c-1;return s!==i&&(f=W(s),f=s<0?_e(c+f,0):Ie(f,c-1)),gi(e,$(t,3),f,!0)}function Jc(e){var t=e==null?0:e.length;return t?Ce(e,1):[]}function v_(e){var t=e==null?0:e.length;return t?Ce(e,ln):[]}function m_(e,t){var s=e==null?0:e.length;return s?(t=t===i?1:W(t),Ce(e,t)):[]}function __(e){for(var t=-1,s=e==null?0:e.length,c={};++t<s;){var f=e[t];c[f[0]]=f[1]}return c}function Zc(e){return e&&e.length?e[0]:i}function y_(e,t,s){var c=e==null?0:e.length;if(!c)return-1;var f=s==null?0:W(s);return f<0&&(f=_e(c+f,0)),qn(e,t,f)}function E_(e){var t=e==null?0:e.length;return t?st(e,0,-1):[]}var w_=V(function(e){var t=le(e,_o);return t.length&&t[0]===e[0]?uo(t):[]}),b_=V(function(e){var t=ot(e),s=le(e,_o);return t===ot(s)?t=i:s.pop(),s.length&&s[0]===e[0]?uo(s,$(t,2)):[]}),S_=V(function(e){var t=ot(e),s=le(e,_o);return t=typeof t=="function"?t:i,t&&s.pop(),s.length&&s[0]===e[0]?uo(s,i,t):[]});function C_(e,t){return e==null?"":Ev.call(e,t)}function ot(e){var t=e==null?0:e.length;return t?e[t-1]:i}function O_(e,t,s){var c=e==null?0:e.length;if(!c)return-1;var f=c;return s!==i&&(f=W(s),f=f<0?_e(c+f,0):Ie(f,c-1)),t===t?iv(e,t,f):gi(e,La,f,!0)}function x_(e,t){return e&&e.length?cc(e,W(t)):i}var A_=V(Qc);function Qc(e,t){return e&&e.length&&t&&t.length?fo(e,t):e}function I_(e,t,s){return e&&e.length&&t&&t.length?fo(e,t,$(s,2)):e}function R_(e,t,s){return e&&e.length&&t&&t.length?fo(e,t,i,s):e}var P_=Ft(function(e,t){var s=e==null?0:e.length,c=ro(e,t);return hc(e,le(t,function(f){return Mt(f,s)?+f:f}).sort(bc)),c});function T_(e,t){var s=[];if(!(e&&e.length))return s;var c=-1,f=[],d=e.length;for(t=$(t,3);++c<d;){var v=e[c];t(v,c,e)&&(s.push(v),f.push(c))}return hc(e,f),s}function Lo(e){return e==null?e:Cv.call(e)}function L_(e,t,s){var c=e==null?0:e.length;return c?(s&&typeof s!="number"&&qe(e,t,s)?(t=0,s=c):(t=t==null?0:W(t),s=s===i?c:W(s)),st(e,t,s)):[]}function N_(e,t){return qi(e,t)}function D_(e,t,s){return go(e,t,$(s,2))}function q_(e,t){var s=e==null?0:e.length;if(s){var c=qi(e,t);if(c<s&&gt(e[c],t))return c}return-1}function $_(e,t){return qi(e,t,!0)}function F_(e,t,s){return go(e,t,$(s,2),!0)}function M_(e,t){var s=e==null?0:e.length;if(s){var c=qi(e,t,!0)-1;if(gt(e[c],t))return c}return-1}function j_(e){return e&&e.length?dc(e):[]}function H_(e,t){return e&&e.length?dc(e,$(t,2)):[]}function U_(e){var t=e==null?0:e.length;return t?st(e,1,t):[]}function G_(e,t,s){return e&&e.length?(t=s||t===i?1:W(t),st(e,0,t<0?0:t)):[]}function W_(e,t,s){var c=e==null?0:e.length;return c?(t=s||t===i?1:W(t),t=c-t,st(e,t<0?0:t,c)):[]}function B_(e,t){return e&&e.length?$i(e,$(t,3),!1,!0):[]}function k_(e,t){return e&&e.length?$i(e,$(t,3)):[]}var V_=V(function(e){return en(Ce(e,1,pe,!0))}),z_=V(function(e){var t=ot(e);return pe(t)&&(t=i),en(Ce(e,1,pe,!0),$(t,2))}),Y_=V(function(e){var t=ot(e);return t=typeof t=="function"?t:i,en(Ce(e,1,pe,!0),i,t)});function X_(e){return e&&e.length?en(e):[]}function K_(e,t){return e&&e.length?en(e,$(t,2)):[]}function J_(e,t){return t=typeof t=="function"?t:i,e&&e.length?en(e,i,t):[]}function No(e){if(!(e&&e.length))return[];var t=0;return e=Yt(e,function(s){if(pe(s))return t=_e(s.length,t),!0}),Xs(t,function(s){return le(e,Vs(s))})}function el(e,t){if(!(e&&e.length))return[];var s=No(e);return t==null?s:le(s,function(c){return Ve(t,i,c)})}var Z_=V(function(e,t){return pe(e)?Or(e,t):[]}),Q_=V(function(e){return mo(Yt(e,pe))}),e0=V(function(e){var t=ot(e);return pe(t)&&(t=i),mo(Yt(e,pe),$(t,2))}),t0=V(function(e){var t=ot(e);return t=typeof t=="function"?t:i,mo(Yt(e,pe),i,t)}),n0=V(No);function r0(e,t){return _c(e||[],t||[],Cr)}function i0(e,t){return _c(e||[],t||[],Ir)}var s0=V(function(e){var t=e.length,s=t>1?e[t-1]:i;return s=typeof s=="function"?(e.pop(),s):i,el(e,s)});function tl(e){var t=p(e);return t.__chain__=!0,t}function o0(e,t){return t(e),e}function ki(e,t){return t(e)}var u0=Ft(function(e){var t=e.length,s=t?e[0]:0,c=this.__wrapped__,f=function(d){return ro(d,e)};return t>1||this.__actions__.length||!(c instanceof X)||!Mt(s)?this.thru(f):(c=c.slice(s,+s+(t?1:0)),c.__actions__.push({func:ki,args:[f],thisArg:i}),new rt(c,this.__chain__).thru(function(d){return t&&!d.length&&d.push(i),d}))});function a0(){return tl(this)}function c0(){return new rt(this.value(),this.__chain__)}function l0(){this.__values__===i&&(this.__values__=gl(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function f0(){return this}function h0(e){for(var t,s=this;s instanceof Pi;){var c=Yc(s);c.__index__=0,c.__values__=i,t?f.__wrapped__=c:t=c;var f=c;s=s.__wrapped__}return f.__wrapped__=e,t}function p0(){var e=this.__wrapped__;if(e instanceof X){var t=e;return this.__actions__.length&&(t=new X(this)),t=t.reverse(),t.__actions__.push({func:ki,args:[Lo],thisArg:i}),new rt(t,this.__chain__)}return this.thru(Lo)}function d0(){return mc(this.__wrapped__,this.__actions__)}var g0=Fi(function(e,t,s){ne.call(e,s)?++e[s]:qt(e,s,1)});function v0(e,t,s){var c=G(e)?Pa:om;return s&&qe(e,t,s)&&(t=i),c(e,$(t,3))}function m0(e,t){var s=G(e)?Yt:ec;return s(e,$(t,3))}var _0=Ic(Xc),y0=Ic(Kc);function E0(e,t){return Ce(Vi(e,t),1)}function w0(e,t){return Ce(Vi(e,t),ln)}function b0(e,t,s){return s=s===i?1:W(s),Ce(Vi(e,t),s)}function nl(e,t){var s=G(e)?tt:Qt;return s(e,$(t,3))}function rl(e,t){var s=G(e)?Ug:Qa;return s(e,$(t,3))}var S0=Fi(function(e,t,s){ne.call(e,s)?e[s].push(t):qt(e,s,[t])});function C0(e,t,s,c){e=Ue(e)?e:Vn(e),s=s&&!c?W(s):0;var f=e.length;return s<0&&(s=_e(f+s,0)),Ji(e)?s<=f&&e.indexOf(t,s)>-1:!!f&&qn(e,t,s)>-1}var O0=V(function(e,t,s){var c=-1,f=typeof t=="function",d=Ue(e)?S(e.length):[];return Qt(e,function(v){d[++c]=f?Ve(t,v,s):xr(v,t,s)}),d}),x0=Fi(function(e,t,s){qt(e,s,t)});function Vi(e,t){var s=G(e)?le:oc;return s(e,$(t,3))}function A0(e,t,s,c){return e==null?[]:(G(t)||(t=t==null?[]:[t]),s=c?i:s,G(s)||(s=s==null?[]:[s]),lc(e,t,s))}var I0=Fi(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function R0(e,t,s){var c=G(e)?Bs:Da,f=arguments.length<3;return c(e,$(t,4),s,f,Qt)}function P0(e,t,s){var c=G(e)?Gg:Da,f=arguments.length<3;return c(e,$(t,4),s,f,Qa)}function T0(e,t){var s=G(e)?Yt:ec;return s(e,Xi($(t,3)))}function L0(e){var t=G(e)?Xa:Cm;return t(e)}function N0(e,t,s){(s?qe(e,t,s):t===i)?t=1:t=W(t);var c=G(e)?tm:Om;return c(e,t)}function D0(e){var t=G(e)?nm:Am;return t(e)}function q0(e){if(e==null)return 0;if(Ue(e))return Ji(e)?Fn(e):e.length;var t=Re(e);return t==ft||t==ht?e.size:co(e).length}function $0(e,t,s){var c=G(e)?ks:Im;return s&&qe(e,t,s)&&(t=i),c(e,$(t,3))}var F0=V(function(e,t){if(e==null)return[];var s=t.length;return s>1&&qe(e,t[0],t[1])?t=[]:s>2&&qe(t[0],t[1],t[2])&&(t=[t[0]]),lc(e,Ce(t,1),[])}),zi=mv||function(){return ye.Date.now()};function M0(e,t){if(typeof t!="function")throw new nt(a);return e=W(e),function(){if(--e<1)return t.apply(this,arguments)}}function il(e,t,s){return t=s?i:t,t=e&&t==null?e.length:t,$t(e,Ae,i,i,i,i,t)}function sl(e,t){var s;if(typeof t!="function")throw new nt(a);return e=W(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=i),s}}var Do=V(function(e,t,s){var c=H;if(s.length){var f=Kt(s,Bn(Do));c|=se}return $t(e,c,t,s,f)}),ol=V(function(e,t,s){var c=H|re;if(s.length){var f=Kt(s,Bn(ol));c|=se}return $t(t,c,e,s,f)});function ul(e,t,s){t=s?i:t;var c=$t(e,Q,i,i,i,i,i,t);return c.placeholder=ul.placeholder,c}function al(e,t,s){t=s?i:t;var c=$t(e,Se,i,i,i,i,i,t);return c.placeholder=al.placeholder,c}function cl(e,t,s){var c,f,d,v,y,w,O=0,x=!1,A=!1,T=!0;if(typeof e!="function")throw new nt(a);t=ut(t)||0,fe(s)&&(x=!!s.leading,A="maxWait"in s,d=A?_e(ut(s.maxWait)||0,t):d,T="trailing"in s?!!s.trailing:T);function q(de){var vt=c,Ut=f;return c=f=i,O=de,v=e.apply(Ut,vt),v}function F(de){return O=de,y=Tr(z,t),x?q(de):v}function B(de){var vt=de-w,Ut=de-O,Il=t-vt;return A?Ie(Il,d-Ut):Il}function M(de){var vt=de-w,Ut=de-O;return w===i||vt>=t||vt<0||A&&Ut>=d}function z(){var de=zi();if(M(de))return J(de);y=Tr(z,B(de))}function J(de){return y=i,T&&c?q(de):(c=f=i,v)}function Ke(){y!==i&&yc(y),O=0,c=w=f=y=i}function $e(){return y===i?v:J(zi())}function Je(){var de=zi(),vt=M(de);if(c=arguments,f=this,w=de,vt){if(y===i)return F(w);if(A)return yc(y),y=Tr(z,t),q(w)}return y===i&&(y=Tr(z,t)),v}return Je.cancel=Ke,Je.flush=$e,Je}var j0=V(function(e,t){return Za(e,1,t)}),H0=V(function(e,t,s){return Za(e,ut(t)||0,s)});function U0(e){return $t(e,si)}function Yi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new nt(a);var s=function(){var c=arguments,f=t?t.apply(this,c):c[0],d=s.cache;if(d.has(f))return d.get(f);var v=e.apply(this,c);return s.cache=d.set(f,v)||d,v};return s.cache=new(Yi.Cache||Dt),s}Yi.Cache=Dt;function Xi(e){if(typeof e!="function")throw new nt(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function G0(e){return sl(2,e)}var W0=Rm(function(e,t){t=t.length==1&&G(t[0])?le(t[0],ze($())):le(Ce(t,1),ze($()));var s=t.length;return V(function(c){for(var f=-1,d=Ie(c.length,s);++f<d;)c[f]=t[f].call(this,c[f]);return Ve(e,this,c)})}),qo=V(function(e,t){var s=Kt(t,Bn(qo));return $t(e,se,i,t,s)}),ll=V(function(e,t){var s=Kt(t,Bn(ll));return $t(e,Ne,i,t,s)}),B0=Ft(function(e,t){return $t(e,K,i,i,i,t)});function k0(e,t){if(typeof e!="function")throw new nt(a);return t=t===i?t:W(t),V(e,t)}function V0(e,t){if(typeof e!="function")throw new nt(a);return t=t==null?0:_e(W(t),0),V(function(s){var c=s[t],f=nn(s,0,t);return c&&Xt(f,c),Ve(e,this,f)})}function z0(e,t,s){var c=!0,f=!0;if(typeof e!="function")throw new nt(a);return fe(s)&&(c="leading"in s?!!s.leading:c,f="trailing"in s?!!s.trailing:f),cl(e,t,{leading:c,maxWait:t,trailing:f})}function Y0(e){return il(e,1)}function X0(e,t){return qo(yo(t),e)}function K0(){if(!arguments.length)return[];var e=arguments[0];return G(e)?e:[e]}function J0(e){return it(e,b)}function Z0(e,t){return t=typeof t=="function"?t:i,it(e,b,t)}function Q0(e){return it(e,l|b)}function e1(e,t){return t=typeof t=="function"?t:i,it(e,l|b,t)}function t1(e,t){return t==null||Ja(e,t,Ee(t))}function gt(e,t){return e===t||e!==e&&t!==t}var n1=Ui(oo),r1=Ui(function(e,t){return e>=t}),yn=rc(function(){return arguments}())?rc:function(e){return he(e)&&ne.call(e,"callee")&&!Wa.call(e,"callee")},G=S.isArray,i1=Ca?ze(Ca):hm;function Ue(e){return e!=null&&Ki(e.length)&&!jt(e)}function pe(e){return he(e)&&Ue(e)}function s1(e){return e===!0||e===!1||he(e)&&De(e)==fr}var rn=yv||Vo,o1=Oa?ze(Oa):pm;function u1(e){return he(e)&&e.nodeType===1&&!Lr(e)}function a1(e){if(e==null)return!0;if(Ue(e)&&(G(e)||typeof e=="string"||typeof e.splice=="function"||rn(e)||kn(e)||yn(e)))return!e.length;var t=Re(e);if(t==ft||t==ht)return!e.size;if(Pr(e))return!co(e).length;for(var s in e)if(ne.call(e,s))return!1;return!0}function c1(e,t){return Ar(e,t)}function l1(e,t,s){s=typeof s=="function"?s:i;var c=s?s(e,t):i;return c===i?Ar(e,t,i,s):!!c}function $o(e){if(!he(e))return!1;var t=De(e);return t==ai||t==Nd||typeof e.message=="string"&&typeof e.name=="string"&&!Lr(e)}function f1(e){return typeof e=="number"&&ka(e)}function jt(e){if(!fe(e))return!1;var t=De(e);return t==ci||t==Zu||t==Ld||t==qd}function fl(e){return typeof e=="number"&&e==W(e)}function Ki(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zt}function fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function he(e){return e!=null&&typeof e=="object"}var hl=xa?ze(xa):gm;function h1(e,t){return e===t||ao(e,t,xo(t))}function p1(e,t,s){return s=typeof s=="function"?s:i,ao(e,t,xo(t),s)}function d1(e){return pl(e)&&e!=+e}function g1(e){if(Zm(e))throw new U(u);return ic(e)}function v1(e){return e===null}function m1(e){return e==null}function pl(e){return typeof e=="number"||he(e)&&De(e)==pr}function Lr(e){if(!he(e)||De(e)!=Lt)return!1;var t=Si(e);if(t===null)return!0;var s=ne.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&yi.call(s)==pv}var Fo=Aa?ze(Aa):vm;function _1(e){return fl(e)&&e>=-zt&&e<=zt}var dl=Ia?ze(Ia):mm;function Ji(e){return typeof e=="string"||!G(e)&&he(e)&&De(e)==gr}function Xe(e){return typeof e=="symbol"||he(e)&&De(e)==li}var kn=Ra?ze(Ra):_m;function y1(e){return e===i}function E1(e){return he(e)&&Re(e)==vr}function w1(e){return he(e)&&De(e)==Fd}var b1=Ui(lo),S1=Ui(function(e,t){return e<=t});function gl(e){if(!e)return[];if(Ue(e))return Ji(e)?pt(e):He(e);if(yr&&e[yr])return tv(e[yr]());var t=Re(e),s=t==ft?Js:t==ht?vi:Vn;return s(e)}function Ht(e){if(!e)return e===0?e:0;if(e=ut(e),e===ln||e===-ln){var t=e<0?-1:1;return t*Id}return e===e?e:0}function W(e){var t=Ht(e),s=t%1;return t===t?s?t-s:t:0}function vl(e){return e?gn(W(e),0,yt):0}function ut(e){if(typeof e=="number")return e;if(Xe(e))return oi;if(fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qa(e);var s=ig.test(e);return s||og.test(e)?Mg(e.slice(2),s?2:8):rg.test(e)?oi:+e}function ml(e){return wt(e,Ge(e))}function C1(e){return e?gn(W(e),-zt,zt):e===0?e:0}function te(e){return e==null?"":Ye(e)}var O1=Gn(function(e,t){if(Pr(t)||Ue(t)){wt(t,Ee(t),e);return}for(var s in t)ne.call(t,s)&&Cr(e,s,t[s])}),_l=Gn(function(e,t){wt(t,Ge(t),e)}),Zi=Gn(function(e,t,s,c){wt(t,Ge(t),e,c)}),x1=Gn(function(e,t,s,c){wt(t,Ee(t),e,c)}),A1=Ft(ro);function I1(e,t){var s=Un(e);return t==null?s:Ka(s,t)}var R1=V(function(e,t){e=ie(e);var s=-1,c=t.length,f=c>2?t[2]:i;for(f&&qe(t[0],t[1],f)&&(c=1);++s<c;)for(var d=t[s],v=Ge(d),y=-1,w=v.length;++y<w;){var O=v[y],x=e[O];(x===i||gt(x,Mn[O])&&!ne.call(e,O))&&(e[O]=d[O])}return e}),P1=V(function(e){return e.push(i,qc),Ve(yl,i,e)});function T1(e,t){return Ta(e,$(t,3),Et)}function L1(e,t){return Ta(e,$(t,3),so)}function N1(e,t){return e==null?e:io(e,$(t,3),Ge)}function D1(e,t){return e==null?e:tc(e,$(t,3),Ge)}function q1(e,t){return e&&Et(e,$(t,3))}function $1(e,t){return e&&so(e,$(t,3))}function F1(e){return e==null?[]:Ni(e,Ee(e))}function M1(e){return e==null?[]:Ni(e,Ge(e))}function Mo(e,t,s){var c=e==null?i:vn(e,t);return c===i?s:c}function j1(e,t){return e!=null&&Mc(e,t,am)}function jo(e,t){return e!=null&&Mc(e,t,cm)}var H1=Pc(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=Ei.call(t)),e[t]=s},Uo(We)),U1=Pc(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=Ei.call(t)),ne.call(e,t)?e[t].push(s):e[t]=[s]},$),G1=V(xr);function Ee(e){return Ue(e)?Ya(e):co(e)}function Ge(e){return Ue(e)?Ya(e,!0):ym(e)}function W1(e,t){var s={};return t=$(t,3),Et(e,function(c,f,d){qt(s,t(c,f,d),c)}),s}function B1(e,t){var s={};return t=$(t,3),Et(e,function(c,f,d){qt(s,f,t(c,f,d))}),s}var k1=Gn(function(e,t,s){Di(e,t,s)}),yl=Gn(function(e,t,s,c){Di(e,t,s,c)}),V1=Ft(function(e,t){var s={};if(e==null)return s;var c=!1;t=le(t,function(d){return d=tn(d,e),c||(c=d.length>1),d}),wt(e,Co(e),s),c&&(s=it(s,l|m|b,Hm));for(var f=t.length;f--;)vo(s,t[f]);return s});function z1(e,t){return El(e,Xi($(t)))}var Y1=Ft(function(e,t){return e==null?{}:wm(e,t)});function El(e,t){if(e==null)return{};var s=le(Co(e),function(c){return[c]});return t=$(t),fc(e,s,function(c,f){return t(c,f[0])})}function X1(e,t,s){t=tn(t,e);var c=-1,f=t.length;for(f||(f=1,e=i);++c<f;){var d=e==null?i:e[bt(t[c])];d===i&&(c=f,d=s),e=jt(d)?d.call(e):d}return e}function K1(e,t,s){return e==null?e:Ir(e,t,s)}function J1(e,t,s,c){return c=typeof c=="function"?c:i,e==null?e:Ir(e,t,s,c)}var wl=Nc(Ee),bl=Nc(Ge);function Z1(e,t,s){var c=G(e),f=c||rn(e)||kn(e);if(t=$(t,4),s==null){var d=e&&e.constructor;f?s=c?new d:[]:fe(e)?s=jt(d)?Un(Si(e)):{}:s={}}return(f?tt:Et)(e,function(v,y,w){return t(s,v,y,w)}),s}function Q1(e,t){return e==null?!0:vo(e,t)}function ey(e,t,s){return e==null?e:vc(e,t,yo(s))}function ty(e,t,s,c){return c=typeof c=="function"?c:i,e==null?e:vc(e,t,yo(s),c)}function Vn(e){return e==null?[]:Ks(e,Ee(e))}function ny(e){return e==null?[]:Ks(e,Ge(e))}function ry(e,t,s){return s===i&&(s=t,t=i),s!==i&&(s=ut(s),s=s===s?s:0),t!==i&&(t=ut(t),t=t===t?t:0),gn(ut(e),t,s)}function iy(e,t,s){return t=Ht(t),s===i?(s=t,t=0):s=Ht(s),e=ut(e),lm(e,t,s)}function sy(e,t,s){if(s&&typeof s!="boolean"&&qe(e,t,s)&&(t=s=i),s===i&&(typeof t=="boolean"?(s=t,t=i):typeof e=="boolean"&&(s=e,e=i)),e===i&&t===i?(e=0,t=1):(e=Ht(e),t===i?(t=e,e=0):t=Ht(t)),e>t){var c=e;e=t,t=c}if(s||e%1||t%1){var f=Va();return Ie(e+f*(t-e+Fg("1e-"+((f+"").length-1))),t)}return ho(e,t)}var oy=Wn(function(e,t,s){return t=t.toLowerCase(),e+(s?Sl(t):t)});function Sl(e){return Ho(te(e).toLowerCase())}function Cl(e){return e=te(e),e&&e.replace(ag,Kg).replace(Ag,"")}function uy(e,t,s){e=te(e),t=Ye(t);var c=e.length;s=s===i?c:gn(W(s),0,c);var f=s;return s-=t.length,s>=0&&e.slice(s,f)==t}function ay(e){return e=te(e),e&&Gd.test(e)?e.replace(ta,Jg):e}function cy(e){return e=te(e),e&&Yd.test(e)?e.replace(Ds,"\\$&"):e}var ly=Wn(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),fy=Wn(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),hy=Ac("toLowerCase");function py(e,t,s){e=te(e),t=W(t);var c=t?Fn(e):0;if(!t||c>=t)return e;var f=(t-c)/2;return Hi(Ai(f),s)+e+Hi(xi(f),s)}function dy(e,t,s){e=te(e),t=W(t);var c=t?Fn(e):0;return t&&c<t?e+Hi(t-c,s):e}function gy(e,t,s){e=te(e),t=W(t);var c=t?Fn(e):0;return t&&c<t?Hi(t-c,s)+e:e}function vy(e,t,s){return s||t==null?t=0:t&&(t=+t),Sv(te(e).replace(qs,""),t||0)}function my(e,t,s){return(s?qe(e,t,s):t===i)?t=1:t=W(t),po(te(e),t)}function _y(){var e=arguments,t=te(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var yy=Wn(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});function Ey(e,t,s){return s&&typeof s!="number"&&qe(e,t,s)&&(t=s=i),s=s===i?yt:s>>>0,s?(e=te(e),e&&(typeof t=="string"||t!=null&&!Fo(t))&&(t=Ye(t),!t&&$n(e))?nn(pt(e),0,s):e.split(t,s)):[]}var wy=Wn(function(e,t,s){return e+(s?" ":"")+Ho(t)});function by(e,t,s){return e=te(e),s=s==null?0:gn(W(s),0,e.length),t=Ye(t),e.slice(s,s+t.length)==t}function Sy(e,t,s){var c=p.templateSettings;s&&qe(e,t,s)&&(t=i),e=te(e),t=Zi({},t,c,Dc);var f=Zi({},t.imports,c.imports,Dc),d=Ee(f),v=Ks(f,d),y,w,O=0,x=t.interpolate||fi,A="__p += '",T=Zs((t.escape||fi).source+"|"+x.source+"|"+(x===na?ng:fi).source+"|"+(t.evaluate||fi).source+"|$","g"),q="//# sourceURL="+(ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lg+"]")+`
18
+ `;e.replace(T,function(M,z,J,Ke,$e,Je){return J||(J=Ke),A+=e.slice(O,Je).replace(cg,Zg),z&&(y=!0,A+=`' +
19
19
  __e(`+z+`) +
20
20
  '`),$e&&(w=!0,A+=`';
21
21
  `+$e+`;
22
22
  __p += '`),J&&(A+=`' +
23
23
  ((__t = (`+J+`)) == null ? '' : __t) +
24
- '`),O=Ke+j.length,j}),A+=`';
24
+ '`),O=Je+M.length,M}),A+=`';
25
25
  `;var F=ne.call(t,"variable")&&t.variable;if(!F)A=`with (obj) {
26
26
  `+A+`
27
27
  }
28
- `;else if(Yd.test(F))throw new M(o);A=(w?A.replace(Nd,""):A).replace(Dd,"$1").replace(qd,"$1;"),A="function("+(F||"obj")+`) {
28
+ `;else if(eg.test(F))throw new U(o);A=(w?A.replace(Md,""):A).replace(jd,"$1").replace(Hd,"$1;"),A="function("+(F||"obj")+`) {
29
29
  `+(F?"":`obj || (obj = {});
30
30
  `)+"var __t, __p = ''"+(y?", __e = _.escape":"")+(w?`, __j = Array.prototype.join;
31
31
  function print() { __p += __j.call(arguments, '') }
32
32
  `:`;
33
33
  `)+A+`return __p
34
- }`;var B=xc(function(){return Q(d,q+"return "+A).apply(i,m)});if(B.source=A,$o(B))throw B;return B}function yy(e){return te(e).toLowerCase()}function Ey(e){return te(e).toUpperCase()}function wy(e,t,s){if(e=te(e),e&&(s||t===i))return qa(e);if(!e||!(t=ze(t)))return e;var l=ht(e),f=ht(t),d=$a(l,f),m=Fa(l,f)+1;return tr(l,d,m).join("")}function by(e,t,s){if(e=te(e),e&&(s||t===i))return e.slice(0,Ma(e)+1);if(!e||!(t=ze(t)))return e;var l=ht(e),f=Fa(l,ht(t))+1;return tr(l,0,f).join("")}function Sy(e,t,s){if(e=te(e),e&&(s||t===i))return e.replace(qs,"");if(!e||!(t=ze(t)))return e;var l=ht(e),f=$a(l,ht(t));return tr(l,f).join("")}function Cy(e,t){var s=Rt,l=_d;if(fe(t)){var f="separator"in t?t.separator:f;s="length"in t?W(t.length):s,l="omission"in t?ze(t.omission):l}e=te(e);var d=e.length;if(qr(e)){var m=ht(e);d=m.length}if(s>=d)return e;var y=s-$r(l);if(y<1)return l;var w=m?tr(m,0,y).join(""):e.slice(0,y);if(f===i)return w+l;if(m&&(y+=w.length-y),Fo(f)){if(e.slice(y).search(f)){var O,x=w;for(f.global||(f=Zs(f.source,te(na.exec(f))+"g")),f.lastIndex=0;O=f.exec(x);)var A=O.index;w=w.slice(0,A===i?y:A)}}else if(e.indexOf(ze(f),y)!=y){var T=w.lastIndexOf(f);T>-1&&(w=w.slice(0,T))}return w+l}function Oy(e){return e=te(e),e&&$d.test(e)?e.replace(ea,em):e}var xy=Gr(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ho=Al("toUpperCase");function Oc(e,t,s){return e=te(e),t=s?i:t,t===i?Yg(e)?nm(e):Hg(e):e.match(t)||[]}var xc=V(function(e,t){try{return ke(e,i,t)}catch(s){return $o(s)?s:new M(s)}}),Ay=qt(function(e,t){return et(t,function(s){s=Et(s),Nt(e,s,Do(e[s],e))}),e});function Iy(e){var t=e==null?0:e.length,s=$();return e=t?ce(e,function(l){if(typeof l[1]!="function")throw new tt(a);return[s(l[0]),l[1]]}):[],V(function(l){for(var f=-1;++f<t;){var d=e[f];if(ke(d[0],this,l))return ke(d[1],this,l)}})}function Ry(e){return ev(nt(e,c))}function Uo(e){return function(){return e}}function Py(e,t){return e==null||e!==e?t:e}var Ty=Rl(),Ly=Rl(!0);function We(e){return e}function Go(e){return sl(typeof e=="function"?e:nt(e,c))}function Ny(e){return ul(nt(e,c))}function Dy(e,t){return al(e,nt(t,c))}var qy=V(function(e,t){return function(s){return Cn(s,e,t)}}),$y=V(function(e,t){return function(s){return Cn(e,s,t)}});function Wo(e,t,s){var l=be(t),f=Ri(t,l);s==null&&!(fe(t)&&(f.length||!l.length))&&(s=t,t=e,e=this,f=Ri(t,be(t)));var d=!(fe(s)&&"chain"in s)||!!s.chain,m=Ft(e);return et(f,function(y){var w=t[y];e[y]=w,m&&(e.prototype[y]=function(){var O=this.__chain__;if(d||O){var x=e(this.__wrapped__),A=x.__actions__=He(this.__actions__);return A.push({func:w,args:arguments,thisArg:e}),x.__chain__=O,x}return w.apply(e,Xt([this.value()],arguments))})}),e}function Fy(){return we._===this&&(we._=lm),this}function Bo(){}function jy(e){return e=W(e),V(function(t){return ll(t,e)})}var My=wo(ce),Hy=wo(Pa),Uy=wo(ks);function Ac(e){return Io(e)?Vs(Et(e)):vv(e)}function Gy(e){return function(t){return e==null?i:pr(e,t)}}var Wy=Tl(),By=Tl(!0);function ko(){return[]}function Vo(){return!1}function ky(){return{}}function Vy(){return""}function zy(){return!0}function Xy(e,t){if(e=W(e),e<1||e>Vt)return[];var s=vt,l=Re(e,vt);t=$(t),e-=vt;for(var f=Ys(l,t);++s<e;)t(s);return f}function Yy(e){return U(e)?ce(e,Et):Xe(e)?[e]:He(zl(te(e)))}function Ky(e){var t=++um;return te(e)+t}var Jy=qi(function(e,t){return e+t},0),Zy=bo("ceil"),Qy=qi(function(e,t){return e/t},1),eE=bo("floor");function tE(e){return e&&e.length?Ii(e,We,oo):i}function rE(e,t){return e&&e.length?Ii(e,$(t,2),oo):i}function nE(e){return Na(e,We)}function iE(e,t){return Na(e,$(t,2))}function sE(e){return e&&e.length?Ii(e,We,co):i}function oE(e,t){return e&&e.length?Ii(e,$(t,2),co):i}var uE=qi(function(e,t){return e*t},1),aE=bo("round"),lE=qi(function(e,t){return e-t},0);function cE(e){return e&&e.length?Xs(e,We):0}function fE(e,t){return e&&e.length?Xs(e,$(t,2)):0}return h.after=N0,h.ary=ic,h.assign=E1,h.assignIn=_c,h.assignInWith=Xi,h.assignWith=w1,h.at=b1,h.before=sc,h.bind=Do,h.bindAll=Ay,h.bindKey=oc,h.castArray=k0,h.chain=tc,h.chunk=e_,h.compact=t_,h.concat=r_,h.cond=Iy,h.conforms=Ry,h.constant=Uo,h.countBy=c0,h.create=S1,h.curry=uc,h.curryRight=ac,h.debounce=lc,h.defaults=C1,h.defaultsDeep=O1,h.defer=D0,h.delay=q0,h.difference=n_,h.differenceBy=i_,h.differenceWith=s_,h.drop=o_,h.dropRight=u_,h.dropRightWhile=a_,h.dropWhile=l_,h.fill=c_,h.filter=h0,h.flatMap=g0,h.flatMapDeep=m0,h.flatMapDepth=v0,h.flatten=Jl,h.flattenDeep=f_,h.flattenDepth=h_,h.flip=$0,h.flow=Ty,h.flowRight=Ly,h.fromPairs=p_,h.functions=L1,h.functionsIn=N1,h.groupBy=_0,h.initial=g_,h.intersection=m_,h.intersectionBy=v_,h.intersectionWith=__,h.invert=q1,h.invertBy=$1,h.invokeMap=E0,h.iteratee=Go,h.keyBy=w0,h.keys=be,h.keysIn=Ge,h.map=Gi,h.mapKeys=j1,h.mapValues=M1,h.matches=Ny,h.matchesProperty=Dy,h.memoize=Bi,h.merge=H1,h.mergeWith=yc,h.method=qy,h.methodOf=$y,h.mixin=Wo,h.negate=ki,h.nthArg=jy,h.omit=U1,h.omitBy=G1,h.once=F0,h.orderBy=b0,h.over=My,h.overArgs=j0,h.overEvery=Hy,h.overSome=Uy,h.partial=qo,h.partialRight=cc,h.partition=S0,h.pick=W1,h.pickBy=Ec,h.property=Ac,h.propertyOf=Gy,h.pull=b_,h.pullAll=Ql,h.pullAllBy=S_,h.pullAllWith=C_,h.pullAt=O_,h.range=Wy,h.rangeRight=By,h.rearg=M0,h.reject=x0,h.remove=x_,h.rest=H0,h.reverse=Lo,h.sampleSize=I0,h.set=k1,h.setWith=V1,h.shuffle=R0,h.slice=A_,h.sortBy=L0,h.sortedUniq=D_,h.sortedUniqBy=q_,h.split=gy,h.spread=U0,h.tail=$_,h.take=F_,h.takeRight=j_,h.takeRightWhile=M_,h.takeWhile=H_,h.tap=t0,h.throttle=G0,h.thru=Ui,h.toArray=gc,h.toPairs=wc,h.toPairsIn=bc,h.toPath=Yy,h.toPlainObject=vc,h.transform=z1,h.unary=W0,h.union=U_,h.unionBy=G_,h.unionWith=W_,h.uniq=B_,h.uniqBy=k_,h.uniqWith=V_,h.unset=X1,h.unzip=No,h.unzipWith=ec,h.update=Y1,h.updateWith=K1,h.values=kr,h.valuesIn=J1,h.without=z_,h.words=Oc,h.wrap=B0,h.xor=X_,h.xorBy=Y_,h.xorWith=K_,h.zip=J_,h.zipObject=Z_,h.zipObjectDeep=Q_,h.zipWith=e0,h.entries=wc,h.entriesIn=bc,h.extend=_c,h.extendWith=Xi,Wo(h,h),h.add=Jy,h.attempt=xc,h.camelCase=ty,h.capitalize=Sc,h.ceil=Zy,h.clamp=Z1,h.clone=V0,h.cloneDeep=X0,h.cloneDeepWith=Y0,h.cloneWith=z0,h.conformsTo=K0,h.deburr=Cc,h.defaultTo=Py,h.divide=Qy,h.endsWith=ry,h.eq=dt,h.escape=ny,h.escapeRegExp=iy,h.every=f0,h.find=p0,h.findIndex=Yl,h.findKey=x1,h.findLast=d0,h.findLastIndex=Kl,h.findLastKey=A1,h.floor=eE,h.forEach=rc,h.forEachRight=nc,h.forIn=I1,h.forInRight=R1,h.forOwn=P1,h.forOwnRight=T1,h.get=jo,h.gt=J0,h.gte=Z0,h.has=D1,h.hasIn=Mo,h.head=Zl,h.identity=We,h.includes=y0,h.indexOf=d_,h.inRange=Q1,h.invoke=F1,h.isArguments=mr,h.isArray=U,h.isArrayBuffer=Q0,h.isArrayLike=Ue,h.isArrayLikeObject=de,h.isBoolean=e1,h.isBuffer=rr,h.isDate=t1,h.isElement=r1,h.isEmpty=n1,h.isEqual=i1,h.isEqualWith=s1,h.isError=$o,h.isFinite=o1,h.isFunction=Ft,h.isInteger=fc,h.isLength=Vi,h.isMap=hc,h.isMatch=u1,h.isMatchWith=a1,h.isNaN=l1,h.isNative=c1,h.isNil=h1,h.isNull=f1,h.isNumber=pc,h.isObject=fe,h.isObjectLike=he,h.isPlainObject=Pn,h.isRegExp=Fo,h.isSafeInteger=p1,h.isSet=dc,h.isString=zi,h.isSymbol=Xe,h.isTypedArray=Br,h.isUndefined=d1,h.isWeakMap=g1,h.isWeakSet=m1,h.join=y_,h.kebabCase=sy,h.last=st,h.lastIndexOf=E_,h.lowerCase=oy,h.lowerFirst=uy,h.lt=v1,h.lte=_1,h.max=tE,h.maxBy=rE,h.mean=nE,h.meanBy=iE,h.min=sE,h.minBy=oE,h.stubArray=ko,h.stubFalse=Vo,h.stubObject=ky,h.stubString=Vy,h.stubTrue=zy,h.multiply=uE,h.nth=w_,h.noConflict=Fy,h.noop=Bo,h.now=Wi,h.pad=ay,h.padEnd=ly,h.padStart=cy,h.parseInt=fy,h.random=ey,h.reduce=C0,h.reduceRight=O0,h.repeat=hy,h.replace=py,h.result=B1,h.round=aE,h.runInContext=E,h.sample=A0,h.size=P0,h.snakeCase=dy,h.some=T0,h.sortedIndex=I_,h.sortedIndexBy=R_,h.sortedIndexOf=P_,h.sortedLastIndex=T_,h.sortedLastIndexBy=L_,h.sortedLastIndexOf=N_,h.startCase=my,h.startsWith=vy,h.subtract=lE,h.sum=cE,h.sumBy=fE,h.template=_y,h.times=Xy,h.toFinite=jt,h.toInteger=W,h.toLength=mc,h.toLower=yy,h.toNumber=ot,h.toSafeInteger=y1,h.toString=te,h.toUpper=Ey,h.trim=wy,h.trimEnd=by,h.trimStart=Sy,h.truncate=Cy,h.unescape=Oy,h.uniqueId=Ky,h.upperCase=xy,h.upperFirst=Ho,h.each=rc,h.eachRight=nc,h.first=Zl,Wo(h,function(){var e={};return _t(h,function(t,s){ne.call(h.prototype,s)||(e[s]=t)}),e}(),{chain:!1}),h.VERSION=r,et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){h[e].placeholder=h}),et(["drop","take"],function(e,t){Y.prototype[e]=function(s){s=s===i?1:Ee(W(s),0);var l=this.__filtered__&&!t?new Y(this):this.clone();return l.__filtered__?l.__takeCount__=Re(s,l.__takeCount__):l.__views__.push({size:Re(s,vt),type:e+(l.__dir__<0?"Right":"")}),l},Y.prototype[e+"Right"]=function(s){return this.reverse()[e](s).reverse()}}),et(["filter","map","takeWhile"],function(e,t){var s=t+1,l=s==Ju||s==bd;Y.prototype[e]=function(f){var d=this.clone();return d.__iteratees__.push({iteratee:$(f,3),type:s}),d.__filtered__=d.__filtered__||l,d}}),et(["head","last"],function(e,t){var s="take"+(t?"Right":"");Y.prototype[e]=function(){return this[s](1).value()[0]}}),et(["initial","tail"],function(e,t){var s="drop"+(t?"":"Right");Y.prototype[e]=function(){return this.__filtered__?new Y(this):this[s](1)}}),Y.prototype.compact=function(){return this.filter(We)},Y.prototype.find=function(e){return this.filter(e).head()},Y.prototype.findLast=function(e){return this.reverse().find(e)},Y.prototype.invokeMap=V(function(e,t){return typeof e=="function"?new Y(this):this.map(function(s){return Cn(s,e,t)})}),Y.prototype.reject=function(e){return this.filter(ki($(e)))},Y.prototype.slice=function(e,t){e=W(e);var s=this;return s.__filtered__&&(e>0||t<0)?new Y(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==i&&(t=W(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},Y.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Y.prototype.toArray=function(){return this.take(vt)},_t(Y.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),l=/^(?:head|last)$/.test(t),f=h[l?"take"+(t=="last"?"Right":""):t],d=l||/^find/.test(t);!f||(h.prototype[t]=function(){var m=this.__wrapped__,y=l?[1]:arguments,w=m instanceof Y,O=y[0],x=w||U(m),A=function(z){var J=f.apply(h,Xt([z],y));return l&&T?J[0]:J};x&&s&&typeof O=="function"&&O.length!=1&&(w=x=!1);var T=this.__chain__,q=!!this.__actions__.length,F=d&&!T,B=w&&!q;if(!d&&x){m=B?m:new Y(this);var j=e.apply(m,y);return j.__actions__.push({func:Ui,args:[A],thisArg:i}),new rt(j,T)}return F&&B?e.apply(this,y):(j=this.thru(A),F?l?j.value()[0]:j.value():j)})}),et(["pop","push","shift","sort","splice","unshift"],function(e){var t=pi[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",l=/^(?:pop|shift)$/.test(e);h.prototype[e]=function(){var f=arguments;if(l&&!this.__chain__){var d=this.value();return t.apply(U(d)?d:[],f)}return this[s](function(m){return t.apply(U(m)?m:[],f)})}}),_t(Y.prototype,function(e,t){var s=h[t];if(s){var l=s.name+"";ne.call(Mr,l)||(Mr[l]=[]),Mr[l].push({name:t,func:s})}}),Mr[Di(i,re).name]=[{name:"wrapper",func:i}],Y.prototype.clone=Om,Y.prototype.reverse=xm,Y.prototype.value=Am,h.prototype.at=r0,h.prototype.chain=n0,h.prototype.commit=i0,h.prototype.next=s0,h.prototype.plant=u0,h.prototype.reverse=a0,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=l0,h.prototype.first=h.prototype.head,vn&&(h.prototype[vn]=o0),h},Kt=im();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(we._=Kt,define(function(){return Kt})):ar?((ar.exports=Kt)._=Kt,Us._=Kt):we._=Kt}).call(Vr)});var Dn=R((bO,$c)=>{var dE="2.0.0",gE=256,mE=Number.MAX_SAFE_INTEGER||9007199254740991,vE=16;$c.exports={SEMVER_SPEC_VERSION:dE,MAX_LENGTH:gE,MAX_SAFE_INTEGER:mE,MAX_SAFE_COMPONENT_LENGTH:vE}});var qn=R((SO,Fc)=>{var _E=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};Fc.exports=_E});var yr=R((nr,jc)=>{var{MAX_SAFE_COMPONENT_LENGTH:Jo}=Dn(),yE=qn();nr=jc.exports={};var EE=nr.re=[],N=nr.src=[],D=nr.t={},wE=0,k=(i,r,n)=>{let u=wE++;yE(u,r),D[i]=u,N[u]=r,EE[u]=new RegExp(r,n?"g":void 0)};k("NUMERICIDENTIFIER","0|[1-9]\\d*");k("NUMERICIDENTIFIERLOOSE","[0-9]+");k("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");k("MAINVERSION",`(${N[D.NUMERICIDENTIFIER]})\\.(${N[D.NUMERICIDENTIFIER]})\\.(${N[D.NUMERICIDENTIFIER]})`);k("MAINVERSIONLOOSE",`(${N[D.NUMERICIDENTIFIERLOOSE]})\\.(${N[D.NUMERICIDENTIFIERLOOSE]})\\.(${N[D.NUMERICIDENTIFIERLOOSE]})`);k("PRERELEASEIDENTIFIER",`(?:${N[D.NUMERICIDENTIFIER]}|${N[D.NONNUMERICIDENTIFIER]})`);k("PRERELEASEIDENTIFIERLOOSE",`(?:${N[D.NUMERICIDENTIFIERLOOSE]}|${N[D.NONNUMERICIDENTIFIER]})`);k("PRERELEASE",`(?:-(${N[D.PRERELEASEIDENTIFIER]}(?:\\.${N[D.PRERELEASEIDENTIFIER]})*))`);k("PRERELEASELOOSE",`(?:-?(${N[D.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${N[D.PRERELEASEIDENTIFIERLOOSE]})*))`);k("BUILDIDENTIFIER","[0-9A-Za-z-]+");k("BUILD",`(?:\\+(${N[D.BUILDIDENTIFIER]}(?:\\.${N[D.BUILDIDENTIFIER]})*))`);k("FULLPLAIN",`v?${N[D.MAINVERSION]}${N[D.PRERELEASE]}?${N[D.BUILD]}?`);k("FULL",`^${N[D.FULLPLAIN]}$`);k("LOOSEPLAIN",`[v=\\s]*${N[D.MAINVERSIONLOOSE]}${N[D.PRERELEASELOOSE]}?${N[D.BUILD]}?`);k("LOOSE",`^${N[D.LOOSEPLAIN]}$`);k("GTLT","((?:<|>)?=?)");k("XRANGEIDENTIFIERLOOSE",`${N[D.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);k("XRANGEIDENTIFIER",`${N[D.NUMERICIDENTIFIER]}|x|X|\\*`);k("XRANGEPLAIN",`[v=\\s]*(${N[D.XRANGEIDENTIFIER]})(?:\\.(${N[D.XRANGEIDENTIFIER]})(?:\\.(${N[D.XRANGEIDENTIFIER]})(?:${N[D.PRERELEASE]})?${N[D.BUILD]}?)?)?`);k("XRANGEPLAINLOOSE",`[v=\\s]*(${N[D.XRANGEIDENTIFIERLOOSE]})(?:\\.(${N[D.XRANGEIDENTIFIERLOOSE]})(?:\\.(${N[D.XRANGEIDENTIFIERLOOSE]})(?:${N[D.PRERELEASELOOSE]})?${N[D.BUILD]}?)?)?`);k("XRANGE",`^${N[D.GTLT]}\\s*${N[D.XRANGEPLAIN]}$`);k("XRANGELOOSE",`^${N[D.GTLT]}\\s*${N[D.XRANGEPLAINLOOSE]}$`);k("COERCE",`(^|[^\\d])(\\d{1,${Jo}})(?:\\.(\\d{1,${Jo}}))?(?:\\.(\\d{1,${Jo}}))?(?:$|[^\\d])`);k("COERCERTL",N[D.COERCE],!0);k("LONETILDE","(?:~>?)");k("TILDETRIM",`(\\s*)${N[D.LONETILDE]}\\s+`,!0);nr.tildeTrimReplace="$1~";k("TILDE",`^${N[D.LONETILDE]}${N[D.XRANGEPLAIN]}$`);k("TILDELOOSE",`^${N[D.LONETILDE]}${N[D.XRANGEPLAINLOOSE]}$`);k("LONECARET","(?:\\^)");k("CARETTRIM",`(\\s*)${N[D.LONECARET]}\\s+`,!0);nr.caretTrimReplace="$1^";k("CARET",`^${N[D.LONECARET]}${N[D.XRANGEPLAIN]}$`);k("CARETLOOSE",`^${N[D.LONECARET]}${N[D.XRANGEPLAINLOOSE]}$`);k("COMPARATORLOOSE",`^${N[D.GTLT]}\\s*(${N[D.LOOSEPLAIN]})$|^$`);k("COMPARATOR",`^${N[D.GTLT]}\\s*(${N[D.FULLPLAIN]})$|^$`);k("COMPARATORTRIM",`(\\s*)${N[D.GTLT]}\\s*(${N[D.LOOSEPLAIN]}|${N[D.XRANGEPLAIN]})`,!0);nr.comparatorTrimReplace="$1$2$3";k("HYPHENRANGE",`^\\s*(${N[D.XRANGEPLAIN]})\\s+-\\s+(${N[D.XRANGEPLAIN]})\\s*$`);k("HYPHENRANGELOOSE",`^\\s*(${N[D.XRANGEPLAINLOOSE]})\\s+-\\s+(${N[D.XRANGEPLAINLOOSE]})\\s*$`);k("STAR","(<|>)?=?\\s*\\*");k("GTE0","^\\s*>=\\s*0.0.0\\s*$");k("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var $n=R((CO,Mc)=>{var bE=["includePrerelease","loose","rtl"],SE=i=>i?typeof i!="object"?{loose:!0}:bE.filter(r=>i[r]).reduce((r,n)=>(r[n]=!0,r),{}):{};Mc.exports=SE});var Ki=R((OO,Gc)=>{var Hc=/^[0-9]+$/,Uc=(i,r)=>{let n=Hc.test(i),u=Hc.test(r);return n&&u&&(i=+i,r=+r),i===r?0:n&&!u?-1:u&&!n?1:i<r?-1:1},CE=(i,r)=>Uc(r,i);Gc.exports={compareIdentifiers:Uc,rcompareIdentifiers:CE}});var Te=R((xO,Vc)=>{var Ji=qn(),{MAX_LENGTH:Wc,MAX_SAFE_INTEGER:Zi}=Dn(),{re:Bc,t:kc}=yr(),OE=$n(),{compareIdentifiers:Fn}=Ki(),ut=class{constructor(r,n){if(n=OE(n),r instanceof ut){if(r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid Version: ${r}`);if(r.length>Wc)throw new TypeError(`version is longer than ${Wc} characters`);Ji("SemVer",r,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let u=r.trim().match(n.loose?Bc[kc.LOOSE]:Bc[kc.FULL]);if(!u)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>Zi||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Zi||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Zi||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let o=+a;if(o>=0&&o<Zi)return o}return a}):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(r){if(Ji("SemVer.compare",this.version,this.options,r),!(r instanceof ut)){if(typeof r=="string"&&r===this.version)return 0;r=new ut(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof ut||(r=new ut(r,this.options)),Fn(this.major,r.major)||Fn(this.minor,r.minor)||Fn(this.patch,r.patch)}comparePre(r){if(r instanceof ut||(r=new ut(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let n=0;do{let u=this.prerelease[n],a=r.prerelease[n];if(Ji("prerelease compare",n,u,a),u===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(u===void 0)return-1;if(u===a)continue;return Fn(u,a)}while(++n)}compareBuild(r){r instanceof ut||(r=new ut(r,this.options));let n=0;do{let u=this.build[n],a=r.build[n];if(Ji("prerelease compare",n,u,a),u===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(u===void 0)return-1;if(u===a)continue;return Fn(u,a)}while(++n)}inc(r,n){switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n),this.inc("pre",n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n),this.inc("pre",n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);u===-1&&this.prerelease.push(0)}n&&(this.prerelease[0]===n?isNaN(this.prerelease[1])&&(this.prerelease=[n,0]):this.prerelease=[n,0]);break;default:throw new Error(`invalid increment argument: ${r}`)}return this.format(),this.raw=this.version,this}};Vc.exports=ut});var Er=R((AO,Kc)=>{var{MAX_LENGTH:xE}=Dn(),{re:zc,t:Xc}=yr(),Yc=Te(),AE=$n(),IE=(i,r)=>{if(r=AE(r),i instanceof Yc)return i;if(typeof i!="string"||i.length>xE||!(r.loose?zc[Xc.LOOSE]:zc[Xc.FULL]).test(i))return null;try{return new Yc(i,r)}catch{return null}};Kc.exports=IE});var Zc=R((IO,Jc)=>{var RE=Er(),PE=(i,r)=>{let n=RE(i,r);return n?n.version:null};Jc.exports=PE});var ef=R((RO,Qc)=>{var TE=Er(),LE=(i,r)=>{let n=TE(i.trim().replace(/^[=v]+/,""),r);return n?n.version:null};Qc.exports=LE});var rf=R((PO,tf)=>{var NE=Te(),DE=(i,r,n,u)=>{typeof n=="string"&&(u=n,n=void 0);try{return new NE(i,n).inc(r,u).version}catch{return null}};tf.exports=DE});var at=R((TO,sf)=>{var nf=Te(),qE=(i,r,n)=>new nf(i,n).compare(new nf(r,n));sf.exports=qE});var Qi=R((LO,of)=>{var $E=at(),FE=(i,r,n)=>$E(i,r,n)===0;of.exports=FE});var lf=R((NO,af)=>{var uf=Er(),jE=Qi(),ME=(i,r)=>{if(jE(i,r))return null;{let n=uf(i),u=uf(r),a=n.prerelease.length||u.prerelease.length,o=a?"pre":"",p=a?"prerelease":"";for(let g in n)if((g==="major"||g==="minor"||g==="patch")&&n[g]!==u[g])return o+g;return p}};af.exports=ME});var ff=R((DO,cf)=>{var HE=Te(),UE=(i,r)=>new HE(i,r).major;cf.exports=UE});var pf=R((qO,hf)=>{var GE=Te(),WE=(i,r)=>new GE(i,r).minor;hf.exports=WE});var gf=R(($O,df)=>{var BE=Te(),kE=(i,r)=>new BE(i,r).patch;df.exports=kE});var vf=R((FO,mf)=>{var VE=Er(),zE=(i,r)=>{let n=VE(i,r);return n&&n.prerelease.length?n.prerelease:null};mf.exports=zE});var yf=R((jO,_f)=>{var XE=at(),YE=(i,r,n)=>XE(r,i,n);_f.exports=YE});var wf=R((MO,Ef)=>{var KE=at(),JE=(i,r)=>KE(i,r,!0);Ef.exports=JE});var es=R((HO,Sf)=>{var bf=Te(),ZE=(i,r,n)=>{let u=new bf(i,n),a=new bf(r,n);return u.compare(a)||u.compareBuild(a)};Sf.exports=ZE});var Of=R((UO,Cf)=>{var QE=es(),ew=(i,r)=>i.sort((n,u)=>QE(n,u,r));Cf.exports=ew});var Af=R((GO,xf)=>{var tw=es(),rw=(i,r)=>i.sort((n,u)=>tw(u,n,r));xf.exports=rw});var jn=R((WO,If)=>{var nw=at(),iw=(i,r,n)=>nw(i,r,n)>0;If.exports=iw});var ts=R((BO,Rf)=>{var sw=at(),ow=(i,r,n)=>sw(i,r,n)<0;Rf.exports=ow});var Zo=R((kO,Pf)=>{var uw=at(),aw=(i,r,n)=>uw(i,r,n)!==0;Pf.exports=aw});var rs=R((VO,Tf)=>{var lw=at(),cw=(i,r,n)=>lw(i,r,n)>=0;Tf.exports=cw});var ns=R((zO,Lf)=>{var fw=at(),hw=(i,r,n)=>fw(i,r,n)<=0;Lf.exports=hw});var Qo=R((XO,Nf)=>{var pw=Qi(),dw=Zo(),gw=jn(),mw=rs(),vw=ts(),_w=ns(),yw=(i,r,n,u)=>{switch(r){case"===":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i===n;case"!==":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i!==n;case"":case"=":case"==":return pw(i,n,u);case"!=":return dw(i,n,u);case">":return gw(i,n,u);case">=":return mw(i,n,u);case"<":return vw(i,n,u);case"<=":return _w(i,n,u);default:throw new TypeError(`Invalid operator: ${r}`)}};Nf.exports=yw});var qf=R((YO,Df)=>{var Ew=Te(),ww=Er(),{re:is,t:ss}=yr(),bw=(i,r)=>{if(i instanceof Ew)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;r=r||{};let n=null;if(!r.rtl)n=i.match(is[ss.COERCE]);else{let u;for(;(u=is[ss.COERCERTL].exec(i))&&(!n||n.index+n[0].length!==i.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),is[ss.COERCERTL].lastIndex=u.index+u[1].length+u[2].length;is[ss.COERCERTL].lastIndex=-1}return n===null?null:ww(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,r)};Df.exports=bw});var Ff=R((KO,$f)=>{"use strict";$f.exports=function(i){i.prototype[Symbol.iterator]=function*(){for(let r=this.head;r;r=r.next)yield r.value}}});var Mf=R((JO,jf)=>{"use strict";jf.exports=Z;Z.Node=wr;Z.create=Z;function Z(i){var r=this;if(r instanceof Z||(r=new Z),r.tail=null,r.head=null,r.length=0,i&&typeof i.forEach=="function")i.forEach(function(a){r.push(a)});else if(arguments.length>0)for(var n=0,u=arguments.length;n<u;n++)r.push(arguments[n]);return r}Z.prototype.removeNode=function(i){if(i.list!==this)throw new Error("removing node which does not belong to this list");var r=i.next,n=i.prev;return r&&(r.prev=n),n&&(n.next=r),i===this.head&&(this.head=r),i===this.tail&&(this.tail=n),i.list.length--,i.next=null,i.prev=null,i.list=null,r};Z.prototype.unshiftNode=function(i){if(i!==this.head){i.list&&i.list.removeNode(i);var r=this.head;i.list=this,i.next=r,r&&(r.prev=i),this.head=i,this.tail||(this.tail=i),this.length++}};Z.prototype.pushNode=function(i){if(i!==this.tail){i.list&&i.list.removeNode(i);var r=this.tail;i.list=this,i.prev=r,r&&(r.next=i),this.tail=i,this.head||(this.head=i),this.length++}};Z.prototype.push=function(){for(var i=0,r=arguments.length;i<r;i++)Cw(this,arguments[i]);return this.length};Z.prototype.unshift=function(){for(var i=0,r=arguments.length;i<r;i++)Ow(this,arguments[i]);return this.length};Z.prototype.pop=function(){if(!!this.tail){var i=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,i}};Z.prototype.shift=function(){if(!!this.head){var i=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,i}};Z.prototype.forEach=function(i,r){r=r||this;for(var n=this.head,u=0;n!==null;u++)i.call(r,n.value,u,this),n=n.next};Z.prototype.forEachReverse=function(i,r){r=r||this;for(var n=this.tail,u=this.length-1;n!==null;u--)i.call(r,n.value,u,this),n=n.prev};Z.prototype.get=function(i){for(var r=0,n=this.head;n!==null&&r<i;r++)n=n.next;if(r===i&&n!==null)return n.value};Z.prototype.getReverse=function(i){for(var r=0,n=this.tail;n!==null&&r<i;r++)n=n.prev;if(r===i&&n!==null)return n.value};Z.prototype.map=function(i,r){r=r||this;for(var n=new Z,u=this.head;u!==null;)n.push(i.call(r,u.value,this)),u=u.next;return n};Z.prototype.mapReverse=function(i,r){r=r||this;for(var n=new Z,u=this.tail;u!==null;)n.push(i.call(r,u.value,this)),u=u.prev;return n};Z.prototype.reduce=function(i,r){var n,u=this.head;if(arguments.length>1)n=r;else if(this.head)u=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;u!==null;a++)n=i(n,u.value,a),u=u.next;return n};Z.prototype.reduceReverse=function(i,r){var n,u=this.tail;if(arguments.length>1)n=r;else if(this.tail)u=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;u!==null;a--)n=i(n,u.value,a),u=u.prev;return n};Z.prototype.toArray=function(){for(var i=new Array(this.length),r=0,n=this.head;n!==null;r++)i[r]=n.value,n=n.next;return i};Z.prototype.toArrayReverse=function(){for(var i=new Array(this.length),r=0,n=this.tail;n!==null;r++)i[r]=n.value,n=n.prev;return i};Z.prototype.slice=function(i,r){r=r||this.length,r<0&&(r+=this.length),i=i||0,i<0&&(i+=this.length);var n=new Z;if(r<i||r<0)return n;i<0&&(i=0),r>this.length&&(r=this.length);for(var u=0,a=this.head;a!==null&&u<i;u++)a=a.next;for(;a!==null&&u<r;u++,a=a.next)n.push(a.value);return n};Z.prototype.sliceReverse=function(i,r){r=r||this.length,r<0&&(r+=this.length),i=i||0,i<0&&(i+=this.length);var n=new Z;if(r<i||r<0)return n;i<0&&(i=0),r>this.length&&(r=this.length);for(var u=this.length,a=this.tail;a!==null&&u>r;u--)a=a.prev;for(;a!==null&&u>i;u--,a=a.prev)n.push(a.value);return n};Z.prototype.splice=function(i,r,...n){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var u=0,a=this.head;a!==null&&u<i;u++)a=a.next;for(var o=[],u=0;a&&u<r;u++)o.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var u=0;u<n.length;u++)a=Sw(this,a,n[u]);return o};Z.prototype.reverse=function(){for(var i=this.head,r=this.tail,n=i;n!==null;n=n.prev){var u=n.prev;n.prev=n.next,n.next=u}return this.head=r,this.tail=i,this};function Sw(i,r,n){var u=r===i.head?new wr(n,null,r,i):new wr(n,r,r.next,i);return u.next===null&&(i.tail=u),u.prev===null&&(i.head=u),i.length++,u}function Cw(i,r){i.tail=new wr(r,i.tail,null,i),i.head||(i.head=i.tail),i.length++}function Ow(i,r){i.head=new wr(r,null,i.head,i),i.tail||(i.tail=i.head),i.length++}function wr(i,r,n,u){if(!(this instanceof wr))return new wr(i,r,n,u);this.list=u,this.value=i,r?(r.next=this,this.prev=r):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{Ff()(Z)}catch{}});var Vf=R((ZO,kf)=>{"use strict";var xw=Mf(),br=Symbol("max"),Ht=Symbol("length"),Xr=Symbol("lengthCalculator"),Mn=Symbol("allowStale"),Sr=Symbol("maxAge"),Ut=Symbol("dispose"),Hf=Symbol("noDisposeOnSet"),Se=Symbol("lruList"),mt=Symbol("cache"),Uf=Symbol("updateAgeOnGet"),eu=()=>1,Gf=class{constructor(r){if(typeof r=="number"&&(r={max:r}),r||(r={}),r.max&&(typeof r.max!="number"||r.max<0))throw new TypeError("max must be a non-negative number");let n=this[br]=r.max||1/0,u=r.length||eu;if(this[Xr]=typeof u!="function"?eu:u,this[Mn]=r.stale||!1,r.maxAge&&typeof r.maxAge!="number")throw new TypeError("maxAge must be a number");this[Sr]=r.maxAge||0,this[Ut]=r.dispose,this[Hf]=r.noDisposeOnSet||!1,this[Uf]=r.updateAgeOnGet||!1,this.reset()}set max(r){if(typeof r!="number"||r<0)throw new TypeError("max must be a non-negative number");this[br]=r||1/0,Hn(this)}get max(){return this[br]}set allowStale(r){this[Mn]=!!r}get allowStale(){return this[Mn]}set maxAge(r){if(typeof r!="number")throw new TypeError("maxAge must be a non-negative number");this[Sr]=r,Hn(this)}get maxAge(){return this[Sr]}set lengthCalculator(r){typeof r!="function"&&(r=eu),r!==this[Xr]&&(this[Xr]=r,this[Ht]=0,this[Se].forEach(n=>{n.length=this[Xr](n.value,n.key),this[Ht]+=n.length})),Hn(this)}get lengthCalculator(){return this[Xr]}get length(){return this[Ht]}get itemCount(){return this[Se].length}rforEach(r,n){n=n||this;for(let u=this[Se].tail;u!==null;){let a=u.prev;Bf(this,r,u,n),u=a}}forEach(r,n){n=n||this;for(let u=this[Se].head;u!==null;){let a=u.next;Bf(this,r,u,n),u=a}}keys(){return this[Se].toArray().map(r=>r.key)}values(){return this[Se].toArray().map(r=>r.value)}reset(){this[Ut]&&this[Se]&&this[Se].length&&this[Se].forEach(r=>this[Ut](r.key,r.value)),this[mt]=new Map,this[Se]=new xw,this[Ht]=0}dump(){return this[Se].map(r=>os(this,r)?!1:{k:r.key,v:r.value,e:r.now+(r.maxAge||0)}).toArray().filter(r=>r)}dumpLru(){return this[Se]}set(r,n,u){if(u=u||this[Sr],u&&typeof u!="number")throw new TypeError("maxAge must be a number");let a=u?Date.now():0,o=this[Xr](n,r);if(this[mt].has(r)){if(o>this[br])return Yr(this,this[mt].get(r)),!1;let v=this[mt].get(r).value;return this[Ut]&&(this[Hf]||this[Ut](r,v.value)),v.now=a,v.maxAge=u,v.value=n,this[Ht]+=o-v.length,v.length=o,this.get(r),Hn(this),!0}let p=new Wf(r,n,o,a,u);return p.length>this[br]?(this[Ut]&&this[Ut](r,n),!1):(this[Ht]+=p.length,this[Se].unshift(p),this[mt].set(r,this[Se].head),Hn(this),!0)}has(r){if(!this[mt].has(r))return!1;let n=this[mt].get(r).value;return!os(this,n)}get(r){return tu(this,r,!0)}peek(r){return tu(this,r,!1)}pop(){let r=this[Se].tail;return r?(Yr(this,r),r.value):null}del(r){Yr(this,this[mt].get(r))}load(r){this.reset();let n=Date.now();for(let u=r.length-1;u>=0;u--){let a=r[u],o=a.e||0;if(o===0)this.set(a.k,a.v);else{let p=o-n;p>0&&this.set(a.k,a.v,p)}}}prune(){this[mt].forEach((r,n)=>tu(this,n,!1))}},tu=(i,r,n)=>{let u=i[mt].get(r);if(u){let a=u.value;if(os(i,a)){if(Yr(i,u),!i[Mn])return}else n&&(i[Uf]&&(u.value.now=Date.now()),i[Se].unshiftNode(u));return a.value}},os=(i,r)=>{if(!r||!r.maxAge&&!i[Sr])return!1;let n=Date.now()-r.now;return r.maxAge?n>r.maxAge:i[Sr]&&n>i[Sr]},Hn=i=>{if(i[Ht]>i[br])for(let r=i[Se].tail;i[Ht]>i[br]&&r!==null;){let n=r.prev;Yr(i,r),r=n}},Yr=(i,r)=>{if(r){let n=r.value;i[Ut]&&i[Ut](n.key,n.value),i[Ht]-=n.length,i[mt].delete(n.key),i[Se].removeNode(r)}},Wf=class{constructor(r,n,u,a,o){this.key=r,this.value=n,this.length=u,this.now=a,this.maxAge=o||0}},Bf=(i,r,n,u)=>{let a=n.value;os(i,a)&&(Yr(i,n),i[Mn]||(a=void 0)),a&&r.call(u,a.value,a.key,i)};kf.exports=Gf});var lt=R((QO,Kf)=>{var Kr=class{constructor(r,n){if(n=Iw(n),r instanceof Kr)return r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease?r:new Kr(r.raw,n);if(r instanceof ru)return this.raw=r.value,this.set=[[r]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=r,this.set=r.split(/\s*\|\|\s*/).map(u=>this.parseRange(u.trim())).filter(u=>u.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${r}`);if(this.set.length>1){let u=this.set[0];if(this.set=this.set.filter(a=>!Xf(a[0])),this.set.length===0)this.set=[u];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&Nw(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(r=>r.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(r){r=r.trim();let u=`parseRange:${Object.keys(this.options).join(",")}:${r}`,a=zf.get(u);if(a)return a;let o=this.options.loose,p=o?Le[xe.HYPHENRANGELOOSE]:Le[xe.HYPHENRANGE];r=r.replace(p,Ww(this.options.includePrerelease)),me("hyphen replace",r),r=r.replace(Le[xe.COMPARATORTRIM],Pw),me("comparator trim",r,Le[xe.COMPARATORTRIM]),r=r.replace(Le[xe.TILDETRIM],Tw),r=r.replace(Le[xe.CARETTRIM],Lw),r=r.split(/\s+/).join(" ");let g=o?Le[xe.COMPARATORLOOSE]:Le[xe.COMPARATOR],v=r.split(" ").map(I=>Dw(I,this.options)).join(" ").split(/\s+/).map(I=>Gw(I,this.options)).filter(this.options.loose?I=>!!I.match(g):()=>!0).map(I=>new ru(I,this.options)),c=v.length,_=new Map;for(let I of v){if(Xf(I))return[I];_.set(I.value,I)}_.size>1&&_.has("")&&_.delete("");let b=[..._.values()];return zf.set(u,b),b}intersects(r,n){if(!(r instanceof Kr))throw new TypeError("a Range is required");return this.set.some(u=>Yf(u,n)&&r.set.some(a=>Yf(a,n)&&u.every(o=>a.every(p=>o.intersects(p,n)))))}test(r){if(!r)return!1;if(typeof r=="string")try{r=new Rw(r,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Bw(this.set[n],r,this.options))return!0;return!1}};Kf.exports=Kr;var Aw=Vf(),zf=new Aw({max:1e3}),Iw=$n(),ru=Un(),me=qn(),Rw=Te(),{re:Le,t:xe,comparatorTrimReplace:Pw,tildeTrimReplace:Tw,caretTrimReplace:Lw}=yr(),Xf=i=>i.value==="<0.0.0-0",Nw=i=>i.value==="",Yf=(i,r)=>{let n=!0,u=i.slice(),a=u.pop();for(;n&&u.length;)n=u.every(o=>a.intersects(o,r)),a=u.pop();return n},Dw=(i,r)=>(me("comp",i,r),i=Fw(i,r),me("caret",i),i=qw(i,r),me("tildes",i),i=Mw(i,r),me("xrange",i),i=Uw(i,r),me("stars",i),i),Fe=i=>!i||i.toLowerCase()==="x"||i==="*",qw=(i,r)=>i.trim().split(/\s+/).map(n=>$w(n,r)).join(" "),$w=(i,r)=>{let n=r.loose?Le[xe.TILDELOOSE]:Le[xe.TILDE];return i.replace(n,(u,a,o,p,g)=>{me("tilde",i,u,a,o,p,g);let v;return Fe(a)?v="":Fe(o)?v=`>=${a}.0.0 <${+a+1}.0.0-0`:Fe(p)?v=`>=${a}.${o}.0 <${a}.${+o+1}.0-0`:g?(me("replaceTilde pr",g),v=`>=${a}.${o}.${p}-${g} <${a}.${+o+1}.0-0`):v=`>=${a}.${o}.${p} <${a}.${+o+1}.0-0`,me("tilde return",v),v})},Fw=(i,r)=>i.trim().split(/\s+/).map(n=>jw(n,r)).join(" "),jw=(i,r)=>{me("caret",i,r);let n=r.loose?Le[xe.CARETLOOSE]:Le[xe.CARET],u=r.includePrerelease?"-0":"";return i.replace(n,(a,o,p,g,v)=>{me("caret",i,a,o,p,g,v);let c;return Fe(o)?c="":Fe(p)?c=`>=${o}.0.0${u} <${+o+1}.0.0-0`:Fe(g)?o==="0"?c=`>=${o}.${p}.0${u} <${o}.${+p+1}.0-0`:c=`>=${o}.${p}.0${u} <${+o+1}.0.0-0`:v?(me("replaceCaret pr",v),o==="0"?p==="0"?c=`>=${o}.${p}.${g}-${v} <${o}.${p}.${+g+1}-0`:c=`>=${o}.${p}.${g}-${v} <${o}.${+p+1}.0-0`:c=`>=${o}.${p}.${g}-${v} <${+o+1}.0.0-0`):(me("no pr"),o==="0"?p==="0"?c=`>=${o}.${p}.${g}${u} <${o}.${p}.${+g+1}-0`:c=`>=${o}.${p}.${g}${u} <${o}.${+p+1}.0-0`:c=`>=${o}.${p}.${g} <${+o+1}.0.0-0`),me("caret return",c),c})},Mw=(i,r)=>(me("replaceXRanges",i,r),i.split(/\s+/).map(n=>Hw(n,r)).join(" ")),Hw=(i,r)=>{i=i.trim();let n=r.loose?Le[xe.XRANGELOOSE]:Le[xe.XRANGE];return i.replace(n,(u,a,o,p,g,v)=>{me("xRange",i,u,a,o,p,g,v);let c=Fe(o),_=c||Fe(p),b=_||Fe(g),I=b;return a==="="&&I&&(a=""),v=r.includePrerelease?"-0":"",c?a===">"||a==="<"?u="<0.0.0-0":u="*":a&&I?(_&&(p=0),g=0,a===">"?(a=">=",_?(o=+o+1,p=0,g=0):(p=+p+1,g=0)):a==="<="&&(a="<",_?o=+o+1:p=+p+1),a==="<"&&(v="-0"),u=`${a+o}.${p}.${g}${v}`):_?u=`>=${o}.0.0${v} <${+o+1}.0.0-0`:b&&(u=`>=${o}.${p}.0${v} <${o}.${+p+1}.0-0`),me("xRange return",u),u})},Uw=(i,r)=>(me("replaceStars",i,r),i.trim().replace(Le[xe.STAR],"")),Gw=(i,r)=>(me("replaceGTE0",i,r),i.trim().replace(Le[r.includePrerelease?xe.GTE0PRE:xe.GTE0],"")),Ww=i=>(r,n,u,a,o,p,g,v,c,_,b,I,P)=>(Fe(u)?n="":Fe(a)?n=`>=${u}.0.0${i?"-0":""}`:Fe(o)?n=`>=${u}.${a}.0${i?"-0":""}`:p?n=`>=${n}`:n=`>=${n}${i?"-0":""}`,Fe(c)?v="":Fe(_)?v=`<${+c+1}.0.0-0`:Fe(b)?v=`<${c}.${+_+1}.0-0`:I?v=`<=${c}.${_}.${b}-${I}`:i?v=`<${c}.${_}.${+b+1}-0`:v=`<=${v}`,`${n} ${v}`.trim()),Bw=(i,r,n)=>{for(let u=0;u<i.length;u++)if(!i[u].test(r))return!1;if(r.prerelease.length&&!n.includePrerelease){for(let u=0;u<i.length;u++)if(me(i[u].semver),i[u].semver!==ru.ANY&&i[u].semver.prerelease.length>0){let a=i[u].semver;if(a.major===r.major&&a.minor===r.minor&&a.patch===r.patch)return!0}return!1}return!0}});var Un=R((ex,th)=>{var Gn=Symbol("SemVer ANY"),Wn=class{static get ANY(){return Gn}constructor(r,n){if(n=kw(n),r instanceof Wn){if(r.loose===!!n.loose)return r;r=r.value}iu("comparator",r,n),this.options=n,this.loose=!!n.loose,this.parse(r),this.semver===Gn?this.value="":this.value=this.operator+this.semver.version,iu("comp",this)}parse(r){let n=this.options.loose?Jf[Zf.COMPARATORLOOSE]:Jf[Zf.COMPARATOR],u=r.match(n);if(!u)throw new TypeError(`Invalid comparator: ${r}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new Qf(u[2],this.options.loose):this.semver=Gn}toString(){return this.value}test(r){if(iu("Comparator.test",r,this.options.loose),this.semver===Gn||r===Gn)return!0;if(typeof r=="string")try{r=new Qf(r,this.options)}catch{return!1}return nu(r,this.operator,this.semver,this.options)}intersects(r,n){if(!(r instanceof Wn))throw new TypeError("a Comparator is required");if((!n||typeof n!="object")&&(n={loose:!!n,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new eh(r.value,n).test(this.value);if(r.operator==="")return r.value===""?!0:new eh(this.value,n).test(r.semver);let u=(this.operator===">="||this.operator===">")&&(r.operator===">="||r.operator===">"),a=(this.operator==="<="||this.operator==="<")&&(r.operator==="<="||r.operator==="<"),o=this.semver.version===r.semver.version,p=(this.operator===">="||this.operator==="<=")&&(r.operator===">="||r.operator==="<="),g=nu(this.semver,"<",r.semver,n)&&(this.operator===">="||this.operator===">")&&(r.operator==="<="||r.operator==="<"),v=nu(this.semver,">",r.semver,n)&&(this.operator==="<="||this.operator==="<")&&(r.operator===">="||r.operator===">");return u||a||o&&p||g||v}};th.exports=Wn;var kw=$n(),{re:Jf,t:Zf}=yr(),nu=Qo(),iu=qn(),Qf=Te(),eh=lt()});var Bn=R((tx,rh)=>{var Vw=lt(),zw=(i,r,n)=>{try{r=new Vw(r,n)}catch{return!1}return r.test(i)};rh.exports=zw});var ih=R((rx,nh)=>{var Xw=lt(),Yw=(i,r)=>new Xw(i,r).set.map(n=>n.map(u=>u.value).join(" ").trim().split(" "));nh.exports=Yw});var oh=R((nx,sh)=>{var Kw=Te(),Jw=lt(),Zw=(i,r,n)=>{let u=null,a=null,o=null;try{o=new Jw(r,n)}catch{return null}return i.forEach(p=>{o.test(p)&&(!u||a.compare(p)===-1)&&(u=p,a=new Kw(u,n))}),u};sh.exports=Zw});var ah=R((ix,uh)=>{var Qw=Te(),eb=lt(),tb=(i,r,n)=>{let u=null,a=null,o=null;try{o=new eb(r,n)}catch{return null}return i.forEach(p=>{o.test(p)&&(!u||a.compare(p)===1)&&(u=p,a=new Qw(u,n))}),u};uh.exports=tb});var fh=R((sx,ch)=>{var su=Te(),rb=lt(),lh=jn(),nb=(i,r)=>{i=new rb(i,r);let n=new su("0.0.0");if(i.test(n)||(n=new su("0.0.0-0"),i.test(n)))return n;n=null;for(let u=0;u<i.set.length;++u){let a=i.set[u],o=null;a.forEach(p=>{let g=new su(p.semver.version);switch(p.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!o||lh(g,o))&&(o=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),o&&(!n||lh(n,o))&&(n=o)}return n&&i.test(n)?n:null};ch.exports=nb});var ph=R((ox,hh)=>{var ib=lt(),sb=(i,r)=>{try{return new ib(i,r).range||"*"}catch{return null}};hh.exports=sb});var us=R((ux,vh)=>{var ob=Te(),dh=Un(),{ANY:ub}=dh,ab=lt(),lb=Bn(),gh=jn(),mh=ts(),cb=ns(),fb=rs(),hb=(i,r,n,u)=>{i=new ob(i,u),r=new ab(r,u);let a,o,p,g,v;switch(n){case">":a=gh,o=cb,p=mh,g=">",v=">=";break;case"<":a=mh,o=fb,p=gh,g="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(lb(i,r,u))return!1;for(let c=0;c<r.set.length;++c){let _=r.set[c],b=null,I=null;if(_.forEach(P=>{P.semver===ub&&(P=new dh(">=0.0.0")),b=b||P,I=I||P,a(P.semver,b.semver,u)?b=P:p(P.semver,I.semver,u)&&(I=P)}),b.operator===g||b.operator===v||(!I.operator||I.operator===g)&&o(i,I.semver))return!1;if(I.operator===v&&p(i,I.semver))return!1}return!0};vh.exports=hb});var yh=R((ax,_h)=>{var pb=us(),db=(i,r,n)=>pb(i,r,">",n);_h.exports=db});var wh=R((lx,Eh)=>{var gb=us(),mb=(i,r,n)=>gb(i,r,"<",n);Eh.exports=mb});var Ch=R((cx,Sh)=>{var bh=lt(),vb=(i,r,n)=>(i=new bh(i,n),r=new bh(r,n),i.intersects(r));Sh.exports=vb});var xh=R((fx,Oh)=>{var _b=Bn(),yb=at();Oh.exports=(i,r,n)=>{let u=[],a=null,o=null,p=i.sort((_,b)=>yb(_,b,n));for(let _ of p)_b(_,r,n)?(o=_,a||(a=_)):(o&&u.push([a,o]),o=null,a=null);a&&u.push([a,null]);let g=[];for(let[_,b]of u)_===b?g.push(_):!b&&_===p[0]?g.push("*"):b?_===p[0]?g.push(`<=${b}`):g.push(`${_} - ${b}`):g.push(`>=${_}`);let v=g.join(" || "),c=typeof r.raw=="string"?r.raw:String(r);return v.length<c.length?v:r}});var Th=R((hx,Ph)=>{var Ah=lt(),as=Un(),{ANY:ou}=as,kn=Bn(),uu=at(),Eb=(i,r,n={})=>{if(i===r)return!0;i=new Ah(i,n),r=new Ah(r,n);let u=!1;e:for(let a of i.set){for(let o of r.set){let p=wb(a,o,n);if(u=u||p!==null,p)continue e}if(u)return!1}return!0},wb=(i,r,n)=>{if(i===r)return!0;if(i.length===1&&i[0].semver===ou){if(r.length===1&&r[0].semver===ou)return!0;n.includePrerelease?i=[new as(">=0.0.0-0")]:i=[new as(">=0.0.0")]}if(r.length===1&&r[0].semver===ou){if(n.includePrerelease)return!0;r=[new as(">=0.0.0")]}let u=new Set,a,o;for(let P of i)P.operator===">"||P.operator===">="?a=Ih(a,P,n):P.operator==="<"||P.operator==="<="?o=Rh(o,P,n):u.add(P.semver);if(u.size>1)return null;let p;if(a&&o){if(p=uu(a.semver,o.semver,n),p>0)return null;if(p===0&&(a.operator!==">="||o.operator!=="<="))return null}for(let P of u){if(a&&!kn(P,String(a),n)||o&&!kn(P,String(o),n))return null;for(let H of r)if(!kn(P,String(H),n))return!1;return!0}let g,v,c,_,b=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1,I=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;b&&b.prerelease.length===1&&o.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(let P of r){if(_=_||P.operator===">"||P.operator===">=",c=c||P.operator==="<"||P.operator==="<=",a){if(I&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===I.major&&P.semver.minor===I.minor&&P.semver.patch===I.patch&&(I=!1),P.operator===">"||P.operator===">="){if(g=Ih(a,P,n),g===P&&g!==a)return!1}else if(a.operator===">="&&!kn(a.semver,String(P),n))return!1}if(o){if(b&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===b.major&&P.semver.minor===b.minor&&P.semver.patch===b.patch&&(b=!1),P.operator==="<"||P.operator==="<="){if(v=Rh(o,P,n),v===P&&v!==o)return!1}else if(o.operator==="<="&&!kn(o.semver,String(P),n))return!1}if(!P.operator&&(o||a)&&p!==0)return!1}return!(a&&c&&!o&&p!==0||o&&_&&!a&&p!==0||I||b)},Ih=(i,r,n)=>{if(!i)return r;let u=uu(i.semver,r.semver,n);return u>0?i:u<0||r.operator===">"&&i.operator===">="?r:i},Rh=(i,r,n)=>{if(!i)return r;let u=uu(i.semver,r.semver,n);return u<0?i:u>0||r.operator==="<"&&i.operator==="<="?r:i};Ph.exports=Eb});var Nh=R((px,Lh)=>{var au=yr();Lh.exports={re:au.re,src:au.src,tokens:au.t,SEMVER_SPEC_VERSION:Dn().SEMVER_SPEC_VERSION,SemVer:Te(),compareIdentifiers:Ki().compareIdentifiers,rcompareIdentifiers:Ki().rcompareIdentifiers,parse:Er(),valid:Zc(),clean:ef(),inc:rf(),diff:lf(),major:ff(),minor:pf(),patch:gf(),prerelease:vf(),compare:at(),rcompare:yf(),compareLoose:wf(),compareBuild:es(),sort:Of(),rsort:Af(),gt:jn(),lt:ts(),eq:Qi(),neq:Zo(),gte:rs(),lte:ns(),cmp:Qo(),coerce:qf(),Comparator:Un(),Range:lt(),satisfies:Bn(),toComparators:ih(),maxSatisfying:oh(),minSatisfying:ah(),minVersion:fh(),validRange:ph(),outside:us(),gtr:yh(),ltr:wh(),intersects:Ch(),simplifyRange:xh(),subset:Th()}});var Ae=R(Cr=>{"use strict";var Dh=Cr&&Cr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.getCoreVersion=void 0;var qh=Dh(require("path")),$h=Dh(require("fs")),bb=Nh(),Sb=require("@serverless-devs/core"),lu=qh.default.join(Sb.getRootHome(),"cache","core"),Fh=qh.default.join(lu,"package.json");function Cb(){if($h.default.existsSync(Fh)){var i=require("@serverless-devs/core/package.json").version,r=jh();return bb.gt(r,i)?require(lu):require("@serverless-devs/core")}return require("@serverless-devs/core")}function jh(){return $h.default.existsSync(lu)?require(Fh).version:void 0}Cr.getCoreVersion=jh;Cr.default=Cb()});var Mh=R((gx,Ob)=>{Ob.exports={name:"@serverless-devs/s",version:"2.0.95-beta.4",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"npx jest",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@types/jest":"^27.0.1","@types/lodash":"^4.14.168","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1","babel-eslint":"^10.1.0",boxen:"^5.0.0",commander:"^6.0.0",dotenv:"^10.0.0",esbuild:"^0.13.6",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"^8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.1.0","latest-version":"^5.1.0","lint-staged":"^10.0.8",lodash:"^4.17.20","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.0.1","ts-node":"^9.1.1","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},jest:{coverageDirectory:"coverage",testEnvironment:"node",coverageProvider:"v8",preset:"ts-jest",testMatch:["**/test/**/*test.[jt]s"],setupFilesAfterEnv:["./jest.setup.ts"]},dependencies:{"@serverless-devs/core":"latest"}}});var Gt=R(G=>{"use strict";var xb=G&&G.__createBinding||(Object.create?function(i,r,n,u){u===void 0&&(u=n),Object.defineProperty(i,u,{enumerable:!0,get:function(){return r[n]}})}:function(i,r,n,u){u===void 0&&(u=n),i[u]=r[n]}),Ab=G&&G.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),Ib=G&&G.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var n in i)n!=="default"&&Object.prototype.hasOwnProperty.call(i,n)&&xb(r,i,n);return Ab(r,i),r},Hh=G&&G.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},Uh=G&&G.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ls=G&&G.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(G,"__esModule",{value:!0});G.emoji=G.mark=G.replaceTemplate=G.getTemplatekey=G.replaceFun=G.getLang=G.printn=G.checkTemplateFile=G.checkAndReturnTemplateFile=G.yamlLoad=G.getFolderSize=G.getVersion=G.bgRed=G.red=void 0;var Ce=ls(require("path")),Je=ls(require("fs")),cu=ls(zr()),Rb=ls(require("os")),Pb=Or(),cs=Ib(Ae()),fu=cs.default.colors,Tb=cs.default.jsyaml,fs=Mh();G.red=fu.hex("#fd5750");G.bgRed=fu.hex("#000").bgHex("#fd5750");function Lb(){return(0,cs.getCoreVersion)()?fs.name+": "+fs.version+", @serverless-devs/core: "+(0,cs.getCoreVersion)()+", "+process.platform+"-"+process.arch+", node-"+process.version:fs.name+": "+fs.version+", "+process.platform+"-"+process.arch+", node-"+process.version}G.getVersion=Lb;function Nb(i){return Hh(this,void 0,void 0,function(){function r(a){return Hh(this,void 0,void 0,function(){var o,p;return Uh(this,function(g){switch(g.label){case 0:return o=Je.default.lstatSync(a),typeof o!="object"?[2]:(n.set(o.ino,o.size),o.isDirectory()?(p=Je.default.readdirSync(a),typeof p!="object"?[2]:[4,Promise.all(p.map(function(v){return r(Ce.default.join(a,v))}))]):[3,2]);case 1:g.sent(),g.label=2;case 2:return[2]}})})}var n,u;return Uh(this,function(a){switch(a.label){case 0:return n=new Map,[4,r(i)];case 1:return a.sent(),u=Array.from(n.values()).reduce(function(o,p){return o+p},0),[2,u]}})})}G.getFolderSize=Nb;function Gh(i){var r=Je.default.readFileSync(i,"utf8");try{return Tb.load(r)}catch{if(["-h","--help"].includes(process.argv[2]))return;var n=Ce.default.basename(i);new Pb.HumanError({errorMessage:n+" format is incorrect",tips:"Please check the configuration of "+n+", Serverless Devs' Yaml specification document can refer to\uFF1A"+fu.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/yaml.md")}),process.exit(1)}}G.yamlLoad=Gh;function Vn(i,r){r===void 0&&(r=!1);var n=Je.default.readFileSync(i,"utf8"),u=r?JSON.parse(n):Gh(i);if(!u)return!1;for(var a in u)if(u[a].Component&&u[a].Provider&&u[a].Properties)return!0;return u.hasOwnProperty("edition")}function Wh(){if(process.env.serverless_devs_temp_template)return process.env.serverless_devs_temp_template;var i=process.cwd(),r=process.argv.includes("-t")?"-t":process.argv.includes("--template")?"--template":null,n=r?process.argv.indexOf(r):-1;if(n!==-1){var u=n+1,a=process.argv[u];if(a&&(a.endsWith(".yaml")||a.endsWith(".yml")||a.endsWith(".json"))){var o=!!a.endsWith(".json");if(Je.default.existsSync(Ce.default.join(i,a))&&Vn(Ce.default.join(i,a),o)){process.argv.splice(n,2);var p=JSON.parse(process.env.serverless_devs_temp_argv);return p.splice(p.indexOf(r),2),process.env.serverless_devs_temp_argv=JSON.stringify(p),process.env.serverless_devs_temp_template=Ce.default.join(i,a),Ce.default.join(i,a)}else if(Je.default.existsSync(a)&&Vn(a,o)){process.argv.splice(n,2);var p=JSON.parse(process.env.serverless_devs_temp_argv);return p.splice(p.indexOf(r),2),process.env.serverless_devs_temp_argv=JSON.stringify(p),process.env.serverless_devs_temp_template=a,a}}}return Je.default.existsSync(Ce.default.join(i,"s.yaml"))&&Vn(Ce.default.join(i,"s.yaml"))?(process.env.serverless_devs_temp_template=Ce.default.join(i,"s.yaml"),Ce.default.join(i,"s.yaml")):Je.default.existsSync(Ce.default.join(i,"s.yml"))&&Vn(Ce.default.join(i,"s.yml"))?(process.env.serverless_devs_temp_template=Ce.default.join(i,"s.yml"),Ce.default.join(i,"s.yml")):Je.default.existsSync(Ce.default.join(i,"s.json"))&&Vn(Ce.default.join(i,"s.json"),!0)?(process.env.serverless_devs_temp_template=Ce.default.join(i,"s.json"),Ce.default.join(i,"s.json")):null}G.checkAndReturnTemplateFile=Wh;function Bh(i){return Je.default.existsSync(i)?i:null}G.checkTemplateFile=Bh;function kh(i,r){r===void 0&&(r=" ");for(var n="",u=0;u<i;u++)n=n+r;return n}G.printn=kh;function Vh(){return"en"}G.getLang=Vh;function hu(i,r){var n=/\{\{(.*?)\}\}/g,u=i.match(n);if(u)for(var a=0;a<u.length;a++){var o=u[a].replace(/{{|}}/g,""),p=cu.default.trim(o.split("|")[0]);r[p]&&(i=i.replace(u[a],r[p]))}return i}G.replaceFun=hu;function zh(i){var r=/\{\{(.*?)\}\}/g,n=i.match(r);return n?n.filter(function(u){return u}).map(function(u){var a=u.replace(/{{|}}/g,""),o=a.split("|");return{name:cu.default.trim(o[0]),desc:cu.default.trim(o[1])}}):[]}G.getTemplatekey=zh;function Xh(i,r){i.forEach(function(n){if(Je.default.existsSync(n)){var u=Je.default.readFileSync(n,"utf-8"),a=hu(u,r);Je.default.writeFileSync(n,a,"utf-8")}})}G.replaceTemplate=Xh;function Yh(i){if(!i)return i;var r=i.slice(-4);return"***********"+r}G.mark=Yh;function Db(i){return Rb.default.platform()==="win32"?"":i}G.emoji=Db;G.default={checkAndReturnTemplateFile:Wh,checkTemplateFile:Bh,printn:kh,mark:Yh,getLang:Vh,replaceTemplate:Xh,replaceFun:hu,getTemplatekey:zh}});var ps=R(Wt=>{"use strict";var Kh=Wt&&Wt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.getHistoryFile=Wt.getHomeDir=void 0;var qb=Kh(require("path")),Jh=Kh(Ae()),hs=Jh.default.fse,$b=Jh.default.getRootHome;function pu(){var i=$b();return hs.existsSync(i)||hs.mkdirSync(i),i}Wt.getHomeDir=pu;function Zh(){var i=qb.default.join(pu(),"history");return hs.existsSync(i)||hs.createFileSync(i),i}Wt.getHistoryFile=Zh;Wt.default={getHomeDir:pu,getHistoryFile:Zh}});var mu=R(je=>{"use strict";var Fb=je&&je.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},jb=je&&je.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},du=je&&je.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(je,"__esModule",{value:!0});je.handlerProfileFile=je.getConfig=je.setConfig=void 0;var Qh=du(require("path")),Mb=du(ps()),gu=du(Ae()),wt=gu.default.fse,ds=gu.default.jsyaml,ep=gu.default.getRootHome;function Hb(i){var r=rp();wt.writeFileSync(r,ds.dump(i))}function tp(){var i=rp();if(!wt.existsSync(i))return{};try{var r=ds.load(wt.readFileSync(i,"utf8"))||{};return r}catch(n){throw n}}function rp(){var i=Qh.default.join(Mb.default.getHomeDir(),"set-config.yml");return wt.existsSync(i)||wt.createFileSync(i),i}function np(i,r){var n=tp();n[i]=r,Hb(n)}je.setConfig=np;function ip(i,r){var n=tp();return n[i]||r}je.getConfig=ip;function sp(i){return Fb(this,void 0,void 0,function(){var r,n,u,a,o,p,g;return jb(this,function(v){switch(v.label){case 0:if(r=i.filePath||"set-config.yml",n=Qh.default.join(ep(),r),u=wt.existsSync(n),a={},u)return[3,5];o=ep(),v.label=1;case 1:return v.trys.push([1,2,,4]),wt.statSync(o),[3,4];case 2:return p=v.sent(),[4,wt.mkdirSync(o)];case 3:return v.sent(),[3,4];case 4:return[3,6];case 5:try{a=ds.load(wt.readFileSync(n,"utf8"))||{}}catch(c){throw c}v.label=6;case 6:return i.read?[2,a]:(g=i.configKey||"",a[g]=i.data,[4,wt.writeFileSync(n,ds.dump(a))]);case 7:return v.sent(),[2,a]}})})}je.handlerProfileFile=sp;je.default={setConfig:np,getConfig:ip,handlerProfileFile:sp}});var xr=R(Jr=>{"use strict";var Ub=Jr&&Jr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.ServerlessError=void 0;var Gb=Ub(Ae()),Wb=Gb.default.Logger,Bb=new Wb("S-CLI-ERROR"),kb=function(){function i(r,n,u){Bb.error(r+": "+n,u),process.exit(1)}return i}();Jr.ServerlessError=kb});var op=R(Zr=>{"use strict";var Vb=Zr&&Zr.__extends||function(){var i=function(r,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");i(r,n);function u(){this.constructor=r}r.prototype=n===null?Object.create(n):(u.prototype=n.prototype,new u)}}();Object.defineProperty(Zr,"__esModule",{value:!0});Zr.CommandError=void 0;var zb=xr(),Xb=function(i){Vb(r,i);function r(n,u){return i.call(this,"Error",n,u)||this}return r}(zb.ServerlessError);Zr.CommandError=Xb});var up=R(Qr=>{"use strict";var Yb=Qr&&Qr.__extends||function(){var i=function(r,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");i(r,n);function u(){this.constructor=r}r.prototype=n===null?Object.create(n):(u.prototype=n.prototype,new u)}}();Object.defineProperty(Qr,"__esModule",{value:!0});Qr.ConfigDeleteError=void 0;var Kb=xr(),Jb=function(i){Yb(r,i);function r(n,u){return i.call(this,"Deletion failed",n,u)||this}return r}(Kb.ServerlessError);Qr.ConfigDeleteError=Jb});var ap=R(en=>{"use strict";var Zb=en&&en.__extends||function(){var i=function(r,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");i(r,n);function u(){this.constructor=r}r.prototype=n===null?Object.create(n):(u.prototype=n.prototype,new u)}}();Object.defineProperty(en,"__esModule",{value:!0});en.ConfigError=void 0;var Qb=xr(),eS=function(i){Zb(r,i);function r(n,u){return i.call(this,"Config failed",n,u)||this}return r}(Qb.ServerlessError);en.ConfigError=eS});var lp=R(tn=>{"use strict";var tS=tn&&tn.__extends||function(){var i=function(r,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");i(r,n);function u(){this.constructor=r}r.prototype=n===null?Object.create(n):(u.prototype=n.prototype,new u)}}();Object.defineProperty(tn,"__esModule",{value:!0});tn.ConfigGetError=void 0;var rS=xr(),nS=function(i){tS(r,i);function r(n,u){return i.call(this,"Get failed",n,u)||this}return r}(rS.ServerlessError);tn.ConfigGetError=nS});var cp=R(rn=>{"use strict";var iS=rn&&rn.__extends||function(){var i=function(r,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");i(r,n);function u(){this.constructor=r}r.prototype=n===null?Object.create(n):(u.prototype=n.prototype,new u)}}();Object.defineProperty(rn,"__esModule",{value:!0});rn.InitError=void 0;var sS=xr(),oS=function(i){iS(r,i);function r(n,u){return i.call(this,"Initialization failed",n,u)||this}return r}(sS.ServerlessError);rn.InitError=oS});var hp=R(bt=>{"use strict";var uS=bt&&bt.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},aS=bt&&bt.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},lS=bt&&bt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(bt,"__esModule",{value:!0});bt.HumanError=void 0;var fp=lS(Ae()),cS=Gt(),fS=fp.default.colors,hS=function(){function i(r){var n=r.errorMessage,u=r.tips;this.errorMessage=n,console.log(`
35
- `+(0,cS.bgRed)("ERROR:")),console.log("TypeError: "+n+`
36
- `),console.log(fS.gray(u)+`
37
- `)}return i.prototype.report=function(r){return uS(this,void 0,void 0,function(){var n;return aS(this,function(u){switch(u.label){case 0:return n=r.error,[4,fp.default.report({type:"jsError",content:this.errorMessage+"||"+n.stack})];case 1:return u.sent(),[2]}})})},i}();bt.HumanError=hS});var dp=R(nn=>{"use strict";var pS=nn&&nn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(nn,"__esModule",{value:!0});nn.HumanWarning=void 0;var dS=pS(Ae()),pp=dS.default.colors,gS=function(){function i(r){var n=r.warningMessage,u=r.tips;console.log(`
38
- `+pp.hex("#000").bgYellow("WARNING:")),console.log(n+`
39
- `),u&&console.log(pp.gray(u)+`
40
- `)}return i}();nn.HumanWarning=gS});var Or=R(oe=>{"use strict";var mS=oe&&oe.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},vS=oe&&oe.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},_S=oe&&oe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(oe,"__esModule",{value:!0});oe.HandleError=oe.HumanWarning=oe.HumanError=oe.ServerlessError=oe.InitError=oe.ConfigGetError=oe.ConfigError=oe.ConfigDeleteError=oe.CommandError=void 0;var vu=Gt(),yS=mu(),_u=_S(Ae()),Ar=_u.default.colors,ES=_u.default.report,wS=_u.default.getMAC,bS=op();Object.defineProperty(oe,"CommandError",{enumerable:!0,get:function(){return bS.CommandError}});var SS=up();Object.defineProperty(oe,"ConfigDeleteError",{enumerable:!0,get:function(){return SS.ConfigDeleteError}});var CS=ap();Object.defineProperty(oe,"ConfigError",{enumerable:!0,get:function(){return CS.ConfigError}});var OS=lp();Object.defineProperty(oe,"ConfigGetError",{enumerable:!0,get:function(){return OS.ConfigGetError}});var xS=cp();Object.defineProperty(oe,"InitError",{enumerable:!0,get:function(){return xS.InitError}});var AS=xr();Object.defineProperty(oe,"ServerlessError",{enumerable:!0,get:function(){return AS.ServerlessError}});var IS=hp();Object.defineProperty(oe,"HumanError",{enumerable:!0,get:function(){return IS.HumanError}});var RS=dp();Object.defineProperty(oe,"HumanWarning",{enumerable:!0,get:function(){return RS.HumanWarning}});function PS(){try{return wS().replace(/:/g,"")}catch{return"unknown"}}function yu(i,r){return""+Ar.gray(i)+Ar.gray.underline(r)}var TS=function(){function i(r){var n=r.error,u=r.prefix,a=u===void 0?"Message:":u;this.traceId=""+PS()+Date.now(),console.log((0,vu.red)("\u2716 "+a+`
41
- `));var o=(0,yS.getConfig)("analysis");o!=="disable"&&console.log(Ar.gray("TraceId: "+this.traceId)),console.log(Ar.gray("Environment: "+(0,vu.getVersion)())),console.log(yu("Documents: ","https://www.serverless-devs.com")),console.log(yu("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),console.log(yu("Issues: ",`https://github.com/Serverless-Devs/Serverless-Devs/issues
42
- `)),console.log((0,vu.bgRed)("ERROR:")+`
43
- `+n+`
44
- `),o!=="disable"&&console.log(Ar.gray("Please copy traceId: "+this.traceId+" and join Dingding group: 33947367 for consultation.")),console.log(Ar.gray("You can run 's clean --cache' to prune Serverless devs.")),console.log(Ar.gray(`And run again with the '--debug' option or 's -h' to get more logs.
45
- `))}return i.prototype.report=function(r){return mS(this,void 0,void 0,function(){return vS(this,function(n){return ES({type:"jsError",content:r.message+"||"+r.stack,traceId:this.traceId}),[2]})})},i}();oe.HandleError=TS});var yp=R(Ze=>{"use strict";var LS=Ze&&Ze.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.extractTemplateInfo=Ze.isUrlFormat=Ze.getProjectNameFromUrl=Ze.parse=void 0;var NS=LS(require("url"));function gp(i){return NS.default.parse(i)}Ze.parse=gp;function mp(i){var r=i.lastIndexOf("/");return r&&r>=0&&(i=i.substr(r+1)),i.endsWith(".git")?i.substr(0,i.length-4):i}Ze.getProjectNameFromUrl=mp;function vp(i){return i.includes(":")||i.includes("/")}Ze.isUrlFormat=vp;function _p(i){var r=i.pathname||"",n=r.split("/"),u=n[1],a=n[3];return{host:i.host,ownerName:u,repoName:a,branch:"",hasSubPath:!1,subPath:"",zipFile:""}}Ze.extractTemplateInfo=_p;Ze.default={extractTemplateInfo:_p,getProjectNameFromUrl:mp,isUrlFormat:vp,parse:gp}});var gs=R(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.getServiceList=Me.getServiceActions=Me.getServiceInputs=Me.getServiceConfigDetail=Me.getServiceConfig=Me.getSubcommand=void 0;function Ep(i){var r=i.edition||"0.0.1";if(r==="0.0.1")return Object.keys(i).filter(function(u){return u!=="Global"});var n=i.services||{};return Object.keys(n)}Me.getSubcommand=Ep;function wp(i,r){var n=i.edition||"0.0.1";if(n==="0.0.1")return i[r];var u=i.services||{},a=u[r],o=a.provider?a.provider:i.provider,p=a.access?a.access:i.access,g=Object.assign({},a,{access:p,provider:o});return g}Me.getServiceConfig=wp;function bp(i){var r=i.Component||i.component,n=i.Provider||i.provider,u=i.Access||i.access||"default",a=i.autoCredential;return{name:r,provider:n,access:u,autoCredential:a}}Me.getServiceConfigDetail=bp;function Sp(i,r,n){if(r==="0.0.1"){var u=i.Properties,a=i.Params,o=i.Provider,p=i.Access,g=i.Component,v=i.ProjectName,c=n.credentials,_=n.method,b={Properties:u,Credentials:c,Project:{ProjectName:v,Component:g,Provider:o,AccessAlias:p||""},Command:_,Args:a||"",Path:{ConfigPath:process.env.templateFile||""}};return b}var I=i.props,P=i.params,H=i.provider,re=i.access,ue=i.component,X=i.ProjectName,Ie=i.appName,pe=n.credentials,le=n.method,ve={props:I,Properties:I,Credentials:pe,credentials:pe,appName:Ie,Project:{ProjectName:X,projectName:X,component:ue,Component:ue,provider:H,Provider:H,accessAlias:re||"",AccessAlias:re||""},project:{component:ue,access:re||"",projectName:X},command:le,Command:le,args:P||"",Args:P||"",argsObj:process.temp_params||[],ArgsObj:process.temp_params||[],path:{configPath:process.env.templateFile||""},Path:{ConfigPath:process.env.templateFile||""}};return ve}Me.getServiceInputs=Sp;function Cp(i,r,n){var u=n.method;if(r==="0.0.1"){var a=i.Extends,o=a===void 0?{}:a,p=o[u];return p}var g=i.actions,v=g===void 0?{}:g,c=[];return Object.keys(v).forEach(function(_){var b=_.split("-"),I=v[_];if(b.length>1){var P=b[1];if(P===u){var H=b[0];I.forEach(function(re){var ue={Hook:re.run,Path:re.path,Pre:H==="pre"};c.push(ue)})}}else _===u&&I.forEach(function(re){var ue={Hook:re.run,Path:re.path,Pre:!1};c.push(ue)})}),c}Me.getServiceActions=Cp;function Op(i){var r=i.edition||"0.0.1";return r==="0.0.1"?i:i.services}Me.getServiceList=Op;Me.default={getSubcommand:Ep,getServiceConfig:wp,getServiceConfigDetail:bp,getServiceInputs:Sp,getServiceActions:Cp,getServiceList:Op}});var Lp=R(Ne=>{"use strict";var DS=Ne&&Ne.__createBinding||(Object.create?function(i,r,n,u){u===void 0&&(u=n),Object.defineProperty(i,u,{enumerable:!0,get:function(){return r[n]}})}:function(i,r,n,u){u===void 0&&(u=n),i[u]=r[n]}),qS=Ne&&Ne.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),xp=Ne&&Ne.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var n in i)n!=="default"&&Object.prototype.hasOwnProperty.call(i,n)&&DS(r,i,n);return qS(r,i),r},Ap=Ne&&Ne.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},Ip=Ne&&Ne.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},$S=Ne&&Ne.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.Parse=void 0;var Eu=xp(require("fs")),Rp=xp(require("path")),FS=gs(),jS=Or(),Pp=zr(),MS=$S(Ae()),HS=MS.default.jsyaml,US=zr(),Tp=new RegExp(/\$\{(.*)\}/,"i"),GS=new RegExp(/(.*)\((.*)\)/,"i"),WS=["[object Number]","[object Boolean]"],BS=function(){function i(r){if(this.path=r,this.parsedObj={},this.dependenciesMap={},this.globalJsonKeyMap={},this.globalKeyArr=[],this.magicVariablesArray=[],Eu.existsSync(r))try{this.init(r)}catch(n){throw new Error(n.message)}}return i.prototype.getFileObj=function(r){var n={};try{var u=Rp.extname(r);(u.indexOf(".yaml")!==-1||u.indexOf(".yml")!==-1)&&(n=HS.load(Eu.readFileSync(r,"utf8"))),u.indexOf(".json")!==-1&&(n=JSON.parse(Eu.readFileSync(r).toString()))}catch(a){new jS.HandleError({error:a}).report(a).then(function(){return process.exit(1)})}return n},i.prototype.init=function(r){return Ap(this,void 0,void 0,function(){return Ip(this,function(n){return this.parsedObj=this.getFileObj(r),[2]})})},i.prototype.getOriginalParsedObj=function(){return this.parsedObj},i.prototype.findVariableValue=function(r){var n=r.variableName,u=r.type,a=r.funName,o=r.funVariable,p="";return u==="Literal"?this.globalJsonKeyMap[n]||this.globalJsonKeyMap["services."+n]||"${"+n+"}":u==="Fun"&&(a==="Env"||a==="env")?process.env[o]:u==="Fun"&&(a==="Path"||a==="path")?Rp.join(process.cwd(),o):u==="Fun"&&(a==="File"||a==="file")?this.getFileObj(o):p},i.prototype.generateMagicVariables=function(r,n,u){var a=this;return n===void 0&&(n=[]),u===void 0&&(u=""),Object.prototype.toString.call(r)==="[object Object]"?(u!==""&&(u=u+"."),Object.keys(r).map(function(o){var p=""+u+o,g=r[o];n.push(p),n.concat(a.generateMagicVariables(g,n,""+p)),a.globalJsonKeyMap[p]=g})):Object.prototype.toString.call(r)==="[object Array]"?r.forEach(function(o,p){var g=u+"["+p+"]",v=u+"["+(p-r.length)+"]";n.push(g),n.push(v),n.concat(a.generateMagicVariables(o,n,""+g)),n.concat(a.generateMagicVariables(o,n,""+v)),a.globalJsonKeyMap[g]=o,a.globalJsonKeyMap[v]=o}):n=[],n},i.prototype.isProjectProperties=function(r,n){var u=!1;return n==="Properties"&&this.globalJsonKeyMap[r+"."+n]&&(u=!0),u},i.prototype.iteratorToSetValue=function(r,n,u){var a=this;if(WS.includes(Object.prototype.toString.call(r)))return r;if(Object.prototype.toString.call(r)==="[object String]"){var o=r.match(Tp);if(o){var p=o[1],g={variableName:p,type:"Literal",funName:null,funVariable:""},v=p.match(GS);if(v)g.funName=v[1],g.funVariable=v[2],g.type="Fun";else{var c=this.dependenciesMap[n];c||(c={});var _=p.split(".")[0];c[_]=1,this.dependenciesMap[n]=c}var b=(0,Pp.startsWith)(p,"env.")?(0,Pp.get)(process,p):this.findVariableValue(g);return Object.prototype.toString.call(b)==="[object String]"?r.replace(Tp,b):b}return(!this.dependenciesMap[n]||Object.keys(this.dependenciesMap[n]).length==0)&&(this.dependenciesMap[n]={}),r}if(Object.prototype.toString.call(r)==="[object Array]")return r.map(function(I){return a.iteratorToSetValue(I,n)});if(Object.prototype.toString.call(r)==="[object Object]")return Object.keys(r).forEach(function(I){r[I]=a.iteratorToSetValue(r[I],n,u||I)}),r},i.prototype.replaceVariable=function(r){var n=this,u=(0,FS.getServiceList)(r);return Object.keys(u).forEach(function(a){var o=u[a];u[a]=n.iteratorToSetValue(o,a)}),r.services?r.services=u:r=u,(0,US.cloneDeep)(r)},i.prototype.getRealVariables=function(r){return Ap(this,void 0,void 0,function(){return Ip(this,function(n){return this.globalKeyArr=this.generateMagicVariables(r),[2,this.replaceVariable(r)]})})},i}();Ne.Parse=BS});var Np=R(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.Analysis=void 0;var kS=function(){function i(r,n){this.parsedObj=r,this.dependenciesMap=n,this.componentOrderKeyMap={}}return i.prototype.getComponentOrderKeyMap=function(r){var n=this;r.forEach(function(u){n.componentOrderKeyMap[u]=1})},i.prototype.calculateOrderNumber=function(r){var n=this;r.forEach(function(u){var a=n.dependenciesMap[u];Object.keys(a).forEach(function(o){n.componentOrderKeyMap[o]&&(n.componentOrderKeyMap[o]+=a[o])})})},i.prototype.getProjectOrder=function(){var r=this,n=Object.keys(this.dependenciesMap).filter(function(a){return a!=="Global"});this.getComponentOrderKeyMap(n),this.calculateOrderNumber(n);var u=Object.keys(this.componentOrderKeyMap).map(function(a){return{name:a,order:r.componentOrderKeyMap[a]}});return u.sort(function(a,o){return o.order-a.order}).map(function(a){return a.name})},i}();ms.Analysis=kS});var vs=R(St=>{"use strict";var VS=St&&St.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(St,"__esModule",{value:!0});St.version=St.Analysis=St.Parse=void 0;var zS=Lp();Object.defineProperty(St,"Parse",{enumerable:!0,get:function(){return zS.Parse}});var XS=Np();Object.defineProperty(St,"Analysis",{enumerable:!0,get:function(){return XS.Analysis}});var YS=gs();Object.defineProperty(St,"version",{enumerable:!0,get:function(){return VS(YS).default}})});var wu=R(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.UPDATE_CHECK_INTERVAL=ir.DEFAULT_REGIRSTRY=ir.PROCESS_ENV_TEMPLATE_NAME=void 0;ir.PROCESS_ENV_TEMPLATE_NAME="templateFile";ir.DEFAULT_REGIRSTRY="http://registry.devsapp.cn/simple";ir.UPDATE_CHECK_INTERVAL=1e3*60*60*12});var Dp=R(Ct=>{"use strict";var bu=Ct&&Ct.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},Su=Ct&&Ct.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Cu=Ct&&Ct.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.PluginExeCute=void 0;var zn=Cu(require("fs")),Ou=Cu(require("path")),KS=Cu(Ae()),JS=KS.default.getRootHome,_s=Ou.default.join(JS(),"plugins"),ZS=function(){function i(r){this.pluginConfig=r,zn.default.existsSync(_s)||zn.default.mkdirSync(_s);var n=this.pluginConfig.name;this.pluginPath=Ou.default.join(_s,n)}return i.prototype.init=function(){return bu(this,void 0,void 0,function(){var r;return Su(this,function(n){switch(n.label){case 0:return r=this.pluginConfig.name,this.pluginExist()?[3,2]:[4,this.downLoadPlugin(r)];case 1:n.sent(),n.label=2;case 2:return[2]}})})},i.prototype.pluginExist=function(){return zn.default.existsSync(this.pluginPath)},i.prototype.downLoadPlugin=function(r){return bu(this,void 0,void 0,function(){var n;return Su(this,function(u){return n=Ou.default.join(_s,r),zn.default.existsSync(n)||zn.default.mkdirSync(n),[2]})})},i.prototype.loadPlugin=function(){return bu(this,void 0,void 0,function(){var r;return Su(this,function(n){return r=require(this.pluginPath),[2,r]})})},i}();Ct.PluginExeCute=ZS});var Fp=R(Ot=>{"use strict";var Xn=Ot&&Ot.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},Yn=Ot&&Ot.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},qp=Ot&&Ot.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.Hook=void 0;var $p=qp(require("fs")),QS=qp(require("path")),sn=Kn(),eC=Dp(),tC=require("child_process").spawnSync,rC=function(){function i(r){var n=this;r===void 0&&(r=[]),this.preHooks=[],this.afterHooks=[],r.forEach(function(u){u.Pre?n.preHooks.push(u):n.afterHooks.push(u)})}return i.prototype.executePreHook=function(){return Xn(this,void 0,void 0,function(){var r,n;return Yn(this,function(u){switch(u.label){case 0:if(!(this.preHooks.length>0))return[3,5];sn.logger.info("Start the pre-action"),r=0,u.label=1;case 1:return r<this.preHooks.length?(n=r,sn.logger.info("Action: "+(this.preHooks[n].Hook||this.preHooks[n].Plugin)),[4,this.executeByConfig(this.preHooks[n])]):[3,4];case 2:u.sent(),u.label=3;case 3:return r++,[3,1];case 4:sn.logger.info("End the pre-action"),u.label=5;case 5:return[2]}})})},i.prototype.executeAfterHook=function(){return Xn(this,void 0,void 0,function(){var r,n;return Yn(this,function(u){switch(u.label){case 0:if(!(this.afterHooks.length>0))return[3,5];sn.logger.info("Start the after-action"),r=0,u.label=1;case 1:return r<this.afterHooks.length?(n=r,sn.logger.info("Action: "+(this.afterHooks[n].Hook||this.afterHooks[n].Plugin)),[4,this.executeByConfig(this.afterHooks[n])]):[3,4];case 2:u.sent(),u.label=3;case 3:return r++,[3,1];case 4:sn.logger.info("End the after-action"),u.label=5;case 5:return[2]}})})},i.prototype.commandExecute=function(r,n){return Xn(this,void 0,void 0,function(){var u,a,o;return Yn(this,function(p){if(u=process.cwd(),a=n?QS.default.resolve(u,n):u,$p.default.existsSync(a)&&$p.default.lstatSync(a).isDirectory()&&(process.env["next-command-execute-flag"]="true",o=tC(r,[],{cwd:a,stdio:"inherit",shell:!0}),o&&o.status!==0))throw new Error("Action ["+r+"] run error.");return[2]})})},i.prototype.pluginExecute=function(r){return Xn(this,void 0,void 0,function(){var n,u;return Yn(this,function(a){switch(a.label){case 0:return n=new eC.PluginExeCute({name:r}),[4,n.init()];case 1:return a.sent(),[4,n.loadPlugin()];case 2:return u=a.sent(),u.apply(null,[]),[2]}})})},i.prototype.executeByConfig=function(r){return Xn(this,void 0,void 0,function(){return Yn(this,function(n){switch(n.label){case 0:return r.Hook?[4,this.commandExecute(r.Hook,r.Path)]:[3,2];case 1:return n.sent(),[3,4];case 2:return r.Plugin?[4,this.pluginExecute(r.Plugin)]:[3,4];case 3:n.sent(),n.label=4;case 4:return[2]}})})},i}();Ot.Hook=rC});var kp=R(Be=>{"use strict";var xt=Be&&Be.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},At=Be&&Be.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},xu=Be&&Be.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Be,"__esModule",{value:!0});Be.ComponentExeCute=Be.generateSynchronizeComponentExeList=Be.synchronizeExecuteComponentList=void 0;var Au=xu(require("fs")),jp=xu(require("path")),nC=wu(),Iu=vs(),Ru=Kn(),iC=Fp(),ys=Or(),Jn=xu(Ae()),sC=Jn.default.getCredential,oC=Jn.default.loadComponent,uC=Jn.default.jsyaml,Mp=Jn.default.colors,Hp=Jn.default.getRootHome,Up=Iu.version.getServiceConfigDetail,aC=Iu.version.getServiceInputs,lC=Iu.version.getServiceActions,Gp=jp.default.join(Hp(),"components");function Wp(i,r,n){return i===void 0&&(i=[]),r===void 0&&(r=0),n===void 0&&(n={}),xt(this,void 0,void 0,function(){var u=this;return At(this,function(a){switch(a.label){case 0:return r>=0&&r<i.length?[4,i[r]().then(function(o){var p=o.name,g=o.data;return xt(u,void 0,void 0,function(){return At(this,function(v){switch(v.label){case 0:return p&&(n[p]=g),[4,Wp(i,r+1,n)];case 1:return[2,v.sent()]}})})})]:[3,2];case 1:return[2,a.sent()];case 2:return[2,n]}})})}Be.synchronizeExecuteComponentList=Wp;function cC(i,r){var n=this,u=i.list,a=i.parse,o=i.parsedObj,p=i.method,g=i.params;return u.map(function(v){return function(){return new Promise(function(c,_){return xt(n,void 0,void 0,function(){var b,I,P;return At(this,function(H){switch(H.label){case 0:return o.Params=g||"",Ru.logger.info("Start executing project "+v),[4,r(a,v,o)];case 1:return b=H.sent(),process.env.serverless_devs_temp_access&&(b.Access=process.env.serverless_devs_temp_access,b.access=process.env.serverless_devs_temp_access),I=new Bp({componentConfig:b,method:p,version:o.edition}),[4,I.init()];case 2:return P=H.sent(),o.edition?o.services[v].output=P:o[v].Output=P,Ru.logger.info("Project "+v+` successfully to execute
46
- `),c({name:v,data:P}),[2]}})})})}})}Be.generateSynchronizeComponentExeList=cC;var Bp=function(){function i(r){this.version="0.0.1",this.componentConfig=r.componentConfig,this.method=r.method,this.version=r.version,this.customerCommandName=r.customerCommandName,Au.default.existsSync(Gp)||Au.default.mkdirSync(Gp)}return i.prototype.init=function(){return xt(this,void 0,void 0,function(){var r;return At(this,function(n){switch(n.label){case 0:return r=this,[4,this.getCredentials()];case 1:return r.credentials=n.sent()||{},[4,this.startExecute()];case 2:return[2,n.sent()]}})})},i.prototype.getCredentials=function(){return xt(this,void 0,void 0,function(){var r,n,u,a,o,p,g,v;return At(this,function(c){switch(c.label){case 0:if(r=Up(this.componentConfig),n=r.access,u=r.autoCredential,u===!1)return[2,null];c.label=1;case 1:return c.trys.push([1,5,,6]),a=jp.default.join(Hp(),"access.yaml"),o=uC.load(Au.default.readFileSync(a,"utf8")||"{}"),o[n]?[4,sC(n)]:[3,3];case 2:return g=c.sent(),[3,4];case 3:g={},c.label=4;case 4:return p=g,this.componentConfig.access=n,[2,p];case 5:return v=c.sent(),[3,6];case 6:return[2,{}]}})})},i.prototype.loadExtends=function(){var r=lC(this.componentConfig,this.version,{method:this.method}),n=null;return r&&(n=new iC.Hook(r)),n},i.prototype.loadPreExtends=function(r){return xt(this,void 0,void 0,function(){return At(this,function(n){switch(n.label){case 0:return r?[4,r.executePreHook()]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},i.prototype.loadAfterExtend=function(r){return xt(this,void 0,void 0,function(){return At(this,function(n){switch(n.label){case 0:return r?[4,r.executeAfterHook()]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},i.prototype.invokeMethod=function(r,n,u){return xt(this,void 0,void 0,function(){var a,o,a,p;return At(this,function(g){switch(g.label){case 0:if(!this.customerCommandName)return[3,6];if(!r[n])return[3,5];g.label=1;case 1:return g.trys.push([1,3,,5]),[4,r[n](u)];case 2:return a=g.sent(),[2,a];case 3:return o=g.sent(),[4,new ys.HandleError({error:o,prefix:"Project "+this.componentConfig.ProjectName+" failed to execute:"}).report(o)];case 4:return g.sent(),process.exit(101),[3,5];case 5:new ys.HumanError({errorMessage:"The ["+this.method+"] command was not found.",tips:"Please check the component "+this.componentConfig.component+" has the "+this.method+" method. Serverless Devs documents\uFF1A"+Mp.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/command")}),process.exit(100),g.label=6;case 6:if(!r[n])return[3,12];g.label=7;case 7:return g.trys.push([7,9,,11]),[4,r[n](u)];case 8:return a=g.sent(),[2,a];case 9:return p=g.sent(),[4,new ys.HandleError({error:p,prefix:"Project "+this.componentConfig.ProjectName+" failed to execute:"}).report(p)];case 10:return g.sent(),process.exit(101),[3,11];case 11:return[3,13];case 12:new ys.HumanWarning({warningMessage:"The ["+this.method+"] command was not found.",tips:"Please check the component "+this.componentConfig.component+" has the "+this.method+" method, Serverless Devs documents\uFF1A"+Mp.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/command")}),g.label=13;case 13:return[2]}})})},i.prototype.executeCommand=function(){return xt(this,void 0,void 0,function(){var r,n,u,a,o;return At(this,function(p){switch(p.label){case 0:return r=aC(this.componentConfig,this.version,{method:this.method,credentials:this.credentials}),n=Up(this.componentConfig).name,u=Ru.configSet.getConfig("registry")||nC.DEFAULT_REGIRSTRY,[4,oC(n,u)];case 1:return a=p.sent(),[4,this.invokeMethod(a,this.method,r)];case 2:return o=p.sent(),[2,o]}})})},i.prototype.startExecute=function(){return xt(this,void 0,void 0,function(){var r,n,u,a,o;return At(this,function(p){switch(p.label){case 0:return r={},n=process.env.temp_params||"",u=n.includes("--help")||n.includes("-h"),process.env["skip-actions"]==="true"||u?(o=null,[3,3]):[3,1];case 1:return[4,this.loadExtends()];case 2:o=p.sent(),p.label=3;case 3:return a=o,[4,this.loadPreExtends(a)];case 4:return p.sent(),[4,this.executeCommand()];case 5:return r=p.sent(),[4,this.loadAfterExtend(a)];case 6:return p.sent(),[2,r]}})})},i}();Be.ComponentExeCute=Bp});var Xp=R(It=>{"use strict";var Pu=It&&It.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},Tu=It&&It.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},fC=It&&It.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(It,"__esModule",{value:!0});It.CommandManager=void 0;var Vp=vs(),hC=gs(),on=Kn(),Lu=kp(),un=Gt(),pC=fC(Ae()),zp=pC.default.colors,dC=Or(),Nu=zr(),gC=function(){function i(r,n,u,a){this.templateFile=r,this.method=n,this.customerCommandName=u,this.deployParams=a}return i.prototype.assemblyProjectConfig=function(r,n,u){return Pu(this,void 0,void 0,function(){var a,o;return Tu(this,function(p){switch(p.label){case 0:return[4,r.getRealVariables(u)];case 1:return a=p.sent(),o=(0,hC.getServiceConfig)(a,n),o.appName=a.name,o.ProjectName=n,this.deployParams&&(o.params=this.deployParams),[2,o]}})})},i.prototype.warnEnvironmentVariables=function(r){return Pu(this,void 0,void 0,function(){var n,u,a,o,p,a;return Tu(this,function(g){if(n=r==null?void 0:r.services,(0,Nu.isEmpty)(n))return[2];u={};for(a in n)o=(0,Nu.get)(n,[a,"props","function","environmentVariables"],{}),u=Object.assign({},u,o);p=[];for(a in u)(0,Nu.isNil)(u[a])&&p.push(a);return p.length>0&&on.logger.warning("The value of environment variable ["+p.join(", ")+"] is undefined."),[2]})})},i.prototype.init=function(){return Pu(this,void 0,void 0,function(){var r,n,u,a,o,p,g,v,c,_,b,I,P,b,H,re,ue;return Tu(this,function(X){switch(X.label){case 0:return X.trys.push([0,10,,12]),on.logger.info("Start ..."),r=(0,un.checkTemplateFile)(this.templateFile),r?(n={},u=new Vp.Parse(r),a=u.getOriginalParsedObj(),[4,u.getRealVariables(a)]):[3,8];case 1:return o=X.sent(),[4,this.warnEnvironmentVariables(o)];case 2:return X.sent(),p=new Vp.Analysis(o,u.dependenciesMap),g=p.getProjectOrder(),this.customerCommandName||g.length===1?(v=g[0],[4,this.assemblyProjectConfig(u,this.customerCommandName||v,a)]):[3,5];case 3:return c=X.sent(),process.env.serverless_devs_temp_access&&(c.Access=process.env.serverless_devs_temp_access,c.access=process.env.serverless_devs_temp_access),_=new Lu.ComponentExeCute({componentConfig:c,method:this.method,version:a.edition,customerCommandName:this.customerCommandName}),[4,_.init()];case 4:return b=X.sent(),b&&(n[c.ProjectName]=b),[3,7];case 5:return I=this.deployParams||"",on.logger.info("It is detected that your project has the following projects < "+g.join(",")+" > to be execute"),P=(0,Lu.generateSynchronizeComponentExeList)({list:g,parse:u,parsedObj:a,method:this.method,params:I},this.assemblyProjectConfig.bind(this)),[4,(0,Lu.synchronizeExecuteComponentList)(P)];case 6:b=X.sent();for(H in b)g.includes(H)&&b[H]&&(n[H]=b[H]);X.label=7;case 7:return re=JSON.parse(JSON.stringify(n)),Object.keys(n).length===0?on.logger.success("End of method: "+this.method):on.logger.output(re),[3,9];case 8:on.logger.error(`Failed to execute:
34
+ }`;var B=xl(function(){return ee(d,q+"return "+A).apply(i,v)});if(B.source=A,$o(B))throw B;return B}function Cy(e){return te(e).toLowerCase()}function Oy(e){return te(e).toUpperCase()}function xy(e,t,s){if(e=te(e),e&&(s||t===i))return qa(e);if(!e||!(t=Ye(t)))return e;var c=pt(e),f=pt(t),d=$a(c,f),v=Fa(c,f)+1;return nn(c,d,v).join("")}function Ay(e,t,s){if(e=te(e),e&&(s||t===i))return e.slice(0,ja(e)+1);if(!e||!(t=Ye(t)))return e;var c=pt(e),f=Fa(c,pt(t))+1;return nn(c,0,f).join("")}function Iy(e,t,s){if(e=te(e),e&&(s||t===i))return e.replace(qs,"");if(!e||!(t=Ye(t)))return e;var c=pt(e),f=$a(c,pt(t));return nn(c,f).join("")}function Ry(e,t){var s=bd,c=Sd;if(fe(t)){var f="separator"in t?t.separator:f;s="length"in t?W(t.length):s,c="omission"in t?Ye(t.omission):c}e=te(e);var d=e.length;if($n(e)){var v=pt(e);d=v.length}if(s>=d)return e;var y=s-Fn(c);if(y<1)return c;var w=v?nn(v,0,y).join(""):e.slice(0,y);if(f===i)return w+c;if(v&&(y+=w.length-y),Fo(f)){if(e.slice(y).search(f)){var O,x=w;for(f.global||(f=Zs(f.source,te(ra.exec(f))+"g")),f.lastIndex=0;O=f.exec(x);)var A=O.index;w=w.slice(0,A===i?y:A)}}else if(e.indexOf(Ye(f),y)!=y){var T=w.lastIndexOf(f);T>-1&&(w=w.slice(0,T))}return w+c}function Py(e){return e=te(e),e&&Ud.test(e)?e.replace(ea,sv):e}var Ty=Wn(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ho=Ac("toUpperCase");function Ol(e,t,s){return e=te(e),t=s?i:t,t===i?ev(e)?av(e):kg(e):e.match(t)||[]}var xl=V(function(e,t){try{return Ve(e,i,t)}catch(s){return $o(s)?s:new U(s)}}),Ly=Ft(function(e,t){return tt(t,function(s){s=bt(s),qt(e,s,Do(e[s],e))}),e});function Ny(e){var t=e==null?0:e.length,s=$();return e=t?le(e,function(c){if(typeof c[1]!="function")throw new nt(a);return[s(c[0]),c[1]]}):[],V(function(c){for(var f=-1;++f<t;){var d=e[f];if(Ve(d[0],this,c))return Ve(d[1],this,c)}})}function Dy(e){return sm(it(e,l))}function Uo(e){return function(){return e}}function qy(e,t){return e==null||e!==e?t:e}var $y=Rc(),Fy=Rc(!0);function We(e){return e}function Go(e){return sc(typeof e=="function"?e:it(e,l))}function My(e){return uc(it(e,l))}function jy(e,t){return ac(e,it(t,l))}var Hy=V(function(e,t){return function(s){return xr(s,e,t)}}),Uy=V(function(e,t){return function(s){return xr(e,s,t)}});function Wo(e,t,s){var c=Ee(t),f=Ni(t,c);s==null&&!(fe(t)&&(f.length||!c.length))&&(s=t,t=e,e=this,f=Ni(t,Ee(t)));var d=!(fe(s)&&"chain"in s)||!!s.chain,v=jt(e);return tt(f,function(y){var w=t[y];e[y]=w,v&&(e.prototype[y]=function(){var O=this.__chain__;if(d||O){var x=e(this.__wrapped__),A=x.__actions__=He(this.__actions__);return A.push({func:w,args:arguments,thisArg:e}),x.__chain__=O,x}return w.apply(e,Xt([this.value()],arguments))})}),e}function Gy(){return ye._===this&&(ye._=dv),this}function Bo(){}function Wy(e){return e=W(e),V(function(t){return cc(t,e)})}var By=wo(le),ky=wo(Pa),Vy=wo(ks);function Al(e){return Io(e)?Vs(bt(e)):bm(e)}function zy(e){return function(t){return e==null?i:vn(e,t)}}var Yy=Tc(),Xy=Tc(!0);function ko(){return[]}function Vo(){return!1}function Ky(){return{}}function Jy(){return""}function Zy(){return!0}function Qy(e,t){if(e=W(e),e<1||e>zt)return[];var s=yt,c=Ie(e,yt);t=$(t),e-=yt;for(var f=Xs(c,t);++s<e;)t(s);return f}function eE(e){return G(e)?le(e,bt):Xe(e)?[e]:He(zc(te(e)))}function tE(e){var t=++hv;return te(e)+t}var nE=ji(function(e,t){return e+t},0),rE=bo("ceil"),iE=ji(function(e,t){return e/t},1),sE=bo("floor");function oE(e){return e&&e.length?Li(e,We,oo):i}function uE(e,t){return e&&e.length?Li(e,$(t,2),oo):i}function aE(e){return Na(e,We)}function cE(e,t){return Na(e,$(t,2))}function lE(e){return e&&e.length?Li(e,We,lo):i}function fE(e,t){return e&&e.length?Li(e,$(t,2),lo):i}var hE=ji(function(e,t){return e*t},1),pE=bo("round"),dE=ji(function(e,t){return e-t},0);function gE(e){return e&&e.length?Ys(e,We):0}function vE(e,t){return e&&e.length?Ys(e,$(t,2)):0}return p.after=M0,p.ary=il,p.assign=O1,p.assignIn=_l,p.assignInWith=Zi,p.assignWith=x1,p.at=A1,p.before=sl,p.bind=Do,p.bindAll=Ly,p.bindKey=ol,p.castArray=K0,p.chain=tl,p.chunk=s_,p.compact=o_,p.concat=u_,p.cond=Ny,p.conforms=Dy,p.constant=Uo,p.countBy=g0,p.create=I1,p.curry=ul,p.curryRight=al,p.debounce=cl,p.defaults=R1,p.defaultsDeep=P1,p.defer=j0,p.delay=H0,p.difference=a_,p.differenceBy=c_,p.differenceWith=l_,p.drop=f_,p.dropRight=h_,p.dropRightWhile=p_,p.dropWhile=d_,p.fill=g_,p.filter=m0,p.flatMap=E0,p.flatMapDeep=w0,p.flatMapDepth=b0,p.flatten=Jc,p.flattenDeep=v_,p.flattenDepth=m_,p.flip=U0,p.flow=$y,p.flowRight=Fy,p.fromPairs=__,p.functions=F1,p.functionsIn=M1,p.groupBy=S0,p.initial=E_,p.intersection=w_,p.intersectionBy=b_,p.intersectionWith=S_,p.invert=H1,p.invertBy=U1,p.invokeMap=O0,p.iteratee=Go,p.keyBy=x0,p.keys=Ee,p.keysIn=Ge,p.map=Vi,p.mapKeys=W1,p.mapValues=B1,p.matches=My,p.matchesProperty=jy,p.memoize=Yi,p.merge=k1,p.mergeWith=yl,p.method=Hy,p.methodOf=Uy,p.mixin=Wo,p.negate=Xi,p.nthArg=Wy,p.omit=V1,p.omitBy=z1,p.once=G0,p.orderBy=A0,p.over=By,p.overArgs=W0,p.overEvery=ky,p.overSome=Vy,p.partial=qo,p.partialRight=ll,p.partition=I0,p.pick=Y1,p.pickBy=El,p.property=Al,p.propertyOf=zy,p.pull=A_,p.pullAll=Qc,p.pullAllBy=I_,p.pullAllWith=R_,p.pullAt=P_,p.range=Yy,p.rangeRight=Xy,p.rearg=B0,p.reject=T0,p.remove=T_,p.rest=k0,p.reverse=Lo,p.sampleSize=N0,p.set=K1,p.setWith=J1,p.shuffle=D0,p.slice=L_,p.sortBy=F0,p.sortedUniq=j_,p.sortedUniqBy=H_,p.split=Ey,p.spread=V0,p.tail=U_,p.take=G_,p.takeRight=W_,p.takeRightWhile=B_,p.takeWhile=k_,p.tap=o0,p.throttle=z0,p.thru=ki,p.toArray=gl,p.toPairs=wl,p.toPairsIn=bl,p.toPath=eE,p.toPlainObject=ml,p.transform=Z1,p.unary=Y0,p.union=V_,p.unionBy=z_,p.unionWith=Y_,p.uniq=X_,p.uniqBy=K_,p.uniqWith=J_,p.unset=Q1,p.unzip=No,p.unzipWith=el,p.update=ey,p.updateWith=ty,p.values=Vn,p.valuesIn=ny,p.without=Z_,p.words=Ol,p.wrap=X0,p.xor=Q_,p.xorBy=e0,p.xorWith=t0,p.zip=n0,p.zipObject=r0,p.zipObjectDeep=i0,p.zipWith=s0,p.entries=wl,p.entriesIn=bl,p.extend=_l,p.extendWith=Zi,Wo(p,p),p.add=nE,p.attempt=xl,p.camelCase=oy,p.capitalize=Sl,p.ceil=rE,p.clamp=ry,p.clone=J0,p.cloneDeep=Q0,p.cloneDeepWith=e1,p.cloneWith=Z0,p.conformsTo=t1,p.deburr=Cl,p.defaultTo=qy,p.divide=iE,p.endsWith=uy,p.eq=gt,p.escape=ay,p.escapeRegExp=cy,p.every=v0,p.find=_0,p.findIndex=Xc,p.findKey=T1,p.findLast=y0,p.findLastIndex=Kc,p.findLastKey=L1,p.floor=sE,p.forEach=nl,p.forEachRight=rl,p.forIn=N1,p.forInRight=D1,p.forOwn=q1,p.forOwnRight=$1,p.get=Mo,p.gt=n1,p.gte=r1,p.has=j1,p.hasIn=jo,p.head=Zc,p.identity=We,p.includes=C0,p.indexOf=y_,p.inRange=iy,p.invoke=G1,p.isArguments=yn,p.isArray=G,p.isArrayBuffer=i1,p.isArrayLike=Ue,p.isArrayLikeObject=pe,p.isBoolean=s1,p.isBuffer=rn,p.isDate=o1,p.isElement=u1,p.isEmpty=a1,p.isEqual=c1,p.isEqualWith=l1,p.isError=$o,p.isFinite=f1,p.isFunction=jt,p.isInteger=fl,p.isLength=Ki,p.isMap=hl,p.isMatch=h1,p.isMatchWith=p1,p.isNaN=d1,p.isNative=g1,p.isNil=m1,p.isNull=v1,p.isNumber=pl,p.isObject=fe,p.isObjectLike=he,p.isPlainObject=Lr,p.isRegExp=Fo,p.isSafeInteger=_1,p.isSet=dl,p.isString=Ji,p.isSymbol=Xe,p.isTypedArray=kn,p.isUndefined=y1,p.isWeakMap=E1,p.isWeakSet=w1,p.join=C_,p.kebabCase=ly,p.last=ot,p.lastIndexOf=O_,p.lowerCase=fy,p.lowerFirst=hy,p.lt=b1,p.lte=S1,p.max=oE,p.maxBy=uE,p.mean=aE,p.meanBy=cE,p.min=lE,p.minBy=fE,p.stubArray=ko,p.stubFalse=Vo,p.stubObject=Ky,p.stubString=Jy,p.stubTrue=Zy,p.multiply=hE,p.nth=x_,p.noConflict=Gy,p.noop=Bo,p.now=zi,p.pad=py,p.padEnd=dy,p.padStart=gy,p.parseInt=vy,p.random=sy,p.reduce=R0,p.reduceRight=P0,p.repeat=my,p.replace=_y,p.result=X1,p.round=pE,p.runInContext=E,p.sample=L0,p.size=q0,p.snakeCase=yy,p.some=$0,p.sortedIndex=N_,p.sortedIndexBy=D_,p.sortedIndexOf=q_,p.sortedLastIndex=$_,p.sortedLastIndexBy=F_,p.sortedLastIndexOf=M_,p.startCase=wy,p.startsWith=by,p.subtract=dE,p.sum=gE,p.sumBy=vE,p.template=Sy,p.times=Qy,p.toFinite=Ht,p.toInteger=W,p.toLength=vl,p.toLower=Cy,p.toNumber=ut,p.toSafeInteger=C1,p.toString=te,p.toUpper=Oy,p.trim=xy,p.trimEnd=Ay,p.trimStart=Iy,p.truncate=Ry,p.unescape=Py,p.uniqueId=tE,p.upperCase=Ty,p.upperFirst=Ho,p.each=nl,p.eachRight=rl,p.first=Zc,Wo(p,function(){var e={};return Et(p,function(t,s){ne.call(p.prototype,s)||(e[s]=t)}),e}(),{chain:!1}),p.VERSION=n,tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),tt(["drop","take"],function(e,t){X.prototype[e]=function(s){s=s===i?1:_e(W(s),0);var c=this.__filtered__&&!t?new X(this):this.clone();return c.__filtered__?c.__takeCount__=Ie(s,c.__takeCount__):c.__views__.push({size:Ie(s,yt),type:e+(c.__dir__<0?"Right":"")}),c},X.prototype[e+"Right"]=function(s){return this.reverse()[e](s).reverse()}}),tt(["filter","map","takeWhile"],function(e,t){var s=t+1,c=s==Ju||s==Ad;X.prototype[e]=function(f){var d=this.clone();return d.__iteratees__.push({iteratee:$(f,3),type:s}),d.__filtered__=d.__filtered__||c,d}}),tt(["head","last"],function(e,t){var s="take"+(t?"Right":"");X.prototype[e]=function(){return this[s](1).value()[0]}}),tt(["initial","tail"],function(e,t){var s="drop"+(t?"":"Right");X.prototype[e]=function(){return this.__filtered__?new X(this):this[s](1)}}),X.prototype.compact=function(){return this.filter(We)},X.prototype.find=function(e){return this.filter(e).head()},X.prototype.findLast=function(e){return this.reverse().find(e)},X.prototype.invokeMap=V(function(e,t){return typeof e=="function"?new X(this):this.map(function(s){return xr(s,e,t)})}),X.prototype.reject=function(e){return this.filter(Xi($(e)))},X.prototype.slice=function(e,t){e=W(e);var s=this;return s.__filtered__&&(e>0||t<0)?new X(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==i&&(t=W(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},X.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},X.prototype.toArray=function(){return this.take(yt)},Et(X.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),c=/^(?:head|last)$/.test(t),f=p[c?"take"+(t=="last"?"Right":""):t],d=c||/^find/.test(t);!f||(p.prototype[t]=function(){var v=this.__wrapped__,y=c?[1]:arguments,w=v instanceof X,O=y[0],x=w||G(v),A=function(z){var J=f.apply(p,Xt([z],y));return c&&T?J[0]:J};x&&s&&typeof O=="function"&&O.length!=1&&(w=x=!1);var T=this.__chain__,q=!!this.__actions__.length,F=d&&!T,B=w&&!q;if(!d&&x){v=B?v:new X(this);var M=e.apply(v,y);return M.__actions__.push({func:ki,args:[A],thisArg:i}),new rt(M,T)}return F&&B?e.apply(this,y):(M=this.thru(A),F?c?M.value()[0]:M.value():M)})}),tt(["pop","push","shift","sort","splice","unshift"],function(e){var t=mi[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var f=arguments;if(c&&!this.__chain__){var d=this.value();return t.apply(G(d)?d:[],f)}return this[s](function(v){return t.apply(G(v)?v:[],f)})}}),Et(X.prototype,function(e,t){var s=p[t];if(s){var c=s.name+"";ne.call(Hn,c)||(Hn[c]=[]),Hn[c].push({name:t,func:s})}}),Hn[Mi(i,re).name]=[{name:"wrapper",func:i}],X.prototype.clone=Pv,X.prototype.reverse=Tv,X.prototype.value=Lv,p.prototype.at=u0,p.prototype.chain=a0,p.prototype.commit=c0,p.prototype.next=l0,p.prototype.plant=h0,p.prototype.reverse=p0,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=d0,p.prototype.first=p.prototype.head,yr&&(p.prototype[yr]=f0),p},Jt=cv();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ye._=Jt,define(function(){return Jt})):fn?((fn.exports=Jt)._=Jt,Us._=Jt):ye._=Jt}).call(zn)});var $r=P((qO,$l)=>{var yE="2.0.0",EE=256,wE=Number.MAX_SAFE_INTEGER||9007199254740991,bE=16;$l.exports={SEMVER_SPEC_VERSION:yE,MAX_LENGTH:EE,MAX_SAFE_INTEGER:wE,MAX_SAFE_COMPONENT_LENGTH:bE}});var Fr=P(($O,Fl)=>{var SE=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};Fl.exports=SE});var bn=P((sn,Ml)=>{var{MAX_SAFE_COMPONENT_LENGTH:Jo}=$r(),CE=Fr();sn=Ml.exports={};var OE=sn.re=[],N=sn.src=[],D=sn.t={},xE=0,k=(i,n,r)=>{let u=xE++;CE(u,n),D[i]=u,N[u]=n,OE[u]=new RegExp(n,r?"g":void 0)};k("NUMERICIDENTIFIER","0|[1-9]\\d*");k("NUMERICIDENTIFIERLOOSE","[0-9]+");k("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");k("MAINVERSION",`(${N[D.NUMERICIDENTIFIER]})\\.(${N[D.NUMERICIDENTIFIER]})\\.(${N[D.NUMERICIDENTIFIER]})`);k("MAINVERSIONLOOSE",`(${N[D.NUMERICIDENTIFIERLOOSE]})\\.(${N[D.NUMERICIDENTIFIERLOOSE]})\\.(${N[D.NUMERICIDENTIFIERLOOSE]})`);k("PRERELEASEIDENTIFIER",`(?:${N[D.NUMERICIDENTIFIER]}|${N[D.NONNUMERICIDENTIFIER]})`);k("PRERELEASEIDENTIFIERLOOSE",`(?:${N[D.NUMERICIDENTIFIERLOOSE]}|${N[D.NONNUMERICIDENTIFIER]})`);k("PRERELEASE",`(?:-(${N[D.PRERELEASEIDENTIFIER]}(?:\\.${N[D.PRERELEASEIDENTIFIER]})*))`);k("PRERELEASELOOSE",`(?:-?(${N[D.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${N[D.PRERELEASEIDENTIFIERLOOSE]})*))`);k("BUILDIDENTIFIER","[0-9A-Za-z-]+");k("BUILD",`(?:\\+(${N[D.BUILDIDENTIFIER]}(?:\\.${N[D.BUILDIDENTIFIER]})*))`);k("FULLPLAIN",`v?${N[D.MAINVERSION]}${N[D.PRERELEASE]}?${N[D.BUILD]}?`);k("FULL",`^${N[D.FULLPLAIN]}$`);k("LOOSEPLAIN",`[v=\\s]*${N[D.MAINVERSIONLOOSE]}${N[D.PRERELEASELOOSE]}?${N[D.BUILD]}?`);k("LOOSE",`^${N[D.LOOSEPLAIN]}$`);k("GTLT","((?:<|>)?=?)");k("XRANGEIDENTIFIERLOOSE",`${N[D.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);k("XRANGEIDENTIFIER",`${N[D.NUMERICIDENTIFIER]}|x|X|\\*`);k("XRANGEPLAIN",`[v=\\s]*(${N[D.XRANGEIDENTIFIER]})(?:\\.(${N[D.XRANGEIDENTIFIER]})(?:\\.(${N[D.XRANGEIDENTIFIER]})(?:${N[D.PRERELEASE]})?${N[D.BUILD]}?)?)?`);k("XRANGEPLAINLOOSE",`[v=\\s]*(${N[D.XRANGEIDENTIFIERLOOSE]})(?:\\.(${N[D.XRANGEIDENTIFIERLOOSE]})(?:\\.(${N[D.XRANGEIDENTIFIERLOOSE]})(?:${N[D.PRERELEASELOOSE]})?${N[D.BUILD]}?)?)?`);k("XRANGE",`^${N[D.GTLT]}\\s*${N[D.XRANGEPLAIN]}$`);k("XRANGELOOSE",`^${N[D.GTLT]}\\s*${N[D.XRANGEPLAINLOOSE]}$`);k("COERCE",`(^|[^\\d])(\\d{1,${Jo}})(?:\\.(\\d{1,${Jo}}))?(?:\\.(\\d{1,${Jo}}))?(?:$|[^\\d])`);k("COERCERTL",N[D.COERCE],!0);k("LONETILDE","(?:~>?)");k("TILDETRIM",`(\\s*)${N[D.LONETILDE]}\\s+`,!0);sn.tildeTrimReplace="$1~";k("TILDE",`^${N[D.LONETILDE]}${N[D.XRANGEPLAIN]}$`);k("TILDELOOSE",`^${N[D.LONETILDE]}${N[D.XRANGEPLAINLOOSE]}$`);k("LONECARET","(?:\\^)");k("CARETTRIM",`(\\s*)${N[D.LONECARET]}\\s+`,!0);sn.caretTrimReplace="$1^";k("CARET",`^${N[D.LONECARET]}${N[D.XRANGEPLAIN]}$`);k("CARETLOOSE",`^${N[D.LONECARET]}${N[D.XRANGEPLAINLOOSE]}$`);k("COMPARATORLOOSE",`^${N[D.GTLT]}\\s*(${N[D.LOOSEPLAIN]})$|^$`);k("COMPARATOR",`^${N[D.GTLT]}\\s*(${N[D.FULLPLAIN]})$|^$`);k("COMPARATORTRIM",`(\\s*)${N[D.GTLT]}\\s*(${N[D.LOOSEPLAIN]}|${N[D.XRANGEPLAIN]})`,!0);sn.comparatorTrimReplace="$1$2$3";k("HYPHENRANGE",`^\\s*(${N[D.XRANGEPLAIN]})\\s+-\\s+(${N[D.XRANGEPLAIN]})\\s*$`);k("HYPHENRANGELOOSE",`^\\s*(${N[D.XRANGEPLAINLOOSE]})\\s+-\\s+(${N[D.XRANGEPLAINLOOSE]})\\s*$`);k("STAR","(<|>)?=?\\s*\\*");k("GTE0","^\\s*>=\\s*0.0.0\\s*$");k("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var Mr=P((FO,jl)=>{var AE=["includePrerelease","loose","rtl"],IE=i=>i?typeof i!="object"?{loose:!0}:AE.filter(n=>i[n]).reduce((n,r)=>(n[r]=!0,n),{}):{};jl.exports=IE});var es=P((MO,Gl)=>{var Hl=/^[0-9]+$/,Ul=(i,n)=>{let r=Hl.test(i),u=Hl.test(n);return r&&u&&(i=+i,n=+n),i===n?0:r&&!u?-1:u&&!r?1:i<n?-1:1},RE=(i,n)=>Ul(n,i);Gl.exports={compareIdentifiers:Ul,rcompareIdentifiers:RE}});var Pe=P((jO,Vl)=>{var ts=Fr(),{MAX_LENGTH:Wl,MAX_SAFE_INTEGER:ns}=$r(),{re:Bl,t:kl}=bn(),PE=Mr(),{compareIdentifiers:jr}=es(),at=class{constructor(n,r){if(r=PE(r),n instanceof at){if(n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease)return n;n=n.version}else if(typeof n!="string")throw new TypeError(`Invalid Version: ${n}`);if(n.length>Wl)throw new TypeError(`version is longer than ${Wl} characters`);ts("SemVer",n,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let u=n.trim().match(r.loose?Bl[kl.LOOSE]:Bl[kl.FULL]);if(!u)throw new TypeError(`Invalid Version: ${n}`);if(this.raw=n,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>ns||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ns||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ns||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let o=+a;if(o>=0&&o<ns)return o}return a}):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(n){if(ts("SemVer.compare",this.version,this.options,n),!(n instanceof at)){if(typeof n=="string"&&n===this.version)return 0;n=new at(n,this.options)}return n.version===this.version?0:this.compareMain(n)||this.comparePre(n)}compareMain(n){return n instanceof at||(n=new at(n,this.options)),jr(this.major,n.major)||jr(this.minor,n.minor)||jr(this.patch,n.patch)}comparePre(n){if(n instanceof at||(n=new at(n,this.options)),this.prerelease.length&&!n.prerelease.length)return-1;if(!this.prerelease.length&&n.prerelease.length)return 1;if(!this.prerelease.length&&!n.prerelease.length)return 0;let r=0;do{let u=this.prerelease[r],a=n.prerelease[r];if(ts("prerelease compare",r,u,a),u===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(u===void 0)return-1;if(u===a)continue;return jr(u,a)}while(++r)}compareBuild(n){n instanceof at||(n=new at(n,this.options));let r=0;do{let u=this.build[r],a=n.build[r];if(ts("prerelease compare",r,u,a),u===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(u===void 0)return-1;if(u===a)continue;return jr(u,a)}while(++r)}inc(n,r){switch(n){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);u===-1&&this.prerelease.push(0)}r&&(this.prerelease[0]===r?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${n}`)}return this.format(),this.raw=this.version,this}};Vl.exports=at});var Sn=P((HO,Kl)=>{var{MAX_LENGTH:TE}=$r(),{re:zl,t:Yl}=bn(),Xl=Pe(),LE=Mr(),NE=(i,n)=>{if(n=LE(n),i instanceof Xl)return i;if(typeof i!="string"||i.length>TE||!(n.loose?zl[Yl.LOOSE]:zl[Yl.FULL]).test(i))return null;try{return new Xl(i,n)}catch{return null}};Kl.exports=NE});var Zl=P((UO,Jl)=>{var DE=Sn(),qE=(i,n)=>{let r=DE(i,n);return r?r.version:null};Jl.exports=qE});var ef=P((GO,Ql)=>{var $E=Sn(),FE=(i,n)=>{let r=$E(i.trim().replace(/^[=v]+/,""),n);return r?r.version:null};Ql.exports=FE});var nf=P((WO,tf)=>{var ME=Pe(),jE=(i,n,r,u)=>{typeof r=="string"&&(u=r,r=void 0);try{return new ME(i,r).inc(n,u).version}catch{return null}};tf.exports=jE});var ct=P((BO,sf)=>{var rf=Pe(),HE=(i,n,r)=>new rf(i,r).compare(new rf(n,r));sf.exports=HE});var rs=P((kO,of)=>{var UE=ct(),GE=(i,n,r)=>UE(i,n,r)===0;of.exports=GE});var cf=P((VO,af)=>{var uf=Sn(),WE=rs(),BE=(i,n)=>{if(WE(i,n))return null;{let r=uf(i),u=uf(n),a=r.prerelease.length||u.prerelease.length,o=a?"pre":"",h=a?"prerelease":"";for(let g in r)if((g==="major"||g==="minor"||g==="patch")&&r[g]!==u[g])return o+g;return h}};af.exports=BE});var ff=P((zO,lf)=>{var kE=Pe(),VE=(i,n)=>new kE(i,n).major;lf.exports=VE});var pf=P((YO,hf)=>{var zE=Pe(),YE=(i,n)=>new zE(i,n).minor;hf.exports=YE});var gf=P((XO,df)=>{var XE=Pe(),KE=(i,n)=>new XE(i,n).patch;df.exports=KE});var mf=P((KO,vf)=>{var JE=Sn(),ZE=(i,n)=>{let r=JE(i,n);return r&&r.prerelease.length?r.prerelease:null};vf.exports=ZE});var yf=P((JO,_f)=>{var QE=ct(),ew=(i,n,r)=>QE(n,i,r);_f.exports=ew});var wf=P((ZO,Ef)=>{var tw=ct(),nw=(i,n)=>tw(i,n,!0);Ef.exports=nw});var is=P((QO,Sf)=>{var bf=Pe(),rw=(i,n,r)=>{let u=new bf(i,r),a=new bf(n,r);return u.compare(a)||u.compareBuild(a)};Sf.exports=rw});var Of=P((ex,Cf)=>{var iw=is(),sw=(i,n)=>i.sort((r,u)=>iw(r,u,n));Cf.exports=sw});var Af=P((tx,xf)=>{var ow=is(),uw=(i,n)=>i.sort((r,u)=>ow(u,r,n));xf.exports=uw});var Hr=P((nx,If)=>{var aw=ct(),cw=(i,n,r)=>aw(i,n,r)>0;If.exports=cw});var ss=P((rx,Rf)=>{var lw=ct(),fw=(i,n,r)=>lw(i,n,r)<0;Rf.exports=fw});var Zo=P((ix,Pf)=>{var hw=ct(),pw=(i,n,r)=>hw(i,n,r)!==0;Pf.exports=pw});var os=P((sx,Tf)=>{var dw=ct(),gw=(i,n,r)=>dw(i,n,r)>=0;Tf.exports=gw});var us=P((ox,Lf)=>{var vw=ct(),mw=(i,n,r)=>vw(i,n,r)<=0;Lf.exports=mw});var Qo=P((ux,Nf)=>{var _w=rs(),yw=Zo(),Ew=Hr(),ww=os(),bw=ss(),Sw=us(),Cw=(i,n,r,u)=>{switch(n){case"===":return typeof i=="object"&&(i=i.version),typeof r=="object"&&(r=r.version),i===r;case"!==":return typeof i=="object"&&(i=i.version),typeof r=="object"&&(r=r.version),i!==r;case"":case"=":case"==":return _w(i,r,u);case"!=":return yw(i,r,u);case">":return Ew(i,r,u);case">=":return ww(i,r,u);case"<":return bw(i,r,u);case"<=":return Sw(i,r,u);default:throw new TypeError(`Invalid operator: ${n}`)}};Nf.exports=Cw});var qf=P((ax,Df)=>{var Ow=Pe(),xw=Sn(),{re:as,t:cs}=bn(),Aw=(i,n)=>{if(i instanceof Ow)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;n=n||{};let r=null;if(!n.rtl)r=i.match(as[cs.COERCE]);else{let u;for(;(u=as[cs.COERCERTL].exec(i))&&(!r||r.index+r[0].length!==i.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),as[cs.COERCERTL].lastIndex=u.index+u[1].length+u[2].length;as[cs.COERCERTL].lastIndex=-1}return r===null?null:xw(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,n)};Df.exports=Aw});var Ff=P((cx,$f)=>{"use strict";$f.exports=function(i){i.prototype[Symbol.iterator]=function*(){for(let n=this.head;n;n=n.next)yield n.value}}});var jf=P((lx,Mf)=>{"use strict";Mf.exports=Z;Z.Node=Cn;Z.create=Z;function Z(i){var n=this;if(n instanceof Z||(n=new Z),n.tail=null,n.head=null,n.length=0,i&&typeof i.forEach=="function")i.forEach(function(a){n.push(a)});else if(arguments.length>0)for(var r=0,u=arguments.length;r<u;r++)n.push(arguments[r]);return n}Z.prototype.removeNode=function(i){if(i.list!==this)throw new Error("removing node which does not belong to this list");var n=i.next,r=i.prev;return n&&(n.prev=r),r&&(r.next=n),i===this.head&&(this.head=n),i===this.tail&&(this.tail=r),i.list.length--,i.next=null,i.prev=null,i.list=null,n};Z.prototype.unshiftNode=function(i){if(i!==this.head){i.list&&i.list.removeNode(i);var n=this.head;i.list=this,i.next=n,n&&(n.prev=i),this.head=i,this.tail||(this.tail=i),this.length++}};Z.prototype.pushNode=function(i){if(i!==this.tail){i.list&&i.list.removeNode(i);var n=this.tail;i.list=this,i.prev=n,n&&(n.next=i),this.tail=i,this.head||(this.head=i),this.length++}};Z.prototype.push=function(){for(var i=0,n=arguments.length;i<n;i++)Rw(this,arguments[i]);return this.length};Z.prototype.unshift=function(){for(var i=0,n=arguments.length;i<n;i++)Pw(this,arguments[i]);return this.length};Z.prototype.pop=function(){if(!!this.tail){var i=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,i}};Z.prototype.shift=function(){if(!!this.head){var i=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,i}};Z.prototype.forEach=function(i,n){n=n||this;for(var r=this.head,u=0;r!==null;u++)i.call(n,r.value,u,this),r=r.next};Z.prototype.forEachReverse=function(i,n){n=n||this;for(var r=this.tail,u=this.length-1;r!==null;u--)i.call(n,r.value,u,this),r=r.prev};Z.prototype.get=function(i){for(var n=0,r=this.head;r!==null&&n<i;n++)r=r.next;if(n===i&&r!==null)return r.value};Z.prototype.getReverse=function(i){for(var n=0,r=this.tail;r!==null&&n<i;n++)r=r.prev;if(n===i&&r!==null)return r.value};Z.prototype.map=function(i,n){n=n||this;for(var r=new Z,u=this.head;u!==null;)r.push(i.call(n,u.value,this)),u=u.next;return r};Z.prototype.mapReverse=function(i,n){n=n||this;for(var r=new Z,u=this.tail;u!==null;)r.push(i.call(n,u.value,this)),u=u.prev;return r};Z.prototype.reduce=function(i,n){var r,u=this.head;if(arguments.length>1)r=n;else if(this.head)u=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;u!==null;a++)r=i(r,u.value,a),u=u.next;return r};Z.prototype.reduceReverse=function(i,n){var r,u=this.tail;if(arguments.length>1)r=n;else if(this.tail)u=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;u!==null;a--)r=i(r,u.value,a),u=u.prev;return r};Z.prototype.toArray=function(){for(var i=new Array(this.length),n=0,r=this.head;r!==null;n++)i[n]=r.value,r=r.next;return i};Z.prototype.toArrayReverse=function(){for(var i=new Array(this.length),n=0,r=this.tail;r!==null;n++)i[n]=r.value,r=r.prev;return i};Z.prototype.slice=function(i,n){n=n||this.length,n<0&&(n+=this.length),i=i||0,i<0&&(i+=this.length);var r=new Z;if(n<i||n<0)return r;i<0&&(i=0),n>this.length&&(n=this.length);for(var u=0,a=this.head;a!==null&&u<i;u++)a=a.next;for(;a!==null&&u<n;u++,a=a.next)r.push(a.value);return r};Z.prototype.sliceReverse=function(i,n){n=n||this.length,n<0&&(n+=this.length),i=i||0,i<0&&(i+=this.length);var r=new Z;if(n<i||n<0)return r;i<0&&(i=0),n>this.length&&(n=this.length);for(var u=this.length,a=this.tail;a!==null&&u>n;u--)a=a.prev;for(;a!==null&&u>i;u--,a=a.prev)r.push(a.value);return r};Z.prototype.splice=function(i,n,...r){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var u=0,a=this.head;a!==null&&u<i;u++)a=a.next;for(var o=[],u=0;a&&u<n;u++)o.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var u=0;u<r.length;u++)a=Iw(this,a,r[u]);return o};Z.prototype.reverse=function(){for(var i=this.head,n=this.tail,r=i;r!==null;r=r.prev){var u=r.prev;r.prev=r.next,r.next=u}return this.head=n,this.tail=i,this};function Iw(i,n,r){var u=n===i.head?new Cn(r,null,n,i):new Cn(r,n,n.next,i);return u.next===null&&(i.tail=u),u.prev===null&&(i.head=u),i.length++,u}function Rw(i,n){i.tail=new Cn(n,i.tail,null,i),i.head||(i.head=i.tail),i.length++}function Pw(i,n){i.head=new Cn(n,null,i.head,i),i.tail||(i.tail=i.head),i.length++}function Cn(i,n,r,u){if(!(this instanceof Cn))return new Cn(i,n,r,u);this.list=u,this.value=i,n?(n.next=this,this.prev=n):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Ff()(Z)}catch{}});var Vf=P((fx,kf)=>{"use strict";var Tw=jf(),On=Symbol("max"),Gt=Symbol("length"),Xn=Symbol("lengthCalculator"),Ur=Symbol("allowStale"),xn=Symbol("maxAge"),Wt=Symbol("dispose"),Hf=Symbol("noDisposeOnSet"),we=Symbol("lruList"),mt=Symbol("cache"),Uf=Symbol("updateAgeOnGet"),eu=()=>1,Gf=class{constructor(n){if(typeof n=="number"&&(n={max:n}),n||(n={}),n.max&&(typeof n.max!="number"||n.max<0))throw new TypeError("max must be a non-negative number");let r=this[On]=n.max||1/0,u=n.length||eu;if(this[Xn]=typeof u!="function"?eu:u,this[Ur]=n.stale||!1,n.maxAge&&typeof n.maxAge!="number")throw new TypeError("maxAge must be a number");this[xn]=n.maxAge||0,this[Wt]=n.dispose,this[Hf]=n.noDisposeOnSet||!1,this[Uf]=n.updateAgeOnGet||!1,this.reset()}set max(n){if(typeof n!="number"||n<0)throw new TypeError("max must be a non-negative number");this[On]=n||1/0,Gr(this)}get max(){return this[On]}set allowStale(n){this[Ur]=!!n}get allowStale(){return this[Ur]}set maxAge(n){if(typeof n!="number")throw new TypeError("maxAge must be a non-negative number");this[xn]=n,Gr(this)}get maxAge(){return this[xn]}set lengthCalculator(n){typeof n!="function"&&(n=eu),n!==this[Xn]&&(this[Xn]=n,this[Gt]=0,this[we].forEach(r=>{r.length=this[Xn](r.value,r.key),this[Gt]+=r.length})),Gr(this)}get lengthCalculator(){return this[Xn]}get length(){return this[Gt]}get itemCount(){return this[we].length}rforEach(n,r){r=r||this;for(let u=this[we].tail;u!==null;){let a=u.prev;Bf(this,n,u,r),u=a}}forEach(n,r){r=r||this;for(let u=this[we].head;u!==null;){let a=u.next;Bf(this,n,u,r),u=a}}keys(){return this[we].toArray().map(n=>n.key)}values(){return this[we].toArray().map(n=>n.value)}reset(){this[Wt]&&this[we]&&this[we].length&&this[we].forEach(n=>this[Wt](n.key,n.value)),this[mt]=new Map,this[we]=new Tw,this[Gt]=0}dump(){return this[we].map(n=>ls(this,n)?!1:{k:n.key,v:n.value,e:n.now+(n.maxAge||0)}).toArray().filter(n=>n)}dumpLru(){return this[we]}set(n,r,u){if(u=u||this[xn],u&&typeof u!="number")throw new TypeError("maxAge must be a number");let a=u?Date.now():0,o=this[Xn](r,n);if(this[mt].has(n)){if(o>this[On])return Kn(this,this[mt].get(n)),!1;let _=this[mt].get(n).value;return this[Wt]&&(this[Hf]||this[Wt](n,_.value)),_.now=a,_.maxAge=u,_.value=r,this[Gt]+=o-_.length,_.length=o,this.get(n),Gr(this),!0}let h=new Wf(n,r,o,a,u);return h.length>this[On]?(this[Wt]&&this[Wt](n,r),!1):(this[Gt]+=h.length,this[we].unshift(h),this[mt].set(n,this[we].head),Gr(this),!0)}has(n){if(!this[mt].has(n))return!1;let r=this[mt].get(n).value;return!ls(this,r)}get(n){return tu(this,n,!0)}peek(n){return tu(this,n,!1)}pop(){let n=this[we].tail;return n?(Kn(this,n),n.value):null}del(n){Kn(this,this[mt].get(n))}load(n){this.reset();let r=Date.now();for(let u=n.length-1;u>=0;u--){let a=n[u],o=a.e||0;if(o===0)this.set(a.k,a.v);else{let h=o-r;h>0&&this.set(a.k,a.v,h)}}}prune(){this[mt].forEach((n,r)=>tu(this,r,!1))}},tu=(i,n,r)=>{let u=i[mt].get(n);if(u){let a=u.value;if(ls(i,a)){if(Kn(i,u),!i[Ur])return}else r&&(i[Uf]&&(u.value.now=Date.now()),i[we].unshiftNode(u));return a.value}},ls=(i,n)=>{if(!n||!n.maxAge&&!i[xn])return!1;let r=Date.now()-n.now;return n.maxAge?r>n.maxAge:i[xn]&&r>i[xn]},Gr=i=>{if(i[Gt]>i[On])for(let n=i[we].tail;i[Gt]>i[On]&&n!==null;){let r=n.prev;Kn(i,n),n=r}},Kn=(i,n)=>{if(n){let r=n.value;i[Wt]&&i[Wt](r.key,r.value),i[Gt]-=r.length,i[mt].delete(r.key),i[we].removeNode(n)}},Wf=class{constructor(n,r,u,a,o){this.key=n,this.value=r,this.length=u,this.now=a,this.maxAge=o||0}},Bf=(i,n,r,u)=>{let a=r.value;ls(i,a)&&(Kn(i,r),i[Ur]||(a=void 0)),a&&n.call(u,a.value,a.key,i)};kf.exports=Gf});var lt=P((hx,Kf)=>{var Jn=class{constructor(n,r){if(r=Nw(r),n instanceof Jn)return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new Jn(n.raw,r);if(n instanceof nu)return this.raw=n.value,this.set=[[n]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n,this.set=n.split(/\s*\|\|\s*/).map(u=>this.parseRange(u.trim())).filter(u=>u.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${n}`);if(this.set.length>1){let u=this.set[0];if(this.set=this.set.filter(a=>!Yf(a[0])),this.set.length===0)this.set=[u];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&Mw(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(n=>n.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(n){n=n.trim();let u=`parseRange:${Object.keys(this.options).join(",")}:${n}`,a=zf.get(u);if(a)return a;let o=this.options.loose,h=o?Te[Oe.HYPHENRANGELOOSE]:Te[Oe.HYPHENRANGE];n=n.replace(h,Yw(this.options.includePrerelease)),ge("hyphen replace",n),n=n.replace(Te[Oe.COMPARATORTRIM],qw),ge("comparator trim",n,Te[Oe.COMPARATORTRIM]),n=n.replace(Te[Oe.TILDETRIM],$w),n=n.replace(Te[Oe.CARETTRIM],Fw),n=n.split(/\s+/).join(" ");let g=o?Te[Oe.COMPARATORLOOSE]:Te[Oe.COMPARATOR],_=n.split(" ").map(I=>jw(I,this.options)).join(" ").split(/\s+/).map(I=>zw(I,this.options)).filter(this.options.loose?I=>!!I.match(g):()=>!0).map(I=>new nu(I,this.options)),l=_.length,m=new Map;for(let I of _){if(Yf(I))return[I];m.set(I.value,I)}m.size>1&&m.has("")&&m.delete("");let b=[...m.values()];return zf.set(u,b),b}intersects(n,r){if(!(n instanceof Jn))throw new TypeError("a Range is required");return this.set.some(u=>Xf(u,r)&&n.set.some(a=>Xf(a,r)&&u.every(o=>a.every(h=>o.intersects(h,r)))))}test(n){if(!n)return!1;if(typeof n=="string")try{n=new Dw(n,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Xw(this.set[r],n,this.options))return!0;return!1}};Kf.exports=Jn;var Lw=Vf(),zf=new Lw({max:1e3}),Nw=Mr(),nu=Wr(),ge=Fr(),Dw=Pe(),{re:Te,t:Oe,comparatorTrimReplace:qw,tildeTrimReplace:$w,caretTrimReplace:Fw}=bn(),Yf=i=>i.value==="<0.0.0-0",Mw=i=>i.value==="",Xf=(i,n)=>{let r=!0,u=i.slice(),a=u.pop();for(;r&&u.length;)r=u.every(o=>a.intersects(o,n)),a=u.pop();return r},jw=(i,n)=>(ge("comp",i,n),i=Gw(i,n),ge("caret",i),i=Hw(i,n),ge("tildes",i),i=Bw(i,n),ge("xrange",i),i=Vw(i,n),ge("stars",i),i),Fe=i=>!i||i.toLowerCase()==="x"||i==="*",Hw=(i,n)=>i.trim().split(/\s+/).map(r=>Uw(r,n)).join(" "),Uw=(i,n)=>{let r=n.loose?Te[Oe.TILDELOOSE]:Te[Oe.TILDE];return i.replace(r,(u,a,o,h,g)=>{ge("tilde",i,u,a,o,h,g);let _;return Fe(a)?_="":Fe(o)?_=`>=${a}.0.0 <${+a+1}.0.0-0`:Fe(h)?_=`>=${a}.${o}.0 <${a}.${+o+1}.0-0`:g?(ge("replaceTilde pr",g),_=`>=${a}.${o}.${h}-${g} <${a}.${+o+1}.0-0`):_=`>=${a}.${o}.${h} <${a}.${+o+1}.0-0`,ge("tilde return",_),_})},Gw=(i,n)=>i.trim().split(/\s+/).map(r=>Ww(r,n)).join(" "),Ww=(i,n)=>{ge("caret",i,n);let r=n.loose?Te[Oe.CARETLOOSE]:Te[Oe.CARET],u=n.includePrerelease?"-0":"";return i.replace(r,(a,o,h,g,_)=>{ge("caret",i,a,o,h,g,_);let l;return Fe(o)?l="":Fe(h)?l=`>=${o}.0.0${u} <${+o+1}.0.0-0`:Fe(g)?o==="0"?l=`>=${o}.${h}.0${u} <${o}.${+h+1}.0-0`:l=`>=${o}.${h}.0${u} <${+o+1}.0.0-0`:_?(ge("replaceCaret pr",_),o==="0"?h==="0"?l=`>=${o}.${h}.${g}-${_} <${o}.${h}.${+g+1}-0`:l=`>=${o}.${h}.${g}-${_} <${o}.${+h+1}.0-0`:l=`>=${o}.${h}.${g}-${_} <${+o+1}.0.0-0`):(ge("no pr"),o==="0"?h==="0"?l=`>=${o}.${h}.${g}${u} <${o}.${h}.${+g+1}-0`:l=`>=${o}.${h}.${g}${u} <${o}.${+h+1}.0-0`:l=`>=${o}.${h}.${g} <${+o+1}.0.0-0`),ge("caret return",l),l})},Bw=(i,n)=>(ge("replaceXRanges",i,n),i.split(/\s+/).map(r=>kw(r,n)).join(" ")),kw=(i,n)=>{i=i.trim();let r=n.loose?Te[Oe.XRANGELOOSE]:Te[Oe.XRANGE];return i.replace(r,(u,a,o,h,g,_)=>{ge("xRange",i,u,a,o,h,g,_);let l=Fe(o),m=l||Fe(h),b=m||Fe(g),I=b;return a==="="&&I&&(a=""),_=n.includePrerelease?"-0":"",l?a===">"||a==="<"?u="<0.0.0-0":u="*":a&&I?(m&&(h=0),g=0,a===">"?(a=">=",m?(o=+o+1,h=0,g=0):(h=+h+1,g=0)):a==="<="&&(a="<",m?o=+o+1:h=+h+1),a==="<"&&(_="-0"),u=`${a+o}.${h}.${g}${_}`):m?u=`>=${o}.0.0${_} <${+o+1}.0.0-0`:b&&(u=`>=${o}.${h}.0${_} <${o}.${+h+1}.0-0`),ge("xRange return",u),u})},Vw=(i,n)=>(ge("replaceStars",i,n),i.trim().replace(Te[Oe.STAR],"")),zw=(i,n)=>(ge("replaceGTE0",i,n),i.trim().replace(Te[n.includePrerelease?Oe.GTE0PRE:Oe.GTE0],"")),Yw=i=>(n,r,u,a,o,h,g,_,l,m,b,I,R)=>(Fe(u)?r="":Fe(a)?r=`>=${u}.0.0${i?"-0":""}`:Fe(o)?r=`>=${u}.${a}.0${i?"-0":""}`:h?r=`>=${r}`:r=`>=${r}${i?"-0":""}`,Fe(l)?_="":Fe(m)?_=`<${+l+1}.0.0-0`:Fe(b)?_=`<${l}.${+m+1}.0-0`:I?_=`<=${l}.${m}.${b}-${I}`:i?_=`<${l}.${m}.${+b+1}-0`:_=`<=${_}`,`${r} ${_}`.trim()),Xw=(i,n,r)=>{for(let u=0;u<i.length;u++)if(!i[u].test(n))return!1;if(n.prerelease.length&&!r.includePrerelease){for(let u=0;u<i.length;u++)if(ge(i[u].semver),i[u].semver!==nu.ANY&&i[u].semver.prerelease.length>0){let a=i[u].semver;if(a.major===n.major&&a.minor===n.minor&&a.patch===n.patch)return!0}return!1}return!0}});var Wr=P((px,th)=>{var Br=Symbol("SemVer ANY"),kr=class{static get ANY(){return Br}constructor(n,r){if(r=Kw(r),n instanceof kr){if(n.loose===!!r.loose)return n;n=n.value}iu("comparator",n,r),this.options=r,this.loose=!!r.loose,this.parse(n),this.semver===Br?this.value="":this.value=this.operator+this.semver.version,iu("comp",this)}parse(n){let r=this.options.loose?Jf[Zf.COMPARATORLOOSE]:Jf[Zf.COMPARATOR],u=n.match(r);if(!u)throw new TypeError(`Invalid comparator: ${n}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new Qf(u[2],this.options.loose):this.semver=Br}toString(){return this.value}test(n){if(iu("Comparator.test",n,this.options.loose),this.semver===Br||n===Br)return!0;if(typeof n=="string")try{n=new Qf(n,this.options)}catch{return!1}return ru(n,this.operator,this.semver,this.options)}intersects(n,r){if(!(n instanceof kr))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new eh(n.value,r).test(this.value);if(n.operator==="")return n.value===""?!0:new eh(this.value,r).test(n.semver);let u=(this.operator===">="||this.operator===">")&&(n.operator===">="||n.operator===">"),a=(this.operator==="<="||this.operator==="<")&&(n.operator==="<="||n.operator==="<"),o=this.semver.version===n.semver.version,h=(this.operator===">="||this.operator==="<=")&&(n.operator===">="||n.operator==="<="),g=ru(this.semver,"<",n.semver,r)&&(this.operator===">="||this.operator===">")&&(n.operator==="<="||n.operator==="<"),_=ru(this.semver,">",n.semver,r)&&(this.operator==="<="||this.operator==="<")&&(n.operator===">="||n.operator===">");return u||a||o&&h||g||_}};th.exports=kr;var Kw=Mr(),{re:Jf,t:Zf}=bn(),ru=Qo(),iu=Fr(),Qf=Pe(),eh=lt()});var Vr=P((dx,nh)=>{var Jw=lt(),Zw=(i,n,r)=>{try{n=new Jw(n,r)}catch{return!1}return n.test(i)};nh.exports=Zw});var ih=P((gx,rh)=>{var Qw=lt(),eb=(i,n)=>new Qw(i,n).set.map(r=>r.map(u=>u.value).join(" ").trim().split(" "));rh.exports=eb});var oh=P((vx,sh)=>{var tb=Pe(),nb=lt(),rb=(i,n,r)=>{let u=null,a=null,o=null;try{o=new nb(n,r)}catch{return null}return i.forEach(h=>{o.test(h)&&(!u||a.compare(h)===-1)&&(u=h,a=new tb(u,r))}),u};sh.exports=rb});var ah=P((mx,uh)=>{var ib=Pe(),sb=lt(),ob=(i,n,r)=>{let u=null,a=null,o=null;try{o=new sb(n,r)}catch{return null}return i.forEach(h=>{o.test(h)&&(!u||a.compare(h)===1)&&(u=h,a=new ib(u,r))}),u};uh.exports=ob});var fh=P((_x,lh)=>{var su=Pe(),ub=lt(),ch=Hr(),ab=(i,n)=>{i=new ub(i,n);let r=new su("0.0.0");if(i.test(r)||(r=new su("0.0.0-0"),i.test(r)))return r;r=null;for(let u=0;u<i.set.length;++u){let a=i.set[u],o=null;a.forEach(h=>{let g=new su(h.semver.version);switch(h.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!o||ch(g,o))&&(o=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${h.operator}`)}}),o&&(!r||ch(r,o))&&(r=o)}return r&&i.test(r)?r:null};lh.exports=ab});var ph=P((yx,hh)=>{var cb=lt(),lb=(i,n)=>{try{return new cb(i,n).range||"*"}catch{return null}};hh.exports=lb});var fs=P((Ex,mh)=>{var fb=Pe(),dh=Wr(),{ANY:hb}=dh,pb=lt(),db=Vr(),gh=Hr(),vh=ss(),gb=us(),vb=os(),mb=(i,n,r,u)=>{i=new fb(i,u),n=new pb(n,u);let a,o,h,g,_;switch(r){case">":a=gh,o=gb,h=vh,g=">",_=">=";break;case"<":a=vh,o=vb,h=gh,g="<",_="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(db(i,n,u))return!1;for(let l=0;l<n.set.length;++l){let m=n.set[l],b=null,I=null;if(m.forEach(R=>{R.semver===hb&&(R=new dh(">=0.0.0")),b=b||R,I=I||R,a(R.semver,b.semver,u)?b=R:h(R.semver,I.semver,u)&&(I=R)}),b.operator===g||b.operator===_||(!I.operator||I.operator===g)&&o(i,I.semver))return!1;if(I.operator===_&&h(i,I.semver))return!1}return!0};mh.exports=mb});var yh=P((wx,_h)=>{var _b=fs(),yb=(i,n,r)=>_b(i,n,">",r);_h.exports=yb});var wh=P((bx,Eh)=>{var Eb=fs(),wb=(i,n,r)=>Eb(i,n,"<",r);Eh.exports=wb});var Ch=P((Sx,Sh)=>{var bh=lt(),bb=(i,n,r)=>(i=new bh(i,r),n=new bh(n,r),i.intersects(n));Sh.exports=bb});var xh=P((Cx,Oh)=>{var Sb=Vr(),Cb=ct();Oh.exports=(i,n,r)=>{let u=[],a=null,o=null,h=i.sort((m,b)=>Cb(m,b,r));for(let m of h)Sb(m,n,r)?(o=m,a||(a=m)):(o&&u.push([a,o]),o=null,a=null);a&&u.push([a,null]);let g=[];for(let[m,b]of u)m===b?g.push(m):!b&&m===h[0]?g.push("*"):b?m===h[0]?g.push(`<=${b}`):g.push(`${m} - ${b}`):g.push(`>=${m}`);let _=g.join(" || "),l=typeof n.raw=="string"?n.raw:String(n);return _.length<l.length?_:n}});var Th=P((Ox,Ph)=>{var Ah=lt(),hs=Wr(),{ANY:ou}=hs,zr=Vr(),uu=ct(),Ob=(i,n,r={})=>{if(i===n)return!0;i=new Ah(i,r),n=new Ah(n,r);let u=!1;e:for(let a of i.set){for(let o of n.set){let h=xb(a,o,r);if(u=u||h!==null,h)continue e}if(u)return!1}return!0},xb=(i,n,r)=>{if(i===n)return!0;if(i.length===1&&i[0].semver===ou){if(n.length===1&&n[0].semver===ou)return!0;r.includePrerelease?i=[new hs(">=0.0.0-0")]:i=[new hs(">=0.0.0")]}if(n.length===1&&n[0].semver===ou){if(r.includePrerelease)return!0;n=[new hs(">=0.0.0")]}let u=new Set,a,o;for(let R of i)R.operator===">"||R.operator===">="?a=Ih(a,R,r):R.operator==="<"||R.operator==="<="?o=Rh(o,R,r):u.add(R.semver);if(u.size>1)return null;let h;if(a&&o){if(h=uu(a.semver,o.semver,r),h>0)return null;if(h===0&&(a.operator!==">="||o.operator!=="<="))return null}for(let R of u){if(a&&!zr(R,String(a),r)||o&&!zr(R,String(o),r))return null;for(let H of n)if(!zr(R,String(H),r))return!1;return!0}let g,_,l,m,b=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,I=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;b&&b.prerelease.length===1&&o.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(let R of n){if(m=m||R.operator===">"||R.operator===">=",l=l||R.operator==="<"||R.operator==="<=",a){if(I&&R.semver.prerelease&&R.semver.prerelease.length&&R.semver.major===I.major&&R.semver.minor===I.minor&&R.semver.patch===I.patch&&(I=!1),R.operator===">"||R.operator===">="){if(g=Ih(a,R,r),g===R&&g!==a)return!1}else if(a.operator===">="&&!zr(a.semver,String(R),r))return!1}if(o){if(b&&R.semver.prerelease&&R.semver.prerelease.length&&R.semver.major===b.major&&R.semver.minor===b.minor&&R.semver.patch===b.patch&&(b=!1),R.operator==="<"||R.operator==="<="){if(_=Rh(o,R,r),_===R&&_!==o)return!1}else if(o.operator==="<="&&!zr(o.semver,String(R),r))return!1}if(!R.operator&&(o||a)&&h!==0)return!1}return!(a&&l&&!o&&h!==0||o&&m&&!a&&h!==0||I||b)},Ih=(i,n,r)=>{if(!i)return n;let u=uu(i.semver,n.semver,r);return u>0?i:u<0||n.operator===">"&&i.operator===">="?n:i},Rh=(i,n,r)=>{if(!i)return n;let u=uu(i.semver,n.semver,r);return u<0?i:u>0||n.operator==="<"&&i.operator==="<="?n:i};Ph.exports=Ob});var Nh=P((xx,Lh)=>{var au=bn();Lh.exports={re:au.re,src:au.src,tokens:au.t,SEMVER_SPEC_VERSION:$r().SEMVER_SPEC_VERSION,SemVer:Pe(),compareIdentifiers:es().compareIdentifiers,rcompareIdentifiers:es().rcompareIdentifiers,parse:Sn(),valid:Zl(),clean:ef(),inc:nf(),diff:cf(),major:ff(),minor:pf(),patch:gf(),prerelease:mf(),compare:ct(),rcompare:yf(),compareLoose:wf(),compareBuild:is(),sort:Of(),rsort:Af(),gt:Hr(),lt:ss(),eq:rs(),neq:Zo(),gte:os(),lte:us(),cmp:Qo(),coerce:qf(),Comparator:Wr(),Range:lt(),satisfies:Vr(),toComparators:ih(),maxSatisfying:oh(),minSatisfying:ah(),minVersion:fh(),validRange:ph(),outside:fs(),gtr:yh(),ltr:wh(),intersects:Ch(),simplifyRange:xh(),subset:Th()}});var xe=P(An=>{"use strict";var Dh=An&&An.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(An,"__esModule",{value:!0});An.getCoreVersion=void 0;var qh=Dh(require("path")),$h=Dh(require("fs")),Ab=Nh(),Ib=require("@serverless-devs/core"),cu=qh.default.join(Ib.getRootHome(),"cache","core"),Fh=qh.default.join(cu,"package.json");function Rb(){if($h.default.existsSync(Fh)){var i=require("@serverless-devs/core/package.json").version,n=Mh();return Ab.gt(n,i)?require(cu):require("@serverless-devs/core")}return require("@serverless-devs/core")}function Mh(){return $h.default.existsSync(cu)?require(Fh).version:void 0}An.getCoreVersion=Mh;An.default=Rb()});var jh=P((Ix,Pb)=>{Pb.exports={name:"@serverless-devs/s",version:"2.0.97-beta.10",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"MIT",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",prewatch:"rm -rf lib/* && cp -r ./src/daemon ./lib",watch:"tsc -w",test:"npx jest",prebuild:"rm -rf lib/*",build:"tsc && cp -r ./src/daemon ./lib",postbuild:"./shell/postbuild.sh","test:cov":"jest --coverage",lint:"npm run typecheck && f2elint scan -i src",fix:"f2elint fix",typecheck:"npx tsc -p tsconfig.json --noEmit",update:"rm -rf yarn.lock && rm -rf package-lock.json && rm -rf node_modules && yarn",beta:"npm publish --tag=beta"},main:"./lib/index.js",bin:{s:"bin/s"},devDependencies:{"@serverless-devs/commander":"^6.0.0","@types/jest":"^27.0.1","@types/lodash":"^4.14.168","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1","babel-eslint":"^10.1.0",boxen:"^5.0.0",dotenv:"^10.0.0",esbuild:"^0.14.0",eslint:"^7.7.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2",husky:"^4.2.3",inquirer:"^8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.1.0","latest-version":"^5.1.0","lint-staged":"^10.0.8",lodash:"^4.17.20","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.0.1","ts-node":"^9.1.1","tty-table":"^4.1.5",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},jest:{coverageDirectory:"coverage",testEnvironment:"node",coverageProvider:"v8",preset:"ts-jest",testMatch:["**/test/**/*test.[jt]s"],setupFilesAfterEnv:["./jest.setup.ts"]},dependencies:{"@serverless-devs/core":"beta"}}});var ds=P(Bt=>{"use strict";var Hh=Bt&&Bt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.getHistoryFile=Bt.getHomeDir=void 0;var Tb=Hh(require("path")),Uh=Hh(xe()),ps=Uh.default.fse,Lb=Uh.default.getRootHome;function lu(){var i=Lb();return ps.existsSync(i)||ps.mkdirSync(i),i}Bt.getHomeDir=lu;function Gh(){var i=Tb.default.join(lu(),"history");return ps.existsSync(i)||ps.createFileSync(i),i}Bt.getHistoryFile=Gh;Bt.default={getHomeDir:lu,getHistoryFile:Gh}});var pu=P(Me=>{"use strict";var Nb=Me&&Me.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},Db=Me&&Me.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},fu=Me&&Me.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Me,"__esModule",{value:!0});Me.handlerProfileFile=Me.getConfig=Me.setConfig=void 0;var Wh=fu(require("path")),qb=fu(ds()),hu=fu(xe()),St=hu.default.fse,gs=hu.default.jsyaml,Bh=hu.default.getRootHome;function $b(i){var n=Vh();St.writeFileSync(n,gs.dump(i))}function kh(){var i=Vh();if(!St.existsSync(i))return{};try{var n=gs.load(St.readFileSync(i,"utf8"))||{};return n}catch(r){throw r}}function Vh(){var i=Wh.default.join(qb.default.getHomeDir(),"set-config.yml");return St.existsSync(i)||St.createFileSync(i),i}function zh(i,n){var r=kh();r[i]=n,$b(r)}Me.setConfig=zh;function Yh(i,n){var r=kh();return r[i]||n}Me.getConfig=Yh;function Xh(i){return Nb(this,void 0,void 0,function(){var n,r,u,a,o,h,g;return Db(this,function(_){switch(_.label){case 0:if(n=i.filePath||"set-config.yml",r=Wh.default.join(Bh(),n),u=St.existsSync(r),a={},u)return[3,5];o=Bh(),_.label=1;case 1:return _.trys.push([1,2,,4]),St.statSync(o),[3,4];case 2:return h=_.sent(),[4,St.mkdirSync(o)];case 3:return _.sent(),[3,4];case 4:return[3,6];case 5:try{a=gs.load(St.readFileSync(r,"utf8"))||{}}catch(l){throw l}_.label=6;case 6:return i.read?[2,a]:(g=i.configKey||"",a[g]=i.data,[4,St.writeFileSync(r,gs.dump(a))]);case 7:return _.sent(),[2,a]}})})}Me.handlerProfileFile=Xh;Me.default={setConfig:zh,getConfig:Yh,handlerProfileFile:Xh}});var Ct=P(j=>{"use strict";var Fb=j&&j.__createBinding||(Object.create?function(i,n,r,u){u===void 0&&(u=r),Object.defineProperty(i,u,{enumerable:!0,get:function(){return n[r]}})}:function(i,n,r,u){u===void 0&&(u=r),i[u]=n[r]}),Mb=j&&j.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),jb=j&&j.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var r in i)r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)&&Fb(n,i,r);return Mb(n,i),n},du=j&&j.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},gu=j&&j.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},vs=j&&j.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(j,"__esModule",{value:!0});j.emoji=j.mark=j.replaceTemplate=j.getTemplatekey=j.replaceFun=j.getLang=j.printn=j.checkTemplateFile=j.checkAndReturnTemplateFile=j.yamlLoad=j.getFolderSize=j.getVersion=j.getErrorMessage=j.bgRed=j.yellow=j.red=void 0;var be=vs(require("path")),Ze=vs(require("fs")),on=vs(Yn()),Hb=vs(require("os")),Ub=In(),_t=jb(xe()),Zn=_t.default.colors,Gb=_t.default.jsyaml,Wb=_t.default.makeUnderLine,Bb=_t.default.got,Kh=_t.default.isDebugMode,kb=_t.default.getMAC,Vb=_t.default.getYamlContent,zb=_t.default.isDocker,Yb=_t.default.isCiCdEnv,Jh=jh(),Xb=pu();j.red=Zn.hex("#fd5750");j.yellow=Zn.hex("#F3F99D");j.bgRed=Zn.hex("#000").bgHex("#fd5750");var Kb=function(i,n){if(!(zb()||Yb()))return Bb("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(i,"&code=TypeError&s=").concat(n),{timeout:2e3,json:!0}).then(function(r){var u=on.default.get(r.body,"shorturl");u&&console.log(`AI Tips:
35
+ You can try to solve the problem through: `.concat(Zn.underline(u),`
36
+ `))}).catch(function(){})},Jb=function(i){return du(void 0,void 0,void 0,function(){var n,r,u,a,o,h,g,_,l,m;return gu(this,function(b){switch(b.label){case 0:if(n={traceId:"",catchableError:!1},r=function(){try{return kb().replace(/:/g,"")}catch{return"unknown"}},u=(0,Xb.getConfig)("analysis"),u!=="disable"&&(n.traceId="".concat(r()).concat(Date.now())),a=Kh?Kh():void 0,a)return console.log(i),[2,n];o=i.message?i.message:"";try{h=JSON.parse(o)}catch{}return h&&h.tips?(console.log("".concat(Zn.hex("#000").bgYellow("WARNING:"),`
37
+ `)),console.log("".concat(h.message,`
38
+ `)),h.tips&&console.log("".concat((0,j.yellow)(Wb(h.tips)),`
39
+ `)),n.catchableError=!0,[3,6]):[3,1];case 1:if(console.log("".concat((0,j.bgRed)("ERROR:"),`
40
+ `).concat(o,`
41
+ `)),u==="disable")return[3,6];b.label=2;case 2:return b.trys.push([2,5,,6]),g=vu(),[4,Vb(g)];case 3:return _=b.sent(),l=on.default.get(on.default.first(on.default.values(on.default.get(_,"services"))),"component")||"serverless-devs",[4,Kb(l,o)];case 4:return b.sent(),[3,6];case 5:return m=b.sent(),[3,6];case 6:return[2,n]}})})};j.getErrorMessage=Jb;function Zb(){var i=(0,_t.getCoreVersion)(),n="".concat(process.platform,"-").concat(process.arch),r="node-".concat(process.version),u="core: ".concat(i),a="s-home: ".concat(_t.default.getRootHome()),o="".concat(Jh.name,": ").concat(Jh.version);return i?"".concat(o,", ").concat(u,", ").concat(a,", ").concat(n,", ").concat(r):"".concat(o,", ").concat(a,", ").concat(n,", ").concat(r)}j.getVersion=Zb;function Qb(i){return du(this,void 0,void 0,function(){function n(a){return du(this,void 0,void 0,function(){var o,h;return gu(this,function(g){switch(g.label){case 0:return o=Ze.default.lstatSync(a),typeof o!="object"?[2]:(r.set(o.ino,o.size),o.isDirectory()?(h=Ze.default.readdirSync(a),typeof h!="object"?[2]:[4,Promise.all(h.map(function(_){return n(be.default.join(a,_))}))]):[3,2]);case 1:g.sent(),g.label=2;case 2:return[2]}})})}var r,u;return gu(this,function(a){switch(a.label){case 0:return r=new Map,[4,n(i)];case 1:return a.sent(),u=Array.from(r.values()).reduce(function(o,h){return o+h},0),[2,u]}})})}j.getFolderSize=Qb;function Zh(i){var n=Ze.default.readFileSync(i,"utf8");try{return Gb.load(n)}catch{if(["-h","--help"].includes(process.argv[2]))return;var r=be.default.basename(i);new Ub.HumanError({errorMessage:"".concat(r," format is incorrect"),tips:"Please check the configuration of ".concat(r,", Serverless Devs' Yaml specification document can refer to\uFF1A").concat(Zn.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/yaml.md"))}),process.exit(1)}}j.yamlLoad=Zh;function Yr(i,n){n===void 0&&(n=!1);var r=Ze.default.readFileSync(i,"utf8"),u=n?JSON.parse(r):Zh(i);if(!u)return!1;for(var a in u)if(u[a].Component&&u[a].Provider&&u[a].Properties)return!0;return u.hasOwnProperty("edition")}function vu(){if(process.env.serverless_devs_temp_template)return process.env.serverless_devs_temp_template;var i=process.cwd(),n=process.argv.includes("-t")?"-t":process.argv.includes("--template")?"--template":null,r=n?process.argv.indexOf(n):-1;if(r!==-1){var u=r+1,a=process.argv[u];if(a&&(a.endsWith(".yaml")||a.endsWith(".yml")||a.endsWith(".json"))){var o=!!a.endsWith(".json");if(Ze.default.existsSync(be.default.join(i,a))&&Yr(be.default.join(i,a),o)){process.argv.splice(r,2);var h=JSON.parse(process.env.serverless_devs_temp_argv);return h.splice(h.indexOf(n),2),process.env.serverless_devs_temp_argv=JSON.stringify(h),process.env.serverless_devs_temp_template=be.default.join(i,a),be.default.join(i,a)}else if(Ze.default.existsSync(a)&&Yr(a,o)){process.argv.splice(r,2);var h=JSON.parse(process.env.serverless_devs_temp_argv);return h.splice(h.indexOf(n),2),process.env.serverless_devs_temp_argv=JSON.stringify(h),process.env.serverless_devs_temp_template=a,a}}}return Ze.default.existsSync(be.default.join(i,"s.yaml"))&&Yr(be.default.join(i,"s.yaml"))?(process.env.serverless_devs_temp_template=be.default.join(i,"s.yaml"),be.default.join(i,"s.yaml")):Ze.default.existsSync(be.default.join(i,"s.yml"))&&Yr(be.default.join(i,"s.yml"))?(process.env.serverless_devs_temp_template=be.default.join(i,"s.yml"),be.default.join(i,"s.yml")):Ze.default.existsSync(be.default.join(i,"s.json"))&&Yr(be.default.join(i,"s.json"),!0)?(process.env.serverless_devs_temp_template=be.default.join(i,"s.json"),be.default.join(i,"s.json")):null}j.checkAndReturnTemplateFile=vu;function Qh(i){return Ze.default.existsSync(i)?i:null}j.checkTemplateFile=Qh;function ep(i,n){n===void 0&&(n=" ");for(var r="",u=0;u<i;u++)r=r+n;return r}j.printn=ep;function tp(){return"en"}j.getLang=tp;function mu(i,n){var r=/\{\{(.*?)\}\}/g,u=i.match(r);if(u)for(var a=0;a<u.length;a++){var o=u[a].replace(/{{|}}/g,""),h=on.default.trim(o.split("|")[0]);n[h]&&(i=i.replace(u[a],n[h]))}return i}j.replaceFun=mu;function np(i){var n=/\{\{(.*?)\}\}/g,r=i.match(n);return r?r.filter(function(u){return u}).map(function(u){var a=u.replace(/{{|}}/g,""),o=a.split("|");return{name:on.default.trim(o[0]),desc:on.default.trim(o[1])}}):[]}j.getTemplatekey=np;function rp(i,n){i.forEach(function(r){if(Ze.default.existsSync(r)){var u=Ze.default.readFileSync(r,"utf-8"),a=mu(u,n);Ze.default.writeFileSync(r,a,"utf-8")}})}j.replaceTemplate=rp;function ip(i){if(!i)return i;var n=i.slice(-4);return"***********".concat(n)}j.mark=ip;function eS(i,n){return Hb.default.platform()==="win32"?n||"\u25C6":"".concat(i," ")}j.emoji=eS;j.default={checkAndReturnTemplateFile:vu,checkTemplateFile:Qh,printn:ep,mark:ip,getLang:tp,replaceTemplate:rp,replaceFun:mu,getTemplatekey:np}});var Rn=P(Qn=>{"use strict";var tS=Qn&&Qn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ServerlessError=void 0;var nS=tS(xe()),rS=nS.default.Logger,iS=new rS("S-CLI-ERROR"),sS=function(){function i(n,r,u){iS.error(n+": "+r,u),process.exit(1)}return i}();Qn.ServerlessError=sS});var sp=P(er=>{"use strict";var oS=er&&er.__extends||function(){var i=function(n,r){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");i(n,r);function u(){this.constructor=n}n.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}();Object.defineProperty(er,"__esModule",{value:!0});er.CommandError=void 0;var uS=Rn(),aS=function(i){oS(n,i);function n(r,u){return i.call(this,"Error",r,u)||this}return n}(uS.ServerlessError);er.CommandError=aS});var op=P(tr=>{"use strict";var cS=tr&&tr.__extends||function(){var i=function(n,r){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");i(n,r);function u(){this.constructor=n}n.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}();Object.defineProperty(tr,"__esModule",{value:!0});tr.ConfigDeleteError=void 0;var lS=Rn(),fS=function(i){cS(n,i);function n(r,u){return i.call(this,"Deletion failed",r,u)||this}return n}(lS.ServerlessError);tr.ConfigDeleteError=fS});var up=P(nr=>{"use strict";var hS=nr&&nr.__extends||function(){var i=function(n,r){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");i(n,r);function u(){this.constructor=n}n.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}();Object.defineProperty(nr,"__esModule",{value:!0});nr.ConfigError=void 0;var pS=Rn(),dS=function(i){hS(n,i);function n(r,u){return i.call(this,"Config failed",r,u)||this}return n}(pS.ServerlessError);nr.ConfigError=dS});var ap=P(rr=>{"use strict";var gS=rr&&rr.__extends||function(){var i=function(n,r){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");i(n,r);function u(){this.constructor=n}n.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}();Object.defineProperty(rr,"__esModule",{value:!0});rr.ConfigGetError=void 0;var vS=Rn(),mS=function(i){gS(n,i);function n(r,u){return i.call(this,"Get failed",r,u)||this}return n}(vS.ServerlessError);rr.ConfigGetError=mS});var cp=P(ir=>{"use strict";var _S=ir&&ir.__extends||function(){var i=function(n,r){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,a){u.__proto__=a}||function(u,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(u[o]=a[o])},i(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");i(n,r);function u(){this.constructor=n}n.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}();Object.defineProperty(ir,"__esModule",{value:!0});ir.InitError=void 0;var yS=Rn(),ES=function(i){_S(n,i);function n(r,u){return i.call(this,"Initialization failed",r,u)||this}return n}(yS.ServerlessError);ir.InitError=ES});var fp=P(Ot=>{"use strict";var wS=Ot&&Ot.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},bS=Ot&&Ot.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},SS=Ot&&Ot.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.HumanError=void 0;var lp=SS(xe()),CS=Ct(),OS=lp.default.colors,xS=function(){function i(n){var r=n.errorMessage,u=n.tips;this.errorMessage=r,console.log(`
42
+ `.concat((0,CS.bgRed)("ERROR:"))),console.log("TypeError: ".concat(r,`
43
+ `)),u&&console.log("".concat(OS.gray(u),`
44
+ `))}return i.prototype.report=function(n){return wS(this,void 0,void 0,function(){var r;return bS(this,function(u){switch(u.label){case 0:return r=n.error,[4,lp.default.report({type:"jsError",content:"".concat(this.errorMessage,"||").concat(r.stack)})];case 1:return u.sent(),[2]}})})},i}();Ot.HumanError=xS});var pp=P(sr=>{"use strict";var AS=sr&&sr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(sr,"__esModule",{value:!0});sr.HumanWarning=void 0;var IS=AS(xe()),hp=IS.default.colors,RS=function(){function i(n){var r=n.warningMessage,u=n.tips;console.log(`
45
+ `.concat(hp.hex("#000").bgYellow("WARNING:"))),console.log("".concat(r,`
46
+ `)),u&&console.log("".concat(hp.gray(u),`
47
+ `))}return i}();sr.HumanWarning=RS});var In=P(ue=>{"use strict";var PS=ue&&ue.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},TS=ue&&ue.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},LS=ue&&ue.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ue,"__esModule",{value:!0});ue.HandleError=ue.HumanWarning=ue.HumanError=ue.ServerlessError=ue.InitError=ue.ConfigGetError=ue.ConfigError=ue.ConfigDeleteError=ue.CommandError=void 0;var dp=Ct(),gp=LS(xe()),NS=Ct(),or=gp.default.colors,DS=gp.default.report,qS=sp();Object.defineProperty(ue,"CommandError",{enumerable:!0,get:function(){return qS.CommandError}});var $S=op();Object.defineProperty(ue,"ConfigDeleteError",{enumerable:!0,get:function(){return $S.ConfigDeleteError}});var FS=up();Object.defineProperty(ue,"ConfigError",{enumerable:!0,get:function(){return FS.ConfigError}});var MS=ap();Object.defineProperty(ue,"ConfigGetError",{enumerable:!0,get:function(){return MS.ConfigGetError}});var jS=cp();Object.defineProperty(ue,"InitError",{enumerable:!0,get:function(){return jS.InitError}});var HS=Rn();Object.defineProperty(ue,"ServerlessError",{enumerable:!0,get:function(){return HS.ServerlessError}});var US=fp();Object.defineProperty(ue,"HumanError",{enumerable:!0,get:function(){return US.HumanError}});var GS=pp();Object.defineProperty(ue,"HumanWarning",{enumerable:!0,get:function(){return GS.HumanWarning}});function _u(i,n){return"".concat(or.gray(i)).concat(or.gray.underline(n))}var WS=function(i){return PS(void 0,void 0,void 0,function(){var n,r,u,a,o,h;return TS(this,function(g){switch(g.label){case 0:return n=i.error,r=i.prefix,u=r===void 0?"Message:":r,console.log((0,dp.red)("\u2716 ".concat(u,`
48
+ `))),[4,(0,NS.getErrorMessage)(n)];case 1:return a=g.sent(),o=a.traceId,h=a.catchableError,h||(o&&console.log(or.gray("TraceId: ".concat(o))),console.log(or.gray("Environment: ".concat((0,dp.getVersion)()))),console.log(_u("Documents: ","https://www.serverless-devs.com")),console.log(_u("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),console.log(_u("Issues: ",`https://github.com/Serverless-Devs/Serverless-Devs/issues
49
+ `)),o&&console.log(or.gray("Please copy traceId: ".concat(o," and join Dingding group: 33947367 for consultation.")))),console.log(or.gray("You can run 's clean --all' to clean Serverless devs.")),o&&h?[4,DS({type:"jsError",content:"".concat(n.message,"||").concat(n.stack),traceId:o})]:[3,3];case 2:g.sent(),g.label=3;case 3:return[2]}})})};ue.HandleError=WS});var Ep=P(Qe=>{"use strict";var BS=Qe&&Qe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.extractTemplateInfo=Qe.isUrlFormat=Qe.getProjectNameFromUrl=Qe.parse=void 0;var kS=BS(require("url"));function vp(i){return kS.default.parse(i)}Qe.parse=vp;function mp(i){var n=i.lastIndexOf("/");return n&&n>=0&&(i=i.substr(n+1)),i.endsWith(".git")?i.substr(0,i.length-4):i}Qe.getProjectNameFromUrl=mp;function _p(i){return i.includes(":")||i.includes("/")}Qe.isUrlFormat=_p;function yp(i){var n=i.pathname||"",r=n.split("/"),u=r[1],a=r[3];return{host:i.host,ownerName:u,repoName:a,branch:"",hasSubPath:!1,subPath:"",zipFile:""}}Qe.extractTemplateInfo=yp;Qe.default={extractTemplateInfo:yp,getProjectNameFromUrl:mp,isUrlFormat:_p,parse:vp}});var ms=P(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.getServiceList=je.getServiceActions=je.getServiceInputs=je.getServiceConfigDetail=je.getServiceConfig=je.getSubcommand=void 0;function wp(i){var n=i.edition||"0.0.1";if(n==="0.0.1")return Object.keys(i).filter(function(u){return u!=="Global"});var r=i.services||{};return Object.keys(r)}je.getSubcommand=wp;function bp(i,n){var r=i.edition||"0.0.1";if(r==="0.0.1")return i[n];var u=i.services||{},a=u[n],o=a.provider?a.provider:i.provider,h=a.access?a.access:i.access,g=Object.assign({},a,{access:h,provider:o});return g}je.getServiceConfig=bp;function Sp(i){var n=i.Component||i.component,r=i.Provider||i.provider,u=i.Access||i.access||"default",a=i.autoCredential;return{name:n,provider:r,access:u,autoCredential:a}}je.getServiceConfigDetail=Sp;function Cp(i,n,r){if(n==="0.0.1"){var u=i.Properties,a=i.Params,o=i.Provider,h=i.Access,g=i.Component,_=i.ProjectName,l=r.credentials,m=r.method,b={Properties:u,Credentials:l,Project:{ProjectName:_,Component:g,Provider:o,AccessAlias:h||""},Command:m,Args:a||"",Path:{ConfigPath:process.env.templateFile||""}};return b}var I=i.props,R=i.params,H=i.provider,re=i.access,ae=i.component,Q=i.ProjectName,Se=i.appName,se=r.credentials,Ne=r.method,Ae={props:I,Properties:I,Credentials:se,credentials:se,appName:Se,Project:{ProjectName:Q,projectName:Q,component:ae,Component:ae,provider:H,Provider:H,accessAlias:re||"",AccessAlias:re||""},project:{component:ae,access:re||"",projectName:Q},command:Ne,Command:Ne,args:R||"",Args:R||"",argsObj:process.temp_params||[],ArgsObj:process.temp_params||[],path:{configPath:process.env.templateFile||""},Path:{ConfigPath:process.env.templateFile||""}};return Ae}je.getServiceInputs=Cp;function Op(i,n,r){var u=r.method;if(n==="0.0.1"){var a=i.Extends,o=a===void 0?{}:a,h=o[u];return h}var g=i.actions,_=g===void 0?{}:g,l=[];return Object.keys(_).forEach(function(m){var b=m.split("-"),I=_[m];if(b.length>1){var R=b[1];if(R===u){var H=b[0];I.forEach(function(re){var ae={Hook:re.run,Path:re.path,Pre:H==="pre"};l.push(ae)})}}else m===u&&I.forEach(function(re){var ae={Hook:re.run,Path:re.path,Pre:!1};l.push(ae)})}),l}je.getServiceActions=Op;function xp(i){var n=i.edition||"0.0.1";return n==="0.0.1"?i:i.services}je.getServiceList=xp;je.default={getSubcommand:wp,getServiceConfig:bp,getServiceConfigDetail:Sp,getServiceInputs:Cp,getServiceActions:Op,getServiceList:xp}});var Np=P(Le=>{"use strict";var VS=Le&&Le.__createBinding||(Object.create?function(i,n,r,u){u===void 0&&(u=r),Object.defineProperty(i,u,{enumerable:!0,get:function(){return n[r]}})}:function(i,n,r,u){u===void 0&&(u=r),i[u]=n[r]}),zS=Le&&Le.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),Ap=Le&&Le.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var r in i)r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)&&VS(n,i,r);return zS(n,i),n},Ip=Le&&Le.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},Rp=Le&&Le.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},YS=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Le,"__esModule",{value:!0});Le.Parse=void 0;var yu=Ap(require("fs")),Pp=Ap(require("path")),XS=ms(),KS=In(),Tp=Yn(),JS=YS(xe()),ZS=JS.default.jsyaml,QS=Yn(),Lp=new RegExp(/\$\{(.*)\}/,"i"),eC=new RegExp(/(.*)\((.*)\)/,"i"),tC=["[object Number]","[object Boolean]"],nC=function(){function i(n){if(this.path=n,this.parsedObj={},this.dependenciesMap={},this.globalJsonKeyMap={},this.globalKeyArr=[],this.magicVariablesArray=[],yu.existsSync(n))try{this.init(n)}catch(r){throw new Error(r.message)}}return i.prototype.getFileObj=function(n){var r={};try{var u=Pp.extname(n);(u.indexOf(".yaml")!==-1||u.indexOf(".yml")!==-1)&&(r=ZS.load(yu.readFileSync(n,"utf8"))),u.indexOf(".json")!==-1&&(r=JSON.parse(yu.readFileSync(n).toString()))}catch(a){(0,KS.HandleError)({error:a}).then(function(){return process.exit(1)})}return r},i.prototype.init=function(n){return Ip(this,void 0,void 0,function(){return Rp(this,function(r){return this.parsedObj=this.getFileObj(n),[2]})})},i.prototype.getOriginalParsedObj=function(){return this.parsedObj},i.prototype.findVariableValue=function(n){var r=n.variableName,u=n.type,a=n.funName,o=n.funVariable,h="";return u==="Literal"?this.globalJsonKeyMap[r]||this.globalJsonKeyMap["services.".concat(r)]||"${"+r+"}":u==="Fun"&&(a==="Env"||a==="env")?process.env[o]:u==="Fun"&&(a==="Path"||a==="path")?Pp.join(process.cwd(),o):u==="Fun"&&(a==="File"||a==="file")?this.getFileObj(o):h},i.prototype.generateMagicVariables=function(n,r,u){var a=this;return r===void 0&&(r=[]),u===void 0&&(u=""),Object.prototype.toString.call(n)==="[object Object]"?(u!==""&&(u="".concat(u,".")),Object.keys(n).map(function(o){var h="".concat(u).concat(o),g=n[o];r.push(h),r.concat(a.generateMagicVariables(g,r,"".concat(h))),a.globalJsonKeyMap[h]=g})):Object.prototype.toString.call(n)==="[object Array]"?n.forEach(function(o,h){var g="".concat(u,"[").concat(h,"]"),_="".concat(u,"[").concat(h-n.length,"]");r.push(g),r.push(_),r.concat(a.generateMagicVariables(o,r,"".concat(g))),r.concat(a.generateMagicVariables(o,r,"".concat(_))),a.globalJsonKeyMap[g]=o,a.globalJsonKeyMap[_]=o}):r=[],r},i.prototype.isProjectProperties=function(n,r){var u=!1;return r==="Properties"&&this.globalJsonKeyMap["".concat(n,".").concat(r)]&&(u=!0),u},i.prototype.iteratorToSetValue=function(n,r,u){var a=this;if(tC.includes(Object.prototype.toString.call(n)))return n;if(Object.prototype.toString.call(n)==="[object String]"){var o=n.match(Lp);if(o){var h=o[1],g={variableName:h,type:"Literal",funName:null,funVariable:""},_=h.match(eC);if(_)g.funName=_[1],g.funVariable=_[2],g.type="Fun";else{var l=this.dependenciesMap[r];l||(l={});var m=h.split(".")[0];l[m]=1,this.dependenciesMap[r]=l}var b=(0,Tp.startsWith)(h,"env.")?(0,Tp.get)(process,h):this.findVariableValue(g);return Object.prototype.toString.call(b)==="[object String]"?n.replace(Lp,b):b}return(!this.dependenciesMap[r]||Object.keys(this.dependenciesMap[r]).length==0)&&(this.dependenciesMap[r]={}),n}if(Object.prototype.toString.call(n)==="[object Array]")return n.map(function(I){return a.iteratorToSetValue(I,r)});if(Object.prototype.toString.call(n)==="[object Object]")return Object.keys(n).forEach(function(I){n[I]=a.iteratorToSetValue(n[I],r,u||I)}),n},i.prototype.replaceVariable=function(n){var r=this,u=(0,XS.getServiceList)(n);return Object.keys(u).forEach(function(a){var o=u[a];u[a]=r.iteratorToSetValue(o,a)}),n.services?n.services=u:n=u,(0,QS.cloneDeep)(n)},i.prototype.getRealVariables=function(n){return Ip(this,void 0,void 0,function(){return Rp(this,function(r){return this.globalKeyArr=this.generateMagicVariables(n),[2,this.replaceVariable(n)]})})},i}();Le.Parse=nC});var Dp=P(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.Analysis=void 0;var rC=function(){function i(n,r){this.parsedObj=n,this.dependenciesMap=r,this.componentOrderKeyMap={}}return i.prototype.getComponentOrderKeyMap=function(n){var r=this;n.forEach(function(u){r.componentOrderKeyMap[u]=1})},i.prototype.calculateOrderNumber=function(n){var r=this;n.forEach(function(u){var a=r.dependenciesMap[u];Object.keys(a).forEach(function(o){r.componentOrderKeyMap[o]&&(r.componentOrderKeyMap[o]+=a[o])})})},i.prototype.getProjectOrder=function(){var n=this,r=Object.keys(this.dependenciesMap).filter(function(a){return a!=="Global"});this.getComponentOrderKeyMap(r),this.calculateOrderNumber(r);var u=Object.keys(this.componentOrderKeyMap).map(function(a){return{name:a,order:n.componentOrderKeyMap[a]}});return u.sort(function(a,o){return o.order-a.order}).map(function(a){return a.name})},i}();_s.Analysis=rC});var ys=P(xt=>{"use strict";var iC=xt&&xt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xt,"__esModule",{value:!0});xt.version=xt.Analysis=xt.Parse=void 0;var sC=Np();Object.defineProperty(xt,"Parse",{enumerable:!0,get:function(){return sC.Parse}});var oC=Dp();Object.defineProperty(xt,"Analysis",{enumerable:!0,get:function(){return oC.Analysis}});var uC=ms();Object.defineProperty(xt,"version",{enumerable:!0,get:function(){return iC(uC).default}})});var Eu=P(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.UPDATE_CHECK_INTERVAL=un.DEFAULT_REGIRSTRY=un.PROCESS_ENV_TEMPLATE_NAME=void 0;un.PROCESS_ENV_TEMPLATE_NAME="templateFile";un.DEFAULT_REGIRSTRY="http://registry.devsapp.cn/simple";un.UPDATE_CHECK_INTERVAL=1e3*60*60*12});var qp=P(At=>{"use strict";var wu=At&&At.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},bu=At&&At.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Su=At&&At.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(At,"__esModule",{value:!0});At.PluginExeCute=void 0;var Xr=Su(require("fs")),Cu=Su(require("path")),aC=Su(xe()),cC=aC.default.getRootHome,Es=Cu.default.join(cC(),"plugins"),lC=function(){function i(n){this.pluginConfig=n,Xr.default.existsSync(Es)||Xr.default.mkdirSync(Es);var r=this.pluginConfig.name;this.pluginPath=Cu.default.join(Es,r)}return i.prototype.init=function(){return wu(this,void 0,void 0,function(){var n;return bu(this,function(r){switch(r.label){case 0:return n=this.pluginConfig.name,this.pluginExist()?[3,2]:[4,this.downLoadPlugin(n)];case 1:r.sent(),r.label=2;case 2:return[2]}})})},i.prototype.pluginExist=function(){return Xr.default.existsSync(this.pluginPath)},i.prototype.downLoadPlugin=function(n){return wu(this,void 0,void 0,function(){var r;return bu(this,function(u){return r=Cu.default.join(Es,n),Xr.default.existsSync(r)||Xr.default.mkdirSync(r),[2]})})},i.prototype.loadPlugin=function(){return wu(this,void 0,void 0,function(){var n;return bu(this,function(r){return n=require(this.pluginPath),[2,n]})})},i}();At.PluginExeCute=lC});var Mp=P(It=>{"use strict";var Kr=It&&It.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},Jr=It&&It.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},$p=It&&It.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(It,"__esModule",{value:!0});It.Hook=void 0;var Fp=$p(require("fs")),fC=$p(require("path")),ur=Zr(),hC=qp(),pC=require("child_process").spawnSync,dC=function(){function i(n){var r=this;n===void 0&&(n=[]),this.preHooks=[],this.afterHooks=[],n.forEach(function(u){u.Pre?r.preHooks.push(u):r.afterHooks.push(u)})}return i.prototype.executePreHook=function(){return Kr(this,void 0,void 0,function(){var n,r;return Jr(this,function(u){switch(u.label){case 0:if(!(this.preHooks.length>0))return[3,5];ur.logger.info("Start the pre-action"),n=0,u.label=1;case 1:return n<this.preHooks.length?(r=n,ur.logger.info("Action: ".concat(this.preHooks[r].Hook||this.preHooks[r].Plugin)),[4,this.executeByConfig(this.preHooks[r])]):[3,4];case 2:u.sent(),u.label=3;case 3:return n++,[3,1];case 4:ur.logger.info("End the pre-action"),u.label=5;case 5:return[2]}})})},i.prototype.executeAfterHook=function(){return Kr(this,void 0,void 0,function(){var n,r;return Jr(this,function(u){switch(u.label){case 0:if(!(this.afterHooks.length>0))return[3,5];ur.logger.info("Start the after-action"),n=0,u.label=1;case 1:return n<this.afterHooks.length?(r=n,ur.logger.info("Action: ".concat(this.afterHooks[r].Hook||this.afterHooks[r].Plugin)),[4,this.executeByConfig(this.afterHooks[r])]):[3,4];case 2:u.sent(),u.label=3;case 3:return n++,[3,1];case 4:ur.logger.info("End the after-action"),u.label=5;case 5:return[2]}})})},i.prototype.commandExecute=function(n,r){return Kr(this,void 0,void 0,function(){var u,a,o;return Jr(this,function(h){if(u=process.cwd(),a=r?fC.default.resolve(u,r):u,Fp.default.existsSync(a)&&Fp.default.lstatSync(a).isDirectory()&&(process.env["next-command-execute-flag"]="true",o=pC(n,[],{cwd:a,stdio:"inherit",shell:!0}),o&&o.status!==0))throw new Error("Action [".concat(n,"] run error."));return[2]})})},i.prototype.pluginExecute=function(n){return Kr(this,void 0,void 0,function(){var r,u;return Jr(this,function(a){switch(a.label){case 0:return r=new hC.PluginExeCute({name:n}),[4,r.init()];case 1:return a.sent(),[4,r.loadPlugin()];case 2:return u=a.sent(),u.apply(null,[]),[2]}})})},i.prototype.executeByConfig=function(n){return Kr(this,void 0,void 0,function(){return Jr(this,function(r){switch(r.label){case 0:return n.Hook?[4,this.commandExecute(n.Hook,n.Path)]:[3,2];case 1:return r.sent(),[3,4];case 2:return n.Plugin?[4,this.pluginExecute(n.Plugin)]:[3,4];case 3:r.sent(),r.label=4;case 4:return[2]}})})},i}();It.Hook=dC});var Vp=P(Be=>{"use strict";var Rt=Be&&Be.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},Pt=Be&&Be.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ou=Be&&Be.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Be,"__esModule",{value:!0});Be.ComponentExeCute=Be.generateSynchronizeComponentExeList=Be.synchronizeExecuteComponentList=void 0;var xu=Ou(require("fs")),jp=Ou(require("path")),gC=Eu(),Au=ys(),Iu=Zr(),vC=Mp(),ws=In(),Qr=Ou(xe()),mC=Qr.default.getCredential,_C=Qr.default.loadComponent,yC=Qr.default.jsyaml,Hp=Qr.default.colors,Up=Qr.default.getRootHome,Gp=Au.version.getServiceConfigDetail,EC=Au.version.getServiceInputs,wC=Au.version.getServiceActions,Wp=jp.default.join(Up(),"components");function Bp(i,n,r){return i===void 0&&(i=[]),n===void 0&&(n=0),r===void 0&&(r={}),Rt(this,void 0,void 0,function(){var u=this;return Pt(this,function(a){switch(a.label){case 0:return n>=0&&n<i.length?[4,i[n]().then(function(o){var h=o.name,g=o.data;return Rt(u,void 0,void 0,function(){return Pt(this,function(_){switch(_.label){case 0:return h&&(r[h]=g),[4,Bp(i,n+1,r)];case 1:return[2,_.sent()]}})})})]:[3,2];case 1:return[2,a.sent()];case 2:return[2,r]}})})}Be.synchronizeExecuteComponentList=Bp;function bC(i,n){var r=this,u=i.list,a=i.parse,o=i.parsedObj,h=i.method,g=i.params;return u.map(function(_){return function(){return new Promise(function(l,m){return Rt(r,void 0,void 0,function(){var b,I,R;return Pt(this,function(H){switch(H.label){case 0:return o.Params=g||"",Iu.logger.info("Start executing project ".concat(_)),[4,n(a,_,o)];case 1:return b=H.sent(),process.env.serverless_devs_temp_access&&(b.Access=process.env.serverless_devs_temp_access,b.access=process.env.serverless_devs_temp_access),I=new kp({componentConfig:b,method:h,version:o.edition}),[4,I.init()];case 2:return R=H.sent(),o.edition?o.services[_].output=R:o[_].Output=R,Iu.logger.info("Project ".concat(_,` successfully to execute
50
+ `)),l({name:_,data:R}),[2]}})})})}})}Be.generateSynchronizeComponentExeList=bC;var kp=function(){function i(n){this.version="0.0.1",this.componentConfig=n.componentConfig,this.method=n.method,this.version=n.version,this.customerCommandName=n.customerCommandName,xu.default.existsSync(Wp)||xu.default.mkdirSync(Wp)}return i.prototype.init=function(){return Rt(this,void 0,void 0,function(){var n;return Pt(this,function(r){switch(r.label){case 0:return n=this,[4,this.getCredentials()];case 1:return n.credentials=r.sent()||{},[4,this.startExecute()];case 2:return[2,r.sent()]}})})},i.prototype.getCredentials=function(){return Rt(this,void 0,void 0,function(){var n,r,u,a,o,h,g,_;return Pt(this,function(l){switch(l.label){case 0:if(n=Gp(this.componentConfig),r=n.access,u=n.autoCredential,u===!1)return[2,null];l.label=1;case 1:return l.trys.push([1,5,,6]),a=jp.default.join(Up(),"access.yaml"),o=yC.load(xu.default.readFileSync(a,"utf8")||"{}"),o[r]?[4,mC(r)]:[3,3];case 2:return g=l.sent(),[3,4];case 3:g={},l.label=4;case 4:return h=g,this.componentConfig.access=r,[2,h];case 5:return _=l.sent(),[3,6];case 6:return[2,{}]}})})},i.prototype.loadExtends=function(){var n=wC(this.componentConfig,this.version,{method:this.method}),r=null;return n&&(r=new vC.Hook(n)),r},i.prototype.loadPreExtends=function(n){return Rt(this,void 0,void 0,function(){return Pt(this,function(r){switch(r.label){case 0:return n?[4,n.executePreHook()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},i.prototype.loadAfterExtend=function(n){return Rt(this,void 0,void 0,function(){return Pt(this,function(r){switch(r.label){case 0:return n?[4,n.executeAfterHook()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},i.prototype.invokeMethod=function(n,r,u){return Rt(this,void 0,void 0,function(){var o,a,o,h;return Pt(this,function(g){switch(g.label){case 0:if(!this.customerCommandName)return[3,6];if(!n[r])return[3,5];g.label=1;case 1:return g.trys.push([1,3,,5]),[4,n[r](u)];case 2:return o=g.sent(),[2,o];case 3:return a=g.sent(),[4,(0,ws.HandleError)({error:a,prefix:"Project ".concat(this.componentConfig.ProjectName," failed to execute:")})];case 4:return g.sent(),process.exit(101),[3,5];case 5:new ws.HumanError({errorMessage:"The [".concat(this.method,"] command was not found."),tips:"Please check the component ".concat(this.componentConfig.component," has the ").concat(this.method," method. Serverless Devs documents\uFF1A").concat(Hp.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/command"))}),process.exit(100),g.label=6;case 6:if(!n[r])return[3,12];g.label=7;case 7:return g.trys.push([7,9,,11]),[4,n[r](u)];case 8:return o=g.sent(),[2,o];case 9:return h=g.sent(),[4,(0,ws.HandleError)({error:h,prefix:"Project ".concat(this.componentConfig.ProjectName," failed to execute:")})];case 10:return g.sent(),process.exit(101),[3,11];case 11:return[3,13];case 12:new ws.HumanWarning({warningMessage:"The [".concat(this.method,"] command was not found."),tips:"Please check the component ".concat(this.componentConfig.component," has the ").concat(this.method," method, Serverless Devs documents\uFF1A").concat(Hp.underline("https://github.com/Serverless-Devs/Serverless-Devs/blob/master/docs/zh/command"))}),g.label=13;case 13:return[2]}})})},i.prototype.executeCommand=function(){return Rt(this,void 0,void 0,function(){var n,r,u,a,o;return Pt(this,function(h){switch(h.label){case 0:return n=EC(this.componentConfig,this.version,{method:this.method,credentials:this.credentials}),r=Gp(this.componentConfig).name,u=Iu.configSet.getConfig("registry")||gC.DEFAULT_REGIRSTRY,[4,_C(r,u)];case 1:return a=h.sent(),[4,this.invokeMethod(a,this.method,n)];case 2:return o=h.sent(),[2,o]}})})},i.prototype.startExecute=function(){return Rt(this,void 0,void 0,function(){var n,r,u,a,o;return Pt(this,function(h){switch(h.label){case 0:return n={},r=process.env.temp_params||"",u=r.includes("--help")||r.includes("-h"),process.env["skip-actions"]==="true"||u?(o=null,[3,3]):[3,1];case 1:return[4,this.loadExtends()];case 2:o=h.sent(),h.label=3;case 3:return a=o,[4,this.loadPreExtends(a)];case 4:return h.sent(),[4,this.executeCommand()];case 5:return n=h.sent(),[4,this.loadAfterExtend(a)];case 6:return h.sent(),[2,n]}})})},i}();Be.ComponentExeCute=kp});var Kp=P(Tt=>{"use strict";var Ru=Tt&&Tt.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},Pu=Tt&&Tt.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},SC=Tt&&Tt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.CommandManager=void 0;var zp=ys(),CC=ms(),ei=Zr(),Tu=Vp(),ar=Ct(),Yp=SC(xe()),Xp=Yp.default.colors,OC=Yp.default.ansiEscapes,xC=In(),Lu=Yn(),AC=function(){function i(n,r,u,a){this.templateFile=n,this.method=r,this.customerCommandName=u,this.deployParams=a}return i.prototype.assemblyProjectConfig=function(n,r,u){return Ru(this,void 0,void 0,function(){var a,o;return Pu(this,function(h){switch(h.label){case 0:return[4,n.getRealVariables(u)];case 1:return a=h.sent(),o=(0,CC.getServiceConfig)(a,r),o.appName=a.name,o.ProjectName=r,this.deployParams&&(o.params=this.deployParams),[2,o]}})})},i.prototype.warnEnvironmentVariables=function(n){return Ru(this,void 0,void 0,function(){var r,u,h,a,o,h;return Pu(this,function(g){if(r=n==null?void 0:n.services,(0,Lu.isEmpty)(r))return[2];u={};for(h in r)a=(0,Lu.get)(r,[h,"props","function","environmentVariables"],{}),u=Object.assign({},u,a);o=[];for(h in u)(0,Lu.isNil)(u[h])&&o.push(h);return o.length>0&&ei.logger.warning("The value of environment variable [".concat(o.join(", "),"] is undefined.")),[2]})})},i.prototype.init=function(){return Ru(this,void 0,void 0,function(){var n,r,u,a,o,h,g,_,l,m,R,b,I,R,H,re,ae;return Pu(this,function(Q){switch(Q.label){case 0:return Q.trys.push([0,10,,12]),process.stdout.write(`Starting ...
51
+ `),n=(0,ar.checkTemplateFile)(this.templateFile),n?(r={},u=new zp.Parse(n),a=u.getOriginalParsedObj(),[4,u.getRealVariables(a)]):[3,8];case 1:return o=Q.sent(),[4,this.warnEnvironmentVariables(o)];case 2:return Q.sent(),h=new zp.Analysis(o,u.dependenciesMap),g=h.getProjectOrder(),this.customerCommandName||g.length===1?(_=g[0],[4,this.assemblyProjectConfig(u,this.customerCommandName||_,a)]):[3,5];case 3:return l=Q.sent(),process.env.serverless_devs_temp_access&&(l.Access=process.env.serverless_devs_temp_access,l.access=process.env.serverless_devs_temp_access),m=new Tu.ComponentExeCute({componentConfig:l,method:this.method,version:a.edition,customerCommandName:this.customerCommandName}),process.stdout.write(OC.eraseLines(2)),[4,m.init()];case 4:return R=Q.sent(),R&&(r[l.ProjectName]=R),[3,7];case 5:return b=this.deployParams||"",ei.logger.info("It is detected that your project has the following projects < ".concat(g.join(",")," > to be execute")),I=(0,Tu.generateSynchronizeComponentExeList)({list:g,parse:u,parsedObj:a,method:this.method,params:b},this.assemblyProjectConfig.bind(this)),[4,(0,Tu.synchronizeExecuteComponentList)(I)];case 6:R=Q.sent();for(H in R)g.includes(H)&&R[H]&&(r[H]=R[H]);Q.label=7;case 7:return re=JSON.parse(JSON.stringify(r)),Object.keys(r).length===0?ei.logger.success("End of method: ".concat(this.method)):ei.logger.output(re),[3,9];case 8:ei.logger.error(`Failed to execute:
47
52
 
48
- `+(0,un.emoji)("\u274C")+" Message: Cannot find s.yaml / s.yml / template.yaml / template.yml file, please check the directory "+this.templateFile+`
49
- `+(0,un.emoji)("\u{1F9ED}")+` If you want to use Serverless Devs, you should have a s.yaml or use [s cli] command.
50
- `+(0,un.emoji)("1\uFE0F\u20E3")+" Yaml document: "+zp.underline("https://github.com/Serverless-Devs/docs/blob/master/zh/yaml.md")+`
51
- `+(0,un.emoji)("2\uFE0F\u20E3")+` Cli document: [s cli -h]
52
- `+(0,un.emoji)("\u{1F608}")+" If you have questions, please tell us: "+zp.underline("https://github.com/Serverless-Devs/Serverless-Devs/issues")+`
53
- `),process.exit(1),X.label=9;case 9:return[3,12];case 10:return ue=X.sent(),[4,new dC.HandleError({error:ue,prefix:"Failed to execute:"}).report(ue)];case 11:return X.sent(),process.exit(1),[3,12];case 12:return[2]}})})},i}();It.CommandManager=gC});var Yp=R(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.CommandManager=void 0;var mC=Xp();Object.defineProperty(Es,"CommandManager",{enumerable:!0,get:function(){return mC.CommandManager}})});var Du=R(Zn=>{"use strict";var vC=Zn&&Zn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Zn,"__esModule",{value:!0});var Kp=vC(Ae()),_C=Kp.default.Logger,yC=Kp.default.spinner,Ir=new _C("S-CLI"),EC=function(){function i(){}return i.log=function(r){Ir.log(r)},i.info=function(r){Ir.info(r)},i.debug=function(r){Ir.debug(r)},i.error=function(r){Ir.error(r)},i.warning=function(r){Ir.warn(r)},i.success=function(r){Ir.log(r,"green")},i.spinner=function(r){return yC(r)},i.output=function(r){return Ir.output(r)},i}();Zn.default=EC});var $u=R((Hx,qu)=>{var wC=require("fs"),Jp=require("path"),bC=require("os");function Zp(i){console.log(`[dotenv][DEBUG] ${i}`)}var SC=`
54
- `,CC=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,OC=/\\n/g,xC=/\r\n|\n|\r/;function Qp(i,r){let n=Boolean(r&&r.debug),u={};return i.toString().split(xC).forEach(function(a,o){let p=a.match(CC);if(p!=null){let g=p[1],v=p[2]||"",c=v.length-1,_=v[0]==='"'&&v[c]==='"';v[0]==="'"&&v[c]==="'"||_?(v=v.substring(1,c),_&&(v=v.replace(OC,SC))):v=v.trim(),u[g]=v}else n&&Zp(`did not match key and value when parsing line ${o+1}: ${a}`)}),u}function AC(i){return i[0]==="~"?Jp.join(bC.homedir(),i.slice(1)):i}function IC(i){let r=Jp.resolve(process.cwd(),".env"),n="utf8",u=!1;i&&(i.path!=null&&(r=AC(i.path)),i.encoding!=null&&(n=i.encoding),i.debug!=null&&(u=!0));try{let a=Qp(wC.readFileSync(r,{encoding:n}),{debug:u});return Object.keys(a).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?u&&Zp(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=a[o]}),{parsed:a}}catch(a){return{error:a}}}qu.exports.config=IC;qu.exports.parse=Qp});var ud=R(ee=>{"use strict";var sr=ee&&ee.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},or=ee&&ee.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Qn=ee&&ee.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ee,"__esModule",{value:!0});ee.recordCommandHistory=ee.registerVerbose=ee.registerUniversalCommand=ee.registerCustomerCommand=ee.registerCommandChecker=ee.createCustomerCommand=ee.getCustomerCommandInfo=ee.getParsedTemplateObj=ee.getCommandDetail=ee.createUniversalCommand=ee.setEnvbyDotenv=void 0;var RC=Qn(require("os")),Rr=Qn(require("path")),ed=Ko(),PC=Yp(),Fu=vs(),TC=wu(),LC=Qn(ps()),ws=Qn(Du()),td=Gt(),NC=zr(),bs=Qn(Ae()),DC=bs.default.loadComponent,ju=bs.default.fse,qC=bs.default.jsyaml,$C=bs.default.getYamlContent,FC=Fu.version.getSubcommand,jC=Fu.version.getServiceConfig;function MC(i){return sr(this,void 0,void 0,function(){var r,n,u,a,o,p;return or(this,function(g){switch(g.label){case 0:return r=Rr.default.dirname(i),$u().config({path:Rr.default.join(r,".env")}),[4,$C(i)];case 1:n=g.sent(),u=n.services;for(o in u)if(p=u[o],p.component==="fc"){a=(0,NC.get)(p,"props.function.codeUri");break}return a&&(a=Rr.default.isAbsolute(a)?a:Rr.default.join(r,a),$u().config({path:Rr.default.join(a,".env")})),[2]}})})}ee.setEnvbyDotenv=MC;function Mu(i,r,n){for(var u=new ed.Command(i),a=[],o=[],p=r,g=!1,v=0;v<process.argv.length;v++)g?o.push(process.argv[v]):a.push(process.argv[v]),process.argv[v]===i&&(g=!0);return o.length!==0&&(process.env.temp_params=o.join(" "),process.temp_params=o),process.argv=a,u.description(n||"").action(function(){var c=process.env[TC.PROCESS_ENV_TEMPLATE_NAME];if(c){var _=new PC.CommandManager(c,i,p,process.env.temp_params);_.init()}}),u}ee.createUniversalCommand=Mu;function HC(i,r,n){return sr(this,void 0,void 0,function(){var u;return or(this,function(a){return u=[],[2,u]})})}ee.getCommandDetail=HC;function Hu(i){return sr(this,void 0,void 0,function(){var r,n,u;return or(this,function(a){switch(a.label){case 0:return r=new Fu.Parse(i),n=r.getOriginalParsedObj(),[4,r.getRealVariables(n)];case 1:return u=a.sent(),[2,u]}})})}ee.getParsedTemplateObj=Hu;function Uu(i){return FC(i)}ee.getCustomerCommandInfo=Uu;function UC(i,r){var n=i.length,u=new Array(r-n).fill(" ");return""+i+u.join("")+" : "}function rd(i){return sr(this,void 0,void 0,function(){var r,n,u,a,o,p=this;return or(this,function(g){switch(g.label){case 0:return r=[],[4,Hu(i)];case 1:return n=g.sent(),u=Uu(n),a=u.map(function(v){return sr(p,void 0,void 0,function(){var c;return or(this,function(_){return c=jC(n,v),[2,{projectName:v,projectDocDetail:c}]})})}),[4,Promise.all(a)];case 2:return o=g.sent(),o.forEach(function(v){var c=v.projectName,_=v.projectDocDetail,b=new ed.Command(c),I=(0,td.emoji)("\u{1F449}")+" This is a customer command please use [s "+c+" -h] obtain the documentation";b.description(I);var P=process.argv.slice(2),H=P[0],re=P[1];H===c&&re&&re.indexOf("-")!==0&&b.addCommand(Mu(re,c)),b.option("-h, --help","Print usage document"),b.action(function(){return sr(p,void 0,void 0,function(){var ue,X,Ie,pe,le,ve,K,K,Pr;return or(this,function(Rt){switch(Rt.label){case 0:return ue=_.component,[4,DC(ue)];case 1:return X=Rt.sent(),X?X.__doc&&X.__doc().length>1685?(Ie=X.__doc(c),ws.default.info(`
55
- `+Ie),[3,6]):[3,2]:[3,7];case 2:return Rt.trys.push([2,5,,6]),pe=Rr.default.join(X.__path,"publish.yml"),[4,ju.existsSync(pe)];case 3:return Rt.sent()||(pe=Rr.default.join(X.__path,"publish.yaml")),[4,qC.load(ju.readFileSync(pe,"utf8"))];case 4:if(le=Rt.sent(),console.log(`
56
- `+le.Name+"@"+le.Version+": "+le.Description+`
57
- `),ve=0,le.Commands){for(K in le.Commands)K.length>ve&&(ve=K.length);for(K in le.Commands)console.log(" "+UC(K,ve)+" "+le.Commands[K]);console.log(`
58
- `+(le.HomePage?(0,td.emoji)("\u{1F9ED}")+" More information: "+le.HomePage+`
59
- `:""))}return[3,6];case 5:return Pr=Rt.sent(),ws.default.error("Help information could not be found"),[3,6];case 6:return[3,8];case 7:ws.default.error("Help information could not be found"),Rt.label=8;case 8:return[2]}})})}),r.push(b)}),[2,r]}})})}ee.createCustomerCommand=rd;function nd(i){i.on("command:*",function(r){var n=i.commands.map(function(u){return u.name()});n.includes(r[0])||(ws.default.error(" error: unknown command "+r[0]),i.help())})}ee.registerCommandChecker=nd;function id(i,r){return sr(this,void 0,void 0,function(){var n;return or(this,function(u){switch(u.label){case 0:return r?[4,rd(r)]:[3,2];case 1:n=u.sent(),n.forEach(function(a){i.addCommand(a)}),u.label=2;case 2:return[2]}})})}ee.registerCustomerCommand=id;function sd(i,r){return sr(this,void 0,void 0,function(){var n,u;return or(this,function(a){switch(a.label){case 0:return r?[4,Hu(r)]:[3,2];case 1:n=a.sent(),u=Uu(n),process.argv[2]&&!u.includes(process.argv[2])&&!["-h","--help"].includes(process.argv[2])&&i.addCommand(Mu(process.argv[2])),a.label=2;case 2:return[2]}})})}ee.registerUniversalCommand=sd;function GC(i){process.argv.includes("--verbose")&&(process.env.VERBOSE=i.verbose)}ee.registerVerbose=GC;function od(i){var r=LC.default.getHistoryFile();ju.appendFileSync(r,i.join(",")+RC.default.EOL)}ee.recordCommandHistory=od;ee.default={registerCommandChecker:nd,recordCommandHistory:od,registerCustomerCommand:id,registerUniversalCommand:sd}});var ad=R(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});Gu.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var ld=R(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.default={clean_up_the_environment:"Clean up the environment",display_help_for_command:"Display help for command",remove_components:"Remove component (like: fc, fc@0.0.1)",delete_the_file_under_the_cache:"Delete the <dirname> file in the cache",record_your_log_information:"Do you record your log information?",init_pproject_deploy_tip:"Do you want to deploy the project immediately?",tip_for_a_serverless_project:"A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'",create_a_new_project:"No Serverless-Devs project is currently detected. Do you want to create a new project?",en:"English (en)",zh:"Chinese (zh)",select_current_language:"Please select current language","app-tip":"Hello, serverlesser. Which template do you like?","template-tip":"Which template do you like?","fc-runtime-starter":"fc-runtime-starter - Deploy FC function in 5 minutes","fc-custom-container-stater":"fc-custom-container-stater - Deploy FC function with custom-container",web:"web-framework-stater-Quickly deploy a web framework","static-site":"static-website-stater-Quickly deploy a static website","best-practice":"serverless-best-practice-Quickly experience serverless best practices","devs-template":"Serverless Develop scaffold","fc-http-nodejs":"fc-http-nodejs - Deploy FC nodejs12 runtime function","fc-http-python":"fc-http-python - Deploy FC python3 runtime function","fc-http-java":"fc-http-java - Deploy FC java8 runtime function","fc-custom-container-event-python3":"fc-custom-container-event-python3 - Deploy python3 event-triggered application","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - Deploy cpp event-triggered application","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - Deploy springboot HTTP Request-triggered application","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - Deploy dotnetcore HTTP Request-triggered application","express-starter":"express-starter - Deploy express application","koa-starter":"koa-starter - Deploy koa application","nuxtjs-starter":"nuxtjs-starter - Deploy nuxtjs application","eggjs-starter":"eggjs-starter - Deploy eggjs application","flask-starter":"flask-starter - Deploy flask application","SpringBoot-starter":"SpringBoot-starter - Deploy SpringBoot application","Zblog-starter":"Zblog-starter - Deploy Zblog application","website-starter":"website-starter - Deploy static website","react-starter":"react-starter - Deploy React.js application","vue-starter":"vue-starter - Deploy Vue.js application",puppeteer:"puppeteer - Deploy screenshot application base on puppeteer + fc",ffmpeg:"ffmpeg - Deploy audio and video processing application base on ffmpeg + fc",pdf2Img:"pdf2Img - Deploy pdf to images application",tensorflow:"tensorflow - Deploy tensorflow application",todoList:"todoList - Deploy todoList application"}});var fd=R(ei=>{"use strict";var cd=ei&&ei.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ei,"__esModule",{value:!0});var WC=Gt(),BC=cd(ad()),kC=cd(ld()),Bu={en:kC.default,zh:BC.default},VC=function(i){var r=(0,WC.getLang)(),n=Bu[r]?Bu[r][i]:Bu.en[i];return n||i};ei.default=VC});var Kn=R(_e=>{"use strict";var Bt=_e&&_e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_e,"__esModule",{value:!0});_e.getYamlPath=_e.i18n=_e.logger=_e.registerAction=_e.urlParser=_e.storage=_e.configSet=_e.common=void 0;var hd=Bt(require("path")),zC=Bt(Ae()),pd=zC.default.fse,XC=Gt();Object.defineProperty(_e,"common",{enumerable:!0,get:function(){return Bt(XC).default}});var YC=mu();Object.defineProperty(_e,"configSet",{enumerable:!0,get:function(){return Bt(YC).default}});var KC=ps();Object.defineProperty(_e,"storage",{enumerable:!0,get:function(){return Bt(KC).default}});var JC=yp();Object.defineProperty(_e,"urlParser",{enumerable:!0,get:function(){return Bt(JC).default}});var ZC=ud();Object.defineProperty(_e,"registerAction",{enumerable:!0,get:function(){return Bt(ZC).default}});var QC=Du();Object.defineProperty(_e,"logger",{enumerable:!0,get:function(){return Bt(QC).default}});var eO=fd();Object.defineProperty(_e,"i18n",{enumerable:!0,get:function(){return Bt(eO).default}});var tO=function(i,r){var n=hd.default.join(i,r+".yaml"),u=hd.default.join(i,r+".yml"),a=pd.existsSync(n)?n:pd.existsSync(u)?u:void 0;return a};_e.getYamlPath=tO});var gd=R(kt=>{"use strict";var rO=kt&&kt.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},nO=kt&&kt.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ku=kt&&kt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(kt,"__esModule",{value:!0});var Vu=Kn(),zu=ku(require("path")),Xu=ku(require("fs")),Ss=Gt(),dd=Or(),ti=ku(Ae()),iO=ti.default.getCredential,sO=ti.default.loadComponent,oO=ti.default.colors,Yu=ti.default.jsyaml,uO=ti.default.getRootHome,aO=function(){function i(r){this.inputs=r}return i.prototype.getTempCommandStr=function(r,n){var u=r.length,a=new Array(n-u).fill(" ");return""+r+a.join("")+" : "},i.prototype.init=function(){return rO(this,void 0,void 0,function(){var r,n,u,a,o,p,g,v,c,_,b,I,P,H,re,ue,ue,X,Ie,pe,le,ve;return nO(this,function(K){switch(K.label){case 0:r="",K.label=1;case 1:K.trys.push([1,21,,23]),n=this.inputs,u=n.component,a=n.command,o=n.access,p=n.props,g={},K.label=2;case 2:return K.trys.push([2,5,,6]),v=zu.default.join(uO(),"access.yaml"),c=Yu.load(Xu.default.readFileSync(v,"utf8")||"{}"),c[o]?[4,iO(o)]:[3,4];case 3:g=K.sent(),K.label=4;case 4:return[3,6];case 5:return _=K.sent(),g={},[3,6];case 6:return[4,sO(u,null,{access:o})];case 7:return b=K.sent(),b?(a||(b.index?a="index":a="cli-help-options"),a!=="cli-help-options"?[3,13]:b.__doc&&b.__doc().length>1685?(I=b.__doc(),console.log(""+I),[3,12]):[3,8]):[3,20];case 8:return K.trys.push([8,11,,12]),P=zu.default.join(b.__path,"publish.yml"),[4,Xu.default.existsSync(P)];case 9:return K.sent()||(P=zu.default.join(b.__path,"publish.yaml")),[4,Yu.load(Xu.default.readFileSync(P,"utf8"))];case 10:if(H=K.sent(),console.log(`
60
- `+H.Name+"@"+H.Version+": "+H.Description+`
61
- `),re=0,H.Commands){for(ue in H.Commands)ue.length>re&&(re=ue.length);for(ue in H.Commands)console.log(" "+this.getTempCommandStr(ue,re)+" "+H.Commands[ue]);console.log(`
62
- `+(H.HomePage?(0,Ss.emoji)("\u{1F9ED}")+" More information: "+H.HomePage+`
63
- `:""))}return[3,12];case 11:return X=K.sent(),Vu.logger.error("Help information could not be found"),[3,12];case 12:return[2,"help"];case 13:if(!b[a])return[3,19];Ie={};try{Ie=JSON.parse(p||"{}")}catch{throw new Error("-p/--prop parameter format error")}K.label=14;case 14:return K.trys.push([14,16,,18]),[4,b[a]({props:Ie,Properties:Ie,Credentials:g,credentials:g,appName:"default",Project:{ProjectName:"default",projectName:"default",component:u,Component:u,provider:void 0,Provider:void 0,accessAlias:o||"default",AccessAlias:o||"default"},project:{component:"",access:o||"default",projectName:""},command:a,Command:a,args:process.env.temp_params,argsObj:process.temp_params,Args:process.env.temp_params,ArgsObj:process.temp_params,path:{configPath:""},Path:{ConfigPath:""}})];case 15:return r=K.sent()||{},pe=Yu.dump(JSON.parse(JSON.stringify(r))),Vu.logger.success(Object.keys(r).length===0?"End of method: "+a:pe),[3,18];case 16:return le=K.sent(),[4,new dd.HandleError({error:le,prefix:"Failed to execute:"}).report(le)];case 17:return K.sent(),process.exit(1),[3,18];case 18:return[3,20];case 19:Vu.logger.error(`Failed to execute:
53
+ `.concat((0,ar.emoji)("\u274C")," Message: Cannot find s.yaml / s.yml / template.yaml / template.yml file, please check the directory ").concat(this.templateFile,`
54
+ `).concat((0,ar.emoji)("\u{1F9ED}"),` If you want to use Serverless Devs, you should have a s.yaml or use [s cli] command.
55
+ `).concat((0,ar.emoji)("1\uFE0F\u20E3")," Yaml document: ").concat(Xp.underline("https://github.com/Serverless-Devs/docs/blob/master/zh/yaml.md"),`
56
+ `).concat((0,ar.emoji)("2\uFE0F\u20E3"),` Cli document: [s cli -h]
57
+ `).concat((0,ar.emoji)("\u{1F608}")," If you have questions, please tell us: ").concat(Xp.underline("https://github.com/Serverless-Devs/Serverless-Devs/issues"),`
58
+ `)),process.exit(1),Q.label=9;case 9:return[3,12];case 10:return ae=Q.sent(),[4,(0,xC.HandleError)({error:ae,prefix:"Failed to execute:"})];case 11:return Q.sent(),process.exit(1),[3,12];case 12:return[2]}})})},i}();Tt.CommandManager=AC});var Jp=P(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.CommandManager=void 0;var IC=Kp();Object.defineProperty(bs,"CommandManager",{enumerable:!0,get:function(){return IC.CommandManager}})});var Nu=P(ti=>{"use strict";var RC=ti&&ti.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ti,"__esModule",{value:!0});var Zp=RC(xe()),PC=Zp.default.Logger,TC=Zp.default.spinner,Pn=new PC("S-CLI"),LC=function(){function i(){}return i.log=function(n){Pn.log(n)},i.info=function(n){Pn.info(n)},i.debug=function(n){Pn.debug(n)},i.error=function(n){Pn.error(n)},i.warning=function(n){Pn.warn(n)},i.success=function(n){Pn.log(n,"green")},i.spinner=function(n){return TC(n)},i.output=function(n){return Pn.output(n)},i}();ti.default=LC});var qu=P((Qx,Du)=>{var NC=require("fs"),Qp=require("path"),DC=require("os");function ed(i){console.log(`[dotenv][DEBUG] ${i}`)}var qC=`
59
+ `,$C=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,FC=/\\n/g,MC=/\r\n|\n|\r/;function td(i,n){let r=Boolean(n&&n.debug),u={};return i.toString().split(MC).forEach(function(a,o){let h=a.match($C);if(h!=null){let g=h[1],_=h[2]||"",l=_.length-1,m=_[0]==='"'&&_[l]==='"';_[0]==="'"&&_[l]==="'"||m?(_=_.substring(1,l),m&&(_=_.replace(FC,qC))):_=_.trim(),u[g]=_}else r&&ed(`did not match key and value when parsing line ${o+1}: ${a}`)}),u}function jC(i){return i[0]==="~"?Qp.join(DC.homedir(),i.slice(1)):i}function HC(i){let n=Qp.resolve(process.cwd(),".env"),r="utf8",u=!1;i&&(i.path!=null&&(n=jC(i.path)),i.encoding!=null&&(r=i.encoding),i.debug!=null&&(u=!0));try{let a=td(NC.readFileSync(n,{encoding:r}),{debug:u});return Object.keys(a).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?u&&ed(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=a[o]}),{parsed:a}}catch(a){return{error:a}}}Du.exports.config=HC;Du.exports.parse=td});var fd=P(Y=>{"use strict";var UC=Y&&Y.__createBinding||(Object.create?function(i,n,r,u){u===void 0&&(u=r),Object.defineProperty(i,u,{enumerable:!0,get:function(){return n[r]}})}:function(i,n,r,u){u===void 0&&(u=r),i[u]=n[r]}),GC=Y&&Y.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),WC=Y&&Y.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var r in i)r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)&&UC(n,i,r);return GC(n,i),n},an=Y&&Y.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},cn=Y&&Y.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ni=Y&&Y.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Y,"__esModule",{value:!0});Y.recordCommandHistory=Y.registerVerbose=Y.registerUniversalCommand=Y.registerCustomerCommand=Y.registerCommandChecker=Y.createCustomerCommand=Y.getCustomerCommandInfo=Y.getParsedTemplateObj=Y.getCommandDetail=Y.createUniversalCommand=Y.setEnvbyDotenv=void 0;var BC=ni(require("os")),Tn=ni(require("path")),nd=Ko(),kC=Jp(),$u=ys(),VC=Eu(),zC=ni(ds()),Fu=ni(Nu()),rd=Ct(),ke=WC(Yn()),ri=ni(xe()),YC=ri.default.makeUnderLine,id=ri.default.loadComponent,XC=ri.default.fse,Mu=ri.default.getYamlContent,sd=ri.default.publishHelp,KC=$u.version.getSubcommand,JC=$u.version.getServiceConfig;function ZC(i){return an(this,void 0,void 0,function(){var n,r,u,a,o,h;return cn(this,function(g){switch(g.label){case 0:return n=Tn.default.dirname(i),qu().config({path:Tn.default.join(n,".env")}),[4,Mu(i)];case 1:r=g.sent(),u=r.services;for(a in u)o=u[a],h=(0,ke.get)(o,"props.function.codeUri"),h&&(h=Tn.default.isAbsolute(h)?h:Tn.default.join(n,h),qu().config({path:Tn.default.join(h,".env")}));return[2]}})})}Y.setEnvbyDotenv=ZC;function ju(i,n,r){for(var u=new nd.Command(i),a=[],o=[],h=n,g=!1,_=0;_<process.argv.length;_++)g?o.push(process.argv[_]):a.push(process.argv[_]),process.argv[_]===i&&(g=!0);return o.length!==0&&(process.env.temp_params=o.join(" "),process.temp_params=o),process.argv=a,u.description(r||"").action(function(){var l=process.env[VC.PROCESS_ENV_TEMPLATE_NAME];if(l){var m=new kC.CommandManager(l,i,h,process.env.temp_params);m.init()}}),u}Y.createUniversalCommand=ju;function QC(i,n,r){return an(this,void 0,void 0,function(){var u;return cn(this,function(a){return u=[],[2,u]})})}Y.getCommandDetail=QC;function Hu(i){return an(this,void 0,void 0,function(){var n,r,u;return cn(this,function(a){switch(a.label){case 0:return n=new $u.Parse(i),r=n.getOriginalParsedObj(),[4,n.getRealVariables(r)];case 1:return u=a.sent(),[2,u]}})})}Y.getParsedTemplateObj=Hu;function Uu(i){return KC(i)}Y.getCustomerCommandInfo=Uu;function od(i){return an(this,void 0,void 0,function(){var n,r,u,a,o,h,g,_=this;return cn(this,function(l){switch(l.label){case 0:return n=[],[4,Hu(i)];case 1:return r=l.sent(),u=Uu(r),a=u.map(function(m){return an(_,void 0,void 0,function(){var b;return cn(this,function(I){return b=JC(r,m),[2,{projectName:m,projectDocDetail:b}]})})}),[4,Promise.all(a)];case 2:return o=l.sent(),(0,ke.forEach)(o,function(m){var b=m.projectName,I=m.projectDocDetail,R=new nd.Command(b);R._componentName=(0,ke.get)(I,"component");var H=process.argv.slice(2),re=H[0],ae=H[1];re===b&&ae&&ae.indexOf("-")!==0&&R.addCommand(ju(ae,b)),R.option("-h, --help","Print usage document"),R.action(function(){return an(_,void 0,void 0,function(){var Q,Se,se,Ne,Ae;return cn(this,function(K){switch(K.label){case 0:return Q=I.component,[4,id(Q)];case 1:if(Se=K.sent(),!Se)return[3,6];K.label=2;case 2:return K.trys.push([2,4,,5]),[4,Mu(Tn.default.join(Se.__path,"publish.yml"))];case 3:return se=K.sent(),console.log("".concat((0,rd.emoji)("\u{1F680}")," ").concat(se.Name,"@").concat(se.Version,": ").concat(se.Description,`
60
+ `)),se.Commands&&(Ne=sd.maxLen(se.Commands),console.log(sd.helpInfo(se.Commands,"Commands",Ne)),console.log("".concat(se.HomePage?"".concat((0,rd.emoji)("\u{1F9ED}")," ").concat(YC("More information: "+se.HomePage)," ")+`
61
+ `:""))),[3,5];case 4:return Ae=K.sent(),Fu.default.error("Help information could not be found"),[3,5];case 5:return[3,7];case 6:Fu.default.error("Help information could not be found"),K.label=7;case 7:return[2]}})})}),n.push(R)}),(0,ke.size)(o)!==1?[3,5]:[4,id((0,ke.get)(ke.default.first(o),"projectDocDetail.component"))];case 3:return h=l.sent(),[4,Mu(Tn.default.join(h.__path,"publish.yml"))];case 4:g=l.sent(),ke.default.set(ke.default.first(n),"_componentPublish",g),l.label=5;case 5:return[2,n]}})})}Y.createCustomerCommand=od;function ud(i){i.on("command:*",function(n){var r=i.commands.map(function(u){return u.name()});r.includes(n[0])||(Fu.default.error(" error: unknown command ".concat(n[0])),i.help())})}Y.registerCommandChecker=ud;function ad(i,n){return an(this,void 0,void 0,function(){var r;return cn(this,function(u){switch(u.label){case 0:return n?[4,od(n)]:[3,2];case 1:return r=u.sent(),(0,ke.forEach)(r,function(a){i.addCommand(a)}),(0,ke.size)(r)===1?[2,ke.default.get(ke.default.get(ke.default.first(r),"_componentPublish"),"Commands",[])]:[2,ke.default.map(r,function(a){var o;return o={},o["".concat(a._name," [options]")]="Please use [s ".concat(a._name," -h] obtain the documentation"),o})];case 2:return[2]}})})}Y.registerCustomerCommand=ad;function cd(i,n){return an(this,void 0,void 0,function(){var r,u;return cn(this,function(a){switch(a.label){case 0:return n?[4,Hu(n)]:[3,2];case 1:r=a.sent(),u=Uu(r),process.argv[2]&&!u.includes(process.argv[2])&&!["-h","--help"].includes(process.argv[2])&&i.addCommand(ju(process.argv[2])),a.label=2;case 2:return[2]}})})}Y.registerUniversalCommand=cd;function eO(i){process.argv.includes("--verbose")&&(process.env.VERBOSE=i.verbose)}Y.registerVerbose=eO;function ld(i){var n=zC.default.getHistoryFile();XC.appendFileSync(n,i.join(",")+BC.default.EOL)}Y.recordCommandHistory=ld;Y.default={registerCommandChecker:ud,recordCommandHistory:ld,registerCustomerCommand:ad,registerUniversalCommand:cd}});var hd=P(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});Gu.default={clean_up_the_environment:"\u6E05\u7406\u73AF\u5883",display_help_for_command:"\u663E\u793A\u547D\u4EE4\u5E2E\u52A9",remove_components:"\u5220\u9664\u7EC4\u4EF6",delete_the_file_under_the_cache:"\u5220\u9664\u7F13\u5B58\u91CC\u7684\u7684<dirname>\u6587\u4EF6",record_your_log_information:"\u662F\u5426\u8BB0\u5F55\u60A8\u7684\u65E5\u5FD7\u4FE1\u606F\uFF1F",init_pproject_deploy_tip:"\u662F\u5426\u7ACB\u5373\u90E8\u7F72\u8BE5\u9879\u76EE\uFF1F",tip_for_a_serverless_project:"\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u4E0B\u5DF2\u5B58\u5728\u4E00\u4E2AServerless-Devs\u9879\u76EE\uFF0C\u8BF7\u901A\u8FC7 's deploy' \u8FDB\u884C\u90E8\u7F72\u6216\u901A\u8FC7 's -h' \u83B7\u53D6\u66F4\u591A\u4FE1\u606F",create_a_new_project:"\u672A\u68C0\u6D4B\u5230 Serverless-Devs \u9879\u76EE\uFF0C\u662F\u5426\u65B0\u5EFA\u4E00\u4E2A\u9879\u76EE\uFF1F",en:"English (en)",zh:"\u4E2D\u6587 (zh)",select_current_language:"\u8BF7\u9009\u62E9\u5F53\u524D\u8BED\u8A00","app-tip":"\u8BF7\u9009\u62E9\u60A8\u5E0C\u671B\u521B\u5EFA\u7684 Serverless-Devs \u5E94\u7528","template-tip":"\u8BF7\u9009\u62E9\u60A8\u559C\u6B22\u7684\u6A21\u7248","fc-runtime-starter":"fc-runtime-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A FC \u51FD\u6570","fc-custom-container-stater":"fc-custom-container-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A custom-container \u5E94\u7528",web:"web-framework-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Web \u6846\u67B6","static-site":"static-website-stater - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","best-practice":"serverless-best-practice - \u5FEB\u901F\u4F53\u9A8C Serverless \u6700\u4F73\u5B9E\u8DF5","devs-template":"Serverless Devs \u5F00\u53D1\u6A21\u677F","fc-http-nodejs":"fc-http-nodejs - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nodejs12 \u51FD\u6570","fc-http-python":"fc-http-python - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A python3 \u51FD\u6570","fc-http-java":"fc-http-java - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A java8 \u51FD\u6570","fc-custom-container-event-python3":"fc-custom-container-event-python3 - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 python3 \u5E94\u7528","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7\u4E8B\u4EF6\u89E6\u53D1\u7684 cpp \u5E94\u7528","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 springboot \u5E94\u7528","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u901A\u8FC7 HTTP \u8BF7\u6C42\u89E6\u53D1\u7684 aspdotnetcore \u5E94\u7528","express-starter":"express-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A express \u57FA\u7840\u5E94\u7528","koa-starter":"koa-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A koa \u57FA\u7840\u5E94\u7528","nuxtjs-starter":"nuxtjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A nuxtjs \u57FA\u7840\u5E94\u7528","eggjs-starter":"eggjs-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A eggjs \u57FA\u7840\u5E94\u7528","flask-starter":"flask-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A flask \u57FA\u7840\u5E94\u7528","SpringBoot-starter":"SpringBoot-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A SpringBoot \u57FA\u7840\u5E94\u7528","Zblog-starter":"Zblog-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Zblog \u57FA\u7840\u5E94\u7528","website-starter":"website-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u9759\u6001\u7F51\u7AD9","react-starter":"react-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A React.js \u5E94\u7528","vue-starter":"vue-starter - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A Vue.js \u5E94\u7528",puppeteer:"puppeteer - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E puppeteer \u622A\u56FE\u7684 Web \u5E94\u7528",ffmpeg:"ffmpeg - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E ffmpeg \u5B9E\u73B0\u97F3\u89C6\u9891\u5904\u7406\u5E94\u7528",pdf2Img:"pdf2Img - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A pdf \u8F6C\u56FE\u7247\u5E94\u7528",tensorflow:"tensorflow - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A tensorflow \u5E94\u7528",todoList:"todoList - \u5FEB\u901F\u90E8\u7F72\u4E00\u4E2A\u57FA\u4E8E nodejs \u7684\u7F51\u9875 TodoList \u5E94\u7528"}});var pd=P(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.default={clean_up_the_environment:"Clean up the environment",display_help_for_command:"Display help for command",remove_components:"Remove component (like: fc, fc@0.0.1)",delete_the_file_under_the_cache:"Delete the <dirname> file in the cache",record_your_log_information:"Do you record your log information?",init_pproject_deploy_tip:"Do you want to deploy the project immediately?",tip_for_a_serverless_project:"A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'",create_a_new_project:"No Serverless-Devs project is currently detected. Do you want to create a new project?",en:"English (en)",zh:"Chinese (zh)",select_current_language:"Please select current language","app-tip":"Hello, serverlesser. Which template do you like?","template-tip":"Which template do you like?","fc-runtime-starter":"fc-runtime-starter - Deploy FC function in 5 minutes","fc-custom-container-stater":"fc-custom-container-stater - Deploy FC function with custom-container",web:"web-framework-stater-Quickly deploy a web framework","static-site":"static-website-stater-Quickly deploy a static website","best-practice":"serverless-best-practice-Quickly experience serverless best practices","devs-template":"Serverless Develop scaffold","fc-http-nodejs":"fc-http-nodejs - Deploy FC nodejs12 runtime function","fc-http-python":"fc-http-python - Deploy FC python3 runtime function","fc-http-java":"fc-http-java - Deploy FC java8 runtime function","fc-custom-container-event-python3":"fc-custom-container-event-python3 - Deploy python3 event-triggered application","fc-custom-container-event-cpp":"fc-custom-container-event-cpp - Deploy cpp event-triggered application","fc-custom-container-http-springboot":"fc-custom-container-http-springboot - Deploy springboot HTTP Request-triggered application","fc-custom-container-http-aspdotnetcore":"fc-custom-container-http-aspdotnetcore - Deploy dotnetcore HTTP Request-triggered application","express-starter":"express-starter - Deploy express application","koa-starter":"koa-starter - Deploy koa application","nuxtjs-starter":"nuxtjs-starter - Deploy nuxtjs application","eggjs-starter":"eggjs-starter - Deploy eggjs application","flask-starter":"flask-starter - Deploy flask application","SpringBoot-starter":"SpringBoot-starter - Deploy SpringBoot application","Zblog-starter":"Zblog-starter - Deploy Zblog application","website-starter":"website-starter - Deploy static website","react-starter":"react-starter - Deploy React.js application","vue-starter":"vue-starter - Deploy Vue.js application",puppeteer:"puppeteer - Deploy screenshot application base on puppeteer + fc",ffmpeg:"ffmpeg - Deploy audio and video processing application base on ffmpeg + fc",pdf2Img:"pdf2Img - Deploy pdf to images application",tensorflow:"tensorflow - Deploy tensorflow application",todoList:"todoList - Deploy todoList application"}});var gd=P(ii=>{"use strict";var dd=ii&&ii.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ii,"__esModule",{value:!0});var tO=Ct(),nO=dd(hd()),rO=dd(pd()),Bu={en:rO.default,zh:nO.default},iO=function(i){var n=(0,tO.getLang)(),r=Bu[n]?Bu[n][i]:Bu.en[i];return r||i};ii.default=iO});var Zr=P(ve=>{"use strict";var kt=ve&&ve.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ve,"__esModule",{value:!0});ve.getYamlPath=ve.i18n=ve.logger=ve.registerAction=ve.urlParser=ve.storage=ve.configSet=ve.common=void 0;var vd=kt(require("path")),sO=kt(xe()),md=sO.default.fse,oO=Ct();Object.defineProperty(ve,"common",{enumerable:!0,get:function(){return kt(oO).default}});var uO=pu();Object.defineProperty(ve,"configSet",{enumerable:!0,get:function(){return kt(uO).default}});var aO=ds();Object.defineProperty(ve,"storage",{enumerable:!0,get:function(){return kt(aO).default}});var cO=Ep();Object.defineProperty(ve,"urlParser",{enumerable:!0,get:function(){return kt(cO).default}});var lO=fd();Object.defineProperty(ve,"registerAction",{enumerable:!0,get:function(){return kt(lO).default}});var fO=Nu();Object.defineProperty(ve,"logger",{enumerable:!0,get:function(){return kt(fO).default}});var hO=gd();Object.defineProperty(ve,"i18n",{enumerable:!0,get:function(){return kt(hO).default}});var pO=function(i,n){var r=vd.default.join(i,"".concat(n,".yaml")),u=vd.default.join(i,"".concat(n,".yml")),a=md.existsSync(r)?r:md.existsSync(u)?u:void 0;return a};ve.getYamlPath=pO});var yd=P(Vt=>{"use strict";var dO=Vt&&Vt.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},gO=Vt&&Vt.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ku=Vt&&Vt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vt,"__esModule",{value:!0});var Vu=Zr(),zu=ku(require("path")),Yu=ku(require("fs")),Ss=Ct(),_d=In(),cr=ku(xe()),vO=cr.default.makeUnderLine,mO=cr.default.getCredential,_O=cr.default.loadComponent,yO=cr.default.colors,Xu=cr.default.jsyaml,EO=cr.default.getRootHome,wO=function(){function i(n){this.inputs=n}return i.prototype.getTempCommandStr=function(n,r){var u=n.length,a=new Array(r-u).fill(" ");return"".concat(n).concat(a.join("")," : ")},i.prototype.init=function(){return dO(this,void 0,void 0,function(){var n,r,u,a,o,h,g,_,l,m,b,I,R,H,re,ae,ae,Q,Se,se,Ne,Ae;return gO(this,function(K){switch(K.label){case 0:n="",K.label=1;case 1:K.trys.push([1,21,,23]),r=this.inputs,u=r.component,a=r.command,o=r.access,h=r.props,g={},K.label=2;case 2:return K.trys.push([2,5,,6]),_=zu.default.join(EO(),"access.yaml"),l=Xu.load(Yu.default.readFileSync(_,"utf8")||"{}"),l[o]?[4,mO(o)]:[3,4];case 3:g=K.sent(),K.label=4;case 4:return[3,6];case 5:return m=K.sent(),g={},[3,6];case 6:return[4,_O(u,null,{access:o})];case 7:return b=K.sent(),b?(a||(b.index?a="index":a="cli-help-options"),a!=="cli-help-options"?[3,13]:b.__doc&&b.__doc().length>1685?(I=b.__doc(),console.log("".concat(I)),[3,12]):[3,8]):[3,20];case 8:return K.trys.push([8,11,,12]),R=zu.default.join(b.__path,"publish.yml"),[4,Yu.default.existsSync(R)];case 9:return K.sent()||(R=zu.default.join(b.__path,"publish.yaml")),[4,Xu.load(Yu.default.readFileSync(R,"utf8"))];case 10:if(H=K.sent(),console.log(`
62
+ `.concat(H.Name,"@").concat(H.Version,": ").concat(H.Description,`
63
+ `)),re=0,H.Commands){for(ae in H.Commands)ae.length>re&&(re=ae.length);for(ae in H.Commands)console.log(" ".concat(this.getTempCommandStr(ae,re)," ").concat(H.Commands[ae]));console.log(`
64
+ `.concat(H.HomePage?"".concat((0,Ss.emoji)("\u{1F9ED}")," ").concat(vO("More information: "+H.HomePage)," ")+`
65
+ `:""))}return[3,12];case 11:return Q=K.sent(),Vu.logger.error("Help information could not be found"),[3,12];case 12:return[2,"help"];case 13:if(!b[a])return[3,19];Se={};try{Se=JSON.parse(h||"{}")}catch{throw new Error("-p/--prop parameter format error")}K.label=14;case 14:return K.trys.push([14,16,,18]),[4,b[a]({props:Se,Properties:Se,Credentials:g,credentials:g,appName:"default",Project:{ProjectName:"default",projectName:"default",component:u,Component:u,provider:void 0,Provider:void 0,accessAlias:o||"default",AccessAlias:o||"default"},project:{component:"",access:o||"default",projectName:""},command:a,Command:a,args:process.env.temp_params,argsObj:process.temp_params,Args:process.env.temp_params,ArgsObj:process.temp_params,path:{configPath:""},Path:{ConfigPath:""}})];case 15:return n=K.sent()||{},se=Xu.dump(JSON.parse(JSON.stringify(n))),Vu.logger.success(Object.keys(n).length===0?"End of method: ".concat(a):se),[3,18];case 16:return Ne=K.sent(),[4,(0,_d.HandleError)({error:Ne,prefix:"Failed to execute:"})];case 17:return K.sent(),process.exit(1),[3,18];case 18:return[3,20];case 19:Vu.logger.error(`Failed to execute:
64
66
 
65
- `+(0,Ss.emoji)("\u274C")+" Message: Component "+u+" does not include ["+a+`] method
66
- `+(0,Ss.emoji)("\u{1F9ED}")+" You can get help for this component by [s cli "+u+` -h]
67
- `+(0,Ss.emoji)("\u{1F608}")+" If you have questions, please tell us: "+oO.underline("https://github.com/Serverless-Devs/Serverless-Devs/issues")+`
68
- `),process.exit(1),K.label=20;case 20:return[3,23];case 21:return ve=K.sent(),[4,new dd.HandleError({error:ve,prefix:"Failed to execute:"}).report(ve)];case 22:return K.sent(),process.exit(1),[3,23];case 23:return[2,r]}})})},i}();kt.default=aO});"use strict";var lO=exports&&exports.__createBinding||(Object.create?function(i,r,n,u){u===void 0&&(u=n),Object.defineProperty(i,u,{enumerable:!0,get:function(){return r[n]}})}:function(i,r,n,u){u===void 0&&(u=n),i[u]=r[n]}),cO=exports&&exports.__setModuleDefault||(Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r}),fO=exports&&exports.__importStar||function(i){if(i&&i.__esModule)return i;var r={};if(i!=null)for(var n in i)n!=="default"&&Object.prototype.hasOwnProperty.call(i,n)&&lO(r,i,n);return cO(r,i),r},hO=exports&&exports.__awaiter||function(i,r,n,u){function a(o){return o instanceof n?o:new n(function(p){p(o)})}return new(n||(n=Promise))(function(o,p){function g(_){try{c(u.next(_))}catch(b){p(b)}}function v(_){try{c(u.throw(_))}catch(b){p(b)}}function c(_){_.done?o(_.value):a(_.value).then(g,v)}c((u=u.apply(i,r||[])).next())})},pO=exports&&exports.__generator||function(i,r){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(c){return function(_){return v([c,_])}}function v(c){if(u)throw new TypeError("Generator is already executing.");for(;n;)try{if(u=1,a&&(o=c[0]&2?a.return:c[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,c[1])).done)return o;switch(a=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=r.call(i,n)}catch(_){c=[6,_],a=0}finally{u=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},md=exports&&exports.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});var an=fO(Ko()),dO=Or(),gO=md(gd()),mO=md(Ae()),vO=Gt(),_O=mO.default.colors,yO=`Directly use serverless devs to use components, develop and manage applications without yaml configuration.
67
+ `.concat((0,Ss.emoji)("\u274C")," Message: Component ").concat(u," does not include [").concat(a,`] method
68
+ `).concat((0,Ss.emoji)("\u{1F9ED}")," You can get help for this component by [s cli ").concat(u,` -h]
69
+ `).concat((0,Ss.emoji)("\u{1F608}")," If you have questions, please tell us: ").concat(yO.underline("https://github.com/Serverless-Devs/Serverless-Devs/issues"),`
70
+ `)),process.exit(1),K.label=20;case 20:return[3,23];case 21:return Ae=K.sent(),[4,(0,_d.HandleError)({error:Ae,prefix:"Failed to execute:"})];case 22:return K.sent(),process.exit(1),[3,23];case 23:return[2,n]}})})},i}();Vt.default=wO});var bO=exports&&exports.__createBinding||(Object.create?function(i,n,r,u){u===void 0&&(u=r),Object.defineProperty(i,u,{enumerable:!0,get:function(){return n[r]}})}:function(i,n,r,u){u===void 0&&(u=r),i[u]=n[r]}),SO=exports&&exports.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),CO=exports&&exports.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var r in i)r!=="default"&&Object.prototype.hasOwnProperty.call(i,r)&&bO(n,i,r);return SO(n,i),n},OO=exports&&exports.__awaiter||function(i,n,r,u){function a(o){return o instanceof r?o:new r(function(h){h(o)})}return new(r||(r=Promise))(function(o,h){function g(m){try{l(u.next(m))}catch(b){h(b)}}function _(m){try{l(u.throw(m))}catch(b){h(b)}}function l(m){m.done?o(m.value):a(m.value).then(g,_)}l((u=u.apply(i,n||[])).next())})},xO=exports&&exports.__generator||function(i,n){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},u,a,o,h;return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(l){return function(m){return _([l,m])}}function _(l){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,a&&(o=l[0]&2?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=n.call(i,r)}catch(m){l=[6,m],a=0}finally{u=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ed=exports&&exports.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0});var lr=CO(Ko()),AO=In(),IO=Ed(yd()),RO=Ed(xe()),PO=Ct(),TO=RO.default.colors,LO=`Directly use serverless devs to use components, develop and manage applications without yaml configuration.
69
71
 
70
72
  Example:
71
73
  $ s cli fc-api listServices
72
74
  $ s cli fc-api listFunctions --service-name my-service
73
75
  $ s cli fc-api deploy -p "{/"function/": /"function-name/"}"
74
76
 
75
- `+(0,vO.emoji)("\u{1F4D6}")+" Document: "+_O.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/cli.md"),EO=an.default.name("s cli").usage("s cli [component] [method] [options]").option("-a, --access [aliasName]","Specify the access alias name").option("-p, --props [jsonString]","The json string of props").helpOption("-h, --help","Display help for command").description(yO).addHelpCommand(!1),Ku=process.argv[2];Ku&&!["-h","--help"].includes(Ku)&&(Cs=new an.Command(Ku),vd="Subcommand execution analysis.",Cs.usage("[subcommand] -- [method] [params]"),Cs.description(vd).addHelpCommand(!0),an.default.addCommand(Cs));var Cs,vd;(function(){return hO(void 0,void 0,void 0,function(){var i,r,n,u,a,o,p,g,v,c,_,b,I,P;return pO(this,function(H){if(process.argv.length===2||process.argv.length===3&&["-h","--help"].includes(process.argv[2]))an.default.help();else{for(i=process.argv[3],r=!1,n=[],u=[],a=void 0,o=JSON.parse(process.env.serverless_devs_temp_argv),process.argv=process.argv.slice(0,4).concat(o.slice(5,o.length)),p=0;p<process.argv.length;p++)r?u.push(process.argv[p]):n.push(process.argv[p]),(["-a","--access","-p","--props"].includes(a)||["-a","--access","-p","--props"].includes(process.argv[p]))&&n.push(process.argv[p]),process.argv[p]===i&&(r=!0,["-h","--help"].includes(i)&&(n.pop(),n.push("cli-help-options"))),a=process.argv[p];u.length!==0&&(process.env.temp_params=u.join(" "),process.temp_params=u),process.argv=n,EO.parse(process.argv),g=an.default.args,v=g[0],c=g[1],_=an.default,b=_.access,I=_.props,b=process.env.serverless_devs_temp_access?process.env.serverless_devs_temp_access:b,P=new gO.default({command:c,component:v,access:b,props:I}),P.init()}return[2]})})})().catch(function(i){throw new dO.CommandError(i.message)});
77
+ `.concat((0,PO.emoji)("\u{1F4D6}")," Document: ").concat(TO.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/cli.md")),NO=lr.default.name("s cli").usage("s cli [component] [method] [options]").option("-a, --access [aliasName]","Specify the access alias name").option("-p, --props [jsonString]","The json string of props").helpOption("-h, --help","Display help for command").description(LO).addHelpCommand(!1),Ku=process.argv[2];Ku&&!["-h","--help"].includes(Ku)&&(Cs=new lr.Command(Ku),wd="Subcommand execution analysis.",Cs.usage("[subcommand] -- [method] [params]"),Cs.description(wd).addHelpCommand(!0),lr.default.addCommand(Cs));var Cs,wd;(function(){return OO(void 0,void 0,void 0,function(){var i,n,r,u,a,o,h,g,_,l,m,b,I,R;return xO(this,function(H){if(process.argv.length===2||process.argv.length===3&&["-h","--help"].includes(process.argv[2]))lr.default.help();else{for(i=process.argv[3],n=!1,r=[],u=[],a=void 0,o=JSON.parse(process.env.serverless_devs_temp_argv),process.argv=process.argv.slice(0,4).concat(o.slice(5,o.length)),h=0;h<process.argv.length;h++)n?u.push(process.argv[h]):r.push(process.argv[h]),(["-a","--access","-p","--props"].includes(a)||["-a","--access","-p","--props"].includes(process.argv[h]))&&r.push(process.argv[h]),process.argv[h]===i&&(n=!0,["-h","--help"].includes(i)&&(r.pop(),r.push("cli-help-options"))),a=process.argv[h];u.length!==0&&(process.env.temp_params=u.join(" "),process.temp_params=u),process.argv=r,NO.parse(process.argv),g=lr.default.args,_=g[0],l=g[1],m=lr.default,b=m.access,I=m.props,b=process.env.serverless_devs_temp_access?process.env.serverless_devs_temp_access:b,R=new IO.default({command:l,component:_,access:b,props:I}),R.init()}return[2]})})})().catch(function(i){throw new AO.CommandError(i.message)});
76
78
  /**
77
79
  * @license
78
80
  * Lodash <https://lodash.com/>