@serverless-devs/s 2.1.5 → 2.1.6-beta.2

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.
@@ -1,38 +1,38 @@
1
- "use strict";var _=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ko=_((Lt,jo)=>{var dh=require("events").EventEmitter,zs=require("child_process").spawn,xt=require("path"),Ks=require("fs"),Wr=class{constructor(e,t){this.flags=e,this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Do(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.description=t||"",this.defaultValue=void 0}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return hh(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},fr=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},dr=class extends dh{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",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(e,t,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let a=e.split(/ +/),c=this.createCommand(a.shift());return s&&(c.description(s),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._hasHelpOption=this._hasHelpOption,c._helpFlags=this._helpFlags,c._helpDescription=this._helpDescription,c._helpShortFlag=this._helpShortFlag,c._helpLongFlag=this._helpLongFlag,c._helpCommandName=this._helpCommandName,c._helpCommandnameAndArgs=this._helpCommandnameAndArgs,c._helpCommandDescription=this._helpCommandDescription,c._exitCallback=this._exitCallback,c._storeOptionsAsProperties=this._storeOptionsAsProperties,c._passCommandToAction=this._passCommandToAction,c._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,c._executableFile=i.executableFile||null,this.commands.push(c),c._parseExpectedArgs(a),c.parent=this,s?this:c}createCommand(e){return new dr(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function n(s){s.forEach(i=>{if(i._executableHandler&&!i._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${i.name()}`);n(i.commands)})}return n(e.commands),t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return e===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(!!e.length)return e.forEach(t=>{let n={required:!1,name:"",variadic:!1};switch(t[0]){case"<":n.required=!0,n.name=t.slice(1,-1);break;case"[":n.name=t.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&this._args.push(n)}),this._args.forEach((t,n)=>{if(t.variadic&&n<this._args.length-1)throw new Error(`only the last argument can be variadic '${t.name}'`)}),this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new fr(e,t,n)),process.exit(e)}action(e){let t=n=>{let s=this._args.length,i=n.slice(0,s);this._passCommandToAction?i[s]=this:i[s]=this.opts(),n.length>s&&i.push(n.slice(s));let a=e.apply(this,i),c=this;for(;c.parent;)c=c.parent;c._actionResults.push(a)};return this._actionHandler=t,this}_checkForOptionNameClash(e){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||e.name()==="help"||this._getOptionValue(e.attributeName())===void 0)return;let n=!0;if(e.negate){let s=e.long.replace(/^--no-/,"--");n=!this._findOption(s)}else if(e.long){let s=e.long.replace(/^--/,"--no-");n=!this._findOption(s)}if(n)throw new Error(`option '${e.name()}' clashes with existing property '${e.attributeName()}' on Command
1
+ "use strict";var _=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ko=_((Lt,jo)=>{var ph=require("events").EventEmitter,Gs=require("child_process").spawn,xt=require("path"),zs=require("fs"),Br=class{constructor(e,t){this.flags=e,this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Do(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.description=t||"",this.defaultValue=void 0}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return mh(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}},fr=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},dr=class extends ph{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",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(e,t,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let a=e.split(/ +/),c=this.createCommand(a.shift());return s&&(c.description(s),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._hasHelpOption=this._hasHelpOption,c._helpFlags=this._helpFlags,c._helpDescription=this._helpDescription,c._helpShortFlag=this._helpShortFlag,c._helpLongFlag=this._helpLongFlag,c._helpCommandName=this._helpCommandName,c._helpCommandnameAndArgs=this._helpCommandnameAndArgs,c._helpCommandDescription=this._helpCommandDescription,c._exitCallback=this._exitCallback,c._storeOptionsAsProperties=this._storeOptionsAsProperties,c._passCommandToAction=this._passCommandToAction,c._combineFlagAndOptionalValue=this._combineFlagAndOptionalValue,c._executableFile=i.executableFile||null,this.commands.push(c),c._parseExpectedArgs(a),c.parent=this,s?this:c}createCommand(e){return new dr(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");function n(s){s.forEach(i=>{if(i._executableHandler&&!i._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${i.name()}`);n(i.commands)})}return n(e.commands),t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return e===!1?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,typeof e=="string"&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return this._hasImplicitHelpCommand===void 0&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(!!e.length)return e.forEach(t=>{let n={required:!1,name:"",variadic:!1};switch(t[0]){case"<":n.required=!0,n.name=t.slice(1,-1);break;case"[":n.name=t.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&this._args.push(n)}),this._args.forEach((t,n)=>{if(t.variadic&&n<this._args.length-1)throw new Error(`only the last argument can be variadic '${t.name}'`)}),this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new fr(e,t,n)),process.exit(e)}action(e){let t=n=>{let s=this._args.length,i=n.slice(0,s);this._passCommandToAction?i[s]=this:i[s]=this.opts(),n.length>s&&i.push(n.slice(s));let a=e.apply(this,i),c=this;for(;c.parent;)c=c.parent;c._actionResults.push(a)};return this._actionHandler=t,this}_checkForOptionNameClash(e){if(!this._storeOptionsAsProperties||this._storeOptionsAsPropertiesCalled||e.name()==="help"||this._getOptionValue(e.attributeName())===void 0)return;let n=!0;if(e.negate){let s=e.long.replace(/^--no-/,"--");n=!this._findOption(s)}else if(e.long){let s=e.long.replace(/^--/,"--no-");n=!this._findOption(s)}if(n)throw new Error(`option '${e.name()}' clashes with existing property '${e.attributeName()}' on Command
2
2
  - call storeOptionsAsProperties(false) to store option values safely,
3
3
  - or call storeOptionsAsProperties(true) to suppress this check,
4
4
  - or change option name
5
5
 
6
- Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,s,i){let a=new Wr(t,n),c=a.name(),u=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof s!="function")if(s instanceof RegExp){let o=s;s=(l,d)=>{let y=o.exec(l);return y?y[0]:d}}else i=s,s=null;if(a.negate||a.optional||a.required||typeof i=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");i=this._findOption(o)?this._getOptionValue(u):!0}i!==void 0&&(this._setOptionValue(u,i),a.defaultValue=i)}return this.options.push(a),this.on("option:"+c,o=>{let l=this._getOptionValue(u);o!==null&&s?o=s(o,l===void 0?i:l):o!==null&&a.variadic&&(l===i||!Array.isArray(l)?o=[o]:o=l.concat(o)),typeof l=="boolean"||typeof l>"u"?o==null?this._setOptionValue(u,a.negate?!1:i||!0):this._setOptionValue(u,o):o!==null&&this._setOptionValue(u,a.negate?!1:o)}),this}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&xt.basename(this._scriptPath,xt.extname(this._scriptPath)),this._parseCommand([],n),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let i=this._scriptPath;!i&&process.mainModule&&(i=process.mainModule.filename);let a;try{let y=Ks.realpathSync(i);a=xt.dirname(y)}catch{a="."}let c=xt.basename(i,xt.extname(i))+"-"+e._name;e._executableFile&&(c=e._executableFile);let u=xt.join(a,c);Ks.existsSync(u)?c=u:s.forEach(y=>{Ks.existsSync(`${u}${y}`)&&(c=`${u}${y}`)}),n=s.includes(xt.extname(c));let o;process.platform!=="win32"?n?(t.unshift(c),t=Ao(process.execArgv).concat(t),o=zs(process.argv[0],t,{stdio:"inherit"})):o=zs(c,t,{stdio:"inherit"}):(t.unshift(c),t=Ao(process.execArgv).concat(t),o=zs(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(y=>{process.on(y,()=>{o.killed===!1&&o.exitCode===null&&o.kill(y)})});let d=this._exitCallback;d?o.on("close",()=>{d(new fr(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):o.on("close",process.exit.bind(process)),o.on("error",y=>{if(y.code==="ENOENT"){let m=`'${c}' does not exist
6
+ Read more on https://git.io/JJc0W`)}_optionEx(e,t,n,s,i){let a=new Br(t,n),c=a.name(),u=a.attributeName();if(a.mandatory=!!e.mandatory,this._checkForOptionNameClash(a),typeof s!="function")if(s instanceof RegExp){let o=s;s=(l,d)=>{let y=o.exec(l);return y?y[0]:d}}else i=s,s=null;if(a.negate||a.optional||a.required||typeof i=="boolean"){if(a.negate){let o=a.long.replace(/^--no-/,"--");i=this._findOption(o)?this._getOptionValue(u):!0}i!==void 0&&(this._setOptionValue(u,i),a.defaultValue=i)}return this.options.push(a),this.on("option:"+c,o=>{let l=this._getOptionValue(u);o!==null&&s?o=s(o,l===void 0?i:l):o!==null&&a.variadic&&(l===i||!Array.isArray(l)?o=[o]:o=l.concat(o)),typeof l=="boolean"||typeof l>"u"?o==null?this._setOptionValue(u,a.negate?!1:i||!0):this._setOptionValue(u,o):o!==null&&this._setOptionValue(u,a.negate?!1:o)}),this}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}combineFlagAndOptionalValue(e){return this._combineFlagAndOptionalValue=e===void 0||e,this}allowUnknownOption(e){return this._allowUnknownOption=e===void 0||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsPropertiesCalled=!0,this._storeOptionsAsProperties=e===void 0||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=e===void 0||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&xt.basename(this._scriptPath,xt.extname(this._scriptPath)),this._parseCommand([],n),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then(()=>this)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[".js",".ts",".tsx",".mjs"];this._checkForMissingMandatoryOptions();let i=this._scriptPath;!i&&process.mainModule&&(i=process.mainModule.filename);let a;try{let y=zs.realpathSync(i);a=xt.dirname(y)}catch{a="."}let c=xt.basename(i,xt.extname(i))+"-"+e._name;e._executableFile&&(c=e._executableFile);let u=xt.join(a,c);zs.existsSync(u)?c=u:s.forEach(y=>{zs.existsSync(`${u}${y}`)&&(c=`${u}${y}`)}),n=s.includes(xt.extname(c));let o;process.platform!=="win32"?n?(t.unshift(c),t=Ao(process.execArgv).concat(t),o=Gs(process.argv[0],t,{stdio:"inherit"})):o=Gs(c,t,{stdio:"inherit"}):(t.unshift(c),t=Ao(process.execArgv).concat(t),o=Gs(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(y=>{process.on(y,()=>{o.killed===!1&&o.exitCode===null&&o.kill(y)})});let d=this._exitCallback;d?o.on("close",()=>{d(new fr(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):o.on("close",process.exit.bind(process)),o.on("error",y=>{if(y.code==="ENOENT"){let m=`'${c}' does not exist
7
7
  - if '${e._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(m)}else if(y.code==="EACCES")throw new Error(`'${c}' not executable`);if(!d)process.exit(1);else{let m=new fr(1,"commander.executeSubCommandAsync","(error)");m.nestedError=y,d(m)}}),this.runningCommand=o}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this._helpAndError(),s._executableHandler?this._executeSubCommand(s,t.concat(n)):s._parseCommand(t,n)}_parseCommand(e,t){let n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)e.length===1?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Io(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Io(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){let s=this.args.slice();this._args.forEach((i,a)=>{i.required&&s[a]==null?this.missingArgument(i.name):i.variadic&&(s[a]=s.splice(a))}),this._actionHandler(s),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(!!e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e._getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}parseOptions(e){let t=[],n=[],s=t,i=e.slice();function a(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){s===n&&s.push(u),s.push(...i);break}if(c&&!a(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,a(u)){let o=this._findOption(u);if(o){if(o.required){let l=i.shift();l===void 0&&this.optionMissingArgument(o),this.emit(`option:${o.name()}`,l)}else if(o.optional){let l=null;i.length>0&&!a(i[0])&&(l=i.shift()),this.emit(`option:${o.name()}`,l)}else this.emit(`option:${o.name()}`);c=o.variadic?o:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let o=this._findOption(`-${u[1]}`);if(o){o.required||o.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${o.name()}`,u.slice(2)):(this.emit(`option:${o.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let o=u.indexOf("="),l=this._findOption(u.slice(0,o));if(l&&(l.required||l.optional)){this.emit(`option:${l.name()}`,u.slice(o+1));continue}}u.length>1&&u[0]==="-"&&(s=n),s.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}missingArgument(e){let t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;t?n=`error: option '${e.flags}' argument missing, got '${t}'`:n=`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;let t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){let e=[this.name()];for(let s=this.parent;s;s=s.parent)e.unshift(s.name());let t=e.join(" "),n=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${t} ${this._helpLongFlag}'.`:"");console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=new Wr(t,n);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),()=>{process.stdout.write(e+`
9
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this._args.map(n=>To(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}prepareCommands(){let e=this.commands.filter(t=>!t._hidden).map(t=>{let n=t._args.map(s=>To(s)).join(" ");return[t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:""),t._description]});return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce((t,n)=>Math.max(t,n[0].length),0)}largestOptionLength(){let e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce((t,n)=>Math.max(t,n.flags.length),0)}largestArgLength(){return this._args.reduce((e,t)=>Math.max(e,t.name.length),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){let e=this.padWidth(),n=(process.stdout.columns||80)-e-4;function s(u,o){return Xs(u,e)+" "+No(o,n,e+2)}let i=this.options.map(u=>{let o=u.description+(!u.negate&&u.defaultValue!==void 0?" (default: "+JSON.stringify(u.defaultValue)+")":"");return s(u.flags,o)}),a=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),c=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(a||c){let u=this._helpFlags;a?c||(u=this._helpShortFlag):u=this._helpLongFlag,i.push(s(u,this._helpDescription))}return i.join(`
10
- `)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),s=(process.stdout.columns||80)-t-4;return["Commands:",e.map(i=>{let a=i[1]?" "+i[1]:"";return(a?Xs(i[0],t):i[0])+No(a,s,t+2)}).join(`
8
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(m)}else if(y.code==="EACCES")throw new Error(`'${c}' not executable`);if(!d)process.exit(1);else{let m=new fr(1,"commander.executeSubCommandAsync","(error)");m.nestedError=y,d(m)}}),this.runningCommand=o}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this._helpAndError(),s._executableHandler?this._executeSubCommand(s,t.concat(n)):s._parseCommand(t,n)}_parseCommand(e,t){let n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)e.length===1?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)Io(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this._helpAndError(),Io(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){let s=this.args.slice();this._args.forEach((i,a)=>{i.required&&s[a]==null?this.missingArgument(i.name):i.variadic&&(s[a]=s.splice(a))}),this._actionHandler(s),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(!!e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach(t=>{t.mandatory&&e._getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})}parseOptions(e){let t=[],n=[],s=t,i=e.slice();function a(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){s===n&&s.push(u),s.push(...i);break}if(c&&!a(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,a(u)){let o=this._findOption(u);if(o){if(o.required){let l=i.shift();l===void 0&&this.optionMissingArgument(o),this.emit(`option:${o.name()}`,l)}else if(o.optional){let l=null;i.length>0&&!a(i[0])&&(l=i.shift()),this.emit(`option:${o.name()}`,l)}else this.emit(`option:${o.name()}`);c=o.variadic?o:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let o=this._findOption(`-${u[1]}`);if(o){o.required||o.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${o.name()}`,u.slice(2)):(this.emit(`option:${o.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let o=u.indexOf("="),l=this._findOption(u.slice(0,o));if(l&&(l.required||l.optional)){this.emit(`option:${l.name()}`,u.slice(o+1));continue}}u.length>1&&u[0]==="-"&&(s=n),s.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}missingArgument(e){let t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;t?n=`error: option '${e.flags}' argument missing, got '${t}'`:n=`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;let t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){let e=[this.name()];for(let s=this.parent;s;s=s.parent)e.unshift(s.name());let t=e.join(" "),n=`error: unknown command '${this.args[0]}'.`+(this._hasHelpOption?` See '${t} ${this._helpLongFlag}'.`:"");console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=new Br(t,n);return this._versionOptionName=s.attributeName(),this.options.push(s),this.on("option:"+s.name(),()=>{process.stdout.write(e+`
9
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this._args.map(n=>To(n));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}prepareCommands(){let e=this.commands.filter(t=>!t._hidden).map(t=>{let n=t._args.map(s=>To(s)).join(" ");return[t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:""),t._description]});return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce((t,n)=>Math.max(t,n[0].length),0)}largestOptionLength(){let e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce((t,n)=>Math.max(t,n.flags.length),0)}largestArgLength(){return this._args.reduce((e,t)=>Math.max(e,t.name.length),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){let e=this.padWidth(),n=(process.stdout.columns||80)-e-4;function s(u,o){return Ks(u,e)+" "+No(o,n,e+2)}let i=this.options.map(u=>{let o=u.description+(!u.negate&&u.defaultValue!==void 0?" (default: "+JSON.stringify(u.defaultValue)+")":"");return s(u.flags,o)}),a=this._hasHelpOption&&this._helpShortFlag&&!this._findOption(this._helpShortFlag),c=this._hasHelpOption&&!this._findOption(this._helpLongFlag);if(a||c){let u=this._helpFlags;a?c||(u=this._helpShortFlag):u=this._helpLongFlag,i.push(s(u,this._helpDescription))}return i.join(`
10
+ `)}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";let e=this.prepareCommands(),t=this.padWidth(),s=(process.stdout.columns||80)-t-4;return["Commands:",e.map(i=>{let a=i[1]?" "+i[1]:"";return(a?Ks(i[0],t):i[0])+No(a,s,t+2)}).join(`
11
11
  `).replace(/^/gm," "),""].join(`
12
- `)}helpInformation(){if(this._name==="s")return"";let e=[];if(this._description){e=[this._description,""];let u=this._argsDescription;if(u&&this._args.length){let o=this.padWidth(),d=(process.stdout.columns||80)-o-5;e.push("Arguments:"),this._args.forEach(y=>{e.push(" "+Xs(y.name,o)+" "+qo(u[y.name]||"",d,o+4))}),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let u=this.parent;u;u=u.parent)n=u.name()+" "+n;let s=["Usage: "+n+t+" "+this.usage(),""],i=[],a=this.commandHelp();a&&(i=[a]);let c=[];return(this._hasHelpOption||this.options.length>0)&&(c=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),s.concat(e).concat(c).concat(i).join(`
13
- `)}outputHelp(e){e||(e=n=>n);let t=e(this.helpInformation());if(typeof t!="string"&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=Do(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};Lt=jo.exports=new dr;Lt.program=Lt;Lt.Command=dr;Lt.Option=Wr;Lt.CommanderError=fr;function hh(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Xs(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function qo(r,e,t){let n=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(n)||[]).map((i,a)=>(i.slice(-1)===`
12
+ `)}helpInformation(){if(this._name==="s")return"";let e=[];if(this._description){e=[this._description,""];let u=this._argsDescription;if(u&&this._args.length){let o=this.padWidth(),d=(process.stdout.columns||80)-o-5;e.push("Arguments:"),this._args.forEach(y=>{e.push(" "+Ks(y.name,o)+" "+qo(u[y.name]||"",d,o+4))}),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let u=this.parent;u;u=u.parent)n=u.name()+" "+n;let s=["Usage: "+n+t+" "+this.usage(),""],i=[],a=this.commandHelp();a&&(i=[a]);let c=[];return(this._hasHelpOption||this.options.length>0)&&(c=["Options:",""+this.optionHelp().replace(/^/gm," "),""]),s.concat(e).concat(c).concat(i).join(`
13
+ `)}outputHelp(e){e||(e=n=>n);let t=e(this.helpInformation());if(typeof t!="string"&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){if(typeof e=="boolean")return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;let n=Do(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}};Lt=jo.exports=new dr;Lt.program=Lt;Lt.Command=dr;Lt.Option=Br;Lt.CommanderError=fr;function mh(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Ks(r,e){let t=Math.max(0,e-r.length);return r+Array(t+1).join(" ")}function qo(r,e,t){let n=new RegExp(".{1,"+(e-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");return(r.match(n)||[]).map((i,a)=>(i.slice(-1)===`
14
14
  `&&(i=i.slice(0,i.length-1)),(a>0&&t?Array(t+1).join(" "):"")+i.trimRight())).join(`
15
- `)}function No(r,e,t){return r.match(/[\n]\s+/)||e<40?r:qo(r,e,t)}function Io(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function To(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function Do(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}function Ao(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}});var Br=_((CE,xo)=>{var ph="2.0.0",mh=Number.MAX_SAFE_INTEGER||9007199254740991,gh=16;xo.exports={SEMVER_SPEC_VERSION:ph,MAX_LENGTH:256,MAX_SAFE_INTEGER:mh,MAX_SAFE_COMPONENT_LENGTH:gh}});var Jr=_((NE,Lo)=>{var vh=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Lo.exports=vh});var Mt=_((St,Mo)=>{var{MAX_SAFE_COMPONENT_LENGTH:Ws}=Br(),_h=Jr();St=Mo.exports={};var yh=St.re=[],O=St.src=[],P=St.t={},$h=0,j=(r,e,t)=>{let n=$h++;_h(r,n,e),P[r]=n,O[n]=e,yh[n]=new RegExp(e,t?"g":void 0)};j("NUMERICIDENTIFIER","0|[1-9]\\d*");j("NUMERICIDENTIFIERLOOSE","[0-9]+");j("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");j("MAINVERSION",`(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})`);j("MAINVERSIONLOOSE",`(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})`);j("PRERELEASEIDENTIFIER",`(?:${O[P.NUMERICIDENTIFIER]}|${O[P.NONNUMERICIDENTIFIER]})`);j("PRERELEASEIDENTIFIERLOOSE",`(?:${O[P.NUMERICIDENTIFIERLOOSE]}|${O[P.NONNUMERICIDENTIFIER]})`);j("PRERELEASE",`(?:-(${O[P.PRERELEASEIDENTIFIER]}(?:\\.${O[P.PRERELEASEIDENTIFIER]})*))`);j("PRERELEASELOOSE",`(?:-?(${O[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[P.PRERELEASEIDENTIFIERLOOSE]})*))`);j("BUILDIDENTIFIER","[0-9A-Za-z-]+");j("BUILD",`(?:\\+(${O[P.BUILDIDENTIFIER]}(?:\\.${O[P.BUILDIDENTIFIER]})*))`);j("FULLPLAIN",`v?${O[P.MAINVERSION]}${O[P.PRERELEASE]}?${O[P.BUILD]}?`);j("FULL",`^${O[P.FULLPLAIN]}$`);j("LOOSEPLAIN",`[v=\\s]*${O[P.MAINVERSIONLOOSE]}${O[P.PRERELEASELOOSE]}?${O[P.BUILD]}?`);j("LOOSE",`^${O[P.LOOSEPLAIN]}$`);j("GTLT","((?:<|>)?=?)");j("XRANGEIDENTIFIERLOOSE",`${O[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);j("XRANGEIDENTIFIER",`${O[P.NUMERICIDENTIFIER]}|x|X|\\*`);j("XRANGEPLAIN",`[v=\\s]*(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:${O[P.PRERELEASE]})?${O[P.BUILD]}?)?)?`);j("XRANGEPLAINLOOSE",`[v=\\s]*(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:${O[P.PRERELEASELOOSE]})?${O[P.BUILD]}?)?)?`);j("XRANGE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAIN]}$`);j("XRANGELOOSE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAINLOOSE]}$`);j("COERCE",`(^|[^\\d])(\\d{1,${Ws}})(?:\\.(\\d{1,${Ws}}))?(?:\\.(\\d{1,${Ws}}))?(?:$|[^\\d])`);j("COERCERTL",O[P.COERCE],!0);j("LONETILDE","(?:~>?)");j("TILDETRIM",`(\\s*)${O[P.LONETILDE]}\\s+`,!0);St.tildeTrimReplace="$1~";j("TILDE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAIN]}$`);j("TILDELOOSE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAINLOOSE]}$`);j("LONECARET","(?:\\^)");j("CARETTRIM",`(\\s*)${O[P.LONECARET]}\\s+`,!0);St.caretTrimReplace="$1^";j("CARET",`^${O[P.LONECARET]}${O[P.XRANGEPLAIN]}$`);j("CARETLOOSE",`^${O[P.LONECARET]}${O[P.XRANGEPLAINLOOSE]}$`);j("COMPARATORLOOSE",`^${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]})$|^$`);j("COMPARATOR",`^${O[P.GTLT]}\\s*(${O[P.FULLPLAIN]})$|^$`);j("COMPARATORTRIM",`(\\s*)${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]}|${O[P.XRANGEPLAIN]})`,!0);St.comparatorTrimReplace="$1$2$3";j("HYPHENRANGE",`^\\s*(${O[P.XRANGEPLAIN]})\\s+-\\s+(${O[P.XRANGEPLAIN]})\\s*$`);j("HYPHENRANGELOOSE",`^\\s*(${O[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[P.XRANGEPLAINLOOSE]})\\s*$`);j("STAR","(<|>)?=?\\s*\\*");j("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");j("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Yr=_((IE,Fo)=>{var Eh=["includePrerelease","loose","rtl"],wh=r=>r?typeof r!="object"?{loose:!0}:Eh.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Fo.exports=wh});var zn=_((TE,Uo)=>{var Vo=/^[0-9]+$/,Ho=(r,e)=>{let t=Vo.test(r),n=Vo.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},bh=(r,e)=>Ho(e,r);Uo.exports={compareIdentifiers:Ho,rcompareIdentifiers:bh}});var ge=_((AE,Xo)=>{var Kn=Jr(),{MAX_LENGTH:Go,MAX_SAFE_INTEGER:Xn}=Br(),{re:zo,t:Ko}=Mt(),Sh=Yr(),{compareIdentifiers:hr}=zn(),De=class{constructor(e,t){if(t=Sh(t),e instanceof De){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Go)throw new TypeError(`version is longer than ${Go} characters`);Kn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?zo[Ko.LOOSE]:zo[Ko.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Xn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Xn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Xn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Xn)return i}return s}):this.prerelease=[],this.build=n[5]?n[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(e){if(Kn("SemVer.compare",this.version,this.options,e),!(e instanceof De)){if(typeof e=="string"&&e===this.version)return 0;e=new De(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof De||(e=new De(e,this.options)),hr(this.major,e.major)||hr(this.minor,e.minor)||hr(this.patch,e.patch)}comparePre(e){if(e instanceof De||(e=new De(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(Kn("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return hr(n,s)}while(++t)}compareBuild(e){e instanceof De||(e=new De(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(Kn("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return hr(n,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);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 n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}t&&(hr(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Xo.exports=De});var Ft=_((qE,Yo)=>{var{MAX_LENGTH:Oh}=Br(),{re:Wo,t:Bo}=Mt(),Jo=ge(),Ph=Yr(),Rh=(r,e)=>{if(e=Ph(e),r instanceof Jo)return r;if(typeof r!="string"||r.length>Oh||!(e.loose?Wo[Bo.LOOSE]:Wo[Bo.FULL]).test(r))return null;try{return new Jo(r,e)}catch{return null}};Yo.exports=Rh});var Qo=_((DE,Zo)=>{var Ch=Ft(),Nh=(r,e)=>{let t=Ch(r,e);return t?t.version:null};Zo.exports=Nh});var tc=_((jE,ec)=>{var Ih=Ft(),Th=(r,e)=>{let t=Ih(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};ec.exports=Th});var sc=_((kE,nc)=>{var rc=ge(),Ah=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new rc(r instanceof rc?r.version:r,t).inc(e,n).version}catch{return null}};nc.exports=Ah});var He=_((xE,ac)=>{var ic=ge(),qh=(r,e,t)=>new ic(r,t).compare(new ic(e,t));ac.exports=qh});var Wn=_((LE,oc)=>{var Dh=He(),jh=(r,e,t)=>Dh(r,e,t)===0;oc.exports=jh});var lc=_((ME,uc)=>{var cc=Ft(),kh=Wn(),xh=(r,e)=>{if(kh(r,e))return null;{let t=cc(r),n=cc(e),s=t.prerelease.length||n.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(let c in t)if((c==="major"||c==="minor"||c==="patch")&&t[c]!==n[c])return i+c;return a}};uc.exports=xh});var dc=_((FE,fc)=>{var Lh=ge(),Mh=(r,e)=>new Lh(r,e).major;fc.exports=Mh});var pc=_((VE,hc)=>{var Fh=ge(),Vh=(r,e)=>new Fh(r,e).minor;hc.exports=Vh});var gc=_((HE,mc)=>{var Hh=ge(),Uh=(r,e)=>new Hh(r,e).patch;mc.exports=Uh});var _c=_((UE,vc)=>{var Gh=Ft(),zh=(r,e)=>{let t=Gh(r,e);return t&&t.prerelease.length?t.prerelease:null};vc.exports=zh});var $c=_((GE,yc)=>{var Kh=He(),Xh=(r,e,t)=>Kh(e,r,t);yc.exports=Xh});var wc=_((zE,Ec)=>{var Wh=He(),Bh=(r,e)=>Wh(r,e,!0);Ec.exports=Bh});var Bn=_((KE,Sc)=>{var bc=ge(),Jh=(r,e,t)=>{let n=new bc(r,t),s=new bc(e,t);return n.compare(s)||n.compareBuild(s)};Sc.exports=Jh});var Pc=_((XE,Oc)=>{var Yh=Bn(),Zh=(r,e)=>r.sort((t,n)=>Yh(t,n,e));Oc.exports=Zh});var Cc=_((WE,Rc)=>{var Qh=Bn(),ep=(r,e)=>r.sort((t,n)=>Qh(n,t,e));Rc.exports=ep});var Zr=_((BE,Nc)=>{var tp=He(),rp=(r,e,t)=>tp(r,e,t)>0;Nc.exports=rp});var Jn=_((JE,Ic)=>{var np=He(),sp=(r,e,t)=>np(r,e,t)<0;Ic.exports=sp});var Bs=_((YE,Tc)=>{var ip=He(),ap=(r,e,t)=>ip(r,e,t)!==0;Tc.exports=ap});var Yn=_((ZE,Ac)=>{var op=He(),cp=(r,e,t)=>op(r,e,t)>=0;Ac.exports=cp});var Zn=_((QE,qc)=>{var up=He(),lp=(r,e,t)=>up(r,e,t)<=0;qc.exports=lp});var Js=_((ew,Dc)=>{var fp=Wn(),dp=Bs(),hp=Zr(),pp=Yn(),mp=Jn(),gp=Zn(),vp=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return fp(r,t,n);case"!=":return dp(r,t,n);case">":return hp(r,t,n);case">=":return pp(r,t,n);case"<":return mp(r,t,n);case"<=":return gp(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Dc.exports=vp});var kc=_((tw,jc)=>{var _p=ge(),yp=Ft(),{re:Qn,t:es}=Mt(),$p=(r,e)=>{if(r instanceof _p)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Qn[es.COERCE]);else{let n;for(;(n=Qn[es.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Qn[es.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Qn[es.COERCERTL].lastIndex=-1}return t===null?null:yp(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};jc.exports=$p});var Lc=_((rw,xc)=>{"use strict";xc.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Fc=_((nw,Mc)=>{"use strict";Mc.exports=X;X.Node=Vt;X.create=X;function X(r){var e=this;if(e instanceof X||(e=new X),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}X.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};X.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};X.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};X.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)wp(this,arguments[r]);return this.length};X.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)bp(this,arguments[r]);return this.length};X.prototype.pop=function(){if(!!this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};X.prototype.shift=function(){if(!!this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};X.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};X.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};X.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};X.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};X.prototype.map=function(r,e){e=e||this;for(var t=new X,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};X.prototype.mapReverse=function(r,e){e=e||this;for(var t=new X,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};X.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)t=r(t,n.value,s),n=n.next;return t};X.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)t=r(t,n.value,s),n=n.prev;return t};X.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};X.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};X.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new X;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(;s!==null&&n<e;n++,s=s.next)t.push(s.value);return t};X.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new X;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,s=this.tail;s!==null&&n>e;n--)s=s.prev;for(;s!==null&&n>r;n--,s=s.prev)t.push(s.value);return t};X.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(var i=[],n=0;s&&n<e;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<t.length;n++)s=Ep(this,s,t[n]);return i};X.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function Ep(r,e,t){var n=e===r.head?new Vt(t,null,e,r):new Vt(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function wp(r,e){r.tail=new Vt(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function bp(r,e){r.head=new Vt(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Vt(r,e,t,n){if(!(this instanceof Vt))return new Vt(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Lc()(X)}catch{}});var zc=_((sw,Gc)=>{"use strict";var Sp=Fc(),Ht=Symbol("max"),gt=Symbol("length"),pr=Symbol("lengthCalculator"),en=Symbol("allowStale"),Ut=Symbol("maxAge"),mt=Symbol("dispose"),Vc=Symbol("noDisposeOnSet"),fe=Symbol("lruList"),We=Symbol("cache"),Uc=Symbol("updateAgeOnGet"),Ys=()=>1,Qs=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Ht]=e.max||1/0,n=e.length||Ys;if(this[pr]=typeof n!="function"?Ys:n,this[en]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ut]=e.maxAge||0,this[mt]=e.dispose,this[Vc]=e.noDisposeOnSet||!1,this[Uc]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ht]=e||1/0,Qr(this)}get max(){return this[Ht]}set allowStale(e){this[en]=!!e}get allowStale(){return this[en]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ut]=e,Qr(this)}get maxAge(){return this[Ut]}set lengthCalculator(e){typeof e!="function"&&(e=Ys),e!==this[pr]&&(this[pr]=e,this[gt]=0,this[fe].forEach(t=>{t.length=this[pr](t.value,t.key),this[gt]+=t.length})),Qr(this)}get lengthCalculator(){return this[pr]}get length(){return this[gt]}get itemCount(){return this[fe].length}rforEach(e,t){t=t||this;for(let n=this[fe].tail;n!==null;){let s=n.prev;Hc(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[fe].head;n!==null;){let s=n.next;Hc(this,e,n,t),n=s}}keys(){return this[fe].toArray().map(e=>e.key)}values(){return this[fe].toArray().map(e=>e.value)}reset(){this[mt]&&this[fe]&&this[fe].length&&this[fe].forEach(e=>this[mt](e.key,e.value)),this[We]=new Map,this[fe]=new Sp,this[gt]=0}dump(){return this[fe].map(e=>ts(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[fe]}set(e,t,n){if(n=n||this[Ut],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[pr](t,e);if(this[We].has(e)){if(i>this[Ht])return mr(this,this[We].get(e)),!1;let u=this[We].get(e).value;return this[mt]&&(this[Vc]||this[mt](e,u.value)),u.now=s,u.maxAge=n,u.value=t,this[gt]+=i-u.length,u.length=i,this.get(e),Qr(this),!0}let a=new ei(e,t,i,s,n);return a.length>this[Ht]?(this[mt]&&this[mt](e,t),!1):(this[gt]+=a.length,this[fe].unshift(a),this[We].set(e,this[fe].head),Qr(this),!0)}has(e){if(!this[We].has(e))return!1;let t=this[We].get(e).value;return!ts(this,t)}get(e){return Zs(this,e,!0)}peek(e){return Zs(this,e,!1)}pop(){let e=this[fe].tail;return e?(mr(this,e),e.value):null}del(e){mr(this,this[We].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[We].forEach((e,t)=>Zs(this,t,!1))}},Zs=(r,e,t)=>{let n=r[We].get(e);if(n){let s=n.value;if(ts(r,s)){if(mr(r,n),!r[en])return}else t&&(r[Uc]&&(n.value.now=Date.now()),r[fe].unshiftNode(n));return s.value}},ts=(r,e)=>{if(!e||!e.maxAge&&!r[Ut])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Ut]&&t>r[Ut]},Qr=r=>{if(r[gt]>r[Ht])for(let e=r[fe].tail;r[gt]>r[Ht]&&e!==null;){let t=e.prev;mr(r,e),e=t}},mr=(r,e)=>{if(e){let t=e.value;r[mt]&&r[mt](t.key,t.value),r[gt]-=t.length,r[We].delete(t.key),r[fe].removeNode(e)}},ei=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},Hc=(r,e,t,n)=>{let s=t.value;ts(r,s)&&(mr(r,t),r[en]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};Gc.exports=Qs});var Ue=_((iw,Bc)=>{var Gt=class{constructor(e,t){if(t=Pp(t),e instanceof Gt)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Gt(e.raw,t);if(e instanceof ti)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Xc(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Tp(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=Kc.get(n);if(s)return s;let i=this.options.loose,a=i?Pe[$e.HYPHENRANGELOOSE]:Pe[$e.HYPHENRANGE];e=e.replace(a,Vp(this.options.includePrerelease)),ae("hyphen replace",e),e=e.replace(Pe[$e.COMPARATORTRIM],Cp),ae("comparator trim",e),e=e.replace(Pe[$e.TILDETRIM],Np),e=e.replace(Pe[$e.CARETTRIM],Ip),e=e.split(/\s+/).join(" ");let c=e.split(" ").map(d=>Ap(d,this.options)).join(" ").split(/\s+/).map(d=>Fp(d,this.options));i&&(c=c.filter(d=>(ae("loose invalid filter",d,this.options),!!d.match(Pe[$e.COMPARATORLOOSE])))),ae("range list",c);let u=new Map,o=c.map(d=>new ti(d,this.options));for(let d of o){if(Xc(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let l=[...u.values()];return Kc.set(n,l),l}intersects(e,t){if(!(e instanceof Gt))throw new TypeError("a Range is required");return this.set.some(n=>Wc(n,t)&&e.set.some(s=>Wc(s,t)&&n.every(i=>s.every(a=>i.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Rp(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Hp(this.set[t],e,this.options))return!0;return!1}};Bc.exports=Gt;var Op=zc(),Kc=new Op({max:1e3}),Pp=Yr(),ti=tn(),ae=Jr(),Rp=ge(),{re:Pe,t:$e,comparatorTrimReplace:Cp,tildeTrimReplace:Np,caretTrimReplace:Ip}=Mt(),Xc=r=>r.value==="<0.0.0-0",Tp=r=>r.value==="",Wc=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},Ap=(r,e)=>(ae("comp",r,e),r=jp(r,e),ae("caret",r),r=qp(r,e),ae("tildes",r),r=xp(r,e),ae("xrange",r),r=Mp(r,e),ae("stars",r),r),Ee=r=>!r||r.toLowerCase()==="x"||r==="*",qp=(r,e)=>r.trim().split(/\s+/).map(t=>Dp(t,e)).join(" "),Dp=(r,e)=>{let t=e.loose?Pe[$e.TILDELOOSE]:Pe[$e.TILDE];return r.replace(t,(n,s,i,a,c)=>{ae("tilde",r,n,s,i,a,c);let u;return Ee(s)?u="":Ee(i)?u=`>=${s}.0.0 <${+s+1}.0.0-0`:Ee(a)?u=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:c?(ae("replaceTilde pr",c),u=`>=${s}.${i}.${a}-${c} <${s}.${+i+1}.0-0`):u=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,ae("tilde return",u),u})},jp=(r,e)=>r.trim().split(/\s+/).map(t=>kp(t,e)).join(" "),kp=(r,e)=>{ae("caret",r,e);let t=e.loose?Pe[$e.CARETLOOSE]:Pe[$e.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,c,u)=>{ae("caret",r,s,i,a,c,u);let o;return Ee(i)?o="":Ee(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:Ee(c)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:u?(ae("replaceCaret pr",u),i==="0"?a==="0"?o=`>=${i}.${a}.${c}-${u} <${i}.${a}.${+c+1}-0`:o=`>=${i}.${a}.${c}-${u} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${c}-${u} <${+i+1}.0.0-0`):(ae("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${c}${n} <${i}.${a}.${+c+1}-0`:o=`>=${i}.${a}.${c}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${c} <${+i+1}.0.0-0`),ae("caret return",o),o})},xp=(r,e)=>(ae("replaceXRanges",r,e),r.split(/\s+/).map(t=>Lp(t,e)).join(" ")),Lp=(r,e)=>{r=r.trim();let t=e.loose?Pe[$e.XRANGELOOSE]:Pe[$e.XRANGE];return r.replace(t,(n,s,i,a,c,u)=>{ae("xRange",r,n,s,i,a,c,u);let o=Ee(i),l=o||Ee(a),d=l||Ee(c),y=d;return s==="="&&y&&(s=""),u=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&y?(l&&(a=0),c=0,s===">"?(s=">=",l?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",l?i=+i+1:a=+a+1),s==="<"&&(u="-0"),n=`${s+i}.${a}.${c}${u}`):l?n=`>=${i}.0.0${u} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${u} <${i}.${+a+1}.0-0`),ae("xRange return",n),n})},Mp=(r,e)=>(ae("replaceStars",r,e),r.trim().replace(Pe[$e.STAR],"")),Fp=(r,e)=>(ae("replaceGTE0",r,e),r.trim().replace(Pe[e.includePrerelease?$e.GTE0PRE:$e.GTE0],"")),Vp=r=>(e,t,n,s,i,a,c,u,o,l,d,y,m)=>(Ee(n)?t="":Ee(s)?t=`>=${n}.0.0${r?"-0":""}`:Ee(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Ee(o)?u="":Ee(l)?u=`<${+o+1}.0.0-0`:Ee(d)?u=`<${o}.${+l+1}.0-0`:y?u=`<=${o}.${l}.${d}-${y}`:r?u=`<${o}.${l}.${+d+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),Hp=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(ae(r[n].semver),r[n].semver!==ti.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var tn=_((aw,eu)=>{var rn=Symbol("SemVer ANY"),gr=class{static get ANY(){return rn}constructor(e,t){if(t=Up(t),e instanceof gr){if(e.loose===!!t.loose)return e;e=e.value}ni("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===rn?this.value="":this.value=this.operator+this.semver.version,ni("comp",this)}parse(e){let t=this.options.loose?Jc[Yc.COMPARATORLOOSE]:Jc[Yc.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Zc(n[2],this.options.loose):this.semver=rn}toString(){return this.value}test(e){if(ni("Comparator.test",e,this.options.loose),this.semver===rn||e===rn)return!0;if(typeof e=="string")try{e=new Zc(e,this.options)}catch{return!1}return ri(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof gr))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Qc(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Qc(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),c=ri(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=ri(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||c||u}};eu.exports=gr;var Up=Yr(),{re:Jc,t:Yc}=Mt(),ri=Js(),ni=Jr(),Zc=ge(),Qc=Ue()});var nn=_((ow,tu)=>{var Gp=Ue(),zp=(r,e,t)=>{try{e=new Gp(e,t)}catch{return!1}return e.test(r)};tu.exports=zp});var nu=_((cw,ru)=>{var Kp=Ue(),Xp=(r,e)=>new Kp(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));ru.exports=Xp});var iu=_((uw,su)=>{var Wp=ge(),Bp=Ue(),Jp=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Bp(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new Wp(n,t))}),n};su.exports=Jp});var ou=_((lw,au)=>{var Yp=ge(),Zp=Ue(),Qp=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Zp(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new Yp(n,t))}),n};au.exports=Qp});var lu=_((fw,uu)=>{var si=ge(),em=Ue(),cu=Zr(),tm=(r,e)=>{r=new em(r,e);let t=new si("0.0.0");if(r.test(t)||(t=new si("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let c=new si(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||cu(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||cu(t,i))&&(t=i)}return t&&r.test(t)?t:null};uu.exports=tm});var du=_((dw,fu)=>{var rm=Ue(),nm=(r,e)=>{try{return new rm(r,e).range||"*"}catch{return null}};fu.exports=nm});var rs=_((hw,gu)=>{var sm=ge(),mu=tn(),{ANY:im}=mu,am=Ue(),om=nn(),hu=Zr(),pu=Jn(),cm=Zn(),um=Yn(),lm=(r,e,t,n)=>{r=new sm(r,n),e=new am(e,n);let s,i,a,c,u;switch(t){case">":s=hu,i=cm,a=pu,c=">",u=">=";break;case"<":s=pu,i=um,a=hu,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(om(r,e,n))return!1;for(let o=0;o<e.set.length;++o){let l=e.set[o],d=null,y=null;if(l.forEach(m=>{m.semver===im&&(m=new mu(">=0.0.0")),d=d||m,y=y||m,s(m.semver,d.semver,n)?d=m:a(m.semver,y.semver,n)&&(y=m)}),d.operator===c||d.operator===u||(!y.operator||y.operator===c)&&i(r,y.semver))return!1;if(y.operator===u&&a(r,y.semver))return!1}return!0};gu.exports=lm});var _u=_((pw,vu)=>{var fm=rs(),dm=(r,e,t)=>fm(r,e,">",t);vu.exports=dm});var $u=_((mw,yu)=>{var hm=rs(),pm=(r,e,t)=>hm(r,e,"<",t);yu.exports=pm});var bu=_((gw,wu)=>{var Eu=Ue(),mm=(r,e,t)=>(r=new Eu(r,t),e=new Eu(e,t),r.intersects(e));wu.exports=mm});var Ou=_((vw,Su)=>{var gm=nn(),vm=He();Su.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((l,d)=>vm(l,d,t));for(let l of a)gm(l,e,t)?(i=l,s||(s=l)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let c=[];for(let[l,d]of n)l===d?c.push(l):!d&&l===a[0]?c.push("*"):d?l===a[0]?c.push(`<=${d}`):c.push(`${l} - ${d}`):c.push(`>=${l}`);let u=c.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return u.length<o.length?u:e}});var Iu=_((_w,Nu)=>{var Pu=Ue(),ns=tn(),{ANY:ii}=ns,sn=nn(),ai=He(),_m=(r,e,t={})=>{if(r===e)return!0;r=new Pu(r,t),e=new Pu(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=ym(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},ym=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===ii){if(e.length===1&&e[0].semver===ii)return!0;t.includePrerelease?r=[new ns(">=0.0.0-0")]:r=[new ns(">=0.0.0")]}if(e.length===1&&e[0].semver===ii){if(t.includePrerelease)return!0;e=[new ns(">=0.0.0")]}let n=new Set,s,i;for(let m of r)m.operator===">"||m.operator===">="?s=Ru(s,m,t):m.operator==="<"||m.operator==="<="?i=Cu(i,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(s&&i){if(a=ai(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let m of n){if(s&&!sn(m,String(s),t)||i&&!sn(m,String(i),t))return null;for(let $ of e)if(!sn(m,String($),t))return!1;return!0}let c,u,o,l,d=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,y=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let m of e){if(l=l||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(y&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===y.major&&m.semver.minor===y.minor&&m.semver.patch===y.patch&&(y=!1),m.operator===">"||m.operator===">="){if(c=Ru(s,m,t),c===m&&c!==s)return!1}else if(s.operator===">="&&!sn(s.semver,String(m),t))return!1}if(i){if(d&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===d.major&&m.semver.minor===d.minor&&m.semver.patch===d.patch&&(d=!1),m.operator==="<"||m.operator==="<="){if(u=Cu(i,m,t),u===m&&u!==i)return!1}else if(i.operator==="<="&&!sn(i.semver,String(m),t))return!1}if(!m.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&l&&!s&&a!==0||y||d)},Ru=(r,e,t)=>{if(!r)return e;let n=ai(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Cu=(r,e,t)=>{if(!r)return e;let n=ai(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Nu.exports=_m});var Au=_((yw,Tu)=>{var oi=Mt();Tu.exports={re:oi.re,src:oi.src,tokens:oi.t,SEMVER_SPEC_VERSION:Br().SEMVER_SPEC_VERSION,SemVer:ge(),compareIdentifiers:zn().compareIdentifiers,rcompareIdentifiers:zn().rcompareIdentifiers,parse:Ft(),valid:Qo(),clean:tc(),inc:sc(),diff:lc(),major:dc(),minor:pc(),patch:gc(),prerelease:_c(),compare:He(),rcompare:$c(),compareLoose:wc(),compareBuild:Bn(),sort:Pc(),rsort:Cc(),gt:Zr(),lt:Jn(),eq:Wn(),neq:Bs(),gte:Yn(),lte:Zn(),cmp:Js(),coerce:kc(),Comparator:tn(),Range:Ue(),satisfies:nn(),toComparators:nu(),maxSatisfying:iu(),minSatisfying:ou(),minVersion:lu(),validRange:du(),outside:rs(),gtr:_u(),ltr:$u(),intersects:bu(),simplifyRange:Ou(),subset:Iu()}});var vt=_(je=>{"use strict";var $m=je&&je.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Em=je&&je.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wm=je&&je.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$m(e,r,t);return Em(e,r),e},qu=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0});je.getCoreVersion=void 0;var Du=qu(require("path")),ju=qu(require("fs")),ci=wm(require("@serverless-devs/core")),bm=Au(),ku=Du.default.join(ci.getRootHome(),"cache","core"),ui=Du.default.join(ku,"package.json");function Sm(){if(ju.default.existsSync(ui)){var r=require("@serverless-devs/core/package.json").version,e=xu();return bm.gt(e,r)?require(ku):ci}return ci}function xu(){return ju.default.existsSync(ui)?require(ui).version:void 0}je.getCoreVersion=xu;je.default=Sm()});var di=_(Re=>{"use strict";var Om=Re&&Re.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},Pm=Re&&Re.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Lu=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0});Re.handlerProfileFile=Re.getConfig=Re.setConfig=void 0;var Mu=Lu(require("path")),fi=Lu(vt()),it=fi.default.fse,ss=fi.default.jsyaml,li=fi.default.getRootHome;function Rm(r){var e=Vu();it.writeFileSync(e,ss.dump(r))}function Fu(){var r=Vu();if(!it.existsSync(r))return{};try{var e=ss.load(it.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function Vu(){var r=Mu.default.join(li(),"set-config.yml");return it.existsSync(r)||it.createFileSync(r),r}function Cm(r,e){var t=Fu();t[r]=e,Rm(t)}Re.setConfig=Cm;function Nm(r,e){var t=Fu();return t[r]||e}Re.getConfig=Nm;function Im(r){return Om(this,void 0,void 0,function(){var e,t,n,s,i,a,c;return Pm(this,function(u){switch(u.label){case 0:if(e=r.filePath||"set-config.yml",t=Mu.default.join(li(),e),n=it.existsSync(t),s={},n)return[3,5];i=li(),u.label=1;case 1:return u.trys.push([1,2,,4]),it.statSync(i),[3,4];case 2:return a=u.sent(),[4,it.mkdirSync(i)];case 3:return u.sent(),[3,4];case 4:return[3,6];case 5:try{s=ss.load(it.readFileSync(t,"utf8"))||{}}catch(o){throw o}u.label=6;case 6:return r.read?[2,s]:(c=r.configKey||"",s[c]=r.data,[4,it.writeFileSync(t,ss.dump(s))]);case 7:return u.sent(),[2,s]}})})}Re.handlerProfileFile=Im});var is=_(an=>{"use strict";var Tm=an&&an.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(an,"__esModule",{value:!0});var Am=Tm(vt()),qm=Am.default.Logger,hi=new qm("S-CLI");hi.success=function(r){return hi.log(r,"green")};an.default=hi});var Hu=_((bw,Dm)=>{Dm.exports={name:"@serverless-devs/s",version:"2.1.5",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:"jest test/special-command.test",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.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","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.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8",open:"^8.4.0","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"latest","@serverless-devs/ui":"latest"}}});var mi=_(N=>{"use strict";var jm=N&&N.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),km=N&&N.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),xm=N&&N.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&jm(e,r,t);return km(e,r),e},_r=N&&N.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},yr=N&&N.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},as=N&&N.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(N,"__esModule",{value:!0});N.specifyServiceHelp=N.getTempCommandStr=N.emoji=N.mark=N.replaceTemplate=N.replaceFun=N.getLang=N.printn=N.getFolderSize=N.getVersion=N.aiRequest=N.getCredentialWithAll=N.getCredentialWithExisted=N.getProcessArgv=N.bgRed=N.yellow=N.red=void 0;var Lm=as(require("path")),on=as(require("fs")),Mm=as(require("os")),we=xm(vt()),Fm=di(),vr=as(is()),Uu=Hu(),$r=we.default.colors,Vm=we.default.got,Hm=we.default.isDocker,Um=we.default.isCiCdEnv,Ot=we.default.lodash,Gu=we.default.publishHelp,Gm=Ot.get,zm=Ot.trim,Km=Ot.assign,Xm=Ot.filter,zu=Ot.includes,Wm=Ot.omit,Bm=Ot.isPlainObject,Jm=Ot.isEmpty,Ym=$r.underline,Zm=$r.bold;N.red=$r.hex("#fd5750");N.yellow=$r.hex("#F3F99D");N.bgRed=$r.hex("#000").bgHex("#fd5750");var Qm=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=we.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),Km({},t,{noHelpArgv:process.argv.slice(0,2).concat(Xm(t._argsObj,function(n){return!zu(["-h","--help"],n)}))})}catch{return{}}};N.getProcessArgv=Qm;var eg=function(r){return _r(void 0,void 0,void 0,function(){var e,t;return yr(this,function(n){switch(n.label){case 0:return[4,we.default.getCredentialAliasList()];case 1:return e=n.sent(),zu(e,r)?[4,we.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};N.getCredentialWithExisted=eg;var tg=function(){return _r(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return yr(this,function(a){switch(a.label){case 0:return[4,we.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,we.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=Wm(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};N.getCredentialWithAll=tg;var rg=function(r,e){return e===void 0&&(e="unknow"),_r(void 0,void 0,void 0,function(){var t,n,s,i;return yr(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,Fm.getConfig)("analysis"),t!=="enable"?[2]:Hm()||Um()?[2]:[4,Vm("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=Gm(n.body,"shorturl"),s&&vr.default.log(`AI Tips:
15
+ `)}function No(r,e,t){return r.match(/[\n]\s+/)||e<40?r:qo(r,e,t)}function Io(r,e){r._hasHelpOption&&e.find(n=>n===r._helpLongFlag||n===r._helpShortFlag)&&(r.outputHelp(),r._exit(0,"commander.helpDisplayed","(outputHelp)"))}function To(r){let e=r.name+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}function Do(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}function Ao(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}});var Jr=_((mw,xo)=>{var gh="2.0.0",vh=Number.MAX_SAFE_INTEGER||9007199254740991,_h=16;xo.exports={SEMVER_SPEC_VERSION:gh,MAX_LENGTH:256,MAX_SAFE_INTEGER:vh,MAX_SAFE_COMPONENT_LENGTH:_h}});var Yr=_((gw,Lo)=>{var yh=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Lo.exports=yh});var Mt=_((St,Mo)=>{var{MAX_SAFE_COMPONENT_LENGTH:Xs}=Jr(),$h=Yr();St=Mo.exports={};var Eh=St.re=[],O=St.src=[],P=St.t={},wh=0,j=(r,e,t)=>{let n=wh++;$h(r,n,e),P[r]=n,O[n]=e,Eh[n]=new RegExp(e,t?"g":void 0)};j("NUMERICIDENTIFIER","0|[1-9]\\d*");j("NUMERICIDENTIFIERLOOSE","[0-9]+");j("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");j("MAINVERSION",`(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})\\.(${O[P.NUMERICIDENTIFIER]})`);j("MAINVERSIONLOOSE",`(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})\\.(${O[P.NUMERICIDENTIFIERLOOSE]})`);j("PRERELEASEIDENTIFIER",`(?:${O[P.NUMERICIDENTIFIER]}|${O[P.NONNUMERICIDENTIFIER]})`);j("PRERELEASEIDENTIFIERLOOSE",`(?:${O[P.NUMERICIDENTIFIERLOOSE]}|${O[P.NONNUMERICIDENTIFIER]})`);j("PRERELEASE",`(?:-(${O[P.PRERELEASEIDENTIFIER]}(?:\\.${O[P.PRERELEASEIDENTIFIER]})*))`);j("PRERELEASELOOSE",`(?:-?(${O[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${O[P.PRERELEASEIDENTIFIERLOOSE]})*))`);j("BUILDIDENTIFIER","[0-9A-Za-z-]+");j("BUILD",`(?:\\+(${O[P.BUILDIDENTIFIER]}(?:\\.${O[P.BUILDIDENTIFIER]})*))`);j("FULLPLAIN",`v?${O[P.MAINVERSION]}${O[P.PRERELEASE]}?${O[P.BUILD]}?`);j("FULL",`^${O[P.FULLPLAIN]}$`);j("LOOSEPLAIN",`[v=\\s]*${O[P.MAINVERSIONLOOSE]}${O[P.PRERELEASELOOSE]}?${O[P.BUILD]}?`);j("LOOSE",`^${O[P.LOOSEPLAIN]}$`);j("GTLT","((?:<|>)?=?)");j("XRANGEIDENTIFIERLOOSE",`${O[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);j("XRANGEIDENTIFIER",`${O[P.NUMERICIDENTIFIER]}|x|X|\\*`);j("XRANGEPLAIN",`[v=\\s]*(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:\\.(${O[P.XRANGEIDENTIFIER]})(?:${O[P.PRERELEASE]})?${O[P.BUILD]}?)?)?`);j("XRANGEPLAINLOOSE",`[v=\\s]*(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${O[P.XRANGEIDENTIFIERLOOSE]})(?:${O[P.PRERELEASELOOSE]})?${O[P.BUILD]}?)?)?`);j("XRANGE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAIN]}$`);j("XRANGELOOSE",`^${O[P.GTLT]}\\s*${O[P.XRANGEPLAINLOOSE]}$`);j("COERCE",`(^|[^\\d])(\\d{1,${Xs}})(?:\\.(\\d{1,${Xs}}))?(?:\\.(\\d{1,${Xs}}))?(?:$|[^\\d])`);j("COERCERTL",O[P.COERCE],!0);j("LONETILDE","(?:~>?)");j("TILDETRIM",`(\\s*)${O[P.LONETILDE]}\\s+`,!0);St.tildeTrimReplace="$1~";j("TILDE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAIN]}$`);j("TILDELOOSE",`^${O[P.LONETILDE]}${O[P.XRANGEPLAINLOOSE]}$`);j("LONECARET","(?:\\^)");j("CARETTRIM",`(\\s*)${O[P.LONECARET]}\\s+`,!0);St.caretTrimReplace="$1^";j("CARET",`^${O[P.LONECARET]}${O[P.XRANGEPLAIN]}$`);j("CARETLOOSE",`^${O[P.LONECARET]}${O[P.XRANGEPLAINLOOSE]}$`);j("COMPARATORLOOSE",`^${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]})$|^$`);j("COMPARATOR",`^${O[P.GTLT]}\\s*(${O[P.FULLPLAIN]})$|^$`);j("COMPARATORTRIM",`(\\s*)${O[P.GTLT]}\\s*(${O[P.LOOSEPLAIN]}|${O[P.XRANGEPLAIN]})`,!0);St.comparatorTrimReplace="$1$2$3";j("HYPHENRANGE",`^\\s*(${O[P.XRANGEPLAIN]})\\s+-\\s+(${O[P.XRANGEPLAIN]})\\s*$`);j("HYPHENRANGELOOSE",`^\\s*(${O[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${O[P.XRANGEPLAINLOOSE]})\\s*$`);j("STAR","(<|>)?=?\\s*\\*");j("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");j("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Zr=_((vw,Fo)=>{var bh=["includePrerelease","loose","rtl"],Sh=r=>r?typeof r!="object"?{loose:!0}:bh.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};Fo.exports=Sh});var Ws=_((_w,Uo)=>{var Vo=/^[0-9]+$/,Ho=(r,e)=>{let t=Vo.test(r),n=Vo.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Oh=(r,e)=>Ho(e,r);Uo.exports={compareIdentifiers:Ho,rcompareIdentifiers:Oh}});var ge=_((yw,Xo)=>{var zn=Yr(),{MAX_LENGTH:Go,MAX_SAFE_INTEGER:Kn}=Jr(),{re:zo,t:Ko}=Mt(),Ph=Zr(),{compareIdentifiers:hr}=Ws(),De=class{constructor(e,t){if(t=Ph(t),e instanceof De){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Go)throw new TypeError(`version is longer than ${Go} characters`);zn("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?zo[Ko.LOOSE]:zo[Ko.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Kn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Kn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Kn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Kn)return i}return s}):this.prerelease=[],this.build=n[5]?n[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(e){if(zn("SemVer.compare",this.version,this.options,e),!(e instanceof De)){if(typeof e=="string"&&e===this.version)return 0;e=new De(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof De||(e=new De(e,this.options)),hr(this.major,e.major)||hr(this.minor,e.minor)||hr(this.patch,e.patch)}comparePre(e){if(e instanceof De||(e=new De(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(zn("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return hr(n,s)}while(++t)}compareBuild(e){e instanceof De||(e=new De(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(zn("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return hr(n,s)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);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 n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}t&&(hr(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};Xo.exports=De});var Ft=_(($w,Yo)=>{var{MAX_LENGTH:Rh}=Jr(),{re:Wo,t:Bo}=Mt(),Jo=ge(),Ch=Zr(),Nh=(r,e)=>{if(e=Ch(e),r instanceof Jo)return r;if(typeof r!="string"||r.length>Rh||!(e.loose?Wo[Bo.LOOSE]:Wo[Bo.FULL]).test(r))return null;try{return new Jo(r,e)}catch{return null}};Yo.exports=Nh});var Qo=_((Ew,Zo)=>{var Ih=Ft(),Th=(r,e)=>{let t=Ih(r,e);return t?t.version:null};Zo.exports=Th});var tc=_((ww,ec)=>{var Ah=Ft(),qh=(r,e)=>{let t=Ah(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};ec.exports=qh});var sc=_((bw,nc)=>{var rc=ge(),Dh=(r,e,t,n)=>{typeof t=="string"&&(n=t,t=void 0);try{return new rc(r instanceof rc?r.version:r,t).inc(e,n).version}catch{return null}};nc.exports=Dh});var He=_((Sw,ac)=>{var ic=ge(),jh=(r,e,t)=>new ic(r,t).compare(new ic(e,t));ac.exports=jh});var Xn=_((Ow,oc)=>{var kh=He(),xh=(r,e,t)=>kh(r,e,t)===0;oc.exports=xh});var lc=_((Pw,uc)=>{var cc=Ft(),Lh=Xn(),Mh=(r,e)=>{if(Lh(r,e))return null;{let t=cc(r),n=cc(e),s=t.prerelease.length||n.prerelease.length,i=s?"pre":"",a=s?"prerelease":"";for(let c in t)if((c==="major"||c==="minor"||c==="patch")&&t[c]!==n[c])return i+c;return a}};uc.exports=Mh});var dc=_((Rw,fc)=>{var Fh=ge(),Vh=(r,e)=>new Fh(r,e).major;fc.exports=Vh});var pc=_((Cw,hc)=>{var Hh=ge(),Uh=(r,e)=>new Hh(r,e).minor;hc.exports=Uh});var gc=_((Nw,mc)=>{var Gh=ge(),zh=(r,e)=>new Gh(r,e).patch;mc.exports=zh});var _c=_((Iw,vc)=>{var Kh=Ft(),Xh=(r,e)=>{let t=Kh(r,e);return t&&t.prerelease.length?t.prerelease:null};vc.exports=Xh});var $c=_((Tw,yc)=>{var Wh=He(),Bh=(r,e,t)=>Wh(e,r,t);yc.exports=Bh});var wc=_((Aw,Ec)=>{var Jh=He(),Yh=(r,e)=>Jh(r,e,!0);Ec.exports=Yh});var Wn=_((qw,Sc)=>{var bc=ge(),Zh=(r,e,t)=>{let n=new bc(r,t),s=new bc(e,t);return n.compare(s)||n.compareBuild(s)};Sc.exports=Zh});var Pc=_((Dw,Oc)=>{var Qh=Wn(),ep=(r,e)=>r.sort((t,n)=>Qh(t,n,e));Oc.exports=ep});var Cc=_((jw,Rc)=>{var tp=Wn(),rp=(r,e)=>r.sort((t,n)=>tp(n,t,e));Rc.exports=rp});var Qr=_((kw,Nc)=>{var np=He(),sp=(r,e,t)=>np(r,e,t)>0;Nc.exports=sp});var Bn=_((xw,Ic)=>{var ip=He(),ap=(r,e,t)=>ip(r,e,t)<0;Ic.exports=ap});var Bs=_((Lw,Tc)=>{var op=He(),cp=(r,e,t)=>op(r,e,t)!==0;Tc.exports=cp});var Jn=_((Mw,Ac)=>{var up=He(),lp=(r,e,t)=>up(r,e,t)>=0;Ac.exports=lp});var Yn=_((Fw,qc)=>{var fp=He(),dp=(r,e,t)=>fp(r,e,t)<=0;qc.exports=dp});var Js=_((Vw,Dc)=>{var hp=Xn(),pp=Bs(),mp=Qr(),gp=Jn(),vp=Bn(),_p=Yn(),yp=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return hp(r,t,n);case"!=":return pp(r,t,n);case">":return mp(r,t,n);case">=":return gp(r,t,n);case"<":return vp(r,t,n);case"<=":return _p(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Dc.exports=yp});var kc=_((Hw,jc)=>{var $p=ge(),Ep=Ft(),{re:Zn,t:Qn}=Mt(),wp=(r,e)=>{if(r instanceof $p)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Zn[Qn.COERCE]);else{let n;for(;(n=Zn[Qn.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||n.index+n[0].length!==t.index+t[0].length)&&(t=n),Zn[Qn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Zn[Qn.COERCERTL].lastIndex=-1}return t===null?null:Ep(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};jc.exports=wp});var Lc=_((Uw,xc)=>{"use strict";xc.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Fc=_((Gw,Mc)=>{"use strict";Mc.exports=X;X.Node=Vt;X.create=X;function X(r){var e=this;if(e instanceof X||(e=new X),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var t=0,n=arguments.length;t<n;t++)e.push(arguments[t]);return e}X.prototype.removeNode=function(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");var e=r.next,t=r.prev;return e&&(e.prev=t),t&&(t.next=e),r===this.head&&(this.head=e),r===this.tail&&(this.tail=t),r.list.length--,r.next=null,r.prev=null,r.list=null,e};X.prototype.unshiftNode=function(r){if(r!==this.head){r.list&&r.list.removeNode(r);var e=this.head;r.list=this,r.next=e,e&&(e.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}};X.prototype.pushNode=function(r){if(r!==this.tail){r.list&&r.list.removeNode(r);var e=this.tail;r.list=this,r.prev=e,e&&(e.next=r),this.tail=r,this.head||(this.head=r),this.length++}};X.prototype.push=function(){for(var r=0,e=arguments.length;r<e;r++)Sp(this,arguments[r]);return this.length};X.prototype.unshift=function(){for(var r=0,e=arguments.length;r<e;r++)Op(this,arguments[r]);return this.length};X.prototype.pop=function(){if(!!this.tail){var r=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,r}};X.prototype.shift=function(){if(!!this.head){var r=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,r}};X.prototype.forEach=function(r,e){e=e||this;for(var t=this.head,n=0;t!==null;n++)r.call(e,t.value,n,this),t=t.next};X.prototype.forEachReverse=function(r,e){e=e||this;for(var t=this.tail,n=this.length-1;t!==null;n--)r.call(e,t.value,n,this),t=t.prev};X.prototype.get=function(r){for(var e=0,t=this.head;t!==null&&e<r;e++)t=t.next;if(e===r&&t!==null)return t.value};X.prototype.getReverse=function(r){for(var e=0,t=this.tail;t!==null&&e<r;e++)t=t.prev;if(e===r&&t!==null)return t.value};X.prototype.map=function(r,e){e=e||this;for(var t=new X,n=this.head;n!==null;)t.push(r.call(e,n.value,this)),n=n.next;return t};X.prototype.mapReverse=function(r,e){e=e||this;for(var t=new X,n=this.tail;n!==null;)t.push(r.call(e,n.value,this)),n=n.prev;return t};X.prototype.reduce=function(r,e){var t,n=this.head;if(arguments.length>1)t=e;else if(this.head)n=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)t=r(t,n.value,s),n=n.next;return t};X.prototype.reduceReverse=function(r,e){var t,n=this.tail;if(arguments.length>1)t=e;else if(this.tail)n=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)t=r(t,n.value,s),n=n.prev;return t};X.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};X.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};X.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new X;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(;s!==null&&n<e;n++,s=s.next)t.push(s.value);return t};X.prototype.sliceReverse=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new X;if(e<r||e<0)return t;r<0&&(r=0),e>this.length&&(e=this.length);for(var n=this.length,s=this.tail;s!==null&&n>e;n--)s=s.prev;for(;s!==null&&n>r;n--,s=s.prev)t.push(s.value);return t};X.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var n=0,s=this.head;s!==null&&n<r;n++)s=s.next;for(var i=[],n=0;s&&n<e;n++)i.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var n=0;n<t.length;n++)s=bp(this,s,t[n]);return i};X.prototype.reverse=function(){for(var r=this.head,e=this.tail,t=r;t!==null;t=t.prev){var n=t.prev;t.prev=t.next,t.next=n}return this.head=e,this.tail=r,this};function bp(r,e,t){var n=e===r.head?new Vt(t,null,e,r):new Vt(t,e,e.next,r);return n.next===null&&(r.tail=n),n.prev===null&&(r.head=n),r.length++,n}function Sp(r,e){r.tail=new Vt(e,r.tail,null,r),r.head||(r.head=r.tail),r.length++}function Op(r,e){r.head=new Vt(e,null,r.head,r),r.tail||(r.tail=r.head),r.length++}function Vt(r,e,t,n){if(!(this instanceof Vt))return new Vt(r,e,t,n);this.list=n,this.value=r,e?(e.next=this,this.prev=e):this.prev=null,t?(t.prev=this,this.next=t):this.next=null}try{Lc()(X)}catch{}});var zc=_((zw,Gc)=>{"use strict";var Pp=Fc(),Ht=Symbol("max"),gt=Symbol("length"),pr=Symbol("lengthCalculator"),tn=Symbol("allowStale"),Ut=Symbol("maxAge"),mt=Symbol("dispose"),Vc=Symbol("noDisposeOnSet"),fe=Symbol("lruList"),We=Symbol("cache"),Uc=Symbol("updateAgeOnGet"),Ys=()=>1,Qs=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Ht]=e.max||1/0,n=e.length||Ys;if(this[pr]=typeof n!="function"?Ys:n,this[tn]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ut]=e.maxAge||0,this[mt]=e.dispose,this[Vc]=e.noDisposeOnSet||!1,this[Uc]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ht]=e||1/0,en(this)}get max(){return this[Ht]}set allowStale(e){this[tn]=!!e}get allowStale(){return this[tn]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ut]=e,en(this)}get maxAge(){return this[Ut]}set lengthCalculator(e){typeof e!="function"&&(e=Ys),e!==this[pr]&&(this[pr]=e,this[gt]=0,this[fe].forEach(t=>{t.length=this[pr](t.value,t.key),this[gt]+=t.length})),en(this)}get lengthCalculator(){return this[pr]}get length(){return this[gt]}get itemCount(){return this[fe].length}rforEach(e,t){t=t||this;for(let n=this[fe].tail;n!==null;){let s=n.prev;Hc(this,e,n,t),n=s}}forEach(e,t){t=t||this;for(let n=this[fe].head;n!==null;){let s=n.next;Hc(this,e,n,t),n=s}}keys(){return this[fe].toArray().map(e=>e.key)}values(){return this[fe].toArray().map(e=>e.value)}reset(){this[mt]&&this[fe]&&this[fe].length&&this[fe].forEach(e=>this[mt](e.key,e.value)),this[We]=new Map,this[fe]=new Pp,this[gt]=0}dump(){return this[fe].map(e=>es(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[fe]}set(e,t,n){if(n=n||this[Ut],n&&typeof n!="number")throw new TypeError("maxAge must be a number");let s=n?Date.now():0,i=this[pr](t,e);if(this[We].has(e)){if(i>this[Ht])return mr(this,this[We].get(e)),!1;let u=this[We].get(e).value;return this[mt]&&(this[Vc]||this[mt](e,u.value)),u.now=s,u.maxAge=n,u.value=t,this[gt]+=i-u.length,u.length=i,this.get(e),en(this),!0}let a=new ei(e,t,i,s,n);return a.length>this[Ht]?(this[mt]&&this[mt](e,t),!1):(this[gt]+=a.length,this[fe].unshift(a),this[We].set(e,this[fe].head),en(this),!0)}has(e){if(!this[We].has(e))return!1;let t=this[We].get(e).value;return!es(this,t)}get(e){return Zs(this,e,!0)}peek(e){return Zs(this,e,!1)}pop(){let e=this[fe].tail;return e?(mr(this,e),e.value):null}del(e){mr(this,this[We].get(e))}load(e){this.reset();let t=Date.now();for(let n=e.length-1;n>=0;n--){let s=e[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{let a=i-t;a>0&&this.set(s.k,s.v,a)}}}prune(){this[We].forEach((e,t)=>Zs(this,t,!1))}},Zs=(r,e,t)=>{let n=r[We].get(e);if(n){let s=n.value;if(es(r,s)){if(mr(r,n),!r[tn])return}else t&&(r[Uc]&&(n.value.now=Date.now()),r[fe].unshiftNode(n));return s.value}},es=(r,e)=>{if(!e||!e.maxAge&&!r[Ut])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Ut]&&t>r[Ut]},en=r=>{if(r[gt]>r[Ht])for(let e=r[fe].tail;r[gt]>r[Ht]&&e!==null;){let t=e.prev;mr(r,e),e=t}},mr=(r,e)=>{if(e){let t=e.value;r[mt]&&r[mt](t.key,t.value),r[gt]-=t.length,r[We].delete(t.key),r[fe].removeNode(e)}},ei=class{constructor(e,t,n,s,i){this.key=e,this.value=t,this.length=n,this.now=s,this.maxAge=i||0}},Hc=(r,e,t,n)=>{let s=t.value;es(r,s)&&(mr(r,t),r[tn]||(s=void 0)),s&&e.call(n,s.value,s.key,r)};Gc.exports=Qs});var Ue=_((Kw,Bc)=>{var Gt=class{constructor(e,t){if(t=Cp(t),e instanceof Gt)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Gt(e.raw,t);if(e instanceof ti)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!Xc(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&qp(s[0])){this.set=[s];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,s=Kc.get(n);if(s)return s;let i=this.options.loose,a=i?Pe[$e.HYPHENRANGELOOSE]:Pe[$e.HYPHENRANGE];e=e.replace(a,Up(this.options.includePrerelease)),ae("hyphen replace",e),e=e.replace(Pe[$e.COMPARATORTRIM],Ip),ae("comparator trim",e),e=e.replace(Pe[$e.TILDETRIM],Tp),e=e.replace(Pe[$e.CARETTRIM],Ap),e=e.split(/\s+/).join(" ");let c=e.split(" ").map(d=>Dp(d,this.options)).join(" ").split(/\s+/).map(d=>Hp(d,this.options));i&&(c=c.filter(d=>(ae("loose invalid filter",d,this.options),!!d.match(Pe[$e.COMPARATORLOOSE])))),ae("range list",c);let u=new Map,o=c.map(d=>new ti(d,this.options));for(let d of o){if(Xc(d))return[d];u.set(d.value,d)}u.size>1&&u.has("")&&u.delete("");let l=[...u.values()];return Kc.set(n,l),l}intersects(e,t){if(!(e instanceof Gt))throw new TypeError("a Range is required");return this.set.some(n=>Wc(n,t)&&e.set.some(s=>Wc(s,t)&&n.every(i=>s.every(a=>i.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Np(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Gp(this.set[t],e,this.options))return!0;return!1}};Bc.exports=Gt;var Rp=zc(),Kc=new Rp({max:1e3}),Cp=Zr(),ti=rn(),ae=Yr(),Np=ge(),{re:Pe,t:$e,comparatorTrimReplace:Ip,tildeTrimReplace:Tp,caretTrimReplace:Ap}=Mt(),Xc=r=>r.value==="<0.0.0-0",qp=r=>r.value==="",Wc=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},Dp=(r,e)=>(ae("comp",r,e),r=xp(r,e),ae("caret",r),r=jp(r,e),ae("tildes",r),r=Mp(r,e),ae("xrange",r),r=Vp(r,e),ae("stars",r),r),Ee=r=>!r||r.toLowerCase()==="x"||r==="*",jp=(r,e)=>r.trim().split(/\s+/).map(t=>kp(t,e)).join(" "),kp=(r,e)=>{let t=e.loose?Pe[$e.TILDELOOSE]:Pe[$e.TILDE];return r.replace(t,(n,s,i,a,c)=>{ae("tilde",r,n,s,i,a,c);let u;return Ee(s)?u="":Ee(i)?u=`>=${s}.0.0 <${+s+1}.0.0-0`:Ee(a)?u=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:c?(ae("replaceTilde pr",c),u=`>=${s}.${i}.${a}-${c} <${s}.${+i+1}.0-0`):u=`>=${s}.${i}.${a} <${s}.${+i+1}.0-0`,ae("tilde return",u),u})},xp=(r,e)=>r.trim().split(/\s+/).map(t=>Lp(t,e)).join(" "),Lp=(r,e)=>{ae("caret",r,e);let t=e.loose?Pe[$e.CARETLOOSE]:Pe[$e.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,a,c,u)=>{ae("caret",r,s,i,a,c,u);let o;return Ee(i)?o="":Ee(a)?o=`>=${i}.0.0${n} <${+i+1}.0.0-0`:Ee(c)?i==="0"?o=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.0${n} <${+i+1}.0.0-0`:u?(ae("replaceCaret pr",u),i==="0"?a==="0"?o=`>=${i}.${a}.${c}-${u} <${i}.${a}.${+c+1}-0`:o=`>=${i}.${a}.${c}-${u} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${c}-${u} <${+i+1}.0.0-0`):(ae("no pr"),i==="0"?a==="0"?o=`>=${i}.${a}.${c}${n} <${i}.${a}.${+c+1}-0`:o=`>=${i}.${a}.${c}${n} <${i}.${+a+1}.0-0`:o=`>=${i}.${a}.${c} <${+i+1}.0.0-0`),ae("caret return",o),o})},Mp=(r,e)=>(ae("replaceXRanges",r,e),r.split(/\s+/).map(t=>Fp(t,e)).join(" ")),Fp=(r,e)=>{r=r.trim();let t=e.loose?Pe[$e.XRANGELOOSE]:Pe[$e.XRANGE];return r.replace(t,(n,s,i,a,c,u)=>{ae("xRange",r,n,s,i,a,c,u);let o=Ee(i),l=o||Ee(a),d=l||Ee(c),y=d;return s==="="&&y&&(s=""),u=e.includePrerelease?"-0":"",o?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&y?(l&&(a=0),c=0,s===">"?(s=">=",l?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",l?i=+i+1:a=+a+1),s==="<"&&(u="-0"),n=`${s+i}.${a}.${c}${u}`):l?n=`>=${i}.0.0${u} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${u} <${i}.${+a+1}.0-0`),ae("xRange return",n),n})},Vp=(r,e)=>(ae("replaceStars",r,e),r.trim().replace(Pe[$e.STAR],"")),Hp=(r,e)=>(ae("replaceGTE0",r,e),r.trim().replace(Pe[e.includePrerelease?$e.GTE0PRE:$e.GTE0],"")),Up=r=>(e,t,n,s,i,a,c,u,o,l,d,y,m)=>(Ee(n)?t="":Ee(s)?t=`>=${n}.0.0${r?"-0":""}`:Ee(i)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Ee(o)?u="":Ee(l)?u=`<${+o+1}.0.0-0`:Ee(d)?u=`<${o}.${+l+1}.0-0`:y?u=`<=${o}.${l}.${d}-${y}`:r?u=`<${o}.${l}.${+d+1}-0`:u=`<=${u}`,`${t} ${u}`.trim()),Gp=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(ae(r[n].semver),r[n].semver!==ti.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var rn=_((Xw,eu)=>{var nn=Symbol("SemVer ANY"),gr=class{static get ANY(){return nn}constructor(e,t){if(t=zp(t),e instanceof gr){if(e.loose===!!t.loose)return e;e=e.value}ni("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===nn?this.value="":this.value=this.operator+this.semver.version,ni("comp",this)}parse(e){let t=this.options.loose?Jc[Yc.COMPARATORLOOSE]:Jc[Yc.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Zc(n[2],this.options.loose):this.semver=nn}toString(){return this.value}test(e){if(ni("Comparator.test",e,this.options.loose),this.semver===nn||e===nn)return!0;if(typeof e=="string")try{e=new Zc(e,this.options)}catch{return!1}return ri(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof gr))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Qc(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new Qc(this.value,t).test(e.semver);let n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),i=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),c=ri(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=ri(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||s||i&&a||c||u}};eu.exports=gr;var zp=Zr(),{re:Jc,t:Yc}=Mt(),ri=Js(),ni=Yr(),Zc=ge(),Qc=Ue()});var sn=_((Ww,tu)=>{var Kp=Ue(),Xp=(r,e,t)=>{try{e=new Kp(e,t)}catch{return!1}return e.test(r)};tu.exports=Xp});var nu=_((Bw,ru)=>{var Wp=Ue(),Bp=(r,e)=>new Wp(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));ru.exports=Bp});var iu=_((Jw,su)=>{var Jp=ge(),Yp=Ue(),Zp=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Yp(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new Jp(n,t))}),n};su.exports=Zp});var ou=_((Yw,au)=>{var Qp=ge(),em=Ue(),tm=(r,e,t)=>{let n=null,s=null,i=null;try{i=new em(e,t)}catch{return null}return r.forEach(a=>{i.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new Qp(n,t))}),n};au.exports=tm});var lu=_((Zw,uu)=>{var si=ge(),rm=Ue(),cu=Qr(),nm=(r,e)=>{r=new rm(r,e);let t=new si("0.0.0");if(r.test(t)||(t=new si("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(a=>{let c=new si(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||cu(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||cu(t,i))&&(t=i)}return t&&r.test(t)?t:null};uu.exports=nm});var du=_((Qw,fu)=>{var sm=Ue(),im=(r,e)=>{try{return new sm(r,e).range||"*"}catch{return null}};fu.exports=im});var ts=_((eb,gu)=>{var am=ge(),mu=rn(),{ANY:om}=mu,cm=Ue(),um=sn(),hu=Qr(),pu=Bn(),lm=Yn(),fm=Jn(),dm=(r,e,t,n)=>{r=new am(r,n),e=new cm(e,n);let s,i,a,c,u;switch(t){case">":s=hu,i=lm,a=pu,c=">",u=">=";break;case"<":s=pu,i=fm,a=hu,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(um(r,e,n))return!1;for(let o=0;o<e.set.length;++o){let l=e.set[o],d=null,y=null;if(l.forEach(m=>{m.semver===om&&(m=new mu(">=0.0.0")),d=d||m,y=y||m,s(m.semver,d.semver,n)?d=m:a(m.semver,y.semver,n)&&(y=m)}),d.operator===c||d.operator===u||(!y.operator||y.operator===c)&&i(r,y.semver))return!1;if(y.operator===u&&a(r,y.semver))return!1}return!0};gu.exports=dm});var _u=_((tb,vu)=>{var hm=ts(),pm=(r,e,t)=>hm(r,e,">",t);vu.exports=pm});var $u=_((rb,yu)=>{var mm=ts(),gm=(r,e,t)=>mm(r,e,"<",t);yu.exports=gm});var bu=_((nb,wu)=>{var Eu=Ue(),vm=(r,e,t)=>(r=new Eu(r,t),e=new Eu(e,t),r.intersects(e));wu.exports=vm});var Ou=_((sb,Su)=>{var _m=sn(),ym=He();Su.exports=(r,e,t)=>{let n=[],s=null,i=null,a=r.sort((l,d)=>ym(l,d,t));for(let l of a)_m(l,e,t)?(i=l,s||(s=l)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let c=[];for(let[l,d]of n)l===d?c.push(l):!d&&l===a[0]?c.push("*"):d?l===a[0]?c.push(`<=${d}`):c.push(`${l} - ${d}`):c.push(`>=${l}`);let u=c.join(" || "),o=typeof e.raw=="string"?e.raw:String(e);return u.length<o.length?u:e}});var Iu=_((ib,Nu)=>{var Pu=Ue(),rs=rn(),{ANY:ii}=rs,an=sn(),ai=He(),$m=(r,e,t={})=>{if(r===e)return!0;r=new Pu(r,t),e=new Pu(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let a=Em(s,i,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},Em=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===ii){if(e.length===1&&e[0].semver===ii)return!0;t.includePrerelease?r=[new rs(">=0.0.0-0")]:r=[new rs(">=0.0.0")]}if(e.length===1&&e[0].semver===ii){if(t.includePrerelease)return!0;e=[new rs(">=0.0.0")]}let n=new Set,s,i;for(let m of r)m.operator===">"||m.operator===">="?s=Ru(s,m,t):m.operator==="<"||m.operator==="<="?i=Cu(i,m,t):n.add(m.semver);if(n.size>1)return null;let a;if(s&&i){if(a=ai(s.semver,i.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let m of n){if(s&&!an(m,String(s),t)||i&&!an(m,String(i),t))return null;for(let $ of e)if(!an(m,String($),t))return!1;return!0}let c,u,o,l,d=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,y=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let m of e){if(l=l||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(y&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===y.major&&m.semver.minor===y.minor&&m.semver.patch===y.patch&&(y=!1),m.operator===">"||m.operator===">="){if(c=Ru(s,m,t),c===m&&c!==s)return!1}else if(s.operator===">="&&!an(s.semver,String(m),t))return!1}if(i){if(d&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===d.major&&m.semver.minor===d.minor&&m.semver.patch===d.patch&&(d=!1),m.operator==="<"||m.operator==="<="){if(u=Cu(i,m,t),u===m&&u!==i)return!1}else if(i.operator==="<="&&!an(i.semver,String(m),t))return!1}if(!m.operator&&(i||s)&&a!==0)return!1}return!(s&&o&&!i&&a!==0||i&&l&&!s&&a!==0||y||d)},Ru=(r,e,t)=>{if(!r)return e;let n=ai(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},Cu=(r,e,t)=>{if(!r)return e;let n=ai(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Nu.exports=$m});var qu=_((ab,Au)=>{var oi=Mt(),wm=Jr(),bm=ge(),Tu=Ws(),Sm=Ft(),Om=Qo(),Pm=tc(),Rm=sc(),Cm=lc(),Nm=dc(),Im=pc(),Tm=gc(),Am=_c(),qm=He(),Dm=$c(),jm=wc(),km=Wn(),xm=Pc(),Lm=Cc(),Mm=Qr(),Fm=Bn(),Vm=Xn(),Hm=Bs(),Um=Jn(),Gm=Yn(),zm=Js(),Km=kc(),Xm=rn(),Wm=Ue(),Bm=sn(),Jm=nu(),Ym=iu(),Zm=ou(),Qm=lu(),eg=du(),tg=ts(),rg=_u(),ng=$u(),sg=bu(),ig=Ou(),ag=Iu();Au.exports={parse:Sm,valid:Om,clean:Pm,inc:Rm,diff:Cm,major:Nm,minor:Im,patch:Tm,prerelease:Am,compare:qm,rcompare:Dm,compareLoose:jm,compareBuild:km,sort:xm,rsort:Lm,gt:Mm,lt:Fm,eq:Vm,neq:Hm,gte:Um,lte:Gm,cmp:zm,coerce:Km,Comparator:Xm,Range:Wm,satisfies:Bm,toComparators:Jm,maxSatisfying:Ym,minSatisfying:Zm,minVersion:Qm,validRange:eg,outside:tg,gtr:rg,ltr:ng,intersects:sg,simplifyRange:ig,subset:ag,SemVer:bm,re:oi.re,src:oi.src,tokens:oi.t,SEMVER_SPEC_VERSION:wm.SEMVER_SPEC_VERSION,compareIdentifiers:Tu.compareIdentifiers,rcompareIdentifiers:Tu.rcompareIdentifiers}});var vt=_(je=>{"use strict";var og=je&&je.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),cg=je&&je.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ug=je&&je.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&og(e,r,t);return cg(e,r),e},Du=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0});je.getCoreVersion=void 0;var ju=Du(require("path")),ku=Du(require("fs")),ci=ug(require("@serverless-devs/core")),lg=qu(),xu=ju.default.join(ci.getRootHome(),"cache","core"),ui=ju.default.join(xu,"package.json");function fg(){if(ku.default.existsSync(ui)){var r=require("@serverless-devs/core/package.json").version,e=Lu();return lg.gt(e,r)?require(xu):ci}return ci}function Lu(){return ku.default.existsSync(ui)?require(ui).version:void 0}je.getCoreVersion=Lu;je.default=fg()});var di=_(Re=>{"use strict";var dg=Re&&Re.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},hg=Re&&Re.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Mu=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0});Re.handlerProfileFile=Re.getConfig=Re.setConfig=void 0;var Fu=Mu(require("path")),fi=Mu(vt()),it=fi.default.fse,ns=fi.default.jsyaml,li=fi.default.getRootHome;function pg(r){var e=Hu();it.writeFileSync(e,ns.dump(r))}function Vu(){var r=Hu();if(!it.existsSync(r))return{};try{var e=ns.load(it.readFileSync(r,"utf8"))||{};return e}catch(t){throw t}}function Hu(){var r=Fu.default.join(li(),"set-config.yml");return it.existsSync(r)||it.createFileSync(r),r}function mg(r,e){var t=Vu();t[r]=e,pg(t)}Re.setConfig=mg;function gg(r,e){var t=Vu();return t[r]||e}Re.getConfig=gg;function vg(r){return dg(this,void 0,void 0,function(){var e,t,n,s,i,a,c;return hg(this,function(u){switch(u.label){case 0:if(e=r.filePath||"set-config.yml",t=Fu.default.join(li(),e),n=it.existsSync(t),s={},n)return[3,5];i=li(),u.label=1;case 1:return u.trys.push([1,2,,4]),it.statSync(i),[3,4];case 2:return a=u.sent(),[4,it.mkdirSync(i)];case 3:return u.sent(),[3,4];case 4:return[3,6];case 5:try{s=ns.load(it.readFileSync(t,"utf8"))||{}}catch(o){throw o}u.label=6;case 6:return r.read?[2,s]:(c=r.configKey||"",s[c]=r.data,[4,it.writeFileSync(t,ns.dump(s))]);case 7:return u.sent(),[2,s]}})})}Re.handlerProfileFile=vg});var ss=_(on=>{"use strict";var _g=on&&on.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(on,"__esModule",{value:!0});var yg=_g(vt()),$g=yg.default.Logger,hi=new $g("S-CLI");hi.success=function(r){return hi.log(r,"green")};on.default=hi});var Uu=_((lb,Eg)=>{Eg.exports={name:"@serverless-devs/s",version:"2.1.6-beta.2",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:"Apache 2.0",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:"jest test/special-command.test",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.4.0","@types/node":"^14.0.23","@typescript-eslint/eslint-plugin":"^4.14.1","@typescript-eslint/parser":"^4.14.1",ajv:"^8.10.0","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","global-agent":"^3.0.0",husky:"^4.2.3",inquirer:"8.2.0","inquirer-autocomplete-prompt":"^1.3.0",jest:"^27.4.7","latest-version":"^5.1.0","lint-staged":"^10.0.8",open:"^8.4.0","os-locale":"5.0.0",prettier:"^2.2.1",semver:"^7.3.5","semver-diff":"^3.1.1","ts-jest":"^27.1.3","ts-node":"^9.1.1",typescript:"^4.1.3"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"},dependencies:{"@serverless-devs/core":"beta","@serverless-devs/ui":"latest"}}});var mi=_(N=>{"use strict";var wg=N&&N.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),bg=N&&N.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Sg=N&&N.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&wg(e,r,t);return bg(e,r),e},_r=N&&N.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},yr=N&&N.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},is=N&&N.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(N,"__esModule",{value:!0});N.specifyServiceHelp=N.getTempCommandStr=N.emoji=N.mark=N.replaceTemplate=N.replaceFun=N.getLang=N.printn=N.getFolderSize=N.getVersion=N.aiRequest=N.getCredentialWithAll=N.getCredentialWithExisted=N.getProcessArgv=N.bgRed=N.yellow=N.red=void 0;var Og=is(require("path")),cn=is(require("fs")),Pg=is(require("os")),we=Sg(vt()),Rg=di(),vr=is(ss()),Gu=Uu(),$r=we.default.colors,Cg=we.default.got,Ng=we.default.isDocker,Ig=we.default.isCiCdEnv,Ot=we.default.lodash,zu=we.default.publishHelp,Tg=Ot.get,Ag=Ot.trim,qg=Ot.assign,Dg=Ot.filter,Ku=Ot.includes,jg=Ot.omit,kg=Ot.isPlainObject,xg=Ot.isEmpty,Lg=$r.underline,Mg=$r.bold;N.red=$r.hex("#fd5750");N.yellow=$r.hex("#F3F99D");N.bgRed=$r.hex("#000").bgHex("#fd5750");var Fg=function(){var r=process.env.serverless_devs_temp_argv;try{var e=JSON.parse(r),t=we.default.getGlobalArgs(e);return process.argv=process.argv.slice(0,2).concat(t._argsObj),qg({},t,{noHelpArgv:process.argv.slice(0,2).concat(Dg(t._argsObj,function(n){return!Ku(["-h","--help"],n)}))})}catch{return{}}};N.getProcessArgv=Fg;var Vg=function(r){return _r(void 0,void 0,void 0,function(){var e,t;return yr(this,function(n){switch(n.label){case 0:return[4,we.default.getCredentialAliasList()];case 1:return e=n.sent(),Ku(e,r)?[4,we.default.getCredential(r)]:[3,3];case 2:return t=n.sent(),[2,t];case 3:return[2]}})})};N.getCredentialWithExisted=Vg;var Hg=function(){return _r(void 0,void 0,void 0,function(){var r,e,t,n,s,i;return yr(this,function(a){switch(a.label){case 0:return[4,we.default.getCredentialAliasList()];case 1:if(r=a.sent(),!(r.length>0))return[3,6];e={},t=0,n=r,a.label=2;case 2:return t<n.length?(s=n[t],[4,we.default.getCredential(s)]):[3,5];case 3:i=a.sent(),e[i.Alias]=jg(i,"Alias"),a.label=4;case 4:return t++,[3,2];case 5:return[2,e];case 6:return[2]}})})};N.getCredentialWithAll=Hg;var Ug=function(r,e){return e===void 0&&(e="unknow"),_r(void 0,void 0,void 0,function(){var t,n,s,i;return yr(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t=(0,Rg.getConfig)("analysis"),t!=="enable"?[2]:Ng()||Ig()?[2]:[4,Cg("http://qaapis.devsapp.cn/apis/v1/search?category=".concat(e,"&code=TypeError&s=").concat(r),{timeout:2e3,json:!0})];case 1:return n=a.sent(),s=Tg(n.body,"shorturl"),s&&vr.default.log(`AI Tips:
16
16
  You can try to solve the problem through: `.concat($r.underline(s),`
17
- `)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};N.aiRequest=rg;function ng(){var r=(0,we.getCoreVersion)(),e=["".concat(Uu.name,": ").concat(Uu.version),r?"core: ".concat(r):void 0,"s-home: ".concat(we.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}N.getVersion=ng;function sg(r){return _r(this,void 0,void 0,function(){function e(s){return _r(this,void 0,void 0,function(){var i,a;return yr(this,function(c){switch(c.label){case 0:return i=on.default.lstatSync(s),typeof i!="object"?[2]:(t.set(i.ino,i.size),i.isDirectory()?(a=on.default.readdirSync(s),typeof a!="object"?[2]:[4,Promise.all(a.map(function(u){return e(Lm.default.join(s,u))}))]):[3,2]);case 1:c.sent(),c.label=2;case 2:return[2]}})})}var t,n;return yr(this,function(s){switch(s.label){case 0:return t=new Map,[4,e(r)];case 1:return s.sent(),n=Array.from(t.values()).reduce(function(i,a){return i+a},0),[2,n]}})})}N.getFolderSize=sg;function ig(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}N.printn=ig;function ag(){return"en"}N.getLang=ag;function Ku(r,e){var t=/\{\{(.*?)\}\}/g,n=r.match(t);if(n)for(var s=0;s<n.length;s++){var i=n[s].replace(/{{|}}/g,""),a=zm(i.split("|")[0]);e[a]&&(r=r.replace(n[s],e[a]))}return r}N.replaceFun=Ku;function og(r,e){r.forEach(function(t){if(on.default.existsSync(t)){var n=on.default.readFileSync(t,"utf-8"),s=Ku(n,e);on.default.writeFileSync(t,s,"utf-8")}})}N.replaceTemplate=og;function cg(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}N.mark=cg;function pi(r,e){return Mm.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}N.emoji=pi;function Xu(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}N.getTempCommandStr=Xu;function ug(r){return _r(this,void 0,void 0,function(){var e,t,n,s,i,c,a,c;return yr(this,function(u){switch(u.label){case 0:return[4,we.default.getYamlContent(r)];case 1:if(e=u.sent(),vr.default.log(`
17
+ `)),[3,3];case 2:return i=a.sent(),[3,3];case 3:return[2]}})})};N.aiRequest=Ug;function Gg(){var r=(0,we.getCoreVersion)(),e=["".concat(Gu.name,": ").concat(Gu.version),r?"core: ".concat(r):void 0,"s-home: ".concat(we.default.getRootHome()),"".concat(process.platform,"-").concat(process.arch),"node-".concat(process.version)];return e.filter(function(t){return t}).join(", ")}N.getVersion=Gg;function zg(r){return _r(this,void 0,void 0,function(){function e(s){return _r(this,void 0,void 0,function(){var i,a;return yr(this,function(c){switch(c.label){case 0:return i=cn.default.lstatSync(s),typeof i!="object"?[2]:(t.set(i.ino,i.size),i.isDirectory()?(a=cn.default.readdirSync(s),typeof a!="object"?[2]:[4,Promise.all(a.map(function(u){return e(Og.default.join(s,u))}))]):[3,2]);case 1:c.sent(),c.label=2;case 2:return[2]}})})}var t,n;return yr(this,function(s){switch(s.label){case 0:return t=new Map,[4,e(r)];case 1:return s.sent(),n=Array.from(t.values()).reduce(function(i,a){return i+a},0),[2,n]}})})}N.getFolderSize=zg;function Kg(r,e){e===void 0&&(e=" ");for(var t="",n=0;n<r;n++)t=t+e;return t}N.printn=Kg;function Xg(){return"en"}N.getLang=Xg;function Xu(r,e){var t=/\{\{(.*?)\}\}/g,n=r.match(t);if(n)for(var s=0;s<n.length;s++){var i=n[s].replace(/{{|}}/g,""),a=Ag(i.split("|")[0]);e[a]&&(r=r.replace(n[s],e[a]))}return r}N.replaceFun=Xu;function Wg(r,e){r.forEach(function(t){if(cn.default.existsSync(t)){var n=cn.default.readFileSync(t,"utf-8"),s=Xu(n,e);cn.default.writeFileSync(t,s,"utf-8")}})}N.replaceTemplate=Wg;function Bg(r){if(!r)return r;var e=r.slice(-4);return"***********".concat(e)}N.mark=Bg;function pi(r,e){return Pg.default.platform()==="win32"?e||"\u25C6":"".concat(r," ")}N.emoji=pi;function Wu(r,e){var t=r.length,n=new Array(e-t).fill(" ");return"".concat(r).concat(n.join("")," : ")}N.getTempCommandStr=Wu;function Jg(r){return _r(this,void 0,void 0,function(){var e,t,n,s,i,c,a,c;return yr(this,function(u){switch(u.label){case 0:return[4,we.default.getYamlContent(r)];case 1:if(e=u.sent(),vr.default.log(`
18
18
  `.concat(pi("\u{1F680}")," ").concat(e.Name,"@").concat(e.Version,": ").concat(e.Description,`
19
- `)),t=e.Commands,t){n=Gu.maxLen(t),s=[],i={};for(c in t)a=t[c],Bm(a)?s.push(Gu.helpInfo(a,Ym(Zm(c)),n,4)):i[c]=a;if(s.length>0&&vr.default.log(s.join(`
20
- `)),!Jm(i)){for(c in i)vr.default.log(" ".concat(Xu(c,n)," ").concat(i[c]));vr.default.log("")}vr.default.log(e.HomePage?" ".concat(pi("\u{1F9ED}")," ").concat(we.default.makeUnderLine("More information: "+e.HomePage)," ")+`
21
- `:"")}return[2]}})})}N.specifyServiceHelp=ug});var Wu=_(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.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 Bu=_(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.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 yi=_(cn=>{"use strict";var Ju=cn&&cn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cn,"__esModule",{value:!0});var lg=mi(),fg=Ju(Wu()),dg=Ju(Bu()),_i={en:dg.default,zh:fg.default},hg=function(r){var e=(0,lg.getLang)(),t=_i[e]?_i[e][r]:_i.en[r];return t||r};cn.default=hg});var un=_(ve=>{"use strict";var pg=ve&&ve.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Yu=ve&&ve.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&pg(e,r,t)},$i=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0});ve.registerCommandChecker=ve.i18n=ve.logger=void 0;var mg=$i(is());Yu(mi(),ve);Yu(di(),ve);var gg=is();Object.defineProperty(ve,"logger",{enumerable:!0,get:function(){return $i(gg).default}});var vg=yi();Object.defineProperty(ve,"i18n",{enumerable:!0,get:function(){return $i(vg).default}});function _g(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(mg.default.error(" error: unknown command ".concat(e[0])),r.help())})}ve.registerCommandChecker=_g});var dn=_(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.regexpCode=U.getEsmExportName=U.getProperty=U.safeStringify=U.stringify=U.strConcat=U.addCodeArg=U.str=U._=U.nil=U._Code=U.Name=U.IDENTIFIER=U._CodeOrName=void 0;var ln=class{};U._CodeOrName=ln;U.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var zt=class extends ln{constructor(e){if(super(),!U.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};U.Name=zt;var Ge=class extends ln{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof zt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};U._Code=Ge;U.nil=new Ge("");function Zu(r,...e){let t=[r[0]],n=0;for(;n<e.length;)wi(t,e[n]),t.push(r[++n]);return new Ge(t)}U._=Zu;var Ei=new Ge("+");function Qu(r,...e){let t=[fn(r[0])],n=0;for(;n<e.length;)t.push(Ei),wi(t,e[n]),t.push(Ei,fn(r[++n]));return yg(t),new Ge(t)}U.str=Qu;function wi(r,e){e instanceof Ge?r.push(...e._items):e instanceof zt?r.push(e):r.push(wg(e))}U.addCodeArg=wi;function yg(r){let e=1;for(;e<r.length-1;){if(r[e]===Ei){let t=$g(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function $g(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof zt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof zt))return`"${r}${e.slice(1)}`}function Eg(r,e){return e.emptyStr()?r:r.emptyStr()?e:Qu`${r}${e}`}U.strConcat=Eg;function wg(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:fn(Array.isArray(r)?r.join(","):r)}function bg(r){return new Ge(fn(r))}U.stringify=bg;function fn(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}U.safeStringify=fn;function Sg(r){return typeof r=="string"&&U.IDENTIFIER.test(r)?new Ge(`.${r}`):Zu`[${r}]`}U.getProperty=Sg;function Og(r){if(typeof r=="string"&&U.IDENTIFIER.test(r))return new Ge(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}U.getEsmExportName=Og;function Pg(r){return new Ge(r.toString())}U.regexpCode=Pg});var Pi=_(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.ValueScope=be.ValueScopeName=be.Scope=be.varKinds=be.UsedValueState=void 0;var Ce=dn(),bi=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Si;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(Si=be.UsedValueState||(be.UsedValueState={}));be.varKinds={const:new Ce.Name("const"),let:new Ce.Name("let"),var:new Ce.Name("var")};var os=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Ce.Name?e:this.name(e)}name(e){return new Ce.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};be.Scope=os;var cs=class extends Ce.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,Ce._)`.${new Ce.Name(t)}[${n}]`}};be.ValueScopeName=cs;var Rg=(0,Ce._)`\n`,Oi=class extends os{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Rg:Ce.nil}}get(){return this._scope}name(e){return new cs(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:i}=s,a=(n=t.key)!==null&&n!==void 0?n:t.ref,c=this._values[i];if(c){let l=c.get(a);if(l)return l}else c=this._values[i]=new Map;c.set(a,s);let u=this._scope[i]||(this._scope[i]=[]),o=u.length;return u[o]=t.ref,s.setValue(t,{property:i,itemIndex:o}),s}getValue(e,t){let n=this._values[e];if(!!n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ce._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},t,n)}_reduceValues(e,t,n={},s){let i=Ce.nil;for(let a in e){let c=e[a];if(!c)continue;let u=n[a]=n[a]||new Map;c.forEach(o=>{if(u.has(o))return;u.set(o,Si.Started);let l=t(o);if(l){let d=this.opts.es5?be.varKinds.var:be.varKinds.const;i=(0,Ce._)`${i}${d} ${o} = ${l};${this.opts._n}`}else if(l=s==null?void 0:s(o))i=(0,Ce._)`${i}${l}${this.opts._n}`;else throw new bi(o);u.set(o,Si.Completed)})}return i}};be.ValueScope=Oi});var L=_(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.or=k.and=k.not=k.CodeGen=k.operators=k.varKinds=k.ValueScopeName=k.ValueScope=k.Scope=k.Name=k.regexpCode=k.stringify=k.getProperty=k.nil=k.strConcat=k.str=k._=void 0;var M=dn(),Be=Pi(),Pt=dn();Object.defineProperty(k,"_",{enumerable:!0,get:function(){return Pt._}});Object.defineProperty(k,"str",{enumerable:!0,get:function(){return Pt.str}});Object.defineProperty(k,"strConcat",{enumerable:!0,get:function(){return Pt.strConcat}});Object.defineProperty(k,"nil",{enumerable:!0,get:function(){return Pt.nil}});Object.defineProperty(k,"getProperty",{enumerable:!0,get:function(){return Pt.getProperty}});Object.defineProperty(k,"stringify",{enumerable:!0,get:function(){return Pt.stringify}});Object.defineProperty(k,"regexpCode",{enumerable:!0,get:function(){return Pt.regexpCode}});Object.defineProperty(k,"Name",{enumerable:!0,get:function(){return Pt.Name}});var ds=Pi();Object.defineProperty(k,"Scope",{enumerable:!0,get:function(){return ds.Scope}});Object.defineProperty(k,"ValueScope",{enumerable:!0,get:function(){return ds.ValueScope}});Object.defineProperty(k,"ValueScopeName",{enumerable:!0,get:function(){return ds.ValueScopeName}});Object.defineProperty(k,"varKinds",{enumerable:!0,get:function(){return ds.varKinds}});k.operators={GT:new M._Code(">"),GTE:new M._Code(">="),LT:new M._Code("<"),LTE:new M._Code("<="),EQ:new M._Code("==="),NEQ:new M._Code("!=="),NOT:new M._Code("!"),OR:new M._Code("||"),AND:new M._Code("&&"),ADD:new M._Code("+")};var _t=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Ri=class extends _t{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Be.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(!!e[this.name.str])return this.rhs&&(this.rhs=wr(this.rhs,e,t)),this}get names(){return this.rhs instanceof M._CodeOrName?this.rhs.names:{}}},us=class extends _t{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof M.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=wr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof M.Name?{}:{...this.lhs.names};return fs(e,this.rhs)}},Ci=class extends us{constructor(e,t,n,s){super(e,n,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ni=class extends _t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Ii=class extends _t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Ti=class extends _t{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ai=class extends _t{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=wr(this.code,e,t),this}get names(){return this.code instanceof M._CodeOrName?this.code.names:{}}},hn=class extends _t{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,s=n.length;for(;s--;){let i=n[s];i.optimizeNames(e,t)||(Cg(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Xt(e,t.names),{})}},yt=class extends hn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},qi=class extends hn{},Er=class extends yt{};Er.kind="else";var Je=class extends yt{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new Er(n):n}if(t)return e===!1?t instanceof Je?t:t.nodes:this.nodes.length?this:new Je(el(e),t instanceof Je?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=wr(this.condition,e,t),this}get names(){let e=super.names;return fs(e,this.condition),this.else&&Xt(e,this.else.names),e}};Je.kind="if";var Kt=class extends yt{};Kt.kind="for";var Di=class extends Kt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!!super.optimizeNames(e,t))return this.iteration=wr(this.iteration,e,t),this}get names(){return Xt(super.names,this.iteration.names)}},ji=class extends Kt{constructor(e,t,n,s){super(),this.varKind=e,this.name=t,this.from=n,this.to=s}render(e){let t=e.es5?Be.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${t} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){let e=fs(super.names,this.from);return fs(e,this.to)}},ls=class extends Kt{constructor(e,t,n,s){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!!super.optimizeNames(e,t))return this.iterable=wr(this.iterable,e,t),this}get names(){return Xt(super.names,this.iterable.names)}},pn=class extends yt{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};pn.kind="func";var mn=class extends hn{render(e){return"return "+super.render(e)}};mn.kind="return";var ki=class extends yt{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,s;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(s=this.finally)===null||s===void 0||s.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Xt(e,this.catch.names),this.finally&&Xt(e,this.finally.names),e}},gn=class extends yt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};gn.kind="catch";var vn=class extends yt{render(e){return"finally"+super.render(e)}};vn.kind="finally";var xi=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
22
- `:""},this._extScope=e,this._scope=new Be.Scope({parent:e}),this._nodes=[new qi]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,s){let i=this._scope.toName(t);return n!==void 0&&s&&(this._constants[i.str]=n),this._leafNode(new Ri(e,i,n)),i}const(e,t,n){return this._def(Be.varKinds.const,e,t,n)}let(e,t,n){return this._def(Be.varKinds.let,e,t,n)}var(e,t,n){return this._def(Be.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new us(e,t,n))}add(e,t){return this._leafNode(new Ci(e,k.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==M.nil&&this._leafNode(new Ai(e)),this}object(...e){let t=["{"];for(let[n,s]of e)t.length>1&&t.push(","),t.push(n),(n!==s||this.opts.es5)&&(t.push(":"),(0,M.addCodeArg)(t,s));return t.push("}"),new M._Code(t)}if(e,t,n){if(this._blockNode(new Je(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Je(e))}else(){return this._elseNode(new Er)}endIf(){return this._endBlockNode(Je,Er)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Di(e),t)}forRange(e,t,n,s,i=this.opts.es5?Be.varKinds.var:Be.varKinds.let){let a=this._scope.toName(e);return this._for(new ji(i,a,t,n),()=>s(a))}forOf(e,t,n,s=Be.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let a=t instanceof M.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,M._)`${a}.length`,c=>{this.var(i,(0,M._)`${a}[${c}]`),n(i)})}return this._for(new ls("of",s,i,t),()=>n(i))}forIn(e,t,n,s=this.opts.es5?Be.varKinds.var:Be.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,M._)`Object.keys(${t})`,n);let i=this._scope.toName(e);return this._for(new ls("in",s,i,t),()=>n(i))}endFor(){return this._endBlockNode(Kt)}label(e){return this._leafNode(new Ni(e))}break(e){return this._leafNode(new Ii(e))}return(e){let t=new mn;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(mn)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let s=new ki;if(this._blockNode(s),this.code(e),t){let i=this.name("e");this._currNode=s.catch=new gn(i),t(i)}return n&&(this._currNode=s.finally=new vn,this.code(n)),this._endBlockNode(gn,vn)}throw(e){return this._leafNode(new Ti(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=M.nil,n,s){return this._blockNode(new pn(e,t,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(pn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Je))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};k.CodeGen=xi;function Xt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function fs(r,e){return e instanceof M._CodeOrName?Xt(r,e.names):r}function wr(r,e,t){if(r instanceof M.Name)return n(r);if(!s(r))return r;return new M._Code(r._items.reduce((i,a)=>(a instanceof M.Name&&(a=n(a)),a instanceof M._Code?i.push(...a._items):i.push(a),i),[]));function n(i){let a=t[i.str];return a===void 0||e[i.str]!==1?i:(delete e[i.str],a)}function s(i){return i instanceof M._Code&&i._items.some(a=>a instanceof M.Name&&e[a.str]===1&&t[a.str]!==void 0)}}function Cg(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function el(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,M._)`!${Li(r)}`}k.not=el;var Ng=tl(k.operators.AND);function Ig(...r){return r.reduce(Ng)}k.and=Ig;var Tg=tl(k.operators.OR);function Ag(...r){return r.reduce(Tg)}k.or=Ag;function tl(r){return(e,t)=>e===M.nil?t:t===M.nil?e:(0,M._)`${Li(e)} ${r} ${Li(t)}`}function Li(r){return r instanceof M.Name?r:(0,M._)`(${r})`}});var G=_(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.checkStrictMode=x.getErrorPath=x.Type=x.useFunc=x.setEvaluated=x.evaluatedPropsToName=x.mergeEvaluated=x.eachItem=x.unescapeJsonPointer=x.escapeJsonPointer=x.escapeFragment=x.unescapeFragment=x.schemaRefOrVal=x.schemaHasRulesButRef=x.schemaHasRules=x.checkUnknownRules=x.alwaysValidSchema=x.toHash=void 0;var Z=L(),qg=dn();function Dg(r){let e={};for(let t of r)e[t]=!0;return e}x.toHash=Dg;function jg(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(sl(r,e),!il(e,r.self.RULES.all))}x.alwaysValidSchema=jg;function sl(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let s=n.RULES.keywords;for(let i in e)s[i]||ul(r,`unknown keyword: "${i}"`)}x.checkUnknownRules=sl;function il(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}x.schemaHasRules=il;function kg(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}x.schemaHasRulesButRef=kg;function xg({topSchemaRef:r,schemaPath:e},t,n,s){if(!s){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Z._)`${t}`}return(0,Z._)`${r}${e}${(0,Z.getProperty)(n)}`}x.schemaRefOrVal=xg;function Lg(r){return al(decodeURIComponent(r))}x.unescapeFragment=Lg;function Mg(r){return encodeURIComponent(Mi(r))}x.escapeFragment=Mg;function Mi(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}x.escapeJsonPointer=Mi;function al(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}x.unescapeJsonPointer=al;function Fg(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}x.eachItem=Fg;function rl({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(s,i,a,c)=>{let u=a===void 0?i:a instanceof Z.Name?(i instanceof Z.Name?r(s,i,a):e(s,i,a),a):i instanceof Z.Name?(e(s,a,i),i):t(i,a);return c===Z.Name&&!(u instanceof Z.Name)?n(s,u):u}}x.mergeEvaluated={props:rl({mergeNames:(r,e,t)=>r.if((0,Z._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,Z._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,Z._)`${t} || {}`).code((0,Z._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,Z._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,Z._)`${t} || {}`),Fi(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:{...r,...e},resultToName:ol}),items:rl({mergeNames:(r,e,t)=>r.if((0,Z._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,Z._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,Z._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,Z._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function ol(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,Z._)`{}`);return e!==void 0&&Fi(r,t,e),t}x.evaluatedPropsToName=ol;function Fi(r,e,t){Object.keys(t).forEach(n=>r.assign((0,Z._)`${e}${(0,Z.getProperty)(n)}`,!0))}x.setEvaluated=Fi;var nl={};function Vg(r,e){return r.scopeValue("func",{ref:e,code:nl[e.code]||(nl[e.code]=new qg._Code(e.code))})}x.useFunc=Vg;var cl;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(cl=x.Type||(x.Type={}));function Hg(r,e,t){if(r instanceof Z.Name){let n=e===cl.Num;return t?n?(0,Z._)`"[" + ${r} + "]"`:(0,Z._)`"['" + ${r} + "']"`:n?(0,Z._)`"/" + ${r}`:(0,Z._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Z.getProperty)(r).toString():"/"+Mi(r)}x.getErrorPath=Hg;function ul(r,e,t=r.opts.strictSchema){if(!!t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}x.checkStrictMode=ul});var $t=_(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var _e=L(),Ug={data:new _e.Name("data"),valCxt:new _e.Name("valCxt"),instancePath:new _e.Name("instancePath"),parentData:new _e.Name("parentData"),parentDataProperty:new _e.Name("parentDataProperty"),rootData:new _e.Name("rootData"),dynamicAnchors:new _e.Name("dynamicAnchors"),vErrors:new _e.Name("vErrors"),errors:new _e.Name("errors"),this:new _e.Name("this"),self:new _e.Name("self"),scope:new _e.Name("scope"),json:new _e.Name("json"),jsonPos:new _e.Name("jsonPos"),jsonLen:new _e.Name("jsonLen"),jsonPart:new _e.Name("jsonPart")};Vi.default=Ug});var _n=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.extendErrors=ye.resetErrorsCount=ye.reportExtraError=ye.reportError=ye.keyword$DataError=ye.keywordError=void 0;var V=L(),hs=G(),Se=$t();ye.keywordError={message:({keyword:r})=>(0,V.str)`must pass "${r}" keyword validation`};ye.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,V.str)`"${r}" keyword must be ${e} ($data)`:(0,V.str)`"${r}" keyword is invalid ($data)`};function Gg(r,e=ye.keywordError,t,n){let{it:s}=r,{gen:i,compositeRule:a,allErrors:c}=s,u=dl(r,e,t);(n!=null?n:a||c)?ll(i,u):fl(s,(0,V._)`[${u}]`)}ye.reportError=Gg;function zg(r,e=ye.keywordError,t){let{it:n}=r,{gen:s,compositeRule:i,allErrors:a}=n,c=dl(r,e,t);ll(s,c),i||a||fl(n,Se.default.vErrors)}ye.reportExtraError=zg;function Kg(r,e){r.assign(Se.default.errors,e),r.if((0,V._)`${Se.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,V._)`${Se.default.vErrors}.length`,e),()=>r.assign(Se.default.vErrors,null)))}ye.resetErrorsCount=Kg;function Xg({gen:r,keyword:e,schemaValue:t,data:n,errsCount:s,it:i}){if(s===void 0)throw new Error("ajv implementation error");let a=r.name("err");r.forRange("i",s,Se.default.errors,c=>{r.const(a,(0,V._)`${Se.default.vErrors}[${c}]`),r.if((0,V._)`${a}.instancePath === undefined`,()=>r.assign((0,V._)`${a}.instancePath`,(0,V.strConcat)(Se.default.instancePath,i.errorPath))),r.assign((0,V._)`${a}.schemaPath`,(0,V.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(r.assign((0,V._)`${a}.schema`,t),r.assign((0,V._)`${a}.data`,n))})}ye.extendErrors=Xg;function ll(r,e){let t=r.const("err",e);r.if((0,V._)`${Se.default.vErrors} === null`,()=>r.assign(Se.default.vErrors,(0,V._)`[${t}]`),(0,V._)`${Se.default.vErrors}.push(${t})`),r.code((0,V._)`${Se.default.errors}++`)}function fl(r,e){let{gen:t,validateName:n,schemaEnv:s}=r;s.$async?t.throw((0,V._)`new ${r.ValidationError}(${e})`):(t.assign((0,V._)`${n}.errors`,e),t.return(!1))}var Wt={keyword:new V.Name("keyword"),schemaPath:new V.Name("schemaPath"),params:new V.Name("params"),propertyName:new V.Name("propertyName"),message:new V.Name("message"),schema:new V.Name("schema"),parentSchema:new V.Name("parentSchema")};function dl(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,V._)`{}`:Wg(r,e,t)}function Wg(r,e,t={}){let{gen:n,it:s}=r,i=[Bg(s,t),Jg(r,t)];return Yg(r,e,i),n.object(...i)}function Bg({errorPath:r},{instancePath:e}){let t=e?(0,V.str)`${r}${(0,hs.getErrorPath)(e,hs.Type.Str)}`:r;return[Se.default.instancePath,(0,V.strConcat)(Se.default.instancePath,t)]}function Jg({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let s=n?e:(0,V.str)`${e}/${r}`;return t&&(s=(0,V.str)`${s}${(0,hs.getErrorPath)(t,hs.Type.Str)}`),[Wt.schemaPath,s]}function Yg(r,{params:e,message:t},n){let{keyword:s,data:i,schemaValue:a,it:c}=r,{opts:u,propertyName:o,topSchemaRef:l,schemaPath:d}=c;n.push([Wt.keyword,s],[Wt.params,typeof e=="function"?e(r):e||(0,V._)`{}`]),u.messages&&n.push([Wt.message,typeof t=="function"?t(r):t]),u.verbose&&n.push([Wt.schema,a],[Wt.parentSchema,(0,V._)`${l}${d}`],[Se.default.data,i]),o&&n.push([Wt.propertyName,o])}});var pl=_(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.boolOrEmptySchema=br.topBoolOrEmptySchema=void 0;var Zg=_n(),Qg=L(),ev=$t(),tv={message:"boolean schema is false"};function rv(r){let{gen:e,schema:t,validateName:n}=r;t===!1?hl(r,!1):typeof t=="object"&&t.$async===!0?e.return(ev.default.data):(e.assign((0,Qg._)`${n}.errors`,null),e.return(!0))}br.topBoolOrEmptySchema=rv;function nv(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),hl(r)):t.var(e,!0)}br.boolOrEmptySchema=nv;function hl(r,e){let{gen:t,data:n}=r,s={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,Zg.reportError)(s,tv,void 0,e)}});var Hi=_(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.getRules=Sr.isJSONType=void 0;var sv=["string","number","integer","boolean","null","object","array"],iv=new Set(sv);function av(r){return typeof r=="string"&&iv.has(r)}Sr.isJSONType=av;function ov(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}Sr.getRules=ov});var Ui=_(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.shouldUseRule=Rt.shouldUseGroup=Rt.schemaHasRulesForType=void 0;function cv({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&ml(r,n)}Rt.schemaHasRulesForType=cv;function ml(r,e){return e.rules.some(t=>gl(r,t))}Rt.shouldUseGroup=ml;function gl(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}Rt.shouldUseRule=gl});var $n=_(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;var uv=Hi(),lv=Ui(),fv=_n(),q=L(),vl=G(),yn;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(yn=de.DataType||(de.DataType={}));function dv(r){let e=_l(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=dv;function _l(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(uv.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=_l;function hv(r,e){let{gen:t,data:n,opts:s}=r,i=pv(e,s.coerceTypes),a=e.length>0&&!(i.length===0&&e.length===1&&(0,lv.schemaHasRulesForType)(r,e[0]));if(a){let c=zi(e,n,s.strictNumbers,yn.Wrong);t.if(c,()=>{i.length?mv(r,e,i):Ki(r)})}return a}de.coerceAndCheckDataType=hv;var yl=new Set(["string","number","integer","boolean","null"]);function pv(r,e){return e?r.filter(t=>yl.has(t)||e==="array"&&t==="array"):[]}function mv(r,e,t){let{gen:n,data:s,opts:i}=r,a=n.let("dataType",(0,q._)`typeof ${s}`),c=n.let("coerced",(0,q._)`undefined`);i.coerceTypes==="array"&&n.if((0,q._)`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,q._)`${s}[0]`).assign(a,(0,q._)`typeof ${s}`).if(zi(e,s,i.strictNumbers),()=>n.assign(c,s))),n.if((0,q._)`${c} !== undefined`);for(let o of t)(yl.has(o)||o==="array"&&i.coerceTypes==="array")&&u(o);n.else(),Ki(r),n.endIf(),n.if((0,q._)`${c} !== undefined`,()=>{n.assign(s,c),gv(r,c)});function u(o){switch(o){case"string":n.elseIf((0,q._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,q._)`"" + ${s}`).elseIf((0,q._)`${s} === null`).assign(c,(0,q._)`""`);return;case"number":n.elseIf((0,q._)`${a} == "boolean" || ${s} === null
19
+ `)),t=e.Commands,t){n=zu.maxLen(t),s=[],i={};for(c in t)a=t[c],kg(a)?s.push(zu.helpInfo(a,Lg(Mg(c)),n,4)):i[c]=a;if(s.length>0&&vr.default.log(s.join(`
20
+ `)),!xg(i)){for(c in i)vr.default.log(" ".concat(Wu(c,n)," ").concat(i[c]));vr.default.log("")}vr.default.log(e.HomePage?" ".concat(pi("\u{1F9ED}")," ").concat(we.default.makeUnderLine("More information: "+e.HomePage)," ")+`
21
+ `:"")}return[2]}})})}N.specifyServiceHelp=Jg});var Bu=_(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.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 Ju=_(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.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 yi=_(un=>{"use strict";var Yu=un&&un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(un,"__esModule",{value:!0});var Yg=mi(),Zg=Yu(Bu()),Qg=Yu(Ju()),_i={en:Qg.default,zh:Zg.default},ev=function(r){var e=(0,Yg.getLang)(),t=_i[e]?_i[e][r]:_i.en[r];return t||r};un.default=ev});var ln=_(ve=>{"use strict";var tv=ve&&ve.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Zu=ve&&ve.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&tv(e,r,t)},$i=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0});ve.registerCommandChecker=ve.i18n=ve.logger=void 0;var rv=$i(ss());Zu(mi(),ve);Zu(di(),ve);var nv=ss();Object.defineProperty(ve,"logger",{enumerable:!0,get:function(){return $i(nv).default}});var sv=yi();Object.defineProperty(ve,"i18n",{enumerable:!0,get:function(){return $i(sv).default}});function iv(r){r.on("command:*",function(e){var t=r.commands.map(function(n){return n.name()});t.includes(e[0])||(rv.default.error(" error: unknown command ".concat(e[0])),r.help())})}ve.registerCommandChecker=iv});var hn=_(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.regexpCode=U.getEsmExportName=U.getProperty=U.safeStringify=U.stringify=U.strConcat=U.addCodeArg=U.str=U._=U.nil=U._Code=U.Name=U.IDENTIFIER=U._CodeOrName=void 0;var fn=class{};U._CodeOrName=fn;U.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var zt=class extends fn{constructor(e){if(super(),!U.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};U.Name=zt;var Ge=class extends fn{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof zt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};U._Code=Ge;U.nil=new Ge("");function Qu(r,...e){let t=[r[0]],n=0;for(;n<e.length;)wi(t,e[n]),t.push(r[++n]);return new Ge(t)}U._=Qu;var Ei=new Ge("+");function el(r,...e){let t=[dn(r[0])],n=0;for(;n<e.length;)t.push(Ei),wi(t,e[n]),t.push(Ei,dn(r[++n]));return av(t),new Ge(t)}U.str=el;function wi(r,e){e instanceof Ge?r.push(...e._items):e instanceof zt?r.push(e):r.push(uv(e))}U.addCodeArg=wi;function av(r){let e=1;for(;e<r.length-1;){if(r[e]===Ei){let t=ov(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function ov(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof zt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof zt))return`"${r}${e.slice(1)}`}function cv(r,e){return e.emptyStr()?r:r.emptyStr()?e:el`${r}${e}`}U.strConcat=cv;function uv(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:dn(Array.isArray(r)?r.join(","):r)}function lv(r){return new Ge(dn(r))}U.stringify=lv;function dn(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}U.safeStringify=dn;function fv(r){return typeof r=="string"&&U.IDENTIFIER.test(r)?new Ge(`.${r}`):Qu`[${r}]`}U.getProperty=fv;function dv(r){if(typeof r=="string"&&U.IDENTIFIER.test(r))return new Ge(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}U.getEsmExportName=dv;function hv(r){return new Ge(r.toString())}U.regexpCode=hv});var Pi=_(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.ValueScope=be.ValueScopeName=be.Scope=be.varKinds=be.UsedValueState=void 0;var Ce=hn(),bi=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Si;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(Si=be.UsedValueState||(be.UsedValueState={}));be.varKinds={const:new Ce.Name("const"),let:new Ce.Name("let"),var:new Ce.Name("var")};var as=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Ce.Name?e:this.name(e)}name(e){return new Ce.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};be.Scope=as;var os=class extends Ce.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,Ce._)`.${new Ce.Name(t)}[${n}]`}};be.ValueScopeName=os;var pv=(0,Ce._)`\n`,Oi=class extends as{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?pv:Ce.nil}}get(){return this._scope}name(e){return new os(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:i}=s,a=(n=t.key)!==null&&n!==void 0?n:t.ref,c=this._values[i];if(c){let l=c.get(a);if(l)return l}else c=this._values[i]=new Map;c.set(a,s);let u=this._scope[i]||(this._scope[i]=[]),o=u.length;return u[o]=t.ref,s.setValue(t,{property:i,itemIndex:o}),s}getValue(e,t){let n=this._values[e];if(!!n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ce._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},t,n)}_reduceValues(e,t,n={},s){let i=Ce.nil;for(let a in e){let c=e[a];if(!c)continue;let u=n[a]=n[a]||new Map;c.forEach(o=>{if(u.has(o))return;u.set(o,Si.Started);let l=t(o);if(l){let d=this.opts.es5?be.varKinds.var:be.varKinds.const;i=(0,Ce._)`${i}${d} ${o} = ${l};${this.opts._n}`}else if(l=s==null?void 0:s(o))i=(0,Ce._)`${i}${l}${this.opts._n}`;else throw new bi(o);u.set(o,Si.Completed)})}return i}};be.ValueScope=Oi});var L=_(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.or=k.and=k.not=k.CodeGen=k.operators=k.varKinds=k.ValueScopeName=k.ValueScope=k.Scope=k.Name=k.regexpCode=k.stringify=k.getProperty=k.nil=k.strConcat=k.str=k._=void 0;var M=hn(),Be=Pi(),Pt=hn();Object.defineProperty(k,"_",{enumerable:!0,get:function(){return Pt._}});Object.defineProperty(k,"str",{enumerable:!0,get:function(){return Pt.str}});Object.defineProperty(k,"strConcat",{enumerable:!0,get:function(){return Pt.strConcat}});Object.defineProperty(k,"nil",{enumerable:!0,get:function(){return Pt.nil}});Object.defineProperty(k,"getProperty",{enumerable:!0,get:function(){return Pt.getProperty}});Object.defineProperty(k,"stringify",{enumerable:!0,get:function(){return Pt.stringify}});Object.defineProperty(k,"regexpCode",{enumerable:!0,get:function(){return Pt.regexpCode}});Object.defineProperty(k,"Name",{enumerable:!0,get:function(){return Pt.Name}});var fs=Pi();Object.defineProperty(k,"Scope",{enumerable:!0,get:function(){return fs.Scope}});Object.defineProperty(k,"ValueScope",{enumerable:!0,get:function(){return fs.ValueScope}});Object.defineProperty(k,"ValueScopeName",{enumerable:!0,get:function(){return fs.ValueScopeName}});Object.defineProperty(k,"varKinds",{enumerable:!0,get:function(){return fs.varKinds}});k.operators={GT:new M._Code(">"),GTE:new M._Code(">="),LT:new M._Code("<"),LTE:new M._Code("<="),EQ:new M._Code("==="),NEQ:new M._Code("!=="),NOT:new M._Code("!"),OR:new M._Code("||"),AND:new M._Code("&&"),ADD:new M._Code("+")};var _t=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Ri=class extends _t{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Be.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(!!e[this.name.str])return this.rhs&&(this.rhs=wr(this.rhs,e,t)),this}get names(){return this.rhs instanceof M._CodeOrName?this.rhs.names:{}}},cs=class extends _t{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof M.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=wr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof M.Name?{}:{...this.lhs.names};return ls(e,this.rhs)}},Ci=class extends cs{constructor(e,t,n,s){super(e,n,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ni=class extends _t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Ii=class extends _t{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Ti=class extends _t{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ai=class extends _t{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=wr(this.code,e,t),this}get names(){return this.code instanceof M._CodeOrName?this.code.names:{}}},pn=class extends _t{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,s=n.length;for(;s--;){let i=n[s];i.optimizeNames(e,t)||(mv(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Xt(e,t.names),{})}},yt=class extends pn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},qi=class extends pn{},Er=class extends yt{};Er.kind="else";var Je=class extends yt{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new Er(n):n}if(t)return e===!1?t instanceof Je?t:t.nodes:this.nodes.length?this:new Je(tl(e),t instanceof Je?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=wr(this.condition,e,t),this}get names(){let e=super.names;return ls(e,this.condition),this.else&&Xt(e,this.else.names),e}};Je.kind="if";var Kt=class extends yt{};Kt.kind="for";var Di=class extends Kt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!!super.optimizeNames(e,t))return this.iteration=wr(this.iteration,e,t),this}get names(){return Xt(super.names,this.iteration.names)}},ji=class extends Kt{constructor(e,t,n,s){super(),this.varKind=e,this.name=t,this.from=n,this.to=s}render(e){let t=e.es5?Be.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${t} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){let e=ls(super.names,this.from);return ls(e,this.to)}},us=class extends Kt{constructor(e,t,n,s){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!!super.optimizeNames(e,t))return this.iterable=wr(this.iterable,e,t),this}get names(){return Xt(super.names,this.iterable.names)}},mn=class extends yt{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};mn.kind="func";var gn=class extends pn{render(e){return"return "+super.render(e)}};gn.kind="return";var ki=class extends yt{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,s;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(s=this.finally)===null||s===void 0||s.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Xt(e,this.catch.names),this.finally&&Xt(e,this.finally.names),e}},vn=class extends yt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};vn.kind="catch";var _n=class extends yt{render(e){return"finally"+super.render(e)}};_n.kind="finally";var xi=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
22
+ `:""},this._extScope=e,this._scope=new Be.Scope({parent:e}),this._nodes=[new qi]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,s){let i=this._scope.toName(t);return n!==void 0&&s&&(this._constants[i.str]=n),this._leafNode(new Ri(e,i,n)),i}const(e,t,n){return this._def(Be.varKinds.const,e,t,n)}let(e,t,n){return this._def(Be.varKinds.let,e,t,n)}var(e,t,n){return this._def(Be.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new cs(e,t,n))}add(e,t){return this._leafNode(new Ci(e,k.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==M.nil&&this._leafNode(new Ai(e)),this}object(...e){let t=["{"];for(let[n,s]of e)t.length>1&&t.push(","),t.push(n),(n!==s||this.opts.es5)&&(t.push(":"),(0,M.addCodeArg)(t,s));return t.push("}"),new M._Code(t)}if(e,t,n){if(this._blockNode(new Je(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Je(e))}else(){return this._elseNode(new Er)}endIf(){return this._endBlockNode(Je,Er)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Di(e),t)}forRange(e,t,n,s,i=this.opts.es5?Be.varKinds.var:Be.varKinds.let){let a=this._scope.toName(e);return this._for(new ji(i,a,t,n),()=>s(a))}forOf(e,t,n,s=Be.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let a=t instanceof M.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,M._)`${a}.length`,c=>{this.var(i,(0,M._)`${a}[${c}]`),n(i)})}return this._for(new us("of",s,i,t),()=>n(i))}forIn(e,t,n,s=this.opts.es5?Be.varKinds.var:Be.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,M._)`Object.keys(${t})`,n);let i=this._scope.toName(e);return this._for(new us("in",s,i,t),()=>n(i))}endFor(){return this._endBlockNode(Kt)}label(e){return this._leafNode(new Ni(e))}break(e){return this._leafNode(new Ii(e))}return(e){let t=new gn;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(gn)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let s=new ki;if(this._blockNode(s),this.code(e),t){let i=this.name("e");this._currNode=s.catch=new vn(i),t(i)}return n&&(this._currNode=s.finally=new _n,this.code(n)),this._endBlockNode(vn,_n)}throw(e){return this._leafNode(new Ti(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=M.nil,n,s){return this._blockNode(new mn(e,t,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(mn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Je))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};k.CodeGen=xi;function Xt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function ls(r,e){return e instanceof M._CodeOrName?Xt(r,e.names):r}function wr(r,e,t){if(r instanceof M.Name)return n(r);if(!s(r))return r;return new M._Code(r._items.reduce((i,a)=>(a instanceof M.Name&&(a=n(a)),a instanceof M._Code?i.push(...a._items):i.push(a),i),[]));function n(i){let a=t[i.str];return a===void 0||e[i.str]!==1?i:(delete e[i.str],a)}function s(i){return i instanceof M._Code&&i._items.some(a=>a instanceof M.Name&&e[a.str]===1&&t[a.str]!==void 0)}}function mv(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function tl(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,M._)`!${Li(r)}`}k.not=tl;var gv=rl(k.operators.AND);function vv(...r){return r.reduce(gv)}k.and=vv;var _v=rl(k.operators.OR);function yv(...r){return r.reduce(_v)}k.or=yv;function rl(r){return(e,t)=>e===M.nil?t:t===M.nil?e:(0,M._)`${Li(e)} ${r} ${Li(t)}`}function Li(r){return r instanceof M.Name?r:(0,M._)`(${r})`}});var G=_(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.checkStrictMode=x.getErrorPath=x.Type=x.useFunc=x.setEvaluated=x.evaluatedPropsToName=x.mergeEvaluated=x.eachItem=x.unescapeJsonPointer=x.escapeJsonPointer=x.escapeFragment=x.unescapeFragment=x.schemaRefOrVal=x.schemaHasRulesButRef=x.schemaHasRules=x.checkUnknownRules=x.alwaysValidSchema=x.toHash=void 0;var Z=L(),$v=hn();function Ev(r){let e={};for(let t of r)e[t]=!0;return e}x.toHash=Ev;function wv(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(il(r,e),!al(e,r.self.RULES.all))}x.alwaysValidSchema=wv;function il(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let s=n.RULES.keywords;for(let i in e)s[i]||ll(r,`unknown keyword: "${i}"`)}x.checkUnknownRules=il;function al(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}x.schemaHasRules=al;function bv(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}x.schemaHasRulesButRef=bv;function Sv({topSchemaRef:r,schemaPath:e},t,n,s){if(!s){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Z._)`${t}`}return(0,Z._)`${r}${e}${(0,Z.getProperty)(n)}`}x.schemaRefOrVal=Sv;function Ov(r){return ol(decodeURIComponent(r))}x.unescapeFragment=Ov;function Pv(r){return encodeURIComponent(Mi(r))}x.escapeFragment=Pv;function Mi(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}x.escapeJsonPointer=Mi;function ol(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}x.unescapeJsonPointer=ol;function Rv(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}x.eachItem=Rv;function nl({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(s,i,a,c)=>{let u=a===void 0?i:a instanceof Z.Name?(i instanceof Z.Name?r(s,i,a):e(s,i,a),a):i instanceof Z.Name?(e(s,a,i),i):t(i,a);return c===Z.Name&&!(u instanceof Z.Name)?n(s,u):u}}x.mergeEvaluated={props:nl({mergeNames:(r,e,t)=>r.if((0,Z._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,Z._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,Z._)`${t} || {}`).code((0,Z._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,Z._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,Z._)`${t} || {}`),Fi(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:{...r,...e},resultToName:cl}),items:nl({mergeNames:(r,e,t)=>r.if((0,Z._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,Z._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,Z._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,Z._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function cl(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,Z._)`{}`);return e!==void 0&&Fi(r,t,e),t}x.evaluatedPropsToName=cl;function Fi(r,e,t){Object.keys(t).forEach(n=>r.assign((0,Z._)`${e}${(0,Z.getProperty)(n)}`,!0))}x.setEvaluated=Fi;var sl={};function Cv(r,e){return r.scopeValue("func",{ref:e,code:sl[e.code]||(sl[e.code]=new $v._Code(e.code))})}x.useFunc=Cv;var ul;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(ul=x.Type||(x.Type={}));function Nv(r,e,t){if(r instanceof Z.Name){let n=e===ul.Num;return t?n?(0,Z._)`"[" + ${r} + "]"`:(0,Z._)`"['" + ${r} + "']"`:n?(0,Z._)`"/" + ${r}`:(0,Z._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Z.getProperty)(r).toString():"/"+Mi(r)}x.getErrorPath=Nv;function ll(r,e,t=r.opts.strictSchema){if(!!t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}x.checkStrictMode=ll});var $t=_(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var _e=L(),Iv={data:new _e.Name("data"),valCxt:new _e.Name("valCxt"),instancePath:new _e.Name("instancePath"),parentData:new _e.Name("parentData"),parentDataProperty:new _e.Name("parentDataProperty"),rootData:new _e.Name("rootData"),dynamicAnchors:new _e.Name("dynamicAnchors"),vErrors:new _e.Name("vErrors"),errors:new _e.Name("errors"),this:new _e.Name("this"),self:new _e.Name("self"),scope:new _e.Name("scope"),json:new _e.Name("json"),jsonPos:new _e.Name("jsonPos"),jsonLen:new _e.Name("jsonLen"),jsonPart:new _e.Name("jsonPart")};Vi.default=Iv});var yn=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.extendErrors=ye.resetErrorsCount=ye.reportExtraError=ye.reportError=ye.keyword$DataError=ye.keywordError=void 0;var V=L(),ds=G(),Se=$t();ye.keywordError={message:({keyword:r})=>(0,V.str)`must pass "${r}" keyword validation`};ye.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,V.str)`"${r}" keyword must be ${e} ($data)`:(0,V.str)`"${r}" keyword is invalid ($data)`};function Tv(r,e=ye.keywordError,t,n){let{it:s}=r,{gen:i,compositeRule:a,allErrors:c}=s,u=hl(r,e,t);(n!=null?n:a||c)?fl(i,u):dl(s,(0,V._)`[${u}]`)}ye.reportError=Tv;function Av(r,e=ye.keywordError,t){let{it:n}=r,{gen:s,compositeRule:i,allErrors:a}=n,c=hl(r,e,t);fl(s,c),i||a||dl(n,Se.default.vErrors)}ye.reportExtraError=Av;function qv(r,e){r.assign(Se.default.errors,e),r.if((0,V._)`${Se.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,V._)`${Se.default.vErrors}.length`,e),()=>r.assign(Se.default.vErrors,null)))}ye.resetErrorsCount=qv;function Dv({gen:r,keyword:e,schemaValue:t,data:n,errsCount:s,it:i}){if(s===void 0)throw new Error("ajv implementation error");let a=r.name("err");r.forRange("i",s,Se.default.errors,c=>{r.const(a,(0,V._)`${Se.default.vErrors}[${c}]`),r.if((0,V._)`${a}.instancePath === undefined`,()=>r.assign((0,V._)`${a}.instancePath`,(0,V.strConcat)(Se.default.instancePath,i.errorPath))),r.assign((0,V._)`${a}.schemaPath`,(0,V.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(r.assign((0,V._)`${a}.schema`,t),r.assign((0,V._)`${a}.data`,n))})}ye.extendErrors=Dv;function fl(r,e){let t=r.const("err",e);r.if((0,V._)`${Se.default.vErrors} === null`,()=>r.assign(Se.default.vErrors,(0,V._)`[${t}]`),(0,V._)`${Se.default.vErrors}.push(${t})`),r.code((0,V._)`${Se.default.errors}++`)}function dl(r,e){let{gen:t,validateName:n,schemaEnv:s}=r;s.$async?t.throw((0,V._)`new ${r.ValidationError}(${e})`):(t.assign((0,V._)`${n}.errors`,e),t.return(!1))}var Wt={keyword:new V.Name("keyword"),schemaPath:new V.Name("schemaPath"),params:new V.Name("params"),propertyName:new V.Name("propertyName"),message:new V.Name("message"),schema:new V.Name("schema"),parentSchema:new V.Name("parentSchema")};function hl(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,V._)`{}`:jv(r,e,t)}function jv(r,e,t={}){let{gen:n,it:s}=r,i=[kv(s,t),xv(r,t)];return Lv(r,e,i),n.object(...i)}function kv({errorPath:r},{instancePath:e}){let t=e?(0,V.str)`${r}${(0,ds.getErrorPath)(e,ds.Type.Str)}`:r;return[Se.default.instancePath,(0,V.strConcat)(Se.default.instancePath,t)]}function xv({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let s=n?e:(0,V.str)`${e}/${r}`;return t&&(s=(0,V.str)`${s}${(0,ds.getErrorPath)(t,ds.Type.Str)}`),[Wt.schemaPath,s]}function Lv(r,{params:e,message:t},n){let{keyword:s,data:i,schemaValue:a,it:c}=r,{opts:u,propertyName:o,topSchemaRef:l,schemaPath:d}=c;n.push([Wt.keyword,s],[Wt.params,typeof e=="function"?e(r):e||(0,V._)`{}`]),u.messages&&n.push([Wt.message,typeof t=="function"?t(r):t]),u.verbose&&n.push([Wt.schema,a],[Wt.parentSchema,(0,V._)`${l}${d}`],[Se.default.data,i]),o&&n.push([Wt.propertyName,o])}});var ml=_(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.boolOrEmptySchema=br.topBoolOrEmptySchema=void 0;var Mv=yn(),Fv=L(),Vv=$t(),Hv={message:"boolean schema is false"};function Uv(r){let{gen:e,schema:t,validateName:n}=r;t===!1?pl(r,!1):typeof t=="object"&&t.$async===!0?e.return(Vv.default.data):(e.assign((0,Fv._)`${n}.errors`,null),e.return(!0))}br.topBoolOrEmptySchema=Uv;function Gv(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),pl(r)):t.var(e,!0)}br.boolOrEmptySchema=Gv;function pl(r,e){let{gen:t,data:n}=r,s={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,Mv.reportError)(s,Hv,void 0,e)}});var Hi=_(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.getRules=Sr.isJSONType=void 0;var zv=["string","number","integer","boolean","null","object","array"],Kv=new Set(zv);function Xv(r){return typeof r=="string"&&Kv.has(r)}Sr.isJSONType=Xv;function Wv(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}Sr.getRules=Wv});var Ui=_(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.shouldUseRule=Rt.shouldUseGroup=Rt.schemaHasRulesForType=void 0;function Bv({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&gl(r,n)}Rt.schemaHasRulesForType=Bv;function gl(r,e){return e.rules.some(t=>vl(r,t))}Rt.shouldUseGroup=gl;function vl(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}Rt.shouldUseRule=vl});var En=_(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;var Jv=Hi(),Yv=Ui(),Zv=yn(),q=L(),_l=G(),$n;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})($n=de.DataType||(de.DataType={}));function Qv(r){let e=yl(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=Qv;function yl(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(Jv.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=yl;function e_(r,e){let{gen:t,data:n,opts:s}=r,i=t_(e,s.coerceTypes),a=e.length>0&&!(i.length===0&&e.length===1&&(0,Yv.schemaHasRulesForType)(r,e[0]));if(a){let c=zi(e,n,s.strictNumbers,$n.Wrong);t.if(c,()=>{i.length?r_(r,e,i):Ki(r)})}return a}de.coerceAndCheckDataType=e_;var $l=new Set(["string","number","integer","boolean","null"]);function t_(r,e){return e?r.filter(t=>$l.has(t)||e==="array"&&t==="array"):[]}function r_(r,e,t){let{gen:n,data:s,opts:i}=r,a=n.let("dataType",(0,q._)`typeof ${s}`),c=n.let("coerced",(0,q._)`undefined`);i.coerceTypes==="array"&&n.if((0,q._)`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,q._)`${s}[0]`).assign(a,(0,q._)`typeof ${s}`).if(zi(e,s,i.strictNumbers),()=>n.assign(c,s))),n.if((0,q._)`${c} !== undefined`);for(let o of t)($l.has(o)||o==="array"&&i.coerceTypes==="array")&&u(o);n.else(),Ki(r),n.endIf(),n.if((0,q._)`${c} !== undefined`,()=>{n.assign(s,c),n_(r,c)});function u(o){switch(o){case"string":n.elseIf((0,q._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,q._)`"" + ${s}`).elseIf((0,q._)`${s} === null`).assign(c,(0,q._)`""`);return;case"number":n.elseIf((0,q._)`${a} == "boolean" || ${s} === null
23
23
  || (${a} == "string" && ${s} && ${s} == +${s})`).assign(c,(0,q._)`+${s}`);return;case"integer":n.elseIf((0,q._)`${a} === "boolean" || ${s} === null
24
24
  || (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(c,(0,q._)`+${s}`);return;case"boolean":n.elseIf((0,q._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(c,!1).elseIf((0,q._)`${s} === "true" || ${s} === 1`).assign(c,!0);return;case"null":n.elseIf((0,q._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(c,null);return;case"array":n.elseIf((0,q._)`${a} === "string" || ${a} === "number"
25
- || ${a} === "boolean" || ${s} === null`).assign(c,(0,q._)`[${s}]`)}}}function gv({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,q._)`${e} !== undefined`,()=>r.assign((0,q._)`${e}[${t}]`,n))}function Gi(r,e,t,n=yn.Correct){let s=n===yn.Correct?q.operators.EQ:q.operators.NEQ,i;switch(r){case"null":return(0,q._)`${e} ${s} null`;case"array":i=(0,q._)`Array.isArray(${e})`;break;case"object":i=(0,q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=a((0,q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=a();break;default:return(0,q._)`typeof ${e} ${s} ${r}`}return n===yn.Correct?i:(0,q.not)(i);function a(c=q.nil){return(0,q.and)((0,q._)`typeof ${e} == "number"`,c,t?(0,q._)`isFinite(${e})`:q.nil)}}de.checkDataType=Gi;function zi(r,e,t,n){if(r.length===1)return Gi(r[0],e,t,n);let s,i=(0,vl.toHash)(r);if(i.array&&i.object){let a=(0,q._)`typeof ${e} != "object"`;s=i.null?a:(0,q._)`!${e} || ${a}`,delete i.null,delete i.array,delete i.object}else s=q.nil;i.number&&delete i.integer;for(let a in i)s=(0,q.and)(s,Gi(a,e,t,n));return s}de.checkDataTypes=zi;var vv={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,q._)`{type: ${r}}`:(0,q._)`{type: ${e}}`};function Ki(r){let e=_v(r);(0,fv.reportError)(e,vv)}de.reportTypeError=Ki;function _v(r){let{gen:e,data:t,schema:n}=r,s=(0,vl.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:r}}});var El=_(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});ps.assignDefaults=void 0;var Or=L(),yv=G();function $v(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let s in t)$l(r,s,t[s].default);else e==="array"&&Array.isArray(n)&&n.forEach((s,i)=>$l(r,i,s.default))}ps.assignDefaults=$v;function $l(r,e,t){let{gen:n,compositeRule:s,data:i,opts:a}=r;if(t===void 0)return;let c=(0,Or._)`${i}${(0,Or.getProperty)(e)}`;if(s){(0,yv.checkStrictMode)(r,`default is ignored for: ${c}`);return}let u=(0,Or._)`${c} === undefined`;a.useDefaults==="empty"&&(u=(0,Or._)`${u} || ${c} === null || ${c} === ""`),n.if(u,(0,Or._)`${c} = ${(0,Or.stringify)(t)}`)}});var ze=_(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.validateUnion=J.validateArray=J.usePattern=J.callValidateCode=J.schemaProperties=J.allSchemaProperties=J.noPropertyInData=J.propertyInData=J.isOwnProperty=J.hasPropFunc=J.reportMissingProp=J.checkMissingProp=J.checkReportMissingProp=void 0;var te=L(),Xi=G(),Ct=$t(),Ev=G();function wv(r,e){let{gen:t,data:n,it:s}=r;t.if(Bi(t,n,e,s.opts.ownProperties),()=>{r.setParams({missingProperty:(0,te._)`${e}`},!0),r.error()})}J.checkReportMissingProp=wv;function bv({gen:r,data:e,it:{opts:t}},n,s){return(0,te.or)(...n.map(i=>(0,te.and)(Bi(r,e,i,t.ownProperties),(0,te._)`${s} = ${i}`)))}J.checkMissingProp=bv;function Sv(r,e){r.setParams({missingProperty:e},!0),r.error()}J.reportMissingProp=Sv;function wl(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,te._)`Object.prototype.hasOwnProperty`})}J.hasPropFunc=wl;function Wi(r,e,t){return(0,te._)`${wl(r)}.call(${e}, ${t})`}J.isOwnProperty=Wi;function Ov(r,e,t,n){let s=(0,te._)`${e}${(0,te.getProperty)(t)} !== undefined`;return n?(0,te._)`${s} && ${Wi(r,e,t)}`:s}J.propertyInData=Ov;function Bi(r,e,t,n){let s=(0,te._)`${e}${(0,te.getProperty)(t)} === undefined`;return n?(0,te.or)(s,(0,te.not)(Wi(r,e,t))):s}J.noPropertyInData=Bi;function bl(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}J.allSchemaProperties=bl;function Pv(r,e){return bl(e).filter(t=>!(0,Xi.alwaysValidSchema)(r,e[t]))}J.schemaProperties=Pv;function Rv({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:s,errorPath:i},it:a},c,u,o){let l=o?(0,te._)`${r}, ${e}, ${n}${s}`:e,d=[[Ct.default.instancePath,(0,te.strConcat)(Ct.default.instancePath,i)],[Ct.default.parentData,a.parentData],[Ct.default.parentDataProperty,a.parentDataProperty],[Ct.default.rootData,Ct.default.rootData]];a.opts.dynamicRef&&d.push([Ct.default.dynamicAnchors,Ct.default.dynamicAnchors]);let y=(0,te._)`${l}, ${t.object(...d)}`;return u!==te.nil?(0,te._)`${c}.call(${u}, ${y})`:(0,te._)`${c}(${y})`}J.callValidateCode=Rv;var Cv=(0,te._)`new RegExp`;function Nv({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:s}=e.code,i=s(t,n);return r.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,te._)`${s.code==="new RegExp"?Cv:(0,Ev.useFunc)(r,s)}(${t}, ${n})`})}J.usePattern=Nv;function Iv(r){let{gen:e,data:t,keyword:n,it:s}=r,i=e.name("valid");if(s.allErrors){let c=e.let("valid",!0);return a(()=>e.assign(c,!1)),c}return e.var(i,!0),a(()=>e.break()),i;function a(c){let u=e.const("len",(0,te._)`${t}.length`);e.forRange("i",0,u,o=>{r.subschema({keyword:n,dataProp:o,dataPropType:Xi.Type.Num},i),e.if((0,te.not)(i),c)})}}J.validateArray=Iv;function Tv(r){let{gen:e,schema:t,keyword:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(u=>(0,Xi.alwaysValidSchema)(s,u))&&!s.opts.unevaluated)return;let a=e.let("valid",!1),c=e.name("_valid");e.block(()=>t.forEach((u,o)=>{let l=r.subschema({keyword:n,schemaProp:o,compositeRule:!0},c);e.assign(a,(0,te._)`${a} || ${c}`),r.mergeValidEvaluated(l,c)||e.if((0,te.not)(a))})),r.result(a,()=>r.reset(),()=>r.error(!0))}J.validateUnion=Tv});var Pl=_(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.validateKeywordUsage=at.validSchemaType=at.funcKeywordCode=at.macroKeywordCode=void 0;var Oe=L(),Bt=$t(),Av=ze(),qv=_n();function Dv(r,e){let{gen:t,keyword:n,schema:s,parentSchema:i,it:a}=r,c=e.macro.call(a.self,s,i,a),u=Ol(t,n,c);a.opts.validateSchema!==!1&&a.self.validateSchema(c,!0);let o=t.name("valid");r.subschema({schema:c,schemaPath:Oe.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},o),r.pass(o,()=>r.error(!0))}at.macroKeywordCode=Dv;function jv(r,e){var t;let{gen:n,keyword:s,schema:i,parentSchema:a,$data:c,it:u}=r;xv(u,e);let o=!c&&e.compile?e.compile.call(u.self,i,a,u):e.validate,l=Ol(n,s,o),d=n.let("valid");r.block$data(d,y),r.ok((t=e.valid)!==null&&t!==void 0?t:d);function y(){if(e.errors===!1)E(),e.modifying&&Sl(r),w(()=>r.error());else{let b=e.async?m():$();e.modifying&&Sl(r),w(()=>kv(r,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>E((0,Oe._)`await `),D=>n.assign(d,!1).if((0,Oe._)`${D} instanceof ${u.ValidationError}`,()=>n.assign(b,(0,Oe._)`${D}.errors`),()=>n.throw(D))),b}function $(){let b=(0,Oe._)`${l}.errors`;return n.assign(b,null),E(Oe.nil),b}function E(b=e.async?(0,Oe._)`await `:Oe.nil){let D=u.opts.passContext?Bt.default.this:Bt.default.self,T=!("compile"in e&&!c||e.schema===!1);n.assign(d,(0,Oe._)`${b}${(0,Av.callValidateCode)(r,l,D,T)}`,e.modifying)}function w(b){var D;n.if((0,Oe.not)((D=e.valid)!==null&&D!==void 0?D:d),b)}}at.funcKeywordCode=jv;function Sl(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,Oe._)`${n.parentData}[${n.parentDataProperty}]`))}function kv(r,e){let{gen:t}=r;t.if((0,Oe._)`Array.isArray(${e})`,()=>{t.assign(Bt.default.vErrors,(0,Oe._)`${Bt.default.vErrors} === null ? ${e} : ${Bt.default.vErrors}.concat(${e})`).assign(Bt.default.errors,(0,Oe._)`${Bt.default.vErrors}.length`),(0,qv.extendErrors)(r)},()=>r.error())}function xv({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Ol(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,Oe.stringify)(t)})}function Lv(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r>"u")}at.validSchemaType=Lv;function Mv({schema:r,opts:e,self:t,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");let a=s.dependencies;if(a!=null&&a.some(c=>!Object.prototype.hasOwnProperty.call(r,c)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(s.validateSchema&&!s.validateSchema(r[i])){let u=`keyword "${i}" value is invalid at path "${n}": `+t.errorsText(s.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(u);else throw new Error(u)}}at.validateKeywordUsage=Mv});var Cl=_(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.extendSubschemaMode=Nt.extendSubschemaData=Nt.getSubschema=void 0;var ot=L(),Rl=G();function Fv(r,{keyword:e,schemaProp:t,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let c=r.schema[e];return t===void 0?{schema:c,schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:c[t],schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}${(0,ot.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,Rl.escapeFragment)(t)}`}}if(n!==void 0){if(s===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Nt.getSubschema=Fv;function Vv(r,e,{dataProp:t,dataPropType:n,data:s,dataTypes:i,propertyName:a}){if(s!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=e;if(t!==void 0){let{errorPath:o,dataPathArr:l,opts:d}=e,y=c.let("data",(0,ot._)`${e.data}${(0,ot.getProperty)(t)}`,!0);u(y),r.errorPath=(0,ot.str)`${o}${(0,Rl.getErrorPath)(t,n,d.jsPropertySyntax)}`,r.parentDataProperty=(0,ot._)`${t}`,r.dataPathArr=[...l,r.parentDataProperty]}if(s!==void 0){let o=s instanceof ot.Name?s:c.let("data",s,!0);u(o),a!==void 0&&(r.propertyName=a)}i&&(r.dataTypes=i);function u(o){r.data=o,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,o]}}Nt.extendSubschemaData=Vv;function Hv(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(r.compositeRule=n),s!==void 0&&(r.createErrors=s),i!==void 0&&(r.allErrors=i),r.jtdDiscriminator=e,r.jtdMetadata=t}Nt.extendSubschemaMode=Hv});var Ji=_((Uw,Nl)=>{"use strict";Nl.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!r(e[s],t[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}});var Tl=_((Gw,Il)=>{"use strict";var It=Il.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},s=t.post||function(){};ms(e,n,s,r,"",r)};It.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};It.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};It.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};It.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ms(r,e,t,n,s,i,a,c,u,o){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,s,i,a,c,u,o);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in It.arrayKeywords)for(var y=0;y<d.length;y++)ms(r,e,t,d[y],s+"/"+l+"/"+y,i,s,l,n,y)}else if(l in It.propsKeywords){if(d&&typeof d=="object")for(var m in d)ms(r,e,t,d[m],s+"/"+l+"/"+Uv(m),i,s,l,n,m)}else(l in It.keywords||r.allKeys&&!(l in It.skipKeywords))&&ms(r,e,t,d,s+"/"+l,i,s,l,n)}t(n,s,i,a,c,u,o)}}function Uv(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var En=_(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getSchemaRefs=Ne.resolveUrl=Ne.normalizeId=Ne._getFullPath=Ne.getFullPath=Ne.inlineRef=void 0;var Gv=G(),zv=Ji(),Kv=Tl(),Xv=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Wv(r,e=!0){return typeof r=="boolean"?!0:e===!0?!Yi(r):e?Al(r)<=e:!1}Ne.inlineRef=Wv;var Bv=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Yi(r){for(let e in r){if(Bv.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(Yi)||typeof t=="object"&&Yi(t))return!0}return!1}function Al(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!Xv.has(t)&&(typeof r[t]=="object"&&(0,Gv.eachItem)(r[t],n=>e+=Al(n)),e===1/0))return 1/0}return e}function ql(r,e="",t){t!==!1&&(e=Pr(e));let n=r.parse(e);return Dl(r,n)}Ne.getFullPath=ql;function Dl(r,e){return r.serialize(e).split("#")[0]+"#"}Ne._getFullPath=Dl;var Jv=/#\/?$/;function Pr(r){return r?r.replace(Jv,""):""}Ne.normalizeId=Pr;function Yv(r,e,t){return t=Pr(t),r.resolve(e,t)}Ne.resolveUrl=Yv;var Zv=/^[a-z_][-a-z0-9._]*$/i;function Qv(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,s=Pr(r[t]||e),i={"":s},a=ql(n,s,!1),c={},u=new Set;return Kv(r,{allKeys:!0},(d,y,m,$)=>{if($===void 0)return;let E=a+y,w=i[$];typeof d[t]=="string"&&(w=b.call(this,d[t])),D.call(this,d.$anchor),D.call(this,d.$dynamicAnchor),i[y]=w;function b(T){let z=this.opts.uriResolver.resolve;if(T=Pr(w?z(w,T):T),u.has(T))throw l(T);u.add(T);let C=this.refs[T];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?o(d,C.schema,T):T!==Pr(E)&&(T[0]==="#"?(o(d,c[T],T),c[T]=d):this.refs[T]=E),T}function D(T){if(typeof T=="string"){if(!Zv.test(T))throw new Error(`invalid anchor "${T}"`);b.call(this,`#${T}`)}}}),c;function o(d,y,m){if(y!==void 0&&!zv(d,y))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ne.getSchemaRefs=Qv});var Sn=_(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.getData=Tt.KeywordCxt=Tt.validateFunctionCode=void 0;var Fl=pl(),jl=$n(),Qi=Ui(),gs=$n(),e_=El(),bn=Pl(),Zi=Cl(),R=L(),I=$t(),t_=En(),Et=G(),wn=_n();function r_(r){if(Ul(r)&&(Gl(r),Hl(r))){i_(r);return}Vl(r,()=>(0,Fl.topBoolOrEmptySchema)(r))}Tt.validateFunctionCode=r_;function Vl({gen:r,validateName:e,schema:t,schemaEnv:n,opts:s},i){s.code.es5?r.func(e,(0,R._)`${I.default.data}, ${I.default.valCxt}`,n.$async,()=>{r.code((0,R._)`"use strict"; ${kl(t,s)}`),s_(r,s),r.code(i)}):r.func(e,(0,R._)`${I.default.data}, ${n_(s)}`,n.$async,()=>r.code(kl(t,s)).code(i))}function n_(r){return(0,R._)`{${I.default.instancePath}="", ${I.default.parentData}, ${I.default.parentDataProperty}, ${I.default.rootData}=${I.default.data}${r.dynamicRef?(0,R._)`, ${I.default.dynamicAnchors}={}`:R.nil}}={}`}function s_(r,e){r.if(I.default.valCxt,()=>{r.var(I.default.instancePath,(0,R._)`${I.default.valCxt}.${I.default.instancePath}`),r.var(I.default.parentData,(0,R._)`${I.default.valCxt}.${I.default.parentData}`),r.var(I.default.parentDataProperty,(0,R._)`${I.default.valCxt}.${I.default.parentDataProperty}`),r.var(I.default.rootData,(0,R._)`${I.default.valCxt}.${I.default.rootData}`),e.dynamicRef&&r.var(I.default.dynamicAnchors,(0,R._)`${I.default.valCxt}.${I.default.dynamicAnchors}`)},()=>{r.var(I.default.instancePath,(0,R._)`""`),r.var(I.default.parentData,(0,R._)`undefined`),r.var(I.default.parentDataProperty,(0,R._)`undefined`),r.var(I.default.rootData,I.default.data),e.dynamicRef&&r.var(I.default.dynamicAnchors,(0,R._)`{}`)})}function i_(r){let{schema:e,opts:t,gen:n}=r;Vl(r,()=>{t.$comment&&e.$comment&&Kl(r),l_(r),n.let(I.default.vErrors,null),n.let(I.default.errors,0),t.unevaluated&&a_(r),zl(r),h_(r)})}function a_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,R._)`${t}.evaluated`),e.if((0,R._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,R._)`${r.evaluated}.props`,(0,R._)`undefined`)),e.if((0,R._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,R._)`${r.evaluated}.items`,(0,R._)`undefined`))}function kl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,R._)`/*# sourceURL=${t} */`:R.nil}function o_(r,e){if(Ul(r)&&(Gl(r),Hl(r))){c_(r,e);return}(0,Fl.boolOrEmptySchema)(r,e)}function Hl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function Ul(r){return typeof r.schema!="boolean"}function c_(r,e){let{schema:t,gen:n,opts:s}=r;s.$comment&&t.$comment&&Kl(r),f_(r),d_(r);let i=n.const("_errs",I.default.errors);zl(r,i),n.var(e,(0,R._)`${i} === ${I.default.errors}`)}function Gl(r){(0,Et.checkUnknownRules)(r),u_(r)}function zl(r,e){if(r.opts.jtd)return xl(r,[],!1,e);let t=(0,jl.getSchemaTypes)(r.schema),n=(0,jl.coerceAndCheckDataType)(r,t);xl(r,t,!n,e)}function u_(r){let{schema:e,errSchemaPath:t,opts:n,self:s}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Et.schemaHasRulesButRef)(e,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function l_(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Et.checkStrictMode)(r,"default is ignored in the schema root")}function f_(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,t_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function d_(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function Kl({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:s}){let i=t.$comment;if(s.$comment===!0)r.code((0,R._)`${I.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){let a=(0,R.str)`${n}/$comment`,c=r.scopeValue("root",{ref:e.root});r.code((0,R._)`${I.default.self}.opts.$comment(${i}, ${a}, ${c}.schema)`)}}function h_(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:s,opts:i}=r;t.$async?e.if((0,R._)`${I.default.errors} === 0`,()=>e.return(I.default.data),()=>e.throw((0,R._)`new ${s}(${I.default.vErrors})`)):(e.assign((0,R._)`${n}.errors`,I.default.vErrors),i.unevaluated&&p_(r),e.return((0,R._)`${I.default.errors} === 0`))}function p_({gen:r,evaluated:e,props:t,items:n}){t instanceof R.Name&&r.assign((0,R._)`${e}.props`,t),n instanceof R.Name&&r.assign((0,R._)`${e}.items`,n)}function xl(r,e,t,n){let{gen:s,schema:i,data:a,allErrors:c,opts:u,self:o}=r,{RULES:l}=o;if(i.$ref&&(u.ignoreKeywordsWithRef||!(0,Et.schemaHasRulesButRef)(i,l))){s.block(()=>Xl(r,"$ref",l.all.$ref.definition));return}u.jtd||m_(r,e),s.block(()=>{for(let y of l.rules)d(y);d(l.post)});function d(y){!(0,Qi.shouldUseGroup)(i,y)||(y.type?(s.if((0,gs.checkDataType)(y.type,a,u.strictNumbers)),Ll(r,y),e.length===1&&e[0]===y.type&&t&&(s.else(),(0,gs.reportTypeError)(r)),s.endIf()):Ll(r,y),c||s.if((0,R._)`${I.default.errors} === ${n||0}`))}}function Ll(r,e){let{gen:t,schema:n,opts:{useDefaults:s}}=r;s&&(0,e_.assignDefaults)(r,e.type),t.block(()=>{for(let i of e.rules)(0,Qi.shouldUseRule)(n,i)&&Xl(r,i.keyword,i.definition,e.type)})}function m_(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(g_(r,e),r.opts.allowUnionTypes||v_(r,e),__(r,r.dataTypes))}function g_(r,e){if(!!e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{Ml(r.dataTypes,t)||ea(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),r.dataTypes=r.dataTypes.filter(t=>Ml(e,t))}}function v_(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ea(r,"use allowUnionTypes to allow union type keyword")}function __(r,e){let t=r.self.RULES.all;for(let n in t){let s=t[n];if(typeof s=="object"&&(0,Qi.shouldUseRule)(r.schema,s)){let{type:i}=s.definition;i.length&&!i.some(a=>y_(e,a))&&ea(r,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function y_(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function Ml(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function ea(r,e){e+=` at "${r.schemaEnv.baseId+r.errSchemaPath}" (strictTypes)`,(0,Et.checkStrictMode)(r,e,r.opts.strictTypes)}var vs=class{constructor(e,t,n){if((0,bn.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Et.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Wl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,bn.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",I.default.errors))}result(e,t,n){this.failResult((0,R.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,R.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,R._)`${t} !== undefined && (${(0,R.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?wn.reportExtraError:wn.reportError)(this,this.def.error,t)}$dataError(){(0,wn.reportError)(this,this.def.$dataError||wn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,wn.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=R.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=R.nil,t=R.nil){if(!this.$data)return;let{gen:n,schemaCode:s,schemaType:i,def:a}=this;n.if((0,R.or)((0,R._)`${s} === undefined`,t)),e!==R.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==R.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:s,it:i}=this;return(0,R.or)(a(),c());function a(){if(n.length){if(!(t instanceof R.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,R._)`${(0,gs.checkDataTypes)(u,t,i.opts.strictNumbers,gs.DataType.Wrong)}`}return R.nil}function c(){if(s.validateSchema){let u=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,R._)`!${u}(${t})`}return R.nil}}subschema(e,t){let n=(0,Zi.getSubschema)(this.it,e);(0,Zi.extendSubschemaData)(n,this.it,e),(0,Zi.extendSubschemaMode)(n,e);let s={...this.it,...n,items:void 0,props:void 0};return o_(s,t),s}mergeEvaluated(e,t){let{it:n,gen:s}=this;!n.opts.unevaluated||(n.props!==!0&&e.props!==void 0&&(n.props=Et.mergeEvaluated.props(s,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Et.mergeEvaluated.items(s,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(t,()=>this.mergeEvaluated(e,R.Name)),!0}};Tt.KeywordCxt=vs;function Xl(r,e,t,n){let s=new vs(r,t,e);"code"in t?t.code(s,n):s.$data&&t.validate?(0,bn.funcKeywordCode)(s,t):"macro"in t?(0,bn.macroKeywordCode)(s,t):(t.compile||t.validate)&&(0,bn.funcKeywordCode)(s,t)}var $_=/^\/(?:[^~]|~0|~1)*$/,E_=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Wl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let s,i;if(r==="")return I.default.rootData;if(r[0]==="/"){if(!$_.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);s=r,i=I.default.rootData}else{let o=E_.exec(r);if(!o)throw new Error(`Invalid JSON-pointer: ${r}`);let l=+o[1];if(s=o[2],s==="#"){if(l>=e)throw new Error(u("property/index",l));return n[e-l]}if(l>e)throw new Error(u("data",l));if(i=t[e-l],!s)return i}let a=i,c=s.split("/");for(let o of c)o&&(i=(0,R._)`${i}${(0,R.getProperty)((0,Et.unescapeJsonPointer)(o))}`,a=(0,R._)`${a} && ${i}`);return a;function u(o,l){return`Cannot access ${o} ${l} levels up, current level is ${e}`}}Tt.getData=Wl});var na=_(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var ta=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};ra.default=ta});var oa=_(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});var sa=En(),ia=class extends Error{constructor(e,t,n,s){super(s||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,sa.resolveUrl)(e,t,n),this.missingSchema=(0,sa.normalizeId)((0,sa.getFullPath)(e,this.missingRef))}};aa.default=ia});var ys=_(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.resolveSchema=Ke.getCompilingSchema=Ke.resolveRef=Ke.compileSchema=Ke.SchemaEnv=void 0;var Ye=L(),w_=na(),Jt=$t(),Ze=En(),Bl=G(),b_=Sn(),Rr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Ze.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Ke.SchemaEnv=Rr;function ua(r){let e=Jl.call(this,r);if(e)return e;let t=(0,Ze.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,a=new Ye.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i}),c;r.$async&&(c=a.scopeValue("Error",{ref:w_.default,code:(0,Ye._)`require("ajv/dist/runtime/validation_error").default`}));let u=a.scopeName("validate");r.validateName=u;let o={gen:a,allErrors:this.opts.allErrors,data:Jt.default.data,parentData:Jt.default.parentData,parentDataProperty:Jt.default.parentDataProperty,dataNames:[Jt.default.data],dataPathArr:[Ye.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Ye.stringify)(r.schema)}:{ref:r.schema}),validateName:u,ValidationError:c,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Ye.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ye._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(r),(0,b_.validateFunctionCode)(o),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(Jt.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,r));let m=new Function(`${Jt.default.self}`,`${Jt.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:m}),m.errors=null,m.schema=r.schema,m.schemaEnv=r,r.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:u,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:$,items:E}=o;m.evaluated={props:$ instanceof Ye.Name?void 0:$,items:E instanceof Ye.Name?void 0:E,dynamicProps:$ instanceof Ye.Name,dynamicItems:E instanceof Ye.Name},m.source&&(m.source.evaluated=(0,Ye.stringify)(m.evaluated))}return r.validate=m,r}catch(d){throw delete r.validate,delete r.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(r)}}Ke.compileSchema=ua;function S_(r,e,t){var n;t=(0,Ze.resolveUrl)(this.opts.uriResolver,e,t);let s=r.refs[t];if(s)return s;let i=R_.call(this,r,t);if(i===void 0){let a=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:c}=this.opts;a&&(i=new Rr({schema:a,schemaId:c,root:r,baseId:e}))}if(i!==void 0)return r.refs[t]=O_.call(this,i)}Ke.resolveRef=S_;function O_(r){return(0,Ze.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:ua.call(this,r)}function Jl(r){for(let e of this._compilations)if(P_(e,r))return e}Ke.getCompilingSchema=Jl;function P_(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function R_(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||_s.call(this,r,e)}function _s(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Ze._getFullPath)(this.opts.uriResolver,t),s=(0,Ze.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===s)return ca.call(this,t,r);let i=(0,Ze.normalizeId)(n),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let c=_s.call(this,r,a);return typeof(c==null?void 0:c.schema)!="object"?void 0:ca.call(this,t,c)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||ua.call(this,a),i===(0,Ze.normalizeId)(e)){let{schema:c}=a,{schemaId:u}=this.opts,o=c[u];return o&&(s=(0,Ze.resolveUrl)(this.opts.uriResolver,s,o)),new Rr({schema:c,schemaId:u,root:r,baseId:s})}return ca.call(this,t,a)}}Ke.resolveSchema=_s;var C_=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function ca(r,{baseId:e,schema:t,root:n}){var s;if(((s=r.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(let c of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let u=t[(0,Bl.unescapeFragment)(c)];if(u===void 0)return;t=u;let o=typeof t=="object"&&t[this.opts.schemaId];!C_.has(c)&&o&&(e=(0,Ze.resolveUrl)(this.opts.uriResolver,e,o))}let i;if(typeof t!="boolean"&&t.$ref&&!(0,Bl.schemaHasRulesButRef)(t,this.RULES)){let c=(0,Ze.resolveUrl)(this.opts.uriResolver,e,t.$ref);i=_s.call(this,n,c)}let{schemaId:a}=this.opts;if(i=i||new Rr({schema:t,schemaId:a,root:n,baseId:e}),i.schema!==i.root.schema)return i}});var Yl=_((Jw,N_)=>{N_.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Ql=_(($s,Zl)=>{(function(r,e){typeof $s=="object"&&typeof Zl<"u"?e($s):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})($s,function(r){"use strict";function e(){for(var h=arguments.length,f=Array(h),p=0;p<h;p++)f[p]=arguments[p];if(f.length>1){f[0]=f[0].slice(0,-1);for(var g=f.length-1,v=1;v<g;++v)f[v]=f[v].slice(1,-1);return f[g]=f[g].slice(1),f.join("")}else return f[0]}function t(h){return"(?:"+h+")"}function n(h){return h===void 0?"undefined":h===null?"null":Object.prototype.toString.call(h).split(" ").pop().split("]").shift().toLowerCase()}function s(h){return h.toUpperCase()}function i(h){return h!=null?h instanceof Array?h:typeof h.length!="number"||h.split||h.setInterval||h.call?[h]:Array.prototype.slice.call(h):[]}function a(h,f){var p=h;if(f)for(var g in f)p[g]=f[g];return p}function c(h){var f="[A-Za-z]",p="[\\x0D]",g="[0-9]",v="[\\x22]",S=e(g,"[A-Fa-f]"),A="[\\x0A]",H="[\\x20]",W=t(t("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+t("%[89A-Fa-f]"+S+"%"+S+S)+"|"+t("%"+S+S)),ce="[\\:\\/\\?\\#\\[\\]\\@]",F="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",se=e(ce,F),ue=h?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ne=h?"[\\uE000-\\uF8FF]":"[]",K=e(f,g,"[\\-\\.\\_\\~]",ue),ie=t(f+e(f,g,"[\\+\\-\\.]")+"*"),B=t(t(W+"|"+e(K,F,"[\\:]"))+"*"),Dt=t(t("25[0-5]")+"|"+t("2[0-4]"+g)+"|"+t("1"+g+g)+"|"+t("[1-9]"+g)+"|"+g),Ae=t(t("25[0-5]")+"|"+t("2[0-4]"+g)+"|"+t("1"+g+g)+"|"+t("0?[1-9]"+g)+"|0?0?"+g),Fe=t(Ae+"\\."+Ae+"\\."+Ae+"\\."+Ae),Y=t(S+"{1,4}"),qe=t(t(Y+"\\:"+Y)+"|"+Fe),Ve=t(t(Y+"\\:")+"{6}"+qe),st=t("\\:\\:"+t(Y+"\\:")+"{5}"+qe),jt=t(t(Y)+"?\\:\\:"+t(Y+"\\:")+"{4}"+qe),dt=t(t(t(Y+"\\:")+"{0,1}"+Y)+"?\\:\\:"+t(Y+"\\:")+"{3}"+qe),Ur=t(t(t(Y+"\\:")+"{0,2}"+Y)+"?\\:\\:"+t(Y+"\\:")+"{2}"+qe),Hn=t(t(t(Y+"\\:")+"{0,3}"+Y)+"?\\:\\:"+Y+"\\:"+qe),Un=t(t(t(Y+"\\:")+"{0,4}"+Y)+"?\\:\\:"+qe),ir=t(t(t(Y+"\\:")+"{0,5}"+Y)+"?\\:\\:"+Y),ar=t(t(t(Y+"\\:")+"{0,6}"+Y)+"?\\:\\:"),ht=t([Ve,st,jt,dt,Ur,Hn,Un,ir,ar].join("|")),or=t(t(K+"|"+W)+"+"),Us=t(ht+"\\%25"+or),kt=t(ht+t("\\%25|\\%(?!"+S+"{2})")+or),ih=t("[vV]"+S+"+\\."+e(K,F,"[\\:]")+"+"),ah=t("\\["+t(kt+"|"+ht+"|"+ih)+"\\]"),Oo=t(t(W+"|"+e(K,F))+"*"),Gr=t(ah+"|"+Fe+"(?!"+Oo+")|"+Oo),zr=t(g+"*"),Po=t(t(B+"@")+"?"+Gr+t("\\:"+zr)+"?"),Kr=t(W+"|"+e(K,F,"[\\:\\@]")),oh=t(Kr+"*"),Ro=t(Kr+"+"),ch=t(t(W+"|"+e(K,F,"[\\@]"))+"+"),pt=t(t("\\/"+oh)+"*"),cr=t("\\/"+t(Ro+pt)+"?"),Gs=t(ch+pt),Gn=t(Ro+pt),ur="(?!"+Kr+")",yE=t(pt+"|"+cr+"|"+Gs+"|"+Gn+"|"+ur),lr=t(t(Kr+"|"+e("[\\/\\?]",ne))+"*"),Xr=t(t(Kr+"|[\\/\\?]")+"*"),Co=t(t("\\/\\/"+Po+pt)+"|"+cr+"|"+Gn+"|"+ur),uh=t(ie+"\\:"+Co+t("\\?"+lr)+"?"+t("\\#"+Xr)+"?"),lh=t(t("\\/\\/"+Po+pt)+"|"+cr+"|"+Gs+"|"+ur),fh=t(lh+t("\\?"+lr)+"?"+t("\\#"+Xr)+"?"),$E=t(uh+"|"+fh),EE=t(ie+"\\:"+Co+t("\\?"+lr)+"?"),wE="^("+ie+")\\:"+t(t("\\/\\/("+t("("+B+")@")+"?("+Gr+")"+t("\\:("+zr+")")+"?)")+"?("+pt+"|"+cr+"|"+Gn+"|"+ur+")")+t("\\?("+lr+")")+"?"+t("\\#("+Xr+")")+"?$",bE="^(){0}"+t(t("\\/\\/("+t("("+B+")@")+"?("+Gr+")"+t("\\:("+zr+")")+"?)")+"?("+pt+"|"+cr+"|"+Gs+"|"+ur+")")+t("\\?("+lr+")")+"?"+t("\\#("+Xr+")")+"?$",SE="^("+ie+")\\:"+t(t("\\/\\/("+t("("+B+")@")+"?("+Gr+")"+t("\\:("+zr+")")+"?)")+"?("+pt+"|"+cr+"|"+Gn+"|"+ur+")")+t("\\?("+lr+")")+"?$",OE="^"+t("\\#("+Xr+")")+"?$",PE="^"+t("("+B+")@")+"?("+Gr+")"+t("\\:("+zr+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",f,g,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",K,F),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",K,F),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",K,F),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",K,F),"g"),NOT_QUERY:new RegExp(e("[^\\%]",K,F,"[\\:\\@\\/\\?]",ne),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",K,F,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",K,F),"g"),UNRESERVED:new RegExp(K,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",K,se),"g"),PCT_ENCODED:new RegExp(W,"g"),IPV4ADDRESS:new RegExp("^("+Fe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ht+")"+t(t("\\%25|\\%(?!"+S+"{2})")+"("+or+")")+"?\\]?$")}}var u=c(!1),o=c(!0),l=function(){function h(f,p){var g=[],v=!0,S=!1,A=void 0;try{for(var H=f[Symbol.iterator](),W;!(v=(W=H.next()).done)&&(g.push(W.value),!(p&&g.length===p));v=!0);}catch(ce){S=!0,A=ce}finally{try{!v&&H.return&&H.return()}finally{if(S)throw A}}return g}return function(f,p){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f))return h(f,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(h){if(Array.isArray(h)){for(var f=0,p=Array(h.length);f<h.length;f++)p[f]=h[f];return p}else return Array.from(h)},y=2147483647,m=36,$=1,E=26,w=38,b=700,D=72,T=128,z="-",C=/^xn--/,me=/[^\0-\x7E]/,ke=/[\x2E\u3002\uFF0E\uFF61]/g,bt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xe=m-$,re=Math.floor,Le=String.fromCharCode;function et(h){throw new RangeError(bt[h])}function Fn(h,f){for(var p=[],g=h.length;g--;)p[g]=f(h[g]);return p}function Vn(h,f){var p=h.split("@"),g="";p.length>1&&(g=p[0]+"@",h=p[1]),h=h.replace(ke,".");var v=h.split("."),S=Fn(v,f).join(".");return g+S}function ao(h){for(var f=[],p=0,g=h.length;p<g;){var v=h.charCodeAt(p++);if(v>=55296&&v<=56319&&p<g){var S=h.charCodeAt(p++);(S&64512)==56320?f.push(((v&1023)<<10)+(S&1023)+65536):(f.push(v),p--)}else f.push(v)}return f}var jd=function(f){return String.fromCodePoint.apply(String,d(f))},kd=function(f){return f-48<10?f-22:f-65<26?f-65:f-97<26?f-97:m},oo=function(f,p){return f+22+75*(f<26)-((p!=0)<<5)},co=function(f,p,g){var v=0;for(f=g?re(f/b):f>>1,f+=re(f/p);f>xe*E>>1;v+=m)f=re(f/xe);return re(v+(xe+1)*f/(f+w))},uo=function(f){var p=[],g=f.length,v=0,S=T,A=D,H=f.lastIndexOf(z);H<0&&(H=0);for(var W=0;W<H;++W)f.charCodeAt(W)>=128&&et("not-basic"),p.push(f.charCodeAt(W));for(var ce=H>0?H+1:0;ce<g;){for(var F=v,se=1,ue=m;;ue+=m){ce>=g&&et("invalid-input");var ne=kd(f.charCodeAt(ce++));(ne>=m||ne>re((y-v)/se))&&et("overflow"),v+=ne*se;var K=ue<=A?$:ue>=A+E?E:ue-A;if(ne<K)break;var ie=m-K;se>re(y/ie)&&et("overflow"),se*=ie}var B=p.length+1;A=co(v-F,B,F==0),re(v/B)>y-S&&et("overflow"),S+=re(v/B),v%=B,p.splice(v++,0,S)}return String.fromCodePoint.apply(String,p)},lo=function(f){var p=[];f=ao(f);var g=f.length,v=T,S=0,A=D,H=!0,W=!1,ce=void 0;try{for(var F=f[Symbol.iterator](),se;!(H=(se=F.next()).done);H=!0){var ue=se.value;ue<128&&p.push(Le(ue))}}catch(kt){W=!0,ce=kt}finally{try{!H&&F.return&&F.return()}finally{if(W)throw ce}}var ne=p.length,K=ne;for(ne&&p.push(z);K<g;){var ie=y,B=!0,Dt=!1,Ae=void 0;try{for(var Fe=f[Symbol.iterator](),Y;!(B=(Y=Fe.next()).done);B=!0){var qe=Y.value;qe>=v&&qe<ie&&(ie=qe)}}catch(kt){Dt=!0,Ae=kt}finally{try{!B&&Fe.return&&Fe.return()}finally{if(Dt)throw Ae}}var Ve=K+1;ie-v>re((y-S)/Ve)&&et("overflow"),S+=(ie-v)*Ve,v=ie;var st=!0,jt=!1,dt=void 0;try{for(var Ur=f[Symbol.iterator](),Hn;!(st=(Hn=Ur.next()).done);st=!0){var Un=Hn.value;if(Un<v&&++S>y&&et("overflow"),Un==v){for(var ir=S,ar=m;;ar+=m){var ht=ar<=A?$:ar>=A+E?E:ar-A;if(ir<ht)break;var or=ir-ht,Us=m-ht;p.push(Le(oo(ht+or%Us,0))),ir=re(or/Us)}p.push(Le(oo(ir,0))),A=co(S,Ve,K==ne),S=0,++K}}}catch(kt){jt=!0,dt=kt}finally{try{!st&&Ur.return&&Ur.return()}finally{if(jt)throw dt}}++S,++v}return p.join("")},xd=function(f){return Vn(f,function(p){return C.test(p)?uo(p.slice(4).toLowerCase()):p})},Ld=function(f){return Vn(f,function(p){return me.test(p)?"xn--"+lo(p):p})},tr={version:"2.1.0",ucs2:{decode:ao,encode:jd},decode:uo,encode:lo,toASCII:Ld,toUnicode:xd},Me={};function tt(h){var f=h.charCodeAt(0),p=void 0;return f<16?p="%0"+f.toString(16).toUpperCase():f<128?p="%"+f.toString(16).toUpperCase():f<2048?p="%"+(f>>6|192).toString(16).toUpperCase()+"%"+(f&63|128).toString(16).toUpperCase():p="%"+(f>>12|224).toString(16).toUpperCase()+"%"+(f>>6&63|128).toString(16).toUpperCase()+"%"+(f&63|128).toString(16).toUpperCase(),p}function rr(h){for(var f="",p=0,g=h.length;p<g;){var v=parseInt(h.substr(p+1,2),16);if(v<128)f+=String.fromCharCode(v),p+=3;else if(v>=194&&v<224){if(g-p>=6){var S=parseInt(h.substr(p+4,2),16);f+=String.fromCharCode((v&31)<<6|S&63)}else f+=h.substr(p,6);p+=6}else if(v>=224){if(g-p>=9){var A=parseInt(h.substr(p+4,2),16),H=parseInt(h.substr(p+7,2),16);f+=String.fromCharCode((v&15)<<12|(A&63)<<6|H&63)}else f+=h.substr(p,9);p+=9}else f+=h.substr(p,3),p+=3}return f}function Ms(h,f){function p(g){var v=rr(g);return v.match(f.UNRESERVED)?v:g}return h.scheme&&(h.scheme=String(h.scheme).replace(f.PCT_ENCODED,p).toLowerCase().replace(f.NOT_SCHEME,"")),h.userinfo!==void 0&&(h.userinfo=String(h.userinfo).replace(f.PCT_ENCODED,p).replace(f.NOT_USERINFO,tt).replace(f.PCT_ENCODED,s)),h.host!==void 0&&(h.host=String(h.host).replace(f.PCT_ENCODED,p).toLowerCase().replace(f.NOT_HOST,tt).replace(f.PCT_ENCODED,s)),h.path!==void 0&&(h.path=String(h.path).replace(f.PCT_ENCODED,p).replace(h.scheme?f.NOT_PATH:f.NOT_PATH_NOSCHEME,tt).replace(f.PCT_ENCODED,s)),h.query!==void 0&&(h.query=String(h.query).replace(f.PCT_ENCODED,p).replace(f.NOT_QUERY,tt).replace(f.PCT_ENCODED,s)),h.fragment!==void 0&&(h.fragment=String(h.fragment).replace(f.PCT_ENCODED,p).replace(f.NOT_FRAGMENT,tt).replace(f.PCT_ENCODED,s)),h}function Fs(h){return h.replace(/^0*(.*)/,"$1")||"0"}function Vs(h,f){var p=h.match(f.IPV4ADDRESS)||[],g=l(p,2),v=g[1];return v?v.split(".").map(Fs).join("."):h}function fo(h,f){var p=h.match(f.IPV6ADDRESS)||[],g=l(p,3),v=g[1],S=g[2];if(v){for(var A=v.toLowerCase().split("::").reverse(),H=l(A,2),W=H[0],ce=H[1],F=ce?ce.split(":").map(Fs):[],se=W.split(":").map(Fs),ue=f.IPV4ADDRESS.test(se[se.length-1]),ne=ue?7:8,K=se.length-ne,ie=Array(ne),B=0;B<ne;++B)ie[B]=F[B]||se[K+B]||"";ue&&(ie[ne-1]=Vs(ie[ne-1],f));var Dt=ie.reduce(function(Ve,st,jt){if(!st||st==="0"){var dt=Ve[Ve.length-1];dt&&dt.index+dt.length===jt?dt.length++:Ve.push({index:jt,length:1})}return Ve},[]),Ae=Dt.sort(function(Ve,st){return st.length-Ve.length})[0],Fe=void 0;if(Ae&&Ae.length>1){var Y=ie.slice(0,Ae.index),qe=ie.slice(Ae.index+Ae.length);Fe=Y.join(":")+"::"+qe.join(":")}else Fe=ie.join(":");return S&&(Fe+="%"+S),Fe}else return h}var Md=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Fd="".match(/(){0}/)[1]===void 0;function lt(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p={},g=f.iri!==!1?o:u;f.reference==="suffix"&&(h=(f.scheme?f.scheme+":":"")+"//"+h);var v=h.match(Md);if(v){Fd?(p.scheme=v[1],p.userinfo=v[3],p.host=v[4],p.port=parseInt(v[5],10),p.path=v[6]||"",p.query=v[7],p.fragment=v[8],isNaN(p.port)&&(p.port=v[5])):(p.scheme=v[1]||void 0,p.userinfo=h.indexOf("@")!==-1?v[3]:void 0,p.host=h.indexOf("//")!==-1?v[4]:void 0,p.port=parseInt(v[5],10),p.path=v[6]||"",p.query=h.indexOf("?")!==-1?v[7]:void 0,p.fragment=h.indexOf("#")!==-1?v[8]:void 0,isNaN(p.port)&&(p.port=h.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?v[4]:void 0)),p.host&&(p.host=fo(Vs(p.host,g),g)),p.scheme===void 0&&p.userinfo===void 0&&p.host===void 0&&p.port===void 0&&!p.path&&p.query===void 0?p.reference="same-document":p.scheme===void 0?p.reference="relative":p.fragment===void 0?p.reference="absolute":p.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==p.reference&&(p.error=p.error||"URI is not a "+f.reference+" reference.");var S=Me[(f.scheme||p.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!S||!S.unicodeSupport)){if(p.host&&(f.domainHost||S&&S.domainHost))try{p.host=tr.toASCII(p.host.replace(g.PCT_ENCODED,rr).toLowerCase())}catch(A){p.error=p.error||"Host's domain name can not be converted to ASCII via punycode: "+A}Ms(p,u)}else Ms(p,g);S&&S.parse&&S.parse(p,f)}else p.error=p.error||"URI can not be parsed.";return p}function Vd(h,f){var p=f.iri!==!1?o:u,g=[];return h.userinfo!==void 0&&(g.push(h.userinfo),g.push("@")),h.host!==void 0&&g.push(fo(Vs(String(h.host),p),p).replace(p.IPV6ADDRESS,function(v,S,A){return"["+S+(A?"%25"+A:"")+"]"})),(typeof h.port=="number"||typeof h.port=="string")&&(g.push(":"),g.push(String(h.port))),g.length?g.join(""):void 0}var ho=/^\.\.?\//,po=/^\/\.(\/|$)/,mo=/^\/\.\.(\/|$)/,Hd=/^\/?(?:.|\n)*?(?=\/|$)/;function nr(h){for(var f=[];h.length;)if(h.match(ho))h=h.replace(ho,"");else if(h.match(po))h=h.replace(po,"/");else if(h.match(mo))h=h.replace(mo,"/"),f.pop();else if(h==="."||h==="..")h="";else{var p=h.match(Hd);if(p){var g=p[0];h=h.slice(g.length),f.push(g)}else throw new Error("Unexpected dot segment condition")}return f.join("")}function rt(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f.iri?o:u,g=[],v=Me[(f.scheme||h.scheme||"").toLowerCase()];if(v&&v.serialize&&v.serialize(h,f),h.host&&!p.IPV6ADDRESS.test(h.host)){if(f.domainHost||v&&v.domainHost)try{h.host=f.iri?tr.toUnicode(h.host):tr.toASCII(h.host.replace(p.PCT_ENCODED,rr).toLowerCase())}catch(H){h.error=h.error||"Host's domain name can not be converted to "+(f.iri?"Unicode":"ASCII")+" via punycode: "+H}}Ms(h,p),f.reference!=="suffix"&&h.scheme&&(g.push(h.scheme),g.push(":"));var S=Vd(h,f);if(S!==void 0&&(f.reference!=="suffix"&&g.push("//"),g.push(S),h.path&&h.path.charAt(0)!=="/"&&g.push("/")),h.path!==void 0){var A=h.path;!f.absolutePath&&(!v||!v.absolutePath)&&(A=nr(A)),S===void 0&&(A=A.replace(/^\/\//,"/%2F")),g.push(A)}return h.query!==void 0&&(g.push("?"),g.push(h.query)),h.fragment!==void 0&&(g.push("#"),g.push(h.fragment)),g.join("")}function go(h,f){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=arguments[3],v={};return g||(h=lt(rt(h,p),p),f=lt(rt(f,p),p)),p=p||{},!p.tolerant&&f.scheme?(v.scheme=f.scheme,v.userinfo=f.userinfo,v.host=f.host,v.port=f.port,v.path=nr(f.path||""),v.query=f.query):(f.userinfo!==void 0||f.host!==void 0||f.port!==void 0?(v.userinfo=f.userinfo,v.host=f.host,v.port=f.port,v.path=nr(f.path||""),v.query=f.query):(f.path?(f.path.charAt(0)==="/"?v.path=nr(f.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?v.path="/"+f.path:h.path?v.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+f.path:v.path=f.path,v.path=nr(v.path)),v.query=f.query):(v.path=h.path,f.query!==void 0?v.query=f.query:v.query=h.query),v.userinfo=h.userinfo,v.host=h.host,v.port=h.port),v.scheme=h.scheme),v.fragment=f.fragment,v}function Ud(h,f,p){var g=a({scheme:"null"},p);return rt(go(lt(h,g),lt(f,g),g,!0),g)}function Gd(h,f){return typeof h=="string"?h=rt(lt(h,f),f):n(h)==="object"&&(h=lt(rt(h,f),f)),h}function zd(h,f,p){return typeof h=="string"?h=rt(lt(h,p),p):n(h)==="object"&&(h=rt(h,p)),typeof f=="string"?f=rt(lt(f,p),p):n(f)==="object"&&(f=rt(f,p)),h===f}function Kd(h,f){return h&&h.toString().replace(!f||!f.iri?u.ESCAPE:o.ESCAPE,tt)}function ft(h,f){return h&&h.toString().replace(!f||!f.iri?u.PCT_ENCODED:o.PCT_ENCODED,rr)}var Vr={scheme:"http",domainHost:!0,parse:function(f,p){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f},serialize:function(f,p){var g=String(f.scheme).toLowerCase()==="https";return(f.port===(g?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}},vo={scheme:"https",domainHost:Vr.domainHost,parse:Vr.parse,serialize:Vr.serialize};function _o(h){return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}var Hr={scheme:"ws",domainHost:!0,parse:function(f,p){var g=f;return g.secure=_o(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g},serialize:function(f,p){if((f.port===(_o(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){var g=f.resourceName.split("?"),v=l(g,2),S=v[0],A=v[1];f.path=S&&S!=="/"?S:void 0,f.query=A,f.resourceName=void 0}return f.fragment=void 0,f}},yo={scheme:"wss",domainHost:Hr.domainHost,parse:Hr.parse,serialize:Hr.serialize},Xd={},Wd=!0,$o="[A-Za-z0-9\\-\\.\\_\\~"+(Wd?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",nt="[0-9A-Fa-f]",Bd=t(t("%[EFef]"+nt+"%"+nt+nt+"%"+nt+nt)+"|"+t("%[89A-Fa-f]"+nt+"%"+nt+nt)+"|"+t("%"+nt+nt)),Jd="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Yd="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Zd=e(Yd,'[\\"\\\\]'),Qd="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",eh=new RegExp($o,"g"),sr=new RegExp(Bd,"g"),th=new RegExp(e("[^]",Jd,"[\\.]",'[\\"]',Zd),"g"),Eo=new RegExp(e("[^]",$o,Qd),"g"),rh=Eo;function Hs(h){var f=rr(h);return f.match(eh)?f:h}var wo={scheme:"mailto",parse:function(f,p){var g=f,v=g.to=g.path?g.path.split(","):[];if(g.path=void 0,g.query){for(var S=!1,A={},H=g.query.split("&"),W=0,ce=H.length;W<ce;++W){var F=H[W].split("=");switch(F[0]){case"to":for(var se=F[1].split(","),ue=0,ne=se.length;ue<ne;++ue)v.push(se[ue]);break;case"subject":g.subject=ft(F[1],p);break;case"body":g.body=ft(F[1],p);break;default:S=!0,A[ft(F[0],p)]=ft(F[1],p);break}}S&&(g.headers=A)}g.query=void 0;for(var K=0,ie=v.length;K<ie;++K){var B=v[K].split("@");if(B[0]=ft(B[0]),p.unicodeSupport)B[1]=ft(B[1],p).toLowerCase();else try{B[1]=tr.toASCII(ft(B[1],p).toLowerCase())}catch(Dt){g.error=g.error||"Email address's domain name can not be converted to ASCII via punycode: "+Dt}v[K]=B.join("@")}return g},serialize:function(f,p){var g=f,v=i(f.to);if(v){for(var S=0,A=v.length;S<A;++S){var H=String(v[S]),W=H.lastIndexOf("@"),ce=H.slice(0,W).replace(sr,Hs).replace(sr,s).replace(th,tt),F=H.slice(W+1);try{F=p.iri?tr.toUnicode(F):tr.toASCII(ft(F,p).toLowerCase())}catch(K){g.error=g.error||"Email address's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+K}v[S]=ce+"@"+F}g.path=v.join(",")}var se=f.headers=f.headers||{};f.subject&&(se.subject=f.subject),f.body&&(se.body=f.body);var ue=[];for(var ne in se)se[ne]!==Xd[ne]&&ue.push(ne.replace(sr,Hs).replace(sr,s).replace(Eo,tt)+"="+se[ne].replace(sr,Hs).replace(sr,s).replace(rh,tt));return ue.length&&(g.query=ue.join("&")),g}},nh=/^([^\:]+)\:(.*)/,bo={scheme:"urn",parse:function(f,p){var g=f.path&&f.path.match(nh),v=f;if(g){var S=p.scheme||v.scheme||"urn",A=g[1].toLowerCase(),H=g[2],W=S+":"+(p.nid||A),ce=Me[W];v.nid=A,v.nss=H,v.path=void 0,ce&&(v=ce.parse(v,p))}else v.error=v.error||"URN can not be parsed.";return v},serialize:function(f,p){var g=p.scheme||f.scheme||"urn",v=f.nid,S=g+":"+(p.nid||v),A=Me[S];A&&(f=A.serialize(f,p));var H=f,W=f.nss;return H.path=(v||p.nid)+":"+W,H}},sh=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,So={scheme:"urn:uuid",parse:function(f,p){var g=f;return g.uuid=g.nss,g.nss=void 0,!p.tolerant&&(!g.uuid||!g.uuid.match(sh))&&(g.error=g.error||"UUID is not valid."),g},serialize:function(f,p){var g=f;return g.nss=(f.uuid||"").toLowerCase(),g}};Me[Vr.scheme]=Vr,Me[vo.scheme]=vo,Me[Hr.scheme]=Hr,Me[yo.scheme]=yo,Me[wo.scheme]=wo,Me[bo.scheme]=bo,Me[So.scheme]=So,r.SCHEMES=Me,r.pctEncChar=tt,r.pctDecChars=rr,r.parse=lt,r.removeDotSegments=nr,r.serialize=rt,r.resolveComponents=go,r.resolve=Ud,r.normalize=Gd,r.equal=zd,r.escapeComponent=Kd,r.unescapeComponent=ft,Object.defineProperty(r,"__esModule",{value:!0})})});var tf=_(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});var ef=Ql();ef.code='require("ajv/dist/runtime/uri").default';la.default=ef});var lf=_(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.CodeGen=he.Name=he.nil=he.stringify=he.str=he._=he.KeywordCxt=void 0;var I_=Sn();Object.defineProperty(he,"KeywordCxt",{enumerable:!0,get:function(){return I_.KeywordCxt}});var Cr=L();Object.defineProperty(he,"_",{enumerable:!0,get:function(){return Cr._}});Object.defineProperty(he,"str",{enumerable:!0,get:function(){return Cr.str}});Object.defineProperty(he,"stringify",{enumerable:!0,get:function(){return Cr.stringify}});Object.defineProperty(he,"nil",{enumerable:!0,get:function(){return Cr.nil}});Object.defineProperty(he,"Name",{enumerable:!0,get:function(){return Cr.Name}});Object.defineProperty(he,"CodeGen",{enumerable:!0,get:function(){return Cr.CodeGen}});var T_=na(),of=oa(),A_=Hi(),On=ys(),q_=L(),Pn=En(),Es=$n(),da=G(),rf=Yl(),D_=tf(),cf=(r,e)=>new RegExp(r,e);cf.code="new RegExp";var j_=["removeAdditional","useDefaults","coerceTypes"],k_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),x_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},L_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},nf=200;function M_(r){var e,t,n,s,i,a,c,u,o,l,d,y,m,$,E,w,b,D,T,z,C,me,ke,bt,xe;let re=r.strict,Le=(e=r.code)===null||e===void 0?void 0:e.optimize,et=Le===!0||Le===void 0?1:Le||0,Fn=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:cf,Vn=(s=r.uriResolver)!==null&&s!==void 0?s:D_.default;return{strictSchema:(a=(i=r.strictSchema)!==null&&i!==void 0?i:re)!==null&&a!==void 0?a:!0,strictNumbers:(u=(c=r.strictNumbers)!==null&&c!==void 0?c:re)!==null&&u!==void 0?u:!0,strictTypes:(l=(o=r.strictTypes)!==null&&o!==void 0?o:re)!==null&&l!==void 0?l:"log",strictTuples:(y=(d=r.strictTuples)!==null&&d!==void 0?d:re)!==null&&y!==void 0?y:"log",strictRequired:($=(m=r.strictRequired)!==null&&m!==void 0?m:re)!==null&&$!==void 0?$:!1,code:r.code?{...r.code,optimize:et,regExp:Fn}:{optimize:et,regExp:Fn},loopRequired:(E=r.loopRequired)!==null&&E!==void 0?E:nf,loopEnum:(w=r.loopEnum)!==null&&w!==void 0?w:nf,meta:(b=r.meta)!==null&&b!==void 0?b:!0,messages:(D=r.messages)!==null&&D!==void 0?D:!0,inlineRefs:(T=r.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(z=r.schemaId)!==null&&z!==void 0?z:"$id",addUsedSchema:(C=r.addUsedSchema)!==null&&C!==void 0?C:!0,validateSchema:(me=r.validateSchema)!==null&&me!==void 0?me:!0,validateFormats:(ke=r.validateFormats)!==null&&ke!==void 0?ke:!0,unicodeRegExp:(bt=r.unicodeRegExp)!==null&&bt!==void 0?bt:!0,int32range:(xe=r.int32range)!==null&&xe!==void 0?xe:!0,uriResolver:Vn}}var Rn=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...M_(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new q_.ValueScope({scope:{},prefixes:k_,es5:t,lines:n}),this.logger=z_(e.logger);let s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,A_.getRules)(),sf.call(this,x_,e,"NOT SUPPORTED"),sf.call(this,L_,e,"DEPRECATED","warn"),this._metaOpts=U_.call(this),e.formats&&V_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&H_.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),F_.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,s=rf;n==="id"&&(s={...rf},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let s=n(t);return"$async"in n||(this.errors=n.errors),s}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return s.call(this,e,t);async function s(l,d){await i.call(this,l.$schema);let y=this._addSchema(l,d);return y.validate||a.call(this,y)}async function i(l){l&&!this.getSchema(l)&&await s.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof of.default))throw d;return c.call(this,d),await u.call(this,d.missingSchema),a.call(this,l)}}function c({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function u(l){let d=await o.call(this,l);this.refs[l]||await i.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,t)}async function o(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(e,t,n,s=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,s);return this}let i;if(typeof e=="object"){let{schemaId:a}=this.opts;if(i=e[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return t=(0,Pn.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,s,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(n,e);if(!s&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return s}getSchema(e){let t;for(;typeof(t=af.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,s=new On.SchemaEnv({schema:{},schemaId:n});if(t=On.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=af.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,Pn.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(X_.call(this,n,t),!t)return(0,da.eachItem)(n,i=>fa.call(this,i)),this;B_.call(this,t);let s={...t,type:(0,Es.getJSONTypes)(t.type),schemaType:(0,Es.getJSONTypes)(t.schemaType)};return(0,da.eachItem)(n,s.type.length===0?i=>fa.call(this,i,s):i=>s.type.forEach(a=>fa.call(this,i,s,a))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let s=n.rules.findIndex(i=>i.keyword===e);s>=0&&n.rules.splice(s,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(s=>`${n}${s.instancePath} ${s.message}`).reduce((s,i)=>s+t+i)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let s of t){let i=s.split("/").slice(1),a=e;for(let c of i)a=a[c];for(let c in n){let u=n[c];if(typeof u!="object")continue;let{$data:o}=u.definition,l=a[c];o&&l&&(a[c]=uf(l))}}return e}_removeAllSchemas(e,t){for(let n in e){let s=e[n];(!t||t.test(n))&&(typeof s=="string"?delete e[n]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[n]))}}_addSchema(e,t,n,s=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:c}=this.opts;if(typeof e=="object")a=e[c];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;n=(0,Pn.normalizeId)(a||n);let o=Pn.getSchemaRefs.call(this,e,n);return u=new On.SchemaEnv({schema:e,schemaId:c,meta:t,baseId:n,localRefs:o}),this._cache.set(u.schema,u),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),s&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):On.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{On.compileSchema.call(this,e)}finally{this.opts=t}}};he.default=Rn;Rn.ValidationError=T_.default;Rn.MissingRefError=of.default;function sf(r,e,t,n="error"){for(let s in r){let i=s;i in e&&this.logger[n](`${t}: option ${s}. ${r[i]}`)}}function af(r){return r=(0,Pn.normalizeId)(r),this.schemas[r]||this.refs[r]}function F_(){let r=this.opts.schemas;if(!!r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function V_(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function H_(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function U_(){let r={...this.opts};for(let e of j_)delete r[e];return r}var G_={log(){},warn(){},error(){}};function z_(r){if(r===!1)return G_;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var K_=/^[a-z_$][a-z0-9_$:-]*$/i;function X_(r,e){let{RULES:t}=this;if((0,da.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!K_.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function fa(r,e,t){var n;let s=e==null?void 0:e.post;if(t&&s)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=s?i.post:i.rules.find(({type:u})=>u===t);if(a||(a={type:t,rules:[]},i.rules.push(a)),i.keywords[r]=!0,!e)return;let c={keyword:r,definition:{...e,type:(0,Es.getJSONTypes)(e.type),schemaType:(0,Es.getJSONTypes)(e.schemaType)}};e.before?W_.call(this,a,c,e.before):a.rules.push(c),i.all[r]=c,(n=e.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function W_(r,e,t){let n=r.rules.findIndex(s=>s.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function B_(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=uf(e)),r.validateSchema=this.compile(e,!0))}var J_={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function uf(r){return{anyOf:[r,J_]}}});var ff=_(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});var Y_={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ha.default=Y_});var mf=_(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.callRef=Yt.getValidate=void 0;var Z_=oa(),df=ze(),Ie=L(),Nr=$t(),hf=ys(),ws=G(),Q_={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:s,schemaEnv:i,validateName:a,opts:c,self:u}=n,{root:o}=i;if((t==="#"||t==="#/")&&s===o.baseId)return d();let l=hf.resolveRef.call(u,o,s,t);if(l===void 0)throw new Z_.default(n.opts.uriResolver,s,t);if(l instanceof hf.SchemaEnv)return y(l);return m(l);function d(){if(i===o)return bs(r,a,i,i.$async);let $=e.scopeValue("root",{ref:o});return bs(r,(0,Ie._)`${$}.validate`,o,o.$async)}function y($){let E=pf(r,$);bs(r,E,$,$.$async)}function m($){let E=e.scopeValue("schema",c.code.source===!0?{ref:$,code:(0,Ie.stringify)($)}:{ref:$}),w=e.name("valid"),b=r.subschema({schema:$,dataTypes:[],schemaPath:Ie.nil,topSchemaRef:E,errSchemaPath:t},w);r.mergeEvaluated(b),r.ok(w)}}};function pf(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ie._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Yt.getValidate=pf;function bs(r,e,t,n){let{gen:s,it:i}=r,{allErrors:a,schemaEnv:c,opts:u}=i,o=u.passContext?Nr.default.this:Ie.nil;n?l():d();function l(){if(!c.$async)throw new Error("async schema referenced by sync schema");let $=s.let("valid");s.try(()=>{s.code((0,Ie._)`await ${(0,df.callValidateCode)(r,e,o)}`),m(e),a||s.assign($,!0)},E=>{s.if((0,Ie._)`!(${E} instanceof ${i.ValidationError})`,()=>s.throw(E)),y(E),a||s.assign($,!1)}),r.ok($)}function d(){r.result((0,df.callValidateCode)(r,e,o),()=>m(e),()=>y(e))}function y($){let E=(0,Ie._)`${$}.errors`;s.assign(Nr.default.vErrors,(0,Ie._)`${Nr.default.vErrors} === null ? ${E} : ${Nr.default.vErrors}.concat(${E})`),s.assign(Nr.default.errors,(0,Ie._)`${Nr.default.vErrors}.length`)}function m($){var E;if(!i.opts.unevaluated)return;let w=(E=t==null?void 0:t.validate)===null||E===void 0?void 0:E.evaluated;if(i.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(i.props=ws.mergeEvaluated.props(s,w.props,i.props));else{let b=s.var("props",(0,Ie._)`${$}.evaluated.props`);i.props=ws.mergeEvaluated.props(s,b,i.props,Ie.Name)}if(i.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(i.items=ws.mergeEvaluated.items(s,w.items,i.items));else{let b=s.var("items",(0,Ie._)`${$}.evaluated.items`);i.items=ws.mergeEvaluated.items(s,b,i.items,Ie.Name)}}}Yt.callRef=bs;Yt.default=Q_});var gf=_(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});var ey=ff(),ty=mf(),ry=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",ey.default,ty.default];pa.default=ry});var vf=_(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});var Ss=L(),At=Ss.operators,Os={maximum:{okStr:"<=",ok:At.LTE,fail:At.GT},minimum:{okStr:">=",ok:At.GTE,fail:At.LT},exclusiveMaximum:{okStr:"<",ok:At.LT,fail:At.GTE},exclusiveMinimum:{okStr:">",ok:At.GT,fail:At.LTE}},ny={message:({keyword:r,schemaCode:e})=>(0,Ss.str)`must be ${Os[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Ss._)`{comparison: ${Os[r].okStr}, limit: ${e}}`},sy={keyword:Object.keys(Os),type:"number",schemaType:"number",$data:!0,error:ny,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,Ss._)`${t} ${Os[e].fail} ${n} || isNaN(${t})`)}};ma.default=sy});var _f=_(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});var Cn=L(),iy={message:({schemaCode:r})=>(0,Cn.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,Cn._)`{multipleOf: ${r}}`},ay={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:iy,code(r){let{gen:e,data:t,schemaCode:n,it:s}=r,i=s.opts.multipleOfPrecision,a=e.let("res"),c=i?(0,Cn._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,Cn._)`${a} !== parseInt(${a})`;r.fail$data((0,Cn._)`(${n} === 0 || (${a} = ${t}/${n}, ${c}))`)}};ga.default=ay});var $f=_(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});function yf(r){let e=r.length,t=0,n=0,s;for(;n<e;)t++,s=r.charCodeAt(n++),s>=55296&&s<=56319&&n<e&&(s=r.charCodeAt(n),(s&64512)===56320&&n++);return t}va.default=yf;yf.code='require("ajv/dist/runtime/ucs2length").default'});var Ef=_(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var Zt=L(),oy=G(),cy=$f(),uy={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Zt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Zt._)`{limit: ${r}}`},ly={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:uy,code(r){let{keyword:e,data:t,schemaCode:n,it:s}=r,i=e==="maxLength"?Zt.operators.GT:Zt.operators.LT,a=s.opts.unicode===!1?(0,Zt._)`${t}.length`:(0,Zt._)`${(0,oy.useFunc)(r.gen,cy.default)}(${t})`;r.fail$data((0,Zt._)`${a} ${i} ${n}`)}};_a.default=ly});var wf=_(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});var fy=ze(),Ps=L(),dy={message:({schemaCode:r})=>(0,Ps.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,Ps._)`{pattern: ${r}}`},hy={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:dy,code(r){let{data:e,$data:t,schema:n,schemaCode:s,it:i}=r,a=i.opts.unicodeRegExp?"u":"",c=t?(0,Ps._)`(new RegExp(${s}, ${a}))`:(0,fy.usePattern)(r,n);r.fail$data((0,Ps._)`!${c}.test(${e})`)}};ya.default=hy});var bf=_($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});var Nn=L(),py={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,Nn.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,Nn._)`{limit: ${r}}`},my={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:py,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxProperties"?Nn.operators.GT:Nn.operators.LT;r.fail$data((0,Nn._)`Object.keys(${t}).length ${s} ${n}`)}};$a.default=my});var Sf=_(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});var In=ze(),Tn=L(),gy=G(),vy={message:({params:{missingProperty:r}})=>(0,Tn.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,Tn._)`{missingProperty: ${r}}`},_y={keyword:"required",type:"object",schemaType:"array",$data:!0,error:vy,code(r){let{gen:e,schema:t,schemaCode:n,data:s,$data:i,it:a}=r,{opts:c}=a;if(!i&&t.length===0)return;let u=t.length>=c.loopRequired;if(a.allErrors?o():l(),c.strictRequired){let m=r.parentSchema.properties,{definedProperties:$}=r.it;for(let E of t)if((m==null?void 0:m[E])===void 0&&!$.has(E)){let w=a.schemaEnv.baseId+a.errSchemaPath,b=`required property "${E}" is not defined at "${w}" (strictRequired)`;(0,gy.checkStrictMode)(a,b,a.opts.strictRequired)}}function o(){if(u||i)r.block$data(Tn.nil,d);else for(let m of t)(0,In.checkReportMissingProp)(r,m)}function l(){let m=e.let("missing");if(u||i){let $=e.let("valid",!0);r.block$data($,()=>y(m,$)),r.ok($)}else e.if((0,In.checkMissingProp)(r,t,m)),(0,In.reportMissingProp)(r,m),e.else()}function d(){e.forOf("prop",n,m=>{r.setParams({missingProperty:m}),e.if((0,In.noPropertyInData)(e,s,m,c.ownProperties),()=>r.error())})}function y(m,$){r.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign($,(0,In.propertyInData)(e,s,m,c.ownProperties)),e.if((0,Tn.not)($),()=>{r.error(),e.break()})},Tn.nil)}}};Ea.default=_y});var Of=_(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});var An=L(),yy={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,An.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,An._)`{limit: ${r}}`},$y={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:yy,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxItems"?An.operators.GT:An.operators.LT;r.fail$data((0,An._)`${t}.length ${s} ${n}`)}};wa.default=$y});var Rs=_(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});var Pf=Ji();Pf.code='require("ajv/dist/runtime/equal").default';ba.default=Pf});var Rf=_(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});var Sa=$n(),pe=L(),Ey=G(),wy=Rs(),by={message:({params:{i:r,j:e}})=>(0,pe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,pe._)`{i: ${r}, j: ${e}}`},Sy={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:by,code(r){let{gen:e,data:t,$data:n,schema:s,parentSchema:i,schemaCode:a,it:c}=r;if(!n&&!s)return;let u=e.let("valid"),o=i.items?(0,Sa.getSchemaTypes)(i.items):[];r.block$data(u,l,(0,pe._)`${a} === false`),r.ok(u);function l(){let $=e.let("i",(0,pe._)`${t}.length`),E=e.let("j");r.setParams({i:$,j:E}),e.assign(u,!0),e.if((0,pe._)`${$} > 1`,()=>(d()?y:m)($,E))}function d(){return o.length>0&&!o.some($=>$==="object"||$==="array")}function y($,E){let w=e.name("item"),b=(0,Sa.checkDataTypes)(o,w,c.opts.strictNumbers,Sa.DataType.Wrong),D=e.const("indices",(0,pe._)`{}`);e.for((0,pe._)`;${$}--;`,()=>{e.let(w,(0,pe._)`${t}[${$}]`),e.if(b,(0,pe._)`continue`),o.length>1&&e.if((0,pe._)`typeof ${w} == "string"`,(0,pe._)`${w} += "_"`),e.if((0,pe._)`typeof ${D}[${w}] == "number"`,()=>{e.assign(E,(0,pe._)`${D}[${w}]`),r.error(),e.assign(u,!1).break()}).code((0,pe._)`${D}[${w}] = ${$}`)})}function m($,E){let w=(0,Ey.useFunc)(e,wy.default),b=e.name("outer");e.label(b).for((0,pe._)`;${$}--;`,()=>e.for((0,pe._)`${E} = ${$}; ${E}--;`,()=>e.if((0,pe._)`${w}(${t}[${$}], ${t}[${E}])`,()=>{r.error(),e.assign(u,!1).break(b)})))}}};Oa.default=Sy});var Cf=_(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var Pa=L(),Oy=G(),Py=Rs(),Ry={message:"must be equal to constant",params:({schemaCode:r})=>(0,Pa._)`{allowedValue: ${r}}`},Cy={keyword:"const",$data:!0,error:Ry,code(r){let{gen:e,data:t,$data:n,schemaCode:s,schema:i}=r;n||i&&typeof i=="object"?r.fail$data((0,Pa._)`!${(0,Oy.useFunc)(e,Py.default)}(${t}, ${s})`):r.fail((0,Pa._)`${i} !== ${t}`)}};Ra.default=Cy});var Nf=_(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});var qn=L(),Ny=G(),Iy=Rs(),Ty={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,qn._)`{allowedValues: ${r}}`},Ay={keyword:"enum",schemaType:"array",$data:!0,error:Ty,code(r){let{gen:e,data:t,$data:n,schema:s,schemaCode:i,it:a}=r;if(!n&&s.length===0)throw new Error("enum must have non-empty array");let c=s.length>=a.opts.loopEnum,u,o=()=>u!=null?u:u=(0,Ny.useFunc)(e,Iy.default),l;if(c||n)l=e.let("valid"),r.block$data(l,d);else{if(!Array.isArray(s))throw new Error("ajv implementation error");let m=e.const("vSchema",i);l=(0,qn.or)(...s.map(($,E)=>y(m,E)))}r.pass(l);function d(){e.assign(l,!1),e.forOf("v",i,m=>e.if((0,qn._)`${o()}(${t}, ${m})`,()=>e.assign(l,!0).break()))}function y(m,$){let E=s[$];return typeof E=="object"&&E!==null?(0,qn._)`${o()}(${t}, ${m}[${$}])`:(0,qn._)`${t} === ${E}`}}};Ca.default=Ay});var If=_(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var qy=vf(),Dy=_f(),jy=Ef(),ky=wf(),xy=bf(),Ly=Sf(),My=Of(),Fy=Rf(),Vy=Cf(),Hy=Nf(),Uy=[qy.default,Dy.default,jy.default,ky.default,xy.default,Ly.default,My.default,Fy.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Vy.default,Hy.default];Na.default=Uy});var Ta=_(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.validateAdditionalItems=void 0;var Qt=L(),Ia=G(),Gy={message:({params:{len:r}})=>(0,Qt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Qt._)`{limit: ${r}}`},zy={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Gy,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Ia.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Tf(r,n)}};function Tf(r,e){let{gen:t,schema:n,data:s,keyword:i,it:a}=r;a.items=!0;let c=t.const("len",(0,Qt._)`${s}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Qt._)`${c} <= ${e.length}`);else if(typeof n=="object"&&!(0,Ia.alwaysValidSchema)(a,n)){let o=t.var("valid",(0,Qt._)`${c} <= ${e.length}`);t.if((0,Qt.not)(o),()=>u(o)),r.ok(o)}function u(o){t.forRange("i",e.length,c,l=>{r.subschema({keyword:i,dataProp:l,dataPropType:Ia.Type.Num},o),a.allErrors||t.if((0,Qt.not)(o),()=>t.break())})}}Dn.validateAdditionalItems=Tf;Dn.default=zy});var Aa=_(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.validateTuple=void 0;var Af=L(),Cs=G(),Ky=ze(),Xy={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return qf(r,"additionalItems",e);t.items=!0,!(0,Cs.alwaysValidSchema)(t,e)&&r.ok((0,Ky.validateArray)(r))}};function qf(r,e,t=r.schema){let{gen:n,parentSchema:s,data:i,keyword:a,it:c}=r;l(s),c.opts.unevaluated&&t.length&&c.items!==!0&&(c.items=Cs.mergeEvaluated.items(n,t.length,c.items));let u=n.name("valid"),o=n.const("len",(0,Af._)`${i}.length`);t.forEach((d,y)=>{(0,Cs.alwaysValidSchema)(c,d)||(n.if((0,Af._)`${o} > ${y}`,()=>r.subschema({keyword:a,schemaProp:y,dataProp:y},u)),r.ok(u))});function l(d){let{opts:y,errSchemaPath:m}=c,$=t.length,E=$===d.minItems&&($===d.maxItems||d[e]===!1);if(y.strictTuples&&!E){let w=`"${a}" is ${$}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Cs.checkStrictMode)(c,w,y.strictTuples)}}}jn.validateTuple=qf;jn.default=Xy});var Df=_(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var Wy=Aa(),By={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,Wy.validateTuple)(r,"items")};qa.default=By});var kf=_(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var jf=L(),Jy=G(),Yy=ze(),Zy=Ta(),Qy={message:({params:{len:r}})=>(0,jf.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,jf._)`{limit: ${r}}`},e0={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Qy,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:s}=t;n.items=!0,!(0,Jy.alwaysValidSchema)(n,e)&&(s?(0,Zy.validateAdditionalItems)(r,s):r.ok((0,Yy.validateArray)(r)))}};Da.default=e0});var xf=_(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var Xe=L(),Ns=G(),t0={message:({params:{min:r,max:e}})=>e===void 0?(0,Xe.str)`must contain at least ${r} valid item(s)`:(0,Xe.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,Xe._)`{minContains: ${r}}`:(0,Xe._)`{minContains: ${r}, maxContains: ${e}}`},r0={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:t0,code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r,a,c,{minContains:u,maxContains:o}=n;i.opts.next?(a=u===void 0?1:u,c=o):a=1;let l=e.const("len",(0,Xe._)`${s}.length`);if(r.setParams({min:a,max:c}),c===void 0&&a===0){(0,Ns.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&a>c){(0,Ns.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Ns.alwaysValidSchema)(i,t)){let E=(0,Xe._)`${l} >= ${a}`;c!==void 0&&(E=(0,Xe._)`${E} && ${l} <= ${c}`),r.pass(E);return}i.items=!0;let d=e.name("valid");c===void 0&&a===1?m(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),c!==void 0&&e.if((0,Xe._)`${s}.length > 0`,y)):(e.let(d,!1),y()),r.result(d,()=>r.reset());function y(){let E=e.name("_valid"),w=e.let("count",0);m(E,()=>e.if(E,()=>$(w)))}function m(E,w){e.forRange("i",0,l,b=>{r.subschema({keyword:"contains",dataProp:b,dataPropType:Ns.Type.Num,compositeRule:!0},E),w()})}function $(E){e.code((0,Xe._)`${E}++`),c===void 0?e.if((0,Xe._)`${E} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,Xe._)`${E} > ${c}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,Xe._)`${E} >= ${a}`,()=>e.assign(d,!0)))}}};ja.default=r0});var Ff=_(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.validateSchemaDeps=ct.validatePropertyDeps=ct.error=void 0;var ka=L(),n0=G(),kn=ze();ct.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,ka.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,ka._)`{property: ${r},
25
+ || ${a} === "boolean" || ${s} === null`).assign(c,(0,q._)`[${s}]`)}}}function n_({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,q._)`${e} !== undefined`,()=>r.assign((0,q._)`${e}[${t}]`,n))}function Gi(r,e,t,n=$n.Correct){let s=n===$n.Correct?q.operators.EQ:q.operators.NEQ,i;switch(r){case"null":return(0,q._)`${e} ${s} null`;case"array":i=(0,q._)`Array.isArray(${e})`;break;case"object":i=(0,q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=a((0,q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=a();break;default:return(0,q._)`typeof ${e} ${s} ${r}`}return n===$n.Correct?i:(0,q.not)(i);function a(c=q.nil){return(0,q.and)((0,q._)`typeof ${e} == "number"`,c,t?(0,q._)`isFinite(${e})`:q.nil)}}de.checkDataType=Gi;function zi(r,e,t,n){if(r.length===1)return Gi(r[0],e,t,n);let s,i=(0,_l.toHash)(r);if(i.array&&i.object){let a=(0,q._)`typeof ${e} != "object"`;s=i.null?a:(0,q._)`!${e} || ${a}`,delete i.null,delete i.array,delete i.object}else s=q.nil;i.number&&delete i.integer;for(let a in i)s=(0,q.and)(s,Gi(a,e,t,n));return s}de.checkDataTypes=zi;var s_={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,q._)`{type: ${r}}`:(0,q._)`{type: ${e}}`};function Ki(r){let e=i_(r);(0,Zv.reportError)(e,s_)}de.reportTypeError=Ki;function i_(r){let{gen:e,data:t,schema:n}=r,s=(0,_l.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:r}}});var wl=_(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.assignDefaults=void 0;var Or=L(),a_=G();function o_(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let s in t)El(r,s,t[s].default);else e==="array"&&Array.isArray(n)&&n.forEach((s,i)=>El(r,i,s.default))}hs.assignDefaults=o_;function El(r,e,t){let{gen:n,compositeRule:s,data:i,opts:a}=r;if(t===void 0)return;let c=(0,Or._)`${i}${(0,Or.getProperty)(e)}`;if(s){(0,a_.checkStrictMode)(r,`default is ignored for: ${c}`);return}let u=(0,Or._)`${c} === undefined`;a.useDefaults==="empty"&&(u=(0,Or._)`${u} || ${c} === null || ${c} === ""`),n.if(u,(0,Or._)`${c} = ${(0,Or.stringify)(t)}`)}});var ze=_(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.validateUnion=J.validateArray=J.usePattern=J.callValidateCode=J.schemaProperties=J.allSchemaProperties=J.noPropertyInData=J.propertyInData=J.isOwnProperty=J.hasPropFunc=J.reportMissingProp=J.checkMissingProp=J.checkReportMissingProp=void 0;var te=L(),Xi=G(),Ct=$t(),c_=G();function u_(r,e){let{gen:t,data:n,it:s}=r;t.if(Bi(t,n,e,s.opts.ownProperties),()=>{r.setParams({missingProperty:(0,te._)`${e}`},!0),r.error()})}J.checkReportMissingProp=u_;function l_({gen:r,data:e,it:{opts:t}},n,s){return(0,te.or)(...n.map(i=>(0,te.and)(Bi(r,e,i,t.ownProperties),(0,te._)`${s} = ${i}`)))}J.checkMissingProp=l_;function f_(r,e){r.setParams({missingProperty:e},!0),r.error()}J.reportMissingProp=f_;function bl(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,te._)`Object.prototype.hasOwnProperty`})}J.hasPropFunc=bl;function Wi(r,e,t){return(0,te._)`${bl(r)}.call(${e}, ${t})`}J.isOwnProperty=Wi;function d_(r,e,t,n){let s=(0,te._)`${e}${(0,te.getProperty)(t)} !== undefined`;return n?(0,te._)`${s} && ${Wi(r,e,t)}`:s}J.propertyInData=d_;function Bi(r,e,t,n){let s=(0,te._)`${e}${(0,te.getProperty)(t)} === undefined`;return n?(0,te.or)(s,(0,te.not)(Wi(r,e,t))):s}J.noPropertyInData=Bi;function Sl(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}J.allSchemaProperties=Sl;function h_(r,e){return Sl(e).filter(t=>!(0,Xi.alwaysValidSchema)(r,e[t]))}J.schemaProperties=h_;function p_({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:s,errorPath:i},it:a},c,u,o){let l=o?(0,te._)`${r}, ${e}, ${n}${s}`:e,d=[[Ct.default.instancePath,(0,te.strConcat)(Ct.default.instancePath,i)],[Ct.default.parentData,a.parentData],[Ct.default.parentDataProperty,a.parentDataProperty],[Ct.default.rootData,Ct.default.rootData]];a.opts.dynamicRef&&d.push([Ct.default.dynamicAnchors,Ct.default.dynamicAnchors]);let y=(0,te._)`${l}, ${t.object(...d)}`;return u!==te.nil?(0,te._)`${c}.call(${u}, ${y})`:(0,te._)`${c}(${y})`}J.callValidateCode=p_;var m_=(0,te._)`new RegExp`;function g_({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:s}=e.code,i=s(t,n);return r.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,te._)`${s.code==="new RegExp"?m_:(0,c_.useFunc)(r,s)}(${t}, ${n})`})}J.usePattern=g_;function v_(r){let{gen:e,data:t,keyword:n,it:s}=r,i=e.name("valid");if(s.allErrors){let c=e.let("valid",!0);return a(()=>e.assign(c,!1)),c}return e.var(i,!0),a(()=>e.break()),i;function a(c){let u=e.const("len",(0,te._)`${t}.length`);e.forRange("i",0,u,o=>{r.subschema({keyword:n,dataProp:o,dataPropType:Xi.Type.Num},i),e.if((0,te.not)(i),c)})}}J.validateArray=v_;function __(r){let{gen:e,schema:t,keyword:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(u=>(0,Xi.alwaysValidSchema)(s,u))&&!s.opts.unevaluated)return;let a=e.let("valid",!1),c=e.name("_valid");e.block(()=>t.forEach((u,o)=>{let l=r.subschema({keyword:n,schemaProp:o,compositeRule:!0},c);e.assign(a,(0,te._)`${a} || ${c}`),r.mergeValidEvaluated(l,c)||e.if((0,te.not)(a))})),r.result(a,()=>r.reset(),()=>r.error(!0))}J.validateUnion=__});var Rl=_(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.validateKeywordUsage=at.validSchemaType=at.funcKeywordCode=at.macroKeywordCode=void 0;var Oe=L(),Bt=$t(),y_=ze(),$_=yn();function E_(r,e){let{gen:t,keyword:n,schema:s,parentSchema:i,it:a}=r,c=e.macro.call(a.self,s,i,a),u=Pl(t,n,c);a.opts.validateSchema!==!1&&a.self.validateSchema(c,!0);let o=t.name("valid");r.subschema({schema:c,schemaPath:Oe.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},o),r.pass(o,()=>r.error(!0))}at.macroKeywordCode=E_;function w_(r,e){var t;let{gen:n,keyword:s,schema:i,parentSchema:a,$data:c,it:u}=r;S_(u,e);let o=!c&&e.compile?e.compile.call(u.self,i,a,u):e.validate,l=Pl(n,s,o),d=n.let("valid");r.block$data(d,y),r.ok((t=e.valid)!==null&&t!==void 0?t:d);function y(){if(e.errors===!1)E(),e.modifying&&Ol(r),w(()=>r.error());else{let b=e.async?m():$();e.modifying&&Ol(r),w(()=>b_(r,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>E((0,Oe._)`await `),D=>n.assign(d,!1).if((0,Oe._)`${D} instanceof ${u.ValidationError}`,()=>n.assign(b,(0,Oe._)`${D}.errors`),()=>n.throw(D))),b}function $(){let b=(0,Oe._)`${l}.errors`;return n.assign(b,null),E(Oe.nil),b}function E(b=e.async?(0,Oe._)`await `:Oe.nil){let D=u.opts.passContext?Bt.default.this:Bt.default.self,T=!("compile"in e&&!c||e.schema===!1);n.assign(d,(0,Oe._)`${b}${(0,y_.callValidateCode)(r,l,D,T)}`,e.modifying)}function w(b){var D;n.if((0,Oe.not)((D=e.valid)!==null&&D!==void 0?D:d),b)}}at.funcKeywordCode=w_;function Ol(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,Oe._)`${n.parentData}[${n.parentDataProperty}]`))}function b_(r,e){let{gen:t}=r;t.if((0,Oe._)`Array.isArray(${e})`,()=>{t.assign(Bt.default.vErrors,(0,Oe._)`${Bt.default.vErrors} === null ? ${e} : ${Bt.default.vErrors}.concat(${e})`).assign(Bt.default.errors,(0,Oe._)`${Bt.default.vErrors}.length`),(0,$_.extendErrors)(r)},()=>r.error())}function S_({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Pl(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,Oe.stringify)(t)})}function O_(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r>"u")}at.validSchemaType=O_;function P_({schema:r,opts:e,self:t,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");let a=s.dependencies;if(a!=null&&a.some(c=>!Object.prototype.hasOwnProperty.call(r,c)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(s.validateSchema&&!s.validateSchema(r[i])){let u=`keyword "${i}" value is invalid at path "${n}": `+t.errorsText(s.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(u);else throw new Error(u)}}at.validateKeywordUsage=P_});var Nl=_(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.extendSubschemaMode=Nt.extendSubschemaData=Nt.getSubschema=void 0;var ot=L(),Cl=G();function R_(r,{keyword:e,schemaProp:t,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let c=r.schema[e];return t===void 0?{schema:c,schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:c[t],schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}${(0,ot.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,Cl.escapeFragment)(t)}`}}if(n!==void 0){if(s===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Nt.getSubschema=R_;function C_(r,e,{dataProp:t,dataPropType:n,data:s,dataTypes:i,propertyName:a}){if(s!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=e;if(t!==void 0){let{errorPath:o,dataPathArr:l,opts:d}=e,y=c.let("data",(0,ot._)`${e.data}${(0,ot.getProperty)(t)}`,!0);u(y),r.errorPath=(0,ot.str)`${o}${(0,Cl.getErrorPath)(t,n,d.jsPropertySyntax)}`,r.parentDataProperty=(0,ot._)`${t}`,r.dataPathArr=[...l,r.parentDataProperty]}if(s!==void 0){let o=s instanceof ot.Name?s:c.let("data",s,!0);u(o),a!==void 0&&(r.propertyName=a)}i&&(r.dataTypes=i);function u(o){r.data=o,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,o]}}Nt.extendSubschemaData=C_;function N_(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(r.compositeRule=n),s!==void 0&&(r.createErrors=s),i!==void 0&&(r.allErrors=i),r.jtdDiscriminator=e,r.jtdMetadata=t}Nt.extendSubschemaMode=N_});var Ji=_((Ib,Il)=>{"use strict";Il.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!r(e[s],t[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}});var Al=_((Tb,Tl)=>{"use strict";var It=Tl.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},s=t.post||function(){};ps(e,n,s,r,"",r)};It.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};It.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};It.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};It.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ps(r,e,t,n,s,i,a,c,u,o){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,s,i,a,c,u,o);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in It.arrayKeywords)for(var y=0;y<d.length;y++)ps(r,e,t,d[y],s+"/"+l+"/"+y,i,s,l,n,y)}else if(l in It.propsKeywords){if(d&&typeof d=="object")for(var m in d)ps(r,e,t,d[m],s+"/"+l+"/"+I_(m),i,s,l,n,m)}else(l in It.keywords||r.allKeys&&!(l in It.skipKeywords))&&ps(r,e,t,d,s+"/"+l,i,s,l,n)}t(n,s,i,a,c,u,o)}}function I_(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var wn=_(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getSchemaRefs=Ne.resolveUrl=Ne.normalizeId=Ne._getFullPath=Ne.getFullPath=Ne.inlineRef=void 0;var T_=G(),A_=Ji(),q_=Al(),D_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function j_(r,e=!0){return typeof r=="boolean"?!0:e===!0?!Yi(r):e?ql(r)<=e:!1}Ne.inlineRef=j_;var k_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Yi(r){for(let e in r){if(k_.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(Yi)||typeof t=="object"&&Yi(t))return!0}return!1}function ql(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!D_.has(t)&&(typeof r[t]=="object"&&(0,T_.eachItem)(r[t],n=>e+=ql(n)),e===1/0))return 1/0}return e}function Dl(r,e="",t){t!==!1&&(e=Pr(e));let n=r.parse(e);return jl(r,n)}Ne.getFullPath=Dl;function jl(r,e){return r.serialize(e).split("#")[0]+"#"}Ne._getFullPath=jl;var x_=/#\/?$/;function Pr(r){return r?r.replace(x_,""):""}Ne.normalizeId=Pr;function L_(r,e,t){return t=Pr(t),r.resolve(e,t)}Ne.resolveUrl=L_;var M_=/^[a-z_][-a-z0-9._]*$/i;function F_(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,s=Pr(r[t]||e),i={"":s},a=Dl(n,s,!1),c={},u=new Set;return q_(r,{allKeys:!0},(d,y,m,$)=>{if($===void 0)return;let E=a+y,w=i[$];typeof d[t]=="string"&&(w=b.call(this,d[t])),D.call(this,d.$anchor),D.call(this,d.$dynamicAnchor),i[y]=w;function b(T){let z=this.opts.uriResolver.resolve;if(T=Pr(w?z(w,T):T),u.has(T))throw l(T);u.add(T);let C=this.refs[T];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?o(d,C.schema,T):T!==Pr(E)&&(T[0]==="#"?(o(d,c[T],T),c[T]=d):this.refs[T]=E),T}function D(T){if(typeof T=="string"){if(!M_.test(T))throw new Error(`invalid anchor "${T}"`);b.call(this,`#${T}`)}}}),c;function o(d,y,m){if(y!==void 0&&!A_(d,y))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ne.getSchemaRefs=F_});var On=_(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.getData=Tt.KeywordCxt=Tt.validateFunctionCode=void 0;var Vl=ml(),kl=En(),Qi=Ui(),ms=En(),V_=wl(),Sn=Rl(),Zi=Nl(),R=L(),I=$t(),H_=wn(),Et=G(),bn=yn();function U_(r){if(Gl(r)&&(zl(r),Ul(r))){K_(r);return}Hl(r,()=>(0,Vl.topBoolOrEmptySchema)(r))}Tt.validateFunctionCode=U_;function Hl({gen:r,validateName:e,schema:t,schemaEnv:n,opts:s},i){s.code.es5?r.func(e,(0,R._)`${I.default.data}, ${I.default.valCxt}`,n.$async,()=>{r.code((0,R._)`"use strict"; ${xl(t,s)}`),z_(r,s),r.code(i)}):r.func(e,(0,R._)`${I.default.data}, ${G_(s)}`,n.$async,()=>r.code(xl(t,s)).code(i))}function G_(r){return(0,R._)`{${I.default.instancePath}="", ${I.default.parentData}, ${I.default.parentDataProperty}, ${I.default.rootData}=${I.default.data}${r.dynamicRef?(0,R._)`, ${I.default.dynamicAnchors}={}`:R.nil}}={}`}function z_(r,e){r.if(I.default.valCxt,()=>{r.var(I.default.instancePath,(0,R._)`${I.default.valCxt}.${I.default.instancePath}`),r.var(I.default.parentData,(0,R._)`${I.default.valCxt}.${I.default.parentData}`),r.var(I.default.parentDataProperty,(0,R._)`${I.default.valCxt}.${I.default.parentDataProperty}`),r.var(I.default.rootData,(0,R._)`${I.default.valCxt}.${I.default.rootData}`),e.dynamicRef&&r.var(I.default.dynamicAnchors,(0,R._)`${I.default.valCxt}.${I.default.dynamicAnchors}`)},()=>{r.var(I.default.instancePath,(0,R._)`""`),r.var(I.default.parentData,(0,R._)`undefined`),r.var(I.default.parentDataProperty,(0,R._)`undefined`),r.var(I.default.rootData,I.default.data),e.dynamicRef&&r.var(I.default.dynamicAnchors,(0,R._)`{}`)})}function K_(r){let{schema:e,opts:t,gen:n}=r;Hl(r,()=>{t.$comment&&e.$comment&&Xl(r),Y_(r),n.let(I.default.vErrors,null),n.let(I.default.errors,0),t.unevaluated&&X_(r),Kl(r),ey(r)})}function X_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,R._)`${t}.evaluated`),e.if((0,R._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,R._)`${r.evaluated}.props`,(0,R._)`undefined`)),e.if((0,R._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,R._)`${r.evaluated}.items`,(0,R._)`undefined`))}function xl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,R._)`/*# sourceURL=${t} */`:R.nil}function W_(r,e){if(Gl(r)&&(zl(r),Ul(r))){B_(r,e);return}(0,Vl.boolOrEmptySchema)(r,e)}function Ul({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function Gl(r){return typeof r.schema!="boolean"}function B_(r,e){let{schema:t,gen:n,opts:s}=r;s.$comment&&t.$comment&&Xl(r),Z_(r),Q_(r);let i=n.const("_errs",I.default.errors);Kl(r,i),n.var(e,(0,R._)`${i} === ${I.default.errors}`)}function zl(r){(0,Et.checkUnknownRules)(r),J_(r)}function Kl(r,e){if(r.opts.jtd)return Ll(r,[],!1,e);let t=(0,kl.getSchemaTypes)(r.schema),n=(0,kl.coerceAndCheckDataType)(r,t);Ll(r,t,!n,e)}function J_(r){let{schema:e,errSchemaPath:t,opts:n,self:s}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Et.schemaHasRulesButRef)(e,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function Y_(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Et.checkStrictMode)(r,"default is ignored in the schema root")}function Z_(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,H_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function Q_(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function Xl({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:s}){let i=t.$comment;if(s.$comment===!0)r.code((0,R._)`${I.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){let a=(0,R.str)`${n}/$comment`,c=r.scopeValue("root",{ref:e.root});r.code((0,R._)`${I.default.self}.opts.$comment(${i}, ${a}, ${c}.schema)`)}}function ey(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:s,opts:i}=r;t.$async?e.if((0,R._)`${I.default.errors} === 0`,()=>e.return(I.default.data),()=>e.throw((0,R._)`new ${s}(${I.default.vErrors})`)):(e.assign((0,R._)`${n}.errors`,I.default.vErrors),i.unevaluated&&ty(r),e.return((0,R._)`${I.default.errors} === 0`))}function ty({gen:r,evaluated:e,props:t,items:n}){t instanceof R.Name&&r.assign((0,R._)`${e}.props`,t),n instanceof R.Name&&r.assign((0,R._)`${e}.items`,n)}function Ll(r,e,t,n){let{gen:s,schema:i,data:a,allErrors:c,opts:u,self:o}=r,{RULES:l}=o;if(i.$ref&&(u.ignoreKeywordsWithRef||!(0,Et.schemaHasRulesButRef)(i,l))){s.block(()=>Wl(r,"$ref",l.all.$ref.definition));return}u.jtd||ry(r,e),s.block(()=>{for(let y of l.rules)d(y);d(l.post)});function d(y){!(0,Qi.shouldUseGroup)(i,y)||(y.type?(s.if((0,ms.checkDataType)(y.type,a,u.strictNumbers)),Ml(r,y),e.length===1&&e[0]===y.type&&t&&(s.else(),(0,ms.reportTypeError)(r)),s.endIf()):Ml(r,y),c||s.if((0,R._)`${I.default.errors} === ${n||0}`))}}function Ml(r,e){let{gen:t,schema:n,opts:{useDefaults:s}}=r;s&&(0,V_.assignDefaults)(r,e.type),t.block(()=>{for(let i of e.rules)(0,Qi.shouldUseRule)(n,i)&&Wl(r,i.keyword,i.definition,e.type)})}function ry(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(ny(r,e),r.opts.allowUnionTypes||sy(r,e),iy(r,r.dataTypes))}function ny(r,e){if(!!e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{Fl(r.dataTypes,t)||ea(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),r.dataTypes=r.dataTypes.filter(t=>Fl(e,t))}}function sy(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&ea(r,"use allowUnionTypes to allow union type keyword")}function iy(r,e){let t=r.self.RULES.all;for(let n in t){let s=t[n];if(typeof s=="object"&&(0,Qi.shouldUseRule)(r.schema,s)){let{type:i}=s.definition;i.length&&!i.some(a=>ay(e,a))&&ea(r,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function ay(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function Fl(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function ea(r,e){e+=` at "${r.schemaEnv.baseId+r.errSchemaPath}" (strictTypes)`,(0,Et.checkStrictMode)(r,e,r.opts.strictTypes)}var gs=class{constructor(e,t,n){if((0,Sn.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Et.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Bl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Sn.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",I.default.errors))}result(e,t,n){this.failResult((0,R.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,R.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,R._)`${t} !== undefined && (${(0,R.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?bn.reportExtraError:bn.reportError)(this,this.def.error,t)}$dataError(){(0,bn.reportError)(this,this.def.$dataError||bn.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,bn.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=R.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=R.nil,t=R.nil){if(!this.$data)return;let{gen:n,schemaCode:s,schemaType:i,def:a}=this;n.if((0,R.or)((0,R._)`${s} === undefined`,t)),e!==R.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==R.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:s,it:i}=this;return(0,R.or)(a(),c());function a(){if(n.length){if(!(t instanceof R.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,R._)`${(0,ms.checkDataTypes)(u,t,i.opts.strictNumbers,ms.DataType.Wrong)}`}return R.nil}function c(){if(s.validateSchema){let u=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,R._)`!${u}(${t})`}return R.nil}}subschema(e,t){let n=(0,Zi.getSubschema)(this.it,e);(0,Zi.extendSubschemaData)(n,this.it,e),(0,Zi.extendSubschemaMode)(n,e);let s={...this.it,...n,items:void 0,props:void 0};return W_(s,t),s}mergeEvaluated(e,t){let{it:n,gen:s}=this;!n.opts.unevaluated||(n.props!==!0&&e.props!==void 0&&(n.props=Et.mergeEvaluated.props(s,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Et.mergeEvaluated.items(s,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(t,()=>this.mergeEvaluated(e,R.Name)),!0}};Tt.KeywordCxt=gs;function Wl(r,e,t,n){let s=new gs(r,t,e);"code"in t?t.code(s,n):s.$data&&t.validate?(0,Sn.funcKeywordCode)(s,t):"macro"in t?(0,Sn.macroKeywordCode)(s,t):(t.compile||t.validate)&&(0,Sn.funcKeywordCode)(s,t)}var oy=/^\/(?:[^~]|~0|~1)*$/,cy=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Bl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let s,i;if(r==="")return I.default.rootData;if(r[0]==="/"){if(!oy.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);s=r,i=I.default.rootData}else{let o=cy.exec(r);if(!o)throw new Error(`Invalid JSON-pointer: ${r}`);let l=+o[1];if(s=o[2],s==="#"){if(l>=e)throw new Error(u("property/index",l));return n[e-l]}if(l>e)throw new Error(u("data",l));if(i=t[e-l],!s)return i}let a=i,c=s.split("/");for(let o of c)o&&(i=(0,R._)`${i}${(0,R.getProperty)((0,Et.unescapeJsonPointer)(o))}`,a=(0,R._)`${a} && ${i}`);return a;function u(o,l){return`Cannot access ${o} ${l} levels up, current level is ${e}`}}Tt.getData=Bl});var na=_(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var ta=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};ra.default=ta});var oa=_(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});var sa=wn(),ia=class extends Error{constructor(e,t,n,s){super(s||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,sa.resolveUrl)(e,t,n),this.missingSchema=(0,sa.normalizeId)((0,sa.getFullPath)(e,this.missingRef))}};aa.default=ia});var _s=_(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.resolveSchema=Ke.getCompilingSchema=Ke.resolveRef=Ke.compileSchema=Ke.SchemaEnv=void 0;var Ye=L(),uy=na(),Jt=$t(),Ze=wn(),Jl=G(),ly=On(),Rr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Ze.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Ke.SchemaEnv=Rr;function ua(r){let e=Yl.call(this,r);if(e)return e;let t=(0,Ze.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,a=new Ye.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i}),c;r.$async&&(c=a.scopeValue("Error",{ref:uy.default,code:(0,Ye._)`require("ajv/dist/runtime/validation_error").default`}));let u=a.scopeName("validate");r.validateName=u;let o={gen:a,allErrors:this.opts.allErrors,data:Jt.default.data,parentData:Jt.default.parentData,parentDataProperty:Jt.default.parentDataProperty,dataNames:[Jt.default.data],dataPathArr:[Ye.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Ye.stringify)(r.schema)}:{ref:r.schema}),validateName:u,ValidationError:c,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Ye.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ye._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(r),(0,ly.validateFunctionCode)(o),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(Jt.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,r));let m=new Function(`${Jt.default.self}`,`${Jt.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:m}),m.errors=null,m.schema=r.schema,m.schemaEnv=r,r.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:u,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:$,items:E}=o;m.evaluated={props:$ instanceof Ye.Name?void 0:$,items:E instanceof Ye.Name?void 0:E,dynamicProps:$ instanceof Ye.Name,dynamicItems:E instanceof Ye.Name},m.source&&(m.source.evaluated=(0,Ye.stringify)(m.evaluated))}return r.validate=m,r}catch(d){throw delete r.validate,delete r.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(r)}}Ke.compileSchema=ua;function fy(r,e,t){var n;t=(0,Ze.resolveUrl)(this.opts.uriResolver,e,t);let s=r.refs[t];if(s)return s;let i=py.call(this,r,t);if(i===void 0){let a=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:c}=this.opts;a&&(i=new Rr({schema:a,schemaId:c,root:r,baseId:e}))}if(i!==void 0)return r.refs[t]=dy.call(this,i)}Ke.resolveRef=fy;function dy(r){return(0,Ze.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:ua.call(this,r)}function Yl(r){for(let e of this._compilations)if(hy(e,r))return e}Ke.getCompilingSchema=Yl;function hy(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function py(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||vs.call(this,r,e)}function vs(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Ze._getFullPath)(this.opts.uriResolver,t),s=(0,Ze.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===s)return ca.call(this,t,r);let i=(0,Ze.normalizeId)(n),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let c=vs.call(this,r,a);return typeof(c==null?void 0:c.schema)!="object"?void 0:ca.call(this,t,c)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||ua.call(this,a),i===(0,Ze.normalizeId)(e)){let{schema:c}=a,{schemaId:u}=this.opts,o=c[u];return o&&(s=(0,Ze.resolveUrl)(this.opts.uriResolver,s,o)),new Rr({schema:c,schemaId:u,root:r,baseId:s})}return ca.call(this,t,a)}}Ke.resolveSchema=vs;var my=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function ca(r,{baseId:e,schema:t,root:n}){var s;if(((s=r.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(let c of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let u=t[(0,Jl.unescapeFragment)(c)];if(u===void 0)return;t=u;let o=typeof t=="object"&&t[this.opts.schemaId];!my.has(c)&&o&&(e=(0,Ze.resolveUrl)(this.opts.uriResolver,e,o))}let i;if(typeof t!="boolean"&&t.$ref&&!(0,Jl.schemaHasRulesButRef)(t,this.RULES)){let c=(0,Ze.resolveUrl)(this.opts.uriResolver,e,t.$ref);i=vs.call(this,n,c)}let{schemaId:a}=this.opts;if(i=i||new Rr({schema:t,schemaId:a,root:n,baseId:e}),i.schema!==i.root.schema)return i}});var Zl=_((xb,gy)=>{gy.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ef=_((ys,Ql)=>{(function(r,e){typeof ys=="object"&&typeof Ql<"u"?e(ys):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})(ys,function(r){"use strict";function e(){for(var h=arguments.length,f=Array(h),p=0;p<h;p++)f[p]=arguments[p];if(f.length>1){f[0]=f[0].slice(0,-1);for(var g=f.length-1,v=1;v<g;++v)f[v]=f[v].slice(1,-1);return f[g]=f[g].slice(1),f.join("")}else return f[0]}function t(h){return"(?:"+h+")"}function n(h){return h===void 0?"undefined":h===null?"null":Object.prototype.toString.call(h).split(" ").pop().split("]").shift().toLowerCase()}function s(h){return h.toUpperCase()}function i(h){return h!=null?h instanceof Array?h:typeof h.length!="number"||h.split||h.setInterval||h.call?[h]:Array.prototype.slice.call(h):[]}function a(h,f){var p=h;if(f)for(var g in f)p[g]=f[g];return p}function c(h){var f="[A-Za-z]",p="[\\x0D]",g="[0-9]",v="[\\x22]",S=e(g,"[A-Fa-f]"),A="[\\x0A]",H="[\\x20]",W=t(t("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+t("%[89A-Fa-f]"+S+"%"+S+S)+"|"+t("%"+S+S)),ce="[\\:\\/\\?\\#\\[\\]\\@]",F="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",se=e(ce,F),ue=h?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ne=h?"[\\uE000-\\uF8FF]":"[]",K=e(f,g,"[\\-\\.\\_\\~]",ue),ie=t(f+e(f,g,"[\\+\\-\\.]")+"*"),B=t(t(W+"|"+e(K,F,"[\\:]"))+"*"),Dt=t(t("25[0-5]")+"|"+t("2[0-4]"+g)+"|"+t("1"+g+g)+"|"+t("[1-9]"+g)+"|"+g),Ae=t(t("25[0-5]")+"|"+t("2[0-4]"+g)+"|"+t("1"+g+g)+"|"+t("0?[1-9]"+g)+"|0?0?"+g),Fe=t(Ae+"\\."+Ae+"\\."+Ae+"\\."+Ae),Y=t(S+"{1,4}"),qe=t(t(Y+"\\:"+Y)+"|"+Fe),Ve=t(t(Y+"\\:")+"{6}"+qe),st=t("\\:\\:"+t(Y+"\\:")+"{5}"+qe),jt=t(t(Y)+"?\\:\\:"+t(Y+"\\:")+"{4}"+qe),dt=t(t(t(Y+"\\:")+"{0,1}"+Y)+"?\\:\\:"+t(Y+"\\:")+"{3}"+qe),Gr=t(t(t(Y+"\\:")+"{0,2}"+Y)+"?\\:\\:"+t(Y+"\\:")+"{2}"+qe),Hn=t(t(t(Y+"\\:")+"{0,3}"+Y)+"?\\:\\:"+Y+"\\:"+qe),Un=t(t(t(Y+"\\:")+"{0,4}"+Y)+"?\\:\\:"+qe),ir=t(t(t(Y+"\\:")+"{0,5}"+Y)+"?\\:\\:"+Y),ar=t(t(t(Y+"\\:")+"{0,6}"+Y)+"?\\:\\:"),ht=t([Ve,st,jt,dt,Gr,Hn,Un,ir,ar].join("|")),or=t(t(K+"|"+W)+"+"),Hs=t(ht+"\\%25"+or),kt=t(ht+t("\\%25|\\%(?!"+S+"{2})")+or),oh=t("[vV]"+S+"+\\."+e(K,F,"[\\:]")+"+"),ch=t("\\["+t(kt+"|"+ht+"|"+oh)+"\\]"),Oo=t(t(W+"|"+e(K,F))+"*"),zr=t(ch+"|"+Fe+"(?!"+Oo+")|"+Oo),Kr=t(g+"*"),Po=t(t(B+"@")+"?"+zr+t("\\:"+Kr)+"?"),Xr=t(W+"|"+e(K,F,"[\\:\\@]")),uh=t(Xr+"*"),Ro=t(Xr+"+"),lh=t(t(W+"|"+e(K,F,"[\\@]"))+"+"),pt=t(t("\\/"+uh)+"*"),cr=t("\\/"+t(Ro+pt)+"?"),Us=t(lh+pt),Gn=t(Ro+pt),ur="(?!"+Xr+")",aw=t(pt+"|"+cr+"|"+Us+"|"+Gn+"|"+ur),lr=t(t(Xr+"|"+e("[\\/\\?]",ne))+"*"),Wr=t(t(Xr+"|[\\/\\?]")+"*"),Co=t(t("\\/\\/"+Po+pt)+"|"+cr+"|"+Gn+"|"+ur),fh=t(ie+"\\:"+Co+t("\\?"+lr)+"?"+t("\\#"+Wr)+"?"),dh=t(t("\\/\\/"+Po+pt)+"|"+cr+"|"+Us+"|"+ur),hh=t(dh+t("\\?"+lr)+"?"+t("\\#"+Wr)+"?"),ow=t(fh+"|"+hh),cw=t(ie+"\\:"+Co+t("\\?"+lr)+"?"),uw="^("+ie+")\\:"+t(t("\\/\\/("+t("("+B+")@")+"?("+zr+")"+t("\\:("+Kr+")")+"?)")+"?("+pt+"|"+cr+"|"+Gn+"|"+ur+")")+t("\\?("+lr+")")+"?"+t("\\#("+Wr+")")+"?$",lw="^(){0}"+t(t("\\/\\/("+t("("+B+")@")+"?("+zr+")"+t("\\:("+Kr+")")+"?)")+"?("+pt+"|"+cr+"|"+Us+"|"+ur+")")+t("\\?("+lr+")")+"?"+t("\\#("+Wr+")")+"?$",fw="^("+ie+")\\:"+t(t("\\/\\/("+t("("+B+")@")+"?("+zr+")"+t("\\:("+Kr+")")+"?)")+"?("+pt+"|"+cr+"|"+Gn+"|"+ur+")")+t("\\?("+lr+")")+"?$",dw="^"+t("\\#("+Wr+")")+"?$",hw="^"+t("("+B+")@")+"?("+zr+")"+t("\\:("+Kr+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",f,g,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",K,F),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",K,F),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",K,F),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",K,F),"g"),NOT_QUERY:new RegExp(e("[^\\%]",K,F,"[\\:\\@\\/\\?]",ne),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",K,F,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",K,F),"g"),UNRESERVED:new RegExp(K,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",K,se),"g"),PCT_ENCODED:new RegExp(W,"g"),IPV4ADDRESS:new RegExp("^("+Fe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ht+")"+t(t("\\%25|\\%(?!"+S+"{2})")+"("+or+")")+"?\\]?$")}}var u=c(!1),o=c(!0),l=function(){function h(f,p){var g=[],v=!0,S=!1,A=void 0;try{for(var H=f[Symbol.iterator](),W;!(v=(W=H.next()).done)&&(g.push(W.value),!(p&&g.length===p));v=!0);}catch(ce){S=!0,A=ce}finally{try{!v&&H.return&&H.return()}finally{if(S)throw A}}return g}return function(f,p){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f))return h(f,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(h){if(Array.isArray(h)){for(var f=0,p=Array(h.length);f<h.length;f++)p[f]=h[f];return p}else return Array.from(h)},y=2147483647,m=36,$=1,E=26,w=38,b=700,D=72,T=128,z="-",C=/^xn--/,me=/[^\0-\x7E]/,ke=/[\x2E\u3002\uFF0E\uFF61]/g,bt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xe=m-$,re=Math.floor,Le=String.fromCharCode;function et(h){throw new RangeError(bt[h])}function Fn(h,f){for(var p=[],g=h.length;g--;)p[g]=f(h[g]);return p}function Vn(h,f){var p=h.split("@"),g="";p.length>1&&(g=p[0]+"@",h=p[1]),h=h.replace(ke,".");var v=h.split("."),S=Fn(v,f).join(".");return g+S}function ao(h){for(var f=[],p=0,g=h.length;p<g;){var v=h.charCodeAt(p++);if(v>=55296&&v<=56319&&p<g){var S=h.charCodeAt(p++);(S&64512)==56320?f.push(((v&1023)<<10)+(S&1023)+65536):(f.push(v),p--)}else f.push(v)}return f}var xd=function(f){return String.fromCodePoint.apply(String,d(f))},Ld=function(f){return f-48<10?f-22:f-65<26?f-65:f-97<26?f-97:m},oo=function(f,p){return f+22+75*(f<26)-((p!=0)<<5)},co=function(f,p,g){var v=0;for(f=g?re(f/b):f>>1,f+=re(f/p);f>xe*E>>1;v+=m)f=re(f/xe);return re(v+(xe+1)*f/(f+w))},uo=function(f){var p=[],g=f.length,v=0,S=T,A=D,H=f.lastIndexOf(z);H<0&&(H=0);for(var W=0;W<H;++W)f.charCodeAt(W)>=128&&et("not-basic"),p.push(f.charCodeAt(W));for(var ce=H>0?H+1:0;ce<g;){for(var F=v,se=1,ue=m;;ue+=m){ce>=g&&et("invalid-input");var ne=Ld(f.charCodeAt(ce++));(ne>=m||ne>re((y-v)/se))&&et("overflow"),v+=ne*se;var K=ue<=A?$:ue>=A+E?E:ue-A;if(ne<K)break;var ie=m-K;se>re(y/ie)&&et("overflow"),se*=ie}var B=p.length+1;A=co(v-F,B,F==0),re(v/B)>y-S&&et("overflow"),S+=re(v/B),v%=B,p.splice(v++,0,S)}return String.fromCodePoint.apply(String,p)},lo=function(f){var p=[];f=ao(f);var g=f.length,v=T,S=0,A=D,H=!0,W=!1,ce=void 0;try{for(var F=f[Symbol.iterator](),se;!(H=(se=F.next()).done);H=!0){var ue=se.value;ue<128&&p.push(Le(ue))}}catch(kt){W=!0,ce=kt}finally{try{!H&&F.return&&F.return()}finally{if(W)throw ce}}var ne=p.length,K=ne;for(ne&&p.push(z);K<g;){var ie=y,B=!0,Dt=!1,Ae=void 0;try{for(var Fe=f[Symbol.iterator](),Y;!(B=(Y=Fe.next()).done);B=!0){var qe=Y.value;qe>=v&&qe<ie&&(ie=qe)}}catch(kt){Dt=!0,Ae=kt}finally{try{!B&&Fe.return&&Fe.return()}finally{if(Dt)throw Ae}}var Ve=K+1;ie-v>re((y-S)/Ve)&&et("overflow"),S+=(ie-v)*Ve,v=ie;var st=!0,jt=!1,dt=void 0;try{for(var Gr=f[Symbol.iterator](),Hn;!(st=(Hn=Gr.next()).done);st=!0){var Un=Hn.value;if(Un<v&&++S>y&&et("overflow"),Un==v){for(var ir=S,ar=m;;ar+=m){var ht=ar<=A?$:ar>=A+E?E:ar-A;if(ir<ht)break;var or=ir-ht,Hs=m-ht;p.push(Le(oo(ht+or%Hs,0))),ir=re(or/Hs)}p.push(Le(oo(ir,0))),A=co(S,Ve,K==ne),S=0,++K}}}catch(kt){jt=!0,dt=kt}finally{try{!st&&Gr.return&&Gr.return()}finally{if(jt)throw dt}}++S,++v}return p.join("")},Md=function(f){return Vn(f,function(p){return C.test(p)?uo(p.slice(4).toLowerCase()):p})},Fd=function(f){return Vn(f,function(p){return me.test(p)?"xn--"+lo(p):p})},tr={version:"2.1.0",ucs2:{decode:ao,encode:xd},decode:uo,encode:lo,toASCII:Fd,toUnicode:Md},Me={};function tt(h){var f=h.charCodeAt(0),p=void 0;return f<16?p="%0"+f.toString(16).toUpperCase():f<128?p="%"+f.toString(16).toUpperCase():f<2048?p="%"+(f>>6|192).toString(16).toUpperCase()+"%"+(f&63|128).toString(16).toUpperCase():p="%"+(f>>12|224).toString(16).toUpperCase()+"%"+(f>>6&63|128).toString(16).toUpperCase()+"%"+(f&63|128).toString(16).toUpperCase(),p}function rr(h){for(var f="",p=0,g=h.length;p<g;){var v=parseInt(h.substr(p+1,2),16);if(v<128)f+=String.fromCharCode(v),p+=3;else if(v>=194&&v<224){if(g-p>=6){var S=parseInt(h.substr(p+4,2),16);f+=String.fromCharCode((v&31)<<6|S&63)}else f+=h.substr(p,6);p+=6}else if(v>=224){if(g-p>=9){var A=parseInt(h.substr(p+4,2),16),H=parseInt(h.substr(p+7,2),16);f+=String.fromCharCode((v&15)<<12|(A&63)<<6|H&63)}else f+=h.substr(p,9);p+=9}else f+=h.substr(p,3),p+=3}return f}function Ls(h,f){function p(g){var v=rr(g);return v.match(f.UNRESERVED)?v:g}return h.scheme&&(h.scheme=String(h.scheme).replace(f.PCT_ENCODED,p).toLowerCase().replace(f.NOT_SCHEME,"")),h.userinfo!==void 0&&(h.userinfo=String(h.userinfo).replace(f.PCT_ENCODED,p).replace(f.NOT_USERINFO,tt).replace(f.PCT_ENCODED,s)),h.host!==void 0&&(h.host=String(h.host).replace(f.PCT_ENCODED,p).toLowerCase().replace(f.NOT_HOST,tt).replace(f.PCT_ENCODED,s)),h.path!==void 0&&(h.path=String(h.path).replace(f.PCT_ENCODED,p).replace(h.scheme?f.NOT_PATH:f.NOT_PATH_NOSCHEME,tt).replace(f.PCT_ENCODED,s)),h.query!==void 0&&(h.query=String(h.query).replace(f.PCT_ENCODED,p).replace(f.NOT_QUERY,tt).replace(f.PCT_ENCODED,s)),h.fragment!==void 0&&(h.fragment=String(h.fragment).replace(f.PCT_ENCODED,p).replace(f.NOT_FRAGMENT,tt).replace(f.PCT_ENCODED,s)),h}function Ms(h){return h.replace(/^0*(.*)/,"$1")||"0"}function Fs(h,f){var p=h.match(f.IPV4ADDRESS)||[],g=l(p,2),v=g[1];return v?v.split(".").map(Ms).join("."):h}function fo(h,f){var p=h.match(f.IPV6ADDRESS)||[],g=l(p,3),v=g[1],S=g[2];if(v){for(var A=v.toLowerCase().split("::").reverse(),H=l(A,2),W=H[0],ce=H[1],F=ce?ce.split(":").map(Ms):[],se=W.split(":").map(Ms),ue=f.IPV4ADDRESS.test(se[se.length-1]),ne=ue?7:8,K=se.length-ne,ie=Array(ne),B=0;B<ne;++B)ie[B]=F[B]||se[K+B]||"";ue&&(ie[ne-1]=Fs(ie[ne-1],f));var Dt=ie.reduce(function(Ve,st,jt){if(!st||st==="0"){var dt=Ve[Ve.length-1];dt&&dt.index+dt.length===jt?dt.length++:Ve.push({index:jt,length:1})}return Ve},[]),Ae=Dt.sort(function(Ve,st){return st.length-Ve.length})[0],Fe=void 0;if(Ae&&Ae.length>1){var Y=ie.slice(0,Ae.index),qe=ie.slice(Ae.index+Ae.length);Fe=Y.join(":")+"::"+qe.join(":")}else Fe=ie.join(":");return S&&(Fe+="%"+S),Fe}else return h}var Vd=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Hd="".match(/(){0}/)[1]===void 0;function lt(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p={},g=f.iri!==!1?o:u;f.reference==="suffix"&&(h=(f.scheme?f.scheme+":":"")+"//"+h);var v=h.match(Vd);if(v){Hd?(p.scheme=v[1],p.userinfo=v[3],p.host=v[4],p.port=parseInt(v[5],10),p.path=v[6]||"",p.query=v[7],p.fragment=v[8],isNaN(p.port)&&(p.port=v[5])):(p.scheme=v[1]||void 0,p.userinfo=h.indexOf("@")!==-1?v[3]:void 0,p.host=h.indexOf("//")!==-1?v[4]:void 0,p.port=parseInt(v[5],10),p.path=v[6]||"",p.query=h.indexOf("?")!==-1?v[7]:void 0,p.fragment=h.indexOf("#")!==-1?v[8]:void 0,isNaN(p.port)&&(p.port=h.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?v[4]:void 0)),p.host&&(p.host=fo(Fs(p.host,g),g)),p.scheme===void 0&&p.userinfo===void 0&&p.host===void 0&&p.port===void 0&&!p.path&&p.query===void 0?p.reference="same-document":p.scheme===void 0?p.reference="relative":p.fragment===void 0?p.reference="absolute":p.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==p.reference&&(p.error=p.error||"URI is not a "+f.reference+" reference.");var S=Me[(f.scheme||p.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!S||!S.unicodeSupport)){if(p.host&&(f.domainHost||S&&S.domainHost))try{p.host=tr.toASCII(p.host.replace(g.PCT_ENCODED,rr).toLowerCase())}catch(A){p.error=p.error||"Host's domain name can not be converted to ASCII via punycode: "+A}Ls(p,u)}else Ls(p,g);S&&S.parse&&S.parse(p,f)}else p.error=p.error||"URI can not be parsed.";return p}function Ud(h,f){var p=f.iri!==!1?o:u,g=[];return h.userinfo!==void 0&&(g.push(h.userinfo),g.push("@")),h.host!==void 0&&g.push(fo(Fs(String(h.host),p),p).replace(p.IPV6ADDRESS,function(v,S,A){return"["+S+(A?"%25"+A:"")+"]"})),(typeof h.port=="number"||typeof h.port=="string")&&(g.push(":"),g.push(String(h.port))),g.length?g.join(""):void 0}var ho=/^\.\.?\//,po=/^\/\.(\/|$)/,mo=/^\/\.\.(\/|$)/,Gd=/^\/?(?:.|\n)*?(?=\/|$)/;function nr(h){for(var f=[];h.length;)if(h.match(ho))h=h.replace(ho,"");else if(h.match(po))h=h.replace(po,"/");else if(h.match(mo))h=h.replace(mo,"/"),f.pop();else if(h==="."||h==="..")h="";else{var p=h.match(Gd);if(p){var g=p[0];h=h.slice(g.length),f.push(g)}else throw new Error("Unexpected dot segment condition")}return f.join("")}function rt(h){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f.iri?o:u,g=[],v=Me[(f.scheme||h.scheme||"").toLowerCase()];if(v&&v.serialize&&v.serialize(h,f),h.host&&!p.IPV6ADDRESS.test(h.host)){if(f.domainHost||v&&v.domainHost)try{h.host=f.iri?tr.toUnicode(h.host):tr.toASCII(h.host.replace(p.PCT_ENCODED,rr).toLowerCase())}catch(H){h.error=h.error||"Host's domain name can not be converted to "+(f.iri?"Unicode":"ASCII")+" via punycode: "+H}}Ls(h,p),f.reference!=="suffix"&&h.scheme&&(g.push(h.scheme),g.push(":"));var S=Ud(h,f);if(S!==void 0&&(f.reference!=="suffix"&&g.push("//"),g.push(S),h.path&&h.path.charAt(0)!=="/"&&g.push("/")),h.path!==void 0){var A=h.path;!f.absolutePath&&(!v||!v.absolutePath)&&(A=nr(A)),S===void 0&&(A=A.replace(/^\/\//,"/%2F")),g.push(A)}return h.query!==void 0&&(g.push("?"),g.push(h.query)),h.fragment!==void 0&&(g.push("#"),g.push(h.fragment)),g.join("")}function go(h,f){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=arguments[3],v={};return g||(h=lt(rt(h,p),p),f=lt(rt(f,p),p)),p=p||{},!p.tolerant&&f.scheme?(v.scheme=f.scheme,v.userinfo=f.userinfo,v.host=f.host,v.port=f.port,v.path=nr(f.path||""),v.query=f.query):(f.userinfo!==void 0||f.host!==void 0||f.port!==void 0?(v.userinfo=f.userinfo,v.host=f.host,v.port=f.port,v.path=nr(f.path||""),v.query=f.query):(f.path?(f.path.charAt(0)==="/"?v.path=nr(f.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?v.path="/"+f.path:h.path?v.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+f.path:v.path=f.path,v.path=nr(v.path)),v.query=f.query):(v.path=h.path,f.query!==void 0?v.query=f.query:v.query=h.query),v.userinfo=h.userinfo,v.host=h.host,v.port=h.port),v.scheme=h.scheme),v.fragment=f.fragment,v}function zd(h,f,p){var g=a({scheme:"null"},p);return rt(go(lt(h,g),lt(f,g),g,!0),g)}function Kd(h,f){return typeof h=="string"?h=rt(lt(h,f),f):n(h)==="object"&&(h=lt(rt(h,f),f)),h}function Xd(h,f,p){return typeof h=="string"?h=rt(lt(h,p),p):n(h)==="object"&&(h=rt(h,p)),typeof f=="string"?f=rt(lt(f,p),p):n(f)==="object"&&(f=rt(f,p)),h===f}function Wd(h,f){return h&&h.toString().replace(!f||!f.iri?u.ESCAPE:o.ESCAPE,tt)}function ft(h,f){return h&&h.toString().replace(!f||!f.iri?u.PCT_ENCODED:o.PCT_ENCODED,rr)}var Hr={scheme:"http",domainHost:!0,parse:function(f,p){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f},serialize:function(f,p){var g=String(f.scheme).toLowerCase()==="https";return(f.port===(g?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}},vo={scheme:"https",domainHost:Hr.domainHost,parse:Hr.parse,serialize:Hr.serialize};function _o(h){return typeof h.secure=="boolean"?h.secure:String(h.scheme).toLowerCase()==="wss"}var Ur={scheme:"ws",domainHost:!0,parse:function(f,p){var g=f;return g.secure=_o(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g},serialize:function(f,p){if((f.port===(_o(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){var g=f.resourceName.split("?"),v=l(g,2),S=v[0],A=v[1];f.path=S&&S!=="/"?S:void 0,f.query=A,f.resourceName=void 0}return f.fragment=void 0,f}},yo={scheme:"wss",domainHost:Ur.domainHost,parse:Ur.parse,serialize:Ur.serialize},Bd={},Jd=!0,$o="[A-Za-z0-9\\-\\.\\_\\~"+(Jd?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",nt="[0-9A-Fa-f]",Yd=t(t("%[EFef]"+nt+"%"+nt+nt+"%"+nt+nt)+"|"+t("%[89A-Fa-f]"+nt+"%"+nt+nt)+"|"+t("%"+nt+nt)),Zd="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Qd="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",eh=e(Qd,'[\\"\\\\]'),th="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",rh=new RegExp($o,"g"),sr=new RegExp(Yd,"g"),nh=new RegExp(e("[^]",Zd,"[\\.]",'[\\"]',eh),"g"),Eo=new RegExp(e("[^]",$o,th),"g"),sh=Eo;function Vs(h){var f=rr(h);return f.match(rh)?f:h}var wo={scheme:"mailto",parse:function(f,p){var g=f,v=g.to=g.path?g.path.split(","):[];if(g.path=void 0,g.query){for(var S=!1,A={},H=g.query.split("&"),W=0,ce=H.length;W<ce;++W){var F=H[W].split("=");switch(F[0]){case"to":for(var se=F[1].split(","),ue=0,ne=se.length;ue<ne;++ue)v.push(se[ue]);break;case"subject":g.subject=ft(F[1],p);break;case"body":g.body=ft(F[1],p);break;default:S=!0,A[ft(F[0],p)]=ft(F[1],p);break}}S&&(g.headers=A)}g.query=void 0;for(var K=0,ie=v.length;K<ie;++K){var B=v[K].split("@");if(B[0]=ft(B[0]),p.unicodeSupport)B[1]=ft(B[1],p).toLowerCase();else try{B[1]=tr.toASCII(ft(B[1],p).toLowerCase())}catch(Dt){g.error=g.error||"Email address's domain name can not be converted to ASCII via punycode: "+Dt}v[K]=B.join("@")}return g},serialize:function(f,p){var g=f,v=i(f.to);if(v){for(var S=0,A=v.length;S<A;++S){var H=String(v[S]),W=H.lastIndexOf("@"),ce=H.slice(0,W).replace(sr,Vs).replace(sr,s).replace(nh,tt),F=H.slice(W+1);try{F=p.iri?tr.toUnicode(F):tr.toASCII(ft(F,p).toLowerCase())}catch(K){g.error=g.error||"Email address's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+K}v[S]=ce+"@"+F}g.path=v.join(",")}var se=f.headers=f.headers||{};f.subject&&(se.subject=f.subject),f.body&&(se.body=f.body);var ue=[];for(var ne in se)se[ne]!==Bd[ne]&&ue.push(ne.replace(sr,Vs).replace(sr,s).replace(Eo,tt)+"="+se[ne].replace(sr,Vs).replace(sr,s).replace(sh,tt));return ue.length&&(g.query=ue.join("&")),g}},ih=/^([^\:]+)\:(.*)/,bo={scheme:"urn",parse:function(f,p){var g=f.path&&f.path.match(ih),v=f;if(g){var S=p.scheme||v.scheme||"urn",A=g[1].toLowerCase(),H=g[2],W=S+":"+(p.nid||A),ce=Me[W];v.nid=A,v.nss=H,v.path=void 0,ce&&(v=ce.parse(v,p))}else v.error=v.error||"URN can not be parsed.";return v},serialize:function(f,p){var g=p.scheme||f.scheme||"urn",v=f.nid,S=g+":"+(p.nid||v),A=Me[S];A&&(f=A.serialize(f,p));var H=f,W=f.nss;return H.path=(v||p.nid)+":"+W,H}},ah=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,So={scheme:"urn:uuid",parse:function(f,p){var g=f;return g.uuid=g.nss,g.nss=void 0,!p.tolerant&&(!g.uuid||!g.uuid.match(ah))&&(g.error=g.error||"UUID is not valid."),g},serialize:function(f,p){var g=f;return g.nss=(f.uuid||"").toLowerCase(),g}};Me[Hr.scheme]=Hr,Me[vo.scheme]=vo,Me[Ur.scheme]=Ur,Me[yo.scheme]=yo,Me[wo.scheme]=wo,Me[bo.scheme]=bo,Me[So.scheme]=So,r.SCHEMES=Me,r.pctEncChar=tt,r.pctDecChars=rr,r.parse=lt,r.removeDotSegments=nr,r.serialize=rt,r.resolveComponents=go,r.resolve=zd,r.normalize=Kd,r.equal=Xd,r.escapeComponent=Wd,r.unescapeComponent=ft,Object.defineProperty(r,"__esModule",{value:!0})})});var rf=_(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});var tf=ef();tf.code='require("ajv/dist/runtime/uri").default';la.default=tf});var ff=_(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.CodeGen=he.Name=he.nil=he.stringify=he.str=he._=he.KeywordCxt=void 0;var vy=On();Object.defineProperty(he,"KeywordCxt",{enumerable:!0,get:function(){return vy.KeywordCxt}});var Cr=L();Object.defineProperty(he,"_",{enumerable:!0,get:function(){return Cr._}});Object.defineProperty(he,"str",{enumerable:!0,get:function(){return Cr.str}});Object.defineProperty(he,"stringify",{enumerable:!0,get:function(){return Cr.stringify}});Object.defineProperty(he,"nil",{enumerable:!0,get:function(){return Cr.nil}});Object.defineProperty(he,"Name",{enumerable:!0,get:function(){return Cr.Name}});Object.defineProperty(he,"CodeGen",{enumerable:!0,get:function(){return Cr.CodeGen}});var _y=na(),cf=oa(),yy=Hi(),Pn=_s(),$y=L(),Rn=wn(),$s=En(),da=G(),nf=Zl(),Ey=rf(),uf=(r,e)=>new RegExp(r,e);uf.code="new RegExp";var wy=["removeAdditional","useDefaults","coerceTypes"],by=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Sy={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Oy={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},sf=200;function Py(r){var e,t,n,s,i,a,c,u,o,l,d,y,m,$,E,w,b,D,T,z,C,me,ke,bt,xe;let re=r.strict,Le=(e=r.code)===null||e===void 0?void 0:e.optimize,et=Le===!0||Le===void 0?1:Le||0,Fn=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:uf,Vn=(s=r.uriResolver)!==null&&s!==void 0?s:Ey.default;return{strictSchema:(a=(i=r.strictSchema)!==null&&i!==void 0?i:re)!==null&&a!==void 0?a:!0,strictNumbers:(u=(c=r.strictNumbers)!==null&&c!==void 0?c:re)!==null&&u!==void 0?u:!0,strictTypes:(l=(o=r.strictTypes)!==null&&o!==void 0?o:re)!==null&&l!==void 0?l:"log",strictTuples:(y=(d=r.strictTuples)!==null&&d!==void 0?d:re)!==null&&y!==void 0?y:"log",strictRequired:($=(m=r.strictRequired)!==null&&m!==void 0?m:re)!==null&&$!==void 0?$:!1,code:r.code?{...r.code,optimize:et,regExp:Fn}:{optimize:et,regExp:Fn},loopRequired:(E=r.loopRequired)!==null&&E!==void 0?E:sf,loopEnum:(w=r.loopEnum)!==null&&w!==void 0?w:sf,meta:(b=r.meta)!==null&&b!==void 0?b:!0,messages:(D=r.messages)!==null&&D!==void 0?D:!0,inlineRefs:(T=r.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(z=r.schemaId)!==null&&z!==void 0?z:"$id",addUsedSchema:(C=r.addUsedSchema)!==null&&C!==void 0?C:!0,validateSchema:(me=r.validateSchema)!==null&&me!==void 0?me:!0,validateFormats:(ke=r.validateFormats)!==null&&ke!==void 0?ke:!0,unicodeRegExp:(bt=r.unicodeRegExp)!==null&&bt!==void 0?bt:!0,int32range:(xe=r.int32range)!==null&&xe!==void 0?xe:!0,uriResolver:Vn}}var Cn=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Py(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new $y.ValueScope({scope:{},prefixes:by,es5:t,lines:n}),this.logger=Ay(e.logger);let s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,yy.getRules)(),af.call(this,Sy,e,"NOT SUPPORTED"),af.call(this,Oy,e,"DEPRECATED","warn"),this._metaOpts=Iy.call(this),e.formats&&Cy.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Ny.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Ry.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,s=nf;n==="id"&&(s={...nf},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let s=n(t);return"$async"in n||(this.errors=n.errors),s}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return s.call(this,e,t);async function s(l,d){await i.call(this,l.$schema);let y=this._addSchema(l,d);return y.validate||a.call(this,y)}async function i(l){l&&!this.getSchema(l)&&await s.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof cf.default))throw d;return c.call(this,d),await u.call(this,d.missingSchema),a.call(this,l)}}function c({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function u(l){let d=await o.call(this,l);this.refs[l]||await i.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,t)}async function o(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(e,t,n,s=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,s);return this}let i;if(typeof e=="object"){let{schemaId:a}=this.opts;if(i=e[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return t=(0,Rn.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,s,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(n,e);if(!s&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return s}getSchema(e){let t;for(;typeof(t=of.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,s=new Pn.SchemaEnv({schema:{},schemaId:n});if(t=Pn.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=of.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,Rn.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Dy.call(this,n,t),!t)return(0,da.eachItem)(n,i=>fa.call(this,i)),this;ky.call(this,t);let s={...t,type:(0,$s.getJSONTypes)(t.type),schemaType:(0,$s.getJSONTypes)(t.schemaType)};return(0,da.eachItem)(n,s.type.length===0?i=>fa.call(this,i,s):i=>s.type.forEach(a=>fa.call(this,i,s,a))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let s=n.rules.findIndex(i=>i.keyword===e);s>=0&&n.rules.splice(s,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(s=>`${n}${s.instancePath} ${s.message}`).reduce((s,i)=>s+t+i)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let s of t){let i=s.split("/").slice(1),a=e;for(let c of i)a=a[c];for(let c in n){let u=n[c];if(typeof u!="object")continue;let{$data:o}=u.definition,l=a[c];o&&l&&(a[c]=lf(l))}}return e}_removeAllSchemas(e,t){for(let n in e){let s=e[n];(!t||t.test(n))&&(typeof s=="string"?delete e[n]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[n]))}}_addSchema(e,t,n,s=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:c}=this.opts;if(typeof e=="object")a=e[c];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;n=(0,Rn.normalizeId)(a||n);let o=Rn.getSchemaRefs.call(this,e,n);return u=new Pn.SchemaEnv({schema:e,schemaId:c,meta:t,baseId:n,localRefs:o}),this._cache.set(u.schema,u),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),s&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Pn.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Pn.compileSchema.call(this,e)}finally{this.opts=t}}};he.default=Cn;Cn.ValidationError=_y.default;Cn.MissingRefError=cf.default;function af(r,e,t,n="error"){for(let s in r){let i=s;i in e&&this.logger[n](`${t}: option ${s}. ${r[i]}`)}}function of(r){return r=(0,Rn.normalizeId)(r),this.schemas[r]||this.refs[r]}function Ry(){let r=this.opts.schemas;if(!!r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function Cy(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function Ny(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function Iy(){let r={...this.opts};for(let e of wy)delete r[e];return r}var Ty={log(){},warn(){},error(){}};function Ay(r){if(r===!1)return Ty;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var qy=/^[a-z_$][a-z0-9_$:-]*$/i;function Dy(r,e){let{RULES:t}=this;if((0,da.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!qy.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function fa(r,e,t){var n;let s=e==null?void 0:e.post;if(t&&s)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=s?i.post:i.rules.find(({type:u})=>u===t);if(a||(a={type:t,rules:[]},i.rules.push(a)),i.keywords[r]=!0,!e)return;let c={keyword:r,definition:{...e,type:(0,$s.getJSONTypes)(e.type),schemaType:(0,$s.getJSONTypes)(e.schemaType)}};e.before?jy.call(this,a,c,e.before):a.rules.push(c),i.all[r]=c,(n=e.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function jy(r,e,t){let n=r.rules.findIndex(s=>s.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function ky(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=lf(e)),r.validateSchema=this.compile(e,!0))}var xy={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function lf(r){return{anyOf:[r,xy]}}});var df=_(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});var Ly={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ha.default=Ly});var gf=_(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.callRef=Yt.getValidate=void 0;var My=oa(),hf=ze(),Ie=L(),Nr=$t(),pf=_s(),Es=G(),Fy={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:s,schemaEnv:i,validateName:a,opts:c,self:u}=n,{root:o}=i;if((t==="#"||t==="#/")&&s===o.baseId)return d();let l=pf.resolveRef.call(u,o,s,t);if(l===void 0)throw new My.default(n.opts.uriResolver,s,t);if(l instanceof pf.SchemaEnv)return y(l);return m(l);function d(){if(i===o)return ws(r,a,i,i.$async);let $=e.scopeValue("root",{ref:o});return ws(r,(0,Ie._)`${$}.validate`,o,o.$async)}function y($){let E=mf(r,$);ws(r,E,$,$.$async)}function m($){let E=e.scopeValue("schema",c.code.source===!0?{ref:$,code:(0,Ie.stringify)($)}:{ref:$}),w=e.name("valid"),b=r.subschema({schema:$,dataTypes:[],schemaPath:Ie.nil,topSchemaRef:E,errSchemaPath:t},w);r.mergeEvaluated(b),r.ok(w)}}};function mf(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ie._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Yt.getValidate=mf;function ws(r,e,t,n){let{gen:s,it:i}=r,{allErrors:a,schemaEnv:c,opts:u}=i,o=u.passContext?Nr.default.this:Ie.nil;n?l():d();function l(){if(!c.$async)throw new Error("async schema referenced by sync schema");let $=s.let("valid");s.try(()=>{s.code((0,Ie._)`await ${(0,hf.callValidateCode)(r,e,o)}`),m(e),a||s.assign($,!0)},E=>{s.if((0,Ie._)`!(${E} instanceof ${i.ValidationError})`,()=>s.throw(E)),y(E),a||s.assign($,!1)}),r.ok($)}function d(){r.result((0,hf.callValidateCode)(r,e,o),()=>m(e),()=>y(e))}function y($){let E=(0,Ie._)`${$}.errors`;s.assign(Nr.default.vErrors,(0,Ie._)`${Nr.default.vErrors} === null ? ${E} : ${Nr.default.vErrors}.concat(${E})`),s.assign(Nr.default.errors,(0,Ie._)`${Nr.default.vErrors}.length`)}function m($){var E;if(!i.opts.unevaluated)return;let w=(E=t==null?void 0:t.validate)===null||E===void 0?void 0:E.evaluated;if(i.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(i.props=Es.mergeEvaluated.props(s,w.props,i.props));else{let b=s.var("props",(0,Ie._)`${$}.evaluated.props`);i.props=Es.mergeEvaluated.props(s,b,i.props,Ie.Name)}if(i.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(i.items=Es.mergeEvaluated.items(s,w.items,i.items));else{let b=s.var("items",(0,Ie._)`${$}.evaluated.items`);i.items=Es.mergeEvaluated.items(s,b,i.items,Ie.Name)}}}Yt.callRef=ws;Yt.default=Fy});var vf=_(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});var Vy=df(),Hy=gf(),Uy=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Vy.default,Hy.default];pa.default=Uy});var _f=_(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});var bs=L(),At=bs.operators,Ss={maximum:{okStr:"<=",ok:At.LTE,fail:At.GT},minimum:{okStr:">=",ok:At.GTE,fail:At.LT},exclusiveMaximum:{okStr:"<",ok:At.LT,fail:At.GTE},exclusiveMinimum:{okStr:">",ok:At.GT,fail:At.LTE}},Gy={message:({keyword:r,schemaCode:e})=>(0,bs.str)`must be ${Ss[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,bs._)`{comparison: ${Ss[r].okStr}, limit: ${e}}`},zy={keyword:Object.keys(Ss),type:"number",schemaType:"number",$data:!0,error:Gy,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,bs._)`${t} ${Ss[e].fail} ${n} || isNaN(${t})`)}};ma.default=zy});var yf=_(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});var Nn=L(),Ky={message:({schemaCode:r})=>(0,Nn.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,Nn._)`{multipleOf: ${r}}`},Xy={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Ky,code(r){let{gen:e,data:t,schemaCode:n,it:s}=r,i=s.opts.multipleOfPrecision,a=e.let("res"),c=i?(0,Nn._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,Nn._)`${a} !== parseInt(${a})`;r.fail$data((0,Nn._)`(${n} === 0 || (${a} = ${t}/${n}, ${c}))`)}};ga.default=Xy});var Ef=_(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});function $f(r){let e=r.length,t=0,n=0,s;for(;n<e;)t++,s=r.charCodeAt(n++),s>=55296&&s<=56319&&n<e&&(s=r.charCodeAt(n),(s&64512)===56320&&n++);return t}va.default=$f;$f.code='require("ajv/dist/runtime/ucs2length").default'});var wf=_(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var Zt=L(),Wy=G(),By=Ef(),Jy={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Zt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Zt._)`{limit: ${r}}`},Yy={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Jy,code(r){let{keyword:e,data:t,schemaCode:n,it:s}=r,i=e==="maxLength"?Zt.operators.GT:Zt.operators.LT,a=s.opts.unicode===!1?(0,Zt._)`${t}.length`:(0,Zt._)`${(0,Wy.useFunc)(r.gen,By.default)}(${t})`;r.fail$data((0,Zt._)`${a} ${i} ${n}`)}};_a.default=Yy});var bf=_(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});var Zy=ze(),Os=L(),Qy={message:({schemaCode:r})=>(0,Os.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,Os._)`{pattern: ${r}}`},e0={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Qy,code(r){let{data:e,$data:t,schema:n,schemaCode:s,it:i}=r,a=i.opts.unicodeRegExp?"u":"",c=t?(0,Os._)`(new RegExp(${s}, ${a}))`:(0,Zy.usePattern)(r,n);r.fail$data((0,Os._)`!${c}.test(${e})`)}};ya.default=e0});var Sf=_($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});var In=L(),t0={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,In.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,In._)`{limit: ${r}}`},r0={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:t0,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxProperties"?In.operators.GT:In.operators.LT;r.fail$data((0,In._)`Object.keys(${t}).length ${s} ${n}`)}};$a.default=r0});var Of=_(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});var Tn=ze(),An=L(),n0=G(),s0={message:({params:{missingProperty:r}})=>(0,An.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,An._)`{missingProperty: ${r}}`},i0={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s0,code(r){let{gen:e,schema:t,schemaCode:n,data:s,$data:i,it:a}=r,{opts:c}=a;if(!i&&t.length===0)return;let u=t.length>=c.loopRequired;if(a.allErrors?o():l(),c.strictRequired){let m=r.parentSchema.properties,{definedProperties:$}=r.it;for(let E of t)if((m==null?void 0:m[E])===void 0&&!$.has(E)){let w=a.schemaEnv.baseId+a.errSchemaPath,b=`required property "${E}" is not defined at "${w}" (strictRequired)`;(0,n0.checkStrictMode)(a,b,a.opts.strictRequired)}}function o(){if(u||i)r.block$data(An.nil,d);else for(let m of t)(0,Tn.checkReportMissingProp)(r,m)}function l(){let m=e.let("missing");if(u||i){let $=e.let("valid",!0);r.block$data($,()=>y(m,$)),r.ok($)}else e.if((0,Tn.checkMissingProp)(r,t,m)),(0,Tn.reportMissingProp)(r,m),e.else()}function d(){e.forOf("prop",n,m=>{r.setParams({missingProperty:m}),e.if((0,Tn.noPropertyInData)(e,s,m,c.ownProperties),()=>r.error())})}function y(m,$){r.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign($,(0,Tn.propertyInData)(e,s,m,c.ownProperties)),e.if((0,An.not)($),()=>{r.error(),e.break()})},An.nil)}}};Ea.default=i0});var Pf=_(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});var qn=L(),a0={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,qn.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,qn._)`{limit: ${r}}`},o0={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:a0,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxItems"?qn.operators.GT:qn.operators.LT;r.fail$data((0,qn._)`${t}.length ${s} ${n}`)}};wa.default=o0});var Ps=_(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});var Rf=Ji();Rf.code='require("ajv/dist/runtime/equal").default';ba.default=Rf});var Cf=_(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});var Sa=En(),pe=L(),c0=G(),u0=Ps(),l0={message:({params:{i:r,j:e}})=>(0,pe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,pe._)`{i: ${r}, j: ${e}}`},f0={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:l0,code(r){let{gen:e,data:t,$data:n,schema:s,parentSchema:i,schemaCode:a,it:c}=r;if(!n&&!s)return;let u=e.let("valid"),o=i.items?(0,Sa.getSchemaTypes)(i.items):[];r.block$data(u,l,(0,pe._)`${a} === false`),r.ok(u);function l(){let $=e.let("i",(0,pe._)`${t}.length`),E=e.let("j");r.setParams({i:$,j:E}),e.assign(u,!0),e.if((0,pe._)`${$} > 1`,()=>(d()?y:m)($,E))}function d(){return o.length>0&&!o.some($=>$==="object"||$==="array")}function y($,E){let w=e.name("item"),b=(0,Sa.checkDataTypes)(o,w,c.opts.strictNumbers,Sa.DataType.Wrong),D=e.const("indices",(0,pe._)`{}`);e.for((0,pe._)`;${$}--;`,()=>{e.let(w,(0,pe._)`${t}[${$}]`),e.if(b,(0,pe._)`continue`),o.length>1&&e.if((0,pe._)`typeof ${w} == "string"`,(0,pe._)`${w} += "_"`),e.if((0,pe._)`typeof ${D}[${w}] == "number"`,()=>{e.assign(E,(0,pe._)`${D}[${w}]`),r.error(),e.assign(u,!1).break()}).code((0,pe._)`${D}[${w}] = ${$}`)})}function m($,E){let w=(0,c0.useFunc)(e,u0.default),b=e.name("outer");e.label(b).for((0,pe._)`;${$}--;`,()=>e.for((0,pe._)`${E} = ${$}; ${E}--;`,()=>e.if((0,pe._)`${w}(${t}[${$}], ${t}[${E}])`,()=>{r.error(),e.assign(u,!1).break(b)})))}}};Oa.default=f0});var Nf=_(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var Pa=L(),d0=G(),h0=Ps(),p0={message:"must be equal to constant",params:({schemaCode:r})=>(0,Pa._)`{allowedValue: ${r}}`},m0={keyword:"const",$data:!0,error:p0,code(r){let{gen:e,data:t,$data:n,schemaCode:s,schema:i}=r;n||i&&typeof i=="object"?r.fail$data((0,Pa._)`!${(0,d0.useFunc)(e,h0.default)}(${t}, ${s})`):r.fail((0,Pa._)`${i} !== ${t}`)}};Ra.default=m0});var If=_(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});var Dn=L(),g0=G(),v0=Ps(),_0={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,Dn._)`{allowedValues: ${r}}`},y0={keyword:"enum",schemaType:"array",$data:!0,error:_0,code(r){let{gen:e,data:t,$data:n,schema:s,schemaCode:i,it:a}=r;if(!n&&s.length===0)throw new Error("enum must have non-empty array");let c=s.length>=a.opts.loopEnum,u,o=()=>u!=null?u:u=(0,g0.useFunc)(e,v0.default),l;if(c||n)l=e.let("valid"),r.block$data(l,d);else{if(!Array.isArray(s))throw new Error("ajv implementation error");let m=e.const("vSchema",i);l=(0,Dn.or)(...s.map(($,E)=>y(m,E)))}r.pass(l);function d(){e.assign(l,!1),e.forOf("v",i,m=>e.if((0,Dn._)`${o()}(${t}, ${m})`,()=>e.assign(l,!0).break()))}function y(m,$){let E=s[$];return typeof E=="object"&&E!==null?(0,Dn._)`${o()}(${t}, ${m}[${$}])`:(0,Dn._)`${t} === ${E}`}}};Ca.default=y0});var Tf=_(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var $0=_f(),E0=yf(),w0=wf(),b0=bf(),S0=Sf(),O0=Of(),P0=Pf(),R0=Cf(),C0=Nf(),N0=If(),I0=[$0.default,E0.default,w0.default,b0.default,S0.default,O0.default,P0.default,R0.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},C0.default,N0.default];Na.default=I0});var Ta=_(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.validateAdditionalItems=void 0;var Qt=L(),Ia=G(),T0={message:({params:{len:r}})=>(0,Qt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Qt._)`{limit: ${r}}`},A0={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:T0,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Ia.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Af(r,n)}};function Af(r,e){let{gen:t,schema:n,data:s,keyword:i,it:a}=r;a.items=!0;let c=t.const("len",(0,Qt._)`${s}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Qt._)`${c} <= ${e.length}`);else if(typeof n=="object"&&!(0,Ia.alwaysValidSchema)(a,n)){let o=t.var("valid",(0,Qt._)`${c} <= ${e.length}`);t.if((0,Qt.not)(o),()=>u(o)),r.ok(o)}function u(o){t.forRange("i",e.length,c,l=>{r.subschema({keyword:i,dataProp:l,dataPropType:Ia.Type.Num},o),a.allErrors||t.if((0,Qt.not)(o),()=>t.break())})}}jn.validateAdditionalItems=Af;jn.default=A0});var Aa=_(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.validateTuple=void 0;var qf=L(),Rs=G(),q0=ze(),D0={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return Df(r,"additionalItems",e);t.items=!0,!(0,Rs.alwaysValidSchema)(t,e)&&r.ok((0,q0.validateArray)(r))}};function Df(r,e,t=r.schema){let{gen:n,parentSchema:s,data:i,keyword:a,it:c}=r;l(s),c.opts.unevaluated&&t.length&&c.items!==!0&&(c.items=Rs.mergeEvaluated.items(n,t.length,c.items));let u=n.name("valid"),o=n.const("len",(0,qf._)`${i}.length`);t.forEach((d,y)=>{(0,Rs.alwaysValidSchema)(c,d)||(n.if((0,qf._)`${o} > ${y}`,()=>r.subschema({keyword:a,schemaProp:y,dataProp:y},u)),r.ok(u))});function l(d){let{opts:y,errSchemaPath:m}=c,$=t.length,E=$===d.minItems&&($===d.maxItems||d[e]===!1);if(y.strictTuples&&!E){let w=`"${a}" is ${$}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Rs.checkStrictMode)(c,w,y.strictTuples)}}}kn.validateTuple=Df;kn.default=D0});var jf=_(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var j0=Aa(),k0={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,j0.validateTuple)(r,"items")};qa.default=k0});var xf=_(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});var kf=L(),x0=G(),L0=ze(),M0=Ta(),F0={message:({params:{len:r}})=>(0,kf.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,kf._)`{limit: ${r}}`},V0={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:F0,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:s}=t;n.items=!0,!(0,x0.alwaysValidSchema)(n,e)&&(s?(0,M0.validateAdditionalItems)(r,s):r.ok((0,L0.validateArray)(r)))}};Da.default=V0});var Lf=_(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var Xe=L(),Cs=G(),H0={message:({params:{min:r,max:e}})=>e===void 0?(0,Xe.str)`must contain at least ${r} valid item(s)`:(0,Xe.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,Xe._)`{minContains: ${r}}`:(0,Xe._)`{minContains: ${r}, maxContains: ${e}}`},U0={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:H0,code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r,a,c,{minContains:u,maxContains:o}=n;i.opts.next?(a=u===void 0?1:u,c=o):a=1;let l=e.const("len",(0,Xe._)`${s}.length`);if(r.setParams({min:a,max:c}),c===void 0&&a===0){(0,Cs.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&a>c){(0,Cs.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Cs.alwaysValidSchema)(i,t)){let E=(0,Xe._)`${l} >= ${a}`;c!==void 0&&(E=(0,Xe._)`${E} && ${l} <= ${c}`),r.pass(E);return}i.items=!0;let d=e.name("valid");c===void 0&&a===1?m(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),c!==void 0&&e.if((0,Xe._)`${s}.length > 0`,y)):(e.let(d,!1),y()),r.result(d,()=>r.reset());function y(){let E=e.name("_valid"),w=e.let("count",0);m(E,()=>e.if(E,()=>$(w)))}function m(E,w){e.forRange("i",0,l,b=>{r.subschema({keyword:"contains",dataProp:b,dataPropType:Cs.Type.Num,compositeRule:!0},E),w()})}function $(E){e.code((0,Xe._)`${E}++`),c===void 0?e.if((0,Xe._)`${E} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,Xe._)`${E} > ${c}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,Xe._)`${E} >= ${a}`,()=>e.assign(d,!0)))}}};ja.default=U0});var Vf=_(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.validateSchemaDeps=ct.validatePropertyDeps=ct.error=void 0;var ka=L(),G0=G(),xn=ze();ct.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,ka.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,ka._)`{property: ${r},
26
26
  missingProperty: ${n},
27
27
  depsCount: ${e},
28
- deps: ${t}}`};var s0={keyword:"dependencies",type:"object",schemaType:"object",error:ct.error,code(r){let[e,t]=i0(r);Lf(r,e),Mf(r,t)}};function i0({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let s=Array.isArray(r[n])?e:t;s[n]=r[n]}return[e,t]}function Lf(r,e=r.schema){let{gen:t,data:n,it:s}=r;if(Object.keys(e).length===0)return;let i=t.let("missing");for(let a in e){let c=e[a];if(c.length===0)continue;let u=(0,kn.propertyInData)(t,n,a,s.opts.ownProperties);r.setParams({property:a,depsCount:c.length,deps:c.join(", ")}),s.allErrors?t.if(u,()=>{for(let o of c)(0,kn.checkReportMissingProp)(r,o)}):(t.if((0,ka._)`${u} && (${(0,kn.checkMissingProp)(r,c,i)})`),(0,kn.reportMissingProp)(r,i),t.else())}}ct.validatePropertyDeps=Lf;function Mf(r,e=r.schema){let{gen:t,data:n,keyword:s,it:i}=r,a=t.name("valid");for(let c in e)(0,n0.alwaysValidSchema)(i,e[c])||(t.if((0,kn.propertyInData)(t,n,c,i.opts.ownProperties),()=>{let u=r.subschema({keyword:s,schemaProp:c},a);r.mergeValidEvaluated(u,a)},()=>t.var(a,!0)),r.ok(a))}ct.validateSchemaDeps=Mf;ct.default=s0});var Hf=_(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});var Vf=L(),a0=G(),o0={message:"property name must be valid",params:({params:r})=>(0,Vf._)`{propertyName: ${r.propertyName}}`},c0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:o0,code(r){let{gen:e,schema:t,data:n,it:s}=r;if((0,a0.alwaysValidSchema)(s,t))return;let i=e.name("valid");e.forIn("key",n,a=>{r.setParams({propertyName:a}),r.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,Vf.not)(i),()=>{r.error(!0),s.allErrors||e.break()})}),r.ok(i)}};xa.default=c0});var Ma=_(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var Is=ze(),Qe=L(),u0=$t(),Ts=G(),l0={message:"must NOT have additional properties",params:({params:r})=>(0,Qe._)`{additionalProperty: ${r.additionalProperty}}`},f0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:l0,code(r){let{gen:e,schema:t,parentSchema:n,data:s,errsCount:i,it:a}=r;if(!i)throw new Error("ajv implementation error");let{allErrors:c,opts:u}=a;if(a.props=!0,u.removeAdditional!=="all"&&(0,Ts.alwaysValidSchema)(a,t))return;let o=(0,Is.allSchemaProperties)(n.properties),l=(0,Is.allSchemaProperties)(n.patternProperties);d(),r.ok((0,Qe._)`${i} === ${u0.default.errors}`);function d(){e.forIn("key",s,w=>{!o.length&&!l.length?$(w):e.if(y(w),()=>$(w))})}function y(w){let b;if(o.length>8){let D=(0,Ts.schemaRefOrVal)(a,n.properties,"properties");b=(0,Is.isOwnProperty)(e,D,w)}else o.length?b=(0,Qe.or)(...o.map(D=>(0,Qe._)`${w} === ${D}`)):b=Qe.nil;return l.length&&(b=(0,Qe.or)(b,...l.map(D=>(0,Qe._)`${(0,Is.usePattern)(r,D)}.test(${w})`))),(0,Qe.not)(b)}function m(w){e.code((0,Qe._)`delete ${s}[${w}]`)}function $(w){if(u.removeAdditional==="all"||u.removeAdditional&&t===!1){m(w);return}if(t===!1){r.setParams({additionalProperty:w}),r.error(),c||e.break();return}if(typeof t=="object"&&!(0,Ts.alwaysValidSchema)(a,t)){let b=e.name("valid");u.removeAdditional==="failing"?(E(w,b,!1),e.if((0,Qe.not)(b),()=>{r.reset(),m(w)})):(E(w,b),c||e.if((0,Qe.not)(b),()=>e.break()))}}function E(w,b,D){let T={keyword:"additionalProperties",dataProp:w,dataPropType:Ts.Type.Str};D===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(T,b)}}};La.default=f0});var zf=_(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var d0=Sn(),Uf=ze(),Fa=G(),Gf=Ma(),h0={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Gf.default.code(new d0.KeywordCxt(i,Gf.default,"additionalProperties"));let a=(0,Uf.allSchemaProperties)(t);for(let d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=Fa.mergeEvaluated.props(e,(0,Fa.toHash)(a),i.props));let c=a.filter(d=>!(0,Fa.alwaysValidSchema)(i,t[d]));if(c.length===0)return;let u=e.name("valid");for(let d of c)o(d)?l(d):(e.if((0,Uf.propertyInData)(e,s,d,i.opts.ownProperties)),l(d),i.allErrors||e.else().var(u,!0),e.endIf()),r.it.definedProperties.add(d),r.ok(u);function o(d){return i.opts.useDefaults&&!i.compositeRule&&t[d].default!==void 0}function l(d){r.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};Va.default=h0});var Bf=_(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var Kf=ze(),As=L(),Xf=G(),Wf=G(),p0={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:s,it:i}=r,{opts:a}=i,c=(0,Kf.allSchemaProperties)(t),u=c.filter(E=>(0,Xf.alwaysValidSchema)(i,t[E]));if(c.length===0||u.length===c.length&&(!i.opts.unevaluated||i.props===!0))return;let o=a.strictSchema&&!a.allowMatchingProperties&&s.properties,l=e.name("valid");i.props!==!0&&!(i.props instanceof As.Name)&&(i.props=(0,Wf.evaluatedPropsToName)(e,i.props));let{props:d}=i;y();function y(){for(let E of c)o&&m(E),i.allErrors?$(E):(e.var(l,!0),$(E),e.if(l))}function m(E){for(let w in o)new RegExp(E).test(w)&&(0,Xf.checkStrictMode)(i,`property ${w} matches pattern ${E} (use allowMatchingProperties)`)}function $(E){e.forIn("key",n,w=>{e.if((0,As._)`${(0,Kf.usePattern)(r,E)}.test(${w})`,()=>{let b=u.includes(E);b||r.subschema({keyword:"patternProperties",schemaProp:E,dataProp:w,dataPropType:Wf.Type.Str},l),i.opts.unevaluated&&d!==!0?e.assign((0,As._)`${d}[${w}]`,!0):!b&&!i.allErrors&&e.if((0,As.not)(l),()=>e.break())})})}}};Ha.default=p0});var Jf=_(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var m0=G(),g0={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,m0.alwaysValidSchema)(n,t)){r.fail();return}let s=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};Ua.default=g0});var Yf=_(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var v0=ze(),_0={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:v0.validateUnion,error:{message:"must match a schema in anyOf"}};Ga.default=_0});var Zf=_(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var qs=L(),y0=G(),$0={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,qs._)`{passingSchemas: ${r.passing}}`},E0={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$0,code(r){let{gen:e,schema:t,parentSchema:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;let i=t,a=e.let("valid",!1),c=e.let("passing",null),u=e.name("_valid");r.setParams({passing:c}),e.block(o),r.result(a,()=>r.reset(),()=>r.error(!0));function o(){i.forEach((l,d)=>{let y;(0,y0.alwaysValidSchema)(s,l)?e.var(u,!0):y=r.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&e.if((0,qs._)`${u} && ${a}`).assign(a,!1).assign(c,(0,qs._)`[${c}, ${d}]`).else(),e.if(u,()=>{e.assign(a,!0),e.assign(c,d),y&&r.mergeEvaluated(y,qs.Name)})})}}};za.default=E0});var Qf=_(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var w0=G(),b0={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let s=e.name("valid");t.forEach((i,a)=>{if((0,w0.alwaysValidSchema)(n,i))return;let c=r.subschema({keyword:"allOf",schemaProp:a},s);r.ok(s),r.mergeEvaluated(c)})}};Ka.default=b0});var rd=_(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});var Ds=L(),td=G(),S0={message:({params:r})=>(0,Ds.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,Ds._)`{failingKeyword: ${r.ifClause}}`},O0={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:S0,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,td.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let s=ed(n,"then"),i=ed(n,"else");if(!s&&!i)return;let a=e.let("valid",!0),c=e.name("_valid");if(u(),r.reset(),s&&i){let l=e.let("ifClause");r.setParams({ifClause:l}),e.if(c,o("then",l),o("else",l))}else s?e.if(c,o("then")):e.if((0,Ds.not)(c),o("else"));r.pass(a,()=>r.error(!0));function u(){let l=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);r.mergeEvaluated(l)}function o(l,d){return()=>{let y=r.subschema({keyword:l},c);e.assign(a,c),r.mergeValidEvaluated(y,a),d?e.assign(d,(0,Ds._)`${l}`):r.setParams({ifClause:l})}}}};function ed(r,e){let t=r.schema[e];return t!==void 0&&!(0,td.alwaysValidSchema)(r,t)}Xa.default=O0});var nd=_(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});var P0=G(),R0={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,P0.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};Wa.default=R0});var sd=_(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var C0=Ta(),N0=Df(),I0=Aa(),T0=kf(),A0=xf(),q0=Ff(),D0=Hf(),j0=Ma(),k0=zf(),x0=Bf(),L0=Jf(),M0=Yf(),F0=Zf(),V0=Qf(),H0=rd(),U0=nd();function G0(r=!1){let e=[L0.default,M0.default,F0.default,V0.default,H0.default,U0.default,D0.default,j0.default,q0.default,k0.default,x0.default];return r?e.push(N0.default,T0.default):e.push(C0.default,I0.default),e.push(A0.default),e}Ba.default=G0});var id=_(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var oe=L(),z0={message:({schemaCode:r})=>(0,oe.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,oe._)`{format: ${r}}`},K0={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:z0,code(r,e){let{gen:t,data:n,$data:s,schema:i,schemaCode:a,it:c}=r,{opts:u,errSchemaPath:o,schemaEnv:l,self:d}=c;if(!u.validateFormats)return;s?y():m();function y(){let $=t.scopeValue("formats",{ref:d.formats,code:u.code.formats}),E=t.const("fDef",(0,oe._)`${$}[${a}]`),w=t.let("fType"),b=t.let("format");t.if((0,oe._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>t.assign(w,(0,oe._)`${E}.type || "string"`).assign(b,(0,oe._)`${E}.validate`),()=>t.assign(w,(0,oe._)`"string"`).assign(b,E)),r.fail$data((0,oe.or)(D(),T()));function D(){return u.strictSchema===!1?oe.nil:(0,oe._)`${a} && !${b}`}function T(){let z=l.$async?(0,oe._)`(${E}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,oe._)`${b}(${n})`,C=(0,oe._)`(typeof ${b} == "function" ? ${z} : ${b}.test(${n}))`;return(0,oe._)`${b} && ${b} !== true && ${w} === ${e} && !${C}`}}function m(){let $=d.formats[i];if(!$){D();return}if($===!0)return;let[E,w,b]=T($);E===e&&r.pass(z());function D(){if(u.strictSchema===!1){d.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${i}" ignored in schema at path "${o}"`}}function T(C){let me=C instanceof RegExp?(0,oe.regexpCode)(C):u.code.formats?(0,oe._)`${u.code.formats}${(0,oe.getProperty)(i)}`:void 0,ke=t.scopeValue("formats",{key:i,ref:C,code:me});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,oe._)`${ke}.validate`]:["string",C,ke]}function z(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!l.$async)throw new Error("async format in sync schema");return(0,oe._)`await ${b}(${n})`}return typeof w=="function"?(0,oe._)`${b}(${n})`:(0,oe._)`${b}.test(${n})`}}}};Ja.default=K0});var ad=_(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});var X0=id(),W0=[X0.default];Ya.default=W0});var od=_(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.contentVocabulary=Ir.metadataVocabulary=void 0;Ir.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ir.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var ud=_(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var B0=gf(),J0=If(),Y0=sd(),Z0=ad(),cd=od(),Q0=[B0.default,J0.default,(0,Y0.default)(),Z0.default,cd.metadataVocabulary,cd.contentVocabulary];Za.default=Q0});var ld=_(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.DiscrError=void 0;var e$;(function(r){r.Tag="tag",r.Mapping="mapping"})(e$=xn.DiscrError||(xn.DiscrError={}))});var dd=_(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var Tr=L(),Qa=ld(),fd=ys(),t$=G(),r$={message:({params:{discrError:r,tagName:e}})=>r===Qa.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,Tr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},n$={keyword:"discriminator",type:"object",schemaType:"object",error:r$,code(r){let{gen:e,data:t,schema:n,parentSchema:s,it:i}=r,{oneOf:a}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let c=n.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),o=e.const("tag",(0,Tr._)`${t}${(0,Tr.getProperty)(c)}`);e.if((0,Tr._)`typeof ${o} == "string"`,()=>l(),()=>r.error(!1,{discrError:Qa.DiscrError.Tag,tag:o,tagName:c})),r.ok(u);function l(){let m=y();e.if(!1);for(let $ in m)e.elseIf((0,Tr._)`${o} === ${$}`),e.assign(u,d(m[$]));e.else(),r.error(!1,{discrError:Qa.DiscrError.Mapping,tag:o,tagName:c}),e.endIf()}function d(m){let $=e.name("valid"),E=r.subschema({keyword:"oneOf",schemaProp:m},$);return r.mergeEvaluated(E,Tr.Name),$}function y(){var m;let $={},E=b(s),w=!0;for(let z=0;z<a.length;z++){let C=a[z];(C==null?void 0:C.$ref)&&!(0,t$.schemaHasRulesButRef)(C,i.self.RULES)&&(C=fd.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,C==null?void 0:C.$ref),C instanceof fd.SchemaEnv&&(C=C.schema));let me=(m=C==null?void 0:C.properties)===null||m===void 0?void 0:m[c];if(typeof me!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);w=w&&(E||b(C)),D(me,z)}if(!w)throw new Error(`discriminator: "${c}" must be required`);return $;function b({required:z}){return Array.isArray(z)&&z.includes(c)}function D(z,C){if(z.const)T(z.const,C);else if(z.enum)for(let me of z.enum)T(me,C);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function T(z,C){if(typeof z!="string"||z in $)throw new Error(`discriminator: "${c}" values must be unique strings`);$[z]=C}}}};eo.default=n$});var hd=_((Lb,s$)=>{s$.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var gd=_((le,md)=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.CodeGen=le.Name=le.nil=le.stringify=le.str=le._=le.KeywordCxt=void 0;var i$=lf(),a$=ud(),o$=dd(),pd=hd(),c$=["/properties"],js="http://json-schema.org/draft-07/schema",ks=class extends i$.default{_addVocabularies(){super._addVocabularies(),a$.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o$.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(pd,c$):pd;this.addMetaSchema(e,js,!1),this.refs["http://json-schema.org/schema"]=js}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(js)?js:void 0)}};md.exports=le=ks;Object.defineProperty(le,"__esModule",{value:!0});le.default=ks;var u$=Sn();Object.defineProperty(le,"KeywordCxt",{enumerable:!0,get:function(){return u$.KeywordCxt}});var Ar=L();Object.defineProperty(le,"_",{enumerable:!0,get:function(){return Ar._}});Object.defineProperty(le,"str",{enumerable:!0,get:function(){return Ar.str}});Object.defineProperty(le,"stringify",{enumerable:!0,get:function(){return Ar.stringify}});Object.defineProperty(le,"nil",{enumerable:!0,get:function(){return Ar.nil}});Object.defineProperty(le,"Name",{enumerable:!0,get:function(){return Ar.Name}});Object.defineProperty(le,"CodeGen",{enumerable:!0,get:function(){return Ar.CodeGen}})});var er=_(qr=>{"use strict";var l$=qr&&qr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qr,"__esModule",{value:!0});qr.ServerlessError=void 0;var f$=l$(vt()),d$=f$.default.Logger,h$=new d$("S-CLI-ERROR"),p$=function(){function r(e,t,n){h$.error(e+": "+t,n),process.exit(1)}return r}();qr.ServerlessError=p$});var vd=_(Dr=>{"use strict";var m$=Dr&&Dr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.CommandError=void 0;var g$=er(),v$=function(r){m$(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(g$.ServerlessError);Dr.CommandError=v$});var _d=_(jr=>{"use strict";var _$=jr&&jr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(jr,"__esModule",{value:!0});jr.ConfigDeleteError=void 0;var y$=er(),$$=function(r){_$(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(y$.ServerlessError);jr.ConfigDeleteError=$$});var yd=_(kr=>{"use strict";var E$=kr&&kr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(kr,"__esModule",{value:!0});kr.ConfigError=void 0;var w$=er(),b$=function(r){E$(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(w$.ServerlessError);kr.ConfigError=b$});var $d=_(xr=>{"use strict";var S$=xr&&xr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(xr,"__esModule",{value:!0});xr.ConfigGetError=void 0;var O$=er(),P$=function(r){S$(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(O$.ServerlessError);xr.ConfigGetError=P$});var Ed=_(Lr=>{"use strict";var R$=Lr&&Lr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.InitError=void 0;var C$=er(),N$=function(r){R$(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(C$.ServerlessError);Lr.InitError=N$});var bd=_(ut=>{"use strict";var I$=ut&&ut.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},T$=ut&&ut.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},A$=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ut,"__esModule",{value:!0});ut.HumanError=void 0;var wd=A$(vt()),xs=un(),q$=wd.default.colors,D$=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,xs.logger.log(`
29
- `.concat((0,xs.bgRed)("ERROR:"))),xs.logger.log("TypeError: ".concat(t,`
30
- `)),n&&xs.logger.log("".concat(q$.gray(n),`
31
- `))}return r.prototype.report=function(e){return I$(this,void 0,void 0,function(){var t;return T$(this,function(n){switch(n.label){case 0:return t=e.error,[4,wd.default.report({type:"jsError",content:"".concat(this.errorMessage,"||").concat(t.stack)})];case 1:return n.sent(),[2]}})})},r}();ut.HumanError=D$});var Od=_(Mr=>{"use strict";var j$=Mr&&Mr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.HumanWarning=void 0;var k$=j$(vt()),to=un(),Sd=k$.default.colors,x$=function(){function r(e){var t=e.warningMessage,n=e.tips;to.logger.log(`
32
- `.concat(Sd.hex("#000").bgYellow("WARNING:"))),to.logger.log("".concat(t,`
33
- `)),n&&to.logger.log("".concat(Sd.gray(n),`
34
- `))}return r}();Mr.HumanWarning=x$});var Pd=_(ee=>{"use strict";var L$=ee&&ee.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},M$=ee&&ee.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},F$=ee&&ee.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ee,"__esModule",{value:!0});ee.HandleError=ee.HumanWarning=ee.HumanError=ee.ServerlessError=ee.InitError=ee.ConfigGetError=ee.ConfigError=ee.ConfigDeleteError=ee.CommandError=void 0;var Q=un(),Ln=F$(vt()),qt=Ln.default.colors,V$=Ln.default.report,ro=Ln.default.isDebugMode,H$=Ln.default.makeUnderLine,no=Ln.default.isDocker,U$=vd();Object.defineProperty(ee,"CommandError",{enumerable:!0,get:function(){return U$.CommandError}});var G$=_d();Object.defineProperty(ee,"ConfigDeleteError",{enumerable:!0,get:function(){return G$.ConfigDeleteError}});var z$=yd();Object.defineProperty(ee,"ConfigError",{enumerable:!0,get:function(){return z$.ConfigError}});var K$=$d();Object.defineProperty(ee,"ConfigGetError",{enumerable:!0,get:function(){return K$.ConfigGetError}});var X$=Ed();Object.defineProperty(ee,"InitError",{enumerable:!0,get:function(){return X$.InitError}});var W$=er();Object.defineProperty(ee,"ServerlessError",{enumerable:!0,get:function(){return W$.ServerlessError}});var B$=bd();Object.defineProperty(ee,"HumanError",{enumerable:!0,get:function(){return B$.HumanError}});var J$=Od();Object.defineProperty(ee,"HumanWarning",{enumerable:!0,get:function(){return J$.HumanWarning}});function Ls(r,e){return"".concat(qt.gray(r)).concat(qt.gray.underline(e))}var Y$=function(r){return L$(void 0,void 0,void 0,function(){var e,t,n,s,i,a,c,u;return M$(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,s=(0,Q.getConfig)("analysis"),s!=="disable"&&(t.traceId=process.env.serverless_devs_trace_id),i=r.message?r.message:"";try{a=JSON.parse(i)}catch{}return a&&a.tips?(c=a.message?"Message: ".concat(a.message,`
35
- `):"",u=a.tips?"* ".concat(H$(a.tips.replace(/\n/,`
28
+ deps: ${t}}`};var z0={keyword:"dependencies",type:"object",schemaType:"object",error:ct.error,code(r){let[e,t]=K0(r);Mf(r,e),Ff(r,t)}};function K0({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let s=Array.isArray(r[n])?e:t;s[n]=r[n]}return[e,t]}function Mf(r,e=r.schema){let{gen:t,data:n,it:s}=r;if(Object.keys(e).length===0)return;let i=t.let("missing");for(let a in e){let c=e[a];if(c.length===0)continue;let u=(0,xn.propertyInData)(t,n,a,s.opts.ownProperties);r.setParams({property:a,depsCount:c.length,deps:c.join(", ")}),s.allErrors?t.if(u,()=>{for(let o of c)(0,xn.checkReportMissingProp)(r,o)}):(t.if((0,ka._)`${u} && (${(0,xn.checkMissingProp)(r,c,i)})`),(0,xn.reportMissingProp)(r,i),t.else())}}ct.validatePropertyDeps=Mf;function Ff(r,e=r.schema){let{gen:t,data:n,keyword:s,it:i}=r,a=t.name("valid");for(let c in e)(0,G0.alwaysValidSchema)(i,e[c])||(t.if((0,xn.propertyInData)(t,n,c,i.opts.ownProperties),()=>{let u=r.subschema({keyword:s,schemaProp:c},a);r.mergeValidEvaluated(u,a)},()=>t.var(a,!0)),r.ok(a))}ct.validateSchemaDeps=Ff;ct.default=z0});var Uf=_(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});var Hf=L(),X0=G(),W0={message:"property name must be valid",params:({params:r})=>(0,Hf._)`{propertyName: ${r.propertyName}}`},B0={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:W0,code(r){let{gen:e,schema:t,data:n,it:s}=r;if((0,X0.alwaysValidSchema)(s,t))return;let i=e.name("valid");e.forIn("key",n,a=>{r.setParams({propertyName:a}),r.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),e.if((0,Hf.not)(i),()=>{r.error(!0),s.allErrors||e.break()})}),r.ok(i)}};xa.default=B0});var Ma=_(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});var Ns=ze(),Qe=L(),J0=$t(),Is=G(),Y0={message:"must NOT have additional properties",params:({params:r})=>(0,Qe._)`{additionalProperty: ${r.additionalProperty}}`},Z0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Y0,code(r){let{gen:e,schema:t,parentSchema:n,data:s,errsCount:i,it:a}=r;if(!i)throw new Error("ajv implementation error");let{allErrors:c,opts:u}=a;if(a.props=!0,u.removeAdditional!=="all"&&(0,Is.alwaysValidSchema)(a,t))return;let o=(0,Ns.allSchemaProperties)(n.properties),l=(0,Ns.allSchemaProperties)(n.patternProperties);d(),r.ok((0,Qe._)`${i} === ${J0.default.errors}`);function d(){e.forIn("key",s,w=>{!o.length&&!l.length?$(w):e.if(y(w),()=>$(w))})}function y(w){let b;if(o.length>8){let D=(0,Is.schemaRefOrVal)(a,n.properties,"properties");b=(0,Ns.isOwnProperty)(e,D,w)}else o.length?b=(0,Qe.or)(...o.map(D=>(0,Qe._)`${w} === ${D}`)):b=Qe.nil;return l.length&&(b=(0,Qe.or)(b,...l.map(D=>(0,Qe._)`${(0,Ns.usePattern)(r,D)}.test(${w})`))),(0,Qe.not)(b)}function m(w){e.code((0,Qe._)`delete ${s}[${w}]`)}function $(w){if(u.removeAdditional==="all"||u.removeAdditional&&t===!1){m(w);return}if(t===!1){r.setParams({additionalProperty:w}),r.error(),c||e.break();return}if(typeof t=="object"&&!(0,Is.alwaysValidSchema)(a,t)){let b=e.name("valid");u.removeAdditional==="failing"?(E(w,b,!1),e.if((0,Qe.not)(b),()=>{r.reset(),m(w)})):(E(w,b),c||e.if((0,Qe.not)(b),()=>e.break()))}}function E(w,b,D){let T={keyword:"additionalProperties",dataProp:w,dataPropType:Is.Type.Str};D===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(T,b)}}};La.default=Z0});var Kf=_(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});var Q0=On(),Gf=ze(),Fa=G(),zf=Ma(),e$={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&zf.default.code(new Q0.KeywordCxt(i,zf.default,"additionalProperties"));let a=(0,Gf.allSchemaProperties)(t);for(let d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=Fa.mergeEvaluated.props(e,(0,Fa.toHash)(a),i.props));let c=a.filter(d=>!(0,Fa.alwaysValidSchema)(i,t[d]));if(c.length===0)return;let u=e.name("valid");for(let d of c)o(d)?l(d):(e.if((0,Gf.propertyInData)(e,s,d,i.opts.ownProperties)),l(d),i.allErrors||e.else().var(u,!0),e.endIf()),r.it.definedProperties.add(d),r.ok(u);function o(d){return i.opts.useDefaults&&!i.compositeRule&&t[d].default!==void 0}function l(d){r.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};Va.default=e$});var Jf=_(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var Xf=ze(),Ts=L(),Wf=G(),Bf=G(),t$={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:s,it:i}=r,{opts:a}=i,c=(0,Xf.allSchemaProperties)(t),u=c.filter(E=>(0,Wf.alwaysValidSchema)(i,t[E]));if(c.length===0||u.length===c.length&&(!i.opts.unevaluated||i.props===!0))return;let o=a.strictSchema&&!a.allowMatchingProperties&&s.properties,l=e.name("valid");i.props!==!0&&!(i.props instanceof Ts.Name)&&(i.props=(0,Bf.evaluatedPropsToName)(e,i.props));let{props:d}=i;y();function y(){for(let E of c)o&&m(E),i.allErrors?$(E):(e.var(l,!0),$(E),e.if(l))}function m(E){for(let w in o)new RegExp(E).test(w)&&(0,Wf.checkStrictMode)(i,`property ${w} matches pattern ${E} (use allowMatchingProperties)`)}function $(E){e.forIn("key",n,w=>{e.if((0,Ts._)`${(0,Xf.usePattern)(r,E)}.test(${w})`,()=>{let b=u.includes(E);b||r.subschema({keyword:"patternProperties",schemaProp:E,dataProp:w,dataPropType:Bf.Type.Str},l),i.opts.unevaluated&&d!==!0?e.assign((0,Ts._)`${d}[${w}]`,!0):!b&&!i.allErrors&&e.if((0,Ts.not)(l),()=>e.break())})})}}};Ha.default=t$});var Yf=_(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});var r$=G(),n$={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,r$.alwaysValidSchema)(n,t)){r.fail();return}let s=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};Ua.default=n$});var Zf=_(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var s$=ze(),i$={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:s$.validateUnion,error:{message:"must match a schema in anyOf"}};Ga.default=i$});var Qf=_(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var As=L(),a$=G(),o$={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,As._)`{passingSchemas: ${r.passing}}`},c$={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:o$,code(r){let{gen:e,schema:t,parentSchema:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;let i=t,a=e.let("valid",!1),c=e.let("passing",null),u=e.name("_valid");r.setParams({passing:c}),e.block(o),r.result(a,()=>r.reset(),()=>r.error(!0));function o(){i.forEach((l,d)=>{let y;(0,a$.alwaysValidSchema)(s,l)?e.var(u,!0):y=r.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&e.if((0,As._)`${u} && ${a}`).assign(a,!1).assign(c,(0,As._)`[${c}, ${d}]`).else(),e.if(u,()=>{e.assign(a,!0),e.assign(c,d),y&&r.mergeEvaluated(y,As.Name)})})}}};za.default=c$});var ed=_(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var u$=G(),l$={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let s=e.name("valid");t.forEach((i,a)=>{if((0,u$.alwaysValidSchema)(n,i))return;let c=r.subschema({keyword:"allOf",schemaProp:a},s);r.ok(s),r.mergeEvaluated(c)})}};Ka.default=l$});var nd=_(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});var qs=L(),rd=G(),f$={message:({params:r})=>(0,qs.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,qs._)`{failingKeyword: ${r.ifClause}}`},d$={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:f$,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,rd.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let s=td(n,"then"),i=td(n,"else");if(!s&&!i)return;let a=e.let("valid",!0),c=e.name("_valid");if(u(),r.reset(),s&&i){let l=e.let("ifClause");r.setParams({ifClause:l}),e.if(c,o("then",l),o("else",l))}else s?e.if(c,o("then")):e.if((0,qs.not)(c),o("else"));r.pass(a,()=>r.error(!0));function u(){let l=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);r.mergeEvaluated(l)}function o(l,d){return()=>{let y=r.subschema({keyword:l},c);e.assign(a,c),r.mergeValidEvaluated(y,a),d?e.assign(d,(0,qs._)`${l}`):r.setParams({ifClause:l})}}}};function td(r,e){let t=r.schema[e];return t!==void 0&&!(0,rd.alwaysValidSchema)(r,t)}Xa.default=d$});var sd=_(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});var h$=G(),p$={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,h$.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};Wa.default=p$});var id=_(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});var m$=Ta(),g$=jf(),v$=Aa(),_$=xf(),y$=Lf(),$$=Vf(),E$=Uf(),w$=Ma(),b$=Kf(),S$=Jf(),O$=Yf(),P$=Zf(),R$=Qf(),C$=ed(),N$=nd(),I$=sd();function T$(r=!1){let e=[O$.default,P$.default,R$.default,C$.default,N$.default,I$.default,E$.default,w$.default,$$.default,b$.default,S$.default];return r?e.push(g$.default,_$.default):e.push(m$.default,v$.default),e.push(y$.default),e}Ba.default=T$});var ad=_(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});var oe=L(),A$={message:({schemaCode:r})=>(0,oe.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,oe._)`{format: ${r}}`},q$={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:A$,code(r,e){let{gen:t,data:n,$data:s,schema:i,schemaCode:a,it:c}=r,{opts:u,errSchemaPath:o,schemaEnv:l,self:d}=c;if(!u.validateFormats)return;s?y():m();function y(){let $=t.scopeValue("formats",{ref:d.formats,code:u.code.formats}),E=t.const("fDef",(0,oe._)`${$}[${a}]`),w=t.let("fType"),b=t.let("format");t.if((0,oe._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>t.assign(w,(0,oe._)`${E}.type || "string"`).assign(b,(0,oe._)`${E}.validate`),()=>t.assign(w,(0,oe._)`"string"`).assign(b,E)),r.fail$data((0,oe.or)(D(),T()));function D(){return u.strictSchema===!1?oe.nil:(0,oe._)`${a} && !${b}`}function T(){let z=l.$async?(0,oe._)`(${E}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,oe._)`${b}(${n})`,C=(0,oe._)`(typeof ${b} == "function" ? ${z} : ${b}.test(${n}))`;return(0,oe._)`${b} && ${b} !== true && ${w} === ${e} && !${C}`}}function m(){let $=d.formats[i];if(!$){D();return}if($===!0)return;let[E,w,b]=T($);E===e&&r.pass(z());function D(){if(u.strictSchema===!1){d.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${i}" ignored in schema at path "${o}"`}}function T(C){let me=C instanceof RegExp?(0,oe.regexpCode)(C):u.code.formats?(0,oe._)`${u.code.formats}${(0,oe.getProperty)(i)}`:void 0,ke=t.scopeValue("formats",{key:i,ref:C,code:me});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,oe._)`${ke}.validate`]:["string",C,ke]}function z(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!l.$async)throw new Error("async format in sync schema");return(0,oe._)`await ${b}(${n})`}return typeof w=="function"?(0,oe._)`${b}(${n})`:(0,oe._)`${b}.test(${n})`}}}};Ja.default=q$});var od=_(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});var D$=ad(),j$=[D$.default];Ya.default=j$});var cd=_(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.contentVocabulary=Ir.metadataVocabulary=void 0;Ir.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ir.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var ld=_(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var k$=vf(),x$=Tf(),L$=id(),M$=od(),ud=cd(),F$=[k$.default,x$.default,(0,L$.default)(),M$.default,ud.metadataVocabulary,ud.contentVocabulary];Za.default=F$});var fd=_(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.DiscrError=void 0;var V$;(function(r){r.Tag="tag",r.Mapping="mapping"})(V$=Ln.DiscrError||(Ln.DiscrError={}))});var hd=_(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var Tr=L(),Qa=fd(),dd=_s(),H$=G(),U$={message:({params:{discrError:r,tagName:e}})=>r===Qa.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,Tr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},G$={keyword:"discriminator",type:"object",schemaType:"object",error:U$,code(r){let{gen:e,data:t,schema:n,parentSchema:s,it:i}=r,{oneOf:a}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let c=n.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),o=e.const("tag",(0,Tr._)`${t}${(0,Tr.getProperty)(c)}`);e.if((0,Tr._)`typeof ${o} == "string"`,()=>l(),()=>r.error(!1,{discrError:Qa.DiscrError.Tag,tag:o,tagName:c})),r.ok(u);function l(){let m=y();e.if(!1);for(let $ in m)e.elseIf((0,Tr._)`${o} === ${$}`),e.assign(u,d(m[$]));e.else(),r.error(!1,{discrError:Qa.DiscrError.Mapping,tag:o,tagName:c}),e.endIf()}function d(m){let $=e.name("valid"),E=r.subschema({keyword:"oneOf",schemaProp:m},$);return r.mergeEvaluated(E,Tr.Name),$}function y(){var m;let $={},E=b(s),w=!0;for(let z=0;z<a.length;z++){let C=a[z];(C==null?void 0:C.$ref)&&!(0,H$.schemaHasRulesButRef)(C,i.self.RULES)&&(C=dd.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,C==null?void 0:C.$ref),C instanceof dd.SchemaEnv&&(C=C.schema));let me=(m=C==null?void 0:C.properties)===null||m===void 0?void 0:m[c];if(typeof me!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);w=w&&(E||b(C)),D(me,z)}if(!w)throw new Error(`discriminator: "${c}" must be required`);return $;function b({required:z}){return Array.isArray(z)&&z.includes(c)}function D(z,C){if(z.const)T(z.const,C);else if(z.enum)for(let me of z.enum)T(me,C);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function T(z,C){if(typeof z!="string"||z in $)throw new Error(`discriminator: "${c}" values must be unique strings`);$[z]=C}}}};eo.default=G$});var pd=_((OS,z$)=>{z$.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var vd=_((le,gd)=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.CodeGen=le.Name=le.nil=le.stringify=le.str=le._=le.KeywordCxt=void 0;var K$=ff(),X$=ld(),W$=hd(),md=pd(),B$=["/properties"],Ds="http://json-schema.org/draft-07/schema",js=class extends K$.default{_addVocabularies(){super._addVocabularies(),X$.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(W$.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(md,B$):md;this.addMetaSchema(e,Ds,!1),this.refs["http://json-schema.org/schema"]=Ds}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ds)?Ds:void 0)}};gd.exports=le=js;Object.defineProperty(le,"__esModule",{value:!0});le.default=js;var J$=On();Object.defineProperty(le,"KeywordCxt",{enumerable:!0,get:function(){return J$.KeywordCxt}});var Ar=L();Object.defineProperty(le,"_",{enumerable:!0,get:function(){return Ar._}});Object.defineProperty(le,"str",{enumerable:!0,get:function(){return Ar.str}});Object.defineProperty(le,"stringify",{enumerable:!0,get:function(){return Ar.stringify}});Object.defineProperty(le,"nil",{enumerable:!0,get:function(){return Ar.nil}});Object.defineProperty(le,"Name",{enumerable:!0,get:function(){return Ar.Name}});Object.defineProperty(le,"CodeGen",{enumerable:!0,get:function(){return Ar.CodeGen}})});var er=_(qr=>{"use strict";var Y$=qr&&qr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qr,"__esModule",{value:!0});qr.ServerlessError=void 0;var Z$=Y$(vt()),Q$=Z$.default.Logger,eE=new Q$("S-CLI-ERROR"),tE=function(){function r(e,t,n){eE.error(e+": "+t,n),process.exit(1)}return r}();qr.ServerlessError=tE});var _d=_(Dr=>{"use strict";var rE=Dr&&Dr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.CommandError=void 0;var nE=er(),sE=function(r){rE(e,r);function e(t,n){return r.call(this,"Error",t,n)||this}return e}(nE.ServerlessError);Dr.CommandError=sE});var yd=_(jr=>{"use strict";var iE=jr&&jr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(jr,"__esModule",{value:!0});jr.ConfigDeleteError=void 0;var aE=er(),oE=function(r){iE(e,r);function e(t,n){return r.call(this,"Deletion failed",t,n)||this}return e}(aE.ServerlessError);jr.ConfigDeleteError=oE});var $d=_(kr=>{"use strict";var cE=kr&&kr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(kr,"__esModule",{value:!0});kr.ConfigError=void 0;var uE=er(),lE=function(r){cE(e,r);function e(t,n){return r.call(this,"Config failed",t,n)||this}return e}(uE.ServerlessError);kr.ConfigError=lE});var Ed=_(xr=>{"use strict";var fE=xr&&xr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(xr,"__esModule",{value:!0});xr.ConfigGetError=void 0;var dE=er(),hE=function(r){fE(e,r);function e(t,n){return r.call(this,"Get failed",t,n)||this}return e}(dE.ServerlessError);xr.ConfigGetError=hE});var wd=_(Lr=>{"use strict";var pE=Lr&&Lr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.InitError=void 0;var mE=er(),gE=function(r){pE(e,r);function e(t,n){return r.call(this,"Initialization failed",t,n)||this}return e}(mE.ServerlessError);Lr.InitError=gE});var Sd=_(ut=>{"use strict";var vE=ut&&ut.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},_E=ut&&ut.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},yE=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ut,"__esModule",{value:!0});ut.HumanError=void 0;var bd=yE(vt()),ks=ln(),$E=bd.default.colors,EE=function(){function r(e){var t=e.errorMessage,n=e.tips;this.errorMessage=t,ks.logger.log(`
29
+ `.concat((0,ks.bgRed)("ERROR:"))),ks.logger.log("TypeError: ".concat(t,`
30
+ `)),n&&ks.logger.log("".concat($E.gray(n),`
31
+ `))}return r.prototype.report=function(e){return vE(this,void 0,void 0,function(){var t;return _E(this,function(n){switch(n.label){case 0:return t=e.error,[4,bd.default.report({type:"jsError",errorMessage:this.errorMessage,errorStack:t.stack})];case 1:return n.sent(),[2]}})})},r}();ut.HumanError=EE});var Pd=_(Mr=>{"use strict";var wE=Mr&&Mr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.HumanWarning=void 0;var bE=wE(vt()),to=ln(),Od=bE.default.colors,SE=function(){function r(e){var t=e.warningMessage,n=e.tips;to.logger.log(`
32
+ `.concat(Od.hex("#000").bgYellow("WARNING:"))),to.logger.log("".concat(t,`
33
+ `)),n&&to.logger.log("".concat(Od.gray(n),`
34
+ `))}return r}();Mr.HumanWarning=SE});var Cd=_(ee=>{"use strict";var OE=ee&&ee.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},PE=ee&&ee.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Rd=ee&&ee.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ee,"__esModule",{value:!0});ee.HandleError=ee.HumanWarning=ee.HumanError=ee.ServerlessError=ee.InitError=ee.ConfigGetError=ee.ConfigError=ee.ConfigDeleteError=ee.CommandError=void 0;var Q=ln(),RE=Rd(require("path")),Fr=Rd(vt()),qt=Fr.default.colors,CE=Fr.default.report,ro=Fr.default.isDebugMode,NE=Fr.default.makeUnderLine,no=Fr.default.isDocker,IE=_d();Object.defineProperty(ee,"CommandError",{enumerable:!0,get:function(){return IE.CommandError}});var TE=yd();Object.defineProperty(ee,"ConfigDeleteError",{enumerable:!0,get:function(){return TE.ConfigDeleteError}});var AE=$d();Object.defineProperty(ee,"ConfigError",{enumerable:!0,get:function(){return AE.ConfigError}});var qE=Ed();Object.defineProperty(ee,"ConfigGetError",{enumerable:!0,get:function(){return qE.ConfigGetError}});var DE=wd();Object.defineProperty(ee,"InitError",{enumerable:!0,get:function(){return DE.InitError}});var jE=er();Object.defineProperty(ee,"ServerlessError",{enumerable:!0,get:function(){return jE.ServerlessError}});var kE=Sd();Object.defineProperty(ee,"HumanError",{enumerable:!0,get:function(){return kE.HumanError}});var xE=Pd();Object.defineProperty(ee,"HumanWarning",{enumerable:!0,get:function(){return xE.HumanWarning}});function xs(r,e){return"".concat(qt.gray(r)).concat(qt.gray.underline(e))}var LE=function(r){return OE(void 0,void 0,void 0,function(){var e,t,n,s,i,a,c,u;return PE(this,function(o){switch(o.label){case 0:e="Message:",t={traceId:"",catchableError:!1},n=r,s=(0,Q.getConfig)("analysis"),s!=="disable"&&(t.traceId=process.env.serverless_devs_trace_id),i=r.message?r.message:"";try{a=JSON.parse(i)}catch{}return a&&a.tips?(c=a.message?"Message: ".concat(a.message,`
35
+ `):"",u=a.tips?"* ".concat(NE(a.tips.replace(/\n/,`
36
36
  * `))):"",Q.logger.log(`
37
37
  `.concat(qt.hex("#000").bgYellow("WARNING:"),`
38
38
  ======================
@@ -44,12 +44,13 @@ You can try to solve the problem through: `.concat($r.underline(s),`
44
44
  `)),[4,(0,Q.aiRequest)(a.message)]):[3,3];case 2:return o.sent(),n=a,[3,5];case 3:return Q.logger.log((0,Q.red)("\u2716 ".concat(e,`
45
45
  `))),Q.logger.log("".concat((0,Q.bgRed)("ERROR:"),`
46
46
  `)),Q.logger.log(ro()||no()?r.stack:"".concat(i,`
47
- `)),[4,(0,Q.aiRequest)(i)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&Q.logger.log(qt.gray("TraceId: ".concat(t.traceId))),no()||(Q.logger.log(qt.gray("Environment: ".concat((0,Q.getVersion)()))),Q.logger.log(Ls("Documents: ","https://www.serverless-devs.com")),Q.logger.log(Ls("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),Q.logger.log(Ls("Issues: ","https://github.com/Serverless-Devs/Serverless-Devs/issues")),Q.logger.log(Ls("Regsitry: ",`https://registry.serverless-devs.com
48
- `)),t.traceId&&Q.logger.log(qt.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))))),!no()&&Q.logger.log(qt.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,V$({type:"jsError",content:"".concat(n.message,"||").concat(n.stack),traceId:t.traceId})]:[3,7];case 6:o.sent(),o.label=7;case 7:return process.exit(n.code||1),[2]}})})};ee.HandleError=Y$});var Rd=exports&&exports.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},Cd=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Mn=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var Z$=Mn(ko()),wt=Mn(vt()),Q$=Mn(yi()),Fr=un(),eE=Mn(require("path")),tE=Mn(gd()),rE=Pd(),so=wt.default.colors,nE=wt.default.getYamlContent,Te=wt.default.lodash,sE=wt.default.loadComponent,iE=wt.default.fse,aE=wt.default.parseYaml,oE=wt.default.spinner,Nd=Te.get,cE=Te.keys,uE=Te.omit,lE=Te.isEmpty,fE=Te.replace,Id=Te.isPlainObject,io=Te.isArray,Td=Te.each,dE=Te.last,hE=Te.split,pE=Te.uniq,Ad=Te.map,mE=Te.concat,qd=Te.filter,gE=`Application verification.
47
+ `)),[4,(0,Q.aiRequest)(i)];case 4:o.sent(),o.label=5;case 5:return t.catchableError||(t.traceId&&Q.logger.log(qt.gray("TraceId: ".concat(t.traceId))),no()||(Q.logger.log(qt.gray("Environment: ".concat((0,Q.getVersion)()))),Q.logger.log(xs("Documents: ","https://www.serverless-devs.com")),Q.logger.log(xs("Discussions: ","https://github.com/Serverless-Devs/Serverless-Devs/discussions")),Q.logger.log(xs("Issues: ","https://github.com/Serverless-Devs/Serverless-Devs/issues")),Q.logger.log(xs("Regsitry: ",`https://registry.serverless-devs.com
48
+ `)),t.traceId&&Q.logger.log(qt.gray("Please copy traceId: ".concat(t.traceId," and join Dingding group: 33947367 for consultation."))),process.env.serverless_devs_trace_id&&Q.logger.log("A complete log of this run can be found in: ".concat(RE.default.join(Fr.default.getRootHome(),"logs","".concat(process.env.serverless_devs_trace_id,".log")),`
49
+ `)))),!no()&&Q.logger.log(qt.gray("You can run 's clean --all' to clean Serverless devs.")),t.traceId&&!t.catchableError?[4,CE({type:"jsError",errorMessage:n.message,errorStack:n.stack,traceId:t.traceId})]:[3,7];case 6:o.sent(),o.label=7;case 7:return process.exit(n.code||1),[2]}})})};ee.HandleError=LE});var Nd=exports&&exports.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function c(l){try{o(n.next(l))}catch(d){a(d)}}function u(l){try{o(n.throw(l))}catch(d){a(d)}}function o(l){l.done?i(l.value):s(l.value).then(c,u)}o((n=n.apply(r,e||[])).next())})},Id=exports&&exports.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(o){return function(l){return u([o,l])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,s&&(i=o[0]&2?s.return:o[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;switch(s=0,i&&(o=[o[0]&2,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,s=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1],i=o;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(o);break}i[2]&&t.ops.pop(),t.trys.pop();continue}o=e.call(r,t)}catch(l){o=[6,l],s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},Mn=exports&&exports.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});var ME=Mn(ko()),wt=Mn(vt()),FE=Mn(yi()),Vr=ln(),VE=Mn(require("path")),HE=Mn(vd()),UE=Cd(),so=wt.default.colors,GE=wt.default.getYamlContent,Te=wt.default.lodash,zE=wt.default.loadComponent,KE=wt.default.fse,XE=wt.default.parseYaml,WE=wt.default.spinner,Td=Te.get,BE=Te.keys,JE=Te.omit,YE=Te.isEmpty,ZE=Te.replace,Ad=Te.isPlainObject,io=Te.isArray,qd=Te.each,QE=Te.last,ew=Te.split,tw=Te.uniq,Dd=Te.map,rw=Te.concat,jd=Te.filter,nw=`Application verification.
49
50
 
50
51
  Example:
51
52
  $ s verify
52
53
 
53
- `.concat((0,Fr.emoji)("\u{1F4D6}")," Document: ").concat(so.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/verify.md")),vE=Z$.default.name("s verify").usage("[options]").option("-t, --template [templatePath]","Specify the template file").helpOption("-h, --help",(0,Q$.default)("display_help_for_command")).description(gE).addHelpCommand(!1).parse(process.argv);function Dd(r){var e=io(r)?[]:{};if(typeof r=="object"){var t=cE(r).filter(function(i){return i.startsWith("x-")}),n=uE(r,t);for(var s in n)e[s]=typeof r[s]=="object"?Dd(r[s]):r[s]}else e=r;return e}function _E(r){var e=Dd(r),t=[];function n(i,a){if(a===void 0&&(a=""),Id(i)){if(i.required===!0){var c=hE(a,"."),u=c.slice(0,c.length-2).join(".");t.push({key:u,name:dE(c)})}typeof i.required=="boolean"&&delete i.required,a!==""&&(a="".concat(a,"."));for(var o in i)n(i[o],"".concat(a).concat(o))}io(i)&&Td(i,function(l,d){n(l,"".concat(a,"[").concat(d,"]"))})}function s(i,a){if(a===void 0&&(a=""),Id(i)){var c=qd(t,function(l){return l.key===a});if(c.length>0){var u=Ad(c,function(l){return l.name});i.required=i.required?pE(mE(i.required,u)):u}a!==""&&(a="".concat(a,"."));for(var o in i)s(i[o],"".concat(a).concat(o))}io(i)&&Td(i,function(l,d){s(l,"".concat(a,"[").concat(d,"]"))})}return n(e),s(e),e}(function(){return Rd(void 0,void 0,void 0,function(){var r,e,t,n,s,i,a,c,u,o,l,d,y,m,$,E,w,b,D,T,z,C,me,ke,bt,xe;return Cd(this,function(re){switch(re.label){case 0:return r=(0,Fr.getProcessArgv)(),e=r.help,t=r.template,e&&vE.help(),[4,wt.default.getTemplatePath(t)];case 1:return n=re.sent(),[4,wt.default.transforYamlPath(n)];case 2:s=re.sent(),i=iE.readFileSync(s,"utf8"),a=aE(i),c=a.services,u=[];for(o in c)l=c[o],u.push({component:l.component,props:l.props,service:o});d=[],y=0,m=u,re.label=3;case 3:return y<m.length?($=m[y],[4,sE($.component)]):[3,7];case 4:return E=re.sent(),[4,nE(eE.default.join(E.__path,"publish.yaml"))];case 5:if(w=re.sent(),b=Nd(w,"Properties",{}),lE(b.properties))return[3,6];if(D=new tE.default({strict:!1}),T=D.compile(_E(b)),z=T($.props),!z)return d.push(!0),C=T.errors,me=qd(C,function(Le){return Le.keyword!=="oneOf"}),Fr.logger.log("".concat((0,Fr.red)("\u2716")," Format verification failed.")),ke=Nd(me,"[0].instancePath"),ke&&(bt=fE(ke.slice(1),/\//g,"."),Fr.logger.log("The ".concat(so.yellow(bt)," field in ").concat(so.yellow($.service),` service is incorrect.
54
- `))),xe=Ad(me,function(Le){return{message:Le.message,params:Le.params}}),Fr.logger.output(xe.length>1?xe:xe[0]),[3,7];re.label=6;case 6:return y++,[3,3];case 7:return d.length===0&&oE("Format verification passed.").succeed(),[2]}})})})().catch(function(r){return Rd(void 0,void 0,void 0,function(){return Cd(this,function(e){switch(e.label){case 0:return[4,(0,rE.HandleError)(r)];case 1:return e.sent(),[2]}})})});
54
+ `.concat((0,Vr.emoji)("\u{1F4D6}")," Document: ").concat(so.underline("https://github.com/Serverless-Devs/Serverless-Devs/tree/master/docs/zh/command/verify.md")),sw=ME.default.name("s verify").usage("[options]").option("-t, --template [templatePath]","Specify the template file").helpOption("-h, --help",(0,FE.default)("display_help_for_command")).description(nw).addHelpCommand(!1).parse(process.argv);function kd(r){var e=io(r)?[]:{};if(typeof r=="object"){var t=BE(r).filter(function(i){return i.startsWith("x-")}),n=JE(r,t);for(var s in n)e[s]=typeof r[s]=="object"?kd(r[s]):r[s]}else e=r;return e}function iw(r){var e=kd(r),t=[];function n(i,a){if(a===void 0&&(a=""),Ad(i)){if(i.required===!0){var c=ew(a,"."),u=c.slice(0,c.length-2).join(".");t.push({key:u,name:QE(c)})}typeof i.required=="boolean"&&delete i.required,a!==""&&(a="".concat(a,"."));for(var o in i)n(i[o],"".concat(a).concat(o))}io(i)&&qd(i,function(l,d){n(l,"".concat(a,"[").concat(d,"]"))})}function s(i,a){if(a===void 0&&(a=""),Ad(i)){var c=jd(t,function(l){return l.key===a});if(c.length>0){var u=Dd(c,function(l){return l.name});i.required=i.required?tw(rw(i.required,u)):u}a!==""&&(a="".concat(a,"."));for(var o in i)s(i[o],"".concat(a).concat(o))}io(i)&&qd(i,function(l,d){s(l,"".concat(a,"[").concat(d,"]"))})}return n(e),s(e),e}(function(){return Nd(void 0,void 0,void 0,function(){var r,e,t,n,s,i,a,c,u,o,l,d,y,m,$,E,w,b,D,T,z,C,me,ke,bt,xe;return Id(this,function(re){switch(re.label){case 0:return r=(0,Vr.getProcessArgv)(),e=r.help,t=r.template,e&&sw.help(),[4,wt.default.getTemplatePath(t)];case 1:return n=re.sent(),[4,wt.default.transforYamlPath(n)];case 2:s=re.sent(),i=KE.readFileSync(s,"utf8"),a=XE(i),c=a.services,u=[];for(o in c)l=c[o],u.push({component:l.component,props:l.props,service:o});d=[],y=0,m=u,re.label=3;case 3:return y<m.length?($=m[y],[4,zE($.component)]):[3,7];case 4:return E=re.sent(),[4,GE(VE.default.join(E.__path,"publish.yaml"))];case 5:if(w=re.sent(),b=Td(w,"Properties",{}),YE(b.properties))return[3,6];if(D=new HE.default({strict:!1}),T=D.compile(iw(b)),z=T($.props),!z)return d.push(!0),C=T.errors,me=jd(C,function(Le){return Le.keyword!=="oneOf"}),Vr.logger.log("".concat((0,Vr.red)("\u2716")," Format verification failed.")),ke=Td(me,"[0].instancePath"),ke&&(bt=ZE(ke.slice(1),/\//g,"."),Vr.logger.log("The ".concat(so.yellow(bt)," field in ").concat(so.yellow($.service),` service is incorrect.
55
+ `))),xe=Dd(me,function(Le){return{message:Le.message,params:Le.params}}),Vr.logger.output(xe.length>1?xe:xe[0]),[3,7];re.label=6;case 6:return y++,[3,3];case 7:return d.length===0&&WE("Format verification passed.").succeed(),[2]}})})})().catch(function(r){return Nd(void 0,void 0,void 0,function(){return Id(this,function(e){switch(e.label){case 0:return[4,(0,UE.HandleError)(r)];case 1:return e.sent(),[2]}})})});
55
56
  /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */